waves_lib 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1222) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +22 -0
  4. data/CHANGELOG.md +5 -0
  5. data/CODE_OF_CONDUCT.md +84 -0
  6. data/LICENSE.txt +19 -0
  7. data/README.md +39 -0
  8. data/Rakefile +12 -0
  9. data/js/node_modules/@protobufjs/aspromise/LICENSE +26 -0
  10. data/js/node_modules/@protobufjs/aspromise/README.md +13 -0
  11. data/js/node_modules/@protobufjs/aspromise/index.d.ts +13 -0
  12. data/js/node_modules/@protobufjs/aspromise/index.js +52 -0
  13. data/js/node_modules/@protobufjs/aspromise/package.json +21 -0
  14. data/js/node_modules/@protobufjs/aspromise/tests/index.js +130 -0
  15. data/js/node_modules/@protobufjs/base64/LICENSE +26 -0
  16. data/js/node_modules/@protobufjs/base64/README.md +19 -0
  17. data/js/node_modules/@protobufjs/base64/index.d.ts +32 -0
  18. data/js/node_modules/@protobufjs/base64/index.js +139 -0
  19. data/js/node_modules/@protobufjs/base64/package.json +21 -0
  20. data/js/node_modules/@protobufjs/base64/tests/index.js +46 -0
  21. data/js/node_modules/@protobufjs/codegen/LICENSE +26 -0
  22. data/js/node_modules/@protobufjs/codegen/README.md +49 -0
  23. data/js/node_modules/@protobufjs/codegen/index.d.ts +31 -0
  24. data/js/node_modules/@protobufjs/codegen/index.js +99 -0
  25. data/js/node_modules/@protobufjs/codegen/package.json +13 -0
  26. data/js/node_modules/@protobufjs/codegen/tests/index.js +13 -0
  27. data/js/node_modules/@protobufjs/eventemitter/LICENSE +26 -0
  28. data/js/node_modules/@protobufjs/eventemitter/README.md +22 -0
  29. data/js/node_modules/@protobufjs/eventemitter/index.d.ts +43 -0
  30. data/js/node_modules/@protobufjs/eventemitter/index.js +76 -0
  31. data/js/node_modules/@protobufjs/eventemitter/package.json +21 -0
  32. data/js/node_modules/@protobufjs/eventemitter/tests/index.js +47 -0
  33. data/js/node_modules/@protobufjs/fetch/LICENSE +26 -0
  34. data/js/node_modules/@protobufjs/fetch/README.md +13 -0
  35. data/js/node_modules/@protobufjs/fetch/index.d.ts +56 -0
  36. data/js/node_modules/@protobufjs/fetch/index.js +115 -0
  37. data/js/node_modules/@protobufjs/fetch/package.json +25 -0
  38. data/js/node_modules/@protobufjs/fetch/tests/index.js +16 -0
  39. data/js/node_modules/@protobufjs/float/LICENSE +26 -0
  40. data/js/node_modules/@protobufjs/float/README.md +102 -0
  41. data/js/node_modules/@protobufjs/float/bench/index.js +87 -0
  42. data/js/node_modules/@protobufjs/float/bench/suite.js +46 -0
  43. data/js/node_modules/@protobufjs/float/index.d.ts +83 -0
  44. data/js/node_modules/@protobufjs/float/index.js +335 -0
  45. data/js/node_modules/@protobufjs/float/package.json +26 -0
  46. data/js/node_modules/@protobufjs/float/tests/index.js +100 -0
  47. data/js/node_modules/@protobufjs/inquire/LICENSE +26 -0
  48. data/js/node_modules/@protobufjs/inquire/README.md +13 -0
  49. data/js/node_modules/@protobufjs/inquire/index.d.ts +9 -0
  50. data/js/node_modules/@protobufjs/inquire/index.js +17 -0
  51. data/js/node_modules/@protobufjs/inquire/package.json +21 -0
  52. data/js/node_modules/@protobufjs/inquire/tests/data/array.js +1 -0
  53. data/js/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +1 -0
  54. data/js/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +1 -0
  55. data/js/node_modules/@protobufjs/inquire/tests/data/object.js +1 -0
  56. data/js/node_modules/@protobufjs/inquire/tests/index.js +20 -0
  57. data/js/node_modules/@protobufjs/path/LICENSE +26 -0
  58. data/js/node_modules/@protobufjs/path/README.md +19 -0
  59. data/js/node_modules/@protobufjs/path/index.d.ts +22 -0
  60. data/js/node_modules/@protobufjs/path/index.js +65 -0
  61. data/js/node_modules/@protobufjs/path/package.json +21 -0
  62. data/js/node_modules/@protobufjs/path/tests/index.js +60 -0
  63. data/js/node_modules/@protobufjs/pool/LICENSE +26 -0
  64. data/js/node_modules/@protobufjs/pool/README.md +13 -0
  65. data/js/node_modules/@protobufjs/pool/index.d.ts +32 -0
  66. data/js/node_modules/@protobufjs/pool/index.js +48 -0
  67. data/js/node_modules/@protobufjs/pool/package.json +21 -0
  68. data/js/node_modules/@protobufjs/pool/tests/index.js +33 -0
  69. data/js/node_modules/@protobufjs/utf8/LICENSE +26 -0
  70. data/js/node_modules/@protobufjs/utf8/README.md +20 -0
  71. data/js/node_modules/@protobufjs/utf8/index.d.ts +24 -0
  72. data/js/node_modules/@protobufjs/utf8/index.js +105 -0
  73. data/js/node_modules/@protobufjs/utf8/package.json +21 -0
  74. data/js/node_modules/@protobufjs/utf8/tests/data/utf8.txt +216 -0
  75. data/js/node_modules/@protobufjs/utf8/tests/index.js +57 -0
  76. data/js/node_modules/@types/base64-js/LICENSE +21 -0
  77. data/js/node_modules/@types/base64-js/README.md +16 -0
  78. data/js/node_modules/@types/base64-js/index.d.ts +23 -0
  79. data/js/node_modules/@types/base64-js/package.json +29 -0
  80. data/js/node_modules/@types/long/LICENSE +21 -0
  81. data/js/node_modules/@types/long/README.md +16 -0
  82. data/js/node_modules/@types/long/index.d.ts +389 -0
  83. data/js/node_modules/@types/long/package.json +25 -0
  84. data/js/node_modules/@types/node/LICENSE +21 -0
  85. data/js/node_modules/@types/node/README.md +16 -0
  86. data/js/node_modules/@types/node/assert/strict.d.ts +8 -0
  87. data/js/node_modules/@types/node/assert.d.ts +972 -0
  88. data/js/node_modules/@types/node/async_hooks.d.ts +530 -0
  89. data/js/node_modules/@types/node/buffer.d.ts +2354 -0
  90. data/js/node_modules/@types/node/child_process.d.ts +1395 -0
  91. data/js/node_modules/@types/node/cluster.d.ts +414 -0
  92. data/js/node_modules/@types/node/console.d.ts +412 -0
  93. data/js/node_modules/@types/node/constants.d.ts +18 -0
  94. data/js/node_modules/@types/node/crypto.d.ts +3978 -0
  95. data/js/node_modules/@types/node/dgram.d.ts +545 -0
  96. data/js/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
  97. data/js/node_modules/@types/node/dns/promises.d.ts +414 -0
  98. data/js/node_modules/@types/node/dns.d.ts +668 -0
  99. data/js/node_modules/@types/node/dom-events.d.ts +126 -0
  100. data/js/node_modules/@types/node/domain.d.ts +170 -0
  101. data/js/node_modules/@types/node/events.d.ts +724 -0
  102. data/js/node_modules/@types/node/fs/promises.d.ts +1190 -0
  103. data/js/node_modules/@types/node/fs.d.ts +4044 -0
  104. data/js/node_modules/@types/node/globals.d.ts +303 -0
  105. data/js/node_modules/@types/node/globals.global.d.ts +1 -0
  106. data/js/node_modules/@types/node/http.d.ts +1724 -0
  107. data/js/node_modules/@types/node/http2.d.ts +2129 -0
  108. data/js/node_modules/@types/node/https.d.ts +441 -0
  109. data/js/node_modules/@types/node/index.d.ts +134 -0
  110. data/js/node_modules/@types/node/inspector.d.ts +2748 -0
  111. data/js/node_modules/@types/node/module.d.ts +129 -0
  112. data/js/node_modules/@types/node/net.d.ts +888 -0
  113. data/js/node_modules/@types/node/os.d.ts +477 -0
  114. data/js/node_modules/@types/node/package.json +237 -0
  115. data/js/node_modules/@types/node/path.d.ts +191 -0
  116. data/js/node_modules/@types/node/perf_hooks.d.ts +638 -0
  117. data/js/node_modules/@types/node/process.d.ts +1494 -0
  118. data/js/node_modules/@types/node/punycode.d.ts +117 -0
  119. data/js/node_modules/@types/node/querystring.d.ts +131 -0
  120. data/js/node_modules/@types/node/readline/promises.d.ts +145 -0
  121. data/js/node_modules/@types/node/readline.d.ts +526 -0
  122. data/js/node_modules/@types/node/repl.d.ts +424 -0
  123. data/js/node_modules/@types/node/stream/consumers.d.ts +12 -0
  124. data/js/node_modules/@types/node/stream/promises.d.ts +42 -0
  125. data/js/node_modules/@types/node/stream/web.d.ts +330 -0
  126. data/js/node_modules/@types/node/stream.d.ts +1421 -0
  127. data/js/node_modules/@types/node/string_decoder.d.ts +67 -0
  128. data/js/node_modules/@types/node/test.d.ts +1383 -0
  129. data/js/node_modules/@types/node/timers/promises.d.ts +93 -0
  130. data/js/node_modules/@types/node/timers.d.ts +215 -0
  131. data/js/node_modules/@types/node/tls.d.ts +1130 -0
  132. data/js/node_modules/@types/node/trace_events.d.ts +182 -0
  133. data/js/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  134. data/js/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
  135. data/js/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
  136. data/js/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
  137. data/js/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
  138. data/js/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
  139. data/js/node_modules/@types/node/ts4.8/console.d.ts +412 -0
  140. data/js/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
  141. data/js/node_modules/@types/node/ts4.8/crypto.d.ts +3977 -0
  142. data/js/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
  143. data/js/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
  144. data/js/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
  145. data/js/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
  146. data/js/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
  147. data/js/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  148. data/js/node_modules/@types/node/ts4.8/events.d.ts +724 -0
  149. data/js/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
  150. data/js/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
  151. data/js/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
  152. data/js/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  153. data/js/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
  154. data/js/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
  155. data/js/node_modules/@types/node/ts4.8/https.d.ts +441 -0
  156. data/js/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  157. data/js/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
  158. data/js/node_modules/@types/node/ts4.8/module.d.ts +129 -0
  159. data/js/node_modules/@types/node/ts4.8/net.d.ts +888 -0
  160. data/js/node_modules/@types/node/ts4.8/os.d.ts +477 -0
  161. data/js/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  162. data/js/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
  163. data/js/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
  164. data/js/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  165. data/js/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
  166. data/js/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
  167. data/js/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
  168. data/js/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
  169. data/js/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  170. data/js/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
  171. data/js/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
  172. data/js/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
  173. data/js/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  174. data/js/node_modules/@types/node/ts4.8/test.d.ts +1365 -0
  175. data/js/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
  176. data/js/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
  177. data/js/node_modules/@types/node/ts4.8/tls.d.ts +1130 -0
  178. data/js/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
  179. data/js/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
  180. data/js/node_modules/@types/node/ts4.8/url.d.ts +901 -0
  181. data/js/node_modules/@types/node/ts4.8/util.d.ts +2116 -0
  182. data/js/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
  183. data/js/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
  184. data/js/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
  185. data/js/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
  186. data/js/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  187. data/js/node_modules/@types/node/tty.d.ts +208 -0
  188. data/js/node_modules/@types/node/url.d.ts +901 -0
  189. data/js/node_modules/@types/node/util.d.ts +2116 -0
  190. data/js/node_modules/@types/node/v8.d.ts +635 -0
  191. data/js/node_modules/@types/node/vm.d.ts +894 -0
  192. data/js/node_modules/@types/node/wasi.d.ts +152 -0
  193. data/js/node_modules/@types/node/worker_threads.d.ts +693 -0
  194. data/js/node_modules/@types/node/zlib.d.ts +517 -0
  195. data/js/node_modules/@types/node-fetch/LICENSE +21 -0
  196. data/js/node_modules/@types/node-fetch/README.md +16 -0
  197. data/js/node_modules/@types/node-fetch/externals.d.ts +24 -0
  198. data/js/node_modules/@types/node-fetch/index.d.ts +224 -0
  199. data/js/node_modules/@types/node-fetch/package.json +83 -0
  200. data/js/node_modules/@waves/bignumber/dist/BigNumber.d.ts +74 -0
  201. data/js/node_modules/@waves/bignumber/dist/BigNumber.js +252 -0
  202. data/js/node_modules/@waves/bignumber/dist/BigNumber.js.map +1 -0
  203. data/js/node_modules/@waves/bignumber/dist/Config.d.ts +22 -0
  204. data/js/node_modules/@waves/bignumber/dist/Config.js +43 -0
  205. data/js/node_modules/@waves/bignumber/dist/Config.js.map +1 -0
  206. data/js/node_modules/@waves/bignumber/dist/bignumber.umd.js +3194 -0
  207. data/js/node_modules/@waves/bignumber/dist/bignumber.umd.min.js +1 -0
  208. data/js/node_modules/@waves/bignumber/dist/index.d.ts +3 -0
  209. data/js/node_modules/@waves/bignumber/dist/index.js +9 -0
  210. data/js/node_modules/@waves/bignumber/dist/index.js.map +1 -0
  211. data/js/node_modules/@waves/bignumber/package.json +64 -0
  212. data/js/node_modules/@waves/bignumber/readme.md +285 -0
  213. data/js/node_modules/@waves/marshall/LICENSE +9 -0
  214. data/js/node_modules/@waves/marshall/README.md +39 -0
  215. data/js/node_modules/@waves/marshall/dist/index.d.ts +26 -0
  216. data/js/node_modules/@waves/marshall/dist/index.js +45 -0
  217. data/js/node_modules/@waves/marshall/dist/index.js.map +1 -0
  218. data/js/node_modules/@waves/marshall/dist/jsonMethods.d.ts +36 -0
  219. data/js/node_modules/@waves/marshall/dist/jsonMethods.js +194 -0
  220. data/js/node_modules/@waves/marshall/dist/jsonMethods.js.map +1 -0
  221. data/js/node_modules/@waves/marshall/dist/libs/Utf8ArrayToStr.d.ts +1 -0
  222. data/js/node_modules/@waves/marshall/dist/libs/Utf8ArrayToStr.js +35 -0
  223. data/js/node_modules/@waves/marshall/dist/libs/Utf8ArrayToStr.js.map +1 -0
  224. data/js/node_modules/@waves/marshall/dist/libs/base58.d.ts +5 -0
  225. data/js/node_modules/@waves/marshall/dist/libs/base58.js +66 -0
  226. data/js/node_modules/@waves/marshall/dist/libs/base58.js.map +1 -0
  227. data/js/node_modules/@waves/marshall/dist/libs/utils.d.ts +2 -0
  228. data/js/node_modules/@waves/marshall/dist/libs/utils.js +6 -0
  229. data/js/node_modules/@waves/marshall/dist/libs/utils.js.map +1 -0
  230. data/js/node_modules/@waves/marshall/dist/min/waves-marshall.min.js +1 -0
  231. data/js/node_modules/@waves/marshall/dist/parse.d.ts +21 -0
  232. data/js/node_modules/@waves/marshall/dist/parse.js +142 -0
  233. data/js/node_modules/@waves/marshall/dist/parse.js.map +1 -0
  234. data/js/node_modules/@waves/marshall/dist/parsePrimitives.d.ts +57 -0
  235. data/js/node_modules/@waves/marshall/dist/parsePrimitives.js +96 -0
  236. data/js/node_modules/@waves/marshall/dist/parsePrimitives.js.map +1 -0
  237. data/js/node_modules/@waves/marshall/dist/schemaTypes.d.ts +62 -0
  238. data/js/node_modules/@waves/marshall/dist/schemaTypes.js +41 -0
  239. data/js/node_modules/@waves/marshall/dist/schemaTypes.js.map +1 -0
  240. data/js/node_modules/@waves/marshall/dist/schemas.d.ts +128 -0
  241. data/js/node_modules/@waves/marshall/dist/schemas.js +542 -0
  242. data/js/node_modules/@waves/marshall/dist/schemas.js.map +1 -0
  243. data/js/node_modules/@waves/marshall/dist/serialize.d.ts +11 -0
  244. data/js/node_modules/@waves/marshall/dist/serialize.js +102 -0
  245. data/js/node_modules/@waves/marshall/dist/serialize.js.map +1 -0
  246. data/js/node_modules/@waves/marshall/dist/serializePrimitives.d.ts +21 -0
  247. data/js/node_modules/@waves/marshall/dist/serializePrimitives.js +63 -0
  248. data/js/node_modules/@waves/marshall/dist/serializePrimitives.js.map +1 -0
  249. data/js/node_modules/@waves/marshall/package.json +45 -0
  250. data/js/node_modules/@waves/marshall/src/index.ts +51 -0
  251. data/js/node_modules/@waves/marshall/src/jsonMethods.ts +231 -0
  252. data/js/node_modules/@waves/marshall/src/libs/Utf8ArrayToStr.ts +35 -0
  253. data/js/node_modules/@waves/marshall/src/libs/base58.ts +88 -0
  254. data/js/node_modules/@waves/marshall/src/libs/utils.ts +6 -0
  255. data/js/node_modules/@waves/marshall/src/parse.ts +157 -0
  256. data/js/node_modules/@waves/marshall/src/parsePrimitives.ts +118 -0
  257. data/js/node_modules/@waves/marshall/src/schemaTypes.ts +91 -0
  258. data/js/node_modules/@waves/marshall/src/schemas.ts +630 -0
  259. data/js/node_modules/@waves/marshall/src/serialize.ts +110 -0
  260. data/js/node_modules/@waves/marshall/src/serializePrimitives.ts +80 -0
  261. data/js/node_modules/@waves/node-api-js/README.md +2 -0
  262. data/js/node_modules/@waves/node-api-js/cjs/api-node/activation/index.d.ts +21 -0
  263. data/js/node_modules/@waves/node-api-js/cjs/api-node/activation/index.js +20 -0
  264. data/js/node_modules/@waves/node-api-js/cjs/api-node/activation/index.js.map +1 -0
  265. data/js/node_modules/@waves/node-api-js/cjs/api-node/addresses/index.d.ts +81 -0
  266. data/js/node_modules/@waves/node-api-js/cjs/api-node/addresses/index.js +174 -0
  267. data/js/node_modules/@waves/node-api-js/cjs/api-node/addresses/index.js.map +1 -0
  268. data/js/node_modules/@waves/node-api-js/cjs/api-node/alias/index.d.ts +6 -0
  269. data/js/node_modules/@waves/node-api-js/cjs/api-node/alias/index.js +22 -0
  270. data/js/node_modules/@waves/node-api-js/cjs/api-node/alias/index.js.map +1 -0
  271. data/js/node_modules/@waves/node-api-js/cjs/api-node/assets/index.d.ts +79 -0
  272. data/js/node_modules/@waves/node-api-js/cjs/api-node/assets/index.js +172 -0
  273. data/js/node_modules/@waves/node-api-js/cjs/api-node/assets/index.js.map +1 -0
  274. data/js/node_modules/@waves/node-api-js/cjs/api-node/blocks/index.d.ts +131 -0
  275. data/js/node_modules/@waves/node-api-js/cjs/api-node/blocks/index.js +210 -0
  276. data/js/node_modules/@waves/node-api-js/cjs/api-node/blocks/index.js.map +1 -0
  277. data/js/node_modules/@waves/node-api-js/cjs/api-node/consensus/index.d.ts +39 -0
  278. data/js/node_modules/@waves/node-api-js/cjs/api-node/consensus/index.js +37 -0
  279. data/js/node_modules/@waves/node-api-js/cjs/api-node/consensus/index.js.map +1 -0
  280. data/js/node_modules/@waves/node-api-js/cjs/api-node/debug/index.d.ts +189 -0
  281. data/js/node_modules/@waves/node-api-js/cjs/api-node/debug/index.js +245 -0
  282. data/js/node_modules/@waves/node-api-js/cjs/api-node/debug/index.js.map +1 -0
  283. data/js/node_modules/@waves/node-api-js/cjs/api-node/eth/index.d.ts +3 -0
  284. data/js/node_modules/@waves/node-api-js/cjs/api-node/eth/index.js +15 -0
  285. data/js/node_modules/@waves/node-api-js/cjs/api-node/eth/index.js.map +1 -0
  286. data/js/node_modules/@waves/node-api-js/cjs/api-node/leasing/index.d.ts +22 -0
  287. data/js/node_modules/@waves/node-api-js/cjs/api-node/leasing/index.js +42 -0
  288. data/js/node_modules/@waves/node-api-js/cjs/api-node/leasing/index.js.map +1 -0
  289. data/js/node_modules/@waves/node-api-js/cjs/api-node/node/index.d.ts +11 -0
  290. data/js/node_modules/@waves/node-api-js/cjs/api-node/node/index.js +20 -0
  291. data/js/node_modules/@waves/node-api-js/cjs/api-node/node/index.js.map +1 -0
  292. data/js/node_modules/@waves/node-api-js/cjs/api-node/peers/index.d.ts +46 -0
  293. data/js/node_modules/@waves/node-api-js/cjs/api-node/peers/index.js +60 -0
  294. data/js/node_modules/@waves/node-api-js/cjs/api-node/peers/index.js.map +1 -0
  295. data/js/node_modules/@waves/node-api-js/cjs/api-node/rewards/index.d.ts +21 -0
  296. data/js/node_modules/@waves/node-api-js/cjs/api-node/rewards/index.js +21 -0
  297. data/js/node_modules/@waves/node-api-js/cjs/api-node/rewards/index.js.map +1 -0
  298. data/js/node_modules/@waves/node-api-js/cjs/api-node/transactions/index.d.ts +73 -0
  299. data/js/node_modules/@waves/node-api-js/cjs/api-node/transactions/index.js +193 -0
  300. data/js/node_modules/@waves/node-api-js/cjs/api-node/transactions/index.js.map +1 -0
  301. data/js/node_modules/@waves/node-api-js/cjs/api-node/utils/index.d.ts +110 -0
  302. data/js/node_modules/@waves/node-api-js/cjs/api-node/utils/index.js +211 -0
  303. data/js/node_modules/@waves/node-api-js/cjs/api-node/utils/index.js.map +1 -0
  304. data/js/node_modules/@waves/node-api-js/cjs/api-node/wallet/index.d.ts +5 -0
  305. data/js/node_modules/@waves/node-api-js/cjs/api-node/wallet/index.js +7 -0
  306. data/js/node_modules/@waves/node-api-js/cjs/api-node/wallet/index.js.map +1 -0
  307. data/js/node_modules/@waves/node-api-js/cjs/constants.d.ts +40 -0
  308. data/js/node_modules/@waves/node-api-js/cjs/constants.js +43 -0
  309. data/js/node_modules/@waves/node-api-js/cjs/constants.js.map +1 -0
  310. data/js/node_modules/@waves/node-api-js/cjs/create.d.ts +1240 -0
  311. data/js/node_modules/@waves/node-api-js/cjs/create.js +119 -0
  312. data/js/node_modules/@waves/node-api-js/cjs/create.js.map +1 -0
  313. data/js/node_modules/@waves/node-api-js/cjs/index.d.ts +9 -0
  314. data/js/node_modules/@waves/node-api-js/cjs/index.js +18 -0
  315. data/js/node_modules/@waves/node-api-js/cjs/index.js.map +1 -0
  316. data/js/node_modules/@waves/node-api-js/cjs/interface.d.ts +44 -0
  317. data/js/node_modules/@waves/node-api-js/cjs/interface.js +10 -0
  318. data/js/node_modules/@waves/node-api-js/cjs/interface.js.map +1 -0
  319. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/availableSponsoredBalances.d.ts +7 -0
  320. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/availableSponsoredBalances.js +30 -0
  321. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/availableSponsoredBalances.js.map +1 -0
  322. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/ethAddress2waves.d.ts +1 -0
  323. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/ethAddress2waves.js +47 -0
  324. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/ethAddress2waves.js.map +1 -0
  325. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetIdListByTx.d.ts +2 -0
  326. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetIdListByTx.js +48 -0
  327. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetIdListByTx.js.map +1 -0
  328. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetsByTransaction.d.ts +3 -0
  329. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetsByTransaction.js +14 -0
  330. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getAssetsByTransaction.js.map +1 -0
  331. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getTransactionsWithAssets.d.ts +6 -0
  332. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getTransactionsWithAssets.js +13 -0
  333. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/getTransactionsWithAssets.js.map +1 -0
  334. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/watch.d.ts +24 -0
  335. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/watch.js +168 -0
  336. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/watch.js.map +1 -0
  337. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/wavesAddress2eth.d.ts +1 -0
  338. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/wavesAddress2eth.js +10 -0
  339. data/js/node_modules/@waves/node-api-js/cjs/tools/adresses/wavesAddress2eth.js.map +1 -0
  340. data/js/node_modules/@waves/node-api-js/cjs/tools/assets/wavesAsset2eth.d.ts +1 -0
  341. data/js/node_modules/@waves/node-api-js/cjs/tools/assets/wavesAsset2eth.js +10 -0
  342. data/js/node_modules/@waves/node-api-js/cjs/tools/assets/wavesAsset2eth.js.map +1 -0
  343. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.d.ts +1 -0
  344. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.js +12 -0
  345. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/detectInterval.js.map +1 -0
  346. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkByte.d.ts +1 -0
  347. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkByte.js +54 -0
  348. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkByte.js.map +1 -0
  349. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkCode.d.ts +1 -0
  350. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkCode.js +11 -0
  351. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/getNetworkCode.js.map +1 -0
  352. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/waitHeight.d.ts +3 -0
  353. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/waitHeight.js +65 -0
  354. data/js/node_modules/@waves/node-api-js/cjs/tools/blocks/waitHeight.js.map +1 -0
  355. data/js/node_modules/@waves/node-api-js/cjs/tools/parse.d.ts +1 -0
  356. data/js/node_modules/@waves/node-api-js/cjs/tools/parse.js +8 -0
  357. data/js/node_modules/@waves/node-api-js/cjs/tools/parse.js.map +1 -0
  358. data/js/node_modules/@waves/node-api-js/cjs/tools/query.d.ts +4 -0
  359. data/js/node_modules/@waves/node-api-js/cjs/tools/query.js +41 -0
  360. data/js/node_modules/@waves/node-api-js/cjs/tools/query.js.map +1 -0
  361. data/js/node_modules/@waves/node-api-js/cjs/tools/request.d.ts +64 -0
  362. data/js/node_modules/@waves/node-api-js/cjs/tools/request.js +42 -0
  363. data/js/node_modules/@waves/node-api-js/cjs/tools/request.js.map +1 -0
  364. data/js/node_modules/@waves/node-api-js/cjs/tools/resolve.d.ts +1 -0
  365. data/js/node_modules/@waves/node-api-js/cjs/tools/resolve.js +7 -0
  366. data/js/node_modules/@waves/node-api-js/cjs/tools/resolve.js.map +1 -0
  367. data/js/node_modules/@waves/node-api-js/cjs/tools/stringify.d.ts +1 -0
  368. data/js/node_modules/@waves/node-api-js/cjs/tools/stringify.js +21 -0
  369. data/js/node_modules/@waves/node-api-js/cjs/tools/stringify.js.map +1 -0
  370. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/broadcast.d.ts +14 -0
  371. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/broadcast.js +60 -0
  372. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/broadcast.js.map +1 -0
  373. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/ethTxId2waves.d.ts +1 -0
  374. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/ethTxId2waves.js +11 -0
  375. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/ethTxId2waves.js.map +1 -0
  376. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/transactions.d.ts +0 -0
  377. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/transactions.js +2 -0
  378. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/transactions.js.map +1 -0
  379. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/wait.d.ts +10 -0
  380. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/wait.js +42 -0
  381. data/js/node_modules/@waves/node-api-js/cjs/tools/transactions/wait.js.map +1 -0
  382. data/js/node_modules/@waves/node-api-js/cjs/tools/utils.d.ts +32 -0
  383. data/js/node_modules/@waves/node-api-js/cjs/tools/utils.js +118 -0
  384. data/js/node_modules/@waves/node-api-js/cjs/tools/utils.js.map +1 -0
  385. data/js/node_modules/@waves/node-api-js/dist/0.node-api.js +467 -0
  386. data/js/node_modules/@waves/node-api-js/dist/node-api.js +30544 -0
  387. data/js/node_modules/@waves/node-api-js/dist/node-api.min.js +26 -0
  388. data/js/node_modules/@waves/node-api-js/dist/node-api.min.js.LICENSE.txt +17 -0
  389. data/js/node_modules/@waves/node-api-js/dist/node_fs-node_path.node-api.js +23 -0
  390. data/js/node_modules/@waves/node-api-js/dist/vendors-node_modules_node-fetch_src_utils_multipart-parser_js.node-api.js +599 -0
  391. data/js/node_modules/@waves/node-api-js/es/api-node/activation/index.d.ts +21 -0
  392. data/js/node_modules/@waves/node-api-js/es/api-node/activation/index.js +13 -0
  393. data/js/node_modules/@waves/node-api-js/es/api-node/activation/index.js.map +1 -0
  394. data/js/node_modules/@waves/node-api-js/es/api-node/addresses/index.d.ts +81 -0
  395. data/js/node_modules/@waves/node-api-js/es/api-node/addresses/index.js +111 -0
  396. data/js/node_modules/@waves/node-api-js/es/api-node/addresses/index.js.map +1 -0
  397. data/js/node_modules/@waves/node-api-js/es/api-node/alias/index.d.ts +6 -0
  398. data/js/node_modules/@waves/node-api-js/es/api-node/alias/index.js +14 -0
  399. data/js/node_modules/@waves/node-api-js/es/api-node/alias/index.js.map +1 -0
  400. data/js/node_modules/@waves/node-api-js/es/api-node/assets/index.d.ts +79 -0
  401. data/js/node_modules/@waves/node-api-js/es/api-node/assets/index.js +103 -0
  402. data/js/node_modules/@waves/node-api-js/es/api-node/assets/index.js.map +1 -0
  403. data/js/node_modules/@waves/node-api-js/es/api-node/blocks/index.d.ts +131 -0
  404. data/js/node_modules/@waves/node-api-js/es/api-node/blocks/index.js +179 -0
  405. data/js/node_modules/@waves/node-api-js/es/api-node/blocks/index.js.map +1 -0
  406. data/js/node_modules/@waves/node-api-js/es/api-node/consensus/index.d.ts +39 -0
  407. data/js/node_modules/@waves/node-api-js/es/api-node/consensus/index.js +27 -0
  408. data/js/node_modules/@waves/node-api-js/es/api-node/consensus/index.js.map +1 -0
  409. data/js/node_modules/@waves/node-api-js/es/api-node/debug/index.d.ts +189 -0
  410. data/js/node_modules/@waves/node-api-js/es/api-node/debug/index.js +201 -0
  411. data/js/node_modules/@waves/node-api-js/es/api-node/debug/index.js.map +1 -0
  412. data/js/node_modules/@waves/node-api-js/es/api-node/eth/index.d.ts +3 -0
  413. data/js/node_modules/@waves/node-api-js/es/api-node/eth/index.js +8 -0
  414. data/js/node_modules/@waves/node-api-js/es/api-node/eth/index.js.map +1 -0
  415. data/js/node_modules/@waves/node-api-js/es/api-node/leasing/index.d.ts +22 -0
  416. data/js/node_modules/@waves/node-api-js/es/api-node/leasing/index.js +22 -0
  417. data/js/node_modules/@waves/node-api-js/es/api-node/leasing/index.js.map +1 -0
  418. data/js/node_modules/@waves/node-api-js/es/api-node/node/index.d.ts +11 -0
  419. data/js/node_modules/@waves/node-api-js/es/api-node/node/index.js +10 -0
  420. data/js/node_modules/@waves/node-api-js/es/api-node/node/index.js.map +1 -0
  421. data/js/node_modules/@waves/node-api-js/es/api-node/peers/index.d.ts +46 -0
  422. data/js/node_modules/@waves/node-api-js/es/api-node/peers/index.js +46 -0
  423. data/js/node_modules/@waves/node-api-js/es/api-node/peers/index.js.map +1 -0
  424. data/js/node_modules/@waves/node-api-js/es/api-node/rewards/index.d.ts +21 -0
  425. data/js/node_modules/@waves/node-api-js/es/api-node/rewards/index.js +13 -0
  426. data/js/node_modules/@waves/node-api-js/es/api-node/rewards/index.js.map +1 -0
  427. data/js/node_modules/@waves/node-api-js/es/api-node/transactions/index.d.ts +73 -0
  428. data/js/node_modules/@waves/node-api-js/es/api-node/transactions/index.js +137 -0
  429. data/js/node_modules/@waves/node-api-js/es/api-node/transactions/index.js.map +1 -0
  430. data/js/node_modules/@waves/node-api-js/es/api-node/utils/index.d.ts +110 -0
  431. data/js/node_modules/@waves/node-api-js/es/api-node/utils/index.js +193 -0
  432. data/js/node_modules/@waves/node-api-js/es/api-node/utils/index.js.map +1 -0
  433. data/js/node_modules/@waves/node-api-js/es/api-node/wallet/index.d.ts +5 -0
  434. data/js/node_modules/@waves/node-api-js/es/api-node/wallet/index.js +7 -0
  435. data/js/node_modules/@waves/node-api-js/es/api-node/wallet/index.js.map +1 -0
  436. data/js/node_modules/@waves/node-api-js/es/constants.d.ts +40 -0
  437. data/js/node_modules/@waves/node-api-js/es/constants.js +40 -0
  438. data/js/node_modules/@waves/node-api-js/es/constants.js.map +1 -0
  439. data/js/node_modules/@waves/node-api-js/es/create.d.ts +1240 -0
  440. data/js/node_modules/@waves/node-api-js/es/create.js +93 -0
  441. data/js/node_modules/@waves/node-api-js/es/create.js.map +1 -0
  442. data/js/node_modules/@waves/node-api-js/es/index.d.ts +9 -0
  443. data/js/node_modules/@waves/node-api-js/es/index.js +9 -0
  444. data/js/node_modules/@waves/node-api-js/es/index.js.map +1 -0
  445. data/js/node_modules/@waves/node-api-js/es/interface.d.ts +44 -0
  446. data/js/node_modules/@waves/node-api-js/es/interface.js +3 -0
  447. data/js/node_modules/@waves/node-api-js/es/interface.js.map +1 -0
  448. data/js/node_modules/@waves/node-api-js/es/tools/adresses/availableSponsoredBalances.d.ts +7 -0
  449. data/js/node_modules/@waves/node-api-js/es/tools/adresses/availableSponsoredBalances.js +27 -0
  450. data/js/node_modules/@waves/node-api-js/es/tools/adresses/availableSponsoredBalances.js.map +1 -0
  451. data/js/node_modules/@waves/node-api-js/es/tools/adresses/ethAddress2waves.d.ts +1 -0
  452. data/js/node_modules/@waves/node-api-js/es/tools/adresses/ethAddress2waves.js +31 -0
  453. data/js/node_modules/@waves/node-api-js/es/tools/adresses/ethAddress2waves.js.map +1 -0
  454. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetIdListByTx.d.ts +2 -0
  455. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetIdListByTx.js +24 -0
  456. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetIdListByTx.js.map +1 -0
  457. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetsByTransaction.d.ts +3 -0
  458. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetsByTransaction.js +8 -0
  459. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getAssetsByTransaction.js.map +1 -0
  460. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getTransactionsWithAssets.d.ts +6 -0
  461. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getTransactionsWithAssets.js +7 -0
  462. data/js/node_modules/@waves/node-api-js/es/tools/adresses/getTransactionsWithAssets.js.map +1 -0
  463. data/js/node_modules/@waves/node-api-js/es/tools/adresses/watch.d.ts +24 -0
  464. data/js/node_modules/@waves/node-api-js/es/tools/adresses/watch.js +134 -0
  465. data/js/node_modules/@waves/node-api-js/es/tools/adresses/watch.js.map +1 -0
  466. data/js/node_modules/@waves/node-api-js/es/tools/adresses/wavesAddress2eth.d.ts +1 -0
  467. data/js/node_modules/@waves/node-api-js/es/tools/adresses/wavesAddress2eth.js +7 -0
  468. data/js/node_modules/@waves/node-api-js/es/tools/adresses/wavesAddress2eth.js.map +1 -0
  469. data/js/node_modules/@waves/node-api-js/es/tools/assets/wavesAsset2eth.d.ts +1 -0
  470. data/js/node_modules/@waves/node-api-js/es/tools/assets/wavesAsset2eth.js +7 -0
  471. data/js/node_modules/@waves/node-api-js/es/tools/assets/wavesAsset2eth.js.map +1 -0
  472. data/js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.d.ts +1 -0
  473. data/js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.js +9 -0
  474. data/js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.js.map +1 -0
  475. data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkByte.d.ts +1 -0
  476. data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkByte.js +51 -0
  477. data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkByte.js.map +1 -0
  478. data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkCode.d.ts +1 -0
  479. data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkCode.js +5 -0
  480. data/js/node_modules/@waves/node-api-js/es/tools/blocks/getNetworkCode.js.map +1 -0
  481. data/js/node_modules/@waves/node-api-js/es/tools/blocks/waitHeight.d.ts +3 -0
  482. data/js/node_modules/@waves/node-api-js/es/tools/blocks/waitHeight.js +36 -0
  483. data/js/node_modules/@waves/node-api-js/es/tools/blocks/waitHeight.js.map +1 -0
  484. data/js/node_modules/@waves/node-api-js/es/tools/parse.d.ts +1 -0
  485. data/js/node_modules/@waves/node-api-js/es/tools/parse.js +5 -0
  486. data/js/node_modules/@waves/node-api-js/es/tools/parse.js.map +1 -0
  487. data/js/node_modules/@waves/node-api-js/es/tools/query.d.ts +4 -0
  488. data/js/node_modules/@waves/node-api-js/es/tools/query.js +12 -0
  489. data/js/node_modules/@waves/node-api-js/es/tools/query.js.map +1 -0
  490. data/js/node_modules/@waves/node-api-js/es/tools/request.d.ts +64 -0
  491. data/js/node_modules/@waves/node-api-js/es/tools/request.js +22 -0
  492. data/js/node_modules/@waves/node-api-js/es/tools/request.js.map +1 -0
  493. data/js/node_modules/@waves/node-api-js/es/tools/resolve.d.ts +1 -0
  494. data/js/node_modules/@waves/node-api-js/es/tools/resolve.js +4 -0
  495. data/js/node_modules/@waves/node-api-js/es/tools/resolve.js.map +1 -0
  496. data/js/node_modules/@waves/node-api-js/es/tools/stringify.d.ts +1 -0
  497. data/js/node_modules/@waves/node-api-js/es/tools/stringify.js +18 -0
  498. data/js/node_modules/@waves/node-api-js/es/tools/stringify.js.map +1 -0
  499. data/js/node_modules/@waves/node-api-js/es/tools/transactions/broadcast.d.ts +14 -0
  500. data/js/node_modules/@waves/node-api-js/es/tools/transactions/broadcast.js +43 -0
  501. data/js/node_modules/@waves/node-api-js/es/tools/transactions/broadcast.js.map +1 -0
  502. data/js/node_modules/@waves/node-api-js/es/tools/transactions/ethTxId2waves.d.ts +1 -0
  503. data/js/node_modules/@waves/node-api-js/es/tools/transactions/ethTxId2waves.js +8 -0
  504. data/js/node_modules/@waves/node-api-js/es/tools/transactions/ethTxId2waves.js.map +1 -0
  505. data/js/node_modules/@waves/node-api-js/es/tools/transactions/transactions.d.ts +0 -0
  506. data/js/node_modules/@waves/node-api-js/es/tools/transactions/transactions.js +2 -0
  507. data/js/node_modules/@waves/node-api-js/es/tools/transactions/transactions.js.map +1 -0
  508. data/js/node_modules/@waves/node-api-js/es/tools/transactions/wait.d.ts +10 -0
  509. data/js/node_modules/@waves/node-api-js/es/tools/transactions/wait.js +39 -0
  510. data/js/node_modules/@waves/node-api-js/es/tools/transactions/wait.js.map +1 -0
  511. data/js/node_modules/@waves/node-api-js/es/tools/utils.d.ts +32 -0
  512. data/js/node_modules/@waves/node-api-js/es/tools/utils.js +73 -0
  513. data/js/node_modules/@waves/node-api-js/es/tools/utils.js.map +1 -0
  514. data/js/node_modules/@waves/node-api-js/package.json +66 -0
  515. data/js/node_modules/@waves/parse-json-bignumber/coverage/clover.xml +225 -0
  516. data/js/node_modules/@waves/parse-json-bignumber/coverage/coverage-final.json +2 -0
  517. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/base.css +212 -0
  518. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/index.html +93 -0
  519. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/parse-json-bignumber.ts.html +1598 -0
  520. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/prettify.css +1 -0
  521. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/prettify.js +1 -0
  522. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  523. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov-report/sorter.js +158 -0
  524. data/js/node_modules/@waves/parse-json-bignumber/coverage/lcov.info +415 -0
  525. data/js/node_modules/@waves/parse-json-bignumber/dist/parse-json-bignumber.d.ts +11 -0
  526. data/js/node_modules/@waves/parse-json-bignumber/dist/parse-json-bignumber.js +412 -0
  527. data/js/node_modules/@waves/parse-json-bignumber/dist/parse-json-bignumber.min.js +1 -0
  528. data/js/node_modules/@waves/parse-json-bignumber/package.json +40 -0
  529. data/js/node_modules/@waves/parse-json-bignumber/src/parse-json-bignumber.ts +511 -0
  530. data/js/node_modules/@waves/parse-json-bignumber/test/index.ts +130 -0
  531. data/js/node_modules/@waves/parse-json-bignumber/test/tsconfig.json +14 -0
  532. data/js/node_modules/@waves/parse-json-bignumber/tsconfig.json +15 -0
  533. data/js/node_modules/@waves/protobuf-serialization/README.MD +116 -0
  534. data/js/node_modules/@waves/protobuf-serialization/dist/index.d.ts +2005 -0
  535. data/js/node_modules/@waves/protobuf-serialization/dist/index.js +6636 -0
  536. data/js/node_modules/@waves/protobuf-serialization/package.json +30 -0
  537. data/js/node_modules/@waves/protobuf-serialization/proto/waves/amount.proto +10 -0
  538. data/js/node_modules/@waves/protobuf-serialization/proto/waves/block.proto +40 -0
  539. data/js/node_modules/@waves/protobuf-serialization/proto/waves/events/events.proto +213 -0
  540. data/js/node_modules/@waves/protobuf-serialization/proto/waves/events/grpc/blockchain_updates.proto +42 -0
  541. data/js/node_modules/@waves/protobuf-serialization/proto/waves/invoke_script_result.proto +98 -0
  542. data/js/node_modules/@waves/protobuf-serialization/proto/waves/lang/dapp_meta.proto +21 -0
  543. data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/accounts_api.proto +68 -0
  544. data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/assets_api.proto +41 -0
  545. data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/blockchain_api.proto +54 -0
  546. data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/blocks_api.proto +41 -0
  547. data/js/node_modules/@waves/protobuf-serialization/proto/waves/node/grpc/transactions_api.proto +73 -0
  548. data/js/node_modules/@waves/protobuf-serialization/proto/waves/order.proto +43 -0
  549. data/js/node_modules/@waves/protobuf-serialization/proto/waves/recipient.proto +13 -0
  550. data/js/node_modules/@waves/protobuf-serialization/proto/waves/transaction.proto +156 -0
  551. data/js/node_modules/@waves/ts-lib-crypto/README.md +492 -0
  552. data/js/node_modules/@waves/ts-lib-crypto/bytes.d.ts +10 -0
  553. data/js/node_modules/@waves/ts-lib-crypto/bytes.js +21 -0
  554. data/js/node_modules/@waves/ts-lib-crypto/bytes.js.map +1 -0
  555. data/js/node_modules/@waves/ts-lib-crypto/conversions/base-xx.d.ts +7 -0
  556. data/js/node_modules/@waves/ts-lib-crypto/conversions/base-xx.js +27 -0
  557. data/js/node_modules/@waves/ts-lib-crypto/conversions/base-xx.js.map +1 -0
  558. data/js/node_modules/@waves/ts-lib-crypto/conversions/param.d.ts +3 -0
  559. data/js/node_modules/@waves/ts-lib-crypto/conversions/param.js +24 -0
  560. data/js/node_modules/@waves/ts-lib-crypto/conversions/param.js.map +1 -0
  561. data/js/node_modules/@waves/ts-lib-crypto/conversions/string-bytes.d.ts +11 -0
  562. data/js/node_modules/@waves/ts-lib-crypto/conversions/string-bytes.js +65 -0
  563. data/js/node_modules/@waves/ts-lib-crypto/conversions/string-bytes.js.map +1 -0
  564. data/js/node_modules/@waves/ts-lib-crypto/crypto/address-keys-seed.d.ts +7 -0
  565. data/js/node_modules/@waves/ts-lib-crypto/crypto/address-keys-seed.js +58 -0
  566. data/js/node_modules/@waves/ts-lib-crypto/crypto/address-keys-seed.js.map +1 -0
  567. data/js/node_modules/@waves/ts-lib-crypto/crypto/concat-split.d.ts +3 -0
  568. data/js/node_modules/@waves/ts-lib-crypto/crypto/concat-split.js +39 -0
  569. data/js/node_modules/@waves/ts-lib-crypto/crypto/concat-split.js.map +1 -0
  570. data/js/node_modules/@waves/ts-lib-crypto/crypto/crypto.d.ts +13 -0
  571. data/js/node_modules/@waves/ts-lib-crypto/crypto/crypto.js +117 -0
  572. data/js/node_modules/@waves/ts-lib-crypto/crypto/crypto.js.map +1 -0
  573. data/js/node_modules/@waves/ts-lib-crypto/crypto/encryption.d.ts +6 -0
  574. data/js/node_modules/@waves/ts-lib-crypto/crypto/encryption.js +89 -0
  575. data/js/node_modules/@waves/ts-lib-crypto/crypto/encryption.js.map +1 -0
  576. data/js/node_modules/@waves/ts-lib-crypto/crypto/hashing.d.ts +7 -0
  577. data/js/node_modules/@waves/ts-lib-crypto/crypto/hashing.js +39 -0
  578. data/js/node_modules/@waves/ts-lib-crypto/crypto/hashing.js.map +1 -0
  579. data/js/node_modules/@waves/ts-lib-crypto/crypto/interface.d.ts +98 -0
  580. data/js/node_modules/@waves/ts-lib-crypto/crypto/interface.js +9 -0
  581. data/js/node_modules/@waves/ts-lib-crypto/crypto/interface.js.map +1 -0
  582. data/js/node_modules/@waves/ts-lib-crypto/crypto/merkle-verify.d.ts +7 -0
  583. data/js/node_modules/@waves/ts-lib-crypto/crypto/merkle-verify.js +51 -0
  584. data/js/node_modules/@waves/ts-lib-crypto/crypto/merkle-verify.js.map +1 -0
  585. data/js/node_modules/@waves/ts-lib-crypto/crypto/random.d.ts +4 -0
  586. data/js/node_modules/@waves/ts-lib-crypto/crypto/random.js +51 -0
  587. data/js/node_modules/@waves/ts-lib-crypto/crypto/random.js.map +1 -0
  588. data/js/node_modules/@waves/ts-lib-crypto/crypto/rsa.d.ts +7 -0
  589. data/js/node_modules/@waves/ts-lib-crypto/crypto/rsa.js +159 -0
  590. data/js/node_modules/@waves/ts-lib-crypto/crypto/rsa.js.map +1 -0
  591. data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-ecryption.d.ts +9 -0
  592. data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-ecryption.js +62 -0
  593. data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-ecryption.js.map +1 -0
  594. data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-words-list.d.ts +1 -0
  595. data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-words-list.js +189 -0
  596. data/js/node_modules/@waves/ts-lib-crypto/crypto/seed-words-list.js.map +1 -0
  597. data/js/node_modules/@waves/ts-lib-crypto/crypto/sign.d.ts +2 -0
  598. data/js/node_modules/@waves/ts-lib-crypto/crypto/sign.js +16 -0
  599. data/js/node_modules/@waves/ts-lib-crypto/crypto/sign.js.map +1 -0
  600. data/js/node_modules/@waves/ts-lib-crypto/crypto/util.d.ts +3 -0
  601. data/js/node_modules/@waves/ts-lib-crypto/crypto/util.js +9 -0
  602. data/js/node_modules/@waves/ts-lib-crypto/crypto/util.js.map +1 -0
  603. data/js/node_modules/@waves/ts-lib-crypto/crypto/verification.d.ts +7 -0
  604. data/js/node_modules/@waves/ts-lib-crypto/crypto/verification.js +49 -0
  605. data/js/node_modules/@waves/ts-lib-crypto/crypto/verification.js.map +1 -0
  606. data/js/node_modules/@waves/ts-lib-crypto/extensions/chain-id.d.ts +5 -0
  607. data/js/node_modules/@waves/ts-lib-crypto/extensions/chain-id.js +16 -0
  608. data/js/node_modules/@waves/ts-lib-crypto/extensions/chain-id.js.map +1 -0
  609. data/js/node_modules/@waves/ts-lib-crypto/extensions/seed.d.ts +6 -0
  610. data/js/node_modules/@waves/ts-lib-crypto/extensions/seed.js +18 -0
  611. data/js/node_modules/@waves/ts-lib-crypto/extensions/seed.js.map +1 -0
  612. data/js/node_modules/@waves/ts-lib-crypto/index.d.ts +10 -0
  613. data/js/node_modules/@waves/ts-lib-crypto/index.js +21 -0
  614. data/js/node_modules/@waves/ts-lib-crypto/index.js.map +1 -0
  615. data/js/node_modules/@waves/ts-lib-crypto/libs/Utf8.d.ts +2 -0
  616. data/js/node_modules/@waves/ts-lib-crypto/libs/Utf8.js +61 -0
  617. data/js/node_modules/@waves/ts-lib-crypto/libs/Utf8.js.map +1 -0
  618. data/js/node_modules/@waves/ts-lib-crypto/libs/axlsign.js +1374 -0
  619. data/js/node_modules/@waves/ts-lib-crypto/libs/base58.d.ts +5 -0
  620. data/js/node_modules/@waves/ts-lib-crypto/libs/base58.js +66 -0
  621. data/js/node_modules/@waves/ts-lib-crypto/libs/base58.js.map +1 -0
  622. data/js/node_modules/@waves/ts-lib-crypto/libs/blake2b.js +308 -0
  623. data/js/node_modules/@waves/ts-lib-crypto/libs/sha3.js +441 -0
  624. data/js/node_modules/@waves/ts-lib-crypto/min/waves-lib-crypto.js +33 -0
  625. data/js/node_modules/@waves/ts-lib-crypto/package.json +31 -0
  626. data/js/node_modules/@waves/ts-types/dist/src/common.d.ts +59 -0
  627. data/js/node_modules/@waves/ts-types/dist/src/common.js +53 -0
  628. data/js/node_modules/@waves/ts-types/dist/src/exchange.d.ts +47 -0
  629. data/js/node_modules/@waves/ts-types/dist/src/exchange.js +2 -0
  630. data/js/node_modules/@waves/ts-types/dist/src/index.d.ts +52 -0
  631. data/js/node_modules/@waves/ts-types/dist/src/index.js +63 -0
  632. data/js/node_modules/@waves/ts-types/dist/src/invoke.d.ts +22 -0
  633. data/js/node_modules/@waves/ts-types/dist/src/invoke.js +2 -0
  634. data/js/node_modules/@waves/ts-types/dist/src/network.d.ts +6 -0
  635. data/js/node_modules/@waves/ts-types/dist/src/network.js +10 -0
  636. data/js/node_modules/@waves/ts-types/dist/src/parts.d.ts +159 -0
  637. data/js/node_modules/@waves/ts-types/dist/src/parts.js +2 -0
  638. data/js/node_modules/@waves/ts-types/dist/transactions/index.d.ts +363 -0
  639. data/js/node_modules/@waves/ts-types/dist/transactions/index.js +3 -0
  640. data/js/node_modules/@waves/ts-types/index.ts +1 -0
  641. data/js/node_modules/@waves/ts-types/package.json +41 -0
  642. data/js/node_modules/@waves/ts-types/src/index.ts +57 -0
  643. data/js/node_modules/@waves/ts-types/src/parts.ts +247 -0
  644. data/js/node_modules/@waves/ts-types/transactions/index.ts +789 -0
  645. data/js/node_modules/@waves/ts-types/tsconfig.json +16 -0
  646. data/js/node_modules/@waves/waves-transactions/README.md +432 -0
  647. data/js/node_modules/@waves/waves-transactions/dist/defaultVersions.d.ts +18 -0
  648. data/js/node_modules/@waves/waves-transactions/dist/defaultVersions.js +22 -0
  649. data/js/node_modules/@waves/waves-transactions/dist/defaultVersions.js.map +1 -0
  650. data/js/node_modules/@waves/waves-transactions/dist/general.d.ts +68 -0
  651. data/js/node_modules/@waves/waves-transactions/dist/general.js +135 -0
  652. data/js/node_modules/@waves/waves-transactions/dist/general.js.map +1 -0
  653. data/js/node_modules/@waves/waves-transactions/dist/generic.d.ts +28 -0
  654. data/js/node_modules/@waves/waves-transactions/dist/generic.js +88 -0
  655. data/js/node_modules/@waves/waves-transactions/dist/generic.js.map +1 -0
  656. data/js/node_modules/@waves/waves-transactions/dist/index.d.ts +37 -0
  657. data/js/node_modules/@waves/waves-transactions/dist/index.js +98 -0
  658. data/js/node_modules/@waves/waves-transactions/dist/index.js.map +1 -0
  659. data/js/node_modules/@waves/waves-transactions/dist/make-tx.d.ts +50 -0
  660. data/js/node_modules/@waves/waves-transactions/dist/make-tx.js +106 -0
  661. data/js/node_modules/@waves/waves-transactions/dist/make-tx.js.map +1 -0
  662. data/js/node_modules/@waves/waves-transactions/dist/min/waves-transactions.min.js +26 -0
  663. data/js/node_modules/@waves/waves-transactions/dist/nodeInteraction.d.ts +116 -0
  664. data/js/node_modules/@waves/waves-transactions/dist/nodeInteraction.js +277 -0
  665. data/js/node_modules/@waves/waves-transactions/dist/nodeInteraction.js.map +1 -0
  666. data/js/node_modules/@waves/waves-transactions/dist/proto-serialize.d.ts +62 -0
  667. data/js/node_modules/@waves/waves-transactions/dist/proto-serialize.js +514 -0
  668. data/js/node_modules/@waves/waves-transactions/dist/proto-serialize.js.map +1 -0
  669. data/js/node_modules/@waves/waves-transactions/dist/requests/auth.d.ts +7 -0
  670. data/js/node_modules/@waves/waves-transactions/dist/requests/auth.js +31 -0
  671. data/js/node_modules/@waves/waves-transactions/dist/requests/auth.js.map +1 -0
  672. data/js/node_modules/@waves/waves-transactions/dist/requests/cancel-order.d.ts +7 -0
  673. data/js/node_modules/@waves/waves-transactions/dist/requests/cancel-order.js +29 -0
  674. data/js/node_modules/@waves/waves-transactions/dist/requests/cancel-order.js.map +1 -0
  675. data/js/node_modules/@waves/waves-transactions/dist/requests/custom-data.d.ts +40 -0
  676. data/js/node_modules/@waves/waves-transactions/dist/requests/custom-data.js +37 -0
  677. data/js/node_modules/@waves/waves-transactions/dist/requests/custom-data.js.map +1 -0
  678. data/js/node_modules/@waves/waves-transactions/dist/requests/order.d.ts +50 -0
  679. data/js/node_modules/@waves/waves-transactions/dist/requests/order.js +62 -0
  680. data/js/node_modules/@waves/waves-transactions/dist/requests/order.js.map +1 -0
  681. data/js/node_modules/@waves/waves-transactions/dist/requests/wavesAuth.d.ts +7 -0
  682. data/js/node_modules/@waves/waves-transactions/dist/requests/wavesAuth.js +31 -0
  683. data/js/node_modules/@waves/waves-transactions/dist/requests/wavesAuth.js.map +1 -0
  684. data/js/node_modules/@waves/waves-transactions/dist/seedUtils/index.d.ts +21 -0
  685. data/js/node_modules/@waves/waves-transactions/dist/seedUtils/index.js +85 -0
  686. data/js/node_modules/@waves/waves-transactions/dist/seedUtils/index.js.map +1 -0
  687. data/js/node_modules/@waves/waves-transactions/dist/transactions/alias.d.ts +8 -0
  688. data/js/node_modules/@waves/waves-transactions/dist/transactions/alias.js +35 -0
  689. data/js/node_modules/@waves/waves-transactions/dist/transactions/alias.js.map +1 -0
  690. data/js/node_modules/@waves/waves-transactions/dist/transactions/burn.d.ts +8 -0
  691. data/js/node_modules/@waves/waves-transactions/dist/transactions/burn.js +35 -0
  692. data/js/node_modules/@waves/waves-transactions/dist/transactions/burn.js.map +1 -0
  693. data/js/node_modules/@waves/waves-transactions/dist/transactions/cancel-lease.d.ts +8 -0
  694. data/js/node_modules/@waves/waves-transactions/dist/transactions/cancel-lease.js +34 -0
  695. data/js/node_modules/@waves/waves-transactions/dist/transactions/cancel-lease.js.map +1 -0
  696. data/js/node_modules/@waves/waves-transactions/dist/transactions/data.d.ts +5 -0
  697. data/js/node_modules/@waves/waves-transactions/dist/transactions/data.js +112 -0
  698. data/js/node_modules/@waves/waves-transactions/dist/transactions/data.js.map +1 -0
  699. data/js/node_modules/@waves/waves-transactions/dist/transactions/exchange.d.ts +7 -0
  700. data/js/node_modules/@waves/waves-transactions/dist/transactions/exchange.js +39 -0
  701. data/js/node_modules/@waves/waves-transactions/dist/transactions/exchange.js.map +1 -0
  702. data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-expression.d.ts +0 -0
  703. data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-expression.js +52 -0
  704. data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-expression.js.map +1 -0
  705. data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-script.d.ts +8 -0
  706. data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-script.js +43 -0
  707. data/js/node_modules/@waves/waves-transactions/dist/transactions/invoke-script.js.map +1 -0
  708. data/js/node_modules/@waves/waves-transactions/dist/transactions/issue.d.ts +8 -0
  709. data/js/node_modules/@waves/waves-transactions/dist/transactions/issue.js +42 -0
  710. data/js/node_modules/@waves/waves-transactions/dist/transactions/issue.js.map +1 -0
  711. data/js/node_modules/@waves/waves-transactions/dist/transactions/lease.d.ts +8 -0
  712. data/js/node_modules/@waves/waves-transactions/dist/transactions/lease.js +35 -0
  713. data/js/node_modules/@waves/waves-transactions/dist/transactions/lease.js.map +1 -0
  714. data/js/node_modules/@waves/waves-transactions/dist/transactions/mass-transfer.d.ts +8 -0
  715. data/js/node_modules/@waves/waves-transactions/dist/transactions/mass-transfer.js +39 -0
  716. data/js/node_modules/@waves/waves-transactions/dist/transactions/mass-transfer.js.map +1 -0
  717. data/js/node_modules/@waves/waves-transactions/dist/transactions/reissue.d.ts +8 -0
  718. data/js/node_modules/@waves/waves-transactions/dist/transactions/reissue.js +36 -0
  719. data/js/node_modules/@waves/waves-transactions/dist/transactions/reissue.js.map +1 -0
  720. data/js/node_modules/@waves/waves-transactions/dist/transactions/set-asset-script.d.ts +8 -0
  721. data/js/node_modules/@waves/waves-transactions/dist/transactions/set-asset-script.js +37 -0
  722. data/js/node_modules/@waves/waves-transactions/dist/transactions/set-asset-script.js.map +1 -0
  723. data/js/node_modules/@waves/waves-transactions/dist/transactions/set-script.d.ts +8 -0
  724. data/js/node_modules/@waves/waves-transactions/dist/transactions/set-script.js +38 -0
  725. data/js/node_modules/@waves/waves-transactions/dist/transactions/set-script.js.map +1 -0
  726. data/js/node_modules/@waves/waves-transactions/dist/transactions/sponsorship.d.ts +8 -0
  727. data/js/node_modules/@waves/waves-transactions/dist/transactions/sponsorship.js +35 -0
  728. data/js/node_modules/@waves/waves-transactions/dist/transactions/sponsorship.js.map +1 -0
  729. data/js/node_modules/@waves/waves-transactions/dist/transactions/transfer.d.ts +8 -0
  730. data/js/node_modules/@waves/waves-transactions/dist/transactions/transfer.js +38 -0
  731. data/js/node_modules/@waves/waves-transactions/dist/transactions/transfer.js.map +1 -0
  732. data/js/node_modules/@waves/waves-transactions/dist/transactions/update-asset-info.d.ts +8 -0
  733. data/js/node_modules/@waves/waves-transactions/dist/transactions/update-asset-info.js +35 -0
  734. data/js/node_modules/@waves/waves-transactions/dist/transactions/update-asset-info.js.map +1 -0
  735. data/js/node_modules/@waves/waves-transactions/dist/transactions.d.ts +277 -0
  736. data/js/node_modules/@waves/waves-transactions/dist/transactions.js +3 -0
  737. data/js/node_modules/@waves/waves-transactions/dist/transactions.js.map +1 -0
  738. data/js/node_modules/@waves/waves-transactions/dist/types.d.ts +11 -0
  739. data/js/node_modules/@waves/waves-transactions/dist/types.js +6 -0
  740. data/js/node_modules/@waves/waves-transactions/dist/types.js.map +1 -0
  741. data/js/node_modules/@waves/waves-transactions/dist/validators/alias.d.ts +1 -0
  742. data/js/node_modules/@waves/waves-transactions/dist/validators/alias.js +17 -0
  743. data/js/node_modules/@waves/waves-transactions/dist/validators/alias.js.map +1 -0
  744. data/js/node_modules/@waves/waves-transactions/dist/validators/auth.d.ts +1 -0
  745. data/js/node_modules/@waves/waves-transactions/dist/validators/auth.js +10 -0
  746. data/js/node_modules/@waves/waves-transactions/dist/validators/auth.js.map +1 -0
  747. data/js/node_modules/@waves/waves-transactions/dist/validators/burn.d.ts +1 -0
  748. data/js/node_modules/@waves/waves-transactions/dist/validators/burn.js +18 -0
  749. data/js/node_modules/@waves/waves-transactions/dist/validators/burn.js.map +1 -0
  750. data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-lease.d.ts +1 -0
  751. data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-lease.js +17 -0
  752. data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-lease.js.map +1 -0
  753. data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-order.d.ts +1 -0
  754. data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-order.js +12 -0
  755. data/js/node_modules/@waves/waves-transactions/dist/validators/cancel-order.js.map +1 -0
  756. data/js/node_modules/@waves/waves-transactions/dist/validators/custom-data.d.ts +1 -0
  757. data/js/node_modules/@waves/waves-transactions/dist/validators/custom-data.js +16 -0
  758. data/js/node_modules/@waves/waves-transactions/dist/validators/custom-data.js.map +1 -0
  759. data/js/node_modules/@waves/waves-transactions/dist/validators/data.d.ts +2 -0
  760. data/js/node_modules/@waves/waves-transactions/dist/validators/data.js +18 -0
  761. data/js/node_modules/@waves/waves-transactions/dist/validators/data.js.map +1 -0
  762. data/js/node_modules/@waves/waves-transactions/dist/validators/exchange.d.ts +1 -0
  763. data/js/node_modules/@waves/waves-transactions/dist/validators/exchange.js +22 -0
  764. data/js/node_modules/@waves/waves-transactions/dist/validators/exchange.js.map +1 -0
  765. data/js/node_modules/@waves/waves-transactions/dist/validators/index.d.ts +24 -0
  766. data/js/node_modules/@waves/waves-transactions/dist/validators/index.js +60 -0
  767. data/js/node_modules/@waves/waves-transactions/dist/validators/index.js.map +1 -0
  768. data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-expression.d.ts +0 -0
  769. data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-expression.js +33 -0
  770. data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-expression.js.map +1 -0
  771. data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-script.d.ts +1 -0
  772. data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-script.js +20 -0
  773. data/js/node_modules/@waves/waves-transactions/dist/validators/invoke-script.js.map +1 -0
  774. data/js/node_modules/@waves/waves-transactions/dist/validators/issue.d.ts +1 -0
  775. data/js/node_modules/@waves/waves-transactions/dist/validators/issue.js +22 -0
  776. data/js/node_modules/@waves/waves-transactions/dist/validators/issue.js.map +1 -0
  777. data/js/node_modules/@waves/waves-transactions/dist/validators/lease.d.ts +1 -0
  778. data/js/node_modules/@waves/waves-transactions/dist/validators/lease.js +17 -0
  779. data/js/node_modules/@waves/waves-transactions/dist/validators/lease.js.map +1 -0
  780. data/js/node_modules/@waves/waves-transactions/dist/validators/mass-transfer.d.ts +1 -0
  781. data/js/node_modules/@waves/waves-transactions/dist/validators/mass-transfer.js +18 -0
  782. data/js/node_modules/@waves/waves-transactions/dist/validators/mass-transfer.js.map +1 -0
  783. data/js/node_modules/@waves/waves-transactions/dist/validators/order.d.ts +1 -0
  784. data/js/node_modules/@waves/waves-transactions/dist/validators/order.js +34 -0
  785. data/js/node_modules/@waves/waves-transactions/dist/validators/order.js.map +1 -0
  786. data/js/node_modules/@waves/waves-transactions/dist/validators/reissue.d.ts +1 -0
  787. data/js/node_modules/@waves/waves-transactions/dist/validators/reissue.js +19 -0
  788. data/js/node_modules/@waves/waves-transactions/dist/validators/reissue.js.map +1 -0
  789. data/js/node_modules/@waves/waves-transactions/dist/validators/set-asset-script.d.ts +1 -0
  790. data/js/node_modules/@waves/waves-transactions/dist/validators/set-asset-script.js +18 -0
  791. data/js/node_modules/@waves/waves-transactions/dist/validators/set-asset-script.js.map +1 -0
  792. data/js/node_modules/@waves/waves-transactions/dist/validators/set-script.d.ts +1 -0
  793. data/js/node_modules/@waves/waves-transactions/dist/validators/set-script.js +17 -0
  794. data/js/node_modules/@waves/waves-transactions/dist/validators/set-script.js.map +1 -0
  795. data/js/node_modules/@waves/waves-transactions/dist/validators/sponsorship.d.ts +1 -0
  796. data/js/node_modules/@waves/waves-transactions/dist/validators/sponsorship.js +17 -0
  797. data/js/node_modules/@waves/waves-transactions/dist/validators/sponsorship.js.map +1 -0
  798. data/js/node_modules/@waves/waves-transactions/dist/validators/transfer.d.ts +1 -0
  799. data/js/node_modules/@waves/waves-transactions/dist/validators/transfer.js +20 -0
  800. data/js/node_modules/@waves/waves-transactions/dist/validators/transfer.js.map +1 -0
  801. data/js/node_modules/@waves/waves-transactions/dist/validators/update-asset-info.d.ts +1 -0
  802. data/js/node_modules/@waves/waves-transactions/dist/validators/update-asset-info.js +18 -0
  803. data/js/node_modules/@waves/waves-transactions/dist/validators/update-asset-info.js.map +1 -0
  804. data/js/node_modules/@waves/waves-transactions/dist/validators/validators.d.ts +52 -0
  805. data/js/node_modules/@waves/waves-transactions/dist/validators/validators.js +160 -0
  806. data/js/node_modules/@waves/waves-transactions/dist/validators/validators.js.map +1 -0
  807. data/js/node_modules/@waves/waves-transactions/dist/validators/wavesAuth.d.ts +1 -0
  808. data/js/node_modules/@waves/waves-transactions/dist/validators/wavesAuth.js +10 -0
  809. data/js/node_modules/@waves/waves-transactions/dist/validators/wavesAuth.js.map +1 -0
  810. data/js/node_modules/@waves/waves-transactions/package.json +83 -0
  811. data/js/node_modules/@waves/waves-transactions/src/defaultVersions.ts +18 -0
  812. data/js/node_modules/@waves/waves-transactions/src/general.ts +165 -0
  813. data/js/node_modules/@waves/waves-transactions/src/generic.ts +88 -0
  814. data/js/node_modules/@waves/waves-transactions/src/index.ts +87 -0
  815. data/js/node_modules/@waves/waves-transactions/src/make-tx.ts +179 -0
  816. data/js/node_modules/@waves/waves-transactions/src/nodeInteraction.ts +297 -0
  817. data/js/node_modules/@waves/waves-transactions/src/proto-serialize.ts +571 -0
  818. data/js/node_modules/@waves/waves-transactions/src/requests/auth.ts +42 -0
  819. data/js/node_modules/@waves/waves-transactions/src/requests/cancel-order.ts +37 -0
  820. data/js/node_modules/@waves/waves-transactions/src/requests/custom-data.ts +73 -0
  821. data/js/node_modules/@waves/waves-transactions/src/requests/order.ts +121 -0
  822. data/js/node_modules/@waves/waves-transactions/src/requests/wavesAuth.ts +40 -0
  823. data/js/node_modules/@waves/waves-transactions/src/seedUtils/index.ts +124 -0
  824. data/js/node_modules/@waves/waves-transactions/src/transactions/alias.ts +46 -0
  825. data/js/node_modules/@waves/waves-transactions/src/transactions/burn.ts +45 -0
  826. data/js/node_modules/@waves/waves-transactions/src/transactions/cancel-lease.ts +44 -0
  827. data/js/node_modules/@waves/waves-transactions/src/transactions/data.ts +122 -0
  828. data/js/node_modules/@waves/waves-transactions/src/transactions/exchange.ts +47 -0
  829. data/js/node_modules/@waves/waves-transactions/src/transactions/invoke-expression.ts +50 -0
  830. data/js/node_modules/@waves/waves-transactions/src/transactions/invoke-script.ts +54 -0
  831. data/js/node_modules/@waves/waves-transactions/src/transactions/issue.ts +52 -0
  832. data/js/node_modules/@waves/waves-transactions/src/transactions/lease.ts +45 -0
  833. data/js/node_modules/@waves/waves-transactions/src/transactions/mass-transfer.ts +55 -0
  834. data/js/node_modules/@waves/waves-transactions/src/transactions/reissue.ts +46 -0
  835. data/js/node_modules/@waves/waves-transactions/src/transactions/set-asset-script.ts +57 -0
  836. data/js/node_modules/@waves/waves-transactions/src/transactions/set-script.ts +54 -0
  837. data/js/node_modules/@waves/waves-transactions/src/transactions/sponsorship.ts +45 -0
  838. data/js/node_modules/@waves/waves-transactions/src/transactions/transfer.ts +55 -0
  839. data/js/node_modules/@waves/waves-transactions/src/transactions/update-asset-info.ts +44 -0
  840. data/js/node_modules/@waves/waves-transactions/src/transactions.ts +352 -0
  841. data/js/node_modules/@waves/waves-transactions/src/types.ts +12 -0
  842. data/js/node_modules/@waves/waves-transactions/src/validators/alias.ts +28 -0
  843. data/js/node_modules/@waves/waves-transactions/src/validators/auth.ts +14 -0
  844. data/js/node_modules/@waves/waves-transactions/src/validators/burn.ts +29 -0
  845. data/js/node_modules/@waves/waves-transactions/src/validators/cancel-lease.ts +27 -0
  846. data/js/node_modules/@waves/waves-transactions/src/validators/cancel-order.ts +17 -0
  847. data/js/node_modules/@waves/waves-transactions/src/validators/custom-data.ts +40 -0
  848. data/js/node_modules/@waves/waves-transactions/src/validators/data.ts +33 -0
  849. data/js/node_modules/@waves/waves-transactions/src/validators/exchange.ts +36 -0
  850. data/js/node_modules/@waves/waves-transactions/src/validators/index.ts +50 -0
  851. data/js/node_modules/@waves/waves-transactions/src/validators/invoke-expression.ts +31 -0
  852. data/js/node_modules/@waves/waves-transactions/src/validators/invoke-script.ts +64 -0
  853. data/js/node_modules/@waves/waves-transactions/src/validators/issue.ts +41 -0
  854. data/js/node_modules/@waves/waves-transactions/src/validators/lease.ts +29 -0
  855. data/js/node_modules/@waves/waves-transactions/src/validators/mass-transfer.ts +47 -0
  856. data/js/node_modules/@waves/waves-transactions/src/validators/order.ts +68 -0
  857. data/js/node_modules/@waves/waves-transactions/src/validators/reissue.ts +31 -0
  858. data/js/node_modules/@waves/waves-transactions/src/validators/set-asset-script.ts +28 -0
  859. data/js/node_modules/@waves/waves-transactions/src/validators/set-script.ts +28 -0
  860. data/js/node_modules/@waves/waves-transactions/src/validators/sponsorship.ts +28 -0
  861. data/js/node_modules/@waves/waves-transactions/src/validators/transfer.ts +32 -0
  862. data/js/node_modules/@waves/waves-transactions/src/validators/update-asset-info.ts +32 -0
  863. data/js/node_modules/@waves/waves-transactions/src/validators/validators.ts +306 -0
  864. data/js/node_modules/@waves/waves-transactions/src/validators/wavesAuth.ts +15 -0
  865. data/js/node_modules/asynckit/LICENSE +21 -0
  866. data/js/node_modules/asynckit/README.md +233 -0
  867. data/js/node_modules/asynckit/bench.js +76 -0
  868. data/js/node_modules/asynckit/index.js +6 -0
  869. data/js/node_modules/asynckit/lib/abort.js +29 -0
  870. data/js/node_modules/asynckit/lib/async.js +34 -0
  871. data/js/node_modules/asynckit/lib/defer.js +26 -0
  872. data/js/node_modules/asynckit/lib/iterate.js +75 -0
  873. data/js/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  874. data/js/node_modules/asynckit/lib/readable_parallel.js +25 -0
  875. data/js/node_modules/asynckit/lib/readable_serial.js +25 -0
  876. data/js/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  877. data/js/node_modules/asynckit/lib/state.js +37 -0
  878. data/js/node_modules/asynckit/lib/streamify.js +141 -0
  879. data/js/node_modules/asynckit/lib/terminator.js +29 -0
  880. data/js/node_modules/asynckit/package.json +63 -0
  881. data/js/node_modules/asynckit/parallel.js +43 -0
  882. data/js/node_modules/asynckit/serial.js +17 -0
  883. data/js/node_modules/asynckit/serialOrdered.js +75 -0
  884. data/js/node_modules/asynckit/stream.js +21 -0
  885. data/js/node_modules/axios/CHANGELOG.md +413 -0
  886. data/js/node_modules/axios/LICENSE +19 -0
  887. data/js/node_modules/axios/README.md +709 -0
  888. data/js/node_modules/axios/UPGRADE_GUIDE.md +162 -0
  889. data/js/node_modules/axios/dist/axios.js +1715 -0
  890. data/js/node_modules/axios/dist/axios.map +1 -0
  891. data/js/node_modules/axios/dist/axios.min.js +3 -0
  892. data/js/node_modules/axios/dist/axios.min.map +1 -0
  893. data/js/node_modules/axios/index.d.ts +157 -0
  894. data/js/node_modules/axios/index.js +1 -0
  895. data/js/node_modules/axios/lib/adapters/README.md +37 -0
  896. data/js/node_modules/axios/lib/adapters/http.js +279 -0
  897. data/js/node_modules/axios/lib/adapters/xhr.js +180 -0
  898. data/js/node_modules/axios/lib/axios.js +53 -0
  899. data/js/node_modules/axios/lib/cancel/Cancel.js +19 -0
  900. data/js/node_modules/axios/lib/cancel/CancelToken.js +57 -0
  901. data/js/node_modules/axios/lib/cancel/isCancel.js +5 -0
  902. data/js/node_modules/axios/lib/core/Axios.js +94 -0
  903. data/js/node_modules/axios/lib/core/InterceptorManager.js +52 -0
  904. data/js/node_modules/axios/lib/core/README.md +7 -0
  905. data/js/node_modules/axios/lib/core/buildFullPath.js +20 -0
  906. data/js/node_modules/axios/lib/core/createError.js +18 -0
  907. data/js/node_modules/axios/lib/core/dispatchRequest.js +79 -0
  908. data/js/node_modules/axios/lib/core/enhanceError.js +42 -0
  909. data/js/node_modules/axios/lib/core/mergeConfig.js +73 -0
  910. data/js/node_modules/axios/lib/core/settle.js +25 -0
  911. data/js/node_modules/axios/lib/core/transformData.js +20 -0
  912. data/js/node_modules/axios/lib/defaults.js +97 -0
  913. data/js/node_modules/axios/lib/helpers/README.md +7 -0
  914. data/js/node_modules/axios/lib/helpers/bind.js +11 -0
  915. data/js/node_modules/axios/lib/helpers/buildURL.js +71 -0
  916. data/js/node_modules/axios/lib/helpers/combineURLs.js +14 -0
  917. data/js/node_modules/axios/lib/helpers/cookies.js +53 -0
  918. data/js/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
  919. data/js/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
  920. data/js/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
  921. data/js/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
  922. data/js/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
  923. data/js/node_modules/axios/lib/helpers/spread.js +27 -0
  924. data/js/node_modules/axios/lib/utils.js +344 -0
  925. data/js/node_modules/axios/package.json +84 -0
  926. data/js/node_modules/base64-js/LICENSE +21 -0
  927. data/js/node_modules/base64-js/README.md +34 -0
  928. data/js/node_modules/base64-js/base64js.min.js +1 -0
  929. data/js/node_modules/base64-js/index.d.ts +3 -0
  930. data/js/node_modules/base64-js/index.js +150 -0
  931. data/js/node_modules/base64-js/package.json +47 -0
  932. data/js/node_modules/bignumber.js/CHANGELOG.md +290 -0
  933. data/js/node_modules/bignumber.js/LICENCE.md +26 -0
  934. data/js/node_modules/bignumber.js/README.md +286 -0
  935. data/js/node_modules/bignumber.js/bignumber.d.ts +1831 -0
  936. data/js/node_modules/bignumber.js/bignumber.js +2926 -0
  937. data/js/node_modules/bignumber.js/bignumber.mjs +2889 -0
  938. data/js/node_modules/bignumber.js/doc/API.html +2249 -0
  939. data/js/node_modules/bignumber.js/package.json +50 -0
  940. data/js/node_modules/combined-stream/License +19 -0
  941. data/js/node_modules/combined-stream/Readme.md +138 -0
  942. data/js/node_modules/combined-stream/lib/combined_stream.js +208 -0
  943. data/js/node_modules/combined-stream/package.json +25 -0
  944. data/js/node_modules/combined-stream/yarn.lock +17 -0
  945. data/js/node_modules/debug/CHANGELOG.md +395 -0
  946. data/js/node_modules/debug/LICENSE +19 -0
  947. data/js/node_modules/debug/Makefile +58 -0
  948. data/js/node_modules/debug/README.md +368 -0
  949. data/js/node_modules/debug/karma.conf.js +70 -0
  950. data/js/node_modules/debug/node.js +1 -0
  951. data/js/node_modules/debug/package.json +43 -0
  952. data/js/node_modules/debug/src/browser.js +195 -0
  953. data/js/node_modules/debug/src/debug.js +225 -0
  954. data/js/node_modules/debug/src/index.js +10 -0
  955. data/js/node_modules/debug/src/node.js +186 -0
  956. data/js/node_modules/delayed-stream/License +19 -0
  957. data/js/node_modules/delayed-stream/Makefile +7 -0
  958. data/js/node_modules/delayed-stream/Readme.md +141 -0
  959. data/js/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  960. data/js/node_modules/delayed-stream/package.json +27 -0
  961. data/js/node_modules/follow-redirects/LICENSE +18 -0
  962. data/js/node_modules/follow-redirects/README.md +155 -0
  963. data/js/node_modules/follow-redirects/http.js +1 -0
  964. data/js/node_modules/follow-redirects/https.js +1 -0
  965. data/js/node_modules/follow-redirects/index.js +322 -0
  966. data/js/node_modules/follow-redirects/package.json +60 -0
  967. data/js/node_modules/form-data/License +19 -0
  968. data/js/node_modules/form-data/README.md.bak +356 -0
  969. data/js/node_modules/form-data/Readme.md +356 -0
  970. data/js/node_modules/form-data/index.d.ts +62 -0
  971. data/js/node_modules/form-data/lib/browser.js +2 -0
  972. data/js/node_modules/form-data/lib/form_data.js +498 -0
  973. data/js/node_modules/form-data/lib/populate.js +10 -0
  974. data/js/node_modules/form-data/package.json +68 -0
  975. data/js/node_modules/js-sha3/CHANGELOG.md +106 -0
  976. data/js/node_modules/js-sha3/LICENSE.txt +20 -0
  977. data/js/node_modules/js-sha3/README.md +241 -0
  978. data/js/node_modules/js-sha3/build/sha3.min.js +9 -0
  979. data/js/node_modules/js-sha3/index.d.ts +317 -0
  980. data/js/node_modules/js-sha3/package.json +45 -0
  981. data/js/node_modules/js-sha3/src/sha3.js +656 -0
  982. data/js/node_modules/long/LICENSE +202 -0
  983. data/js/node_modules/long/README.md +246 -0
  984. data/js/node_modules/long/dist/long.js +2 -0
  985. data/js/node_modules/long/dist/long.js.map +1 -0
  986. data/js/node_modules/long/index.js +1 -0
  987. data/js/node_modules/long/package.json +34 -0
  988. data/js/node_modules/long/src/long.js +1323 -0
  989. data/js/node_modules/mime-db/HISTORY.md +507 -0
  990. data/js/node_modules/mime-db/LICENSE +23 -0
  991. data/js/node_modules/mime-db/README.md +100 -0
  992. data/js/node_modules/mime-db/db.json +8519 -0
  993. data/js/node_modules/mime-db/index.js +12 -0
  994. data/js/node_modules/mime-db/package.json +60 -0
  995. data/js/node_modules/mime-types/HISTORY.md +397 -0
  996. data/js/node_modules/mime-types/LICENSE +23 -0
  997. data/js/node_modules/mime-types/README.md +113 -0
  998. data/js/node_modules/mime-types/index.js +188 -0
  999. data/js/node_modules/mime-types/package.json +44 -0
  1000. data/js/node_modules/ms/index.js +152 -0
  1001. data/js/node_modules/ms/license.md +21 -0
  1002. data/js/node_modules/ms/package.json +37 -0
  1003. data/js/node_modules/ms/readme.md +51 -0
  1004. data/js/node_modules/node-fetch/LICENSE.md +22 -0
  1005. data/js/node_modules/node-fetch/README.md +633 -0
  1006. data/js/node_modules/node-fetch/browser.js +25 -0
  1007. data/js/node_modules/node-fetch/lib/index.es.js +1781 -0
  1008. data/js/node_modules/node-fetch/lib/index.js +1790 -0
  1009. data/js/node_modules/node-fetch/lib/index.mjs +1779 -0
  1010. data/js/node_modules/node-fetch/package.json +89 -0
  1011. data/js/node_modules/node-forge/CHANGELOG.md +211 -0
  1012. data/js/node_modules/node-forge/LICENSE +331 -0
  1013. data/js/node_modules/node-forge/README.md +2097 -0
  1014. data/js/node_modules/node-forge/dist/forge.all.min.js +2 -0
  1015. data/js/node_modules/node-forge/dist/forge.all.min.js.map +1 -0
  1016. data/js/node_modules/node-forge/dist/forge.min.js +2 -0
  1017. data/js/node_modules/node-forge/dist/forge.min.js.map +1 -0
  1018. data/js/node_modules/node-forge/dist/prime.worker.min.js +2 -0
  1019. data/js/node_modules/node-forge/dist/prime.worker.min.js.map +1 -0
  1020. data/js/node_modules/node-forge/flash/README.md +48 -0
  1021. data/js/node_modules/node-forge/flash/package.json +28 -0
  1022. data/js/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
  1023. data/js/node_modules/node-forge/lib/aes.js +1091 -0
  1024. data/js/node_modules/node-forge/lib/aesCipherSuites.js +282 -0
  1025. data/js/node_modules/node-forge/lib/asn1.js +1408 -0
  1026. data/js/node_modules/node-forge/lib/baseN.js +186 -0
  1027. data/js/node_modules/node-forge/lib/cipher.js +230 -0
  1028. data/js/node_modules/node-forge/lib/cipherModes.js +987 -0
  1029. data/js/node_modules/node-forge/lib/debug.js +78 -0
  1030. data/js/node_modules/node-forge/lib/des.js +496 -0
  1031. data/js/node_modules/node-forge/lib/ed25519.js +996 -0
  1032. data/js/node_modules/node-forge/lib/forge.js +13 -0
  1033. data/js/node_modules/node-forge/lib/form.js +149 -0
  1034. data/js/node_modules/node-forge/lib/hmac.js +146 -0
  1035. data/js/node_modules/node-forge/lib/http.js +1364 -0
  1036. data/js/node_modules/node-forge/lib/index.all.js +16 -0
  1037. data/js/node_modules/node-forge/lib/index.js +35 -0
  1038. data/js/node_modules/node-forge/lib/jsbn.js +1264 -0
  1039. data/js/node_modules/node-forge/lib/kem.js +168 -0
  1040. data/js/node_modules/node-forge/lib/log.js +317 -0
  1041. data/js/node_modules/node-forge/lib/md.all.js +13 -0
  1042. data/js/node_modules/node-forge/lib/md.js +11 -0
  1043. data/js/node_modules/node-forge/lib/md5.js +289 -0
  1044. data/js/node_modules/node-forge/lib/mgf.js +12 -0
  1045. data/js/node_modules/node-forge/lib/mgf1.js +57 -0
  1046. data/js/node_modules/node-forge/lib/oids.js +163 -0
  1047. data/js/node_modules/node-forge/lib/pbe.js +1023 -0
  1048. data/js/node_modules/node-forge/lib/pbkdf2.js +211 -0
  1049. data/js/node_modules/node-forge/lib/pem.js +230 -0
  1050. data/js/node_modules/node-forge/lib/pkcs1.js +276 -0
  1051. data/js/node_modules/node-forge/lib/pkcs12.js +1074 -0
  1052. data/js/node_modules/node-forge/lib/pkcs7.js +1257 -0
  1053. data/js/node_modules/node-forge/lib/pkcs7asn1.js +409 -0
  1054. data/js/node_modules/node-forge/lib/pki.js +102 -0
  1055. data/js/node_modules/node-forge/lib/prime.js +297 -0
  1056. data/js/node_modules/node-forge/lib/prime.worker.js +168 -0
  1057. data/js/node_modules/node-forge/lib/prng.js +419 -0
  1058. data/js/node_modules/node-forge/lib/pss.js +241 -0
  1059. data/js/node_modules/node-forge/lib/random.js +191 -0
  1060. data/js/node_modules/node-forge/lib/rc2.js +410 -0
  1061. data/js/node_modules/node-forge/lib/rsa.js +1858 -0
  1062. data/js/node_modules/node-forge/lib/sha1.js +319 -0
  1063. data/js/node_modules/node-forge/lib/sha256.js +327 -0
  1064. data/js/node_modules/node-forge/lib/sha512.js +561 -0
  1065. data/js/node_modules/node-forge/lib/socket.js +287 -0
  1066. data/js/node_modules/node-forge/lib/ssh.js +236 -0
  1067. data/js/node_modules/node-forge/lib/task.js +725 -0
  1068. data/js/node_modules/node-forge/lib/tls.js +4282 -0
  1069. data/js/node_modules/node-forge/lib/tlssocket.js +249 -0
  1070. data/js/node_modules/node-forge/lib/util.js +2993 -0
  1071. data/js/node_modules/node-forge/lib/x509.js +3333 -0
  1072. data/js/node_modules/node-forge/lib/xhr.js +736 -0
  1073. data/js/node_modules/node-forge/package.json +120 -0
  1074. data/js/node_modules/protobufjs/CHANGELOG.md +1027 -0
  1075. data/js/node_modules/protobufjs/LICENSE +39 -0
  1076. data/js/node_modules/protobufjs/README.md +905 -0
  1077. data/js/node_modules/protobufjs/bin/pbjs +6 -0
  1078. data/js/node_modules/protobufjs/bin/pbts +6 -0
  1079. data/js/node_modules/protobufjs/cli/LICENSE +33 -0
  1080. data/js/node_modules/protobufjs/cli/README.md +174 -0
  1081. data/js/node_modules/protobufjs/cli/bin/pbjs +6 -0
  1082. data/js/node_modules/protobufjs/cli/bin/pbts +6 -0
  1083. data/js/node_modules/protobufjs/cli/index.d.ts +3 -0
  1084. data/js/node_modules/protobufjs/cli/index.js +3 -0
  1085. data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/LICENSE +21 -0
  1086. data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/README.md +23 -0
  1087. data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/plugin.js +21 -0
  1088. data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc/publish.js +705 -0
  1089. data/js/node_modules/protobufjs/cli/lib/tsd-jsdoc.json +18 -0
  1090. data/js/node_modules/protobufjs/cli/package.json +8 -0
  1091. data/js/node_modules/protobufjs/cli/package.standalone.json +32 -0
  1092. data/js/node_modules/protobufjs/cli/pbjs.d.ts +9 -0
  1093. data/js/node_modules/protobufjs/cli/pbjs.js +330 -0
  1094. data/js/node_modules/protobufjs/cli/pbts.d.ts +9 -0
  1095. data/js/node_modules/protobufjs/cli/pbts.js +197 -0
  1096. data/js/node_modules/protobufjs/cli/targets/json-module.js +38 -0
  1097. data/js/node_modules/protobufjs/cli/targets/json.js +8 -0
  1098. data/js/node_modules/protobufjs/cli/targets/proto.js +326 -0
  1099. data/js/node_modules/protobufjs/cli/targets/proto2.js +10 -0
  1100. data/js/node_modules/protobufjs/cli/targets/proto3.js +10 -0
  1101. data/js/node_modules/protobufjs/cli/targets/static-module.js +29 -0
  1102. data/js/node_modules/protobufjs/cli/targets/static.js +711 -0
  1103. data/js/node_modules/protobufjs/cli/util.js +183 -0
  1104. data/js/node_modules/protobufjs/cli/wrappers/amd.js +7 -0
  1105. data/js/node_modules/protobufjs/cli/wrappers/closure.js +7 -0
  1106. data/js/node_modules/protobufjs/cli/wrappers/commonjs.js +7 -0
  1107. data/js/node_modules/protobufjs/cli/wrappers/default.js +15 -0
  1108. data/js/node_modules/protobufjs/cli/wrappers/es6.js +5 -0
  1109. data/js/node_modules/protobufjs/dist/README.md +31 -0
  1110. data/js/node_modules/protobufjs/dist/light/README.md +31 -0
  1111. data/js/node_modules/protobufjs/dist/light/protobuf.js +7322 -0
  1112. data/js/node_modules/protobufjs/dist/light/protobuf.js.map +1 -0
  1113. data/js/node_modules/protobufjs/dist/light/protobuf.min.js +8 -0
  1114. data/js/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -0
  1115. data/js/node_modules/protobufjs/dist/minimal/README.md +31 -0
  1116. data/js/node_modules/protobufjs/dist/minimal/protobuf.js +2714 -0
  1117. data/js/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -0
  1118. data/js/node_modules/protobufjs/dist/minimal/protobuf.min.js +8 -0
  1119. data/js/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -0
  1120. data/js/node_modules/protobufjs/dist/protobuf.js +8964 -0
  1121. data/js/node_modules/protobufjs/dist/protobuf.js.map +1 -0
  1122. data/js/node_modules/protobufjs/dist/protobuf.min.js +8 -0
  1123. data/js/node_modules/protobufjs/dist/protobuf.min.js.map +1 -0
  1124. data/js/node_modules/protobufjs/ext/debug/README.md +4 -0
  1125. data/js/node_modules/protobufjs/ext/debug/index.js +71 -0
  1126. data/js/node_modules/protobufjs/ext/descriptor/README.md +72 -0
  1127. data/js/node_modules/protobufjs/ext/descriptor/index.d.ts +191 -0
  1128. data/js/node_modules/protobufjs/ext/descriptor/index.js +1052 -0
  1129. data/js/node_modules/protobufjs/ext/descriptor/test.js +54 -0
  1130. data/js/node_modules/protobufjs/google/LICENSE +27 -0
  1131. data/js/node_modules/protobufjs/google/README.md +1 -0
  1132. data/js/node_modules/protobufjs/google/api/annotations.json +83 -0
  1133. data/js/node_modules/protobufjs/google/api/annotations.proto +11 -0
  1134. data/js/node_modules/protobufjs/google/api/http.json +86 -0
  1135. data/js/node_modules/protobufjs/google/api/http.proto +31 -0
  1136. data/js/node_modules/protobufjs/google/protobuf/api.json +118 -0
  1137. data/js/node_modules/protobufjs/google/protobuf/api.proto +34 -0
  1138. data/js/node_modules/protobufjs/google/protobuf/descriptor.json +739 -0
  1139. data/js/node_modules/protobufjs/google/protobuf/descriptor.proto +286 -0
  1140. data/js/node_modules/protobufjs/google/protobuf/source_context.json +20 -0
  1141. data/js/node_modules/protobufjs/google/protobuf/source_context.proto +7 -0
  1142. data/js/node_modules/protobufjs/google/protobuf/type.json +202 -0
  1143. data/js/node_modules/protobufjs/google/protobuf/type.proto +89 -0
  1144. data/js/node_modules/protobufjs/index.d.ts +2739 -0
  1145. data/js/node_modules/protobufjs/index.js +4 -0
  1146. data/js/node_modules/protobufjs/light.d.ts +2 -0
  1147. data/js/node_modules/protobufjs/light.js +4 -0
  1148. data/js/node_modules/protobufjs/minimal.d.ts +2 -0
  1149. data/js/node_modules/protobufjs/minimal.js +4 -0
  1150. data/js/node_modules/protobufjs/package-lock.json +7870 -0
  1151. data/js/node_modules/protobufjs/package.json +122 -0
  1152. data/js/node_modules/protobufjs/scripts/changelog.js +150 -0
  1153. data/js/node_modules/protobufjs/scripts/postinstall.js +35 -0
  1154. data/js/node_modules/protobufjs/src/common.js +399 -0
  1155. data/js/node_modules/protobufjs/src/converter.js +293 -0
  1156. data/js/node_modules/protobufjs/src/decoder.js +128 -0
  1157. data/js/node_modules/protobufjs/src/encoder.js +100 -0
  1158. data/js/node_modules/protobufjs/src/enum.js +181 -0
  1159. data/js/node_modules/protobufjs/src/field.js +374 -0
  1160. data/js/node_modules/protobufjs/src/index-light.js +104 -0
  1161. data/js/node_modules/protobufjs/src/index-minimal.js +36 -0
  1162. data/js/node_modules/protobufjs/src/index.js +12 -0
  1163. data/js/node_modules/protobufjs/src/mapfield.js +126 -0
  1164. data/js/node_modules/protobufjs/src/message.js +139 -0
  1165. data/js/node_modules/protobufjs/src/method.js +160 -0
  1166. data/js/node_modules/protobufjs/src/namespace.js +434 -0
  1167. data/js/node_modules/protobufjs/src/object.js +243 -0
  1168. data/js/node_modules/protobufjs/src/oneof.js +203 -0
  1169. data/js/node_modules/protobufjs/src/parse.js +820 -0
  1170. data/js/node_modules/protobufjs/src/reader.js +411 -0
  1171. data/js/node_modules/protobufjs/src/reader_buffer.js +51 -0
  1172. data/js/node_modules/protobufjs/src/root.js +363 -0
  1173. data/js/node_modules/protobufjs/src/roots.js +18 -0
  1174. data/js/node_modules/protobufjs/src/rpc/service.js +142 -0
  1175. data/js/node_modules/protobufjs/src/rpc.js +36 -0
  1176. data/js/node_modules/protobufjs/src/service.js +167 -0
  1177. data/js/node_modules/protobufjs/src/tokenize.js +403 -0
  1178. data/js/node_modules/protobufjs/src/type.js +589 -0
  1179. data/js/node_modules/protobufjs/src/types.js +196 -0
  1180. data/js/node_modules/protobufjs/src/typescript.jsdoc +15 -0
  1181. data/js/node_modules/protobufjs/src/util/longbits.js +200 -0
  1182. data/js/node_modules/protobufjs/src/util/minimal.js +421 -0
  1183. data/js/node_modules/protobufjs/src/util.js +212 -0
  1184. data/js/node_modules/protobufjs/src/verifier.js +177 -0
  1185. data/js/node_modules/protobufjs/src/wrappers.js +102 -0
  1186. data/js/node_modules/protobufjs/src/writer.js +465 -0
  1187. data/js/node_modules/protobufjs/src/writer_buffer.js +85 -0
  1188. data/js/node_modules/protobufjs/tsconfig.json +7 -0
  1189. data/js/node_modules/tr46/index.js +193 -0
  1190. data/js/node_modules/tr46/lib/mappingTable.json +1 -0
  1191. data/js/node_modules/tr46/package.json +31 -0
  1192. data/js/node_modules/typed-ts-events/dist/EventEmitter.d.ts +23 -0
  1193. data/js/node_modules/typed-ts-events/dist/events.js +145 -0
  1194. data/js/node_modules/typed-ts-events/dist/events.js.map +1 -0
  1195. data/js/node_modules/typed-ts-events/dist/events.min.js +2 -0
  1196. data/js/node_modules/typed-ts-events/dist/events.min.js.map +1 -0
  1197. data/js/node_modules/typed-ts-events/dist/index.d.ts +3 -0
  1198. data/js/node_modules/typed-ts-events/package.json +64 -0
  1199. data/js/node_modules/typed-ts-events/readme.md +77 -0
  1200. data/js/node_modules/webidl-conversions/LICENSE.md +12 -0
  1201. data/js/node_modules/webidl-conversions/README.md +53 -0
  1202. data/js/node_modules/webidl-conversions/lib/index.js +189 -0
  1203. data/js/node_modules/webidl-conversions/package.json +23 -0
  1204. data/js/node_modules/whatwg-url/LICENSE.txt +21 -0
  1205. data/js/node_modules/whatwg-url/README.md +67 -0
  1206. data/js/node_modules/whatwg-url/lib/URL-impl.js +200 -0
  1207. data/js/node_modules/whatwg-url/lib/URL.js +196 -0
  1208. data/js/node_modules/whatwg-url/lib/public-api.js +11 -0
  1209. data/js/node_modules/whatwg-url/lib/url-state-machine.js +1297 -0
  1210. data/js/node_modules/whatwg-url/lib/utils.js +20 -0
  1211. data/js/node_modules/whatwg-url/package.json +32 -0
  1212. data/js/package-lock.json +706 -0
  1213. data/js/package.json +15 -0
  1214. data/js/worker.js +109 -0
  1215. data/js/yarn.lock +285 -0
  1216. data/lib/waves_lib/map.rb +211 -0
  1217. data/lib/waves_lib/root_wrapper.rb +85 -0
  1218. data/lib/waves_lib/version.rb +6 -0
  1219. data/lib/waves_lib/wrapped_buffer.rb +26 -0
  1220. data/lib/waves_lib/wrapper.rb +82 -0
  1221. data/lib/waves_lib.rb +10 -0
  1222. metadata +1264 -0
@@ -0,0 +1,26 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.nodeApi=t():e.nodeApi=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=56)}([function(e,t){e.exports={options:{usePureJavaScript:!1}}},function(e,t,r){(function(t,n,i,a){var o=r(0),s=r(63),u=e.exports=o.util=o.util||{};function c(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function l(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(u.isArrayBuffer(e)||u.isArrayBufferView(e))if(void 0!==a&&e instanceof a)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(e){for(var r=0;r<t.length;++r)this.putByte(t[r])}}else(e instanceof l||"object"==typeof e&&"string"==typeof e.data&&"number"==typeof e.read)&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}!function(){if(void 0!==t&&t.nextTick&&!t.browser)return u.nextTick=t.nextTick,void(u.setImmediate="function"==typeof n?n:u.nextTick);if("function"==typeof n)return u.setImmediate=function(){return n.apply(void 0,arguments)},void(u.nextTick=function(e){return n(e)});if(u.setImmediate=function(e){setTimeout(e,0)},"undefined"!=typeof window&&"function"==typeof window.postMessage){var e="forge.setImmediate",r=[];u.setImmediate=function(t){r.push(t),1===r.length&&window.postMessage(e,"*")},window.addEventListener("message",(function(t){if(t.source===window&&t.data===e){t.stopPropagation();var n=r.slice();r.length=0,n.forEach((function(e){e()}))}}),!0)}if("undefined"!=typeof MutationObserver){var i=Date.now(),a=!0,o=document.createElement("div");r=[];new MutationObserver((function(){var e=r.slice();r.length=0,e.forEach((function(e){e()}))})).observe(o,{attributes:!0});var s=u.setImmediate;u.setImmediate=function(e){Date.now()-i>15?(i=Date.now(),s(e)):(r.push(e),1===r.length&&o.setAttribute("a",a=!a))}}u.nextTick=u.setImmediate}(),u.isNodejs=void 0!==t&&t.versions&&t.versions.node,u.globalScope=u.isNodejs?i:"undefined"==typeof self?window:self,u.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},u.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},u.isArrayBufferView=function(e){return e&&u.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},u.ByteBuffer=l,u.ByteStringBuffer=l;u.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},u.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},u.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},u.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},u.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this},u.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},u.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(u.encodeUtf8(e))},u.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},u.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},u.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},u.ByteStringBuffer.prototype.putInt=function(e,t){c(t);var r="";do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(r)},u.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)},u.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())},u.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},u.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e},u.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e},u.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e},u.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e},u.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e},u.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e},u.ByteStringBuffer.prototype.getInt=function(e){c(e);var t=0;do{t=(t<<8)+this.data.charCodeAt(this.read++),e-=8}while(e>0);return t},u.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},u.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},u.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},u.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},u.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},u.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},u.ByteStringBuffer.prototype.copy=function(){var e=u.createBuffer(this.data);return e.read=this.read,e},u.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},u.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},u.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},u.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var r=this.data.charCodeAt(t);r<16&&(e+="0"),e+=r.toString(16)}return e},u.ByteStringBuffer.prototype.toString=function(){return u.decodeUtf8(this.bytes())},u.DataBuffer=function(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var r=u.isArrayBuffer(e),n=u.isArrayBufferView(e);if(r||n)return this.data=r?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),void(this.write="writeOffset"in t?t.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!=e&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)},u.DataBuffer.prototype.length=function(){return this.write-this.read},u.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},u.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this},u.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},u.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r<t;++r)this.data.setUint8(e);return this},u.DataBuffer.prototype.putBytes=function(e,t){if(u.isArrayBufferView(e)){var r=(n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)).byteLength-n.byteOffset;return this.accommodate(r),new Uint8Array(this.data.buffer,this.write).set(n),this.write+=r,this}if(u.isArrayBuffer(e)){var n=new Uint8Array(e);return this.accommodate(n.byteLength),new Uint8Array(this.data.buffer).set(n,this.write),this.write+=n.byteLength,this}if(e instanceof u.DataBuffer||"object"==typeof e&&"number"==typeof e.read&&"number"==typeof e.write&&u.isArrayBufferView(e.data)){n=new Uint8Array(e.data.byteLength,e.read,e.length());return this.accommodate(n.byteLength),new Uint8Array(e.data.byteLength,this.write).set(n),this.write+=n.byteLength,this}if(e instanceof u.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary","string"==typeof e){var i;if("hex"===t)return this.accommodate(Math.ceil(e.length/2)),i=new Uint8Array(this.data.buffer,this.write),this.write+=u.binary.hex.decode(e,i,this.write),this;if("base64"===t)return this.accommodate(3*Math.ceil(e.length/4)),i=new Uint8Array(this.data.buffer,this.write),this.write+=u.binary.base64.decode(e,i,this.write),this;if("utf8"===t&&(e=u.encodeUtf8(e),t="binary"),"binary"===t||"raw"===t)return this.accommodate(e.length),i=new Uint8Array(this.data.buffer,this.write),this.write+=u.binary.raw.decode(i),this;if("utf16"===t)return this.accommodate(2*e.length),i=new Uint16Array(this.data.buffer,this.write),this.write+=u.text.utf16.encode(i),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)},u.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this},u.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")},u.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this},u.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},u.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},u.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},u.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},u.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},u.DataBuffer.prototype.putInt=function(e,t){c(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},u.DataBuffer.prototype.putSignedInt=function(e,t){return c(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)},u.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},u.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e},u.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e},u.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e},u.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e},u.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e},u.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e},u.DataBuffer.prototype.getInt=function(e){c(e);var t=0;do{t=(t<<8)+this.data.getInt8(this.read++),e-=8}while(e>0);return t},u.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},u.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},u.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},u.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},u.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},u.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},u.DataBuffer.prototype.copy=function(){return new u.DataBuffer(this)},u.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},u.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},u.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},u.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var r=this.data.getUint8(t);r<16&&(e+="0"),e+=r.toString(16)}return e},u.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if("binary"===(e=e||"utf8")||"raw"===e)return u.binary.raw.encode(t);if("hex"===e)return u.binary.hex.encode(t);if("base64"===e)return u.binary.base64.encode(t);if("utf8"===e)return u.text.utf8.decode(t);if("utf16"===e)return u.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)},u.createBuffer=function(e,t){return t=t||"raw",void 0!==e&&"utf8"===t&&(e=u.encodeUtf8(e)),new u.ByteBuffer(e)},u.fillString=function(e,t){for(var r="";t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return r},u.xorBytes=function(e,t,r){for(var n="",i="",a="",o=0,s=0;r>0;--r,++o)i=e.charCodeAt(o)^t.charCodeAt(o),s>=10&&(n+=a,a="",s=0),a+=String.fromCharCode(i),++s;return n+=a},u.hexToBytes=function(e){var t="",r=0;for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t},u.bytesToHex=function(e){return u.createBuffer(e).toHex()},u.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],p="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";u.encode64=function(e,t){for(var r,n,i,a="",o="",s=0;s<e.length;)r=e.charCodeAt(s++),n=e.charCodeAt(s++),i=e.charCodeAt(s++),a+=f.charAt(r>>2),a+=f.charAt((3&r)<<4|n>>4),isNaN(n)?a+="==":(a+=f.charAt((15&n)<<2|i>>6),a+=isNaN(i)?"=":f.charAt(63&i)),t&&a.length>t&&(o+=a.substr(0,t)+"\r\n",a=a.substr(t));return o+=a},u.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,r,n,i,a="",o=0;o<e.length;)t=h[e.charCodeAt(o++)-43],r=h[e.charCodeAt(o++)-43],n=h[e.charCodeAt(o++)-43],i=h[e.charCodeAt(o++)-43],a+=String.fromCharCode(t<<2|r>>4),64!==n&&(a+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(a+=String.fromCharCode((3&n)<<6|i)));return a},u.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},u.decodeUtf8=function(e){return decodeURIComponent(escape(e))},u.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:s.encode,decode:s.decode}},u.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},u.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,a=0;a<e.length;++a)n[i++]=e.charCodeAt(a);return t?i-r:n},u.binary.hex.encode=u.bytesToHex,u.binary.hex.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(Math.ceil(e.length/2)));var i=0,a=r=r||0;for(1&e.length&&(i=1,n[a++]=parseInt(e[0],16));i<e.length;i+=2)n[a++]=parseInt(e.substr(i,2),16);return t?a-r:n},u.binary.base64.encode=function(e,t){for(var r,n,i,a="",o="",s=0;s<e.byteLength;)r=e[s++],n=e[s++],i=e[s++],a+=f.charAt(r>>2),a+=f.charAt((3&r)<<4|n>>4),isNaN(n)?a+="==":(a+=f.charAt((15&n)<<2|i>>6),a+=isNaN(i)?"=":f.charAt(63&i)),t&&a.length>t&&(o+=a.substr(0,t)+"\r\n",a=a.substr(t));return o+=a},u.binary.base64.decode=function(e,t,r){var n,i,a,o,s=t;s||(s=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var u=0,c=r=r||0;u<e.length;)n=h[e.charCodeAt(u++)-43],i=h[e.charCodeAt(u++)-43],a=h[e.charCodeAt(u++)-43],o=h[e.charCodeAt(u++)-43],s[c++]=n<<2|i>>4,64!==a&&(s[c++]=(15&i)<<4|a>>2,64!==o&&(s[c++]=(3&a)<<6|o));return t?c-r:s.subarray(0,c)},u.binary.base58.encode=function(e,t){return u.binary.baseN.encode(e,p,t)},u.binary.base58.decode=function(e,t){return u.binary.baseN.decode(e,p,t)},u.text={utf8:{},utf16:{}},u.text.utf8.encode=function(e,t,r){e=u.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,a=0;a<e.length;++a)n[i++]=e.charCodeAt(a);return t?i-r:n},u.text.utf8.decode=function(e){return u.decodeUtf8(String.fromCharCode.apply(null,e))},u.text.utf16.encode=function(e,t,r){var n=t;n||(n=new Uint8Array(2*e.length));for(var i=new Uint16Array(n.buffer),a=r=r||0,o=r,s=0;s<e.length;++s)i[o++]=e.charCodeAt(s),a+=2;return t?a-r:n},u.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},u.deflate=function(e,t,r){if(t=u.decode64(e.deflate(u.encode64(t)).rval),r){var n=2;32&t.charCodeAt(1)&&(n=6),t=t.substring(n,t.length-4)}return t},u.inflate=function(e,t,r){var n=e.inflate(u.encode64(t)).rval;return null===n?null:u.decode64(n)};var d=function(e,t,r){if(!e)throw new Error("WebStorage not available.");var n;if(null===r?n=e.removeItem(t):(r=u.encode64(JSON.stringify(r)),n=e.setItem(t,r)),void 0!==n&&!0!==n.rval){var i=new Error(n.error.message);throw i.id=n.error.id,i.name=n.error.name,i}},y=function(e,t){if(!e)throw new Error("WebStorage not available.");var r=e.getItem(t);if(e.init)if(null===r.rval){if(r.error){var n=new Error(r.error.message);throw n.id=r.error.id,n.name=r.error.name,n}r=null}else r=r.rval;return null!==r&&(r=JSON.parse(u.decode64(r))),r},g=function(e,t,r,n){var i=y(e,t);null===i&&(i={}),i[r]=n,d(e,t,i)},m=function(e,t,r){var n=y(e,t);return null!==n&&(n=r in n?n[r]:null),n},v=function(e,t,r){var n=y(e,t);if(null!==n&&r in n){delete n[r];var i=!0;for(var a in n){i=!1;break}i&&(n=null),d(e,t,n)}},b=function(e,t){d(e,t,null)},E=function(e,t,r){var n,i=null;void 0===r&&(r=["web","flash"]);var a=!1,o=null;for(var s in r){n=r[s];try{if("flash"===n||"both"===n){if(null===t[0])throw new Error("Flash local storage not available.");i=e.apply(this,t),a="flash"===n}"web"!==n&&"both"!==n||(t[0]=localStorage,i=e.apply(this,t),a=!0)}catch(e){o=e}if(a)break}if(!a)throw o;return i};u.setItem=function(e,t,r,n,i){E(g,arguments,i)},u.getItem=function(e,t,r,n){return E(m,arguments,n)},u.removeItem=function(e,t,r,n){E(v,arguments,n)},u.clearItems=function(e,t,r){E(b,arguments,r)},u.parseUrl=function(e){var t=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;t.lastIndex=0;var r=t.exec(e),n=null===r?null:{full:e,scheme:r[1],host:r[2],port:r[3],path:r[4]};return n&&(n.fullHost=n.host,n.port?(80!==n.port&&"http"===n.scheme||443!==n.port&&"https"===n.scheme)&&(n.fullHost+=":"+n.port):"http"===n.scheme?n.port=80:"https"===n.scheme&&(n.port=443),n.full=n.scheme+"://"+n.fullHost),n};var S=null;u.getQueryVariables=function(e){var t,r=function(e){for(var t={},r=e.split("&"),n=0;n<r.length;n++){var i,a,o=r[n].indexOf("=");o>0?(i=r[n].substring(0,o),a=r[n].substring(o+1)):(i=r[n],a=null),i in t||(t[i]=[]),i in Object.prototype||null===a||t[i].push(unescape(a))}return t};return void 0===e?(null===S&&(S="undefined"!=typeof window&&window.location&&window.location.search?r(window.location.search.substring(1)):{}),t=S):t=r(e),t},u.parseFragment=function(e){var t=e,r="",n=e.indexOf("?");n>0&&(t=e.substring(0,n),r=e.substring(n+1));var i=t.split("/");return i.length>0&&""===i[0]&&i.shift(),{pathString:t,queryString:r,path:i,query:""===r?{}:u.getQueryVariables(r)}},u.makeRequest=function(e){var t=u.parseFragment(e),r={path:t.pathString,query:t.queryString,getPath:function(e){return void 0===e?t.path:t.path[e]},getQuery:function(e,r){var n;return void 0===e?n=t.query:(n=t.query[e])&&void 0!==r&&(n=n[r]),n},getQueryLast:function(e,t){var n=r.getQuery(e);return n?n[n.length-1]:t}};return r},u.makeLink=function(e,t,r){e=jQuery.isArray(e)?e.join("/"):e;var n=jQuery.param(t||{});return r=r||"",e+(n.length>0?"?"+n:"")+(r.length>0?"#"+r:"")},u.setPath=function(e,t,r){if("object"==typeof e&&null!==e)for(var n=0,i=t.length;n<i;){var a=t[n++];if(n==i)e[a]=r;else{var o=a in e;(!o||o&&"object"!=typeof e[a]||o&&null===e[a])&&(e[a]={}),e=e[a]}}},u.getPath=function(e,t,r){for(var n=0,i=t.length,a=!0;a&&n<i&&"object"==typeof e&&null!==e;){var o=t[n++];(a=o in e)&&(e=e[o])}return a?e:r},u.deletePath=function(e,t){if("object"==typeof e&&null!==e)for(var r=0,n=t.length;r<n;){var i=t[r++];if(r==n)delete e[i];else{if(!(i in e)||"object"!=typeof e[i]||null===e[i])break;e=e[i]}}},u.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},u.format=function(e){for(var t,r,n=/%./g,i=0,a=[],o=0;t=n.exec(e);){(r=e.substring(o,n.lastIndex-2)).length>0&&a.push(r),o=n.lastIndex;var s=t[0][1];switch(s){case"s":case"o":i<arguments.length?a.push(arguments[1+i++]):a.push("<?>");break;case"%":a.push("%");break;default:a.push("<%"+s+"?>")}}return a.push(e.substring(o)),a.join("")},u.formatNumber=function(e,t,r,n){var i=e,a=isNaN(t=Math.abs(t))?2:t,o=void 0===r?",":r,s=void 0===n?".":n,u=i<0?"-":"",c=parseInt(i=Math.abs(+i||0).toFixed(a),10)+"",l=c.length>3?c.length%3:0;return u+(l?c.substr(0,l)+s:"")+c.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+s)+(a?o+Math.abs(i-c).toFixed(a).slice(2):"")},u.formatSize=function(e){return e=e>=1073741824?u.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?u.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?u.formatNumber(e/1024,0)+" KiB":u.formatNumber(e,0)+" bytes"},u.bytesFromIP=function(e){return-1!==e.indexOf(".")?u.bytesFromIPv4(e):-1!==e.indexOf(":")?u.bytesFromIPv6(e):null},u.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=u.createBuffer(),r=0;r<e.length;++r){var n=parseInt(e[r],10);if(isNaN(n))return null;t.putByte(n)}return t.getBytes()},u.bytesFromIPv6=function(e){for(var t=0,r=2*(8-(e=e.split(":").filter((function(e){return 0===e.length&&++t,!0}))).length+t),n=u.createBuffer(),i=0;i<8;++i)if(e[i]&&0!==e[i].length){var a=u.hexToBytes(e[i]);a.length<2&&n.putByte(0),n.putBytes(a)}else n.fillWithByte(0,r),r=0;return n.getBytes()},u.bytesToIP=function(e){return 4===e.length?u.bytesToIPv4(e):16===e.length?u.bytesToIPv6(e):null},u.bytesToIPv4=function(e){if(4!==e.length)return null;for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t.join(".")},u.bytesToIPv6=function(e){if(16!==e.length)return null;for(var t=[],r=[],n=0,i=0;i<e.length;i+=2){for(var a=u.bytesToHex(e[i]+e[i+1]);"0"===a[0]&&"0"!==a;)a=a.substr(1);if("0"===a){var o=r[r.length-1],s=t.length;o&&s===o.end+1?(o.end=s,o.end-o.start>r[n].end-r[n].start&&(n=r.length-1)):r.push({start:s,end:s})}t.push(a)}if(r.length>0){var c=r[n];c.end-c.start>0&&(t.splice(c.start,c.end-c.start+1,""),0===c.start&&t.unshift(""),7===c.end&&t.push(""))}return t.join(":")},u.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in u&&!e.update)return t(null,u.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return u.cores=navigator.hardwareConcurrency,t(null,u.cores);if("undefined"==typeof Worker)return u.cores=1,t(null,u.cores);if("undefined"==typeof Blob)return u.cores=2,t(null,u.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(e){for(var t=Date.now(),r=t+4;Date.now()<r;);self.postMessage({st:t,et:r})}))}.toString(),")()"],{type:"application/javascript"}));!function e(n,i,a){if(0===i){var o=Math.floor(n.reduce((function(e,t){return e+t}),0)/n.length);return u.cores=Math.max(1,o),URL.revokeObjectURL(r),t(null,u.cores)}!function(e,t){for(var n=[],i=[],a=0;a<e;++a){var o=new Worker(r);o.addEventListener("message",(function(r){if(i.push(r.data),i.length===e){for(var a=0;a<e;++a)n[a].terminate();t(null,i)}})),n.push(o)}for(a=0;a<e;++a)n[a].postMessage(a)}(a,(function(t,r){n.push(function(e,t){for(var r=[],n=0;n<e;++n)for(var i=t[n],a=r[n]=[],o=0;o<e;++o)if(n!==o){var s=t[o];(i.st>s.st&&i.st<s.et||s.st>i.st&&s.st<i.et)&&a.push(o)}return r.reduce((function(e,t){return Math.max(e,t.length)}),0)}(a,r)),e(n,i-1,a)}))}([],5,16)}}).call(this,r(19),r(61).setImmediate,r(13),r(12).Buffer)},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.parseResponse=void 0;var a=i(r(48)),o=i(r(49)),s="function"==typeof fetch?fetch:r(89);function u(e){return e.text().then((function(t){return e.ok?o.default(t):Promise.reject(function(e){try{return JSON.parse(e)}catch(t){return e}}(t))}))}t.default=function(e){return s(a.default(e.url,e.base),function(e){void 0===e&&(e=Object.create(null));return n({credentials:"include"},e)}(e.options)).then(u)},t.parseResponse=u},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o};function i(e){if("object"==typeof e&&null!==e){if("function"==typeof Object.getPrototypeOf){var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}return!1}t.__esModule=!0,t.pipe=t.switchTransactionByType=t.uniq=t.indexBy=t.filter=t.map=t.deepAssign=t.assign=t.values=t.entries=t.keys=t.prop=t.wait=t.head=t.toArray=t.isObject=void 0,t.isObject=i,t.toArray=function(e){return Array.isArray(e)?e:[e]},t.head=function(e){return e[0]},t.wait=function(e){return new Promise((function(t){setTimeout(t,e)}))},t.prop=function(e){return function(t){return t[e]}},t.keys=function(e){return Object.keys(e)},t.entries=function(e){return t.keys(e).map((function(t){return[t,e[t]]}))},t.values=function(e){return t.keys(e).map((function(t){return e[t]}))},t.assign=function(e,r){return t.entries(r).reduce((function(t,r){var i=n(r,2),a=i[0],o=i[1];return e[a]=o,e}),e)},t.deepAssign=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.reduce((function(e,r){return t.keys(r).forEach((function(n){Array.isArray(e[n])&&Array.isArray(r[n])?e[n]=Array.from(new Set(e[n].concat(r[n]))):i(e[n])&&i(r[n])?e[n]=t.deepAssign(e[n],r[n]):e[n]=r[n]})),e}),e[0]||{})},t.map=function(e){return function(t){return t.map(e)}},t.filter=function(e){return function(t){return t.filter(e)}},t.indexBy=function(e,t){return t.reduce((function(t,r){return t[e(r)]=r,t}),{})},t.uniq=function(e){return t.keys(e.reduce((function(e,t){return null!=t&&(e[t]=t),e}),Object.create(null)))},t.switchTransactionByType=function(e){return function(t){return e[t.type]&&"function"==typeof e[t.type]?e[t.type](t):void 0}},t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.reduce((function(e,t){return t(e)}),t)}}},function(e,t,r){var n=r(0);e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0});var a=r(6),o=r(66);t.stringToBytes=function(e,t){if(void 0===t&&(t="utf8"),"utf8"===t)return o.strToUtf8Array(e);if("raw"===t)return Uint8Array.from(i(e).map((function(e){return e.charCodeAt(0)})));throw new Error("Unsupported encoding "+t)},t.bytesToString=function(e,t){if(void 0===t&&(t="utf8"),"utf8"===t)return o.utf8ArrayToStr(Array.from(a._fromIn(e)));if("raw"===t)return Array.from(a._fromIn(e)).map((function(e){return String.fromCharCode(e)})).join("");throw new Error("Unsupported encoding "+t)},t.binaryStringToBytes=function(e){return Uint8Array.from(i(e).map((function(e){return e.charCodeAt(0)})))},t.bytesToBinaryString=function(e){return Array.from(a._fromIn(e)).map((function(e){return String.fromCharCode(e)})).join("")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(20),i=r(5),a=function(e){return"string"==typeof e||e instanceof String},o=function(e){return e instanceof Uint8Array};t._fromIn=function(e){return a(e)?n.base58Decode(e):o(e)?e:Uint8Array.from(e)},t._fromRawIn=function(e){return a(e)?i.stringToBytes(e):o(e)?e:Uint8Array.from(e)}},function(e,t,r){var n=r(0);r(23),r(35),r(64),r(1),n.random&&n.random.getBytes?e.exports=n.random:function(t){var r={},i=new Array(4),a=n.util.createBuffer();function o(){var e=n.prng.create(r);return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,i,!1),a.putInt32(i[0]),a.putInt32(i[1]),a.putInt32(i[2]),a.putInt32(i[3]),a.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256;var s=o(),u=null,c=n.util.globalScope,l=c.crypto||c.msCrypto;if(l&&l.getRandomValues&&(u=function(e){return l.getRandomValues(e)}),n.options.usePureJavaScript||!n.util.isNodejs&&!u){if("undefined"==typeof window||window.document,s.collectInt(+new Date,32),"undefined"!=typeof navigator){var f="";for(var h in navigator)try{"string"==typeof navigator[h]&&(f+=navigator[h])}catch(e){}s.collect(f),f=null}t&&(t().mousemove((function(e){s.collectInt(e.clientX,16),s.collectInt(e.clientY,16)})),t().keypress((function(e){s.collectInt(e.charCode,8)})))}if(n.random)for(var h in s)n.random[h]=s[h];else n.random=s;n.random.createInstance=o,e.exports=n.random}("undefined"!=typeof jQuery?jQuery:null)},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(6),a=r(67),o=n(r(26)),s=n(r(4));r(35);var u=n(r(68)),c=r(5);t._hashChain=function(e){return i._fromIn(t.keccak(t.blake2b(i._fromIn(e))))},t.sha256=function(e){var t=s.algorithms.sha256.create();return t.update(c.bytesToString(e,"raw")),c.stringToBytes(t.digest().getBytes(),"raw")},t.blake2b=function(e){return u.blake2b(i._fromIn(e),null,32)},t.keccak=function(e){return i._fromIn(a.keccak256.array(i._fromIn(e)))},t.hmacSHA256=function(e,t){var r=o.create();return r.start("sha256",c.bytesToString(i._fromIn(t),"raw")),r.update(c.bytesToString(i._fromIn(e),"raw")),c.stringToBytes(r.digest().getBytes(),"raw")}},function(e,t,r){var n=r(0);r(1),r(10);var i=e.exports=n.asn1=n.asn1||{};function a(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(e,t,r,a,o){if(n.util.isArray(a)){for(var s=[],u=0;u<a.length;++u)void 0!==a[u]&&s.push(a[u]);a=s}var c={tagClass:e,type:t,constructed:r,composed:r||n.util.isArray(a),value:a};return o&&"bitStringContents"in o&&(c.bitStringContents=o.bitStringContents,c.original=i.copy(c)),c},i.copy=function(e,t){var r;if(n.util.isArray(e)){r=[];for(var a=0;a<e.length;++a)r.push(i.copy(e[a],t));return r}return"string"==typeof e?e:(r={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:i.copy(e.value,t)},t&&!t.excludeBitStringContents&&(r.bitStringContents=e.bitStringContents),r)},i.equals=function(e,t,r){if(n.util.isArray(e)){if(!n.util.isArray(t))return!1;if(e.length!==t.length)return!1;for(var a=0;a<e.length;++a)if(!i.equals(e[a],t[a]))return!1;return!0}if(typeof e!=typeof t)return!1;if("string"==typeof e)return e===t;var o=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&i.equals(e.value,t.value);return r&&r.includeBitStringContents&&(o=o&&e.bitStringContents===t.bitStringContents),o},i.getBerValueLength=function(e){var t=e.getByte();if(128!==t)return 128&t?e.getInt((127&t)<<3):t};i.fromDer=function(e,t){return void 0===t&&(t={strict:!0,decodeBitStrings:!0}),"boolean"==typeof t&&(t={strict:t,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"string"==typeof e&&(e=n.util.createBuffer(e)),function e(t,r,n,o){var s;a(t,r,2);var u=t.getByte();r--;var c=192&u,l=31&u;s=t.length();var f,h,p=function(e,t){var r=e.getByte();if(t--,128!==r){var n;if(128&r){var i=127&r;a(e,t,i),n=e.getInt(i<<3)}else n=r;if(n<0)throw new Error("Negative length: "+n);return n}}(t,r);if(r-=s-t.length(),void 0!==p&&p>r){if(o.strict){var d=new Error("Too few bytes to read ASN.1 value.");throw d.available=t.length(),d.remaining=r,d.requested=p,d}p=r}var y=32==(32&u);if(y)if(f=[],void 0===p)for(;;){if(a(t,r,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),r-=2;break}s=t.length(),f.push(e(t,r,n+1,o)),r-=s-t.length()}else for(;p>0;)s=t.length(),f.push(e(t,p,n+1,o)),r-=s-t.length(),p-=s-t.length();void 0===f&&c===i.Class.UNIVERSAL&&l===i.Type.BITSTRING&&(h=t.bytes(p));if(void 0===f&&o.decodeBitStrings&&c===i.Class.UNIVERSAL&&l===i.Type.BITSTRING&&p>1){var g=t.read,m=r,v=0;if(l===i.Type.BITSTRING&&(a(t,r,1),v=t.getByte(),r--),0===v)try{s=t.length();var b={verbose:o.verbose,strict:!0,decodeBitStrings:!0},E=e(t,r,n+1,b),S=s-t.length();r-=S,l==i.Type.BITSTRING&&S++;var C=E.tagClass;S!==p||C!==i.Class.UNIVERSAL&&C!==i.Class.CONTEXT_SPECIFIC||(f=[E])}catch(e){}void 0===f&&(t.read=g,r=m)}if(void 0===f){if(void 0===p){if(o.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");p=r}if(l===i.Type.BMPSTRING)for(f="";p>0;p-=2)a(t,r,2),f+=String.fromCharCode(t.getInt16()),r-=2;else f=t.getBytes(p)}var T=void 0===h?null:{bitStringContents:h};return i.create(c,l,y,f,T)}(e,e.length(),0,t)},i.toDer=function(e){var t=n.util.createBuffer(),r=e.tagClass|e.type,a=n.util.createBuffer(),o=!1;if("bitStringContents"in e&&(o=!0,e.original&&(o=i.equals(e,e.original))),o)a.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:a.putByte(0);for(var s=0;s<e.value.length;++s)void 0!==e.value[s]&&a.putBuffer(i.toDer(e.value[s]))}else if(e.type===i.Type.BMPSTRING)for(s=0;s<e.value.length;++s)a.putInt16(e.value.charCodeAt(s));else e.type===i.Type.INTEGER&&e.value.length>1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?a.putBytes(e.value.substr(1)):a.putBytes(e.value);if(t.putByte(r),a.length()<=127)t.putByte(127&a.length());else{var u=a.length(),c="";do{c+=String.fromCharCode(255&u),u>>>=8}while(u>0);t.putByte(128|c.length);for(s=c.length-1;s>=0;--s)t.putByte(c.charCodeAt(s))}return t.putBuffer(a),t},i.oidToDer=function(e){var t,r,i,a,o=e.split("."),s=n.util.createBuffer();s.putByte(40*parseInt(o[0],10)+parseInt(o[1],10));for(var u=2;u<o.length;++u){t=!0,r=[],i=parseInt(o[u],10);do{a=127&i,i>>>=7,t||(a|=128),r.push(a),t=!1}while(i>0);for(var c=r.length-1;c>=0;--c)s.putByte(r[c])}return s},i.derToOid=function(e){var t;"string"==typeof e&&(e=n.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var i=0;e.length()>0;)i<<=7,128&(r=e.getByte())?i+=127&r:(t+="."+(i+r),i=0);return t},i.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),a=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),s=0;if(e.length>11){var u=e.charAt(10),c=10;"+"!==u&&"-"!==u&&(s=parseInt(e.substr(10,2),10),c+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(a,o,s,0),c&&("+"===(u=e.charAt(c))||"-"===u)){var l=60*parseInt(e.substr(c+1,2),10)+parseInt(e.substr(c+4,2),10);l*=6e4,"+"===u?t.setTime(+t-l):t.setTime(+t+l)}return t},i.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),a=parseInt(e.substr(8,2),10),o=parseInt(e.substr(10,2),10),s=parseInt(e.substr(12,2),10),u=0,c=0,l=!1;"Z"===e.charAt(e.length-1)&&(l=!0);var f=e.length-5,h=e.charAt(f);"+"!==h&&"-"!==h||(c=60*parseInt(e.substr(f+1,2),10)+parseInt(e.substr(f+4,2),10),c*=6e4,"+"===h&&(c*=-1),l=!0);return"."===e.charAt(14)&&(u=1e3*parseFloat(e.substr(14),10)),l?(t.setUTCFullYear(r,n,i),t.setUTCHours(a,o,s,u),t.setTime(+t+c)):(t.setFullYear(r,n,i),t.setHours(a,o,s,u)),t},i.dateToUtcTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z"},i.dateToGeneralizedTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push(""+e.getUTCFullYear()),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z"},i.integerToDer=function(e){var t=n.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r},i.derToInteger=function(e){"string"==typeof e&&(e=n.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},i.validate=function(e,t,r,a){var o=!1;if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)a&&(e.tagClass!==t.tagClass&&a.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&a.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||void 0===t.constructed){if(o=!0,t.value&&n.util.isArray(t.value))for(var s=0,u=0;o&&u<t.value.length;++u)o=t.value[u].optional||!1,e.value[s]&&((o=i.validate(e.value[s],t.value[u],r,a))?++s:t.value[u].optional&&(o=!0)),!o&&a&&a.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"');if(o&&r)if(t.capture&&(r[t.capture]=e.value),t.captureAsn1&&(r[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(r[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e)if(e.bitStringContents.length<2)r[t.captureBitStringValue]="";else{if(0!==e.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits");r[t.captureBitStringValue]=e.bitStringContents.slice(1)}}else a&&a.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');return o};var o=/[^\\u0000-\\u00ff]/;i.prettyPrint=function(e,t,r){var a="";r=r||2,(t=t||0)>0&&(a+="\n");for(var s="",u=0;u<t*r;++u)s+=" ";switch(a+=s+"Tag: ",e.tagClass){case i.Class.UNIVERSAL:a+="Universal:";break;case i.Class.APPLICATION:a+="Application:";break;case i.Class.CONTEXT_SPECIFIC:a+="Context-Specific:";break;case i.Class.PRIVATE:a+="Private:"}if(e.tagClass===i.Class.UNIVERSAL)switch(a+=e.type,e.type){case i.Type.NONE:a+=" (None)";break;case i.Type.BOOLEAN:a+=" (Boolean)";break;case i.Type.INTEGER:a+=" (Integer)";break;case i.Type.BITSTRING:a+=" (Bit string)";break;case i.Type.OCTETSTRING:a+=" (Octet string)";break;case i.Type.NULL:a+=" (Null)";break;case i.Type.OID:a+=" (Object Identifier)";break;case i.Type.ODESC:a+=" (Object Descriptor)";break;case i.Type.EXTERNAL:a+=" (External or Instance of)";break;case i.Type.REAL:a+=" (Real)";break;case i.Type.ENUMERATED:a+=" (Enumerated)";break;case i.Type.EMBEDDED:a+=" (Embedded PDV)";break;case i.Type.UTF8:a+=" (UTF8)";break;case i.Type.ROID:a+=" (Relative Object Identifier)";break;case i.Type.SEQUENCE:a+=" (Sequence)";break;case i.Type.SET:a+=" (Set)";break;case i.Type.PRINTABLESTRING:a+=" (Printable String)";break;case i.Type.IA5String:a+=" (IA5String (ASCII))";break;case i.Type.UTCTIME:a+=" (UTC time)";break;case i.Type.GENERALIZEDTIME:a+=" (Generalized time)";break;case i.Type.BMPSTRING:a+=" (BMP String)"}else a+=e.type;if(a+="\n",a+=s+"Constructed: "+e.constructed+"\n",e.composed){var c=0,l="";for(u=0;u<e.value.length;++u)void 0!==e.value[u]&&(c+=1,l+=i.prettyPrint(e.value[u],t+1,r),u+1<e.value.length&&(l+=","));a+=s+"Sub values: "+c+l}else{if(a+=s+"Value: ",e.type===i.Type.OID){var f=i.derToOid(e.value);a+=f,n.pki&&n.pki.oids&&f in n.pki.oids&&(a+=" ("+n.pki.oids[f]+") ")}if(e.type===i.Type.INTEGER)try{a+=i.derToInteger(e.value)}catch(t){a+="0x"+n.util.bytesToHex(e.value)}else if(e.type===i.Type.BITSTRING){if(e.value.length>1?a+="0x"+n.util.bytesToHex(e.value.slice(1)):a+="(none)",e.value.length>0){var h=e.value.charCodeAt(0);1==h?a+=" (1 unused bit shown)":h>1&&(a+=" ("+h+" unused bits shown)")}}else e.type===i.Type.OCTETSTRING?(o.test(e.value)||(a+="("+e.value+") "),a+="0x"+n.util.bytesToHex(e.value)):e.type===i.Type.UTF8?a+=n.util.decodeUtf8(e.value):e.type===i.Type.PRINTABLESTRING||e.type===i.Type.IA5String?a+=e.value:o.test(e.value)?a+="0x"+n.util.bytesToHex(e.value):0===e.value.length?a+="[null]":a+=e.value}return a}},function(e,t,r){var n=r(0);n.pki=n.pki||{};var i=e.exports=n.pki.oids=n.oids=n.oids||{};function a(e,t){i[e]=t,i[t]=e}function o(e,t){i[e]=t}a("1.2.840.113549.1.1.1","rsaEncryption"),a("1.2.840.113549.1.1.4","md5WithRSAEncryption"),a("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),a("1.2.840.113549.1.1.7","RSAES-OAEP"),a("1.2.840.113549.1.1.8","mgf1"),a("1.2.840.113549.1.1.9","pSpecified"),a("1.2.840.113549.1.1.10","RSASSA-PSS"),a("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),a("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),a("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),a("1.2.840.10040.4.3","dsa-with-sha1"),a("1.3.14.3.2.7","desCBC"),a("1.3.14.3.2.26","sha1"),a("2.16.840.1.101.3.4.2.1","sha256"),a("2.16.840.1.101.3.4.2.2","sha384"),a("2.16.840.1.101.3.4.2.3","sha512"),a("1.2.840.113549.2.5","md5"),a("1.2.840.113549.1.7.1","data"),a("1.2.840.113549.1.7.2","signedData"),a("1.2.840.113549.1.7.3","envelopedData"),a("1.2.840.113549.1.7.4","signedAndEnvelopedData"),a("1.2.840.113549.1.7.5","digestedData"),a("1.2.840.113549.1.7.6","encryptedData"),a("1.2.840.113549.1.9.1","emailAddress"),a("1.2.840.113549.1.9.2","unstructuredName"),a("1.2.840.113549.1.9.3","contentType"),a("1.2.840.113549.1.9.4","messageDigest"),a("1.2.840.113549.1.9.5","signingTime"),a("1.2.840.113549.1.9.6","counterSignature"),a("1.2.840.113549.1.9.7","challengePassword"),a("1.2.840.113549.1.9.8","unstructuredAddress"),a("1.2.840.113549.1.9.14","extensionRequest"),a("1.2.840.113549.1.9.20","friendlyName"),a("1.2.840.113549.1.9.21","localKeyId"),a("1.2.840.113549.1.9.22.1","x509Certificate"),a("1.2.840.113549.1.12.10.1.1","keyBag"),a("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),a("1.2.840.113549.1.12.10.1.3","certBag"),a("1.2.840.113549.1.12.10.1.4","crlBag"),a("1.2.840.113549.1.12.10.1.5","secretBag"),a("1.2.840.113549.1.12.10.1.6","safeContentsBag"),a("1.2.840.113549.1.5.13","pkcs5PBES2"),a("1.2.840.113549.1.5.12","pkcs5PBKDF2"),a("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),a("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),a("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),a("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),a("1.2.840.113549.2.7","hmacWithSHA1"),a("1.2.840.113549.2.8","hmacWithSHA224"),a("1.2.840.113549.2.9","hmacWithSHA256"),a("1.2.840.113549.2.10","hmacWithSHA384"),a("1.2.840.113549.2.11","hmacWithSHA512"),a("1.2.840.113549.3.7","des-EDE3-CBC"),a("2.16.840.1.101.3.4.1.2","aes128-CBC"),a("2.16.840.1.101.3.4.1.22","aes192-CBC"),a("2.16.840.1.101.3.4.1.42","aes256-CBC"),a("2.5.4.3","commonName"),a("2.5.4.5","serialName"),a("2.5.4.6","countryName"),a("2.5.4.7","localityName"),a("2.5.4.8","stateOrProvinceName"),a("2.5.4.10","organizationName"),a("2.5.4.11","organizationalUnitName"),a("2.5.4.13","description"),a("2.16.840.1.113730.1.1","nsCertType"),a("2.16.840.1.113730.1.13","nsComment"),o("2.5.29.1","authorityKeyIdentifier"),o("2.5.29.2","keyAttributes"),o("2.5.29.3","certificatePolicies"),o("2.5.29.4","keyUsageRestriction"),o("2.5.29.5","policyMapping"),o("2.5.29.6","subtreesConstraint"),o("2.5.29.7","subjectAltName"),o("2.5.29.8","issuerAltName"),o("2.5.29.9","subjectDirectoryAttributes"),o("2.5.29.10","basicConstraints"),o("2.5.29.11","nameConstraints"),o("2.5.29.12","policyConstraints"),o("2.5.29.13","basicConstraints"),a("2.5.29.14","subjectKeyIdentifier"),a("2.5.29.15","keyUsage"),o("2.5.29.16","privateKeyUsagePeriod"),a("2.5.29.17","subjectAltName"),a("2.5.29.18","issuerAltName"),a("2.5.29.19","basicConstraints"),o("2.5.29.20","cRLNumber"),o("2.5.29.21","cRLReason"),o("2.5.29.22","expirationDate"),o("2.5.29.23","instructionCode"),o("2.5.29.24","invalidityDate"),o("2.5.29.25","cRLDistributionPoints"),o("2.5.29.26","issuingDistributionPoint"),o("2.5.29.27","deltaCRLIndicator"),o("2.5.29.28","issuingDistributionPoint"),o("2.5.29.29","certificateIssuer"),o("2.5.29.30","nameConstraints"),a("2.5.29.31","cRLDistributionPoints"),a("2.5.29.32","certificatePolicies"),o("2.5.29.33","policyMappings"),o("2.5.29.34","policyConstraints"),a("2.5.29.35","authorityKeyIdentifier"),o("2.5.29.36","policyConstraints"),a("2.5.29.37","extKeyUsage"),o("2.5.29.46","freshestCRL"),o("2.5.29.54","inhibitAnyPolicy"),a("1.3.6.1.4.1.11129.2.4.2","timestampList"),a("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),a("1.3.6.1.5.5.7.3.1","serverAuth"),a("1.3.6.1.5.5.7.3.2","clientAuth"),a("1.3.6.1.5.5.7.3.3","codeSigning"),a("1.3.6.1.5.5.7.3.4","emailProtection"),a("1.3.6.1.5.5.7.3.8","timeStamping")},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o};t.__esModule=!0;var i=r(3);t.default=function(e,t){void 0===t&&(t=Object.create(null));var r=Object.keys(e).map((function(t){return[t,e[t]]})).map((function(e){var r=n(e,2),i=r[0],a=r[1];return[i,Object.prototype.hasOwnProperty.call(t,i)?t[i](a):a]})).filter((function(e){var t=n(e,2);t[0];return null!=t[1]})).map((function(e){var t=n(e,2),r=t[0],a=t[1];return i.toArray(a).map((function(e){return r+"="+e})).join("&")})).join("&");return r.length?"?"+r:""}},function(e,t,r){"use strict";(function(e){
2
+ /*!
3
+ * The buffer module from node.js, for the browser.
4
+ *
5
+ * @author Feross Aboukhadijeh <http://feross.org>
6
+ * @license MIT
7
+ */
8
+ var n=r(58),i=r(59),a=r(60);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(t,r),i=(e=s(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|p(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?s(e,0):h(e,t);if("Buffer"===t.type&&a(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|p(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function p(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(e).length;default:if(n)return K(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var a,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=r;a<s;a++)if(c(e,a)===c(t,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===u)return l*o}else-1!==l&&(a-=a-l),l=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var f=!0,h=0;h<u;h++)if(c(e,a+h)!==c(t,h)){f=!1;break}if(f)return a}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function E(e,t,r,n){return F(K(t,e.length-r),e,r,n)}function S(e,t,r,n){return F(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function C(e,t,r,n){return S(e,t,r,n)}function T(e,t,r,n){return F(j(t),e,r,n)}function A(e,t,r,n){return F(function(e,t){for(var r,n,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function w(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a,o,s,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&c)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?w(this,0,e):y.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(n,i),l=e.slice(t,r),f=0;f<s;++f)if(c[f]!==l[f]){a=c[f],o=l[f];break}return a<o?-1:o<a?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return C(this,e,t,r);case"base64":return T(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function _(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function N(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=t;a<r;++a)i+=V(e[a]);return i}function R(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function k(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,r,n,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function P(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i<a;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function O(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i<a;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function L(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,a){return a||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,a){return a||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||k(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||k(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||k(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||k(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||U(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||U(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);U(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);U(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,a=n-r;if(this===e&&r<t&&t<n)for(i=a-1;i>=0;--i)e[i+t]=this[i+r];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=u.isBuffer(e)?e:K(new u(e,n).toString()),s=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%s]}return this};var x=/[^+\/0-9A-Za-z-_]/g;function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function j(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(x,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(13))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0});var a=r(6);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return Uint8Array.from(i(e,a._fromIn(t)))}),new Uint8Array(0))},t.split=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=t.reduce((function(e,t){return{arr:e.arr.slice(t),r:i(e.r,[e.arr.slice(0,t)])}}),{arr:a._fromIn(e),r:[]}),o=n.r,s=n.arr;return i(o,[s])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PUBLIC_KEY_LENGTH=32,t.PRIVATE_KEY_LENGTH=32,t.SIGNATURE_LENGTH=64,t.ADDRESS_LENGTH=26,t.MAIN_NET_CHAIN_ID=87,t.TEST_NET_CHAIN_ID=84},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.broadcast=t.fetchStatus=t.fetchMultipleInfo=t.fetchInfo=t.fetchUnconfirmedInfo=t.fetchTransactions=t.fetchUnconfirmed=t.fetchCalculateFee=t.fetchUnconfirmedSize=void 0;var o=r(31),s=r(30),u=a(r(2)),c=a(r(11)),l=r(3),f=a(r(50));function h(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/transactions/unconfirmed/info/"+t,options:r})}function p(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/transactions/info/"+t,options:r})}t.fetchUnconfirmedSize=function(e){return u.default({base:e,url:"/transactions/unconfirmed/size"})},t.fetchCalculateFee=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/transactions/calculateFee",options:l.deepAssign(n({},r),{method:"POST",body:f.default(t),headers:{"Content-Type":"application/json"}})})},t.fetchUnconfirmed=function(e,t){return void 0===t&&(t=Object.create(null)),u.default({base:e,url:"/transactions/unconfirmed",options:t})},t.fetchTransactions=function(e,t,r,n,a,o){return void 0===o&&(o=Object.create(null)),u.default({base:e,url:"/transactions/address/"+t+"/limit/"+r+c.default({after:n}),options:o}).then((function(e){return i(e,1)[0]}))},t.fetchUnconfirmedInfo=h,t.fetchInfo=p,t.fetchMultipleInfo=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/transactions/info"+c.default({id:t}),options:r})},t.fetchStatus=function(e,t){var r={id:"",confirmations:-1,height:-1,inUTX:!1,status:o.TRANSACTION_STATUSES.NOT_FOUND},a=t.map((function(t){return h(e,t).then((function(){return n(n({},r),{id:t,status:o.TRANSACTION_STATUSES.UNCONFIRMED,inUTX:!0})})).catch((function(){return p(e,t).then((function(e){return n(n({},r),{id:t,status:o.TRANSACTION_STATUSES.IN_BLOCKCHAIN,height:e.height,applicationStatus:e.applicationStatus})}))})).catch((function(){return n(n({},r),{id:t})}))}));return Promise.all([s.fetchHeight(e),Promise.all(a)]).then((function(e){var t=i(e,2),r=t[0].height,a=t[1];return{height:r,statuses:a.map((function(e){return n(n({},e),{confirmations:e.status===o.TRANSACTION_STATUSES.IN_BLOCKCHAIN?r-e.height:e.confirmations})}))}}))},t.broadcast=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/transactions/broadcast",options:l.deepAssign(n({},r),{method:"POST",body:f.default(t),headers:{"Content-Type":"application/json"}})})}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0});var i=r(33),a=r(36);t.seedWordsList=a.seedWordsList;var o=r(39);t.ChaidId=o.ChaidId;var s=r(38);t.Seed=s.Seed;var u=r(28);t.isPrivateKey=u.isPrivateKey,t.isPublicKey=u.isPublicKey;var c=r(33);t.crypto=c.crypto,function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(15)),t.signBytes=(n=i.crypto({output:"Base58"})).signBytes,t.keyPair=n.keyPair,t.publicKey=n.publicKey,t.privateKey=n.privateKey,t.address=n.address,t.buildAddress=n.buildAddress,t.blake2b=n.blake2b,t.keccak=n.keccak,t.sha256=n.sha256,t.sharedKey=n.sharedKey,t.seedWithNonce=n.seedWithNonce,t.base64Encode=n.base64Encode,t.base64Decode=n.base64Decode,t.base58Encode=n.base58Encode,t.base58Decode=n.base58Decode,t.base16Encode=n.base16Encode,t.base16Decode=n.base16Decode,t.stringToBytes=n.stringToBytes,t.bytesToString=n.bytesToString,t.random=n.random,t.randomSeed=n.randomSeed,t.randomBytes=n.randomBytes,t.verifySignature=n.verifySignature,t.verifyPublicKey=n.verifyPublicKey,t.verifyAddress=n.verifyAddress,t.messageDecrypt=n.messageDecrypt,t.messageEncrypt=n.messageEncrypt,t.aesDecrypt=n.aesDecrypt,t.aesEncrypt=n.aesEncrypt,t.encryptSeed=n.encryptSeed,t.decryptSeed=n.decryptSeed,t.rsaKeyPair=n.rsaKeyPair,t.rsaKeyPairSync=n.rsaKeyPairSync,t.rsaSign=n.rsaSign,t.rsaVerify=n.rsaVerify,t.merkleVerify=n.merkleVerify,t.split=n.split,t.concat=n.concat},function(e,t,r){"use strict";(function(e){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(7)),a=r(36),o=r(5),s=function(e){return o.stringToBytes(i.default.getBytesSync(e),"raw")};t.random=function(r,n){switch(n){case"Array8":return Array.from(s(r));case"Array16":return Array.from(t.random(r,"Uint16Array"));case"Array32":return Array.from(t.random(r,"Uint32Array"));case"Buffer":return function(){try{new e(1)}catch(e){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}}(),e.from(s(r));case"Uint8Array":return s(r);case"Uint16Array":return new Uint16Array(r).map((function(e){return s(2).reduce((function(e,t,r){return e|t<<8*(1-r)}),0)}));case"Uint32Array":return new Uint32Array(r).map((function(e){return s(4).reduce((function(e,t,r){return e|t<<8*(1-r)}),0)}));default:throw new Error(n+" is unsupported.")}},t.randomBytes=function(e){return t.random(e,"Uint8Array")},t.randomSeed=function(e){return void 0===e&&(e=15),t.random(e,"Array32").map((function(e){return a.seedWordsList[e%a.seedWordsList.length]})).join(" ")}}).call(this,r(12).Buffer)},function(e,t){var r,n,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function y(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new d(e,t)),1!==c.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(1),a=n(r(65)),o=r(6),s=r(5);t.base64Decode=function(e){return s.stringToBytes(i.decode64(e),"raw")},t.base64Encode=function(e){return i.encode64(s.bytesToString(o._fromIn(e),"raw"))},t.base58Decode=function(e){return a.default.decode(e)},t.base58Encode=function(e){return a.default.encode(o._fromIn(e))},t.base16Decode=function(e){return s.stringToBytes(i.hexToBytes(e),"raw")},t.base16Encode=function(e){return i.bytesToHex(s.bytesToString(o._fromIn(e),"raw"))}},function(e,t,r){"use strict";t.__esModule=!0;var n=Object.create(null),i=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},a=(new Uint8Array(16),new Uint8Array(32));a[0]=9;var o=i(),s=i([1]),u=i([56129,1]),c=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function y(e,t,r,n){return function(e,t,r,n,i){var a,o=0;for(a=0;a<i;a++)o|=e[t+a]^r[n+a];return(1&o-1>>>8)-1}(e,t,r,n,32)}function g(e,t){for(var r=0;r<16;r++)e[r]=0|t[r]}function m(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function v(e,t,r){for(var n,i=~(r-1),a=0;a<16;a++)n=i&(e[a]^t[a]),e[a]^=n,t[a]^=n}function b(e,t){var r,n,a,o=i(),s=i();for(r=0;r<16;r++)s[r]=t[r];for(m(s),m(s),m(s),n=0;n<2;n++){for(o[0]=s[0]-65517,r=1;r<15;r++)o[r]=s[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),a=o[15]>>16&1,o[14]&=65535,v(s,o,1-a)}for(r=0;r<16;r++)e[2*r]=255&s[r],e[2*r+1]=s[r]>>8}function E(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return b(r,e),b(n,t),y(r,0,n,0)}function S(e){var t=new Uint8Array(32);return b(t,e),1&t[0]}function C(e,t){for(var r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function T(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function A(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function I(e,t,r){var n,i,a=0,o=0,s=0,u=0,c=0,l=0,f=0,h=0,p=0,d=0,y=0,g=0,m=0,v=0,b=0,E=0,S=0,C=0,T=0,A=0,I=0,w=0,B=0,_=0,N=0,R=0,k=0,U=0,P=0,O=0,L=0,D=r[0],M=r[1],x=r[2],V=r[3],K=r[4],j=r[5],F=r[6],q=r[7],G=r[8],z=r[9],H=r[10],Y=r[11],Q=r[12],W=r[13],X=r[14],J=r[15];a+=(n=t[0])*D,o+=n*M,s+=n*x,u+=n*V,c+=n*K,l+=n*j,f+=n*F,h+=n*q,p+=n*G,d+=n*z,y+=n*H,g+=n*Y,m+=n*Q,v+=n*W,b+=n*X,E+=n*J,o+=(n=t[1])*D,s+=n*M,u+=n*x,c+=n*V,l+=n*K,f+=n*j,h+=n*F,p+=n*q,d+=n*G,y+=n*z,g+=n*H,m+=n*Y,v+=n*Q,b+=n*W,E+=n*X,S+=n*J,s+=(n=t[2])*D,u+=n*M,c+=n*x,l+=n*V,f+=n*K,h+=n*j,p+=n*F,d+=n*q,y+=n*G,g+=n*z,m+=n*H,v+=n*Y,b+=n*Q,E+=n*W,S+=n*X,C+=n*J,u+=(n=t[3])*D,c+=n*M,l+=n*x,f+=n*V,h+=n*K,p+=n*j,d+=n*F,y+=n*q,g+=n*G,m+=n*z,v+=n*H,b+=n*Y,E+=n*Q,S+=n*W,C+=n*X,T+=n*J,c+=(n=t[4])*D,l+=n*M,f+=n*x,h+=n*V,p+=n*K,d+=n*j,y+=n*F,g+=n*q,m+=n*G,v+=n*z,b+=n*H,E+=n*Y,S+=n*Q,C+=n*W,T+=n*X,A+=n*J,l+=(n=t[5])*D,f+=n*M,h+=n*x,p+=n*V,d+=n*K,y+=n*j,g+=n*F,m+=n*q,v+=n*G,b+=n*z,E+=n*H,S+=n*Y,C+=n*Q,T+=n*W,A+=n*X,I+=n*J,f+=(n=t[6])*D,h+=n*M,p+=n*x,d+=n*V,y+=n*K,g+=n*j,m+=n*F,v+=n*q,b+=n*G,E+=n*z,S+=n*H,C+=n*Y,T+=n*Q,A+=n*W,I+=n*X,w+=n*J,h+=(n=t[7])*D,p+=n*M,d+=n*x,y+=n*V,g+=n*K,m+=n*j,v+=n*F,b+=n*q,E+=n*G,S+=n*z,C+=n*H,T+=n*Y,A+=n*Q,I+=n*W,w+=n*X,B+=n*J,p+=(n=t[8])*D,d+=n*M,y+=n*x,g+=n*V,m+=n*K,v+=n*j,b+=n*F,E+=n*q,S+=n*G,C+=n*z,T+=n*H,A+=n*Y,I+=n*Q,w+=n*W,B+=n*X,_+=n*J,d+=(n=t[9])*D,y+=n*M,g+=n*x,m+=n*V,v+=n*K,b+=n*j,E+=n*F,S+=n*q,C+=n*G,T+=n*z,A+=n*H,I+=n*Y,w+=n*Q,B+=n*W,_+=n*X,N+=n*J,y+=(n=t[10])*D,g+=n*M,m+=n*x,v+=n*V,b+=n*K,E+=n*j,S+=n*F,C+=n*q,T+=n*G,A+=n*z,I+=n*H,w+=n*Y,B+=n*Q,_+=n*W,N+=n*X,R+=n*J,g+=(n=t[11])*D,m+=n*M,v+=n*x,b+=n*V,E+=n*K,S+=n*j,C+=n*F,T+=n*q,A+=n*G,I+=n*z,w+=n*H,B+=n*Y,_+=n*Q,N+=n*W,R+=n*X,k+=n*J,m+=(n=t[12])*D,v+=n*M,b+=n*x,E+=n*V,S+=n*K,C+=n*j,T+=n*F,A+=n*q,I+=n*G,w+=n*z,B+=n*H,_+=n*Y,N+=n*Q,R+=n*W,k+=n*X,U+=n*J,v+=(n=t[13])*D,b+=n*M,E+=n*x,S+=n*V,C+=n*K,T+=n*j,A+=n*F,I+=n*q,w+=n*G,B+=n*z,_+=n*H,N+=n*Y,R+=n*Q,k+=n*W,U+=n*X,P+=n*J,b+=(n=t[14])*D,E+=n*M,S+=n*x,C+=n*V,T+=n*K,A+=n*j,I+=n*F,w+=n*q,B+=n*G,_+=n*z,N+=n*H,R+=n*Y,k+=n*Q,U+=n*W,P+=n*X,O+=n*J,E+=(n=t[15])*D,o+=38*(C+=n*x),s+=38*(T+=n*V),u+=38*(A+=n*K),c+=38*(I+=n*j),l+=38*(w+=n*F),f+=38*(B+=n*q),h+=38*(_+=n*G),p+=38*(N+=n*z),d+=38*(R+=n*H),y+=38*(k+=n*Y),g+=38*(U+=n*Q),m+=38*(P+=n*W),v+=38*(O+=n*X),b+=38*(L+=n*J),a=(n=(a+=38*(S+=n*M))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),E=(n=E+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=(a+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),E=(n=E+i+65535)-65536*(i=Math.floor(n/65536)),a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=h,e[8]=p,e[9]=d,e[10]=y,e[11]=g,e[12]=m,e[13]=v,e[14]=b,e[15]=E}function w(e,t){I(e,t,t)}function B(e,t){var r,n=i();for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)w(n,n),2!==r&&4!==r&&I(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function _(e,t,r){var n,a,o=new Uint8Array(32),s=new Float64Array(80),c=i(),l=i(),f=i(),h=i(),p=i(),d=i();for(a=0;a<31;a++)o[a]=t[a];for(o[31]=127&t[31]|64,o[0]&=248,C(s,r),a=0;a<16;a++)l[a]=s[a],h[a]=c[a]=f[a]=0;for(c[0]=h[0]=1,a=254;a>=0;--a)v(c,l,n=o[a>>>3]>>>(7&a)&1),v(f,h,n),T(p,c,f),A(c,c,f),T(f,l,h),A(l,l,h),w(h,p),w(d,c),I(c,f,c),I(f,l,p),T(p,c,f),A(c,c,f),w(l,c),A(f,h,d),I(c,f,u),T(c,c,h),I(f,f,c),I(c,h,d),I(h,l,s),w(l,p),v(c,l,n),v(f,h,n);for(a=0;a<16;a++)s[a+16]=c[a],s[a+32]=f[a],s[a+48]=l[a],s[a+64]=h[a];var y=s.subarray(32),g=s.subarray(16);return B(y,y),I(g,g,y),b(e,g),0}var N=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function R(e,t,r,n){for(var i,a,o,s,u,c,l,f,h,p,d,y,g,m,v,b,E,S,C,T,A,I,w,B,_,R,k=new Int32Array(16),U=new Int32Array(16),P=e[0],O=e[1],L=e[2],D=e[3],M=e[4],x=e[5],V=e[6],K=e[7],j=t[0],F=t[1],q=t[2],G=t[3],z=t[4],H=t[5],Y=t[6],Q=t[7],W=0;n>=128;){for(C=0;C<16;C++)T=8*C+W,k[C]=r[T+0]<<24|r[T+1]<<16|r[T+2]<<8|r[T+3],U[C]=r[T+4]<<24|r[T+5]<<16|r[T+6]<<8|r[T+7];for(C=0;C<80;C++)if(i=P,a=O,o=L,s=D,u=M,c=x,l=V,K,h=j,p=F,d=q,y=G,g=z,m=H,v=Y,Q,w=65535&(I=Q),B=I>>>16,_=65535&(A=K),R=A>>>16,w+=65535&(I=(z>>>14|M<<18)^(z>>>18|M<<14)^(M>>>9|z<<23)),B+=I>>>16,_+=65535&(A=(M>>>14|z<<18)^(M>>>18|z<<14)^(z>>>9|M<<23)),R+=A>>>16,w+=65535&(I=z&H^~z&Y),B+=I>>>16,_+=65535&(A=M&x^~M&V),R+=A>>>16,w+=65535&(I=N[2*C+1]),B+=I>>>16,_+=65535&(A=N[2*C]),R+=A>>>16,A=k[C%16],B+=(I=U[C%16])>>>16,_+=65535&A,R+=A>>>16,_+=(B+=(w+=65535&I)>>>16)>>>16,w=65535&(I=S=65535&w|B<<16),B=I>>>16,_=65535&(A=E=65535&_|(R+=_>>>16)<<16),R=A>>>16,w+=65535&(I=(j>>>28|P<<4)^(P>>>2|j<<30)^(P>>>7|j<<25)),B+=I>>>16,_+=65535&(A=(P>>>28|j<<4)^(j>>>2|P<<30)^(j>>>7|P<<25)),R+=A>>>16,B+=(I=j&F^j&q^F&q)>>>16,_+=65535&(A=P&O^P&L^O&L),R+=A>>>16,f=65535&(_+=(B+=(w+=65535&I)>>>16)>>>16)|(R+=_>>>16)<<16,b=65535&w|B<<16,w=65535&(I=y),B=I>>>16,_=65535&(A=s),R=A>>>16,B+=(I=S)>>>16,_+=65535&(A=E),R+=A>>>16,O=i,L=a,D=o,M=s=65535&(_+=(B+=(w+=65535&I)>>>16)>>>16)|(R+=_>>>16)<<16,x=u,V=c,K=l,P=f,F=h,q=p,G=d,z=y=65535&w|B<<16,H=g,Y=m,Q=v,j=b,C%16==15)for(T=0;T<16;T++)A=k[T],w=65535&(I=U[T]),B=I>>>16,_=65535&A,R=A>>>16,A=k[(T+9)%16],w+=65535&(I=U[(T+9)%16]),B+=I>>>16,_+=65535&A,R+=A>>>16,E=k[(T+1)%16],w+=65535&(I=((S=U[(T+1)%16])>>>1|E<<31)^(S>>>8|E<<24)^(S>>>7|E<<25)),B+=I>>>16,_+=65535&(A=(E>>>1|S<<31)^(E>>>8|S<<24)^E>>>7),R+=A>>>16,E=k[(T+14)%16],B+=(I=((S=U[(T+14)%16])>>>19|E<<13)^(E>>>29|S<<3)^(S>>>6|E<<26))>>>16,_+=65535&(A=(E>>>19|S<<13)^(S>>>29|E<<3)^E>>>6),R+=A>>>16,R+=(_+=(B+=(w+=65535&I)>>>16)>>>16)>>>16,k[T]=65535&_|R<<16,U[T]=65535&w|B<<16;w=65535&(I=j),B=I>>>16,_=65535&(A=P),R=A>>>16,A=e[0],B+=(I=t[0])>>>16,_+=65535&A,R+=A>>>16,R+=(_+=(B+=(w+=65535&I)>>>16)>>>16)>>>16,e[0]=P=65535&_|R<<16,t[0]=j=65535&w|B<<16,w=65535&(I=F),B=I>>>16,_=65535&(A=O),R=A>>>16,A=e[1],B+=(I=t[1])>>>16,_+=65535&A,R+=A>>>16,R+=(_+=(B+=(w+=65535&I)>>>16)>>>16)>>>16,e[1]=O=65535&_|R<<16,t[1]=F=65535&w|B<<16,w=65535&(I=q),B=I>>>16,_=65535&(A=L),R=A>>>16,A=e[2],B+=(I=t[2])>>>16,_+=65535&A,R+=A>>>16,R+=(_+=(B+=(w+=65535&I)>>>16)>>>16)>>>16,e[2]=L=65535&_|R<<16,t[2]=q=65535&w|B<<16,w=65535&(I=G),B=I>>>16,_=65535&(A=D),R=A>>>16,A=e[3],B+=(I=t[3])>>>16,_+=65535&A,R+=A>>>16,R+=(_+=(B+=(w+=65535&I)>>>16)>>>16)>>>16,e[3]=D=65535&_|R<<16,t[3]=G=65535&w|B<<16,w=65535&(I=z),B=I>>>16,_=65535&(A=M),R=A>>>16,A=e[4],B+=(I=t[4])>>>16,_+=65535&A,R+=A>>>16,R+=(_+=(B+=(w+=65535&I)>>>16)>>>16)>>>16,e[4]=M=65535&_|R<<16,t[4]=z=65535&w|B<<16,w=65535&(I=H),B=I>>>16,_=65535&(A=x),R=A>>>16,A=e[5],B+=(I=t[5])>>>16,_+=65535&A,R+=A>>>16,R+=(_+=(B+=(w+=65535&I)>>>16)>>>16)>>>16,e[5]=x=65535&_|R<<16,t[5]=H=65535&w|B<<16,w=65535&(I=Y),B=I>>>16,_=65535&(A=V),R=A>>>16,A=e[6],B+=(I=t[6])>>>16,_+=65535&A,R+=A>>>16,R+=(_+=(B+=(w+=65535&I)>>>16)>>>16)>>>16,e[6]=V=65535&_|R<<16,t[6]=Y=65535&w|B<<16,w=65535&(I=Q),B=I>>>16,_=65535&(A=K),R=A>>>16,A=e[7],B+=(I=t[7])>>>16,_+=65535&A,R+=A>>>16,R+=(_+=(B+=(w+=65535&I)>>>16)>>>16)>>>16,e[7]=K=65535&_|R<<16,t[7]=Q=65535&w|B<<16,W+=128,n-=128}return n}function k(e,t,r){var n,i=new Int32Array(8),a=new Int32Array(8),o=new Uint8Array(256),s=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,a[0]=4089235720,a[1]=2227873595,a[2]=4271175723,a[3]=1595750129,a[4]=2917565137,a[5]=725511199,a[6]=4215389547,a[7]=327033209,R(i,a,t,r),r%=128,n=0;n<r;n++)o[n]=t[s-r+n];for(o[r]=128,o[(r=256-128*(r<112?1:0))-9]=0,d(o,r-8,s/536870912|0,s<<3),R(i,a,o,r),n=0;n<8;n++)d(e,8*n,i[n],a[n]);return 0}function U(e,t){var r=i(),n=i(),a=i(),o=i(),s=i(),u=i(),c=i(),f=i(),h=i();A(r,e[1],e[0]),A(h,t[1],t[0]),I(r,r,h),T(n,e[0],e[1]),T(h,t[0],t[1]),I(n,n,h),I(a,e[3],t[3]),I(a,a,l),I(o,e[2],t[2]),T(o,o,o),A(s,n,r),A(u,o,a),T(c,o,a),T(f,n,r),I(e[0],s,u),I(e[1],f,c),I(e[2],c,u),I(e[3],s,f)}function P(e,t,r){for(var n=0;n<4;n++)v(e[n],t[n],r)}function O(e,t){var r=i(),n=i(),a=i();B(a,t[2]),I(r,t[0],a),I(n,t[1],a),b(e,n),e[31]^=S(r)<<7}function L(e,t,r){var n,i;for(g(e[0],o),g(e[1],s),g(e[2],s),g(e[3],o),i=255;i>=0;--i)P(e,t,n=r[i/8|0]>>(7&i)&1),U(t,e),U(e,e),P(e,t,n)}function D(e,t){var r=[i(),i(),i(),i()];g(r[0],f),g(r[1],h),g(r[2],s),I(r[3],f,h),L(e,r,t)}var M=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function x(e,t){var r,n,i,a;for(n=63;n>=32;--n){for(r=0,i=n-32,a=n-12;i<a;++i)t[i]+=r-16*t[n]*M[i-(n-32)],r=t[i]+128>>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*M[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*M[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function V(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;x(e,r)}function K(e,t,r,n,a){for(var o=new Uint8Array(64),s=[i(),i(),i(),i()],u=0;u<32;u++)o[u]=n[u];o[0]&=248,o[31]&=127,o[31]|=64,D(s,o),O(o.subarray(32),s);var c,l=128&o[63];return c=a?function(e,t,r,n,a){new Uint8Array(64);var o,s,u=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),f=[i(),i(),i(),i()];for(e[0]=254,o=1;o<32;o++)e[o]=255;for(o=0;o<32;o++)e[32+o]=n[o];for(o=0;o<r;o++)e[64+o]=t[o];for(o=0;o<64;o++)e[r+64+o]=a[o];for(k(c,e,r+128),V(c),D(f,c),O(e,f),o=0;o<32;o++)e[o+32]=n[32+o];for(k(u,e,r+64),V(u),o=0;o<64;o++)e[r+64+o]=0;for(o=0;o<64;o++)l[o]=0;for(o=0;o<32;o++)l[o]=c[o];for(o=0;o<32;o++)for(s=0;s<32;s++)l[o+s]+=u[o]*n[s];return x(e.subarray(32,r+64),l),r+64}(e,t,r,o,a):function(e,t,r,n){new Uint8Array(64);var a,o,s=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),l=[i(),i(),i(),i()];for(a=0;a<r;a++)e[64+a]=t[a];for(a=0;a<32;a++)e[32+a]=n[a];for(k(u,e.subarray(32),r+32),V(u),D(l,u),O(e,l),a=0;a<32;a++)e[a+32]=n[32+a];for(k(s,e,r+64),V(s),a=0;a<64;a++)c[a]=0;for(a=0;a<32;a++)c[a]=u[a];for(a=0;a<32;a++)for(o=0;o<32;o++)c[a+o]+=s[a]*n[o];return x(e.subarray(32),c),r+64}(e,t,r,o),e[63]|=l,c}function j(e,t){var r=i(),n=i(),a=i(),u=i(),l=i(),f=i(),h=i();return g(e[2],s),C(e[1],t),w(a,e[1]),I(u,a,c),A(a,a,e[2]),T(u,e[2],u),w(l,u),w(f,l),I(h,f,l),I(r,h,a),I(r,r,u),function(e,t){var r,n=i();for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)w(n,n),1!==r&&I(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(r,r),I(r,r,a),I(r,r,u),I(r,r,u),I(e[0],r,u),w(n,e[0]),I(n,n,u),E(n,a)&&I(e[0],e[0],p),w(n,e[0]),I(n,n,u),E(n,a)?-1:(S(e[0])===t[31]>>7&&A(e[0],o,e[0]),I(e[3],e[0],e[1]),0)}function F(e,t,r,n){var a=function(e){var t=new Uint8Array(32),r=i(),n=i(),a=i();return C(r,e),T(n,r,s),A(a,r,s),B(n,n),I(n,n,a),b(t,n),t}(n);return a[31]|=128&t[63],t[63]&=127,function(e,t,r,n){var a,o=new Uint8Array(32),s=new Uint8Array(64),u=[i(),i(),i(),i()],c=[i(),i(),i(),i()];if(-1,r<64)return-1;if(j(c,n))return-1;for(a=0;a<r;a++)e[a]=t[a];for(a=0;a<32;a++)e[a+32]=n[a];if(k(s,e,r),V(s),L(u,c,s),D(c,t.subarray(32)),U(u,c),O(o,u),r-=64,y(t,0,o,0)){for(a=0;a<r;a++)e[a]=0;return-1}for(a=0;a<r;a++)e[a]=t[a+64];return r}(e,t,r,a)}function q(){for(var e,t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(t=0;t<arguments.length;t++)if("[object Uint8Array]"!==(e=Object.prototype.toString.call(arguments[t])))throw new TypeError("unexpected type "+e+", use Uint8Array")}n.sharedKey=function(e,t){if(q(t,e),32!==t.length)throw new Error("wrong public key length");if(32!==e.length)throw new Error("wrong secret key length");var r=new Uint8Array(32);return _(r,e,t),r},n.signMessage=function(e,t,r){if(q(t,e),32!==e.length)throw new Error("wrong secret key length");if(r){if(q(r),64!==r.length)throw new Error("wrong random data length");var n=new Uint8Array(128+t.length);return K(n,t,t.length,e,r),new Uint8Array(n.subarray(0,64+t.length))}var i=new Uint8Array(64+t.length);return K(i,t,t.length,e),i},n.openMessage=function(e,t){if(q(t,e),32!==e.length)throw new Error("wrong public key length");var r=new Uint8Array(t.length),n=F(r,t,t.length,e);if(n<0)return null;for(var i=new Uint8Array(n),a=0;a<i.length;a++)i[a]=r[a];return i},n.sign=function(e,t,r){if(q(e,t),32!==e.length)throw new Error("wrong secret key length");if(r&&(q(r),64!==r.length))throw new Error("wrong random data length");var n=new Uint8Array((r?128:64)+t.length);K(n,t,t.length,e,r);for(var i=new Uint8Array(64),a=0;a<i.length;a++)i[a]=n[a];return i},n.verify=function(e,t,r){if(q(t,r,e),64!==r.length)throw new Error("wrong signature length");if(32!==e.length)throw new Error("wrong public key length");var n,i=new Uint8Array(64+t.length),a=new Uint8Array(64+t.length);for(n=0;n<64;n++)i[n]=r[n];for(n=0;n<t.length;n++)i[n+64]=t[n];return F(a,i,i.length,e)>=0},n.generateKeyPair=function(e){if(q(e),32!==e.length)throw new Error("wrong seed length");for(var t=new Uint8Array(32),r=new Uint8Array(32),n=0;n<32;n++)t[n]=e[n];return _(r,t,a),t[0]&=248,t[31]&=127,t[31]|=64,r[31]&=127,{public:r,private:t}},t.default=n},function(e,t,r){var n=r(0);if(r(9),r(43),r(10),r(74),r(75),r(7),r(1),void 0===i)var i=n.jsbn.BigInteger;var a=n.util.isNodejs?r(25):null,o=n.asn1,s=n.util;n.pki=n.pki||{},e.exports=n.pki.rsa=n.rsa=n.rsa||{};var u=n.pki,c=[6,4,2,4,2,4,6,2],l={name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},f={name:"RSAPrivateKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},h={name:"RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},p=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},d=function(e){var t;if(!(e.algorithm in u.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}t=u.oids[e.algorithm];var n=o.oidToDer(t).getBytes(),i=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]),a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]);a.value.push(o.create(o.Class.UNIVERSAL,o.Type.OID,!1,n)),a.value.push(o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,""));var s=o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(a),i.value.push(s),o.toDer(i).getBytes()},y=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);var a;t.dP||(t.dP=t.d.mod(t.p.subtract(i.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(i.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{a=new i(n.util.bytesToHex(n.random.getBytes(t.n.bitLength()/8)),16)}while(a.compareTo(t.n)>=0||!a.gcd(t.n).equals(i.ONE));for(var o=(e=e.multiply(a.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),s=e.mod(t.q).modPow(t.dQ,t.q);o.compareTo(s)<0;)o=o.add(t.p);var u=o.subtract(s).multiply(t.qInv).mod(t.p).multiply(t.q).add(s);return u=u.multiply(a.modInverse(t.n)).mod(t.n)};function g(e,t,r){var i=n.util.createBuffer(),a=Math.ceil(t.n.bitLength()/8);if(e.length>a-11){var o=new Error("Message is too long for PKCS#1 v1.5 padding.");throw o.length=e.length,o.max=a-11,o}i.putByte(0),i.putByte(r);var s,u=a-3-e.length;if(0===r||1===r){s=0===r?0:255;for(var c=0;c<u;++c)i.putByte(s)}else for(;u>0;){var l=0,f=n.random.getBytes(u);for(c=0;c<u;++c)0===(s=f.charCodeAt(c))?++l:i.putByte(s);u=l}return i.putByte(0),i.putBytes(e),i}function m(e,t,r,i){var a=Math.ceil(t.n.bitLength()/8),o=n.util.createBuffer(e),s=o.getByte(),u=o.getByte();if(0!==s||r&&0!==u&&1!==u||!r&&2!=u||r&&0===u&&void 0===i)throw new Error("Encryption block is invalid.");var c=0;if(0===u){c=a-3-i;for(var l=0;l<c;++l)if(0!==o.getByte())throw new Error("Encryption block is invalid.")}else if(1===u)for(c=0;o.length()>1;){if(255!==o.getByte()){--o.read;break}++c}else if(2===u)for(c=0;o.length()>1;){if(0===o.getByte()){--o.read;break}++c}if(0!==o.getByte()||c!==a-3-o.length())throw new Error("Encryption block is invalid.");return o.getBytes()}function v(e,t,r){"function"==typeof t&&(r=t,t={});var a={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};function o(){s(e.pBits,(function(t,n){return t?r(t):(e.p=n,null!==e.q?c(t,e.q):void s(e.qBits,c))}))}function s(e,t){n.prime.generateProbablePrime(e,a,t)}function c(t,n){if(t)return r(t);if(e.q=n,e.p.compareTo(e.q)<0){var a=e.p;e.p=e.q,e.q=a}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void o();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void s(e.qBits,c);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void o();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void s(e.qBits,c);var l=e.e.modInverse(e.phi);e.keys={privateKey:u.rsa.setPrivateKey(e.n,e.e,l,e.p,e.q,l.mod(e.p1),l.mod(e.q1),e.q.modInverse(e.p)),publicKey:u.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}"prng"in t&&(a.prng=t.prng),o()}function b(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=n.util.hexToBytes(t);return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function E(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function S(e){return n.util.isNodejs&&"function"==typeof a[e]}function C(e){return void 0!==s.globalScope&&"object"==typeof s.globalScope.crypto&&"object"==typeof s.globalScope.crypto.subtle&&"function"==typeof s.globalScope.crypto.subtle[e]}function T(e){return void 0!==s.globalScope&&"object"==typeof s.globalScope.msCrypto&&"object"==typeof s.globalScope.msCrypto.subtle&&"function"==typeof s.globalScope.msCrypto.subtle[e]}function A(e){for(var t=n.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}u.rsa.encrypt=function(e,t,r){var a,o=r,s=Math.ceil(t.n.bitLength()/8);!1!==r&&!0!==r?(o=2===r,a=g(e,t,r)):(a=n.util.createBuffer()).putBytes(e);for(var u=new i(a.toHex(),16),c=y(u,t,o).toString(16),l=n.util.createBuffer(),f=s-Math.ceil(c.length/2);f>0;)l.putByte(0),--f;return l.putBytes(n.util.hexToBytes(c)),l.getBytes()},u.rsa.decrypt=function(e,t,r,a){var o=Math.ceil(t.n.bitLength()/8);if(e.length!==o){var s=new Error("Encrypted message length is invalid.");throw s.length=e.length,s.expected=o,s}var u=new i(n.util.createBuffer(e).toHex(),16);if(u.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var c=y(u,t,r).toString(16),l=n.util.createBuffer(),f=o-Math.ceil(c.length/2);f>0;)l.putByte(0),--f;return l.putBytes(n.util.hexToBytes(c)),!1!==a?m(l.getBytes(),t,r):l.getBytes()},u.rsa.createKeyPairGenerationState=function(e,t,r){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048;var a,o=(r=r||{}).prng||n.random,s={nextBytes:function(e){for(var t=o.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}},u=r.algorithm||"PRIMEINC";if("PRIMEINC"!==u)throw new Error("Invalid key generation algorithm: "+u);return(a={algorithm:u,state:0,bits:e,rng:s,eInt:t||65537,e:new i(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(a.eInt),a},u.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,a=0,o=function(e,t){return e|t},s=+new Date,l=0;null===e.keys&&(t<=0||l<t);){if(0===e.state){var f=null===e.p?e.pBits:e.qBits,h=f-1;0===e.pqState?(e.num=new i(f,e.rng),e.num.testBit(h)||e.num.bitwiseTo(i.ONE.shiftLeft(h),o,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),a=0,++e.pqState):1===e.pqState?e.num.bitLength()>f?e.pqState=0:e.num.isProbablePrime(E(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(c[a++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var p=e.e.modInverse(e.phi);e.keys={privateKey:u.rsa.setPrivateKey(e.n,e.e,p,e.p,e.q,p.mod(e.p1),p.mod(e.q1),e.q.modInverse(e.p)),publicKey:u.rsa.setPublicKey(e.n,e.e)}}l+=(n=+new Date)-s,s=n}return null!==e.keys},u.rsa.generateKeyPair=function(e,t,r,i){if(1===arguments.length?"object"==typeof e?(r=e,e=void 0):"function"==typeof e&&(i=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(i=t,t=void 0):"number"!=typeof t&&(r=t,t=void 0):(r=e,i=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof r&&(i=r,r=void 0):(i=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!n.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(65537===t||3===t))if(i){if(S("generateKeyPair"))return a.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(e,t,r){if(e)return i(e);i(null,{privateKey:u.privateKeyFromPem(r),publicKey:u.publicKeyFromPem(t)})}));if(C("generateKey")&&C("exportKey"))return s.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:A(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(e){return s.globalScope.crypto.subtle.exportKey("pkcs8",e.privateKey)})).then(void 0,(function(e){i(e)})).then((function(e){if(e){var t=u.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(e)));i(null,{privateKey:t,publicKey:u.setRsaPublicKey(t.n,t.e)})}}));if(T("generateKey")&&T("exportKey")){var c=s.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:A(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return c.oncomplete=function(e){var t=e.target.result,r=s.globalScope.msCrypto.subtle.exportKey("pkcs8",t.privateKey);r.oncomplete=function(e){var t=e.target.result,r=u.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(t)));i(null,{privateKey:r,publicKey:u.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){i(e)}},void(c.onerror=function(e){i(e)})}}else if(S("generateKeyPairSync")){var l=a.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:u.privateKeyFromPem(l.privateKey),publicKey:u.publicKeyFromPem(l.publicKey)}}var f=u.rsa.createKeyPairGenerationState(e,t,r);if(!i)return u.rsa.stepKeyPairGenerationState(f,0),f.keys;v(f,r,i)},u.setRsaPublicKey=u.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,i){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return g(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return n.pkcs1.encode_rsa_oaep(t,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var a=t.encode(e,r,!0);return u.rsa.encrypt(a,r,!0)},verify:function(e,t,n){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===n?n={verify:function(e,t){return t=m(t,r,!0),e===o.fromDer(t).value[1].value}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(e,t){return e===(t=m(t,r,!0))}});var i=u.rsa.decrypt(t,r,!0,!1);return n.verify(e,i,r.n.bitLength())}};return r},u.setRsaPrivateKey=u.rsa.setPrivateKey=function(e,t,r,i,a,o,s,c){var l={n:e,e:t,d:r,p:i,q:a,dP:o,dQ:s,qInv:c,decrypt:function(e,t,r){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var i=u.rsa.decrypt(e,l,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:m};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return n.pkcs1.decode_rsa_oaep(t,e,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(i,l,!1)},sign:function(e,t){var r=!1;"string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:d},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1);var n=t.encode(e,l.n.bitLength());return u.rsa.encrypt(n,l,r)}};return l},u.wrapRsaPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(u.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,o.toDer(e).getBytes())])},u.privateKeyFromAsn1=function(e){var t,r,a,s,c,h,p,d,y={},g=[];if(o.validate(e,l,y,g)&&(e=o.fromDer(n.util.createBuffer(y.privateKey))),y={},g=[],!o.validate(e,f,y,g)){var m=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw m.errors=g,m}return t=n.util.createBuffer(y.privateKeyModulus).toHex(),r=n.util.createBuffer(y.privateKeyPublicExponent).toHex(),a=n.util.createBuffer(y.privateKeyPrivateExponent).toHex(),s=n.util.createBuffer(y.privateKeyPrime1).toHex(),c=n.util.createBuffer(y.privateKeyPrime2).toHex(),h=n.util.createBuffer(y.privateKeyExponent1).toHex(),p=n.util.createBuffer(y.privateKeyExponent2).toHex(),d=n.util.createBuffer(y.privateKeyCoefficient).toHex(),u.setRsaPrivateKey(new i(t,16),new i(r,16),new i(a,16),new i(s,16),new i(c,16),new i(h,16),new i(p,16),new i(d,16))},u.privateKeyToAsn1=u.privateKeyToRSAPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.e)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.d)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.p)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.q)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.dP)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.dQ)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.qInv))])},u.publicKeyFromAsn1=function(e){var t={},r=[];if(o.validate(e,p,t,r)){var a,s=o.derToOid(t.publicKeyOid);if(s!==u.oids.rsaEncryption)throw(a=new Error("Cannot read public key. Unknown OID.")).oid=s,a;e=t.rsaPublicKey}if(r=[],!o.validate(e,h,t,r))throw(a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,a;var c=n.util.createBuffer(t.publicKeyModulus).toHex(),l=n.util.createBuffer(t.publicKeyExponent).toHex();return u.setRsaPublicKey(new i(c,16),new i(l,16))},u.publicKeyToAsn1=u.publicKeyToSubjectPublicKeyInfo=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(u.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,[u.publicKeyToRSAPublicKey(e)])])},u.publicKeyToRSAPublicKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.e))])}},function(e,t,r){var n=r(0);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.aes.Algorithm(e,t)}))}r(24),r(34),r(1),e.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(e,t,r,n){var i=d({key:e,output:r,decrypt:!1,mode:n});return i.start(t),i},n.aes.createEncryptionCipher=function(e,t){return d({key:e,output:null,decrypt:!1,mode:t})},n.aes.startDecrypting=function(e,t,r,n){var i=d({key:e,output:r,decrypt:!0,mode:n});return i.start(t),i},n.aes.createDecryptionCipher=function(e,t){return d({key:e,output:null,decrypt:!0,mode:t})},n.aes.Algorithm=function(e,t){l||f();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return p(r._w,e,t,!1)},decrypt:function(e,t){return p(r._w,e,t,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,r=e.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){t=r,r=n.util.createBuffer();for(var i=0;i<t.length;++i)r.putByte(t[i])}}else r=n.util.createBuffer(r);if(!n.util.isArray(r)){t=r,r=[];var a=t.length();if(16===a||24===a||32===a){a>>>=2;for(i=0;i<a;++i)r.push(t.getInt32())}}if(!n.util.isArray(r)||4!==r.length&&6!==r.length&&8!==r.length)throw new Error("Invalid key parameter.");var o=this.mode.name,s=-1!==["CFB","OFB","CTR","GCM"].indexOf(o);this._w=h(r,e.decrypt&&!s),this._init=!0}},n.aes._expandKey=function(e,t){return l||f(),h(e,t)},n.aes._updateBlock=p,i("AES-ECB",n.cipher.modes.ecb),i("AES-CBC",n.cipher.modes.cbc),i("AES-CFB",n.cipher.modes.cfb),i("AES-OFB",n.cipher.modes.ofb),i("AES-CTR",n.cipher.modes.ctr),i("AES-GCM",n.cipher.modes.gcm);var a,o,s,u,c,l=!1;function f(){l=!0,s=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;a=new Array(256),o=new Array(256),u=new Array(4),c=new Array(4);for(t=0;t<4;++t)u[t]=new Array(256),c[t]=new Array(256);var r,n,i,f,h,p,d,y=0,g=0;for(t=0;t<256;++t){f=(f=g^g<<1^g<<2^g<<3^g<<4)>>8^255&f^99,a[y]=f,o[f]=y,p=(h=e[f])<<24^f<<16^f<<8^f^h,d=((r=e[y])^(n=e[r])^(i=e[n]))<<24^(y^i)<<16^(y^n^i)<<8^y^r^i;for(var m=0;m<4;++m)u[m][y]=p,c[m][f]=d,p=p<<24|p>>>8,d=d<<24|d>>>8;0===y?y=g=1:(y=r^e[e[e[r^i]]],g^=e[e[g]])}}function h(e,t){for(var r,n=e.slice(0),i=1,o=n.length,u=4*(o+6+1),l=o;l<u;++l)r=n[l-1],l%o==0?(r=a[r>>>16&255]<<24^a[r>>>8&255]<<16^a[255&r]<<8^a[r>>>24]^s[i]<<24,i++):o>6&&l%o==4&&(r=a[r>>>24]<<24^a[r>>>16&255]<<16^a[r>>>8&255]<<8^a[255&r]),n[l]=n[l-o]^r;if(t){for(var f,h=c[0],p=c[1],d=c[2],y=c[3],g=n.slice(0),m=(l=0,(u=n.length)-4);l<u;l+=4,m-=4)if(0===l||l===u-4)g[l]=n[m],g[l+1]=n[m+3],g[l+2]=n[m+2],g[l+3]=n[m+1];else for(var v=0;v<4;++v)f=n[m+v],g[l+(3&-v)]=h[a[f>>>24]]^p[a[f>>>16&255]]^d[a[f>>>8&255]]^y[a[255&f]];n=g}return n}function p(e,t,r,n){var i,s,l,f,h,p,d,y,g,m,v,b,E=e.length/4-1;n?(i=c[0],s=c[1],l=c[2],f=c[3],h=o):(i=u[0],s=u[1],l=u[2],f=u[3],h=a),p=t[0]^e[0],d=t[n?3:1]^e[1],y=t[2]^e[2],g=t[n?1:3]^e[3];for(var S=3,C=1;C<E;++C)m=i[p>>>24]^s[d>>>16&255]^l[y>>>8&255]^f[255&g]^e[++S],v=i[d>>>24]^s[y>>>16&255]^l[g>>>8&255]^f[255&p]^e[++S],b=i[y>>>24]^s[g>>>16&255]^l[p>>>8&255]^f[255&d]^e[++S],g=i[g>>>24]^s[p>>>16&255]^l[d>>>8&255]^f[255&y]^e[++S],p=m,d=v,y=b;r[0]=h[p>>>24]<<24^h[d>>>16&255]<<16^h[y>>>8&255]<<8^h[255&g]^e[++S],r[n?3:1]=h[d>>>24]<<24^h[y>>>16&255]<<16^h[g>>>8&255]<<8^h[255&p]^e[++S],r[2]=h[y>>>24]<<24^h[g>>>16&255]<<16^h[p>>>8&255]<<8^h[255&d]^e[++S],r[n?1:3]=h[g>>>24]<<24^h[p>>>16&255]<<16^h[d>>>8&255]<<8^h[255&y]^e[++S]}function d(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var a=null;r instanceof n.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=e,i.call(t,r)},t}},function(e,t,r){var n=r(0);r(1),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null};var i=n.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};i.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},i.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},function(e,t){},function(e,t,r){var n=r(0);r(4),r(1),(e.exports=n.hmac=n.hmac||{}).create=function(){var e=null,t=null,r=null,i=null,a={start:function(a,o){if(null!==a)if("string"==typeof a){if(!((a=a.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+a+'"');t=n.md.algorithms[a].create()}else t=a;if(null===o)o=e;else{if("string"==typeof o)o=n.util.createBuffer(o);else if(n.util.isArray(o)){var s=o;o=n.util.createBuffer();for(var u=0;u<s.length;++u)o.putByte(s[u])}var c=o.length();c>t.blockLength&&(t.start(),t.update(o.bytes()),o=t.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),c=o.length();for(u=0;u<c;++u){s=o.at(u);r.putByte(54^s),i.putByte(92^s)}if(c<t.blockLength)for(s=t.blockLength-c,u=0;u<s;++u)r.putByte(54),i.putByte(92);e=o,r=r.bytes(),i=i.bytes()}t.start(),t.update(r)},update:function(e){t.update(e)},getMac:function(){var e=t.digest().bytes();return t.start(),t.update(i),t.update(e),t.digest()}};return a.digest=a.getMac,a}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(15),a=r(38),o=r(8),s=r(6),u=r(14),c=r(28),l=n(r(21));t.seedWithNonce=function(e,t){return{seed:a.Seed.toBinary(e).seed,nonce:t}},t.buildAddress=function(e,t){void 0===t&&(t=i.MAIN_NET_CHAIN_ID);var r=[1,"string"==typeof t?t.charCodeAt(0):t],n=o._hashChain(e).slice(0,20),a=u.concat(r,n),s=o._hashChain(a).slice(0,4);return u.concat(a,s)};t.keyPair=function(e){var t=a.Seed.toBinary(e),r=function(e,t){var r=[0,0,0,0];if(t&&t>0)for(var n=t,i=3;i>=0;i--)r[3-i]=Math.floor(n/Math.pow(2,8*i)),n%=Math.pow(2,8*i);var a=u.concat(r,e),s=o._hashChain(a);return o.sha256(s)}(t.seed,t.nonce),n=l.default.generateKeyPair(r);return{privateKey:n.private,publicKey:n.public}},t.address=function(e,r){return void 0===r&&(r=i.MAIN_NET_CHAIN_ID),c.isPublicKey(e)?t.buildAddress(s._fromIn(e.publicKey),r):t.address(t.keyPair(e),r)},t.publicKey=function(e){return c.isPrivateKey(e)?l.default.generateKeyPair(s._fromIn(e.privateKey)).public:t.keyPair(e).publicKey},t.privateKey=function(e){return t.keyPair(e).privateKey}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPublicKey=function(e){return void 0!==e.publicKey},t.isPrivateKey=function(e){return void 0!==e.privateKey}},function(e,t,r){var n=r(0);r(1);var i=e.exports=n.pem=n.pem||{};function a(e){for(var t=e.name+": ",r=[],n=function(e,t){return" "+t},i=0;i<e.values.length;++i)r.push(e.values[i].replace(/^(\S+\r\n)/,n));t+=r.join(",")+"\r\n";var a=0,o=-1;for(i=0;i<t.length;++i,++a)if(a>65&&-1!==o){var s=t[o];","===s?(++o,t=t.substr(0,o)+"\r\n "+t.substr(o)):t=t.substr(0,o)+"\r\n"+s+t.substr(o+1),a=i-o-1,o=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(o=i);return t}function o(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{};var r,i="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(i+=a(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=a(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=a(r)),e.headers)for(var o=0;o<e.headers.length;++o)i+=a(e.headers[o]);return e.procType&&(i+="\r\n"),i+=n.util.encode64(e.body,t.maxline||64)+"\r\n",i+="-----END "+e.type+"-----\r\n"},i.decode=function(e){for(var t,r=[],i=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,a=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,s=/\r?\n/;t=i.exec(e);){var u={type:t[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:n.util.decode64(t[3])};if(r.push(u),t[2]){for(var c=t[2].split(s),l=0;t&&l<c.length;){for(var f=c[l].replace(/\s+$/,""),h=l+1;h<c.length;++h){var p=c[h];if(!/\s/.test(p[0]))break;f+=p,l=h}if(t=f.match(a)){for(var d={name:t[1],values:[]},y=t[2].split(","),g=0;g<y.length;++g)d.values.push(o(y[g]));if(u.procType)if(u.contentDomain||"Content-Domain"!==d.name)if(u.dekInfo||"DEK-Info"!==d.name)u.headers.push(d);else{if(0===d.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');u.dekInfo={algorithm:y[0],parameters:y[1]||null}}else u.contentDomain=y[0]||"";else{if("Proc-Type"!==d.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==d.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');u.procType={version:y[0],type:y[1]}}}++l}if("ENCRYPTED"===u.procType&&!u.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(0===r.length)throw new Error("Invalid PEM formatted message.");return r}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchHeightByTimestamp=t.fetchHeight=t.fetchDelay=t.fetchLast=t.fetchBlocksByAddress=t.fetchFirst=t.fetchBlockById=t.fetchSeq=t.fetchBlockAt=t.fetchHeadersById=t.fetchHeadersAt=t.fetchHeightById=t.fetchHeadersLast=t.fetchHeadersSeq=void 0;var i=n(r(2));t.fetchHeadersSeq=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),i.default({base:e,url:"/blocks/headers/seq/"+t+"/"+r,options:n})},t.fetchHeadersLast=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/blocks/headers/last",options:t})},t.fetchHeightById=function(e,t){return i.default({base:e,url:"/blocks/height/"+t})},t.fetchHeadersAt=function(e,t,r){return void 0===r&&(r=Object.create(null)),i.default({base:e,url:"/blocks/headers/at/"+t,options:r})},t.fetchHeadersById=function(e,t,r){return void 0===r&&(r=Object.create(null)),i.default({base:e,url:"/blocks/headers/"+t,options:r})},t.fetchBlockAt=function(e,t,r){return void 0===r&&(r=Object.create(null)),i.default({base:e,url:"/blocks/at/"+t,options:r})},t.fetchSeq=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),i.default({base:e,url:"/blocks/seq/"+t+"/"+r,options:n})},t.fetchBlockById=function(e,t,r){return void 0===r&&(r=Object.create(null)),i.default({base:e,url:"/blocks/"+t,options:r})},t.fetchFirst=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/blocks/first",options:t})},t.fetchBlocksByAddress=function(e,t,r,n,a){return void 0===a&&(a=Object.create(null)),i.default({base:e,url:"/blocks/address/"+t+"/"+r+"/"+n,options:a})},t.fetchLast=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/blocks/last",options:t})},t.fetchDelay=function(e,t,r){return i.default({base:e,url:"/blocks/delay/"+t+"/"+r})},t.fetchHeight=function(e){return i.default({base:e,url:"/blocks/height"})},t.fetchHeightByTimestamp=function(e,t,r){return void 0===r&&(r=Object.create(null)),i.default({base:e,url:"/blocks/heightByTimestamp/"+t,options:r})}},function(e,t,r){"use strict";t.__esModule=!0,t.TRANSACTION_STATUSES=t.NAME_MAP=t.TYPE_MAP=void 0,t.TYPE_MAP={3:"issue",4:"transfer",5:"reissue",6:"burn",7:"exchange",8:"lease",9:"cancelLease",10:"alias",11:"massTransfer",12:"data",13:"setScript",14:"sponsorship",15:"setAssetScript",16:"invoke",17:"updateAsset"},t.NAME_MAP={issue:3,transfer:4,reissue:5,burn:6,exchange:7,lease:8,cancelLease:9,alias:10,massTransfer:11,data:12,setScript:13,sponsorship:14,setAssetScript:15,invoke:16,updateAsset:17},t.TRANSACTION_STATUSES={IN_BLOCKCHAIN:"in_blockchain",UNCONFIRMED:"unconfirmed",NOT_FOUND:"not_found"}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.convertEthAssetId=t.fetchBalanceAddressAssetId=t.fetchAssetsBalance=t.fetchAssetsNft=t.fetchAssetsAddressLimit=t.fetchAssetDistribution=t.fetchAssetsDetails=t.fetchDetails=void 0;var s=r(51),u=o(r(2)),c=r(3),l=o(r(11));function f(e,t,r){void 0===r&&(r=Object.create(null));var i=JSON.stringify({ids:t}),a=n(n({},r),{body:i,headers:{"content-type":"application/json"},method:"POST"});return u.default({base:e,url:"/assets/details",options:a})}t.fetchDetails=function(e,t,r){void 0===r&&(r=Object.create(null));var n=!Array.isArray(t);return Promise.all(c.toArray(t).map((function(t){return u.default({base:e,url:"/assets/details/"+t,options:r})}))).then((function(e){return n?e[0]:e}))},t.fetchAssetsDetails=f,t.fetchAssetDistribution=function(e,t,r,n,i){return void 0===i&&(i=Object.create(null)),u.default({base:e,url:"/assets/"+t+"/distribution/"+r+"/limit/"+n,options:i})},t.fetchAssetsAddressLimit=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"assets/nft/"+t+"/limit/"+r,options:n})},t.fetchAssetsNft=function(e,t,r){var n=t.address,i=t.limit,a=t.after;void 0===r&&(r=Object.create(null));var o=new URL("assets/nft/"+n+"/limit/"+i,e);return a&&o.searchParams.append("after",a),u.default({base:e,url:""+o.pathname+o.search,options:r})},t.fetchAssetsBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),i(this,void 0,void 0,(function(){var n,i,o;return a(this,(function(a){switch(a.label){case 0:return[4,u.default({base:e,url:"/assets/balance/"+t,options:r})];case 1:return n=a.sent(),i=n.balances.reduce((function(e,t,r){return t.issueTransaction||(e[t.assetId]=r),e}),{}),(o=Object.keys(i)).length?[4,f(e,o,r)]:[3,3];case 2:a.sent().forEach((function(e){if(!("error"in e)){var t=i[e.assetId],r=n.balances[t];r&&(r.issueTransaction={id:e.originTransactionId,name:e.name,decimals:e.decimals,description:e.description,quantity:e.quantity,reissuable:e.reissuable,sender:e.issuer,senderPublicKey:e.issuerPublicKey,timestamp:e.issueTimestamp,height:e.issueHeight,script:e.scripted?"-":null,proofs:[],fee:Math.pow(10,8),feeAssetId:null,version:3,type:s.TRANSACTION_TYPE.ISSUE,chainId:0})}})),a.label=3;case 3:return[2,n]}}))}))},t.fetchBalanceAddressAssetId=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/assets/balance/"+t+"/"+r,options:n})},t.convertEthAssetId=function(e,t){return u.default({base:e,url:"/eth/assets"+l.default({id:t})}).then((function(e){return e[0].assetId}))}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0});var o=r(18),s=r(37),u=r(20),c=r(5),l=r(14),f=r(8),h=r(27),p=r(69),d=r(70),y=r(71),g=r(82),m=r(83);t.crypto=function(e){if(e&&""==e.seed)throw new Error("Empty seed is not allowed.");var t,r=function(e,t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.apply(void 0,a([t],r))}},i=function(t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(void 0,a(r));return!e||e&&"Base58"===e.output?u.base58Encode(i):i}},v=e&&e.seed?e.seed:void 0,b={seedWithNonce:v?r(h.seedWithNonce,v):h.seedWithNonce,signBytes:i(v?r(p.signBytes,v):p.signBytes),keyPair:(t=v?r(h.keyPair,v):h.keyPair,function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(void 0,a(r));return!e||e&&"Base58"===e.output?{privateKey:u.base58Encode(i.privateKey),publicKey:u.base58Encode(i.publicKey)}:i}),publicKey:i(v?r(h.publicKey,v):h.publicKey),privateKey:i(v?r(h.privateKey,v):h.privateKey),address:i(v?r(h.address,v):h.address)};return n({},b,{sharedKey:i(s.sharedKey),buildAddress:h.buildAddress,blake2b:f.blake2b,keccak:f.keccak,sha256:f.sha256,base64Encode:u.base64Encode,base64Decode:u.base64Decode,base58Encode:u.base58Encode,base58Decode:u.base58Decode,base16Encode:u.base16Encode,base16Decode:u.base16Decode,stringToBytes:c.stringToBytes,bytesToString:c.bytesToString,random:o.random,randomSeed:o.randomSeed,randomBytes:o.randomBytes,verifySignature:d.verifySignature,verifyPublicKey:d.verifyPublicKey,verifyAddress:d.verifyAddress,messageDecrypt:s.messageDecrypt,messageEncrypt:s.messageEncrypt,aesDecrypt:s.aesDecrypt,aesEncrypt:s.aesEncrypt,encryptSeed:g.encryptSeed,decryptSeed:g.decryptSeed,rsaKeyPair:y.rsaKeyPair,rsaKeyPairSync:y.rsaKeyPairSync,rsaSign:y.rsaSign,rsaVerify:y.rsaVerify,merkleVerify:m.merkleVerify,split:l.split,concat:l.concat})}},function(e,t,r){var n=r(0);r(1),n.cipher=n.cipher||{};var i=e.exports=n.cipher.modes=n.cipher.modes||{};function a(e){if("string"==typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var t=e;e=n.util.createBuffer();for(var r=0;r<t.length;++r)e.putByte(t[r])}return n.util.isArray(e)||(e=[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]),e}function o(e){e[e.length-1]=e[e.length-1]+1&4294967295}function s(e){return[e/4294967296|0,4294967295&e]}i.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.ecb.prototype.start=function(e){},i.ecb.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},i.ecb.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},i.ecb.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},i.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=a(e.iv),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]);this._prev=this._outBlock},i.cbc.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)},i.cbc.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},i.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=a(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32()^this._outBlock[i],t.putInt32(this._inBlock[i]);else{var a=(this.blockSize-n)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32()^this._outBlock[i],this._partialOutput.putInt32(this._partialBlock[i]);if(a>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32(),t.putInt32(this._inBlock[i]^this._outBlock[i]);else{var a=(this.blockSize-n)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[i]^this._outBlock[i]);if(a>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=a(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]),this._inBlock[i]=this._outBlock[i];else{var a=(this.blockSize-n)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(a>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._outBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=a(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]);else{var a=(this.blockSize-n)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(a>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}o(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,r=n.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(s(8*i)))}this._inBlock=this._j0.slice(0),o(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=s(8*t.length());var a=t.length()%this.blockSize;for(a&&t.fillWithByte(0,this.blockSize-a),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^=e.getInt32());this._cipherLength+=this.blockSize}else{var a=(this.blockSize-n)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(a<=0||r){if(r){var s=n%this.blockSize;this._cipherLength+=s,this._partialOutput.truncate(this.blockSize-s)}else this._cipherLength+=this.blockSize;for(i=0;i<this._ints;++i)this._outBlock[i]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),o(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n<this.blockSize&&!(r&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),o(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^this._hashBlock[i]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize},i.gcm.prototype.afterFinish=function(e,t){var r=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=n.util.createBuffer();var i=this._aDataLength.concat(s(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,i);var a=[];this.cipher.encrypt(this._j0,a);for(var o=0;o<this._ints;++o)this.tag.putInt32(this._s[o]^a[o]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r},i.gcm.prototype.multiply=function(e,t){for(var r=[0,0,0,0],n=t.slice(0),i=0;i<128;++i){e[i/32|0]&1<<31-i%32&&(r[0]^=n[0],r[1]^=n[1],r[2]^=n[2],r[3]^=n[3]),this.pow(n,n)}return r},i.gcm.prototype.pow=function(e,t){for(var r=1&e[3],n=3;n>0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)},i.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,a=new Array(i),o=0;o<i;++o){var s=[0,0,0,0],u=(n-1-o%n)*t;s[o/n|0]=1<<t-1<<u,a[o]=this.generateSubHashTable(this.multiply(s,e),t)}return a},i.gcm.prototype.generateSubHashTable=function(e,t){var r=1<<t,n=r>>>1,i=new Array(r);i[n]=e.slice(0);for(var a=n>>>1;a>0;)this.pow(i[2*a],i[a]=[]),a>>=1;for(a=2;a<n;){for(var o=1;o<a;++o){var s=i[a],u=i[o];i[a+o]=[s[0]^u[0],s[1]^u[1],s[2]^u[2],s[3]^u[3]]}a*=2}for(i[0]=[0,0,0,0],a=n+1;a<r;++a){var c=i[a^n];i[a]=[e[0]^c[0],e[1]^c[1],e[2]^c[2],e[3]^c[3]]}return i}},function(e,t,r){var n=r(0);r(4),r(1);var i=e.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=i,i.create=function(){o||(a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],o=!0);var e=null,t=n.util.createBuffer(),r=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,a=0;a<r;++a)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},i}};return i.start(),i.update=function(a,o){"utf8"===o&&(a=n.util.encodeUtf8(a));var s=a.length;i.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=s[1],s[1]=s[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),u(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var o=n.util.createBuffer();o.putBytes(t.bytes());var s,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-c));for(var l=8*i.fullMessageLength[0],f=0;f<i.fullMessageLength.length-1;++f)l+=(s=8*i.fullMessageLength[f+1])/4294967296>>>0,o.putInt32(l>>>0),l=s>>>0;o.putInt32(l);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};u(h,r,o);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p.putInt32(h.h5),p.putInt32(h.h6),p.putInt32(h.h7),p},i};var a=null,o=!1,s=null;function u(e,t,r){for(var n,i,a,o,u,c,l,f,h,p,d,y,g,m=r.length();m>=64;){for(u=0;u<16;++u)t[u]=r.getInt32();for(;u<64;++u)n=((n=t[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=t[u-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[u]=n+t[u-7]+i+t[u-16]|0;for(c=e.h0,l=e.h1,f=e.h2,h=e.h3,p=e.h4,d=e.h5,y=e.h6,g=e.h7,u=0;u<64;++u)a=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),o=c&l|f&(c^l),n=g+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(y^p&(d^y))+s[u]+t[u],g=y,y=d,d=p,p=h+n>>>0,h=f,f=l,l=c,c=n+(i=a+o)>>>0;e.h0=e.h0+c|0,e.h1=e.h1+l|0,e.h2=e.h2+f|0,e.h3=e.h3+h|0,e.h4=e.h4+p|0,e.h5=e.h5+d|0,e.h6=e.h6+y|0,e.h7=e.h7+g|0,m-=64}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.seedWordsList=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"]},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(r(24)),s=i(r(1)),u=r(18),c=r(6),l=r(8),f=r(14),h=a(r(21)),p=r(5);t.aesEncrypt=function(e,t,r,n){void 0===r&&(r="CBC");var i=o.createCipher("AES-"+r,p.bytesToString(c._fromIn(t),"raw"));return i.start({iv:n&&s.createBuffer(p.bytesToString(c._fromIn(n),"raw"))}),i.update(s.createBuffer(p.bytesToString(e,"raw"))),i.finish(),p.stringToBytes(i.output.getBytes(),"raw")},t.aesDecrypt=function(e,t,r,n){void 0===r&&(r="CBC");var i=o.createDecipher("AES-"+r,p.bytesToString(c._fromIn(t),"raw"));i.start({iv:n&&s.createBuffer(p.bytesToString(c._fromIn(n),"raw"))});var a=s.createBuffer(p.bytesToString(c._fromIn(e),"raw"));if(i.update(a),!i.finish())throw new Error("Failed to decrypt data with provided key");return p.stringToBytes(i.output.getBytes(),"raw")},t.messageEncrypt=function(e,r){var n=Uint8Array.from([1]),i=u.randomBytes(32),a=u.randomBytes(16),o=p.stringToBytes(r),s=t.aesEncrypt(o,i,"CTR",a),c=t.aesEncrypt(i,e,"ECB"),h=l.hmacSHA256(o,i),d=l.hmacSHA256(f.concat(i,a),e);return f.concat(n,c,d,h,a,s)},t.messageDecrypt=function(e,r){var i=n(f.split(r,1,48,32,32,16),6),a=(i[0],i[1]),o=i[2],s=i[3],u=i[4],h=i[5],d=t.aesDecrypt(a,e,"ECB");if(!c._fromIn(l.hmacSHA256(f.concat(d,u),c._fromIn(e))).every((function(e,t){return e===o[t]})))throw new Error("Invalid key");var y=t.aesDecrypt(h,d,"CTR",u);if(!c._fromIn(l.hmacSHA256(y,d)).every((function(e,t){return e===s[t]})))throw new Error("Invalid message");return p.bytesToString(y)},t.sharedKey=function(e,t,r){var n=h.default.sharedKey(c._fromIn(e),c._fromIn(t)),i=l.sha256(c._fromRawIn(r));return l.hmacSHA256(n,i)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6),i=r(5);t.Seed={isSeedWithNonce:function(e){return void 0!==e.nonce},toBinary:function(e){return t.Seed.isSeedWithNonce(e)?{seed:t.Seed.toBinary(e.seed).seed,nonce:e.nonce}:{seed:n._fromRawIn(e),nonce:void 0}},toString:function(e){return i.bytesToString(t.Seed.toBinary(e).seed)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),i=r(15);t.ChaidId={toNumber:function(e){return"string"==typeof e?e.charCodeAt(0):e},isMainnet:function(e){return t.ChaidId.toNumber(e)===n.MAIN_NET_CHAIN_ID},isTestnet:function(e){return t.ChaidId.toNumber(e)===i.TEST_NET_CHAIN_ID}}},function(e,t,r){var n=r(0);if(r(23),r(9),r(41),r(4),r(10),r(42),r(29),r(7),r(73),r(22),r(1),void 0===i)var i=n.jsbn.BigInteger;var a=n.asn1,o=n.pki=n.pki||{};e.exports=o.pbe=n.pbe=n.pbe||{};var s=o.oids,u={name:"EncryptedPrivateKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},c={name:"PBES2Algorithms",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},l={name:"pkcs-12PbeParams",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"iterations"}]};function f(e,t){return e.start().update(t).digest().getBytes()}function h(e){var t;if(e){if(!(t=o.oids[a.derToOid(e)])){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else t="hmacWithSHA1";return p(t)}function p(e){var t=n.md;switch(e){case"hmacWithSHA224":t=n.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}o.encryptPrivateKeyInfo=function(e,t,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var i,u,c,l=n.random.getBytesSync(r.saltSize),f=r.count,h=a.integerToDer(f);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var d,y,g;switch(r.algorithm){case"aes128":i=16,d=16,y=s["aes128-CBC"],g=n.aes.createEncryptionCipher;break;case"aes192":i=24,d=16,y=s["aes192-CBC"],g=n.aes.createEncryptionCipher;break;case"aes256":i=32,d=16,y=s["aes256-CBC"],g=n.aes.createEncryptionCipher;break;case"des":i=8,d=8,y=s.desCBC,g=n.des.createEncryptionCipher;break;default:throw(C=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,C}var m="hmacWith"+r.prfAlgorithm.toUpperCase(),v=p(m),b=n.pkcs5.pbkdf2(t,l,f,i,v),E=n.random.getBytesSync(d);(T=g(b)).start(E),T.update(a.toDer(e)),T.finish(),c=T.output.getBytes();var S=function(e,t,r,i){var s=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,e),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,t.getBytes())]);"hmacWithSHA1"!==i&&s.value.push(a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o.oids[i]).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]));return s}(l,h,i,m);u=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.pkcs5PBES2).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.pkcs5PBKDF2).getBytes()),S]),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(y).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,E)])])])}else{var C;if("3des"!==r.algorithm)throw(C=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,C;i=24;var T,A=new n.util.ByteBuffer(l);b=o.pbe.generatePkcs12Key(t,A,1,f,i),E=o.pbe.generatePkcs12Key(t,A,2,f,i);(T=n.des.createEncryptionCipher(b)).start(E),T.update(a.toDer(e)),T.finish(),c=T.output.getBytes(),u=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,l),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,h.getBytes())])])}return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[u,a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,c)])},o.decryptPrivateKeyInfo=function(e,t){var r=null,i={},s=[];if(!a.validate(e,u,i,s)){var c=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw c.errors=s,c}var l=a.derToOid(i.encryptionOid),f=o.pbe.getCipher(l,i.encryptionParams,t),h=n.util.createBuffer(i.encryptedData);return f.update(h),f.finish()&&(r=a.fromDer(f.output)),r},o.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:a.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})},o.encryptedPrivateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return a.fromDer(t.body)},o.encryptRsaPrivateKey=function(e,t,r){if(!(r=r||{}).legacy){var i=o.wrapRsaPrivateKey(o.privateKeyToAsn1(e));return i=o.encryptPrivateKeyInfo(i,t,r),o.encryptedPrivateKeyToPem(i)}var s,u,c,l;switch(r.algorithm){case"aes128":s="AES-128-CBC",c=16,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"aes192":s="AES-192-CBC",c=24,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"aes256":s="AES-256-CBC",c=32,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher;break;case"3des":s="DES-EDE3-CBC",c=24,u=n.random.getBytesSync(8),l=n.des.createEncryptionCipher;break;case"des":s="DES-CBC",c=8,u=n.random.getBytesSync(8),l=n.des.createEncryptionCipher;break;default:var f=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw f.algorithm=r.algorithm,f}var h=l(n.pbe.opensslDeriveBytes(t,u.substr(0,8),c));h.start(u),h.update(a.toDer(o.privateKeyToAsn1(e))),h.finish();var p={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:s,parameters:n.util.bytesToHex(u).toUpperCase()},body:h.output.getBytes()};return n.pem.encode(p)},o.decryptRsaPrivateKey=function(e,t){var r=null,i=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(c=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=c,c;if(i.procType&&"ENCRYPTED"===i.procType.type){var s,u;switch(i.dekInfo.algorithm){case"DES-CBC":s=8,u=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":s=24,u=n.des.createDecryptionCipher;break;case"AES-128-CBC":s=16,u=n.aes.createDecryptionCipher;break;case"AES-192-CBC":s=24,u=n.aes.createDecryptionCipher;break;case"AES-256-CBC":s=32,u=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":s=5,u=function(e){return n.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":s=8,u=function(e){return n.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":s=16,u=function(e){return n.rc2.createDecryptionCipher(e,128)};break;default:var c;throw(c=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,c}var l=n.util.hexToBytes(i.dekInfo.parameters),f=u(n.pbe.opensslDeriveBytes(t,l.substr(0,8),s));if(f.start(l),f.update(n.util.createBuffer(i.body)),!f.finish())return r;r=f.output.getBytes()}else r=i.body;return null!==(r="ENCRYPTED PRIVATE KEY"===i.type?o.decryptPrivateKeyInfo(a.fromDer(r),t):a.fromDer(r))&&(r=o.privateKeyFromAsn1(r)),r},o.pbe.generatePkcs12Key=function(e,t,r,i,a,o){var s,u;if(null==o){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');o=n.md.sha1.create()}var c=o.digestLength,l=o.blockLength,f=new n.util.ByteBuffer,h=new n.util.ByteBuffer;if(null!=e){for(u=0;u<e.length;u++)h.putInt16(e.charCodeAt(u));h.putInt16(0)}var p=h.length(),d=t.length(),y=new n.util.ByteBuffer;y.fillWithByte(r,l);var g=l*Math.ceil(d/l),m=new n.util.ByteBuffer;for(u=0;u<g;u++)m.putByte(t.at(u%d));var v=l*Math.ceil(p/l),b=new n.util.ByteBuffer;for(u=0;u<v;u++)b.putByte(h.at(u%p));var E=m;E.putBuffer(b);for(var S=Math.ceil(a/c),C=1;C<=S;C++){var T=new n.util.ByteBuffer;T.putBytes(y.bytes()),T.putBytes(E.bytes());for(var A=0;A<i;A++)o.start(),o.update(T.getBytes()),T=o.digest();var I=new n.util.ByteBuffer;for(u=0;u<l;u++)I.putByte(T.at(u%c));var w=Math.ceil(d/l)+Math.ceil(p/l),B=new n.util.ByteBuffer;for(s=0;s<w;s++){var _=new n.util.ByteBuffer(E.getBytes(l)),N=511;for(u=I.length()-1;u>=0;u--)N>>=8,N+=I.at(u)+_.at(u),_.setAt(u,255&N);B.putBuffer(_)}E=B,f.putBuffer(T)}return f.truncate(f.length()-a),f},o.pbe.getCipher=function(e,t,r){switch(e){case o.oids.pkcs5PBES2:return o.pbe.getCipherForPBES2(e,t,r);case o.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case o.oids["pbewithSHAAnd40BitRC2-CBC"]:return o.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},o.pbe.getCipherForPBES2=function(e,t,r){var i,s={},u=[];if(!a.validate(t,c,s,u))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,i;if((e=a.derToOid(s.kdfOid))!==o.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i;if((e=a.derToOid(s.encOid))!==o.oids["aes128-CBC"]&&e!==o.oids["aes192-CBC"]&&e!==o.oids["aes256-CBC"]&&e!==o.oids["des-EDE3-CBC"]&&e!==o.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var l,f,p=s.kdfSalt,d=n.util.createBuffer(s.kdfIterationCount);switch(d=d.getInt(d.length()<<3),o.oids[e]){case"aes128-CBC":l=16,f=n.aes.createDecryptionCipher;break;case"aes192-CBC":l=24,f=n.aes.createDecryptionCipher;break;case"aes256-CBC":l=32,f=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":l=24,f=n.des.createDecryptionCipher;break;case"desCBC":l=8,f=n.des.createDecryptionCipher}var y=h(s.prfOid),g=n.pkcs5.pbkdf2(r,p,d,l,y),m=s.encIv,v=f(g);return v.start(m),v},o.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},s=[];if(!a.validate(t,l,i,s))throw(y=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=s,y;var u,c,f,p=n.util.createBuffer(i.salt),d=n.util.createBuffer(i.iterations);switch(d=d.getInt(d.length()<<3),e){case o.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,c=8,f=n.des.startDecrypting;break;case o.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,c=8,f=function(e,t){var r=n.rc2.createDecryptionCipher(e,40);return r.start(t,null),r};break;default:var y;throw(y=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,y}var g=h(i.prfOid),m=o.pbe.generatePkcs12Key(r,p,1,d,u,g);return g.start(),f(m,o.pbe.generatePkcs12Key(r,p,2,d,c,g))},o.pbe.opensslDeriveBytes=function(e,t,r,i){if(null==i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===t&&(t="");for(var a=[f(i,e+t)],o=16,s=1;o<r;++s,o+=16)a.push(f(i,a[s-1]+e+t));return a.join("").substr(0,r)}},function(e,t,r){var n=r(0);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.des.Algorithm(e,t)}))}r(24),r(34),r(1),e.exports=n.des=n.des||{},n.des.startEncrypting=function(e,t,r,n){var i=d({key:e,output:r,decrypt:!1,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createEncryptionCipher=function(e,t){return d({key:e,output:null,decrypt:!1,mode:t})},n.des.startDecrypting=function(e,t,r,n){var i=d({key:e,output:r,decrypt:!0,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createDecryptionCipher=function(e,t){return d({key:e,output:null,decrypt:!0,mode:t})},n.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return p(r._keys,e,t,!1)},decrypt:function(e,t){return p(r._keys,e,t,!0)}}}),r._init=!1},n.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=n.util.createBuffer(e.key);if(0===this.name.indexOf("3DES")&&24!==t.length())throw new Error("Invalid Triple-DES key size: "+8*t.length());this._keys=function(e){for(var t,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],o=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],u=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],f=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],h=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],p=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],d=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],y=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=e.length()>8?3:1,m=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],b=0,E=0;E<g;E++){var S=e.getInt32(),C=e.getInt32();S^=(t=252645135&(S>>>4^C))<<4,S^=t=65535&((C^=t)>>>-16^S),S^=(t=858993459&(S>>>2^(C^=t<<-16)))<<2,S^=t=65535&((C^=t)>>>-16^S),S^=(t=1431655765&(S>>>1^(C^=t<<-16)))<<1,S^=t=16711935&((C^=t)>>>8^S),t=(S^=(t=1431655765&(S>>>1^(C^=t<<8)))<<1)<<8|(C^=t)>>>20&240,S=C<<24|C<<8&16711680|C>>>8&65280|C>>>24&240,C=t;for(var T=0;T<v.length;++T){v[T]?(S=S<<2|S>>>26,C=C<<2|C>>>26):(S=S<<1|S>>>27,C=C<<1|C>>>27);var A=r[(S&=-15)>>>28]|n[S>>>24&15]|i[S>>>20&15]|a[S>>>16&15]|o[S>>>12&15]|s[S>>>8&15]|u[S>>>4&15],I=c[(C&=-15)>>>28]|l[C>>>24&15]|f[C>>>20&15]|h[C>>>16&15]|p[C>>>12&15]|d[C>>>8&15]|y[C>>>4&15];t=65535&(I>>>16^A),m[b++]=A^t,m[b++]=I^t<<16}}return m}(t),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var a=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],o=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],s=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],c=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],l=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function p(e,t,r,n){var i,p,d=32===e.length?3:9;i=3===d?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var y=t[0],g=t[1];y^=(p=252645135&(y>>>4^g))<<4,y^=(p=65535&(y>>>16^(g^=p)))<<16,y^=p=858993459&((g^=p)>>>2^y),y^=p=16711935&((g^=p<<2)>>>8^y),y=(y^=(p=1431655765&(y>>>1^(g^=p<<8)))<<1)<<1|y>>>31,g=(g^=p)<<1|g>>>31;for(var m=0;m<d;m+=3){for(var v=i[m+1],b=i[m+2],E=i[m];E!=v;E+=b){var S=g^e[E],C=(g>>>4|g<<28)^e[E+1];p=y,y=g,g=p^(o[S>>>24&63]|u[S>>>16&63]|l[S>>>8&63]|h[63&S]|a[C>>>24&63]|s[C>>>16&63]|c[C>>>8&63]|f[63&C])}p=y,y=g,g=p}g=g>>>1|g<<31,g^=p=1431655765&((y=y>>>1|y<<31)>>>1^g),g^=(p=16711935&(g>>>8^(y^=p<<1)))<<8,g^=(p=858993459&(g>>>2^(y^=p)))<<2,g^=p=65535&((y^=p)>>>16^g),g^=p=252645135&((y^=p<<16)>>>4^g),y^=p<<4,r[0]=y,r[1]=g}function d(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var a=null;r instanceof n.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=e,i.call(t,r)},t}},function(e,t,r){(function(t){var n=r(0);r(26),r(4),r(1);var i,a=n.pkcs5=n.pkcs5||{};n.util.isNodejs&&!n.options.usePureJavaScript&&(i=r(25)),e.exports=n.pbkdf2=a.pbkdf2=function(e,r,a,o,s,u){if("function"==typeof s&&(u=s,s=null),n.util.isNodejs&&!n.options.usePureJavaScript&&i.pbkdf2&&(null===s||"object"!=typeof s)&&(i.pbkdf2Sync.length>4||!s||"sha1"===s))return"string"!=typeof s&&(s="sha1"),e=t.from(e,"binary"),r=t.from(r,"binary"),u?4===i.pbkdf2Sync.length?i.pbkdf2(e,r,a,o,(function(e,t){if(e)return u(e);u(null,t.toString("binary"))})):i.pbkdf2(e,r,a,o,s,(function(e,t){if(e)return u(e);u(null,t.toString("binary"))})):4===i.pbkdf2Sync.length?i.pbkdf2Sync(e,r,a,o).toString("binary"):i.pbkdf2Sync(e,r,a,o,s).toString("binary");if(null==s&&(s="sha1"),"string"==typeof s){if(!(s in n.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=n.md[s].create()}var c=s.digestLength;if(o>4294967295*c){var l=new Error("Derived key is too long.");if(u)return u(l);throw l}var f=Math.ceil(o/c),h=o-(f-1)*c,p=n.hmac.create();p.start(s,e);var d,y,g,m="";if(!u){for(var v=1;v<=f;++v){p.start(null,null),p.update(r),p.update(n.util.int32ToBytes(v)),d=g=p.digest().getBytes();for(var b=2;b<=a;++b)p.start(null,null),p.update(g),y=p.digest().getBytes(),d=n.util.xorBytes(d,y,c),g=y;m+=v<f?d:d.substr(0,h)}return m}v=1;function E(){if(v>f)return u(null,m);p.start(null,null),p.update(r),p.update(n.util.int32ToBytes(v)),d=g=p.digest().getBytes(),b=2,S()}function S(){if(b<=a)return p.start(null,null),p.update(g),y=p.digest().getBytes(),d=n.util.xorBytes(d,y,c),g=y,++b,n.util.setImmediate(S);m+=v<f?d:d.substr(0,h),++v,E()}E()}}).call(this,r(12).Buffer)},function(e,t,r){var n,i=r(0);e.exports=i.jsbn=i.jsbn||{};function a(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function o(){return new a(null)}function s(e,t,r,n,i,a){for(var o=16383&t,s=t>>14;--a>=0;){var u=16383&this.data[e],c=this.data[e++]>>14,l=s*u+c*o;i=((u=o*u+((16383&l)<<14)+r.data[n]+i)>>28)+(l>>14)+s*c,r.data[n++]=268435455&u}return i}i.jsbn.BigInteger=a,"undefined"==typeof navigator?(a.prototype.am=s,n=28):"Microsoft Internet Explorer"==navigator.appName?(a.prototype.am=function(e,t,r,n,i,a){for(var o=32767&t,s=t>>15;--a>=0;){var u=32767&this.data[e],c=this.data[e++]>>15,l=s*u+c*o;i=((u=o*u+((32767&l)<<15)+r.data[n]+(1073741823&i))>>>30)+(l>>>15)+s*c+(i>>>30),r.data[n++]=1073741823&u}return i},n=30):"Netscape"!=navigator.appName?(a.prototype.am=function(e,t,r,n,i,a){for(;--a>=0;){var o=t*this.data[e++]+r.data[n]+i;i=Math.floor(o/67108864),r.data[n++]=67108863&o}return i},n=26):(a.prototype.am=s,n=28),a.prototype.DB=n,a.prototype.DM=(1<<n)-1,a.prototype.DV=1<<n;a.prototype.FV=Math.pow(2,52),a.prototype.F1=52-n,a.prototype.F2=2*n-52;var u,c,l=new Array;for(u="0".charCodeAt(0),c=0;c<=9;++c)l[u++]=c;for(u="a".charCodeAt(0),c=10;c<36;++c)l[u++]=c;for(u="A".charCodeAt(0),c=10;c<36;++c)l[u++]=c;function f(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function h(e,t){var r=l[e.charCodeAt(t)];return null==r?-1:r}function p(e){var t=o();return t.fromInt(e),t}function d(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function y(e){this.m=e}function g(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function m(e,t){return e&t}function v(e,t){return e|t}function b(e,t){return e^t}function E(e,t){return e&~t}function S(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function C(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function T(){}function A(e){return e}function I(e){this.r2=o(),this.q3=o(),a.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}y.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},y.prototype.revert=function(e){return e},y.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},y.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},y.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},g.prototype.convert=function(e){var t=o();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(a.ZERO)>0&&this.m.subTo(t,t),t},g.prototype.revert=function(e){var t=o();return e.copyTo(t),this.reduce(t),t},g.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e.data[t],n=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},g.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},g.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},a.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},a.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},a.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,o=0;--n>=0;){var s=8==r?255&e[n]:h(e,n);s<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==o?this.data[this.t++]=s:o+r>this.DB?(this.data[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this.data[this.t++]=s>>this.DB-o):this.data[this.t-1]|=s<<o,(o+=r)>=this.DB&&(o-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,o>0&&(this.data[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),i&&a.ZERO.subTo(this,this)},a.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t},a.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s},a.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0),t.s=this.s},a.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,i=this.DB-n,a=(1<<i)-1,o=Math.floor(e/this.DB),s=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t.data[r+o+1]=this.data[r]>>i|s,s=(this.data[r]&a)<<n;for(r=o-1;r>=0;--r)t.data[r]=0;t.data[o]=s,t.t=this.t+o+1,t.s=this.s,t.clamp()},a.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,a=(1<<n)-1;t.data[0]=this.data[r]>>n;for(var o=r+1;o<this.t;++o)t.data[o-r-1]|=(this.data[o]&a)<<i,t.data[o-r]=this.data[o]>>n;n>0&&(t.data[this.t-r-1]|=(this.s&a)<<i),t.t=this.t-r,t.clamp()}},a.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]-e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()},a.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t.data[i]=0;for(i=0;i<n.t;++i)t.data[i+r.t]=r.am(0,n.data[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&a.ZERO.subTo(t,t)},a.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()},a.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=o());var s=o(),u=this.s,c=e.s,l=this.DB-d(n.data[n.t-1]);l>0?(n.lShiftTo(l,s),i.lShiftTo(l,r)):(n.copyTo(s),i.copyTo(r));var f=s.t,h=s.data[f-1];if(0!=h){var p=h*(1<<this.F1)+(f>1?s.data[f-2]>>this.F2:0),y=this.FV/p,g=(1<<this.F1)/p,m=1<<this.F2,v=r.t,b=v-f,E=null==t?o():t;for(s.dlShiftTo(b,E),r.compareTo(E)>=0&&(r.data[r.t++]=1,r.subTo(E,r)),a.ONE.dlShiftTo(f,E),E.subTo(s,s);s.t<f;)s.data[s.t++]=0;for(;--b>=0;){var S=r.data[--v]==h?this.DM:Math.floor(r.data[v]*y+(r.data[v-1]+m)*g);if((r.data[v]+=s.am(0,S,r,b,0,f))<S)for(s.dlShiftTo(b,E),r.subTo(E,r);r.data[v]<--S;)r.subTo(E,r)}null!=t&&(r.drShiftTo(f,t),u!=c&&a.ZERO.subTo(t,t)),r.t=f,r.clamp(),l>0&&r.rShiftTo(l,r),u<0&&a.ZERO.subTo(r,r)}}},a.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},a.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},a.prototype.exp=function(e,t){if(e>4294967295||e<1)return a.ONE;var r=o(),n=o(),i=t.convert(this),s=d(e)-1;for(i.copyTo(r);--s>=0;)if(t.sqrTo(r,n),(e&1<<s)>0)t.mulTo(n,i,r);else{var u=r;r=n,n=u}return t.revert(r)},a.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,i=!1,a="",o=this.t,s=this.DB-o*this.DB%t;if(o-- >0)for(s<this.DB&&(r=this.data[o]>>s)>0&&(i=!0,a=f(r));o>=0;)s<t?(r=(this.data[o]&(1<<s)-1)<<t-s,r|=this.data[--o]>>(s+=this.DB-t)):(r=this.data[o]>>(s-=t)&n,s<=0&&(s+=this.DB,--o)),r>0&&(i=!0),i&&(a+=f(r));return i?a:"0"},a.prototype.negate=function(){var e=o();return a.ZERO.subTo(this,e),e},a.prototype.abs=function(){return this.s<0?this.negate():this},a.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t;return 0},a.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+d(this.data[this.t-1]^this.s&this.DM)},a.prototype.mod=function(e){var t=o();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(a.ZERO)>0&&e.subTo(t,t),t},a.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new y(t):new g(t),this.exp(e,r)},a.ZERO=p(0),a.ONE=p(1),T.prototype.convert=A,T.prototype.revert=A,T.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},T.prototype.sqrTo=function(e,t){e.squareTo(t)},I.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=o();return e.copyTo(t),this.reduce(t),t},I.prototype.revert=function(e){return e},I.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},I.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},I.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var w=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],B=(1<<26)/w[w.length-1];a.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},a.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=p(r),i=o(),a=o(),s="";for(this.divRemTo(n,i,a);i.signum()>0;)s=(r+a.intValue()).toString(e).substr(1)+s,i.divRemTo(n,i,a);return a.intValue().toString(e)+s},a.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,o=0,s=0,u=0;u<e.length;++u){var c=h(e,u);c<0?"-"==e.charAt(u)&&0==this.signum()&&(i=!0):(s=t*s+c,++o>=r&&(this.dMultiply(n),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(s,0)),i&&a.ZERO.subTo(this,this)},a.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(a.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(a.ONE.shiftLeft(e-1),this);else{var n=new Array,i=7&e;n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<<i)-1:n[0]=0,this.fromString(n,256)}},a.prototype.bitwiseTo=function(e,t,r){var n,i,a=Math.min(e.t,this.t);for(n=0;n<a;++n)r.data[n]=t(this.data[n],e.data[n]);if(e.t<this.t){for(i=e.s&this.DM,n=a;n<this.t;++n)r.data[n]=t(this.data[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=a;n<e.t;++n)r.data[n]=t(i,e.data[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},a.prototype.changeBit=function(e,t){var r=a.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},a.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]+e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()},a.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},a.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},a.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i<n;++i)r.data[i+this.t]=this.am(0,e.data[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e.data[i],r,i,0,t-i);r.clamp()},a.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r.data[this.t+n-t]=this.am(t-n,e.data[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},a.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r},a.prototype.millerRabin=function(e){var t=this.subtract(a.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n,i=t.shiftRight(r),o={nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(256*Math.random())}},s=0;s<e;++s){do{n=new a(this.bitLength(),o)}while(n.compareTo(a.ONE)<=0||n.compareTo(t)>=0);var u=n.modPow(i,this);if(0!=u.compareTo(a.ONE)&&0!=u.compareTo(t)){for(var c=1;c++<r&&0!=u.compareTo(t);)if(0==(u=u.modPowInt(2,this)).compareTo(a.ONE))return!1;if(0!=u.compareTo(t))return!1}}return!0},a.prototype.clone=function(){var e=o();return this.copyTo(e),e},a.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]},a.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24},a.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},a.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},a.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n<this.DB&&(r=this.data[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this.data[e]&(1<<n)-1)<<8-n,r|=this.data[--e]>>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},a.prototype.equals=function(e){return 0==this.compareTo(e)},a.prototype.min=function(e){return this.compareTo(e)<0?this:e},a.prototype.max=function(e){return this.compareTo(e)>0?this:e},a.prototype.and=function(e){var t=o();return this.bitwiseTo(e,m,t),t},a.prototype.or=function(e){var t=o();return this.bitwiseTo(e,v,t),t},a.prototype.xor=function(e){var t=o();return this.bitwiseTo(e,b,t),t},a.prototype.andNot=function(e){var t=o();return this.bitwiseTo(e,E,t),t},a.prototype.not=function(){for(var e=o(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e},a.prototype.shiftLeft=function(e){var t=o();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},a.prototype.shiftRight=function(e){var t=o();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},a.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this.data[e])return e*this.DB+S(this.data[e]);return this.s<0?this.t*this.DB:-1},a.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=C(this.data[r]^t);return e},a.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this.data[t]&1<<e%this.DB)},a.prototype.setBit=function(e){return this.changeBit(e,v)},a.prototype.clearBit=function(e){return this.changeBit(e,E)},a.prototype.flipBit=function(e){return this.changeBit(e,b)},a.prototype.add=function(e){var t=o();return this.addTo(e,t),t},a.prototype.subtract=function(e){var t=o();return this.subTo(e,t),t},a.prototype.multiply=function(e){var t=o();return this.multiplyTo(e,t),t},a.prototype.divide=function(e){var t=o();return this.divRemTo(e,t,null),t},a.prototype.remainder=function(e){var t=o();return this.divRemTo(e,null,t),t},a.prototype.divideAndRemainder=function(e){var t=o(),r=o();return this.divRemTo(e,t,r),new Array(t,r)},a.prototype.modPow=function(e,t){var r,n,i=e.bitLength(),a=p(1);if(i<=0)return a;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new y(t):t.isEven()?new I(t):new g(t);var s=new Array,u=3,c=r-1,l=(1<<r)-1;if(s[1]=n.convert(this),r>1){var f=o();for(n.sqrTo(s[1],f);u<=l;)s[u]=o(),n.mulTo(f,s[u-2],s[u]),u+=2}var h,m,v=e.t-1,b=!0,E=o();for(i=d(e.data[v])-1;v>=0;){for(i>=c?h=e.data[v]>>i-c&l:(h=(e.data[v]&(1<<i+1)-1)<<c-i,v>0&&(h|=e.data[v-1]>>this.DB+i-c)),u=r;0==(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--v),b)s[h].copyTo(a),b=!1;else{for(;u>1;)n.sqrTo(a,E),n.sqrTo(E,a),u-=2;u>0?n.sqrTo(a,E):(m=a,a=E,E=m),n.mulTo(E,s[h],a)}for(;v>=0&&0==(e.data[v]&1<<i);)n.sqrTo(a,E),m=a,a=E,E=m,--i<0&&(i=this.DB-1,--v)}return n.revert(a)},a.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return a.ZERO;for(var r=e.clone(),n=this.clone(),i=p(1),o=p(0),s=p(0),u=p(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(i.isEven()&&o.isEven()||(i.addTo(this,i),o.subTo(e,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;n.isEven();)n.rShiftTo(1,n),t?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(e,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(n)>=0?(r.subTo(n,r),t&&i.subTo(s,i),o.subTo(u,o)):(n.subTo(r,n),t&&s.subTo(i,s),u.subTo(o,u))}return 0!=n.compareTo(a.ONE)?a.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},a.prototype.pow=function(e){return this.exp(e,new T)},a.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return t;for(i<a&&(a=i),a>0&&(t.rShiftTo(a,t),r.rShiftTo(a,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},a.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r.data[0]<=w[w.length-1]){for(t=0;t<w.length;++t)if(r.data[0]==w[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<w.length;){for(var n=w[t],i=t+1;i<w.length&&n<B;)n*=w[i++];for(n=r.modInt(n);t<i;)if(n%w[t++]==0)return!1}return r.millerRabin(e)}},function(e,t,r){var n=r(0);r(4),r(1);var i=e.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){o||(a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),o=!0);var e=null,t=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,a=0;a<r;++a)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},i}};return i.start(),i.update=function(a,o){"utf8"===o&&(a=n.util.encodeUtf8(a));var u=a.length;i.messageLength+=u,u=[u/4294967296>>>0,u>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=u[1],u[1]=u[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,u[0]=u[1]/4294967296>>>0;return t.putBytes(a),s(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var o=n.util.createBuffer();o.putBytes(t.bytes());var u,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-c));for(var l=8*i.fullMessageLength[0],f=0;f<i.fullMessageLength.length-1;++f)l+=(u=8*i.fullMessageLength[f+1])/4294967296>>>0,o.putInt32(l>>>0),l=u>>>0;o.putInt32(l);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};s(h,r,o);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p},i};var a=null,o=!1;function s(e,t,r){for(var n,i,a,o,s,u,c,l=r.length();l>=64;){for(i=e.h0,a=e.h1,o=e.h2,s=e.h3,u=e.h4,c=0;c<16;++c)n=r.getInt32(),t[c]=n,n=(i<<5|i>>>27)+(s^a&(o^s))+u+1518500249+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<20;++c)n=(n=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|n>>>31,t[c]=n,n=(i<<5|i>>>27)+(s^a&(o^s))+u+1518500249+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<32;++c)n=(n=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|n>>>31,t[c]=n,n=(i<<5|i>>>27)+(a^o^s)+u+1859775393+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<40;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(i<<5|i>>>27)+(a^o^s)+u+1859775393+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<60;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(i<<5|i>>>27)+(a&o|s&(a^o))+u+2400959708+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;c<80;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(i<<5|i>>>27)+(a^o^s)+u+3395469782+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;e.h0=e.h0+i|0,e.h1=e.h1+a|0,e.h2=e.h2+o|0,e.h3=e.h3+s|0,e.h4=e.h4+u|0,l-=64}}},function(e,t,r){var n=r(0);r(23),r(9),r(41),r(4),r(78),r(10),r(29),r(46),r(22),r(1);var i=n.asn1,a=e.exports=n.pki=n.pki||{},o=a.oids,s={};s.CN=o.commonName,s.commonName="CN",s.C=o.countryName,s.countryName="C",s.L=o.localityName,s.localityName="L",s.ST=o.stateOrProvinceName,s.stateOrProvinceName="ST",s.O=o.organizationName,s.organizationName="O",s.OU=o.organizationalUnitName,s.organizationalUnitName="OU",s.E=o.emailAddress,s.emailAddress="E";var u=n.pki.rsa.publicKeyValidator,c={name:"Certificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},u,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},l={name:"rsapss",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},f={name:"CertificationRequestInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},u,{name:"CertificationRequestInfo.attributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0}]}]}]},h={name:"CertificationRequest",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[f,{name:"CertificationRequest.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function p(e,t){"string"==typeof t&&(t={shortName:t});for(var r,n=null,i=0;null===n&&i<e.attributes.length;++i)r=e.attributes[i],(t.type&&t.type===r.type||t.name&&t.name===r.name||t.shortName&&t.shortName===r.shortName)&&(n=r);return n}a.RDNAttributesAsArray=function(e,t){for(var r,n,a,u=[],c=0;c<e.value.length;++c){r=e.value[c];for(var l=0;l<r.value.length;++l)a={},n=r.value[l],a.type=i.derToOid(n.value[0].value),a.value=n.value[1].value,a.valueTagClass=n.value[1].type,a.type in o&&(a.name=o[a.type],a.name in s&&(a.shortName=s[a.name])),t&&(t.update(a.type),t.update(a.value)),u.push(a)}return u},a.CRIAttributesAsArray=function(e){for(var t=[],r=0;r<e.length;++r)for(var n=e[r],u=i.derToOid(n.value[0].value),c=n.value[1].value,l=0;l<c.length;++l){var f={};if(f.type=u,f.value=c[l].value,f.valueTagClass=c[l].type,f.type in o&&(f.name=o[f.type],f.name in s&&(f.shortName=s[f.name])),f.type===o.extensionRequest){f.extensions=[];for(var h=0;h<f.value.length;++h)f.extensions.push(a.certificateExtensionFromAsn1(f.value[h]))}t.push(f)}return t};var d=function(e,t,r){var n={};if(e!==o["RSASSA-PSS"])return n;r&&(n={hash:{algorithmOid:o.sha1},mgf:{algorithmOid:o.mgf1,hash:{algorithmOid:o.sha1}},saltLength:20});var a={},s=[];if(!i.validate(t,l,a,s)){var u=new Error("Cannot read RSASSA-PSS parameter block.");throw u.errors=s,u}return void 0!==a.hashOid&&(n.hash=n.hash||{},n.hash.algorithmOid=i.derToOid(a.hashOid)),void 0!==a.maskGenOid&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=i.derToOid(a.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=i.derToOid(a.maskGenHashOid)),void 0!==a.saltLength&&(n.saltLength=a.saltLength.charCodeAt(0)),n};function y(e){for(var t,r,a=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),o=e.attributes,s=0;s<o.length;++s){var u=(t=o[s]).value,c=i.Type.PRINTABLESTRING;"valueTagClass"in t&&(c=t.valueTagClass)===i.Type.UTF8&&(u=n.util.encodeUtf8(u)),r=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.type).getBytes()),i.create(i.Class.UNIVERSAL,c,!1,u)])]),a.value.push(r)}return a}function g(e){for(var t,r=0;r<e.length;++r){if(void 0===(t=e[r]).name&&(t.type&&t.type in a.oids?t.name=a.oids[t.type]:t.shortName&&t.shortName in s&&(t.name=a.oids[s[t.shortName]])),void 0===t.type){if(!t.name||!(t.name in a.oids))throw(u=new Error("Attribute type not specified.")).attribute=t,u;t.type=a.oids[t.name]}if(void 0===t.shortName&&t.name&&t.name in s&&(t.shortName=s[t.name]),t.type===o.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=i.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var n=0;n<t.extensions.length;++n)t.value.push(a.certificateExtensionToAsn1(m(t.extensions[n])))}var u;if(void 0===t.value)throw(u=new Error("Attribute value not specified.")).attribute=t,u}}function m(e,t){if(t=t||{},void 0===e.name&&e.id&&e.id in a.oids&&(e.name=a.oids[e.id]),void 0===e.id){if(!e.name||!(e.name in a.oids))throw(S=new Error("Extension ID not specified.")).extension=e,S;e.id=a.oids[e.name]}if(void 0!==e.value)return e;if("keyUsage"===e.name){var r=0,s=0,u=0;e.digitalSignature&&(s|=128,r=7),e.nonRepudiation&&(s|=64,r=6),e.keyEncipherment&&(s|=32,r=5),e.dataEncipherment&&(s|=16,r=4),e.keyAgreement&&(s|=8,r=3),e.keyCertSign&&(s|=4,r=2),e.cRLSign&&(s|=2,r=1),e.encipherOnly&&(s|=1,r=0),e.decipherOnly&&(u|=128,r=7);var c=String.fromCharCode(r);0!==u?c+=String.fromCharCode(s)+String.fromCharCode(u):0!==s&&(c+=String.fromCharCode(s)),e.value=i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,c)}else if("basicConstraints"===e.name)e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(i.create(i.Class.UNIVERSAL,i.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.pathLenConstraint).getBytes()));else if("extKeyUsage"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);var l=e.value.value;for(var f in e)!0===e[f]&&(f in o?l.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o[f]).getBytes())):-1!==f.indexOf(".")&&l.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(f).getBytes())))}else if("nsCertType"===e.name){r=0,s=0;e.client&&(s|=128,r=7),e.server&&(s|=64,r=6),e.email&&(s|=32,r=5),e.objsign&&(s|=16,r=4),e.reserved&&(s|=8,r=3),e.sslCA&&(s|=4,r=2),e.emailCA&&(s|=2,r=1),e.objCA&&(s|=1,r=0);c=String.fromCharCode(r);0!==s&&(c+=String.fromCharCode(s)),e.value=i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,c)}else if("subjectAltName"===e.name||"issuerAltName"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);for(var h=0;h<e.altNames.length;++h){c=(v=e.altNames[h]).value;if(7===v.type&&v.ip){if(null===(c=n.util.bytesFromIP(v.ip)))throw(S=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,S}else 8===v.type&&(c=v.oid?i.oidToDer(i.oidToDer(v.oid)):i.oidToDer(c));e.value.value.push(i.create(i.Class.CONTEXT_SPECIFIC,v.type,!1,c))}}else if("nsComment"===e.name&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=i.create(i.Class.UNIVERSAL,i.Type.IA5STRING,!1,e.comment)}else if("subjectKeyIdentifier"===e.name&&t.cert){var p=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=p.toHex(),e.value=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,p.getBytes())}else if("authorityKeyIdentifier"===e.name&&t.cert){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);l=e.value.value;if(e.keyIdentifier){var d=!0===e.keyIdentifier?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;l.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!1,d))}if(e.authorityCertIssuer){var g=[i.create(i.Class.CONTEXT_SPECIFIC,4,!0,[y(!0===e.authorityCertIssuer?t.cert.issuer:e.authorityCertIssuer)])];l.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,g))}if(e.serialNumber){var m=n.util.hexToBytes(!0===e.serialNumber?t.cert.serialNumber:e.serialNumber);l.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!1,m))}}else if("cRLDistributionPoints"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);l=e.value.value;var v,b=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),E=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(h=0;h<e.altNames.length;++h){c=(v=e.altNames[h]).value;if(7===v.type&&v.ip){if(null===(c=n.util.bytesFromIP(v.ip)))throw(S=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,S}else 8===v.type&&(c=v.oid?i.oidToDer(i.oidToDer(v.oid)):i.oidToDer(c));E.value.push(i.create(i.Class.CONTEXT_SPECIFIC,v.type,!1,c))}b.value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[E])),l.push(b)}var S;if(void 0===e.value)throw(S=new Error("Extension value not specified.")).extension=e,S;return e}function v(e,t){switch(e){case o["RSASSA-PSS"]:var r=[];return void 0!==t.hash.algorithmOid&&r.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.hash.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])])),void 0!==t.mgf.algorithmOid&&r.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.mgf.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.mgf.hash.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])])])),void 0!==t.saltLength&&r.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(t.saltLength).getBytes())])),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,r);default:return i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")}}function b(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===e.attributes.length)return t;for(var r=e.attributes,a=0;a<r.length;++a){var o=r[a],s=o.value,u=i.Type.UTF8;"valueTagClass"in o&&(u=o.valueTagClass),u===i.Type.UTF8&&(s=n.util.encodeUtf8(s));var c=!1;"valueConstructed"in o&&(c=o.valueConstructed);var l=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.type).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,u,c,s)])]);t.value.push(l)}return t}a.certificateFromPem=function(e,t,r){var o=n.pem.decode(e)[0];if("CERTIFICATE"!==o.type&&"X509 CERTIFICATE"!==o.type&&"TRUSTED CERTIFICATE"!==o.type){var s=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw s.headerType=o.type,s}if(o.procType&&"ENCRYPTED"===o.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var u=i.fromDer(o.body,r);return a.certificateFromAsn1(u,t)},a.certificateToPem=function(e,t){var r={type:"CERTIFICATE",body:i.toDer(a.certificateToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.publicKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PUBLIC KEY"!==t.type&&"RSA PUBLIC KEY"!==t.type){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert public key from PEM; PEM is encrypted.");var o=i.fromDer(t.body);return a.publicKeyFromAsn1(o)},a.publicKeyToPem=function(e,t){var r={type:"PUBLIC KEY",body:i.toDer(a.publicKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.publicKeyToRSAPublicKeyPem=function(e,t){var r={type:"RSA PUBLIC KEY",body:i.toDer(a.publicKeyToRSAPublicKey(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.getPublicKeyFingerprint=function(e,t){var r,o=(t=t||{}).md||n.md.sha1.create();switch(t.type||"RSAPublicKey"){case"RSAPublicKey":r=i.toDer(a.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":r=i.toDer(a.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}o.start(),o.update(r);var s=o.digest();if("hex"===t.encoding){var u=s.toHex();return t.delimiter?u.match(/.{2}/g).join(t.delimiter):u}if("binary"===t.encoding)return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".');return s},a.certificationRequestFromPem=function(e,t,r){var o=n.pem.decode(e)[0];if("CERTIFICATE REQUEST"!==o.type){var s=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw s.headerType=o.type,s}if(o.procType&&"ENCRYPTED"===o.procType.type)throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var u=i.fromDer(o.body,r);return a.certificationRequestFromAsn1(u,t)},a.certificationRequestToPem=function(e,t){var r={type:"CERTIFICATE REQUEST",body:i.toDer(a.certificationRequestToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.createCertificate=function(){var e={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return p(e.issuer,t)},e.issuer.addField=function(t){g([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return p(e.subject,t)},e.subject.addField=function(t){g([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,r){g(t),e.subject.attributes=t,delete e.subject.uniqueId,r&&(e.subject.uniqueId=r),e.subject.hash=null},e.setIssuer=function(t,r){g(t),e.issuer.attributes=t,delete e.issuer.uniqueId,r&&(e.issuer.uniqueId=r),e.issuer.hash=null},e.setExtensions=function(t){for(var r=0;r<t.length;++r)m(t[r],{cert:e});e.extensions=t},e.getExtension=function(t){"string"==typeof t&&(t={name:t});for(var r,n=null,i=0;null===n&&i<e.extensions.length;++i)r=e.extensions[i],(t.id&&r.id===t.id||t.name&&r.name===t.name)&&(n=r);return n},e.sign=function(t,r){e.md=r||n.md.sha1.create();var s=o[e.md.algorithm+"WithRSAEncryption"];if(!s){var u=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=s,e.tbsCertificate=a.getTBSCertificate(e);var c=i.toDer(e.tbsCertificate);e.md.update(c.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var r=!1;if(!e.issued(t)){var s=t.issuer,u=e.subject;throw(y=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.")).expectedIssuer=s.attributes,y.actualIssuer=u.attributes,y}var c=t.md;if(null===c){if(t.signatureOid in o)switch(o[t.signatureOid]){case"sha1WithRSAEncryption":c=n.md.sha1.create();break;case"md5WithRSAEncryption":c=n.md.md5.create();break;case"sha256WithRSAEncryption":c=n.md.sha256.create();break;case"sha384WithRSAEncryption":c=n.md.sha384.create();break;case"sha512WithRSAEncryption":c=n.md.sha512.create();break;case"RSASSA-PSS":c=n.md.sha256.create()}if(null===c)throw(y=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=t.signatureOid,y;var l=t.tbsCertificate||a.getTBSCertificate(t),f=i.toDer(l);c.update(f.getBytes())}if(null!==c){var h;switch(t.signatureOid){case o.sha1WithRSAEncryption:h=void 0;break;case o["RSASSA-PSS"]:var p,d,y;if(void 0===(p=o[t.signatureParameters.mgf.hash.algorithmOid])||void 0===n.md[p])throw(y=new Error("Unsupported MGF hash function.")).oid=t.signatureParameters.mgf.hash.algorithmOid,y.name=p,y;if(void 0===(d=o[t.signatureParameters.mgf.algorithmOid])||void 0===n.mgf[d])throw(y=new Error("Unsupported MGF function.")).oid=t.signatureParameters.mgf.algorithmOid,y.name=d,y;if(d=n.mgf[d].create(n.md[p].create()),void 0===(p=o[t.signatureParameters.hash.algorithmOid])||void 0===n.md[p])throw{message:"Unsupported RSASSA-PSS hash function.",oid:t.signatureParameters.hash.algorithmOid,name:p};h=n.pss.create(n.md[p].create(),d,t.signatureParameters.saltLength)}r=e.publicKey.verify(c.digest().getBytes(),t.signature,h)}return r},e.isIssuer=function(t){var r=!1,n=e.issuer,i=t.subject;if(n.hash&&i.hash)r=n.hash===i.hash;else if(n.attributes.length===i.attributes.length){var a,o;r=!0;for(var s=0;r&&s<n.attributes.length;++s)a=n.attributes[s],o=i.attributes[s],a.type===o.type&&a.value===o.value||(r=!1)}return r},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return a.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=o.subjectKeyIdentifier,r=0;r<e.extensions.length;++r){var i=e.extensions[r];if(i.id===t){var a=e.generateSubjectKeyIdentifier().getBytes();return n.util.hexToBytes(i.subjectKeyIdentifier)===a}}return!1},e},a.certificateFromAsn1=function(e,t){var r={},s=[];if(!i.validate(e,c,r,s))throw(h=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.")).errors=s,h;if(i.derToOid(r.publicKeyOid)!==a.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var u=a.createCertificate();u.version=r.certVersion?r.certVersion.charCodeAt(0):0;var l=n.util.createBuffer(r.certSerialNumber);u.serialNumber=l.toHex(),u.signatureOid=n.asn1.derToOid(r.certSignatureOid),u.signatureParameters=d(u.signatureOid,r.certSignatureParams,!0),u.siginfo.algorithmOid=n.asn1.derToOid(r.certinfoSignatureOid),u.siginfo.parameters=d(u.siginfo.algorithmOid,r.certinfoSignatureParams,!1),u.signature=r.certSignature;var f=[];if(void 0!==r.certValidity1UTCTime&&f.push(i.utcTimeToDate(r.certValidity1UTCTime)),void 0!==r.certValidity2GeneralizedTime&&f.push(i.generalizedTimeToDate(r.certValidity2GeneralizedTime)),void 0!==r.certValidity3UTCTime&&f.push(i.utcTimeToDate(r.certValidity3UTCTime)),void 0!==r.certValidity4GeneralizedTime&&f.push(i.generalizedTimeToDate(r.certValidity4GeneralizedTime)),f.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(f.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(u.validity.notBefore=f[0],u.validity.notAfter=f[1],u.tbsCertificate=r.tbsCertificate,t){var h;if(u.md=null,u.signatureOid in o)switch(o[u.signatureOid]){case"sha1WithRSAEncryption":u.md=n.md.sha1.create();break;case"md5WithRSAEncryption":u.md=n.md.md5.create();break;case"sha256WithRSAEncryption":u.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":u.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":u.md=n.md.sha512.create();break;case"RSASSA-PSS":u.md=n.md.sha256.create()}if(null===u.md)throw(h=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=u.signatureOid,h;var y=i.toDer(u.tbsCertificate);u.md.update(y.getBytes())}var m=n.md.sha1.create();u.issuer.getField=function(e){return p(u.issuer,e)},u.issuer.addField=function(e){g([e]),u.issuer.attributes.push(e)},u.issuer.attributes=a.RDNAttributesAsArray(r.certIssuer,m),r.certIssuerUniqueId&&(u.issuer.uniqueId=r.certIssuerUniqueId),u.issuer.hash=m.digest().toHex();var v=n.md.sha1.create();return u.subject.getField=function(e){return p(u.subject,e)},u.subject.addField=function(e){g([e]),u.subject.attributes.push(e)},u.subject.attributes=a.RDNAttributesAsArray(r.certSubject,v),r.certSubjectUniqueId&&(u.subject.uniqueId=r.certSubjectUniqueId),u.subject.hash=v.digest().toHex(),r.certExtensions?u.extensions=a.certificateExtensionsFromAsn1(r.certExtensions):u.extensions=[],u.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),u},a.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r<e.value.length;++r)for(var n=e.value[r],i=0;i<n.value.length;++i)t.push(a.certificateExtensionFromAsn1(n.value[i]));return t},a.certificateExtensionFromAsn1=function(e){var t={};if(t.id=i.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===i.Type.BOOLEAN?(t.critical=0!==e.value[1].value.charCodeAt(0),t.value=e.value[2].value):t.value=e.value[1].value,t.id in o)if(t.name=o[t.id],"keyUsage"===t.name){var r=0,a=0;(u=i.fromDer(t.value)).value.length>1&&(r=u.value.charCodeAt(1),a=u.value.length>2?u.value.charCodeAt(2):0),t.digitalSignature=128==(128&r),t.nonRepudiation=64==(64&r),t.keyEncipherment=32==(32&r),t.dataEncipherment=16==(16&r),t.keyAgreement=8==(8&r),t.keyCertSign=4==(4&r),t.cRLSign=2==(2&r),t.encipherOnly=1==(1&r),t.decipherOnly=128==(128&a)}else if("basicConstraints"===t.name){(u=i.fromDer(t.value)).value.length>0&&u.value[0].type===i.Type.BOOLEAN?t.cA=0!==u.value[0].value.charCodeAt(0):t.cA=!1;var s=null;u.value.length>0&&u.value[0].type===i.Type.INTEGER?s=u.value[0].value:u.value.length>1&&(s=u.value[1].value),null!==s&&(t.pathLenConstraint=i.derToInteger(s))}else if("extKeyUsage"===t.name)for(var u=i.fromDer(t.value),c=0;c<u.value.length;++c){var l=i.derToOid(u.value[c].value);l in o?t[o[l]]=!0:t[l]=!0}else if("nsCertType"===t.name){r=0;(u=i.fromDer(t.value)).value.length>1&&(r=u.value.charCodeAt(1)),t.client=128==(128&r),t.server=64==(64&r),t.email=32==(32&r),t.objsign=16==(16&r),t.reserved=8==(8&r),t.sslCA=4==(4&r),t.emailCA=2==(2&r),t.objCA=1==(1&r)}else if("subjectAltName"===t.name||"issuerAltName"===t.name){var f;t.altNames=[];u=i.fromDer(t.value);for(var h=0;h<u.value.length;++h){var p={type:(f=u.value[h]).type,value:f.value};switch(t.altNames.push(p),f.type){case 1:case 2:case 6:break;case 7:p.ip=n.util.bytesToIP(f.value);break;case 8:p.oid=i.derToOid(f.value)}}}else if("subjectKeyIdentifier"===t.name){u=i.fromDer(t.value);t.subjectKeyIdentifier=n.util.bytesToHex(u.value)}return t},a.certificationRequestFromAsn1=function(e,t){var r={},s=[];if(!i.validate(e,h,r,s))throw(c=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.")).errors=s,c;if(i.derToOid(r.publicKeyOid)!==a.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var u=a.createCertificationRequest();if(u.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,u.signatureOid=n.asn1.derToOid(r.csrSignatureOid),u.signatureParameters=d(u.signatureOid,r.csrSignatureParams,!0),u.siginfo.algorithmOid=n.asn1.derToOid(r.csrSignatureOid),u.siginfo.parameters=d(u.siginfo.algorithmOid,r.csrSignatureParams,!1),u.signature=r.csrSignature,u.certificationRequestInfo=r.certificationRequestInfo,t){var c;if(u.md=null,u.signatureOid in o)switch(o[u.signatureOid]){case"sha1WithRSAEncryption":u.md=n.md.sha1.create();break;case"md5WithRSAEncryption":u.md=n.md.md5.create();break;case"sha256WithRSAEncryption":u.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":u.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":u.md=n.md.sha512.create();break;case"RSASSA-PSS":u.md=n.md.sha256.create()}if(null===u.md)throw(c=new Error("Could not compute certification request digest. Unknown signature OID.")).signatureOid=u.signatureOid,c;var l=i.toDer(u.certificationRequestInfo);u.md.update(l.getBytes())}var f=n.md.sha1.create();return u.subject.getField=function(e){return p(u.subject,e)},u.subject.addField=function(e){g([e]),u.subject.attributes.push(e)},u.subject.attributes=a.RDNAttributesAsArray(r.certificationRequestInfoSubject,f),u.subject.hash=f.digest().toHex(),u.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),u.getAttribute=function(e){return p(u,e)},u.addAttribute=function(e){g([e]),u.attributes.push(e)},u.attributes=a.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),u},a.createCertificationRequest=function(){var e={version:0,signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return p(e.subject,t)},e.subject.addField=function(t){g([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return p(e,t)},e.addAttribute=function(t){g([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){g(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){g(t),e.attributes=t},e.sign=function(t,r){e.md=r||n.md.sha1.create();var s=o[e.md.algorithm+"WithRSAEncryption"];if(!s){var u=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=s,e.certificationRequestInfo=a.getCertificationRequestInfo(e);var c=i.toDer(e.certificationRequestInfo);e.md.update(c.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,r=e.md;if(null===r){if(e.signatureOid in o)switch(o[e.signatureOid]){case"sha1WithRSAEncryption":r=n.md.sha1.create();break;case"md5WithRSAEncryption":r=n.md.md5.create();break;case"sha256WithRSAEncryption":r=n.md.sha256.create();break;case"sha384WithRSAEncryption":r=n.md.sha384.create();break;case"sha512WithRSAEncryption":r=n.md.sha512.create();break;case"RSASSA-PSS":r=n.md.sha256.create()}if(null===r)throw(h=new Error("Could not compute certification request digest. Unknown signature OID.")).signatureOid=e.signatureOid,h;var s=e.certificationRequestInfo||a.getCertificationRequestInfo(e),u=i.toDer(s);r.update(u.getBytes())}if(null!==r){var c;switch(e.signatureOid){case o.sha1WithRSAEncryption:break;case o["RSASSA-PSS"]:var l,f,h;if(void 0===(l=o[e.signatureParameters.mgf.hash.algorithmOid])||void 0===n.md[l])throw(h=new Error("Unsupported MGF hash function.")).oid=e.signatureParameters.mgf.hash.algorithmOid,h.name=l,h;if(void 0===(f=o[e.signatureParameters.mgf.algorithmOid])||void 0===n.mgf[f])throw(h=new Error("Unsupported MGF function.")).oid=e.signatureParameters.mgf.algorithmOid,h.name=f,h;if(f=n.mgf[f].create(n.md[l].create()),void 0===(l=o[e.signatureParameters.hash.algorithmOid])||void 0===n.md[l])throw(h=new Error("Unsupported RSASSA-PSS hash function.")).oid=e.signatureParameters.hash.algorithmOid,h.name=l,h;c=n.pss.create(n.md[l].create(),f,e.signatureParameters.saltLength)}t=e.publicKey.verify(r.digest().getBytes(),e.signature,c)}return t},e};var E=new Date("1950-01-01T00:00:00Z"),S=new Date("2050-01-01T00:00:00Z");function C(e){return e>=E&&e<S?i.create(i.Class.UNIVERSAL,i.Type.UTCTIME,!1,i.dateToUtcTime(e)):i.create(i.Class.UNIVERSAL,i.Type.GENERALIZEDTIME,!1,i.dateToGeneralizedTime(e))}a.getTBSCertificate=function(e){var t=C(e.validity.notBefore),r=C(e.validity.notAfter),o=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(e.serialNumber)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.siginfo.algorithmOid).getBytes()),v(e.siginfo.algorithmOid,e.siginfo.parameters)]),y(e.issuer),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,r]),y(e.subject),a.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&o.value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.issuer.uniqueId)])),e.subject.uniqueId&&o.value.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!0,[i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.subject.uniqueId)])),e.extensions.length>0&&o.value.push(a.certificateExtensionsToAsn1(e.extensions)),o},a.getCertificationRequestInfo=function(e){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),y(e.subject),a.publicKeyToAsn1(e.publicKey),b(e)])},a.distinguishedNameToAsn1=function(e){return y(e)},a.certificateToAsn1=function(e){var t=e.tbsCertificate||a.getTBSCertificate(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),v(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},a.certificateExtensionsToAsn1=function(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),r=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;n<e.length;++n)r.value.push(a.certificateExtensionToAsn1(e[n]));return t},a.certificateExtensionToAsn1=function(e){var t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.id).getBytes())),e.critical&&t.value.push(i.create(i.Class.UNIVERSAL,i.Type.BOOLEAN,!1,String.fromCharCode(255)));var r=e.value;return"string"!=typeof e.value&&(r=i.toDer(r).getBytes()),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,r)),t},a.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||a.getCertificationRequestInfo(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),v(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},a.createCaStore=function(e){var t={certs:{}};function r(e){return o(e),t.certs[e.hash]||null}function o(e){if(!e.hash){var t=n.md.sha1.create();e.attributes=a.RDNAttributesAsArray(y(e),t),e.hash=t.digest().toHex()}}if(t.getIssuer=function(e){return r(e.issuer)},t.addCertificate=function(e){if("string"==typeof e&&(e=n.pki.certificateFromPem(e)),o(e.subject),!t.hasCertificate(e))if(e.subject.hash in t.certs){var r=t.certs[e.subject.hash];n.util.isArray(r)||(r=[r]),r.push(e),t.certs[e.subject.hash]=r}else t.certs[e.subject.hash]=e},t.hasCertificate=function(e){"string"==typeof e&&(e=n.pki.certificateFromPem(e));var t=r(e.subject);if(!t)return!1;n.util.isArray(t)||(t=[t]);for(var o=i.toDer(a.certificateToAsn1(e)).getBytes(),s=0;s<t.length;++s){if(o===i.toDer(a.certificateToAsn1(t[s])).getBytes())return!0}return!1},t.listAllCertificates=function(){var e=[];for(var r in t.certs)if(t.certs.hasOwnProperty(r)){var i=t.certs[r];if(n.util.isArray(i))for(var a=0;a<i.length;++a)e.push(i[a]);else e.push(i)}return e},t.removeCertificate=function(e){var s;if("string"==typeof e&&(e=n.pki.certificateFromPem(e)),o(e.subject),!t.hasCertificate(e))return null;var u=r(e.subject);if(!n.util.isArray(u))return s=t.certs[e.subject.hash],delete t.certs[e.subject.hash],s;for(var c=i.toDer(a.certificateToAsn1(e)).getBytes(),l=0;l<u.length;++l){c===i.toDer(a.certificateToAsn1(u[l])).getBytes()&&(s=u[l],u.splice(l,1))}return 0===u.length&&delete t.certs[e.subject.hash],s},e)for(var s=0;s<e.length;++s){var u=e[s];t.addCertificate(u)}return t},a.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},a.verifyCertificateChain=function(e,t,r){"function"==typeof r&&(r={verify:r}),r=r||{};var i=(t=t.slice(0)).slice(0),o=r.validityCheckDate;void 0===o&&(o=new Date);var s=!0,u=null,c=0;do{var l=t.shift(),f=null,h=!1;if(o&&(o<l.validity.notBefore||o>l.validity.notAfter)&&(u={message:"Certificate is not valid yet or has expired.",error:a.certificateError.certificate_expired,notBefore:l.validity.notBefore,notAfter:l.validity.notAfter,now:o}),null===u){if(null===(f=t[0]||e.getIssuer(l))&&l.isIssuer(l)&&(h=!0,f=l),f){var p=f;n.util.isArray(p)||(p=[p]);for(var d=!1;!d&&p.length>0;){f=p.shift();try{d=f.verify(l)}catch(e){}}d||(u={message:"Certificate signature is invalid.",error:a.certificateError.bad_certificate})}null!==u||f&&!h||e.hasCertificate(l)||(u={message:"Certificate is not trusted.",error:a.certificateError.unknown_ca})}if(null===u&&f&&!l.isIssuer(f)&&(u={message:"Certificate issuer is invalid.",error:a.certificateError.bad_certificate}),null===u)for(var y={keyUsage:!0,basicConstraints:!0},g=0;null===u&&g<l.extensions.length;++g){var m=l.extensions[g];m.critical&&!(m.name in y)&&(u={message:"Certificate has an unsupported critical extension.",error:a.certificateError.unsupported_certificate})}if(null===u&&(!s||0===t.length&&(!f||h))){var v=l.getExtension("basicConstraints"),b=l.getExtension("keyUsage");if(null!==b&&(b.keyCertSign&&null!==v||(u={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:a.certificateError.bad_certificate})),null!==u||null===v||v.cA||(u={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:a.certificateError.bad_certificate}),null===u&&null!==b&&"pathLenConstraint"in v)c-1>v.pathLenConstraint&&(u={message:"Certificate basicConstraints pathLenConstraint violated.",error:a.certificateError.bad_certificate})}var E=null===u||u.error,S=r.verify?r.verify(E,c,i):E;if(!0!==S)throw!0===E&&(u={message:"The application rejected the certificate.",error:a.certificateError.bad_certificate}),(S||0===S)&&("object"!=typeof S||n.util.isArray(S)?"string"==typeof S&&(u.error=S):(S.message&&(u.message=S.message),S.error&&(u.error=S.error))),u;u=null,s=!1,++c}while(t.length>0);return!0}},function(e,t,r){var n=r(0);r(7),r(1),(e.exports=n.pss=n.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t,r=e.md,i=e.mgf,a=r.digestLength,o=e.salt||null;if("string"==typeof o&&(o=n.util.createBuffer(o)),"saltLength"in e)t=e.saltLength;else{if(null===o)throw new Error("Salt length not specified or specific salt not given.");t=o.length()}if(null!==o&&o.length()!==t)throw new Error("Given salt length does not match length of given salt.");var s=e.prng||n.random,u={encode:function(e,u){var c,l,f=u-1,h=Math.ceil(f/8),p=e.digest().getBytes();if(h<a+t+2)throw new Error("Message is too long to encrypt.");l=null===o?s.getBytesSync(t):o.bytes();var d=new n.util.ByteBuffer;d.fillWithByte(0,8),d.putBytes(p),d.putBytes(l),r.start(),r.update(d.getBytes());var y=r.digest().getBytes(),g=new n.util.ByteBuffer;g.fillWithByte(0,h-t-a-2),g.putByte(1),g.putBytes(l);var m=g.getBytes(),v=h-a-1,b=i.generate(y,v),E="";for(c=0;c<v;c++)E+=String.fromCharCode(m.charCodeAt(c)^b.charCodeAt(c));var S=65280>>8*h-f&255;return(E=String.fromCharCode(E.charCodeAt(0)&~S)+E.substr(1))+y+String.fromCharCode(188)},verify:function(e,o,s){var u,c=s-1,l=Math.ceil(c/8);if(o=o.substr(-l),l<a+t+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(188!==o.charCodeAt(l-1))throw new Error("Encoded message does not end in 0xBC.");var f=l-a-1,h=o.substr(0,f),p=o.substr(f,a),d=65280>>8*l-c&255;if(0!=(h.charCodeAt(0)&d))throw new Error("Bits beyond keysize not zero as expected.");var y=i.generate(p,f),g="";for(u=0;u<f;u++)g+=String.fromCharCode(h.charCodeAt(u)^y.charCodeAt(u));g=String.fromCharCode(g.charCodeAt(0)&~d)+g.substr(1);var m=l-a-t-2;for(u=0;u<m;u++)if(0!==g.charCodeAt(u))throw new Error("Leftmost octets not zero as expected");if(1!==g.charCodeAt(m))throw new Error("Inconsistent PSS signature, 0x01 marker not found");var v=g.substr(-t),b=new n.util.ByteBuffer;return b.fillWithByte(0,8),b.putBytes(e),b.putBytes(v),r.start(),r.update(b.getBytes()),p===r.digest().getBytes()}};return u}},function(e,t,r){var n=r(0);r(4),r(1);var i=e.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=i,i.create=function(){c||function(){a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],s=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],u=new Array(64);for(var e=0;e<64;++e)u[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)));c=!0}();var e=null,t=n.util.createBuffer(),r=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,a=0;a<r;++a)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},i}};return i.start(),i.update=function(a,o){"utf8"===o&&(a=n.util.encodeUtf8(a));var s=a.length;i.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=s[1],s[1]=s[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),l(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var o=n.util.createBuffer();o.putBytes(t.bytes());var s=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-s));for(var u,c=0,f=i.fullMessageLength.length-1;f>=0;--f)c=(u=8*i.fullMessageLength[f]+c)/4294967296>>>0,o.putInt32Le(u>>>0);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};l(h,r,o);var p=n.util.createBuffer();return p.putInt32Le(h.h0),p.putInt32Le(h.h1),p.putInt32Le(h.h2),p.putInt32Le(h.h3),p},i};var a=null,o=null,s=null,u=null,c=!1;function l(e,t,r){for(var n,i,a,c,l,f,h,p=r.length();p>=64;){for(i=e.h0,a=e.h1,c=e.h2,l=e.h3,h=0;h<16;++h)t[h]=r.getInt32Le(),n=i+(l^a&(c^l))+u[h]+t[h],i=l,l=c,c=a,a+=n<<(f=s[h])|n>>>32-f;for(;h<32;++h)n=i+(c^l&(a^c))+u[h]+t[o[h]],i=l,l=c,c=a,a+=n<<(f=s[h])|n>>>32-f;for(;h<48;++h)n=i+(a^c^l)+u[h]+t[o[h]],i=l,l=c,c=a,a+=n<<(f=s[h])|n>>>32-f;for(;h<64;++h)n=i+(c^(a|~l))+u[h]+t[o[h]],i=l,l=c,c=a,a+=n<<(f=s[h])|n>>>32-f;e.h0=e.h0+i|0,e.h1=e.h1+a|0,e.h2=e.h2+c|0,e.h3=e.h3+l|0,p-=64}}},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e,t){return new URL(e,t).toString()}},function(e,t,r){"use strict";t.__esModule=!0;var n=new RegExp('((?!\\\\)"\\w+"):\\s*(-?[\\d|\\.]{14,})',"g");t.default=function(e){return JSON.parse(e.replace(n,'$1:"$2"'))}},function(e,t,r){"use strict";t.__esModule=!0;var n=["amount","matcherFee","price","minSponsoredAssetFee","fee","quantity","sellMatcherFee","buyMatcherFee"];t.default=function(e){return JSON.stringify(e,(function(e,t){return n.includes(e)&&t||"value"===e&&"integer"===this.type?"!"+t+"!":"minSponsoredAssetFee"===e&&null==t?null:t}),0).replace(/"\!(-?\d+)\!"/g,"$1")}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.DATA_FIELD_TYPE=t.TRANSACTION_TYPE=t.BINARY_DATA_TYPE=t.STRING_DATA_TYPE=t.BOOLEAN_DATA_TYPE=t.INTEGER_DATA_TYPE=t.ETHEREUM=t.UPDATE_ASSET_INFO_TYPE=t.INVOKE_SCRIPT_TYPE=t.SET_ASSET_SCRIPT_TYPE=t.SPONSORSHIP_TYPE=t.SET_SCRIPT_TYPE=t.DATA_TYPE=t.MASS_TRANSFER_TYPE=t.ALIAS_TYPE=t.CANCEL_LEASE_TYPE=t.LEASE_TYPE=t.EXCHANGE_TYPE=t.BURN_TYPE=t.REISSUE_TYPE=t.TRANSFER_TYPE=t.ISSUE_TYPE=t.PAYMENT_TYPE=t.GENESIS_TYPE=void 0,i(r(99),t),i(r(100),t),t.GENESIS_TYPE=1,t.PAYMENT_TYPE=2,t.ISSUE_TYPE=3,t.TRANSFER_TYPE=4,t.REISSUE_TYPE=5,t.BURN_TYPE=6,t.EXCHANGE_TYPE=7,t.LEASE_TYPE=8,t.CANCEL_LEASE_TYPE=9,t.ALIAS_TYPE=10,t.MASS_TRANSFER_TYPE=11,t.DATA_TYPE=12,t.SET_SCRIPT_TYPE=13,t.SPONSORSHIP_TYPE=14,t.SET_ASSET_SCRIPT_TYPE=15,t.INVOKE_SCRIPT_TYPE=16,t.UPDATE_ASSET_INFO_TYPE=17,t.ETHEREUM=18,t.INTEGER_DATA_TYPE="integer",t.BOOLEAN_DATA_TYPE="boolean",t.STRING_DATA_TYPE="string",t.BINARY_DATA_TYPE="binary",t.TRANSACTION_TYPE={GENESIS:t.GENESIS_TYPE,PAYMENT:t.PAYMENT_TYPE,ISSUE:t.ISSUE_TYPE,TRANSFER:t.TRANSFER_TYPE,REISSUE:t.REISSUE_TYPE,BURN:t.BURN_TYPE,EXCHANGE:t.EXCHANGE_TYPE,LEASE:t.LEASE_TYPE,CANCEL_LEASE:t.CANCEL_LEASE_TYPE,ALIAS:t.ALIAS_TYPE,MASS_TRANSFER:t.MASS_TRANSFER_TYPE,DATA:t.DATA_TYPE,SET_SCRIPT:t.SET_SCRIPT_TYPE,SPONSORSHIP:t.SPONSORSHIP_TYPE,SET_ASSET_SCRIPT:t.SET_ASSET_SCRIPT_TYPE,INVOKE_SCRIPT:t.INVOKE_SCRIPT_TYPE,UPDATE_ASSET_INFO:t.UPDATE_ASSET_INFO_TYPE,ETHEREUM:t.ETHEREUM},t.DATA_FIELD_TYPE={INTEGER:t.INTEGER_DATA_TYPE,BOOLEAN:t.BOOLEAN_DATA_TYPE,STRING:t.STRING_DATA_TYPE,BINARY:t.BINARY_DATA_TYPE}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(3),i=r(16),a=r(31);t.default=function(e,t,r){var o=!Array.isArray(t),s=Date.now(),u=[],c=r&&r.confirmations||0,l=r&&r.maxWaitTime||0,f=r&&r.requestInterval||250,h=function(t){return i.fetchStatus(e,t.map(n.prop("id"))).then((function(e){var r=n.indexBy(n.prop("id"),e.statuses);if(t.some((function(e){return r[e.id].status===a.TRANSACTION_STATUSES.NOT_FOUND})))throw new Error("One transaction is not in blockchain!");var i=t.filter((function(e){return!(r[e.id].confirmations>=c)||(u.push(e),!1)}));if(i.length)return l&&Date.now()-s>l?Promise.reject("Timeout error!"):n.wait(f).then((function(){return h(i)}))}))};return h(n.toArray(t)).then((function(){return o?n.head(u):u}))}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=r(32),a=n(r(54)),o=r(3);t.default=function(e,t){return i.fetchDetails(e,a.default(t)).then((function(e){return o.indexBy(o.prop("assetId"),e)}))}},function(e,t,r){"use strict";var n,i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e};t.__esModule=!0;var o=r(3),s=r(31),u=o.switchTransactionByType(((n={})[s.NAME_MAP.transfer]=function(e){return[e.assetId,e.feeAssetId]},n[s.NAME_MAP.burn]=function(e){return[e.assetId]},n[s.NAME_MAP.reissue]=function(e){return[e.assetId]},n[s.NAME_MAP.exchange]=function(e){return Array.from(new Set([e.order1.assetPair.amountAsset,e.order1.assetPair.priceAsset,3===e.order1.version?e.order1.matcherFeeAssetId:null,3===e.order2.version?e.order2.matcherFeeAssetId:null]))},n[s.NAME_MAP.massTransfer]=function(e){return[e.assetId]},n[s.NAME_MAP.setAssetScript]=function(e){return[e.assetId]},n[s.NAME_MAP.sponsorship]=function(e){return[e.assetId]},n[s.NAME_MAP.invoke]=function(e){return a((e.payment||[]).map(o.prop("assetId")),[e.feeAssetId])},n[s.NAME_MAP.updateAsset]=function(e){return[e.assetId]},n));t.default=function(e){return o.toArray(e).reduce((function(e,t){return e.concat(u(t)||[])}),[]).filter((function(e){return null!=e}))}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(30);t.default=function(e){return n.fetchHeadersLast(e).then((function(e){return function(e){var t,r,n,i,o;if(0===e.length)return new Uint8Array(0);o=void 0,i=void 0,t=[0],o=0;for(;o<e.length;){if(!((r=e[o])in a))throw"Base58.decode received unacceptable input. Character '"+r+"' is not in the Base58 alphabet.";for(i=0;i<t.length;)t[i]*=58,i++;for(t[0]+=a[r],n=0,i=0;i<t.length;)t[i]+=n,n=t[i]>>8,t[i]&=255,++i;for(;n;)t.push(255&n),n>>=8;o++}o=0;for(;"1"===e[o]&&o<e.length-1;)t.push(0),o++;return new Uint8Array(t.reverse())}(e.generator)[1]}))};for(var i="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",a={},o=0;o<i.length;o++)a[i.charAt(o)]=o},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.create=t.ethTxId2waves=t.wavesAsset2Eth=t.ethAddress2waves=t.wavesAddress2eth=void 0;var i=n(r(57));t.wavesAddress2eth=i.default;var a=n(r(84));t.ethAddress2waves=a.default;var o=n(r(85));t.wavesAsset2Eth=o.default;var s=n(r(86));t.ethTxId2waves=s.default;var u=r(87);t.create=u.create,t.default=u.create},function(e,t,r){"use strict";t.__esModule=!0;var n=r(17);t.default=function(e){var t=n.base58Decode(e),r=t.slice(2,t.byteLength-4);return"0x"+n.base16Encode(r)}},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),o=n[0],s=n[1],u=new a(function(e,t,r){return 3*(t+r)/4-r}(0,o,s)),l=0,f=s>0?o-4:o;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=0,s=r-i;o<s;o+=16383)a.push(l(e,o,o+16383>s?s:o+16383));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s<u;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var i,a,o=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
9
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
10
+ t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,p=e[t+f];for(f+=h,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+f],f+=h,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+f],f+=h,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,u,c=8*a-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=l?(s=0,o=l):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*y}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(62),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(13))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,a,o,s,u=1,c={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){d(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){d(e.data)},n=function(e){a.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,n=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(d,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&d(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(o+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return c[u]=i,n(u),u++},h.clearImmediate=p}function p(e){delete c[e]}function d(e){if(l)setTimeout(d,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{p(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(13),r(19))},function(e,t,r){(function(t){var r={};e.exports=r;var n={};r.encode=function(e,t,r){if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(e instanceof Uint8Array){var i=0,a=t.length,o=t.charAt(0),s=[0];for(i=0;i<e.length;++i){for(var u=0,c=e[i];u<s.length;++u)c+=s[u]<<8,s[u]=c%a,c=c/a|0;for(;c>0;)s.push(c%a),c=c/a|0}for(i=0;0===e[i]&&i<e.length-1;++i)n+=o;for(i=s.length-1;i>=0;--i)n+=t[s[i]]}else n=function(e,t){var r=0,n=t.length,i=t.charAt(0),a=[0];for(r=0;r<e.length();++r){for(var o=0,s=e.at(r);o<a.length;++o)s+=a[o]<<8,a[o]=s%n,s=s/n|0;for(;s>0;)a.push(s%n),s=s/n|0}var u="";for(r=0;0===e.at(r)&&r<e.length()-1;++r)u+=i;for(r=a.length-1;r>=0;--r)u+=t[a[r]];return u}(e,t);if(r){var l=new RegExp(".{1,"+r+"}","g");n=n.match(l).join("\r\n")}return n},r.decode=function(e,r){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if("string"!=typeof r)throw new TypeError('"alphabet" must be a string.');var i=n[r];if(!i){i=n[r]=[];for(var a=0;a<r.length;++a)i[r.charCodeAt(a)]=a}e=e.replace(/\s/g,"");var o=r.length,s=r.charAt(0),u=[0];for(a=0;a<e.length;a++){var c=i[e.charCodeAt(a)];if(void 0===c)return;for(var l=0,f=c;l<u.length;++l)f+=u[l]*o,u[l]=255&f,f>>=8;for(;f>0;)u.push(255&f),f>>=8}for(var h=0;e[h]===s&&h<e.length-1;++h)u.push(0);return void 0!==t?t.from(u.reverse()):new Uint8Array(u.reverse())}}).call(this,r(12).Buffer)},function(e,t,r){(function(t){var n=r(0);r(1);var i=null;!n.util.isNodejs||n.options.usePureJavaScript||t.versions["node-webkit"]||(i=r(25)),(e.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,a=new Array(32),o=0;o<32;++o)a[o]=r.create();function s(){if(t.pools[0].messageLength>=32)return u();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),u()}function u(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var r=1,n=0;n<32;++n)t.reseeds%r==0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var i=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function c(e){var t=null,r=n.util.globalScope,i=r.crypto||r.msCrypto;i&&i.getRandomValues&&(t=function(e){return i.getRandomValues(e)});var a=n.util.createBuffer();if(t)for(;a.length()<e;){var o=Math.max(1,Math.min(e-a.length(),65536)/4),s=new Uint32Array(Math.floor(o));try{t(s);for(var u=0;u<s.length;++u)a.putInt32(s[u])}catch(e){if(!("undefined"!=typeof QuotaExceededError&&e instanceof QuotaExceededError))throw e}}if(a.length()<e)for(var c,l,f,h=Math.floor(65536*Math.random());a.length()<e;){l=16807*(65535&h),l+=(32767&(c=16807*(h>>16)))<<16,h=4294967295&(l=(2147483647&(l+=c>>15))+(l>>31));for(u=0;u<3;++u)f=h>>>(u<<3),f^=Math.floor(256*Math.random()),a.putByte(String.fromCharCode(255&f))}return a.getBytes(e)}return t.pools=a,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e);var i=t.plugin.cipher,a=t.plugin.increment,o=t.plugin.formatKey,s=t.plugin.formatSeed,c=n.util.createBuffer();t.key=null,function l(f){if(f)return r(f);if(c.length()>=e)return r(null,c.getBytes(e));t.generated>1048575&&(t.key=null);if(null===t.key)return n.util.nextTick((function(){!function(e){if(t.pools[0].messageLength>=32)return u(),e();var r=32-t.pools[0].messageLength<<5;t.seedFile(r,(function(r,n){if(r)return e(r);t.collect(n),u(),e()}))}(l)}));var h=i(t.key,t.seed);t.generated+=h.length,c.putBytes(h),t.key=o(i(t.key,a(t.seed))),t.seed=s(i(t.key,t.seed)),n.util.setImmediate(l)}()},t.generateSync=function(e){var r=t.plugin.cipher,i=t.plugin.increment,a=t.plugin.formatKey,o=t.plugin.formatSeed;t.key=null;for(var u=n.util.createBuffer();u.length()<e;){t.generated>1048575&&(t.key=null),null===t.key&&s();var c=r(t.key,t.seed);t.generated+=c.length,u.putBytes(c),t.key=a(r(t.key,i(t.seed))),t.seed=o(r(t.key,t.seed))}return u.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,(function(e,r){if(e)return t(e);t(null,r.toString())}))},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,c(e))}catch(e){t(e)}},t.seedFileSync=c),t.collect=function(e){for(var r=e.length,n=0;n<r;++n)t.pools[t.pool].update(e.substr(n,1)),t.pool=31===t.pool?0:t.pool+1},t.collectInt=function(e,r){for(var n="",i=0;i<r;i+=8)n+=String.fromCharCode(e>>i&255);t.collect(n)},t.registerWorker=function(e){if(e===self)t.seedFile=function(e,t){self.addEventListener("message",(function e(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:e}}})};else{e.addEventListener("message",(function(r){var n=r.data;n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,(function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})}))}))}},t}}).call(this,r(19))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",i=n.split("").reduce((function(e,t,r){return e[t]=r,e}),{});t.default={encode:function(e){if(!e.length)return"";for(var t=[0],r=0;r<e.length;r++){for(var i=0;i<t.length;i++)t[i]<<=8;t[0]+=e[r];for(var a=0,o=0;o<t.length;o++)t[o]+=a,a=t[o]/58|0,t[o]%=58;for(;a;)t.push(a%58),a=a/58|0}for(r=0;0===e[r]&&r<e.length-1;r++)t.push(0);return t.reverse().map((function(e){return n[e]})).join("")},decode:function(e){if(!e.length)return new Uint8Array(0);for(var t=[0],r=0;r<e.length;r++){var n=e[r];if(!(n in i))throw'There is no character "'+n+'" in the Base58 sequence!';for(var a=0;a<t.length;a++)t[a]*=58;t[0]+=i[n];var o=0;for(a=0;a<t.length;a++)t[a]+=o,o=t[a]>>8,t[a]&=255;for(;o;)t.push(255&o),o>>=8}for(r=0;"1"===e[r]&&r<e.length-1;r++)t.push(0);return new Uint8Array(t.reverse())}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i,a;t.utf8ArrayToStr=(n=new Array(128),i=String.fromCodePoint||String.fromCharCode,a=[],function(e){var t,r,o=e.length;a.length=0;for(var s=0;s<o;)(r=e[s++])<=127?t=r:r<=223?t=(31&r)<<6|63&e[s++]:r<=239?t=(15&r)<<12|(63&e[s++])<<6|63&e[s++]:String.fromCodePoint?t=(7&r)<<18|(63&e[s++])<<12|(63&e[s++])<<6|63&e[s++]:(t=63,s+=3),a.push(n[t]||(n[t]=i(t)));return a.join("")}),t.strToUtf8Array=function(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t.push(n):n<2048?t.push(192|n>>6,128|63&n):n<55296||n>=57344?t.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&e.charCodeAt(r)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return Uint8Array.from(t)}},function(e,t,r){"use strict";
11
+ /**
12
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
13
+ *
14
+ * @version 0.5.7
15
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
16
+ * @copyright Chen, Yi-Cyuan 2015-2016
17
+ * @license MIT
18
+ */t.__esModule=!0;for(var n="0123456789abcdef".split(""),i=[0,8,16,24],a=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],o=[224,256,384,512],s=["hex","buffer","arrayBuffer","array"],u=function(e,t,r){return function(n){return new b(e,t,e).update(n)[r]()}},c=function(e,t,r){return function(n,i){return new b(e,t,i).update(n)[r]()}},l=function(e,t){var r=u(e,t,"hex");r.create=function(){return new b(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n<s.length;++n){var i=s[n];r[i]=u(e,t,i)}return r},f=[{name:"keccak",padding:[1,256,65536,16777216],bits:o,createMethod:l},{name:"sha3",padding:[6,1536,393216,100663296],bits:o,createMethod:l},{name:"shake",padding:[31,7936,2031616,520093696],bits:[128,256],createMethod:function(e,t){var r=c(e,t,"hex");r.create=function(r){return new b(e,t,r)},r.update=function(e,t){return r.create(t).update(e)};for(var n=0;n<s.length;++n){var i=s[n];r[i]=c(e,t,i)}return r}}],h={},p=[],d=0;d<f.length;++d)for(var y=f[d],g=y.bits,m=0;m<g.length;++m){var v=y.name+"_"+g[m];p.push(v),h[v]=y.createMethod(g[m],y.padding)}function b(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}b.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,a=e.length,o=this.blocks,s=this.byteCount,u=this.blockCount,c=0,l=this.s;c<a;){if(this.reset)for(this.reset=!1,o[0]=this.block,r=1;r<u+1;++r)o[r]=0;if(t)for(r=this.start;c<a&&r<s;++c)o[r>>2]|=e[c]<<i[3&r++];else for(r=this.start;c<a&&r<s;++c)(n=e.charCodeAt(c))<128?o[r>>2]|=n<<i[3&r++]:n<2048?(o[r>>2]|=(192|n>>6)<<i[3&r++],o[r>>2]|=(128|63&n)<<i[3&r++]):n<55296||n>=57344?(o[r>>2]|=(224|n>>12)<<i[3&r++],o[r>>2]|=(128|n>>6&63)<<i[3&r++],o[r>>2]|=(128|63&n)<<i[3&r++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++c)),o[r>>2]|=(240|n>>18)<<i[3&r++],o[r>>2]|=(128|n>>12&63)<<i[3&r++],o[r>>2]|=(128|n>>6&63)<<i[3&r++],o[r>>2]|=(128|63&n)<<i[3&r++]);if(this.lastByteIndex=r,r>=s){for(this.start=r-s,this.block=o[u],r=0;r<u;++r)l[r]^=o[r];E(l),this.reset=!0}else this.start=r}return this},b.prototype.finalize=function(){var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];E(n)},b.prototype.toString=b.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,i=this.outputBlocks,a=this.extraBytes,o=0,s=0,u="";s<i;){for(o=0;o<t&&s<i;++o,++s)e=r[o],u+=n[e>>4&15]+n[15&e]+n[e>>12&15]+n[e>>8&15]+n[e>>20&15]+n[e>>16&15]+n[e>>28&15]+n[e>>24&15];s%t==0&&(E(r),o=0)}return a&&(e=r[o],a>0&&(u+=n[e>>4&15]+n[15&e]),a>1&&(u+=n[e>>12&15]+n[e>>8&15]),a>2&&(u+=n[e>>20&15]+n[e>>16&15])),u},b.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,a=0,o=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);o<n;){for(a=0;a<t&&o<n;++a,++o)u[o]=r[a];o%t==0&&E(r)}return i&&(u[a]=r[a],e=e.slice(0,s)),e},b.prototype.buffer=b.prototype.arrayBuffer,b.prototype.digest=b.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,a=this.extraBytes,o=0,s=0,u=[];s<i;){for(o=0;o<r&&s<i;++o,++s)e=s<<2,t=n[o],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&E(n)}return a&&(e=s<<2,t=n[o],a>0&&(u[e]=255&t),a>1&&(u[e+1]=t>>8&255),a>2&&(u[e+2]=t>>16&255)),u};var E=function(e){var t,r,n,i,o,s,u,c,l,f,h,p,d,y,g,m,v,b,E,S,C,T,A,I,w,B,_,N,R,k,U,P,O,L,D,M,x,V,K,j,F,q,G,z,H,Y,Q,W,X,J,Z,$,ee,te,re,ne,ie,ae,oe,se,ue,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),r=(d=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|l>>>31),r=o^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(f<<1|h>>>31),r=u^(h<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(p<<1|d>>>31),r=l^(d<<1|p>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|o>>>31),r=h^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,y=e[0],g=e[1],Y=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,N=e[20]<<3|e[21]>>>29,R=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,k=e[33]<<13|e[32]>>>19,U=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,M=e[14]<<6|e[15]>>>26,x=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,E=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,O=e[44]<<29|e[45]>>>3,I=e[6]<<28|e[7]>>>4,w=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,V=e[26]<<25|e[27]>>>7,K=e[27]<<25|e[26]>>>7,S=e[36]<<21|e[37]>>>11,C=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,z=e[8]<<27|e[9]>>>5,H=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,_=e[19]<<20|e[18]>>>12,ae=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,j=e[38]<<8|e[39]>>>24,F=e[39]<<8|e[38]>>>24,T=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=y^~m&b,e[1]=g^~v&E,e[10]=I^~B&N,e[11]=w^~_&R,e[20]=L^~M&V,e[21]=D^~x&K,e[30]=z^~Y&W,e[31]=H^~Q&X,e[40]=te^~ne&ae,e[41]=re^~ie&oe,e[2]=m^~b&S,e[3]=v^~E&C,e[12]=B^~N&k,e[13]=_^~R&U,e[22]=M^~V&j,e[23]=x^~K&F,e[32]=Y^~W&J,e[33]=Q^~X&Z,e[42]=ne^~ae&se,e[43]=ie^~oe&ue,e[4]=b^~S&T,e[5]=E^~C&A,e[14]=N^~k&P,e[15]=R^~U&O,e[24]=V^~j&q,e[25]=K^~F&G,e[34]=W^~J&$,e[35]=X^~Z&ee,e[44]=ae^~se&ce,e[45]=oe^~ue&le,e[6]=S^~T&y,e[7]=C^~A&g,e[16]=k^~P&I,e[17]=U^~O&w,e[26]=j^~q&L,e[27]=F^~G&D,e[36]=J^~$&z,e[37]=Z^~ee&H,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=T^~y&m,e[9]=A^~g&v,e[18]=P^~I&B,e[19]=O^~w&_,e[28]=q^~L&M,e[29]=G^~D&x,e[38]=$^~z&Y,e[39]=ee^~H&Q,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=a[n],e[1]^=a[n+1]};t.keccak256=h.keccak_256},function(e,t,r){"use strict";(function(e){t.__esModule=!0;function r(e,t,r){var n=e[t]+e[r],i=e[t+1]+e[r+1];n>=4294967296&&i++,e[t]=n,e[t+1]=i}function n(e,t,r,n){var i=e[t]+r;r<0&&(i+=4294967296);var a=e[t+1]+n;i>=4294967296&&a++,e[t]=i,e[t+1]=a}function i(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function a(e,t,i,a,o,s){var l=c[o],f=c[o+1],h=c[s],p=c[s+1];r(u,e,t),n(u,e,l,f);var d=u[a]^u[e],y=u[a+1]^u[e+1];u[a]=y,u[a+1]=d,r(u,i,a),d=u[t]^u[i],y=u[t+1]^u[i+1],u[t]=d>>>24^y<<8,u[t+1]=y>>>24^d<<8,r(u,e,t),n(u,e,h,p),d=u[a]^u[e],y=u[a+1]^u[e+1],u[a]=d>>>16^y<<16,u[a+1]=y>>>16^d<<16,r(u,i,a),d=u[t]^u[i],y=u[t+1]^u[i+1],u[t]=y>>>31^d<<1,u[t+1]=d>>>31^y<<1}var o=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),s=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),u=new Uint32Array(32),c=new Uint32Array(32);function l(e,t){var r=0;for(r=0;r<16;r++)u[r]=e.h[r],u[r+16]=o[r];for(u[24]=u[24]^e.t,u[25]=u[25]^e.t/4294967296,t&&(u[28]=~u[28],u[29]=~u[29]),r=0;r<32;r++)c[r]=i(e.b,4*r);for(r=0;r<12;r++)a(0,8,16,24,s[16*r+0],s[16*r+1]),a(2,10,18,26,s[16*r+2],s[16*r+3]),a(4,12,20,28,s[16*r+4],s[16*r+5]),a(6,14,22,30,s[16*r+6],s[16*r+7]),a(0,10,20,30,s[16*r+8],s[16*r+9]),a(2,12,22,24,s[16*r+10],s[16*r+11]),a(4,14,16,26,s[16*r+12],s[16*r+13]),a(6,8,18,28,s[16*r+14],s[16*r+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^u[r]^u[r+16]}function f(e,t){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");for(var r={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e},n=0;n<16;n++)r.h[n]=o[n];var i=t?t.length:0;return r.h[0]^=16842752^i<<8^e,t&&(h(r,t),r.c=128),r}function h(e,t){for(var r=0;r<t.length;r++)128===e.c&&(e.t+=e.c,l(e,!1),e.c=0),e.b[e.c++]=t[r]}function p(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;l(e,!0);for(var t=new Uint8Array(e.outlen),r=0;r<e.outlen;r++)t[r]=e.h[r>>2]>>8*(3&r);return t}function d(t,r,n){n=n||64,t=function(t){var r;if(t instanceof Uint8Array)r=t;else if(t instanceof e)r=new Uint8Array(t);else{if("string"!=typeof t)throw new Error("Input must be an string, Buffer or Uint8Array");r=new Uint8Array(e.from(t,"utf8"))}return r}(t);var i=f(n,r);return h(i,t),p(i)}t.blake2bInit=f,t.blake2bUpdate=h,t.blake2bFinal=p,t.blake2b=d,t.blake2bHex=function(e,t,r){var n,i=d(e,t,r);return n=i,Array.prototype.map.call(n,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")}}).call(this,r(12).Buffer)},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(21)),a=r(6),o=r(28),s=r(27),u=r(18);t.signBytes=function(e,t,r){return i.default.sign(a._fromIn(o.isPrivateKey(e)?e.privateKey:s.privateKey(e)),a._fromIn(t),a._fromIn(r||u.randomBytes(64)))}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(15),a=r(39),o=r(6),s=r(8),u=r(27),c=n(r(21));t.verifyAddress=function(e,t){var r=t?t.chainId:void 0;try{var n=o._fromIn(e);if(1!=n[0]||r&&n[1]!=a.ChaidId.toNumber(r))return!1;for(var i=n.slice(0,22),c=n.slice(22,26),l=s._hashChain(i).slice(0,4),f=0;f<4;f++)if(c[f]!=l[f])return!1;if(t&&t.publicKey){var h=u.address({publicKey:t.publicKey},r);if(n.length!==h.length)return!1;for(f=0;f<h.length;f++)if(h[f]!==n[f])return!1}}catch(e){return!1}return!0},t.verifySignature=function(e,t,r){try{return c.default.verify(o._fromIn(e),o._fromIn(t),o._fromIn(r))}catch(e){return!1}},t.verifyPublicKey=function(e){return o._fromIn(e).length===i.PUBLIC_KEY_LENGTH}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){e.done?i(e.value):new r((function(t){t(e.value)})).then(o,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},o=this;Object.defineProperty(t,"__esModule",{value:!0});var s=a(r(72)),u=a(r(4)),c=a(r(47)),l=a(r(1)),f=r(20),h=r(5),p=a(r(80));s.oids.sha224="2.16.840.1.101.3.4.2.4",s.oids["2.16.840.1.101.3.4.2.4"]="sha224",s.oids["sha3-224"]="2.16.840.1.101.3.4.2.7",s.oids["2.16.840.1.101.3.4.2.7"]="sha3-224",s.oids["sha3-256"]="2.16.840.1.101.3.4.2.8",s.oids["2.16.840.1.101.3.4.2.8"]="sha3-256",s.oids["sha3-384"]="2.16.840.1.101.3.4.2.9",s.oids["2.16.840.1.101.3.4.2.9"]="sha3-384",s.oids["sha3-512"]="2.16.840.1.101.3.4.2.10",s.oids["2.16.840.1.101.3.4.2.10"]="sha3-512",t.pemToBytes=function(e){return f.base64Decode(e.trim().split(/\r\n|\n/).slice(1,-1).join("").trim())};var d={rsaPrivateNonEncrypted:"RSA PRIVATE KEY",rsaPublic:"PUBLIC KEY"};t.bytesToPem=function(e,t){var r="-----BEGIN "+d[t]+"-----\n",n="-----END "+d[t]+"-----\n",i=f.base64Encode(e);i.length%64!=0&&(i+=" ".repeat(64-i.length%64));for(var a=r,o=0;o<i.length/64;o++)a+=i.slice(64*o,64*(o+1))+"\n";return a+=n},t.rsaKeyPairSync=function(e,r){var n=s.rsa.generateKeyPair(e,r);return{rsaPrivate:t.pemToBytes(s.privateKeyToPem(n.privateKey)),rsaPublic:t.pemToBytes(s.publicKeyToPem(n.publicKey))}},t.rsaKeyPair=function(e,r){return n(o,void 0,void 0,(function(){return i(this,(function(n){return[2,new Promise((function(n,i){s.rsa.generateKeyPair(e,r,(function(e,r){e&&i(e),n({rsaPrivate:t.pemToBytes(s.privateKeyToPem(r.privateKey)),rsaPublic:t.pemToBytes(s.publicKeyToPem(r.publicKey))})}))}))]}))}))};var y,g=function(){function e(e,t){this.sha3Digest=e,this.algorithm=t}return e.makeCreator=function(t,r){return{create:function(){return new e(t.create(),r)}}},e.prototype.update=function(e,t){return this.sha3Digest.update(h.stringToBytes(e,null==t?"raw":t)),this},e.prototype.digest=function(){var e=Uint8Array.from(this.sha3Digest.digest());return l.createBuffer(h.bytesToString(e,"raw"))},e}(),m={MD5:c,SHA1:u.algorithms.sha1,SHA224:(y="SHA224",function(){throw new Error("Digest "+y+" is unsupported")}),SHA256:u.algorithms.sha256,SHA384:u.algorithms.sha384,SHA512:u.algorithms.sha512,"SHA3-224":g.makeCreator(p.sha3_224,"sha3-224"),"SHA3-256":g.makeCreator(p.sha3_256,"sha3-256"),"SHA3-384":g.makeCreator(p.sha3_384,"sha3-384"),"SHA3-512":g.makeCreator(p.sha3_512,"sha3-512")};t.rsaSign=function(e,r,n){void 0===n&&(n="SHA256");var i=t.bytesToPem(e,"rsaPrivateNonEncrypted"),a=s.privateKeyFromPem(i),o=m[n].create();return o.update(h.bytesToString(r,"raw")),h.stringToBytes(a.sign(o),"raw")},t.rsaVerify=function(e,r,n,i){void 0===i&&(i="SHA256");var a=s.publicKeyFromPem(t.bytesToPem(e,"rsaPublic")),o=m[i].create();return o.update(h.bytesToString(r),"raw"),a.verify(o.digest().getBytes(),h.bytesToString(n,"raw"))}},function(e,t,r){var n=r(0);r(9),r(10),r(40),r(29),r(42),r(76),r(46),r(22),r(1),r(45);var i=n.asn1,a=e.exports=n.pki=n.pki||{};a.pemToDer=function(e){var t=n.pem.decode(e)[0];if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return n.util.createBuffer(t.body)},a.privateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PRIVATE KEY"!==t.type&&"RSA PRIVATE KEY"!==t.type){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var o=i.fromDer(t.body);return a.privateKeyFromAsn1(o)},a.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:i.toDer(a.privateKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:i.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})}},function(e,t,r){var n=r(0);r(1);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],a=[1,2,3,5],o=function(e,t){return e<<t&65535|(65535&e)>>16-t},s=function(e,t){return(65535&e)>>t|e<<16-t&65535};e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"==typeof e&&(e=n.util.createBuffer(e)),t=t||128;var r,a=e,o=e.length(),s=t,u=Math.ceil(s/8),c=255>>(7&s);for(r=o;r<128;r++)a.putByte(i[a.at(r-1)+a.at(r-o)&255]);for(a.setAt(128-u,i[a.at(128-u)&c]),r=127-u;r>=0;r--)a.setAt(r,i[a.at(r+1)^a.at(r+u)]);return a};var u=function(e,t,r){var i,u,c,l,f=!1,h=null,p=null,d=null,y=[];for(e=n.rc2.expandKey(e,t),c=0;c<64;c++)y.push(e.getInt16Le());r?(i=function(e){for(c=0;c<4;c++)e[c]+=y[l]+(e[(c+3)%4]&e[(c+2)%4])+(~e[(c+3)%4]&e[(c+1)%4]),e[c]=o(e[c],a[c]),l++},u=function(e){for(c=0;c<4;c++)e[c]+=y[63&e[(c+3)%4]]}):(i=function(e){for(c=3;c>=0;c--)e[c]=s(e[c],a[c]),e[c]-=y[l]+(e[(c+3)%4]&e[(c+2)%4])+(~e[(c+3)%4]&e[(c+1)%4]),l--},u=function(e){for(c=3;c>=0;c--)e[c]-=y[63&e[(c+3)%4]]});var g=function(e){var t=[];for(c=0;c<4;c++){var n=h.getInt16Le();null!==d&&(r?n^=d.getInt16Le():d.putInt16Le(n)),t.push(65535&n)}l=r?0:63;for(var i=0;i<e.length;i++)for(var a=0;a<e[i][0];a++)e[i][1](t);for(c=0;c<4;c++)null!==d&&(r?d.putInt16Le(t[c]):t[c]^=d.getInt16Le()),p.putInt16Le(t[c])},m=null;return m={start:function(e,t){e&&"string"==typeof e&&(e=n.util.createBuffer(e)),f=!1,h=n.util.createBuffer(),p=t||new n.util.createBuffer,d=e,m.output=p},update:function(e){for(f||h.putBuffer(e);h.length()>=8;)g([[5,i],[1,u],[6,i],[1,u],[5,i]])},finish:function(e){var t=!0;if(r)if(e)t=e(8,h,!r);else{var n=8===h.length()?8:8-h.length();h.fillWithByte(n,n)}if(t&&(f=!0,m.update()),!r&&(t=0===h.length()))if(e)t=e(8,p,!r);else{var i=p.length(),a=p.at(i-1);a>i?t=!1:p.truncate(a)}return t}}};n.rc2.startEncrypting=function(e,t,r){var i=n.rc2.createEncryptionCipher(e,128);return i.start(t,r),i},n.rc2.createEncryptionCipher=function(e,t){return u(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var i=n.rc2.createDecryptionCipher(e,128);return i.start(t,r),i},n.rc2.createDecryptionCipher=function(e,t){return u(e,t,!1)}},function(e,t,r){var n=r(0);r(1),r(7),r(44);var i=e.exports=n.pkcs1=n.pkcs1||{};function a(e,t,r){r||(r=n.md.sha1.create());for(var i="",a=Math.ceil(t/r.digestLength),o=0;o<a;++o){var s=String.fromCharCode(o>>24&255,o>>16&255,o>>8&255,255&o);r.start(),r.update(e+s),i+=r.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,r){var i,o,s,u;"string"==typeof r?(i=r,o=arguments[3]||void 0,s=arguments[4]||void 0):r&&(i=r.label||void 0,o=r.seed||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),s?s.start():s=n.md.sha1.create(),u||(u=s);var c=Math.ceil(e.n.bitLength()/8),l=c-2*s.digestLength-2;if(t.length>l)throw(g=new Error("RSAES-OAEP input message length is too long.")).length=t.length,g.maxLength=l,g;i||(i=""),s.update(i,"raw");for(var f=s.digest(),h="",p=l-t.length,d=0;d<p;d++)h+="\0";var y=f.getBytes()+h+""+t;if(o){if(o.length!==s.digestLength){var g;throw(g=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.")).seedLength=o.length,g.digestLength=s.digestLength,g}}else o=n.random.getBytes(s.digestLength);var m=a(o,c-s.digestLength-1,u),v=n.util.xorBytes(y,m,y.length),b=a(v,s.digestLength,u),E=n.util.xorBytes(o,b,o.length);return"\0"+E+v},i.decode_rsa_oaep=function(e,t,r){var i,o,s;"string"==typeof r?(i=r,o=arguments[3]||void 0):r&&(i=r.label||void 0,o=r.md||void 0,r.mgf1&&r.mgf1.md&&(s=r.mgf1.md));var u=Math.ceil(e.n.bitLength()/8);if(t.length!==u)throw(v=new Error("RSAES-OAEP encoded message length is invalid.")).length=t.length,v.expectedLength=u,v;if(void 0===o?o=n.md.sha1.create():o.start(),s||(s=o),u<2*o.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");i||(i=""),o.update(i,"raw");for(var c=o.digest().getBytes(),l=t.charAt(0),f=t.substring(1,o.digestLength+1),h=t.substring(1+o.digestLength),p=a(h,o.digestLength,s),d=n.util.xorBytes(f,p,f.length),y=a(d,u-o.digestLength-1,s),g=n.util.xorBytes(h,y,h.length),m=g.substring(0,o.digestLength),v="\0"!==l,b=0;b<o.digestLength;++b)v|=c.charAt(b)!==m.charAt(b);for(var E=1,S=o.digestLength,C=o.digestLength;C<g.length;C++){var T=g.charCodeAt(C),A=1&T^1,I=E?65534:0;v|=T&I,S+=E&=A}if(v||1!==g.charCodeAt(S))throw new Error("Invalid RSAES-OAEP padding.");return g.substring(S+1)}},function(e,t,r){var n=r(0);r(1),r(43),r(7),function(){if(n.prime)e.exports=n.prime;else{var t=e.exports=n.prime=n.prime||{},r=n.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],a=new r(null);a.fromInt(30);var o=function(e,t){return e|t};t.generateProbablePrime=function(e,t,i){"function"==typeof t&&(i=t,t={});var a=(t=t||{}).algorithm||"PRIMEINC";"string"==typeof a&&(a={name:a}),a.options=a.options||{};var o=t.prng||n.random,c={nextBytes:function(e){for(var t=o.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}};if("PRIMEINC"===a.name)return function(e,t,i,a){if("workers"in i)return function(e,t,i,a){if("undefined"==typeof Worker)return s(e,t,i,a);var o=u(e,t),c=i.workers,l=i.workLoad||100,f=30*l/8,h=i.workerScript||"forge/prime.worker.js";if(-1===c)return n.util.estimateCores((function(e,t){e&&(t=2),c=t-1,p()}));function p(){c=Math.max(1,c);for(var n=[],i=0;i<c;++i)n[i]=new Worker(h);for(i=0;i<c;++i)n[i].addEventListener("message",p);var s=!1;function p(i){if(!s){0;var c=i.data;if(c.found){for(var h=0;h<n.length;++h)n[h].terminate();return s=!0,a(null,new r(c.prime,16))}o.bitLength()>e&&(o=u(e,t));var p=o.toString(16);i.target.postMessage({hex:p,workLoad:l}),o.dAddOffset(f,0)}}}p()}(e,t,i,a);return s(e,t,i,a)}(e,c,a.options,i);throw new Error("Invalid prime generation algorithm: "+a.name)}}function s(e,t,r,a){var o=u(e,t),s=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(o.bitLength());"millerRabinTests"in r&&(s=r.millerRabinTests);var c=10;"maxBlockTime"in r&&(c=r.maxBlockTime),function e(t,r,a,o,s,c,l){var f=+new Date;do{if(t.bitLength()>r&&(t=u(r,a)),t.isProbablePrime(s))return l(null,t);t.dAddOffset(i[o++%8],0)}while(c<0||+new Date-f<c);n.util.setImmediate((function(){e(t,r,a,o,s,c,l)}))}(o,e,t,0,s,c,a)}function u(e,t){var n=new r(e,t),i=e-1;return n.testBit(i)||n.bitwiseTo(r.ONE.shiftLeft(i),o,n),n.dAddOffset(31-n.mod(a).byteValue(),0),n}}()},function(e,t,r){var n=r(0);r(9),r(26),r(10),r(77),r(40),r(7),r(22),r(44),r(1),r(45);var i=n.asn1,a=n.pki,o=e.exports=n.pkcs12=n.pkcs12||{},s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},u={name:"PFX",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},s,{name:"PFX.macData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},c={name:"SafeBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},l={name:"Attribute",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,capture:"values"}]},f={name:"CertBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:i.Class.UNIVERSAL,type:i.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function h(e,t,r,n){for(var i=[],a=0;a<e.length;a++)for(var o=0;o<e[a].safeBags.length;o++){var s=e[a].safeBags[o];void 0!==n&&s.type!==n||(null!==t?void 0!==s.attributes[t]&&s.attributes[t].indexOf(r)>=0&&i.push(s):i.push(s))}return i}function p(e){if(e.composed||e.constructed){for(var t=n.util.createBuffer(),r=0;r<e.value.length;++r)t.putBytes(e.value[r].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function d(e,t){var r={},o=[];if(!i.validate(e,n.pkcs7.asn1.encryptedDataValidator,r,o))throw(s=new Error("Cannot read EncryptedContentInfo.")).errors=o,s;var s,u=i.derToOid(r.contentType);if(u!==a.oids.data)throw(s=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.")).oid=u,s;u=i.derToOid(r.encAlgorithm);var c=a.pbe.getCipher(u,r.encParameter,t),l=p(r.encryptedContentAsn1),f=n.util.createBuffer(l.value);if(c.update(f),!c.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return c.output.getBytes()}function y(e,t,r){if(!t&&0===e.length)return[];if((e=i.fromDer(e,t)).tagClass!==i.Class.UNIVERSAL||e.type!==i.Type.SEQUENCE||!0!==e.constructed)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],o=0;o<e.value.length;o++){var s=e.value[o],u={},l=[];if(!i.validate(s,c,u,l))throw(m=new Error("Cannot read SafeBag.")).errors=l,m;var h,p,d={type:i.derToOid(u.bagId),attributes:g(u.bagAttributes)};n.push(d);var y=u.bagValue.value[0];switch(d.type){case a.oids.pkcs8ShroudedKeyBag:if(null===(y=a.decryptPrivateKeyInfo(y,r)))throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case a.oids.keyBag:try{d.key=a.privateKeyFromAsn1(y)}catch(e){d.key=null,d.asn1=y}continue;case a.oids.certBag:h=f,p=function(){if(i.derToOid(u.certId)!==a.oids.x509Certificate){var e=new Error("Unsupported certificate type, only X.509 supported.");throw e.oid=i.derToOid(u.certId),e}var r=i.fromDer(u.cert,t);try{d.cert=a.certificateFromAsn1(r,!0)}catch(e){d.cert=null,d.asn1=r}};break;default:var m;throw(m=new Error("Unsupported PKCS#12 SafeBag type.")).oid=d.type,m}if(void 0!==h&&!i.validate(y,h,u,l))throw(m=new Error("Cannot read PKCS#12 "+h.name)).errors=l,m;p()}return n}function g(e){var t={};if(void 0!==e)for(var r=0;r<e.length;++r){var n={},o=[];if(!i.validate(e[r],l,n,o)){var s=new Error("Cannot read PKCS#12 BagAttribute.");throw s.errors=o,s}var u=i.derToOid(n.oid);if(void 0!==a.oids[u]){t[a.oids[u]]=[];for(var c=0;c<n.values.length;++c)t[a.oids[u]].push(n.values[c].value)}}return t}o.pkcs12FromAsn1=function(e,t,r){"string"==typeof t?(r=t,t=!0):void 0===t&&(t=!0);var c={};if(!i.validate(e,u,c,[]))throw(l=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.")).errors=l,l;var l,f={version:c.version.charCodeAt(0),safeContents:[],getBags:function(e){var t,r={};return"localKeyId"in e?t=e.localKeyId:"localKeyIdHex"in e&&(t=n.util.hexToBytes(e.localKeyIdHex)),void 0===t&&!("friendlyName"in e)&&"bagType"in e&&(r[e.bagType]=h(f.safeContents,null,null,e.bagType)),void 0!==t&&(r.localKeyId=h(f.safeContents,"localKeyId",t,e.bagType)),"friendlyName"in e&&(r.friendlyName=h(f.safeContents,"friendlyName",e.friendlyName,e.bagType)),r},getBagsByFriendlyName:function(e,t){return h(f.safeContents,"friendlyName",e,t)},getBagsByLocalKeyId:function(e,t){return h(f.safeContents,"localKeyId",e,t)}};if(3!==c.version.charCodeAt(0))throw(l=new Error("PKCS#12 PFX of version other than 3 not supported.")).version=c.version.charCodeAt(0),l;if(i.derToOid(c.contentType)!==a.oids.data)throw(l=new Error("Only PKCS#12 PFX in password integrity mode supported.")).oid=i.derToOid(c.contentType),l;var g=c.content.value[0];if(g.tagClass!==i.Class.UNIVERSAL||g.type!==i.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(g=p(g),c.mac){var m=null,v=0,b=i.derToOid(c.macAlgorithm);switch(b){case a.oids.sha1:m=n.md.sha1.create(),v=20;break;case a.oids.sha256:m=n.md.sha256.create(),v=32;break;case a.oids.sha384:m=n.md.sha384.create(),v=48;break;case a.oids.sha512:m=n.md.sha512.create(),v=64;break;case a.oids.md5:m=n.md.md5.create(),v=16}if(null===m)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+b);var E=new n.util.ByteBuffer(c.macSalt),S="macIterations"in c?parseInt(n.util.bytesToHex(c.macIterations),16):1,C=o.generateKey(r,E,3,S,v,m),T=n.hmac.create();if(T.start(m,C),T.update(g.value),T.getMac().getBytes()!==c.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return function(e,t,r,n){if((t=i.fromDer(t,r)).tagClass!==i.Class.UNIVERSAL||t.type!==i.Type.SEQUENCE||!0!==t.constructed)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var o=0;o<t.value.length;o++){var u=t.value[o],c={},l=[];if(!i.validate(u,s,c,l))throw(m=new Error("Cannot read ContentInfo.")).errors=l,m;var f={encrypted:!1},h=null,g=c.content.value[0];switch(i.derToOid(c.contentType)){case a.oids.data:if(g.tagClass!==i.Class.UNIVERSAL||g.type!==i.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");h=p(g).value;break;case a.oids.encryptedData:h=d(g,n),f.encrypted=!0;break;default:var m;throw(m=new Error("Unsupported PKCS#12 contentType.")).contentType=i.derToOid(c.contentType),m}f.safeBags=y(h,r,n),e.safeContents.push(f)}}(f,g.value,t,r),f},o.toPkcs12Asn1=function(e,t,r,s){(s=s||{}).saltSize=s.saltSize||8,s.count=s.count||2048,s.algorithm=s.algorithm||s.encAlgorithm||"aes128","useMac"in s||(s.useMac=!0),"localKeyId"in s||(s.localKeyId=null),"generateLocalKeyId"in s||(s.generateLocalKeyId=!0);var u,c=s.localKeyId;if(null!==c)c=n.util.hexToBytes(c);else if(s.generateLocalKeyId)if(t){var l=n.util.isArray(t)?t[0]:t;"string"==typeof l&&(l=a.certificateFromPem(l)),(B=n.md.sha1.create()).update(i.toDer(a.certificateToAsn1(l)).getBytes()),c=B.digest().getBytes()}else c=n.random.getBytes(20);var f=[];null!==c&&f.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.localKeyId).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,c)])])),"friendlyName"in s&&f.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.friendlyName).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.BMPSTRING,!1,s.friendlyName)])])),f.length>0&&(u=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,f));var h=[],p=[];null!==t&&(p=n.util.isArray(t)?t:[t]);for(var d=[],y=0;y<p.length;++y){"string"==typeof(t=p[y])&&(t=a.certificateFromPem(t));var g=0===y?u:void 0,m=a.certificateToAsn1(t),v=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.certBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.x509Certificate).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(m).getBytes())])])]),g]);d.push(v)}if(d.length>0){var b=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,d),E=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(b).getBytes())])]);h.push(E)}var S=null;if(null!==e){var C=a.wrapRsaPrivateKey(a.privateKeyToAsn1(e));S=null===r?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[C]),u]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[a.encryptPrivateKeyInfo(C,r,s)]),u]);var T=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[S]),A=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(T).getBytes())])]);h.push(A)}var I,w=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,h);if(s.useMac){var B=n.md.sha1.create(),_=new n.util.ByteBuffer(n.random.getBytes(s.saltSize)),N=s.count,R=(e=o.generateKey(r,_,3,N,20),n.hmac.create());R.start(B,e),R.update(i.toDer(w).getBytes());var k=R.getMac();I=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,k.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,_.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(N).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(w).getBytes())])]),I])},o.generateKey=n.pbe.generatePkcs12Key},function(e,t,r){var n=r(0);r(9),r(1);var i=n.asn1,a=e.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=a;var o={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};a.contentInfoValidator=o;var s={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};a.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(s)},a.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(s)};var u={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};a.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},o,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[u]}]},a.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},function(e,t,r){var n=r(0);r(79),e.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},function(e,t,r){var n=r(0);r(1),n.mgf=n.mgf||{},(e.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(e){return{generate:function(t,r){for(var i=new n.util.ByteBuffer,a=Math.ceil(r/e.digestLength),o=0;o<a;o++){var s=new n.util.ByteBuffer;s.putInt32(o),e.start(),e.update(t+s.getBytes()),i.putBuffer(e.digest())}return i.truncate(i.length()-r),i.getBytes()}}}},function(e,t,r){(function(n,i){var a;
19
+ /**
20
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
21
+ *
22
+ * @version 0.8.0
23
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
24
+ * @copyright Chen, Yi-Cyuan 2015-2018
25
+ * @license MIT
26
+ */!function(){"use strict";var o="input is invalid type",s="object"==typeof window,u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?u=i:c&&(u=self);var l=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,f=r(81),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),d=[4,1024,262144,67108864],y=[0,8,16,24],g=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],v=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],E={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var S=function(e,t,r){return function(n){return new D(e,t,e).update(n)[r]()}},C=function(e,t,r){return function(n,i){return new D(e,t,i).update(n)[r]()}},T=function(e,t,r){return function(t,n,i,a){return _["cshake"+e].update(t,n,i,a)[r]()}},A=function(e,t,r){return function(t,n,i,a){return _["kmac"+e].update(t,n,i,a)[r]()}},I=function(e,t,r,n){for(var i=0;i<b.length;++i){var a=b[i];e[a]=t(r,n,a)}return e},w=function(e,t){var r=S(e,t,"hex");return r.create=function(){return new D(e,t,e)},r.update=function(e){return r.create().update(e)},I(r,S,e,t)},B=[{name:"keccak",padding:[1,256,65536,16777216],bits:m,createMethod:w},{name:"sha3",padding:[6,1536,393216,100663296],bits:m,createMethod:w},{name:"shake",padding:[31,7936,2031616,520093696],bits:v,createMethod:function(e,t){var r=C(e,t,"hex");return r.create=function(r){return new D(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},I(r,C,e,t)}},{name:"cshake",padding:d,bits:v,createMethod:function(e,t){var r=E[e],n=T(e,0,"hex");return n.create=function(n,i,a){return i||a?new D(e,t,n).bytepad([i,a],r):_["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},I(n,T,e,t)}},{name:"kmac",padding:d,bits:v,createMethod:function(e,t){var r=E[e],n=A(e,0,"hex");return n.create=function(n,i,a){return new M(e,t,i).bytepad(["KMAC",a],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},I(n,A,e,t)}}],_={},N=[],R=0;R<B.length;++R)for(var k=B[R],U=k.bits,P=0;P<U.length;++P){var O=k.name+"_"+U[P];if(N.push(O),_[O]=k.createMethod(U[P],k.padding),"sha3"!==k.name){var L=k.name+U[P];N.push(L),_[L]=_[O]}}function D(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function M(e,t,r){D.call(this,e,t,r)}D.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,i,a=this.blocks,s=this.byteCount,u=e.length,c=this.blockCount,l=0,f=this.s;l<u;){if(this.reset)for(this.reset=!1,a[0]=this.block,n=1;n<c+1;++n)a[n]=0;if(t)for(n=this.start;l<u&&n<s;++l)a[n>>2]|=e[l]<<y[3&n++];else for(n=this.start;l<u&&n<s;++l)(i=e.charCodeAt(l))<128?a[n>>2]|=i<<y[3&n++]:i<2048?(a[n>>2]|=(192|i>>6)<<y[3&n++],a[n>>2]|=(128|63&i)<<y[3&n++]):i<55296||i>=57344?(a[n>>2]|=(224|i>>12)<<y[3&n++],a[n>>2]|=(128|i>>6&63)<<y[3&n++],a[n>>2]|=(128|63&i)<<y[3&n++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++l)),a[n>>2]|=(240|i>>18)<<y[3&n++],a[n>>2]|=(128|i>>12&63)<<y[3&n++],a[n>>2]|=(128|i>>6&63)<<y[3&n++],a[n>>2]|=(128|63&i)<<y[3&n++]);if(this.lastByteIndex=n,n>=s){for(this.start=n-s,this.block=a[c],n=0;n<c;++n)f[n]^=a[n];x(f),this.reset=!0}else this.start=n}return this},D.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},D.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var a=0;a<e.length;++a){var s=e.charCodeAt(a);s<128?n+=1:s<2048?n+=2:s<55296||s>=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},D.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=t-r%t,a=[];return a.length=i,this.update(a),this},D.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];x(n)}},D.prototype.toString=D.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,a=0,o=0,s="";o<n;){for(a=0;a<t&&o<n;++a,++o)e=r[a],s+=p[e>>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];o%t==0&&(x(r),a=0)}return i&&(e=r[a],s+=p[e>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},D.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,a=0,o=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);o<n;){for(a=0;a<t&&o<n;++a,++o)u[o]=r[a];o%t==0&&x(r)}return i&&(u[a]=r[a],e=e.slice(0,s)),e},D.prototype.buffer=D.prototype.arrayBuffer,D.prototype.digest=D.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,a=this.extraBytes,o=0,s=0,u=[];s<i;){for(o=0;o<r&&s<i;++o,++s)e=s<<2,t=n[o],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&x(n)}return a&&(e=s<<2,t=n[o],u[e]=255&t,a>1&&(u[e+1]=t>>8&255),a>2&&(u[e+2]=t>>16&255)),u},M.prototype=new D,M.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var x=function(e){var t,r,n,i,a,o,s,u,c,l,f,h,p,d,y,m,v,b,E,S,C,T,A,I,w,B,_,N,R,k,U,P,O,L,D,M,x,V,K,j,F,q,G,z,H,Y,Q,W,X,J,Z,$,ee,te,re,ne,ie,ae,oe,se,ue,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|o>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=a^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=o^(l<<1|f>>>31),r=s^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|a>>>31),r=f^(a<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,d=e[0],y=e[1],Y=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,N=e[20]<<3|e[21]>>>29,R=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,G=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,k=e[33]<<13|e[32]>>>19,U=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,M=e[14]<<6|e[15]>>>26,x=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,E=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,O=e[44]<<29|e[45]>>>3,I=e[6]<<28|e[7]>>>4,w=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,V=e[26]<<25|e[27]>>>7,K=e[27]<<25|e[26]>>>7,S=e[36]<<21|e[37]>>>11,C=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,z=e[8]<<27|e[9]>>>5,H=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,_=e[19]<<20|e[18]>>>12,ae=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,j=e[38]<<8|e[39]>>>24,F=e[39]<<8|e[38]>>>24,T=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=d^~m&b,e[1]=y^~v&E,e[10]=I^~B&N,e[11]=w^~_&R,e[20]=L^~M&V,e[21]=D^~x&K,e[30]=z^~Y&W,e[31]=H^~Q&X,e[40]=te^~ne&ae,e[41]=re^~ie&oe,e[2]=m^~b&S,e[3]=v^~E&C,e[12]=B^~N&k,e[13]=_^~R&U,e[22]=M^~V&j,e[23]=x^~K&F,e[32]=Y^~W&J,e[33]=Q^~X&Z,e[42]=ne^~ae&se,e[43]=ie^~oe&ue,e[4]=b^~S&T,e[5]=E^~C&A,e[14]=N^~k&P,e[15]=R^~U&O,e[24]=V^~j&q,e[25]=K^~F&G,e[34]=W^~J&$,e[35]=X^~Z&ee,e[44]=ae^~se&ce,e[45]=oe^~ue&le,e[6]=S^~T&d,e[7]=C^~A&y,e[16]=k^~P&I,e[17]=U^~O&w,e[26]=j^~q&L,e[27]=F^~G&D,e[36]=J^~$&z,e[37]=Z^~ee&H,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=T^~d&m,e[9]=A^~y&v,e[18]=P^~I&B,e[19]=O^~w&_,e[28]=q^~L&M,e[29]=G^~D&x,e[38]=$^~z&Y,e[39]=ee^~H&Q,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=g[n],e[1]^=g[n+1]};if(l)e.exports=_;else{for(R=0;R<N.length;++R)u[N[R]]=_[N[R]];f&&(void 0===(a=function(){return _}.call(t,r,t,e))||(e.exports=a))}}()}).call(this,r(19),r(13))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(5),a=n(r(47)),o=r(14),s=r(37),u=r(20),c=r(8),l=r(18);function f(e,t){for(void 0===t&&(t=5e3);t--;){var r=i.stringToBytes(e);e=u.base16Encode(c.sha256(r))}return e}function h(e,t,r){void 0===r&&(r=48);for(var n=i.bytesToString(o.concat(e,t),"raw"),s="",u=s;u.length<r;)u+=s=a.create().update(s+n).digest().getBytes();return u}t.encryptSeed=function(e,t,r){var n=f(t,r),a=l.randomBytes(8),c=h(i.stringToBytes(n,"raw"),a),p=i.stringToBytes(c.slice(0,32),"raw"),d=i.stringToBytes(c.slice(32),"raw"),y=s.aesEncrypt(i.stringToBytes(e),p,"CBC",d);return u.base64Encode(o.concat(i.stringToBytes("Salted__"),a,y))},t.decryptSeed=function(e,t,r){var n=f(t,r),a=u.base64Decode(e),o=a.slice(8,16),c=h(i.stringToBytes(n,"raw"),o),l=i.stringToBytes(c.slice(0,32),"raw"),p=i.stringToBytes(c.slice(32),"raw");return i.bytesToString(s.aesDecrypt(a.slice(16),l,"CBC",p))}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o};Object.defineProperty(t,"__esModule",{value:!0});var i=r(8),a=r(14);t.merkleVerify=function(e,t,r){var o=Uint8Array.from([0]),s=Uint8Array.from([1]);if(32!==e.length)throw new Error("Failed to parse merkleProof: Invalid rootHash length");for(var u=i.blake2b(a.concat(o,r)),c=[],l=t.map((function(e){return e}));l.length>0;){var f=0===l[0]?"L":"R",h=l[1];if(h<1)throw new Error("Failed to parse merkleProof: Wrong hash size");var p=l.slice(2,2+h);c.push([f,p]),l=l.slice(2+h)}return c.reduce((function(e,t){var r=n(t,2),o=r[0],u=r[1];return i.blake2b(a.concat(s,"R"===o?a.concat(u,e):a.concat(e,u)))}),u).every((function(t,r){return t===e[r]}))}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};t.__esModule=!0;var a=r(17);t.default=function(e,t){if(null==(r=e)||42!=r.length)throw"Invalid ethereum address: "+e+" ";var r;e=e.substr(2);var n=new Uint8Array([1,t]),o=a.base16Decode(e),s=new Uint8Array(i(n,o)),u=a.keccak(a.blake2b(s)),c=new Uint8Array(i(n,o.slice(0,20),u.slice(0,4)));return a.base58Encode(c)}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(17);t.default=function(e){var t=n.base58Decode(e).slice(0,20);return"0x"+n.base16Encode(t)}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(17);t.default=function(e){var t=e;return e.startsWith("0x")&&(t=e.slice(2)),n.base58Encode(n.base16Decode(t))}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.create=void 0;var s=a(r(88)),u=a(r(30)),c=a(r(16)),l=a(r(90)),f=a(r(91)),h=a(r(92)),p=a(r(93)),d=a(r(94)),y=a(r(95)),g=a(r(96)),m=a(r(97)),v=a(r(98)),b=a(r(32)),E=a(r(101)),S=o(r(11)),C=o(r(48)),T=o(r(2)),A=o(r(102)),I=o(r(53)),w=o(r(54)),B=o(r(103)),_=o(r(104)),N=o(r(52)),R=o(r(49)),k=o(r(55)),U=o(r(106)),P=o(r(107)),O=a(r(3));function L(e,t){return Object.keys(t).reduce((function(r,n){return r[n]=D(e,t[n]),r}),{})}function D(e,t){return t.bind(null,e)}t.create=function(e){var t=L(e,s),r=L(e,u),n=L(e,c),i=L(e,l),a=L(e,f),o=L(e,h),M=L(e,p),x=L(e,d),V=L(e,y),K=L(e,g),j=L(e,m),F=L(e,v),q=L(e,b),G=L(e,E);return{addresses:t,blocks:r,transactions:n,leasing:i,tools:{transactions:{broadcast:D(e,A.default),wait:D(e,N.default)},blocks:{getNetworkByte:D(e,k.default),getNetworkCode:D(e,U.default)},addresses:{createWatch:D(e,P.default),getAssetsByTransaction:D(e,I.default),getAssetIdListByTx:w.default,getTransactionsWithAssets:D(e,B.default),availableSponsoredBalances:D(e,_.default)},utils:O,query:S.default,resolve:C.default,request:T.default,parse:R.default},peers:a,rewards:o,utils:M,debug:x,alias:V,consensus:K,activation:j,node:F,assets:q,eth:G}}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchAddresses=t.fetchPublicKey=t.fetchSeed=t.fetchSeq=t.fetchEffectiveBalance=t.fetchEffectiveBalanceConfirmations=t.deleteAddressFromWallet=t.fetchMultipleBalance=t.fetchBalance=t.fetchValidate=t.data=t.fetchScriptInfo=t.fetchBalanceConfirmations=t.fetchBalanceDetails=t.fetchScriptInfoMeta=t.fetchDataKey=void 0;var u=o(r(2)),c=s(r(11));t.fetchDataKey=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/data/"+t+"/"+encodeURIComponent(r),options:n})},t.fetchScriptInfoMeta=function(e,t){return u.default({base:e,url:"/addresses/scriptInfo/"+t+"/meta"})},t.fetchBalanceDetails=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/balance/details/"+t,options:r})},t.fetchBalanceConfirmations=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/balance/"+t+"/"+r,options:n})},t.fetchScriptInfo=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/scriptInfo/"+t,options:r})},t.data=function(e,t,r,n){return void 0===r&&(r=Object.create(null)),void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/data/"+t+c.default(r),options:n})},t.fetchValidate=function(e,t){return u.default({base:e,url:"/addresses/validate/"+t})},t.fetchBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/balance/"+t,options:r})},t.fetchMultipleBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),fetch(e+"/addresses/balance",{method:"POST",body:JSON.stringify({addresses:t}),headers:{"Content-Type":"application/json"}}).then(u.parseResponse)},t.deleteAddressFromWallet=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/"+t,options:n(n({},r),{method:"DELETE"})})},t.fetchEffectiveBalanceConfirmations=function(e,t,r,n){return void 0===n&&(n=Object.create(null)),u.default({base:e,url:"/addresses/effectiveBalance/"+t+"/"+r,options:n})},t.fetchEffectiveBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),u.default({base:e,url:"/addresses/effectiveBalance/"+t,options:r})},t.fetchSeq=function(e,t,r){return u.default({base:e,url:"/addresses/seq/"+t+"/"+r})},t.fetchSeed=function(e,t){return u.default({base:e,url:"/addresses/seed/"+t})},t.fetchPublicKey=function(e,t){return u.default({base:e,url:"/addresses/publicKey/"+t})},t.fetchAddresses=function(e){return u.default({base:e,url:"/addresses"})}},function(e,t,r){"use strict";var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchLeasingInfo=t.fetchActive=void 0;var a=i(r(2));t.fetchActive=function(e,t,r){return void 0===r&&(r=Object.create(null)),a.default({base:e,url:"/leasing/active/"+t,options:r})},t.fetchLeasingInfo=function(e,t,r){void 0===r&&(r=Object.create(null));var i='{"ids":['+t.map((function(e){return'"'+e+'"'})).join(",")+"]}";return a.default({base:e,url:"/leasing/info/",options:n(n({},r),{body:i,method:"POST",headers:{"Content-Type":"application/json"}})})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchSuspended=t.fetchBlackListed=t.fetchConnected=t.fetchAll=void 0;var i=n(r(2));t.fetchAll=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/peers/all",options:t})},t.fetchConnected=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/peers/connected",options:t})},t.fetchBlackListed=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/peers/blacklisted",options:t})},t.fetchSuspended=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/peers/suspended",options:t})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchRewards=void 0;var i=n(r(2));t.fetchRewards=function(e,t,r){return void 0===r&&(r=Object.create(null)),i.default({base:e,url:t?"/blockchain/rewards/"+t:"/blockchain/rewards",options:r})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchNodeTime=t.fetchSignPrivateKey=t.fetchScriptDecompile=t.fetchScriptMeta=t.fetchHashFast=t.fetchHashSecure=t.fetchTransactionSerialize=t.fetchEvaluate=t.fetchEstimate=t.fetchCompileWithImports=t.fetchCompileCode=t.fetchSeed=void 0;var i=n(r(2)),a=n(r(50));t.fetchSeed=function(e,t){return i.default({base:e,url:"/utils/seed"+(t?"/"+t:"")})},t.fetchCompileCode=function(e,t){return i.default({base:e,url:"/utils/script/compileCode",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchCompileWithImports=function(e,t){return i.default({base:e,url:"/utils/script/compileWithImports",options:{method:"POST",body:a.default(t),headers:{"Content-Type":"application/json"}}})},t.fetchEstimate=function(e,t){return i.default({base:e,url:"/utils/script/estimate",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchEvaluate=function(e,t,r){return i.default({base:e,url:"/utils/script/evaluate/"+t,options:{method:"POST",body:JSON.stringify({expr:r}),headers:{"Content-Type":"application/json"}}})},t.fetchTransactionSerialize=function(e,t){return i.default({base:e,url:"/utils/transactionSerialize",options:{method:"POST",body:a.default(t),headers:{"Content-Type":"application/json"}}})},t.fetchHashSecure=function(e,t){return i.default({base:e,url:"/utils/hash/secure",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchHashFast=function(e,t){return i.default({base:e,url:"/utils/hash/fast",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchScriptMeta=function(e,t){return i.default({base:e,url:"/utils/script/meta",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchScriptDecompile=function(e,t){return i.default({base:e,url:"/utils/script/decompile",options:{method:"POST",body:t,headers:{"Content-Type":"application/json"}}})},t.fetchSignPrivateKey=function(e,t,r){return i.default({base:e,url:"/utils/sign/"+t,options:{method:"POST",body:r,headers:{"Content-Type":"application/json"}}})},t.fetchNodeTime=function(e){return i.default({base:e,url:"/utils/time"})}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.debugValidate=t.debugStateWaves=t.debugStateHash=t.debugState=t.debugRollbackTo=t.debugRollback=t.debugPrint=t.fetchPortfolios=t.fetchMinerInfo=t.fetchDebugInfo=t.fetchConfigInfo=t.postPeerToTheBanList=t.fetchStateChangesByTxId=t.fetchStateChangesByAddress=t.fetchBalanceHistory=void 0;var s=a(r(2)),u=o(r(11));t.fetchBalanceHistory=function(e,t,r){return void 0===r&&(r=Object.create(null)),s.default({base:e,url:"/debug/balances/history/"+t,options:r})},t.fetchStateChangesByAddress=function(e,t,r,n,i){return void 0===i&&(i=Object.create(null)),s.default({base:e,url:"/debug/stateChanges/address/"+t+"/limit/"+r+u.default({after:n}),options:i})},t.fetchStateChangesByTxId=function(e,t,r){return void 0===r&&(r=Object.create(null)),s.default({base:e,url:"/transactions/info/"+t,options:r})},t.postPeerToTheBanList=function(e,t){return fetch(e+"/debug/blacklist",{method:"POST",body:t,headers:{"Content-Type":"application/json"}}).then(s.parseResponse)},t.fetchConfigInfo=function(e,t){return fetch(e+"/debug/configInfo",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(s.parseResponse)},t.fetchDebugInfo=function(e,t){return fetch(e+"/debug/info",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(s.parseResponse)},t.fetchMinerInfo=function(e,t){return fetch(e+"/debug/minerInfo",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(s.parseResponse)},t.fetchPortfolios=function(e,t,r){return fetch(e+"/debug/portfolios/"+t,{method:"GET",headers:{"X-API-Key":r,"Content-Type":"application/json"}}).then(s.parseResponse)},t.debugPrint=function(e,t,r){return fetch(e+"/debug/print",{method:"POST",headers:{"X-API-Key":r,"Content-Type":"application/json"},body:JSON.stringify({message:t})}).then(s.parseResponse)},t.debugRollback=function(e,t,r,n){return fetch(e+"/debug/rollback",{method:"POST",headers:{"X-API-Key":n,"Content-Type":"application/json"},body:JSON.stringify({rollbackTo:t,returnTransactionsToUtx:r})}).then(s.parseResponse)},t.debugRollbackTo=function(e,t,r){return fetch(e+"/debug/rollback-to/"+t,{method:"DELETE",headers:{"X-API-Key":r,"Content-Type":"application/json"}}).then(s.parseResponse)},t.debugState=function(e,t){return fetch(e+"/debug/state",{method:"GET",headers:{"X-API-Key":t,"Content-Type":"application/json"}}).then(s.parseResponse)},t.debugStateHash=function(e,t,r){return void 0===r&&(r=Object.create(null)),s.default({base:e,url:"/debug/stateHash/"+t,options:r})},t.debugStateWaves=function(e,t,r){return fetch(e+"/debug/stateWaves/"+t,{method:"GET",headers:{"X-API-Key":r,"Content-Type":"application/json"}}).then(s.parseResponse)},t.debugValidate=function(e,t){return fetch(e+"/debug/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:t}).then(s.parseResponse)}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchByAddress=t.fetchByAlias=void 0;var i=n(r(2));t.fetchByAlias=function(e,t){return i.default({base:e,url:"/alias/by-alias/"+t})},t.fetchByAddress=function(e,t){return i.default({base:e,url:"/alias/by-address/"+t})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchConsensusAlgo=t.fetchBasetarget=t.fetchGeneratingBalance=void 0;var i=n(r(2));t.fetchGeneratingBalance=function(e,t,r){return void 0===r&&(r=Object.create(null)),i.default({base:e,url:"/consensus/generatingbalance/"+t})},t.fetchBasetarget=function(e){return i.default({base:e,url:"/consensus/basetarget"})},t.fetchConsensusAlgo=function(e){return i.default({base:e,url:"/consensus/algo"})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchActivationStatus=void 0;var i=n(r(2));t.fetchActivationStatus=function(e){return i.default({base:e,url:"activation/status"})}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchNodeVersion=t.fetchNodeStatus=void 0;var i=n(r(2));t.fetchNodeStatus=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/node/status",options:t})},t.fetchNodeVersion=function(e,t){return void 0===t&&(t=Object.create(null)),i.default({base:e,url:"/node/version",options:t})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(51)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.fetchEthAssetDetails=void 0;var i=n(r(2)),a=r(3),o=n(r(11));t.fetchEthAssetDetails=function(e,t){var r=a.toArray(t);return i.default({base:e,url:"/eth/assets?"+o.default({id:r})}).then((function(e){return Array.isArray(t)?e:e[0]}))}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var a=r(16),o=r(3),s=i(r(52)),u={chain:!1,confirmations:-1,maxWaitTime:0,requestInterval:0};t.default=function(e,t,r){var i=n(n({},u),r||{}),c=!Array.isArray(t),l=i.confirmations>0?1:0;return(i.chain?function(e,t,r){return new Promise((function(n,i){var o=t.slice().reverse(),u=[],c=function(){if(!o.length)return n(u),null;var t=o.pop();a.broadcast(e,t).then((function(t){return s.default(e,t,r)})).then((function(e){u.push(e),c()}),i)};c()}))}(e,o.toArray(t),n(n({},i),{confirmations:l})):function(e,t){return Promise.all(t.map((function(t){return a.broadcast(e,t)})))}(e,o.toArray(t))).then((function(t){return i.confirmations<=0?t:s.default(e,t,i)})).then((function(e){return c?o.head(e):e}))}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=r(16),a=n(r(53));t.default=function(e,t,r,n){return i.fetchTransactions(e,t,r,n).then((function(t){return a.default(e,t).then((function(e){return{transactions:t,assets:e}}))}))}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(105),i=r(32),a=r(3);t.default=function(e,t,r){return i.fetchAssetsBalance(e,t).then(a.pipe(a.prop("balances"),a.filter(function(e){return function(t){return t.minSponsoredAssetFee&&n.BigNumber.toBigNumber(t.sponsorBalance||0).gte(e)&&n.BigNumber.toBigNumber(e).div(.001*Math.pow(10,8)).mul(t.minSponsoredAssetFee).lte(t.balance)||!1}}(r)),a.map(function(e){var t=n.BigNumber.toBigNumber(e).div(.001*Math.pow(10,8));return function(r){return{assetId:r.assetId,wavesFee:e,assetFee:n.BigNumber.toBigNumber(r.minSponsoredAssetFee).mul(t).toFixed()}}}(r))))}},function(e,t,r){!function(e){"use strict";var t=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,n=Math.floor,i="[BigNumber Error] ",a=i+"Number primitive has more than 15 significant digits: ",o=1e14,s=14,u=9007199254740991,c=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],l=1e7,f=1e9;function h(e){var t=0|e;return e>0||e===t?t:t-1}function p(e){for(var t,r,n=1,i=e.length,a=e[0]+"";n<i;){for(t=e[n++]+"",r=s-t.length;r--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function d(e,t){var r,n,i=e.c,a=t.c,o=e.s,s=t.s,u=e.e,c=t.e;if(!o||!s)return null;if(r=i&&!i[0],n=a&&!a[0],r||n)return r?n?0:-s:o;if(o!=s)return o;if(r=o<0,n=u==c,!i||!a)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=i.length)<(c=a.length)?u:c,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^r?1:-1;return u==c?0:u>c^r?1:-1}function y(e,t,r,a){if(e<t||e>r||e!==n(e))throw Error(i+(a||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function g(e){var t=e.c.length-1;return h(e.e/s)==t&&e.c[t]%2!=0}function m(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function v(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var b=function e(b){var E,S,C,T,A,I,w,B,_,N=F.prototype={constructor:F,toString:null,valueOf:null},R=new F(1),k=20,U=4,P=-7,O=21,L=-1e7,D=1e7,M=!1,x=1,V=0,K={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz";function F(e,r){var i,o,c,l,f,h,p,d,g=this;if(!(g instanceof F))return new F(e,r);if(null==r){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>D?g.c=g.e=null:e.e<L?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,f=e;f>=10;f/=10,l++);return void(l>D?g.c=g.e=null:(g.e=l,g.c=[e]))}d=String(e)}else{if(!t.test(d=String(e)))return C(g,d,h);g.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(l=d.indexOf("."))>-1&&(d=d.replace(".","")),(f=d.search(/e/i))>0?(l<0&&(l=f),l+=+d.slice(f+1),d=d.substring(0,f)):l<0&&(l=d.length)}else{if(y(r,2,j.length,"Base"),10==r)return H(g=new F(e),k+g.e+1,U);if(d=String(e),h="number"==typeof e){if(0*e!=0)return C(g,d,h,r);if(g.s=1/e<0?(d=d.slice(1),-1):1,F.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else g.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(i=j.slice(0,r),l=f=0,p=d.length;f<p;f++)if(i.indexOf(o=d.charAt(f))<0){if("."==o){if(f>l){l=p;continue}}else if(!c&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){c=!0,f=-1,l=0;continue}return C(g,String(e),h,r)}h=!1,(l=(d=S(d,r,10,g.s)).indexOf("."))>-1?d=d.replace(".",""):l=d.length}for(f=0;48===d.charCodeAt(f);f++);for(p=d.length;48===d.charCodeAt(--p););if(d=d.slice(f,++p)){if(p-=f,h&&F.DEBUG&&p>15&&(e>u||e!==n(e)))throw Error(a+g.s*e);if((l=l-f-1)>D)g.c=g.e=null;else if(l<L)g.c=[g.e=0];else{if(g.e=l,g.c=[],f=(l+1)%s,l<0&&(f+=s),f<p){for(f&&g.c.push(+d.slice(0,f)),p-=s;f<p;)g.c.push(+d.slice(f,f+=s));f=s-(d=d.slice(f)).length}else f-=p;for(;f--;d+="0");g.c.push(+d)}}else g.c=[g.e=0]}function q(e,t,r,n){var i,a,o,s,u;if(null==r?r=U:y(r,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)u=p(e.c),u=1==n||2==n&&(o<=P||o>=O)?m(u,o):v(u,o,"0");else if(a=(e=H(new F(e),t,r)).e,s=(u=p(e.c)).length,1==n||2==n&&(t<=a||a<=P)){for(;s<t;u+="0",s++);u=m(u,a)}else if(t-=o,u=v(u,a,"0"),a+1>s){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=a-s)>0)for(a+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function G(e,t){for(var r,n=1,i=new F(e[0]);n<e.length;n++){if(!(r=new F(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function z(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*s-1)>D?e.c=e.e=null:r<L?e.c=[e.e=0]:(e.e=r,e.c=t),e}function H(e,t,i,a){var u,l,f,h,p,d,y,g=e.c,m=c;if(g){e:{for(u=1,h=g[0];h>=10;h/=10,u++);if((l=t-u)<0)l+=s,f=t,y=(p=g[d=0])/m[u-f-1]%10|0;else if((d=r((l+1)/s))>=g.length){if(!a)break e;for(;g.length<=d;g.push(0));p=y=0,u=1,f=(l%=s)-s+1}else{for(p=h=g[d],u=1;h>=10;h/=10,u++);y=(f=(l%=s)-s+u)<0?0:p/m[u-f-1]%10|0}if(a=a||t<0||null!=g[d+1]||(f<0?p:p%m[u-f-1]),a=i<4?(y||a)&&(0==i||i==(e.s<0?3:2)):y>5||5==y&&(4==i||a||6==i&&(l>0?f>0?p/m[u-f]:0:g[d-1])%10&1||i==(e.s<0?8:7)),t<1||!g[0])return g.length=0,a?(t-=e.e+1,g[0]=m[(s-t%s)%s],e.e=-t||0):g[0]=e.e=0,e;if(0==l?(g.length=d,h=1,d--):(g.length=d+1,h=m[s-l],g[d]=f>0?n(p/m[u-f]%m[f])*h:0),a)for(;;){if(0==d){for(l=1,f=g[0];f>=10;f/=10,l++);for(f=g[0]+=h,h=1;f>=10;f/=10,h++);l!=h&&(e.e++,g[0]==o&&(g[0]=1));break}if(g[d]+=h,g[d]!=o)break;g[d--]=0,h=1}for(l=g.length;0===g[--l];g.pop());}e.e>D?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}function Y(e){var t,r=e.e;return null===r?e.toString():(t=p(e.c),t=r<=P||r>=O?m(t,r):v(t,r,"0"),e.s<0?"-"+t:t)}return F.clone=e,F.ROUND_UP=0,F.ROUND_DOWN=1,F.ROUND_CEIL=2,F.ROUND_FLOOR=3,F.ROUND_HALF_UP=4,F.ROUND_HALF_DOWN=5,F.ROUND_HALF_EVEN=6,F.ROUND_HALF_CEIL=7,F.ROUND_HALF_FLOOR=8,F.EUCLID=9,F.config=F.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(i+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(r=e[t],0,f,t),k=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(r=e[t],0,8,t),U=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(y(r[0],-f,0,t),y(r[1],0,f,t),P=r[0],O=r[1]):(y(r,-f,f,t),P=-(O=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)y(r[0],-f,-1,t),y(r[1],1,f,t),L=r[0],D=r[1];else{if(y(r,-f,f,t),!r)throw Error(i+t+" cannot be zero: "+r);L=-(D=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(i+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw M=!r,Error(i+"crypto unavailable");M=r}else M=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(r=e[t],0,9,t),x=r),e.hasOwnProperty(t="POW_PRECISION")&&(y(r=e[t],0,f,t),V=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(i+t+" not an object: "+r);K=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(i+t+" invalid: "+r);j=r}}return{DECIMAL_PLACES:k,ROUNDING_MODE:U,EXPONENTIAL_AT:[P,O],RANGE:[L,D],CRYPTO:M,MODULO_MODE:x,POW_PRECISION:V,FORMAT:K,ALPHABET:j}},F.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!F.DEBUG)return!0;var t,r,a=e.c,u=e.e,c=e.s;e:if("[object Array]"=={}.toString.call(a)){if((1===c||-1===c)&&u>=-f&&u<=f&&u===n(u)){if(0===a[0]){if(0===u&&1===a.length)return!0;break e}if((t=(u+1)%s)<1&&(t+=s),String(a[0]).length==t){for(t=0;t<a.length;t++)if((r=a[t])<0||r>=o||r!==n(r))break e;if(0!==r)return!0}}}else if(null===a&&null===u&&(null===c||1===c||-1===c))return!0;throw Error(i+"Invalid BigNumber: "+e)},F.maximum=F.max=function(){return G(arguments,N.lt)},F.minimum=F.min=function(){return G(arguments,N.gt)},F.random=(T=9007199254740992*Math.random()&2097151?function(){return n(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,a,o,u,l,h=0,p=[],d=new F(R);if(null==e?e=k:y(e,0,f),u=r(e/s),M)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(u*=2));h<u;)(l=131072*t[h]+(t[h+1]>>>11))>=9e15?(a=crypto.getRandomValues(new Uint32Array(2)),t[h]=a[0],t[h+1]=a[1]):(p.push(l%1e14),h+=2);h=u/2}else{if(!crypto.randomBytes)throw M=!1,Error(i+"crypto unavailable");for(t=crypto.randomBytes(u*=7);h<u;)(l=281474976710656*(31&t[h])+1099511627776*t[h+1]+4294967296*t[h+2]+16777216*t[h+3]+(t[h+4]<<16)+(t[h+5]<<8)+t[h+6])>=9e15?crypto.randomBytes(7).copy(t,h):(p.push(l%1e14),h+=7);h=u/7}if(!M)for(;h<u;)(l=T())<9e15&&(p[h++]=l%1e14);for(u=p[--h],e%=s,u&&e&&(l=c[s-e],p[h]=n(u/l)*l);0===p[h];p.pop(),h--);if(h<0)p=[o=0];else{for(o=-1;0===p[0];p.splice(0,1),o-=s);for(h=1,l=p[0];l>=10;l/=10,h++);h<s&&(o-=s-h)}return d.e=o,d.c=p,d}),F.sum=function(){for(var e=1,t=arguments,r=new F(t[0]);e<t.length;)r=r.plus(t[e++]);return r},S=function(){function e(e,t,r,n){for(var i,a,o=[0],s=0,u=e.length;s<u;){for(a=o.length;a--;o[a]*=t);for(o[0]+=n.indexOf(e.charAt(s++)),i=0;i<o.length;i++)o[i]>r-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(t,r,n,i,a){var o,s,u,c,l,f,h,d,y=t.indexOf("."),g=k,m=U;for(y>=0&&(c=V,V=0,t=t.replace(".",""),f=(d=new F(r)).pow(t.length-y),V=c,d.c=e(v(p(f.c),f.e,"0"),10,n,"0123456789"),d.e=d.c.length),u=c=(h=e(t,r,n,a?(o=j,"0123456789"):(o="0123456789",j))).length;0==h[--c];h.pop());if(!h[0])return o.charAt(0);if(y<0?--u:(f.c=h,f.e=u,f.s=i,h=(f=E(f,d,g,m,n)).c,l=f.r,u=f.e),y=h[s=u+g+1],c=n/2,l=l||s<0||null!=h[s+1],l=m<4?(null!=y||l)&&(0==m||m==(f.s<0?3:2)):y>c||y==c&&(4==m||l||6==m&&1&h[s-1]||m==(f.s<0?8:7)),s<1||!h[0])t=l?v(o.charAt(1),-g,o.charAt(0)):o.charAt(0);else{if(h.length=s,l)for(--n;++h[--s]>n;)h[s]=0,s||(++u,h=[1].concat(h));for(c=h.length;!h[--c];);for(y=0,t="";y<=c;t+=o.charAt(h[y++]));t=v(t,u,o.charAt(0))}return t}}(),E=function(){function e(e,t,r){var n,i,a,o,s=0,u=e.length,c=t%l,f=t/l|0;for(e=e.slice();u--;)s=((i=c*(a=e[u]%l)+(n=f*a+(o=e[u]/l|0)*c)%l*l+s)/r|0)+(n/l|0)+f*o,e[u]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;i<r;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(i,a,u,c,l){var f,p,d,y,g,m,v,b,E,S,C,T,A,I,w,B,_,N=i.s==a.s?1:-1,R=i.c,k=a.c;if(!(R&&R[0]&&k&&k[0]))return new F(i.s&&a.s&&(R?!k||R[0]!=k[0]:k)?R&&0==R[0]||!k?0*N:N/0:NaN);for(E=(b=new F(N)).c=[],N=u+(p=i.e-a.e)+1,l||(l=o,p=h(i.e/s)-h(a.e/s),N=N/s|0),d=0;k[d]==(R[d]||0);d++);if(k[d]>(R[d]||0)&&p--,N<0)E.push(1),y=!0;else{for(I=R.length,B=k.length,d=0,N+=2,(g=n(l/(k[0]+1)))>1&&(k=e(k,g,l),R=e(R,g,l),B=k.length,I=R.length),A=B,C=(S=R.slice(0,B)).length;C<B;S[C++]=0);_=k.slice(),_=[0].concat(_),w=k[0],k[1]>=l/2&&w++;do{if(g=0,(f=t(k,S,B,C))<0){if(T=S[0],B!=C&&(T=T*l+(S[1]||0)),(g=n(T/w))>1)for(g>=l&&(g=l-1),v=(m=e(k,g,l)).length,C=S.length;1==t(m,S,v,C);)g--,r(m,B<v?_:k,v,l),v=m.length,f=1;else 0==g&&(f=g=1),v=(m=k.slice()).length;if(v<C&&(m=[0].concat(m)),r(S,m,C,l),C=S.length,-1==f)for(;t(k,S,B,C)<1;)g++,r(S,B<C?_:k,C,l),C=S.length}else 0===f&&(g++,S=[0]);E[d++]=g,S[0]?S[C++]=R[A]||0:(S=[R[A]],C=1)}while((A++<I||null!=S[0])&&N--);y=null!=S[0],E[0]||E.splice(0,1)}if(l==o){for(d=1,N=E[0];N>=10;N/=10,d++);H(b,u+(b.e=d+p*s-1)+1,c,y)}else b.e=p,b.r=+y;return b}}(),A=/^(-?)0([xbo])(?=\w[\w.]*$)/i,I=/^([^.]+)\.$/,w=/^\.([^.]+)$/,B=/^-?(Infinity|NaN)$/,_=/^\s*\+(?=[\w.])|^\s+|\s+$/g,C=function(e,t,r,n){var a,o=r?t:t.replace(_,"");if(B.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(A,(function(e,t,r){return a="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=a?e:t})),n&&(a=n,o=o.replace(I,"$1").replace(w,"0.$1")),t!=o))return new F(o,a);if(F.DEBUG)throw Error(i+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},N.absoluteValue=N.abs=function(){var e=new F(this);return e.s<0&&(e.s=1),e},N.comparedTo=function(e,t){return d(this,new F(e,t))},N.decimalPlaces=N.dp=function(e,t){var r,n,i,a=this;if(null!=e)return y(e,0,f),null==t?t=U:y(t,0,8),H(new F(a),e+a.e+1,t);if(!(r=a.c))return null;if(n=((i=r.length-1)-h(this.e/s))*s,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},N.dividedBy=N.div=function(e,t){return E(this,new F(e,t),k,U)},N.dividedToIntegerBy=N.idiv=function(e,t){return E(this,new F(e,t),0,1)},N.exponentiatedBy=N.pow=function(e,t){var a,o,u,c,l,f,h,p,d=this;if((e=new F(e)).c&&!e.isInteger())throw Error(i+"Exponent not an integer: "+Y(e));if(null!=t&&(t=new F(t)),l=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return p=new F(Math.pow(+Y(d),l?2-g(e):+Y(e))),t?p.mod(t):p;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new F(NaN);(o=!f&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||l&&d.c[1]>=24e7:d.c[0]<8e13||l&&d.c[0]<=9999975e7)))return c=d.s<0&&g(e)?-0:0,d.e>-1&&(c=1/c),new F(f?1/c:c);V&&(c=r(V/s+2))}for(l?(a=new F(.5),f&&(e.s=1),h=g(e)):h=(u=Math.abs(+Y(e)))%2,p=new F(R);;){if(h){if(!(p=p.times(d)).c)break;c?p.c.length>c&&(p.c.length=c):o&&(p=p.mod(t))}if(u){if(0===(u=n(u/2)))break;h=u%2}else if(H(e=e.times(a),e.e+1,1),e.e>14)h=g(e);else{if(0==(u=+Y(e)))break;h=u%2}d=d.times(d),c?d.c&&d.c.length>c&&(d.c.length=c):o&&(d=d.mod(t))}return o?p:(f&&(p=R.div(p)),t?p.mod(t):c?H(p,V,U,void 0):p)},N.integerValue=function(e){var t=new F(this);return null==e?e=U:y(e,0,8),H(t,t.e+1,e)},N.isEqualTo=N.eq=function(e,t){return 0===d(this,new F(e,t))},N.isFinite=function(){return!!this.c},N.isGreaterThan=N.gt=function(e,t){return d(this,new F(e,t))>0},N.isGreaterThanOrEqualTo=N.gte=function(e,t){return 1===(t=d(this,new F(e,t)))||0===t},N.isInteger=function(){return!!this.c&&h(this.e/s)>this.c.length-2},N.isLessThan=N.lt=function(e,t){return d(this,new F(e,t))<0},N.isLessThanOrEqualTo=N.lte=function(e,t){return-1===(t=d(this,new F(e,t)))||0===t},N.isNaN=function(){return!this.s},N.isNegative=function(){return this.s<0},N.isPositive=function(){return this.s>0},N.isZero=function(){return!!this.c&&0==this.c[0]},N.minus=function(e,t){var r,n,i,a,u=this,c=u.s;if(t=(e=new F(e,t)).s,!c||!t)return new F(NaN);if(c!=t)return e.s=-t,u.plus(e);var l=u.e/s,f=e.e/s,p=u.c,d=e.c;if(!l||!f){if(!p||!d)return p?(e.s=-t,e):new F(d?u:NaN);if(!p[0]||!d[0])return d[0]?(e.s=-t,e):new F(p[0]?u:3==U?-0:0)}if(l=h(l),f=h(f),p=p.slice(),c=l-f){for((a=c<0)?(c=-c,i=p):(f=l,i=d),i.reverse(),t=c;t--;i.push(0));i.reverse()}else for(n=(a=(c=p.length)<(t=d.length))?c:t,c=t=0;t<n;t++)if(p[t]!=d[t]){a=p[t]<d[t];break}if(a&&(i=p,p=d,d=i,e.s=-e.s),(t=(n=d.length)-(r=p.length))>0)for(;t--;p[r++]=0);for(t=o-1;n>c;){if(p[--n]<d[n]){for(r=n;r&&!p[--r];p[r]=t);--p[r],p[n]+=o}p[n]-=d[n]}for(;0==p[0];p.splice(0,1),--f);return p[0]?z(e,p,f):(e.s=3==U?-1:1,e.c=[e.e=0],e)},N.modulo=N.mod=function(e,t){var r,n,i=this;return e=new F(e,t),!i.c||!e.s||e.c&&!e.c[0]?new F(NaN):!e.c||i.c&&!i.c[0]?new F(i):(9==x?(n=e.s,e.s=1,r=E(i,e,0,3),e.s=n,r.s*=n):r=E(i,e,0,x),(e=i.minus(r.times(e))).c[0]||1!=x||(e.s=i.s),e)},N.multipliedBy=N.times=function(e,t){var r,n,i,a,u,c,f,p,d,y,g,m,v,b,E,S=this,C=S.c,T=(e=new F(e,t)).c;if(!(C&&T&&C[0]&&T[0]))return!S.s||!e.s||C&&!C[0]&&!T||T&&!T[0]&&!C?e.c=e.e=e.s=null:(e.s*=S.s,C&&T?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=h(S.e/s)+h(e.e/s),e.s*=S.s,(f=C.length)<(y=T.length)&&(v=C,C=T,T=v,i=f,f=y,y=i),i=f+y,v=[];i--;v.push(0));for(b=o,E=l,i=y;--i>=0;){for(r=0,g=T[i]%E,m=T[i]/E|0,a=i+(u=f);a>i;)r=((p=g*(p=C[--u]%E)+(c=m*p+(d=C[u]/E|0)*g)%E*E+v[a]+r)/b|0)+(c/E|0)+m*d,v[a--]=p%b;v[a]=r}return r?++n:v.splice(0,1),z(e,v,n)},N.negated=function(){var e=new F(this);return e.s=-e.s||null,e},N.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new F(e,t)).s,!i||!t)return new F(NaN);if(i!=t)return e.s=-t,n.minus(e);var a=n.e/s,u=e.e/s,c=n.c,l=e.c;if(!a||!u){if(!c||!l)return new F(i/0);if(!c[0]||!l[0])return l[0]?e:new F(c[0]?n:0*i)}if(a=h(a),u=h(u),c=c.slice(),i=a-u){for(i>0?(u=a,r=l):(i=-i,r=c),r.reverse();i--;r.push(0));r.reverse()}for((i=c.length)-(t=l.length)<0&&(r=l,l=c,c=r,t=i),i=0;t;)i=(c[--t]=c[t]+l[t]+i)/o|0,c[t]=o===c[t]?0:c[t]%o;return i&&(c=[i].concat(c),++u),z(e,c,u)},N.precision=N.sd=function(e,t){var r,n,i,a=this;if(null!=e&&e!==!!e)return y(e,1,f),null==t?t=U:y(t,0,8),H(new F(a),e,t);if(!(r=a.c))return null;if(n=(i=r.length-1)*s+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&a.e+1>n&&(n=a.e+1),n},N.shiftedBy=function(e){return y(e,-u,u),this.times("1e"+e)},N.squareRoot=N.sqrt=function(){var e,t,r,n,i,a=this,o=a.c,s=a.s,u=a.e,c=k+4,l=new F("0.5");if(1!==s||!o||!o[0])return new F(!s||s<0&&(!o||o[0])?NaN:o?a:1/0);if(0==(s=Math.sqrt(+Y(a)))||s==1/0?(((t=p(o)).length+u)%2==0&&(t+="0"),s=Math.sqrt(+t),u=h((u+1)/2)-(u<0||u%2),r=new F(t=s==1/0?"5e"+u:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new F(s+""),r.c[0])for((s=(u=r.e)+c)<3&&(s=0);;)if(i=r,r=l.times(i.plus(E(a,i,c,1))),p(i.c).slice(0,s)===(t=p(r.c)).slice(0,s)){if(r.e<u&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(H(r,r.e+k+2,1),e=!r.times(r).eq(a));break}if(!n&&(H(i,i.e+k+2,0),i.times(i).eq(a))){r=i;break}c+=4,s+=4,n=1}return H(r,r.e+k+1,U,e)},N.toExponential=function(e,t){return null!=e&&(y(e,0,f),e++),q(this,e,t,1)},N.toFixed=function(e,t){return null!=e&&(y(e,0,f),e=e+this.e+1),q(this,e,t)},N.toFormat=function(e,t,r){var n,a=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=K;else if("object"!=typeof r)throw Error(i+"Argument not an object: "+r);if(n=a.toFixed(e,t),a.c){var o,s=n.split("."),u=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",f=s[0],h=s[1],p=a.s<0,d=p?f.slice(1):f,y=d.length;if(c&&(o=u,u=c,c=o,y-=o),u>0&&y>0){for(o=y%u||u,f=d.substr(0,o);o<y;o+=u)f+=l+d.substr(o,u);c>0&&(f+=l+d.slice(o)),p&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},N.toFraction=function(e){var t,r,n,a,o,u,l,f,h,d,y,g,m=this,v=m.c;if(null!=e&&(!(l=new F(e)).isInteger()&&(l.c||1!==l.s)||l.lt(R)))throw Error(i+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+Y(l));if(!v)return new F(m);for(t=new F(R),h=r=new F(R),n=f=new F(R),g=p(v),o=t.e=g.length-m.e-1,t.c[0]=c[(u=o%s)<0?s+u:u],e=!e||l.comparedTo(t)>0?o>0?t:h:l,u=D,D=1/0,l=new F(g),f.c[0]=0;d=E(l,t,0,1),1!=(a=r.plus(d.times(n))).comparedTo(e);)r=n,n=a,h=f.plus(d.times(a=h)),f=a,t=l.minus(d.times(a=t)),l=a;return a=E(e.minus(r),n,0,1),f=f.plus(a.times(h)),r=r.plus(a.times(n)),f.s=h.s=m.s,y=E(h,n,o*=2,U).minus(m).abs().comparedTo(E(f,r,o,U).minus(m).abs())<1?[h,n]:[f,r],D=u,y},N.toNumber=function(){return+Y(this)},N.toPrecision=function(e,t){return null!=e&&y(e,1,f),q(this,e,t,2)},N.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=i<=P||i>=O?m(p(r.c),i):v(p(r.c),i,"0"):10===e?t=v(p((r=H(new F(r),k+i+1,U)).c),r.e,"0"):(y(e,2,j.length,"Base"),t=S(v(p(r.c),i,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},N.valueOf=N.toJSON=function(){return Y(this)},N._isBigNumber=!0,N[Symbol.toStringTag]="BigNumber",N[Symbol.for("nodejs.util.inspect.custom")]=N.valueOf,null!=b&&F.set(b),F}(),E=function(){return(E=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},S=function(){function e(){this.format=e.DEFAULT_FORMAT,b.config({FORMAT:this.format})}return e.prototype.set=function(e){"FORMAT"in e&&(this.format=E({},this.format,e.FORMAT),e.FORMAT=this.format),b.config(e)},e.DEFAULT_FORMAT={prefix:"",decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0,suffix:""},e}();e.BigNumber=function(){function e(t){"object"==typeof t&&e.isBigNumber(t)?this.bn=t.bn.plus(0):this.bn=e.toBigNumberJs(t)}return e.prototype.clone=function(){return new e(this)},e.prototype.add=function(t){return new e(this.bn.plus(e.toBigNumberJs(t)))},e.prototype.sub=function(t){return new e(this.bn.minus(e.toBigNumberJs(t)))},e.prototype.mul=function(t){return new e(this.bn.times(e.toBigNumberJs(t)))},e.prototype.div=function(t){return new e(this.bn.div(e.toBigNumberJs(t)))},e.prototype.pow=function(t){return new e(this.bn.pow(e.toBigNumberJs(t)))},e.prototype.sqrt=function(){return new e(this.bn.sqrt())},e.prototype.abs=function(){return new e(this.bn.abs())},e.prototype.mod=function(t){return new e(this.bn.mod(e.toBigNumberJs(t)))},e.prototype.roundTo=function(t,r){return void 0===t&&(t=0),void 0===r&&(r=4),new e(this.bn.dp(t||0,r))},e.prototype.eq=function(t){return this.bn.eq(e.toBigNumberJs(t))},e.prototype.lt=function(t){return this.bn.lt(e.toBigNumberJs(t))},e.prototype.gt=function(t){return this.bn.gt(e.toBigNumberJs(t))},e.prototype.lte=function(t){return this.bn.lte(e.toBigNumberJs(t))},e.prototype.gte=function(t){return this.bn.gte(e.toBigNumberJs(t))},e.prototype.isNaN=function(){return this.bn.isNaN()},e.prototype.isFinite=function(){return this.bn.isFinite()},e.prototype.isZero=function(){return this.eq(0)},e.prototype.isPositive=function(){return this.gt(0)},e.prototype.isNegative=function(){return this.lt(0)},e.prototype.isInt=function(){return this.bn.isInteger()},e.prototype.getDecimalsCount=function(){return this.bn.dp()},e.prototype.isEven=function(){return this.mod(2).eq(0)},e.prototype.isOdd=function(){return!this.isEven()},e.prototype.isInSignedRange=function(){return this.gte(e.MIN_VALUE)&&this.lte(e.MAX_VALUE)},e.prototype.isInUnsignedRange=function(){return this.gte(e.MIN_UNSIGNED_VALUE)&&this.lte(e.MAX_UNSIGNED_VALUE)},e.prototype.toFormat=function(e,t,r){return this.bn.toFormat(e,t,r)},e.prototype.toFixed=function(e,t){return null==e?this.bn.toFixed():this.bn.toFixed(e,t)},e.prototype.toString=function(){return this.toFixed()},e.prototype.toNumber=function(){return this.bn.toNumber()},e.prototype.toJSON=function(){return this.bn.toFixed()},e.prototype.valueOf=function(){return this.bn.valueOf()},e.prototype.toBytes=function(t){var r=void 0===t?{}:t,n=r.isSigned,i=void 0===n||n,a=r.isLong,o=void 0===a||a;if(!this.isInt())throw new Error("Cant create bytes from number with decimals!");if(!i&&this.isNegative())throw new Error("Cant create bytes from negative number in signed mode!");if(o&&i&&!this.isInSignedRange())throw new Error("Number is not from signed numbers range");if(o&&!i&&!this.isInUnsignedRange())throw new Error("Number is not from unsigned numbers range");var s=i&&this.isNegative(),u=s?"1":"0",c=this.bn.plus(u).toString(2).replace("-",""),l=o?64:8*Math.ceil(c.length/8),f=e._toLength(l,c).split(""),h=[];do{h.push(parseInt(f.splice(0,8).join(""),2))}while(f.length);return s?Uint8Array.from(h.map((function(e){return 255-e}))):Uint8Array.from(h)},e.fromBytes=function(t,r){var n=void 0===r?{}:r,i=n.isSigned,a=void 0===i||i,o=n.isLong,s=void 0===o||o;if(s&&8!==t.length)throw new Error("Wrong bytes length! Minimal length is 8 byte!");t=!s&&t.length>0||s?t:[0];var u=!!a&&t[0]>127,c=Array.from(t).map((function(e){return u?255-e:e})).map((function(t){return e._toLength(8,t.toString(2))})).join(""),l=new e(new b(c,2));return u?l.mul(-1).sub(1):l},e.max=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.toBigNumber(t).reduce((function(e,t){return e.gte(t)?e:t}))},e.min=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.toBigNumber(t).reduce((function(e,t){return e.lte(t)?e:t}))},e.sum=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.toBigNumber(t).reduce((function(e,t){return e.add(t)}))},e.isBigNumber=function(t){return t&&"object"==typeof t&&(t instanceof e||Object.entries(e.prototype).filter((function(e){return"_"!==e[0].charAt(0)})).every((function(e){var r=e[0],n=e[1];return r in t&&typeof n==typeof t[r]})))},e.toBigNumber=function(t){return Array.isArray(t)?t.map((function(t){return new e(t)})):new e(t)},e.toBigNumberJs=function(t){return b.isBigNumber(t)?t:t instanceof e?t.bn:new b(t)},e._toLength=function(e,t){return new Array(e).fill("0",0,e).concat(t.split("")).slice(-e).join("")},e.MIN_VALUE=new e("-9223372036854775808"),e.MAX_VALUE=new e("9223372036854775807"),e.MIN_UNSIGNED_VALUE=new e("0"),e.MAX_UNSIGNED_VALUE=new e("18446744073709551615"),e.config=new S,e}(),function(e){!function(e){e[e.ROUND_UP=0]="ROUND_UP",e[e.ROUND_DOWN=1]="ROUND_DOWN",e[e.ROUND_CEIL=2]="ROUND_CEIL",e[e.ROUND_FLOOR=3]="ROUND_FLOOR",e[e.ROUND_HALF_UP=4]="ROUND_HALF_UP",e[e.ROUND_HALF_DOWN=5]="ROUND_HALF_DOWN",e[e.ROUND_HALF_EVEN=6]="ROUND_HALF_EVEN",e[e.ROUND_HALF_CEIL=7]="ROUND_HALF_CEIL",e[e.ROUND_HALF_FLOOR=8]="ROUND_HALF_FLOOR"}(e.ROUND_MODE||(e.ROUND_MODE={}))}(e.BigNumber||(e.BigNumber={}));var C=e.BigNumber;e.default=C,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=n(r(55));t.default=function(e){return i.default(e).then((function(e){return String.fromCharCode(e)}))}},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};t.__esModule=!0,t.Watch=void 0;var a=r(16),o=r(3),s=r(108),u=function(){function e(e,t,r,n){this._emitter=new s.EventEmitter,this._timer=null,this.address=t,this._interval=n||1e3,this._base=e,this._lastBlock={lastId:(null==r?void 0:r.id)||"",height:(null==r?void 0:r.height)||0,transactions:r?[r]:[]},this._addTimeout()}return e.prototype.on=function(e,t){this._emitter.on(e,t)},e.prototype.once=function(e,t){this._emitter.once(e,t)},e.prototype.off=function(e,t){this._emitter.off(e,t)},e.prototype._run=function(){var t=this;this._timer&&clearTimeout(this._timer);var r=function(){return t._addTimeout()};a.fetchTransactions(this._base,this.address,1).then((function(a){var s=n(a,1)[0];if(!s)return t._addTimeout(),null;t.getTransactionsInHeight(s,310).then((function(r){var a,s=e._groupByHeight(r),u=o.keys(s).map(Number).sort((function(e,t){return t-e})),c=n(u,2),l=c[0],f=c[1];if(t._lastBlock.height){var h=o.indexBy(o.prop("id"),t._lastBlock.transactions),p=e._getTransactionsToDispatch(i(s[l],s[f]||[]),h,t._lastBlock.lastId);t._lastBlock.height!==l?t._lastBlock={height:l,lastId:s[f]&&s[f].length?s[f][0].id:"",transactions:s[l]}:(a=t._lastBlock.transactions).push.apply(a,i(p)),p.length&&t._emitter.trigger("change-state",p)}else t._lastBlock={height:l,lastId:s[f]&&s[f].length?s[f][0].id:"",transactions:s[l]},t._emitter.trigger("change-state",r);t._addTimeout()}),r)})).catch(r)},e.prototype.getTransactionsInHeight=function(t,r){var s=this,u=t.height,c=function(t){return t.length>=r?Promise.resolve(t):a.fetchTransactions(s._base,s.address,t.length+100).then((function(r){if(t.length===r.length)return t;var a=e._groupByHeight(r),s=o.keys(a).map(Number).sort((function(e,t){return t-e})),l=n(s,2),f=l[0],h=l[1];return f===u&&h?i(a[f],[a[h][0]]):c(r)}))};return c([t])},e.prototype._addTimeout=function(){var e=this;this._timer=setTimeout((function(){e._run()}),this._interval)},e._groupByHeight=function(e){return e.reduce((function(e,t){return e[t.height]?e[t.height].push(t):e[t.height]=[t],e}),Object.create(null))},e._getTransactionsToDispatch=function(e,t,r){for(var n=[],i=0;i<e.length;i++){var a=e[i];if(a.id===r)break;t[a.id]||n.push(a)}return n},e}();t.Watch=u,t.default=function(e,t,r){return a.fetchTransactions(e,t,1).then((function(i){var a=n(i,1)[0];return new u(e,t,a,r)}))}},function(e,t,r){"use strict";t.__esModule=!0,function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(109))},function(e,t,r){"use strict";t.__esModule=!0;var n=function(){function e(){this._events=Object.create(null)}return e.prototype.hasListeners=function(e){return!(!this._events[e]||!this._events[e].length)},e.prototype.getActiveEvents=function(){var e=this;return Object.keys(this._events).filter((function(t){return e.hasListeners(t)}))},e.prototype.trigger=function(e,t){this._events[e]&&(this._events[e]=this._events[e].filter((function(e){try{e.handler.call(e.context,t)}catch(e){}return!e.once})),this._events[e].length||delete this._events[e])},e.prototype.on=function(e,t,r){this._on(e,t,r,!1)},e.prototype.once=function(e,t,r){this._on(e,t,r,!0)},e.prototype.off=function(e,t){var r=this,n="string"==typeof e?e:null,i="function"==typeof t?t:"function"==typeof e?e:null;n?i?n in this._events&&(this._events[n]=this._events[n].filter((function(e){return e.handler!==i}))):delete this._events[n]:Object.keys(this._events).forEach((function(e){r.off(e,i)}))},e.prototype._on=function(e,t,r,n){this._events[e]||(this._events[e]=[]),this._events[e].push({handler:t,context:r,once:n})},e}();t.EventEmitter=n}])}));