@hashgraphonline/standards-sdk 0.0.82 → 0.0.84

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 (236) hide show
  1. package/dist/es/hcs-10/base-client.d.ts.map +1 -1
  2. package/dist/es/hcs-10/connections-manager.d.ts +185 -0
  3. package/dist/es/hcs-10/connections-manager.d.ts.map +1 -0
  4. package/dist/es/hcs-10/index.d.ts +1 -0
  5. package/dist/es/hcs-10/index.d.ts.map +1 -1
  6. package/dist/es/hcs-10/sdk.d.ts.map +1 -1
  7. package/dist/es/services/mirror-node.d.ts.map +1 -1
  8. package/dist/es/standards-sdk.es.js +13 -11
  9. package/dist/es/standards-sdk.es.js.map +1 -1
  10. package/dist/es/standards-sdk.es10.js +594 -117
  11. package/dist/es/standards-sdk.es10.js.map +1 -1
  12. package/dist/es/standards-sdk.es100.js +3 -31
  13. package/dist/es/standards-sdk.es100.js.map +1 -1
  14. package/dist/es/standards-sdk.es101.js +3 -14
  15. package/dist/es/standards-sdk.es101.js.map +1 -1
  16. package/dist/es/standards-sdk.es102.js +13 -4
  17. package/dist/es/standards-sdk.es102.js.map +1 -1
  18. package/dist/es/standards-sdk.es103.js +13 -4
  19. package/dist/es/standards-sdk.es103.js.map +1 -1
  20. package/dist/es/standards-sdk.es104.js +1 -1
  21. package/dist/es/standards-sdk.es106.js +3 -3
  22. package/dist/es/standards-sdk.es107.js +8 -8
  23. package/dist/es/standards-sdk.es108.js +3 -3
  24. package/dist/es/standards-sdk.es11.js +103 -58
  25. package/dist/es/standards-sdk.es11.js.map +1 -1
  26. package/dist/es/standards-sdk.es110.js +4 -3
  27. package/dist/es/standards-sdk.es110.js.map +1 -1
  28. package/dist/es/standards-sdk.es111.js +34 -2
  29. package/dist/es/standards-sdk.es111.js.map +1 -1
  30. package/dist/es/standards-sdk.es112.js +33 -2
  31. package/dist/es/standards-sdk.es112.js.map +1 -1
  32. package/dist/es/standards-sdk.es113.js +9 -34
  33. package/dist/es/standards-sdk.es113.js.map +1 -1
  34. package/dist/es/standards-sdk.es114.js +32 -31
  35. package/dist/es/standards-sdk.es114.js.map +1 -1
  36. package/dist/es/standards-sdk.es115.js +3 -9
  37. package/dist/es/standards-sdk.es115.js.map +1 -1
  38. package/dist/es/standards-sdk.es116.js +2 -34
  39. package/dist/es/standards-sdk.es116.js.map +1 -1
  40. package/dist/es/standards-sdk.es117.js +5 -0
  41. package/dist/es/standards-sdk.es117.js.map +1 -0
  42. package/dist/es/standards-sdk.es12.js +82 -628
  43. package/dist/es/standards-sdk.es12.js.map +1 -1
  44. package/dist/es/standards-sdk.es13.js +650 -85
  45. package/dist/es/standards-sdk.es13.js.map +1 -1
  46. package/dist/es/standards-sdk.es14.js +84 -58
  47. package/dist/es/standards-sdk.es14.js.map +1 -1
  48. package/dist/es/standards-sdk.es15.js +57 -20
  49. package/dist/es/standards-sdk.es15.js.map +1 -1
  50. package/dist/es/standards-sdk.es16.js +18 -156
  51. package/dist/es/standards-sdk.es16.js.map +1 -1
  52. package/dist/es/standards-sdk.es17.js +138 -385
  53. package/dist/es/standards-sdk.es17.js.map +1 -1
  54. package/dist/es/standards-sdk.es18.js +385 -299
  55. package/dist/es/standards-sdk.es18.js.map +1 -1
  56. package/dist/es/standards-sdk.es19.js +310 -128
  57. package/dist/es/standards-sdk.es19.js.map +1 -1
  58. package/dist/es/standards-sdk.es2.js +1 -1
  59. package/dist/es/standards-sdk.es20.js +155 -7
  60. package/dist/es/standards-sdk.es20.js.map +1 -1
  61. package/dist/es/standards-sdk.es21.js +7 -1767
  62. package/dist/es/standards-sdk.es21.js.map +1 -1
  63. package/dist/es/standards-sdk.es22.js +1041 -36
  64. package/dist/es/standards-sdk.es22.js.map +1 -1
  65. package/dist/es/standards-sdk.es23.js +1766 -47
  66. package/dist/es/standards-sdk.es23.js.map +1 -1
  67. package/dist/es/standards-sdk.es24.js +36 -7190
  68. package/dist/es/standards-sdk.es24.js.map +1 -1
  69. package/dist/es/standards-sdk.es25.js +48 -3
  70. package/dist/es/standards-sdk.es25.js.map +1 -1
  71. package/dist/es/standards-sdk.es26.js +7190 -2
  72. package/dist/es/standards-sdk.es26.js.map +1 -1
  73. package/dist/es/standards-sdk.es27.js +3 -4167
  74. package/dist/es/standards-sdk.es27.js.map +1 -1
  75. package/dist/es/standards-sdk.es28.js +2 -1041
  76. package/dist/es/standards-sdk.es28.js.map +1 -1
  77. package/dist/es/standards-sdk.es29.js +2 -2
  78. package/dist/es/standards-sdk.es3.js +1 -1
  79. package/dist/es/standards-sdk.es30.js +4122 -374
  80. package/dist/es/standards-sdk.es30.js.map +1 -1
  81. package/dist/es/standards-sdk.es31.js +2 -2
  82. package/dist/es/standards-sdk.es31.js.map +1 -1
  83. package/dist/es/standards-sdk.es32.js +356 -112
  84. package/dist/es/standards-sdk.es32.js.map +1 -1
  85. package/dist/es/standards-sdk.es33.js +6 -2
  86. package/dist/es/standards-sdk.es33.js.map +1 -1
  87. package/dist/es/standards-sdk.es34.js +178 -3
  88. package/dist/es/standards-sdk.es34.js.map +1 -1
  89. package/dist/es/standards-sdk.es35.js +72 -75
  90. package/dist/es/standards-sdk.es35.js.map +1 -1
  91. package/dist/es/standards-sdk.es36.js +111 -20
  92. package/dist/es/standards-sdk.es36.js.map +1 -1
  93. package/dist/es/standards-sdk.es37.js +42 -138
  94. package/dist/es/standards-sdk.es37.js.map +1 -1
  95. package/dist/es/standards-sdk.es38.js +10 -91
  96. package/dist/es/standards-sdk.es38.js.map +1 -1
  97. package/dist/es/standards-sdk.es39.js +75 -7114
  98. package/dist/es/standards-sdk.es39.js.map +1 -1
  99. package/dist/es/standards-sdk.es4.js +2 -2
  100. package/dist/es/standards-sdk.es40.js +3 -194
  101. package/dist/es/standards-sdk.es40.js.map +1 -1
  102. package/dist/es/standards-sdk.es41.js +2 -438
  103. package/dist/es/standards-sdk.es41.js.map +1 -1
  104. package/dist/es/standards-sdk.es42.js +107 -19
  105. package/dist/es/standards-sdk.es42.js.map +1 -1
  106. package/dist/es/standards-sdk.es43.js +70 -135
  107. package/dist/es/standards-sdk.es43.js.map +1 -1
  108. package/dist/es/standards-sdk.es44.js +5 -17
  109. package/dist/es/standards-sdk.es44.js.map +1 -1
  110. package/dist/es/standards-sdk.es45.js +4 -28
  111. package/dist/es/standards-sdk.es45.js.map +1 -1
  112. package/dist/es/standards-sdk.es46.js +219 -27
  113. package/dist/es/standards-sdk.es46.js.map +1 -1
  114. package/dist/es/standards-sdk.es47.js +56 -19
  115. package/dist/es/standards-sdk.es47.js.map +1 -1
  116. package/dist/es/standards-sdk.es48.js +69 -44
  117. package/dist/es/standards-sdk.es48.js.map +1 -1
  118. package/dist/es/standards-sdk.es49.js +191 -14
  119. package/dist/es/standards-sdk.es49.js.map +1 -1
  120. package/dist/es/standards-sdk.es5.js +32 -26
  121. package/dist/es/standards-sdk.es5.js.map +1 -1
  122. package/dist/es/standards-sdk.es50.js +421 -44
  123. package/dist/es/standards-sdk.es50.js.map +1 -1
  124. package/dist/es/standards-sdk.es51.js +19 -1283
  125. package/dist/es/standards-sdk.es51.js.map +1 -1
  126. package/dist/es/standards-sdk.es52.js +134 -27
  127. package/dist/es/standards-sdk.es52.js.map +1 -1
  128. package/dist/es/standards-sdk.es53.js +17 -5
  129. package/dist/es/standards-sdk.es53.js.map +1 -1
  130. package/dist/es/standards-sdk.es54.js +21 -151
  131. package/dist/es/standards-sdk.es54.js.map +1 -1
  132. package/dist/es/standards-sdk.es55.js +20 -784
  133. package/dist/es/standards-sdk.es55.js.map +1 -1
  134. package/dist/es/standards-sdk.es56.js +17 -170
  135. package/dist/es/standards-sdk.es56.js.map +1 -1
  136. package/dist/es/standards-sdk.es57.js +35 -134
  137. package/dist/es/standards-sdk.es57.js.map +1 -1
  138. package/dist/es/standards-sdk.es58.js +18 -3
  139. package/dist/es/standards-sdk.es58.js.map +1 -1
  140. package/dist/es/standards-sdk.es59.js +54 -357
  141. package/dist/es/standards-sdk.es59.js.map +1 -1
  142. package/dist/es/standards-sdk.es60.js +1287 -4
  143. package/dist/es/standards-sdk.es60.js.map +1 -1
  144. package/dist/es/standards-sdk.es61.js +135 -166
  145. package/dist/es/standards-sdk.es61.js.map +1 -1
  146. package/dist/es/standards-sdk.es62.js +82 -72
  147. package/dist/es/standards-sdk.es62.js.map +1 -1
  148. package/dist/es/standards-sdk.es63.js +78 -108
  149. package/dist/es/standards-sdk.es63.js.map +1 -1
  150. package/dist/es/standards-sdk.es64.js +27 -47
  151. package/dist/es/standards-sdk.es64.js.map +1 -1
  152. package/dist/es/standards-sdk.es65.js +5 -9
  153. package/dist/es/standards-sdk.es65.js.map +1 -1
  154. package/dist/es/standards-sdk.es66.js +146 -84
  155. package/dist/es/standards-sdk.es66.js.map +1 -1
  156. package/dist/es/standards-sdk.es67.js +22 -3
  157. package/dist/es/standards-sdk.es67.js.map +1 -1
  158. package/dist/es/standards-sdk.es68.js +793 -2
  159. package/dist/es/standards-sdk.es68.js.map +1 -1
  160. package/dist/es/standards-sdk.es69.js +93 -105
  161. package/dist/es/standards-sdk.es69.js.map +1 -1
  162. package/dist/es/standards-sdk.es7.js +39 -33
  163. package/dist/es/standards-sdk.es7.js.map +1 -1
  164. package/dist/es/standards-sdk.es70.js +2 -74
  165. package/dist/es/standards-sdk.es70.js.map +1 -1
  166. package/dist/es/standards-sdk.es71.js +15 -5
  167. package/dist/es/standards-sdk.es71.js.map +1 -1
  168. package/dist/es/standards-sdk.es72.js +408 -4
  169. package/dist/es/standards-sdk.es72.js.map +1 -1
  170. package/dist/es/standards-sdk.es73.js +162 -209
  171. package/dist/es/standards-sdk.es73.js.map +1 -1
  172. package/dist/es/standards-sdk.es74.js +137 -52
  173. package/dist/es/standards-sdk.es74.js.map +1 -1
  174. package/dist/es/standards-sdk.es75.js +2281 -68
  175. package/dist/es/standards-sdk.es75.js.map +1 -1
  176. package/dist/es/standards-sdk.es76.js +159 -16
  177. package/dist/es/standards-sdk.es76.js.map +1 -1
  178. package/dist/es/standards-sdk.es77.js +417 -25
  179. package/dist/es/standards-sdk.es77.js.map +1 -1
  180. package/dist/es/standards-sdk.es78.js +2 -26
  181. package/dist/es/standards-sdk.es78.js.map +1 -1
  182. package/dist/es/standards-sdk.es79.js +118 -36
  183. package/dist/es/standards-sdk.es79.js.map +1 -1
  184. package/dist/es/standards-sdk.es8.js +8 -8
  185. package/dist/es/standards-sdk.es8.js.map +1 -1
  186. package/dist/es/standards-sdk.es80.js +20 -100
  187. package/dist/es/standards-sdk.es80.js.map +1 -1
  188. package/dist/es/standards-sdk.es81.js +3 -2
  189. package/dist/es/standards-sdk.es81.js.map +1 -1
  190. package/dist/es/standards-sdk.es82.js +31 -15
  191. package/dist/es/standards-sdk.es82.js.map +1 -1
  192. package/dist/es/standards-sdk.es83.js +57 -403
  193. package/dist/es/standards-sdk.es83.js.map +1 -1
  194. package/dist/es/standards-sdk.es84.js +47 -161
  195. package/dist/es/standards-sdk.es84.js.map +1 -1
  196. package/dist/es/standards-sdk.es85.js +9 -31
  197. package/dist/es/standards-sdk.es85.js.map +1 -1
  198. package/dist/es/standards-sdk.es86.js +58 -56
  199. package/dist/es/standards-sdk.es86.js.map +1 -1
  200. package/dist/es/standards-sdk.es87.js +6 -50
  201. package/dist/es/standards-sdk.es87.js.map +1 -1
  202. package/dist/es/standards-sdk.es88.js +14 -9
  203. package/dist/es/standards-sdk.es88.js.map +1 -1
  204. package/dist/es/standards-sdk.es89.js +6 -64
  205. package/dist/es/standards-sdk.es89.js.map +1 -1
  206. package/dist/es/standards-sdk.es9.js +2 -2
  207. package/dist/es/standards-sdk.es90.js +44 -5
  208. package/dist/es/standards-sdk.es90.js.map +1 -1
  209. package/dist/es/standards-sdk.es91.js +2 -15
  210. package/dist/es/standards-sdk.es91.js.map +1 -1
  211. package/dist/es/standards-sdk.es92.js +135 -6
  212. package/dist/es/standards-sdk.es92.js.map +1 -1
  213. package/dist/es/standards-sdk.es93.js +169 -42
  214. package/dist/es/standards-sdk.es93.js.map +1 -1
  215. package/dist/es/standards-sdk.es94.js +7136 -2
  216. package/dist/es/standards-sdk.es94.js.map +1 -1
  217. package/dist/es/standards-sdk.es95.js +27 -136
  218. package/dist/es/standards-sdk.es95.js.map +1 -1
  219. package/dist/es/standards-sdk.es96.js +26 -172
  220. package/dist/es/standards-sdk.es96.js.map +1 -1
  221. package/dist/es/standards-sdk.es97.js +38 -2282
  222. package/dist/es/standards-sdk.es97.js.map +1 -1
  223. package/dist/es/standards-sdk.es98.js +31 -12
  224. package/dist/es/standards-sdk.es98.js.map +1 -1
  225. package/dist/es/standards-sdk.es99.js +15 -13
  226. package/dist/es/standards-sdk.es99.js.map +1 -1
  227. package/dist/umd/hcs-10/base-client.d.ts.map +1 -1
  228. package/dist/umd/hcs-10/connections-manager.d.ts +185 -0
  229. package/dist/umd/hcs-10/connections-manager.d.ts.map +1 -0
  230. package/dist/umd/hcs-10/index.d.ts +1 -0
  231. package/dist/umd/hcs-10/index.d.ts.map +1 -1
  232. package/dist/umd/hcs-10/sdk.d.ts.map +1 -1
  233. package/dist/umd/services/mirror-node.d.ts.map +1 -1
  234. package/dist/umd/standards-sdk.umd.js +2 -2
  235. package/dist/umd/standards-sdk.umd.js.map +1 -1
  236. package/package.json +9 -4
@@ -146,7 +146,7 @@ read:function(e,t,r,n,o){var i,a,s=8*o-n-1,c=(1<<s)-1,u=c>>1,l=-7,d=r?o-1:0,p=r?
146
146
  * Copyright(c) 2014 Jonathan Ong
147
147
  * Copyright(c) 2015 Douglas Christopher Wilson
148
148
  * MIT Licensed
149
- */function requireMimeTypes(){return hasRequiredMimeTypes||(hasRequiredMimeTypes=1,function(e){var t,r,n,o=requireMimeDb(),i=requirePathBrowserify().extname,a=/^\s*([^;\s]*)(?:;|\s|$)/,s=/^text\//i;function c(e){if(!e||"string"!=typeof e)return!1;var t=a.exec(e),r=t&&o[t[1].toLowerCase()];return r&&r.charset?r.charset:!(!t||!s.test(t[1]))&&"UTF-8"}e.charset=c,e.charsets={lookup:c},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var r=-1===t.indexOf("/")?e.lookup(t):t;if(!r)return!1;if(-1===r.indexOf("charset")){var n=e.charset(r);n&&(r+="; charset="+n.toLowerCase())}return r},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var r=a.exec(t),n=r&&e.extensions[r[1].toLowerCase()];if(!n||!n.length)return!1;return n[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var r=i("x."+t).toLowerCase().substr(1);if(!r)return!1;return e.types[r]||!1},e.types=Object.create(null),t=e.extensions,r=e.types,n=["nginx","apache",void 0,"iana"],Object.keys(o).forEach((function(e){var i=o[e],a=i.extensions;if(a&&a.length){t[e]=a;for(var s=0;s<a.length;s++){var c=a[s];if(r[c]){var u=n.indexOf(o[r[c]].source),l=n.indexOf(i.source);if("application/octet-stream"!==r[c]&&(u>l||u===l&&"application/"===r[c].substr(0,12)))continue}r[c]=e}}}))}(mimeTypes)),mimeTypes}var mimeTypesExports=requireMimeTypes(),util$1,util2,objectUtil,objectUtil2;util2=util$1||(util$1={}),util2.assertEqual=e=>e,util2.assertIs=function(e){},util2.assertNever=function(e){throw new Error},util2.arrayToEnum=e=>{const t={};for(const r of e)t[r]=r;return t},util2.getValidEnumValues=e=>{const t=util2.objectKeys(e).filter((t=>"number"!=typeof e[e[t]])),r={};for(const n of t)r[n]=e[n];return util2.objectValues(r)},util2.objectValues=e=>util2.objectKeys(e).map((function(t){return e[t]})),util2.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},util2.find=(e,t)=>{for(const r of e)if(t(r))return r},util2.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,util2.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},util2.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,objectUtil2=objectUtil||(objectUtil={}),objectUtil2.mergeShapes=(e,t)=>({...e,...t});const ZodParsedType=util$1.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=e=>{switch(typeof e){case"undefined":return ZodParsedType.undefined;case"string":return ZodParsedType.string;case"number":return isNaN(e)?ZodParsedType.nan:ZodParsedType.number;case"boolean":return ZodParsedType.boolean;case"function":return ZodParsedType.function;case"bigint":return ZodParsedType.bigint;case"symbol":return ZodParsedType.symbol;case"object":return Array.isArray(e)?ZodParsedType.array:null===e?ZodParsedType.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?ZodParsedType.promise:"undefined"!=typeof Map&&e instanceof Map?ZodParsedType.map:"undefined"!=typeof Set&&e instanceof Set?ZodParsedType.set:"undefined"!=typeof Date&&e instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util$1.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(const o of e.issues)if("invalid_union"===o.code)o.unionErrors.map(n);else if("invalid_return_type"===o.code)n(o.returnTypeError);else if("invalid_arguments"===o.code)n(o.argumentsError);else if(0===o.path.length)r._errors.push(t(o));else{let e=r,n=0;for(;n<o.path.length;){const r=o.path[n];n===o.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(o))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof ZodError))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,util$1.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},r=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}ZodError.create=e=>new ZodError(e);const errorMap=(e,t)=>{let r;switch(e.code){case ZodIssueCode.invalid_type:r=e.received===ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,util$1.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${util$1.joinValues(e.keys,", ")}`;break;case ZodIssueCode.invalid_union:r="Invalid input";break;case ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${util$1.joinValues(e.options)}`;break;case ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${util$1.joinValues(e.options)}, received '${e.received}'`;break;case ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case ZodIssueCode.invalid_date:r="Invalid date";break;case ZodIssueCode.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:util$1.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case ZodIssueCode.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case ZodIssueCode.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case ZodIssueCode.custom:r="Invalid input";break;case ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,util$1.assertNever(e)}return{message:r}};let overrideErrorMap=errorMap;function setErrorMap(e){overrideErrorMap=e}function getErrorMap(){return overrideErrorMap}const makeIssue=e=>{const{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],a={...o,path:i};if(void 0!==o.message)return{...o,path:i,message:o.message};let s="";const c=n.filter((e=>!!e)).slice().reverse();for(const u of c)s=u(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}},EMPTY_PATH=[];function addIssueToContext(e,t){const r=getErrorMap(),n=makeIssue({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===errorMap?void 0:errorMap].filter((e=>!!e))});e.common.issues.push(n)}class ParseStatus{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if("aborted"===n.status)return INVALID;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const e=await n.key,t=await n.value;r.push({key:e,value:t})}return ParseStatus.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:t,value:o}=n;if("aborted"===t.status)return INVALID;if("aborted"===o.status)return INVALID;"dirty"===t.status&&e.dirty(),"dirty"===o.status&&e.dirty(),"__proto__"===t.value||void 0===o.value&&!n.alwaysSet||(r[t.value]=o.value)}return{status:e.value,value:r}}}const INVALID=Object.freeze({status:"aborted"}),DIRTY=e=>({status:"dirty",value:e}),OK=e=>({status:"valid",value:e}),isAborted=e=>"aborted"===e.status,isDirty=e=>"dirty"===e.status,isValid=e=>"valid"===e.status,isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise;function __classPrivateFieldGet(e,t,r,n){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function __classPrivateFieldSet(e,t,r,n,o){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r}var errorUtil,errorUtil2,_ZodEnum_cache,_ZodNativeEnum_cache;"function"==typeof SuppressedError&&SuppressedError,errorUtil2=errorUtil||(errorUtil={}),errorUtil2.errToObj=e=>"string"==typeof e?{message:e}:e||{},errorUtil2.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class ParseInputLazyPath{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(e,t)=>{if(isValid(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new ZodError(e.common.issues);return this._error=t,this._error}}};function processCreateParams(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:o};return{errorMap:(t,o)=>{var i,a;const{message:s}=e;return"invalid_enum_value"===t.code?{message:null!=s?s:o.defaultError}:void 0===o.data?{message:null!==(i=null!=s?s:n)&&void 0!==i?i:o.defaultError}:"invalid_type"!==t.code?{message:o.defaultError}:{message:null!==(a=null!=s?s:r)&&void 0!==a?a:o.defaultError}},description:o}}class ZodType{get description(){return this._def.description}_getType(e){return getParsedType(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:getParsedType(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:getParsedType(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(isAsync(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;const n={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:getParsedType(e)},o=this._parseSync({data:e,path:n.path,parent:n});return handleResult(n,o)}"~validate"(e){var t,r;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:getParsedType(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:n});return isValid(t)?{value:t.value}:{issues:n.common.issues}}catch(o){(null===(r=null===(t=null==o?void 0:o.message)||void 0===t?void 0:t.toLowerCase())||void 0===r?void 0:r.includes("encountered"))&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then((e=>isValid(e)?{value:e.value}:{issues:n.common.issues}))}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:getParsedType(e)},n=this._parse({data:e,path:r.path,parent:r}),o=await(isAsync(n)?n:Promise.resolve(n));return handleResult(r,o)}refine(e,t){const r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const o=e(t),i=()=>n.addIssue({code:ZodIssueCode.custom,...r(t)});return"undefined"!=typeof Promise&&o instanceof Promise?o.then((e=>!!e||(i(),!1))):!!o||(i(),!1)}))}refinement(e,t){return this._refinement(((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1)))}_refinement(e){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this)}promise(){return ZodPromise.create(this,this._def)}or(e){return ZodUnion.create([this,e],this._def)}and(e){return ZodIntersection.create(this,e,this._def)}transform(e){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:t,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:t,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ZodPipeline.create(this,e)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[0-9a-z]+$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nanoidRegex=/^[a-z0-9_-]{21}$/i,jwtRegex=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,durationRegex=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let emojiRegex;const ipv4Regex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4CidrRegex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6Regex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ipv6CidrRegex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64Regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64urlRegex=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dateRegexSource="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",dateRegex=new RegExp(`^${dateRegexSource}$`);function timeRegexSource(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function timeRegex(e){return new RegExp(`^${timeRegexSource(e)}$`)}function datetimeRegex(e){let t=`${dateRegexSource}T${timeRegexSource(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function isValidIP(e,t){return!("v4"!==t&&t||!ipv4Regex.test(e))||!("v6"!==t&&t||!ipv6Regex.test(e))}function isValidJWT(e,t){if(!jwtRegex.test(e))return!1;try{const[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return"object"==typeof o&&null!==o&&(!(!o.typ||!o.alg)&&(!t||o.alg===t))}catch(r){return!1}}function isValidCidr(e,t){return!("v4"!==t&&t||!ipv4CidrRegex.test(e))||!("v6"!==t&&t||!ipv6CidrRegex.test(e))}class ZodString extends ZodType{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==ZodParsedType.string){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:t.parsedType}),INVALID}const t=new ParseStatus;let r;for(const o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("max"===o.kind)e.data.length>o.value&&(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("length"===o.kind){const n=e.data.length>o.value,i=e.data.length<o.value;(n||i)&&(r=this._getOrReturnCtx(e,r),n?addIssueToContext(r,{code:ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&addIssueToContext(r,{code:ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),t.dirty())}else if("email"===o.kind)emailRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"email",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("emoji"===o.kind)emojiRegex||(emojiRegex=new RegExp(_emojiRegex,"u")),emojiRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"emoji",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("uuid"===o.kind)uuidRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"uuid",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("nanoid"===o.kind)nanoidRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"nanoid",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("cuid"===o.kind)cuidRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"cuid",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("cuid2"===o.kind)cuid2Regex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"cuid2",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("ulid"===o.kind)ulidRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"ulid",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(n){r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"url",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()}else if("regex"===o.kind){o.regex.lastIndex=0;o.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"regex",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty())}else if("trim"===o.kind)e.data=e.data.trim();else if("includes"===o.kind)e.data.includes(o.value,o.position)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),t.dirty());else if("toLowerCase"===o.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===o.kind)e.data=e.data.toUpperCase();else if("startsWith"===o.kind)e.data.startsWith(o.value)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:{startsWith:o.value},message:o.message}),t.dirty());else if("endsWith"===o.kind)e.data.endsWith(o.value)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:{endsWith:o.value},message:o.message}),t.dirty());else if("datetime"===o.kind){datetimeRegex(o).test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:"datetime",message:o.message}),t.dirty())}else if("date"===o.kind){dateRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:"date",message:o.message}),t.dirty())}else if("time"===o.kind){timeRegex(o).test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:"time",message:o.message}),t.dirty())}else"duration"===o.kind?durationRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"duration",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()):"ip"===o.kind?isValidIP(e.data,o.version)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"ip",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()):"jwt"===o.kind?isValidJWT(e.data,o.alg)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"jwt",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()):"cidr"===o.kind?isValidCidr(e.data,o.version)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"cidr",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()):"base64"===o.kind?base64Regex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"base64",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()):"base64url"===o.kind?base64urlRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"base64url",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()):util$1.assertNever(o);return{status:t.value,value:e.data}}_regex(e,t,r){return this.refinement((t=>e.test(t)),{validation:t,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(r)})}_addCheck(e){return new ZodString({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...errorUtil.errToObj(e)})}datetime(e){var t,r;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(r=null==e?void 0:e.local)&&void 0!==r&&r,...errorUtil.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...errorUtil.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...errorUtil.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...errorUtil.errToObj(t)})}nonempty(e){return this.min(1,errorUtil.errToObj(e))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function floatSafeRemainder(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n;return parseInt(e.toFixed(o).replace(".",""))%parseInt(t.toFixed(o).replace(".",""))/Math.pow(10,o)}ZodString.create=e=>{var t;return new ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...processCreateParams(e)})};class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==ZodParsedType.number){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:t.parsedType}),INVALID}let t;const r=new ParseStatus;for(const n of this._def.checks)if("int"===n.kind)util$1.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty())}else"multipleOf"===n.kind?0!==floatSafeRemainder(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.not_finite,message:n.message}),r.dirty()):util$1.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,errorUtil.toString(t))}setLimit(e,t,r,n){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:errorUtil.toString(n)}]})}_addCheck(e){return new ZodNumber({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&util$1.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ZodNumber.create=e=>new ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...processCreateParams(e)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(n){return this._getInvalidInput(e)}if(this._getType(e)!==ZodParsedType.bigint)return this._getInvalidInput(e);let t;const r=new ParseStatus;for(const o of this._def.checks)if("min"===o.kind){(o.inclusive?e.data<o.value:e.data<=o.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty())}else if("max"===o.kind){(o.inclusive?e.data>o.value:e.data>=o.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty())}else"multipleOf"===o.kind?e.data%o.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):util$1.assertNever(o);return{status:r.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:t.parsedType}),INVALID}gte(e,t){return this.setLimit("min",e,!0,errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,errorUtil.toString(t))}setLimit(e,t,r,n){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:errorUtil.toString(n)}]})}_addCheck(e){return new ZodBigInt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ZodBigInt.create=e=>{var t;return new ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...processCreateParams(e)})};class ZodBoolean extends ZodType{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==ZodParsedType.boolean){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:t.parsedType}),INVALID}return OK(e.data)}}ZodBoolean.create=e=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...processCreateParams(e)});class ZodDate extends ZodType{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==ZodParsedType.date){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:t.parsedType}),INVALID}if(isNaN(e.data.getTime())){return addIssueToContext(this._getOrReturnCtx(e),{code:ZodIssueCode.invalid_date}),INVALID}const t=new ParseStatus;let r;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):util$1.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ZodDate({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ZodDate.create=e=>new ZodDate({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(e)});class ZodSymbol extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.symbol){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:t.parsedType}),INVALID}return OK(e.data)}}ZodSymbol.create=e=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(e)});class ZodUndefined extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:t.parsedType}),INVALID}return OK(e.data)}}ZodUndefined.create=e=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(e)});class ZodNull extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.null){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:t.parsedType}),INVALID}return OK(e.data)}}ZodNull.create=e=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(e)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(e){return OK(e.data)}}ZodAny.create=e=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(e)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(e){return OK(e.data)}}ZodUnknown.create=e=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(e)});class ZodNever extends ZodType{_parse(e){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:t.parsedType}),INVALID}}ZodNever.create=e=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(e)});class ZodVoid extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:t.parsedType}),INVALID}return OK(e.data)}}ZodVoid.create=e=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(e)});class ZodArray extends ZodType{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==ZodParsedType.array)return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:t.parsedType}),INVALID;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(e||o)&&(addIssueToContext(t,{code:e?ZodIssueCode.too_big:ZodIssueCode.too_small,minimum:o?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(addIssueToContext(t,{code:ZodIssueCode.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(addIssueToContext(t,{code:ZodIssueCode.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map(((e,r)=>n.type._parseAsync(new ParseInputLazyPath(t,e,t.path,r))))).then((e=>ParseStatus.mergeArray(r,e)));const o=[...t.data].map(((e,r)=>n.type._parseSync(new ParseInputLazyPath(t,e,t.path,r))));return ParseStatus.mergeArray(r,o)}get element(){return this._def.type}min(e,t){return new ZodArray({...this._def,minLength:{value:e,message:errorUtil.toString(t)}})}max(e,t){return new ZodArray({...this._def,maxLength:{value:e,message:errorUtil.toString(t)}})}length(e,t){return new ZodArray({...this._def,exactLength:{value:e,message:errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}function deepPartialify(e){if(e instanceof ZodObject){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=ZodOptional.create(deepPartialify(n))}return new ZodObject({...e._def,shape:()=>t})}return e instanceof ZodArray?new ZodArray({...e._def,type:deepPartialify(e.element)}):e instanceof ZodOptional?ZodOptional.create(deepPartialify(e.unwrap())):e instanceof ZodNullable?ZodNullable.create(deepPartialify(e.unwrap())):e instanceof ZodTuple?ZodTuple.create(e.items.map((e=>deepPartialify(e)))):e}ZodArray.create=(e,t)=>new ZodArray({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(t)});class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=util$1.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==ZodParsedType.object){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:t.parsedType}),INVALID}const{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:o}=this._getCached(),i=[];if(!(this._def.catchall instanceof ZodNever&&"strip"===this._def.unknownKeys))for(const s in r.data)o.includes(s)||i.push(s);const a=[];for(const s of o){const e=n[s],t=r.data[s];a.push({key:{status:"valid",value:s},value:e._parse(new ParseInputLazyPath(r,t,r.path,s)),alwaysSet:s in r.data})}if(this._def.catchall instanceof ZodNever){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of i)a.push({key:{status:"valid",value:t},value:{status:"valid",value:r.data[t]}});else if("strict"===e)i.length>0&&(addIssueToContext(r,{code:ZodIssueCode.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const n=r.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new ParseInputLazyPath(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of a){const r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e})).then((e=>ParseStatus.mergeObjectSync(t,e))):ParseStatus.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var n,o,i,a;const s=null!==(i=null===(o=(n=this._def).errorMap)||void 0===o?void 0:o.call(n,t,r).message)&&void 0!==i?i:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=errorUtil.errToObj(e).message)&&void 0!==a?a:s}:{message:s}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(e){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ZodObject({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ZodObject({...this._def,catchall:e})}pick(e){const t={};return util$1.objectKeys(e).forEach((r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])})),new ZodObject({...this._def,shape:()=>t})}omit(e){const t={};return util$1.objectKeys(this.shape).forEach((r=>{e[r]||(t[r]=this.shape[r])})),new ZodObject({...this._def,shape:()=>t})}deepPartial(){return deepPartialify(this)}partial(e){const t={};return util$1.objectKeys(this.shape).forEach((r=>{const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()})),new ZodObject({...this._def,shape:()=>t})}required(e){const t={};return util$1.objectKeys(this.shape).forEach((r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof ZodOptional;)e=e._def.innerType;t[r]=e}})),new ZodObject({...this._def,shape:()=>t})}keyof(){return createZodEnum(util$1.objectKeys(this.shape))}}ZodObject.create=(e,t)=>new ZodObject({shape:()=>e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(t)}),ZodObject.strictCreate=(e,t)=>new ZodObject({shape:()=>e,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(t)}),ZodObject.lazycreate=(e,t)=>new ZodObject({shape:e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(t)});class ZodUnion extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map((async e=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const r=e.map((e=>new ZodError(e.ctx.common.issues)));return addIssueToContext(t,{code:ZodIssueCode.invalid_union,unionErrors:r}),INVALID}));{let e;const n=[];for(const i of r){const r={...t,common:{...t.common,issues:[]},parent:null},o=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const o=n.map((e=>new ZodError(e)));return addIssueToContext(t,{code:ZodIssueCode.invalid_union,unionErrors:o}),INVALID}}get options(){return this._def.options}}ZodUnion.create=(e,t)=>new ZodUnion({options:e,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(t)});const getDiscriminator=e=>e instanceof ZodLazy?getDiscriminator(e.schema):e instanceof ZodEffects?getDiscriminator(e.innerType()):e instanceof ZodLiteral?[e.value]:e instanceof ZodEnum?e.options:e instanceof ZodNativeEnum?util$1.objectValues(e.enum):e instanceof ZodDefault?getDiscriminator(e._def.innerType):e instanceof ZodUndefined?[void 0]:e instanceof ZodNull?[null]:e instanceof ZodOptional?[void 0,...getDiscriminator(e.unwrap())]:e instanceof ZodNullable?[null,...getDiscriminator(e.unwrap())]:e instanceof ZodBranded||e instanceof ZodReadonly?getDiscriminator(e.unwrap()):e instanceof ZodCatch?getDiscriminator(e._def.innerType):[];class ZodDiscriminatedUnion extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ZodParsedType.object)return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:t.parsedType}),INVALID;const r=this.discriminator,n=t.data[r],o=this.optionsMap.get(n);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._parseSync({data:t.data,path:t.path,parent:t}):(addIssueToContext(t,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const n=new Map;for(const o of t){const t=getDiscriminator(o.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(n.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);n.set(r,o)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...processCreateParams(r)})}}function mergeValues(e,t){const r=getParsedType(e),n=getParsedType(t);if(e===t)return{valid:!0,data:e};if(r===ZodParsedType.object&&n===ZodParsedType.object){const r=util$1.objectKeys(t),n=util$1.objectKeys(e).filter((e=>-1!==r.indexOf(e))),o={...e,...t};for(const i of n){const r=mergeValues(e[i],t[i]);if(!r.valid)return{valid:!1};o[i]=r.data}return{valid:!0,data:o}}if(r===ZodParsedType.array&&n===ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let n=0;n<e.length;n++){const o=mergeValues(e[n],t[n]);if(!o.valid)return{valid:!1};r.push(o.data)}return{valid:!0,data:r}}return r===ZodParsedType.date&&n===ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ZodIntersection extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(isAborted(e)||isAborted(n))return INVALID;const o=mergeValues(e.value,n.value);return o.valid?((isDirty(e)||isDirty(n))&&t.dirty(),{status:t.value,value:o.data}):(addIssueToContext(r,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ZodIntersection.create=(e,t,r)=>new ZodIntersection({left:e,right:t,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(r)});class ZodTuple extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ZodParsedType.array)return addIssueToContext(r,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:r.parsedType}),INVALID;if(r.data.length<this._def.items.length)return addIssueToContext(r,{code:ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),INVALID;!this._def.rest&&r.data.length>this._def.items.length&&(addIssueToContext(r,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new ParseInputLazyPath(r,e,r.path,t)):null})).filter((e=>!!e));return r.common.async?Promise.all(n).then((e=>ParseStatus.mergeArray(t,e))):ParseStatus.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new ZodTuple({...this._def,rest:e})}}ZodTuple.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:e,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(t)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ZodParsedType.object)return addIssueToContext(r,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:r.parsedType}),INVALID;const n=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)n.push({key:o._parse(new ParseInputLazyPath(r,a,r.path,a)),value:i._parse(new ParseInputLazyPath(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ParseStatus.mergeObjectAsync(t,n):ParseStatus.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new ZodRecord(t instanceof ZodType?{keyType:e,valueType:t,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(r)}:{keyType:ZodString.create(),valueType:e,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(t)})}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ZodParsedType.map)return addIssueToContext(r,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:r.parsedType}),INVALID;const n=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map((([e,t],i)=>({key:n._parse(new ParseInputLazyPath(r,e,r.path,[i,"key"])),value:o._parse(new ParseInputLazyPath(r,t,r.path,[i,"value"]))})));if(r.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const r of i){const n=await r.key,o=await r.value;if("aborted"===n.status||"aborted"===o.status)return INVALID;"dirty"!==n.status&&"dirty"!==o.status||t.dirty(),e.set(n.value,o.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const r of i){const n=r.key,o=r.value;if("aborted"===n.status||"aborted"===o.status)return INVALID;"dirty"!==n.status&&"dirty"!==o.status||t.dirty(),e.set(n.value,o.value)}return{status:t.value,value:e}}}}ZodMap.create=(e,t,r)=>new ZodMap({valueType:t,keyType:e,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(r)});class ZodSet extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ZodParsedType.set)return addIssueToContext(r,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:r.parsedType}),INVALID;const n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(addIssueToContext(r,{code:ZodIssueCode.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(addIssueToContext(r,{code:ZodIssueCode.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const o=this._def.valueType;function i(e){const r=new Set;for(const n of e){if("aborted"===n.status)return INVALID;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}const a=[...r.data.values()].map(((e,t)=>o._parse(new ParseInputLazyPath(r,e,r.path,t))));return r.common.async?Promise.all(a).then((e=>i(e))):i(a)}min(e,t){return new ZodSet({...this._def,minSize:{value:e,message:errorUtil.toString(t)}})}max(e,t){return new ZodSet({...this._def,maxSize:{value:e,message:errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ZodSet.create=(e,t)=>new ZodSet({valueType:e,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(t)});class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ZodParsedType.function)return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:t.parsedType}),INVALID;function r(e,r){return makeIssue({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,getErrorMap(),errorMap].filter((e=>!!e)),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:r}})}function n(e,r){return makeIssue({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,getErrorMap(),errorMap].filter((e=>!!e)),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:r}})}const o={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof ZodPromise){const e=this;return OK((async function(...t){const a=new ZodError([]),s=await e._def.args.parseAsync(t,o).catch((e=>{throw a.addIssue(r(t,e)),a})),c=await Reflect.apply(i,this,s);return await e._def.returns._def.type.parseAsync(c,o).catch((e=>{throw a.addIssue(n(c,e)),a}))}))}{const e=this;return OK((function(...t){const a=e._def.args.safeParse(t,o);if(!a.success)throw new ZodError([r(t,a.error)]);const s=Reflect.apply(i,this,a.data),c=e._def.returns.safeParse(s,o);if(!c.success)throw new ZodError([n(s,c.error)]);return c.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ZodFunction({...this._def,args:ZodTuple.create(e).rest(ZodUnknown.create())})}returns(e){return new ZodFunction({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new ZodFunction({args:e||ZodTuple.create([]).rest(ZodUnknown.create()),returns:t||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(r)})}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ZodLazy.create=(e,t)=>new ZodLazy({getter:e,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(t)});class ZodLiteral extends ZodType{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{received:t.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}function createZodEnum(e,t){return new ZodEnum({values:e,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(t)})}ZodLiteral.create=(e,t)=>new ZodLiteral({value:e,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(t)});class ZodEnum extends ZodType{constructor(){super(...arguments),_ZodEnum_cache.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return addIssueToContext(t,{expected:util$1.joinValues(r),received:t.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodEnum_cache)||__classPrivateFieldSet(this,_ZodEnum_cache,new Set(this._def.values)),!__classPrivateFieldGet(this,_ZodEnum_cache).has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return addIssueToContext(t,{received:t.data,code:ZodIssueCode.invalid_enum_value,options:r}),INVALID}return OK(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ZodEnum.create(e,{...this._def,...t})}exclude(e,t=this._def){return ZodEnum.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}_ZodEnum_cache=new WeakMap,ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{constructor(){super(...arguments),_ZodNativeEnum_cache.set(this,void 0)}_parse(e){const t=util$1.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ZodParsedType.string&&r.parsedType!==ZodParsedType.number){const e=util$1.objectValues(t);return addIssueToContext(r,{expected:util$1.joinValues(e),received:r.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodNativeEnum_cache)||__classPrivateFieldSet(this,_ZodNativeEnum_cache,new Set(util$1.getValidEnumValues(this._def.values))),!__classPrivateFieldGet(this,_ZodNativeEnum_cache).has(e.data)){const e=util$1.objectValues(t);return addIssueToContext(r,{received:r.data,code:ZodIssueCode.invalid_enum_value,options:e}),INVALID}return OK(e.data)}get enum(){return this._def.values}}_ZodNativeEnum_cache=new WeakMap,ZodNativeEnum.create=(e,t)=>new ZodNativeEnum({values:e,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(t)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ZodParsedType.promise&&!1===t.common.async)return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:t.parsedType}),INVALID;const r=t.parsedType===ZodParsedType.promise?t.data:Promise.resolve(t.data);return OK(r.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}ZodPromise.create=(e,t)=>new ZodPromise({type:e,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(t)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:e=>{addIssueToContext(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),"preprocess"===n.type){const e=n.transform(r.data,o);if(r.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return INVALID;const n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?INVALID:"dirty"===n.status||"dirty"===t.value?DIRTY(n.value):n}));{if("aborted"===t.value)return INVALID;const n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?INVALID:"dirty"===n.status||"dirty"===t.value?DIRTY(n.value):n}}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,o);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===r.common.async){const n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?INVALID:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((r=>"aborted"===r.status?INVALID:("dirty"===r.status&&t.dirty(),e(r.value).then((()=>({status:t.value,value:r.value}))))))}if("transform"===n.type){if(!1===r.common.async){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!isValid(e))return e;const i=n.transform(e.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((e=>isValid(e)?Promise.resolve(n.transform(e.value,o)).then((e=>({status:t.value,value:e}))):e))}util$1.assertNever(n)}}ZodEffects.create=(e,t,r)=>new ZodEffects({schema:e,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:t,...processCreateParams(r)}),ZodEffects.createWithPreprocess=(e,t,r)=>new ZodEffects({schema:t,effect:{type:"preprocess",transform:e},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(r)});class ZodOptional extends ZodType{_parse(e){return this._getType(e)===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ZodOptional.create=(e,t)=>new ZodOptional({innerType:e,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(t)});class ZodNullable extends ZodType{_parse(e){return this._getType(e)===ZodParsedType.null?OK(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ZodNullable.create=(e,t)=>new ZodNullable({innerType:e,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(t)});class ZodDefault extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===ZodParsedType.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ZodDefault.create=(e,t)=>new ZodDefault({innerType:e,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...processCreateParams(t)});class ZodCatch extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return isAsync(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new ZodError(r.common.issues)},input:r.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new ZodError(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(e,t)=>new ZodCatch({innerType:e,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...processCreateParams(t)});class ZodNaN extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.nan){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:t.parsedType}),INVALID}return{status:"valid",value:e.data}}}ZodNaN.create=e=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(e)});const BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?INVALID:"dirty"===e.status?(t.dirty(),DIRTY(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})()}{const e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new ZodPipeline({in:e,out:t,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(e){const t=this._def.innerType._parse(e),r=e=>(isValid(e)&&(e.value=Object.freeze(e.value)),e);return isAsync(t)?t.then((e=>r(e))):r(t)}unwrap(){return this._def.innerType}}function cleanParams(e,t){const r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r}function custom(e,t={},r){return e?ZodAny.create().superRefine(((n,o)=>{var i,a;const s=e(n);if(s instanceof Promise)return s.then((e=>{var i,a;if(!e){const e=cleanParams(t,n),s=null===(a=null!==(i=e.fatal)&&void 0!==i?i:r)||void 0===a||a;o.addIssue({code:"custom",...e,fatal:s})}}));if(!s){const e=cleanParams(t,n),s=null===(a=null!==(i=e.fatal)&&void 0!==i?i:r)||void 0===a||a;o.addIssue({code:"custom",...e,fatal:s})}})):ZodAny.create()}ZodReadonly.create=(e,t)=>new ZodReadonly({innerType:e,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(t)});const late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind,ZodFirstPartyTypeKind2;ZodFirstPartyTypeKind2=ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}),ZodFirstPartyTypeKind2.ZodString="ZodString",ZodFirstPartyTypeKind2.ZodNumber="ZodNumber",ZodFirstPartyTypeKind2.ZodNaN="ZodNaN",ZodFirstPartyTypeKind2.ZodBigInt="ZodBigInt",ZodFirstPartyTypeKind2.ZodBoolean="ZodBoolean",ZodFirstPartyTypeKind2.ZodDate="ZodDate",ZodFirstPartyTypeKind2.ZodSymbol="ZodSymbol",ZodFirstPartyTypeKind2.ZodUndefined="ZodUndefined",ZodFirstPartyTypeKind2.ZodNull="ZodNull",ZodFirstPartyTypeKind2.ZodAny="ZodAny",ZodFirstPartyTypeKind2.ZodUnknown="ZodUnknown",ZodFirstPartyTypeKind2.ZodNever="ZodNever",ZodFirstPartyTypeKind2.ZodVoid="ZodVoid",ZodFirstPartyTypeKind2.ZodArray="ZodArray",ZodFirstPartyTypeKind2.ZodObject="ZodObject",ZodFirstPartyTypeKind2.ZodUnion="ZodUnion",ZodFirstPartyTypeKind2.ZodDiscriminatedUnion="ZodDiscriminatedUnion",ZodFirstPartyTypeKind2.ZodIntersection="ZodIntersection",ZodFirstPartyTypeKind2.ZodTuple="ZodTuple",ZodFirstPartyTypeKind2.ZodRecord="ZodRecord",ZodFirstPartyTypeKind2.ZodMap="ZodMap",ZodFirstPartyTypeKind2.ZodSet="ZodSet",ZodFirstPartyTypeKind2.ZodFunction="ZodFunction",ZodFirstPartyTypeKind2.ZodLazy="ZodLazy",ZodFirstPartyTypeKind2.ZodLiteral="ZodLiteral",ZodFirstPartyTypeKind2.ZodEnum="ZodEnum",ZodFirstPartyTypeKind2.ZodEffects="ZodEffects",ZodFirstPartyTypeKind2.ZodNativeEnum="ZodNativeEnum",ZodFirstPartyTypeKind2.ZodOptional="ZodOptional",ZodFirstPartyTypeKind2.ZodNullable="ZodNullable",ZodFirstPartyTypeKind2.ZodDefault="ZodDefault",ZodFirstPartyTypeKind2.ZodCatch="ZodCatch",ZodFirstPartyTypeKind2.ZodPromise="ZodPromise",ZodFirstPartyTypeKind2.ZodBranded="ZodBranded",ZodFirstPartyTypeKind2.ZodPipeline="ZodPipeline",ZodFirstPartyTypeKind2.ZodReadonly="ZodReadonly";const instanceOfType=(e,t={message:`Input not instance of ${e.name}`})=>custom((t=>t instanceof e),t),stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,ostring=()=>stringType().optional(),onumber=()=>numberType().optional(),oboolean=()=>booleanType().optional(),coerce={string:e=>ZodString.create({...e,coerce:!0}),number:e=>ZodNumber.create({...e,coerce:!0}),boolean:e=>ZodBoolean.create({...e,coerce:!0}),bigint:e=>ZodBigInt.create({...e,coerce:!0}),date:e=>ZodDate.create({...e,coerce:!0})},NEVER=INVALID;var z=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap:setErrorMap,getErrorMap:getErrorMap,makeIssue:makeIssue,EMPTY_PATH:EMPTY_PATH,addIssueToContext:addIssueToContext,ParseStatus:ParseStatus,INVALID:INVALID,DIRTY:DIRTY,OK:OK,isAborted:isAborted,isDirty:isDirty,isValid:isValid,isAsync:isAsync,get util(){return util$1},get objectUtil(){return objectUtil},ZodParsedType:ZodParsedType,getParsedType:getParsedType,ZodType:ZodType,datetimeRegex:datetimeRegex,ZodString:ZodString,ZodNumber:ZodNumber,ZodBigInt:ZodBigInt,ZodBoolean:ZodBoolean,ZodDate:ZodDate,ZodSymbol:ZodSymbol,ZodUndefined:ZodUndefined,ZodNull:ZodNull,ZodAny:ZodAny,ZodUnknown:ZodUnknown,ZodNever:ZodNever,ZodVoid:ZodVoid,ZodArray:ZodArray,ZodObject:ZodObject,ZodUnion:ZodUnion,ZodDiscriminatedUnion:ZodDiscriminatedUnion,ZodIntersection:ZodIntersection,ZodTuple:ZodTuple,ZodRecord:ZodRecord,ZodMap:ZodMap,ZodSet:ZodSet,ZodFunction:ZodFunction,ZodLazy:ZodLazy,ZodLiteral:ZodLiteral,ZodEnum:ZodEnum,ZodNativeEnum:ZodNativeEnum,ZodPromise:ZodPromise,ZodEffects:ZodEffects,ZodTransformer:ZodEffects,ZodOptional:ZodOptional,ZodNullable:ZodNullable,ZodDefault:ZodDefault,ZodCatch:ZodCatch,ZodNaN:ZodNaN,BRAND:BRAND,ZodBranded:ZodBranded,ZodPipeline:ZodPipeline,ZodReadonly:ZodReadonly,custom:custom,Schema:ZodType,ZodSchema:ZodType,late:late,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},coerce:coerce,any:anyType,array:arrayType,bigint:bigIntType,boolean:booleanType,date:dateType,discriminatedUnion:discriminatedUnionType,effect:effectsType,enum:enumType,function:functionType,instanceof:instanceOfType,intersection:intersectionType,lazy:lazyType,literal:literalType,map:mapType,nan:nanType,nativeEnum:nativeEnumType,never:neverType,null:nullType,nullable:nullableType,number:numberType,object:objectType,oboolean:oboolean,onumber:onumber,optional:optionalType,ostring:ostring,pipeline:pipelineType,preprocess:preprocessType,promise:promiseType,record:recordType,set:setType,strictObject:strictObjectType,string:stringType,symbol:symbolType,transformer:effectsType,tuple:tupleType,undefined:undefinedType,union:unionType,unknown:unknownType,void:voidType,NEVER:NEVER,ZodIssueCode:ZodIssueCode,quotelessJson:quotelessJson,ZodError:ZodError});function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString:toString}=Object.prototype,{getPrototypeOf:getPrototypeOf}=Object,kindOf=(e=>t=>{const r=toString.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isBoolean=e=>!0===e||!1===e,isPlainObject=e=>{if("object"!==kindOf(e))return!1;const t=getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||isFunction(e.append)&&("formdata"===(t=kindOf(e))||"object"===t&&isFunction(e.toString)&&"[object FormData]"===e.toString()))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),isArray(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,e)}}function findKey(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global$2,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},r=(r,n)=>{const o=e&&findKey(t,n)||n;isPlainObject(t[o])&&isPlainObject(r)?t[o]=merge(t[o],r):isPlainObject(r)?t[o]=merge({},r):isArray(r)?t[o]=r.slice():t[o]=r};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&forEach(arguments[n],r);return t}const extend=(e,t,r,{allOwnKeys:n}={})=>(forEach(t,((t,n)=>{r&&isFunction(t)?e[n]=bind(t,r):e[n]=t}),{allOwnKeys:n}),e),stripBOM=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject=(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},isTypedArray$1=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll=(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),hasOwnProperty=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},freezeMethods=e=>{reduceDescriptors(e,((t,r)=>{if(isFunction(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];isFunction(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet=(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return isArray(e)?n(e):n(String(e).split(t)),r},noop=()=>{},toFiniteNumber=(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const toJSONObject=e=>{const t=new Array(10),r=(e,n)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=isArray(e)?[]:{};return forEach(e,((e,t)=>{const i=r(e,n+1);!isUndefined(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((e,t)=>(_global.addEventListener("message",(({source:r,data:n})=>{r===_global&&n===e&&t.length&&t.shift()()}),!1),r=>{t.push(r),_global.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))("function"==typeof setImmediate,isFunction(_global.postMessage)),asap="undefined"!=typeof queueMicrotask?queueMicrotask.bind(_global):void 0!==process$1$1&&process$1$1.nextTick||_setImmediate,utils$1={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isReadableStream:isReadableStream,isRequest:isRequest,isResponse:isResponse,isHeaders:isHeaders,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray$1,isFileList:isFileList,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable,setImmediate:_setImmediate,asap:asap};function AxiosError$1(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}utils$1.inherits(AxiosError$1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{descriptors[e]={value:e}})),Object.defineProperties(AxiosError$1,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError$1.from=(e,t,r,n,o,i)=>{const a=Object.create(prototype$1);return utils$1.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),AxiosError$1.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map((function(e,t){return e=removeBrackets(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,(function(e){return/^is[A-Z]/.test(e)}));function toFormData$1(e,t,r){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=utils$1.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!utils$1.isUndefined(t[e])}))).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(utils$1.isDate(e))return e.toISOString();if(!s&&utils$1.isBlob(e))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(e)||utils$1.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(utils$1.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(utils$1.isArray(e)&&isFlatArray(e)||(utils$1.isFileList(e)||utils$1.endsWith(r,"[]"))&&(s=utils$1.toArray(e)))return r=removeBrackets(r),s.forEach((function(e,n){!utils$1.isUndefined(e)&&null!==e&&t.append(!0===a?renderKey([r],n,i):null===a?r:r+"[]",c(e))})),!1;return!!isVisitable(e)||(t.append(renderKey(o,r,i),c(e)),!1)}const l=[],d=Object.assign(predicates,{defaultVisitor:u,convertValue:c,isVisitable:isVisitable});if(!utils$1.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!utils$1.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),utils$1.forEach(r,(function(r,i){!0===(!(utils$1.isUndefined(r)||null===r)&&o.call(t,r,utils$1.isString(i)?i.trim():i,n,d))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode;utils$1.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}prototype.append=function(e,t){this._pairs.push([e,t])},prototype.toString=function(e){const t=e?function(t){return e.call(this,t,encode$1)}:encode$1;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class InterceptorManager{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){utils$1.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1="undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData$1="undefined"!=typeof FormData?FormData:null,Blob$1="undefined"!=typeof Blob?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv="undefined"!=typeof window&&"undefined"!=typeof document,_navigator="object"==typeof navigator&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hasBrowserEnv,hasStandardBrowserEnv:hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv:hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin:origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return platform.isNode&&utils$1.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function arrayToObject(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function formDataToJSON(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&utils$1.isArray(n)?n.length:i,s)return utils$1.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&utils$1.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&utils$1.isArray(n[i])&&(n[i]=arrayToObject(n[i])),!a}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const r={};return utils$1.forEachEntry(e,((e,n)=>{t(parsePropPath(e),n,r,0)})),r}return null}function stringifySafely(e,t,r){if(utils$1.isString(e))try{return(t||JSON.parse)(e),utils$1.trim(e)}catch(n){if("SyntaxError"!==n.name)throw n}return(r||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=utils$1.isObject(e);o&&utils$1.isHTMLForm(e)&&(e=new FormData(e));if(utils$1.isFormData(e))return n?JSON.stringify(formDataToJSON(e)):e;if(utils$1.isArrayBuffer(e)||utils$1.isBuffer(e)||utils$1.isStream(e)||utils$1.isFile(e)||utils$1.isBlob(e)||utils$1.isReadableStream(e))return e;if(utils$1.isArrayBufferView(e))return e.buffer;if(utils$1.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(e,this.formSerializer).toString();if((i=utils$1.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData$1(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),stringifySafely(e)):e}],transformResponse:[function(e){const t=this.transitional||defaults.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(utils$1.isResponse(e)||utils$1.isReadableStream(e))return e;if(e&&utils$1.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(o){if(r){if("SyntaxError"===o.name)throw AxiosError$1.from(o,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],(e=>{defaults.headers[e]={}}));const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&ignoreDuplicateOf[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,r,n,o){return utils$1.isFunction(n)?n.call(this,t,r):(o&&(t=r),utils$1.isString(t)?utils$1.isString(n)?-1!==t.indexOf(n):utils$1.isRegExp(n)?n.test(t):void 0:void 0)}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}function buildAccessors(e,t){const r=utils$1.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}let AxiosHeaders$1=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=normalizeHeader(t);if(!o)throw new Error("header name must be a non-empty string");const i=utils$1.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=normalizeValue(e))}const i=(e,t)=>utils$1.forEach(e,((e,r)=>o(e,r,t)));if(utils$1.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(utils$1.isString(e)&&(e=e.trim())&&!isValidHeaderName(e))i(parseHeaders(e),t);else if(utils$1.isHeaders(e))for(const[a,s]of e.entries())o(s,a,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=normalizeHeader(e)){const r=utils$1.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return parseTokens(e);if(utils$1.isFunction(t))return t.call(this,e,r);if(utils$1.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=utils$1.findKey(this,e);return!(!r||void 0===this[r]||t&&!matchHeaderValue(this,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=normalizeHeader(e)){const o=utils$1.findKey(r,e);!o||t&&!matchHeaderValue(r,r[o],o,t)||(delete r[o],n=!0)}}return utils$1.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!matchHeaderValue(this,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return utils$1.forEach(this,((n,o)=>{const i=utils$1.findKey(r,o);if(i)return t[i]=normalizeValue(n),void delete t[o];const a=e?formatHeader(o):String(o).trim();a!==o&&delete t[o],t[a]=normalizeValue(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return utils$1.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&utils$1.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[$internals]=this[$internals]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=normalizeHeader(e);t[n]||(buildAccessors(r,e),t[n]=!0)}return utils$1.isArray(e)?e.forEach(n):n(e),this}};function transformData(e,t){const r=this||defaults,n=t||r,o=AxiosHeaders$1.from(n.headers);let i=n.data;return utils$1.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function isCancel$1(e){return!(!e||!e.__CANCEL__)}function CanceledError$1(e,t,r){AxiosError$1.call(this,null==e?"canceled":e,AxiosError$1.ERR_CANCELED,t,r),this.name="CanceledError"}function settle(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new AxiosError$1("Request failed with status code "+r.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,d=0;for(;l!==i;)d+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const p=u&&c-u;return p?Math.round(1e3*d/p):void 0}}function throttle(e,t){let r,n,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout((()=>{n=null,a(r)}),i-s)))},()=>r&&a(r)]}AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders$1.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),utils$1.freezeMethods(AxiosHeaders$1),utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});const progressEventReducer=(e,t,r=3)=>{let n=0;const o=speedometer(50,250);return throttle((r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),r)},progressEventDecorator=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},asyncDecorator=e=>(...t)=>utils$1.asap((()=>e(...t))),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,platform.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];utils$1.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),utils$1.isString(n)&&a.push("path="+n),utils$1.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,r){let n=!isAbsoluteURL(t);return e&&(n||0==r)?combineURLs(e,t):t}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,t){t=t||{};const r={};function n(e,t,r,n){return utils$1.isPlainObject(e)&&utils$1.isPlainObject(t)?utils$1.merge.call({caseless:n},e,t):utils$1.isPlainObject(t)?utils$1.merge({},t):utils$1.isArray(t)?t.slice():t}function o(e,t,r,o){return utils$1.isUndefined(t)?utils$1.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!utils$1.isUndefined(t))return n(void 0,t)}function a(e,t){return utils$1.isUndefined(t)?utils$1.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(headersToObject(e),headersToObject(t),0,!0)};return utils$1.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,a=i(e[n],t[n],n);utils$1.isUndefined(a)&&i!==s||(r[n]=a)})),r}const resolveConfig=e=>{const t=mergeConfig$1({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:c}=t;if(t.headers=s=AxiosHeaders$1.from(s),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),utils$1.isFormData(n))if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(r=s.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(platform.hasStandardBrowserEnv&&(o&&utils$1.isFunction(o)&&(o=o(t)),o||!1!==o&&isURLSameOrigin(t.url))){const e=i&&a&&cookies.read(a);e&&s.set(i,e)}return t},isXHRAdapterSupported="undefined"!=typeof XMLHttpRequest,xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise((function(t,r){const n=resolveConfig(e);let o=n.data;const i=AxiosHeaders$1.from(n.headers).normalize();let a,s,c,u,l,{responseType:d,onUploadProgress:p,onDownloadProgress:f}=n;function h(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function y(){if(!m)return;const n=AxiosHeaders$1.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());settle((function(e){t(e),h()}),(function(e){r(e),h()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:n,config:e,request:m}),m=null}m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(r(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||transitionalDefaults;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new AxiosError$1(t,o.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&utils$1.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),utils$1.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),d&&"json"!==d&&(m.responseType=n.responseType),f&&([c,l]=progressEventReducer(f,!0),m.addEventListener("progress",c)),p&&m.upload&&([s,u]=progressEventReducer(p),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=t=>{m&&(r(!t||t.type?new CanceledError$1(null,e,m):t),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const g=parseProtocol(n.url);g&&-1===platform.protocols.indexOf(g)?r(new AxiosError$1("Unsupported protocol "+g+":",AxiosError$1.ERR_BAD_REQUEST,e)):m.send(o||null)}))},composeSignals=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof AxiosError$1?t:new CanceledError$1(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new AxiosError$1(`timeout ${t} of ms exceeded`,AxiosError$1.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=n;return s.unsubscribe=()=>utils$1.asap(a),s}},streamChunk=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},readBytes=async function*(e,t){for await(const r of readStream(e))yield*streamChunk(r,t)},readStream=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},trackStream=(e,t,r,n)=>{const o=readBytes(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(t){throw s(t),t}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},isFetchSupported="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,isReadableStreamSupported=isFetchSupported&&"function"==typeof ReadableStream,encodeText=isFetchSupported&&("function"==typeof TextEncoder?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),test=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},supportsRequestStream=isReadableStreamSupported&&test((()=>{let e=!1;const t=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),DEFAULT_CHUNK_SIZE=65536,supportsResponseStream=isReadableStreamSupported&&test((()=>utils$1.isReadableStream(new Response("").body))),resolvers={stream:supportsResponseStream&&(e=>e.body)};isFetchSupported&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!resolvers[t]&&(resolvers[t]=utils$1.isFunction(e[t])?e=>e[t]():(e,r)=>{throw new AxiosError$1(`Response type '${t}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,r)})}))})(new Response);const getBodyLength=async e=>{if(null==e)return 0;if(utils$1.isBlob(e))return e.size;if(utils$1.isSpecCompliantForm(e)){const t=new Request(platform.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return utils$1.isArrayBufferView(e)||utils$1.isArrayBuffer(e)?e.byteLength:(utils$1.isURLSearchParams(e)&&(e+=""),utils$1.isString(e)?(await encodeText(e)).byteLength:void 0)},resolveBodyLength=async(e,t)=>{const r=utils$1.toFiniteNumber(e.getContentLength());return null==r?getBodyLength(t):r},fetchAdapter=isFetchSupported&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:l,withCredentials:d="same-origin",fetchOptions:p}=resolveConfig(e);u=u?(u+"").toLowerCase():"text";let f,h=composeSignals([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(c&&supportsRequestStream&&"get"!==r&&"head"!==r&&0!==(y=await resolveBodyLength(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(utils$1.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=progressEventDecorator(y,progressEventReducer(asyncDecorator(c)));n=trackStream(r.body,DEFAULT_CHUNK_SIZE,e,t)}}utils$1.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;f=new Request(t,{...p,signal:h,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?d:void 0});let i=await fetch(f);const a=supportsResponseStream&&("stream"===u||"response"===u);if(supportsResponseStream&&(s||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=utils$1.toFiniteNumber(i.headers.get("content-length")),[r,n]=s&&progressEventDecorator(t,progressEventReducer(asyncDecorator(s),!0))||[];i=new Response(trackStream(i.body,DEFAULT_CHUNK_SIZE,r,(()=>{n&&n(),m&&m()})),e)}u=u||"text";let g=await resolvers[utils$1.findKey(resolvers,u)||"text"](i,e);return!a&&m&&m(),await new Promise(((t,r)=>{settle(t,r,{data:g,headers:AxiosHeaders$1.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})}))}catch(g){if(m&&m(),g&&"TypeError"===g.name&&/fetch/i.test(g.message))throw Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,f),{cause:g.cause||g});throw AxiosError$1.from(g,g&&g.code,e,f)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}}));const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$1.isFunction(e)||null===e||!1===e,adapters={getAdapter:e=>{e=utils$1.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!isResolvedHandle(r)&&(n=knownAdapters[(t=String(r)).toLowerCase()],void 0===n))throw new AxiosError$1(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new AxiosError$1("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters.getAdapter(e.adapter||defaults.adapter)(e).then((function(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=AxiosHeaders$1.from(t.headers),t}),(function(t){return isCancel$1(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=AxiosHeaders$1.from(t.response.headers))),Promise.reject(t)}))}const VERSION$1="1.8.4",validators$1={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{validators$1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const deprecatedWarnings={};function assertOptions(e,t,r){if("object"!=typeof e)throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new AxiosError$1("option "+i+" must be "+r,AxiosError$1.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new AxiosError$1("Unknown option "+i,AxiosError$1.ERR_BAD_OPTION)}}validators$1.transitional=function(e,t,r){function n(e,t){return"[Axios v"+VERSION$1+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new AxiosError$1(n(o," has been removed"+(t?" in "+t:"")),AxiosError$1.ERR_DEPRECATED);return t&&!deprecatedWarnings[o]&&(deprecatedWarnings[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},validators$1.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const validator={assertOptions:assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(e){this.defaults=e,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{r.stack?t&&!String(r.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+t):r.stack=t}catch(n){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig$1(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),null!=n&&(utils$1.isFunction(n)?t.paramsSerializer={serialize:n}:validator.assertOptions(n,{encode:validators.function,serialize:validators.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),validator.assertOptions(t,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&utils$1.merge(o.common,o[t.method]);o&&utils$1.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=AxiosHeaders$1.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,d=0;if(!s){const e=[dispatchRequest.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=a.length;let p=t;for(d=0;d<l;){const e=a[d++],t=a[d++];try{p=e(p)}catch(f){t.call(this,f);break}}try{u=dispatchRequest.call(this,p)}catch(f){return Promise.reject(f)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return buildURL(buildFullPath((e=mergeConfig$1(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],(function(e){Axios$1.prototype[e]=function(t,r){return this.request(mergeConfig$1(r||{},{method:e,url:t,data:(r||{}).data}))}})),utils$1.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(mergeConfig$1(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Axios$1.prototype[e]=t(),Axios$1.prototype[e+"Form"]=t(!0)}));let CancelToken$1=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new CanceledError$1(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e((function(e){t=e})),cancel:t}}};function spread$1(e){return function(t){return e.apply(null,t)}}function isAxiosError$1(e){return utils$1.isObject(e)&&!0===e.isAxiosError}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};function createInstance(e){const t=new Axios$1(e),r=bind(Axios$1.prototype.request,t);return utils$1.extend(r,Axios$1.prototype,t,{allOwnKeys:!0}),utils$1.extend(r,t,null,{allOwnKeys:!0}),r.create=function(t){return createInstance(mergeConfig$1(e,t))},r}Object.entries(HttpStatusCode$1).forEach((([e,t])=>{HttpStatusCode$1[t]=e}));const axios=createInstance(defaults);axios.Axios=Axios$1,axios.CanceledError=CanceledError$1,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel$1,axios.VERSION=VERSION$1,axios.toFormData=toFormData$1,axios.AxiosError=AxiosError$1,axios.Cancel=axios.CanceledError,axios.all=function(e){return Promise.all(e)},axios.spread=spread$1,axios.isAxiosError=isAxiosError$1,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const{Axios:Axios,AxiosError:AxiosError,CanceledError:CanceledError,isCancel:isCancel,CancelToken:CancelToken,VERSION:VERSION,all:all,Cancel:Cancel,isAxiosError:isAxiosError,spread:spread,toFormData:toFormData,AxiosHeaders:AxiosHeaders,HttpStatusCode:HttpStatusCode,formToJSON:formToJSON,getAdapter:getAdapter,mergeConfig:mergeConfig}=axios;var lib={},proto={},hasRequiredProto,hasRequiredLib;function requireProto(){if(hasRequiredProto)return proto;hasRequiredProto=1,Object.defineProperty(proto,"__esModule",{value:!0}),proto.proto=proto.google=proto.default=proto.com=void 0;var e=function(e,r){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=t(r);if(n&&n.has(e))return n.get(e);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}return o.default=e,n&&n.set(e,o),o}(requireMinimal());function t(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,n=new WeakMap;return(t=function(e){return e?n:r})(e)}const r=e.Reader,n=e.Writer,o=e.util,i=proto.default=e.roots.hashgraph||(e.roots.hashgraph={});return proto.com=i.com=(()=>{const t={};return t.hedera=function(){const t={};return t.mirror=function(){const t={};return t.api=function(){const t={};return t.proto=function(){const t={};return t.ConsensusTopicQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.topicID=null,e.prototype.consensusStartTime=null,e.prototype.consensusEndTime=null,e.prototype.limit=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(10).fork()).ldelim(),null!=e.consensusStartTime&&Object.hasOwnProperty.call(e,"consensusStartTime")&&i.proto.Timestamp.encode(e.consensusStartTime,t.uint32(18).fork()).ldelim(),null!=e.consensusEndTime&&Object.hasOwnProperty.call(e,"consensusEndTime")&&i.proto.Timestamp.encode(e.consensusEndTime,t.uint32(26).fork()).ldelim(),null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&t.uint32(32).uint64(e.limit),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.mirror.api.proto.ConsensusTopicQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.topicID=i.proto.TopicID.decode(e,e.uint32());break;case 2:o.consensusStartTime=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.consensusEndTime=i.proto.Timestamp.decode(e,e.uint32());break;case 4:o.limit=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.mirror.api.proto.ConsensusTopicQuery"},e}(),t.ConsensusTopicResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.consensusTimestamp=null,e.prototype.message=o.newBuffer([]),e.prototype.runningHash=o.newBuffer([]),e.prototype.sequenceNumber=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.runningHashVersion=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.chunkInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.consensusTimestamp&&Object.hasOwnProperty.call(e,"consensusTimestamp")&&i.proto.Timestamp.encode(e.consensusTimestamp,t.uint32(10).fork()).ldelim(),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).bytes(e.message),null!=e.runningHash&&Object.hasOwnProperty.call(e,"runningHash")&&t.uint32(26).bytes(e.runningHash),null!=e.sequenceNumber&&Object.hasOwnProperty.call(e,"sequenceNumber")&&t.uint32(32).uint64(e.sequenceNumber),null!=e.runningHashVersion&&Object.hasOwnProperty.call(e,"runningHashVersion")&&t.uint32(40).uint64(e.runningHashVersion),null!=e.chunkInfo&&Object.hasOwnProperty.call(e,"chunkInfo")&&i.proto.ConsensusMessageChunkInfo.encode(e.chunkInfo,t.uint32(50).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.mirror.api.proto.ConsensusTopicResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.consensusTimestamp=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.message=e.bytes();break;case 3:o.runningHash=e.bytes();break;case 4:o.sequenceNumber=e.uint64();break;case 5:o.runningHashVersion=e.uint64();break;case 6:o.chunkInfo=i.proto.ConsensusMessageChunkInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.mirror.api.proto.ConsensusTopicResponse"},e}(),t.ConsensusService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.subscribeTopic=function e(t,r){return this.rpcCall(e,i.com.hedera.mirror.api.proto.ConsensusTopicQuery,i.com.hedera.mirror.api.proto.ConsensusTopicResponse,t,r)},"name",{value:"subscribeTopic"}),t}(),t.AddressBookQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileId=null,e.prototype.limit=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileId&&Object.hasOwnProperty.call(e,"fileId")&&i.proto.FileID.encode(e.fileId,t.uint32(10).fork()).ldelim(),null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&t.uint32(16).int32(e.limit),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.mirror.api.proto.AddressBookQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileId=i.proto.FileID.decode(e,e.uint32());break;case 2:o.limit=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.mirror.api.proto.AddressBookQuery"},e}(),t.NetworkService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.getNodes=function e(t,r){return this.rpcCall(e,i.com.hedera.mirror.api.proto.AddressBookQuery,i.proto.NodeAddress,t,r)},"name",{value:"getNodes"}),t}(),t}(),t}(),t}(),t.hapi=function(){const e={};return e.node=function(){const e={};return e.addressbook=function(){const e={};return e.NodeCreateTransactionBody=function(){function e(e){if(this.gossipEndpoint=[],this.serviceEndpoint=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountId=null,e.prototype.description="",e.prototype.gossipEndpoint=o.emptyArray,e.prototype.serviceEndpoint=o.emptyArray,e.prototype.gossipCaCertificate=o.newBuffer([]),e.prototype.grpcCertificateHash=o.newBuffer([]),e.prototype.adminKey=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(10).fork()).ldelim(),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(18).string(e.description),null!=e.gossipEndpoint&&e.gossipEndpoint.length)for(var r=0;r<e.gossipEndpoint.length;++r)i.proto.ServiceEndpoint.encode(e.gossipEndpoint[r],t.uint32(26).fork()).ldelim();if(null!=e.serviceEndpoint&&e.serviceEndpoint.length)for(r=0;r<e.serviceEndpoint.length;++r)i.proto.ServiceEndpoint.encode(e.serviceEndpoint[r],t.uint32(34).fork()).ldelim();return null!=e.gossipCaCertificate&&Object.hasOwnProperty.call(e,"gossipCaCertificate")&&t.uint32(42).bytes(e.gossipCaCertificate),null!=e.grpcCertificateHash&&Object.hasOwnProperty.call(e,"grpcCertificateHash")&&t.uint32(50).bytes(e.grpcCertificateHash),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(58).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.addressbook.NodeCreateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.description=e.string();break;case 3:o.gossipEndpoint&&o.gossipEndpoint.length||(o.gossipEndpoint=[]),o.gossipEndpoint.push(i.proto.ServiceEndpoint.decode(e,e.uint32()));break;case 4:o.serviceEndpoint&&o.serviceEndpoint.length||(o.serviceEndpoint=[]),o.serviceEndpoint.push(i.proto.ServiceEndpoint.decode(e,e.uint32()));break;case 5:o.gossipCaCertificate=e.bytes();break;case 6:o.grpcCertificateHash=e.bytes();break;case 7:o.adminKey=i.proto.Key.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.addressbook.NodeCreateTransactionBody"},e}(),e.NodeUpdateTransactionBody=function(){function e(e){if(this.gossipEndpoint=[],this.serviceEndpoint=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.accountId=null,e.prototype.description=null,e.prototype.gossipEndpoint=o.emptyArray,e.prototype.serviceEndpoint=o.emptyArray,e.prototype.gossipCaCertificate=null,e.prototype.grpcCertificateHash=null,e.prototype.adminKey=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(8).uint64(e.nodeId),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(18).fork()).ldelim(),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&i.google.protobuf.StringValue.encode(e.description,t.uint32(26).fork()).ldelim(),null!=e.gossipEndpoint&&e.gossipEndpoint.length)for(var r=0;r<e.gossipEndpoint.length;++r)i.proto.ServiceEndpoint.encode(e.gossipEndpoint[r],t.uint32(34).fork()).ldelim();if(null!=e.serviceEndpoint&&e.serviceEndpoint.length)for(r=0;r<e.serviceEndpoint.length;++r)i.proto.ServiceEndpoint.encode(e.serviceEndpoint[r],t.uint32(42).fork()).ldelim();return null!=e.gossipCaCertificate&&Object.hasOwnProperty.call(e,"gossipCaCertificate")&&i.google.protobuf.BytesValue.encode(e.gossipCaCertificate,t.uint32(50).fork()).ldelim(),null!=e.grpcCertificateHash&&Object.hasOwnProperty.call(e,"grpcCertificateHash")&&i.google.protobuf.BytesValue.encode(e.grpcCertificateHash,t.uint32(58).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(66).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.nodeId=e.uint64();break;case 2:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.description=i.google.protobuf.StringValue.decode(e,e.uint32());break;case 4:o.gossipEndpoint&&o.gossipEndpoint.length||(o.gossipEndpoint=[]),o.gossipEndpoint.push(i.proto.ServiceEndpoint.decode(e,e.uint32()));break;case 5:o.serviceEndpoint&&o.serviceEndpoint.length||(o.serviceEndpoint=[]),o.serviceEndpoint.push(i.proto.ServiceEndpoint.decode(e,e.uint32()));break;case 6:o.gossipCaCertificate=i.google.protobuf.BytesValue.decode(e,e.uint32());break;case 7:o.grpcCertificateHash=i.google.protobuf.BytesValue.decode(e,e.uint32());break;case 8:o.adminKey=i.proto.Key.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody"},e}(),e.NodeDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(8).uint64(e.nodeId),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.nodeId=e.uint64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody"},e}(),e}(),e.state=function(){const e={};return e.history=function(){const e={};return e.ProofKeySet=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.adoptionTime=null,e.prototype.key=o.newBuffer([]),e.prototype.nextKey=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.adoptionTime&&Object.hasOwnProperty.call(e,"adoptionTime")&&i.proto.Timestamp.encode(e.adoptionTime,t.uint32(18).fork()).ldelim(),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(26).bytes(e.key),null!=e.nextKey&&Object.hasOwnProperty.call(e,"nextKey")&&t.uint32(34).bytes(e.nextKey),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.ProofKeySet;e.pos<n;){var a=e.uint32();switch(a>>>3){case 2:o.adoptionTime=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.key=e.bytes();break;case 4:o.nextKey=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.ProofKeySet"},e}(),e.ProofKey=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.key=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(8).uint64(e.nodeId),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(18).bytes(e.key),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.ProofKey;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.nodeId=e.uint64();break;case 2:o.key=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.ProofKey"},e}(),e.History=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.addressBookHash=o.newBuffer([]),e.prototype.metadata=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.addressBookHash&&Object.hasOwnProperty.call(e,"addressBookHash")&&t.uint32(10).bytes(e.addressBookHash),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&t.uint32(18).bytes(e.metadata),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.History;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.addressBookHash=e.bytes();break;case 2:o.metadata=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.History"},e}(),e.HistoryProof=function(){function e(e){if(this.targetProofKeys=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.sourceAddressBookHash=o.newBuffer([]),e.prototype.targetProofKeys=o.emptyArray,e.prototype.targetHistory=null,e.prototype.proof=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.sourceAddressBookHash&&Object.hasOwnProperty.call(e,"sourceAddressBookHash")&&t.uint32(10).bytes(e.sourceAddressBookHash),null!=e.targetProofKeys&&e.targetProofKeys.length)for(var r=0;r<e.targetProofKeys.length;++r)i.com.hedera.hapi.node.state.history.ProofKey.encode(e.targetProofKeys[r],t.uint32(18).fork()).ldelim();return null!=e.targetHistory&&Object.hasOwnProperty.call(e,"targetHistory")&&i.com.hedera.hapi.node.state.history.History.encode(e.targetHistory,t.uint32(26).fork()).ldelim(),null!=e.proof&&Object.hasOwnProperty.call(e,"proof")&&t.uint32(34).bytes(e.proof),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.HistoryProof;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.sourceAddressBookHash=e.bytes();break;case 2:o.targetProofKeys&&o.targetProofKeys.length||(o.targetProofKeys=[]),o.targetProofKeys.push(i.com.hedera.hapi.node.state.history.ProofKey.decode(e,e.uint32()));break;case 3:o.targetHistory=i.com.hedera.hapi.node.state.history.History.decode(e,e.uint32());break;case 4:o.proof=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.HistoryProof"},e}(),e.HistoryProofConstruction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.constructionId=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.sourceRosterHash=o.newBuffer([]),e.prototype.sourceProof=null,e.prototype.targetRosterHash=o.newBuffer([]),e.prototype.gracePeriodEndTime=null,e.prototype.assemblyStartTime=null,e.prototype.targetProof=null,Object.defineProperty(e.prototype,"proofState",{get:o.oneOfGetter(t=["gracePeriodEndTime","assemblyStartTime","targetProof"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.constructionId&&Object.hasOwnProperty.call(e,"constructionId")&&t.uint32(8).uint64(e.constructionId),null!=e.sourceRosterHash&&Object.hasOwnProperty.call(e,"sourceRosterHash")&&t.uint32(18).bytes(e.sourceRosterHash),null!=e.sourceProof&&Object.hasOwnProperty.call(e,"sourceProof")&&i.com.hedera.hapi.node.state.history.HistoryProof.encode(e.sourceProof,t.uint32(26).fork()).ldelim(),null!=e.targetRosterHash&&Object.hasOwnProperty.call(e,"targetRosterHash")&&t.uint32(34).bytes(e.targetRosterHash),null!=e.gracePeriodEndTime&&Object.hasOwnProperty.call(e,"gracePeriodEndTime")&&i.proto.Timestamp.encode(e.gracePeriodEndTime,t.uint32(42).fork()).ldelim(),null!=e.assemblyStartTime&&Object.hasOwnProperty.call(e,"assemblyStartTime")&&i.proto.Timestamp.encode(e.assemblyStartTime,t.uint32(50).fork()).ldelim(),null!=e.targetProof&&Object.hasOwnProperty.call(e,"targetProof")&&i.com.hedera.hapi.node.state.history.HistoryProof.encode(e.targetProof,t.uint32(58).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.HistoryProofConstruction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.constructionId=e.uint64();break;case 2:o.sourceRosterHash=e.bytes();break;case 3:o.sourceProof=i.com.hedera.hapi.node.state.history.HistoryProof.decode(e,e.uint32());break;case 4:o.targetRosterHash=e.bytes();break;case 5:o.gracePeriodEndTime=i.proto.Timestamp.decode(e,e.uint32());break;case 6:o.assemblyStartTime=i.proto.Timestamp.decode(e,e.uint32());break;case 7:o.targetProof=i.com.hedera.hapi.node.state.history.HistoryProof.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.HistoryProofConstruction"},e}(),e.ConstructionNodeId=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.constructionId=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.constructionId&&Object.hasOwnProperty.call(e,"constructionId")&&t.uint32(8).uint64(e.constructionId),null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(16).uint64(e.nodeId),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.ConstructionNodeId;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.constructionId=e.uint64();break;case 2:o.nodeId=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.ConstructionNodeId"},e}(),e.HistoryProofVote=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.proof=null,e.prototype.congruentNodeId=null,Object.defineProperty(e.prototype,"vote",{get:o.oneOfGetter(t=["proof","congruentNodeId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.proof&&Object.hasOwnProperty.call(e,"proof")&&i.com.hedera.hapi.node.state.history.HistoryProof.encode(e.proof,t.uint32(10).fork()).ldelim(),null!=e.congruentNodeId&&Object.hasOwnProperty.call(e,"congruentNodeId")&&t.uint32(16).uint64(e.congruentNodeId),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.HistoryProofVote;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.proof=i.com.hedera.hapi.node.state.history.HistoryProof.decode(e,e.uint32());break;case 2:o.congruentNodeId=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.HistoryProofVote"},e}(),e.HistorySignature=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.history=null,e.prototype.signature=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.history&&Object.hasOwnProperty.call(e,"history")&&i.com.hedera.hapi.node.state.history.History.encode(e.history,t.uint32(10).fork()).ldelim(),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(18).bytes(e.signature),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.HistorySignature;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.history=i.com.hedera.hapi.node.state.history.History.decode(e,e.uint32());break;case 2:o.signature=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.HistorySignature"},e}(),e.RecordedHistorySignature=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.signingTime=null,e.prototype.historySignature=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.signingTime&&Object.hasOwnProperty.call(e,"signingTime")&&i.proto.Timestamp.encode(e.signingTime,t.uint32(10).fork()).ldelim(),null!=e.historySignature&&Object.hasOwnProperty.call(e,"historySignature")&&i.com.hedera.hapi.node.state.history.HistorySignature.encode(e.historySignature,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.RecordedHistorySignature;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.signingTime=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.historySignature=i.com.hedera.hapi.node.state.history.HistorySignature.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.RecordedHistorySignature"},e}(),e}(),e}(),e}(),e.platform=function(){const e={};return e.event=function(){const e={};return e.EventConsensusData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.consensusTimestamp=null,e.prototype.consensusOrder=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.consensusTimestamp&&Object.hasOwnProperty.call(e,"consensusTimestamp")&&i.proto.Timestamp.encode(e.consensusTimestamp,t.uint32(10).fork()).ldelim(),null!=e.consensusOrder&&Object.hasOwnProperty.call(e,"consensusOrder")&&t.uint32(16).uint64(e.consensusOrder),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.platform.event.EventConsensusData;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.consensusTimestamp=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.consensusOrder=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.platform.event.EventConsensusData"},e}(),e.EventCore=function(){function e(e){if(this.parents=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.creatorNodeId=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.birthRound=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.timeCreated=null,e.prototype.parents=o.emptyArray,e.prototype.version=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.creatorNodeId&&Object.hasOwnProperty.call(e,"creatorNodeId")&&t.uint32(8).int64(e.creatorNodeId),null!=e.birthRound&&Object.hasOwnProperty.call(e,"birthRound")&&t.uint32(16).int64(e.birthRound),null!=e.timeCreated&&Object.hasOwnProperty.call(e,"timeCreated")&&i.proto.Timestamp.encode(e.timeCreated,t.uint32(26).fork()).ldelim(),null!=e.parents&&e.parents.length)for(var r=0;r<e.parents.length;++r)i.com.hedera.hapi.platform.event.EventDescriptor.encode(e.parents[r],t.uint32(34).fork()).ldelim();return null!=e.version&&Object.hasOwnProperty.call(e,"version")&&i.proto.SemanticVersion.encode(e.version,t.uint32(138).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.platform.event.EventCore;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.creatorNodeId=e.int64();break;case 2:o.birthRound=e.int64();break;case 3:o.timeCreated=i.proto.Timestamp.decode(e,e.uint32());break;case 4:o.parents&&o.parents.length||(o.parents=[]),o.parents.push(i.com.hedera.hapi.platform.event.EventDescriptor.decode(e,e.uint32()));break;case 17:o.version=i.proto.SemanticVersion.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.platform.event.EventCore"},e}(),e.EventDescriptor=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.hash=o.newBuffer([]),e.prototype.creatorNodeId=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.birthRound=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.generation=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(10).bytes(e.hash),null!=e.creatorNodeId&&Object.hasOwnProperty.call(e,"creatorNodeId")&&t.uint32(16).int64(e.creatorNodeId),null!=e.birthRound&&Object.hasOwnProperty.call(e,"birthRound")&&t.uint32(24).int64(e.birthRound),null!=e.generation&&Object.hasOwnProperty.call(e,"generation")&&t.uint32(136).int64(e.generation),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.platform.event.EventDescriptor;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.hash=e.bytes();break;case 2:o.creatorNodeId=e.int64();break;case 3:o.birthRound=e.int64();break;case 17:o.generation=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.platform.event.EventDescriptor"},e}(),e.EventTransaction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.applicationTransaction=null,e.prototype.stateSignatureTransaction=null,Object.defineProperty(e.prototype,"transaction",{get:o.oneOfGetter(t=["applicationTransaction","stateSignatureTransaction"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.applicationTransaction&&Object.hasOwnProperty.call(e,"applicationTransaction")&&t.uint32(10).bytes(e.applicationTransaction),null!=e.stateSignatureTransaction&&Object.hasOwnProperty.call(e,"stateSignatureTransaction")&&i.com.hedera.hapi.platform.event.StateSignatureTransaction.encode(e.stateSignatureTransaction,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.platform.event.EventTransaction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.applicationTransaction=e.bytes();break;case 2:o.stateSignatureTransaction=i.com.hedera.hapi.platform.event.StateSignatureTransaction.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.platform.event.EventTransaction"},e}(),e.GossipEvent=function(){function e(e){if(this.eventTransaction=[],this.transactions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.eventCore=null,e.prototype.signature=o.newBuffer([]),e.prototype.eventTransaction=o.emptyArray,e.prototype.transactions=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.eventCore&&Object.hasOwnProperty.call(e,"eventCore")&&i.com.hedera.hapi.platform.event.EventCore.encode(e.eventCore,t.uint32(10).fork()).ldelim(),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(18).bytes(e.signature),null!=e.eventTransaction&&e.eventTransaction.length)for(var r=0;r<e.eventTransaction.length;++r)i.com.hedera.hapi.platform.event.EventTransaction.encode(e.eventTransaction[r],t.uint32(26).fork()).ldelim();if(null!=e.transactions&&e.transactions.length)for(r=0;r<e.transactions.length;++r)t.uint32(34).bytes(e.transactions[r]);return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.platform.event.GossipEvent;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.eventCore=i.com.hedera.hapi.platform.event.EventCore.decode(e,e.uint32());break;case 2:o.signature=e.bytes();break;case 3:o.eventTransaction&&o.eventTransaction.length||(o.eventTransaction=[]),o.eventTransaction.push(i.com.hedera.hapi.platform.event.EventTransaction.decode(e,e.uint32()));break;case 4:o.transactions&&o.transactions.length||(o.transactions=[]),o.transactions.push(e.bytes());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.platform.event.GossipEvent"},e}(),e.StateSignatureTransaction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.round=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.signature=o.newBuffer([]),e.prototype.hash=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.round&&Object.hasOwnProperty.call(e,"round")&&t.uint32(8).int64(e.round),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(18).bytes(e.signature),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(26).bytes(e.hash),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.platform.event.StateSignatureTransaction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.round=e.int64();break;case 2:o.signature=e.bytes();break;case 3:o.hash=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.platform.event.StateSignatureTransaction"},e}(),e}(),e}(),e.services=function(){const e={};return e.auxiliary=function(){const e={};return e.history=function(){const e={};return e.HistoryProofKeyPublicationTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.proofKey=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.proofKey&&Object.hasOwnProperty.call(e,"proofKey")&&t.uint32(10).bytes(e.proofKey),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.services.auxiliary.history.HistoryProofKeyPublicationTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.proofKey=e.bytes();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.services.auxiliary.history.HistoryProofKeyPublicationTransactionBody"},e}(),e.HistoryProofSignatureTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.constructionId=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.signature=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.constructionId&&Object.hasOwnProperty.call(e,"constructionId")&&t.uint32(8).uint64(e.constructionId),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&i.com.hedera.hapi.node.state.history.HistorySignature.encode(e.signature,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.services.auxiliary.history.HistoryProofSignatureTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.constructionId=e.uint64();break;case 2:o.signature=i.com.hedera.hapi.node.state.history.HistorySignature.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.services.auxiliary.history.HistoryProofSignatureTransactionBody"},e}(),e.HistoryProofVoteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.constructionId=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.vote=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.constructionId&&Object.hasOwnProperty.call(e,"constructionId")&&t.uint32(8).uint64(e.constructionId),null!=e.vote&&Object.hasOwnProperty.call(e,"vote")&&i.com.hedera.hapi.node.state.history.HistoryProofVote.encode(e.vote,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.services.auxiliary.history.HistoryProofVoteTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.constructionId=e.uint64();break;case 2:o.vote=i.com.hedera.hapi.node.state.history.HistoryProofVote.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.services.auxiliary.history.HistoryProofVoteTransactionBody"},e}(),e}(),e}(),e}(),e}(),t}(),t})(),proto.proto=i.proto=(()=>{const t={};return t.TransactionList=function(){function e(e){if(this.transactionList=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transactionList=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.transactionList&&e.transactionList.length)for(var r=0;r<e.transactionList.length;++r)i.proto.Transaction.encode(e.transactionList[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionList;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.transactionList&&o.transactionList.length||(o.transactionList=[]),o.transactionList.push(i.proto.Transaction.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionList"},e}(),t.AddressBookService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createNode=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createNode"}),Object.defineProperty(t.prototype.deleteNode=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteNode"}),Object.defineProperty(t.prototype.updateNode=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateNode"}),t}(),t.TransactionResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodeTransactionPrecheckCode=0,e.prototype.cost=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.nodeTransactionPrecheckCode&&Object.hasOwnProperty.call(e,"nodeTransactionPrecheckCode")&&t.uint32(8).int32(e.nodeTransactionPrecheckCode),null!=e.cost&&Object.hasOwnProperty.call(e,"cost")&&t.uint32(16).uint64(e.cost),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.nodeTransactionPrecheckCode=e.int32();break;case 2:o.cost=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionResponse"},e}(),t.ResponseCodeEnum=function(){const e={},t=Object.create(e);return t[e[0]="OK"]=0,t[e[1]="INVALID_TRANSACTION"]=1,t[e[2]="PAYER_ACCOUNT_NOT_FOUND"]=2,t[e[3]="INVALID_NODE_ACCOUNT"]=3,t[e[4]="TRANSACTION_EXPIRED"]=4,t[e[5]="INVALID_TRANSACTION_START"]=5,t[e[6]="INVALID_TRANSACTION_DURATION"]=6,t[e[7]="INVALID_SIGNATURE"]=7,t[e[8]="MEMO_TOO_LONG"]=8,t[e[9]="INSUFFICIENT_TX_FEE"]=9,t[e[10]="INSUFFICIENT_PAYER_BALANCE"]=10,t[e[11]="DUPLICATE_TRANSACTION"]=11,t[e[12]="BUSY"]=12,t[e[13]="NOT_SUPPORTED"]=13,t[e[14]="INVALID_FILE_ID"]=14,t[e[15]="INVALID_ACCOUNT_ID"]=15,t[e[16]="INVALID_CONTRACT_ID"]=16,t[e[17]="INVALID_TRANSACTION_ID"]=17,t[e[18]="RECEIPT_NOT_FOUND"]=18,t[e[19]="RECORD_NOT_FOUND"]=19,t[e[20]="INVALID_SOLIDITY_ID"]=20,t[e[21]="UNKNOWN"]=21,t[e[22]="SUCCESS"]=22,t[e[23]="FAIL_INVALID"]=23,t[e[24]="FAIL_FEE"]=24,t[e[25]="FAIL_BALANCE"]=25,t[e[26]="KEY_REQUIRED"]=26,t[e[27]="BAD_ENCODING"]=27,t[e[28]="INSUFFICIENT_ACCOUNT_BALANCE"]=28,t[e[29]="INVALID_SOLIDITY_ADDRESS"]=29,t[e[30]="INSUFFICIENT_GAS"]=30,t[e[31]="CONTRACT_SIZE_LIMIT_EXCEEDED"]=31,t[e[32]="LOCAL_CALL_MODIFICATION_EXCEPTION"]=32,t[e[33]="CONTRACT_REVERT_EXECUTED"]=33,t[e[34]="CONTRACT_EXECUTION_EXCEPTION"]=34,t[e[35]="INVALID_RECEIVING_NODE_ACCOUNT"]=35,t[e[36]="MISSING_QUERY_HEADER"]=36,t[e[37]="ACCOUNT_UPDATE_FAILED"]=37,t[e[38]="INVALID_KEY_ENCODING"]=38,t[e[39]="NULL_SOLIDITY_ADDRESS"]=39,t[e[40]="CONTRACT_UPDATE_FAILED"]=40,t[e[41]="INVALID_QUERY_HEADER"]=41,t[e[42]="INVALID_FEE_SUBMITTED"]=42,t[e[43]="INVALID_PAYER_SIGNATURE"]=43,t[e[44]="KEY_NOT_PROVIDED"]=44,t[e[45]="INVALID_EXPIRATION_TIME"]=45,t[e[46]="NO_WACL_KEY"]=46,t[e[47]="FILE_CONTENT_EMPTY"]=47,t[e[48]="INVALID_ACCOUNT_AMOUNTS"]=48,t[e[49]="EMPTY_TRANSACTION_BODY"]=49,t[e[50]="INVALID_TRANSACTION_BODY"]=50,t[e[51]="INVALID_SIGNATURE_TYPE_MISMATCHING_KEY"]=51,t[e[52]="INVALID_SIGNATURE_COUNT_MISMATCHING_KEY"]=52,t[e[53]="EMPTY_LIVE_HASH_BODY"]=53,t[e[54]="EMPTY_LIVE_HASH"]=54,t[e[55]="EMPTY_LIVE_HASH_KEYS"]=55,t[e[56]="INVALID_LIVE_HASH_SIZE"]=56,t[e[57]="EMPTY_QUERY_BODY"]=57,t[e[58]="EMPTY_LIVE_HASH_QUERY"]=58,t[e[59]="LIVE_HASH_NOT_FOUND"]=59,t[e[60]="ACCOUNT_ID_DOES_NOT_EXIST"]=60,t[e[61]="LIVE_HASH_ALREADY_EXISTS"]=61,t[e[62]="INVALID_FILE_WACL"]=62,t[e[63]="SERIALIZATION_FAILED"]=63,t[e[64]="TRANSACTION_OVERSIZE"]=64,t[e[65]="TRANSACTION_TOO_MANY_LAYERS"]=65,t[e[66]="CONTRACT_DELETED"]=66,t[e[67]="PLATFORM_NOT_ACTIVE"]=67,t[e[68]="KEY_PREFIX_MISMATCH"]=68,t[e[69]="PLATFORM_TRANSACTION_NOT_CREATED"]=69,t[e[70]="INVALID_RENEWAL_PERIOD"]=70,t[e[71]="INVALID_PAYER_ACCOUNT_ID"]=71,t[e[72]="ACCOUNT_DELETED"]=72,t[e[73]="FILE_DELETED"]=73,t[e[74]="ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS"]=74,t[e[75]="SETTING_NEGATIVE_ACCOUNT_BALANCE"]=75,t[e[76]="OBTAINER_REQUIRED"]=76,t[e[77]="OBTAINER_SAME_CONTRACT_ID"]=77,t[e[78]="OBTAINER_DOES_NOT_EXIST"]=78,t[e[79]="MODIFYING_IMMUTABLE_CONTRACT"]=79,t[e[80]="FILE_SYSTEM_EXCEPTION"]=80,t[e[81]="AUTORENEW_DURATION_NOT_IN_RANGE"]=81,t[e[82]="ERROR_DECODING_BYTESTRING"]=82,t[e[83]="CONTRACT_FILE_EMPTY"]=83,t[e[84]="CONTRACT_BYTECODE_EMPTY"]=84,t[e[85]="INVALID_INITIAL_BALANCE"]=85,t[e[86]="INVALID_RECEIVE_RECORD_THRESHOLD"]=86,t[e[87]="INVALID_SEND_RECORD_THRESHOLD"]=87,t[e[88]="ACCOUNT_IS_NOT_GENESIS_ACCOUNT"]=88,t[e[89]="PAYER_ACCOUNT_UNAUTHORIZED"]=89,t[e[90]="INVALID_FREEZE_TRANSACTION_BODY"]=90,t[e[91]="FREEZE_TRANSACTION_BODY_NOT_FOUND"]=91,t[e[92]="TRANSFER_LIST_SIZE_LIMIT_EXCEEDED"]=92,t[e[93]="RESULT_SIZE_LIMIT_EXCEEDED"]=93,t[e[94]="NOT_SPECIAL_ACCOUNT"]=94,t[e[95]="CONTRACT_NEGATIVE_GAS"]=95,t[e[96]="CONTRACT_NEGATIVE_VALUE"]=96,t[e[97]="INVALID_FEE_FILE"]=97,t[e[98]="INVALID_EXCHANGE_RATE_FILE"]=98,t[e[99]="INSUFFICIENT_LOCAL_CALL_GAS"]=99,t[e[100]="ENTITY_NOT_ALLOWED_TO_DELETE"]=100,t[e[101]="AUTHORIZATION_FAILED"]=101,t[e[102]="FILE_UPLOADED_PROTO_INVALID"]=102,t[e[103]="FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK"]=103,t[e[104]="FEE_SCHEDULE_FILE_PART_UPLOADED"]=104,t[e[105]="EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED"]=105,t[e[106]="MAX_CONTRACT_STORAGE_EXCEEDED"]=106,t[e[107]="TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT"]=107,t[e[108]="TOTAL_LEDGER_BALANCE_INVALID"]=108,t[e[110]="EXPIRATION_REDUCTION_NOT_ALLOWED"]=110,t[e[111]="MAX_GAS_LIMIT_EXCEEDED"]=111,t[e[112]="MAX_FILE_SIZE_EXCEEDED"]=112,t[e[113]="RECEIVER_SIG_REQUIRED"]=113,t[e[150]="INVALID_TOPIC_ID"]=150,t[e[155]="INVALID_ADMIN_KEY"]=155,t[e[156]="INVALID_SUBMIT_KEY"]=156,t[e[157]="UNAUTHORIZED"]=157,t[e[158]="INVALID_TOPIC_MESSAGE"]=158,t[e[159]="INVALID_AUTORENEW_ACCOUNT"]=159,t[e[160]="AUTORENEW_ACCOUNT_NOT_ALLOWED"]=160,t[e[162]="TOPIC_EXPIRED"]=162,t[e[163]="INVALID_CHUNK_NUMBER"]=163,t[e[164]="INVALID_CHUNK_TRANSACTION_ID"]=164,t[e[165]="ACCOUNT_FROZEN_FOR_TOKEN"]=165,t[e[166]="TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED"]=166,t[e[167]="INVALID_TOKEN_ID"]=167,t[e[168]="INVALID_TOKEN_DECIMALS"]=168,t[e[169]="INVALID_TOKEN_INITIAL_SUPPLY"]=169,t[e[170]="INVALID_TREASURY_ACCOUNT_FOR_TOKEN"]=170,t[e[171]="INVALID_TOKEN_SYMBOL"]=171,t[e[172]="TOKEN_HAS_NO_FREEZE_KEY"]=172,t[e[173]="TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN"]=173,t[e[174]="MISSING_TOKEN_SYMBOL"]=174,t[e[175]="TOKEN_SYMBOL_TOO_LONG"]=175,t[e[176]="ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN"]=176,t[e[177]="TOKEN_HAS_NO_KYC_KEY"]=177,t[e[178]="INSUFFICIENT_TOKEN_BALANCE"]=178,t[e[179]="TOKEN_WAS_DELETED"]=179,t[e[180]="TOKEN_HAS_NO_SUPPLY_KEY"]=180,t[e[181]="TOKEN_HAS_NO_WIPE_KEY"]=181,t[e[182]="INVALID_TOKEN_MINT_AMOUNT"]=182,t[e[183]="INVALID_TOKEN_BURN_AMOUNT"]=183,t[e[184]="TOKEN_NOT_ASSOCIATED_TO_ACCOUNT"]=184,t[e[185]="CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT"]=185,t[e[186]="INVALID_KYC_KEY"]=186,t[e[187]="INVALID_WIPE_KEY"]=187,t[e[188]="INVALID_FREEZE_KEY"]=188,t[e[189]="INVALID_SUPPLY_KEY"]=189,t[e[190]="MISSING_TOKEN_NAME"]=190,t[e[191]="TOKEN_NAME_TOO_LONG"]=191,t[e[192]="INVALID_WIPING_AMOUNT"]=192,t[e[193]="TOKEN_IS_IMMUTABLE"]=193,t[e[194]="TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT"]=194,t[e[195]="TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES"]=195,t[e[196]="ACCOUNT_IS_TREASURY"]=196,t[e[197]="TOKEN_ID_REPEATED_IN_TOKEN_LIST"]=197,t[e[198]="TOKEN_TRANSFER_LIST_SIZE_LIMIT_EXCEEDED"]=198,t[e[199]="EMPTY_TOKEN_TRANSFER_BODY"]=199,t[e[200]="EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS"]=200,t[e[201]="INVALID_SCHEDULE_ID"]=201,t[e[202]="SCHEDULE_IS_IMMUTABLE"]=202,t[e[203]="INVALID_SCHEDULE_PAYER_ID"]=203,t[e[204]="INVALID_SCHEDULE_ACCOUNT_ID"]=204,t[e[205]="NO_NEW_VALID_SIGNATURES"]=205,t[e[206]="UNRESOLVABLE_REQUIRED_SIGNERS"]=206,t[e[207]="SCHEDULED_TRANSACTION_NOT_IN_WHITELIST"]=207,t[e[208]="SOME_SIGNATURES_WERE_INVALID"]=208,t[e[209]="TRANSACTION_ID_FIELD_NOT_ALLOWED"]=209,t[e[210]="IDENTICAL_SCHEDULE_ALREADY_CREATED"]=210,t[e[211]="INVALID_ZERO_BYTE_IN_STRING"]=211,t[e[212]="SCHEDULE_ALREADY_DELETED"]=212,t[e[213]="SCHEDULE_ALREADY_EXECUTED"]=213,t[e[214]="MESSAGE_SIZE_TOO_LARGE"]=214,t[e[215]="OPERATION_REPEATED_IN_BUCKET_GROUPS"]=215,t[e[216]="BUCKET_CAPACITY_OVERFLOW"]=216,t[e[217]="NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION"]=217,t[e[218]="BUCKET_HAS_NO_THROTTLE_GROUPS"]=218,t[e[219]="THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC"]=219,t[e[220]="SUCCESS_BUT_MISSING_EXPECTED_OPERATION"]=220,t[e[221]="UNPARSEABLE_THROTTLE_DEFINITIONS"]=221,t[e[222]="INVALID_THROTTLE_DEFINITIONS"]=222,t[e[223]="ACCOUNT_EXPIRED_AND_PENDING_REMOVAL"]=223,t[e[224]="INVALID_TOKEN_MAX_SUPPLY"]=224,t[e[225]="INVALID_TOKEN_NFT_SERIAL_NUMBER"]=225,t[e[226]="INVALID_NFT_ID"]=226,t[e[227]="METADATA_TOO_LONG"]=227,t[e[228]="BATCH_SIZE_LIMIT_EXCEEDED"]=228,t[e[229]="INVALID_QUERY_RANGE"]=229,t[e[230]="FRACTION_DIVIDES_BY_ZERO"]=230,t[e[231]="INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE"]=231,t[e[232]="CUSTOM_FEES_LIST_TOO_LONG"]=232,t[e[233]="INVALID_CUSTOM_FEE_COLLECTOR"]=233,t[e[234]="INVALID_TOKEN_ID_IN_CUSTOM_FEES"]=234,t[e[235]="TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR"]=235,t[e[236]="TOKEN_MAX_SUPPLY_REACHED"]=236,t[e[237]="SENDER_DOES_NOT_OWN_NFT_SERIAL_NO"]=237,t[e[238]="CUSTOM_FEE_NOT_FULLY_SPECIFIED"]=238,t[e[239]="CUSTOM_FEE_MUST_BE_POSITIVE"]=239,t[e[240]="TOKEN_HAS_NO_FEE_SCHEDULE_KEY"]=240,t[e[241]="CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE"]=241,t[e[242]="ROYALTY_FRACTION_CANNOT_EXCEED_ONE"]=242,t[e[243]="FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT"]=243,t[e[244]="CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES"]=244,t[e[245]="CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON"]=245,t[e[246]="CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON"]=246,t[e[247]="INVALID_CUSTOM_FEE_SCHEDULE_KEY"]=247,t[e[248]="INVALID_TOKEN_MINT_METADATA"]=248,t[e[249]="INVALID_TOKEN_BURN_METADATA"]=249,t[e[250]="CURRENT_TREASURY_STILL_OWNS_NFTS"]=250,t[e[251]="ACCOUNT_STILL_OWNS_NFTS"]=251,t[e[252]="TREASURY_MUST_OWN_BURNED_NFT"]=252,t[e[253]="ACCOUNT_DOES_NOT_OWN_WIPED_NFT"]=253,t[e[254]="ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON"]=254,t[e[255]="MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED"]=255,t[e[256]="PAYER_ACCOUNT_DELETED"]=256,t[e[257]="CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH"]=257,t[e[258]="CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS"]=258,t[e[259]="INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE"]=259,t[e[260]="SERIAL_NUMBER_LIMIT_REACHED"]=260,t[e[261]="CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE"]=261,t[e[262]="NO_REMAINING_AUTOMATIC_ASSOCIATIONS"]=262,t[e[263]="EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT"]=263,t[e[264]="REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT"]=264,t[e[265]="TOKEN_IS_PAUSED"]=265,t[e[266]="TOKEN_HAS_NO_PAUSE_KEY"]=266,t[e[267]="INVALID_PAUSE_KEY"]=267,t[e[268]="FREEZE_UPDATE_FILE_DOES_NOT_EXIST"]=268,t[e[269]="FREEZE_UPDATE_FILE_HASH_DOES_NOT_MATCH"]=269,t[e[270]="NO_UPGRADE_HAS_BEEN_PREPARED"]=270,t[e[271]="NO_FREEZE_IS_SCHEDULED"]=271,t[e[272]="UPDATE_FILE_HASH_CHANGED_SINCE_PREPARE_UPGRADE"]=272,t[e[273]="FREEZE_START_TIME_MUST_BE_FUTURE"]=273,t[e[274]="PREPARED_UPDATE_FILE_IS_IMMUTABLE"]=274,t[e[275]="FREEZE_ALREADY_SCHEDULED"]=275,t[e[276]="FREEZE_UPGRADE_IN_PROGRESS"]=276,t[e[277]="UPDATE_FILE_ID_DOES_NOT_MATCH_PREPARED"]=277,t[e[278]="UPDATE_FILE_HASH_DOES_NOT_MATCH_PREPARED"]=278,t[e[279]="CONSENSUS_GAS_EXHAUSTED"]=279,t[e[280]="REVERTED_SUCCESS"]=280,t[e[281]="MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED"]=281,t[e[282]="INVALID_ALIAS_KEY"]=282,t[e[283]="UNEXPECTED_TOKEN_DECIMALS"]=283,t[e[284]="INVALID_PROXY_ACCOUNT_ID"]=284,t[e[285]="INVALID_TRANSFER_ACCOUNT_ID"]=285,t[e[286]="INVALID_FEE_COLLECTOR_ACCOUNT_ID"]=286,t[e[287]="ALIAS_IS_IMMUTABLE"]=287,t[e[288]="SPENDER_ACCOUNT_SAME_AS_OWNER"]=288,t[e[289]="AMOUNT_EXCEEDS_TOKEN_MAX_SUPPLY"]=289,t[e[290]="NEGATIVE_ALLOWANCE_AMOUNT"]=290,t[e[291]="CANNOT_APPROVE_FOR_ALL_FUNGIBLE_COMMON"]=291,t[e[292]="SPENDER_DOES_NOT_HAVE_ALLOWANCE"]=292,t[e[293]="AMOUNT_EXCEEDS_ALLOWANCE"]=293,t[e[294]="MAX_ALLOWANCES_EXCEEDED"]=294,t[e[295]="EMPTY_ALLOWANCES"]=295,t[e[296]="SPENDER_ACCOUNT_REPEATED_IN_ALLOWANCES"]=296,t[e[297]="REPEATED_SERIAL_NUMS_IN_NFT_ALLOWANCES"]=297,t[e[298]="FUNGIBLE_TOKEN_IN_NFT_ALLOWANCES"]=298,t[e[299]="NFT_IN_FUNGIBLE_TOKEN_ALLOWANCES"]=299,t[e[300]="INVALID_ALLOWANCE_OWNER_ID"]=300,t[e[301]="INVALID_ALLOWANCE_SPENDER_ID"]=301,t[e[302]="REPEATED_ALLOWANCES_TO_DELETE"]=302,t[e[303]="INVALID_DELEGATING_SPENDER"]=303,t[e[304]="DELEGATING_SPENDER_CANNOT_GRANT_APPROVE_FOR_ALL"]=304,t[e[305]="DELEGATING_SPENDER_DOES_NOT_HAVE_APPROVE_FOR_ALL"]=305,t[e[306]="SCHEDULE_EXPIRATION_TIME_TOO_FAR_IN_FUTURE"]=306,t[e[307]="SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME"]=307,t[e[308]="SCHEDULE_FUTURE_THROTTLE_EXCEEDED"]=308,t[e[309]="SCHEDULE_FUTURE_GAS_LIMIT_EXCEEDED"]=309,t[e[310]="INVALID_ETHEREUM_TRANSACTION"]=310,t[e[311]="WRONG_CHAIN_ID"]=311,t[e[312]="WRONG_NONCE"]=312,t[e[313]="ACCESS_LIST_UNSUPPORTED"]=313,t[e[314]="SCHEDULE_PENDING_EXPIRATION"]=314,t[e[315]="CONTRACT_IS_TOKEN_TREASURY"]=315,t[e[316]="CONTRACT_HAS_NON_ZERO_TOKEN_BALANCES"]=316,t[e[317]="CONTRACT_EXPIRED_AND_PENDING_REMOVAL"]=317,t[e[318]="CONTRACT_HAS_NO_AUTO_RENEW_ACCOUNT"]=318,t[e[319]="PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION"]=319,t[e[320]="PROXY_ACCOUNT_ID_FIELD_IS_DEPRECATED"]=320,t[e[321]="SELF_STAKING_IS_NOT_ALLOWED"]=321,t[e[322]="INVALID_STAKING_ID"]=322,t[e[323]="STAKING_NOT_ENABLED"]=323,t[e[324]="INVALID_PRNG_RANGE"]=324,t[e[325]="MAX_ENTITIES_IN_PRICE_REGIME_HAVE_BEEN_CREATED"]=325,t[e[326]="INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE"]=326,t[e[327]="INSUFFICIENT_BALANCES_FOR_STORAGE_RENT"]=327,t[e[328]="MAX_CHILD_RECORDS_EXCEEDED"]=328,t[e[329]="INSUFFICIENT_BALANCES_FOR_RENEWAL_FEES"]=329,t[e[330]="TRANSACTION_HAS_UNKNOWN_FIELDS"]=330,t[e[331]="ACCOUNT_IS_IMMUTABLE"]=331,t[e[332]="ALIAS_ALREADY_ASSIGNED"]=332,t[e[333]="INVALID_METADATA_KEY"]=333,t[e[334]="TOKEN_HAS_NO_METADATA_KEY"]=334,t[e[335]="MISSING_TOKEN_METADATA"]=335,t[e[336]="MISSING_SERIAL_NUMBERS"]=336,t[e[337]="TOKEN_HAS_NO_ADMIN_KEY"]=337,t[e[338]="NODE_DELETED"]=338,t[e[339]="INVALID_NODE_ID"]=339,t[e[340]="INVALID_GOSSIP_ENDPOINT"]=340,t[e[341]="INVALID_NODE_ACCOUNT_ID"]=341,t[e[342]="INVALID_NODE_DESCRIPTION"]=342,t[e[343]="INVALID_SERVICE_ENDPOINT"]=343,t[e[344]="INVALID_GOSSIP_CA_CERTIFICATE"]=344,t[e[345]="INVALID_GRPC_CERTIFICATE"]=345,t[e[346]="INVALID_MAX_AUTO_ASSOCIATIONS"]=346,t[e[347]="MAX_NODES_CREATED"]=347,t[e[348]="IP_FQDN_CANNOT_BE_SET_FOR_SAME_ENDPOINT"]=348,t[e[349]="GOSSIP_ENDPOINT_CANNOT_HAVE_FQDN"]=349,t[e[350]="FQDN_SIZE_TOO_LARGE"]=350,t[e[351]="INVALID_ENDPOINT"]=351,t[e[352]="GOSSIP_ENDPOINTS_EXCEEDED_LIMIT"]=352,t[e[353]="TOKEN_REFERENCE_REPEATED"]=353,t[e[354]="INVALID_OWNER_ID"]=354,t[e[355]="TOKEN_REFERENCE_LIST_SIZE_LIMIT_EXCEEDED"]=355,t[e[356]="SERVICE_ENDPOINTS_EXCEEDED_LIMIT"]=356,t[e[357]="INVALID_IPV4_ADDRESS"]=357,t[e[358]="EMPTY_TOKEN_REFERENCE_LIST"]=358,t[e[359]="UPDATE_NODE_ACCOUNT_NOT_ALLOWED"]=359,t[e[360]="TOKEN_HAS_NO_METADATA_OR_SUPPLY_KEY"]=360,t[e[361]="EMPTY_PENDING_AIRDROP_ID_LIST"]=361,t[e[362]="PENDING_AIRDROP_ID_REPEATED"]=362,t[e[363]="PENDING_AIRDROP_ID_LIST_TOO_LONG"]=363,t[e[364]="PENDING_NFT_AIRDROP_ALREADY_EXISTS"]=364,t[e[365]="ACCOUNT_HAS_PENDING_AIRDROPS"]=365,t[e[366]="THROTTLED_AT_CONSENSUS"]=366,t[e[367]="INVALID_PENDING_AIRDROP_ID"]=367,t[e[368]="TOKEN_AIRDROP_WITH_FALLBACK_ROYALTY"]=368,t[e[369]="INVALID_TOKEN_IN_PENDING_AIRDROP"]=369,t[e[370]="SCHEDULE_EXPIRY_IS_BUSY"]=370,t[e[371]="INVALID_GRPC_CERTIFICATE_HASH"]=371,t[e[372]="MISSING_EXPIRY_TIME"]=372,t[e[373]="NO_SCHEDULING_ALLOWED_AFTER_SCHEDULED_RECURSION"]=373,t[e[374]="RECURSIVE_SCHEDULING_LIMIT_REACHED"]=374,t[e[375]="WAITING_FOR_LEDGER_ID"]=375,t[e[376]="MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST_EXCEEDED"]=376,t[e[377]="FEE_EXEMPT_KEY_LIST_CONTAINS_DUPLICATED_KEYS"]=377,t[e[378]="INVALID_KEY_IN_FEE_EXEMPT_KEY_LIST"]=378,t[e[379]="INVALID_FEE_SCHEDULE_KEY"]=379,t[e[380]="FEE_SCHEDULE_KEY_CANNOT_BE_UPDATED"]=380,t[e[381]="FEE_SCHEDULE_KEY_NOT_SET"]=381,t[e[382]="MAX_CUSTOM_FEE_LIMIT_EXCEEDED"]=382,t[e[383]="NO_VALID_MAX_CUSTOM_FEE"]=383,t[e[384]="INVALID_MAX_CUSTOM_FEES"]=384,t[e[385]="DUPLICATE_DENOMINATION_IN_MAX_CUSTOM_FEE_LIST"]=385,t[e[386]="DUPLICATE_ACCOUNT_ID_IN_MAX_CUSTOM_FEE_LIST"]=386,t[e[387]="MAX_CUSTOM_FEES_IS_NOT_SUPPORTED"]=387,t}(),t.Transaction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.body=null,e.prototype.sigs=null,e.prototype.sigMap=null,e.prototype.bodyBytes=o.newBuffer([]),e.prototype.signedTransactionBytes=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.body&&Object.hasOwnProperty.call(e,"body")&&i.proto.TransactionBody.encode(e.body,t.uint32(10).fork()).ldelim(),null!=e.sigs&&Object.hasOwnProperty.call(e,"sigs")&&i.proto.SignatureList.encode(e.sigs,t.uint32(18).fork()).ldelim(),null!=e.sigMap&&Object.hasOwnProperty.call(e,"sigMap")&&i.proto.SignatureMap.encode(e.sigMap,t.uint32(26).fork()).ldelim(),null!=e.bodyBytes&&Object.hasOwnProperty.call(e,"bodyBytes")&&t.uint32(34).bytes(e.bodyBytes),null!=e.signedTransactionBytes&&Object.hasOwnProperty.call(e,"signedTransactionBytes")&&t.uint32(42).bytes(e.signedTransactionBytes),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Transaction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.body=i.proto.TransactionBody.decode(e,e.uint32());break;case 2:o.sigs=i.proto.SignatureList.decode(e,e.uint32());break;case 3:o.sigMap=i.proto.SignatureMap.decode(e,e.uint32());break;case 4:o.bodyBytes=e.bytes();break;case 5:o.signedTransactionBytes=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Transaction"},e}(),t.TransactionBody=function(){function e(e){if(this.maxCustomFees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.transactionID=null,e.prototype.nodeAccountID=null,e.prototype.transactionFee=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.transactionValidDuration=null,e.prototype.generateRecord=!1,e.prototype.memo="",e.prototype.contractCall=null,e.prototype.contractCreateInstance=null,e.prototype.contractUpdateInstance=null,e.prototype.cryptoAddLiveHash=null,e.prototype.cryptoCreateAccount=null,e.prototype.cryptoDelete=null,e.prototype.cryptoDeleteLiveHash=null,e.prototype.cryptoTransfer=null,e.prototype.cryptoUpdateAccount=null,e.prototype.fileAppend=null,e.prototype.fileCreate=null,e.prototype.fileDelete=null,e.prototype.fileUpdate=null,e.prototype.systemDelete=null,e.prototype.systemUndelete=null,e.prototype.contractDeleteInstance=null,e.prototype.freeze=null,e.prototype.consensusCreateTopic=null,e.prototype.consensusUpdateTopic=null,e.prototype.consensusDeleteTopic=null,e.prototype.consensusSubmitMessage=null,e.prototype.uncheckedSubmit=null,e.prototype.tokenCreation=null,e.prototype.tokenFreeze=null,e.prototype.tokenUnfreeze=null,e.prototype.tokenGrantKyc=null,e.prototype.tokenRevokeKyc=null,e.prototype.tokenDeletion=null,e.prototype.tokenUpdate=null,e.prototype.tokenMint=null,e.prototype.tokenBurn=null,e.prototype.tokenWipe=null,e.prototype.tokenAssociate=null,e.prototype.tokenDissociate=null,e.prototype.scheduleCreate=null,e.prototype.scheduleDelete=null,e.prototype.scheduleSign=null,e.prototype.tokenFeeScheduleUpdate=null,e.prototype.tokenPause=null,e.prototype.tokenUnpause=null,e.prototype.cryptoApproveAllowance=null,e.prototype.cryptoDeleteAllowance=null,e.prototype.ethereumTransaction=null,e.prototype.nodeStakeUpdate=null,e.prototype.utilPrng=null,e.prototype.tokenUpdateNfts=null,e.prototype.nodeCreate=null,e.prototype.nodeUpdate=null,e.prototype.nodeDelete=null,e.prototype.tokenReject=null,e.prototype.tokenAirdrop=null,e.prototype.tokenCancelAirdrop=null,e.prototype.tokenClaimAirdrop=null,e.prototype.stateSignatureTransaction=null,e.prototype.historyProofSignature=null,e.prototype.historyProofKeyPublication=null,e.prototype.historyProofVote=null,e.prototype.maxCustomFees=o.emptyArray,Object.defineProperty(e.prototype,"data",{get:o.oneOfGetter(t=["contractCall","contractCreateInstance","contractUpdateInstance","cryptoAddLiveHash","cryptoCreateAccount","cryptoDelete","cryptoDeleteLiveHash","cryptoTransfer","cryptoUpdateAccount","fileAppend","fileCreate","fileDelete","fileUpdate","systemDelete","systemUndelete","contractDeleteInstance","freeze","consensusCreateTopic","consensusUpdateTopic","consensusDeleteTopic","consensusSubmitMessage","uncheckedSubmit","tokenCreation","tokenFreeze","tokenUnfreeze","tokenGrantKyc","tokenRevokeKyc","tokenDeletion","tokenUpdate","tokenMint","tokenBurn","tokenWipe","tokenAssociate","tokenDissociate","scheduleCreate","scheduleDelete","scheduleSign","tokenFeeScheduleUpdate","tokenPause","tokenUnpause","cryptoApproveAllowance","cryptoDeleteAllowance","ethereumTransaction","nodeStakeUpdate","utilPrng","tokenUpdateNfts","nodeCreate","nodeUpdate","nodeDelete","tokenReject","tokenAirdrop","tokenCancelAirdrop","tokenClaimAirdrop","stateSignatureTransaction","historyProofSignature","historyProofKeyPublication","historyProofVote"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.transactionID&&Object.hasOwnProperty.call(e,"transactionID")&&i.proto.TransactionID.encode(e.transactionID,t.uint32(10).fork()).ldelim(),null!=e.nodeAccountID&&Object.hasOwnProperty.call(e,"nodeAccountID")&&i.proto.AccountID.encode(e.nodeAccountID,t.uint32(18).fork()).ldelim(),null!=e.transactionFee&&Object.hasOwnProperty.call(e,"transactionFee")&&t.uint32(24).uint64(e.transactionFee),null!=e.transactionValidDuration&&Object.hasOwnProperty.call(e,"transactionValidDuration")&&i.proto.Duration.encode(e.transactionValidDuration,t.uint32(34).fork()).ldelim(),null!=e.generateRecord&&Object.hasOwnProperty.call(e,"generateRecord")&&t.uint32(40).bool(e.generateRecord),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(50).string(e.memo),null!=e.contractCall&&Object.hasOwnProperty.call(e,"contractCall")&&i.proto.ContractCallTransactionBody.encode(e.contractCall,t.uint32(58).fork()).ldelim(),null!=e.contractCreateInstance&&Object.hasOwnProperty.call(e,"contractCreateInstance")&&i.proto.ContractCreateTransactionBody.encode(e.contractCreateInstance,t.uint32(66).fork()).ldelim(),null!=e.contractUpdateInstance&&Object.hasOwnProperty.call(e,"contractUpdateInstance")&&i.proto.ContractUpdateTransactionBody.encode(e.contractUpdateInstance,t.uint32(74).fork()).ldelim(),null!=e.cryptoAddLiveHash&&Object.hasOwnProperty.call(e,"cryptoAddLiveHash")&&i.proto.CryptoAddLiveHashTransactionBody.encode(e.cryptoAddLiveHash,t.uint32(82).fork()).ldelim(),null!=e.cryptoCreateAccount&&Object.hasOwnProperty.call(e,"cryptoCreateAccount")&&i.proto.CryptoCreateTransactionBody.encode(e.cryptoCreateAccount,t.uint32(90).fork()).ldelim(),null!=e.cryptoDelete&&Object.hasOwnProperty.call(e,"cryptoDelete")&&i.proto.CryptoDeleteTransactionBody.encode(e.cryptoDelete,t.uint32(98).fork()).ldelim(),null!=e.cryptoDeleteLiveHash&&Object.hasOwnProperty.call(e,"cryptoDeleteLiveHash")&&i.proto.CryptoDeleteLiveHashTransactionBody.encode(e.cryptoDeleteLiveHash,t.uint32(106).fork()).ldelim(),null!=e.cryptoTransfer&&Object.hasOwnProperty.call(e,"cryptoTransfer")&&i.proto.CryptoTransferTransactionBody.encode(e.cryptoTransfer,t.uint32(114).fork()).ldelim(),null!=e.cryptoUpdateAccount&&Object.hasOwnProperty.call(e,"cryptoUpdateAccount")&&i.proto.CryptoUpdateTransactionBody.encode(e.cryptoUpdateAccount,t.uint32(122).fork()).ldelim(),null!=e.fileAppend&&Object.hasOwnProperty.call(e,"fileAppend")&&i.proto.FileAppendTransactionBody.encode(e.fileAppend,t.uint32(130).fork()).ldelim(),null!=e.fileCreate&&Object.hasOwnProperty.call(e,"fileCreate")&&i.proto.FileCreateTransactionBody.encode(e.fileCreate,t.uint32(138).fork()).ldelim(),null!=e.fileDelete&&Object.hasOwnProperty.call(e,"fileDelete")&&i.proto.FileDeleteTransactionBody.encode(e.fileDelete,t.uint32(146).fork()).ldelim(),null!=e.fileUpdate&&Object.hasOwnProperty.call(e,"fileUpdate")&&i.proto.FileUpdateTransactionBody.encode(e.fileUpdate,t.uint32(154).fork()).ldelim(),null!=e.systemDelete&&Object.hasOwnProperty.call(e,"systemDelete")&&i.proto.SystemDeleteTransactionBody.encode(e.systemDelete,t.uint32(162).fork()).ldelim(),null!=e.systemUndelete&&Object.hasOwnProperty.call(e,"systemUndelete")&&i.proto.SystemUndeleteTransactionBody.encode(e.systemUndelete,t.uint32(170).fork()).ldelim(),null!=e.contractDeleteInstance&&Object.hasOwnProperty.call(e,"contractDeleteInstance")&&i.proto.ContractDeleteTransactionBody.encode(e.contractDeleteInstance,t.uint32(178).fork()).ldelim(),null!=e.freeze&&Object.hasOwnProperty.call(e,"freeze")&&i.proto.FreezeTransactionBody.encode(e.freeze,t.uint32(186).fork()).ldelim(),null!=e.consensusCreateTopic&&Object.hasOwnProperty.call(e,"consensusCreateTopic")&&i.proto.ConsensusCreateTopicTransactionBody.encode(e.consensusCreateTopic,t.uint32(194).fork()).ldelim(),null!=e.consensusUpdateTopic&&Object.hasOwnProperty.call(e,"consensusUpdateTopic")&&i.proto.ConsensusUpdateTopicTransactionBody.encode(e.consensusUpdateTopic,t.uint32(202).fork()).ldelim(),null!=e.consensusDeleteTopic&&Object.hasOwnProperty.call(e,"consensusDeleteTopic")&&i.proto.ConsensusDeleteTopicTransactionBody.encode(e.consensusDeleteTopic,t.uint32(210).fork()).ldelim(),null!=e.consensusSubmitMessage&&Object.hasOwnProperty.call(e,"consensusSubmitMessage")&&i.proto.ConsensusSubmitMessageTransactionBody.encode(e.consensusSubmitMessage,t.uint32(218).fork()).ldelim(),null!=e.uncheckedSubmit&&Object.hasOwnProperty.call(e,"uncheckedSubmit")&&i.proto.UncheckedSubmitBody.encode(e.uncheckedSubmit,t.uint32(226).fork()).ldelim(),null!=e.tokenCreation&&Object.hasOwnProperty.call(e,"tokenCreation")&&i.proto.TokenCreateTransactionBody.encode(e.tokenCreation,t.uint32(234).fork()).ldelim(),null!=e.tokenFreeze&&Object.hasOwnProperty.call(e,"tokenFreeze")&&i.proto.TokenFreezeAccountTransactionBody.encode(e.tokenFreeze,t.uint32(250).fork()).ldelim(),null!=e.tokenUnfreeze&&Object.hasOwnProperty.call(e,"tokenUnfreeze")&&i.proto.TokenUnfreezeAccountTransactionBody.encode(e.tokenUnfreeze,t.uint32(258).fork()).ldelim(),null!=e.tokenGrantKyc&&Object.hasOwnProperty.call(e,"tokenGrantKyc")&&i.proto.TokenGrantKycTransactionBody.encode(e.tokenGrantKyc,t.uint32(266).fork()).ldelim(),null!=e.tokenRevokeKyc&&Object.hasOwnProperty.call(e,"tokenRevokeKyc")&&i.proto.TokenRevokeKycTransactionBody.encode(e.tokenRevokeKyc,t.uint32(274).fork()).ldelim(),null!=e.tokenDeletion&&Object.hasOwnProperty.call(e,"tokenDeletion")&&i.proto.TokenDeleteTransactionBody.encode(e.tokenDeletion,t.uint32(282).fork()).ldelim(),null!=e.tokenUpdate&&Object.hasOwnProperty.call(e,"tokenUpdate")&&i.proto.TokenUpdateTransactionBody.encode(e.tokenUpdate,t.uint32(290).fork()).ldelim(),null!=e.tokenMint&&Object.hasOwnProperty.call(e,"tokenMint")&&i.proto.TokenMintTransactionBody.encode(e.tokenMint,t.uint32(298).fork()).ldelim(),null!=e.tokenBurn&&Object.hasOwnProperty.call(e,"tokenBurn")&&i.proto.TokenBurnTransactionBody.encode(e.tokenBurn,t.uint32(306).fork()).ldelim(),null!=e.tokenWipe&&Object.hasOwnProperty.call(e,"tokenWipe")&&i.proto.TokenWipeAccountTransactionBody.encode(e.tokenWipe,t.uint32(314).fork()).ldelim(),null!=e.tokenAssociate&&Object.hasOwnProperty.call(e,"tokenAssociate")&&i.proto.TokenAssociateTransactionBody.encode(e.tokenAssociate,t.uint32(322).fork()).ldelim(),null!=e.tokenDissociate&&Object.hasOwnProperty.call(e,"tokenDissociate")&&i.proto.TokenDissociateTransactionBody.encode(e.tokenDissociate,t.uint32(330).fork()).ldelim(),null!=e.scheduleCreate&&Object.hasOwnProperty.call(e,"scheduleCreate")&&i.proto.ScheduleCreateTransactionBody.encode(e.scheduleCreate,t.uint32(338).fork()).ldelim(),null!=e.scheduleDelete&&Object.hasOwnProperty.call(e,"scheduleDelete")&&i.proto.ScheduleDeleteTransactionBody.encode(e.scheduleDelete,t.uint32(346).fork()).ldelim(),null!=e.scheduleSign&&Object.hasOwnProperty.call(e,"scheduleSign")&&i.proto.ScheduleSignTransactionBody.encode(e.scheduleSign,t.uint32(354).fork()).ldelim(),null!=e.tokenFeeScheduleUpdate&&Object.hasOwnProperty.call(e,"tokenFeeScheduleUpdate")&&i.proto.TokenFeeScheduleUpdateTransactionBody.encode(e.tokenFeeScheduleUpdate,t.uint32(362).fork()).ldelim(),null!=e.tokenPause&&Object.hasOwnProperty.call(e,"tokenPause")&&i.proto.TokenPauseTransactionBody.encode(e.tokenPause,t.uint32(370).fork()).ldelim(),null!=e.tokenUnpause&&Object.hasOwnProperty.call(e,"tokenUnpause")&&i.proto.TokenUnpauseTransactionBody.encode(e.tokenUnpause,t.uint32(378).fork()).ldelim(),null!=e.cryptoApproveAllowance&&Object.hasOwnProperty.call(e,"cryptoApproveAllowance")&&i.proto.CryptoApproveAllowanceTransactionBody.encode(e.cryptoApproveAllowance,t.uint32(386).fork()).ldelim(),null!=e.cryptoDeleteAllowance&&Object.hasOwnProperty.call(e,"cryptoDeleteAllowance")&&i.proto.CryptoDeleteAllowanceTransactionBody.encode(e.cryptoDeleteAllowance,t.uint32(394).fork()).ldelim(),null!=e.ethereumTransaction&&Object.hasOwnProperty.call(e,"ethereumTransaction")&&i.proto.EthereumTransactionBody.encode(e.ethereumTransaction,t.uint32(402).fork()).ldelim(),null!=e.nodeStakeUpdate&&Object.hasOwnProperty.call(e,"nodeStakeUpdate")&&i.proto.NodeStakeUpdateTransactionBody.encode(e.nodeStakeUpdate,t.uint32(410).fork()).ldelim(),null!=e.utilPrng&&Object.hasOwnProperty.call(e,"utilPrng")&&i.proto.UtilPrngTransactionBody.encode(e.utilPrng,t.uint32(418).fork()).ldelim(),null!=e.tokenUpdateNfts&&Object.hasOwnProperty.call(e,"tokenUpdateNfts")&&i.proto.TokenUpdateNftsTransactionBody.encode(e.tokenUpdateNfts,t.uint32(426).fork()).ldelim(),null!=e.nodeCreate&&Object.hasOwnProperty.call(e,"nodeCreate")&&i.com.hedera.hapi.node.addressbook.NodeCreateTransactionBody.encode(e.nodeCreate,t.uint32(434).fork()).ldelim(),null!=e.nodeUpdate&&Object.hasOwnProperty.call(e,"nodeUpdate")&&i.com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody.encode(e.nodeUpdate,t.uint32(442).fork()).ldelim(),null!=e.nodeDelete&&Object.hasOwnProperty.call(e,"nodeDelete")&&i.com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody.encode(e.nodeDelete,t.uint32(450).fork()).ldelim(),null!=e.tokenReject&&Object.hasOwnProperty.call(e,"tokenReject")&&i.proto.TokenRejectTransactionBody.encode(e.tokenReject,t.uint32(458).fork()).ldelim(),null!=e.tokenAirdrop&&Object.hasOwnProperty.call(e,"tokenAirdrop")&&i.proto.TokenAirdropTransactionBody.encode(e.tokenAirdrop,t.uint32(466).fork()).ldelim(),null!=e.tokenCancelAirdrop&&Object.hasOwnProperty.call(e,"tokenCancelAirdrop")&&i.proto.TokenCancelAirdropTransactionBody.encode(e.tokenCancelAirdrop,t.uint32(474).fork()).ldelim(),null!=e.tokenClaimAirdrop&&Object.hasOwnProperty.call(e,"tokenClaimAirdrop")&&i.proto.TokenClaimAirdropTransactionBody.encode(e.tokenClaimAirdrop,t.uint32(482).fork()).ldelim(),null!=e.stateSignatureTransaction&&Object.hasOwnProperty.call(e,"stateSignatureTransaction")&&i.com.hedera.hapi.platform.event.StateSignatureTransaction.encode(e.stateSignatureTransaction,t.uint32(522).fork()).ldelim(),null!=e.historyProofSignature&&Object.hasOwnProperty.call(e,"historyProofSignature")&&i.com.hedera.hapi.services.auxiliary.history.HistoryProofSignatureTransactionBody.encode(e.historyProofSignature,t.uint32(554).fork()).ldelim(),null!=e.historyProofKeyPublication&&Object.hasOwnProperty.call(e,"historyProofKeyPublication")&&i.com.hedera.hapi.services.auxiliary.history.HistoryProofKeyPublicationTransactionBody.encode(e.historyProofKeyPublication,t.uint32(562).fork()).ldelim(),null!=e.historyProofVote&&Object.hasOwnProperty.call(e,"historyProofVote")&&i.com.hedera.hapi.services.auxiliary.history.HistoryProofVoteTransactionBody.encode(e.historyProofVote,t.uint32(570).fork()).ldelim(),null!=e.maxCustomFees&&e.maxCustomFees.length)for(var r=0;r<e.maxCustomFees.length;++r)i.proto.CustomFeeLimit.encode(e.maxCustomFees[r],t.uint32(8010).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 2:o.nodeAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.transactionFee=e.uint64();break;case 4:o.transactionValidDuration=i.proto.Duration.decode(e,e.uint32());break;case 5:o.generateRecord=e.bool();break;case 6:o.memo=e.string();break;case 7:o.contractCall=i.proto.ContractCallTransactionBody.decode(e,e.uint32());break;case 8:o.contractCreateInstance=i.proto.ContractCreateTransactionBody.decode(e,e.uint32());break;case 9:o.contractUpdateInstance=i.proto.ContractUpdateTransactionBody.decode(e,e.uint32());break;case 10:o.cryptoAddLiveHash=i.proto.CryptoAddLiveHashTransactionBody.decode(e,e.uint32());break;case 11:o.cryptoCreateAccount=i.proto.CryptoCreateTransactionBody.decode(e,e.uint32());break;case 12:o.cryptoDelete=i.proto.CryptoDeleteTransactionBody.decode(e,e.uint32());break;case 13:o.cryptoDeleteLiveHash=i.proto.CryptoDeleteLiveHashTransactionBody.decode(e,e.uint32());break;case 14:o.cryptoTransfer=i.proto.CryptoTransferTransactionBody.decode(e,e.uint32());break;case 15:o.cryptoUpdateAccount=i.proto.CryptoUpdateTransactionBody.decode(e,e.uint32());break;case 16:o.fileAppend=i.proto.FileAppendTransactionBody.decode(e,e.uint32());break;case 17:o.fileCreate=i.proto.FileCreateTransactionBody.decode(e,e.uint32());break;case 18:o.fileDelete=i.proto.FileDeleteTransactionBody.decode(e,e.uint32());break;case 19:o.fileUpdate=i.proto.FileUpdateTransactionBody.decode(e,e.uint32());break;case 20:o.systemDelete=i.proto.SystemDeleteTransactionBody.decode(e,e.uint32());break;case 21:o.systemUndelete=i.proto.SystemUndeleteTransactionBody.decode(e,e.uint32());break;case 22:o.contractDeleteInstance=i.proto.ContractDeleteTransactionBody.decode(e,e.uint32());break;case 23:o.freeze=i.proto.FreezeTransactionBody.decode(e,e.uint32());break;case 24:o.consensusCreateTopic=i.proto.ConsensusCreateTopicTransactionBody.decode(e,e.uint32());break;case 25:o.consensusUpdateTopic=i.proto.ConsensusUpdateTopicTransactionBody.decode(e,e.uint32());break;case 26:o.consensusDeleteTopic=i.proto.ConsensusDeleteTopicTransactionBody.decode(e,e.uint32());break;case 27:o.consensusSubmitMessage=i.proto.ConsensusSubmitMessageTransactionBody.decode(e,e.uint32());break;case 28:o.uncheckedSubmit=i.proto.UncheckedSubmitBody.decode(e,e.uint32());break;case 29:o.tokenCreation=i.proto.TokenCreateTransactionBody.decode(e,e.uint32());break;case 31:o.tokenFreeze=i.proto.TokenFreezeAccountTransactionBody.decode(e,e.uint32());break;case 32:o.tokenUnfreeze=i.proto.TokenUnfreezeAccountTransactionBody.decode(e,e.uint32());break;case 33:o.tokenGrantKyc=i.proto.TokenGrantKycTransactionBody.decode(e,e.uint32());break;case 34:o.tokenRevokeKyc=i.proto.TokenRevokeKycTransactionBody.decode(e,e.uint32());break;case 35:o.tokenDeletion=i.proto.TokenDeleteTransactionBody.decode(e,e.uint32());break;case 36:o.tokenUpdate=i.proto.TokenUpdateTransactionBody.decode(e,e.uint32());break;case 37:o.tokenMint=i.proto.TokenMintTransactionBody.decode(e,e.uint32());break;case 38:o.tokenBurn=i.proto.TokenBurnTransactionBody.decode(e,e.uint32());break;case 39:o.tokenWipe=i.proto.TokenWipeAccountTransactionBody.decode(e,e.uint32());break;case 40:o.tokenAssociate=i.proto.TokenAssociateTransactionBody.decode(e,e.uint32());break;case 41:o.tokenDissociate=i.proto.TokenDissociateTransactionBody.decode(e,e.uint32());break;case 42:o.scheduleCreate=i.proto.ScheduleCreateTransactionBody.decode(e,e.uint32());break;case 43:o.scheduleDelete=i.proto.ScheduleDeleteTransactionBody.decode(e,e.uint32());break;case 44:o.scheduleSign=i.proto.ScheduleSignTransactionBody.decode(e,e.uint32());break;case 45:o.tokenFeeScheduleUpdate=i.proto.TokenFeeScheduleUpdateTransactionBody.decode(e,e.uint32());break;case 46:o.tokenPause=i.proto.TokenPauseTransactionBody.decode(e,e.uint32());break;case 47:o.tokenUnpause=i.proto.TokenUnpauseTransactionBody.decode(e,e.uint32());break;case 48:o.cryptoApproveAllowance=i.proto.CryptoApproveAllowanceTransactionBody.decode(e,e.uint32());break;case 49:o.cryptoDeleteAllowance=i.proto.CryptoDeleteAllowanceTransactionBody.decode(e,e.uint32());break;case 50:o.ethereumTransaction=i.proto.EthereumTransactionBody.decode(e,e.uint32());break;case 51:o.nodeStakeUpdate=i.proto.NodeStakeUpdateTransactionBody.decode(e,e.uint32());break;case 52:o.utilPrng=i.proto.UtilPrngTransactionBody.decode(e,e.uint32());break;case 53:o.tokenUpdateNfts=i.proto.TokenUpdateNftsTransactionBody.decode(e,e.uint32());break;case 54:o.nodeCreate=i.com.hedera.hapi.node.addressbook.NodeCreateTransactionBody.decode(e,e.uint32());break;case 55:o.nodeUpdate=i.com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody.decode(e,e.uint32());break;case 56:o.nodeDelete=i.com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody.decode(e,e.uint32());break;case 57:o.tokenReject=i.proto.TokenRejectTransactionBody.decode(e,e.uint32());break;case 58:o.tokenAirdrop=i.proto.TokenAirdropTransactionBody.decode(e,e.uint32());break;case 59:o.tokenCancelAirdrop=i.proto.TokenCancelAirdropTransactionBody.decode(e,e.uint32());break;case 60:o.tokenClaimAirdrop=i.proto.TokenClaimAirdropTransactionBody.decode(e,e.uint32());break;case 65:o.stateSignatureTransaction=i.com.hedera.hapi.platform.event.StateSignatureTransaction.decode(e,e.uint32());break;case 69:o.historyProofSignature=i.com.hedera.hapi.services.auxiliary.history.HistoryProofSignatureTransactionBody.decode(e,e.uint32());break;case 70:o.historyProofKeyPublication=i.com.hedera.hapi.services.auxiliary.history.HistoryProofKeyPublicationTransactionBody.decode(e,e.uint32());break;case 71:o.historyProofVote=i.com.hedera.hapi.services.auxiliary.history.HistoryProofVoteTransactionBody.decode(e,e.uint32());break;case 1001:o.maxCustomFees&&o.maxCustomFees.length||(o.maxCustomFees=[]),o.maxCustomFees.push(i.proto.CustomFeeLimit.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionBody"},e}(),t.ShardID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ShardID;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.shardNum=e.int64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ShardID"},e}(),t.RealmID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.RealmID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.RealmID"},e}(),t.TokenID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.tokenNum=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),null!=e.tokenNum&&Object.hasOwnProperty.call(e,"tokenNum")&&t.uint32(24).int64(e.tokenNum),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;case 3:o.tokenNum=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenID"},e}(),t.BlockHashAlgorithm=function(){const e={},t=Object.create(e);return t[e[0]="SHA2_384"]=0,t}(),t.AccountID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.accountNum=null,e.prototype.alias=null,Object.defineProperty(e.prototype,"account",{get:o.oneOfGetter(t=["accountNum","alias"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),null!=e.accountNum&&Object.hasOwnProperty.call(e,"accountNum")&&t.uint32(24).int64(e.accountNum),null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&t.uint32(34).bytes(e.alias),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.AccountID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;case 3:o.accountNum=e.int64();break;case 4:o.alias=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.AccountID"},e}(),t.NftID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token_ID=null,e.prototype.serialNumber=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token_ID&&Object.hasOwnProperty.call(e,"token_ID")&&i.proto.TokenID.encode(e.token_ID,t.uint32(10).fork()).ldelim(),null!=e.serialNumber&&Object.hasOwnProperty.call(e,"serialNumber")&&t.uint32(16).int64(e.serialNumber),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NftID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token_ID=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.serialNumber=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NftID"},e}(),t.FileID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.fileNum=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),null!=e.fileNum&&Object.hasOwnProperty.call(e,"fileNum")&&t.uint32(24).int64(e.fileNum),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;case 3:o.fileNum=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileID"},e}(),t.ContractID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.contractNum=null,e.prototype.evmAddress=null,Object.defineProperty(e.prototype,"contract",{get:o.oneOfGetter(t=["contractNum","evmAddress"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),null!=e.contractNum&&Object.hasOwnProperty.call(e,"contractNum")&&t.uint32(24).int64(e.contractNum),null!=e.evmAddress&&Object.hasOwnProperty.call(e,"evmAddress")&&t.uint32(34).bytes(e.evmAddress),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;case 3:o.contractNum=e.int64();break;case 4:o.evmAddress=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractID"},e}(),t.TopicID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.topicNum=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),null!=e.topicNum&&Object.hasOwnProperty.call(e,"topicNum")&&t.uint32(24).int64(e.topicNum),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TopicID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;case 3:o.topicNum=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TopicID"},e}(),t.ScheduleID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.scheduleNum=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),null!=e.scheduleNum&&Object.hasOwnProperty.call(e,"scheduleNum")&&t.uint32(24).int64(e.scheduleNum),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;case 3:o.scheduleNum=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleID"},e}(),t.TransactionID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transactionValidStart=null,e.prototype.accountID=null,e.prototype.scheduled=!1,e.prototype.nonce=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.transactionValidStart&&Object.hasOwnProperty.call(e,"transactionValidStart")&&i.proto.Timestamp.encode(e.transactionValidStart,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.scheduled&&Object.hasOwnProperty.call(e,"scheduled")&&t.uint32(24).bool(e.scheduled),null!=e.nonce&&Object.hasOwnProperty.call(e,"nonce")&&t.uint32(32).int32(e.nonce),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transactionValidStart=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.scheduled=e.bool();break;case 4:o.nonce=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionID"},e}(),t.AccountAmount=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountID=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.isApproval=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(10).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(16).sint64(e.amount),null!=e.isApproval&&Object.hasOwnProperty.call(e,"isApproval")&&t.uint32(24).bool(e.isApproval),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.AccountAmount;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.amount=e.sint64();break;case 3:o.isApproval=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.AccountAmount"},e}(),t.TransferList=function(){function e(e){if(this.accountAmounts=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountAmounts=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountAmounts&&e.accountAmounts.length)for(var r=0;r<e.accountAmounts.length;++r)i.proto.AccountAmount.encode(e.accountAmounts[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransferList;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.accountAmounts&&o.accountAmounts.length||(o.accountAmounts=[]),o.accountAmounts.push(i.proto.AccountAmount.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransferList"},e}(),t.NftTransfer=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.senderAccountID=null,e.prototype.receiverAccountID=null,e.prototype.serialNumber=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.isApproval=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.senderAccountID&&Object.hasOwnProperty.call(e,"senderAccountID")&&i.proto.AccountID.encode(e.senderAccountID,t.uint32(10).fork()).ldelim(),null!=e.receiverAccountID&&Object.hasOwnProperty.call(e,"receiverAccountID")&&i.proto.AccountID.encode(e.receiverAccountID,t.uint32(18).fork()).ldelim(),null!=e.serialNumber&&Object.hasOwnProperty.call(e,"serialNumber")&&t.uint32(24).int64(e.serialNumber),null!=e.isApproval&&Object.hasOwnProperty.call(e,"isApproval")&&t.uint32(32).bool(e.isApproval),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NftTransfer;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.senderAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.receiverAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.serialNumber=e.int64();break;case 4:o.isApproval=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NftTransfer"},e}(),t.TokenTransferList=function(){function e(e){if(this.transfers=[],this.nftTransfers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.transfers=o.emptyArray,e.prototype.nftTransfers=o.emptyArray,e.prototype.expectedDecimals=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.transfers&&e.transfers.length)for(var r=0;r<e.transfers.length;++r)i.proto.AccountAmount.encode(e.transfers[r],t.uint32(18).fork()).ldelim();if(null!=e.nftTransfers&&e.nftTransfers.length)for(r=0;r<e.nftTransfers.length;++r)i.proto.NftTransfer.encode(e.nftTransfers[r],t.uint32(26).fork()).ldelim();return null!=e.expectedDecimals&&Object.hasOwnProperty.call(e,"expectedDecimals")&&i.google.protobuf.UInt32Value.encode(e.expectedDecimals,t.uint32(34).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenTransferList;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.transfers&&o.transfers.length||(o.transfers=[]),o.transfers.push(i.proto.AccountAmount.decode(e,e.uint32()));break;case 3:o.nftTransfers&&o.nftTransfers.length||(o.nftTransfers=[]),o.nftTransfers.push(i.proto.NftTransfer.decode(e,e.uint32()));break;case 4:o.expectedDecimals=i.google.protobuf.UInt32Value.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenTransferList"},e}(),t.Fraction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.numerator=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.denominator=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.numerator&&Object.hasOwnProperty.call(e,"numerator")&&t.uint32(8).int64(e.numerator),null!=e.denominator&&Object.hasOwnProperty.call(e,"denominator")&&t.uint32(16).int64(e.denominator),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Fraction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.numerator=e.int64();break;case 2:o.denominator=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Fraction"},e}(),t.TokenType=function(){const e={},t=Object.create(e);return t[e[0]="FUNGIBLE_COMMON"]=0,t[e[1]="NON_FUNGIBLE_UNIQUE"]=1,t}(),t.SubType=function(){const e={},t=Object.create(e);return t[e[0]="DEFAULT"]=0,t[e[1]="TOKEN_FUNGIBLE_COMMON"]=1,t[e[2]="TOKEN_NON_FUNGIBLE_UNIQUE"]=2,t[e[3]="TOKEN_FUNGIBLE_COMMON_WITH_CUSTOM_FEES"]=3,t[e[4]="TOKEN_NON_FUNGIBLE_UNIQUE_WITH_CUSTOM_FEES"]=4,t[e[5]="SCHEDULE_CREATE_CONTRACT_CALL"]=5,t[e[6]="TOPIC_CREATE_WITH_CUSTOM_FEES"]=6,t}(),t.TokenSupplyType=function(){const e={},t=Object.create(e);return t[e[0]="INFINITE"]=0,t[e[1]="FINITE"]=1,t}(),t.TokenKeyValidation=function(){const e={},t=Object.create(e);return t[e[0]="FULL_VALIDATION"]=0,t[e[1]="NO_VALIDATION"]=1,t}(),t.TokenFreezeStatus=function(){const e={},t=Object.create(e);return t[e[0]="FreezeNotApplicable"]=0,t[e[1]="Frozen"]=1,t[e[2]="Unfrozen"]=2,t}(),t.TokenKycStatus=function(){const e={},t=Object.create(e);return t[e[0]="KycNotApplicable"]=0,t[e[1]="Granted"]=1,t[e[2]="Revoked"]=2,t}(),t.TokenPauseStatus=function(){const e={},t=Object.create(e);return t[e[0]="PauseNotApplicable"]=0,t[e[1]="Paused"]=1,t[e[2]="Unpaused"]=2,t}(),t.Key=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.contractID=null,e.prototype.ed25519=null,e.prototype.RSA_3072=null,e.prototype.ECDSA_384=null,e.prototype.thresholdKey=null,e.prototype.keyList=null,e.prototype.ECDSASecp256k1=null,e.prototype.delegatableContractId=null,Object.defineProperty(e.prototype,"key",{get:o.oneOfGetter(t=["contractID","ed25519","RSA_3072","ECDSA_384","thresholdKey","keyList","ECDSASecp256k1","delegatableContractId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.ed25519&&Object.hasOwnProperty.call(e,"ed25519")&&t.uint32(18).bytes(e.ed25519),null!=e.RSA_3072&&Object.hasOwnProperty.call(e,"RSA_3072")&&t.uint32(26).bytes(e.RSA_3072),null!=e.ECDSA_384&&Object.hasOwnProperty.call(e,"ECDSA_384")&&t.uint32(34).bytes(e.ECDSA_384),null!=e.thresholdKey&&Object.hasOwnProperty.call(e,"thresholdKey")&&i.proto.ThresholdKey.encode(e.thresholdKey,t.uint32(42).fork()).ldelim(),null!=e.keyList&&Object.hasOwnProperty.call(e,"keyList")&&i.proto.KeyList.encode(e.keyList,t.uint32(50).fork()).ldelim(),null!=e.ECDSASecp256k1&&Object.hasOwnProperty.call(e,"ECDSASecp256k1")&&t.uint32(58).bytes(e.ECDSASecp256k1),null!=e.delegatableContractId&&Object.hasOwnProperty.call(e,"delegatableContractId")&&i.proto.ContractID.encode(e.delegatableContractId,t.uint32(66).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Key;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.ed25519=e.bytes();break;case 3:o.RSA_3072=e.bytes();break;case 4:o.ECDSA_384=e.bytes();break;case 5:o.thresholdKey=i.proto.ThresholdKey.decode(e,e.uint32());break;case 6:o.keyList=i.proto.KeyList.decode(e,e.uint32());break;case 7:o.ECDSASecp256k1=e.bytes();break;case 8:o.delegatableContractId=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Key"},e}(),t.ThresholdKey=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.threshold=0,e.prototype.keys=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.threshold&&Object.hasOwnProperty.call(e,"threshold")&&t.uint32(8).uint32(e.threshold),null!=e.keys&&Object.hasOwnProperty.call(e,"keys")&&i.proto.KeyList.encode(e.keys,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ThresholdKey;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.threshold=e.uint32();break;case 2:o.keys=i.proto.KeyList.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ThresholdKey"},e}(),t.KeyList=function(){function e(e){if(this.keys=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.keys=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.keys&&e.keys.length)for(var r=0;r<e.keys.length;++r)i.proto.Key.encode(e.keys[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.KeyList;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.keys&&o.keys.length||(o.keys=[]),o.keys.push(i.proto.Key.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.KeyList"},e}(),t.Signature=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.contract=null,e.prototype.ed25519=null,e.prototype.RSA_3072=null,e.prototype.ECDSA_384=null,e.prototype.thresholdSignature=null,e.prototype.signatureList=null,Object.defineProperty(e.prototype,"signature",{get:o.oneOfGetter(t=["contract","ed25519","RSA_3072","ECDSA_384","thresholdSignature","signatureList"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contract&&Object.hasOwnProperty.call(e,"contract")&&t.uint32(10).bytes(e.contract),null!=e.ed25519&&Object.hasOwnProperty.call(e,"ed25519")&&t.uint32(18).bytes(e.ed25519),null!=e.RSA_3072&&Object.hasOwnProperty.call(e,"RSA_3072")&&t.uint32(26).bytes(e.RSA_3072),null!=e.ECDSA_384&&Object.hasOwnProperty.call(e,"ECDSA_384")&&t.uint32(34).bytes(e.ECDSA_384),null!=e.thresholdSignature&&Object.hasOwnProperty.call(e,"thresholdSignature")&&i.proto.ThresholdSignature.encode(e.thresholdSignature,t.uint32(42).fork()).ldelim(),null!=e.signatureList&&Object.hasOwnProperty.call(e,"signatureList")&&i.proto.SignatureList.encode(e.signatureList,t.uint32(50).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Signature;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contract=e.bytes();break;case 2:o.ed25519=e.bytes();break;case 3:o.RSA_3072=e.bytes();break;case 4:o.ECDSA_384=e.bytes();break;case 5:o.thresholdSignature=i.proto.ThresholdSignature.decode(e,e.uint32());break;case 6:o.signatureList=i.proto.SignatureList.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Signature"},e}(),t.ThresholdSignature=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.sigs=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.sigs&&Object.hasOwnProperty.call(e,"sigs")&&i.proto.SignatureList.encode(e.sigs,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ThresholdSignature;e.pos<n;){var a=e.uint32();if(a>>>3==2)o.sigs=i.proto.SignatureList.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ThresholdSignature"},e}(),t.SignatureList=function(){function e(e){if(this.sigs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.sigs=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.sigs&&e.sigs.length)for(var r=0;r<e.sigs.length;++r)i.proto.Signature.encode(e.sigs[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SignatureList;e.pos<n;){var a=e.uint32();if(a>>>3==2)o.sigs&&o.sigs.length||(o.sigs=[]),o.sigs.push(i.proto.Signature.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SignatureList"},e}(),t.SignaturePair=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.pubKeyPrefix=o.newBuffer([]),e.prototype.contract=null,e.prototype.ed25519=null,e.prototype.RSA_3072=null,e.prototype.ECDSA_384=null,e.prototype.ECDSASecp256k1=null,Object.defineProperty(e.prototype,"signature",{get:o.oneOfGetter(t=["contract","ed25519","RSA_3072","ECDSA_384","ECDSASecp256k1"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.pubKeyPrefix&&Object.hasOwnProperty.call(e,"pubKeyPrefix")&&t.uint32(10).bytes(e.pubKeyPrefix),null!=e.contract&&Object.hasOwnProperty.call(e,"contract")&&t.uint32(18).bytes(e.contract),null!=e.ed25519&&Object.hasOwnProperty.call(e,"ed25519")&&t.uint32(26).bytes(e.ed25519),null!=e.RSA_3072&&Object.hasOwnProperty.call(e,"RSA_3072")&&t.uint32(34).bytes(e.RSA_3072),null!=e.ECDSA_384&&Object.hasOwnProperty.call(e,"ECDSA_384")&&t.uint32(42).bytes(e.ECDSA_384),null!=e.ECDSASecp256k1&&Object.hasOwnProperty.call(e,"ECDSASecp256k1")&&t.uint32(50).bytes(e.ECDSASecp256k1),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SignaturePair;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.pubKeyPrefix=e.bytes();break;case 2:o.contract=e.bytes();break;case 3:o.ed25519=e.bytes();break;case 4:o.RSA_3072=e.bytes();break;case 5:o.ECDSA_384=e.bytes();break;case 6:o.ECDSASecp256k1=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SignaturePair"},e}(),t.SignatureMap=function(){function e(e){if(this.sigPair=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.sigPair=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.sigPair&&e.sigPair.length)for(var r=0;r<e.sigPair.length;++r)i.proto.SignaturePair.encode(e.sigPair[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SignatureMap;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.sigPair&&o.sigPair.length||(o.sigPair=[]),o.sigPair.push(i.proto.SignaturePair.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SignatureMap"},e}(),t.HederaFunctionality=function(){const e={},t=Object.create(e);return t[e[0]="NONE"]=0,t[e[1]="CryptoTransfer"]=1,t[e[2]="CryptoUpdate"]=2,t[e[3]="CryptoDelete"]=3,t[e[4]="CryptoAddLiveHash"]=4,t[e[5]="CryptoDeleteLiveHash"]=5,t[e[6]="ContractCall"]=6,t[e[7]="ContractCreate"]=7,t[e[8]="ContractUpdate"]=8,t[e[9]="FileCreate"]=9,t[e[10]="FileAppend"]=10,t[e[11]="FileUpdate"]=11,t[e[12]="FileDelete"]=12,t[e[13]="CryptoGetAccountBalance"]=13,t[e[14]="CryptoGetAccountRecords"]=14,t[e[15]="CryptoGetInfo"]=15,t[e[16]="ContractCallLocal"]=16,t[e[17]="ContractGetInfo"]=17,t[e[18]="ContractGetBytecode"]=18,t[e[19]="GetBySolidityID"]=19,t[e[20]="GetByKey"]=20,t[e[21]="CryptoGetLiveHash"]=21,t[e[22]="CryptoGetStakers"]=22,t[e[23]="FileGetContents"]=23,t[e[24]="FileGetInfo"]=24,t[e[25]="TransactionGetRecord"]=25,t[e[26]="ContractGetRecords"]=26,t[e[27]="CryptoCreate"]=27,t[e[28]="SystemDelete"]=28,t[e[29]="SystemUndelete"]=29,t[e[30]="ContractDelete"]=30,t[e[31]="Freeze"]=31,t[e[32]="CreateTransactionRecord"]=32,t[e[33]="CryptoAccountAutoRenew"]=33,t[e[34]="ContractAutoRenew"]=34,t[e[35]="GetVersionInfo"]=35,t[e[36]="TransactionGetReceipt"]=36,t[e[50]="ConsensusCreateTopic"]=50,t[e[51]="ConsensusUpdateTopic"]=51,t[e[52]="ConsensusDeleteTopic"]=52,t[e[53]="ConsensusGetTopicInfo"]=53,t[e[54]="ConsensusSubmitMessage"]=54,t[e[55]="UncheckedSubmit"]=55,t[e[56]="TokenCreate"]=56,t[e[58]="TokenGetInfo"]=58,t[e[59]="TokenFreezeAccount"]=59,t[e[60]="TokenUnfreezeAccount"]=60,t[e[61]="TokenGrantKycToAccount"]=61,t[e[62]="TokenRevokeKycFromAccount"]=62,t[e[63]="TokenDelete"]=63,t[e[64]="TokenUpdate"]=64,t[e[65]="TokenMint"]=65,t[e[66]="TokenBurn"]=66,t[e[67]="TokenAccountWipe"]=67,t[e[68]="TokenAssociateToAccount"]=68,t[e[69]="TokenDissociateFromAccount"]=69,t[e[70]="ScheduleCreate"]=70,t[e[71]="ScheduleDelete"]=71,t[e[72]="ScheduleSign"]=72,t[e[73]="ScheduleGetInfo"]=73,t[e[74]="TokenGetAccountNftInfos"]=74,t[e[75]="TokenGetNftInfo"]=75,t[e[76]="TokenGetNftInfos"]=76,t[e[77]="TokenFeeScheduleUpdate"]=77,t[e[78]="NetworkGetExecutionTime"]=78,t[e[79]="TokenPause"]=79,t[e[80]="TokenUnpause"]=80,t[e[81]="CryptoApproveAllowance"]=81,t[e[82]="CryptoDeleteAllowance"]=82,t[e[83]="GetAccountDetails"]=83,t[e[84]="EthereumTransaction"]=84,t[e[85]="NodeStakeUpdate"]=85,t[e[86]="UtilPrng"]=86,t[e[87]="TransactionGetFastRecord"]=87,t[e[88]="TokenUpdateNfts"]=88,t[e[89]="NodeCreate"]=89,t[e[90]="NodeUpdate"]=90,t[e[91]="NodeDelete"]=91,t[e[92]="TokenReject"]=92,t[e[93]="TokenAirdrop"]=93,t[e[94]="TokenCancelAirdrop"]=94,t[e[95]="TokenClaimAirdrop"]=95,t[e[100]="StateSignatureTransaction"]=100,t[e[104]="HistoryAssemblySignature"]=104,t[e[105]="HistoryProofKeyPublication"]=105,t[e[106]="HistoryProofVote"]=106,t}(),t.FeeComponents=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.min=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.max=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.constant=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.bpt=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.vpt=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.rbh=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.sbh=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.gas=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.tv=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.bpr=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.sbpr=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.min&&Object.hasOwnProperty.call(e,"min")&&t.uint32(8).int64(e.min),null!=e.max&&Object.hasOwnProperty.call(e,"max")&&t.uint32(16).int64(e.max),null!=e.constant&&Object.hasOwnProperty.call(e,"constant")&&t.uint32(24).int64(e.constant),null!=e.bpt&&Object.hasOwnProperty.call(e,"bpt")&&t.uint32(32).int64(e.bpt),null!=e.vpt&&Object.hasOwnProperty.call(e,"vpt")&&t.uint32(40).int64(e.vpt),null!=e.rbh&&Object.hasOwnProperty.call(e,"rbh")&&t.uint32(48).int64(e.rbh),null!=e.sbh&&Object.hasOwnProperty.call(e,"sbh")&&t.uint32(56).int64(e.sbh),null!=e.gas&&Object.hasOwnProperty.call(e,"gas")&&t.uint32(64).int64(e.gas),null!=e.tv&&Object.hasOwnProperty.call(e,"tv")&&t.uint32(72).int64(e.tv),null!=e.bpr&&Object.hasOwnProperty.call(e,"bpr")&&t.uint32(80).int64(e.bpr),null!=e.sbpr&&Object.hasOwnProperty.call(e,"sbpr")&&t.uint32(88).int64(e.sbpr),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FeeComponents;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.min=e.int64();break;case 2:o.max=e.int64();break;case 3:o.constant=e.int64();break;case 4:o.bpt=e.int64();break;case 5:o.vpt=e.int64();break;case 6:o.rbh=e.int64();break;case 7:o.sbh=e.int64();break;case 8:o.gas=e.int64();break;case 9:o.tv=e.int64();break;case 10:o.bpr=e.int64();break;case 11:o.sbpr=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FeeComponents"},e}(),t.TransactionFeeSchedule=function(){function e(e){if(this.fees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.hederaFunctionality=0,e.prototype.feeData=null,e.prototype.fees=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.hederaFunctionality&&Object.hasOwnProperty.call(e,"hederaFunctionality")&&t.uint32(8).int32(e.hederaFunctionality),null!=e.feeData&&Object.hasOwnProperty.call(e,"feeData")&&i.proto.FeeData.encode(e.feeData,t.uint32(18).fork()).ldelim(),null!=e.fees&&e.fees.length)for(var r=0;r<e.fees.length;++r)i.proto.FeeData.encode(e.fees[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionFeeSchedule;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.hederaFunctionality=e.int32();break;case 2:o.feeData=i.proto.FeeData.decode(e,e.uint32());break;case 3:o.fees&&o.fees.length||(o.fees=[]),o.fees.push(i.proto.FeeData.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionFeeSchedule"},e}(),t.FeeData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodedata=null,e.prototype.networkdata=null,e.prototype.servicedata=null,e.prototype.subType=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.nodedata&&Object.hasOwnProperty.call(e,"nodedata")&&i.proto.FeeComponents.encode(e.nodedata,t.uint32(10).fork()).ldelim(),null!=e.networkdata&&Object.hasOwnProperty.call(e,"networkdata")&&i.proto.FeeComponents.encode(e.networkdata,t.uint32(18).fork()).ldelim(),null!=e.servicedata&&Object.hasOwnProperty.call(e,"servicedata")&&i.proto.FeeComponents.encode(e.servicedata,t.uint32(26).fork()).ldelim(),null!=e.subType&&Object.hasOwnProperty.call(e,"subType")&&t.uint32(32).int32(e.subType),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FeeData;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.nodedata=i.proto.FeeComponents.decode(e,e.uint32());break;case 2:o.networkdata=i.proto.FeeComponents.decode(e,e.uint32());break;case 3:o.servicedata=i.proto.FeeComponents.decode(e,e.uint32());break;case 4:o.subType=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FeeData"},e}(),t.FeeSchedule=function(){function e(e){if(this.transactionFeeSchedule=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transactionFeeSchedule=o.emptyArray,e.prototype.expiryTime=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.transactionFeeSchedule&&e.transactionFeeSchedule.length)for(var r=0;r<e.transactionFeeSchedule.length;++r)i.proto.TransactionFeeSchedule.encode(e.transactionFeeSchedule[r],t.uint32(10).fork()).ldelim();return null!=e.expiryTime&&Object.hasOwnProperty.call(e,"expiryTime")&&i.proto.TimestampSeconds.encode(e.expiryTime,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FeeSchedule;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transactionFeeSchedule&&o.transactionFeeSchedule.length||(o.transactionFeeSchedule=[]),o.transactionFeeSchedule.push(i.proto.TransactionFeeSchedule.decode(e,e.uint32()));break;case 2:o.expiryTime=i.proto.TimestampSeconds.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FeeSchedule"},e}(),t.CurrentAndNextFeeSchedule=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.currentFeeSchedule=null,e.prototype.nextFeeSchedule=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.currentFeeSchedule&&Object.hasOwnProperty.call(e,"currentFeeSchedule")&&i.proto.FeeSchedule.encode(e.currentFeeSchedule,t.uint32(10).fork()).ldelim(),null!=e.nextFeeSchedule&&Object.hasOwnProperty.call(e,"nextFeeSchedule")&&i.proto.FeeSchedule.encode(e.nextFeeSchedule,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CurrentAndNextFeeSchedule;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.currentFeeSchedule=i.proto.FeeSchedule.decode(e,e.uint32());break;case 2:o.nextFeeSchedule=i.proto.FeeSchedule.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CurrentAndNextFeeSchedule"},e}(),t.ServiceEndpoint=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.ipAddressV4=o.newBuffer([]),e.prototype.port=0,e.prototype.domainName="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.ipAddressV4&&Object.hasOwnProperty.call(e,"ipAddressV4")&&t.uint32(10).bytes(e.ipAddressV4),null!=e.port&&Object.hasOwnProperty.call(e,"port")&&t.uint32(16).int32(e.port),null!=e.domainName&&Object.hasOwnProperty.call(e,"domainName")&&t.uint32(26).string(e.domainName),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ServiceEndpoint;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.ipAddressV4=e.bytes();break;case 2:o.port=e.int32();break;case 3:o.domainName=e.string();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ServiceEndpoint"},e}(),t.NodeAddress=function(){function e(e){if(this.serviceEndpoint=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.ipAddress=o.newBuffer([]),e.prototype.portno=0,e.prototype.memo=o.newBuffer([]),e.prototype.RSA_PubKey="",e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.nodeAccountId=null,e.prototype.nodeCertHash=o.newBuffer([]),e.prototype.serviceEndpoint=o.emptyArray,e.prototype.description="",e.prototype.stake=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.ipAddress&&Object.hasOwnProperty.call(e,"ipAddress")&&t.uint32(10).bytes(e.ipAddress),null!=e.portno&&Object.hasOwnProperty.call(e,"portno")&&t.uint32(16).int32(e.portno),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(26).bytes(e.memo),null!=e.RSA_PubKey&&Object.hasOwnProperty.call(e,"RSA_PubKey")&&t.uint32(34).string(e.RSA_PubKey),null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(40).int64(e.nodeId),null!=e.nodeAccountId&&Object.hasOwnProperty.call(e,"nodeAccountId")&&i.proto.AccountID.encode(e.nodeAccountId,t.uint32(50).fork()).ldelim(),null!=e.nodeCertHash&&Object.hasOwnProperty.call(e,"nodeCertHash")&&t.uint32(58).bytes(e.nodeCertHash),null!=e.serviceEndpoint&&e.serviceEndpoint.length)for(var r=0;r<e.serviceEndpoint.length;++r)i.proto.ServiceEndpoint.encode(e.serviceEndpoint[r],t.uint32(66).fork()).ldelim();return null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(74).string(e.description),null!=e.stake&&Object.hasOwnProperty.call(e,"stake")&&t.uint32(80).int64(e.stake),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NodeAddress;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.ipAddress=e.bytes();break;case 2:o.portno=e.int32();break;case 3:o.memo=e.bytes();break;case 4:o.RSA_PubKey=e.string();break;case 5:o.nodeId=e.int64();break;case 6:o.nodeAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 7:o.nodeCertHash=e.bytes();break;case 8:o.serviceEndpoint&&o.serviceEndpoint.length||(o.serviceEndpoint=[]),o.serviceEndpoint.push(i.proto.ServiceEndpoint.decode(e,e.uint32()));break;case 9:o.description=e.string();break;case 10:o.stake=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NodeAddress"},e}(),t.NodeAddressBook=function(){function e(e){if(this.nodeAddress=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodeAddress=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.nodeAddress&&e.nodeAddress.length)for(var r=0;r<e.nodeAddress.length;++r)i.proto.NodeAddress.encode(e.nodeAddress[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NodeAddressBook;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.nodeAddress&&o.nodeAddress.length||(o.nodeAddress=[]),o.nodeAddress.push(i.proto.NodeAddress.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NodeAddressBook"},e}(),t.SemanticVersion=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.major=0,e.prototype.minor=0,e.prototype.patch=0,e.prototype.pre="",e.prototype.build="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.major&&Object.hasOwnProperty.call(e,"major")&&t.uint32(8).int32(e.major),null!=e.minor&&Object.hasOwnProperty.call(e,"minor")&&t.uint32(16).int32(e.minor),null!=e.patch&&Object.hasOwnProperty.call(e,"patch")&&t.uint32(24).int32(e.patch),null!=e.pre&&Object.hasOwnProperty.call(e,"pre")&&t.uint32(34).string(e.pre),null!=e.build&&Object.hasOwnProperty.call(e,"build")&&t.uint32(42).string(e.build),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SemanticVersion;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.major=e.int32();break;case 2:o.minor=e.int32();break;case 3:o.patch=e.int32();break;case 4:o.pre=e.string();break;case 5:o.build=e.string();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SemanticVersion"},e}(),t.Setting=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.name="",e.prototype.value="",e.prototype.data=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(18).string(e.value),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(26).bytes(e.data),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Setting;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.name=e.string();break;case 2:o.value=e.string();break;case 3:o.data=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Setting"},e}(),t.ServicesConfigurationList=function(){function e(e){if(this.nameValue=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nameValue=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.nameValue&&e.nameValue.length)for(var r=0;r<e.nameValue.length;++r)i.proto.Setting.encode(e.nameValue[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ServicesConfigurationList;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.nameValue&&o.nameValue.length||(o.nameValue=[]),o.nameValue.push(i.proto.Setting.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ServicesConfigurationList"},e}(),t.TokenRelationship=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.symbol="",e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.kycStatus=0,e.prototype.freezeStatus=0,e.prototype.decimals=0,e.prototype.automaticAssociation=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.symbol&&Object.hasOwnProperty.call(e,"symbol")&&t.uint32(18).string(e.symbol),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(24).uint64(e.balance),null!=e.kycStatus&&Object.hasOwnProperty.call(e,"kycStatus")&&t.uint32(32).int32(e.kycStatus),null!=e.freezeStatus&&Object.hasOwnProperty.call(e,"freezeStatus")&&t.uint32(40).int32(e.freezeStatus),null!=e.decimals&&Object.hasOwnProperty.call(e,"decimals")&&t.uint32(48).uint32(e.decimals),null!=e.automaticAssociation&&Object.hasOwnProperty.call(e,"automaticAssociation")&&t.uint32(56).bool(e.automaticAssociation),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenRelationship;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.symbol=e.string();break;case 3:o.balance=e.uint64();break;case 4:o.kycStatus=e.int32();break;case 5:o.freezeStatus=e.int32();break;case 6:o.decimals=e.uint32();break;case 7:o.automaticAssociation=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenRelationship"},e}(),t.TokenBalance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.decimals=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(16).uint64(e.balance),null!=e.decimals&&Object.hasOwnProperty.call(e,"decimals")&&t.uint32(24).uint32(e.decimals),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenBalance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.balance=e.uint64();break;case 3:o.decimals=e.uint32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenBalance"},e}(),t.TokenBalances=function(){function e(e){if(this.tokenBalances=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenBalances=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.tokenBalances&&e.tokenBalances.length)for(var r=0;r<e.tokenBalances.length;++r)i.proto.TokenBalance.encode(e.tokenBalances[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenBalances;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.tokenBalances&&o.tokenBalances.length||(o.tokenBalances=[]),o.tokenBalances.push(i.proto.TokenBalance.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenBalances"},e}(),t.TokenAssociation=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.accountId=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenAssociation;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenAssociation"},e}(),t.StakingInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.declineReward=!1,e.prototype.stakePeriodStart=null,e.prototype.pendingReward=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakedToMe=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakedAccountId=null,e.prototype.stakedNodeId=null,Object.defineProperty(e.prototype,"stakedId",{get:o.oneOfGetter(t=["stakedAccountId","stakedNodeId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.declineReward&&Object.hasOwnProperty.call(e,"declineReward")&&t.uint32(8).bool(e.declineReward),null!=e.stakePeriodStart&&Object.hasOwnProperty.call(e,"stakePeriodStart")&&i.proto.Timestamp.encode(e.stakePeriodStart,t.uint32(18).fork()).ldelim(),null!=e.pendingReward&&Object.hasOwnProperty.call(e,"pendingReward")&&t.uint32(24).int64(e.pendingReward),null!=e.stakedToMe&&Object.hasOwnProperty.call(e,"stakedToMe")&&t.uint32(32).int64(e.stakedToMe),null!=e.stakedAccountId&&Object.hasOwnProperty.call(e,"stakedAccountId")&&i.proto.AccountID.encode(e.stakedAccountId,t.uint32(42).fork()).ldelim(),null!=e.stakedNodeId&&Object.hasOwnProperty.call(e,"stakedNodeId")&&t.uint32(48).int64(e.stakedNodeId),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.StakingInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.declineReward=e.bool();break;case 2:o.stakePeriodStart=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.pendingReward=e.int64();break;case 4:o.stakedToMe=e.int64();break;case 5:o.stakedAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 6:o.stakedNodeId=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.StakingInfo"},e}(),t.PendingAirdropId=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.senderId=null,e.prototype.receiverId=null,e.prototype.fungibleTokenType=null,e.prototype.nonFungibleToken=null,Object.defineProperty(e.prototype,"tokenReference",{get:o.oneOfGetter(t=["fungibleTokenType","nonFungibleToken"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.senderId&&Object.hasOwnProperty.call(e,"senderId")&&i.proto.AccountID.encode(e.senderId,t.uint32(10).fork()).ldelim(),null!=e.receiverId&&Object.hasOwnProperty.call(e,"receiverId")&&i.proto.AccountID.encode(e.receiverId,t.uint32(18).fork()).ldelim(),null!=e.fungibleTokenType&&Object.hasOwnProperty.call(e,"fungibleTokenType")&&i.proto.TokenID.encode(e.fungibleTokenType,t.uint32(26).fork()).ldelim(),null!=e.nonFungibleToken&&Object.hasOwnProperty.call(e,"nonFungibleToken")&&i.proto.NftID.encode(e.nonFungibleToken,t.uint32(34).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.PendingAirdropId;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.senderId=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.receiverId=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.fungibleTokenType=i.proto.TokenID.decode(e,e.uint32());break;case 4:o.nonFungibleToken=i.proto.NftID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.PendingAirdropId"},e}(),t.PendingAirdropValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.amount=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(8).uint64(e.amount),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.PendingAirdropValue;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.amount=e.uint64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.PendingAirdropValue"},e}(),t.Timestamp=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.seconds=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.nanos=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.seconds&&Object.hasOwnProperty.call(e,"seconds")&&t.uint32(8).int64(e.seconds),null!=e.nanos&&Object.hasOwnProperty.call(e,"nanos")&&t.uint32(16).int32(e.nanos),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Timestamp;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.seconds=e.int64();break;case 2:o.nanos=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Timestamp"},e}(),t.TimestampSeconds=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.seconds=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.seconds&&Object.hasOwnProperty.call(e,"seconds")&&t.uint32(8).int64(e.seconds),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TimestampSeconds;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.seconds=e.int64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TimestampSeconds"},e}(),t.SystemDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.fileID=null,e.prototype.contractID=null,e.prototype.expirationTime=null,Object.defineProperty(e.prototype,"id",{get:o.oneOfGetter(t=["fileID","contractID"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.TimestampSeconds.encode(e.expirationTime,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SystemDeleteTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 3:o.expirationTime=i.proto.TimestampSeconds.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SystemDeleteTransactionBody"},e}(),t.SystemUndeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.fileID=null,e.prototype.contractID=null,Object.defineProperty(e.prototype,"id",{get:o.oneOfGetter(t=["fileID","contractID"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SystemUndeleteTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SystemUndeleteTransactionBody"},e}(),t.FreezeTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.startHour=0,e.prototype.startMin=0,e.prototype.endHour=0,e.prototype.endMin=0,e.prototype.updateFile=null,e.prototype.fileHash=o.newBuffer([]),e.prototype.startTime=null,e.prototype.freezeType=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.startHour&&Object.hasOwnProperty.call(e,"startHour")&&t.uint32(8).int32(e.startHour),null!=e.startMin&&Object.hasOwnProperty.call(e,"startMin")&&t.uint32(16).int32(e.startMin),null!=e.endHour&&Object.hasOwnProperty.call(e,"endHour")&&t.uint32(24).int32(e.endHour),null!=e.endMin&&Object.hasOwnProperty.call(e,"endMin")&&t.uint32(32).int32(e.endMin),null!=e.updateFile&&Object.hasOwnProperty.call(e,"updateFile")&&i.proto.FileID.encode(e.updateFile,t.uint32(42).fork()).ldelim(),null!=e.fileHash&&Object.hasOwnProperty.call(e,"fileHash")&&t.uint32(50).bytes(e.fileHash),null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&i.proto.Timestamp.encode(e.startTime,t.uint32(58).fork()).ldelim(),null!=e.freezeType&&Object.hasOwnProperty.call(e,"freezeType")&&t.uint32(64).int32(e.freezeType),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FreezeTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.startHour=e.int32();break;case 2:o.startMin=e.int32();break;case 3:o.endHour=e.int32();break;case 4:o.endMin=e.int32();break;case 5:o.updateFile=i.proto.FileID.decode(e,e.uint32());break;case 6:o.fileHash=e.bytes();break;case 7:o.startTime=i.proto.Timestamp.decode(e,e.uint32());break;case 8:o.freezeType=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FreezeTransactionBody"},e}(),t.FreezeType=function(){const e={},t=Object.create(e);return t[e[0]="UNKNOWN_FREEZE_TYPE"]=0,t[e[1]="FREEZE_ONLY"]=1,t[e[2]="PREPARE_UPGRADE"]=2,t[e[3]="FREEZE_UPGRADE"]=3,t[e[4]="FREEZE_ABORT"]=4,t[e[5]="TELEMETRY_UPGRADE"]=5,t}(),t.ContractCallTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractID=null,e.prototype.gas=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.functionParameters=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.gas&&Object.hasOwnProperty.call(e,"gas")&&t.uint32(16).int64(e.gas),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(24).int64(e.amount),null!=e.functionParameters&&Object.hasOwnProperty.call(e,"functionParameters")&&t.uint32(34).bytes(e.functionParameters),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractCallTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.gas=e.int64();break;case 3:o.amount=e.int64();break;case 4:o.functionParameters=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractCallTransactionBody"},e}(),t.ContractCreateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.fileID=null,e.prototype.initcode=null,e.prototype.adminKey=null,e.prototype.gas=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.initialBalance=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.proxyAccountID=null,e.prototype.autoRenewPeriod=null,e.prototype.constructorParameters=o.newBuffer([]),e.prototype.shardID=null,e.prototype.realmID=null,e.prototype.newRealmAdminKey=null,e.prototype.memo="",e.prototype.maxAutomaticTokenAssociations=0,e.prototype.autoRenewAccountId=null,e.prototype.stakedAccountId=null,e.prototype.stakedNodeId=null,e.prototype.declineReward=!1,Object.defineProperty(e.prototype,"initcodeSource",{get:o.oneOfGetter(t=["fileID","initcode"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"stakedId",{get:o.oneOfGetter(t=["stakedAccountId","stakedNodeId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(10).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(26).fork()).ldelim(),null!=e.gas&&Object.hasOwnProperty.call(e,"gas")&&t.uint32(32).int64(e.gas),null!=e.initialBalance&&Object.hasOwnProperty.call(e,"initialBalance")&&t.uint32(40).int64(e.initialBalance),null!=e.proxyAccountID&&Object.hasOwnProperty.call(e,"proxyAccountID")&&i.proto.AccountID.encode(e.proxyAccountID,t.uint32(50).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(66).fork()).ldelim(),null!=e.constructorParameters&&Object.hasOwnProperty.call(e,"constructorParameters")&&t.uint32(74).bytes(e.constructorParameters),null!=e.shardID&&Object.hasOwnProperty.call(e,"shardID")&&i.proto.ShardID.encode(e.shardID,t.uint32(82).fork()).ldelim(),null!=e.realmID&&Object.hasOwnProperty.call(e,"realmID")&&i.proto.RealmID.encode(e.realmID,t.uint32(90).fork()).ldelim(),null!=e.newRealmAdminKey&&Object.hasOwnProperty.call(e,"newRealmAdminKey")&&i.proto.Key.encode(e.newRealmAdminKey,t.uint32(98).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(106).string(e.memo),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&t.uint32(112).int32(e.maxAutomaticTokenAssociations),null!=e.autoRenewAccountId&&Object.hasOwnProperty.call(e,"autoRenewAccountId")&&i.proto.AccountID.encode(e.autoRenewAccountId,t.uint32(122).fork()).ldelim(),null!=e.initcode&&Object.hasOwnProperty.call(e,"initcode")&&t.uint32(130).bytes(e.initcode),null!=e.stakedAccountId&&Object.hasOwnProperty.call(e,"stakedAccountId")&&i.proto.AccountID.encode(e.stakedAccountId,t.uint32(138).fork()).ldelim(),null!=e.stakedNodeId&&Object.hasOwnProperty.call(e,"stakedNodeId")&&t.uint32(144).int64(e.stakedNodeId),null!=e.declineReward&&Object.hasOwnProperty.call(e,"declineReward")&&t.uint32(152).bool(e.declineReward),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractCreateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 16:o.initcode=e.bytes();break;case 3:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 4:o.gas=e.int64();break;case 5:o.initialBalance=e.int64();break;case 6:o.proxyAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 8:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 9:o.constructorParameters=e.bytes();break;case 10:o.shardID=i.proto.ShardID.decode(e,e.uint32());break;case 11:o.realmID=i.proto.RealmID.decode(e,e.uint32());break;case 12:o.newRealmAdminKey=i.proto.Key.decode(e,e.uint32());break;case 13:o.memo=e.string();break;case 14:o.maxAutomaticTokenAssociations=e.int32();break;case 15:o.autoRenewAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 17:o.stakedAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 18:o.stakedNodeId=e.int64();break;case 19:o.declineReward=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractCreateTransactionBody"},e}(),t.Duration=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.seconds=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.seconds&&Object.hasOwnProperty.call(e,"seconds")&&t.uint32(8).int64(e.seconds),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Duration;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.seconds=e.int64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Duration"},e}(),t.ContractUpdateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.contractID=null,e.prototype.expirationTime=null,e.prototype.adminKey=null,e.prototype.proxyAccountID=null,e.prototype.autoRenewPeriod=null,e.prototype.fileID=null,e.prototype.memo=null,e.prototype.memoWrapper=null,e.prototype.maxAutomaticTokenAssociations=null,e.prototype.autoRenewAccountId=null,e.prototype.stakedAccountId=null,e.prototype.stakedNodeId=null,e.prototype.declineReward=null,Object.defineProperty(e.prototype,"memoField",{get:o.oneOfGetter(t=["memo","memoWrapper"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"stakedId",{get:o.oneOfGetter(t=["stakedAccountId","stakedNodeId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(18).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(26).fork()).ldelim(),null!=e.proxyAccountID&&Object.hasOwnProperty.call(e,"proxyAccountID")&&i.proto.AccountID.encode(e.proxyAccountID,t.uint32(50).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(58).fork()).ldelim(),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(66).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(74).string(e.memo),null!=e.memoWrapper&&Object.hasOwnProperty.call(e,"memoWrapper")&&i.google.protobuf.StringValue.encode(e.memoWrapper,t.uint32(82).fork()).ldelim(),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&i.google.protobuf.Int32Value.encode(e.maxAutomaticTokenAssociations,t.uint32(90).fork()).ldelim(),null!=e.autoRenewAccountId&&Object.hasOwnProperty.call(e,"autoRenewAccountId")&&i.proto.AccountID.encode(e.autoRenewAccountId,t.uint32(98).fork()).ldelim(),null!=e.stakedAccountId&&Object.hasOwnProperty.call(e,"stakedAccountId")&&i.proto.AccountID.encode(e.stakedAccountId,t.uint32(106).fork()).ldelim(),null!=e.stakedNodeId&&Object.hasOwnProperty.call(e,"stakedNodeId")&&t.uint32(112).int64(e.stakedNodeId),null!=e.declineReward&&Object.hasOwnProperty.call(e,"declineReward")&&i.google.protobuf.BoolValue.encode(e.declineReward,t.uint32(122).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 6:o.proxyAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 7:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 8:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 9:o.memo=e.string();break;case 10:o.memoWrapper=i.google.protobuf.StringValue.decode(e,e.uint32());break;case 11:o.maxAutomaticTokenAssociations=i.google.protobuf.Int32Value.decode(e,e.uint32());break;case 12:o.autoRenewAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 13:o.stakedAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 14:o.stakedNodeId=e.int64();break;case 15:o.declineReward=i.google.protobuf.BoolValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractUpdateTransactionBody"},e}(),t.LiveHash=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountId=null,e.prototype.hash=o.newBuffer([]),e.prototype.keys=null,e.prototype.duration=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(10).fork()).ldelim(),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(18).bytes(e.hash),null!=e.keys&&Object.hasOwnProperty.call(e,"keys")&&i.proto.KeyList.encode(e.keys,t.uint32(26).fork()).ldelim(),null!=e.duration&&Object.hasOwnProperty.call(e,"duration")&&i.proto.Duration.encode(e.duration,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.LiveHash;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.hash=e.bytes();break;case 3:o.keys=i.proto.KeyList.decode(e,e.uint32());break;case 5:o.duration=i.proto.Duration.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.LiveHash"},e}(),t.CryptoAddLiveHashTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.liveHash=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.liveHash&&Object.hasOwnProperty.call(e,"liveHash")&&i.proto.LiveHash.encode(e.liveHash,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoAddLiveHashTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==3)o.liveHash=i.proto.LiveHash.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoAddLiveHashTransactionBody"},e}(),t.CryptoCreateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.key=null,e.prototype.initialBalance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.proxyAccountID=null,e.prototype.sendRecordThreshold=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.receiveRecordThreshold=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.receiverSigRequired=!1,e.prototype.autoRenewPeriod=null,e.prototype.shardID=null,e.prototype.realmID=null,e.prototype.newRealmAdminKey=null,e.prototype.memo="",e.prototype.maxAutomaticTokenAssociations=0,e.prototype.stakedAccountId=null,e.prototype.stakedNodeId=null,e.prototype.declineReward=!1,e.prototype.alias=o.newBuffer([]),Object.defineProperty(e.prototype,"stakedId",{get:o.oneOfGetter(t=["stakedAccountId","stakedNodeId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&i.proto.Key.encode(e.key,t.uint32(10).fork()).ldelim(),null!=e.initialBalance&&Object.hasOwnProperty.call(e,"initialBalance")&&t.uint32(16).uint64(e.initialBalance),null!=e.proxyAccountID&&Object.hasOwnProperty.call(e,"proxyAccountID")&&i.proto.AccountID.encode(e.proxyAccountID,t.uint32(26).fork()).ldelim(),null!=e.sendRecordThreshold&&Object.hasOwnProperty.call(e,"sendRecordThreshold")&&t.uint32(48).uint64(e.sendRecordThreshold),null!=e.receiveRecordThreshold&&Object.hasOwnProperty.call(e,"receiveRecordThreshold")&&t.uint32(56).uint64(e.receiveRecordThreshold),null!=e.receiverSigRequired&&Object.hasOwnProperty.call(e,"receiverSigRequired")&&t.uint32(64).bool(e.receiverSigRequired),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(74).fork()).ldelim(),null!=e.shardID&&Object.hasOwnProperty.call(e,"shardID")&&i.proto.ShardID.encode(e.shardID,t.uint32(82).fork()).ldelim(),null!=e.realmID&&Object.hasOwnProperty.call(e,"realmID")&&i.proto.RealmID.encode(e.realmID,t.uint32(90).fork()).ldelim(),null!=e.newRealmAdminKey&&Object.hasOwnProperty.call(e,"newRealmAdminKey")&&i.proto.Key.encode(e.newRealmAdminKey,t.uint32(98).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(106).string(e.memo),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&t.uint32(112).int32(e.maxAutomaticTokenAssociations),null!=e.stakedAccountId&&Object.hasOwnProperty.call(e,"stakedAccountId")&&i.proto.AccountID.encode(e.stakedAccountId,t.uint32(122).fork()).ldelim(),null!=e.stakedNodeId&&Object.hasOwnProperty.call(e,"stakedNodeId")&&t.uint32(128).int64(e.stakedNodeId),null!=e.declineReward&&Object.hasOwnProperty.call(e,"declineReward")&&t.uint32(136).bool(e.declineReward),null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&t.uint32(146).bytes(e.alias),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoCreateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.key=i.proto.Key.decode(e,e.uint32());break;case 2:o.initialBalance=e.uint64();break;case 3:o.proxyAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 6:o.sendRecordThreshold=e.uint64();break;case 7:o.receiveRecordThreshold=e.uint64();break;case 8:o.receiverSigRequired=e.bool();break;case 9:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 10:o.shardID=i.proto.ShardID.decode(e,e.uint32());break;case 11:o.realmID=i.proto.RealmID.decode(e,e.uint32());break;case 12:o.newRealmAdminKey=i.proto.Key.decode(e,e.uint32());break;case 13:o.memo=e.string();break;case 14:o.maxAutomaticTokenAssociations=e.int32();break;case 15:o.stakedAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 16:o.stakedNodeId=e.int64();break;case 17:o.declineReward=e.bool();break;case 18:o.alias=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoCreateTransactionBody"},e}(),t.CryptoDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transferAccountID=null,e.prototype.deleteAccountID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.transferAccountID&&Object.hasOwnProperty.call(e,"transferAccountID")&&i.proto.AccountID.encode(e.transferAccountID,t.uint32(10).fork()).ldelim(),null!=e.deleteAccountID&&Object.hasOwnProperty.call(e,"deleteAccountID")&&i.proto.AccountID.encode(e.deleteAccountID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoDeleteTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transferAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.deleteAccountID=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoDeleteTransactionBody"},e}(),t.CryptoDeleteLiveHashTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountOfLiveHash=null,e.prototype.liveHashToDelete=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.accountOfLiveHash&&Object.hasOwnProperty.call(e,"accountOfLiveHash")&&i.proto.AccountID.encode(e.accountOfLiveHash,t.uint32(10).fork()).ldelim(),null!=e.liveHashToDelete&&Object.hasOwnProperty.call(e,"liveHashToDelete")&&t.uint32(18).bytes(e.liveHashToDelete),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoDeleteLiveHashTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountOfLiveHash=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.liveHashToDelete=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoDeleteLiveHashTransactionBody"},e}(),t.CryptoTransferTransactionBody=function(){function e(e){if(this.tokenTransfers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transfers=null,e.prototype.tokenTransfers=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.transfers&&Object.hasOwnProperty.call(e,"transfers")&&i.proto.TransferList.encode(e.transfers,t.uint32(10).fork()).ldelim(),null!=e.tokenTransfers&&e.tokenTransfers.length)for(var r=0;r<e.tokenTransfers.length;++r)i.proto.TokenTransferList.encode(e.tokenTransfers[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoTransferTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transfers=i.proto.TransferList.decode(e,e.uint32());break;case 2:o.tokenTransfers&&o.tokenTransfers.length||(o.tokenTransfers=[]),o.tokenTransfers.push(i.proto.TokenTransferList.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoTransferTransactionBody"},e}(),t.CryptoUpdateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.accountIDToUpdate=null,e.prototype.key=null,e.prototype.proxyAccountID=null,e.prototype.proxyFraction=0,e.prototype.sendRecordThreshold=null,e.prototype.sendRecordThresholdWrapper=null,e.prototype.receiveRecordThreshold=null,e.prototype.receiveRecordThresholdWrapper=null,e.prototype.autoRenewPeriod=null,e.prototype.expirationTime=null,e.prototype.receiverSigRequired=null,e.prototype.receiverSigRequiredWrapper=null,e.prototype.memo=null,e.prototype.maxAutomaticTokenAssociations=null,e.prototype.stakedAccountId=null,e.prototype.stakedNodeId=null,e.prototype.declineReward=null,Object.defineProperty(e.prototype,"sendRecordThresholdField",{get:o.oneOfGetter(t=["sendRecordThreshold","sendRecordThresholdWrapper"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"receiveRecordThresholdField",{get:o.oneOfGetter(t=["receiveRecordThreshold","receiveRecordThresholdWrapper"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"receiverSigRequiredField",{get:o.oneOfGetter(t=["receiverSigRequired","receiverSigRequiredWrapper"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"stakedId",{get:o.oneOfGetter(t=["stakedAccountId","stakedNodeId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.accountIDToUpdate&&Object.hasOwnProperty.call(e,"accountIDToUpdate")&&i.proto.AccountID.encode(e.accountIDToUpdate,t.uint32(18).fork()).ldelim(),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&i.proto.Key.encode(e.key,t.uint32(26).fork()).ldelim(),null!=e.proxyAccountID&&Object.hasOwnProperty.call(e,"proxyAccountID")&&i.proto.AccountID.encode(e.proxyAccountID,t.uint32(34).fork()).ldelim(),null!=e.proxyFraction&&Object.hasOwnProperty.call(e,"proxyFraction")&&t.uint32(40).int32(e.proxyFraction),null!=e.sendRecordThreshold&&Object.hasOwnProperty.call(e,"sendRecordThreshold")&&t.uint32(48).uint64(e.sendRecordThreshold),null!=e.receiveRecordThreshold&&Object.hasOwnProperty.call(e,"receiveRecordThreshold")&&t.uint32(56).uint64(e.receiveRecordThreshold),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(66).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(74).fork()).ldelim(),null!=e.receiverSigRequired&&Object.hasOwnProperty.call(e,"receiverSigRequired")&&t.uint32(80).bool(e.receiverSigRequired),null!=e.sendRecordThresholdWrapper&&Object.hasOwnProperty.call(e,"sendRecordThresholdWrapper")&&i.google.protobuf.UInt64Value.encode(e.sendRecordThresholdWrapper,t.uint32(90).fork()).ldelim(),null!=e.receiveRecordThresholdWrapper&&Object.hasOwnProperty.call(e,"receiveRecordThresholdWrapper")&&i.google.protobuf.UInt64Value.encode(e.receiveRecordThresholdWrapper,t.uint32(98).fork()).ldelim(),null!=e.receiverSigRequiredWrapper&&Object.hasOwnProperty.call(e,"receiverSigRequiredWrapper")&&i.google.protobuf.BoolValue.encode(e.receiverSigRequiredWrapper,t.uint32(106).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&i.google.protobuf.StringValue.encode(e.memo,t.uint32(114).fork()).ldelim(),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&i.google.protobuf.Int32Value.encode(e.maxAutomaticTokenAssociations,t.uint32(122).fork()).ldelim(),null!=e.stakedAccountId&&Object.hasOwnProperty.call(e,"stakedAccountId")&&i.proto.AccountID.encode(e.stakedAccountId,t.uint32(130).fork()).ldelim(),null!=e.stakedNodeId&&Object.hasOwnProperty.call(e,"stakedNodeId")&&t.uint32(136).int64(e.stakedNodeId),null!=e.declineReward&&Object.hasOwnProperty.call(e,"declineReward")&&i.google.protobuf.BoolValue.encode(e.declineReward,t.uint32(146).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 2:o.accountIDToUpdate=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.key=i.proto.Key.decode(e,e.uint32());break;case 4:o.proxyAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 5:o.proxyFraction=e.int32();break;case 6:o.sendRecordThreshold=e.uint64();break;case 11:o.sendRecordThresholdWrapper=i.google.protobuf.UInt64Value.decode(e,e.uint32());break;case 7:o.receiveRecordThreshold=e.uint64();break;case 12:o.receiveRecordThresholdWrapper=i.google.protobuf.UInt64Value.decode(e,e.uint32());break;case 8:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 9:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 10:o.receiverSigRequired=e.bool();break;case 13:o.receiverSigRequiredWrapper=i.google.protobuf.BoolValue.decode(e,e.uint32());break;case 14:o.memo=i.google.protobuf.StringValue.decode(e,e.uint32());break;case 15:o.maxAutomaticTokenAssociations=i.google.protobuf.Int32Value.decode(e,e.uint32());break;case 16:o.stakedAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 17:o.stakedNodeId=e.int64();break;case 18:o.declineReward=i.google.protobuf.BoolValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoUpdateTransactionBody"},e}(),t.CryptoApproveAllowanceTransactionBody=function(){function e(e){if(this.cryptoAllowances=[],this.nftAllowances=[],this.tokenAllowances=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.cryptoAllowances=o.emptyArray,e.prototype.nftAllowances=o.emptyArray,e.prototype.tokenAllowances=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.cryptoAllowances&&e.cryptoAllowances.length)for(var r=0;r<e.cryptoAllowances.length;++r)i.proto.CryptoAllowance.encode(e.cryptoAllowances[r],t.uint32(10).fork()).ldelim();if(null!=e.nftAllowances&&e.nftAllowances.length)for(r=0;r<e.nftAllowances.length;++r)i.proto.NftAllowance.encode(e.nftAllowances[r],t.uint32(18).fork()).ldelim();if(null!=e.tokenAllowances&&e.tokenAllowances.length)for(r=0;r<e.tokenAllowances.length;++r)i.proto.TokenAllowance.encode(e.tokenAllowances[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoApproveAllowanceTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.cryptoAllowances&&o.cryptoAllowances.length||(o.cryptoAllowances=[]),o.cryptoAllowances.push(i.proto.CryptoAllowance.decode(e,e.uint32()));break;case 2:o.nftAllowances&&o.nftAllowances.length||(o.nftAllowances=[]),o.nftAllowances.push(i.proto.NftAllowance.decode(e,e.uint32()));break;case 3:o.tokenAllowances&&o.tokenAllowances.length||(o.tokenAllowances=[]),o.tokenAllowances.push(i.proto.TokenAllowance.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoApproveAllowanceTransactionBody"},e}(),t.CryptoAllowance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.owner=null,e.prototype.spender=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.owner&&Object.hasOwnProperty.call(e,"owner")&&i.proto.AccountID.encode(e.owner,t.uint32(10).fork()).ldelim(),null!=e.spender&&Object.hasOwnProperty.call(e,"spender")&&i.proto.AccountID.encode(e.spender,t.uint32(18).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(24).int64(e.amount),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.owner=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.spender=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.amount=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoAllowance"},e}(),t.NftAllowance=function(){function e(e){if(this.serialNumbers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.owner=null,e.prototype.spender=null,e.prototype.serialNumbers=o.emptyArray,e.prototype.approvedForAll=null,e.prototype.delegatingSpender=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.owner&&Object.hasOwnProperty.call(e,"owner")&&i.proto.AccountID.encode(e.owner,t.uint32(18).fork()).ldelim(),null!=e.spender&&Object.hasOwnProperty.call(e,"spender")&&i.proto.AccountID.encode(e.spender,t.uint32(26).fork()).ldelim(),null!=e.serialNumbers&&e.serialNumbers.length){t.uint32(34).fork();for(var r=0;r<e.serialNumbers.length;++r)t.int64(e.serialNumbers[r]);t.ldelim()}return null!=e.approvedForAll&&Object.hasOwnProperty.call(e,"approvedForAll")&&i.google.protobuf.BoolValue.encode(e.approvedForAll,t.uint32(42).fork()).ldelim(),null!=e.delegatingSpender&&Object.hasOwnProperty.call(e,"delegatingSpender")&&i.proto.AccountID.encode(e.delegatingSpender,t.uint32(50).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NftAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.owner=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.spender=i.proto.AccountID.decode(e,e.uint32());break;case 4:if(o.serialNumbers&&o.serialNumbers.length||(o.serialNumbers=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.serialNumbers.push(e.int64());else o.serialNumbers.push(e.int64());break;case 5:o.approvedForAll=i.google.protobuf.BoolValue.decode(e,e.uint32());break;case 6:o.delegatingSpender=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NftAllowance"},e}(),t.TokenAllowance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.owner=null,e.prototype.spender=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.owner&&Object.hasOwnProperty.call(e,"owner")&&i.proto.AccountID.encode(e.owner,t.uint32(18).fork()).ldelim(),null!=e.spender&&Object.hasOwnProperty.call(e,"spender")&&i.proto.AccountID.encode(e.spender,t.uint32(26).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(32).int64(e.amount),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.owner=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.spender=i.proto.AccountID.decode(e,e.uint32());break;case 4:o.amount=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenAllowance"},e}(),t.CryptoDeleteAllowanceTransactionBody=function(){function e(e){if(this.nftAllowances=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nftAllowances=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.nftAllowances&&e.nftAllowances.length)for(var r=0;r<e.nftAllowances.length;++r)i.proto.NftRemoveAllowance.encode(e.nftAllowances[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoDeleteAllowanceTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==2)o.nftAllowances&&o.nftAllowances.length||(o.nftAllowances=[]),o.nftAllowances.push(i.proto.NftRemoveAllowance.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoDeleteAllowanceTransactionBody"},e}(),t.NftRemoveAllowance=function(){function e(e){if(this.serialNumbers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.owner=null,e.prototype.serialNumbers=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.owner&&Object.hasOwnProperty.call(e,"owner")&&i.proto.AccountID.encode(e.owner,t.uint32(18).fork()).ldelim(),null!=e.serialNumbers&&e.serialNumbers.length){t.uint32(26).fork();for(var r=0;r<e.serialNumbers.length;++r)t.int64(e.serialNumbers[r]);t.ldelim()}return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NftRemoveAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.owner=i.proto.AccountID.decode(e,e.uint32());break;case 3:if(o.serialNumbers&&o.serialNumbers.length||(o.serialNumbers=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.serialNumbers.push(e.int64());else o.serialNumbers.push(e.int64());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NftRemoveAllowance"},e}(),t.EthereumTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.ethereumData=o.newBuffer([]),e.prototype.callData=null,e.prototype.maxGasAllowance=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.ethereumData&&Object.hasOwnProperty.call(e,"ethereumData")&&t.uint32(10).bytes(e.ethereumData),null!=e.callData&&Object.hasOwnProperty.call(e,"callData")&&i.proto.FileID.encode(e.callData,t.uint32(18).fork()).ldelim(),null!=e.maxGasAllowance&&Object.hasOwnProperty.call(e,"maxGasAllowance")&&t.uint32(24).int64(e.maxGasAllowance),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.EthereumTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.ethereumData=e.bytes();break;case 2:o.callData=i.proto.FileID.decode(e,e.uint32());break;case 3:o.maxGasAllowance=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.EthereumTransactionBody"},e}(),t.FileAppendTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileID=null,e.prototype.contents=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(18).fork()).ldelim(),null!=e.contents&&Object.hasOwnProperty.call(e,"contents")&&t.uint32(34).bytes(e.contents),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileAppendTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 2:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 4:o.contents=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileAppendTransactionBody"},e}(),t.FileCreateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.expirationTime=null,e.prototype.keys=null,e.prototype.contents=o.newBuffer([]),e.prototype.shardID=null,e.prototype.realmID=null,e.prototype.newRealmAdminKey=null,e.prototype.memo="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(18).fork()).ldelim(),null!=e.keys&&Object.hasOwnProperty.call(e,"keys")&&i.proto.KeyList.encode(e.keys,t.uint32(26).fork()).ldelim(),null!=e.contents&&Object.hasOwnProperty.call(e,"contents")&&t.uint32(34).bytes(e.contents),null!=e.shardID&&Object.hasOwnProperty.call(e,"shardID")&&i.proto.ShardID.encode(e.shardID,t.uint32(42).fork()).ldelim(),null!=e.realmID&&Object.hasOwnProperty.call(e,"realmID")&&i.proto.RealmID.encode(e.realmID,t.uint32(50).fork()).ldelim(),null!=e.newRealmAdminKey&&Object.hasOwnProperty.call(e,"newRealmAdminKey")&&i.proto.Key.encode(e.newRealmAdminKey,t.uint32(58).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(66).string(e.memo),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileCreateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 2:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.keys=i.proto.KeyList.decode(e,e.uint32());break;case 4:o.contents=e.bytes();break;case 5:o.shardID=i.proto.ShardID.decode(e,e.uint32());break;case 6:o.realmID=i.proto.RealmID.decode(e,e.uint32());break;case 7:o.newRealmAdminKey=i.proto.Key.decode(e,e.uint32());break;case 8:o.memo=e.string();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileCreateTransactionBody"},e}(),t.FileDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileDeleteTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==2)o.fileID=i.proto.FileID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileDeleteTransactionBody"},e}(),t.FileUpdateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileID=null,e.prototype.expirationTime=null,e.prototype.keys=null,e.prototype.contents=o.newBuffer([]),e.prototype.memo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(10).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(18).fork()).ldelim(),null!=e.keys&&Object.hasOwnProperty.call(e,"keys")&&i.proto.KeyList.encode(e.keys,t.uint32(26).fork()).ldelim(),null!=e.contents&&Object.hasOwnProperty.call(e,"contents")&&t.uint32(34).bytes(e.contents),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&i.google.protobuf.StringValue.encode(e.memo,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 2:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.keys=i.proto.KeyList.decode(e,e.uint32());break;case 4:o.contents=e.bytes();break;case 5:o.memo=i.google.protobuf.StringValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileUpdateTransactionBody"},e}(),t.ContractDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.contractID=null,e.prototype.transferAccountID=null,e.prototype.transferContractID=null,e.prototype.permanentRemoval=!1,Object.defineProperty(e.prototype,"obtainers",{get:o.oneOfGetter(t=["transferAccountID","transferContractID"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.transferAccountID&&Object.hasOwnProperty.call(e,"transferAccountID")&&i.proto.AccountID.encode(e.transferAccountID,t.uint32(18).fork()).ldelim(),null!=e.transferContractID&&Object.hasOwnProperty.call(e,"transferContractID")&&i.proto.ContractID.encode(e.transferContractID,t.uint32(26).fork()).ldelim(),null!=e.permanentRemoval&&Object.hasOwnProperty.call(e,"permanentRemoval")&&t.uint32(32).bool(e.permanentRemoval),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractDeleteTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.transferAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.transferContractID=i.proto.ContractID.decode(e,e.uint32());break;case 4:o.permanentRemoval=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractDeleteTransactionBody"},e}(),t.ConsensusCreateTopicTransactionBody=function(){function e(e){if(this.feeExemptKeyList=[],this.customFees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.memo="",e.prototype.adminKey=null,e.prototype.submitKey=null,e.prototype.autoRenewPeriod=null,e.prototype.autoRenewAccount=null,e.prototype.feeScheduleKey=null,e.prototype.feeExemptKeyList=o.emptyArray,e.prototype.customFees=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(10).string(e.memo),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(18).fork()).ldelim(),null!=e.submitKey&&Object.hasOwnProperty.call(e,"submitKey")&&i.proto.Key.encode(e.submitKey,t.uint32(26).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(50).fork()).ldelim(),null!=e.autoRenewAccount&&Object.hasOwnProperty.call(e,"autoRenewAccount")&&i.proto.AccountID.encode(e.autoRenewAccount,t.uint32(58).fork()).ldelim(),null!=e.feeScheduleKey&&Object.hasOwnProperty.call(e,"feeScheduleKey")&&i.proto.Key.encode(e.feeScheduleKey,t.uint32(66).fork()).ldelim(),null!=e.feeExemptKeyList&&e.feeExemptKeyList.length)for(var r=0;r<e.feeExemptKeyList.length;++r)i.proto.Key.encode(e.feeExemptKeyList[r],t.uint32(74).fork()).ldelim();if(null!=e.customFees&&e.customFees.length)for(r=0;r<e.customFees.length;++r)i.proto.FixedCustomFee.encode(e.customFees[r],t.uint32(82).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusCreateTopicTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.memo=e.string();break;case 2:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 3:o.submitKey=i.proto.Key.decode(e,e.uint32());break;case 6:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 7:o.autoRenewAccount=i.proto.AccountID.decode(e,e.uint32());break;case 8:o.feeScheduleKey=i.proto.Key.decode(e,e.uint32());break;case 9:o.feeExemptKeyList&&o.feeExemptKeyList.length||(o.feeExemptKeyList=[]),o.feeExemptKeyList.push(i.proto.Key.decode(e,e.uint32()));break;case 10:o.customFees&&o.customFees.length||(o.customFees=[]),o.customFees.push(i.proto.FixedCustomFee.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusCreateTopicTransactionBody"},e}(),t.FractionalFee=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fractionalAmount=null,e.prototype.minimumAmount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.maximumAmount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.netOfTransfers=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fractionalAmount&&Object.hasOwnProperty.call(e,"fractionalAmount")&&i.proto.Fraction.encode(e.fractionalAmount,t.uint32(10).fork()).ldelim(),null!=e.minimumAmount&&Object.hasOwnProperty.call(e,"minimumAmount")&&t.uint32(16).int64(e.minimumAmount),null!=e.maximumAmount&&Object.hasOwnProperty.call(e,"maximumAmount")&&t.uint32(24).int64(e.maximumAmount),null!=e.netOfTransfers&&Object.hasOwnProperty.call(e,"netOfTransfers")&&t.uint32(32).bool(e.netOfTransfers),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FractionalFee;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fractionalAmount=i.proto.Fraction.decode(e,e.uint32());break;case 2:o.minimumAmount=e.int64();break;case 3:o.maximumAmount=e.int64();break;case 4:o.netOfTransfers=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FractionalFee"},e}(),t.FixedFee=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.denominatingTokenId=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(8).int64(e.amount),null!=e.denominatingTokenId&&Object.hasOwnProperty.call(e,"denominatingTokenId")&&i.proto.TokenID.encode(e.denominatingTokenId,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FixedFee;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.amount=e.int64();break;case 2:o.denominatingTokenId=i.proto.TokenID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FixedFee"},e}(),t.RoyaltyFee=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.exchangeValueFraction=null,e.prototype.fallbackFee=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.exchangeValueFraction&&Object.hasOwnProperty.call(e,"exchangeValueFraction")&&i.proto.Fraction.encode(e.exchangeValueFraction,t.uint32(10).fork()).ldelim(),null!=e.fallbackFee&&Object.hasOwnProperty.call(e,"fallbackFee")&&i.proto.FixedFee.encode(e.fallbackFee,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.RoyaltyFee;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.exchangeValueFraction=i.proto.Fraction.decode(e,e.uint32());break;case 2:o.fallbackFee=i.proto.FixedFee.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.RoyaltyFee"},e}(),t.CustomFee=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.fixedFee=null,e.prototype.fractionalFee=null,e.prototype.royaltyFee=null,e.prototype.feeCollectorAccountId=null,e.prototype.allCollectorsAreExempt=!1,Object.defineProperty(e.prototype,"fee",{get:o.oneOfGetter(t=["fixedFee","fractionalFee","royaltyFee"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fixedFee&&Object.hasOwnProperty.call(e,"fixedFee")&&i.proto.FixedFee.encode(e.fixedFee,t.uint32(10).fork()).ldelim(),null!=e.fractionalFee&&Object.hasOwnProperty.call(e,"fractionalFee")&&i.proto.FractionalFee.encode(e.fractionalFee,t.uint32(18).fork()).ldelim(),null!=e.feeCollectorAccountId&&Object.hasOwnProperty.call(e,"feeCollectorAccountId")&&i.proto.AccountID.encode(e.feeCollectorAccountId,t.uint32(26).fork()).ldelim(),null!=e.royaltyFee&&Object.hasOwnProperty.call(e,"royaltyFee")&&i.proto.RoyaltyFee.encode(e.royaltyFee,t.uint32(34).fork()).ldelim(),null!=e.allCollectorsAreExempt&&Object.hasOwnProperty.call(e,"allCollectorsAreExempt")&&t.uint32(40).bool(e.allCollectorsAreExempt),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CustomFee;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fixedFee=i.proto.FixedFee.decode(e,e.uint32());break;case 2:o.fractionalFee=i.proto.FractionalFee.decode(e,e.uint32());break;case 4:o.royaltyFee=i.proto.RoyaltyFee.decode(e,e.uint32());break;case 3:o.feeCollectorAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 5:o.allCollectorsAreExempt=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CustomFee"},e}(),t.AssessedCustomFee=function(){function e(e){if(this.effectivePayerAccountId=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.tokenId=null,e.prototype.feeCollectorAccountId=null,e.prototype.effectivePayerAccountId=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(8).int64(e.amount),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(18).fork()).ldelim(),null!=e.feeCollectorAccountId&&Object.hasOwnProperty.call(e,"feeCollectorAccountId")&&i.proto.AccountID.encode(e.feeCollectorAccountId,t.uint32(26).fork()).ldelim(),null!=e.effectivePayerAccountId&&e.effectivePayerAccountId.length)for(var r=0;r<e.effectivePayerAccountId.length;++r)i.proto.AccountID.encode(e.effectivePayerAccountId[r],t.uint32(34).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.AssessedCustomFee;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.amount=e.int64();break;case 2:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 3:o.feeCollectorAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 4:o.effectivePayerAccountId&&o.effectivePayerAccountId.length||(o.effectivePayerAccountId=[]),o.effectivePayerAccountId.push(i.proto.AccountID.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.AssessedCustomFee"},e}(),t.FixedCustomFee=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fixedFee=null,e.prototype.feeCollectorAccountId=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fixedFee&&Object.hasOwnProperty.call(e,"fixedFee")&&i.proto.FixedFee.encode(e.fixedFee,t.uint32(10).fork()).ldelim(),null!=e.feeCollectorAccountId&&Object.hasOwnProperty.call(e,"feeCollectorAccountId")&&i.proto.AccountID.encode(e.feeCollectorAccountId,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FixedCustomFee;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fixedFee=i.proto.FixedFee.decode(e,e.uint32());break;case 2:o.feeCollectorAccountId=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FixedCustomFee"},e}(),t.FixedCustomFeeList=function(){function e(e){if(this.fees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fees=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.fees&&e.fees.length)for(var r=0;r<e.fees.length;++r)i.proto.FixedCustomFee.encode(e.fees[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FixedCustomFeeList;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.fees&&o.fees.length||(o.fees=[]),o.fees.push(i.proto.FixedCustomFee.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FixedCustomFeeList"},e}(),t.FeeExemptKeyList=function(){function e(e){if(this.keys=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.keys=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.keys&&e.keys.length)for(var r=0;r<e.keys.length;++r)i.proto.Key.encode(e.keys[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FeeExemptKeyList;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.keys&&o.keys.length||(o.keys=[]),o.keys.push(i.proto.Key.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FeeExemptKeyList"},e}(),t.CustomFeeLimit=function(){function e(e){if(this.fees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountId=null,e.prototype.fees=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(10).fork()).ldelim(),null!=e.fees&&e.fees.length)for(var r=0;r<e.fees.length;++r)i.proto.FixedFee.encode(e.fees[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CustomFeeLimit;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.fees&&o.fees.length||(o.fees=[]),o.fees.push(i.proto.FixedFee.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CustomFeeLimit"},e}(),t.ConsensusUpdateTopicTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.topicID=null,e.prototype.memo=null,e.prototype.expirationTime=null,e.prototype.adminKey=null,e.prototype.submitKey=null,e.prototype.autoRenewPeriod=null,e.prototype.autoRenewAccount=null,e.prototype.feeScheduleKey=null,e.prototype.feeExemptKeyList=null,e.prototype.customFees=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(10).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&i.google.protobuf.StringValue.encode(e.memo,t.uint32(18).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(34).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(50).fork()).ldelim(),null!=e.submitKey&&Object.hasOwnProperty.call(e,"submitKey")&&i.proto.Key.encode(e.submitKey,t.uint32(58).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(66).fork()).ldelim(),null!=e.autoRenewAccount&&Object.hasOwnProperty.call(e,"autoRenewAccount")&&i.proto.AccountID.encode(e.autoRenewAccount,t.uint32(74).fork()).ldelim(),null!=e.feeScheduleKey&&Object.hasOwnProperty.call(e,"feeScheduleKey")&&i.proto.Key.encode(e.feeScheduleKey,t.uint32(82).fork()).ldelim(),null!=e.feeExemptKeyList&&Object.hasOwnProperty.call(e,"feeExemptKeyList")&&i.proto.FeeExemptKeyList.encode(e.feeExemptKeyList,t.uint32(90).fork()).ldelim(),null!=e.customFees&&Object.hasOwnProperty.call(e,"customFees")&&i.proto.FixedCustomFeeList.encode(e.customFees,t.uint32(98).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusUpdateTopicTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.topicID=i.proto.TopicID.decode(e,e.uint32());break;case 2:o.memo=i.google.protobuf.StringValue.decode(e,e.uint32());break;case 4:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 6:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 7:o.submitKey=i.proto.Key.decode(e,e.uint32());break;case 8:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 9:o.autoRenewAccount=i.proto.AccountID.decode(e,e.uint32());break;case 10:o.feeScheduleKey=i.proto.Key.decode(e,e.uint32());break;case 11:o.feeExemptKeyList=i.proto.FeeExemptKeyList.decode(e,e.uint32());break;case 12:o.customFees=i.proto.FixedCustomFeeList.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusUpdateTopicTransactionBody"},e}(),t.ConsensusDeleteTopicTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.topicID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusDeleteTopicTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.topicID=i.proto.TopicID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusDeleteTopicTransactionBody"},e}(),t.ConsensusMessageChunkInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.initialTransactionID=null,e.prototype.total=0,e.prototype.number=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.initialTransactionID&&Object.hasOwnProperty.call(e,"initialTransactionID")&&i.proto.TransactionID.encode(e.initialTransactionID,t.uint32(10).fork()).ldelim(),null!=e.total&&Object.hasOwnProperty.call(e,"total")&&t.uint32(16).int32(e.total),null!=e.number&&Object.hasOwnProperty.call(e,"number")&&t.uint32(24).int32(e.number),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusMessageChunkInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.initialTransactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 2:o.total=e.int32();break;case 3:o.number=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusMessageChunkInfo"},e}(),t.ConsensusSubmitMessageTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.topicID=null,e.prototype.message=o.newBuffer([]),e.prototype.chunkInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(10).fork()).ldelim(),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).bytes(e.message),null!=e.chunkInfo&&Object.hasOwnProperty.call(e,"chunkInfo")&&i.proto.ConsensusMessageChunkInfo.encode(e.chunkInfo,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusSubmitMessageTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.topicID=i.proto.TopicID.decode(e,e.uint32());break;case 2:o.message=e.bytes();break;case 3:o.chunkInfo=i.proto.ConsensusMessageChunkInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusSubmitMessageTransactionBody"},e}(),t.UncheckedSubmitBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transactionBytes=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.transactionBytes&&Object.hasOwnProperty.call(e,"transactionBytes")&&t.uint32(10).bytes(e.transactionBytes),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.UncheckedSubmitBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.transactionBytes=e.bytes();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.UncheckedSubmitBody"},e}(),t.TokenCreateTransactionBody=function(){function e(e){if(this.customFees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.name="",e.prototype.symbol="",e.prototype.decimals=0,e.prototype.initialSupply=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.treasury=null,e.prototype.adminKey=null,e.prototype.kycKey=null,e.prototype.freezeKey=null,e.prototype.wipeKey=null,e.prototype.supplyKey=null,e.prototype.freezeDefault=!1,e.prototype.expiry=null,e.prototype.autoRenewAccount=null,e.prototype.autoRenewPeriod=null,e.prototype.memo="",e.prototype.tokenType=0,e.prototype.supplyType=0,e.prototype.maxSupply=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.feeScheduleKey=null,e.prototype.customFees=o.emptyArray,e.prototype.pauseKey=null,e.prototype.metadata=o.newBuffer([]),e.prototype.metadataKey=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.symbol&&Object.hasOwnProperty.call(e,"symbol")&&t.uint32(18).string(e.symbol),null!=e.decimals&&Object.hasOwnProperty.call(e,"decimals")&&t.uint32(24).uint32(e.decimals),null!=e.initialSupply&&Object.hasOwnProperty.call(e,"initialSupply")&&t.uint32(32).uint64(e.initialSupply),null!=e.treasury&&Object.hasOwnProperty.call(e,"treasury")&&i.proto.AccountID.encode(e.treasury,t.uint32(42).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(50).fork()).ldelim(),null!=e.kycKey&&Object.hasOwnProperty.call(e,"kycKey")&&i.proto.Key.encode(e.kycKey,t.uint32(58).fork()).ldelim(),null!=e.freezeKey&&Object.hasOwnProperty.call(e,"freezeKey")&&i.proto.Key.encode(e.freezeKey,t.uint32(66).fork()).ldelim(),null!=e.wipeKey&&Object.hasOwnProperty.call(e,"wipeKey")&&i.proto.Key.encode(e.wipeKey,t.uint32(74).fork()).ldelim(),null!=e.supplyKey&&Object.hasOwnProperty.call(e,"supplyKey")&&i.proto.Key.encode(e.supplyKey,t.uint32(82).fork()).ldelim(),null!=e.freezeDefault&&Object.hasOwnProperty.call(e,"freezeDefault")&&t.uint32(88).bool(e.freezeDefault),null!=e.expiry&&Object.hasOwnProperty.call(e,"expiry")&&i.proto.Timestamp.encode(e.expiry,t.uint32(106).fork()).ldelim(),null!=e.autoRenewAccount&&Object.hasOwnProperty.call(e,"autoRenewAccount")&&i.proto.AccountID.encode(e.autoRenewAccount,t.uint32(114).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(122).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(130).string(e.memo),null!=e.tokenType&&Object.hasOwnProperty.call(e,"tokenType")&&t.uint32(136).int32(e.tokenType),null!=e.supplyType&&Object.hasOwnProperty.call(e,"supplyType")&&t.uint32(144).int32(e.supplyType),null!=e.maxSupply&&Object.hasOwnProperty.call(e,"maxSupply")&&t.uint32(152).int64(e.maxSupply),null!=e.feeScheduleKey&&Object.hasOwnProperty.call(e,"feeScheduleKey")&&i.proto.Key.encode(e.feeScheduleKey,t.uint32(162).fork()).ldelim(),null!=e.customFees&&e.customFees.length)for(var r=0;r<e.customFees.length;++r)i.proto.CustomFee.encode(e.customFees[r],t.uint32(170).fork()).ldelim();return null!=e.pauseKey&&Object.hasOwnProperty.call(e,"pauseKey")&&i.proto.Key.encode(e.pauseKey,t.uint32(178).fork()).ldelim(),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&t.uint32(186).bytes(e.metadata),null!=e.metadataKey&&Object.hasOwnProperty.call(e,"metadataKey")&&i.proto.Key.encode(e.metadataKey,t.uint32(194).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenCreateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.name=e.string();break;case 2:o.symbol=e.string();break;case 3:o.decimals=e.uint32();break;case 4:o.initialSupply=e.uint64();break;case 5:o.treasury=i.proto.AccountID.decode(e,e.uint32());break;case 6:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 7:o.kycKey=i.proto.Key.decode(e,e.uint32());break;case 8:o.freezeKey=i.proto.Key.decode(e,e.uint32());break;case 9:o.wipeKey=i.proto.Key.decode(e,e.uint32());break;case 10:o.supplyKey=i.proto.Key.decode(e,e.uint32());break;case 11:o.freezeDefault=e.bool();break;case 13:o.expiry=i.proto.Timestamp.decode(e,e.uint32());break;case 14:o.autoRenewAccount=i.proto.AccountID.decode(e,e.uint32());break;case 15:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 16:o.memo=e.string();break;case 17:o.tokenType=e.int32();break;case 18:o.supplyType=e.int32();break;case 19:o.maxSupply=e.int64();break;case 20:o.feeScheduleKey=i.proto.Key.decode(e,e.uint32());break;case 21:o.customFees&&o.customFees.length||(o.customFees=[]),o.customFees.push(i.proto.CustomFee.decode(e,e.uint32()));break;case 22:o.pauseKey=i.proto.Key.decode(e,e.uint32());break;case 23:o.metadata=e.bytes();break;case 24:o.metadataKey=i.proto.Key.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenCreateTransactionBody"},e}(),t.TokenFreezeAccountTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.account=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenFreezeAccountTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.account=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenFreezeAccountTransactionBody"},e}(),t.TokenUnfreezeAccountTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.account=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenUnfreezeAccountTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.account=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenUnfreezeAccountTransactionBody"},e}(),t.TokenGrantKycTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.account=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGrantKycTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.account=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGrantKycTransactionBody"},e}(),t.TokenRevokeKycTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.account=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenRevokeKycTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.account=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenRevokeKycTransactionBody"},e}(),t.TokenDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenDeleteTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.token=i.proto.TokenID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenDeleteTransactionBody"},e}(),t.TokenUpdateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.symbol="",e.prototype.name="",e.prototype.treasury=null,e.prototype.adminKey=null,e.prototype.kycKey=null,e.prototype.freezeKey=null,e.prototype.wipeKey=null,e.prototype.supplyKey=null,e.prototype.autoRenewAccount=null,e.prototype.autoRenewPeriod=null,e.prototype.expiry=null,e.prototype.memo=null,e.prototype.feeScheduleKey=null,e.prototype.pauseKey=null,e.prototype.metadata=null,e.prototype.metadataKey=null,e.prototype.keyVerificationMode=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.symbol&&Object.hasOwnProperty.call(e,"symbol")&&t.uint32(18).string(e.symbol),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(26).string(e.name),null!=e.treasury&&Object.hasOwnProperty.call(e,"treasury")&&i.proto.AccountID.encode(e.treasury,t.uint32(34).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(42).fork()).ldelim(),null!=e.kycKey&&Object.hasOwnProperty.call(e,"kycKey")&&i.proto.Key.encode(e.kycKey,t.uint32(50).fork()).ldelim(),null!=e.freezeKey&&Object.hasOwnProperty.call(e,"freezeKey")&&i.proto.Key.encode(e.freezeKey,t.uint32(58).fork()).ldelim(),null!=e.wipeKey&&Object.hasOwnProperty.call(e,"wipeKey")&&i.proto.Key.encode(e.wipeKey,t.uint32(66).fork()).ldelim(),null!=e.supplyKey&&Object.hasOwnProperty.call(e,"supplyKey")&&i.proto.Key.encode(e.supplyKey,t.uint32(74).fork()).ldelim(),null!=e.autoRenewAccount&&Object.hasOwnProperty.call(e,"autoRenewAccount")&&i.proto.AccountID.encode(e.autoRenewAccount,t.uint32(82).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(90).fork()).ldelim(),null!=e.expiry&&Object.hasOwnProperty.call(e,"expiry")&&i.proto.Timestamp.encode(e.expiry,t.uint32(98).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&i.google.protobuf.StringValue.encode(e.memo,t.uint32(106).fork()).ldelim(),null!=e.feeScheduleKey&&Object.hasOwnProperty.call(e,"feeScheduleKey")&&i.proto.Key.encode(e.feeScheduleKey,t.uint32(114).fork()).ldelim(),null!=e.pauseKey&&Object.hasOwnProperty.call(e,"pauseKey")&&i.proto.Key.encode(e.pauseKey,t.uint32(122).fork()).ldelim(),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&i.google.protobuf.BytesValue.encode(e.metadata,t.uint32(130).fork()).ldelim(),null!=e.metadataKey&&Object.hasOwnProperty.call(e,"metadataKey")&&i.proto.Key.encode(e.metadataKey,t.uint32(138).fork()).ldelim(),null!=e.keyVerificationMode&&Object.hasOwnProperty.call(e,"keyVerificationMode")&&t.uint32(144).int32(e.keyVerificationMode),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.symbol=e.string();break;case 3:o.name=e.string();break;case 4:o.treasury=i.proto.AccountID.decode(e,e.uint32());break;case 5:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 6:o.kycKey=i.proto.Key.decode(e,e.uint32());break;case 7:o.freezeKey=i.proto.Key.decode(e,e.uint32());break;case 8:o.wipeKey=i.proto.Key.decode(e,e.uint32());break;case 9:o.supplyKey=i.proto.Key.decode(e,e.uint32());break;case 10:o.autoRenewAccount=i.proto.AccountID.decode(e,e.uint32());break;case 11:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 12:o.expiry=i.proto.Timestamp.decode(e,e.uint32());break;case 13:o.memo=i.google.protobuf.StringValue.decode(e,e.uint32());break;case 14:o.feeScheduleKey=i.proto.Key.decode(e,e.uint32());break;case 15:o.pauseKey=i.proto.Key.decode(e,e.uint32());break;case 16:o.metadata=i.google.protobuf.BytesValue.decode(e,e.uint32());break;case 17:o.metadataKey=i.proto.Key.decode(e,e.uint32());break;case 18:o.keyVerificationMode=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenUpdateTransactionBody"},e}(),t.TokenMintTransactionBody=function(){function e(e){if(this.metadata=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.metadata=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(16).uint64(e.amount),null!=e.metadata&&e.metadata.length)for(var r=0;r<e.metadata.length;++r)t.uint32(26).bytes(e.metadata[r]);return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenMintTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.amount=e.uint64();break;case 3:o.metadata&&o.metadata.length||(o.metadata=[]),o.metadata.push(e.bytes());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenMintTransactionBody"},e}(),t.TokenBurnTransactionBody=function(){function e(e){if(this.serialNumbers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.serialNumbers=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(16).uint64(e.amount),null!=e.serialNumbers&&e.serialNumbers.length){t.uint32(26).fork();for(var r=0;r<e.serialNumbers.length;++r)t.int64(e.serialNumbers[r]);t.ldelim()}return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenBurnTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.amount=e.uint64();break;case 3:if(o.serialNumbers&&o.serialNumbers.length||(o.serialNumbers=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.serialNumbers.push(e.int64());else o.serialNumbers.push(e.int64());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenBurnTransactionBody"},e}(),t.TokenWipeAccountTransactionBody=function(){function e(e){if(this.serialNumbers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.account=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.serialNumbers=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(18).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(24).uint64(e.amount),null!=e.serialNumbers&&e.serialNumbers.length){t.uint32(34).fork();for(var r=0;r<e.serialNumbers.length;++r)t.int64(e.serialNumbers[r]);t.ldelim()}return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenWipeAccountTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.account=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.amount=e.uint64();break;case 4:if(o.serialNumbers&&o.serialNumbers.length||(o.serialNumbers=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.serialNumbers.push(e.int64());else o.serialNumbers.push(e.int64());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenWipeAccountTransactionBody"},e}(),t.TokenAssociateTransactionBody=function(){function e(e){if(this.tokens=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.account=null,e.prototype.tokens=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(10).fork()).ldelim(),null!=e.tokens&&e.tokens.length)for(var r=0;r<e.tokens.length;++r)i.proto.TokenID.encode(e.tokens[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenAssociateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.account=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.tokens&&o.tokens.length||(o.tokens=[]),o.tokens.push(i.proto.TokenID.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenAssociateTransactionBody"},e}(),t.TokenDissociateTransactionBody=function(){function e(e){if(this.tokens=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.account=null,e.prototype.tokens=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(10).fork()).ldelim(),null!=e.tokens&&e.tokens.length)for(var r=0;r<e.tokens.length;++r)i.proto.TokenID.encode(e.tokens[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenDissociateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.account=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.tokens&&o.tokens.length||(o.tokens=[]),o.tokens.push(i.proto.TokenID.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenDissociateTransactionBody"},e}(),t.TokenFeeScheduleUpdateTransactionBody=function(){function e(e){if(this.customFees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.customFees=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.customFees&&e.customFees.length)for(var r=0;r<e.customFees.length;++r)i.proto.CustomFee.encode(e.customFees[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenFeeScheduleUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.customFees&&o.customFees.length||(o.customFees=[]),o.customFees.push(i.proto.CustomFee.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenFeeScheduleUpdateTransactionBody"},e}(),t.TokenPauseTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenPauseTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.token=i.proto.TokenID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenPauseTransactionBody"},e}(),t.TokenUnpauseTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenUnpauseTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.token=i.proto.TokenID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenUnpauseTransactionBody"},e}(),t.TokenUpdateNftsTransactionBody=function(){function e(e){if(this.serialNumbers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.serialNumbers=o.emptyArray,e.prototype.metadata=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.serialNumbers&&e.serialNumbers.length){t.uint32(18).fork();for(var r=0;r<e.serialNumbers.length;++r)t.int64(e.serialNumbers[r]);t.ldelim()}return null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&i.google.protobuf.BytesValue.encode(e.metadata,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenUpdateNftsTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:if(o.serialNumbers&&o.serialNumbers.length||(o.serialNumbers=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.serialNumbers.push(e.int64());else o.serialNumbers.push(e.int64());break;case 3:o.metadata=i.google.protobuf.BytesValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenUpdateNftsTransactionBody"},e}(),t.TokenRejectTransactionBody=function(){function e(e){if(this.rejections=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.owner=null,e.prototype.rejections=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.owner&&Object.hasOwnProperty.call(e,"owner")&&i.proto.AccountID.encode(e.owner,t.uint32(10).fork()).ldelim(),null!=e.rejections&&e.rejections.length)for(var r=0;r<e.rejections.length;++r)i.proto.TokenReference.encode(e.rejections[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenRejectTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.owner=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.rejections&&o.rejections.length||(o.rejections=[]),o.rejections.push(i.proto.TokenReference.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenRejectTransactionBody"},e}(),t.TokenReference=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.fungibleToken=null,e.prototype.nft=null,Object.defineProperty(e.prototype,"tokenIdentifier",{get:o.oneOfGetter(t=["fungibleToken","nft"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fungibleToken&&Object.hasOwnProperty.call(e,"fungibleToken")&&i.proto.TokenID.encode(e.fungibleToken,t.uint32(10).fork()).ldelim(),null!=e.nft&&Object.hasOwnProperty.call(e,"nft")&&i.proto.NftID.encode(e.nft,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenReference;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fungibleToken=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.nft=i.proto.NftID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenReference"},e}(),t.TokenAirdropTransactionBody=function(){function e(e){if(this.tokenTransfers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenTransfers=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.tokenTransfers&&e.tokenTransfers.length)for(var r=0;r<e.tokenTransfers.length;++r)i.proto.TokenTransferList.encode(e.tokenTransfers[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenAirdropTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.tokenTransfers&&o.tokenTransfers.length||(o.tokenTransfers=[]),o.tokenTransfers.push(i.proto.TokenTransferList.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenAirdropTransactionBody"},e}(),t.TokenCancelAirdropTransactionBody=function(){function e(e){if(this.pendingAirdrops=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.pendingAirdrops=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.pendingAirdrops&&e.pendingAirdrops.length)for(var r=0;r<e.pendingAirdrops.length;++r)i.proto.PendingAirdropId.encode(e.pendingAirdrops[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenCancelAirdropTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.pendingAirdrops&&o.pendingAirdrops.length||(o.pendingAirdrops=[]),o.pendingAirdrops.push(i.proto.PendingAirdropId.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenCancelAirdropTransactionBody"},e}(),t.TokenClaimAirdropTransactionBody=function(){function e(e){if(this.pendingAirdrops=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.pendingAirdrops=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.pendingAirdrops&&e.pendingAirdrops.length)for(var r=0;r<e.pendingAirdrops.length;++r)i.proto.PendingAirdropId.encode(e.pendingAirdrops[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenClaimAirdropTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.pendingAirdrops&&o.pendingAirdrops.length||(o.pendingAirdrops=[]),o.pendingAirdrops.push(i.proto.PendingAirdropId.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenClaimAirdropTransactionBody"},e}(),t.ScheduleCreateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.scheduledTransactionBody=null,e.prototype.memo="",e.prototype.adminKey=null,e.prototype.payerAccountID=null,e.prototype.expirationTime=null,e.prototype.waitForExpiry=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.scheduledTransactionBody&&Object.hasOwnProperty.call(e,"scheduledTransactionBody")&&i.proto.SchedulableTransactionBody.encode(e.scheduledTransactionBody,t.uint32(10).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(18).string(e.memo),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(26).fork()).ldelim(),null!=e.payerAccountID&&Object.hasOwnProperty.call(e,"payerAccountID")&&i.proto.AccountID.encode(e.payerAccountID,t.uint32(34).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(42).fork()).ldelim(),null!=e.waitForExpiry&&Object.hasOwnProperty.call(e,"waitForExpiry")&&t.uint32(104).bool(e.waitForExpiry),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleCreateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.scheduledTransactionBody=i.proto.SchedulableTransactionBody.decode(e,e.uint32());break;case 2:o.memo=e.string();break;case 3:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 4:o.payerAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 5:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 13:o.waitForExpiry=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleCreateTransactionBody"},e}(),t.SchedulableTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.transactionFee=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.memo="",e.prototype.contractCall=null,e.prototype.contractCreateInstance=null,e.prototype.contractUpdateInstance=null,e.prototype.contractDeleteInstance=null,e.prototype.cryptoCreateAccount=null,e.prototype.cryptoDelete=null,e.prototype.cryptoTransfer=null,e.prototype.cryptoUpdateAccount=null,e.prototype.fileAppend=null,e.prototype.fileCreate=null,e.prototype.fileDelete=null,e.prototype.fileUpdate=null,e.prototype.systemDelete=null,e.prototype.systemUndelete=null,e.prototype.freeze=null,e.prototype.consensusCreateTopic=null,e.prototype.consensusUpdateTopic=null,e.prototype.consensusDeleteTopic=null,e.prototype.consensusSubmitMessage=null,e.prototype.tokenCreation=null,e.prototype.tokenFreeze=null,e.prototype.tokenUnfreeze=null,e.prototype.tokenGrantKyc=null,e.prototype.tokenRevokeKyc=null,e.prototype.tokenDeletion=null,e.prototype.tokenUpdate=null,e.prototype.tokenMint=null,e.prototype.tokenBurn=null,e.prototype.tokenWipe=null,e.prototype.tokenAssociate=null,e.prototype.tokenDissociate=null,e.prototype.scheduleDelete=null,e.prototype.tokenPause=null,e.prototype.tokenUnpause=null,e.prototype.cryptoApproveAllowance=null,e.prototype.cryptoDeleteAllowance=null,e.prototype.tokenFeeScheduleUpdate=null,e.prototype.utilPrng=null,e.prototype.tokenUpdateNfts=null,e.prototype.nodeCreate=null,e.prototype.nodeUpdate=null,e.prototype.nodeDelete=null,e.prototype.tokenReject=null,e.prototype.tokenCancelAirdrop=null,e.prototype.tokenClaimAirdrop=null,e.prototype.tokenAirdrop=null,Object.defineProperty(e.prototype,"data",{get:o.oneOfGetter(t=["contractCall","contractCreateInstance","contractUpdateInstance","contractDeleteInstance","cryptoCreateAccount","cryptoDelete","cryptoTransfer","cryptoUpdateAccount","fileAppend","fileCreate","fileDelete","fileUpdate","systemDelete","systemUndelete","freeze","consensusCreateTopic","consensusUpdateTopic","consensusDeleteTopic","consensusSubmitMessage","tokenCreation","tokenFreeze","tokenUnfreeze","tokenGrantKyc","tokenRevokeKyc","tokenDeletion","tokenUpdate","tokenMint","tokenBurn","tokenWipe","tokenAssociate","tokenDissociate","scheduleDelete","tokenPause","tokenUnpause","cryptoApproveAllowance","cryptoDeleteAllowance","tokenFeeScheduleUpdate","utilPrng","tokenUpdateNfts","nodeCreate","nodeUpdate","nodeDelete","tokenReject","tokenCancelAirdrop","tokenClaimAirdrop","tokenAirdrop"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.transactionFee&&Object.hasOwnProperty.call(e,"transactionFee")&&t.uint32(8).uint64(e.transactionFee),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(18).string(e.memo),null!=e.contractCall&&Object.hasOwnProperty.call(e,"contractCall")&&i.proto.ContractCallTransactionBody.encode(e.contractCall,t.uint32(26).fork()).ldelim(),null!=e.contractCreateInstance&&Object.hasOwnProperty.call(e,"contractCreateInstance")&&i.proto.ContractCreateTransactionBody.encode(e.contractCreateInstance,t.uint32(34).fork()).ldelim(),null!=e.contractUpdateInstance&&Object.hasOwnProperty.call(e,"contractUpdateInstance")&&i.proto.ContractUpdateTransactionBody.encode(e.contractUpdateInstance,t.uint32(42).fork()).ldelim(),null!=e.contractDeleteInstance&&Object.hasOwnProperty.call(e,"contractDeleteInstance")&&i.proto.ContractDeleteTransactionBody.encode(e.contractDeleteInstance,t.uint32(50).fork()).ldelim(),null!=e.cryptoCreateAccount&&Object.hasOwnProperty.call(e,"cryptoCreateAccount")&&i.proto.CryptoCreateTransactionBody.encode(e.cryptoCreateAccount,t.uint32(58).fork()).ldelim(),null!=e.cryptoDelete&&Object.hasOwnProperty.call(e,"cryptoDelete")&&i.proto.CryptoDeleteTransactionBody.encode(e.cryptoDelete,t.uint32(66).fork()).ldelim(),null!=e.cryptoTransfer&&Object.hasOwnProperty.call(e,"cryptoTransfer")&&i.proto.CryptoTransferTransactionBody.encode(e.cryptoTransfer,t.uint32(74).fork()).ldelim(),null!=e.cryptoUpdateAccount&&Object.hasOwnProperty.call(e,"cryptoUpdateAccount")&&i.proto.CryptoUpdateTransactionBody.encode(e.cryptoUpdateAccount,t.uint32(82).fork()).ldelim(),null!=e.fileAppend&&Object.hasOwnProperty.call(e,"fileAppend")&&i.proto.FileAppendTransactionBody.encode(e.fileAppend,t.uint32(90).fork()).ldelim(),null!=e.fileCreate&&Object.hasOwnProperty.call(e,"fileCreate")&&i.proto.FileCreateTransactionBody.encode(e.fileCreate,t.uint32(98).fork()).ldelim(),null!=e.fileDelete&&Object.hasOwnProperty.call(e,"fileDelete")&&i.proto.FileDeleteTransactionBody.encode(e.fileDelete,t.uint32(106).fork()).ldelim(),null!=e.fileUpdate&&Object.hasOwnProperty.call(e,"fileUpdate")&&i.proto.FileUpdateTransactionBody.encode(e.fileUpdate,t.uint32(114).fork()).ldelim(),null!=e.systemDelete&&Object.hasOwnProperty.call(e,"systemDelete")&&i.proto.SystemDeleteTransactionBody.encode(e.systemDelete,t.uint32(122).fork()).ldelim(),null!=e.systemUndelete&&Object.hasOwnProperty.call(e,"systemUndelete")&&i.proto.SystemUndeleteTransactionBody.encode(e.systemUndelete,t.uint32(130).fork()).ldelim(),null!=e.freeze&&Object.hasOwnProperty.call(e,"freeze")&&i.proto.FreezeTransactionBody.encode(e.freeze,t.uint32(138).fork()).ldelim(),null!=e.consensusCreateTopic&&Object.hasOwnProperty.call(e,"consensusCreateTopic")&&i.proto.ConsensusCreateTopicTransactionBody.encode(e.consensusCreateTopic,t.uint32(146).fork()).ldelim(),null!=e.consensusUpdateTopic&&Object.hasOwnProperty.call(e,"consensusUpdateTopic")&&i.proto.ConsensusUpdateTopicTransactionBody.encode(e.consensusUpdateTopic,t.uint32(154).fork()).ldelim(),null!=e.consensusDeleteTopic&&Object.hasOwnProperty.call(e,"consensusDeleteTopic")&&i.proto.ConsensusDeleteTopicTransactionBody.encode(e.consensusDeleteTopic,t.uint32(162).fork()).ldelim(),null!=e.consensusSubmitMessage&&Object.hasOwnProperty.call(e,"consensusSubmitMessage")&&i.proto.ConsensusSubmitMessageTransactionBody.encode(e.consensusSubmitMessage,t.uint32(170).fork()).ldelim(),null!=e.tokenCreation&&Object.hasOwnProperty.call(e,"tokenCreation")&&i.proto.TokenCreateTransactionBody.encode(e.tokenCreation,t.uint32(178).fork()).ldelim(),null!=e.tokenFreeze&&Object.hasOwnProperty.call(e,"tokenFreeze")&&i.proto.TokenFreezeAccountTransactionBody.encode(e.tokenFreeze,t.uint32(186).fork()).ldelim(),null!=e.tokenUnfreeze&&Object.hasOwnProperty.call(e,"tokenUnfreeze")&&i.proto.TokenUnfreezeAccountTransactionBody.encode(e.tokenUnfreeze,t.uint32(194).fork()).ldelim(),null!=e.tokenGrantKyc&&Object.hasOwnProperty.call(e,"tokenGrantKyc")&&i.proto.TokenGrantKycTransactionBody.encode(e.tokenGrantKyc,t.uint32(202).fork()).ldelim(),null!=e.tokenRevokeKyc&&Object.hasOwnProperty.call(e,"tokenRevokeKyc")&&i.proto.TokenRevokeKycTransactionBody.encode(e.tokenRevokeKyc,t.uint32(210).fork()).ldelim(),null!=e.tokenDeletion&&Object.hasOwnProperty.call(e,"tokenDeletion")&&i.proto.TokenDeleteTransactionBody.encode(e.tokenDeletion,t.uint32(218).fork()).ldelim(),null!=e.tokenUpdate&&Object.hasOwnProperty.call(e,"tokenUpdate")&&i.proto.TokenUpdateTransactionBody.encode(e.tokenUpdate,t.uint32(226).fork()).ldelim(),null!=e.tokenMint&&Object.hasOwnProperty.call(e,"tokenMint")&&i.proto.TokenMintTransactionBody.encode(e.tokenMint,t.uint32(234).fork()).ldelim(),null!=e.tokenBurn&&Object.hasOwnProperty.call(e,"tokenBurn")&&i.proto.TokenBurnTransactionBody.encode(e.tokenBurn,t.uint32(242).fork()).ldelim(),null!=e.tokenWipe&&Object.hasOwnProperty.call(e,"tokenWipe")&&i.proto.TokenWipeAccountTransactionBody.encode(e.tokenWipe,t.uint32(250).fork()).ldelim(),null!=e.tokenAssociate&&Object.hasOwnProperty.call(e,"tokenAssociate")&&i.proto.TokenAssociateTransactionBody.encode(e.tokenAssociate,t.uint32(258).fork()).ldelim(),null!=e.tokenDissociate&&Object.hasOwnProperty.call(e,"tokenDissociate")&&i.proto.TokenDissociateTransactionBody.encode(e.tokenDissociate,t.uint32(266).fork()).ldelim(),null!=e.scheduleDelete&&Object.hasOwnProperty.call(e,"scheduleDelete")&&i.proto.ScheduleDeleteTransactionBody.encode(e.scheduleDelete,t.uint32(274).fork()).ldelim(),null!=e.tokenPause&&Object.hasOwnProperty.call(e,"tokenPause")&&i.proto.TokenPauseTransactionBody.encode(e.tokenPause,t.uint32(282).fork()).ldelim(),null!=e.tokenUnpause&&Object.hasOwnProperty.call(e,"tokenUnpause")&&i.proto.TokenUnpauseTransactionBody.encode(e.tokenUnpause,t.uint32(290).fork()).ldelim(),null!=e.cryptoApproveAllowance&&Object.hasOwnProperty.call(e,"cryptoApproveAllowance")&&i.proto.CryptoApproveAllowanceTransactionBody.encode(e.cryptoApproveAllowance,t.uint32(298).fork()).ldelim(),null!=e.cryptoDeleteAllowance&&Object.hasOwnProperty.call(e,"cryptoDeleteAllowance")&&i.proto.CryptoDeleteAllowanceTransactionBody.encode(e.cryptoDeleteAllowance,t.uint32(306).fork()).ldelim(),null!=e.tokenFeeScheduleUpdate&&Object.hasOwnProperty.call(e,"tokenFeeScheduleUpdate")&&i.proto.TokenFeeScheduleUpdateTransactionBody.encode(e.tokenFeeScheduleUpdate,t.uint32(314).fork()).ldelim(),null!=e.utilPrng&&Object.hasOwnProperty.call(e,"utilPrng")&&i.proto.UtilPrngTransactionBody.encode(e.utilPrng,t.uint32(322).fork()).ldelim(),null!=e.tokenUpdateNfts&&Object.hasOwnProperty.call(e,"tokenUpdateNfts")&&i.proto.TokenUpdateNftsTransactionBody.encode(e.tokenUpdateNfts,t.uint32(330).fork()).ldelim(),null!=e.nodeCreate&&Object.hasOwnProperty.call(e,"nodeCreate")&&i.com.hedera.hapi.node.addressbook.NodeCreateTransactionBody.encode(e.nodeCreate,t.uint32(338).fork()).ldelim(),null!=e.nodeUpdate&&Object.hasOwnProperty.call(e,"nodeUpdate")&&i.com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody.encode(e.nodeUpdate,t.uint32(346).fork()).ldelim(),null!=e.nodeDelete&&Object.hasOwnProperty.call(e,"nodeDelete")&&i.com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody.encode(e.nodeDelete,t.uint32(354).fork()).ldelim(),null!=e.tokenReject&&Object.hasOwnProperty.call(e,"tokenReject")&&i.proto.TokenRejectTransactionBody.encode(e.tokenReject,t.uint32(362).fork()).ldelim(),null!=e.tokenCancelAirdrop&&Object.hasOwnProperty.call(e,"tokenCancelAirdrop")&&i.proto.TokenCancelAirdropTransactionBody.encode(e.tokenCancelAirdrop,t.uint32(370).fork()).ldelim(),null!=e.tokenClaimAirdrop&&Object.hasOwnProperty.call(e,"tokenClaimAirdrop")&&i.proto.TokenClaimAirdropTransactionBody.encode(e.tokenClaimAirdrop,t.uint32(378).fork()).ldelim(),null!=e.tokenAirdrop&&Object.hasOwnProperty.call(e,"tokenAirdrop")&&i.proto.TokenAirdropTransactionBody.encode(e.tokenAirdrop,t.uint32(386).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SchedulableTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transactionFee=e.uint64();break;case 2:o.memo=e.string();break;case 3:o.contractCall=i.proto.ContractCallTransactionBody.decode(e,e.uint32());break;case 4:o.contractCreateInstance=i.proto.ContractCreateTransactionBody.decode(e,e.uint32());break;case 5:o.contractUpdateInstance=i.proto.ContractUpdateTransactionBody.decode(e,e.uint32());break;case 6:o.contractDeleteInstance=i.proto.ContractDeleteTransactionBody.decode(e,e.uint32());break;case 7:o.cryptoCreateAccount=i.proto.CryptoCreateTransactionBody.decode(e,e.uint32());break;case 8:o.cryptoDelete=i.proto.CryptoDeleteTransactionBody.decode(e,e.uint32());break;case 9:o.cryptoTransfer=i.proto.CryptoTransferTransactionBody.decode(e,e.uint32());break;case 10:o.cryptoUpdateAccount=i.proto.CryptoUpdateTransactionBody.decode(e,e.uint32());break;case 11:o.fileAppend=i.proto.FileAppendTransactionBody.decode(e,e.uint32());break;case 12:o.fileCreate=i.proto.FileCreateTransactionBody.decode(e,e.uint32());break;case 13:o.fileDelete=i.proto.FileDeleteTransactionBody.decode(e,e.uint32());break;case 14:o.fileUpdate=i.proto.FileUpdateTransactionBody.decode(e,e.uint32());break;case 15:o.systemDelete=i.proto.SystemDeleteTransactionBody.decode(e,e.uint32());break;case 16:o.systemUndelete=i.proto.SystemUndeleteTransactionBody.decode(e,e.uint32());break;case 17:o.freeze=i.proto.FreezeTransactionBody.decode(e,e.uint32());break;case 18:o.consensusCreateTopic=i.proto.ConsensusCreateTopicTransactionBody.decode(e,e.uint32());break;case 19:o.consensusUpdateTopic=i.proto.ConsensusUpdateTopicTransactionBody.decode(e,e.uint32());break;case 20:o.consensusDeleteTopic=i.proto.ConsensusDeleteTopicTransactionBody.decode(e,e.uint32());break;case 21:o.consensusSubmitMessage=i.proto.ConsensusSubmitMessageTransactionBody.decode(e,e.uint32());break;case 22:o.tokenCreation=i.proto.TokenCreateTransactionBody.decode(e,e.uint32());break;case 23:o.tokenFreeze=i.proto.TokenFreezeAccountTransactionBody.decode(e,e.uint32());break;case 24:o.tokenUnfreeze=i.proto.TokenUnfreezeAccountTransactionBody.decode(e,e.uint32());break;case 25:o.tokenGrantKyc=i.proto.TokenGrantKycTransactionBody.decode(e,e.uint32());break;case 26:o.tokenRevokeKyc=i.proto.TokenRevokeKycTransactionBody.decode(e,e.uint32());break;case 27:o.tokenDeletion=i.proto.TokenDeleteTransactionBody.decode(e,e.uint32());break;case 28:o.tokenUpdate=i.proto.TokenUpdateTransactionBody.decode(e,e.uint32());break;case 29:o.tokenMint=i.proto.TokenMintTransactionBody.decode(e,e.uint32());break;case 30:o.tokenBurn=i.proto.TokenBurnTransactionBody.decode(e,e.uint32());break;case 31:o.tokenWipe=i.proto.TokenWipeAccountTransactionBody.decode(e,e.uint32());break;case 32:o.tokenAssociate=i.proto.TokenAssociateTransactionBody.decode(e,e.uint32());break;case 33:o.tokenDissociate=i.proto.TokenDissociateTransactionBody.decode(e,e.uint32());break;case 34:o.scheduleDelete=i.proto.ScheduleDeleteTransactionBody.decode(e,e.uint32());break;case 35:o.tokenPause=i.proto.TokenPauseTransactionBody.decode(e,e.uint32());break;case 36:o.tokenUnpause=i.proto.TokenUnpauseTransactionBody.decode(e,e.uint32());break;case 37:o.cryptoApproveAllowance=i.proto.CryptoApproveAllowanceTransactionBody.decode(e,e.uint32());break;case 38:o.cryptoDeleteAllowance=i.proto.CryptoDeleteAllowanceTransactionBody.decode(e,e.uint32());break;case 39:o.tokenFeeScheduleUpdate=i.proto.TokenFeeScheduleUpdateTransactionBody.decode(e,e.uint32());break;case 40:o.utilPrng=i.proto.UtilPrngTransactionBody.decode(e,e.uint32());break;case 41:o.tokenUpdateNfts=i.proto.TokenUpdateNftsTransactionBody.decode(e,e.uint32());break;case 42:o.nodeCreate=i.com.hedera.hapi.node.addressbook.NodeCreateTransactionBody.decode(e,e.uint32());break;case 43:o.nodeUpdate=i.com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody.decode(e,e.uint32());break;case 44:o.nodeDelete=i.com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody.decode(e,e.uint32());break;case 45:o.tokenReject=i.proto.TokenRejectTransactionBody.decode(e,e.uint32());break;case 46:o.tokenCancelAirdrop=i.proto.TokenCancelAirdropTransactionBody.decode(e,e.uint32());break;case 47:o.tokenClaimAirdrop=i.proto.TokenClaimAirdropTransactionBody.decode(e,e.uint32());break;case 48:o.tokenAirdrop=i.proto.TokenAirdropTransactionBody.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SchedulableTransactionBody"},e}(),t.ScheduleDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.scheduleID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.scheduleID&&Object.hasOwnProperty.call(e,"scheduleID")&&i.proto.ScheduleID.encode(e.scheduleID,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleDeleteTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.scheduleID=i.proto.ScheduleID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleDeleteTransactionBody"},e}(),t.UtilPrngTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.range=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.range&&Object.hasOwnProperty.call(e,"range")&&t.uint32(8).int32(e.range),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.UtilPrngTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.range=e.int32();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.UtilPrngTransactionBody"},e}(),t.ScheduleSignTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.scheduleID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.scheduleID&&Object.hasOwnProperty.call(e,"scheduleID")&&i.proto.ScheduleID.encode(e.scheduleID,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleSignTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.scheduleID=i.proto.ScheduleID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleSignTransactionBody"},e}(),t.NodeStakeUpdateTransactionBody=function(){function e(e){if(this.nodeStake=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.endOfStakingPeriod=null,e.prototype.nodeStake=o.emptyArray,e.prototype.maxStakingRewardRatePerHbar=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.nodeRewardFeeFraction=null,e.prototype.stakingPeriodsStored=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakingPeriod=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakingRewardFeeFraction=null,e.prototype.stakingStartThreshold=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakingRewardRate=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.reservedStakingRewards=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.unreservedStakingRewardBalance=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.rewardBalanceThreshold=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.maxStakeRewarded=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.maxTotalReward=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.endOfStakingPeriod&&Object.hasOwnProperty.call(e,"endOfStakingPeriod")&&i.proto.Timestamp.encode(e.endOfStakingPeriod,t.uint32(10).fork()).ldelim(),null!=e.nodeStake&&e.nodeStake.length)for(var r=0;r<e.nodeStake.length;++r)i.proto.NodeStake.encode(e.nodeStake[r],t.uint32(18).fork()).ldelim();return null!=e.maxStakingRewardRatePerHbar&&Object.hasOwnProperty.call(e,"maxStakingRewardRatePerHbar")&&t.uint32(24).int64(e.maxStakingRewardRatePerHbar),null!=e.nodeRewardFeeFraction&&Object.hasOwnProperty.call(e,"nodeRewardFeeFraction")&&i.proto.Fraction.encode(e.nodeRewardFeeFraction,t.uint32(34).fork()).ldelim(),null!=e.stakingPeriodsStored&&Object.hasOwnProperty.call(e,"stakingPeriodsStored")&&t.uint32(40).int64(e.stakingPeriodsStored),null!=e.stakingPeriod&&Object.hasOwnProperty.call(e,"stakingPeriod")&&t.uint32(48).int64(e.stakingPeriod),null!=e.stakingRewardFeeFraction&&Object.hasOwnProperty.call(e,"stakingRewardFeeFraction")&&i.proto.Fraction.encode(e.stakingRewardFeeFraction,t.uint32(58).fork()).ldelim(),null!=e.stakingStartThreshold&&Object.hasOwnProperty.call(e,"stakingStartThreshold")&&t.uint32(64).int64(e.stakingStartThreshold),null!=e.stakingRewardRate&&Object.hasOwnProperty.call(e,"stakingRewardRate")&&t.uint32(72).int64(e.stakingRewardRate),null!=e.reservedStakingRewards&&Object.hasOwnProperty.call(e,"reservedStakingRewards")&&t.uint32(80).int64(e.reservedStakingRewards),null!=e.unreservedStakingRewardBalance&&Object.hasOwnProperty.call(e,"unreservedStakingRewardBalance")&&t.uint32(88).int64(e.unreservedStakingRewardBalance),null!=e.rewardBalanceThreshold&&Object.hasOwnProperty.call(e,"rewardBalanceThreshold")&&t.uint32(96).int64(e.rewardBalanceThreshold),null!=e.maxStakeRewarded&&Object.hasOwnProperty.call(e,"maxStakeRewarded")&&t.uint32(104).int64(e.maxStakeRewarded),null!=e.maxTotalReward&&Object.hasOwnProperty.call(e,"maxTotalReward")&&t.uint32(112).int64(e.maxTotalReward),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NodeStakeUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.endOfStakingPeriod=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.nodeStake&&o.nodeStake.length||(o.nodeStake=[]),o.nodeStake.push(i.proto.NodeStake.decode(e,e.uint32()));break;case 3:o.maxStakingRewardRatePerHbar=e.int64();break;case 4:o.nodeRewardFeeFraction=i.proto.Fraction.decode(e,e.uint32());break;case 5:o.stakingPeriodsStored=e.int64();break;case 6:o.stakingPeriod=e.int64();break;case 7:o.stakingRewardFeeFraction=i.proto.Fraction.decode(e,e.uint32());break;case 8:o.stakingStartThreshold=e.int64();break;case 9:o.stakingRewardRate=e.int64();break;case 10:o.reservedStakingRewards=e.int64();break;case 11:o.unreservedStakingRewardBalance=e.int64();break;case 12:o.rewardBalanceThreshold=e.int64();break;case 13:o.maxStakeRewarded=e.int64();break;case 14:o.maxTotalReward=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NodeStakeUpdateTransactionBody"},e}(),t.NodeStake=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.maxStake=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.minStake=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.rewardRate=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stake=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakeNotRewarded=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakeRewarded=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.maxStake&&Object.hasOwnProperty.call(e,"maxStake")&&t.uint32(8).int64(e.maxStake),null!=e.minStake&&Object.hasOwnProperty.call(e,"minStake")&&t.uint32(16).int64(e.minStake),null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(24).int64(e.nodeId),null!=e.rewardRate&&Object.hasOwnProperty.call(e,"rewardRate")&&t.uint32(32).int64(e.rewardRate),null!=e.stake&&Object.hasOwnProperty.call(e,"stake")&&t.uint32(40).int64(e.stake),null!=e.stakeNotRewarded&&Object.hasOwnProperty.call(e,"stakeNotRewarded")&&t.uint32(48).int64(e.stakeNotRewarded),null!=e.stakeRewarded&&Object.hasOwnProperty.call(e,"stakeRewarded")&&t.uint32(56).int64(e.stakeRewarded),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NodeStake;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.maxStake=e.int64();break;case 2:o.minStake=e.int64();break;case 3:o.nodeId=e.int64();break;case 4:o.rewardRate=e.int64();break;case 5:o.stake=e.int64();break;case 6:o.stakeNotRewarded=e.int64();break;case 7:o.stakeRewarded=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NodeStake"},e}(),t.ConsensusGetTopicInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.topicID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusGetTopicInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.topicID=i.proto.TopicID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusGetTopicInfoQuery"},e}(),t.ConsensusGetTopicInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.topicID=null,e.prototype.topicInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(18).fork()).ldelim(),null!=e.topicInfo&&Object.hasOwnProperty.call(e,"topicInfo")&&i.proto.ConsensusTopicInfo.encode(e.topicInfo,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusGetTopicInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.topicID=i.proto.TopicID.decode(e,e.uint32());break;case 5:o.topicInfo=i.proto.ConsensusTopicInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusGetTopicInfoResponse"},e}(),t.ResponseType=function(){const e={},t=Object.create(e);return t[e[0]="ANSWER_ONLY"]=0,t[e[1]="ANSWER_STATE_PROOF"]=1,t[e[2]="COST_ANSWER"]=2,t[e[3]="COST_ANSWER_STATE_PROOF"]=3,t}(),t.QueryHeader=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.payment=null,e.prototype.responseType=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.payment&&Object.hasOwnProperty.call(e,"payment")&&i.proto.Transaction.encode(e.payment,t.uint32(10).fork()).ldelim(),null!=e.responseType&&Object.hasOwnProperty.call(e,"responseType")&&t.uint32(16).int32(e.responseType),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.QueryHeader;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.payment=i.proto.Transaction.decode(e,e.uint32());break;case 2:o.responseType=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.QueryHeader"},e}(),t.ResponseHeader=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodeTransactionPrecheckCode=0,e.prototype.responseType=0,e.prototype.cost=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.stateProof=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.nodeTransactionPrecheckCode&&Object.hasOwnProperty.call(e,"nodeTransactionPrecheckCode")&&t.uint32(8).int32(e.nodeTransactionPrecheckCode),null!=e.responseType&&Object.hasOwnProperty.call(e,"responseType")&&t.uint32(16).int32(e.responseType),null!=e.cost&&Object.hasOwnProperty.call(e,"cost")&&t.uint32(24).uint64(e.cost),null!=e.stateProof&&Object.hasOwnProperty.call(e,"stateProof")&&t.uint32(34).bytes(e.stateProof),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ResponseHeader;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.nodeTransactionPrecheckCode=e.int32();break;case 2:o.responseType=e.int32();break;case 3:o.cost=e.uint64();break;case 4:o.stateProof=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ResponseHeader"},e}(),t.ConsensusTopicInfo=function(){function e(e){if(this.feeExemptKeyList=[],this.customFees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.memo="",e.prototype.runningHash=o.newBuffer([]),e.prototype.sequenceNumber=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.expirationTime=null,e.prototype.adminKey=null,e.prototype.submitKey=null,e.prototype.autoRenewPeriod=null,e.prototype.autoRenewAccount=null,e.prototype.ledgerId=o.newBuffer([]),e.prototype.feeScheduleKey=null,e.prototype.feeExemptKeyList=o.emptyArray,e.prototype.customFees=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(10).string(e.memo),null!=e.runningHash&&Object.hasOwnProperty.call(e,"runningHash")&&t.uint32(18).bytes(e.runningHash),null!=e.sequenceNumber&&Object.hasOwnProperty.call(e,"sequenceNumber")&&t.uint32(24).uint64(e.sequenceNumber),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(34).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(42).fork()).ldelim(),null!=e.submitKey&&Object.hasOwnProperty.call(e,"submitKey")&&i.proto.Key.encode(e.submitKey,t.uint32(50).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(58).fork()).ldelim(),null!=e.autoRenewAccount&&Object.hasOwnProperty.call(e,"autoRenewAccount")&&i.proto.AccountID.encode(e.autoRenewAccount,t.uint32(66).fork()).ldelim(),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(74).bytes(e.ledgerId),null!=e.feeScheduleKey&&Object.hasOwnProperty.call(e,"feeScheduleKey")&&i.proto.Key.encode(e.feeScheduleKey,t.uint32(82).fork()).ldelim(),null!=e.feeExemptKeyList&&e.feeExemptKeyList.length)for(var r=0;r<e.feeExemptKeyList.length;++r)i.proto.Key.encode(e.feeExemptKeyList[r],t.uint32(90).fork()).ldelim();if(null!=e.customFees&&e.customFees.length)for(r=0;r<e.customFees.length;++r)i.proto.FixedCustomFee.encode(e.customFees[r],t.uint32(98).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusTopicInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.memo=e.string();break;case 2:o.runningHash=e.bytes();break;case 3:o.sequenceNumber=e.uint64();break;case 4:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 5:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 6:o.submitKey=i.proto.Key.decode(e,e.uint32());break;case 7:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 8:o.autoRenewAccount=i.proto.AccountID.decode(e,e.uint32());break;case 9:o.ledgerId=e.bytes();break;case 10:o.feeScheduleKey=i.proto.Key.decode(e,e.uint32());break;case 11:o.feeExemptKeyList&&o.feeExemptKeyList.length||(o.feeExemptKeyList=[]),o.feeExemptKeyList.push(i.proto.Key.decode(e,e.uint32()));break;case 12:o.customFees&&o.customFees.length||(o.customFees=[]),o.customFees.push(i.proto.FixedCustomFee.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusTopicInfo"},e}(),t.ConsensusService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createTopic=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createTopic"}),Object.defineProperty(t.prototype.updateTopic=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateTopic"}),Object.defineProperty(t.prototype.deleteTopic=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteTopic"}),Object.defineProperty(t.prototype.submitMessage=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"submitMessage"}),Object.defineProperty(t.prototype.getTopicInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getTopicInfo"}),t}(),t.Query=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.getByKey=null,e.prototype.getBySolidityID=null,e.prototype.contractCallLocal=null,e.prototype.contractGetInfo=null,e.prototype.contractGetBytecode=null,e.prototype.ContractGetRecords=null,e.prototype.cryptogetAccountBalance=null,e.prototype.cryptoGetAccountRecords=null,e.prototype.cryptoGetInfo=null,e.prototype.cryptoGetLiveHash=null,e.prototype.cryptoGetProxyStakers=null,e.prototype.fileGetContents=null,e.prototype.fileGetInfo=null,e.prototype.transactionGetReceipt=null,e.prototype.transactionGetRecord=null,e.prototype.transactionGetFastRecord=null,e.prototype.consensusGetTopicInfo=null,e.prototype.networkGetVersionInfo=null,e.prototype.tokenGetInfo=null,e.prototype.scheduleGetInfo=null,e.prototype.tokenGetAccountNftInfos=null,e.prototype.tokenGetNftInfo=null,e.prototype.tokenGetNftInfos=null,e.prototype.networkGetExecutionTime=null,e.prototype.accountDetails=null,Object.defineProperty(e.prototype,"query",{get:o.oneOfGetter(t=["getByKey","getBySolidityID","contractCallLocal","contractGetInfo","contractGetBytecode","ContractGetRecords","cryptogetAccountBalance","cryptoGetAccountRecords","cryptoGetInfo","cryptoGetLiveHash","cryptoGetProxyStakers","fileGetContents","fileGetInfo","transactionGetReceipt","transactionGetRecord","transactionGetFastRecord","consensusGetTopicInfo","networkGetVersionInfo","tokenGetInfo","scheduleGetInfo","tokenGetAccountNftInfos","tokenGetNftInfo","tokenGetNftInfos","networkGetExecutionTime","accountDetails"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.getByKey&&Object.hasOwnProperty.call(e,"getByKey")&&i.proto.GetByKeyQuery.encode(e.getByKey,t.uint32(10).fork()).ldelim(),null!=e.getBySolidityID&&Object.hasOwnProperty.call(e,"getBySolidityID")&&i.proto.GetBySolidityIDQuery.encode(e.getBySolidityID,t.uint32(18).fork()).ldelim(),null!=e.contractCallLocal&&Object.hasOwnProperty.call(e,"contractCallLocal")&&i.proto.ContractCallLocalQuery.encode(e.contractCallLocal,t.uint32(26).fork()).ldelim(),null!=e.contractGetInfo&&Object.hasOwnProperty.call(e,"contractGetInfo")&&i.proto.ContractGetInfoQuery.encode(e.contractGetInfo,t.uint32(34).fork()).ldelim(),null!=e.contractGetBytecode&&Object.hasOwnProperty.call(e,"contractGetBytecode")&&i.proto.ContractGetBytecodeQuery.encode(e.contractGetBytecode,t.uint32(42).fork()).ldelim(),null!=e.ContractGetRecords&&Object.hasOwnProperty.call(e,"ContractGetRecords")&&i.proto.ContractGetRecordsQuery.encode(e.ContractGetRecords,t.uint32(50).fork()).ldelim(),null!=e.cryptogetAccountBalance&&Object.hasOwnProperty.call(e,"cryptogetAccountBalance")&&i.proto.CryptoGetAccountBalanceQuery.encode(e.cryptogetAccountBalance,t.uint32(58).fork()).ldelim(),null!=e.cryptoGetAccountRecords&&Object.hasOwnProperty.call(e,"cryptoGetAccountRecords")&&i.proto.CryptoGetAccountRecordsQuery.encode(e.cryptoGetAccountRecords,t.uint32(66).fork()).ldelim(),null!=e.cryptoGetInfo&&Object.hasOwnProperty.call(e,"cryptoGetInfo")&&i.proto.CryptoGetInfoQuery.encode(e.cryptoGetInfo,t.uint32(74).fork()).ldelim(),null!=e.cryptoGetLiveHash&&Object.hasOwnProperty.call(e,"cryptoGetLiveHash")&&i.proto.CryptoGetLiveHashQuery.encode(e.cryptoGetLiveHash,t.uint32(82).fork()).ldelim(),null!=e.cryptoGetProxyStakers&&Object.hasOwnProperty.call(e,"cryptoGetProxyStakers")&&i.proto.CryptoGetStakersQuery.encode(e.cryptoGetProxyStakers,t.uint32(90).fork()).ldelim(),null!=e.fileGetContents&&Object.hasOwnProperty.call(e,"fileGetContents")&&i.proto.FileGetContentsQuery.encode(e.fileGetContents,t.uint32(98).fork()).ldelim(),null!=e.fileGetInfo&&Object.hasOwnProperty.call(e,"fileGetInfo")&&i.proto.FileGetInfoQuery.encode(e.fileGetInfo,t.uint32(106).fork()).ldelim(),null!=e.transactionGetReceipt&&Object.hasOwnProperty.call(e,"transactionGetReceipt")&&i.proto.TransactionGetReceiptQuery.encode(e.transactionGetReceipt,t.uint32(114).fork()).ldelim(),null!=e.transactionGetRecord&&Object.hasOwnProperty.call(e,"transactionGetRecord")&&i.proto.TransactionGetRecordQuery.encode(e.transactionGetRecord,t.uint32(122).fork()).ldelim(),null!=e.transactionGetFastRecord&&Object.hasOwnProperty.call(e,"transactionGetFastRecord")&&i.proto.TransactionGetFastRecordQuery.encode(e.transactionGetFastRecord,t.uint32(130).fork()).ldelim(),null!=e.consensusGetTopicInfo&&Object.hasOwnProperty.call(e,"consensusGetTopicInfo")&&i.proto.ConsensusGetTopicInfoQuery.encode(e.consensusGetTopicInfo,t.uint32(402).fork()).ldelim(),null!=e.networkGetVersionInfo&&Object.hasOwnProperty.call(e,"networkGetVersionInfo")&&i.proto.NetworkGetVersionInfoQuery.encode(e.networkGetVersionInfo,t.uint32(410).fork()).ldelim(),null!=e.tokenGetInfo&&Object.hasOwnProperty.call(e,"tokenGetInfo")&&i.proto.TokenGetInfoQuery.encode(e.tokenGetInfo,t.uint32(418).fork()).ldelim(),null!=e.scheduleGetInfo&&Object.hasOwnProperty.call(e,"scheduleGetInfo")&&i.proto.ScheduleGetInfoQuery.encode(e.scheduleGetInfo,t.uint32(426).fork()).ldelim(),null!=e.tokenGetAccountNftInfos&&Object.hasOwnProperty.call(e,"tokenGetAccountNftInfos")&&i.proto.TokenGetAccountNftInfosQuery.encode(e.tokenGetAccountNftInfos,t.uint32(434).fork()).ldelim(),null!=e.tokenGetNftInfo&&Object.hasOwnProperty.call(e,"tokenGetNftInfo")&&i.proto.TokenGetNftInfoQuery.encode(e.tokenGetNftInfo,t.uint32(442).fork()).ldelim(),null!=e.tokenGetNftInfos&&Object.hasOwnProperty.call(e,"tokenGetNftInfos")&&i.proto.TokenGetNftInfosQuery.encode(e.tokenGetNftInfos,t.uint32(450).fork()).ldelim(),null!=e.networkGetExecutionTime&&Object.hasOwnProperty.call(e,"networkGetExecutionTime")&&i.proto.NetworkGetExecutionTimeQuery.encode(e.networkGetExecutionTime,t.uint32(458).fork()).ldelim(),null!=e.accountDetails&&Object.hasOwnProperty.call(e,"accountDetails")&&i.proto.GetAccountDetailsQuery.encode(e.accountDetails,t.uint32(466).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Query;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.getByKey=i.proto.GetByKeyQuery.decode(e,e.uint32());break;case 2:o.getBySolidityID=i.proto.GetBySolidityIDQuery.decode(e,e.uint32());break;case 3:o.contractCallLocal=i.proto.ContractCallLocalQuery.decode(e,e.uint32());break;case 4:o.contractGetInfo=i.proto.ContractGetInfoQuery.decode(e,e.uint32());break;case 5:o.contractGetBytecode=i.proto.ContractGetBytecodeQuery.decode(e,e.uint32());break;case 6:o.ContractGetRecords=i.proto.ContractGetRecordsQuery.decode(e,e.uint32());break;case 7:o.cryptogetAccountBalance=i.proto.CryptoGetAccountBalanceQuery.decode(e,e.uint32());break;case 8:o.cryptoGetAccountRecords=i.proto.CryptoGetAccountRecordsQuery.decode(e,e.uint32());break;case 9:o.cryptoGetInfo=i.proto.CryptoGetInfoQuery.decode(e,e.uint32());break;case 10:o.cryptoGetLiveHash=i.proto.CryptoGetLiveHashQuery.decode(e,e.uint32());break;case 11:o.cryptoGetProxyStakers=i.proto.CryptoGetStakersQuery.decode(e,e.uint32());break;case 12:o.fileGetContents=i.proto.FileGetContentsQuery.decode(e,e.uint32());break;case 13:o.fileGetInfo=i.proto.FileGetInfoQuery.decode(e,e.uint32());break;case 14:o.transactionGetReceipt=i.proto.TransactionGetReceiptQuery.decode(e,e.uint32());break;case 15:o.transactionGetRecord=i.proto.TransactionGetRecordQuery.decode(e,e.uint32());break;case 16:o.transactionGetFastRecord=i.proto.TransactionGetFastRecordQuery.decode(e,e.uint32());break;case 50:o.consensusGetTopicInfo=i.proto.ConsensusGetTopicInfoQuery.decode(e,e.uint32());break;case 51:o.networkGetVersionInfo=i.proto.NetworkGetVersionInfoQuery.decode(e,e.uint32());break;case 52:o.tokenGetInfo=i.proto.TokenGetInfoQuery.decode(e,e.uint32());break;case 53:o.scheduleGetInfo=i.proto.ScheduleGetInfoQuery.decode(e,e.uint32());break;case 54:o.tokenGetAccountNftInfos=i.proto.TokenGetAccountNftInfosQuery.decode(e,e.uint32());break;case 55:o.tokenGetNftInfo=i.proto.TokenGetNftInfoQuery.decode(e,e.uint32());break;case 56:o.tokenGetNftInfos=i.proto.TokenGetNftInfosQuery.decode(e,e.uint32());break;case 57:o.networkGetExecutionTime=i.proto.NetworkGetExecutionTimeQuery.decode(e,e.uint32());break;case 58:o.accountDetails=i.proto.GetAccountDetailsQuery.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Query"},e}(),t.GetByKeyQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.key=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&i.proto.Key.encode(e.key,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetByKeyQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.key=i.proto.Key.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetByKeyQuery"},e}(),t.EntityID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.accountID=null,e.prototype.liveHash=null,e.prototype.fileID=null,e.prototype.contractID=null,Object.defineProperty(e.prototype,"entity",{get:o.oneOfGetter(t=["accountID","liveHash","fileID","contractID"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(10).fork()).ldelim(),null!=e.liveHash&&Object.hasOwnProperty.call(e,"liveHash")&&i.proto.LiveHash.encode(e.liveHash,t.uint32(18).fork()).ldelim(),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(26).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(34).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.EntityID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.liveHash=i.proto.LiveHash.decode(e,e.uint32());break;case 3:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 4:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.EntityID"},e}(),t.GetByKeyResponse=function(){function e(e){if(this.entities=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.entities=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.entities&&e.entities.length)for(var r=0;r<e.entities.length;++r)i.proto.EntityID.encode(e.entities[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetByKeyResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.entities&&o.entities.length||(o.entities=[]),o.entities.push(i.proto.EntityID.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetByKeyResponse"},e}(),t.GetBySolidityIDQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.solidityID="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.solidityID&&Object.hasOwnProperty.call(e,"solidityID")&&t.uint32(18).string(e.solidityID),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetBySolidityIDQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.solidityID=e.string();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetBySolidityIDQuery"},e}(),t.GetBySolidityIDResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.prototype.fileID=null,e.prototype.contractID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(26).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(34).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetBySolidityIDResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 4:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetBySolidityIDResponse"},e}(),t.ContractCallLocalQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.contractID=null,e.prototype.gas=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.functionParameters=o.newBuffer([]),e.prototype.maxResultSize=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.senderId=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),null!=e.gas&&Object.hasOwnProperty.call(e,"gas")&&t.uint32(24).int64(e.gas),null!=e.functionParameters&&Object.hasOwnProperty.call(e,"functionParameters")&&t.uint32(34).bytes(e.functionParameters),null!=e.maxResultSize&&Object.hasOwnProperty.call(e,"maxResultSize")&&t.uint32(40).int64(e.maxResultSize),null!=e.senderId&&Object.hasOwnProperty.call(e,"senderId")&&i.proto.AccountID.encode(e.senderId,t.uint32(50).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractCallLocalQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 3:o.gas=e.int64();break;case 4:o.functionParameters=e.bytes();break;case 5:o.maxResultSize=e.int64();break;case 6:o.senderId=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractCallLocalQuery"},e}(),t.ContractCallLocalResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.functionResult=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.functionResult&&Object.hasOwnProperty.call(e,"functionResult")&&i.proto.ContractFunctionResult.encode(e.functionResult,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractCallLocalResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.functionResult=i.proto.ContractFunctionResult.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractCallLocalResponse"},e}(),t.ContractNonceInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractId=null,e.prototype.nonce=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contractId&&Object.hasOwnProperty.call(e,"contractId")&&i.proto.ContractID.encode(e.contractId,t.uint32(10).fork()).ldelim(),null!=e.nonce&&Object.hasOwnProperty.call(e,"nonce")&&t.uint32(16).int64(e.nonce),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractNonceInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractId=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.nonce=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractNonceInfo"},e}(),t.ContractLoginfo=function(){function e(e){if(this.topic=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractID=null,e.prototype.bloom=o.newBuffer([]),e.prototype.topic=o.emptyArray,e.prototype.data=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.bloom&&Object.hasOwnProperty.call(e,"bloom")&&t.uint32(18).bytes(e.bloom),null!=e.topic&&e.topic.length)for(var r=0;r<e.topic.length;++r)t.uint32(26).bytes(e.topic[r]);return null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(34).bytes(e.data),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractLoginfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.bloom=e.bytes();break;case 3:o.topic&&o.topic.length||(o.topic=[]),o.topic.push(e.bytes());break;case 4:o.data=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractLoginfo"},e}(),t.ContractFunctionResult=function(){function e(e){if(this.logInfo=[],this.createdContractIDs=[],this.contractNonces=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractID=null,e.prototype.contractCallResult=o.newBuffer([]),e.prototype.errorMessage="",e.prototype.bloom=o.newBuffer([]),e.prototype.gasUsed=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.logInfo=o.emptyArray,e.prototype.createdContractIDs=o.emptyArray,e.prototype.evmAddress=null,e.prototype.gas=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.functionParameters=o.newBuffer([]),e.prototype.senderId=null,e.prototype.contractNonces=o.emptyArray,e.prototype.signerNonce=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.contractCallResult&&Object.hasOwnProperty.call(e,"contractCallResult")&&t.uint32(18).bytes(e.contractCallResult),null!=e.errorMessage&&Object.hasOwnProperty.call(e,"errorMessage")&&t.uint32(26).string(e.errorMessage),null!=e.bloom&&Object.hasOwnProperty.call(e,"bloom")&&t.uint32(34).bytes(e.bloom),null!=e.gasUsed&&Object.hasOwnProperty.call(e,"gasUsed")&&t.uint32(40).uint64(e.gasUsed),null!=e.logInfo&&e.logInfo.length)for(var r=0;r<e.logInfo.length;++r)i.proto.ContractLoginfo.encode(e.logInfo[r],t.uint32(50).fork()).ldelim();if(null!=e.createdContractIDs&&e.createdContractIDs.length)for(r=0;r<e.createdContractIDs.length;++r)i.proto.ContractID.encode(e.createdContractIDs[r],t.uint32(58).fork()).ldelim();if(null!=e.evmAddress&&Object.hasOwnProperty.call(e,"evmAddress")&&i.google.protobuf.BytesValue.encode(e.evmAddress,t.uint32(74).fork()).ldelim(),null!=e.gas&&Object.hasOwnProperty.call(e,"gas")&&t.uint32(80).int64(e.gas),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(88).int64(e.amount),null!=e.functionParameters&&Object.hasOwnProperty.call(e,"functionParameters")&&t.uint32(98).bytes(e.functionParameters),null!=e.senderId&&Object.hasOwnProperty.call(e,"senderId")&&i.proto.AccountID.encode(e.senderId,t.uint32(106).fork()).ldelim(),null!=e.contractNonces&&e.contractNonces.length)for(r=0;r<e.contractNonces.length;++r)i.proto.ContractNonceInfo.encode(e.contractNonces[r],t.uint32(114).fork()).ldelim();return null!=e.signerNonce&&Object.hasOwnProperty.call(e,"signerNonce")&&i.google.protobuf.Int64Value.encode(e.signerNonce,t.uint32(122).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractFunctionResult;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.contractCallResult=e.bytes();break;case 3:o.errorMessage=e.string();break;case 4:o.bloom=e.bytes();break;case 5:o.gasUsed=e.uint64();break;case 6:o.logInfo&&o.logInfo.length||(o.logInfo=[]),o.logInfo.push(i.proto.ContractLoginfo.decode(e,e.uint32()));break;case 7:o.createdContractIDs&&o.createdContractIDs.length||(o.createdContractIDs=[]),o.createdContractIDs.push(i.proto.ContractID.decode(e,e.uint32()));break;case 9:o.evmAddress=i.google.protobuf.BytesValue.decode(e,e.uint32());break;case 10:o.gas=e.int64();break;case 11:o.amount=e.int64();break;case 12:o.functionParameters=e.bytes();break;case 13:o.senderId=i.proto.AccountID.decode(e,e.uint32());break;case 14:o.contractNonces&&o.contractNonces.length||(o.contractNonces=[]),o.contractNonces.push(i.proto.ContractNonceInfo.decode(e,e.uint32()));break;case 15:o.signerNonce=i.google.protobuf.Int64Value.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractFunctionResult"},e}(),t.ContractGetInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.contractID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetInfoQuery"},e}(),t.ContractGetInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.contractInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.contractInfo&&Object.hasOwnProperty.call(e,"contractInfo")&&i.proto.ContractGetInfoResponse.ContractInfo.encode(e.contractInfo,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.contractInfo=i.proto.ContractGetInfoResponse.ContractInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetInfoResponse"},e.ContractInfo=function(){function e(e){if(this.tokenRelationships=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractID=null,e.prototype.accountID=null,e.prototype.contractAccountID="",e.prototype.adminKey=null,e.prototype.expirationTime=null,e.prototype.autoRenewPeriod=null,e.prototype.storage=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.memo="",e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.deleted=!1,e.prototype.tokenRelationships=o.emptyArray,e.prototype.ledgerId=o.newBuffer([]),e.prototype.autoRenewAccountId=null,e.prototype.maxAutomaticTokenAssociations=0,e.prototype.stakingInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.contractAccountID&&Object.hasOwnProperty.call(e,"contractAccountID")&&t.uint32(26).string(e.contractAccountID),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(34).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(42).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(50).fork()).ldelim(),null!=e.storage&&Object.hasOwnProperty.call(e,"storage")&&t.uint32(56).int64(e.storage),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(66).string(e.memo),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(72).uint64(e.balance),null!=e.deleted&&Object.hasOwnProperty.call(e,"deleted")&&t.uint32(80).bool(e.deleted),null!=e.tokenRelationships&&e.tokenRelationships.length)for(var r=0;r<e.tokenRelationships.length;++r)i.proto.TokenRelationship.encode(e.tokenRelationships[r],t.uint32(90).fork()).ldelim();return null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(98).bytes(e.ledgerId),null!=e.autoRenewAccountId&&Object.hasOwnProperty.call(e,"autoRenewAccountId")&&i.proto.AccountID.encode(e.autoRenewAccountId,t.uint32(106).fork()).ldelim(),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&t.uint32(112).int32(e.maxAutomaticTokenAssociations),null!=e.stakingInfo&&Object.hasOwnProperty.call(e,"stakingInfo")&&i.proto.StakingInfo.encode(e.stakingInfo,t.uint32(122).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetInfoResponse.ContractInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.contractAccountID=e.string();break;case 4:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 5:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 6:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 7:o.storage=e.int64();break;case 8:o.memo=e.string();break;case 9:o.balance=e.uint64();break;case 10:o.deleted=e.bool();break;case 11:o.tokenRelationships&&o.tokenRelationships.length||(o.tokenRelationships=[]),o.tokenRelationships.push(i.proto.TokenRelationship.decode(e,e.uint32()));break;case 12:o.ledgerId=e.bytes();break;case 13:o.autoRenewAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 14:o.maxAutomaticTokenAssociations=e.int32();break;case 15:o.stakingInfo=i.proto.StakingInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetInfoResponse.ContractInfo"},e}(),e}(),t.ContractGetBytecodeQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.contractID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetBytecodeQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetBytecodeQuery"},e}(),t.ContractGetBytecodeResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.bytecode=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.bytecode&&Object.hasOwnProperty.call(e,"bytecode")&&t.uint32(50).bytes(e.bytecode),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetBytecodeResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 6:o.bytecode=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetBytecodeResponse"},e}(),t.ContractGetRecordsQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.contractID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetRecordsQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetRecordsQuery"},e}(),t.ContractGetRecordsResponse=function(){function e(e){if(this.records=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.contractID=null,e.prototype.records=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),null!=e.records&&e.records.length)for(var r=0;r<e.records.length;++r)i.proto.TransactionRecord.encode(e.records[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetRecordsResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 3:o.records&&o.records.length||(o.records=[]),o.records.push(i.proto.TransactionRecord.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetRecordsResponse"},e}(),t.TransactionRecord=function(){function e(e){if(this.tokenTransferLists=[],this.assessedCustomFees=[],this.automaticTokenAssociations=[],this.paidStakingRewards=[],this.newPendingAirdrops=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.receipt=null,e.prototype.transactionHash=o.newBuffer([]),e.prototype.consensusTimestamp=null,e.prototype.transactionID=null,e.prototype.memo="",e.prototype.transactionFee=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.contractCallResult=null,e.prototype.contractCreateResult=null,e.prototype.transferList=null,e.prototype.tokenTransferLists=o.emptyArray,e.prototype.scheduleRef=null,e.prototype.assessedCustomFees=o.emptyArray,e.prototype.automaticTokenAssociations=o.emptyArray,e.prototype.parentConsensusTimestamp=null,e.prototype.alias=o.newBuffer([]),e.prototype.ethereumHash=o.newBuffer([]),e.prototype.paidStakingRewards=o.emptyArray,e.prototype.prngBytes=null,e.prototype.prngNumber=null,e.prototype.evmAddress=o.newBuffer([]),e.prototype.newPendingAirdrops=o.emptyArray,Object.defineProperty(e.prototype,"body",{get:o.oneOfGetter(t=["contractCallResult","contractCreateResult"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"entropy",{get:o.oneOfGetter(t=["prngBytes","prngNumber"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.receipt&&Object.hasOwnProperty.call(e,"receipt")&&i.proto.TransactionReceipt.encode(e.receipt,t.uint32(10).fork()).ldelim(),null!=e.transactionHash&&Object.hasOwnProperty.call(e,"transactionHash")&&t.uint32(18).bytes(e.transactionHash),null!=e.consensusTimestamp&&Object.hasOwnProperty.call(e,"consensusTimestamp")&&i.proto.Timestamp.encode(e.consensusTimestamp,t.uint32(26).fork()).ldelim(),null!=e.transactionID&&Object.hasOwnProperty.call(e,"transactionID")&&i.proto.TransactionID.encode(e.transactionID,t.uint32(34).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(42).string(e.memo),null!=e.transactionFee&&Object.hasOwnProperty.call(e,"transactionFee")&&t.uint32(48).uint64(e.transactionFee),null!=e.contractCallResult&&Object.hasOwnProperty.call(e,"contractCallResult")&&i.proto.ContractFunctionResult.encode(e.contractCallResult,t.uint32(58).fork()).ldelim(),null!=e.contractCreateResult&&Object.hasOwnProperty.call(e,"contractCreateResult")&&i.proto.ContractFunctionResult.encode(e.contractCreateResult,t.uint32(66).fork()).ldelim(),null!=e.transferList&&Object.hasOwnProperty.call(e,"transferList")&&i.proto.TransferList.encode(e.transferList,t.uint32(82).fork()).ldelim(),null!=e.tokenTransferLists&&e.tokenTransferLists.length)for(var r=0;r<e.tokenTransferLists.length;++r)i.proto.TokenTransferList.encode(e.tokenTransferLists[r],t.uint32(90).fork()).ldelim();if(null!=e.scheduleRef&&Object.hasOwnProperty.call(e,"scheduleRef")&&i.proto.ScheduleID.encode(e.scheduleRef,t.uint32(98).fork()).ldelim(),null!=e.assessedCustomFees&&e.assessedCustomFees.length)for(r=0;r<e.assessedCustomFees.length;++r)i.proto.AssessedCustomFee.encode(e.assessedCustomFees[r],t.uint32(106).fork()).ldelim();if(null!=e.automaticTokenAssociations&&e.automaticTokenAssociations.length)for(r=0;r<e.automaticTokenAssociations.length;++r)i.proto.TokenAssociation.encode(e.automaticTokenAssociations[r],t.uint32(114).fork()).ldelim();if(null!=e.parentConsensusTimestamp&&Object.hasOwnProperty.call(e,"parentConsensusTimestamp")&&i.proto.Timestamp.encode(e.parentConsensusTimestamp,t.uint32(122).fork()).ldelim(),null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&t.uint32(130).bytes(e.alias),null!=e.ethereumHash&&Object.hasOwnProperty.call(e,"ethereumHash")&&t.uint32(138).bytes(e.ethereumHash),null!=e.paidStakingRewards&&e.paidStakingRewards.length)for(r=0;r<e.paidStakingRewards.length;++r)i.proto.AccountAmount.encode(e.paidStakingRewards[r],t.uint32(146).fork()).ldelim();if(null!=e.prngBytes&&Object.hasOwnProperty.call(e,"prngBytes")&&t.uint32(154).bytes(e.prngBytes),null!=e.prngNumber&&Object.hasOwnProperty.call(e,"prngNumber")&&t.uint32(160).int32(e.prngNumber),null!=e.evmAddress&&Object.hasOwnProperty.call(e,"evmAddress")&&t.uint32(170).bytes(e.evmAddress),null!=e.newPendingAirdrops&&e.newPendingAirdrops.length)for(r=0;r<e.newPendingAirdrops.length;++r)i.proto.PendingAirdropRecord.encode(e.newPendingAirdrops[r],t.uint32(178).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionRecord;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.receipt=i.proto.TransactionReceipt.decode(e,e.uint32());break;case 2:o.transactionHash=e.bytes();break;case 3:o.consensusTimestamp=i.proto.Timestamp.decode(e,e.uint32());break;case 4:o.transactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 5:o.memo=e.string();break;case 6:o.transactionFee=e.uint64();break;case 7:o.contractCallResult=i.proto.ContractFunctionResult.decode(e,e.uint32());break;case 8:o.contractCreateResult=i.proto.ContractFunctionResult.decode(e,e.uint32());break;case 10:o.transferList=i.proto.TransferList.decode(e,e.uint32());break;case 11:o.tokenTransferLists&&o.tokenTransferLists.length||(o.tokenTransferLists=[]),o.tokenTransferLists.push(i.proto.TokenTransferList.decode(e,e.uint32()));break;case 12:o.scheduleRef=i.proto.ScheduleID.decode(e,e.uint32());break;case 13:o.assessedCustomFees&&o.assessedCustomFees.length||(o.assessedCustomFees=[]),o.assessedCustomFees.push(i.proto.AssessedCustomFee.decode(e,e.uint32()));break;case 14:o.automaticTokenAssociations&&o.automaticTokenAssociations.length||(o.automaticTokenAssociations=[]),o.automaticTokenAssociations.push(i.proto.TokenAssociation.decode(e,e.uint32()));break;case 15:o.parentConsensusTimestamp=i.proto.Timestamp.decode(e,e.uint32());break;case 16:o.alias=e.bytes();break;case 17:o.ethereumHash=e.bytes();break;case 18:o.paidStakingRewards&&o.paidStakingRewards.length||(o.paidStakingRewards=[]),o.paidStakingRewards.push(i.proto.AccountAmount.decode(e,e.uint32()));break;case 19:o.prngBytes=e.bytes();break;case 20:o.prngNumber=e.int32();break;case 21:o.evmAddress=e.bytes();break;case 22:o.newPendingAirdrops&&o.newPendingAirdrops.length||(o.newPendingAirdrops=[]),o.newPendingAirdrops.push(i.proto.PendingAirdropRecord.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionRecord"},e}(),t.PendingAirdropRecord=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.pendingAirdropId=null,e.prototype.pendingAirdropValue=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.pendingAirdropId&&Object.hasOwnProperty.call(e,"pendingAirdropId")&&i.proto.PendingAirdropId.encode(e.pendingAirdropId,t.uint32(10).fork()).ldelim(),null!=e.pendingAirdropValue&&Object.hasOwnProperty.call(e,"pendingAirdropValue")&&i.proto.PendingAirdropValue.encode(e.pendingAirdropValue,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.PendingAirdropRecord;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.pendingAirdropId=i.proto.PendingAirdropId.decode(e,e.uint32());break;case 2:o.pendingAirdropValue=i.proto.PendingAirdropValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.PendingAirdropRecord"},e}(),t.TransactionReceipt=function(){function e(e){if(this.serialNumbers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.status=0,e.prototype.accountID=null,e.prototype.fileID=null,e.prototype.contractID=null,e.prototype.exchangeRate=null,e.prototype.topicID=null,e.prototype.topicSequenceNumber=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.topicRunningHash=o.newBuffer([]),e.prototype.topicRunningHashVersion=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.tokenID=null,e.prototype.newTotalSupply=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.scheduleID=null,e.prototype.scheduledTransactionID=null,e.prototype.serialNumbers=o.emptyArray,e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(8).int32(e.status),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(26).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(34).fork()).ldelim(),null!=e.exchangeRate&&Object.hasOwnProperty.call(e,"exchangeRate")&&i.proto.ExchangeRateSet.encode(e.exchangeRate,t.uint32(42).fork()).ldelim(),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(50).fork()).ldelim(),null!=e.topicSequenceNumber&&Object.hasOwnProperty.call(e,"topicSequenceNumber")&&t.uint32(56).uint64(e.topicSequenceNumber),null!=e.topicRunningHash&&Object.hasOwnProperty.call(e,"topicRunningHash")&&t.uint32(66).bytes(e.topicRunningHash),null!=e.topicRunningHashVersion&&Object.hasOwnProperty.call(e,"topicRunningHashVersion")&&t.uint32(72).uint64(e.topicRunningHashVersion),null!=e.tokenID&&Object.hasOwnProperty.call(e,"tokenID")&&i.proto.TokenID.encode(e.tokenID,t.uint32(82).fork()).ldelim(),null!=e.newTotalSupply&&Object.hasOwnProperty.call(e,"newTotalSupply")&&t.uint32(88).uint64(e.newTotalSupply),null!=e.scheduleID&&Object.hasOwnProperty.call(e,"scheduleID")&&i.proto.ScheduleID.encode(e.scheduleID,t.uint32(98).fork()).ldelim(),null!=e.scheduledTransactionID&&Object.hasOwnProperty.call(e,"scheduledTransactionID")&&i.proto.TransactionID.encode(e.scheduledTransactionID,t.uint32(106).fork()).ldelim(),null!=e.serialNumbers&&e.serialNumbers.length){t.uint32(114).fork();for(var r=0;r<e.serialNumbers.length;++r)t.int64(e.serialNumbers[r]);t.ldelim()}return null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(120).uint64(e.nodeId),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionReceipt;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.status=e.int32();break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 4:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 5:o.exchangeRate=i.proto.ExchangeRateSet.decode(e,e.uint32());break;case 6:o.topicID=i.proto.TopicID.decode(e,e.uint32());break;case 7:o.topicSequenceNumber=e.uint64();break;case 8:o.topicRunningHash=e.bytes();break;case 9:o.topicRunningHashVersion=e.uint64();break;case 10:o.tokenID=i.proto.TokenID.decode(e,e.uint32());break;case 11:o.newTotalSupply=e.uint64();break;case 12:o.scheduleID=i.proto.ScheduleID.decode(e,e.uint32());break;case 13:o.scheduledTransactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 14:if(o.serialNumbers&&o.serialNumbers.length||(o.serialNumbers=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.serialNumbers.push(e.int64());else o.serialNumbers.push(e.int64());break;case 15:o.nodeId=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionReceipt"},e}(),t.ExchangeRate=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.hbarEquiv=0,e.prototype.centEquiv=0,e.prototype.expirationTime=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.hbarEquiv&&Object.hasOwnProperty.call(e,"hbarEquiv")&&t.uint32(8).int32(e.hbarEquiv),null!=e.centEquiv&&Object.hasOwnProperty.call(e,"centEquiv")&&t.uint32(16).int32(e.centEquiv),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.TimestampSeconds.encode(e.expirationTime,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ExchangeRate;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.hbarEquiv=e.int32();break;case 2:o.centEquiv=e.int32();break;case 3:o.expirationTime=i.proto.TimestampSeconds.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ExchangeRate"},e}(),t.ExchangeRateSet=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.currentRate=null,e.prototype.nextRate=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.currentRate&&Object.hasOwnProperty.call(e,"currentRate")&&i.proto.ExchangeRate.encode(e.currentRate,t.uint32(10).fork()).ldelim(),null!=e.nextRate&&Object.hasOwnProperty.call(e,"nextRate")&&i.proto.ExchangeRate.encode(e.nextRate,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ExchangeRateSet;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.currentRate=i.proto.ExchangeRate.decode(e,e.uint32());break;case 2:o.nextRate=i.proto.ExchangeRate.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ExchangeRateSet"},e}(),t.CryptoGetAccountBalanceQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.header=null,e.prototype.accountID=null,e.prototype.contractID=null,Object.defineProperty(e.prototype,"balanceSource",{get:o.oneOfGetter(t=["accountID","contractID"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetAccountBalanceQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetAccountBalanceQuery"},e}(),t.CryptoGetAccountBalanceResponse=function(){function e(e){if(this.tokenBalances=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.tokenBalances=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(24).uint64(e.balance),null!=e.tokenBalances&&e.tokenBalances.length)for(var r=0;r<e.tokenBalances.length;++r)i.proto.TokenBalance.encode(e.tokenBalances[r],t.uint32(34).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetAccountBalanceResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.balance=e.uint64();break;case 4:o.tokenBalances&&o.tokenBalances.length||(o.tokenBalances=[]),o.tokenBalances.push(i.proto.TokenBalance.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetAccountBalanceResponse"},e}(),t.CryptoGetAccountRecordsQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetAccountRecordsQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetAccountRecordsQuery"},e}(),t.CryptoGetAccountRecordsResponse=function(){function e(e){if(this.records=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.prototype.records=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.records&&e.records.length)for(var r=0;r<e.records.length;++r)i.proto.TransactionRecord.encode(e.records[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetAccountRecordsResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.records&&o.records.length||(o.records=[]),o.records.push(i.proto.TransactionRecord.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetAccountRecordsResponse"},e}(),t.CryptoGetInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetInfoQuery"},e}(),t.CryptoGetInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountInfo&&Object.hasOwnProperty.call(e,"accountInfo")&&i.proto.CryptoGetInfoResponse.AccountInfo.encode(e.accountInfo,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.accountInfo=i.proto.CryptoGetInfoResponse.AccountInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetInfoResponse"},e.AccountInfo=function(){function e(e){if(this.liveHashes=[],this.tokenRelationships=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountID=null,e.prototype.contractAccountID="",e.prototype.deleted=!1,e.prototype.proxyAccountID=null,e.prototype.proxyReceived=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.key=null,e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.generateSendRecordThreshold=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.generateReceiveRecordThreshold=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.receiverSigRequired=!1,e.prototype.expirationTime=null,e.prototype.autoRenewPeriod=null,e.prototype.liveHashes=o.emptyArray,e.prototype.tokenRelationships=o.emptyArray,e.prototype.memo="",e.prototype.ownedNfts=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.maxAutomaticTokenAssociations=0,e.prototype.alias=o.newBuffer([]),e.prototype.ledgerId=o.newBuffer([]),e.prototype.ethereumNonce=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakingInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(10).fork()).ldelim(),null!=e.contractAccountID&&Object.hasOwnProperty.call(e,"contractAccountID")&&t.uint32(18).string(e.contractAccountID),null!=e.deleted&&Object.hasOwnProperty.call(e,"deleted")&&t.uint32(24).bool(e.deleted),null!=e.proxyAccountID&&Object.hasOwnProperty.call(e,"proxyAccountID")&&i.proto.AccountID.encode(e.proxyAccountID,t.uint32(34).fork()).ldelim(),null!=e.proxyReceived&&Object.hasOwnProperty.call(e,"proxyReceived")&&t.uint32(48).int64(e.proxyReceived),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&i.proto.Key.encode(e.key,t.uint32(58).fork()).ldelim(),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(64).uint64(e.balance),null!=e.generateSendRecordThreshold&&Object.hasOwnProperty.call(e,"generateSendRecordThreshold")&&t.uint32(72).uint64(e.generateSendRecordThreshold),null!=e.generateReceiveRecordThreshold&&Object.hasOwnProperty.call(e,"generateReceiveRecordThreshold")&&t.uint32(80).uint64(e.generateReceiveRecordThreshold),null!=e.receiverSigRequired&&Object.hasOwnProperty.call(e,"receiverSigRequired")&&t.uint32(88).bool(e.receiverSigRequired),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(98).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(106).fork()).ldelim(),null!=e.liveHashes&&e.liveHashes.length)for(var r=0;r<e.liveHashes.length;++r)i.proto.LiveHash.encode(e.liveHashes[r],t.uint32(114).fork()).ldelim();if(null!=e.tokenRelationships&&e.tokenRelationships.length)for(r=0;r<e.tokenRelationships.length;++r)i.proto.TokenRelationship.encode(e.tokenRelationships[r],t.uint32(122).fork()).ldelim();return null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(130).string(e.memo),null!=e.ownedNfts&&Object.hasOwnProperty.call(e,"ownedNfts")&&t.uint32(136).int64(e.ownedNfts),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&t.uint32(144).int32(e.maxAutomaticTokenAssociations),null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&t.uint32(154).bytes(e.alias),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(162).bytes(e.ledgerId),null!=e.ethereumNonce&&Object.hasOwnProperty.call(e,"ethereumNonce")&&t.uint32(168).int64(e.ethereumNonce),null!=e.stakingInfo&&Object.hasOwnProperty.call(e,"stakingInfo")&&i.proto.StakingInfo.encode(e.stakingInfo,t.uint32(178).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetInfoResponse.AccountInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.contractAccountID=e.string();break;case 3:o.deleted=e.bool();break;case 4:o.proxyAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 6:o.proxyReceived=e.int64();break;case 7:o.key=i.proto.Key.decode(e,e.uint32());break;case 8:o.balance=e.uint64();break;case 9:o.generateSendRecordThreshold=e.uint64();break;case 10:o.generateReceiveRecordThreshold=e.uint64();break;case 11:o.receiverSigRequired=e.bool();break;case 12:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 13:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 14:o.liveHashes&&o.liveHashes.length||(o.liveHashes=[]),o.liveHashes.push(i.proto.LiveHash.decode(e,e.uint32()));break;case 15:o.tokenRelationships&&o.tokenRelationships.length||(o.tokenRelationships=[]),o.tokenRelationships.push(i.proto.TokenRelationship.decode(e,e.uint32()));break;case 16:o.memo=e.string();break;case 17:o.ownedNfts=e.int64();break;case 18:o.maxAutomaticTokenAssociations=e.int32();break;case 19:o.alias=e.bytes();break;case 20:o.ledgerId=e.bytes();break;case 21:o.ethereumNonce=e.int64();break;case 22:o.stakingInfo=i.proto.StakingInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetInfoResponse.AccountInfo"},e}(),e}(),t.CryptoGetLiveHashQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.prototype.hash=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(26).bytes(e.hash),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetLiveHashQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.hash=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetLiveHashQuery"},e}(),t.CryptoGetLiveHashResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.liveHash=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.liveHash&&Object.hasOwnProperty.call(e,"liveHash")&&i.proto.LiveHash.encode(e.liveHash,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetLiveHashResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.liveHash=i.proto.LiveHash.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetLiveHashResponse"},e}(),t.CryptoGetStakersQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetStakersQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetStakersQuery"},e}(),t.ProxyStaker=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountID=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(10).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(16).int64(e.amount),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ProxyStaker;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.amount=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ProxyStaker"},e}(),t.AllProxyStakers=function(){function e(e){if(this.proxyStaker=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountID=null,e.prototype.proxyStaker=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(10).fork()).ldelim(),null!=e.proxyStaker&&e.proxyStaker.length)for(var r=0;r<e.proxyStaker.length;++r)i.proto.ProxyStaker.encode(e.proxyStaker[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.AllProxyStakers;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.proxyStaker&&o.proxyStaker.length||(o.proxyStaker=[]),o.proxyStaker.push(i.proto.ProxyStaker.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.AllProxyStakers"},e}(),t.CryptoGetStakersResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.stakers=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.stakers&&Object.hasOwnProperty.call(e,"stakers")&&i.proto.AllProxyStakers.encode(e.stakers,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetStakersResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 3:o.stakers=i.proto.AllProxyStakers.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetStakersResponse"},e}(),t.FileGetContentsQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.fileID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileGetContentsQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.fileID=i.proto.FileID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileGetContentsQuery"},e}(),t.FileGetContentsResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.fileContents=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.fileContents&&Object.hasOwnProperty.call(e,"fileContents")&&i.proto.FileGetContentsResponse.FileContents.encode(e.fileContents,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileGetContentsResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.fileContents=i.proto.FileGetContentsResponse.FileContents.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileGetContentsResponse"},e.FileContents=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileID=null,e.prototype.contents=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(10).fork()).ldelim(),null!=e.contents&&Object.hasOwnProperty.call(e,"contents")&&t.uint32(18).bytes(e.contents),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileGetContentsResponse.FileContents;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 2:o.contents=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileGetContentsResponse.FileContents"},e}(),e}(),t.FileGetInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.fileID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileGetInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.fileID=i.proto.FileID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileGetInfoQuery"},e}(),t.FileGetInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.fileInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.fileInfo&&Object.hasOwnProperty.call(e,"fileInfo")&&i.proto.FileGetInfoResponse.FileInfo.encode(e.fileInfo,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileGetInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.fileInfo=i.proto.FileGetInfoResponse.FileInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileGetInfoResponse"},e.FileInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileID=null,e.prototype.size=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.expirationTime=null,e.prototype.deleted=!1,e.prototype.keys=null,e.prototype.memo="",e.prototype.ledgerId=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(10).fork()).ldelim(),null!=e.size&&Object.hasOwnProperty.call(e,"size")&&t.uint32(16).int64(e.size),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(26).fork()).ldelim(),null!=e.deleted&&Object.hasOwnProperty.call(e,"deleted")&&t.uint32(32).bool(e.deleted),null!=e.keys&&Object.hasOwnProperty.call(e,"keys")&&i.proto.KeyList.encode(e.keys,t.uint32(42).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(50).string(e.memo),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(58).bytes(e.ledgerId),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileGetInfoResponse.FileInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 2:o.size=e.int64();break;case 3:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 4:o.deleted=e.bool();break;case 5:o.keys=i.proto.KeyList.decode(e,e.uint32());break;case 6:o.memo=e.string();break;case 7:o.ledgerId=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileGetInfoResponse.FileInfo"},e}(),e}(),t.TransactionGetReceiptQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.transactionID=null,e.prototype.includeDuplicates=!1,e.prototype.includeChildReceipts=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.transactionID&&Object.hasOwnProperty.call(e,"transactionID")&&i.proto.TransactionID.encode(e.transactionID,t.uint32(18).fork()).ldelim(),null!=e.includeDuplicates&&Object.hasOwnProperty.call(e,"includeDuplicates")&&t.uint32(24).bool(e.includeDuplicates),null!=e.includeChildReceipts&&Object.hasOwnProperty.call(e,"includeChildReceipts")&&t.uint32(32).bool(e.includeChildReceipts),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionGetReceiptQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.transactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 3:o.includeDuplicates=e.bool();break;case 4:o.includeChildReceipts=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionGetReceiptQuery"},e}(),t.TransactionGetReceiptResponse=function(){function e(e){if(this.duplicateTransactionReceipts=[],this.childTransactionReceipts=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.receipt=null,e.prototype.duplicateTransactionReceipts=o.emptyArray,e.prototype.childTransactionReceipts=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.receipt&&Object.hasOwnProperty.call(e,"receipt")&&i.proto.TransactionReceipt.encode(e.receipt,t.uint32(18).fork()).ldelim(),null!=e.duplicateTransactionReceipts&&e.duplicateTransactionReceipts.length)for(var r=0;r<e.duplicateTransactionReceipts.length;++r)i.proto.TransactionReceipt.encode(e.duplicateTransactionReceipts[r],t.uint32(34).fork()).ldelim();if(null!=e.childTransactionReceipts&&e.childTransactionReceipts.length)for(r=0;r<e.childTransactionReceipts.length;++r)i.proto.TransactionReceipt.encode(e.childTransactionReceipts[r],t.uint32(42).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionGetReceiptResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.receipt=i.proto.TransactionReceipt.decode(e,e.uint32());break;case 4:o.duplicateTransactionReceipts&&o.duplicateTransactionReceipts.length||(o.duplicateTransactionReceipts=[]),o.duplicateTransactionReceipts.push(i.proto.TransactionReceipt.decode(e,e.uint32()));break;case 5:o.childTransactionReceipts&&o.childTransactionReceipts.length||(o.childTransactionReceipts=[]),o.childTransactionReceipts.push(i.proto.TransactionReceipt.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionGetReceiptResponse"},e}(),t.TransactionGetRecordQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.transactionID=null,e.prototype.includeDuplicates=!1,e.prototype.includeChildRecords=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.transactionID&&Object.hasOwnProperty.call(e,"transactionID")&&i.proto.TransactionID.encode(e.transactionID,t.uint32(18).fork()).ldelim(),null!=e.includeDuplicates&&Object.hasOwnProperty.call(e,"includeDuplicates")&&t.uint32(24).bool(e.includeDuplicates),null!=e.includeChildRecords&&Object.hasOwnProperty.call(e,"includeChildRecords")&&t.uint32(32).bool(e.includeChildRecords),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionGetRecordQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.transactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 3:o.includeDuplicates=e.bool();break;case 4:o.includeChildRecords=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionGetRecordQuery"},e}(),t.TransactionGetRecordResponse=function(){function e(e){if(this.duplicateTransactionRecords=[],this.childTransactionRecords=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.transactionRecord=null,e.prototype.duplicateTransactionRecords=o.emptyArray,e.prototype.childTransactionRecords=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.transactionRecord&&Object.hasOwnProperty.call(e,"transactionRecord")&&i.proto.TransactionRecord.encode(e.transactionRecord,t.uint32(26).fork()).ldelim(),null!=e.duplicateTransactionRecords&&e.duplicateTransactionRecords.length)for(var r=0;r<e.duplicateTransactionRecords.length;++r)i.proto.TransactionRecord.encode(e.duplicateTransactionRecords[r],t.uint32(34).fork()).ldelim();if(null!=e.childTransactionRecords&&e.childTransactionRecords.length)for(r=0;r<e.childTransactionRecords.length;++r)i.proto.TransactionRecord.encode(e.childTransactionRecords[r],t.uint32(42).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionGetRecordResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 3:o.transactionRecord=i.proto.TransactionRecord.decode(e,e.uint32());break;case 4:o.duplicateTransactionRecords&&o.duplicateTransactionRecords.length||(o.duplicateTransactionRecords=[]),o.duplicateTransactionRecords.push(i.proto.TransactionRecord.decode(e,e.uint32()));break;case 5:o.childTransactionRecords&&o.childTransactionRecords.length||(o.childTransactionRecords=[]),o.childTransactionRecords.push(i.proto.TransactionRecord.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionGetRecordResponse"},e}(),t.TransactionGetFastRecordQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.transactionID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.transactionID&&Object.hasOwnProperty.call(e,"transactionID")&&i.proto.TransactionID.encode(e.transactionID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionGetFastRecordQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.transactionID=i.proto.TransactionID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionGetFastRecordQuery"},e}(),t.TransactionGetFastRecordResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.transactionRecord=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.transactionRecord&&Object.hasOwnProperty.call(e,"transactionRecord")&&i.proto.TransactionRecord.encode(e.transactionRecord,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionGetFastRecordResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.transactionRecord=i.proto.TransactionRecord.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionGetFastRecordResponse"},e}(),t.NetworkGetVersionInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NetworkGetVersionInfoQuery;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.header=i.proto.QueryHeader.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NetworkGetVersionInfoQuery"},e}(),t.NetworkGetVersionInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.hapiProtoVersion=null,e.prototype.hederaServicesVersion=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.hapiProtoVersion&&Object.hasOwnProperty.call(e,"hapiProtoVersion")&&i.proto.SemanticVersion.encode(e.hapiProtoVersion,t.uint32(18).fork()).ldelim(),null!=e.hederaServicesVersion&&Object.hasOwnProperty.call(e,"hederaServicesVersion")&&i.proto.SemanticVersion.encode(e.hederaServicesVersion,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NetworkGetVersionInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.hapiProtoVersion=i.proto.SemanticVersion.decode(e,e.uint32());break;case 3:o.hederaServicesVersion=i.proto.SemanticVersion.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NetworkGetVersionInfoResponse"},e}(),t.NetworkGetExecutionTimeQuery=function(){function e(e){if(this.transactionIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.transactionIds=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.transactionIds&&e.transactionIds.length)for(var r=0;r<e.transactionIds.length;++r)i.proto.TransactionID.encode(e.transactionIds[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NetworkGetExecutionTimeQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.transactionIds&&o.transactionIds.length||(o.transactionIds=[]),o.transactionIds.push(i.proto.TransactionID.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NetworkGetExecutionTimeQuery"},e}(),t.NetworkGetExecutionTimeResponse=function(){function e(e){if(this.executionTimes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.executionTimes=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.executionTimes&&e.executionTimes.length){t.uint32(18).fork();for(var r=0;r<e.executionTimes.length;++r)t.uint64(e.executionTimes[r]);t.ldelim()}return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NetworkGetExecutionTimeResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:if(o.executionTimes&&o.executionTimes.length||(o.executionTimes=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.executionTimes.push(e.uint64());else o.executionTimes.push(e.uint64());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NetworkGetExecutionTimeResponse"},e}(),t.TokenGetInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.token=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.token=i.proto.TokenID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetInfoQuery"},e}(),t.TokenInfo=function(){function e(e){if(this.customFees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.name="",e.prototype.symbol="",e.prototype.decimals=0,e.prototype.totalSupply=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.treasury=null,e.prototype.adminKey=null,e.prototype.kycKey=null,e.prototype.freezeKey=null,e.prototype.wipeKey=null,e.prototype.supplyKey=null,e.prototype.defaultFreezeStatus=0,e.prototype.defaultKycStatus=0,e.prototype.deleted=!1,e.prototype.autoRenewAccount=null,e.prototype.autoRenewPeriod=null,e.prototype.expiry=null,e.prototype.memo="",e.prototype.tokenType=0,e.prototype.supplyType=0,e.prototype.maxSupply=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.feeScheduleKey=null,e.prototype.customFees=o.emptyArray,e.prototype.pauseKey=null,e.prototype.pauseStatus=0,e.prototype.ledgerId=o.newBuffer([]),e.prototype.metadata=o.newBuffer([]),e.prototype.metadataKey=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.symbol&&Object.hasOwnProperty.call(e,"symbol")&&t.uint32(26).string(e.symbol),null!=e.decimals&&Object.hasOwnProperty.call(e,"decimals")&&t.uint32(32).uint32(e.decimals),null!=e.totalSupply&&Object.hasOwnProperty.call(e,"totalSupply")&&t.uint32(40).uint64(e.totalSupply),null!=e.treasury&&Object.hasOwnProperty.call(e,"treasury")&&i.proto.AccountID.encode(e.treasury,t.uint32(50).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(58).fork()).ldelim(),null!=e.kycKey&&Object.hasOwnProperty.call(e,"kycKey")&&i.proto.Key.encode(e.kycKey,t.uint32(66).fork()).ldelim(),null!=e.freezeKey&&Object.hasOwnProperty.call(e,"freezeKey")&&i.proto.Key.encode(e.freezeKey,t.uint32(74).fork()).ldelim(),null!=e.wipeKey&&Object.hasOwnProperty.call(e,"wipeKey")&&i.proto.Key.encode(e.wipeKey,t.uint32(82).fork()).ldelim(),null!=e.supplyKey&&Object.hasOwnProperty.call(e,"supplyKey")&&i.proto.Key.encode(e.supplyKey,t.uint32(90).fork()).ldelim(),null!=e.defaultFreezeStatus&&Object.hasOwnProperty.call(e,"defaultFreezeStatus")&&t.uint32(96).int32(e.defaultFreezeStatus),null!=e.defaultKycStatus&&Object.hasOwnProperty.call(e,"defaultKycStatus")&&t.uint32(104).int32(e.defaultKycStatus),null!=e.deleted&&Object.hasOwnProperty.call(e,"deleted")&&t.uint32(112).bool(e.deleted),null!=e.autoRenewAccount&&Object.hasOwnProperty.call(e,"autoRenewAccount")&&i.proto.AccountID.encode(e.autoRenewAccount,t.uint32(122).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(130).fork()).ldelim(),null!=e.expiry&&Object.hasOwnProperty.call(e,"expiry")&&i.proto.Timestamp.encode(e.expiry,t.uint32(138).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(146).string(e.memo),null!=e.tokenType&&Object.hasOwnProperty.call(e,"tokenType")&&t.uint32(152).int32(e.tokenType),null!=e.supplyType&&Object.hasOwnProperty.call(e,"supplyType")&&t.uint32(160).int32(e.supplyType),null!=e.maxSupply&&Object.hasOwnProperty.call(e,"maxSupply")&&t.uint32(168).int64(e.maxSupply),null!=e.feeScheduleKey&&Object.hasOwnProperty.call(e,"feeScheduleKey")&&i.proto.Key.encode(e.feeScheduleKey,t.uint32(178).fork()).ldelim(),null!=e.customFees&&e.customFees.length)for(var r=0;r<e.customFees.length;++r)i.proto.CustomFee.encode(e.customFees[r],t.uint32(186).fork()).ldelim();return null!=e.pauseKey&&Object.hasOwnProperty.call(e,"pauseKey")&&i.proto.Key.encode(e.pauseKey,t.uint32(194).fork()).ldelim(),null!=e.pauseStatus&&Object.hasOwnProperty.call(e,"pauseStatus")&&t.uint32(200).int32(e.pauseStatus),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(210).bytes(e.ledgerId),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&t.uint32(218).bytes(e.metadata),null!=e.metadataKey&&Object.hasOwnProperty.call(e,"metadataKey")&&i.proto.Key.encode(e.metadataKey,t.uint32(226).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.name=e.string();break;case 3:o.symbol=e.string();break;case 4:o.decimals=e.uint32();break;case 5:o.totalSupply=e.uint64();break;case 6:o.treasury=i.proto.AccountID.decode(e,e.uint32());break;case 7:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 8:o.kycKey=i.proto.Key.decode(e,e.uint32());break;case 9:o.freezeKey=i.proto.Key.decode(e,e.uint32());break;case 10:o.wipeKey=i.proto.Key.decode(e,e.uint32());break;case 11:o.supplyKey=i.proto.Key.decode(e,e.uint32());break;case 12:o.defaultFreezeStatus=e.int32();break;case 13:o.defaultKycStatus=e.int32();break;case 14:o.deleted=e.bool();break;case 15:o.autoRenewAccount=i.proto.AccountID.decode(e,e.uint32());break;case 16:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 17:o.expiry=i.proto.Timestamp.decode(e,e.uint32());break;case 18:o.memo=e.string();break;case 19:o.tokenType=e.int32();break;case 20:o.supplyType=e.int32();break;case 21:o.maxSupply=e.int64();break;case 22:o.feeScheduleKey=i.proto.Key.decode(e,e.uint32());break;case 23:o.customFees&&o.customFees.length||(o.customFees=[]),o.customFees.push(i.proto.CustomFee.decode(e,e.uint32()));break;case 24:o.pauseKey=i.proto.Key.decode(e,e.uint32());break;case 25:o.pauseStatus=e.int32();break;case 26:o.ledgerId=e.bytes();break;case 27:o.metadata=e.bytes();break;case 28:o.metadataKey=i.proto.Key.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenInfo"},e}(),t.TokenGetInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.tokenInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.tokenInfo&&Object.hasOwnProperty.call(e,"tokenInfo")&&i.proto.TokenInfo.encode(e.tokenInfo,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.tokenInfo=i.proto.TokenInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetInfoResponse"},e}(),t.ScheduleGetInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.scheduleID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.scheduleID&&Object.hasOwnProperty.call(e,"scheduleID")&&i.proto.ScheduleID.encode(e.scheduleID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleGetInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.scheduleID=i.proto.ScheduleID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleGetInfoQuery"},e}(),t.ScheduleInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.scheduleID=null,e.prototype.deletionTime=null,e.prototype.executionTime=null,e.prototype.expirationTime=null,e.prototype.scheduledTransactionBody=null,e.prototype.memo="",e.prototype.adminKey=null,e.prototype.signers=null,e.prototype.creatorAccountID=null,e.prototype.payerAccountID=null,e.prototype.scheduledTransactionID=null,e.prototype.ledgerId=o.newBuffer([]),e.prototype.waitForExpiry=!1,Object.defineProperty(e.prototype,"data",{get:o.oneOfGetter(t=["deletionTime","executionTime"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.scheduleID&&Object.hasOwnProperty.call(e,"scheduleID")&&i.proto.ScheduleID.encode(e.scheduleID,t.uint32(10).fork()).ldelim(),null!=e.deletionTime&&Object.hasOwnProperty.call(e,"deletionTime")&&i.proto.Timestamp.encode(e.deletionTime,t.uint32(18).fork()).ldelim(),null!=e.executionTime&&Object.hasOwnProperty.call(e,"executionTime")&&i.proto.Timestamp.encode(e.executionTime,t.uint32(26).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(34).fork()).ldelim(),null!=e.scheduledTransactionBody&&Object.hasOwnProperty.call(e,"scheduledTransactionBody")&&i.proto.SchedulableTransactionBody.encode(e.scheduledTransactionBody,t.uint32(42).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(50).string(e.memo),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(58).fork()).ldelim(),null!=e.signers&&Object.hasOwnProperty.call(e,"signers")&&i.proto.KeyList.encode(e.signers,t.uint32(66).fork()).ldelim(),null!=e.creatorAccountID&&Object.hasOwnProperty.call(e,"creatorAccountID")&&i.proto.AccountID.encode(e.creatorAccountID,t.uint32(74).fork()).ldelim(),null!=e.payerAccountID&&Object.hasOwnProperty.call(e,"payerAccountID")&&i.proto.AccountID.encode(e.payerAccountID,t.uint32(82).fork()).ldelim(),null!=e.scheduledTransactionID&&Object.hasOwnProperty.call(e,"scheduledTransactionID")&&i.proto.TransactionID.encode(e.scheduledTransactionID,t.uint32(90).fork()).ldelim(),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(98).bytes(e.ledgerId),null!=e.waitForExpiry&&Object.hasOwnProperty.call(e,"waitForExpiry")&&t.uint32(104).bool(e.waitForExpiry),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.scheduleID=i.proto.ScheduleID.decode(e,e.uint32());break;case 2:o.deletionTime=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.executionTime=i.proto.Timestamp.decode(e,e.uint32());break;case 4:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 5:o.scheduledTransactionBody=i.proto.SchedulableTransactionBody.decode(e,e.uint32());break;case 6:o.memo=e.string();break;case 7:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 8:o.signers=i.proto.KeyList.decode(e,e.uint32());break;case 9:o.creatorAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 10:o.payerAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 11:o.scheduledTransactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 12:o.ledgerId=e.bytes();break;case 13:o.waitForExpiry=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleInfo"},e}(),t.ScheduleGetInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.scheduleInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.scheduleInfo&&Object.hasOwnProperty.call(e,"scheduleInfo")&&i.proto.ScheduleInfo.encode(e.scheduleInfo,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleGetInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.scheduleInfo=i.proto.ScheduleInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleGetInfoResponse"},e}(),t.TokenGetAccountNftInfosQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.prototype.start=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.end=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.start&&Object.hasOwnProperty.call(e,"start")&&t.uint32(24).int64(e.start),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&t.uint32(32).int64(e.end),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetAccountNftInfosQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.start=e.int64();break;case 4:o.end=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetAccountNftInfosQuery"},e}(),t.TokenGetAccountNftInfosResponse=function(){function e(e){if(this.nfts=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.nfts=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.nfts&&e.nfts.length)for(var r=0;r<e.nfts.length;++r)i.proto.TokenNftInfo.encode(e.nfts[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetAccountNftInfosResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.nfts&&o.nfts.length||(o.nfts=[]),o.nfts.push(i.proto.TokenNftInfo.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetAccountNftInfosResponse"},e}(),t.TokenGetNftInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.nftID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.nftID&&Object.hasOwnProperty.call(e,"nftID")&&i.proto.NftID.encode(e.nftID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetNftInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.nftID=i.proto.NftID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetNftInfoQuery"},e}(),t.TokenNftInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nftID=null,e.prototype.accountID=null,e.prototype.creationTime=null,e.prototype.metadata=o.newBuffer([]),e.prototype.ledgerId=o.newBuffer([]),e.prototype.spenderId=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.nftID&&Object.hasOwnProperty.call(e,"nftID")&&i.proto.NftID.encode(e.nftID,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.creationTime&&Object.hasOwnProperty.call(e,"creationTime")&&i.proto.Timestamp.encode(e.creationTime,t.uint32(26).fork()).ldelim(),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&t.uint32(34).bytes(e.metadata),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(42).bytes(e.ledgerId),null!=e.spenderId&&Object.hasOwnProperty.call(e,"spenderId")&&i.proto.AccountID.encode(e.spenderId,t.uint32(50).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenNftInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.nftID=i.proto.NftID.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.creationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 4:o.metadata=e.bytes();break;case 5:o.ledgerId=e.bytes();break;case 6:o.spenderId=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenNftInfo"},e}(),t.TokenGetNftInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.nft=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.nft&&Object.hasOwnProperty.call(e,"nft")&&i.proto.TokenNftInfo.encode(e.nft,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetNftInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.nft=i.proto.TokenNftInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetNftInfoResponse"},e}(),t.TokenGetNftInfosQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.tokenID=null,e.prototype.start=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.end=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.tokenID&&Object.hasOwnProperty.call(e,"tokenID")&&i.proto.TokenID.encode(e.tokenID,t.uint32(18).fork()).ldelim(),null!=e.start&&Object.hasOwnProperty.call(e,"start")&&t.uint32(24).int64(e.start),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&t.uint32(32).int64(e.end),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetNftInfosQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.tokenID=i.proto.TokenID.decode(e,e.uint32());break;case 3:o.start=e.int64();break;case 4:o.end=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetNftInfosQuery"},e}(),t.TokenGetNftInfosResponse=function(){function e(e){if(this.nfts=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.tokenID=null,e.prototype.nfts=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.tokenID&&Object.hasOwnProperty.call(e,"tokenID")&&i.proto.TokenID.encode(e.tokenID,t.uint32(18).fork()).ldelim(),null!=e.nfts&&e.nfts.length)for(var r=0;r<e.nfts.length;++r)i.proto.TokenNftInfo.encode(e.nfts[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetNftInfosResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.tokenID=i.proto.TokenID.decode(e,e.uint32());break;case 3:o.nfts&&o.nfts.length||(o.nfts=[]),o.nfts.push(i.proto.TokenNftInfo.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetNftInfosResponse"},e}(),t.GetAccountDetailsQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountId=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetAccountDetailsQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetAccountDetailsQuery"},e}(),t.GetAccountDetailsResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountDetails=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountDetails&&Object.hasOwnProperty.call(e,"accountDetails")&&i.proto.GetAccountDetailsResponse.AccountDetails.encode(e.accountDetails,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetAccountDetailsResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.accountDetails=i.proto.GetAccountDetailsResponse.AccountDetails.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetAccountDetailsResponse"},e.AccountDetails=function(){function e(e){if(this.tokenRelationships=[],this.grantedCryptoAllowances=[],this.grantedNftAllowances=[],this.grantedTokenAllowances=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountId=null,e.prototype.contractAccountId="",e.prototype.deleted=!1,e.prototype.proxyAccountId=null,e.prototype.proxyReceived=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.key=null,e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.receiverSigRequired=!1,e.prototype.expirationTime=null,e.prototype.autoRenewPeriod=null,e.prototype.tokenRelationships=o.emptyArray,e.prototype.memo="",e.prototype.ownedNfts=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.maxAutomaticTokenAssociations=0,e.prototype.alias=o.newBuffer([]),e.prototype.ledgerId=o.newBuffer([]),e.prototype.grantedCryptoAllowances=o.emptyArray,e.prototype.grantedNftAllowances=o.emptyArray,e.prototype.grantedTokenAllowances=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(10).fork()).ldelim(),null!=e.contractAccountId&&Object.hasOwnProperty.call(e,"contractAccountId")&&t.uint32(18).string(e.contractAccountId),null!=e.deleted&&Object.hasOwnProperty.call(e,"deleted")&&t.uint32(24).bool(e.deleted),null!=e.proxyAccountId&&Object.hasOwnProperty.call(e,"proxyAccountId")&&i.proto.AccountID.encode(e.proxyAccountId,t.uint32(34).fork()).ldelim(),null!=e.proxyReceived&&Object.hasOwnProperty.call(e,"proxyReceived")&&t.uint32(40).int64(e.proxyReceived),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&i.proto.Key.encode(e.key,t.uint32(50).fork()).ldelim(),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(56).uint64(e.balance),null!=e.receiverSigRequired&&Object.hasOwnProperty.call(e,"receiverSigRequired")&&t.uint32(64).bool(e.receiverSigRequired),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(74).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(82).fork()).ldelim(),null!=e.tokenRelationships&&e.tokenRelationships.length)for(var r=0;r<e.tokenRelationships.length;++r)i.proto.TokenRelationship.encode(e.tokenRelationships[r],t.uint32(90).fork()).ldelim();if(null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(98).string(e.memo),null!=e.ownedNfts&&Object.hasOwnProperty.call(e,"ownedNfts")&&t.uint32(104).int64(e.ownedNfts),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&t.uint32(112).int32(e.maxAutomaticTokenAssociations),null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&t.uint32(122).bytes(e.alias),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(130).bytes(e.ledgerId),null!=e.grantedCryptoAllowances&&e.grantedCryptoAllowances.length)for(r=0;r<e.grantedCryptoAllowances.length;++r)i.proto.GrantedCryptoAllowance.encode(e.grantedCryptoAllowances[r],t.uint32(138).fork()).ldelim();if(null!=e.grantedNftAllowances&&e.grantedNftAllowances.length)for(r=0;r<e.grantedNftAllowances.length;++r)i.proto.GrantedNftAllowance.encode(e.grantedNftAllowances[r],t.uint32(146).fork()).ldelim();if(null!=e.grantedTokenAllowances&&e.grantedTokenAllowances.length)for(r=0;r<e.grantedTokenAllowances.length;++r)i.proto.GrantedTokenAllowance.encode(e.grantedTokenAllowances[r],t.uint32(154).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetAccountDetailsResponse.AccountDetails;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.contractAccountId=e.string();break;case 3:o.deleted=e.bool();break;case 4:o.proxyAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 5:o.proxyReceived=e.int64();break;case 6:o.key=i.proto.Key.decode(e,e.uint32());break;case 7:o.balance=e.uint64();break;case 8:o.receiverSigRequired=e.bool();break;case 9:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 10:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 11:o.tokenRelationships&&o.tokenRelationships.length||(o.tokenRelationships=[]),o.tokenRelationships.push(i.proto.TokenRelationship.decode(e,e.uint32()));break;case 12:o.memo=e.string();break;case 13:o.ownedNfts=e.int64();break;case 14:o.maxAutomaticTokenAssociations=e.int32();break;case 15:o.alias=e.bytes();break;case 16:o.ledgerId=e.bytes();break;case 17:o.grantedCryptoAllowances&&o.grantedCryptoAllowances.length||(o.grantedCryptoAllowances=[]),o.grantedCryptoAllowances.push(i.proto.GrantedCryptoAllowance.decode(e,e.uint32()));break;case 18:o.grantedNftAllowances&&o.grantedNftAllowances.length||(o.grantedNftAllowances=[]),o.grantedNftAllowances.push(i.proto.GrantedNftAllowance.decode(e,e.uint32()));break;case 19:o.grantedTokenAllowances&&o.grantedTokenAllowances.length||(o.grantedTokenAllowances=[]),o.grantedTokenAllowances.push(i.proto.GrantedTokenAllowance.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetAccountDetailsResponse.AccountDetails"},e}(),e}(),t.GrantedCryptoAllowance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.spender=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.spender&&Object.hasOwnProperty.call(e,"spender")&&i.proto.AccountID.encode(e.spender,t.uint32(10).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(16).int64(e.amount),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GrantedCryptoAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.spender=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.amount=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GrantedCryptoAllowance"},e}(),t.GrantedNftAllowance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.spender=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.spender&&Object.hasOwnProperty.call(e,"spender")&&i.proto.AccountID.encode(e.spender,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GrantedNftAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.spender=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GrantedNftAllowance"},e}(),t.GrantedTokenAllowance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.spender=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.spender&&Object.hasOwnProperty.call(e,"spender")&&i.proto.AccountID.encode(e.spender,t.uint32(18).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(24).int64(e.amount),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GrantedTokenAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.spender=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.amount=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GrantedTokenAllowance"},e}(),t.Response=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.getByKey=null,e.prototype.getBySolidityID=null,e.prototype.contractCallLocal=null,e.prototype.contractGetBytecodeResponse=null,e.prototype.contractGetInfo=null,e.prototype.contractGetRecordsResponse=null,e.prototype.cryptogetAccountBalance=null,e.prototype.cryptoGetAccountRecords=null,e.prototype.cryptoGetInfo=null,e.prototype.cryptoGetLiveHash=null,e.prototype.cryptoGetProxyStakers=null,e.prototype.fileGetContents=null,e.prototype.fileGetInfo=null,e.prototype.transactionGetReceipt=null,e.prototype.transactionGetRecord=null,e.prototype.transactionGetFastRecord=null,e.prototype.consensusGetTopicInfo=null,e.prototype.networkGetVersionInfo=null,e.prototype.tokenGetInfo=null,e.prototype.scheduleGetInfo=null,e.prototype.tokenGetAccountNftInfos=null,e.prototype.tokenGetNftInfo=null,e.prototype.tokenGetNftInfos=null,e.prototype.networkGetExecutionTime=null,e.prototype.accountDetails=null,Object.defineProperty(e.prototype,"response",{get:o.oneOfGetter(t=["getByKey","getBySolidityID","contractCallLocal","contractGetBytecodeResponse","contractGetInfo","contractGetRecordsResponse","cryptogetAccountBalance","cryptoGetAccountRecords","cryptoGetInfo","cryptoGetLiveHash","cryptoGetProxyStakers","fileGetContents","fileGetInfo","transactionGetReceipt","transactionGetRecord","transactionGetFastRecord","consensusGetTopicInfo","networkGetVersionInfo","tokenGetInfo","scheduleGetInfo","tokenGetAccountNftInfos","tokenGetNftInfo","tokenGetNftInfos","networkGetExecutionTime","accountDetails"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.getByKey&&Object.hasOwnProperty.call(e,"getByKey")&&i.proto.GetByKeyResponse.encode(e.getByKey,t.uint32(10).fork()).ldelim(),null!=e.getBySolidityID&&Object.hasOwnProperty.call(e,"getBySolidityID")&&i.proto.GetBySolidityIDResponse.encode(e.getBySolidityID,t.uint32(18).fork()).ldelim(),null!=e.contractCallLocal&&Object.hasOwnProperty.call(e,"contractCallLocal")&&i.proto.ContractCallLocalResponse.encode(e.contractCallLocal,t.uint32(26).fork()).ldelim(),null!=e.contractGetInfo&&Object.hasOwnProperty.call(e,"contractGetInfo")&&i.proto.ContractGetInfoResponse.encode(e.contractGetInfo,t.uint32(34).fork()).ldelim(),null!=e.contractGetBytecodeResponse&&Object.hasOwnProperty.call(e,"contractGetBytecodeResponse")&&i.proto.ContractGetBytecodeResponse.encode(e.contractGetBytecodeResponse,t.uint32(42).fork()).ldelim(),null!=e.contractGetRecordsResponse&&Object.hasOwnProperty.call(e,"contractGetRecordsResponse")&&i.proto.ContractGetRecordsResponse.encode(e.contractGetRecordsResponse,t.uint32(50).fork()).ldelim(),null!=e.cryptogetAccountBalance&&Object.hasOwnProperty.call(e,"cryptogetAccountBalance")&&i.proto.CryptoGetAccountBalanceResponse.encode(e.cryptogetAccountBalance,t.uint32(58).fork()).ldelim(),null!=e.cryptoGetAccountRecords&&Object.hasOwnProperty.call(e,"cryptoGetAccountRecords")&&i.proto.CryptoGetAccountRecordsResponse.encode(e.cryptoGetAccountRecords,t.uint32(66).fork()).ldelim(),null!=e.cryptoGetInfo&&Object.hasOwnProperty.call(e,"cryptoGetInfo")&&i.proto.CryptoGetInfoResponse.encode(e.cryptoGetInfo,t.uint32(74).fork()).ldelim(),null!=e.cryptoGetLiveHash&&Object.hasOwnProperty.call(e,"cryptoGetLiveHash")&&i.proto.CryptoGetLiveHashResponse.encode(e.cryptoGetLiveHash,t.uint32(82).fork()).ldelim(),null!=e.cryptoGetProxyStakers&&Object.hasOwnProperty.call(e,"cryptoGetProxyStakers")&&i.proto.CryptoGetStakersResponse.encode(e.cryptoGetProxyStakers,t.uint32(90).fork()).ldelim(),null!=e.fileGetContents&&Object.hasOwnProperty.call(e,"fileGetContents")&&i.proto.FileGetContentsResponse.encode(e.fileGetContents,t.uint32(98).fork()).ldelim(),null!=e.fileGetInfo&&Object.hasOwnProperty.call(e,"fileGetInfo")&&i.proto.FileGetInfoResponse.encode(e.fileGetInfo,t.uint32(106).fork()).ldelim(),null!=e.transactionGetReceipt&&Object.hasOwnProperty.call(e,"transactionGetReceipt")&&i.proto.TransactionGetReceiptResponse.encode(e.transactionGetReceipt,t.uint32(114).fork()).ldelim(),null!=e.transactionGetRecord&&Object.hasOwnProperty.call(e,"transactionGetRecord")&&i.proto.TransactionGetRecordResponse.encode(e.transactionGetRecord,t.uint32(122).fork()).ldelim(),null!=e.transactionGetFastRecord&&Object.hasOwnProperty.call(e,"transactionGetFastRecord")&&i.proto.TransactionGetFastRecordResponse.encode(e.transactionGetFastRecord,t.uint32(130).fork()).ldelim(),null!=e.consensusGetTopicInfo&&Object.hasOwnProperty.call(e,"consensusGetTopicInfo")&&i.proto.ConsensusGetTopicInfoResponse.encode(e.consensusGetTopicInfo,t.uint32(1202).fork()).ldelim(),null!=e.networkGetVersionInfo&&Object.hasOwnProperty.call(e,"networkGetVersionInfo")&&i.proto.NetworkGetVersionInfoResponse.encode(e.networkGetVersionInfo,t.uint32(1210).fork()).ldelim(),null!=e.tokenGetInfo&&Object.hasOwnProperty.call(e,"tokenGetInfo")&&i.proto.TokenGetInfoResponse.encode(e.tokenGetInfo,t.uint32(1218).fork()).ldelim(),null!=e.scheduleGetInfo&&Object.hasOwnProperty.call(e,"scheduleGetInfo")&&i.proto.ScheduleGetInfoResponse.encode(e.scheduleGetInfo,t.uint32(1226).fork()).ldelim(),null!=e.tokenGetAccountNftInfos&&Object.hasOwnProperty.call(e,"tokenGetAccountNftInfos")&&i.proto.TokenGetAccountNftInfosResponse.encode(e.tokenGetAccountNftInfos,t.uint32(1234).fork()).ldelim(),null!=e.tokenGetNftInfo&&Object.hasOwnProperty.call(e,"tokenGetNftInfo")&&i.proto.TokenGetNftInfoResponse.encode(e.tokenGetNftInfo,t.uint32(1242).fork()).ldelim(),null!=e.tokenGetNftInfos&&Object.hasOwnProperty.call(e,"tokenGetNftInfos")&&i.proto.TokenGetNftInfosResponse.encode(e.tokenGetNftInfos,t.uint32(1250).fork()).ldelim(),null!=e.networkGetExecutionTime&&Object.hasOwnProperty.call(e,"networkGetExecutionTime")&&i.proto.NetworkGetExecutionTimeResponse.encode(e.networkGetExecutionTime,t.uint32(1258).fork()).ldelim(),null!=e.accountDetails&&Object.hasOwnProperty.call(e,"accountDetails")&&i.proto.GetAccountDetailsResponse.encode(e.accountDetails,t.uint32(1266).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Response;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.getByKey=i.proto.GetByKeyResponse.decode(e,e.uint32());break;case 2:o.getBySolidityID=i.proto.GetBySolidityIDResponse.decode(e,e.uint32());break;case 3:o.contractCallLocal=i.proto.ContractCallLocalResponse.decode(e,e.uint32());break;case 5:o.contractGetBytecodeResponse=i.proto.ContractGetBytecodeResponse.decode(e,e.uint32());break;case 4:o.contractGetInfo=i.proto.ContractGetInfoResponse.decode(e,e.uint32());break;case 6:o.contractGetRecordsResponse=i.proto.ContractGetRecordsResponse.decode(e,e.uint32());break;case 7:o.cryptogetAccountBalance=i.proto.CryptoGetAccountBalanceResponse.decode(e,e.uint32());break;case 8:o.cryptoGetAccountRecords=i.proto.CryptoGetAccountRecordsResponse.decode(e,e.uint32());break;case 9:o.cryptoGetInfo=i.proto.CryptoGetInfoResponse.decode(e,e.uint32());break;case 10:o.cryptoGetLiveHash=i.proto.CryptoGetLiveHashResponse.decode(e,e.uint32());break;case 11:o.cryptoGetProxyStakers=i.proto.CryptoGetStakersResponse.decode(e,e.uint32());break;case 12:o.fileGetContents=i.proto.FileGetContentsResponse.decode(e,e.uint32());break;case 13:o.fileGetInfo=i.proto.FileGetInfoResponse.decode(e,e.uint32());break;case 14:o.transactionGetReceipt=i.proto.TransactionGetReceiptResponse.decode(e,e.uint32());break;case 15:o.transactionGetRecord=i.proto.TransactionGetRecordResponse.decode(e,e.uint32());break;case 16:o.transactionGetFastRecord=i.proto.TransactionGetFastRecordResponse.decode(e,e.uint32());break;case 150:o.consensusGetTopicInfo=i.proto.ConsensusGetTopicInfoResponse.decode(e,e.uint32());break;case 151:o.networkGetVersionInfo=i.proto.NetworkGetVersionInfoResponse.decode(e,e.uint32());break;case 152:o.tokenGetInfo=i.proto.TokenGetInfoResponse.decode(e,e.uint32());break;case 153:o.scheduleGetInfo=i.proto.ScheduleGetInfoResponse.decode(e,e.uint32());break;case 154:o.tokenGetAccountNftInfos=i.proto.TokenGetAccountNftInfosResponse.decode(e,e.uint32());break;case 155:o.tokenGetNftInfo=i.proto.TokenGetNftInfoResponse.decode(e,e.uint32());break;case 156:o.tokenGetNftInfos=i.proto.TokenGetNftInfosResponse.decode(e,e.uint32());break;case 157:o.networkGetExecutionTime=i.proto.NetworkGetExecutionTimeResponse.decode(e,e.uint32());break;case 158:o.accountDetails=i.proto.GetAccountDetailsResponse.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Response"},e}(),t.CryptoService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createAccount"}),Object.defineProperty(t.prototype.updateAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateAccount"}),Object.defineProperty(t.prototype.cryptoTransfer=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"cryptoTransfer"}),Object.defineProperty(t.prototype.cryptoDelete=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"cryptoDelete"}),Object.defineProperty(t.prototype.approveAllowances=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"approveAllowances"}),Object.defineProperty(t.prototype.deleteAllowances=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteAllowances"}),Object.defineProperty(t.prototype.addLiveHash=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"addLiveHash"}),Object.defineProperty(t.prototype.deleteLiveHash=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteLiveHash"}),Object.defineProperty(t.prototype.getLiveHash=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getLiveHash"}),Object.defineProperty(t.prototype.getAccountRecords=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getAccountRecords"}),Object.defineProperty(t.prototype.cryptoGetBalance=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"cryptoGetBalance"}),Object.defineProperty(t.prototype.getAccountInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getAccountInfo"}),Object.defineProperty(t.prototype.getTransactionReceipts=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getTransactionReceipts"}),Object.defineProperty(t.prototype.getTxRecordByTxID=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getTxRecordByTxID"}),t}(),t.FileService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createFile=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createFile"}),Object.defineProperty(t.prototype.updateFile=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateFile"}),Object.defineProperty(t.prototype.deleteFile=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteFile"}),Object.defineProperty(t.prototype.appendContent=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"appendContent"}),Object.defineProperty(t.prototype.getFileContent=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getFileContent"}),Object.defineProperty(t.prototype.getFileInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getFileInfo"}),Object.defineProperty(t.prototype.systemDelete=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"systemDelete"}),Object.defineProperty(t.prototype.systemUndelete=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"systemUndelete"}),t}(),t.FreezeService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.freeze=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"freeze"}),t}(),t.NetworkService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.getVersionInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getVersionInfo"}),Object.defineProperty(t.prototype.getAccountDetails=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getAccountDetails"}),Object.defineProperty(t.prototype.getExecutionTime=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getExecutionTime"}),Object.defineProperty(t.prototype.uncheckedSubmit=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"uncheckedSubmit"}),t}(),t.ScheduleService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createSchedule=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createSchedule"}),Object.defineProperty(t.prototype.signSchedule=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"signSchedule"}),Object.defineProperty(t.prototype.deleteSchedule=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteSchedule"}),Object.defineProperty(t.prototype.getScheduleInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getScheduleInfo"}),t}(),t.SmartContractService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createContract=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createContract"}),Object.defineProperty(t.prototype.updateContract=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateContract"}),Object.defineProperty(t.prototype.contractCallMethod=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"contractCallMethod"}),Object.defineProperty(t.prototype.contractCallLocalMethod=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"contractCallLocalMethod"}),Object.defineProperty(t.prototype.getContractInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getContractInfo"}),Object.defineProperty(t.prototype.contractGetBytecode=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"ContractGetBytecode"}),Object.defineProperty(t.prototype.getBySolidityID=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getBySolidityID"}),Object.defineProperty(t.prototype.getTxRecordByContractID=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getTxRecordByContractID"}),Object.defineProperty(t.prototype.deleteContract=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteContract"}),Object.defineProperty(t.prototype.systemDelete=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"systemDelete"}),Object.defineProperty(t.prototype.systemUndelete=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"systemUndelete"}),Object.defineProperty(t.prototype.callEthereum=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"callEthereum"}),t}(),t.ThrottleGroup=function(){function e(e){if(this.operations=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.operations=o.emptyArray,e.prototype.milliOpsPerSec=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.operations&&e.operations.length){t.uint32(10).fork();for(var r=0;r<e.operations.length;++r)t.int32(e.operations[r]);t.ldelim()}return null!=e.milliOpsPerSec&&Object.hasOwnProperty.call(e,"milliOpsPerSec")&&t.uint32(16).uint64(e.milliOpsPerSec),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ThrottleGroup;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:if(o.operations&&o.operations.length||(o.operations=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.operations.push(e.int32());else o.operations.push(e.int32());break;case 2:o.milliOpsPerSec=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ThrottleGroup"},e}(),t.ThrottleBucket=function(){function e(e){if(this.throttleGroups=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.name="",e.prototype.burstPeriodMs=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.throttleGroups=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.burstPeriodMs&&Object.hasOwnProperty.call(e,"burstPeriodMs")&&t.uint32(16).uint64(e.burstPeriodMs),null!=e.throttleGroups&&e.throttleGroups.length)for(var r=0;r<e.throttleGroups.length;++r)i.proto.ThrottleGroup.encode(e.throttleGroups[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ThrottleBucket;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.name=e.string();break;case 2:o.burstPeriodMs=e.uint64();break;case 3:o.throttleGroups&&o.throttleGroups.length||(o.throttleGroups=[]),o.throttleGroups.push(i.proto.ThrottleGroup.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ThrottleBucket"},e}(),t.ThrottleDefinitions=function(){function e(e){if(this.throttleBuckets=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.throttleBuckets=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.throttleBuckets&&e.throttleBuckets.length)for(var r=0;r<e.throttleBuckets.length;++r)i.proto.ThrottleBucket.encode(e.throttleBuckets[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ThrottleDefinitions;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.throttleBuckets&&o.throttleBuckets.length||(o.throttleBuckets=[]),o.throttleBuckets.push(i.proto.ThrottleBucket.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ThrottleDefinitions"},e}(),t.TokenService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createToken"}),Object.defineProperty(t.prototype.updateToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateToken"}),Object.defineProperty(t.prototype.mintToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"mintToken"}),Object.defineProperty(t.prototype.burnToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"burnToken"}),Object.defineProperty(t.prototype.deleteToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteToken"}),Object.defineProperty(t.prototype.wipeTokenAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"wipeTokenAccount"}),Object.defineProperty(t.prototype.freezeTokenAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"freezeTokenAccount"}),Object.defineProperty(t.prototype.unfreezeTokenAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"unfreezeTokenAccount"}),Object.defineProperty(t.prototype.grantKycToTokenAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"grantKycToTokenAccount"}),Object.defineProperty(t.prototype.revokeKycFromTokenAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"revokeKycFromTokenAccount"}),Object.defineProperty(t.prototype.associateTokens=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"associateTokens"}),Object.defineProperty(t.prototype.dissociateTokens=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"dissociateTokens"}),Object.defineProperty(t.prototype.updateTokenFeeSchedule=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateTokenFeeSchedule"}),Object.defineProperty(t.prototype.getTokenInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getTokenInfo"}),Object.defineProperty(t.prototype.getTokenNftInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getTokenNftInfo"}),Object.defineProperty(t.prototype.pauseToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"pauseToken"}),Object.defineProperty(t.prototype.unpauseToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"unpauseToken"}),Object.defineProperty(t.prototype.updateNfts=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateNfts"}),Object.defineProperty(t.prototype.rejectToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"rejectToken"}),Object.defineProperty(t.prototype.airdropTokens=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"airdropTokens"}),Object.defineProperty(t.prototype.cancelAirdrop=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"cancelAirdrop"}),Object.defineProperty(t.prototype.claimAirdrop=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"claimAirdrop"}),t}(),t.SignedTransaction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.bodyBytes=o.newBuffer([]),e.prototype.sigMap=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.bodyBytes&&Object.hasOwnProperty.call(e,"bodyBytes")&&t.uint32(10).bytes(e.bodyBytes),null!=e.sigMap&&Object.hasOwnProperty.call(e,"sigMap")&&i.proto.SignatureMap.encode(e.sigMap,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SignedTransaction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.bodyBytes=e.bytes();break;case 2:o.sigMap=i.proto.SignatureMap.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SignedTransaction"},e}(),t.UtilService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.prng=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"prng"}),t}(),t.TokenUnitBalance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(16).uint64(e.balance),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenUnitBalance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.balance=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenUnitBalance"},e}(),t.SingleAccountBalances=function(){function e(e){if(this.tokenUnitBalances=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountID=null,e.prototype.hbarBalance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.tokenUnitBalances=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(10).fork()).ldelim(),null!=e.hbarBalance&&Object.hasOwnProperty.call(e,"hbarBalance")&&t.uint32(16).uint64(e.hbarBalance),null!=e.tokenUnitBalances&&e.tokenUnitBalances.length)for(var r=0;r<e.tokenUnitBalances.length;++r)i.proto.TokenUnitBalance.encode(e.tokenUnitBalances[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SingleAccountBalances;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.hbarBalance=e.uint64();break;case 3:o.tokenUnitBalances&&o.tokenUnitBalances.length||(o.tokenUnitBalances=[]),o.tokenUnitBalances.push(i.proto.TokenUnitBalance.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SingleAccountBalances"},e}(),t.AllAccountBalances=function(){function e(e){if(this.allAccounts=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.consensusTimestamp=null,e.prototype.allAccounts=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.consensusTimestamp&&Object.hasOwnProperty.call(e,"consensusTimestamp")&&i.proto.Timestamp.encode(e.consensusTimestamp,t.uint32(10).fork()).ldelim(),null!=e.allAccounts&&e.allAccounts.length)for(var r=0;r<e.allAccounts.length;++r)i.proto.SingleAccountBalances.encode(e.allAccounts[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.AllAccountBalances;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.consensusTimestamp=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.allAccounts&&o.allAccounts.length||(o.allAccounts=[]),o.allAccounts.push(i.proto.SingleAccountBalances.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.AllAccountBalances"},e}(),t.ContractActions=function(){function e(e){if(this.contractActions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractActions=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.contractActions&&e.contractActions.length)for(var r=0;r<e.contractActions.length;++r)i.proto.ContractAction.encode(e.contractActions[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractActions;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.contractActions&&o.contractActions.length||(o.contractActions=[]),o.contractActions.push(i.proto.ContractAction.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractActions"},e}(),t.ContractActionType=function(){const e={},t=Object.create(e);return t[e[0]="NO_ACTION"]=0,t[e[1]="CALL"]=1,t[e[2]="CREATE"]=2,t[e[3]="PRECOMPILE"]=3,t[e[4]="SYSTEM"]=4,t}(),t.CallOperationType=function(){const e={},t=Object.create(e);return t[e[0]="OP_UNKNOWN"]=0,t[e[1]="OP_CALL"]=1,t[e[2]="OP_CALLCODE"]=2,t[e[3]="OP_DELEGATECALL"]=3,t[e[4]="OP_STATICCALL"]=4,t[e[5]="OP_CREATE"]=5,t[e[6]="OP_CREATE2"]=6,t}(),t.ContractAction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.callType=0,e.prototype.callingAccount=null,e.prototype.callingContract=null,e.prototype.gas=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.input=o.newBuffer([]),e.prototype.recipientAccount=null,e.prototype.recipientContract=null,e.prototype.targetedAddress=null,e.prototype.value=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.gasUsed=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.output=null,e.prototype.revertReason=null,e.prototype.error=null,e.prototype.callDepth=0,e.prototype.callOperationType=0,Object.defineProperty(e.prototype,"caller",{get:o.oneOfGetter(t=["callingAccount","callingContract"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"recipient",{get:o.oneOfGetter(t=["recipientAccount","recipientContract","targetedAddress"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"resultData",{get:o.oneOfGetter(t=["output","revertReason","error"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.callType&&Object.hasOwnProperty.call(e,"callType")&&t.uint32(8).int32(e.callType),null!=e.callingAccount&&Object.hasOwnProperty.call(e,"callingAccount")&&i.proto.AccountID.encode(e.callingAccount,t.uint32(18).fork()).ldelim(),null!=e.callingContract&&Object.hasOwnProperty.call(e,"callingContract")&&i.proto.ContractID.encode(e.callingContract,t.uint32(26).fork()).ldelim(),null!=e.gas&&Object.hasOwnProperty.call(e,"gas")&&t.uint32(32).int64(e.gas),null!=e.input&&Object.hasOwnProperty.call(e,"input")&&t.uint32(42).bytes(e.input),null!=e.recipientAccount&&Object.hasOwnProperty.call(e,"recipientAccount")&&i.proto.AccountID.encode(e.recipientAccount,t.uint32(50).fork()).ldelim(),null!=e.recipientContract&&Object.hasOwnProperty.call(e,"recipientContract")&&i.proto.ContractID.encode(e.recipientContract,t.uint32(58).fork()).ldelim(),null!=e.targetedAddress&&Object.hasOwnProperty.call(e,"targetedAddress")&&t.uint32(66).bytes(e.targetedAddress),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(72).int64(e.value),null!=e.gasUsed&&Object.hasOwnProperty.call(e,"gasUsed")&&t.uint32(80).int64(e.gasUsed),null!=e.output&&Object.hasOwnProperty.call(e,"output")&&t.uint32(90).bytes(e.output),null!=e.revertReason&&Object.hasOwnProperty.call(e,"revertReason")&&t.uint32(98).bytes(e.revertReason),null!=e.error&&Object.hasOwnProperty.call(e,"error")&&t.uint32(106).bytes(e.error),null!=e.callDepth&&Object.hasOwnProperty.call(e,"callDepth")&&t.uint32(112).int32(e.callDepth),null!=e.callOperationType&&Object.hasOwnProperty.call(e,"callOperationType")&&t.uint32(120).int32(e.callOperationType),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractAction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.callType=e.int32();break;case 2:o.callingAccount=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.callingContract=i.proto.ContractID.decode(e,e.uint32());break;case 4:o.gas=e.int64();break;case 5:o.input=e.bytes();break;case 6:o.recipientAccount=i.proto.AccountID.decode(e,e.uint32());break;case 7:o.recipientContract=i.proto.ContractID.decode(e,e.uint32());break;case 8:o.targetedAddress=e.bytes();break;case 9:o.value=e.int64();break;case 10:o.gasUsed=e.int64();break;case 11:o.output=e.bytes();break;case 12:o.revertReason=e.bytes();break;case 13:o.error=e.bytes();break;case 14:o.callDepth=e.int32();break;case 15:o.callOperationType=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractAction"},e}(),t.ContractBytecode=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractId=null,e.prototype.initcode=o.newBuffer([]),e.prototype.runtimeBytecode=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contractId&&Object.hasOwnProperty.call(e,"contractId")&&i.proto.ContractID.encode(e.contractId,t.uint32(10).fork()).ldelim(),null!=e.initcode&&Object.hasOwnProperty.call(e,"initcode")&&t.uint32(18).bytes(e.initcode),null!=e.runtimeBytecode&&Object.hasOwnProperty.call(e,"runtimeBytecode")&&t.uint32(26).bytes(e.runtimeBytecode),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractBytecode;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractId=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.initcode=e.bytes();break;case 3:o.runtimeBytecode=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractBytecode"},e}(),t.ContractStateChanges=function(){function e(e){if(this.contractStateChanges=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractStateChanges=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.contractStateChanges&&e.contractStateChanges.length)for(var r=0;r<e.contractStateChanges.length;++r)i.proto.ContractStateChange.encode(e.contractStateChanges[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractStateChanges;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.contractStateChanges&&o.contractStateChanges.length||(o.contractStateChanges=[]),o.contractStateChanges.push(i.proto.ContractStateChange.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractStateChanges"},e}(),t.ContractStateChange=function(){function e(e){if(this.storageChanges=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractId=null,e.prototype.storageChanges=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.contractId&&Object.hasOwnProperty.call(e,"contractId")&&i.proto.ContractID.encode(e.contractId,t.uint32(10).fork()).ldelim(),null!=e.storageChanges&&e.storageChanges.length)for(var r=0;r<e.storageChanges.length;++r)i.proto.StorageChange.encode(e.storageChanges[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractStateChange;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractId=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.storageChanges&&o.storageChanges.length||(o.storageChanges=[]),o.storageChanges.push(i.proto.StorageChange.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractStateChange"},e}(),t.StorageChange=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.slot=o.newBuffer([]),e.prototype.valueRead=o.newBuffer([]),e.prototype.valueWritten=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.slot&&Object.hasOwnProperty.call(e,"slot")&&t.uint32(10).bytes(e.slot),null!=e.valueRead&&Object.hasOwnProperty.call(e,"valueRead")&&t.uint32(18).bytes(e.valueRead),null!=e.valueWritten&&Object.hasOwnProperty.call(e,"valueWritten")&&i.google.protobuf.BytesValue.encode(e.valueWritten,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.StorageChange;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.slot=e.bytes();break;case 2:o.valueRead=e.bytes();break;case 3:o.valueWritten=i.google.protobuf.BytesValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.StorageChange"},e}(),t.HashAlgorithm=function(){const e={},t=Object.create(e);return t[e[0]="HASH_ALGORITHM_UNKNOWN"]=0,t[e[1]="SHA_384"]=1,t}(),t.HashObject=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.algorithm=0,e.prototype.length=0,e.prototype.hash=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.algorithm&&Object.hasOwnProperty.call(e,"algorithm")&&t.uint32(8).int32(e.algorithm),null!=e.length&&Object.hasOwnProperty.call(e,"length")&&t.uint32(16).int32(e.length),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(26).bytes(e.hash),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.HashObject;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.algorithm=e.int32();break;case 2:o.length=e.int32();break;case 3:o.hash=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.HashObject"},e}(),t.RecordStreamFile=function(){function e(e){if(this.recordStreamItems=[],this.sidecars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.hapiProtoVersion=null,e.prototype.startObjectRunningHash=null,e.prototype.recordStreamItems=o.emptyArray,e.prototype.endObjectRunningHash=null,e.prototype.blockNumber=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.sidecars=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.hapiProtoVersion&&Object.hasOwnProperty.call(e,"hapiProtoVersion")&&i.proto.SemanticVersion.encode(e.hapiProtoVersion,t.uint32(10).fork()).ldelim(),null!=e.startObjectRunningHash&&Object.hasOwnProperty.call(e,"startObjectRunningHash")&&i.proto.HashObject.encode(e.startObjectRunningHash,t.uint32(18).fork()).ldelim(),null!=e.recordStreamItems&&e.recordStreamItems.length)for(var r=0;r<e.recordStreamItems.length;++r)i.proto.RecordStreamItem.encode(e.recordStreamItems[r],t.uint32(26).fork()).ldelim();if(null!=e.endObjectRunningHash&&Object.hasOwnProperty.call(e,"endObjectRunningHash")&&i.proto.HashObject.encode(e.endObjectRunningHash,t.uint32(34).fork()).ldelim(),null!=e.blockNumber&&Object.hasOwnProperty.call(e,"blockNumber")&&t.uint32(40).int64(e.blockNumber),null!=e.sidecars&&e.sidecars.length)for(r=0;r<e.sidecars.length;++r)i.proto.SidecarMetadata.encode(e.sidecars[r],t.uint32(50).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.RecordStreamFile;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.hapiProtoVersion=i.proto.SemanticVersion.decode(e,e.uint32());break;case 2:o.startObjectRunningHash=i.proto.HashObject.decode(e,e.uint32());break;case 3:o.recordStreamItems&&o.recordStreamItems.length||(o.recordStreamItems=[]),o.recordStreamItems.push(i.proto.RecordStreamItem.decode(e,e.uint32()));break;case 4:o.endObjectRunningHash=i.proto.HashObject.decode(e,e.uint32());break;case 5:o.blockNumber=e.int64();break;case 6:o.sidecars&&o.sidecars.length||(o.sidecars=[]),o.sidecars.push(i.proto.SidecarMetadata.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.RecordStreamFile"},e}(),t.RecordStreamItem=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transaction=null,e.prototype.record=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&i.proto.Transaction.encode(e.transaction,t.uint32(10).fork()).ldelim(),null!=e.record&&Object.hasOwnProperty.call(e,"record")&&i.proto.TransactionRecord.encode(e.record,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.RecordStreamItem;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transaction=i.proto.Transaction.decode(e,e.uint32());break;case 2:o.record=i.proto.TransactionRecord.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.RecordStreamItem"},e}(),t.SidecarMetadata=function(){function e(e){if(this.types=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.hash=null,e.prototype.id=0,e.prototype.types=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&i.proto.HashObject.encode(e.hash,t.uint32(10).fork()).ldelim(),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(16).int32(e.id),null!=e.types&&e.types.length){t.uint32(26).fork();for(var r=0;r<e.types.length;++r)t.int32(e.types[r]);t.ldelim()}return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SidecarMetadata;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.hash=i.proto.HashObject.decode(e,e.uint32());break;case 2:o.id=e.int32();break;case 3:if(o.types&&o.types.length||(o.types=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.types.push(e.int32());else o.types.push(e.int32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SidecarMetadata"},e}(),t.SidecarType=function(){const e={},t=Object.create(e);return t[e[0]="SIDECAR_TYPE_UNKNOWN"]=0,t[e[1]="CONTRACT_STATE_CHANGE"]=1,t[e[2]="CONTRACT_ACTION"]=2,t[e[3]="CONTRACT_BYTECODE"]=3,t}(),t.SidecarFile=function(){function e(e){if(this.sidecarRecords=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.sidecarRecords=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.sidecarRecords&&e.sidecarRecords.length)for(var r=0;r<e.sidecarRecords.length;++r)i.proto.TransactionSidecarRecord.encode(e.sidecarRecords[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SidecarFile;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.sidecarRecords&&o.sidecarRecords.length||(o.sidecarRecords=[]),o.sidecarRecords.push(i.proto.TransactionSidecarRecord.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SidecarFile"},e}(),t.TransactionSidecarRecord=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.consensusTimestamp=null,e.prototype.migration=!1,e.prototype.stateChanges=null,e.prototype.actions=null,e.prototype.bytecode=null,Object.defineProperty(e.prototype,"sidecarRecords",{get:o.oneOfGetter(t=["stateChanges","actions","bytecode"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.consensusTimestamp&&Object.hasOwnProperty.call(e,"consensusTimestamp")&&i.proto.Timestamp.encode(e.consensusTimestamp,t.uint32(10).fork()).ldelim(),null!=e.migration&&Object.hasOwnProperty.call(e,"migration")&&t.uint32(16).bool(e.migration),null!=e.stateChanges&&Object.hasOwnProperty.call(e,"stateChanges")&&i.proto.ContractStateChanges.encode(e.stateChanges,t.uint32(26).fork()).ldelim(),null!=e.actions&&Object.hasOwnProperty.call(e,"actions")&&i.proto.ContractActions.encode(e.actions,t.uint32(34).fork()).ldelim(),null!=e.bytecode&&Object.hasOwnProperty.call(e,"bytecode")&&i.proto.ContractBytecode.encode(e.bytecode,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionSidecarRecord;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.consensusTimestamp=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.migration=e.bool();break;case 3:o.stateChanges=i.proto.ContractStateChanges.decode(e,e.uint32());break;case 4:o.actions=i.proto.ContractActions.decode(e,e.uint32());break;case 5:o.bytecode=i.proto.ContractBytecode.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionSidecarRecord"},e}(),t.SignatureFile=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileSignature=null,e.prototype.metadataSignature=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileSignature&&Object.hasOwnProperty.call(e,"fileSignature")&&i.proto.SignatureObject.encode(e.fileSignature,t.uint32(10).fork()).ldelim(),null!=e.metadataSignature&&Object.hasOwnProperty.call(e,"metadataSignature")&&i.proto.SignatureObject.encode(e.metadataSignature,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SignatureFile;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileSignature=i.proto.SignatureObject.decode(e,e.uint32());break;case 2:o.metadataSignature=i.proto.SignatureObject.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SignatureFile"},e}(),t.SignatureObject=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.type=0,e.prototype.length=0,e.prototype.checksum=0,e.prototype.signature=o.newBuffer([]),e.prototype.hashObject=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.length&&Object.hasOwnProperty.call(e,"length")&&t.uint32(16).int32(e.length),null!=e.checksum&&Object.hasOwnProperty.call(e,"checksum")&&t.uint32(24).int32(e.checksum),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(34).bytes(e.signature),null!=e.hashObject&&Object.hasOwnProperty.call(e,"hashObject")&&i.proto.HashObject.encode(e.hashObject,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SignatureObject;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.type=e.int32();break;case 2:o.length=e.int32();break;case 3:o.checksum=e.int32();break;case 4:o.signature=e.bytes();break;case 5:o.hashObject=i.proto.HashObject.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SignatureObject"},e}(),t.SignatureType=function(){const e={},t=Object.create(e);return t[e[0]="SIGNATURE_TYPE_UNKNOWN"]=0,t[e[1]="SHA_384_WITH_RSA"]=1,t}(),t})(),proto.google=i.google=(()=>{const e={};return e.protobuf=function(){const e={};return e.DoubleValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(9).double(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.DoubleValue;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.double();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.DoubleValue"},e}(),e.FloatValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.FloatValue;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.float();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.FloatValue"},e}(),e.Int64Value=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).int64(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.Int64Value;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.int64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.Int64Value"},e}(),e.UInt64Value=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).uint64(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.UInt64Value;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.uint64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.UInt64Value"},e}(),e.Int32Value=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).int32(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.Int32Value;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.int32();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.Int32Value"},e}(),e.UInt32Value=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).uint32(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.UInt32Value;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.uint32();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.UInt32Value"},e}(),e.BoolValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).bool(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.BoolValue;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.bool();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.BoolValue"},e}(),e.StringValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(10).string(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.StringValue;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.string();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.StringValue"},e}(),e.BytesValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(10).bytes(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.BytesValue;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.bytes();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.BytesValue"},e}(),e}(),e})(),proto}function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1,Object.defineProperty(lib,"__esModule",{value:!0}),lib.proto=lib.google=lib.com=lib.Writer=lib.Reader=void 0;var e,t,r=a(requireMinimal()),n=(e=requireUmd())&&e.__esModule?e:{default:e},o=a(requireProto());function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}function a(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}return null==(t=r.util).Long&&(console.log("Patching Protobuf Long.js instance..."),t.Long=n.default,null!=r.Reader._configure&&r.Reader._configure(r.BufferReader)),lib.Reader=r.Reader,lib.Writer=r.Writer,lib.proto=o.proto,lib.com=o.com,lib.google=o.google,lib}var libExports=requireLib();class HederaMirrorNode{constructor(e,t){this.network=e,this.baseUrl=this.getMirrorNodeUrl(),this.logger=t,this.isServerEnvironment="undefined"==typeof window}getMirrorNodeUrl(){return"mainnet"===this.network?"https://mainnet-public.mirrornode.hedera.com":"https://testnet.mirrornode.hedera.com"}getBaseUrl(){return this.baseUrl}async getPublicKey(e){this.logger.info(`Getting public key for account ${e}`);const t=await this.requestAccount(e);try{if(!t||!t.key)throw new Error(`Failed to retrieve public key for account ID: ${e}`);return i$8.fromString(t.key.key)}catch(r){throw new Error(`Error fetching public key from Mirror Node: ${r.message}`)}}async getAccountMemo(e){for(let r=0;r<3;r++)try{const t=`${this.baseUrl}/api/v1/accounts/${e}`,n=(await axios.get(t)).data;if(n&&n.memo)return n.memo;this.logger.error(`No memo found for account ${e}`),r<2&&await new Promise((e=>setTimeout(e,2e3)))}catch(t){this.logger.error(`Error getting account memo (attempt ${r+1}): ${t.message}`),r<2&&await new Promise((e=>setTimeout(e,2e3)))}return null}async getTopicInfo(e){try{const t=`${this.baseUrl}/api/v1/topics/${e}`;return(await axios.get(t)).data}catch(t){throw this.logger.error(`Error retrieving topic information: ${t.message}`),new Error(`Failed to retrieve topic information: ${t.message}`)}}async getTopicFees(e){try{return(await this.getTopicInfo(e)).custom_fees}catch(t){return this.logger.error(`Error retrieving topic fees: ${t.message}`),null}}async getHBARPrice(e){try{const t=s$a.fromDate(e).toString(),r=await fetch(`https://mainnet-public.mirrornode.hedera.com/api/v1/network/exchangerate?timestamp=${t}`),n=await r.json();return Number(n?.current_rate?.cent_equivalent)/Number(n?.current_rate?.hbar_equivalent)/100}catch(t){return null}}async getTokenInfo(e){this.logger.debug(`Fetching token info for ${e}`);try{const t=`${this.baseUrl}/api/v1/tokens/${e}`,r=await axios.get(t);return r.data?(this.logger.trace(`Token info found for ${e}:`,r.data),r.data):(this.logger.warn(`No token info found for ${e}`),null)}catch(t){return this.logger.error(`Error fetching token info for ${e}: ${t.message}`),null}}async getTopicMessages(e){this.logger.trace(`Querying messages for topic ${e}`);let t=`${this.baseUrl}/api/v1/topics/${e}/messages`;const r=[];for(;t;)try{const e=(await axios.get(t)).data;if(e.messages&&e.messages.length>0)for(const t of e.messages)try{if(!t.message)continue;let e,o;try{e=this.isServerEnvironment?Buffer.from(t.message,"base64").toString("utf-8"):(new TextDecoder).decode(Uint8Array.from(atob(t.message),(e=>e.charCodeAt(0))))}catch(n){this.logger.error(`Error decoding message: ${n}`);continue}try{o=JSON.parse(e)}catch(n){return void this.logger.error(`Invalid JSON message content: ${e}`)}o.sequence_number=t.sequence_number,r.push({...o,consensus_timestamp:t.consensus_timestamp,sequence_number:t.sequence_number,created:new Date(1e3*Number(t.consensus_timestamp))})}catch(n){this.logger.error(`Error processing message: ${n.message}`)}t=e.links?.next?`${this.baseUrl}${e.links.next}`:""}catch(n){throw this.logger.error(`Error querying topic messages: ${n.message}`),new Error(`Failed to query topic messages: ${n.message}`)}return r}async requestAccount(e){try{const t=`${this.baseUrl}/api/v1/accounts/${e}`,r=await axios.get(t);if(!r.data)throw new Error(`Failed to make request to mirror node for account: ${e}`);return r.data}catch(t){throw this.logger.error(`Failed to fetch account: ${t.message}`),new Error(`Failed to fetch account: ${t.message}`)}}async checkKeyListAccess(e,t){try{const r=libExports.proto.Key.decode(e);return this.evaluateKeyAccess(r,t)}catch(r){return this.logger.error(`Error decoding protobuf key: ${r instanceof Error?r.message:String(r)}`),!1}}async evaluateKeyAccess(e,t){return e.ed25519?this.compareEd25519Key(e.ed25519,t):e.keyList?this.evaluateKeyList(e.keyList,t):!(!e.thresholdKey||!e.thresholdKey.keys)&&this.evaluateKeyList(e.thresholdKey.keys,t)}async evaluateKeyList(e,t){const r=e.keys||[];for(const o of r)if(o)if(o.ed25519){if(this.compareEd25519Key(o.ed25519,t))return!0}else if(o.keyList||o.thresholdKey)try{const e=libExports.proto.Key.encode({...o.keyList?{keyList:o.keyList}:{},...o.thresholdKey?{thresholdKey:o.thresholdKey}:{}}).finish();if(await this.checkKeyListAccess(Buffer.from(e),t))return!0}catch(n){this.logger.debug(`Error in nested key: ${n instanceof Error?n.message:String(n)}`)}return!1}compareEd25519Key(e,t){try{return i$8.fromBytes(Buffer.from(e)).toString()===t.toString()}catch(r){return!1}}}var ProfileType=(e=>(e[e.PERSONAL=0]="PERSONAL",e[e.AI_AGENT=1]="AI_AGENT",e))(ProfileType||{}),AIAgentType=(e=>(e[e.MANUAL=0]="MANUAL",e[e.AUTONOMOUS=1]="AUTONOMOUS",e))(AIAgentType||{}),EndpointType=(e=>(e[e.REST=0]="REST",e[e.WEBSOCKET=1]="WEBSOCKET",e[e.GRPC=2]="GRPC",e))(EndpointType||{}),AIAgentCapability=(e=>(e[e.TEXT_GENERATION=0]="TEXT_GENERATION",e[e.IMAGE_GENERATION=1]="IMAGE_GENERATION",e[e.AUDIO_GENERATION=2]="AUDIO_GENERATION",e[e.VIDEO_GENERATION=3]="VIDEO_GENERATION",e[e.CODE_GENERATION=4]="CODE_GENERATION",e[e.LANGUAGE_TRANSLATION=5]="LANGUAGE_TRANSLATION",e[e.SUMMARIZATION_EXTRACTION=6]="SUMMARIZATION_EXTRACTION",e[e.KNOWLEDGE_RETRIEVAL=7]="KNOWLEDGE_RETRIEVAL",e[e.DATA_INTEGRATION=8]="DATA_INTEGRATION",e[e.MARKET_INTELLIGENCE=9]="MARKET_INTELLIGENCE",e[e.TRANSACTION_ANALYTICS=10]="TRANSACTION_ANALYTICS",e[e.SMART_CONTRACT_AUDIT=11]="SMART_CONTRACT_AUDIT",e[e.GOVERNANCE_FACILITATION=12]="GOVERNANCE_FACILITATION",e[e.SECURITY_MONITORING=13]="SECURITY_MONITORING",e[e.COMPLIANCE_ANALYSIS=14]="COMPLIANCE_ANALYSIS",e[e.FRAUD_DETECTION=15]="FRAUD_DETECTION",e[e.MULTI_AGENT_COORDINATION=16]="MULTI_AGENT_COORDINATION",e[e.API_INTEGRATION=17]="API_INTEGRATION",e[e.WORKFLOW_AUTOMATION=18]="WORKFLOW_AUTOMATION",e))(AIAgentCapability||{}),InboundTopicType=(e=>(e.PUBLIC="PUBLIC",e.CONTROLLED="CONTROLLED",e.FEE_BASED="FEE_BASED",e))(InboundTopicType||{});const SUPPORTED_SOCIAL_PLATFORMS=["twitter","github","discord","telegram","linkedin","youtube","website","x"],capabilityNameToCapabilityMap={text_generation:0,image_generation:1,audio_generation:2,video_generation:3,code_generation:4,language_translation:5,summarization:6,extraction:6,knowledge_retrieval:7,data_integration:8,data_visualization:8,market_intelligence:9,transaction_analytics:10,smart_contract_audit:11,governance:12,security_monitoring:13,compliance_analysis:14,fraud_detection:15,multi_agent:16,api_integration:17,workflow_automation:18},SocialLinkSchema=z.object({platform:z.string().min(1),handle:z.string().min(1)}),AIAgentDetailsSchema=z.object({type:z.nativeEnum(AIAgentType),capabilities:z.array(z.nativeEnum(AIAgentCapability)).min(1),model:z.string().min(1),creator:z.string().optional()}),BaseProfileSchema=z.object({version:z.string().min(1),type:z.nativeEnum(ProfileType),display_name:z.string().min(1),alias:z.string().optional(),bio:z.string().optional(),socials:z.array(SocialLinkSchema).optional(),profileImage:z.string().optional(),properties:z.record(z.any()).optional(),inboundTopicId:z.string().optional(),outboundTopicId:z.string().optional()}),PersonalProfileSchema=BaseProfileSchema.extend({type:z.literal(ProfileType.PERSONAL),language:z.string().optional(),timezone:z.string().optional()}),AIAgentProfileSchema=BaseProfileSchema.extend({type:z.literal(ProfileType.AI_AGENT),aiAgent:AIAgentDetailsSchema}),HCS11ProfileSchema=z.union([PersonalProfileSchema,AIAgentProfileSchema]);class HCS11Client{constructor(e){if(this.client="mainnet"===e.network?i$1.forMainnet():i$1.forTestnet(),this.auth=e.auth,this.network=e.network,this.mirrorNode=new HederaMirrorNode(this.network,this.logger),this.auth.privateKey){const e=y.fromString(this.auth.privateKey);this.client.setOperator(this.auth.operatorId,e)}this.logger=Logger$2.getInstance({level:e.logLevel||"info",module:"HCS-11"})}getClient(){return this.client}getOperatorId(){return this.auth.operatorId}createPersonalProfile(e,t){return{version:"1.0",type:ProfileType.PERSONAL,display_name:e,alias:t?.alias,bio:t?.bio,socials:t?.socials,profileImage:t?.profileImage,properties:t?.properties,inboundTopicId:t?.inboundTopicId,outboundTopicId:t?.outboundTopicId}}createAIAgentProfile(e,t,r,n,o){const i=this.validateProfile({version:"1.0",type:ProfileType.AI_AGENT,display_name:e,alias:o?.alias,bio:o?.bio,socials:o?.socials,profileImage:o?.profileImage,properties:o?.properties,inboundTopicId:o?.inboundTopicId,outboundTopicId:o?.outboundTopicId,aiAgent:{type:t,capabilities:r,model:n,creator:o?.creator}});if(!i.valid)throw new Error(`Invalid AI Agent Profile: ${i.errors.join(", ")}`);return{version:"1.0",type:ProfileType.AI_AGENT,display_name:e,alias:o?.alias,bio:o?.bio,socials:o?.socials,profileImage:o?.profileImage,properties:o?.properties,inboundTopicId:o?.inboundTopicId,outboundTopicId:o?.outboundTopicId,aiAgent:{type:t,capabilities:r,model:n,creator:o?.creator}}}validateProfile(e){const t=HCS11ProfileSchema.safeParse(e);if(t.success)return{valid:!0,errors:[]};return{valid:!1,errors:t.error.errors.map((e=>{const t=e.path.join(".");let r=e.message;if("invalid_type"===e.code)r=`Expected ${e.expected}, got ${e.received}`;else if("invalid_enum_value"===e.code){const t=e.options?.join(", ");r=`Invalid value. Valid options are: ${t}`}else"too_small"===e.code&&"string"===e.type&&(r="Cannot be empty");return`${t}: ${r}`}))}}profileToJSONString(e){return JSON.stringify(e)}parseProfileFromString(e){try{const t=JSON.parse(e),r=this.validateProfile(t);return r.valid?t:(this.logger.error("Invalid profile format:",r.errors),null)}catch(t){return this.logger.error("Error parsing profile:"),null}}setProfileForAccountMemo(e,t=1){return`hcs-11:hcs://${t}/${e}`}async executeTransaction(e){try{if(this.auth.privateKey){const t=await e.signWithOperator(this.client),r=await t.execute(this.client),n=await r.getReceipt(this.client);return n.status.toString()!==e$6.Success.toString()?{success:!1,error:`Transaction failed: ${n.status.toString()}`}:{success:!0,result:n}}if(!this.auth.signer)throw new Error("No valid authentication method provided");const t=this.auth.signer,r=await e.freezeWithSigner(t),n=await r.executeWithSigner(t),o=await n.getReceiptWithSigner(t);return o.status.toString()!==e$6.Success.toString()?{success:!1,error:`Transaction failed: ${o.status.toString()}: ${e$6.Success.toString()}`}:{success:!0,result:o}}catch(t){return{success:!1,error:t instanceof Error?t.message:"Unknown error during transaction execution"}}}async inscribeImage(e,t,r){try{const n=r?.progressCallback,o=new ProgressReporter({module:"HCS11-Image",logger:this.logger,callback:n});o.preparing("Preparing to inscribe image",0);const i=mimeTypesExports.lookup(t)||"application/octet-stream",a=r?.waitForConfirmation??!0;let s;if(this.auth.signer){if(!("accountId"in this.auth.signer))throw o.failed("Signer must be a DAppSigner for inscription"),new Error("Signer must be a DAppSigner for inscription");o.preparing("Using signer for inscription",10),s=await inscribeWithSigner({type:"buffer",buffer:e,fileName:t,mimeType:i},this.auth.signer,{network:this.network,waitForConfirmation:a,waitMaxAttempts:150,waitIntervalMs:4e3,logging:{level:"debug"},progressCallback:e=>{const t=10+.8*(e.progressPercent||0);o.report({stage:e.stage,message:e.message,progressPercent:t,details:e.details})}})}else{if(!this.auth.privateKey)throw o.failed("Private key is required for inscription"),this.logger.error("Private key is required for inscription"),new Error("Private key is required for inscription");o.preparing("Using private key for inscription",10),s=await inscribe({type:"buffer",buffer:e,fileName:t,mimeType:i},{accountId:this.auth.operatorId,privateKey:this.auth.privateKey,network:this.network},{waitForConfirmation:a,waitMaxAttempts:150,waitIntervalMs:2e3,logging:{level:"debug"},progressCallback:e=>{const t=10+.8*(e.progressPercent||0);o.report({stage:e.stage,message:e.message,progressPercent:t,details:e.details})}})}return s.confirmed?(o.completed("Image inscription completed",{topic_id:s.inscription.topic_id}),{imageTopicId:s.inscription.topic_id||"",transactionId:s.result.jobId,success:!0}):(o.verifying("Waiting for inscription confirmation",50,{jobId:s.result.jobId}),{imageTopicId:"",transactionId:s.result.jobId,success:!1,error:"Inscription not confirmed"})}catch(n){return this.logger.error("Error inscribing image:",n),{imageTopicId:"",transactionId:"",success:!1,error:n.message||"Error inscribing image"}}}async inscribeProfile(e,t){this.logger.info("Inscribing HCS-11 profile");const r=t?.progressCallback,n=new ProgressReporter({module:"HCS11-Profile",logger:this.logger,callback:r});n.preparing("Validating profile data",5);const o=this.validateProfile(e);if(!o.valid)return n.failed(`Invalid profile: ${o.errors.join(", ")}`),{profileTopicId:"",transactionId:"",success:!1,error:`Invalid profile: ${o.errors.join(", ")}`};n.preparing("Formatting profile for inscription",15);const i=this.profileToJSONString(e),a=`profile-${e.display_name.toLowerCase().replace(/\s+/g,"-")}.json`;try{const e=Buffer.from(i,"utf-8"),t="application/json";n.preparing("Preparing profile for inscription",20);const r={type:"buffer",buffer:e,fileName:a,mimeType:t},o={waitForConfirmation:!0,mode:"file",network:this.network,waitMaxAttempts:100,waitIntervalMs:2e3,progressCallback:e=>{const t=20+.75*Number(e?.progressPercent||0);n?.report({stage:e.stage,message:e.message,progressPercent:t,details:e.details})}};n.submitting("Submitting profile to Hedera network",30);const s=this.auth.privateKey?await inscribe(r,{accountId:this.auth.operatorId,privateKey:this.auth.privateKey,network:this.network},o):await inscribeWithSigner(r,this.auth.signer,o);if(!s.confirmed||!s.inscription.topic_id)return n.failed("Failed to inscribe profile content"),{profileTopicId:"",transactionId:"",success:!1,error:"Failed to inscribe profile content"};const c=s.inscription.topic_id;return n.completed("Profile inscription completed",{topicId:c,transactionId:s.result.transactionId}),{profileTopicId:c,transactionId:s.result.transactionId,success:!0}}catch(s){return n.failed(`Error inscribing profile: ${s.message||"Unknown error"}`),{profileTopicId:"",transactionId:"",success:!1,error:s.message||"Unknown error during inscription"}}}async updateAccountMemoWithProfile(e,t){try{this.logger.info(`Updating account memo for ${e} with profile ${t}`);const r=this.setProfileForAccountMemo(t),n=(new s$4).setAccountMemo(r).setAccountId(e);return this.executeTransaction(n)}catch(r){return this.logger.error(`Error updating account memo: ${r instanceof Error?r.message:"Unknown error"}`),{success:!1,error:r instanceof Error?r.message:"Unknown error updating account memo"}}}async createAndInscribeProfile(e,t=!0,r){const n=r?.progressCallback,o=new ProgressReporter({module:"HCS11-ProfileCreation",logger:this.logger,callback:n});o.preparing("Starting profile creation process",0);const i=o.createSubProgress({minPercent:0,maxPercent:80,logPrefix:"Inscription"}),a=await this.inscribeProfile(e,{...r,progressCallback:e=>{i.report({stage:e.stage,message:e.message,progressPercent:e.progressPercent,details:e.details})}});if(!a?.success)return o.failed("Profile inscription failed",{error:a?.error}),a;if(o.confirming("Profile inscribed, updating account memo",85),t){const e=await this.updateAccountMemoWithProfile(this.auth.operatorId,a.profileTopicId);if(!e.success)return o.failed("Failed to update account memo",{error:e?.error}),{...a,success:!1,error:e?.error}}return o.completed("Profile creation completed successfully",{profileTopicId:a.profileTopicId,transactionId:a.transactionId}),a}async getCapabilitiesFromTags(e){const t=[];if(0===e.length)return[AIAgentCapability.TEXT_GENERATION];for(const r of e){const e=capabilityNameToCapabilityMap[r.toLowerCase()];void 0===e||t.includes(e)||t.push(e)}return 0===t.length&&t.push(AIAgentCapability.TEXT_GENERATION),t}getAgentTypeFromMetadata(e){return"autonomous"===e.type?AIAgentType.AUTONOMOUS:AIAgentType.MANUAL}async fetchProfileByAccountId(e,t){try{this.logger.info(`Fetching profile for account ${e.toString()} on ${this.network}`);const n=await this.mirrorNode.getAccountMemo(e.toString());if(this.logger.info(`Got account memo: ${n}`),!n?.startsWith("hcs-11:"))return{success:!1,error:`Account ${e.toString()} does not have a valid HCS-11 memo`};this.logger.info(`Found HCS-11 memo: ${n}`);const o=n.substring(7);if(!o?.startsWith("hcs://")){if(o.startsWith("ipfs://")){this.logger.warn("IPFS protocol references are not fully supported");const e=await fetch(`https://ipfs.io/ipfs/${o.replace("ipfs://","")}`),t=await e.json();return{success:!0,profile:t,topicInfo:{inboundTopic:t.inboundTopicId,outboundTopic:t.outboundTopicId,profileTopicId:t.profileTopicId}}}if(o.startsWith("ar://")){const e=o.replace("ar://",""),t=await fetch(`https://arweave.net/${e}`);if(!t.ok)return{success:!1,error:`Failed to fetch profile from Arweave ${e}: ${t.statusText}`};const r=await t.json();return{success:!0,profile:r,topicInfo:{inboundTopic:r.inboundTopicId,outboundTopic:r.outboundTopicId,profileTopicId:r.profileTopicId}}}return{success:!1,error:`Invalid protocol reference format: ${o}`}}{const e=o.match(/hcs:\/\/(\d+)\/(.+)/);if(!e)return{success:!1,error:`Invalid HCS protocol reference format: ${o}`};const[n,i,a]=e,s=t||this.network||"mainnet";this.logger.info(`Retrieving profile from Kiloscribe CDN: ${a}`);const c=`https://kiloscribe.com/api/inscription-cdn/${a}?network=${s}`;try{const e=await fetch(c);if(!e.ok)return{success:!1,error:`Failed to fetch profile from Kiloscribe CDN: ${e.statusText}`};const t=await e.json();return t?{success:!0,profile:t,topicInfo:{inboundTopic:t.inboundTopicId,outboundTopic:t.outboundTopicId,profileTopicId:a}}:{success:!1,error:`No profile data found for topic ${a}`}}catch(r){return this.logger.error(`Error retrieving from Kiloscribe CDN: ${r.message}`),{success:!1,error:`Error retrieving from Kiloscribe CDN: ${r.message}`}}}}catch(n){return this.logger.error(`Error fetching profile: ${n.message}`),{success:!1,error:`Error fetching profile: ${n.message}`}}}}const sleep=e=>new Promise((t=>setTimeout(t,e)));class Registration{async checkRegistrationStatus(e,t,r,n){try{const o=await fetch(`${r}/api/request-confirm`,{method:"POST",headers:{"Content-Type":"application/json","X-Network":t},body:JSON.stringify({transaction_id:e})});if(!o.ok){const e=`Failed to confirm registration: ${o.statusText}`;throw n&&n.error(e),new Error(e)}return await o.json()}catch(o){throw n&&n.error(`Error checking registration status: ${o.message}`),o}}async waitForRegistrationConfirmation(e,t,r,n=60,o=2e3,i){let a=0;for(;a<n;){i&&i.info(`Checking registration status. Attempt ${a+1}/${n}`);const s=await this.checkRegistrationStatus(e,t,r,i);if("success"===s.status)return i&&i.info("Registration confirmed successfully"),!0;if("failed"===s.status)throw i&&i.error("Registration confirmation failed"),new Error("Registration confirmation failed");i&&i.info(`Registration still pending. Waiting ${o}ms before next attempt`),await new Promise((e=>setTimeout(e,o))),a++}return i&&i.warn(`Registration not confirmed after ${n} attempts`),!1}async executeRegistration(e,t="mainnet",r="https://moonscape.tech",n){try{n&&n.info("Registering agent with guarded registry");try{const r=new HCS11Client({network:t,auth:{operatorId:"0.0.0"}});n?.info(`Fetching profile by account ID ${e} on ${t}`),await sleep(5e3);const o=await r.fetchProfileByAccountId(e,t);if(n?.info("Profile fetched",o),o?.error)return n?.error("Error fetching profile",o.error),{error:o.error,success:!1};if(!o?.success||!o?.profile)return n&&n.error("Profile not found for agent registration"),{error:"Profile not found for the provided account ID",success:!1};if(!o.profile.inboundTopicId)return n&&n.error("Missing inbound topic ID in profile"),{error:"Profile is missing required inbound topic ID",success:!1};if(!o.profile.outboundTopicId)return n&&n.error("Missing outbound topic ID in profile"),{error:"Profile is missing required outbound topic ID",success:!1};n&&n.info(`Profile validation successful. Inbound topic: ${o.profile.inboundTopicId}, Outbound topic: ${o.profile.outboundTopicId}`)}catch(o){return n&&n.error(`Error validating profile: ${o.message}`),{error:`Error validating profile: ${o.message}`,success:!1}}const i=await fetch(`${r}/api/request-register`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"*/*","Accept-Language":"en;q=0.5",Origin:r,Referer:`${r}/`,"X-Network":t},body:JSON.stringify({accountId:e})}),a=await i.json();return i.ok?(n&&n.info(`Created new registration request. Transaction ID: ${a.transaction_id}`),{transactionId:a.transaction_id,transaction:a.transaction,success:!0}):a.details?.length>0?{validationErrors:a.details,error:a.error||"Validation failed",success:!1}:{error:a.error||"Failed to register agent",success:!1}}catch(i){return{error:`Error during registration request: ${i.message}`,success:!1}}}async findRegistrations(e={},t="https://moonscape.tech"){try{const r=new URLSearchParams;e.tags?.forEach((e=>r.append("tags",e))),e.accountId&&r.append("accountId",e.accountId),e.network&&r.append("network",e.network);const n=await fetch(`${t}/api/registrations?${r}`,{headers:{Accept:"*/*","Accept-Language":"en;q=0.5",Origin:t,Referer:`${t}/`}});if(!n.ok){return{registrations:[],error:await n.text()||"Failed to fetch registrations",success:!1}}const o=await n.json();return o.error?{registrations:[],error:o.error,success:!1}:{registrations:o.registrations||[],success:!0}}catch(r){return{registrations:[],error:`Error fetching registrations: ${r.message}`,success:!1}}}}var Hcs10MemoType=(e=>(e.INBOUND="inbound",e.OUTBOUND="outbound",e.CONNECTION="connection",e))(Hcs10MemoType||{});class HCS10BaseClient extends Registration{constructor(e){super(),this.network=e.network,this.logger=Logger$2.getInstance({level:e.logLevel||"info",module:"HCS10-BaseClient",prettyPrint:e.prettyPrint}),this.mirrorNode=new HederaMirrorNode(e.network,this.logger),this.feeAmount=e.feeAmount||.001}extractTopicFromOperatorId(e){if(!e)return"";const t=e.split("@");return t.length>0?t[0]:""}extractAccountFromOperatorId(e){if(!e)return"";const t=e.split("@");return t.length>1?t[1]:""}async getMessageStream(e){try{const t=await this.mirrorNode.getTopicMessages(e),r=["message","close_connection"];return{messages:t.filter((e=>{if("hcs-10"!==e.p||!r.includes(e.op))return!1;if("message"===e.op){if(!e.data)return!1;if(!e.operator_id)return!1;if(!this.isValidOperatorId(e.operator_id))return!1}if("close_connection"===e.op){if(!e.operator_id)return!1;if(!this.isValidOperatorId(e.operator_id))return!1}return!0}))}}catch(t){return this.logger&&this.logger.error(`Error fetching messages: ${t.message}`),{messages:[]}}}async getPublicTopicInfo(e){try{return await this.mirrorNode.getTopicInfo(e)}catch(t){return this.logger.error(`Error getting public topic info for ${e}:`,t),null}}async canSubmitToTopic(e,t){try{const n=await this.mirrorNode.getTopicInfo(e);if(!n)return{canSubmit:!1,requiresFee:!1,reason:"Topic does not exist"};if(!n.submit_key?.key)return{canSubmit:!0,requiresFee:!1};try{const e=await this.mirrorNode.getPublicKey(t);if("ProtobufEncoded"===n.submit_key._type){const t=Buffer.from(n.submit_key.key,"hex");if(await this.mirrorNode.checkKeyListAccess(t,e))return{canSubmit:!0,requiresFee:!1}}else{const t=i$8.fromString(n.submit_key.key);if(e.toString()===t.toString())return{canSubmit:!0,requiresFee:!1}}}catch(r){this.logger.error(`Key validation error: ${r instanceof Error?r.message:String(r)}`)}return n.fee_schedule_key?.key&&n.custom_fees?.fixed_fees?.length>0?{canSubmit:!0,requiresFee:!0,reason:"Requires fee payment via HIP-991"}:{canSubmit:!1,requiresFee:!1,reason:"User does not have submit permission for this topic"}}catch(r){const e=r instanceof Error?r.message:String(r);return this.logger.error(`Topic submission validation error: ${e}`),{canSubmit:!1,requiresFee:!1,reason:`Error: ${e}`}}}async getMessages(e){try{const t=await this.mirrorNode.getTopicMessages(e);return{messages:t.filter((e=>{if("hcs-10"!==e.p)return!1;if("message"===e.op){if(!e.data)return!1;if(e.operator_id&&!this.isValidOperatorId(e.operator_id))return!1}return!0}))}}catch(t){return this.logger&&this.logger.error(`Error fetching messages: ${t.message}`),{messages:[]}}}async requestAccount(e){try{return await this.mirrorNode.requestAccount(e)}catch(t){throw this.logger.error("Failed to fetch account",t),t}}async getAccountMemo(e){return await this.mirrorNode.getAccountMemo(e)}async retrieveProfile(e,t){this.logger.debug(`Retrieving profile for account: ${e}`);const r=`${e}-${this.network}`;if(!t){const t=HCS10Cache.getInstance().get(r);if(t)return this.logger.debug(`Cache hit for profile: ${e}`),t}try{const t=new HCS11Client({network:this.network,auth:{operatorId:"0.0.0"},logLevel:"info"}),n=await t.fetchProfileByAccountId(e,this.network);if(!n?.success)return this.logger.error(`Failed to retrieve profile for account ID: ${e}`,n?.error),{profile:null,success:!1,error:n?.error||`Failed to retrieve profile for account ID: ${e}`};const o=n.profile;let i=null;n.topicInfo?.inboundTopic&&n.topicInfo?.outboundTopic&&n.topicInfo?.profileTopicId&&(i={inboundTopic:n.topicInfo.inboundTopic,outboundTopic:n.topicInfo.outboundTopic,profileTopicId:n.topicInfo.profileTopicId});const a={profile:o,topicInfo:i,success:!0};return HCS10Cache.getInstance().set(r,a),a}catch(n){return this.logger.error("Failed to retrieve profile:",n),{profile:null,success:!1,error:n instanceof Error?n.message:String(n)}}}async retrieveOutboundConnectTopic(e){return await this.retrieveCommunicationTopics(e,!0)}async retrieveCommunicationTopics(e,t){this.logger.info(`Retrieving topics for account: ${e}`),this.network;try{const r=await this.retrieveProfile(e,t);if(!r?.success)throw new Error(r.error||"Failed to retrieve profile");const n=r.profile;if(!n.inboundTopicId||!n.outboundTopicId)throw new Error("Invalid HCS-11 profile for HCS-10 agent: missing inboundTopicId or outboundTopicId");if(!r.topicInfo)throw new Error(`TopicInfo is missing in the profile for account ${e}`);return r.topicInfo}catch(r){throw this.logger.error("Failed to retrieve topic info:",r),r}}async retrieveOutboundMessages(e){try{const t=await this.retrieveCommunicationTopics(e);if(!t)return this.logger.warn(`No outbound connect topic found for agentAccountId: ${e}`),[];return(await this.getMessages(t.outboundTopic)).messages.filter((e=>"hcs-10"===e.p&&("connection_request"===e.op||"connection_created"===e.op||"message"===e.op)))}catch(t){return this.logger.error("Failed to retrieve outbound messages:",t),[]}}async hasConnectionCreated(e,t){try{const r=await this.retrieveCommunicationTopics(e);return(await this.retrieveOutboundMessages(r.outboundTopic)).some((e=>"connection_created"===e.op&&e.connection_id===t))}catch(r){return this.logger.error("Failed to check connection created:",r),!1}}async getMessageContent(e){const t=e.match(/^hcs:\/\/(\d+)\/([0-9.]+)$/);if(!t)return e;const[r,n,o]=t;this.logger.info(`Resolving HRL reference: standard=${n}, topicId=${o}`);try{const e=`https://kiloscribe.com/api/inscription-cdn/${o}?network=${this.network}`,t=await axios.get(e);if(!t.data)throw new Error(`Failed to fetch content from topic: ${o}`);return t.data.content||t.data.text||JSON.stringify(t.data)}catch(i){throw this.logger.error(`Error resolving HRL reference: ${i instanceof Error?i.message:"Unknown error"}`),new Error(`Failed to resolve HRL reference: ${i instanceof Error?i.message:"Unknown error"}`)}}async submitConnectionRequest(e,t){const r=this.getAccountAndSigner();if(!r?.accountId)throw new Error("Operator account ID is not set");const n=await this.getOperatorId(),o=r.accountId,i=await this.canSubmitToTopic(e,o);if(!i?.canSubmit)throw new Error(`Cannot submit to topic: ${i.reason}`);const a=await this.retrieveInboundAccountId(e);if(!a)throw new Error("Failed to retrieve topic info account ID");const s={p:"hcs-10",op:"connection_request",operator_id:n,m:t},c=i.requiresFee,u=await this.submitPayload(e,s,void 0,c);this.logger.info(`Submitted connection request to topic ID: ${e}`);const l=await this.retrieveCommunicationTopics(o);if(!l)throw new Error("Failed to retrieve outbound topic");const d=u.topicSequenceNumber?.toNumber();if(!d)throw new Error("Failed to get response sequence number");const p=`${e}@${a}`;return await this.submitPayload(l.outboundTopic,{...s,outbound_topic_id:l.outboundTopic,connection_request_id:d,operator_id:p}),u}async recordOutboundConnectionConfirmation({outboundTopicId:e,requestorOutboundTopicId:t,connectionRequestId:r,confirmedRequestId:n,connectionTopicId:o,operatorId:i,memo:a}){const s={p:"hcs-10",op:"connection_created",connection_topic_id:o,outbound_topic_id:e,requestor_outbound_topic_id:t,confirmed_request_id:n,connection_request_id:r,operator_id:i,m:a};return await this.submitPayload(e,s)}async waitForConnectionConfirmation(e,t,r=60,n=2e3,o=!0){this.logger.info(`Waiting for connection confirmation on inbound topic ${e} for request ID ${t}`);for(let i=0;i<r;i++){this.logger.info(`Attempt ${i+1}/${r} to find connection confirmation`);const a=(await this.mirrorNode.getTopicMessages(e)).filter((e=>"connection_created"===e.op));if(this.logger.info(`Found ${a.length} connection_created messages`),a.length>0)for(const e of a)if(Number(e.connection_id)===Number(t)){const r={connectionTopicId:e.connection_topic_id,sequence_number:Number(e.sequence_number),confirmedBy:e.operator_id,memo:e.m},n=this.extractAccountFromOperatorId(r.confirmedBy),i=this.getAccountAndSigner(),a=await this.retrieveCommunicationTopics(n),s=await this.retrieveCommunicationTopics(i.accountId);return this.logger.info("Connection confirmation found",r),o&&await this.recordOutboundConnectionConfirmation({requestorOutboundTopicId:a.outboundTopic,outboundTopicId:s.outboundTopic,connectionRequestId:t,confirmedRequestId:r.sequence_number,connectionTopicId:r.connectionTopicId,operatorId:r.confirmedBy,memo:r.memo||"Connection confirmed"}),r}i<r-1&&(this.logger.info(`No matching confirmation found, waiting ${n}ms before retrying...`),await new Promise((e=>setTimeout(e,n))))}throw new Error(`Connection confirmation not found after ${r} attempts for request ID ${t}`)}async getOperatorId(e){if(this.operatorId&&!e)return this.operatorId;const t=this.getAccountAndSigner();if(!t.accountId)throw new Error("Operator ID not found");const r=await this.retrieveProfile(t.accountId);if(!r.success)throw new Error("Failed to retrieve profile");const n=`${r.topicInfo?.inboundTopic}@${t.accountId}`;return this.operatorId=n,n}async retrieveInboundAccountId(e){const t=await this.mirrorNode.getTopicInfo(e);if(!t?.memo)throw new Error("Failed to retrieve topic info");const r=t.memo.toString().split(":"),n=r?.[4];if(!n)throw new Error("Failed to retrieve topic info account ID");return n}clearCache(){HCS10Cache.getInstance().clear()}_generateHcs10Memo(e,t){const r=t.ttl??60;switch(e){case"inbound":if(!t.accountId)throw new Error("accountId is required for inbound memo");return`hcs-10:0:${r}:0:${t.accountId}`;case"outbound":return`hcs-10:0:${r}:1`;case"connection":if(!t.inboundTopicId||void 0===t.connectionId)throw new Error("inboundTopicId and connectionId are required for connection memo");return`hcs-10:1:${r}:2:${t.inboundTopicId}:${t.connectionId}`;default:throw new Error(`Invalid HCS-10 memo type: ${e}`)}}async checkRegistrationStatus(e,t,r){try{const n=await fetch(`${r}/api/request-confirm`,{method:"POST",headers:{"Content-Type":"application/json","X-Network":t},body:JSON.stringify({transaction_id:e})});if(!n.ok)throw new Error(`Failed to confirm registration: ${n.statusText}`);return await n.json()}catch(n){throw this.logger.error(`Error checking registration status: ${n}`),n}}isValidOperatorId(e){if(!e)return!1;const t=e.split("@");if(2!==t.length)return!1;const r=t[0],n=t[1];if(!r)return!1;if(!n)return!1;const o=/^[0-9]+\.[0-9]+\.[0-9]+$/;return!!o.test(n)&&!!o.test(r)}}class HCS10Cache{constructor(){this.CACHE_TTL=36e5,this.cache=new Map,this.cacheExpiry=new Map}static getInstance(){return HCS10Cache.instance||(HCS10Cache.instance=new HCS10Cache),HCS10Cache.instance}set(e,t){this.cache.set(e,t),this.cacheExpiry.set(e,Date.now()+this.CACHE_TTL)}get(e){const t=this.cacheExpiry.get(e);if(t&&t>Date.now())return this.cache.get(e);t&&(this.cache.delete(e),this.cacheExpiry.delete(e))}clear(){this.cache.clear(),this.cacheExpiry.clear()}}class PayloadSizeError extends Error{constructor(e,t){super(e),this.payloadSize=t,this.name="PayloadSizeError"}}class AccountCreationError extends Error{constructor(e){super(e),this.name="AccountCreationError"}}class TopicCreationError extends Error{constructor(e){super(e),this.name="TopicCreationError"}}class ConnectionConfirmationError extends Error{constructor(e){super(e),this.name="ConnectionConfirmationError"}}class AgentBuilder{constructor(){this.config={},this.logger=Logger$2.getInstance({module:"AgentBuilder"})}setName(e){return this.config.name=e,this}setAlias(e){return this.config.alias=e,this}setBio(e){return this.config.bio=e,this}setDescription(e){return this.config.bio=e,this}setCapabilities(e){return this.config.capabilities=e,this}setAgentType(e){return this.config.metadata?this.config.metadata.type=e:this.config.metadata={type:e},this}setType(e){return this.config.metadata?this.config.metadata.type=e:this.config.metadata={type:e},this}setModel(e){return this.config.metadata||(this.config.metadata={type:"manual"}),this.config.metadata.model=e,this}setCreator(e){return this.config.metadata||(this.config.metadata={type:"manual"}),this.config.metadata.creator=e,this}addSocial(e,t){return this.config.metadata||(this.config.metadata={type:"manual"}),this.config.metadata.socials||(this.config.metadata.socials={}),this.config.metadata.socials[e]=t,this}addProperty(e,t){return this.config.metadata||(this.config.metadata={type:"manual"}),this.config.metadata.properties||(this.config.metadata.properties={}),this.config.metadata.properties[e]=t,this}setMetadata(e){return this.config.metadata=e,this}setProfilePicture(e,t){return this.config.pfpBuffer=e,this.config.pfpFileName=t,this}setExistingProfilePicture(e){return this.config.existingPfpTopicId=e,this}setNetwork(e){return this.config.network=e,this}setInboundTopicType(e){return this.config.inboundTopicType=e,this}setFeeConfig(e){return this.config.feeConfig=e,this}setConnectionFeeConfig(e){return this.config.connectionFeeConfig=e,this}setExistingAccount(e,t){return this.config.existingAccount={accountId:e,privateKey:t},this}build(){if(!this.config.name)throw new Error("Agent display name is required");if(this.config.bio||this.logger?.warn("Agent description is not set"),this.config.pfpBuffer||this.config.existingPfpTopicId||this.logger.warn("No profile picture provided or referenced."),!this.config.network)throw new Error("Network is required");if(this.config.inboundTopicType||(this.config.inboundTopicType=InboundTopicType.PUBLIC),this.config.capabilities||(this.config.capabilities=[]),this.config.metadata?this.config.metadata.type||(this.config.metadata.type="manual"):this.config.metadata={type:"manual"},this.config.inboundTopicType===InboundTopicType.FEE_BASED&&!this.config.feeConfig)throw new Error("Fee configuration is required for fee-based topics");return this.config}}class PersonBuilder{constructor(){this.config={version:"1.0",type:0},this.logger=Logger$2.getInstance({module:"PersonBuilder"})}setName(e){return this.config.display_name=e,this}setAlias(e){return this.config.alias=e,this}setBio(e){return this.config.bio=e,this}setDescription(e){return this.setBio(e)}addSocial(e,t){this.config.socials||(this.config.socials=[]);const r=this.config.socials.find((t=>t.platform===e));return r?r.handle=t:this.config.socials.push({platform:e,handle:t}),this}setProfileImage(e){return this.config.profileImage=e,this}setProfilePicture(e,t){return this.config.pfpBuffer=e,this.config.pfpFileName=t,this}setExistingProfilePicture(e){return this.config.profileImage=`hcs://1/${e}`,this}addProperty(e,t){return this.config.properties||(this.config.properties={}),this.config.properties[e]=t,this}setInboundTopicId(e){return this.config.inboundTopicId=e,this}setOutboundTopicId(e){return this.config.outboundTopicId=e,this}getProfilePicture(){return{pfpBuffer:this.config.pfpBuffer,pfpFileName:this.config.pfpFileName}}build(){if(!this.config.display_name)throw new Error("Display name is required for the profile");return this.config.bio||this.logger.warn("No bio provided for person profile"),this.config.pfpBuffer||this.config.profileImage||this.logger.warn("No profile picture provided or referenced"),{version:this.config.version,type:0,display_name:this.config.display_name,alias:this.config.alias,bio:this.config.bio,socials:this.config.socials,profileImage:this.config.profileImage,properties:this.config.properties,inboundTopicId:this.config.inboundTopicId,outboundTopicId:this.config.outboundTopicId,pfpBuffer:this.config.pfpBuffer,pfpFileName:this.config.pfpFileName}}}async function accountIdsToExemptKeys(e,t,r){const n=new HederaMirrorNode(t,r),o=[];for(const a of e)try{const e=await n.getPublicKey(a);o.push(e)}catch(i){r&&r.warn(`Could not get public key for account ${a}: ${i}`)}return o}class HCS10Client extends HCS10BaseClient{constructor(e){super({network:e.network,logLevel:e.logLevel,prettyPrint:e.prettyPrint,feeAmount:e.feeAmount}),this.client="mainnet"===e.network?i$1.forMainnet():i$1.forTestnet(),this.operatorPrivateKey=y.fromString(e.operatorPrivateKey),this.network=e.network,this.client.setOperator(e.operatorId,this.operatorPrivateKey.toString()),this.logger=Logger$2.getInstance({level:e.logLevel||"info",module:"HCS-SDK"}),this.guardedRegistryBaseUrl=e.guardedRegistryBaseUrl||"https://moonscape.tech",this.hcs11Client=new HCS11Client({network:e.network,auth:{operatorId:e.operatorId,privateKey:e.operatorPrivateKey},logLevel:e.logLevel})}getClient(){return this.client}async createAccount(e=50){this.logger.info(`Creating new account with ${e} HBAR initial balance`);const t=y.generate(),r=(new l).setKey(t.publicKey).setInitialBalance(new e$7(e));this.logger.debug("Executing account creation transaction");const n=await r.execute(this.client),o=(await n.getReceipt(this.client)).accountId;if(!o)throw this.logger.error("Account creation failed: accountId is null"),new AccountCreationError("Failed to create account: accountId is null");return this.logger.info(`Account created successfully: ${o.toString()}`),{accountId:o.toString(),privateKey:t.toString()}}async createInboundTopic(e,t,r=60,n){const o=this._generateHcs10Memo(Hcs10MemoType.INBOUND,{accountId:e,ttl:r});let i,a;switch(t){case InboundTopicType.PUBLIC:i=!1;break;case InboundTopicType.CONTROLLED:i=!0;break;case InboundTopicType.FEE_BASED:if(i=!1,!n)throw new Error("Fee configuration builder is required for fee-based topics");n.customFees.forEach((t=>{t.feeCollectorAccountId||(this.logger.debug(`Defaulting fee collector for token ${t.feeTokenId||"HBAR"} to agent ${e}`),t.feeCollectorAccountId=e)})),a=n.build();break;default:throw new Error(`Unsupported inbound topic type: ${t}`)}return this.createTopic(o,!0,i,a)}async createAgent(e,t=60){const r=e.build(),n=this._generateHcs10Memo(Hcs10MemoType.OUTBOUND,{ttl:t}),o=await this.createTopic(n,!0,!0);this.logger.info(`Created new outbound topic ID: ${o}`);const i=this.client.operatorAccountId?.toString();if(!i)throw new Error("Failed to retrieve operator account ID");const a=await this.createInboundTopic(i,r.inboundTopicType,t,r.inboundTopicType===InboundTopicType.FEE_BASED?r.feeConfig:void 0);let s=r.existingPfpTopicId||"";if(!s&&r.pfpBuffer&&r.pfpBuffer.length>0){this.logger.info("Inscribing new profile picture");s=(await this.inscribePfp(r.pfpBuffer,r.pfpFileName)).pfpTopicId,this.logger.info(`Profile picture inscribed with topic ID: ${s}`)}else r.existingPfpTopicId&&this.logger.info(`Using existing profile picture with topic ID: ${r.existingPfpTopicId}`);const c=(await this.storeHCS11Profile(r.name,r.bio,a,o,r.capabilities,r.metadata,r.pfpBuffer&&r.pfpBuffer.length>0?r.pfpBuffer:void 0,r.pfpFileName,r.existingPfpTopicId)).profileTopicId;return this.logger.info(`Profile stored with topic ID: ${c}`),{inboundTopicId:a,outboundTopicId:o,pfpTopicId:s,profileTopicId:c}}async inscribePfp(e,t){try{this.logger.info("Inscribing profile picture using HCS-11 client");const r=await this.hcs11Client.inscribeImage(e,t);if(!r.success)throw this.logger.error(`Failed to inscribe profile picture: ${r.error}`),new Error(r?.error||"Failed to inscribe profile picture");return this.logger.info(`Successfully inscribed profile picture with topic ID: ${r.imageTopicId}`),{pfpTopicId:r.imageTopicId,transactionId:r.transactionId,success:!0}}catch(r){return this.logger.error(`Error inscribing profile picture: ${r.message}`),{pfpTopicId:"",transactionId:"",success:!1,error:r.message}}}async storeHCS11Profile(e,t,r,n,o=[],i,a,s,c){try{let u=c||"";if(!u&&a&&s){this.logger.info("Inscribing profile picture for HCS-11 profile");const e=await this.inscribePfp(a,s);e.success?u=e.pfpTopicId:this.logger.warn(`Failed to inscribe profile picture: ${e.error}, proceeding without pfp`)}else c&&(this.logger.info(`Using existing profile picture with topic ID: ${c} for HCS-11 profile`),u=c);const l=this.hcs11Client.getAgentTypeFromMetadata({type:i.type||"autonomous"}),d=i.socials?Object.entries(i.socials).filter((([e,t])=>t)).map((([e,t])=>({platform:e,handle:t}))):void 0,p=this.hcs11Client.createAIAgentProfile(e,l,o,i.model||"unknown",{alias:e.toLowerCase().replace(/\s+/g,"_"),bio:t,profileImage:u?`hcs://1/${u}`:void 0,socials:d,properties:i.properties,inboundTopicId:r,outboundTopicId:n,creator:i.creator}),f=await this.hcs11Client.createAndInscribeProfile(p,!0);if(!f.success)throw this.logger.error(`Failed to inscribe profile: ${f.error}`),new Error(f.error||"Failed to inscribe profile");return this.logger.info(`Profile inscribed with topic ID: ${f.profileTopicId}, transaction ID: ${f.transactionId}`),{profileTopicId:f.profileTopicId,pfpTopicId:u,transactionId:f.transactionId,success:!0}}catch(u){return this.logger.error(`Error storing HCS-11 profile: ${u.message}`),{profileTopicId:"",pfpTopicId:"",transactionId:"",success:!1,error:u.message}}}async setupFees(e,t,r=[]){let n=e;if(!this.client.operatorPublicKey)return n;if(!t.customFees||0===t.customFees.length)return this.logger.warn("No custom fees provided in fee config for setupFees"),n;t.customFees.length>10&&(this.logger.warn("More than 10 custom fees provided, only the first 10 will be used"),t.customFees=t.customFees.slice(0,10));const o=t.customFees.map((e=>{if(!e.feeCollectorAccountId)return this.logger.error("Internal Error: Fee collector ID missing in setupFees"),null;if("FIXED_FEE"===e.type){const t=(new l$1).setAmount(Number(e.feeAmount.amount)).setFeeCollectorAccountId(f.fromString(e.feeCollectorAccountId));return e.feeTokenId&&t.setDenominatingTokenId(u$4.fromString(e.feeTokenId)),t}return null})).filter(Boolean);if(0===o.length)return this.logger.warn("No valid custom fees to apply in setupFees"),n;const i=[...t.exemptAccounts||[],...r];return i.length>0&&(n=await this.setupExemptKeys(e,i)),n.setFeeScheduleKey(this.client.operatorPublicKey).setCustomFees(o)}async setupExemptKeys(e,t){let r=e;const n=Array.from(new Set(t)).filter((e=>e!==this.client.operatorAccountId?.toString()));let o=[];if(n.length>0)try{o=await accountIdsToExemptKeys(n,this.network,this.logger)}catch(i){this.logger.warn(`Error getting exempt keys: ${i}, continuing without exempt keys`)}return o.length>0&&(r=r.setFeeExemptKeys(o)),r}async handleConnectionRequest(e,t,r,n,o=60){const i=this._generateHcs10Memo(Hcs10MemoType.CONNECTION,{ttl:o,inboundTopicId:e,connectionId:r});this.logger.info(`Handling connection request ${r} from ${t}`);const a=this.getClient().operatorAccountId?.toString();if(!a)throw new Error("Failed to retrieve operator account ID");let s=await this.mirrorNode.getPublicKey(t);const c=await this.mirrorNode.getPublicKey(a);if(!c)throw new Error("Failed to retrieve public key");const u=new s$9([c,s],1);let l;try{if(n){const e=n.build(),t={...e,exemptAccounts:[...e.exemptAccounts||[]]};l=await this.createTopic(i,u,u,t)}else l=await this.createTopic(i,u,u);this.logger.info(`Created new connection topic ID: ${l}`)}catch(y){throw this.logger.error(`Failed to create connection topic: ${y}`),new TopicCreationError(`Failed to create connection topic: ${y}`)}const d=`${e}@${a}`,p=await this.confirmConnection(e,l,t,r,"Connection accepted. Looking forward to collaborating!"),f=await this.retrieveCommunicationTopics(a),h=await this.retrieveCommunicationTopics(t),m=`${h.inboundTopic}@${t}`;return await this.recordOutboundConnectionConfirmation({outboundTopicId:f.outboundTopic,requestorOutboundTopicId:h.outboundTopic,connectionRequestId:r,confirmedRequestId:p,connectionTopicId:l,operatorId:m,memo:`Connection established with ${t}`}),{connectionTopicId:l,confirmedConnectionSequenceNumber:p,operatorId:d}}async confirmConnection(e,t,r,n,o,i){const a=await this.getOperatorId();this.logger.info(`Confirming connection with ID ${n}`);const s={p:"hcs-10",op:"connection_created",connection_topic_id:t,connected_account_id:r,operator_id:a,connection_id:n,m:o},c=await this.canSubmitToTopic(e,this.client.operatorAccountId?.toString()||""),u=await this.submitPayload(e,s,i,c.requiresFee),l=u.topicSequenceNumber?.toNumber();if(!l)throw new ConnectionConfirmationError("Failed to confirm connection: sequence number is null");return l}async sendMessage(e,t,r,n,o){const i=await this.canSubmitToTopic(e,this.client.operatorAccountId?.toString()||""),a={p:"hcs-10",op:"message",operator_id:await this.getOperatorId(),data:t,m:r},s=JSON.stringify(a);if(Buffer.from(s).length>1e3){this.logger.info("Message payload exceeds 1000 bytes, storing via inscription");try{const e=Buffer.from(t),r=`message-${Date.now()}.json`,n=await this.inscribeFile(e,r,{progressCallback:o?.progressCallback,waitMaxAttempts:o?.waitMaxAttempts,waitIntervalMs:o?.waitIntervalMs});if(!n?.topic_id)throw new Error("Failed to inscribe large message content");a.data=`hcs://1/${n.topic_id}`,this.logger.info(`Large message inscribed with topic ID: ${n.topic_id}`)}catch(c){throw this.logger.error("Error inscribing large message:",c),new Error(`Failed to handle large message: ${c instanceof Error?c.message:"Unknown error"}`)}}return this.logger.info("Submitting message to connection topic",a),await this.submitPayload(e,a,n,i.requiresFee)}async createTopic(e,t,r,n){this.logger.info("Creating topic");const o=(new c$1).setTopicMemo(e);t&&("boolean"==typeof t&&t&&this.client.operatorPublicKey?(o.setAdminKey(this.client.operatorPublicKey),o.setAutoRenewAccountId(this.client.operatorAccountId)):(t instanceof i$8||t instanceof s$9)&&(o.setAdminKey(t),this.client.operatorAccountId&&o.setAutoRenewAccountId(this.client.operatorAccountId))),r&&("boolean"==typeof r&&r&&this.client.operatorPublicKey?o.setSubmitKey(this.client.operatorPublicKey):(r instanceof i$8||r instanceof s$9)&&o.setSubmitKey(r)),n&&await this.setupFees(o,n),this.logger.debug("Executing topic creation transaction");const i=await o.execute(this.client),a=await i.getReceipt(this.client);if(!a.topicId)throw this.logger.error("Failed to create topic: topicId is null"),new Error("Failed to create topic: topicId is null");return a.topicId.toString()}async submitPayload(e,t,r,n=!1){const o="string"==typeof t?t:JSON.stringify(t),i=Buffer.byteLength(o,"utf8");if(i>1e3)throw new PayloadSizeError("Payload size exceeds 1000 bytes limit",i);const a=(new u).setTopicId(m$1.fromString(e)).setMessage(o);let s;if(n&&(this.logger.info("Topic requires fee payment, setting max transaction fee"),a.setMaxTransactionFee(new e$7(this.feeAmount))),r){const e=a.freezeWith(this.client),t=await e.sign(r);s=await t.execute(this.client)}else s=await a.execute(this.client);const c=await s.getReceipt(this.client);if(!c)throw this.logger.error("Failed to submit message: receipt is null"),new Error("Failed to submit message: receipt is null");return this.logger.info("Message submitted successfully"),c}async inscribeFile(e,t,r){if(this.logger.info("Inscribing file"),!this.client.operatorAccountId)throw this.logger.error("Operator account ID is not set"),new Error("Operator account ID is not set");if(!this.operatorPrivateKey)throw this.logger.error("Operator private key is not set"),new Error("Operator private key is not set");const n=mimeTypesExports.lookup(t)||"application/octet-stream",o=await InscriptionSDK.createWithAuth({type:"server",accountId:this.client.operatorAccountId.toString(),privateKey:this.operatorPrivateKey.toString(),network:this.network}),i={mode:"file",waitForConfirmation:!0,waitMaxAttempts:r?.waitMaxAttempts||30,waitIntervalMs:r?.waitIntervalMs||4e3,progressCallback:r?.progressCallback,logging:{level:this.logger.getLevel?this.logger.getLevel():"info"}},a=await inscribe({type:"buffer",buffer:e,fileName:t,mimeType:n},{accountId:this.client.operatorAccountId.toString(),privateKey:this.operatorPrivateKey.toString(),network:this.network},i,o);if(!a.confirmed||!a.inscription)throw new Error("Inscription was not confirmed");return a.inscription}async waitForConnectionConfirmation(e,t,r=60,n=2e3,o=!0){this.logger.info(`Waiting for connection confirmation on inbound topic ${e} for request ID ${t}`);for(let i=0;i<r;i++){this.logger.info(`Attempt ${i+1}/${r} to find connection confirmation`);const a=(await this.mirrorNode.getTopicMessages(e)).filter((e=>"connection_created"===e.op));if(this.logger.info(`Found ${a.length} connection_created messages`),a.length>0)for(const e of a)if(Number(e.connection_id)===Number(t)){const r={connectionTopicId:e.connection_topic_id,sequence_number:Number(e.sequence_number),confirmedBy:e.operator_id,memo:e.m},n=this.extractAccountFromOperatorId(r.confirmedBy),i=this.getAccountAndSigner(),a=await this.retrieveCommunicationTopics(n),s=await this.retrieveCommunicationTopics(i.accountId);return this.logger.info("Connection confirmation found",r),o&&await this.recordOutboundConnectionConfirmation({requestorOutboundTopicId:a.outboundTopic,outboundTopicId:s.outboundTopic,connectionRequestId:t,confirmedRequestId:r.sequence_number,connectionTopicId:r.connectionTopicId,operatorId:r.confirmedBy,memo:r.memo||"Connection confirmed"}),r}i<r-1&&(this.logger.info(`No matching confirmation found, waiting ${n}ms before retrying...`),await new Promise((e=>setTimeout(e,n))))}throw new Error(`Connection confirmation not found after ${r} attempts for request ID ${t}`)}getAccountAndSigner(){return{accountId:this.client.operatorAccountId.toString(),signer:this.operatorPrivateKey}}async createAndRegisterAgent(e,t){try{const r=e.build(),n=t?.progressCallback,o=t?.baseUrl||this.guardedRegistryBaseUrl;let i=t?.existingState||void 0;n&&n({stage:"preparing",message:"Preparing agent registration",progressPercent:10,details:{state:i}});const a=r.existingAccount||await this.createAccount(t?.initialBalance);n&&n({stage:"preparing",message:"Created account or using existing account",progressPercent:20,details:{state:i,account:a}});const s=new HCS10Client({network:r.network,operatorId:a.accountId,operatorPrivateKey:a.privateKey,operatorPublicKey:y.fromString(a.privateKey).publicKey.toString(),logLevel:"info",guardedRegistryBaseUrl:o});n&&n({stage:"preparing",message:"Initialized agent client",progressPercent:30,details:{state:i}});const{outboundTopicId:c,inboundTopicId:u,pfpTopicId:l,profileTopicId:d}=await s.createAgent(e);n&&n({stage:"submitting",message:"Created agent with topics and profile",progressPercent:60,details:{state:i,outboundTopicId:c,inboundTopicId:u,pfpTopicId:l,profileTopicId:d}});const p=`${u}@${a.accountId}`,f=await s.registerAgentWithGuardedRegistry(a.accountId,r.network,{progressCallback:e=>{const t=60+.4*(e.progressPercent||0);n&&n({stage:e.stage,message:e.message,progressPercent:t,details:{...e.details,outboundTopicId:c,inboundTopicId:u,pfpTopicId:l,profileTopicId:d,operatorId:p,state:e.details?.state||i}})},existingState:i});return f.success?(n&&n({stage:"completed",message:"Agent creation and registration complete",progressPercent:100,details:{outboundTopicId:c,inboundTopicId:u,pfpTopicId:l,profileTopicId:d,operatorId:p,state:f.state}}),{...f,metadata:{accountId:a.accountId,privateKey:a.privateKey,operatorId:p,inboundTopicId:u,outboundTopicId:c,profileTopicId:d,pfpTopicId:l}}):f}catch(r){return this.logger.error(`Failed to create and register agent: ${r.message}`),{error:r.message,success:!1}}}async registerAgentWithGuardedRegistry(e,t=this.network,r){try{this.logger.info("Registering agent with guarded registry");const n=r?.maxAttempts??60,o=r?.delayMs??2e3,i=r?.progressCallback;let a=r?.existingState||{currentStage:"registration",completedPercentage:0,createdResources:[]};i&&i({stage:"preparing",message:"Preparing agent registration",progressPercent:10,details:{state:a}});const s=await this.executeRegistration(e,t,this.guardedRegistryBaseUrl,this.logger);if(!s.success)return{...s,state:a};if(i&&i({stage:"submitting",message:"Submitting registration to registry",progressPercent:30,details:{transactionId:s.transactionId,state:a}}),s.transaction){const e=A.fromBytes(Buffer.from(s.transaction,"base64"));this.logger.info("Processing registration transaction"),await e.execute(this.client),this.logger.info("Successfully processed registration transaction")}i&&i({stage:"confirming",message:"Confirming registration transaction",progressPercent:60,details:{accountId:e,transactionId:s.transactionId,state:a}});const c=await this.waitForRegistrationConfirmation(s.transactionId,t,this.guardedRegistryBaseUrl,n,o,this.logger);return a.currentStage="complete",a.completedPercentage=100,a.createdResources||(a.createdResources=[]),s.transactionId&&a.createdResources.push(`registration:${s.transactionId}`),i&&i({stage:"completed",message:"Agent registration complete",progressPercent:100,details:{confirmed:c,transactionId:s.transactionId,state:a}}),{...s,confirmed:c,state:a}}catch(n){return this.logger.error(`Failed to register agent: ${n.message}`),{error:n.message,success:!1}}}async registerAgent(e,t,r,n,o){this.logger.info("Registering agent");const i={p:"hcs-10",op:"register",account_id:t,inbound_topic_id:r,m:n};await this.submitPayload(e,i,o)}async getInboundTopicType(e){try{const t=await this.mirrorNode.getTopicInfo(e);if(!t)throw new Error("Topic does not exist");if(!(t.submit_key&&t.submit_key.key))return InboundTopicType.PUBLIC;if(t.fee_schedule_key&&t.fee_schedule_key.key&&t.custom_fees){const r=t.custom_fees;if(r&&r.fixed_fees&&r.fixed_fees.length>0)return this.logger.info(`Topic ${e} is fee-based with ${r.fixed_fees.length} custom fees`),InboundTopicType.FEE_BASED}return InboundTopicType.CONTROLLED}catch(t){throw this.logger.error(`Error determining topic type: ${t.message}`),new Error(`Failed to determine topic type: ${t.message}`)}}getNetwork(){return this.network}getLogger(){return this.logger}getOperatorAccountId(){return this.client.operatorAccountId?.toString()??null}}const isBrowser="undefined"!=typeof window;class BrowserHCSClient extends HCS10BaseClient{constructor(e){let t;if(super({network:e.network,logLevel:e.logLevel,prettyPrint:e.prettyPrint,feeAmount:e.feeAmount}),this.hcs11Client=null,this.hwc=e.hwc,e.guardedRegistryBaseUrl?this.guardedRegistryBaseUrl=e.guardedRegistryBaseUrl:this.guardedRegistryBaseUrl="https://moonscape.tech",t=e.logLevel?e.logLevel:"info",this.logger=Logger$2.getInstance({level:t,module:"HCS-Browser",prettyPrint:e.prettyPrint}),isBrowser)try{const{accountId:t,signer:r}=this.getAccountAndSigner();this.hcs11Client=new HCS11Client({network:e.network,auth:{operatorId:t,signer:r},logLevel:e.logLevel})}catch(r){this.logger.warn(`Failed to initialize HCS11Client: ${r}`)}else this.logger.error("BrowserHCSClient initialized in server environment - browser-specific features will not be available. Use HCS10Client instead.")}async sendMessage(e,t,r,n,o){this.logger.info("Sending message");const i={p:"hcs-10",op:"message",operator_id:await this.getOperatorId(),data:t,m:r},a=await this.canSubmitToTopic(e,this.hwc.getAccountInfo().accountId),s=JSON.stringify(i);if(Buffer.from(s).length>1e3){this.logger.info("Message payload exceeds 1000 bytes, storing via inscription");try{const e=Buffer.from(t),r=`message-${Date.now()}.json`,n=await this.inscribeFile(e,r,{progressCallback:o?.progressCallback,waitMaxAttempts:o?.waitMaxAttempts,waitIntervalMs:o?.waitIntervalMs});if(!n?.topic_id)throw new Error("Failed to inscribe large message content");i.data=`hcs://1/${n.topic_id}`,this.logger.info(`Large message inscribed with topic ID: ${n.topic_id}`)}catch(c){throw this.logger.error("Error inscribing large message:",c),new Error(`Failed to handle large message: ${c instanceof Error?c.message:"Unknown error"}`)}}return await this.submitPayload(e,i,n,a.requiresFee)}async getPublicKey(e){return await this.mirrorNode.getPublicKey(e)}async handleConnectionRequest(e,t,r,n="Connection accepted. Looking forward to collaborating!",o=60){this.logger.info("Handling connection request");const i=this.hwc.getAccountInfo().accountId;if(!i)throw new Error("Failed to retrieve user account ID");const a=await this.mirrorNode.getPublicKey(t),s=await this.mirrorNode.getPublicKey(i);if(!s)throw new Error("Failed to retrieve public key");const c=new s$9([s,a],1),u=this._generateHcs10Memo(Hcs10MemoType.CONNECTION,{ttl:o,inboundTopicId:e,connectionId:r}),l=(new c$1).setTopicMemo(u).setAutoRenewAccountId(f.fromString(i)).setAdminKey(c).setSubmitKey(c);this.logger.debug("Executing topic creation transaction");const d=await this.hwc.executeTransactionWithErrorHandling(l,!1);if(d?.error)throw this.logger.error(d.error),new Error(d.error);const p=d?.result;if(!p?.topicId)throw this.logger.error("Failed to create topic: topicId is null"),new Error("Failed to create topic: topicId is null");const h=p.topicId.toString(),m=`${e}@${i}`,y=await this.confirmConnection(e,h,t,r,m,n),g=await this.retrieveCommunicationTopics(i),b=await this.retrieveCommunicationTopics(t),w=`${b.inboundTopic}@${t}`;return await this.recordOutboundConnectionConfirmation({outboundTopicId:g.outboundTopic,requestorOutboundTopicId:b.outboundTopic,connectionRequestId:r,confirmedRequestId:y,connectionTopicId:h,operatorId:w,memo:`Connection established with ${t}`}),{connectionTopicId:h,confirmedConnectionSequenceNumber:y,operatorId:m}}async confirmConnection(e,t,r,n,o,i){this.logger.info("Confirming connection");const a={p:"hcs-10",op:"connection_created",connection_topic_id:t,connected_account_id:r,operator_id:o,connection_id:n,m:i},s=await this.submitPayload(e,a);if(!s?.topicSequenceNumber)throw this.logger.error("Failed to confirm connection: sequence number is null"),new Error("Failed to confirm connection: sequence number is null");return s.topicSequenceNumber.toNumber()}async create(e,t){const r=t?.progressCallback,n=new ProgressReporter({module:"ProfileCreate",logger:this.logger,callback:r});try{const r=e instanceof AgentBuilder;let o;if(o=t?.existingState?t.existingState:{currentStage:"init",completedPercentage:0,createdResources:[]},r){this.logger.info("Creating Agent Profile and HCS-10 Topics");const t=e.build();o.agentMetadata=t.metadata}else this.logger.info("Creating Person HCS-11 Profile");n.preparing(`Starting ${r?"agent":"person"} resource creation`,0,{state:o});const{inboundTopicId:i,outboundTopicId:a,state:s}=await this.createCommunicationTopics(t,n);let c,u,l;if(o=s,r||(e.setInboundTopicId(i),e.setOutboundTopicId(a)),r){const t=e.build();c=t.existingPfpTopicId||o.pfpTopicId,u=t.pfpBuffer,l=t.pfpFileName||"pfp.png"}else{const t=e.build();c=o.pfpTopicId,u=t.pfpBuffer,l=t.pfpFileName}!c&&u&&l?c=await this.handleProfilePictureCreation(u,l,o,n):c&&(n.preparing(`Using existing profile picture: ${c}`,50,{state:o}),o.pfpTopicId=c),await this.createAndInscribeProfile(r,e,c,o,i,a,t,n),o.currentStage="complete",o.completedPercentage=100,n.completed((r?"Agent":"Person")+" profile created successfully",{profileTopicId:o.profileTopicId,inboundTopicId:i,outboundTopicId:a,pfpTopicId:c,state:o});let d="";o.outboundTopicId&&(d=o.outboundTopicId);let p="";o.inboundTopicId&&(p=o.inboundTopicId);let f="";o.pfpTopicId&&(f=o.pfpTopicId);let h="";return o.profileTopicId&&(h=o.profileTopicId),{outboundTopicId:d,inboundTopicId:p,pfpTopicId:f,profileTopicId:h,success:!0,state:o}}catch(o){return n.failed("Error during profile creation",{error:o.message}),{outboundTopicId:"",inboundTopicId:"",pfpTopicId:"",profileTopicId:"",success:!1,error:o.message,state:{currentStage:"init",completedPercentage:0,error:o.message}}}}async handleProfilePictureCreation(e,t,r,n){r.currentStage="pfp",n.preparing("Creating profile picture",30,{state:r});const o=n.createSubProgress({minPercent:30,maxPercent:50,logPrefix:"PFP"}),i=await this.inscribePfp(e,t,{progressCallback:e=>o.report({...e,progressPercent:e.progressPercent??0,details:{...e.details,state:r}})});if(!i.success){let e="Failed to inscribe profile picture";throw i.error&&(e=i.error),new Error(e)}const a=i.pfpTopicId;return r.pfpTopicId=a,r.createdResources&&r.createdResources.push(`pfp:${r.pfpTopicId}`),n.preparing("Profile picture created",50,{state:r}),a}async createAndInscribeProfile(e,t,r,n,o,i,a,s){if(!this.hcs11Client)throw s&&s.failed("HCS11Client is not available"),new Error("HCS11Client is not available");if(this.logger.info("Creating and inscribing profile"),n.profileTopicId)s&&s.preparing(`Using existing ${e?"agent":"person"} profile`,95,{state:n});else{s&&s.preparing(`Storing HCS-11 ${e?"agent":"person"} profile`,80);const c=s?.createSubProgress({minPercent:80,maxPercent:95,logPrefix:"StoreProfile"});let u;if(e){const e=t.build(),n=e.metadata?.socials?Object.entries(e.metadata.socials).map((([e,t])=>({platform:e,handle:t}))):[];u=this.hcs11Client.createAIAgentProfile(e.name,"manual"===e.metadata?.type?0:1,e.capabilities||[],e.metadata?.model||"unknown",{alias:e.name.toLowerCase().replace(/\s+/g,"_"),bio:e.bio,profileImage:r?`hcs://1/${r}`:void 0,socials:n,properties:e.metadata?.properties||{},inboundTopicId:o,outboundTopicId:i,creator:e.metadata?.creator})}else{const e=t.build(),{pfpBuffer:n,pfpFileName:a,...s}=e;u=this.hcs11Client.createPersonalProfile(e.display_name,{alias:e.alias,bio:e.bio,socials:e.socials,profileImage:r?`hcs://1/${r}`:e.profileImage,properties:e.properties,inboundTopicId:o,outboundTopicId:i})}const l=await this.hcs11Client.createAndInscribeProfile(u,a?.updateAccountMemo??!0,{progressCallback:e=>c?.report({...e,progressPercent:e.progressPercent??0})});if(!l.success){s&&s.failed(`Failed to inscribe ${e?"agent":"person"} profile`,{error:l.error});let t=`Failed to inscribe ${e?"agent":"person"} profile`;throw l.error&&(t=l.error),new Error(t)}n.profileTopicId=l.profileTopicId,n.createdResources&&n.createdResources.push(`profile:${l.profileTopicId}`),s&&s.preparing("HCS-11 Profile stored",95,{state:n})}}initializeRegistrationState(e,t){const r=t||{inboundTopicId:e,currentStage:"registration",completedPercentage:0,createdResources:[]};return"registration"!==r.currentStage&&"complete"!==r.currentStage&&(r.currentStage="registration"),r}updateStateForCompletedRegistration(e,t){e.currentStage="complete",e.completedPercentage=100,e.createdResources&&e.createdResources.push(`registration:${t}`)}async registerAgentWithGuardedRegistry(e,t=this.network,r){try{this.logger.info("Registering agent with guarded registry");const n=(await this.retrieveProfile(e)).topicInfo.inboundTopic,o=this.initializeRegistrationState(n,r?.existingState),i=new ProgressReporter({module:"AgentRegistration",logger:this.logger,callback:r?.progressCallback});i.preparing("Preparing agent registration",10,{inboundTopicId:n,accountId:e});const a=await this.executeRegistration(e,t,this.guardedRegistryBaseUrl,this.logger);if(!a.success)return{...a,state:o};if(i.submitting("Submitting registration to registry",30,{transactionId:a.transactionId}),a.transaction){const e=A.fromBytes(Buffer.from(a.transaction,"base64"));this.logger.info("Processing registration transaction");const t=await this.hwc.executeTransactionWithErrorHandling(e,!0);if(t.error)return{...a,error:t.error,success:!1,state:o};this.logger.info("Successfully processed registration transaction")}i.confirming("Confirming registration transaction",60,{accountId:e,inboundTopicId:n,transactionId:a.transactionId});const s=r?.maxAttempts??60,c=r?.delayMs??2e3,u=await this.waitForRegistrationConfirmation(a.transactionId,t,this.guardedRegistryBaseUrl,s,c,this.logger);return this.updateStateForCompletedRegistration(o,n),i.completed("Agent registration complete",{transactionId:a.transactionId,inboundTopicId:n,state:o,confirmed:u}),{...a,confirmed:u,state:o}}catch(n){return this.logger.error(`Registration error: ${n.message}`),{error:`Error during registration: ${n.message}`,success:!1,state:{currentStage:"registration",completedPercentage:0,error:n.message}}}}async createAndRegisterAgent(e,t){try{const r=e.build(),n=t?.progressCallback,o=new ProgressReporter({module:"AgentCreateRegister",logger:this.logger,callback:n});let i=t?.existingState||{currentStage:"init",completedPercentage:0,createdResources:[]};if(i.agentMetadata=r.metadata,o.preparing("Starting agent creation process",0,{state:i}),"complete"!==i.currentStage||!i.inboundTopicId||!i.outboundTopicId||!i.profileTopicId){const t=await this.create(e,{progressCallback:e=>{const t=.3*(e.progressPercent||0);o.report({...e,progressPercent:t,details:{...e.details,state:e.details?.state||i}})},existingState:i,updateAccountMemo:!1});if(!("state"in t))throw new Error("Create method did not return expected agent state.");if(!t.success)throw new Error(t.error||"Failed to create agent resources");i=t.state,i.agentMetadata=r.metadata}o.preparing(`Agent creation status: ${i.currentStage}, ${i.completedPercentage}%`,30,{state:i});const{accountId:a}=this.getAccountAndSigner();if("complete"!==i.currentStage||!i.createdResources?.includes(`registration:${i.inboundTopicId}`)){t?.baseUrl&&(this.guardedRegistryBaseUrl=t.baseUrl);const e=await this.registerAgentWithGuardedRegistry(a,r.network,{progressCallback:e=>{const t=30+.7*(e.progressPercent||0);o.report({...e,progressPercent:t,details:{...e.details,state:e.details?.state||i}})},maxAttempts:t?.maxAttempts,delayMs:t?.delayMs,existingState:i});if(!e.success)throw new Error(e.error||"Failed to register agent with registry");i=e.state,i.profileTopicId&&await(this.hcs11Client?.updateAccountMemoWithProfile(a,i.profileTopicId))}return o.completed("Agent creation and registration complete",{state:i}),{success:!0,state:i,metadata:{accountId:a,operatorId:`${i.inboundTopicId}@${a}`,inboundTopicId:i.inboundTopicId,outboundTopicId:i.outboundTopicId,profileTopicId:i.profileTopicId,pfpTopicId:i.pfpTopicId,privateKey:null,...i.agentMetadata}}}catch(r){return this.logger.error(`Failed to create and register agent: ${r.message}`),{success:!1,error:`Failed to create and register agent: ${r.message}`,state:t?.existingState||{currentStage:"init",completedPercentage:0,error:r.message}}}}async storeHCS11Profile(e,t,r,n,o=[],i={},a,s,c,u){try{const l=u?.progressCallback,d=new ProgressReporter({module:"StoreHCS11Profile",logger:this.logger,callback:l});d.preparing("Preparing agent profile data",0);let p=c;if(!p&&a&&s){const e=d.createSubProgress({minPercent:0,maxPercent:60,logPrefix:"PFP"}),t=await this.inscribePfp(a,s,{progressCallback:t=>{e.report({stage:t.stage,message:t.message,progressPercent:t.progressPercent||0,details:t.details})}});t.success?p=t.pfpTopicId:d.failed("Failed to inscribe profile picture, continuing without PFP")}else c?d.preparing(`Using existing profile picture: ${c}`,30):d.preparing("No profile picture provided",30);if(!this.hcs11Client)return d.failed("HCS11Client is not available in this environment"),{profileTopicId:"",success:!1,error:"HCS11Client is not available in this environment",transactionId:""};const f=this.hcs11Client.getAgentTypeFromMetadata({type:i.type||"autonomous"});d.preparing("Building agent profile",65);const h=i.socials?Object.entries(i.socials).filter((([e,t])=>t)).map((([e,t])=>({platform:e,handle:t}))):void 0,m=this.hcs11Client.createAIAgentProfile(e,f,o,i.model||"unknown",{alias:e.toLowerCase().replace(/\s+/g,"_"),bio:t,profileImage:p?`hcs://1/${p}`:void 0,socials:h,properties:{version:i.version||"1.0.0",creator:i.creator||"Unknown",supported_languages:i.supported_languages||["en"],permissions:i.permissions||[],model_details:i.model_details,training:i.training,capabilities_description:i.capabilities_description,...i},inboundTopicId:r,outboundTopicId:n,creator:i.creator}),y=d.createSubProgress({minPercent:65,maxPercent:100,logPrefix:"Profile"}),g=await this.hcs11Client.createAndInscribeProfile(m,!0,{progressCallback:e=>{y.report({stage:e.stage,message:e.message,progressPercent:e.progressPercent||0,details:e.details})}});return g.success?(d.completed("Profile stored successfully",{profileTopicId:g.profileTopicId}),{profileTopicId:g.profileTopicId,pfpTopicId:p,success:!0,transactionId:g.transactionId||""}):(d.failed("Failed to inscribe profile"),{profileTopicId:"",success:!1,error:g.error||"Failed to inscribe profile",transactionId:g.transactionId||""})}catch(l){return this.logger.error(`Error storing HCS11 profile: ${l.message}`),{profileTopicId:"",success:!1,error:l.message,transactionId:""}}}async createTopic(e,t,r){this.logger.info("Creating topic");const{accountId:n,signer:o}=this.getAccountAndSigner(),i=(new c$1).setTopicMemo(e),a=await this.mirrorNode.getPublicKey(n);t&&a&&(i.setAdminKey(a),i.setAutoRenewAccountId(n)),r&&a&&i.setSubmitKey(a);const s=await this.hwc.executeTransactionWithErrorHandling(i,!1),c=s.error;if(c)return this.logger.error(c),{success:!1,error:c};const u=s.result;return u?.topicId?{success:!0,topicId:u.topicId.toString()}:(this.logger.error("Failed to create topic: topicId is null"),{success:!1,error:"Failed to create topic: topicId is null"})}async submitPayload(e,t,r,n){let o;this.logger.debug(`Submitting payload to topic ${e}`),o="string"==typeof t?t:JSON.stringify(t);const i=(new u).setTopicId(e).setMessage(o);let a;if(n&&(this.logger.info("Topic requires fee payment, setting max transaction fee"),i.setMaxTransactionFee(new e$7(this.feeAmount))),r){const{accountId:e,signer:t}=this.getAccountAndSigner();i.freezeWithSigner(t);const n=await i.sign(r);a=await this.hwc.executeTransactionWithErrorHandling(n,!0)}else a=await this.hwc.executeTransactionWithErrorHandling(i,!1);if(a?.error)throw this.logger.error(`Failed to submit payload: ${a.error}`),new Error(`Failed to submit payload: ${a.error}`);if(!a?.result)throw this.logger.error("Failed to submit message: receipt is null or undefined"),new Error("Failed to submit message: receipt is null or undefined");return this.logger.debug("Payload submitted successfully via HWC"),a.result}async inscribeFile(e,t,r){const{accountId:n,signer:o}=this.getAccountAndSigner(),i=mimeTypesExports.lookup(t)||"application/octet-stream",a=await InscriptionSDK.createWithAuth({type:"client",accountId:n,signer:o,network:this.network}),s={mode:"file",waitForConfirmation:!0,waitMaxAttempts:r?.waitMaxAttempts||30,waitIntervalMs:r?.waitIntervalMs||4e3,progressCallback:r?.progressCallback,logging:{level:this.logger.getLevel?this.logger.getLevel():"info"}},c=await inscribeWithSigner({type:"buffer",buffer:e,fileName:t,mimeType:i},o,{...s,network:this.network},a);if(!c.confirmed||!c.inscription)throw new Error("Inscription was not confirmed");return c.inscription}getAccountAndSigner(){const e=this?.hwc?.getAccountInfo(),t=e?.accountId?.toString(),r=this?.hwc?.dAppConnector?.signers?.find((e=>e.getAccountId().toString()===t));if(!r)throw this.logger.error("Failed to find signer",{accountId:t,signers:this?.hwc?.dAppConnector?.signers,accountInfo:e}),new Error("Failed to find signer");return{accountId:t,signer:r}}async inscribePfp(e,t,r){try{const n=r?.progressCallback,o=new ProgressReporter({module:"PFP-Inscription",logger:this.logger,callback:n});if(!this.hcs11Client)return o.failed("HCS11Client is not available in this environment"),{pfpTopicId:"",success:!1,error:"HCS11Client is not available in this environment",transactionId:""};o.preparing("Preparing to inscribe profile picture",10),this.logger.info("Inscribing profile picture using HCS-11 client");const i=e=>{o.report({stage:e.stage||"confirming",message:e.message||"Processing PFP inscription",progressPercent:e.progressPercent||50,details:e.details})},a=await this.hcs11Client.inscribeImage(e,t,{progressCallback:i});if(!a.success){let e="Failed to inscribe profile picture";a.error&&(e=a.error);let t="";return a.transactionId&&(t=a.transactionId),{pfpTopicId:"",success:!1,error:e,transactionId:t}}return o.completed("Successfully inscribed profile picture",{pfpTopicId:a.imageTopicId}),this.logger.info(`Successfully inscribed profile picture with topic ID: ${a.imageTopicId}`),{pfpTopicId:a.imageTopicId,success:!0,transactionId:a.transactionId||""}}catch(n){return this.logger.error(`Error inscribing profile picture: ${n.message}`),{pfpTopicId:"",success:!1,error:n.message,transactionId:""}}}async createCommunicationTopics(e,t){let r=e?.existingState||{currentStage:"init",completedPercentage:0,createdResources:[]};t&&t.preparing("Starting communication topic creation",0,{state:r});const{accountId:n}=this.getAccountAndSigner();if(!r.outboundTopicId){r.currentStage="topics",t&&t.preparing("Creating outbound topic",5,{state:r});const o=this._generateHcs10Memo(Hcs10MemoType.OUTBOUND,{ttl:e?.ttl,accountId:n}),i=await this.createTopic(o,!0,!0);if(!i.success||!i.topicId)throw new Error(i.error||"Failed to create outbound topic");r.outboundTopicId=i.topicId,r.createdResources&&r.createdResources.push(`outbound:${r.outboundTopicId}`)}if(!r.inboundTopicId){r.currentStage="topics",t&&t.preparing("Creating inbound topic",10,{state:r});const o=this._generateHcs10Memo(Hcs10MemoType.INBOUND,{ttl:e?.ttl,accountId:n}),i=await this.createTopic(o,!0,!1);if(!i.success||!i.topicId)throw new Error(i.error||"Failed to create inbound topic");r.inboundTopicId=i.topicId,r.createdResources&&r.createdResources.push(`inbound:${r.inboundTopicId}`)}return{inboundTopicId:r.inboundTopicId,outboundTopicId:r.outboundTopicId,state:r}}}var CustomFeeType=(e=>(e.FIXED_FEE="FIXED_FEE",e.FRACTIONAL_FEE="FRACTIONAL_FEE",e.ROYALTY_FEE="ROYALTY_FEE",e))(CustomFeeType||{});class FeeConfigBuilder{constructor(e){this.customFees=[],this.logger=e.logger,this.mirrorNode=new HederaMirrorNode(e.network,e.logger),this.defaultCollectorAccountId=e.defaultCollectorAccountId||""}static forHbar(e,t,r,n,o=[]){return new FeeConfigBuilder({network:r,logger:n,defaultCollectorAccountId:t}).addHbarFee(e,t,o)}static async forToken(e,t,r,n,o,i=[],a){const s=new FeeConfigBuilder({network:n,logger:o,defaultCollectorAccountId:r});return await s.addTokenFee(e,t,r,a,i),s}addHbarFee(e,t,r=[]){if(e<=0)throw new Error("HBAR amount must be greater than zero");return this.customFees.push({feeAmount:{amount:1e8*e,decimals:0},feeCollectorAccountId:t||"",feeTokenId:void 0,exemptAccounts:[...r],type:CustomFeeType.FIXED_FEE}),this}async addTokenFee(e,t,r,n,o=[]){if(e<=0)throw new Error("Token amount must be greater than zero");if(!t)throw new Error("Fee token ID is required when adding a token fee");let i=n;if(void 0===i)try{const e=await this.mirrorNode.getTokenInfo(t);e?.decimals?(i=parseInt(e.decimals,10),this.logger.info(`Fetched decimals for ${t}: ${i}`)):(this.logger.warn(`Could not fetch decimals for ${t}, defaulting to 0.`),i=0)}catch(a){this.logger.error(`Error fetching decimals for ${t}, defaulting to 0: ${a}`),i=0}return this.customFees.push({feeAmount:{amount:e*10**i,decimals:i},feeCollectorAccountId:r||"",feeTokenId:t,exemptAccounts:[...o],type:CustomFeeType.FIXED_FEE}),this}build(){if(0===this.customFees.length)throw new Error("At least one fee must be added using addHbarFee/addTokenFee or created using forHbar/forToken");if(this.customFees.length>10)throw new Error("Maximum of 10 custom fees per topic allowed");const e=new Set;return this.customFees.forEach((t=>{t.exemptAccounts.forEach((t=>e.add(t)))})),{customFees:this.customFees,exemptAccounts:Array.from(e)}}}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==global$2?global$2:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dist={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});for(var t={},r={byteLength:function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=c(e),a=n[0],s=n[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),l=0,d=s>0?a-4:a;for(r=0;r<d;r+=4)t=o[e.charCodeAt(r)]<<18|o[e.charCodeAt(r+1)]<<12|o[e.charCodeAt(r+2)]<<6|o[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===s&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},fromByteArray:function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")}},n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=a[s],o[a.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 u(e,t,r){for(var o,i,a=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;var l={
149
+ */function requireMimeTypes(){return hasRequiredMimeTypes||(hasRequiredMimeTypes=1,function(e){var t,r,n,o=requireMimeDb(),i=requirePathBrowserify().extname,a=/^\s*([^;\s]*)(?:;|\s|$)/,s=/^text\//i;function c(e){if(!e||"string"!=typeof e)return!1;var t=a.exec(e),r=t&&o[t[1].toLowerCase()];return r&&r.charset?r.charset:!(!t||!s.test(t[1]))&&"UTF-8"}e.charset=c,e.charsets={lookup:c},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var r=-1===t.indexOf("/")?e.lookup(t):t;if(!r)return!1;if(-1===r.indexOf("charset")){var n=e.charset(r);n&&(r+="; charset="+n.toLowerCase())}return r},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var r=a.exec(t),n=r&&e.extensions[r[1].toLowerCase()];if(!n||!n.length)return!1;return n[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var r=i("x."+t).toLowerCase().substr(1);if(!r)return!1;return e.types[r]||!1},e.types=Object.create(null),t=e.extensions,r=e.types,n=["nginx","apache",void 0,"iana"],Object.keys(o).forEach((function(e){var i=o[e],a=i.extensions;if(a&&a.length){t[e]=a;for(var s=0;s<a.length;s++){var c=a[s];if(r[c]){var u=n.indexOf(o[r[c]].source),l=n.indexOf(i.source);if("application/octet-stream"!==r[c]&&(u>l||u===l&&"application/"===r[c].substr(0,12)))continue}r[c]=e}}}))}(mimeTypes)),mimeTypes}var mimeTypesExports=requireMimeTypes(),util$1,util2,objectUtil,objectUtil2;util2=util$1||(util$1={}),util2.assertEqual=e=>e,util2.assertIs=function(e){},util2.assertNever=function(e){throw new Error},util2.arrayToEnum=e=>{const t={};for(const r of e)t[r]=r;return t},util2.getValidEnumValues=e=>{const t=util2.objectKeys(e).filter((t=>"number"!=typeof e[e[t]])),r={};for(const n of t)r[n]=e[n];return util2.objectValues(r)},util2.objectValues=e=>util2.objectKeys(e).map((function(t){return e[t]})),util2.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},util2.find=(e,t)=>{for(const r of e)if(t(r))return r},util2.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,util2.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},util2.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,objectUtil2=objectUtil||(objectUtil={}),objectUtil2.mergeShapes=(e,t)=>({...e,...t});const ZodParsedType=util$1.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=e=>{switch(typeof e){case"undefined":return ZodParsedType.undefined;case"string":return ZodParsedType.string;case"number":return isNaN(e)?ZodParsedType.nan:ZodParsedType.number;case"boolean":return ZodParsedType.boolean;case"function":return ZodParsedType.function;case"bigint":return ZodParsedType.bigint;case"symbol":return ZodParsedType.symbol;case"object":return Array.isArray(e)?ZodParsedType.array:null===e?ZodParsedType.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?ZodParsedType.promise:"undefined"!=typeof Map&&e instanceof Map?ZodParsedType.map:"undefined"!=typeof Set&&e instanceof Set?ZodParsedType.set:"undefined"!=typeof Date&&e instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util$1.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(const o of e.issues)if("invalid_union"===o.code)o.unionErrors.map(n);else if("invalid_return_type"===o.code)n(o.returnTypeError);else if("invalid_arguments"===o.code)n(o.argumentsError);else if(0===o.path.length)r._errors.push(t(o));else{let e=r,n=0;for(;n<o.path.length;){const r=o.path[n];n===o.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(o))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof ZodError))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,util$1.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},r=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}ZodError.create=e=>new ZodError(e);const errorMap=(e,t)=>{let r;switch(e.code){case ZodIssueCode.invalid_type:r=e.received===ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,util$1.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${util$1.joinValues(e.keys,", ")}`;break;case ZodIssueCode.invalid_union:r="Invalid input";break;case ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${util$1.joinValues(e.options)}`;break;case ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${util$1.joinValues(e.options)}, received '${e.received}'`;break;case ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case ZodIssueCode.invalid_date:r="Invalid date";break;case ZodIssueCode.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:util$1.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case ZodIssueCode.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case ZodIssueCode.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case ZodIssueCode.custom:r="Invalid input";break;case ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,util$1.assertNever(e)}return{message:r}};let overrideErrorMap=errorMap;function setErrorMap(e){overrideErrorMap=e}function getErrorMap(){return overrideErrorMap}const makeIssue=e=>{const{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],a={...o,path:i};if(void 0!==o.message)return{...o,path:i,message:o.message};let s="";const c=n.filter((e=>!!e)).slice().reverse();for(const u of c)s=u(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}},EMPTY_PATH=[];function addIssueToContext(e,t){const r=getErrorMap(),n=makeIssue({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===errorMap?void 0:errorMap].filter((e=>!!e))});e.common.issues.push(n)}class ParseStatus{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if("aborted"===n.status)return INVALID;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const e=await n.key,t=await n.value;r.push({key:e,value:t})}return ParseStatus.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:t,value:o}=n;if("aborted"===t.status)return INVALID;if("aborted"===o.status)return INVALID;"dirty"===t.status&&e.dirty(),"dirty"===o.status&&e.dirty(),"__proto__"===t.value||void 0===o.value&&!n.alwaysSet||(r[t.value]=o.value)}return{status:e.value,value:r}}}const INVALID=Object.freeze({status:"aborted"}),DIRTY=e=>({status:"dirty",value:e}),OK=e=>({status:"valid",value:e}),isAborted=e=>"aborted"===e.status,isDirty=e=>"dirty"===e.status,isValid=e=>"valid"===e.status,isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise;function __classPrivateFieldGet(e,t,r,n){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function __classPrivateFieldSet(e,t,r,n,o){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r}var errorUtil,errorUtil2,_ZodEnum_cache,_ZodNativeEnum_cache;"function"==typeof SuppressedError&&SuppressedError,errorUtil2=errorUtil||(errorUtil={}),errorUtil2.errToObj=e=>"string"==typeof e?{message:e}:e||{},errorUtil2.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class ParseInputLazyPath{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(e,t)=>{if(isValid(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new ZodError(e.common.issues);return this._error=t,this._error}}};function processCreateParams(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:o};return{errorMap:(t,o)=>{var i,a;const{message:s}=e;return"invalid_enum_value"===t.code?{message:null!=s?s:o.defaultError}:void 0===o.data?{message:null!==(i=null!=s?s:n)&&void 0!==i?i:o.defaultError}:"invalid_type"!==t.code?{message:o.defaultError}:{message:null!==(a=null!=s?s:r)&&void 0!==a?a:o.defaultError}},description:o}}class ZodType{get description(){return this._def.description}_getType(e){return getParsedType(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:getParsedType(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:getParsedType(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(isAsync(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;const n={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:getParsedType(e)},o=this._parseSync({data:e,path:n.path,parent:n});return handleResult(n,o)}"~validate"(e){var t,r;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:getParsedType(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:n});return isValid(t)?{value:t.value}:{issues:n.common.issues}}catch(o){(null===(r=null===(t=null==o?void 0:o.message)||void 0===t?void 0:t.toLowerCase())||void 0===r?void 0:r.includes("encountered"))&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then((e=>isValid(e)?{value:e.value}:{issues:n.common.issues}))}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:getParsedType(e)},n=this._parse({data:e,path:r.path,parent:r}),o=await(isAsync(n)?n:Promise.resolve(n));return handleResult(r,o)}refine(e,t){const r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const o=e(t),i=()=>n.addIssue({code:ZodIssueCode.custom,...r(t)});return"undefined"!=typeof Promise&&o instanceof Promise?o.then((e=>!!e||(i(),!1))):!!o||(i(),!1)}))}refinement(e,t){return this._refinement(((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1)))}_refinement(e){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this)}promise(){return ZodPromise.create(this,this._def)}or(e){return ZodUnion.create([this,e],this._def)}and(e){return ZodIntersection.create(this,e,this._def)}transform(e){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:t,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:t,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ZodPipeline.create(this,e)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[0-9a-z]+$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nanoidRegex=/^[a-z0-9_-]{21}$/i,jwtRegex=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,durationRegex=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let emojiRegex;const ipv4Regex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4CidrRegex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6Regex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ipv6CidrRegex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64Regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64urlRegex=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dateRegexSource="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",dateRegex=new RegExp(`^${dateRegexSource}$`);function timeRegexSource(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function timeRegex(e){return new RegExp(`^${timeRegexSource(e)}$`)}function datetimeRegex(e){let t=`${dateRegexSource}T${timeRegexSource(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function isValidIP(e,t){return!("v4"!==t&&t||!ipv4Regex.test(e))||!("v6"!==t&&t||!ipv6Regex.test(e))}function isValidJWT(e,t){if(!jwtRegex.test(e))return!1;try{const[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return"object"==typeof o&&null!==o&&(!(!o.typ||!o.alg)&&(!t||o.alg===t))}catch(r){return!1}}function isValidCidr(e,t){return!("v4"!==t&&t||!ipv4CidrRegex.test(e))||!("v6"!==t&&t||!ipv6CidrRegex.test(e))}class ZodString extends ZodType{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==ZodParsedType.string){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:t.parsedType}),INVALID}const t=new ParseStatus;let r;for(const o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("max"===o.kind)e.data.length>o.value&&(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("length"===o.kind){const n=e.data.length>o.value,i=e.data.length<o.value;(n||i)&&(r=this._getOrReturnCtx(e,r),n?addIssueToContext(r,{code:ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&addIssueToContext(r,{code:ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),t.dirty())}else if("email"===o.kind)emailRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"email",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("emoji"===o.kind)emojiRegex||(emojiRegex=new RegExp(_emojiRegex,"u")),emojiRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"emoji",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("uuid"===o.kind)uuidRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"uuid",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("nanoid"===o.kind)nanoidRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"nanoid",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("cuid"===o.kind)cuidRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"cuid",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("cuid2"===o.kind)cuid2Regex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"cuid2",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("ulid"===o.kind)ulidRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"ulid",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(n){r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"url",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()}else if("regex"===o.kind){o.regex.lastIndex=0;o.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"regex",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty())}else if("trim"===o.kind)e.data=e.data.trim();else if("includes"===o.kind)e.data.includes(o.value,o.position)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),t.dirty());else if("toLowerCase"===o.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===o.kind)e.data=e.data.toUpperCase();else if("startsWith"===o.kind)e.data.startsWith(o.value)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:{startsWith:o.value},message:o.message}),t.dirty());else if("endsWith"===o.kind)e.data.endsWith(o.value)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:{endsWith:o.value},message:o.message}),t.dirty());else if("datetime"===o.kind){datetimeRegex(o).test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:"datetime",message:o.message}),t.dirty())}else if("date"===o.kind){dateRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:"date",message:o.message}),t.dirty())}else if("time"===o.kind){timeRegex(o).test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:"time",message:o.message}),t.dirty())}else"duration"===o.kind?durationRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"duration",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()):"ip"===o.kind?isValidIP(e.data,o.version)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"ip",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()):"jwt"===o.kind?isValidJWT(e.data,o.alg)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"jwt",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()):"cidr"===o.kind?isValidCidr(e.data,o.version)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"cidr",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()):"base64"===o.kind?base64Regex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"base64",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()):"base64url"===o.kind?base64urlRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"base64url",code:ZodIssueCode.invalid_string,message:o.message}),t.dirty()):util$1.assertNever(o);return{status:t.value,value:e.data}}_regex(e,t,r){return this.refinement((t=>e.test(t)),{validation:t,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(r)})}_addCheck(e){return new ZodString({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...errorUtil.errToObj(e)})}datetime(e){var t,r;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(r=null==e?void 0:e.local)&&void 0!==r&&r,...errorUtil.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...errorUtil.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...errorUtil.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...errorUtil.errToObj(t)})}nonempty(e){return this.min(1,errorUtil.errToObj(e))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function floatSafeRemainder(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n;return parseInt(e.toFixed(o).replace(".",""))%parseInt(t.toFixed(o).replace(".",""))/Math.pow(10,o)}ZodString.create=e=>{var t;return new ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...processCreateParams(e)})};class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==ZodParsedType.number){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:t.parsedType}),INVALID}let t;const r=new ParseStatus;for(const n of this._def.checks)if("int"===n.kind)util$1.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty())}else"multipleOf"===n.kind?0!==floatSafeRemainder(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.not_finite,message:n.message}),r.dirty()):util$1.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,errorUtil.toString(t))}setLimit(e,t,r,n){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:errorUtil.toString(n)}]})}_addCheck(e){return new ZodNumber({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&util$1.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ZodNumber.create=e=>new ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...processCreateParams(e)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(n){return this._getInvalidInput(e)}if(this._getType(e)!==ZodParsedType.bigint)return this._getInvalidInput(e);let t;const r=new ParseStatus;for(const o of this._def.checks)if("min"===o.kind){(o.inclusive?e.data<o.value:e.data<=o.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty())}else if("max"===o.kind){(o.inclusive?e.data>o.value:e.data>=o.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty())}else"multipleOf"===o.kind?e.data%o.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):util$1.assertNever(o);return{status:r.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:t.parsedType}),INVALID}gte(e,t){return this.setLimit("min",e,!0,errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,errorUtil.toString(t))}setLimit(e,t,r,n){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:errorUtil.toString(n)}]})}_addCheck(e){return new ZodBigInt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ZodBigInt.create=e=>{var t;return new ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...processCreateParams(e)})};class ZodBoolean extends ZodType{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==ZodParsedType.boolean){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:t.parsedType}),INVALID}return OK(e.data)}}ZodBoolean.create=e=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...processCreateParams(e)});class ZodDate extends ZodType{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==ZodParsedType.date){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:t.parsedType}),INVALID}if(isNaN(e.data.getTime())){return addIssueToContext(this._getOrReturnCtx(e),{code:ZodIssueCode.invalid_date}),INVALID}const t=new ParseStatus;let r;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):util$1.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ZodDate({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ZodDate.create=e=>new ZodDate({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(e)});class ZodSymbol extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.symbol){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:t.parsedType}),INVALID}return OK(e.data)}}ZodSymbol.create=e=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(e)});class ZodUndefined extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:t.parsedType}),INVALID}return OK(e.data)}}ZodUndefined.create=e=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(e)});class ZodNull extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.null){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:t.parsedType}),INVALID}return OK(e.data)}}ZodNull.create=e=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(e)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(e){return OK(e.data)}}ZodAny.create=e=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(e)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(e){return OK(e.data)}}ZodUnknown.create=e=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(e)});class ZodNever extends ZodType{_parse(e){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:t.parsedType}),INVALID}}ZodNever.create=e=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(e)});class ZodVoid extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:t.parsedType}),INVALID}return OK(e.data)}}ZodVoid.create=e=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(e)});class ZodArray extends ZodType{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==ZodParsedType.array)return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:t.parsedType}),INVALID;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(e||o)&&(addIssueToContext(t,{code:e?ZodIssueCode.too_big:ZodIssueCode.too_small,minimum:o?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(addIssueToContext(t,{code:ZodIssueCode.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(addIssueToContext(t,{code:ZodIssueCode.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map(((e,r)=>n.type._parseAsync(new ParseInputLazyPath(t,e,t.path,r))))).then((e=>ParseStatus.mergeArray(r,e)));const o=[...t.data].map(((e,r)=>n.type._parseSync(new ParseInputLazyPath(t,e,t.path,r))));return ParseStatus.mergeArray(r,o)}get element(){return this._def.type}min(e,t){return new ZodArray({...this._def,minLength:{value:e,message:errorUtil.toString(t)}})}max(e,t){return new ZodArray({...this._def,maxLength:{value:e,message:errorUtil.toString(t)}})}length(e,t){return new ZodArray({...this._def,exactLength:{value:e,message:errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}function deepPartialify(e){if(e instanceof ZodObject){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=ZodOptional.create(deepPartialify(n))}return new ZodObject({...e._def,shape:()=>t})}return e instanceof ZodArray?new ZodArray({...e._def,type:deepPartialify(e.element)}):e instanceof ZodOptional?ZodOptional.create(deepPartialify(e.unwrap())):e instanceof ZodNullable?ZodNullable.create(deepPartialify(e.unwrap())):e instanceof ZodTuple?ZodTuple.create(e.items.map((e=>deepPartialify(e)))):e}ZodArray.create=(e,t)=>new ZodArray({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(t)});class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=util$1.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==ZodParsedType.object){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:t.parsedType}),INVALID}const{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:o}=this._getCached(),i=[];if(!(this._def.catchall instanceof ZodNever&&"strip"===this._def.unknownKeys))for(const s in r.data)o.includes(s)||i.push(s);const a=[];for(const s of o){const e=n[s],t=r.data[s];a.push({key:{status:"valid",value:s},value:e._parse(new ParseInputLazyPath(r,t,r.path,s)),alwaysSet:s in r.data})}if(this._def.catchall instanceof ZodNever){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of i)a.push({key:{status:"valid",value:t},value:{status:"valid",value:r.data[t]}});else if("strict"===e)i.length>0&&(addIssueToContext(r,{code:ZodIssueCode.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const n=r.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new ParseInputLazyPath(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of a){const r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e})).then((e=>ParseStatus.mergeObjectSync(t,e))):ParseStatus.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var n,o,i,a;const s=null!==(i=null===(o=(n=this._def).errorMap)||void 0===o?void 0:o.call(n,t,r).message)&&void 0!==i?i:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=errorUtil.errToObj(e).message)&&void 0!==a?a:s}:{message:s}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(e){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ZodObject({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ZodObject({...this._def,catchall:e})}pick(e){const t={};return util$1.objectKeys(e).forEach((r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])})),new ZodObject({...this._def,shape:()=>t})}omit(e){const t={};return util$1.objectKeys(this.shape).forEach((r=>{e[r]||(t[r]=this.shape[r])})),new ZodObject({...this._def,shape:()=>t})}deepPartial(){return deepPartialify(this)}partial(e){const t={};return util$1.objectKeys(this.shape).forEach((r=>{const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()})),new ZodObject({...this._def,shape:()=>t})}required(e){const t={};return util$1.objectKeys(this.shape).forEach((r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof ZodOptional;)e=e._def.innerType;t[r]=e}})),new ZodObject({...this._def,shape:()=>t})}keyof(){return createZodEnum(util$1.objectKeys(this.shape))}}ZodObject.create=(e,t)=>new ZodObject({shape:()=>e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(t)}),ZodObject.strictCreate=(e,t)=>new ZodObject({shape:()=>e,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(t)}),ZodObject.lazycreate=(e,t)=>new ZodObject({shape:e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(t)});class ZodUnion extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map((async e=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const r=e.map((e=>new ZodError(e.ctx.common.issues)));return addIssueToContext(t,{code:ZodIssueCode.invalid_union,unionErrors:r}),INVALID}));{let e;const n=[];for(const i of r){const r={...t,common:{...t.common,issues:[]},parent:null},o=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const o=n.map((e=>new ZodError(e)));return addIssueToContext(t,{code:ZodIssueCode.invalid_union,unionErrors:o}),INVALID}}get options(){return this._def.options}}ZodUnion.create=(e,t)=>new ZodUnion({options:e,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(t)});const getDiscriminator=e=>e instanceof ZodLazy?getDiscriminator(e.schema):e instanceof ZodEffects?getDiscriminator(e.innerType()):e instanceof ZodLiteral?[e.value]:e instanceof ZodEnum?e.options:e instanceof ZodNativeEnum?util$1.objectValues(e.enum):e instanceof ZodDefault?getDiscriminator(e._def.innerType):e instanceof ZodUndefined?[void 0]:e instanceof ZodNull?[null]:e instanceof ZodOptional?[void 0,...getDiscriminator(e.unwrap())]:e instanceof ZodNullable?[null,...getDiscriminator(e.unwrap())]:e instanceof ZodBranded||e instanceof ZodReadonly?getDiscriminator(e.unwrap()):e instanceof ZodCatch?getDiscriminator(e._def.innerType):[];class ZodDiscriminatedUnion extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ZodParsedType.object)return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:t.parsedType}),INVALID;const r=this.discriminator,n=t.data[r],o=this.optionsMap.get(n);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._parseSync({data:t.data,path:t.path,parent:t}):(addIssueToContext(t,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const n=new Map;for(const o of t){const t=getDiscriminator(o.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(n.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);n.set(r,o)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...processCreateParams(r)})}}function mergeValues(e,t){const r=getParsedType(e),n=getParsedType(t);if(e===t)return{valid:!0,data:e};if(r===ZodParsedType.object&&n===ZodParsedType.object){const r=util$1.objectKeys(t),n=util$1.objectKeys(e).filter((e=>-1!==r.indexOf(e))),o={...e,...t};for(const i of n){const r=mergeValues(e[i],t[i]);if(!r.valid)return{valid:!1};o[i]=r.data}return{valid:!0,data:o}}if(r===ZodParsedType.array&&n===ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let n=0;n<e.length;n++){const o=mergeValues(e[n],t[n]);if(!o.valid)return{valid:!1};r.push(o.data)}return{valid:!0,data:r}}return r===ZodParsedType.date&&n===ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ZodIntersection extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(isAborted(e)||isAborted(n))return INVALID;const o=mergeValues(e.value,n.value);return o.valid?((isDirty(e)||isDirty(n))&&t.dirty(),{status:t.value,value:o.data}):(addIssueToContext(r,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ZodIntersection.create=(e,t,r)=>new ZodIntersection({left:e,right:t,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(r)});class ZodTuple extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ZodParsedType.array)return addIssueToContext(r,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:r.parsedType}),INVALID;if(r.data.length<this._def.items.length)return addIssueToContext(r,{code:ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),INVALID;!this._def.rest&&r.data.length>this._def.items.length&&(addIssueToContext(r,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new ParseInputLazyPath(r,e,r.path,t)):null})).filter((e=>!!e));return r.common.async?Promise.all(n).then((e=>ParseStatus.mergeArray(t,e))):ParseStatus.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new ZodTuple({...this._def,rest:e})}}ZodTuple.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:e,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(t)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ZodParsedType.object)return addIssueToContext(r,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:r.parsedType}),INVALID;const n=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)n.push({key:o._parse(new ParseInputLazyPath(r,a,r.path,a)),value:i._parse(new ParseInputLazyPath(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ParseStatus.mergeObjectAsync(t,n):ParseStatus.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new ZodRecord(t instanceof ZodType?{keyType:e,valueType:t,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(r)}:{keyType:ZodString.create(),valueType:e,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(t)})}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ZodParsedType.map)return addIssueToContext(r,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:r.parsedType}),INVALID;const n=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map((([e,t],i)=>({key:n._parse(new ParseInputLazyPath(r,e,r.path,[i,"key"])),value:o._parse(new ParseInputLazyPath(r,t,r.path,[i,"value"]))})));if(r.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const r of i){const n=await r.key,o=await r.value;if("aborted"===n.status||"aborted"===o.status)return INVALID;"dirty"!==n.status&&"dirty"!==o.status||t.dirty(),e.set(n.value,o.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const r of i){const n=r.key,o=r.value;if("aborted"===n.status||"aborted"===o.status)return INVALID;"dirty"!==n.status&&"dirty"!==o.status||t.dirty(),e.set(n.value,o.value)}return{status:t.value,value:e}}}}ZodMap.create=(e,t,r)=>new ZodMap({valueType:t,keyType:e,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(r)});class ZodSet extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ZodParsedType.set)return addIssueToContext(r,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:r.parsedType}),INVALID;const n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(addIssueToContext(r,{code:ZodIssueCode.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(addIssueToContext(r,{code:ZodIssueCode.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const o=this._def.valueType;function i(e){const r=new Set;for(const n of e){if("aborted"===n.status)return INVALID;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}const a=[...r.data.values()].map(((e,t)=>o._parse(new ParseInputLazyPath(r,e,r.path,t))));return r.common.async?Promise.all(a).then((e=>i(e))):i(a)}min(e,t){return new ZodSet({...this._def,minSize:{value:e,message:errorUtil.toString(t)}})}max(e,t){return new ZodSet({...this._def,maxSize:{value:e,message:errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ZodSet.create=(e,t)=>new ZodSet({valueType:e,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(t)});class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ZodParsedType.function)return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:t.parsedType}),INVALID;function r(e,r){return makeIssue({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,getErrorMap(),errorMap].filter((e=>!!e)),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:r}})}function n(e,r){return makeIssue({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,getErrorMap(),errorMap].filter((e=>!!e)),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:r}})}const o={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof ZodPromise){const e=this;return OK((async function(...t){const a=new ZodError([]),s=await e._def.args.parseAsync(t,o).catch((e=>{throw a.addIssue(r(t,e)),a})),c=await Reflect.apply(i,this,s);return await e._def.returns._def.type.parseAsync(c,o).catch((e=>{throw a.addIssue(n(c,e)),a}))}))}{const e=this;return OK((function(...t){const a=e._def.args.safeParse(t,o);if(!a.success)throw new ZodError([r(t,a.error)]);const s=Reflect.apply(i,this,a.data),c=e._def.returns.safeParse(s,o);if(!c.success)throw new ZodError([n(s,c.error)]);return c.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ZodFunction({...this._def,args:ZodTuple.create(e).rest(ZodUnknown.create())})}returns(e){return new ZodFunction({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new ZodFunction({args:e||ZodTuple.create([]).rest(ZodUnknown.create()),returns:t||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(r)})}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ZodLazy.create=(e,t)=>new ZodLazy({getter:e,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(t)});class ZodLiteral extends ZodType{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{received:t.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}function createZodEnum(e,t){return new ZodEnum({values:e,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(t)})}ZodLiteral.create=(e,t)=>new ZodLiteral({value:e,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(t)});class ZodEnum extends ZodType{constructor(){super(...arguments),_ZodEnum_cache.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return addIssueToContext(t,{expected:util$1.joinValues(r),received:t.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodEnum_cache)||__classPrivateFieldSet(this,_ZodEnum_cache,new Set(this._def.values)),!__classPrivateFieldGet(this,_ZodEnum_cache).has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return addIssueToContext(t,{received:t.data,code:ZodIssueCode.invalid_enum_value,options:r}),INVALID}return OK(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ZodEnum.create(e,{...this._def,...t})}exclude(e,t=this._def){return ZodEnum.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}_ZodEnum_cache=new WeakMap,ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{constructor(){super(...arguments),_ZodNativeEnum_cache.set(this,void 0)}_parse(e){const t=util$1.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ZodParsedType.string&&r.parsedType!==ZodParsedType.number){const e=util$1.objectValues(t);return addIssueToContext(r,{expected:util$1.joinValues(e),received:r.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodNativeEnum_cache)||__classPrivateFieldSet(this,_ZodNativeEnum_cache,new Set(util$1.getValidEnumValues(this._def.values))),!__classPrivateFieldGet(this,_ZodNativeEnum_cache).has(e.data)){const e=util$1.objectValues(t);return addIssueToContext(r,{received:r.data,code:ZodIssueCode.invalid_enum_value,options:e}),INVALID}return OK(e.data)}get enum(){return this._def.values}}_ZodNativeEnum_cache=new WeakMap,ZodNativeEnum.create=(e,t)=>new ZodNativeEnum({values:e,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(t)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ZodParsedType.promise&&!1===t.common.async)return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:t.parsedType}),INVALID;const r=t.parsedType===ZodParsedType.promise?t.data:Promise.resolve(t.data);return OK(r.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}ZodPromise.create=(e,t)=>new ZodPromise({type:e,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(t)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:e=>{addIssueToContext(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),"preprocess"===n.type){const e=n.transform(r.data,o);if(r.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return INVALID;const n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?INVALID:"dirty"===n.status||"dirty"===t.value?DIRTY(n.value):n}));{if("aborted"===t.value)return INVALID;const n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?INVALID:"dirty"===n.status||"dirty"===t.value?DIRTY(n.value):n}}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,o);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===r.common.async){const n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?INVALID:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((r=>"aborted"===r.status?INVALID:("dirty"===r.status&&t.dirty(),e(r.value).then((()=>({status:t.value,value:r.value}))))))}if("transform"===n.type){if(!1===r.common.async){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!isValid(e))return e;const i=n.transform(e.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((e=>isValid(e)?Promise.resolve(n.transform(e.value,o)).then((e=>({status:t.value,value:e}))):e))}util$1.assertNever(n)}}ZodEffects.create=(e,t,r)=>new ZodEffects({schema:e,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:t,...processCreateParams(r)}),ZodEffects.createWithPreprocess=(e,t,r)=>new ZodEffects({schema:t,effect:{type:"preprocess",transform:e},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(r)});class ZodOptional extends ZodType{_parse(e){return this._getType(e)===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ZodOptional.create=(e,t)=>new ZodOptional({innerType:e,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(t)});class ZodNullable extends ZodType{_parse(e){return this._getType(e)===ZodParsedType.null?OK(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ZodNullable.create=(e,t)=>new ZodNullable({innerType:e,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(t)});class ZodDefault extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===ZodParsedType.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ZodDefault.create=(e,t)=>new ZodDefault({innerType:e,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...processCreateParams(t)});class ZodCatch extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return isAsync(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new ZodError(r.common.issues)},input:r.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new ZodError(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(e,t)=>new ZodCatch({innerType:e,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...processCreateParams(t)});class ZodNaN extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.nan){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:t.parsedType}),INVALID}return{status:"valid",value:e.data}}}ZodNaN.create=e=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(e)});const BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?INVALID:"dirty"===e.status?(t.dirty(),DIRTY(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})()}{const e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new ZodPipeline({in:e,out:t,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(e){const t=this._def.innerType._parse(e),r=e=>(isValid(e)&&(e.value=Object.freeze(e.value)),e);return isAsync(t)?t.then((e=>r(e))):r(t)}unwrap(){return this._def.innerType}}function cleanParams(e,t){const r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r}function custom(e,t={},r){return e?ZodAny.create().superRefine(((n,o)=>{var i,a;const s=e(n);if(s instanceof Promise)return s.then((e=>{var i,a;if(!e){const e=cleanParams(t,n),s=null===(a=null!==(i=e.fatal)&&void 0!==i?i:r)||void 0===a||a;o.addIssue({code:"custom",...e,fatal:s})}}));if(!s){const e=cleanParams(t,n),s=null===(a=null!==(i=e.fatal)&&void 0!==i?i:r)||void 0===a||a;o.addIssue({code:"custom",...e,fatal:s})}})):ZodAny.create()}ZodReadonly.create=(e,t)=>new ZodReadonly({innerType:e,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(t)});const late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind,ZodFirstPartyTypeKind2;ZodFirstPartyTypeKind2=ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}),ZodFirstPartyTypeKind2.ZodString="ZodString",ZodFirstPartyTypeKind2.ZodNumber="ZodNumber",ZodFirstPartyTypeKind2.ZodNaN="ZodNaN",ZodFirstPartyTypeKind2.ZodBigInt="ZodBigInt",ZodFirstPartyTypeKind2.ZodBoolean="ZodBoolean",ZodFirstPartyTypeKind2.ZodDate="ZodDate",ZodFirstPartyTypeKind2.ZodSymbol="ZodSymbol",ZodFirstPartyTypeKind2.ZodUndefined="ZodUndefined",ZodFirstPartyTypeKind2.ZodNull="ZodNull",ZodFirstPartyTypeKind2.ZodAny="ZodAny",ZodFirstPartyTypeKind2.ZodUnknown="ZodUnknown",ZodFirstPartyTypeKind2.ZodNever="ZodNever",ZodFirstPartyTypeKind2.ZodVoid="ZodVoid",ZodFirstPartyTypeKind2.ZodArray="ZodArray",ZodFirstPartyTypeKind2.ZodObject="ZodObject",ZodFirstPartyTypeKind2.ZodUnion="ZodUnion",ZodFirstPartyTypeKind2.ZodDiscriminatedUnion="ZodDiscriminatedUnion",ZodFirstPartyTypeKind2.ZodIntersection="ZodIntersection",ZodFirstPartyTypeKind2.ZodTuple="ZodTuple",ZodFirstPartyTypeKind2.ZodRecord="ZodRecord",ZodFirstPartyTypeKind2.ZodMap="ZodMap",ZodFirstPartyTypeKind2.ZodSet="ZodSet",ZodFirstPartyTypeKind2.ZodFunction="ZodFunction",ZodFirstPartyTypeKind2.ZodLazy="ZodLazy",ZodFirstPartyTypeKind2.ZodLiteral="ZodLiteral",ZodFirstPartyTypeKind2.ZodEnum="ZodEnum",ZodFirstPartyTypeKind2.ZodEffects="ZodEffects",ZodFirstPartyTypeKind2.ZodNativeEnum="ZodNativeEnum",ZodFirstPartyTypeKind2.ZodOptional="ZodOptional",ZodFirstPartyTypeKind2.ZodNullable="ZodNullable",ZodFirstPartyTypeKind2.ZodDefault="ZodDefault",ZodFirstPartyTypeKind2.ZodCatch="ZodCatch",ZodFirstPartyTypeKind2.ZodPromise="ZodPromise",ZodFirstPartyTypeKind2.ZodBranded="ZodBranded",ZodFirstPartyTypeKind2.ZodPipeline="ZodPipeline",ZodFirstPartyTypeKind2.ZodReadonly="ZodReadonly";const instanceOfType=(e,t={message:`Input not instance of ${e.name}`})=>custom((t=>t instanceof e),t),stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,ostring=()=>stringType().optional(),onumber=()=>numberType().optional(),oboolean=()=>booleanType().optional(),coerce={string:e=>ZodString.create({...e,coerce:!0}),number:e=>ZodNumber.create({...e,coerce:!0}),boolean:e=>ZodBoolean.create({...e,coerce:!0}),bigint:e=>ZodBigInt.create({...e,coerce:!0}),date:e=>ZodDate.create({...e,coerce:!0})},NEVER=INVALID;var z=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap:setErrorMap,getErrorMap:getErrorMap,makeIssue:makeIssue,EMPTY_PATH:EMPTY_PATH,addIssueToContext:addIssueToContext,ParseStatus:ParseStatus,INVALID:INVALID,DIRTY:DIRTY,OK:OK,isAborted:isAborted,isDirty:isDirty,isValid:isValid,isAsync:isAsync,get util(){return util$1},get objectUtil(){return objectUtil},ZodParsedType:ZodParsedType,getParsedType:getParsedType,ZodType:ZodType,datetimeRegex:datetimeRegex,ZodString:ZodString,ZodNumber:ZodNumber,ZodBigInt:ZodBigInt,ZodBoolean:ZodBoolean,ZodDate:ZodDate,ZodSymbol:ZodSymbol,ZodUndefined:ZodUndefined,ZodNull:ZodNull,ZodAny:ZodAny,ZodUnknown:ZodUnknown,ZodNever:ZodNever,ZodVoid:ZodVoid,ZodArray:ZodArray,ZodObject:ZodObject,ZodUnion:ZodUnion,ZodDiscriminatedUnion:ZodDiscriminatedUnion,ZodIntersection:ZodIntersection,ZodTuple:ZodTuple,ZodRecord:ZodRecord,ZodMap:ZodMap,ZodSet:ZodSet,ZodFunction:ZodFunction,ZodLazy:ZodLazy,ZodLiteral:ZodLiteral,ZodEnum:ZodEnum,ZodNativeEnum:ZodNativeEnum,ZodPromise:ZodPromise,ZodEffects:ZodEffects,ZodTransformer:ZodEffects,ZodOptional:ZodOptional,ZodNullable:ZodNullable,ZodDefault:ZodDefault,ZodCatch:ZodCatch,ZodNaN:ZodNaN,BRAND:BRAND,ZodBranded:ZodBranded,ZodPipeline:ZodPipeline,ZodReadonly:ZodReadonly,custom:custom,Schema:ZodType,ZodSchema:ZodType,late:late,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},coerce:coerce,any:anyType,array:arrayType,bigint:bigIntType,boolean:booleanType,date:dateType,discriminatedUnion:discriminatedUnionType,effect:effectsType,enum:enumType,function:functionType,instanceof:instanceOfType,intersection:intersectionType,lazy:lazyType,literal:literalType,map:mapType,nan:nanType,nativeEnum:nativeEnumType,never:neverType,null:nullType,nullable:nullableType,number:numberType,object:objectType,oboolean:oboolean,onumber:onumber,optional:optionalType,ostring:ostring,pipeline:pipelineType,preprocess:preprocessType,promise:promiseType,record:recordType,set:setType,strictObject:strictObjectType,string:stringType,symbol:symbolType,transformer:effectsType,tuple:tupleType,undefined:undefinedType,union:unionType,unknown:unknownType,void:voidType,NEVER:NEVER,ZodIssueCode:ZodIssueCode,quotelessJson:quotelessJson,ZodError:ZodError});function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString:toString}=Object.prototype,{getPrototypeOf:getPrototypeOf}=Object,kindOf=(e=>t=>{const r=toString.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isBoolean=e=>!0===e||!1===e,isPlainObject=e=>{if("object"!==kindOf(e))return!1;const t=getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||isFunction(e.append)&&("formdata"===(t=kindOf(e))||"object"===t&&isFunction(e.toString)&&"[object FormData]"===e.toString()))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),isArray(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,e)}}function findKey(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global$2,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},r=(r,n)=>{const o=e&&findKey(t,n)||n;isPlainObject(t[o])&&isPlainObject(r)?t[o]=merge(t[o],r):isPlainObject(r)?t[o]=merge({},r):isArray(r)?t[o]=r.slice():t[o]=r};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&forEach(arguments[n],r);return t}const extend=(e,t,r,{allOwnKeys:n}={})=>(forEach(t,((t,n)=>{r&&isFunction(t)?e[n]=bind(t,r):e[n]=t}),{allOwnKeys:n}),e),stripBOM=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject=(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},isTypedArray$1=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll=(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),hasOwnProperty=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},freezeMethods=e=>{reduceDescriptors(e,((t,r)=>{if(isFunction(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];isFunction(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet=(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return isArray(e)?n(e):n(String(e).split(t)),r},noop=()=>{},toFiniteNumber=(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const toJSONObject=e=>{const t=new Array(10),r=(e,n)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=isArray(e)?[]:{};return forEach(e,((e,t)=>{const i=r(e,n+1);!isUndefined(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((e,t)=>(_global.addEventListener("message",(({source:r,data:n})=>{r===_global&&n===e&&t.length&&t.shift()()}),!1),r=>{t.push(r),_global.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))("function"==typeof setImmediate,isFunction(_global.postMessage)),asap="undefined"!=typeof queueMicrotask?queueMicrotask.bind(_global):void 0!==process$1$1&&process$1$1.nextTick||_setImmediate,utils$1={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isReadableStream:isReadableStream,isRequest:isRequest,isResponse:isResponse,isHeaders:isHeaders,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray$1,isFileList:isFileList,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable,setImmediate:_setImmediate,asap:asap};function AxiosError$1(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}utils$1.inherits(AxiosError$1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{descriptors[e]={value:e}})),Object.defineProperties(AxiosError$1,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError$1.from=(e,t,r,n,o,i)=>{const a=Object.create(prototype$1);return utils$1.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),AxiosError$1.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map((function(e,t){return e=removeBrackets(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,(function(e){return/^is[A-Z]/.test(e)}));function toFormData$1(e,t,r){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=utils$1.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!utils$1.isUndefined(t[e])}))).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(utils$1.isDate(e))return e.toISOString();if(!s&&utils$1.isBlob(e))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(e)||utils$1.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(utils$1.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(utils$1.isArray(e)&&isFlatArray(e)||(utils$1.isFileList(e)||utils$1.endsWith(r,"[]"))&&(s=utils$1.toArray(e)))return r=removeBrackets(r),s.forEach((function(e,n){!utils$1.isUndefined(e)&&null!==e&&t.append(!0===a?renderKey([r],n,i):null===a?r:r+"[]",c(e))})),!1;return!!isVisitable(e)||(t.append(renderKey(o,r,i),c(e)),!1)}const l=[],d=Object.assign(predicates,{defaultVisitor:u,convertValue:c,isVisitable:isVisitable});if(!utils$1.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!utils$1.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),utils$1.forEach(r,(function(r,i){!0===(!(utils$1.isUndefined(r)||null===r)&&o.call(t,r,utils$1.isString(i)?i.trim():i,n,d))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode;utils$1.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}prototype.append=function(e,t){this._pairs.push([e,t])},prototype.toString=function(e){const t=e?function(t){return e.call(this,t,encode$1)}:encode$1;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class InterceptorManager{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){utils$1.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1="undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData$1="undefined"!=typeof FormData?FormData:null,Blob$1="undefined"!=typeof Blob?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv="undefined"!=typeof window&&"undefined"!=typeof document,_navigator="object"==typeof navigator&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hasBrowserEnv,hasStandardBrowserEnv:hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv:hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin:origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return platform.isNode&&utils$1.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function arrayToObject(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function formDataToJSON(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&utils$1.isArray(n)?n.length:i,s)return utils$1.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&utils$1.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&utils$1.isArray(n[i])&&(n[i]=arrayToObject(n[i])),!a}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const r={};return utils$1.forEachEntry(e,((e,n)=>{t(parsePropPath(e),n,r,0)})),r}return null}function stringifySafely(e,t,r){if(utils$1.isString(e))try{return(t||JSON.parse)(e),utils$1.trim(e)}catch(n){if("SyntaxError"!==n.name)throw n}return(r||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=utils$1.isObject(e);o&&utils$1.isHTMLForm(e)&&(e=new FormData(e));if(utils$1.isFormData(e))return n?JSON.stringify(formDataToJSON(e)):e;if(utils$1.isArrayBuffer(e)||utils$1.isBuffer(e)||utils$1.isStream(e)||utils$1.isFile(e)||utils$1.isBlob(e)||utils$1.isReadableStream(e))return e;if(utils$1.isArrayBufferView(e))return e.buffer;if(utils$1.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(e,this.formSerializer).toString();if((i=utils$1.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData$1(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),stringifySafely(e)):e}],transformResponse:[function(e){const t=this.transitional||defaults.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(utils$1.isResponse(e)||utils$1.isReadableStream(e))return e;if(e&&utils$1.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(o){if(r){if("SyntaxError"===o.name)throw AxiosError$1.from(o,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],(e=>{defaults.headers[e]={}}));const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&ignoreDuplicateOf[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,r,n,o){return utils$1.isFunction(n)?n.call(this,t,r):(o&&(t=r),utils$1.isString(t)?utils$1.isString(n)?-1!==t.indexOf(n):utils$1.isRegExp(n)?n.test(t):void 0:void 0)}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}function buildAccessors(e,t){const r=utils$1.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}let AxiosHeaders$1=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=normalizeHeader(t);if(!o)throw new Error("header name must be a non-empty string");const i=utils$1.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=normalizeValue(e))}const i=(e,t)=>utils$1.forEach(e,((e,r)=>o(e,r,t)));if(utils$1.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(utils$1.isString(e)&&(e=e.trim())&&!isValidHeaderName(e))i(parseHeaders(e),t);else if(utils$1.isHeaders(e))for(const[a,s]of e.entries())o(s,a,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=normalizeHeader(e)){const r=utils$1.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return parseTokens(e);if(utils$1.isFunction(t))return t.call(this,e,r);if(utils$1.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=utils$1.findKey(this,e);return!(!r||void 0===this[r]||t&&!matchHeaderValue(this,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=normalizeHeader(e)){const o=utils$1.findKey(r,e);!o||t&&!matchHeaderValue(r,r[o],o,t)||(delete r[o],n=!0)}}return utils$1.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!matchHeaderValue(this,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return utils$1.forEach(this,((n,o)=>{const i=utils$1.findKey(r,o);if(i)return t[i]=normalizeValue(n),void delete t[o];const a=e?formatHeader(o):String(o).trim();a!==o&&delete t[o],t[a]=normalizeValue(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return utils$1.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&utils$1.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[$internals]=this[$internals]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=normalizeHeader(e);t[n]||(buildAccessors(r,e),t[n]=!0)}return utils$1.isArray(e)?e.forEach(n):n(e),this}};function transformData(e,t){const r=this||defaults,n=t||r,o=AxiosHeaders$1.from(n.headers);let i=n.data;return utils$1.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function isCancel$1(e){return!(!e||!e.__CANCEL__)}function CanceledError$1(e,t,r){AxiosError$1.call(this,null==e?"canceled":e,AxiosError$1.ERR_CANCELED,t,r),this.name="CanceledError"}function settle(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new AxiosError$1("Request failed with status code "+r.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,d=0;for(;l!==i;)d+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const p=u&&c-u;return p?Math.round(1e3*d/p):void 0}}function throttle(e,t){let r,n,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout((()=>{n=null,a(r)}),i-s)))},()=>r&&a(r)]}AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders$1.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),utils$1.freezeMethods(AxiosHeaders$1),utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});const progressEventReducer=(e,t,r=3)=>{let n=0;const o=speedometer(50,250);return throttle((r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),r)},progressEventDecorator=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},asyncDecorator=e=>(...t)=>utils$1.asap((()=>e(...t))),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,platform.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];utils$1.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),utils$1.isString(n)&&a.push("path="+n),utils$1.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,r){let n=!isAbsoluteURL(t);return e&&(n||0==r)?combineURLs(e,t):t}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,t){t=t||{};const r={};function n(e,t,r,n){return utils$1.isPlainObject(e)&&utils$1.isPlainObject(t)?utils$1.merge.call({caseless:n},e,t):utils$1.isPlainObject(t)?utils$1.merge({},t):utils$1.isArray(t)?t.slice():t}function o(e,t,r,o){return utils$1.isUndefined(t)?utils$1.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!utils$1.isUndefined(t))return n(void 0,t)}function a(e,t){return utils$1.isUndefined(t)?utils$1.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(headersToObject(e),headersToObject(t),0,!0)};return utils$1.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,a=i(e[n],t[n],n);utils$1.isUndefined(a)&&i!==s||(r[n]=a)})),r}const resolveConfig=e=>{const t=mergeConfig$1({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:c}=t;if(t.headers=s=AxiosHeaders$1.from(s),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),utils$1.isFormData(n))if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(r=s.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(platform.hasStandardBrowserEnv&&(o&&utils$1.isFunction(o)&&(o=o(t)),o||!1!==o&&isURLSameOrigin(t.url))){const e=i&&a&&cookies.read(a);e&&s.set(i,e)}return t},isXHRAdapterSupported="undefined"!=typeof XMLHttpRequest,xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise((function(t,r){const n=resolveConfig(e);let o=n.data;const i=AxiosHeaders$1.from(n.headers).normalize();let a,s,c,u,l,{responseType:d,onUploadProgress:p,onDownloadProgress:f}=n;function h(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function y(){if(!m)return;const n=AxiosHeaders$1.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());settle((function(e){t(e),h()}),(function(e){r(e),h()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:n,config:e,request:m}),m=null}m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(r(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||transitionalDefaults;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new AxiosError$1(t,o.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&utils$1.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),utils$1.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),d&&"json"!==d&&(m.responseType=n.responseType),f&&([c,l]=progressEventReducer(f,!0),m.addEventListener("progress",c)),p&&m.upload&&([s,u]=progressEventReducer(p),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=t=>{m&&(r(!t||t.type?new CanceledError$1(null,e,m):t),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const g=parseProtocol(n.url);g&&-1===platform.protocols.indexOf(g)?r(new AxiosError$1("Unsupported protocol "+g+":",AxiosError$1.ERR_BAD_REQUEST,e)):m.send(o||null)}))},composeSignals=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof AxiosError$1?t:new CanceledError$1(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new AxiosError$1(`timeout ${t} of ms exceeded`,AxiosError$1.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=n;return s.unsubscribe=()=>utils$1.asap(a),s}},streamChunk=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},readBytes=async function*(e,t){for await(const r of readStream(e))yield*streamChunk(r,t)},readStream=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},trackStream=(e,t,r,n)=>{const o=readBytes(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(t){throw s(t),t}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},isFetchSupported="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,isReadableStreamSupported=isFetchSupported&&"function"==typeof ReadableStream,encodeText=isFetchSupported&&("function"==typeof TextEncoder?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),test=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},supportsRequestStream=isReadableStreamSupported&&test((()=>{let e=!1;const t=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),DEFAULT_CHUNK_SIZE=65536,supportsResponseStream=isReadableStreamSupported&&test((()=>utils$1.isReadableStream(new Response("").body))),resolvers={stream:supportsResponseStream&&(e=>e.body)};isFetchSupported&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!resolvers[t]&&(resolvers[t]=utils$1.isFunction(e[t])?e=>e[t]():(e,r)=>{throw new AxiosError$1(`Response type '${t}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,r)})}))})(new Response);const getBodyLength=async e=>{if(null==e)return 0;if(utils$1.isBlob(e))return e.size;if(utils$1.isSpecCompliantForm(e)){const t=new Request(platform.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return utils$1.isArrayBufferView(e)||utils$1.isArrayBuffer(e)?e.byteLength:(utils$1.isURLSearchParams(e)&&(e+=""),utils$1.isString(e)?(await encodeText(e)).byteLength:void 0)},resolveBodyLength=async(e,t)=>{const r=utils$1.toFiniteNumber(e.getContentLength());return null==r?getBodyLength(t):r},fetchAdapter=isFetchSupported&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:l,withCredentials:d="same-origin",fetchOptions:p}=resolveConfig(e);u=u?(u+"").toLowerCase():"text";let f,h=composeSignals([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(c&&supportsRequestStream&&"get"!==r&&"head"!==r&&0!==(y=await resolveBodyLength(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(utils$1.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=progressEventDecorator(y,progressEventReducer(asyncDecorator(c)));n=trackStream(r.body,DEFAULT_CHUNK_SIZE,e,t)}}utils$1.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;f=new Request(t,{...p,signal:h,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?d:void 0});let i=await fetch(f);const a=supportsResponseStream&&("stream"===u||"response"===u);if(supportsResponseStream&&(s||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=utils$1.toFiniteNumber(i.headers.get("content-length")),[r,n]=s&&progressEventDecorator(t,progressEventReducer(asyncDecorator(s),!0))||[];i=new Response(trackStream(i.body,DEFAULT_CHUNK_SIZE,r,(()=>{n&&n(),m&&m()})),e)}u=u||"text";let g=await resolvers[utils$1.findKey(resolvers,u)||"text"](i,e);return!a&&m&&m(),await new Promise(((t,r)=>{settle(t,r,{data:g,headers:AxiosHeaders$1.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})}))}catch(g){if(m&&m(),g&&"TypeError"===g.name&&/fetch/i.test(g.message))throw Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,f),{cause:g.cause||g});throw AxiosError$1.from(g,g&&g.code,e,f)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}}));const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$1.isFunction(e)||null===e||!1===e,adapters={getAdapter:e=>{e=utils$1.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!isResolvedHandle(r)&&(n=knownAdapters[(t=String(r)).toLowerCase()],void 0===n))throw new AxiosError$1(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new AxiosError$1("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters.getAdapter(e.adapter||defaults.adapter)(e).then((function(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=AxiosHeaders$1.from(t.headers),t}),(function(t){return isCancel$1(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=AxiosHeaders$1.from(t.response.headers))),Promise.reject(t)}))}const VERSION$1="1.8.4",validators$1={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{validators$1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const deprecatedWarnings={};function assertOptions(e,t,r){if("object"!=typeof e)throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new AxiosError$1("option "+i+" must be "+r,AxiosError$1.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new AxiosError$1("Unknown option "+i,AxiosError$1.ERR_BAD_OPTION)}}validators$1.transitional=function(e,t,r){function n(e,t){return"[Axios v"+VERSION$1+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new AxiosError$1(n(o," has been removed"+(t?" in "+t:"")),AxiosError$1.ERR_DEPRECATED);return t&&!deprecatedWarnings[o]&&(deprecatedWarnings[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},validators$1.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const validator={assertOptions:assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(e){this.defaults=e,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{r.stack?t&&!String(r.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+t):r.stack=t}catch(n){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig$1(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),null!=n&&(utils$1.isFunction(n)?t.paramsSerializer={serialize:n}:validator.assertOptions(n,{encode:validators.function,serialize:validators.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),validator.assertOptions(t,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&utils$1.merge(o.common,o[t.method]);o&&utils$1.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=AxiosHeaders$1.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,d=0;if(!s){const e=[dispatchRequest.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=a.length;let p=t;for(d=0;d<l;){const e=a[d++],t=a[d++];try{p=e(p)}catch(f){t.call(this,f);break}}try{u=dispatchRequest.call(this,p)}catch(f){return Promise.reject(f)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return buildURL(buildFullPath((e=mergeConfig$1(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],(function(e){Axios$1.prototype[e]=function(t,r){return this.request(mergeConfig$1(r||{},{method:e,url:t,data:(r||{}).data}))}})),utils$1.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(mergeConfig$1(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Axios$1.prototype[e]=t(),Axios$1.prototype[e+"Form"]=t(!0)}));let CancelToken$1=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new CanceledError$1(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e((function(e){t=e})),cancel:t}}};function spread$1(e){return function(t){return e.apply(null,t)}}function isAxiosError$1(e){return utils$1.isObject(e)&&!0===e.isAxiosError}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};function createInstance(e){const t=new Axios$1(e),r=bind(Axios$1.prototype.request,t);return utils$1.extend(r,Axios$1.prototype,t,{allOwnKeys:!0}),utils$1.extend(r,t,null,{allOwnKeys:!0}),r.create=function(t){return createInstance(mergeConfig$1(e,t))},r}Object.entries(HttpStatusCode$1).forEach((([e,t])=>{HttpStatusCode$1[t]=e}));const axios=createInstance(defaults);axios.Axios=Axios$1,axios.CanceledError=CanceledError$1,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel$1,axios.VERSION=VERSION$1,axios.toFormData=toFormData$1,axios.AxiosError=AxiosError$1,axios.Cancel=axios.CanceledError,axios.all=function(e){return Promise.all(e)},axios.spread=spread$1,axios.isAxiosError=isAxiosError$1,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const{Axios:Axios,AxiosError:AxiosError,CanceledError:CanceledError,isCancel:isCancel,CancelToken:CancelToken,VERSION:VERSION,all:all,Cancel:Cancel,isAxiosError:isAxiosError,spread:spread,toFormData:toFormData,AxiosHeaders:AxiosHeaders,HttpStatusCode:HttpStatusCode,formToJSON:formToJSON,getAdapter:getAdapter,mergeConfig:mergeConfig}=axios;var lib={},proto={},hasRequiredProto,hasRequiredLib;function requireProto(){if(hasRequiredProto)return proto;hasRequiredProto=1,Object.defineProperty(proto,"__esModule",{value:!0}),proto.proto=proto.google=proto.default=proto.com=void 0;var e=function(e,r){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=t(r);if(n&&n.has(e))return n.get(e);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}return o.default=e,n&&n.set(e,o),o}(requireMinimal());function t(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,n=new WeakMap;return(t=function(e){return e?n:r})(e)}const r=e.Reader,n=e.Writer,o=e.util,i=proto.default=e.roots.hashgraph||(e.roots.hashgraph={});return proto.com=i.com=(()=>{const t={};return t.hedera=function(){const t={};return t.mirror=function(){const t={};return t.api=function(){const t={};return t.proto=function(){const t={};return t.ConsensusTopicQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.topicID=null,e.prototype.consensusStartTime=null,e.prototype.consensusEndTime=null,e.prototype.limit=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(10).fork()).ldelim(),null!=e.consensusStartTime&&Object.hasOwnProperty.call(e,"consensusStartTime")&&i.proto.Timestamp.encode(e.consensusStartTime,t.uint32(18).fork()).ldelim(),null!=e.consensusEndTime&&Object.hasOwnProperty.call(e,"consensusEndTime")&&i.proto.Timestamp.encode(e.consensusEndTime,t.uint32(26).fork()).ldelim(),null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&t.uint32(32).uint64(e.limit),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.mirror.api.proto.ConsensusTopicQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.topicID=i.proto.TopicID.decode(e,e.uint32());break;case 2:o.consensusStartTime=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.consensusEndTime=i.proto.Timestamp.decode(e,e.uint32());break;case 4:o.limit=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.mirror.api.proto.ConsensusTopicQuery"},e}(),t.ConsensusTopicResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.consensusTimestamp=null,e.prototype.message=o.newBuffer([]),e.prototype.runningHash=o.newBuffer([]),e.prototype.sequenceNumber=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.runningHashVersion=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.chunkInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.consensusTimestamp&&Object.hasOwnProperty.call(e,"consensusTimestamp")&&i.proto.Timestamp.encode(e.consensusTimestamp,t.uint32(10).fork()).ldelim(),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).bytes(e.message),null!=e.runningHash&&Object.hasOwnProperty.call(e,"runningHash")&&t.uint32(26).bytes(e.runningHash),null!=e.sequenceNumber&&Object.hasOwnProperty.call(e,"sequenceNumber")&&t.uint32(32).uint64(e.sequenceNumber),null!=e.runningHashVersion&&Object.hasOwnProperty.call(e,"runningHashVersion")&&t.uint32(40).uint64(e.runningHashVersion),null!=e.chunkInfo&&Object.hasOwnProperty.call(e,"chunkInfo")&&i.proto.ConsensusMessageChunkInfo.encode(e.chunkInfo,t.uint32(50).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.mirror.api.proto.ConsensusTopicResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.consensusTimestamp=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.message=e.bytes();break;case 3:o.runningHash=e.bytes();break;case 4:o.sequenceNumber=e.uint64();break;case 5:o.runningHashVersion=e.uint64();break;case 6:o.chunkInfo=i.proto.ConsensusMessageChunkInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.mirror.api.proto.ConsensusTopicResponse"},e}(),t.ConsensusService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.subscribeTopic=function e(t,r){return this.rpcCall(e,i.com.hedera.mirror.api.proto.ConsensusTopicQuery,i.com.hedera.mirror.api.proto.ConsensusTopicResponse,t,r)},"name",{value:"subscribeTopic"}),t}(),t.AddressBookQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileId=null,e.prototype.limit=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileId&&Object.hasOwnProperty.call(e,"fileId")&&i.proto.FileID.encode(e.fileId,t.uint32(10).fork()).ldelim(),null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&t.uint32(16).int32(e.limit),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.mirror.api.proto.AddressBookQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileId=i.proto.FileID.decode(e,e.uint32());break;case 2:o.limit=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.mirror.api.proto.AddressBookQuery"},e}(),t.NetworkService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.getNodes=function e(t,r){return this.rpcCall(e,i.com.hedera.mirror.api.proto.AddressBookQuery,i.proto.NodeAddress,t,r)},"name",{value:"getNodes"}),t}(),t}(),t}(),t}(),t.hapi=function(){const e={};return e.node=function(){const e={};return e.addressbook=function(){const e={};return e.NodeCreateTransactionBody=function(){function e(e){if(this.gossipEndpoint=[],this.serviceEndpoint=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountId=null,e.prototype.description="",e.prototype.gossipEndpoint=o.emptyArray,e.prototype.serviceEndpoint=o.emptyArray,e.prototype.gossipCaCertificate=o.newBuffer([]),e.prototype.grpcCertificateHash=o.newBuffer([]),e.prototype.adminKey=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(10).fork()).ldelim(),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(18).string(e.description),null!=e.gossipEndpoint&&e.gossipEndpoint.length)for(var r=0;r<e.gossipEndpoint.length;++r)i.proto.ServiceEndpoint.encode(e.gossipEndpoint[r],t.uint32(26).fork()).ldelim();if(null!=e.serviceEndpoint&&e.serviceEndpoint.length)for(r=0;r<e.serviceEndpoint.length;++r)i.proto.ServiceEndpoint.encode(e.serviceEndpoint[r],t.uint32(34).fork()).ldelim();return null!=e.gossipCaCertificate&&Object.hasOwnProperty.call(e,"gossipCaCertificate")&&t.uint32(42).bytes(e.gossipCaCertificate),null!=e.grpcCertificateHash&&Object.hasOwnProperty.call(e,"grpcCertificateHash")&&t.uint32(50).bytes(e.grpcCertificateHash),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(58).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.addressbook.NodeCreateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.description=e.string();break;case 3:o.gossipEndpoint&&o.gossipEndpoint.length||(o.gossipEndpoint=[]),o.gossipEndpoint.push(i.proto.ServiceEndpoint.decode(e,e.uint32()));break;case 4:o.serviceEndpoint&&o.serviceEndpoint.length||(o.serviceEndpoint=[]),o.serviceEndpoint.push(i.proto.ServiceEndpoint.decode(e,e.uint32()));break;case 5:o.gossipCaCertificate=e.bytes();break;case 6:o.grpcCertificateHash=e.bytes();break;case 7:o.adminKey=i.proto.Key.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.addressbook.NodeCreateTransactionBody"},e}(),e.NodeUpdateTransactionBody=function(){function e(e){if(this.gossipEndpoint=[],this.serviceEndpoint=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.accountId=null,e.prototype.description=null,e.prototype.gossipEndpoint=o.emptyArray,e.prototype.serviceEndpoint=o.emptyArray,e.prototype.gossipCaCertificate=null,e.prototype.grpcCertificateHash=null,e.prototype.adminKey=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(8).uint64(e.nodeId),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(18).fork()).ldelim(),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&i.google.protobuf.StringValue.encode(e.description,t.uint32(26).fork()).ldelim(),null!=e.gossipEndpoint&&e.gossipEndpoint.length)for(var r=0;r<e.gossipEndpoint.length;++r)i.proto.ServiceEndpoint.encode(e.gossipEndpoint[r],t.uint32(34).fork()).ldelim();if(null!=e.serviceEndpoint&&e.serviceEndpoint.length)for(r=0;r<e.serviceEndpoint.length;++r)i.proto.ServiceEndpoint.encode(e.serviceEndpoint[r],t.uint32(42).fork()).ldelim();return null!=e.gossipCaCertificate&&Object.hasOwnProperty.call(e,"gossipCaCertificate")&&i.google.protobuf.BytesValue.encode(e.gossipCaCertificate,t.uint32(50).fork()).ldelim(),null!=e.grpcCertificateHash&&Object.hasOwnProperty.call(e,"grpcCertificateHash")&&i.google.protobuf.BytesValue.encode(e.grpcCertificateHash,t.uint32(58).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(66).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.nodeId=e.uint64();break;case 2:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.description=i.google.protobuf.StringValue.decode(e,e.uint32());break;case 4:o.gossipEndpoint&&o.gossipEndpoint.length||(o.gossipEndpoint=[]),o.gossipEndpoint.push(i.proto.ServiceEndpoint.decode(e,e.uint32()));break;case 5:o.serviceEndpoint&&o.serviceEndpoint.length||(o.serviceEndpoint=[]),o.serviceEndpoint.push(i.proto.ServiceEndpoint.decode(e,e.uint32()));break;case 6:o.gossipCaCertificate=i.google.protobuf.BytesValue.decode(e,e.uint32());break;case 7:o.grpcCertificateHash=i.google.protobuf.BytesValue.decode(e,e.uint32());break;case 8:o.adminKey=i.proto.Key.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody"},e}(),e.NodeDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(8).uint64(e.nodeId),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.nodeId=e.uint64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody"},e}(),e}(),e.state=function(){const e={};return e.history=function(){const e={};return e.ProofKeySet=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.adoptionTime=null,e.prototype.key=o.newBuffer([]),e.prototype.nextKey=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.adoptionTime&&Object.hasOwnProperty.call(e,"adoptionTime")&&i.proto.Timestamp.encode(e.adoptionTime,t.uint32(18).fork()).ldelim(),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(26).bytes(e.key),null!=e.nextKey&&Object.hasOwnProperty.call(e,"nextKey")&&t.uint32(34).bytes(e.nextKey),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.ProofKeySet;e.pos<n;){var a=e.uint32();switch(a>>>3){case 2:o.adoptionTime=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.key=e.bytes();break;case 4:o.nextKey=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.ProofKeySet"},e}(),e.ProofKey=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.key=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(8).uint64(e.nodeId),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(18).bytes(e.key),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.ProofKey;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.nodeId=e.uint64();break;case 2:o.key=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.ProofKey"},e}(),e.History=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.addressBookHash=o.newBuffer([]),e.prototype.metadata=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.addressBookHash&&Object.hasOwnProperty.call(e,"addressBookHash")&&t.uint32(10).bytes(e.addressBookHash),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&t.uint32(18).bytes(e.metadata),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.History;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.addressBookHash=e.bytes();break;case 2:o.metadata=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.History"},e}(),e.HistoryProof=function(){function e(e){if(this.targetProofKeys=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.sourceAddressBookHash=o.newBuffer([]),e.prototype.targetProofKeys=o.emptyArray,e.prototype.targetHistory=null,e.prototype.proof=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.sourceAddressBookHash&&Object.hasOwnProperty.call(e,"sourceAddressBookHash")&&t.uint32(10).bytes(e.sourceAddressBookHash),null!=e.targetProofKeys&&e.targetProofKeys.length)for(var r=0;r<e.targetProofKeys.length;++r)i.com.hedera.hapi.node.state.history.ProofKey.encode(e.targetProofKeys[r],t.uint32(18).fork()).ldelim();return null!=e.targetHistory&&Object.hasOwnProperty.call(e,"targetHistory")&&i.com.hedera.hapi.node.state.history.History.encode(e.targetHistory,t.uint32(26).fork()).ldelim(),null!=e.proof&&Object.hasOwnProperty.call(e,"proof")&&t.uint32(34).bytes(e.proof),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.HistoryProof;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.sourceAddressBookHash=e.bytes();break;case 2:o.targetProofKeys&&o.targetProofKeys.length||(o.targetProofKeys=[]),o.targetProofKeys.push(i.com.hedera.hapi.node.state.history.ProofKey.decode(e,e.uint32()));break;case 3:o.targetHistory=i.com.hedera.hapi.node.state.history.History.decode(e,e.uint32());break;case 4:o.proof=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.HistoryProof"},e}(),e.HistoryProofConstruction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.constructionId=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.sourceRosterHash=o.newBuffer([]),e.prototype.sourceProof=null,e.prototype.targetRosterHash=o.newBuffer([]),e.prototype.gracePeriodEndTime=null,e.prototype.assemblyStartTime=null,e.prototype.targetProof=null,Object.defineProperty(e.prototype,"proofState",{get:o.oneOfGetter(t=["gracePeriodEndTime","assemblyStartTime","targetProof"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.constructionId&&Object.hasOwnProperty.call(e,"constructionId")&&t.uint32(8).uint64(e.constructionId),null!=e.sourceRosterHash&&Object.hasOwnProperty.call(e,"sourceRosterHash")&&t.uint32(18).bytes(e.sourceRosterHash),null!=e.sourceProof&&Object.hasOwnProperty.call(e,"sourceProof")&&i.com.hedera.hapi.node.state.history.HistoryProof.encode(e.sourceProof,t.uint32(26).fork()).ldelim(),null!=e.targetRosterHash&&Object.hasOwnProperty.call(e,"targetRosterHash")&&t.uint32(34).bytes(e.targetRosterHash),null!=e.gracePeriodEndTime&&Object.hasOwnProperty.call(e,"gracePeriodEndTime")&&i.proto.Timestamp.encode(e.gracePeriodEndTime,t.uint32(42).fork()).ldelim(),null!=e.assemblyStartTime&&Object.hasOwnProperty.call(e,"assemblyStartTime")&&i.proto.Timestamp.encode(e.assemblyStartTime,t.uint32(50).fork()).ldelim(),null!=e.targetProof&&Object.hasOwnProperty.call(e,"targetProof")&&i.com.hedera.hapi.node.state.history.HistoryProof.encode(e.targetProof,t.uint32(58).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.HistoryProofConstruction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.constructionId=e.uint64();break;case 2:o.sourceRosterHash=e.bytes();break;case 3:o.sourceProof=i.com.hedera.hapi.node.state.history.HistoryProof.decode(e,e.uint32());break;case 4:o.targetRosterHash=e.bytes();break;case 5:o.gracePeriodEndTime=i.proto.Timestamp.decode(e,e.uint32());break;case 6:o.assemblyStartTime=i.proto.Timestamp.decode(e,e.uint32());break;case 7:o.targetProof=i.com.hedera.hapi.node.state.history.HistoryProof.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.HistoryProofConstruction"},e}(),e.ConstructionNodeId=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.constructionId=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.constructionId&&Object.hasOwnProperty.call(e,"constructionId")&&t.uint32(8).uint64(e.constructionId),null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(16).uint64(e.nodeId),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.ConstructionNodeId;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.constructionId=e.uint64();break;case 2:o.nodeId=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.ConstructionNodeId"},e}(),e.HistoryProofVote=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.proof=null,e.prototype.congruentNodeId=null,Object.defineProperty(e.prototype,"vote",{get:o.oneOfGetter(t=["proof","congruentNodeId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.proof&&Object.hasOwnProperty.call(e,"proof")&&i.com.hedera.hapi.node.state.history.HistoryProof.encode(e.proof,t.uint32(10).fork()).ldelim(),null!=e.congruentNodeId&&Object.hasOwnProperty.call(e,"congruentNodeId")&&t.uint32(16).uint64(e.congruentNodeId),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.HistoryProofVote;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.proof=i.com.hedera.hapi.node.state.history.HistoryProof.decode(e,e.uint32());break;case 2:o.congruentNodeId=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.HistoryProofVote"},e}(),e.HistorySignature=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.history=null,e.prototype.signature=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.history&&Object.hasOwnProperty.call(e,"history")&&i.com.hedera.hapi.node.state.history.History.encode(e.history,t.uint32(10).fork()).ldelim(),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(18).bytes(e.signature),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.HistorySignature;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.history=i.com.hedera.hapi.node.state.history.History.decode(e,e.uint32());break;case 2:o.signature=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.HistorySignature"},e}(),e.RecordedHistorySignature=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.signingTime=null,e.prototype.historySignature=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.signingTime&&Object.hasOwnProperty.call(e,"signingTime")&&i.proto.Timestamp.encode(e.signingTime,t.uint32(10).fork()).ldelim(),null!=e.historySignature&&Object.hasOwnProperty.call(e,"historySignature")&&i.com.hedera.hapi.node.state.history.HistorySignature.encode(e.historySignature,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.node.state.history.RecordedHistorySignature;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.signingTime=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.historySignature=i.com.hedera.hapi.node.state.history.HistorySignature.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.node.state.history.RecordedHistorySignature"},e}(),e}(),e}(),e}(),e.platform=function(){const e={};return e.event=function(){const e={};return e.EventConsensusData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.consensusTimestamp=null,e.prototype.consensusOrder=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.consensusTimestamp&&Object.hasOwnProperty.call(e,"consensusTimestamp")&&i.proto.Timestamp.encode(e.consensusTimestamp,t.uint32(10).fork()).ldelim(),null!=e.consensusOrder&&Object.hasOwnProperty.call(e,"consensusOrder")&&t.uint32(16).uint64(e.consensusOrder),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.platform.event.EventConsensusData;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.consensusTimestamp=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.consensusOrder=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.platform.event.EventConsensusData"},e}(),e.EventCore=function(){function e(e){if(this.parents=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.creatorNodeId=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.birthRound=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.timeCreated=null,e.prototype.parents=o.emptyArray,e.prototype.version=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.creatorNodeId&&Object.hasOwnProperty.call(e,"creatorNodeId")&&t.uint32(8).int64(e.creatorNodeId),null!=e.birthRound&&Object.hasOwnProperty.call(e,"birthRound")&&t.uint32(16).int64(e.birthRound),null!=e.timeCreated&&Object.hasOwnProperty.call(e,"timeCreated")&&i.proto.Timestamp.encode(e.timeCreated,t.uint32(26).fork()).ldelim(),null!=e.parents&&e.parents.length)for(var r=0;r<e.parents.length;++r)i.com.hedera.hapi.platform.event.EventDescriptor.encode(e.parents[r],t.uint32(34).fork()).ldelim();return null!=e.version&&Object.hasOwnProperty.call(e,"version")&&i.proto.SemanticVersion.encode(e.version,t.uint32(138).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.platform.event.EventCore;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.creatorNodeId=e.int64();break;case 2:o.birthRound=e.int64();break;case 3:o.timeCreated=i.proto.Timestamp.decode(e,e.uint32());break;case 4:o.parents&&o.parents.length||(o.parents=[]),o.parents.push(i.com.hedera.hapi.platform.event.EventDescriptor.decode(e,e.uint32()));break;case 17:o.version=i.proto.SemanticVersion.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.platform.event.EventCore"},e}(),e.EventDescriptor=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.hash=o.newBuffer([]),e.prototype.creatorNodeId=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.birthRound=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.generation=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(10).bytes(e.hash),null!=e.creatorNodeId&&Object.hasOwnProperty.call(e,"creatorNodeId")&&t.uint32(16).int64(e.creatorNodeId),null!=e.birthRound&&Object.hasOwnProperty.call(e,"birthRound")&&t.uint32(24).int64(e.birthRound),null!=e.generation&&Object.hasOwnProperty.call(e,"generation")&&t.uint32(136).int64(e.generation),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.platform.event.EventDescriptor;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.hash=e.bytes();break;case 2:o.creatorNodeId=e.int64();break;case 3:o.birthRound=e.int64();break;case 17:o.generation=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.platform.event.EventDescriptor"},e}(),e.EventTransaction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.applicationTransaction=null,e.prototype.stateSignatureTransaction=null,Object.defineProperty(e.prototype,"transaction",{get:o.oneOfGetter(t=["applicationTransaction","stateSignatureTransaction"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.applicationTransaction&&Object.hasOwnProperty.call(e,"applicationTransaction")&&t.uint32(10).bytes(e.applicationTransaction),null!=e.stateSignatureTransaction&&Object.hasOwnProperty.call(e,"stateSignatureTransaction")&&i.com.hedera.hapi.platform.event.StateSignatureTransaction.encode(e.stateSignatureTransaction,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.platform.event.EventTransaction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.applicationTransaction=e.bytes();break;case 2:o.stateSignatureTransaction=i.com.hedera.hapi.platform.event.StateSignatureTransaction.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.platform.event.EventTransaction"},e}(),e.GossipEvent=function(){function e(e){if(this.eventTransaction=[],this.transactions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.eventCore=null,e.prototype.signature=o.newBuffer([]),e.prototype.eventTransaction=o.emptyArray,e.prototype.transactions=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.eventCore&&Object.hasOwnProperty.call(e,"eventCore")&&i.com.hedera.hapi.platform.event.EventCore.encode(e.eventCore,t.uint32(10).fork()).ldelim(),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(18).bytes(e.signature),null!=e.eventTransaction&&e.eventTransaction.length)for(var r=0;r<e.eventTransaction.length;++r)i.com.hedera.hapi.platform.event.EventTransaction.encode(e.eventTransaction[r],t.uint32(26).fork()).ldelim();if(null!=e.transactions&&e.transactions.length)for(r=0;r<e.transactions.length;++r)t.uint32(34).bytes(e.transactions[r]);return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.platform.event.GossipEvent;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.eventCore=i.com.hedera.hapi.platform.event.EventCore.decode(e,e.uint32());break;case 2:o.signature=e.bytes();break;case 3:o.eventTransaction&&o.eventTransaction.length||(o.eventTransaction=[]),o.eventTransaction.push(i.com.hedera.hapi.platform.event.EventTransaction.decode(e,e.uint32()));break;case 4:o.transactions&&o.transactions.length||(o.transactions=[]),o.transactions.push(e.bytes());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.platform.event.GossipEvent"},e}(),e.StateSignatureTransaction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.round=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.signature=o.newBuffer([]),e.prototype.hash=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.round&&Object.hasOwnProperty.call(e,"round")&&t.uint32(8).int64(e.round),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(18).bytes(e.signature),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(26).bytes(e.hash),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.platform.event.StateSignatureTransaction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.round=e.int64();break;case 2:o.signature=e.bytes();break;case 3:o.hash=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.platform.event.StateSignatureTransaction"},e}(),e}(),e}(),e.services=function(){const e={};return e.auxiliary=function(){const e={};return e.history=function(){const e={};return e.HistoryProofKeyPublicationTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.proofKey=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.proofKey&&Object.hasOwnProperty.call(e,"proofKey")&&t.uint32(10).bytes(e.proofKey),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.services.auxiliary.history.HistoryProofKeyPublicationTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.proofKey=e.bytes();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.services.auxiliary.history.HistoryProofKeyPublicationTransactionBody"},e}(),e.HistoryProofSignatureTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.constructionId=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.signature=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.constructionId&&Object.hasOwnProperty.call(e,"constructionId")&&t.uint32(8).uint64(e.constructionId),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&i.com.hedera.hapi.node.state.history.HistorySignature.encode(e.signature,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.services.auxiliary.history.HistoryProofSignatureTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.constructionId=e.uint64();break;case 2:o.signature=i.com.hedera.hapi.node.state.history.HistorySignature.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.services.auxiliary.history.HistoryProofSignatureTransactionBody"},e}(),e.HistoryProofVoteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.constructionId=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.vote=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.constructionId&&Object.hasOwnProperty.call(e,"constructionId")&&t.uint32(8).uint64(e.constructionId),null!=e.vote&&Object.hasOwnProperty.call(e,"vote")&&i.com.hedera.hapi.node.state.history.HistoryProofVote.encode(e.vote,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.com.hedera.hapi.services.auxiliary.history.HistoryProofVoteTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.constructionId=e.uint64();break;case 2:o.vote=i.com.hedera.hapi.node.state.history.HistoryProofVote.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/com.hedera.hapi.services.auxiliary.history.HistoryProofVoteTransactionBody"},e}(),e}(),e}(),e}(),e}(),t}(),t})(),proto.proto=i.proto=(()=>{const t={};return t.TransactionList=function(){function e(e){if(this.transactionList=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transactionList=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.transactionList&&e.transactionList.length)for(var r=0;r<e.transactionList.length;++r)i.proto.Transaction.encode(e.transactionList[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionList;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.transactionList&&o.transactionList.length||(o.transactionList=[]),o.transactionList.push(i.proto.Transaction.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionList"},e}(),t.AddressBookService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createNode=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createNode"}),Object.defineProperty(t.prototype.deleteNode=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteNode"}),Object.defineProperty(t.prototype.updateNode=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateNode"}),t}(),t.TransactionResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodeTransactionPrecheckCode=0,e.prototype.cost=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.nodeTransactionPrecheckCode&&Object.hasOwnProperty.call(e,"nodeTransactionPrecheckCode")&&t.uint32(8).int32(e.nodeTransactionPrecheckCode),null!=e.cost&&Object.hasOwnProperty.call(e,"cost")&&t.uint32(16).uint64(e.cost),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.nodeTransactionPrecheckCode=e.int32();break;case 2:o.cost=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionResponse"},e}(),t.ResponseCodeEnum=function(){const e={},t=Object.create(e);return t[e[0]="OK"]=0,t[e[1]="INVALID_TRANSACTION"]=1,t[e[2]="PAYER_ACCOUNT_NOT_FOUND"]=2,t[e[3]="INVALID_NODE_ACCOUNT"]=3,t[e[4]="TRANSACTION_EXPIRED"]=4,t[e[5]="INVALID_TRANSACTION_START"]=5,t[e[6]="INVALID_TRANSACTION_DURATION"]=6,t[e[7]="INVALID_SIGNATURE"]=7,t[e[8]="MEMO_TOO_LONG"]=8,t[e[9]="INSUFFICIENT_TX_FEE"]=9,t[e[10]="INSUFFICIENT_PAYER_BALANCE"]=10,t[e[11]="DUPLICATE_TRANSACTION"]=11,t[e[12]="BUSY"]=12,t[e[13]="NOT_SUPPORTED"]=13,t[e[14]="INVALID_FILE_ID"]=14,t[e[15]="INVALID_ACCOUNT_ID"]=15,t[e[16]="INVALID_CONTRACT_ID"]=16,t[e[17]="INVALID_TRANSACTION_ID"]=17,t[e[18]="RECEIPT_NOT_FOUND"]=18,t[e[19]="RECORD_NOT_FOUND"]=19,t[e[20]="INVALID_SOLIDITY_ID"]=20,t[e[21]="UNKNOWN"]=21,t[e[22]="SUCCESS"]=22,t[e[23]="FAIL_INVALID"]=23,t[e[24]="FAIL_FEE"]=24,t[e[25]="FAIL_BALANCE"]=25,t[e[26]="KEY_REQUIRED"]=26,t[e[27]="BAD_ENCODING"]=27,t[e[28]="INSUFFICIENT_ACCOUNT_BALANCE"]=28,t[e[29]="INVALID_SOLIDITY_ADDRESS"]=29,t[e[30]="INSUFFICIENT_GAS"]=30,t[e[31]="CONTRACT_SIZE_LIMIT_EXCEEDED"]=31,t[e[32]="LOCAL_CALL_MODIFICATION_EXCEPTION"]=32,t[e[33]="CONTRACT_REVERT_EXECUTED"]=33,t[e[34]="CONTRACT_EXECUTION_EXCEPTION"]=34,t[e[35]="INVALID_RECEIVING_NODE_ACCOUNT"]=35,t[e[36]="MISSING_QUERY_HEADER"]=36,t[e[37]="ACCOUNT_UPDATE_FAILED"]=37,t[e[38]="INVALID_KEY_ENCODING"]=38,t[e[39]="NULL_SOLIDITY_ADDRESS"]=39,t[e[40]="CONTRACT_UPDATE_FAILED"]=40,t[e[41]="INVALID_QUERY_HEADER"]=41,t[e[42]="INVALID_FEE_SUBMITTED"]=42,t[e[43]="INVALID_PAYER_SIGNATURE"]=43,t[e[44]="KEY_NOT_PROVIDED"]=44,t[e[45]="INVALID_EXPIRATION_TIME"]=45,t[e[46]="NO_WACL_KEY"]=46,t[e[47]="FILE_CONTENT_EMPTY"]=47,t[e[48]="INVALID_ACCOUNT_AMOUNTS"]=48,t[e[49]="EMPTY_TRANSACTION_BODY"]=49,t[e[50]="INVALID_TRANSACTION_BODY"]=50,t[e[51]="INVALID_SIGNATURE_TYPE_MISMATCHING_KEY"]=51,t[e[52]="INVALID_SIGNATURE_COUNT_MISMATCHING_KEY"]=52,t[e[53]="EMPTY_LIVE_HASH_BODY"]=53,t[e[54]="EMPTY_LIVE_HASH"]=54,t[e[55]="EMPTY_LIVE_HASH_KEYS"]=55,t[e[56]="INVALID_LIVE_HASH_SIZE"]=56,t[e[57]="EMPTY_QUERY_BODY"]=57,t[e[58]="EMPTY_LIVE_HASH_QUERY"]=58,t[e[59]="LIVE_HASH_NOT_FOUND"]=59,t[e[60]="ACCOUNT_ID_DOES_NOT_EXIST"]=60,t[e[61]="LIVE_HASH_ALREADY_EXISTS"]=61,t[e[62]="INVALID_FILE_WACL"]=62,t[e[63]="SERIALIZATION_FAILED"]=63,t[e[64]="TRANSACTION_OVERSIZE"]=64,t[e[65]="TRANSACTION_TOO_MANY_LAYERS"]=65,t[e[66]="CONTRACT_DELETED"]=66,t[e[67]="PLATFORM_NOT_ACTIVE"]=67,t[e[68]="KEY_PREFIX_MISMATCH"]=68,t[e[69]="PLATFORM_TRANSACTION_NOT_CREATED"]=69,t[e[70]="INVALID_RENEWAL_PERIOD"]=70,t[e[71]="INVALID_PAYER_ACCOUNT_ID"]=71,t[e[72]="ACCOUNT_DELETED"]=72,t[e[73]="FILE_DELETED"]=73,t[e[74]="ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS"]=74,t[e[75]="SETTING_NEGATIVE_ACCOUNT_BALANCE"]=75,t[e[76]="OBTAINER_REQUIRED"]=76,t[e[77]="OBTAINER_SAME_CONTRACT_ID"]=77,t[e[78]="OBTAINER_DOES_NOT_EXIST"]=78,t[e[79]="MODIFYING_IMMUTABLE_CONTRACT"]=79,t[e[80]="FILE_SYSTEM_EXCEPTION"]=80,t[e[81]="AUTORENEW_DURATION_NOT_IN_RANGE"]=81,t[e[82]="ERROR_DECODING_BYTESTRING"]=82,t[e[83]="CONTRACT_FILE_EMPTY"]=83,t[e[84]="CONTRACT_BYTECODE_EMPTY"]=84,t[e[85]="INVALID_INITIAL_BALANCE"]=85,t[e[86]="INVALID_RECEIVE_RECORD_THRESHOLD"]=86,t[e[87]="INVALID_SEND_RECORD_THRESHOLD"]=87,t[e[88]="ACCOUNT_IS_NOT_GENESIS_ACCOUNT"]=88,t[e[89]="PAYER_ACCOUNT_UNAUTHORIZED"]=89,t[e[90]="INVALID_FREEZE_TRANSACTION_BODY"]=90,t[e[91]="FREEZE_TRANSACTION_BODY_NOT_FOUND"]=91,t[e[92]="TRANSFER_LIST_SIZE_LIMIT_EXCEEDED"]=92,t[e[93]="RESULT_SIZE_LIMIT_EXCEEDED"]=93,t[e[94]="NOT_SPECIAL_ACCOUNT"]=94,t[e[95]="CONTRACT_NEGATIVE_GAS"]=95,t[e[96]="CONTRACT_NEGATIVE_VALUE"]=96,t[e[97]="INVALID_FEE_FILE"]=97,t[e[98]="INVALID_EXCHANGE_RATE_FILE"]=98,t[e[99]="INSUFFICIENT_LOCAL_CALL_GAS"]=99,t[e[100]="ENTITY_NOT_ALLOWED_TO_DELETE"]=100,t[e[101]="AUTHORIZATION_FAILED"]=101,t[e[102]="FILE_UPLOADED_PROTO_INVALID"]=102,t[e[103]="FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK"]=103,t[e[104]="FEE_SCHEDULE_FILE_PART_UPLOADED"]=104,t[e[105]="EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED"]=105,t[e[106]="MAX_CONTRACT_STORAGE_EXCEEDED"]=106,t[e[107]="TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT"]=107,t[e[108]="TOTAL_LEDGER_BALANCE_INVALID"]=108,t[e[110]="EXPIRATION_REDUCTION_NOT_ALLOWED"]=110,t[e[111]="MAX_GAS_LIMIT_EXCEEDED"]=111,t[e[112]="MAX_FILE_SIZE_EXCEEDED"]=112,t[e[113]="RECEIVER_SIG_REQUIRED"]=113,t[e[150]="INVALID_TOPIC_ID"]=150,t[e[155]="INVALID_ADMIN_KEY"]=155,t[e[156]="INVALID_SUBMIT_KEY"]=156,t[e[157]="UNAUTHORIZED"]=157,t[e[158]="INVALID_TOPIC_MESSAGE"]=158,t[e[159]="INVALID_AUTORENEW_ACCOUNT"]=159,t[e[160]="AUTORENEW_ACCOUNT_NOT_ALLOWED"]=160,t[e[162]="TOPIC_EXPIRED"]=162,t[e[163]="INVALID_CHUNK_NUMBER"]=163,t[e[164]="INVALID_CHUNK_TRANSACTION_ID"]=164,t[e[165]="ACCOUNT_FROZEN_FOR_TOKEN"]=165,t[e[166]="TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED"]=166,t[e[167]="INVALID_TOKEN_ID"]=167,t[e[168]="INVALID_TOKEN_DECIMALS"]=168,t[e[169]="INVALID_TOKEN_INITIAL_SUPPLY"]=169,t[e[170]="INVALID_TREASURY_ACCOUNT_FOR_TOKEN"]=170,t[e[171]="INVALID_TOKEN_SYMBOL"]=171,t[e[172]="TOKEN_HAS_NO_FREEZE_KEY"]=172,t[e[173]="TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN"]=173,t[e[174]="MISSING_TOKEN_SYMBOL"]=174,t[e[175]="TOKEN_SYMBOL_TOO_LONG"]=175,t[e[176]="ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN"]=176,t[e[177]="TOKEN_HAS_NO_KYC_KEY"]=177,t[e[178]="INSUFFICIENT_TOKEN_BALANCE"]=178,t[e[179]="TOKEN_WAS_DELETED"]=179,t[e[180]="TOKEN_HAS_NO_SUPPLY_KEY"]=180,t[e[181]="TOKEN_HAS_NO_WIPE_KEY"]=181,t[e[182]="INVALID_TOKEN_MINT_AMOUNT"]=182,t[e[183]="INVALID_TOKEN_BURN_AMOUNT"]=183,t[e[184]="TOKEN_NOT_ASSOCIATED_TO_ACCOUNT"]=184,t[e[185]="CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT"]=185,t[e[186]="INVALID_KYC_KEY"]=186,t[e[187]="INVALID_WIPE_KEY"]=187,t[e[188]="INVALID_FREEZE_KEY"]=188,t[e[189]="INVALID_SUPPLY_KEY"]=189,t[e[190]="MISSING_TOKEN_NAME"]=190,t[e[191]="TOKEN_NAME_TOO_LONG"]=191,t[e[192]="INVALID_WIPING_AMOUNT"]=192,t[e[193]="TOKEN_IS_IMMUTABLE"]=193,t[e[194]="TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT"]=194,t[e[195]="TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES"]=195,t[e[196]="ACCOUNT_IS_TREASURY"]=196,t[e[197]="TOKEN_ID_REPEATED_IN_TOKEN_LIST"]=197,t[e[198]="TOKEN_TRANSFER_LIST_SIZE_LIMIT_EXCEEDED"]=198,t[e[199]="EMPTY_TOKEN_TRANSFER_BODY"]=199,t[e[200]="EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS"]=200,t[e[201]="INVALID_SCHEDULE_ID"]=201,t[e[202]="SCHEDULE_IS_IMMUTABLE"]=202,t[e[203]="INVALID_SCHEDULE_PAYER_ID"]=203,t[e[204]="INVALID_SCHEDULE_ACCOUNT_ID"]=204,t[e[205]="NO_NEW_VALID_SIGNATURES"]=205,t[e[206]="UNRESOLVABLE_REQUIRED_SIGNERS"]=206,t[e[207]="SCHEDULED_TRANSACTION_NOT_IN_WHITELIST"]=207,t[e[208]="SOME_SIGNATURES_WERE_INVALID"]=208,t[e[209]="TRANSACTION_ID_FIELD_NOT_ALLOWED"]=209,t[e[210]="IDENTICAL_SCHEDULE_ALREADY_CREATED"]=210,t[e[211]="INVALID_ZERO_BYTE_IN_STRING"]=211,t[e[212]="SCHEDULE_ALREADY_DELETED"]=212,t[e[213]="SCHEDULE_ALREADY_EXECUTED"]=213,t[e[214]="MESSAGE_SIZE_TOO_LARGE"]=214,t[e[215]="OPERATION_REPEATED_IN_BUCKET_GROUPS"]=215,t[e[216]="BUCKET_CAPACITY_OVERFLOW"]=216,t[e[217]="NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION"]=217,t[e[218]="BUCKET_HAS_NO_THROTTLE_GROUPS"]=218,t[e[219]="THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC"]=219,t[e[220]="SUCCESS_BUT_MISSING_EXPECTED_OPERATION"]=220,t[e[221]="UNPARSEABLE_THROTTLE_DEFINITIONS"]=221,t[e[222]="INVALID_THROTTLE_DEFINITIONS"]=222,t[e[223]="ACCOUNT_EXPIRED_AND_PENDING_REMOVAL"]=223,t[e[224]="INVALID_TOKEN_MAX_SUPPLY"]=224,t[e[225]="INVALID_TOKEN_NFT_SERIAL_NUMBER"]=225,t[e[226]="INVALID_NFT_ID"]=226,t[e[227]="METADATA_TOO_LONG"]=227,t[e[228]="BATCH_SIZE_LIMIT_EXCEEDED"]=228,t[e[229]="INVALID_QUERY_RANGE"]=229,t[e[230]="FRACTION_DIVIDES_BY_ZERO"]=230,t[e[231]="INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE"]=231,t[e[232]="CUSTOM_FEES_LIST_TOO_LONG"]=232,t[e[233]="INVALID_CUSTOM_FEE_COLLECTOR"]=233,t[e[234]="INVALID_TOKEN_ID_IN_CUSTOM_FEES"]=234,t[e[235]="TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR"]=235,t[e[236]="TOKEN_MAX_SUPPLY_REACHED"]=236,t[e[237]="SENDER_DOES_NOT_OWN_NFT_SERIAL_NO"]=237,t[e[238]="CUSTOM_FEE_NOT_FULLY_SPECIFIED"]=238,t[e[239]="CUSTOM_FEE_MUST_BE_POSITIVE"]=239,t[e[240]="TOKEN_HAS_NO_FEE_SCHEDULE_KEY"]=240,t[e[241]="CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE"]=241,t[e[242]="ROYALTY_FRACTION_CANNOT_EXCEED_ONE"]=242,t[e[243]="FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT"]=243,t[e[244]="CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES"]=244,t[e[245]="CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON"]=245,t[e[246]="CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON"]=246,t[e[247]="INVALID_CUSTOM_FEE_SCHEDULE_KEY"]=247,t[e[248]="INVALID_TOKEN_MINT_METADATA"]=248,t[e[249]="INVALID_TOKEN_BURN_METADATA"]=249,t[e[250]="CURRENT_TREASURY_STILL_OWNS_NFTS"]=250,t[e[251]="ACCOUNT_STILL_OWNS_NFTS"]=251,t[e[252]="TREASURY_MUST_OWN_BURNED_NFT"]=252,t[e[253]="ACCOUNT_DOES_NOT_OWN_WIPED_NFT"]=253,t[e[254]="ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON"]=254,t[e[255]="MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED"]=255,t[e[256]="PAYER_ACCOUNT_DELETED"]=256,t[e[257]="CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH"]=257,t[e[258]="CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS"]=258,t[e[259]="INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE"]=259,t[e[260]="SERIAL_NUMBER_LIMIT_REACHED"]=260,t[e[261]="CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE"]=261,t[e[262]="NO_REMAINING_AUTOMATIC_ASSOCIATIONS"]=262,t[e[263]="EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT"]=263,t[e[264]="REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT"]=264,t[e[265]="TOKEN_IS_PAUSED"]=265,t[e[266]="TOKEN_HAS_NO_PAUSE_KEY"]=266,t[e[267]="INVALID_PAUSE_KEY"]=267,t[e[268]="FREEZE_UPDATE_FILE_DOES_NOT_EXIST"]=268,t[e[269]="FREEZE_UPDATE_FILE_HASH_DOES_NOT_MATCH"]=269,t[e[270]="NO_UPGRADE_HAS_BEEN_PREPARED"]=270,t[e[271]="NO_FREEZE_IS_SCHEDULED"]=271,t[e[272]="UPDATE_FILE_HASH_CHANGED_SINCE_PREPARE_UPGRADE"]=272,t[e[273]="FREEZE_START_TIME_MUST_BE_FUTURE"]=273,t[e[274]="PREPARED_UPDATE_FILE_IS_IMMUTABLE"]=274,t[e[275]="FREEZE_ALREADY_SCHEDULED"]=275,t[e[276]="FREEZE_UPGRADE_IN_PROGRESS"]=276,t[e[277]="UPDATE_FILE_ID_DOES_NOT_MATCH_PREPARED"]=277,t[e[278]="UPDATE_FILE_HASH_DOES_NOT_MATCH_PREPARED"]=278,t[e[279]="CONSENSUS_GAS_EXHAUSTED"]=279,t[e[280]="REVERTED_SUCCESS"]=280,t[e[281]="MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED"]=281,t[e[282]="INVALID_ALIAS_KEY"]=282,t[e[283]="UNEXPECTED_TOKEN_DECIMALS"]=283,t[e[284]="INVALID_PROXY_ACCOUNT_ID"]=284,t[e[285]="INVALID_TRANSFER_ACCOUNT_ID"]=285,t[e[286]="INVALID_FEE_COLLECTOR_ACCOUNT_ID"]=286,t[e[287]="ALIAS_IS_IMMUTABLE"]=287,t[e[288]="SPENDER_ACCOUNT_SAME_AS_OWNER"]=288,t[e[289]="AMOUNT_EXCEEDS_TOKEN_MAX_SUPPLY"]=289,t[e[290]="NEGATIVE_ALLOWANCE_AMOUNT"]=290,t[e[291]="CANNOT_APPROVE_FOR_ALL_FUNGIBLE_COMMON"]=291,t[e[292]="SPENDER_DOES_NOT_HAVE_ALLOWANCE"]=292,t[e[293]="AMOUNT_EXCEEDS_ALLOWANCE"]=293,t[e[294]="MAX_ALLOWANCES_EXCEEDED"]=294,t[e[295]="EMPTY_ALLOWANCES"]=295,t[e[296]="SPENDER_ACCOUNT_REPEATED_IN_ALLOWANCES"]=296,t[e[297]="REPEATED_SERIAL_NUMS_IN_NFT_ALLOWANCES"]=297,t[e[298]="FUNGIBLE_TOKEN_IN_NFT_ALLOWANCES"]=298,t[e[299]="NFT_IN_FUNGIBLE_TOKEN_ALLOWANCES"]=299,t[e[300]="INVALID_ALLOWANCE_OWNER_ID"]=300,t[e[301]="INVALID_ALLOWANCE_SPENDER_ID"]=301,t[e[302]="REPEATED_ALLOWANCES_TO_DELETE"]=302,t[e[303]="INVALID_DELEGATING_SPENDER"]=303,t[e[304]="DELEGATING_SPENDER_CANNOT_GRANT_APPROVE_FOR_ALL"]=304,t[e[305]="DELEGATING_SPENDER_DOES_NOT_HAVE_APPROVE_FOR_ALL"]=305,t[e[306]="SCHEDULE_EXPIRATION_TIME_TOO_FAR_IN_FUTURE"]=306,t[e[307]="SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME"]=307,t[e[308]="SCHEDULE_FUTURE_THROTTLE_EXCEEDED"]=308,t[e[309]="SCHEDULE_FUTURE_GAS_LIMIT_EXCEEDED"]=309,t[e[310]="INVALID_ETHEREUM_TRANSACTION"]=310,t[e[311]="WRONG_CHAIN_ID"]=311,t[e[312]="WRONG_NONCE"]=312,t[e[313]="ACCESS_LIST_UNSUPPORTED"]=313,t[e[314]="SCHEDULE_PENDING_EXPIRATION"]=314,t[e[315]="CONTRACT_IS_TOKEN_TREASURY"]=315,t[e[316]="CONTRACT_HAS_NON_ZERO_TOKEN_BALANCES"]=316,t[e[317]="CONTRACT_EXPIRED_AND_PENDING_REMOVAL"]=317,t[e[318]="CONTRACT_HAS_NO_AUTO_RENEW_ACCOUNT"]=318,t[e[319]="PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION"]=319,t[e[320]="PROXY_ACCOUNT_ID_FIELD_IS_DEPRECATED"]=320,t[e[321]="SELF_STAKING_IS_NOT_ALLOWED"]=321,t[e[322]="INVALID_STAKING_ID"]=322,t[e[323]="STAKING_NOT_ENABLED"]=323,t[e[324]="INVALID_PRNG_RANGE"]=324,t[e[325]="MAX_ENTITIES_IN_PRICE_REGIME_HAVE_BEEN_CREATED"]=325,t[e[326]="INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE"]=326,t[e[327]="INSUFFICIENT_BALANCES_FOR_STORAGE_RENT"]=327,t[e[328]="MAX_CHILD_RECORDS_EXCEEDED"]=328,t[e[329]="INSUFFICIENT_BALANCES_FOR_RENEWAL_FEES"]=329,t[e[330]="TRANSACTION_HAS_UNKNOWN_FIELDS"]=330,t[e[331]="ACCOUNT_IS_IMMUTABLE"]=331,t[e[332]="ALIAS_ALREADY_ASSIGNED"]=332,t[e[333]="INVALID_METADATA_KEY"]=333,t[e[334]="TOKEN_HAS_NO_METADATA_KEY"]=334,t[e[335]="MISSING_TOKEN_METADATA"]=335,t[e[336]="MISSING_SERIAL_NUMBERS"]=336,t[e[337]="TOKEN_HAS_NO_ADMIN_KEY"]=337,t[e[338]="NODE_DELETED"]=338,t[e[339]="INVALID_NODE_ID"]=339,t[e[340]="INVALID_GOSSIP_ENDPOINT"]=340,t[e[341]="INVALID_NODE_ACCOUNT_ID"]=341,t[e[342]="INVALID_NODE_DESCRIPTION"]=342,t[e[343]="INVALID_SERVICE_ENDPOINT"]=343,t[e[344]="INVALID_GOSSIP_CA_CERTIFICATE"]=344,t[e[345]="INVALID_GRPC_CERTIFICATE"]=345,t[e[346]="INVALID_MAX_AUTO_ASSOCIATIONS"]=346,t[e[347]="MAX_NODES_CREATED"]=347,t[e[348]="IP_FQDN_CANNOT_BE_SET_FOR_SAME_ENDPOINT"]=348,t[e[349]="GOSSIP_ENDPOINT_CANNOT_HAVE_FQDN"]=349,t[e[350]="FQDN_SIZE_TOO_LARGE"]=350,t[e[351]="INVALID_ENDPOINT"]=351,t[e[352]="GOSSIP_ENDPOINTS_EXCEEDED_LIMIT"]=352,t[e[353]="TOKEN_REFERENCE_REPEATED"]=353,t[e[354]="INVALID_OWNER_ID"]=354,t[e[355]="TOKEN_REFERENCE_LIST_SIZE_LIMIT_EXCEEDED"]=355,t[e[356]="SERVICE_ENDPOINTS_EXCEEDED_LIMIT"]=356,t[e[357]="INVALID_IPV4_ADDRESS"]=357,t[e[358]="EMPTY_TOKEN_REFERENCE_LIST"]=358,t[e[359]="UPDATE_NODE_ACCOUNT_NOT_ALLOWED"]=359,t[e[360]="TOKEN_HAS_NO_METADATA_OR_SUPPLY_KEY"]=360,t[e[361]="EMPTY_PENDING_AIRDROP_ID_LIST"]=361,t[e[362]="PENDING_AIRDROP_ID_REPEATED"]=362,t[e[363]="PENDING_AIRDROP_ID_LIST_TOO_LONG"]=363,t[e[364]="PENDING_NFT_AIRDROP_ALREADY_EXISTS"]=364,t[e[365]="ACCOUNT_HAS_PENDING_AIRDROPS"]=365,t[e[366]="THROTTLED_AT_CONSENSUS"]=366,t[e[367]="INVALID_PENDING_AIRDROP_ID"]=367,t[e[368]="TOKEN_AIRDROP_WITH_FALLBACK_ROYALTY"]=368,t[e[369]="INVALID_TOKEN_IN_PENDING_AIRDROP"]=369,t[e[370]="SCHEDULE_EXPIRY_IS_BUSY"]=370,t[e[371]="INVALID_GRPC_CERTIFICATE_HASH"]=371,t[e[372]="MISSING_EXPIRY_TIME"]=372,t[e[373]="NO_SCHEDULING_ALLOWED_AFTER_SCHEDULED_RECURSION"]=373,t[e[374]="RECURSIVE_SCHEDULING_LIMIT_REACHED"]=374,t[e[375]="WAITING_FOR_LEDGER_ID"]=375,t[e[376]="MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST_EXCEEDED"]=376,t[e[377]="FEE_EXEMPT_KEY_LIST_CONTAINS_DUPLICATED_KEYS"]=377,t[e[378]="INVALID_KEY_IN_FEE_EXEMPT_KEY_LIST"]=378,t[e[379]="INVALID_FEE_SCHEDULE_KEY"]=379,t[e[380]="FEE_SCHEDULE_KEY_CANNOT_BE_UPDATED"]=380,t[e[381]="FEE_SCHEDULE_KEY_NOT_SET"]=381,t[e[382]="MAX_CUSTOM_FEE_LIMIT_EXCEEDED"]=382,t[e[383]="NO_VALID_MAX_CUSTOM_FEE"]=383,t[e[384]="INVALID_MAX_CUSTOM_FEES"]=384,t[e[385]="DUPLICATE_DENOMINATION_IN_MAX_CUSTOM_FEE_LIST"]=385,t[e[386]="DUPLICATE_ACCOUNT_ID_IN_MAX_CUSTOM_FEE_LIST"]=386,t[e[387]="MAX_CUSTOM_FEES_IS_NOT_SUPPORTED"]=387,t}(),t.Transaction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.body=null,e.prototype.sigs=null,e.prototype.sigMap=null,e.prototype.bodyBytes=o.newBuffer([]),e.prototype.signedTransactionBytes=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.body&&Object.hasOwnProperty.call(e,"body")&&i.proto.TransactionBody.encode(e.body,t.uint32(10).fork()).ldelim(),null!=e.sigs&&Object.hasOwnProperty.call(e,"sigs")&&i.proto.SignatureList.encode(e.sigs,t.uint32(18).fork()).ldelim(),null!=e.sigMap&&Object.hasOwnProperty.call(e,"sigMap")&&i.proto.SignatureMap.encode(e.sigMap,t.uint32(26).fork()).ldelim(),null!=e.bodyBytes&&Object.hasOwnProperty.call(e,"bodyBytes")&&t.uint32(34).bytes(e.bodyBytes),null!=e.signedTransactionBytes&&Object.hasOwnProperty.call(e,"signedTransactionBytes")&&t.uint32(42).bytes(e.signedTransactionBytes),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Transaction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.body=i.proto.TransactionBody.decode(e,e.uint32());break;case 2:o.sigs=i.proto.SignatureList.decode(e,e.uint32());break;case 3:o.sigMap=i.proto.SignatureMap.decode(e,e.uint32());break;case 4:o.bodyBytes=e.bytes();break;case 5:o.signedTransactionBytes=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Transaction"},e}(),t.TransactionBody=function(){function e(e){if(this.maxCustomFees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.transactionID=null,e.prototype.nodeAccountID=null,e.prototype.transactionFee=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.transactionValidDuration=null,e.prototype.generateRecord=!1,e.prototype.memo="",e.prototype.contractCall=null,e.prototype.contractCreateInstance=null,e.prototype.contractUpdateInstance=null,e.prototype.cryptoAddLiveHash=null,e.prototype.cryptoCreateAccount=null,e.prototype.cryptoDelete=null,e.prototype.cryptoDeleteLiveHash=null,e.prototype.cryptoTransfer=null,e.prototype.cryptoUpdateAccount=null,e.prototype.fileAppend=null,e.prototype.fileCreate=null,e.prototype.fileDelete=null,e.prototype.fileUpdate=null,e.prototype.systemDelete=null,e.prototype.systemUndelete=null,e.prototype.contractDeleteInstance=null,e.prototype.freeze=null,e.prototype.consensusCreateTopic=null,e.prototype.consensusUpdateTopic=null,e.prototype.consensusDeleteTopic=null,e.prototype.consensusSubmitMessage=null,e.prototype.uncheckedSubmit=null,e.prototype.tokenCreation=null,e.prototype.tokenFreeze=null,e.prototype.tokenUnfreeze=null,e.prototype.tokenGrantKyc=null,e.prototype.tokenRevokeKyc=null,e.prototype.tokenDeletion=null,e.prototype.tokenUpdate=null,e.prototype.tokenMint=null,e.prototype.tokenBurn=null,e.prototype.tokenWipe=null,e.prototype.tokenAssociate=null,e.prototype.tokenDissociate=null,e.prototype.scheduleCreate=null,e.prototype.scheduleDelete=null,e.prototype.scheduleSign=null,e.prototype.tokenFeeScheduleUpdate=null,e.prototype.tokenPause=null,e.prototype.tokenUnpause=null,e.prototype.cryptoApproveAllowance=null,e.prototype.cryptoDeleteAllowance=null,e.prototype.ethereumTransaction=null,e.prototype.nodeStakeUpdate=null,e.prototype.utilPrng=null,e.prototype.tokenUpdateNfts=null,e.prototype.nodeCreate=null,e.prototype.nodeUpdate=null,e.prototype.nodeDelete=null,e.prototype.tokenReject=null,e.prototype.tokenAirdrop=null,e.prototype.tokenCancelAirdrop=null,e.prototype.tokenClaimAirdrop=null,e.prototype.stateSignatureTransaction=null,e.prototype.historyProofSignature=null,e.prototype.historyProofKeyPublication=null,e.prototype.historyProofVote=null,e.prototype.maxCustomFees=o.emptyArray,Object.defineProperty(e.prototype,"data",{get:o.oneOfGetter(t=["contractCall","contractCreateInstance","contractUpdateInstance","cryptoAddLiveHash","cryptoCreateAccount","cryptoDelete","cryptoDeleteLiveHash","cryptoTransfer","cryptoUpdateAccount","fileAppend","fileCreate","fileDelete","fileUpdate","systemDelete","systemUndelete","contractDeleteInstance","freeze","consensusCreateTopic","consensusUpdateTopic","consensusDeleteTopic","consensusSubmitMessage","uncheckedSubmit","tokenCreation","tokenFreeze","tokenUnfreeze","tokenGrantKyc","tokenRevokeKyc","tokenDeletion","tokenUpdate","tokenMint","tokenBurn","tokenWipe","tokenAssociate","tokenDissociate","scheduleCreate","scheduleDelete","scheduleSign","tokenFeeScheduleUpdate","tokenPause","tokenUnpause","cryptoApproveAllowance","cryptoDeleteAllowance","ethereumTransaction","nodeStakeUpdate","utilPrng","tokenUpdateNfts","nodeCreate","nodeUpdate","nodeDelete","tokenReject","tokenAirdrop","tokenCancelAirdrop","tokenClaimAirdrop","stateSignatureTransaction","historyProofSignature","historyProofKeyPublication","historyProofVote"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.transactionID&&Object.hasOwnProperty.call(e,"transactionID")&&i.proto.TransactionID.encode(e.transactionID,t.uint32(10).fork()).ldelim(),null!=e.nodeAccountID&&Object.hasOwnProperty.call(e,"nodeAccountID")&&i.proto.AccountID.encode(e.nodeAccountID,t.uint32(18).fork()).ldelim(),null!=e.transactionFee&&Object.hasOwnProperty.call(e,"transactionFee")&&t.uint32(24).uint64(e.transactionFee),null!=e.transactionValidDuration&&Object.hasOwnProperty.call(e,"transactionValidDuration")&&i.proto.Duration.encode(e.transactionValidDuration,t.uint32(34).fork()).ldelim(),null!=e.generateRecord&&Object.hasOwnProperty.call(e,"generateRecord")&&t.uint32(40).bool(e.generateRecord),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(50).string(e.memo),null!=e.contractCall&&Object.hasOwnProperty.call(e,"contractCall")&&i.proto.ContractCallTransactionBody.encode(e.contractCall,t.uint32(58).fork()).ldelim(),null!=e.contractCreateInstance&&Object.hasOwnProperty.call(e,"contractCreateInstance")&&i.proto.ContractCreateTransactionBody.encode(e.contractCreateInstance,t.uint32(66).fork()).ldelim(),null!=e.contractUpdateInstance&&Object.hasOwnProperty.call(e,"contractUpdateInstance")&&i.proto.ContractUpdateTransactionBody.encode(e.contractUpdateInstance,t.uint32(74).fork()).ldelim(),null!=e.cryptoAddLiveHash&&Object.hasOwnProperty.call(e,"cryptoAddLiveHash")&&i.proto.CryptoAddLiveHashTransactionBody.encode(e.cryptoAddLiveHash,t.uint32(82).fork()).ldelim(),null!=e.cryptoCreateAccount&&Object.hasOwnProperty.call(e,"cryptoCreateAccount")&&i.proto.CryptoCreateTransactionBody.encode(e.cryptoCreateAccount,t.uint32(90).fork()).ldelim(),null!=e.cryptoDelete&&Object.hasOwnProperty.call(e,"cryptoDelete")&&i.proto.CryptoDeleteTransactionBody.encode(e.cryptoDelete,t.uint32(98).fork()).ldelim(),null!=e.cryptoDeleteLiveHash&&Object.hasOwnProperty.call(e,"cryptoDeleteLiveHash")&&i.proto.CryptoDeleteLiveHashTransactionBody.encode(e.cryptoDeleteLiveHash,t.uint32(106).fork()).ldelim(),null!=e.cryptoTransfer&&Object.hasOwnProperty.call(e,"cryptoTransfer")&&i.proto.CryptoTransferTransactionBody.encode(e.cryptoTransfer,t.uint32(114).fork()).ldelim(),null!=e.cryptoUpdateAccount&&Object.hasOwnProperty.call(e,"cryptoUpdateAccount")&&i.proto.CryptoUpdateTransactionBody.encode(e.cryptoUpdateAccount,t.uint32(122).fork()).ldelim(),null!=e.fileAppend&&Object.hasOwnProperty.call(e,"fileAppend")&&i.proto.FileAppendTransactionBody.encode(e.fileAppend,t.uint32(130).fork()).ldelim(),null!=e.fileCreate&&Object.hasOwnProperty.call(e,"fileCreate")&&i.proto.FileCreateTransactionBody.encode(e.fileCreate,t.uint32(138).fork()).ldelim(),null!=e.fileDelete&&Object.hasOwnProperty.call(e,"fileDelete")&&i.proto.FileDeleteTransactionBody.encode(e.fileDelete,t.uint32(146).fork()).ldelim(),null!=e.fileUpdate&&Object.hasOwnProperty.call(e,"fileUpdate")&&i.proto.FileUpdateTransactionBody.encode(e.fileUpdate,t.uint32(154).fork()).ldelim(),null!=e.systemDelete&&Object.hasOwnProperty.call(e,"systemDelete")&&i.proto.SystemDeleteTransactionBody.encode(e.systemDelete,t.uint32(162).fork()).ldelim(),null!=e.systemUndelete&&Object.hasOwnProperty.call(e,"systemUndelete")&&i.proto.SystemUndeleteTransactionBody.encode(e.systemUndelete,t.uint32(170).fork()).ldelim(),null!=e.contractDeleteInstance&&Object.hasOwnProperty.call(e,"contractDeleteInstance")&&i.proto.ContractDeleteTransactionBody.encode(e.contractDeleteInstance,t.uint32(178).fork()).ldelim(),null!=e.freeze&&Object.hasOwnProperty.call(e,"freeze")&&i.proto.FreezeTransactionBody.encode(e.freeze,t.uint32(186).fork()).ldelim(),null!=e.consensusCreateTopic&&Object.hasOwnProperty.call(e,"consensusCreateTopic")&&i.proto.ConsensusCreateTopicTransactionBody.encode(e.consensusCreateTopic,t.uint32(194).fork()).ldelim(),null!=e.consensusUpdateTopic&&Object.hasOwnProperty.call(e,"consensusUpdateTopic")&&i.proto.ConsensusUpdateTopicTransactionBody.encode(e.consensusUpdateTopic,t.uint32(202).fork()).ldelim(),null!=e.consensusDeleteTopic&&Object.hasOwnProperty.call(e,"consensusDeleteTopic")&&i.proto.ConsensusDeleteTopicTransactionBody.encode(e.consensusDeleteTopic,t.uint32(210).fork()).ldelim(),null!=e.consensusSubmitMessage&&Object.hasOwnProperty.call(e,"consensusSubmitMessage")&&i.proto.ConsensusSubmitMessageTransactionBody.encode(e.consensusSubmitMessage,t.uint32(218).fork()).ldelim(),null!=e.uncheckedSubmit&&Object.hasOwnProperty.call(e,"uncheckedSubmit")&&i.proto.UncheckedSubmitBody.encode(e.uncheckedSubmit,t.uint32(226).fork()).ldelim(),null!=e.tokenCreation&&Object.hasOwnProperty.call(e,"tokenCreation")&&i.proto.TokenCreateTransactionBody.encode(e.tokenCreation,t.uint32(234).fork()).ldelim(),null!=e.tokenFreeze&&Object.hasOwnProperty.call(e,"tokenFreeze")&&i.proto.TokenFreezeAccountTransactionBody.encode(e.tokenFreeze,t.uint32(250).fork()).ldelim(),null!=e.tokenUnfreeze&&Object.hasOwnProperty.call(e,"tokenUnfreeze")&&i.proto.TokenUnfreezeAccountTransactionBody.encode(e.tokenUnfreeze,t.uint32(258).fork()).ldelim(),null!=e.tokenGrantKyc&&Object.hasOwnProperty.call(e,"tokenGrantKyc")&&i.proto.TokenGrantKycTransactionBody.encode(e.tokenGrantKyc,t.uint32(266).fork()).ldelim(),null!=e.tokenRevokeKyc&&Object.hasOwnProperty.call(e,"tokenRevokeKyc")&&i.proto.TokenRevokeKycTransactionBody.encode(e.tokenRevokeKyc,t.uint32(274).fork()).ldelim(),null!=e.tokenDeletion&&Object.hasOwnProperty.call(e,"tokenDeletion")&&i.proto.TokenDeleteTransactionBody.encode(e.tokenDeletion,t.uint32(282).fork()).ldelim(),null!=e.tokenUpdate&&Object.hasOwnProperty.call(e,"tokenUpdate")&&i.proto.TokenUpdateTransactionBody.encode(e.tokenUpdate,t.uint32(290).fork()).ldelim(),null!=e.tokenMint&&Object.hasOwnProperty.call(e,"tokenMint")&&i.proto.TokenMintTransactionBody.encode(e.tokenMint,t.uint32(298).fork()).ldelim(),null!=e.tokenBurn&&Object.hasOwnProperty.call(e,"tokenBurn")&&i.proto.TokenBurnTransactionBody.encode(e.tokenBurn,t.uint32(306).fork()).ldelim(),null!=e.tokenWipe&&Object.hasOwnProperty.call(e,"tokenWipe")&&i.proto.TokenWipeAccountTransactionBody.encode(e.tokenWipe,t.uint32(314).fork()).ldelim(),null!=e.tokenAssociate&&Object.hasOwnProperty.call(e,"tokenAssociate")&&i.proto.TokenAssociateTransactionBody.encode(e.tokenAssociate,t.uint32(322).fork()).ldelim(),null!=e.tokenDissociate&&Object.hasOwnProperty.call(e,"tokenDissociate")&&i.proto.TokenDissociateTransactionBody.encode(e.tokenDissociate,t.uint32(330).fork()).ldelim(),null!=e.scheduleCreate&&Object.hasOwnProperty.call(e,"scheduleCreate")&&i.proto.ScheduleCreateTransactionBody.encode(e.scheduleCreate,t.uint32(338).fork()).ldelim(),null!=e.scheduleDelete&&Object.hasOwnProperty.call(e,"scheduleDelete")&&i.proto.ScheduleDeleteTransactionBody.encode(e.scheduleDelete,t.uint32(346).fork()).ldelim(),null!=e.scheduleSign&&Object.hasOwnProperty.call(e,"scheduleSign")&&i.proto.ScheduleSignTransactionBody.encode(e.scheduleSign,t.uint32(354).fork()).ldelim(),null!=e.tokenFeeScheduleUpdate&&Object.hasOwnProperty.call(e,"tokenFeeScheduleUpdate")&&i.proto.TokenFeeScheduleUpdateTransactionBody.encode(e.tokenFeeScheduleUpdate,t.uint32(362).fork()).ldelim(),null!=e.tokenPause&&Object.hasOwnProperty.call(e,"tokenPause")&&i.proto.TokenPauseTransactionBody.encode(e.tokenPause,t.uint32(370).fork()).ldelim(),null!=e.tokenUnpause&&Object.hasOwnProperty.call(e,"tokenUnpause")&&i.proto.TokenUnpauseTransactionBody.encode(e.tokenUnpause,t.uint32(378).fork()).ldelim(),null!=e.cryptoApproveAllowance&&Object.hasOwnProperty.call(e,"cryptoApproveAllowance")&&i.proto.CryptoApproveAllowanceTransactionBody.encode(e.cryptoApproveAllowance,t.uint32(386).fork()).ldelim(),null!=e.cryptoDeleteAllowance&&Object.hasOwnProperty.call(e,"cryptoDeleteAllowance")&&i.proto.CryptoDeleteAllowanceTransactionBody.encode(e.cryptoDeleteAllowance,t.uint32(394).fork()).ldelim(),null!=e.ethereumTransaction&&Object.hasOwnProperty.call(e,"ethereumTransaction")&&i.proto.EthereumTransactionBody.encode(e.ethereumTransaction,t.uint32(402).fork()).ldelim(),null!=e.nodeStakeUpdate&&Object.hasOwnProperty.call(e,"nodeStakeUpdate")&&i.proto.NodeStakeUpdateTransactionBody.encode(e.nodeStakeUpdate,t.uint32(410).fork()).ldelim(),null!=e.utilPrng&&Object.hasOwnProperty.call(e,"utilPrng")&&i.proto.UtilPrngTransactionBody.encode(e.utilPrng,t.uint32(418).fork()).ldelim(),null!=e.tokenUpdateNfts&&Object.hasOwnProperty.call(e,"tokenUpdateNfts")&&i.proto.TokenUpdateNftsTransactionBody.encode(e.tokenUpdateNfts,t.uint32(426).fork()).ldelim(),null!=e.nodeCreate&&Object.hasOwnProperty.call(e,"nodeCreate")&&i.com.hedera.hapi.node.addressbook.NodeCreateTransactionBody.encode(e.nodeCreate,t.uint32(434).fork()).ldelim(),null!=e.nodeUpdate&&Object.hasOwnProperty.call(e,"nodeUpdate")&&i.com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody.encode(e.nodeUpdate,t.uint32(442).fork()).ldelim(),null!=e.nodeDelete&&Object.hasOwnProperty.call(e,"nodeDelete")&&i.com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody.encode(e.nodeDelete,t.uint32(450).fork()).ldelim(),null!=e.tokenReject&&Object.hasOwnProperty.call(e,"tokenReject")&&i.proto.TokenRejectTransactionBody.encode(e.tokenReject,t.uint32(458).fork()).ldelim(),null!=e.tokenAirdrop&&Object.hasOwnProperty.call(e,"tokenAirdrop")&&i.proto.TokenAirdropTransactionBody.encode(e.tokenAirdrop,t.uint32(466).fork()).ldelim(),null!=e.tokenCancelAirdrop&&Object.hasOwnProperty.call(e,"tokenCancelAirdrop")&&i.proto.TokenCancelAirdropTransactionBody.encode(e.tokenCancelAirdrop,t.uint32(474).fork()).ldelim(),null!=e.tokenClaimAirdrop&&Object.hasOwnProperty.call(e,"tokenClaimAirdrop")&&i.proto.TokenClaimAirdropTransactionBody.encode(e.tokenClaimAirdrop,t.uint32(482).fork()).ldelim(),null!=e.stateSignatureTransaction&&Object.hasOwnProperty.call(e,"stateSignatureTransaction")&&i.com.hedera.hapi.platform.event.StateSignatureTransaction.encode(e.stateSignatureTransaction,t.uint32(522).fork()).ldelim(),null!=e.historyProofSignature&&Object.hasOwnProperty.call(e,"historyProofSignature")&&i.com.hedera.hapi.services.auxiliary.history.HistoryProofSignatureTransactionBody.encode(e.historyProofSignature,t.uint32(554).fork()).ldelim(),null!=e.historyProofKeyPublication&&Object.hasOwnProperty.call(e,"historyProofKeyPublication")&&i.com.hedera.hapi.services.auxiliary.history.HistoryProofKeyPublicationTransactionBody.encode(e.historyProofKeyPublication,t.uint32(562).fork()).ldelim(),null!=e.historyProofVote&&Object.hasOwnProperty.call(e,"historyProofVote")&&i.com.hedera.hapi.services.auxiliary.history.HistoryProofVoteTransactionBody.encode(e.historyProofVote,t.uint32(570).fork()).ldelim(),null!=e.maxCustomFees&&e.maxCustomFees.length)for(var r=0;r<e.maxCustomFees.length;++r)i.proto.CustomFeeLimit.encode(e.maxCustomFees[r],t.uint32(8010).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 2:o.nodeAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.transactionFee=e.uint64();break;case 4:o.transactionValidDuration=i.proto.Duration.decode(e,e.uint32());break;case 5:o.generateRecord=e.bool();break;case 6:o.memo=e.string();break;case 7:o.contractCall=i.proto.ContractCallTransactionBody.decode(e,e.uint32());break;case 8:o.contractCreateInstance=i.proto.ContractCreateTransactionBody.decode(e,e.uint32());break;case 9:o.contractUpdateInstance=i.proto.ContractUpdateTransactionBody.decode(e,e.uint32());break;case 10:o.cryptoAddLiveHash=i.proto.CryptoAddLiveHashTransactionBody.decode(e,e.uint32());break;case 11:o.cryptoCreateAccount=i.proto.CryptoCreateTransactionBody.decode(e,e.uint32());break;case 12:o.cryptoDelete=i.proto.CryptoDeleteTransactionBody.decode(e,e.uint32());break;case 13:o.cryptoDeleteLiveHash=i.proto.CryptoDeleteLiveHashTransactionBody.decode(e,e.uint32());break;case 14:o.cryptoTransfer=i.proto.CryptoTransferTransactionBody.decode(e,e.uint32());break;case 15:o.cryptoUpdateAccount=i.proto.CryptoUpdateTransactionBody.decode(e,e.uint32());break;case 16:o.fileAppend=i.proto.FileAppendTransactionBody.decode(e,e.uint32());break;case 17:o.fileCreate=i.proto.FileCreateTransactionBody.decode(e,e.uint32());break;case 18:o.fileDelete=i.proto.FileDeleteTransactionBody.decode(e,e.uint32());break;case 19:o.fileUpdate=i.proto.FileUpdateTransactionBody.decode(e,e.uint32());break;case 20:o.systemDelete=i.proto.SystemDeleteTransactionBody.decode(e,e.uint32());break;case 21:o.systemUndelete=i.proto.SystemUndeleteTransactionBody.decode(e,e.uint32());break;case 22:o.contractDeleteInstance=i.proto.ContractDeleteTransactionBody.decode(e,e.uint32());break;case 23:o.freeze=i.proto.FreezeTransactionBody.decode(e,e.uint32());break;case 24:o.consensusCreateTopic=i.proto.ConsensusCreateTopicTransactionBody.decode(e,e.uint32());break;case 25:o.consensusUpdateTopic=i.proto.ConsensusUpdateTopicTransactionBody.decode(e,e.uint32());break;case 26:o.consensusDeleteTopic=i.proto.ConsensusDeleteTopicTransactionBody.decode(e,e.uint32());break;case 27:o.consensusSubmitMessage=i.proto.ConsensusSubmitMessageTransactionBody.decode(e,e.uint32());break;case 28:o.uncheckedSubmit=i.proto.UncheckedSubmitBody.decode(e,e.uint32());break;case 29:o.tokenCreation=i.proto.TokenCreateTransactionBody.decode(e,e.uint32());break;case 31:o.tokenFreeze=i.proto.TokenFreezeAccountTransactionBody.decode(e,e.uint32());break;case 32:o.tokenUnfreeze=i.proto.TokenUnfreezeAccountTransactionBody.decode(e,e.uint32());break;case 33:o.tokenGrantKyc=i.proto.TokenGrantKycTransactionBody.decode(e,e.uint32());break;case 34:o.tokenRevokeKyc=i.proto.TokenRevokeKycTransactionBody.decode(e,e.uint32());break;case 35:o.tokenDeletion=i.proto.TokenDeleteTransactionBody.decode(e,e.uint32());break;case 36:o.tokenUpdate=i.proto.TokenUpdateTransactionBody.decode(e,e.uint32());break;case 37:o.tokenMint=i.proto.TokenMintTransactionBody.decode(e,e.uint32());break;case 38:o.tokenBurn=i.proto.TokenBurnTransactionBody.decode(e,e.uint32());break;case 39:o.tokenWipe=i.proto.TokenWipeAccountTransactionBody.decode(e,e.uint32());break;case 40:o.tokenAssociate=i.proto.TokenAssociateTransactionBody.decode(e,e.uint32());break;case 41:o.tokenDissociate=i.proto.TokenDissociateTransactionBody.decode(e,e.uint32());break;case 42:o.scheduleCreate=i.proto.ScheduleCreateTransactionBody.decode(e,e.uint32());break;case 43:o.scheduleDelete=i.proto.ScheduleDeleteTransactionBody.decode(e,e.uint32());break;case 44:o.scheduleSign=i.proto.ScheduleSignTransactionBody.decode(e,e.uint32());break;case 45:o.tokenFeeScheduleUpdate=i.proto.TokenFeeScheduleUpdateTransactionBody.decode(e,e.uint32());break;case 46:o.tokenPause=i.proto.TokenPauseTransactionBody.decode(e,e.uint32());break;case 47:o.tokenUnpause=i.proto.TokenUnpauseTransactionBody.decode(e,e.uint32());break;case 48:o.cryptoApproveAllowance=i.proto.CryptoApproveAllowanceTransactionBody.decode(e,e.uint32());break;case 49:o.cryptoDeleteAllowance=i.proto.CryptoDeleteAllowanceTransactionBody.decode(e,e.uint32());break;case 50:o.ethereumTransaction=i.proto.EthereumTransactionBody.decode(e,e.uint32());break;case 51:o.nodeStakeUpdate=i.proto.NodeStakeUpdateTransactionBody.decode(e,e.uint32());break;case 52:o.utilPrng=i.proto.UtilPrngTransactionBody.decode(e,e.uint32());break;case 53:o.tokenUpdateNfts=i.proto.TokenUpdateNftsTransactionBody.decode(e,e.uint32());break;case 54:o.nodeCreate=i.com.hedera.hapi.node.addressbook.NodeCreateTransactionBody.decode(e,e.uint32());break;case 55:o.nodeUpdate=i.com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody.decode(e,e.uint32());break;case 56:o.nodeDelete=i.com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody.decode(e,e.uint32());break;case 57:o.tokenReject=i.proto.TokenRejectTransactionBody.decode(e,e.uint32());break;case 58:o.tokenAirdrop=i.proto.TokenAirdropTransactionBody.decode(e,e.uint32());break;case 59:o.tokenCancelAirdrop=i.proto.TokenCancelAirdropTransactionBody.decode(e,e.uint32());break;case 60:o.tokenClaimAirdrop=i.proto.TokenClaimAirdropTransactionBody.decode(e,e.uint32());break;case 65:o.stateSignatureTransaction=i.com.hedera.hapi.platform.event.StateSignatureTransaction.decode(e,e.uint32());break;case 69:o.historyProofSignature=i.com.hedera.hapi.services.auxiliary.history.HistoryProofSignatureTransactionBody.decode(e,e.uint32());break;case 70:o.historyProofKeyPublication=i.com.hedera.hapi.services.auxiliary.history.HistoryProofKeyPublicationTransactionBody.decode(e,e.uint32());break;case 71:o.historyProofVote=i.com.hedera.hapi.services.auxiliary.history.HistoryProofVoteTransactionBody.decode(e,e.uint32());break;case 1001:o.maxCustomFees&&o.maxCustomFees.length||(o.maxCustomFees=[]),o.maxCustomFees.push(i.proto.CustomFeeLimit.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionBody"},e}(),t.ShardID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ShardID;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.shardNum=e.int64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ShardID"},e}(),t.RealmID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.RealmID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.RealmID"},e}(),t.TokenID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.tokenNum=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),null!=e.tokenNum&&Object.hasOwnProperty.call(e,"tokenNum")&&t.uint32(24).int64(e.tokenNum),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;case 3:o.tokenNum=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenID"},e}(),t.BlockHashAlgorithm=function(){const e={},t=Object.create(e);return t[e[0]="SHA2_384"]=0,t}(),t.AccountID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.accountNum=null,e.prototype.alias=null,Object.defineProperty(e.prototype,"account",{get:o.oneOfGetter(t=["accountNum","alias"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),null!=e.accountNum&&Object.hasOwnProperty.call(e,"accountNum")&&t.uint32(24).int64(e.accountNum),null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&t.uint32(34).bytes(e.alias),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.AccountID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;case 3:o.accountNum=e.int64();break;case 4:o.alias=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.AccountID"},e}(),t.NftID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token_ID=null,e.prototype.serialNumber=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token_ID&&Object.hasOwnProperty.call(e,"token_ID")&&i.proto.TokenID.encode(e.token_ID,t.uint32(10).fork()).ldelim(),null!=e.serialNumber&&Object.hasOwnProperty.call(e,"serialNumber")&&t.uint32(16).int64(e.serialNumber),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NftID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token_ID=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.serialNumber=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NftID"},e}(),t.FileID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.fileNum=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),null!=e.fileNum&&Object.hasOwnProperty.call(e,"fileNum")&&t.uint32(24).int64(e.fileNum),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;case 3:o.fileNum=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileID"},e}(),t.ContractID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.contractNum=null,e.prototype.evmAddress=null,Object.defineProperty(e.prototype,"contract",{get:o.oneOfGetter(t=["contractNum","evmAddress"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),null!=e.contractNum&&Object.hasOwnProperty.call(e,"contractNum")&&t.uint32(24).int64(e.contractNum),null!=e.evmAddress&&Object.hasOwnProperty.call(e,"evmAddress")&&t.uint32(34).bytes(e.evmAddress),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;case 3:o.contractNum=e.int64();break;case 4:o.evmAddress=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractID"},e}(),t.TopicID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.topicNum=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),null!=e.topicNum&&Object.hasOwnProperty.call(e,"topicNum")&&t.uint32(24).int64(e.topicNum),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TopicID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;case 3:o.topicNum=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TopicID"},e}(),t.ScheduleID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.shardNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.realmNum=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.scheduleNum=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.shardNum&&Object.hasOwnProperty.call(e,"shardNum")&&t.uint32(8).int64(e.shardNum),null!=e.realmNum&&Object.hasOwnProperty.call(e,"realmNum")&&t.uint32(16).int64(e.realmNum),null!=e.scheduleNum&&Object.hasOwnProperty.call(e,"scheduleNum")&&t.uint32(24).int64(e.scheduleNum),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.shardNum=e.int64();break;case 2:o.realmNum=e.int64();break;case 3:o.scheduleNum=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleID"},e}(),t.TransactionID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transactionValidStart=null,e.prototype.accountID=null,e.prototype.scheduled=!1,e.prototype.nonce=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.transactionValidStart&&Object.hasOwnProperty.call(e,"transactionValidStart")&&i.proto.Timestamp.encode(e.transactionValidStart,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.scheduled&&Object.hasOwnProperty.call(e,"scheduled")&&t.uint32(24).bool(e.scheduled),null!=e.nonce&&Object.hasOwnProperty.call(e,"nonce")&&t.uint32(32).int32(e.nonce),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transactionValidStart=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.scheduled=e.bool();break;case 4:o.nonce=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionID"},e}(),t.AccountAmount=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountID=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.isApproval=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(10).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(16).sint64(e.amount),null!=e.isApproval&&Object.hasOwnProperty.call(e,"isApproval")&&t.uint32(24).bool(e.isApproval),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.AccountAmount;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.amount=e.sint64();break;case 3:o.isApproval=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.AccountAmount"},e}(),t.TransferList=function(){function e(e){if(this.accountAmounts=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountAmounts=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountAmounts&&e.accountAmounts.length)for(var r=0;r<e.accountAmounts.length;++r)i.proto.AccountAmount.encode(e.accountAmounts[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransferList;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.accountAmounts&&o.accountAmounts.length||(o.accountAmounts=[]),o.accountAmounts.push(i.proto.AccountAmount.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransferList"},e}(),t.NftTransfer=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.senderAccountID=null,e.prototype.receiverAccountID=null,e.prototype.serialNumber=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.isApproval=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.senderAccountID&&Object.hasOwnProperty.call(e,"senderAccountID")&&i.proto.AccountID.encode(e.senderAccountID,t.uint32(10).fork()).ldelim(),null!=e.receiverAccountID&&Object.hasOwnProperty.call(e,"receiverAccountID")&&i.proto.AccountID.encode(e.receiverAccountID,t.uint32(18).fork()).ldelim(),null!=e.serialNumber&&Object.hasOwnProperty.call(e,"serialNumber")&&t.uint32(24).int64(e.serialNumber),null!=e.isApproval&&Object.hasOwnProperty.call(e,"isApproval")&&t.uint32(32).bool(e.isApproval),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NftTransfer;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.senderAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.receiverAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.serialNumber=e.int64();break;case 4:o.isApproval=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NftTransfer"},e}(),t.TokenTransferList=function(){function e(e){if(this.transfers=[],this.nftTransfers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.transfers=o.emptyArray,e.prototype.nftTransfers=o.emptyArray,e.prototype.expectedDecimals=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.transfers&&e.transfers.length)for(var r=0;r<e.transfers.length;++r)i.proto.AccountAmount.encode(e.transfers[r],t.uint32(18).fork()).ldelim();if(null!=e.nftTransfers&&e.nftTransfers.length)for(r=0;r<e.nftTransfers.length;++r)i.proto.NftTransfer.encode(e.nftTransfers[r],t.uint32(26).fork()).ldelim();return null!=e.expectedDecimals&&Object.hasOwnProperty.call(e,"expectedDecimals")&&i.google.protobuf.UInt32Value.encode(e.expectedDecimals,t.uint32(34).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenTransferList;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.transfers&&o.transfers.length||(o.transfers=[]),o.transfers.push(i.proto.AccountAmount.decode(e,e.uint32()));break;case 3:o.nftTransfers&&o.nftTransfers.length||(o.nftTransfers=[]),o.nftTransfers.push(i.proto.NftTransfer.decode(e,e.uint32()));break;case 4:o.expectedDecimals=i.google.protobuf.UInt32Value.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenTransferList"},e}(),t.Fraction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.numerator=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.denominator=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.numerator&&Object.hasOwnProperty.call(e,"numerator")&&t.uint32(8).int64(e.numerator),null!=e.denominator&&Object.hasOwnProperty.call(e,"denominator")&&t.uint32(16).int64(e.denominator),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Fraction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.numerator=e.int64();break;case 2:o.denominator=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Fraction"},e}(),t.TokenType=function(){const e={},t=Object.create(e);return t[e[0]="FUNGIBLE_COMMON"]=0,t[e[1]="NON_FUNGIBLE_UNIQUE"]=1,t}(),t.SubType=function(){const e={},t=Object.create(e);return t[e[0]="DEFAULT"]=0,t[e[1]="TOKEN_FUNGIBLE_COMMON"]=1,t[e[2]="TOKEN_NON_FUNGIBLE_UNIQUE"]=2,t[e[3]="TOKEN_FUNGIBLE_COMMON_WITH_CUSTOM_FEES"]=3,t[e[4]="TOKEN_NON_FUNGIBLE_UNIQUE_WITH_CUSTOM_FEES"]=4,t[e[5]="SCHEDULE_CREATE_CONTRACT_CALL"]=5,t[e[6]="TOPIC_CREATE_WITH_CUSTOM_FEES"]=6,t}(),t.TokenSupplyType=function(){const e={},t=Object.create(e);return t[e[0]="INFINITE"]=0,t[e[1]="FINITE"]=1,t}(),t.TokenKeyValidation=function(){const e={},t=Object.create(e);return t[e[0]="FULL_VALIDATION"]=0,t[e[1]="NO_VALIDATION"]=1,t}(),t.TokenFreezeStatus=function(){const e={},t=Object.create(e);return t[e[0]="FreezeNotApplicable"]=0,t[e[1]="Frozen"]=1,t[e[2]="Unfrozen"]=2,t}(),t.TokenKycStatus=function(){const e={},t=Object.create(e);return t[e[0]="KycNotApplicable"]=0,t[e[1]="Granted"]=1,t[e[2]="Revoked"]=2,t}(),t.TokenPauseStatus=function(){const e={},t=Object.create(e);return t[e[0]="PauseNotApplicable"]=0,t[e[1]="Paused"]=1,t[e[2]="Unpaused"]=2,t}(),t.Key=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.contractID=null,e.prototype.ed25519=null,e.prototype.RSA_3072=null,e.prototype.ECDSA_384=null,e.prototype.thresholdKey=null,e.prototype.keyList=null,e.prototype.ECDSASecp256k1=null,e.prototype.delegatableContractId=null,Object.defineProperty(e.prototype,"key",{get:o.oneOfGetter(t=["contractID","ed25519","RSA_3072","ECDSA_384","thresholdKey","keyList","ECDSASecp256k1","delegatableContractId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.ed25519&&Object.hasOwnProperty.call(e,"ed25519")&&t.uint32(18).bytes(e.ed25519),null!=e.RSA_3072&&Object.hasOwnProperty.call(e,"RSA_3072")&&t.uint32(26).bytes(e.RSA_3072),null!=e.ECDSA_384&&Object.hasOwnProperty.call(e,"ECDSA_384")&&t.uint32(34).bytes(e.ECDSA_384),null!=e.thresholdKey&&Object.hasOwnProperty.call(e,"thresholdKey")&&i.proto.ThresholdKey.encode(e.thresholdKey,t.uint32(42).fork()).ldelim(),null!=e.keyList&&Object.hasOwnProperty.call(e,"keyList")&&i.proto.KeyList.encode(e.keyList,t.uint32(50).fork()).ldelim(),null!=e.ECDSASecp256k1&&Object.hasOwnProperty.call(e,"ECDSASecp256k1")&&t.uint32(58).bytes(e.ECDSASecp256k1),null!=e.delegatableContractId&&Object.hasOwnProperty.call(e,"delegatableContractId")&&i.proto.ContractID.encode(e.delegatableContractId,t.uint32(66).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Key;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.ed25519=e.bytes();break;case 3:o.RSA_3072=e.bytes();break;case 4:o.ECDSA_384=e.bytes();break;case 5:o.thresholdKey=i.proto.ThresholdKey.decode(e,e.uint32());break;case 6:o.keyList=i.proto.KeyList.decode(e,e.uint32());break;case 7:o.ECDSASecp256k1=e.bytes();break;case 8:o.delegatableContractId=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Key"},e}(),t.ThresholdKey=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.threshold=0,e.prototype.keys=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.threshold&&Object.hasOwnProperty.call(e,"threshold")&&t.uint32(8).uint32(e.threshold),null!=e.keys&&Object.hasOwnProperty.call(e,"keys")&&i.proto.KeyList.encode(e.keys,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ThresholdKey;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.threshold=e.uint32();break;case 2:o.keys=i.proto.KeyList.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ThresholdKey"},e}(),t.KeyList=function(){function e(e){if(this.keys=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.keys=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.keys&&e.keys.length)for(var r=0;r<e.keys.length;++r)i.proto.Key.encode(e.keys[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.KeyList;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.keys&&o.keys.length||(o.keys=[]),o.keys.push(i.proto.Key.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.KeyList"},e}(),t.Signature=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.contract=null,e.prototype.ed25519=null,e.prototype.RSA_3072=null,e.prototype.ECDSA_384=null,e.prototype.thresholdSignature=null,e.prototype.signatureList=null,Object.defineProperty(e.prototype,"signature",{get:o.oneOfGetter(t=["contract","ed25519","RSA_3072","ECDSA_384","thresholdSignature","signatureList"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contract&&Object.hasOwnProperty.call(e,"contract")&&t.uint32(10).bytes(e.contract),null!=e.ed25519&&Object.hasOwnProperty.call(e,"ed25519")&&t.uint32(18).bytes(e.ed25519),null!=e.RSA_3072&&Object.hasOwnProperty.call(e,"RSA_3072")&&t.uint32(26).bytes(e.RSA_3072),null!=e.ECDSA_384&&Object.hasOwnProperty.call(e,"ECDSA_384")&&t.uint32(34).bytes(e.ECDSA_384),null!=e.thresholdSignature&&Object.hasOwnProperty.call(e,"thresholdSignature")&&i.proto.ThresholdSignature.encode(e.thresholdSignature,t.uint32(42).fork()).ldelim(),null!=e.signatureList&&Object.hasOwnProperty.call(e,"signatureList")&&i.proto.SignatureList.encode(e.signatureList,t.uint32(50).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Signature;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contract=e.bytes();break;case 2:o.ed25519=e.bytes();break;case 3:o.RSA_3072=e.bytes();break;case 4:o.ECDSA_384=e.bytes();break;case 5:o.thresholdSignature=i.proto.ThresholdSignature.decode(e,e.uint32());break;case 6:o.signatureList=i.proto.SignatureList.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Signature"},e}(),t.ThresholdSignature=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.sigs=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.sigs&&Object.hasOwnProperty.call(e,"sigs")&&i.proto.SignatureList.encode(e.sigs,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ThresholdSignature;e.pos<n;){var a=e.uint32();if(a>>>3==2)o.sigs=i.proto.SignatureList.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ThresholdSignature"},e}(),t.SignatureList=function(){function e(e){if(this.sigs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.sigs=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.sigs&&e.sigs.length)for(var r=0;r<e.sigs.length;++r)i.proto.Signature.encode(e.sigs[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SignatureList;e.pos<n;){var a=e.uint32();if(a>>>3==2)o.sigs&&o.sigs.length||(o.sigs=[]),o.sigs.push(i.proto.Signature.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SignatureList"},e}(),t.SignaturePair=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.pubKeyPrefix=o.newBuffer([]),e.prototype.contract=null,e.prototype.ed25519=null,e.prototype.RSA_3072=null,e.prototype.ECDSA_384=null,e.prototype.ECDSASecp256k1=null,Object.defineProperty(e.prototype,"signature",{get:o.oneOfGetter(t=["contract","ed25519","RSA_3072","ECDSA_384","ECDSASecp256k1"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.pubKeyPrefix&&Object.hasOwnProperty.call(e,"pubKeyPrefix")&&t.uint32(10).bytes(e.pubKeyPrefix),null!=e.contract&&Object.hasOwnProperty.call(e,"contract")&&t.uint32(18).bytes(e.contract),null!=e.ed25519&&Object.hasOwnProperty.call(e,"ed25519")&&t.uint32(26).bytes(e.ed25519),null!=e.RSA_3072&&Object.hasOwnProperty.call(e,"RSA_3072")&&t.uint32(34).bytes(e.RSA_3072),null!=e.ECDSA_384&&Object.hasOwnProperty.call(e,"ECDSA_384")&&t.uint32(42).bytes(e.ECDSA_384),null!=e.ECDSASecp256k1&&Object.hasOwnProperty.call(e,"ECDSASecp256k1")&&t.uint32(50).bytes(e.ECDSASecp256k1),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SignaturePair;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.pubKeyPrefix=e.bytes();break;case 2:o.contract=e.bytes();break;case 3:o.ed25519=e.bytes();break;case 4:o.RSA_3072=e.bytes();break;case 5:o.ECDSA_384=e.bytes();break;case 6:o.ECDSASecp256k1=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SignaturePair"},e}(),t.SignatureMap=function(){function e(e){if(this.sigPair=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.sigPair=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.sigPair&&e.sigPair.length)for(var r=0;r<e.sigPair.length;++r)i.proto.SignaturePair.encode(e.sigPair[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SignatureMap;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.sigPair&&o.sigPair.length||(o.sigPair=[]),o.sigPair.push(i.proto.SignaturePair.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SignatureMap"},e}(),t.HederaFunctionality=function(){const e={},t=Object.create(e);return t[e[0]="NONE"]=0,t[e[1]="CryptoTransfer"]=1,t[e[2]="CryptoUpdate"]=2,t[e[3]="CryptoDelete"]=3,t[e[4]="CryptoAddLiveHash"]=4,t[e[5]="CryptoDeleteLiveHash"]=5,t[e[6]="ContractCall"]=6,t[e[7]="ContractCreate"]=7,t[e[8]="ContractUpdate"]=8,t[e[9]="FileCreate"]=9,t[e[10]="FileAppend"]=10,t[e[11]="FileUpdate"]=11,t[e[12]="FileDelete"]=12,t[e[13]="CryptoGetAccountBalance"]=13,t[e[14]="CryptoGetAccountRecords"]=14,t[e[15]="CryptoGetInfo"]=15,t[e[16]="ContractCallLocal"]=16,t[e[17]="ContractGetInfo"]=17,t[e[18]="ContractGetBytecode"]=18,t[e[19]="GetBySolidityID"]=19,t[e[20]="GetByKey"]=20,t[e[21]="CryptoGetLiveHash"]=21,t[e[22]="CryptoGetStakers"]=22,t[e[23]="FileGetContents"]=23,t[e[24]="FileGetInfo"]=24,t[e[25]="TransactionGetRecord"]=25,t[e[26]="ContractGetRecords"]=26,t[e[27]="CryptoCreate"]=27,t[e[28]="SystemDelete"]=28,t[e[29]="SystemUndelete"]=29,t[e[30]="ContractDelete"]=30,t[e[31]="Freeze"]=31,t[e[32]="CreateTransactionRecord"]=32,t[e[33]="CryptoAccountAutoRenew"]=33,t[e[34]="ContractAutoRenew"]=34,t[e[35]="GetVersionInfo"]=35,t[e[36]="TransactionGetReceipt"]=36,t[e[50]="ConsensusCreateTopic"]=50,t[e[51]="ConsensusUpdateTopic"]=51,t[e[52]="ConsensusDeleteTopic"]=52,t[e[53]="ConsensusGetTopicInfo"]=53,t[e[54]="ConsensusSubmitMessage"]=54,t[e[55]="UncheckedSubmit"]=55,t[e[56]="TokenCreate"]=56,t[e[58]="TokenGetInfo"]=58,t[e[59]="TokenFreezeAccount"]=59,t[e[60]="TokenUnfreezeAccount"]=60,t[e[61]="TokenGrantKycToAccount"]=61,t[e[62]="TokenRevokeKycFromAccount"]=62,t[e[63]="TokenDelete"]=63,t[e[64]="TokenUpdate"]=64,t[e[65]="TokenMint"]=65,t[e[66]="TokenBurn"]=66,t[e[67]="TokenAccountWipe"]=67,t[e[68]="TokenAssociateToAccount"]=68,t[e[69]="TokenDissociateFromAccount"]=69,t[e[70]="ScheduleCreate"]=70,t[e[71]="ScheduleDelete"]=71,t[e[72]="ScheduleSign"]=72,t[e[73]="ScheduleGetInfo"]=73,t[e[74]="TokenGetAccountNftInfos"]=74,t[e[75]="TokenGetNftInfo"]=75,t[e[76]="TokenGetNftInfos"]=76,t[e[77]="TokenFeeScheduleUpdate"]=77,t[e[78]="NetworkGetExecutionTime"]=78,t[e[79]="TokenPause"]=79,t[e[80]="TokenUnpause"]=80,t[e[81]="CryptoApproveAllowance"]=81,t[e[82]="CryptoDeleteAllowance"]=82,t[e[83]="GetAccountDetails"]=83,t[e[84]="EthereumTransaction"]=84,t[e[85]="NodeStakeUpdate"]=85,t[e[86]="UtilPrng"]=86,t[e[87]="TransactionGetFastRecord"]=87,t[e[88]="TokenUpdateNfts"]=88,t[e[89]="NodeCreate"]=89,t[e[90]="NodeUpdate"]=90,t[e[91]="NodeDelete"]=91,t[e[92]="TokenReject"]=92,t[e[93]="TokenAirdrop"]=93,t[e[94]="TokenCancelAirdrop"]=94,t[e[95]="TokenClaimAirdrop"]=95,t[e[100]="StateSignatureTransaction"]=100,t[e[104]="HistoryAssemblySignature"]=104,t[e[105]="HistoryProofKeyPublication"]=105,t[e[106]="HistoryProofVote"]=106,t}(),t.FeeComponents=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.min=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.max=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.constant=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.bpt=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.vpt=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.rbh=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.sbh=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.gas=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.tv=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.bpr=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.sbpr=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.min&&Object.hasOwnProperty.call(e,"min")&&t.uint32(8).int64(e.min),null!=e.max&&Object.hasOwnProperty.call(e,"max")&&t.uint32(16).int64(e.max),null!=e.constant&&Object.hasOwnProperty.call(e,"constant")&&t.uint32(24).int64(e.constant),null!=e.bpt&&Object.hasOwnProperty.call(e,"bpt")&&t.uint32(32).int64(e.bpt),null!=e.vpt&&Object.hasOwnProperty.call(e,"vpt")&&t.uint32(40).int64(e.vpt),null!=e.rbh&&Object.hasOwnProperty.call(e,"rbh")&&t.uint32(48).int64(e.rbh),null!=e.sbh&&Object.hasOwnProperty.call(e,"sbh")&&t.uint32(56).int64(e.sbh),null!=e.gas&&Object.hasOwnProperty.call(e,"gas")&&t.uint32(64).int64(e.gas),null!=e.tv&&Object.hasOwnProperty.call(e,"tv")&&t.uint32(72).int64(e.tv),null!=e.bpr&&Object.hasOwnProperty.call(e,"bpr")&&t.uint32(80).int64(e.bpr),null!=e.sbpr&&Object.hasOwnProperty.call(e,"sbpr")&&t.uint32(88).int64(e.sbpr),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FeeComponents;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.min=e.int64();break;case 2:o.max=e.int64();break;case 3:o.constant=e.int64();break;case 4:o.bpt=e.int64();break;case 5:o.vpt=e.int64();break;case 6:o.rbh=e.int64();break;case 7:o.sbh=e.int64();break;case 8:o.gas=e.int64();break;case 9:o.tv=e.int64();break;case 10:o.bpr=e.int64();break;case 11:o.sbpr=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FeeComponents"},e}(),t.TransactionFeeSchedule=function(){function e(e){if(this.fees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.hederaFunctionality=0,e.prototype.feeData=null,e.prototype.fees=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.hederaFunctionality&&Object.hasOwnProperty.call(e,"hederaFunctionality")&&t.uint32(8).int32(e.hederaFunctionality),null!=e.feeData&&Object.hasOwnProperty.call(e,"feeData")&&i.proto.FeeData.encode(e.feeData,t.uint32(18).fork()).ldelim(),null!=e.fees&&e.fees.length)for(var r=0;r<e.fees.length;++r)i.proto.FeeData.encode(e.fees[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionFeeSchedule;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.hederaFunctionality=e.int32();break;case 2:o.feeData=i.proto.FeeData.decode(e,e.uint32());break;case 3:o.fees&&o.fees.length||(o.fees=[]),o.fees.push(i.proto.FeeData.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionFeeSchedule"},e}(),t.FeeData=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodedata=null,e.prototype.networkdata=null,e.prototype.servicedata=null,e.prototype.subType=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.nodedata&&Object.hasOwnProperty.call(e,"nodedata")&&i.proto.FeeComponents.encode(e.nodedata,t.uint32(10).fork()).ldelim(),null!=e.networkdata&&Object.hasOwnProperty.call(e,"networkdata")&&i.proto.FeeComponents.encode(e.networkdata,t.uint32(18).fork()).ldelim(),null!=e.servicedata&&Object.hasOwnProperty.call(e,"servicedata")&&i.proto.FeeComponents.encode(e.servicedata,t.uint32(26).fork()).ldelim(),null!=e.subType&&Object.hasOwnProperty.call(e,"subType")&&t.uint32(32).int32(e.subType),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FeeData;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.nodedata=i.proto.FeeComponents.decode(e,e.uint32());break;case 2:o.networkdata=i.proto.FeeComponents.decode(e,e.uint32());break;case 3:o.servicedata=i.proto.FeeComponents.decode(e,e.uint32());break;case 4:o.subType=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FeeData"},e}(),t.FeeSchedule=function(){function e(e){if(this.transactionFeeSchedule=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transactionFeeSchedule=o.emptyArray,e.prototype.expiryTime=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.transactionFeeSchedule&&e.transactionFeeSchedule.length)for(var r=0;r<e.transactionFeeSchedule.length;++r)i.proto.TransactionFeeSchedule.encode(e.transactionFeeSchedule[r],t.uint32(10).fork()).ldelim();return null!=e.expiryTime&&Object.hasOwnProperty.call(e,"expiryTime")&&i.proto.TimestampSeconds.encode(e.expiryTime,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FeeSchedule;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transactionFeeSchedule&&o.transactionFeeSchedule.length||(o.transactionFeeSchedule=[]),o.transactionFeeSchedule.push(i.proto.TransactionFeeSchedule.decode(e,e.uint32()));break;case 2:o.expiryTime=i.proto.TimestampSeconds.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FeeSchedule"},e}(),t.CurrentAndNextFeeSchedule=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.currentFeeSchedule=null,e.prototype.nextFeeSchedule=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.currentFeeSchedule&&Object.hasOwnProperty.call(e,"currentFeeSchedule")&&i.proto.FeeSchedule.encode(e.currentFeeSchedule,t.uint32(10).fork()).ldelim(),null!=e.nextFeeSchedule&&Object.hasOwnProperty.call(e,"nextFeeSchedule")&&i.proto.FeeSchedule.encode(e.nextFeeSchedule,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CurrentAndNextFeeSchedule;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.currentFeeSchedule=i.proto.FeeSchedule.decode(e,e.uint32());break;case 2:o.nextFeeSchedule=i.proto.FeeSchedule.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CurrentAndNextFeeSchedule"},e}(),t.ServiceEndpoint=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.ipAddressV4=o.newBuffer([]),e.prototype.port=0,e.prototype.domainName="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.ipAddressV4&&Object.hasOwnProperty.call(e,"ipAddressV4")&&t.uint32(10).bytes(e.ipAddressV4),null!=e.port&&Object.hasOwnProperty.call(e,"port")&&t.uint32(16).int32(e.port),null!=e.domainName&&Object.hasOwnProperty.call(e,"domainName")&&t.uint32(26).string(e.domainName),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ServiceEndpoint;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.ipAddressV4=e.bytes();break;case 2:o.port=e.int32();break;case 3:o.domainName=e.string();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ServiceEndpoint"},e}(),t.NodeAddress=function(){function e(e){if(this.serviceEndpoint=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.ipAddress=o.newBuffer([]),e.prototype.portno=0,e.prototype.memo=o.newBuffer([]),e.prototype.RSA_PubKey="",e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.nodeAccountId=null,e.prototype.nodeCertHash=o.newBuffer([]),e.prototype.serviceEndpoint=o.emptyArray,e.prototype.description="",e.prototype.stake=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.ipAddress&&Object.hasOwnProperty.call(e,"ipAddress")&&t.uint32(10).bytes(e.ipAddress),null!=e.portno&&Object.hasOwnProperty.call(e,"portno")&&t.uint32(16).int32(e.portno),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(26).bytes(e.memo),null!=e.RSA_PubKey&&Object.hasOwnProperty.call(e,"RSA_PubKey")&&t.uint32(34).string(e.RSA_PubKey),null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(40).int64(e.nodeId),null!=e.nodeAccountId&&Object.hasOwnProperty.call(e,"nodeAccountId")&&i.proto.AccountID.encode(e.nodeAccountId,t.uint32(50).fork()).ldelim(),null!=e.nodeCertHash&&Object.hasOwnProperty.call(e,"nodeCertHash")&&t.uint32(58).bytes(e.nodeCertHash),null!=e.serviceEndpoint&&e.serviceEndpoint.length)for(var r=0;r<e.serviceEndpoint.length;++r)i.proto.ServiceEndpoint.encode(e.serviceEndpoint[r],t.uint32(66).fork()).ldelim();return null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(74).string(e.description),null!=e.stake&&Object.hasOwnProperty.call(e,"stake")&&t.uint32(80).int64(e.stake),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NodeAddress;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.ipAddress=e.bytes();break;case 2:o.portno=e.int32();break;case 3:o.memo=e.bytes();break;case 4:o.RSA_PubKey=e.string();break;case 5:o.nodeId=e.int64();break;case 6:o.nodeAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 7:o.nodeCertHash=e.bytes();break;case 8:o.serviceEndpoint&&o.serviceEndpoint.length||(o.serviceEndpoint=[]),o.serviceEndpoint.push(i.proto.ServiceEndpoint.decode(e,e.uint32()));break;case 9:o.description=e.string();break;case 10:o.stake=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NodeAddress"},e}(),t.NodeAddressBook=function(){function e(e){if(this.nodeAddress=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodeAddress=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.nodeAddress&&e.nodeAddress.length)for(var r=0;r<e.nodeAddress.length;++r)i.proto.NodeAddress.encode(e.nodeAddress[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NodeAddressBook;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.nodeAddress&&o.nodeAddress.length||(o.nodeAddress=[]),o.nodeAddress.push(i.proto.NodeAddress.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NodeAddressBook"},e}(),t.SemanticVersion=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.major=0,e.prototype.minor=0,e.prototype.patch=0,e.prototype.pre="",e.prototype.build="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.major&&Object.hasOwnProperty.call(e,"major")&&t.uint32(8).int32(e.major),null!=e.minor&&Object.hasOwnProperty.call(e,"minor")&&t.uint32(16).int32(e.minor),null!=e.patch&&Object.hasOwnProperty.call(e,"patch")&&t.uint32(24).int32(e.patch),null!=e.pre&&Object.hasOwnProperty.call(e,"pre")&&t.uint32(34).string(e.pre),null!=e.build&&Object.hasOwnProperty.call(e,"build")&&t.uint32(42).string(e.build),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SemanticVersion;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.major=e.int32();break;case 2:o.minor=e.int32();break;case 3:o.patch=e.int32();break;case 4:o.pre=e.string();break;case 5:o.build=e.string();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SemanticVersion"},e}(),t.Setting=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.name="",e.prototype.value="",e.prototype.data=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(18).string(e.value),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(26).bytes(e.data),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Setting;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.name=e.string();break;case 2:o.value=e.string();break;case 3:o.data=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Setting"},e}(),t.ServicesConfigurationList=function(){function e(e){if(this.nameValue=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nameValue=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.nameValue&&e.nameValue.length)for(var r=0;r<e.nameValue.length;++r)i.proto.Setting.encode(e.nameValue[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ServicesConfigurationList;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.nameValue&&o.nameValue.length||(o.nameValue=[]),o.nameValue.push(i.proto.Setting.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ServicesConfigurationList"},e}(),t.TokenRelationship=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.symbol="",e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.kycStatus=0,e.prototype.freezeStatus=0,e.prototype.decimals=0,e.prototype.automaticAssociation=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.symbol&&Object.hasOwnProperty.call(e,"symbol")&&t.uint32(18).string(e.symbol),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(24).uint64(e.balance),null!=e.kycStatus&&Object.hasOwnProperty.call(e,"kycStatus")&&t.uint32(32).int32(e.kycStatus),null!=e.freezeStatus&&Object.hasOwnProperty.call(e,"freezeStatus")&&t.uint32(40).int32(e.freezeStatus),null!=e.decimals&&Object.hasOwnProperty.call(e,"decimals")&&t.uint32(48).uint32(e.decimals),null!=e.automaticAssociation&&Object.hasOwnProperty.call(e,"automaticAssociation")&&t.uint32(56).bool(e.automaticAssociation),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenRelationship;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.symbol=e.string();break;case 3:o.balance=e.uint64();break;case 4:o.kycStatus=e.int32();break;case 5:o.freezeStatus=e.int32();break;case 6:o.decimals=e.uint32();break;case 7:o.automaticAssociation=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenRelationship"},e}(),t.TokenBalance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.decimals=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(16).uint64(e.balance),null!=e.decimals&&Object.hasOwnProperty.call(e,"decimals")&&t.uint32(24).uint32(e.decimals),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenBalance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.balance=e.uint64();break;case 3:o.decimals=e.uint32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenBalance"},e}(),t.TokenBalances=function(){function e(e){if(this.tokenBalances=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenBalances=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.tokenBalances&&e.tokenBalances.length)for(var r=0;r<e.tokenBalances.length;++r)i.proto.TokenBalance.encode(e.tokenBalances[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenBalances;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.tokenBalances&&o.tokenBalances.length||(o.tokenBalances=[]),o.tokenBalances.push(i.proto.TokenBalance.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenBalances"},e}(),t.TokenAssociation=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.accountId=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenAssociation;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenAssociation"},e}(),t.StakingInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.declineReward=!1,e.prototype.stakePeriodStart=null,e.prototype.pendingReward=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakedToMe=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakedAccountId=null,e.prototype.stakedNodeId=null,Object.defineProperty(e.prototype,"stakedId",{get:o.oneOfGetter(t=["stakedAccountId","stakedNodeId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.declineReward&&Object.hasOwnProperty.call(e,"declineReward")&&t.uint32(8).bool(e.declineReward),null!=e.stakePeriodStart&&Object.hasOwnProperty.call(e,"stakePeriodStart")&&i.proto.Timestamp.encode(e.stakePeriodStart,t.uint32(18).fork()).ldelim(),null!=e.pendingReward&&Object.hasOwnProperty.call(e,"pendingReward")&&t.uint32(24).int64(e.pendingReward),null!=e.stakedToMe&&Object.hasOwnProperty.call(e,"stakedToMe")&&t.uint32(32).int64(e.stakedToMe),null!=e.stakedAccountId&&Object.hasOwnProperty.call(e,"stakedAccountId")&&i.proto.AccountID.encode(e.stakedAccountId,t.uint32(42).fork()).ldelim(),null!=e.stakedNodeId&&Object.hasOwnProperty.call(e,"stakedNodeId")&&t.uint32(48).int64(e.stakedNodeId),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.StakingInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.declineReward=e.bool();break;case 2:o.stakePeriodStart=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.pendingReward=e.int64();break;case 4:o.stakedToMe=e.int64();break;case 5:o.stakedAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 6:o.stakedNodeId=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.StakingInfo"},e}(),t.PendingAirdropId=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.senderId=null,e.prototype.receiverId=null,e.prototype.fungibleTokenType=null,e.prototype.nonFungibleToken=null,Object.defineProperty(e.prototype,"tokenReference",{get:o.oneOfGetter(t=["fungibleTokenType","nonFungibleToken"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.senderId&&Object.hasOwnProperty.call(e,"senderId")&&i.proto.AccountID.encode(e.senderId,t.uint32(10).fork()).ldelim(),null!=e.receiverId&&Object.hasOwnProperty.call(e,"receiverId")&&i.proto.AccountID.encode(e.receiverId,t.uint32(18).fork()).ldelim(),null!=e.fungibleTokenType&&Object.hasOwnProperty.call(e,"fungibleTokenType")&&i.proto.TokenID.encode(e.fungibleTokenType,t.uint32(26).fork()).ldelim(),null!=e.nonFungibleToken&&Object.hasOwnProperty.call(e,"nonFungibleToken")&&i.proto.NftID.encode(e.nonFungibleToken,t.uint32(34).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.PendingAirdropId;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.senderId=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.receiverId=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.fungibleTokenType=i.proto.TokenID.decode(e,e.uint32());break;case 4:o.nonFungibleToken=i.proto.NftID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.PendingAirdropId"},e}(),t.PendingAirdropValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.amount=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(8).uint64(e.amount),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.PendingAirdropValue;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.amount=e.uint64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.PendingAirdropValue"},e}(),t.Timestamp=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.seconds=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.nanos=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.seconds&&Object.hasOwnProperty.call(e,"seconds")&&t.uint32(8).int64(e.seconds),null!=e.nanos&&Object.hasOwnProperty.call(e,"nanos")&&t.uint32(16).int32(e.nanos),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Timestamp;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.seconds=e.int64();break;case 2:o.nanos=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Timestamp"},e}(),t.TimestampSeconds=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.seconds=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.seconds&&Object.hasOwnProperty.call(e,"seconds")&&t.uint32(8).int64(e.seconds),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TimestampSeconds;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.seconds=e.int64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TimestampSeconds"},e}(),t.SystemDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.fileID=null,e.prototype.contractID=null,e.prototype.expirationTime=null,Object.defineProperty(e.prototype,"id",{get:o.oneOfGetter(t=["fileID","contractID"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.TimestampSeconds.encode(e.expirationTime,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SystemDeleteTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 3:o.expirationTime=i.proto.TimestampSeconds.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SystemDeleteTransactionBody"},e}(),t.SystemUndeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.fileID=null,e.prototype.contractID=null,Object.defineProperty(e.prototype,"id",{get:o.oneOfGetter(t=["fileID","contractID"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SystemUndeleteTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SystemUndeleteTransactionBody"},e}(),t.FreezeTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.startHour=0,e.prototype.startMin=0,e.prototype.endHour=0,e.prototype.endMin=0,e.prototype.updateFile=null,e.prototype.fileHash=o.newBuffer([]),e.prototype.startTime=null,e.prototype.freezeType=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.startHour&&Object.hasOwnProperty.call(e,"startHour")&&t.uint32(8).int32(e.startHour),null!=e.startMin&&Object.hasOwnProperty.call(e,"startMin")&&t.uint32(16).int32(e.startMin),null!=e.endHour&&Object.hasOwnProperty.call(e,"endHour")&&t.uint32(24).int32(e.endHour),null!=e.endMin&&Object.hasOwnProperty.call(e,"endMin")&&t.uint32(32).int32(e.endMin),null!=e.updateFile&&Object.hasOwnProperty.call(e,"updateFile")&&i.proto.FileID.encode(e.updateFile,t.uint32(42).fork()).ldelim(),null!=e.fileHash&&Object.hasOwnProperty.call(e,"fileHash")&&t.uint32(50).bytes(e.fileHash),null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&i.proto.Timestamp.encode(e.startTime,t.uint32(58).fork()).ldelim(),null!=e.freezeType&&Object.hasOwnProperty.call(e,"freezeType")&&t.uint32(64).int32(e.freezeType),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FreezeTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.startHour=e.int32();break;case 2:o.startMin=e.int32();break;case 3:o.endHour=e.int32();break;case 4:o.endMin=e.int32();break;case 5:o.updateFile=i.proto.FileID.decode(e,e.uint32());break;case 6:o.fileHash=e.bytes();break;case 7:o.startTime=i.proto.Timestamp.decode(e,e.uint32());break;case 8:o.freezeType=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FreezeTransactionBody"},e}(),t.FreezeType=function(){const e={},t=Object.create(e);return t[e[0]="UNKNOWN_FREEZE_TYPE"]=0,t[e[1]="FREEZE_ONLY"]=1,t[e[2]="PREPARE_UPGRADE"]=2,t[e[3]="FREEZE_UPGRADE"]=3,t[e[4]="FREEZE_ABORT"]=4,t[e[5]="TELEMETRY_UPGRADE"]=5,t}(),t.ContractCallTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractID=null,e.prototype.gas=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.functionParameters=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.gas&&Object.hasOwnProperty.call(e,"gas")&&t.uint32(16).int64(e.gas),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(24).int64(e.amount),null!=e.functionParameters&&Object.hasOwnProperty.call(e,"functionParameters")&&t.uint32(34).bytes(e.functionParameters),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractCallTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.gas=e.int64();break;case 3:o.amount=e.int64();break;case 4:o.functionParameters=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractCallTransactionBody"},e}(),t.ContractCreateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.fileID=null,e.prototype.initcode=null,e.prototype.adminKey=null,e.prototype.gas=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.initialBalance=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.proxyAccountID=null,e.prototype.autoRenewPeriod=null,e.prototype.constructorParameters=o.newBuffer([]),e.prototype.shardID=null,e.prototype.realmID=null,e.prototype.newRealmAdminKey=null,e.prototype.memo="",e.prototype.maxAutomaticTokenAssociations=0,e.prototype.autoRenewAccountId=null,e.prototype.stakedAccountId=null,e.prototype.stakedNodeId=null,e.prototype.declineReward=!1,Object.defineProperty(e.prototype,"initcodeSource",{get:o.oneOfGetter(t=["fileID","initcode"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"stakedId",{get:o.oneOfGetter(t=["stakedAccountId","stakedNodeId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(10).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(26).fork()).ldelim(),null!=e.gas&&Object.hasOwnProperty.call(e,"gas")&&t.uint32(32).int64(e.gas),null!=e.initialBalance&&Object.hasOwnProperty.call(e,"initialBalance")&&t.uint32(40).int64(e.initialBalance),null!=e.proxyAccountID&&Object.hasOwnProperty.call(e,"proxyAccountID")&&i.proto.AccountID.encode(e.proxyAccountID,t.uint32(50).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(66).fork()).ldelim(),null!=e.constructorParameters&&Object.hasOwnProperty.call(e,"constructorParameters")&&t.uint32(74).bytes(e.constructorParameters),null!=e.shardID&&Object.hasOwnProperty.call(e,"shardID")&&i.proto.ShardID.encode(e.shardID,t.uint32(82).fork()).ldelim(),null!=e.realmID&&Object.hasOwnProperty.call(e,"realmID")&&i.proto.RealmID.encode(e.realmID,t.uint32(90).fork()).ldelim(),null!=e.newRealmAdminKey&&Object.hasOwnProperty.call(e,"newRealmAdminKey")&&i.proto.Key.encode(e.newRealmAdminKey,t.uint32(98).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(106).string(e.memo),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&t.uint32(112).int32(e.maxAutomaticTokenAssociations),null!=e.autoRenewAccountId&&Object.hasOwnProperty.call(e,"autoRenewAccountId")&&i.proto.AccountID.encode(e.autoRenewAccountId,t.uint32(122).fork()).ldelim(),null!=e.initcode&&Object.hasOwnProperty.call(e,"initcode")&&t.uint32(130).bytes(e.initcode),null!=e.stakedAccountId&&Object.hasOwnProperty.call(e,"stakedAccountId")&&i.proto.AccountID.encode(e.stakedAccountId,t.uint32(138).fork()).ldelim(),null!=e.stakedNodeId&&Object.hasOwnProperty.call(e,"stakedNodeId")&&t.uint32(144).int64(e.stakedNodeId),null!=e.declineReward&&Object.hasOwnProperty.call(e,"declineReward")&&t.uint32(152).bool(e.declineReward),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractCreateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 16:o.initcode=e.bytes();break;case 3:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 4:o.gas=e.int64();break;case 5:o.initialBalance=e.int64();break;case 6:o.proxyAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 8:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 9:o.constructorParameters=e.bytes();break;case 10:o.shardID=i.proto.ShardID.decode(e,e.uint32());break;case 11:o.realmID=i.proto.RealmID.decode(e,e.uint32());break;case 12:o.newRealmAdminKey=i.proto.Key.decode(e,e.uint32());break;case 13:o.memo=e.string();break;case 14:o.maxAutomaticTokenAssociations=e.int32();break;case 15:o.autoRenewAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 17:o.stakedAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 18:o.stakedNodeId=e.int64();break;case 19:o.declineReward=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractCreateTransactionBody"},e}(),t.Duration=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.seconds=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.seconds&&Object.hasOwnProperty.call(e,"seconds")&&t.uint32(8).int64(e.seconds),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Duration;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.seconds=e.int64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Duration"},e}(),t.ContractUpdateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.contractID=null,e.prototype.expirationTime=null,e.prototype.adminKey=null,e.prototype.proxyAccountID=null,e.prototype.autoRenewPeriod=null,e.prototype.fileID=null,e.prototype.memo=null,e.prototype.memoWrapper=null,e.prototype.maxAutomaticTokenAssociations=null,e.prototype.autoRenewAccountId=null,e.prototype.stakedAccountId=null,e.prototype.stakedNodeId=null,e.prototype.declineReward=null,Object.defineProperty(e.prototype,"memoField",{get:o.oneOfGetter(t=["memo","memoWrapper"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"stakedId",{get:o.oneOfGetter(t=["stakedAccountId","stakedNodeId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(18).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(26).fork()).ldelim(),null!=e.proxyAccountID&&Object.hasOwnProperty.call(e,"proxyAccountID")&&i.proto.AccountID.encode(e.proxyAccountID,t.uint32(50).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(58).fork()).ldelim(),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(66).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(74).string(e.memo),null!=e.memoWrapper&&Object.hasOwnProperty.call(e,"memoWrapper")&&i.google.protobuf.StringValue.encode(e.memoWrapper,t.uint32(82).fork()).ldelim(),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&i.google.protobuf.Int32Value.encode(e.maxAutomaticTokenAssociations,t.uint32(90).fork()).ldelim(),null!=e.autoRenewAccountId&&Object.hasOwnProperty.call(e,"autoRenewAccountId")&&i.proto.AccountID.encode(e.autoRenewAccountId,t.uint32(98).fork()).ldelim(),null!=e.stakedAccountId&&Object.hasOwnProperty.call(e,"stakedAccountId")&&i.proto.AccountID.encode(e.stakedAccountId,t.uint32(106).fork()).ldelim(),null!=e.stakedNodeId&&Object.hasOwnProperty.call(e,"stakedNodeId")&&t.uint32(112).int64(e.stakedNodeId),null!=e.declineReward&&Object.hasOwnProperty.call(e,"declineReward")&&i.google.protobuf.BoolValue.encode(e.declineReward,t.uint32(122).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 6:o.proxyAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 7:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 8:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 9:o.memo=e.string();break;case 10:o.memoWrapper=i.google.protobuf.StringValue.decode(e,e.uint32());break;case 11:o.maxAutomaticTokenAssociations=i.google.protobuf.Int32Value.decode(e,e.uint32());break;case 12:o.autoRenewAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 13:o.stakedAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 14:o.stakedNodeId=e.int64();break;case 15:o.declineReward=i.google.protobuf.BoolValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractUpdateTransactionBody"},e}(),t.LiveHash=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountId=null,e.prototype.hash=o.newBuffer([]),e.prototype.keys=null,e.prototype.duration=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(10).fork()).ldelim(),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(18).bytes(e.hash),null!=e.keys&&Object.hasOwnProperty.call(e,"keys")&&i.proto.KeyList.encode(e.keys,t.uint32(26).fork()).ldelim(),null!=e.duration&&Object.hasOwnProperty.call(e,"duration")&&i.proto.Duration.encode(e.duration,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.LiveHash;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.hash=e.bytes();break;case 3:o.keys=i.proto.KeyList.decode(e,e.uint32());break;case 5:o.duration=i.proto.Duration.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.LiveHash"},e}(),t.CryptoAddLiveHashTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.liveHash=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.liveHash&&Object.hasOwnProperty.call(e,"liveHash")&&i.proto.LiveHash.encode(e.liveHash,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoAddLiveHashTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==3)o.liveHash=i.proto.LiveHash.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoAddLiveHashTransactionBody"},e}(),t.CryptoCreateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.key=null,e.prototype.initialBalance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.proxyAccountID=null,e.prototype.sendRecordThreshold=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.receiveRecordThreshold=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.receiverSigRequired=!1,e.prototype.autoRenewPeriod=null,e.prototype.shardID=null,e.prototype.realmID=null,e.prototype.newRealmAdminKey=null,e.prototype.memo="",e.prototype.maxAutomaticTokenAssociations=0,e.prototype.stakedAccountId=null,e.prototype.stakedNodeId=null,e.prototype.declineReward=!1,e.prototype.alias=o.newBuffer([]),Object.defineProperty(e.prototype,"stakedId",{get:o.oneOfGetter(t=["stakedAccountId","stakedNodeId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&i.proto.Key.encode(e.key,t.uint32(10).fork()).ldelim(),null!=e.initialBalance&&Object.hasOwnProperty.call(e,"initialBalance")&&t.uint32(16).uint64(e.initialBalance),null!=e.proxyAccountID&&Object.hasOwnProperty.call(e,"proxyAccountID")&&i.proto.AccountID.encode(e.proxyAccountID,t.uint32(26).fork()).ldelim(),null!=e.sendRecordThreshold&&Object.hasOwnProperty.call(e,"sendRecordThreshold")&&t.uint32(48).uint64(e.sendRecordThreshold),null!=e.receiveRecordThreshold&&Object.hasOwnProperty.call(e,"receiveRecordThreshold")&&t.uint32(56).uint64(e.receiveRecordThreshold),null!=e.receiverSigRequired&&Object.hasOwnProperty.call(e,"receiverSigRequired")&&t.uint32(64).bool(e.receiverSigRequired),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(74).fork()).ldelim(),null!=e.shardID&&Object.hasOwnProperty.call(e,"shardID")&&i.proto.ShardID.encode(e.shardID,t.uint32(82).fork()).ldelim(),null!=e.realmID&&Object.hasOwnProperty.call(e,"realmID")&&i.proto.RealmID.encode(e.realmID,t.uint32(90).fork()).ldelim(),null!=e.newRealmAdminKey&&Object.hasOwnProperty.call(e,"newRealmAdminKey")&&i.proto.Key.encode(e.newRealmAdminKey,t.uint32(98).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(106).string(e.memo),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&t.uint32(112).int32(e.maxAutomaticTokenAssociations),null!=e.stakedAccountId&&Object.hasOwnProperty.call(e,"stakedAccountId")&&i.proto.AccountID.encode(e.stakedAccountId,t.uint32(122).fork()).ldelim(),null!=e.stakedNodeId&&Object.hasOwnProperty.call(e,"stakedNodeId")&&t.uint32(128).int64(e.stakedNodeId),null!=e.declineReward&&Object.hasOwnProperty.call(e,"declineReward")&&t.uint32(136).bool(e.declineReward),null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&t.uint32(146).bytes(e.alias),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoCreateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.key=i.proto.Key.decode(e,e.uint32());break;case 2:o.initialBalance=e.uint64();break;case 3:o.proxyAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 6:o.sendRecordThreshold=e.uint64();break;case 7:o.receiveRecordThreshold=e.uint64();break;case 8:o.receiverSigRequired=e.bool();break;case 9:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 10:o.shardID=i.proto.ShardID.decode(e,e.uint32());break;case 11:o.realmID=i.proto.RealmID.decode(e,e.uint32());break;case 12:o.newRealmAdminKey=i.proto.Key.decode(e,e.uint32());break;case 13:o.memo=e.string();break;case 14:o.maxAutomaticTokenAssociations=e.int32();break;case 15:o.stakedAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 16:o.stakedNodeId=e.int64();break;case 17:o.declineReward=e.bool();break;case 18:o.alias=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoCreateTransactionBody"},e}(),t.CryptoDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transferAccountID=null,e.prototype.deleteAccountID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.transferAccountID&&Object.hasOwnProperty.call(e,"transferAccountID")&&i.proto.AccountID.encode(e.transferAccountID,t.uint32(10).fork()).ldelim(),null!=e.deleteAccountID&&Object.hasOwnProperty.call(e,"deleteAccountID")&&i.proto.AccountID.encode(e.deleteAccountID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoDeleteTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transferAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.deleteAccountID=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoDeleteTransactionBody"},e}(),t.CryptoDeleteLiveHashTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountOfLiveHash=null,e.prototype.liveHashToDelete=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.accountOfLiveHash&&Object.hasOwnProperty.call(e,"accountOfLiveHash")&&i.proto.AccountID.encode(e.accountOfLiveHash,t.uint32(10).fork()).ldelim(),null!=e.liveHashToDelete&&Object.hasOwnProperty.call(e,"liveHashToDelete")&&t.uint32(18).bytes(e.liveHashToDelete),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoDeleteLiveHashTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountOfLiveHash=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.liveHashToDelete=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoDeleteLiveHashTransactionBody"},e}(),t.CryptoTransferTransactionBody=function(){function e(e){if(this.tokenTransfers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transfers=null,e.prototype.tokenTransfers=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.transfers&&Object.hasOwnProperty.call(e,"transfers")&&i.proto.TransferList.encode(e.transfers,t.uint32(10).fork()).ldelim(),null!=e.tokenTransfers&&e.tokenTransfers.length)for(var r=0;r<e.tokenTransfers.length;++r)i.proto.TokenTransferList.encode(e.tokenTransfers[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoTransferTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transfers=i.proto.TransferList.decode(e,e.uint32());break;case 2:o.tokenTransfers&&o.tokenTransfers.length||(o.tokenTransfers=[]),o.tokenTransfers.push(i.proto.TokenTransferList.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoTransferTransactionBody"},e}(),t.CryptoUpdateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.accountIDToUpdate=null,e.prototype.key=null,e.prototype.proxyAccountID=null,e.prototype.proxyFraction=0,e.prototype.sendRecordThreshold=null,e.prototype.sendRecordThresholdWrapper=null,e.prototype.receiveRecordThreshold=null,e.prototype.receiveRecordThresholdWrapper=null,e.prototype.autoRenewPeriod=null,e.prototype.expirationTime=null,e.prototype.receiverSigRequired=null,e.prototype.receiverSigRequiredWrapper=null,e.prototype.memo=null,e.prototype.maxAutomaticTokenAssociations=null,e.prototype.stakedAccountId=null,e.prototype.stakedNodeId=null,e.prototype.declineReward=null,Object.defineProperty(e.prototype,"sendRecordThresholdField",{get:o.oneOfGetter(t=["sendRecordThreshold","sendRecordThresholdWrapper"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"receiveRecordThresholdField",{get:o.oneOfGetter(t=["receiveRecordThreshold","receiveRecordThresholdWrapper"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"receiverSigRequiredField",{get:o.oneOfGetter(t=["receiverSigRequired","receiverSigRequiredWrapper"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"stakedId",{get:o.oneOfGetter(t=["stakedAccountId","stakedNodeId"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.accountIDToUpdate&&Object.hasOwnProperty.call(e,"accountIDToUpdate")&&i.proto.AccountID.encode(e.accountIDToUpdate,t.uint32(18).fork()).ldelim(),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&i.proto.Key.encode(e.key,t.uint32(26).fork()).ldelim(),null!=e.proxyAccountID&&Object.hasOwnProperty.call(e,"proxyAccountID")&&i.proto.AccountID.encode(e.proxyAccountID,t.uint32(34).fork()).ldelim(),null!=e.proxyFraction&&Object.hasOwnProperty.call(e,"proxyFraction")&&t.uint32(40).int32(e.proxyFraction),null!=e.sendRecordThreshold&&Object.hasOwnProperty.call(e,"sendRecordThreshold")&&t.uint32(48).uint64(e.sendRecordThreshold),null!=e.receiveRecordThreshold&&Object.hasOwnProperty.call(e,"receiveRecordThreshold")&&t.uint32(56).uint64(e.receiveRecordThreshold),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(66).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(74).fork()).ldelim(),null!=e.receiverSigRequired&&Object.hasOwnProperty.call(e,"receiverSigRequired")&&t.uint32(80).bool(e.receiverSigRequired),null!=e.sendRecordThresholdWrapper&&Object.hasOwnProperty.call(e,"sendRecordThresholdWrapper")&&i.google.protobuf.UInt64Value.encode(e.sendRecordThresholdWrapper,t.uint32(90).fork()).ldelim(),null!=e.receiveRecordThresholdWrapper&&Object.hasOwnProperty.call(e,"receiveRecordThresholdWrapper")&&i.google.protobuf.UInt64Value.encode(e.receiveRecordThresholdWrapper,t.uint32(98).fork()).ldelim(),null!=e.receiverSigRequiredWrapper&&Object.hasOwnProperty.call(e,"receiverSigRequiredWrapper")&&i.google.protobuf.BoolValue.encode(e.receiverSigRequiredWrapper,t.uint32(106).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&i.google.protobuf.StringValue.encode(e.memo,t.uint32(114).fork()).ldelim(),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&i.google.protobuf.Int32Value.encode(e.maxAutomaticTokenAssociations,t.uint32(122).fork()).ldelim(),null!=e.stakedAccountId&&Object.hasOwnProperty.call(e,"stakedAccountId")&&i.proto.AccountID.encode(e.stakedAccountId,t.uint32(130).fork()).ldelim(),null!=e.stakedNodeId&&Object.hasOwnProperty.call(e,"stakedNodeId")&&t.uint32(136).int64(e.stakedNodeId),null!=e.declineReward&&Object.hasOwnProperty.call(e,"declineReward")&&i.google.protobuf.BoolValue.encode(e.declineReward,t.uint32(146).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 2:o.accountIDToUpdate=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.key=i.proto.Key.decode(e,e.uint32());break;case 4:o.proxyAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 5:o.proxyFraction=e.int32();break;case 6:o.sendRecordThreshold=e.uint64();break;case 11:o.sendRecordThresholdWrapper=i.google.protobuf.UInt64Value.decode(e,e.uint32());break;case 7:o.receiveRecordThreshold=e.uint64();break;case 12:o.receiveRecordThresholdWrapper=i.google.protobuf.UInt64Value.decode(e,e.uint32());break;case 8:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 9:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 10:o.receiverSigRequired=e.bool();break;case 13:o.receiverSigRequiredWrapper=i.google.protobuf.BoolValue.decode(e,e.uint32());break;case 14:o.memo=i.google.protobuf.StringValue.decode(e,e.uint32());break;case 15:o.maxAutomaticTokenAssociations=i.google.protobuf.Int32Value.decode(e,e.uint32());break;case 16:o.stakedAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 17:o.stakedNodeId=e.int64();break;case 18:o.declineReward=i.google.protobuf.BoolValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoUpdateTransactionBody"},e}(),t.CryptoApproveAllowanceTransactionBody=function(){function e(e){if(this.cryptoAllowances=[],this.nftAllowances=[],this.tokenAllowances=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.cryptoAllowances=o.emptyArray,e.prototype.nftAllowances=o.emptyArray,e.prototype.tokenAllowances=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.cryptoAllowances&&e.cryptoAllowances.length)for(var r=0;r<e.cryptoAllowances.length;++r)i.proto.CryptoAllowance.encode(e.cryptoAllowances[r],t.uint32(10).fork()).ldelim();if(null!=e.nftAllowances&&e.nftAllowances.length)for(r=0;r<e.nftAllowances.length;++r)i.proto.NftAllowance.encode(e.nftAllowances[r],t.uint32(18).fork()).ldelim();if(null!=e.tokenAllowances&&e.tokenAllowances.length)for(r=0;r<e.tokenAllowances.length;++r)i.proto.TokenAllowance.encode(e.tokenAllowances[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoApproveAllowanceTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.cryptoAllowances&&o.cryptoAllowances.length||(o.cryptoAllowances=[]),o.cryptoAllowances.push(i.proto.CryptoAllowance.decode(e,e.uint32()));break;case 2:o.nftAllowances&&o.nftAllowances.length||(o.nftAllowances=[]),o.nftAllowances.push(i.proto.NftAllowance.decode(e,e.uint32()));break;case 3:o.tokenAllowances&&o.tokenAllowances.length||(o.tokenAllowances=[]),o.tokenAllowances.push(i.proto.TokenAllowance.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoApproveAllowanceTransactionBody"},e}(),t.CryptoAllowance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.owner=null,e.prototype.spender=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.owner&&Object.hasOwnProperty.call(e,"owner")&&i.proto.AccountID.encode(e.owner,t.uint32(10).fork()).ldelim(),null!=e.spender&&Object.hasOwnProperty.call(e,"spender")&&i.proto.AccountID.encode(e.spender,t.uint32(18).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(24).int64(e.amount),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.owner=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.spender=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.amount=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoAllowance"},e}(),t.NftAllowance=function(){function e(e){if(this.serialNumbers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.owner=null,e.prototype.spender=null,e.prototype.serialNumbers=o.emptyArray,e.prototype.approvedForAll=null,e.prototype.delegatingSpender=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.owner&&Object.hasOwnProperty.call(e,"owner")&&i.proto.AccountID.encode(e.owner,t.uint32(18).fork()).ldelim(),null!=e.spender&&Object.hasOwnProperty.call(e,"spender")&&i.proto.AccountID.encode(e.spender,t.uint32(26).fork()).ldelim(),null!=e.serialNumbers&&e.serialNumbers.length){t.uint32(34).fork();for(var r=0;r<e.serialNumbers.length;++r)t.int64(e.serialNumbers[r]);t.ldelim()}return null!=e.approvedForAll&&Object.hasOwnProperty.call(e,"approvedForAll")&&i.google.protobuf.BoolValue.encode(e.approvedForAll,t.uint32(42).fork()).ldelim(),null!=e.delegatingSpender&&Object.hasOwnProperty.call(e,"delegatingSpender")&&i.proto.AccountID.encode(e.delegatingSpender,t.uint32(50).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NftAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.owner=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.spender=i.proto.AccountID.decode(e,e.uint32());break;case 4:if(o.serialNumbers&&o.serialNumbers.length||(o.serialNumbers=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.serialNumbers.push(e.int64());else o.serialNumbers.push(e.int64());break;case 5:o.approvedForAll=i.google.protobuf.BoolValue.decode(e,e.uint32());break;case 6:o.delegatingSpender=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NftAllowance"},e}(),t.TokenAllowance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.owner=null,e.prototype.spender=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.owner&&Object.hasOwnProperty.call(e,"owner")&&i.proto.AccountID.encode(e.owner,t.uint32(18).fork()).ldelim(),null!=e.spender&&Object.hasOwnProperty.call(e,"spender")&&i.proto.AccountID.encode(e.spender,t.uint32(26).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(32).int64(e.amount),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.owner=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.spender=i.proto.AccountID.decode(e,e.uint32());break;case 4:o.amount=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenAllowance"},e}(),t.CryptoDeleteAllowanceTransactionBody=function(){function e(e){if(this.nftAllowances=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nftAllowances=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.nftAllowances&&e.nftAllowances.length)for(var r=0;r<e.nftAllowances.length;++r)i.proto.NftRemoveAllowance.encode(e.nftAllowances[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoDeleteAllowanceTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==2)o.nftAllowances&&o.nftAllowances.length||(o.nftAllowances=[]),o.nftAllowances.push(i.proto.NftRemoveAllowance.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoDeleteAllowanceTransactionBody"},e}(),t.NftRemoveAllowance=function(){function e(e){if(this.serialNumbers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.owner=null,e.prototype.serialNumbers=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.owner&&Object.hasOwnProperty.call(e,"owner")&&i.proto.AccountID.encode(e.owner,t.uint32(18).fork()).ldelim(),null!=e.serialNumbers&&e.serialNumbers.length){t.uint32(26).fork();for(var r=0;r<e.serialNumbers.length;++r)t.int64(e.serialNumbers[r]);t.ldelim()}return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NftRemoveAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.owner=i.proto.AccountID.decode(e,e.uint32());break;case 3:if(o.serialNumbers&&o.serialNumbers.length||(o.serialNumbers=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.serialNumbers.push(e.int64());else o.serialNumbers.push(e.int64());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NftRemoveAllowance"},e}(),t.EthereumTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.ethereumData=o.newBuffer([]),e.prototype.callData=null,e.prototype.maxGasAllowance=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.ethereumData&&Object.hasOwnProperty.call(e,"ethereumData")&&t.uint32(10).bytes(e.ethereumData),null!=e.callData&&Object.hasOwnProperty.call(e,"callData")&&i.proto.FileID.encode(e.callData,t.uint32(18).fork()).ldelim(),null!=e.maxGasAllowance&&Object.hasOwnProperty.call(e,"maxGasAllowance")&&t.uint32(24).int64(e.maxGasAllowance),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.EthereumTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.ethereumData=e.bytes();break;case 2:o.callData=i.proto.FileID.decode(e,e.uint32());break;case 3:o.maxGasAllowance=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.EthereumTransactionBody"},e}(),t.FileAppendTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileID=null,e.prototype.contents=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(18).fork()).ldelim(),null!=e.contents&&Object.hasOwnProperty.call(e,"contents")&&t.uint32(34).bytes(e.contents),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileAppendTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 2:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 4:o.contents=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileAppendTransactionBody"},e}(),t.FileCreateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.expirationTime=null,e.prototype.keys=null,e.prototype.contents=o.newBuffer([]),e.prototype.shardID=null,e.prototype.realmID=null,e.prototype.newRealmAdminKey=null,e.prototype.memo="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(18).fork()).ldelim(),null!=e.keys&&Object.hasOwnProperty.call(e,"keys")&&i.proto.KeyList.encode(e.keys,t.uint32(26).fork()).ldelim(),null!=e.contents&&Object.hasOwnProperty.call(e,"contents")&&t.uint32(34).bytes(e.contents),null!=e.shardID&&Object.hasOwnProperty.call(e,"shardID")&&i.proto.ShardID.encode(e.shardID,t.uint32(42).fork()).ldelim(),null!=e.realmID&&Object.hasOwnProperty.call(e,"realmID")&&i.proto.RealmID.encode(e.realmID,t.uint32(50).fork()).ldelim(),null!=e.newRealmAdminKey&&Object.hasOwnProperty.call(e,"newRealmAdminKey")&&i.proto.Key.encode(e.newRealmAdminKey,t.uint32(58).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(66).string(e.memo),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileCreateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 2:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.keys=i.proto.KeyList.decode(e,e.uint32());break;case 4:o.contents=e.bytes();break;case 5:o.shardID=i.proto.ShardID.decode(e,e.uint32());break;case 6:o.realmID=i.proto.RealmID.decode(e,e.uint32());break;case 7:o.newRealmAdminKey=i.proto.Key.decode(e,e.uint32());break;case 8:o.memo=e.string();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileCreateTransactionBody"},e}(),t.FileDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileDeleteTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==2)o.fileID=i.proto.FileID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileDeleteTransactionBody"},e}(),t.FileUpdateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileID=null,e.prototype.expirationTime=null,e.prototype.keys=null,e.prototype.contents=o.newBuffer([]),e.prototype.memo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(10).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(18).fork()).ldelim(),null!=e.keys&&Object.hasOwnProperty.call(e,"keys")&&i.proto.KeyList.encode(e.keys,t.uint32(26).fork()).ldelim(),null!=e.contents&&Object.hasOwnProperty.call(e,"contents")&&t.uint32(34).bytes(e.contents),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&i.google.protobuf.StringValue.encode(e.memo,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 2:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.keys=i.proto.KeyList.decode(e,e.uint32());break;case 4:o.contents=e.bytes();break;case 5:o.memo=i.google.protobuf.StringValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileUpdateTransactionBody"},e}(),t.ContractDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.contractID=null,e.prototype.transferAccountID=null,e.prototype.transferContractID=null,e.prototype.permanentRemoval=!1,Object.defineProperty(e.prototype,"obtainers",{get:o.oneOfGetter(t=["transferAccountID","transferContractID"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.transferAccountID&&Object.hasOwnProperty.call(e,"transferAccountID")&&i.proto.AccountID.encode(e.transferAccountID,t.uint32(18).fork()).ldelim(),null!=e.transferContractID&&Object.hasOwnProperty.call(e,"transferContractID")&&i.proto.ContractID.encode(e.transferContractID,t.uint32(26).fork()).ldelim(),null!=e.permanentRemoval&&Object.hasOwnProperty.call(e,"permanentRemoval")&&t.uint32(32).bool(e.permanentRemoval),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractDeleteTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.transferAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.transferContractID=i.proto.ContractID.decode(e,e.uint32());break;case 4:o.permanentRemoval=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractDeleteTransactionBody"},e}(),t.ConsensusCreateTopicTransactionBody=function(){function e(e){if(this.feeExemptKeyList=[],this.customFees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.memo="",e.prototype.adminKey=null,e.prototype.submitKey=null,e.prototype.autoRenewPeriod=null,e.prototype.autoRenewAccount=null,e.prototype.feeScheduleKey=null,e.prototype.feeExemptKeyList=o.emptyArray,e.prototype.customFees=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(10).string(e.memo),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(18).fork()).ldelim(),null!=e.submitKey&&Object.hasOwnProperty.call(e,"submitKey")&&i.proto.Key.encode(e.submitKey,t.uint32(26).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(50).fork()).ldelim(),null!=e.autoRenewAccount&&Object.hasOwnProperty.call(e,"autoRenewAccount")&&i.proto.AccountID.encode(e.autoRenewAccount,t.uint32(58).fork()).ldelim(),null!=e.feeScheduleKey&&Object.hasOwnProperty.call(e,"feeScheduleKey")&&i.proto.Key.encode(e.feeScheduleKey,t.uint32(66).fork()).ldelim(),null!=e.feeExemptKeyList&&e.feeExemptKeyList.length)for(var r=0;r<e.feeExemptKeyList.length;++r)i.proto.Key.encode(e.feeExemptKeyList[r],t.uint32(74).fork()).ldelim();if(null!=e.customFees&&e.customFees.length)for(r=0;r<e.customFees.length;++r)i.proto.FixedCustomFee.encode(e.customFees[r],t.uint32(82).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusCreateTopicTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.memo=e.string();break;case 2:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 3:o.submitKey=i.proto.Key.decode(e,e.uint32());break;case 6:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 7:o.autoRenewAccount=i.proto.AccountID.decode(e,e.uint32());break;case 8:o.feeScheduleKey=i.proto.Key.decode(e,e.uint32());break;case 9:o.feeExemptKeyList&&o.feeExemptKeyList.length||(o.feeExemptKeyList=[]),o.feeExemptKeyList.push(i.proto.Key.decode(e,e.uint32()));break;case 10:o.customFees&&o.customFees.length||(o.customFees=[]),o.customFees.push(i.proto.FixedCustomFee.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusCreateTopicTransactionBody"},e}(),t.FractionalFee=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fractionalAmount=null,e.prototype.minimumAmount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.maximumAmount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.netOfTransfers=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fractionalAmount&&Object.hasOwnProperty.call(e,"fractionalAmount")&&i.proto.Fraction.encode(e.fractionalAmount,t.uint32(10).fork()).ldelim(),null!=e.minimumAmount&&Object.hasOwnProperty.call(e,"minimumAmount")&&t.uint32(16).int64(e.minimumAmount),null!=e.maximumAmount&&Object.hasOwnProperty.call(e,"maximumAmount")&&t.uint32(24).int64(e.maximumAmount),null!=e.netOfTransfers&&Object.hasOwnProperty.call(e,"netOfTransfers")&&t.uint32(32).bool(e.netOfTransfers),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FractionalFee;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fractionalAmount=i.proto.Fraction.decode(e,e.uint32());break;case 2:o.minimumAmount=e.int64();break;case 3:o.maximumAmount=e.int64();break;case 4:o.netOfTransfers=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FractionalFee"},e}(),t.FixedFee=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.denominatingTokenId=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(8).int64(e.amount),null!=e.denominatingTokenId&&Object.hasOwnProperty.call(e,"denominatingTokenId")&&i.proto.TokenID.encode(e.denominatingTokenId,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FixedFee;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.amount=e.int64();break;case 2:o.denominatingTokenId=i.proto.TokenID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FixedFee"},e}(),t.RoyaltyFee=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.exchangeValueFraction=null,e.prototype.fallbackFee=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.exchangeValueFraction&&Object.hasOwnProperty.call(e,"exchangeValueFraction")&&i.proto.Fraction.encode(e.exchangeValueFraction,t.uint32(10).fork()).ldelim(),null!=e.fallbackFee&&Object.hasOwnProperty.call(e,"fallbackFee")&&i.proto.FixedFee.encode(e.fallbackFee,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.RoyaltyFee;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.exchangeValueFraction=i.proto.Fraction.decode(e,e.uint32());break;case 2:o.fallbackFee=i.proto.FixedFee.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.RoyaltyFee"},e}(),t.CustomFee=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.fixedFee=null,e.prototype.fractionalFee=null,e.prototype.royaltyFee=null,e.prototype.feeCollectorAccountId=null,e.prototype.allCollectorsAreExempt=!1,Object.defineProperty(e.prototype,"fee",{get:o.oneOfGetter(t=["fixedFee","fractionalFee","royaltyFee"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fixedFee&&Object.hasOwnProperty.call(e,"fixedFee")&&i.proto.FixedFee.encode(e.fixedFee,t.uint32(10).fork()).ldelim(),null!=e.fractionalFee&&Object.hasOwnProperty.call(e,"fractionalFee")&&i.proto.FractionalFee.encode(e.fractionalFee,t.uint32(18).fork()).ldelim(),null!=e.feeCollectorAccountId&&Object.hasOwnProperty.call(e,"feeCollectorAccountId")&&i.proto.AccountID.encode(e.feeCollectorAccountId,t.uint32(26).fork()).ldelim(),null!=e.royaltyFee&&Object.hasOwnProperty.call(e,"royaltyFee")&&i.proto.RoyaltyFee.encode(e.royaltyFee,t.uint32(34).fork()).ldelim(),null!=e.allCollectorsAreExempt&&Object.hasOwnProperty.call(e,"allCollectorsAreExempt")&&t.uint32(40).bool(e.allCollectorsAreExempt),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CustomFee;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fixedFee=i.proto.FixedFee.decode(e,e.uint32());break;case 2:o.fractionalFee=i.proto.FractionalFee.decode(e,e.uint32());break;case 4:o.royaltyFee=i.proto.RoyaltyFee.decode(e,e.uint32());break;case 3:o.feeCollectorAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 5:o.allCollectorsAreExempt=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CustomFee"},e}(),t.AssessedCustomFee=function(){function e(e){if(this.effectivePayerAccountId=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.tokenId=null,e.prototype.feeCollectorAccountId=null,e.prototype.effectivePayerAccountId=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(8).int64(e.amount),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(18).fork()).ldelim(),null!=e.feeCollectorAccountId&&Object.hasOwnProperty.call(e,"feeCollectorAccountId")&&i.proto.AccountID.encode(e.feeCollectorAccountId,t.uint32(26).fork()).ldelim(),null!=e.effectivePayerAccountId&&e.effectivePayerAccountId.length)for(var r=0;r<e.effectivePayerAccountId.length;++r)i.proto.AccountID.encode(e.effectivePayerAccountId[r],t.uint32(34).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.AssessedCustomFee;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.amount=e.int64();break;case 2:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 3:o.feeCollectorAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 4:o.effectivePayerAccountId&&o.effectivePayerAccountId.length||(o.effectivePayerAccountId=[]),o.effectivePayerAccountId.push(i.proto.AccountID.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.AssessedCustomFee"},e}(),t.FixedCustomFee=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fixedFee=null,e.prototype.feeCollectorAccountId=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fixedFee&&Object.hasOwnProperty.call(e,"fixedFee")&&i.proto.FixedFee.encode(e.fixedFee,t.uint32(10).fork()).ldelim(),null!=e.feeCollectorAccountId&&Object.hasOwnProperty.call(e,"feeCollectorAccountId")&&i.proto.AccountID.encode(e.feeCollectorAccountId,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FixedCustomFee;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fixedFee=i.proto.FixedFee.decode(e,e.uint32());break;case 2:o.feeCollectorAccountId=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FixedCustomFee"},e}(),t.FixedCustomFeeList=function(){function e(e){if(this.fees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fees=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.fees&&e.fees.length)for(var r=0;r<e.fees.length;++r)i.proto.FixedCustomFee.encode(e.fees[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FixedCustomFeeList;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.fees&&o.fees.length||(o.fees=[]),o.fees.push(i.proto.FixedCustomFee.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FixedCustomFeeList"},e}(),t.FeeExemptKeyList=function(){function e(e){if(this.keys=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.keys=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.keys&&e.keys.length)for(var r=0;r<e.keys.length;++r)i.proto.Key.encode(e.keys[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FeeExemptKeyList;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.keys&&o.keys.length||(o.keys=[]),o.keys.push(i.proto.Key.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FeeExemptKeyList"},e}(),t.CustomFeeLimit=function(){function e(e){if(this.fees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountId=null,e.prototype.fees=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(10).fork()).ldelim(),null!=e.fees&&e.fees.length)for(var r=0;r<e.fees.length;++r)i.proto.FixedFee.encode(e.fees[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CustomFeeLimit;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.fees&&o.fees.length||(o.fees=[]),o.fees.push(i.proto.FixedFee.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CustomFeeLimit"},e}(),t.ConsensusUpdateTopicTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.topicID=null,e.prototype.memo=null,e.prototype.expirationTime=null,e.prototype.adminKey=null,e.prototype.submitKey=null,e.prototype.autoRenewPeriod=null,e.prototype.autoRenewAccount=null,e.prototype.feeScheduleKey=null,e.prototype.feeExemptKeyList=null,e.prototype.customFees=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(10).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&i.google.protobuf.StringValue.encode(e.memo,t.uint32(18).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(34).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(50).fork()).ldelim(),null!=e.submitKey&&Object.hasOwnProperty.call(e,"submitKey")&&i.proto.Key.encode(e.submitKey,t.uint32(58).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(66).fork()).ldelim(),null!=e.autoRenewAccount&&Object.hasOwnProperty.call(e,"autoRenewAccount")&&i.proto.AccountID.encode(e.autoRenewAccount,t.uint32(74).fork()).ldelim(),null!=e.feeScheduleKey&&Object.hasOwnProperty.call(e,"feeScheduleKey")&&i.proto.Key.encode(e.feeScheduleKey,t.uint32(82).fork()).ldelim(),null!=e.feeExemptKeyList&&Object.hasOwnProperty.call(e,"feeExemptKeyList")&&i.proto.FeeExemptKeyList.encode(e.feeExemptKeyList,t.uint32(90).fork()).ldelim(),null!=e.customFees&&Object.hasOwnProperty.call(e,"customFees")&&i.proto.FixedCustomFeeList.encode(e.customFees,t.uint32(98).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusUpdateTopicTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.topicID=i.proto.TopicID.decode(e,e.uint32());break;case 2:o.memo=i.google.protobuf.StringValue.decode(e,e.uint32());break;case 4:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 6:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 7:o.submitKey=i.proto.Key.decode(e,e.uint32());break;case 8:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 9:o.autoRenewAccount=i.proto.AccountID.decode(e,e.uint32());break;case 10:o.feeScheduleKey=i.proto.Key.decode(e,e.uint32());break;case 11:o.feeExemptKeyList=i.proto.FeeExemptKeyList.decode(e,e.uint32());break;case 12:o.customFees=i.proto.FixedCustomFeeList.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusUpdateTopicTransactionBody"},e}(),t.ConsensusDeleteTopicTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.topicID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusDeleteTopicTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.topicID=i.proto.TopicID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusDeleteTopicTransactionBody"},e}(),t.ConsensusMessageChunkInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.initialTransactionID=null,e.prototype.total=0,e.prototype.number=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.initialTransactionID&&Object.hasOwnProperty.call(e,"initialTransactionID")&&i.proto.TransactionID.encode(e.initialTransactionID,t.uint32(10).fork()).ldelim(),null!=e.total&&Object.hasOwnProperty.call(e,"total")&&t.uint32(16).int32(e.total),null!=e.number&&Object.hasOwnProperty.call(e,"number")&&t.uint32(24).int32(e.number),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusMessageChunkInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.initialTransactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 2:o.total=e.int32();break;case 3:o.number=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusMessageChunkInfo"},e}(),t.ConsensusSubmitMessageTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.topicID=null,e.prototype.message=o.newBuffer([]),e.prototype.chunkInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(10).fork()).ldelim(),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).bytes(e.message),null!=e.chunkInfo&&Object.hasOwnProperty.call(e,"chunkInfo")&&i.proto.ConsensusMessageChunkInfo.encode(e.chunkInfo,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusSubmitMessageTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.topicID=i.proto.TopicID.decode(e,e.uint32());break;case 2:o.message=e.bytes();break;case 3:o.chunkInfo=i.proto.ConsensusMessageChunkInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusSubmitMessageTransactionBody"},e}(),t.UncheckedSubmitBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transactionBytes=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.transactionBytes&&Object.hasOwnProperty.call(e,"transactionBytes")&&t.uint32(10).bytes(e.transactionBytes),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.UncheckedSubmitBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.transactionBytes=e.bytes();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.UncheckedSubmitBody"},e}(),t.TokenCreateTransactionBody=function(){function e(e){if(this.customFees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.name="",e.prototype.symbol="",e.prototype.decimals=0,e.prototype.initialSupply=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.treasury=null,e.prototype.adminKey=null,e.prototype.kycKey=null,e.prototype.freezeKey=null,e.prototype.wipeKey=null,e.prototype.supplyKey=null,e.prototype.freezeDefault=!1,e.prototype.expiry=null,e.prototype.autoRenewAccount=null,e.prototype.autoRenewPeriod=null,e.prototype.memo="",e.prototype.tokenType=0,e.prototype.supplyType=0,e.prototype.maxSupply=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.feeScheduleKey=null,e.prototype.customFees=o.emptyArray,e.prototype.pauseKey=null,e.prototype.metadata=o.newBuffer([]),e.prototype.metadataKey=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.symbol&&Object.hasOwnProperty.call(e,"symbol")&&t.uint32(18).string(e.symbol),null!=e.decimals&&Object.hasOwnProperty.call(e,"decimals")&&t.uint32(24).uint32(e.decimals),null!=e.initialSupply&&Object.hasOwnProperty.call(e,"initialSupply")&&t.uint32(32).uint64(e.initialSupply),null!=e.treasury&&Object.hasOwnProperty.call(e,"treasury")&&i.proto.AccountID.encode(e.treasury,t.uint32(42).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(50).fork()).ldelim(),null!=e.kycKey&&Object.hasOwnProperty.call(e,"kycKey")&&i.proto.Key.encode(e.kycKey,t.uint32(58).fork()).ldelim(),null!=e.freezeKey&&Object.hasOwnProperty.call(e,"freezeKey")&&i.proto.Key.encode(e.freezeKey,t.uint32(66).fork()).ldelim(),null!=e.wipeKey&&Object.hasOwnProperty.call(e,"wipeKey")&&i.proto.Key.encode(e.wipeKey,t.uint32(74).fork()).ldelim(),null!=e.supplyKey&&Object.hasOwnProperty.call(e,"supplyKey")&&i.proto.Key.encode(e.supplyKey,t.uint32(82).fork()).ldelim(),null!=e.freezeDefault&&Object.hasOwnProperty.call(e,"freezeDefault")&&t.uint32(88).bool(e.freezeDefault),null!=e.expiry&&Object.hasOwnProperty.call(e,"expiry")&&i.proto.Timestamp.encode(e.expiry,t.uint32(106).fork()).ldelim(),null!=e.autoRenewAccount&&Object.hasOwnProperty.call(e,"autoRenewAccount")&&i.proto.AccountID.encode(e.autoRenewAccount,t.uint32(114).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(122).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(130).string(e.memo),null!=e.tokenType&&Object.hasOwnProperty.call(e,"tokenType")&&t.uint32(136).int32(e.tokenType),null!=e.supplyType&&Object.hasOwnProperty.call(e,"supplyType")&&t.uint32(144).int32(e.supplyType),null!=e.maxSupply&&Object.hasOwnProperty.call(e,"maxSupply")&&t.uint32(152).int64(e.maxSupply),null!=e.feeScheduleKey&&Object.hasOwnProperty.call(e,"feeScheduleKey")&&i.proto.Key.encode(e.feeScheduleKey,t.uint32(162).fork()).ldelim(),null!=e.customFees&&e.customFees.length)for(var r=0;r<e.customFees.length;++r)i.proto.CustomFee.encode(e.customFees[r],t.uint32(170).fork()).ldelim();return null!=e.pauseKey&&Object.hasOwnProperty.call(e,"pauseKey")&&i.proto.Key.encode(e.pauseKey,t.uint32(178).fork()).ldelim(),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&t.uint32(186).bytes(e.metadata),null!=e.metadataKey&&Object.hasOwnProperty.call(e,"metadataKey")&&i.proto.Key.encode(e.metadataKey,t.uint32(194).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenCreateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.name=e.string();break;case 2:o.symbol=e.string();break;case 3:o.decimals=e.uint32();break;case 4:o.initialSupply=e.uint64();break;case 5:o.treasury=i.proto.AccountID.decode(e,e.uint32());break;case 6:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 7:o.kycKey=i.proto.Key.decode(e,e.uint32());break;case 8:o.freezeKey=i.proto.Key.decode(e,e.uint32());break;case 9:o.wipeKey=i.proto.Key.decode(e,e.uint32());break;case 10:o.supplyKey=i.proto.Key.decode(e,e.uint32());break;case 11:o.freezeDefault=e.bool();break;case 13:o.expiry=i.proto.Timestamp.decode(e,e.uint32());break;case 14:o.autoRenewAccount=i.proto.AccountID.decode(e,e.uint32());break;case 15:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 16:o.memo=e.string();break;case 17:o.tokenType=e.int32();break;case 18:o.supplyType=e.int32();break;case 19:o.maxSupply=e.int64();break;case 20:o.feeScheduleKey=i.proto.Key.decode(e,e.uint32());break;case 21:o.customFees&&o.customFees.length||(o.customFees=[]),o.customFees.push(i.proto.CustomFee.decode(e,e.uint32()));break;case 22:o.pauseKey=i.proto.Key.decode(e,e.uint32());break;case 23:o.metadata=e.bytes();break;case 24:o.metadataKey=i.proto.Key.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenCreateTransactionBody"},e}(),t.TokenFreezeAccountTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.account=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenFreezeAccountTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.account=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenFreezeAccountTransactionBody"},e}(),t.TokenUnfreezeAccountTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.account=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenUnfreezeAccountTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.account=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenUnfreezeAccountTransactionBody"},e}(),t.TokenGrantKycTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.account=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGrantKycTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.account=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGrantKycTransactionBody"},e}(),t.TokenRevokeKycTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.account=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenRevokeKycTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.account=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenRevokeKycTransactionBody"},e}(),t.TokenDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenDeleteTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.token=i.proto.TokenID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenDeleteTransactionBody"},e}(),t.TokenUpdateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.symbol="",e.prototype.name="",e.prototype.treasury=null,e.prototype.adminKey=null,e.prototype.kycKey=null,e.prototype.freezeKey=null,e.prototype.wipeKey=null,e.prototype.supplyKey=null,e.prototype.autoRenewAccount=null,e.prototype.autoRenewPeriod=null,e.prototype.expiry=null,e.prototype.memo=null,e.prototype.feeScheduleKey=null,e.prototype.pauseKey=null,e.prototype.metadata=null,e.prototype.metadataKey=null,e.prototype.keyVerificationMode=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.symbol&&Object.hasOwnProperty.call(e,"symbol")&&t.uint32(18).string(e.symbol),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(26).string(e.name),null!=e.treasury&&Object.hasOwnProperty.call(e,"treasury")&&i.proto.AccountID.encode(e.treasury,t.uint32(34).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(42).fork()).ldelim(),null!=e.kycKey&&Object.hasOwnProperty.call(e,"kycKey")&&i.proto.Key.encode(e.kycKey,t.uint32(50).fork()).ldelim(),null!=e.freezeKey&&Object.hasOwnProperty.call(e,"freezeKey")&&i.proto.Key.encode(e.freezeKey,t.uint32(58).fork()).ldelim(),null!=e.wipeKey&&Object.hasOwnProperty.call(e,"wipeKey")&&i.proto.Key.encode(e.wipeKey,t.uint32(66).fork()).ldelim(),null!=e.supplyKey&&Object.hasOwnProperty.call(e,"supplyKey")&&i.proto.Key.encode(e.supplyKey,t.uint32(74).fork()).ldelim(),null!=e.autoRenewAccount&&Object.hasOwnProperty.call(e,"autoRenewAccount")&&i.proto.AccountID.encode(e.autoRenewAccount,t.uint32(82).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(90).fork()).ldelim(),null!=e.expiry&&Object.hasOwnProperty.call(e,"expiry")&&i.proto.Timestamp.encode(e.expiry,t.uint32(98).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&i.google.protobuf.StringValue.encode(e.memo,t.uint32(106).fork()).ldelim(),null!=e.feeScheduleKey&&Object.hasOwnProperty.call(e,"feeScheduleKey")&&i.proto.Key.encode(e.feeScheduleKey,t.uint32(114).fork()).ldelim(),null!=e.pauseKey&&Object.hasOwnProperty.call(e,"pauseKey")&&i.proto.Key.encode(e.pauseKey,t.uint32(122).fork()).ldelim(),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&i.google.protobuf.BytesValue.encode(e.metadata,t.uint32(130).fork()).ldelim(),null!=e.metadataKey&&Object.hasOwnProperty.call(e,"metadataKey")&&i.proto.Key.encode(e.metadataKey,t.uint32(138).fork()).ldelim(),null!=e.keyVerificationMode&&Object.hasOwnProperty.call(e,"keyVerificationMode")&&t.uint32(144).int32(e.keyVerificationMode),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.symbol=e.string();break;case 3:o.name=e.string();break;case 4:o.treasury=i.proto.AccountID.decode(e,e.uint32());break;case 5:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 6:o.kycKey=i.proto.Key.decode(e,e.uint32());break;case 7:o.freezeKey=i.proto.Key.decode(e,e.uint32());break;case 8:o.wipeKey=i.proto.Key.decode(e,e.uint32());break;case 9:o.supplyKey=i.proto.Key.decode(e,e.uint32());break;case 10:o.autoRenewAccount=i.proto.AccountID.decode(e,e.uint32());break;case 11:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 12:o.expiry=i.proto.Timestamp.decode(e,e.uint32());break;case 13:o.memo=i.google.protobuf.StringValue.decode(e,e.uint32());break;case 14:o.feeScheduleKey=i.proto.Key.decode(e,e.uint32());break;case 15:o.pauseKey=i.proto.Key.decode(e,e.uint32());break;case 16:o.metadata=i.google.protobuf.BytesValue.decode(e,e.uint32());break;case 17:o.metadataKey=i.proto.Key.decode(e,e.uint32());break;case 18:o.keyVerificationMode=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenUpdateTransactionBody"},e}(),t.TokenMintTransactionBody=function(){function e(e){if(this.metadata=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.metadata=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(16).uint64(e.amount),null!=e.metadata&&e.metadata.length)for(var r=0;r<e.metadata.length;++r)t.uint32(26).bytes(e.metadata[r]);return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenMintTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.amount=e.uint64();break;case 3:o.metadata&&o.metadata.length||(o.metadata=[]),o.metadata.push(e.bytes());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenMintTransactionBody"},e}(),t.TokenBurnTransactionBody=function(){function e(e){if(this.serialNumbers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.serialNumbers=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(16).uint64(e.amount),null!=e.serialNumbers&&e.serialNumbers.length){t.uint32(26).fork();for(var r=0;r<e.serialNumbers.length;++r)t.int64(e.serialNumbers[r]);t.ldelim()}return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenBurnTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.amount=e.uint64();break;case 3:if(o.serialNumbers&&o.serialNumbers.length||(o.serialNumbers=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.serialNumbers.push(e.int64());else o.serialNumbers.push(e.int64());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenBurnTransactionBody"},e}(),t.TokenWipeAccountTransactionBody=function(){function e(e){if(this.serialNumbers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.account=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.serialNumbers=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(18).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(24).uint64(e.amount),null!=e.serialNumbers&&e.serialNumbers.length){t.uint32(34).fork();for(var r=0;r<e.serialNumbers.length;++r)t.int64(e.serialNumbers[r]);t.ldelim()}return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenWipeAccountTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.account=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.amount=e.uint64();break;case 4:if(o.serialNumbers&&o.serialNumbers.length||(o.serialNumbers=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.serialNumbers.push(e.int64());else o.serialNumbers.push(e.int64());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenWipeAccountTransactionBody"},e}(),t.TokenAssociateTransactionBody=function(){function e(e){if(this.tokens=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.account=null,e.prototype.tokens=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(10).fork()).ldelim(),null!=e.tokens&&e.tokens.length)for(var r=0;r<e.tokens.length;++r)i.proto.TokenID.encode(e.tokens[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenAssociateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.account=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.tokens&&o.tokens.length||(o.tokens=[]),o.tokens.push(i.proto.TokenID.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenAssociateTransactionBody"},e}(),t.TokenDissociateTransactionBody=function(){function e(e){if(this.tokens=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.account=null,e.prototype.tokens=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.account&&Object.hasOwnProperty.call(e,"account")&&i.proto.AccountID.encode(e.account,t.uint32(10).fork()).ldelim(),null!=e.tokens&&e.tokens.length)for(var r=0;r<e.tokens.length;++r)i.proto.TokenID.encode(e.tokens[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenDissociateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.account=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.tokens&&o.tokens.length||(o.tokens=[]),o.tokens.push(i.proto.TokenID.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenDissociateTransactionBody"},e}(),t.TokenFeeScheduleUpdateTransactionBody=function(){function e(e){if(this.customFees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.customFees=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.customFees&&e.customFees.length)for(var r=0;r<e.customFees.length;++r)i.proto.CustomFee.encode(e.customFees[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenFeeScheduleUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.customFees&&o.customFees.length||(o.customFees=[]),o.customFees.push(i.proto.CustomFee.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenFeeScheduleUpdateTransactionBody"},e}(),t.TokenPauseTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenPauseTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.token=i.proto.TokenID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenPauseTransactionBody"},e}(),t.TokenUnpauseTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenUnpauseTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.token=i.proto.TokenID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenUnpauseTransactionBody"},e}(),t.TokenUpdateNftsTransactionBody=function(){function e(e){if(this.serialNumbers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.token=null,e.prototype.serialNumbers=o.emptyArray,e.prototype.metadata=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(10).fork()).ldelim(),null!=e.serialNumbers&&e.serialNumbers.length){t.uint32(18).fork();for(var r=0;r<e.serialNumbers.length;++r)t.int64(e.serialNumbers[r]);t.ldelim()}return null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&i.google.protobuf.BytesValue.encode(e.metadata,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenUpdateNftsTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.token=i.proto.TokenID.decode(e,e.uint32());break;case 2:if(o.serialNumbers&&o.serialNumbers.length||(o.serialNumbers=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.serialNumbers.push(e.int64());else o.serialNumbers.push(e.int64());break;case 3:o.metadata=i.google.protobuf.BytesValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenUpdateNftsTransactionBody"},e}(),t.TokenRejectTransactionBody=function(){function e(e){if(this.rejections=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.owner=null,e.prototype.rejections=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.owner&&Object.hasOwnProperty.call(e,"owner")&&i.proto.AccountID.encode(e.owner,t.uint32(10).fork()).ldelim(),null!=e.rejections&&e.rejections.length)for(var r=0;r<e.rejections.length;++r)i.proto.TokenReference.encode(e.rejections[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenRejectTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.owner=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.rejections&&o.rejections.length||(o.rejections=[]),o.rejections.push(i.proto.TokenReference.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenRejectTransactionBody"},e}(),t.TokenReference=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.fungibleToken=null,e.prototype.nft=null,Object.defineProperty(e.prototype,"tokenIdentifier",{get:o.oneOfGetter(t=["fungibleToken","nft"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fungibleToken&&Object.hasOwnProperty.call(e,"fungibleToken")&&i.proto.TokenID.encode(e.fungibleToken,t.uint32(10).fork()).ldelim(),null!=e.nft&&Object.hasOwnProperty.call(e,"nft")&&i.proto.NftID.encode(e.nft,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenReference;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fungibleToken=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.nft=i.proto.NftID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenReference"},e}(),t.TokenAirdropTransactionBody=function(){function e(e){if(this.tokenTransfers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenTransfers=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.tokenTransfers&&e.tokenTransfers.length)for(var r=0;r<e.tokenTransfers.length;++r)i.proto.TokenTransferList.encode(e.tokenTransfers[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenAirdropTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.tokenTransfers&&o.tokenTransfers.length||(o.tokenTransfers=[]),o.tokenTransfers.push(i.proto.TokenTransferList.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenAirdropTransactionBody"},e}(),t.TokenCancelAirdropTransactionBody=function(){function e(e){if(this.pendingAirdrops=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.pendingAirdrops=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.pendingAirdrops&&e.pendingAirdrops.length)for(var r=0;r<e.pendingAirdrops.length;++r)i.proto.PendingAirdropId.encode(e.pendingAirdrops[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenCancelAirdropTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.pendingAirdrops&&o.pendingAirdrops.length||(o.pendingAirdrops=[]),o.pendingAirdrops.push(i.proto.PendingAirdropId.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenCancelAirdropTransactionBody"},e}(),t.TokenClaimAirdropTransactionBody=function(){function e(e){if(this.pendingAirdrops=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.pendingAirdrops=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.pendingAirdrops&&e.pendingAirdrops.length)for(var r=0;r<e.pendingAirdrops.length;++r)i.proto.PendingAirdropId.encode(e.pendingAirdrops[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenClaimAirdropTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.pendingAirdrops&&o.pendingAirdrops.length||(o.pendingAirdrops=[]),o.pendingAirdrops.push(i.proto.PendingAirdropId.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenClaimAirdropTransactionBody"},e}(),t.ScheduleCreateTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.scheduledTransactionBody=null,e.prototype.memo="",e.prototype.adminKey=null,e.prototype.payerAccountID=null,e.prototype.expirationTime=null,e.prototype.waitForExpiry=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.scheduledTransactionBody&&Object.hasOwnProperty.call(e,"scheduledTransactionBody")&&i.proto.SchedulableTransactionBody.encode(e.scheduledTransactionBody,t.uint32(10).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(18).string(e.memo),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(26).fork()).ldelim(),null!=e.payerAccountID&&Object.hasOwnProperty.call(e,"payerAccountID")&&i.proto.AccountID.encode(e.payerAccountID,t.uint32(34).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(42).fork()).ldelim(),null!=e.waitForExpiry&&Object.hasOwnProperty.call(e,"waitForExpiry")&&t.uint32(104).bool(e.waitForExpiry),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleCreateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.scheduledTransactionBody=i.proto.SchedulableTransactionBody.decode(e,e.uint32());break;case 2:o.memo=e.string();break;case 3:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 4:o.payerAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 5:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 13:o.waitForExpiry=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleCreateTransactionBody"},e}(),t.SchedulableTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.transactionFee=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.memo="",e.prototype.contractCall=null,e.prototype.contractCreateInstance=null,e.prototype.contractUpdateInstance=null,e.prototype.contractDeleteInstance=null,e.prototype.cryptoCreateAccount=null,e.prototype.cryptoDelete=null,e.prototype.cryptoTransfer=null,e.prototype.cryptoUpdateAccount=null,e.prototype.fileAppend=null,e.prototype.fileCreate=null,e.prototype.fileDelete=null,e.prototype.fileUpdate=null,e.prototype.systemDelete=null,e.prototype.systemUndelete=null,e.prototype.freeze=null,e.prototype.consensusCreateTopic=null,e.prototype.consensusUpdateTopic=null,e.prototype.consensusDeleteTopic=null,e.prototype.consensusSubmitMessage=null,e.prototype.tokenCreation=null,e.prototype.tokenFreeze=null,e.prototype.tokenUnfreeze=null,e.prototype.tokenGrantKyc=null,e.prototype.tokenRevokeKyc=null,e.prototype.tokenDeletion=null,e.prototype.tokenUpdate=null,e.prototype.tokenMint=null,e.prototype.tokenBurn=null,e.prototype.tokenWipe=null,e.prototype.tokenAssociate=null,e.prototype.tokenDissociate=null,e.prototype.scheduleDelete=null,e.prototype.tokenPause=null,e.prototype.tokenUnpause=null,e.prototype.cryptoApproveAllowance=null,e.prototype.cryptoDeleteAllowance=null,e.prototype.tokenFeeScheduleUpdate=null,e.prototype.utilPrng=null,e.prototype.tokenUpdateNfts=null,e.prototype.nodeCreate=null,e.prototype.nodeUpdate=null,e.prototype.nodeDelete=null,e.prototype.tokenReject=null,e.prototype.tokenCancelAirdrop=null,e.prototype.tokenClaimAirdrop=null,e.prototype.tokenAirdrop=null,Object.defineProperty(e.prototype,"data",{get:o.oneOfGetter(t=["contractCall","contractCreateInstance","contractUpdateInstance","contractDeleteInstance","cryptoCreateAccount","cryptoDelete","cryptoTransfer","cryptoUpdateAccount","fileAppend","fileCreate","fileDelete","fileUpdate","systemDelete","systemUndelete","freeze","consensusCreateTopic","consensusUpdateTopic","consensusDeleteTopic","consensusSubmitMessage","tokenCreation","tokenFreeze","tokenUnfreeze","tokenGrantKyc","tokenRevokeKyc","tokenDeletion","tokenUpdate","tokenMint","tokenBurn","tokenWipe","tokenAssociate","tokenDissociate","scheduleDelete","tokenPause","tokenUnpause","cryptoApproveAllowance","cryptoDeleteAllowance","tokenFeeScheduleUpdate","utilPrng","tokenUpdateNfts","nodeCreate","nodeUpdate","nodeDelete","tokenReject","tokenCancelAirdrop","tokenClaimAirdrop","tokenAirdrop"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.transactionFee&&Object.hasOwnProperty.call(e,"transactionFee")&&t.uint32(8).uint64(e.transactionFee),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(18).string(e.memo),null!=e.contractCall&&Object.hasOwnProperty.call(e,"contractCall")&&i.proto.ContractCallTransactionBody.encode(e.contractCall,t.uint32(26).fork()).ldelim(),null!=e.contractCreateInstance&&Object.hasOwnProperty.call(e,"contractCreateInstance")&&i.proto.ContractCreateTransactionBody.encode(e.contractCreateInstance,t.uint32(34).fork()).ldelim(),null!=e.contractUpdateInstance&&Object.hasOwnProperty.call(e,"contractUpdateInstance")&&i.proto.ContractUpdateTransactionBody.encode(e.contractUpdateInstance,t.uint32(42).fork()).ldelim(),null!=e.contractDeleteInstance&&Object.hasOwnProperty.call(e,"contractDeleteInstance")&&i.proto.ContractDeleteTransactionBody.encode(e.contractDeleteInstance,t.uint32(50).fork()).ldelim(),null!=e.cryptoCreateAccount&&Object.hasOwnProperty.call(e,"cryptoCreateAccount")&&i.proto.CryptoCreateTransactionBody.encode(e.cryptoCreateAccount,t.uint32(58).fork()).ldelim(),null!=e.cryptoDelete&&Object.hasOwnProperty.call(e,"cryptoDelete")&&i.proto.CryptoDeleteTransactionBody.encode(e.cryptoDelete,t.uint32(66).fork()).ldelim(),null!=e.cryptoTransfer&&Object.hasOwnProperty.call(e,"cryptoTransfer")&&i.proto.CryptoTransferTransactionBody.encode(e.cryptoTransfer,t.uint32(74).fork()).ldelim(),null!=e.cryptoUpdateAccount&&Object.hasOwnProperty.call(e,"cryptoUpdateAccount")&&i.proto.CryptoUpdateTransactionBody.encode(e.cryptoUpdateAccount,t.uint32(82).fork()).ldelim(),null!=e.fileAppend&&Object.hasOwnProperty.call(e,"fileAppend")&&i.proto.FileAppendTransactionBody.encode(e.fileAppend,t.uint32(90).fork()).ldelim(),null!=e.fileCreate&&Object.hasOwnProperty.call(e,"fileCreate")&&i.proto.FileCreateTransactionBody.encode(e.fileCreate,t.uint32(98).fork()).ldelim(),null!=e.fileDelete&&Object.hasOwnProperty.call(e,"fileDelete")&&i.proto.FileDeleteTransactionBody.encode(e.fileDelete,t.uint32(106).fork()).ldelim(),null!=e.fileUpdate&&Object.hasOwnProperty.call(e,"fileUpdate")&&i.proto.FileUpdateTransactionBody.encode(e.fileUpdate,t.uint32(114).fork()).ldelim(),null!=e.systemDelete&&Object.hasOwnProperty.call(e,"systemDelete")&&i.proto.SystemDeleteTransactionBody.encode(e.systemDelete,t.uint32(122).fork()).ldelim(),null!=e.systemUndelete&&Object.hasOwnProperty.call(e,"systemUndelete")&&i.proto.SystemUndeleteTransactionBody.encode(e.systemUndelete,t.uint32(130).fork()).ldelim(),null!=e.freeze&&Object.hasOwnProperty.call(e,"freeze")&&i.proto.FreezeTransactionBody.encode(e.freeze,t.uint32(138).fork()).ldelim(),null!=e.consensusCreateTopic&&Object.hasOwnProperty.call(e,"consensusCreateTopic")&&i.proto.ConsensusCreateTopicTransactionBody.encode(e.consensusCreateTopic,t.uint32(146).fork()).ldelim(),null!=e.consensusUpdateTopic&&Object.hasOwnProperty.call(e,"consensusUpdateTopic")&&i.proto.ConsensusUpdateTopicTransactionBody.encode(e.consensusUpdateTopic,t.uint32(154).fork()).ldelim(),null!=e.consensusDeleteTopic&&Object.hasOwnProperty.call(e,"consensusDeleteTopic")&&i.proto.ConsensusDeleteTopicTransactionBody.encode(e.consensusDeleteTopic,t.uint32(162).fork()).ldelim(),null!=e.consensusSubmitMessage&&Object.hasOwnProperty.call(e,"consensusSubmitMessage")&&i.proto.ConsensusSubmitMessageTransactionBody.encode(e.consensusSubmitMessage,t.uint32(170).fork()).ldelim(),null!=e.tokenCreation&&Object.hasOwnProperty.call(e,"tokenCreation")&&i.proto.TokenCreateTransactionBody.encode(e.tokenCreation,t.uint32(178).fork()).ldelim(),null!=e.tokenFreeze&&Object.hasOwnProperty.call(e,"tokenFreeze")&&i.proto.TokenFreezeAccountTransactionBody.encode(e.tokenFreeze,t.uint32(186).fork()).ldelim(),null!=e.tokenUnfreeze&&Object.hasOwnProperty.call(e,"tokenUnfreeze")&&i.proto.TokenUnfreezeAccountTransactionBody.encode(e.tokenUnfreeze,t.uint32(194).fork()).ldelim(),null!=e.tokenGrantKyc&&Object.hasOwnProperty.call(e,"tokenGrantKyc")&&i.proto.TokenGrantKycTransactionBody.encode(e.tokenGrantKyc,t.uint32(202).fork()).ldelim(),null!=e.tokenRevokeKyc&&Object.hasOwnProperty.call(e,"tokenRevokeKyc")&&i.proto.TokenRevokeKycTransactionBody.encode(e.tokenRevokeKyc,t.uint32(210).fork()).ldelim(),null!=e.tokenDeletion&&Object.hasOwnProperty.call(e,"tokenDeletion")&&i.proto.TokenDeleteTransactionBody.encode(e.tokenDeletion,t.uint32(218).fork()).ldelim(),null!=e.tokenUpdate&&Object.hasOwnProperty.call(e,"tokenUpdate")&&i.proto.TokenUpdateTransactionBody.encode(e.tokenUpdate,t.uint32(226).fork()).ldelim(),null!=e.tokenMint&&Object.hasOwnProperty.call(e,"tokenMint")&&i.proto.TokenMintTransactionBody.encode(e.tokenMint,t.uint32(234).fork()).ldelim(),null!=e.tokenBurn&&Object.hasOwnProperty.call(e,"tokenBurn")&&i.proto.TokenBurnTransactionBody.encode(e.tokenBurn,t.uint32(242).fork()).ldelim(),null!=e.tokenWipe&&Object.hasOwnProperty.call(e,"tokenWipe")&&i.proto.TokenWipeAccountTransactionBody.encode(e.tokenWipe,t.uint32(250).fork()).ldelim(),null!=e.tokenAssociate&&Object.hasOwnProperty.call(e,"tokenAssociate")&&i.proto.TokenAssociateTransactionBody.encode(e.tokenAssociate,t.uint32(258).fork()).ldelim(),null!=e.tokenDissociate&&Object.hasOwnProperty.call(e,"tokenDissociate")&&i.proto.TokenDissociateTransactionBody.encode(e.tokenDissociate,t.uint32(266).fork()).ldelim(),null!=e.scheduleDelete&&Object.hasOwnProperty.call(e,"scheduleDelete")&&i.proto.ScheduleDeleteTransactionBody.encode(e.scheduleDelete,t.uint32(274).fork()).ldelim(),null!=e.tokenPause&&Object.hasOwnProperty.call(e,"tokenPause")&&i.proto.TokenPauseTransactionBody.encode(e.tokenPause,t.uint32(282).fork()).ldelim(),null!=e.tokenUnpause&&Object.hasOwnProperty.call(e,"tokenUnpause")&&i.proto.TokenUnpauseTransactionBody.encode(e.tokenUnpause,t.uint32(290).fork()).ldelim(),null!=e.cryptoApproveAllowance&&Object.hasOwnProperty.call(e,"cryptoApproveAllowance")&&i.proto.CryptoApproveAllowanceTransactionBody.encode(e.cryptoApproveAllowance,t.uint32(298).fork()).ldelim(),null!=e.cryptoDeleteAllowance&&Object.hasOwnProperty.call(e,"cryptoDeleteAllowance")&&i.proto.CryptoDeleteAllowanceTransactionBody.encode(e.cryptoDeleteAllowance,t.uint32(306).fork()).ldelim(),null!=e.tokenFeeScheduleUpdate&&Object.hasOwnProperty.call(e,"tokenFeeScheduleUpdate")&&i.proto.TokenFeeScheduleUpdateTransactionBody.encode(e.tokenFeeScheduleUpdate,t.uint32(314).fork()).ldelim(),null!=e.utilPrng&&Object.hasOwnProperty.call(e,"utilPrng")&&i.proto.UtilPrngTransactionBody.encode(e.utilPrng,t.uint32(322).fork()).ldelim(),null!=e.tokenUpdateNfts&&Object.hasOwnProperty.call(e,"tokenUpdateNfts")&&i.proto.TokenUpdateNftsTransactionBody.encode(e.tokenUpdateNfts,t.uint32(330).fork()).ldelim(),null!=e.nodeCreate&&Object.hasOwnProperty.call(e,"nodeCreate")&&i.com.hedera.hapi.node.addressbook.NodeCreateTransactionBody.encode(e.nodeCreate,t.uint32(338).fork()).ldelim(),null!=e.nodeUpdate&&Object.hasOwnProperty.call(e,"nodeUpdate")&&i.com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody.encode(e.nodeUpdate,t.uint32(346).fork()).ldelim(),null!=e.nodeDelete&&Object.hasOwnProperty.call(e,"nodeDelete")&&i.com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody.encode(e.nodeDelete,t.uint32(354).fork()).ldelim(),null!=e.tokenReject&&Object.hasOwnProperty.call(e,"tokenReject")&&i.proto.TokenRejectTransactionBody.encode(e.tokenReject,t.uint32(362).fork()).ldelim(),null!=e.tokenCancelAirdrop&&Object.hasOwnProperty.call(e,"tokenCancelAirdrop")&&i.proto.TokenCancelAirdropTransactionBody.encode(e.tokenCancelAirdrop,t.uint32(370).fork()).ldelim(),null!=e.tokenClaimAirdrop&&Object.hasOwnProperty.call(e,"tokenClaimAirdrop")&&i.proto.TokenClaimAirdropTransactionBody.encode(e.tokenClaimAirdrop,t.uint32(378).fork()).ldelim(),null!=e.tokenAirdrop&&Object.hasOwnProperty.call(e,"tokenAirdrop")&&i.proto.TokenAirdropTransactionBody.encode(e.tokenAirdrop,t.uint32(386).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SchedulableTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transactionFee=e.uint64();break;case 2:o.memo=e.string();break;case 3:o.contractCall=i.proto.ContractCallTransactionBody.decode(e,e.uint32());break;case 4:o.contractCreateInstance=i.proto.ContractCreateTransactionBody.decode(e,e.uint32());break;case 5:o.contractUpdateInstance=i.proto.ContractUpdateTransactionBody.decode(e,e.uint32());break;case 6:o.contractDeleteInstance=i.proto.ContractDeleteTransactionBody.decode(e,e.uint32());break;case 7:o.cryptoCreateAccount=i.proto.CryptoCreateTransactionBody.decode(e,e.uint32());break;case 8:o.cryptoDelete=i.proto.CryptoDeleteTransactionBody.decode(e,e.uint32());break;case 9:o.cryptoTransfer=i.proto.CryptoTransferTransactionBody.decode(e,e.uint32());break;case 10:o.cryptoUpdateAccount=i.proto.CryptoUpdateTransactionBody.decode(e,e.uint32());break;case 11:o.fileAppend=i.proto.FileAppendTransactionBody.decode(e,e.uint32());break;case 12:o.fileCreate=i.proto.FileCreateTransactionBody.decode(e,e.uint32());break;case 13:o.fileDelete=i.proto.FileDeleteTransactionBody.decode(e,e.uint32());break;case 14:o.fileUpdate=i.proto.FileUpdateTransactionBody.decode(e,e.uint32());break;case 15:o.systemDelete=i.proto.SystemDeleteTransactionBody.decode(e,e.uint32());break;case 16:o.systemUndelete=i.proto.SystemUndeleteTransactionBody.decode(e,e.uint32());break;case 17:o.freeze=i.proto.FreezeTransactionBody.decode(e,e.uint32());break;case 18:o.consensusCreateTopic=i.proto.ConsensusCreateTopicTransactionBody.decode(e,e.uint32());break;case 19:o.consensusUpdateTopic=i.proto.ConsensusUpdateTopicTransactionBody.decode(e,e.uint32());break;case 20:o.consensusDeleteTopic=i.proto.ConsensusDeleteTopicTransactionBody.decode(e,e.uint32());break;case 21:o.consensusSubmitMessage=i.proto.ConsensusSubmitMessageTransactionBody.decode(e,e.uint32());break;case 22:o.tokenCreation=i.proto.TokenCreateTransactionBody.decode(e,e.uint32());break;case 23:o.tokenFreeze=i.proto.TokenFreezeAccountTransactionBody.decode(e,e.uint32());break;case 24:o.tokenUnfreeze=i.proto.TokenUnfreezeAccountTransactionBody.decode(e,e.uint32());break;case 25:o.tokenGrantKyc=i.proto.TokenGrantKycTransactionBody.decode(e,e.uint32());break;case 26:o.tokenRevokeKyc=i.proto.TokenRevokeKycTransactionBody.decode(e,e.uint32());break;case 27:o.tokenDeletion=i.proto.TokenDeleteTransactionBody.decode(e,e.uint32());break;case 28:o.tokenUpdate=i.proto.TokenUpdateTransactionBody.decode(e,e.uint32());break;case 29:o.tokenMint=i.proto.TokenMintTransactionBody.decode(e,e.uint32());break;case 30:o.tokenBurn=i.proto.TokenBurnTransactionBody.decode(e,e.uint32());break;case 31:o.tokenWipe=i.proto.TokenWipeAccountTransactionBody.decode(e,e.uint32());break;case 32:o.tokenAssociate=i.proto.TokenAssociateTransactionBody.decode(e,e.uint32());break;case 33:o.tokenDissociate=i.proto.TokenDissociateTransactionBody.decode(e,e.uint32());break;case 34:o.scheduleDelete=i.proto.ScheduleDeleteTransactionBody.decode(e,e.uint32());break;case 35:o.tokenPause=i.proto.TokenPauseTransactionBody.decode(e,e.uint32());break;case 36:o.tokenUnpause=i.proto.TokenUnpauseTransactionBody.decode(e,e.uint32());break;case 37:o.cryptoApproveAllowance=i.proto.CryptoApproveAllowanceTransactionBody.decode(e,e.uint32());break;case 38:o.cryptoDeleteAllowance=i.proto.CryptoDeleteAllowanceTransactionBody.decode(e,e.uint32());break;case 39:o.tokenFeeScheduleUpdate=i.proto.TokenFeeScheduleUpdateTransactionBody.decode(e,e.uint32());break;case 40:o.utilPrng=i.proto.UtilPrngTransactionBody.decode(e,e.uint32());break;case 41:o.tokenUpdateNfts=i.proto.TokenUpdateNftsTransactionBody.decode(e,e.uint32());break;case 42:o.nodeCreate=i.com.hedera.hapi.node.addressbook.NodeCreateTransactionBody.decode(e,e.uint32());break;case 43:o.nodeUpdate=i.com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody.decode(e,e.uint32());break;case 44:o.nodeDelete=i.com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody.decode(e,e.uint32());break;case 45:o.tokenReject=i.proto.TokenRejectTransactionBody.decode(e,e.uint32());break;case 46:o.tokenCancelAirdrop=i.proto.TokenCancelAirdropTransactionBody.decode(e,e.uint32());break;case 47:o.tokenClaimAirdrop=i.proto.TokenClaimAirdropTransactionBody.decode(e,e.uint32());break;case 48:o.tokenAirdrop=i.proto.TokenAirdropTransactionBody.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SchedulableTransactionBody"},e}(),t.ScheduleDeleteTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.scheduleID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.scheduleID&&Object.hasOwnProperty.call(e,"scheduleID")&&i.proto.ScheduleID.encode(e.scheduleID,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleDeleteTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.scheduleID=i.proto.ScheduleID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleDeleteTransactionBody"},e}(),t.UtilPrngTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.range=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.range&&Object.hasOwnProperty.call(e,"range")&&t.uint32(8).int32(e.range),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.UtilPrngTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.range=e.int32();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.UtilPrngTransactionBody"},e}(),t.ScheduleSignTransactionBody=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.scheduleID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.scheduleID&&Object.hasOwnProperty.call(e,"scheduleID")&&i.proto.ScheduleID.encode(e.scheduleID,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleSignTransactionBody;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.scheduleID=i.proto.ScheduleID.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleSignTransactionBody"},e}(),t.NodeStakeUpdateTransactionBody=function(){function e(e){if(this.nodeStake=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.endOfStakingPeriod=null,e.prototype.nodeStake=o.emptyArray,e.prototype.maxStakingRewardRatePerHbar=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.nodeRewardFeeFraction=null,e.prototype.stakingPeriodsStored=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakingPeriod=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakingRewardFeeFraction=null,e.prototype.stakingStartThreshold=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakingRewardRate=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.reservedStakingRewards=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.unreservedStakingRewardBalance=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.rewardBalanceThreshold=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.maxStakeRewarded=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.maxTotalReward=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.endOfStakingPeriod&&Object.hasOwnProperty.call(e,"endOfStakingPeriod")&&i.proto.Timestamp.encode(e.endOfStakingPeriod,t.uint32(10).fork()).ldelim(),null!=e.nodeStake&&e.nodeStake.length)for(var r=0;r<e.nodeStake.length;++r)i.proto.NodeStake.encode(e.nodeStake[r],t.uint32(18).fork()).ldelim();return null!=e.maxStakingRewardRatePerHbar&&Object.hasOwnProperty.call(e,"maxStakingRewardRatePerHbar")&&t.uint32(24).int64(e.maxStakingRewardRatePerHbar),null!=e.nodeRewardFeeFraction&&Object.hasOwnProperty.call(e,"nodeRewardFeeFraction")&&i.proto.Fraction.encode(e.nodeRewardFeeFraction,t.uint32(34).fork()).ldelim(),null!=e.stakingPeriodsStored&&Object.hasOwnProperty.call(e,"stakingPeriodsStored")&&t.uint32(40).int64(e.stakingPeriodsStored),null!=e.stakingPeriod&&Object.hasOwnProperty.call(e,"stakingPeriod")&&t.uint32(48).int64(e.stakingPeriod),null!=e.stakingRewardFeeFraction&&Object.hasOwnProperty.call(e,"stakingRewardFeeFraction")&&i.proto.Fraction.encode(e.stakingRewardFeeFraction,t.uint32(58).fork()).ldelim(),null!=e.stakingStartThreshold&&Object.hasOwnProperty.call(e,"stakingStartThreshold")&&t.uint32(64).int64(e.stakingStartThreshold),null!=e.stakingRewardRate&&Object.hasOwnProperty.call(e,"stakingRewardRate")&&t.uint32(72).int64(e.stakingRewardRate),null!=e.reservedStakingRewards&&Object.hasOwnProperty.call(e,"reservedStakingRewards")&&t.uint32(80).int64(e.reservedStakingRewards),null!=e.unreservedStakingRewardBalance&&Object.hasOwnProperty.call(e,"unreservedStakingRewardBalance")&&t.uint32(88).int64(e.unreservedStakingRewardBalance),null!=e.rewardBalanceThreshold&&Object.hasOwnProperty.call(e,"rewardBalanceThreshold")&&t.uint32(96).int64(e.rewardBalanceThreshold),null!=e.maxStakeRewarded&&Object.hasOwnProperty.call(e,"maxStakeRewarded")&&t.uint32(104).int64(e.maxStakeRewarded),null!=e.maxTotalReward&&Object.hasOwnProperty.call(e,"maxTotalReward")&&t.uint32(112).int64(e.maxTotalReward),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NodeStakeUpdateTransactionBody;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.endOfStakingPeriod=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.nodeStake&&o.nodeStake.length||(o.nodeStake=[]),o.nodeStake.push(i.proto.NodeStake.decode(e,e.uint32()));break;case 3:o.maxStakingRewardRatePerHbar=e.int64();break;case 4:o.nodeRewardFeeFraction=i.proto.Fraction.decode(e,e.uint32());break;case 5:o.stakingPeriodsStored=e.int64();break;case 6:o.stakingPeriod=e.int64();break;case 7:o.stakingRewardFeeFraction=i.proto.Fraction.decode(e,e.uint32());break;case 8:o.stakingStartThreshold=e.int64();break;case 9:o.stakingRewardRate=e.int64();break;case 10:o.reservedStakingRewards=e.int64();break;case 11:o.unreservedStakingRewardBalance=e.int64();break;case 12:o.rewardBalanceThreshold=e.int64();break;case 13:o.maxStakeRewarded=e.int64();break;case 14:o.maxTotalReward=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NodeStakeUpdateTransactionBody"},e}(),t.NodeStake=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.maxStake=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.minStake=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.rewardRate=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stake=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakeNotRewarded=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakeRewarded=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.maxStake&&Object.hasOwnProperty.call(e,"maxStake")&&t.uint32(8).int64(e.maxStake),null!=e.minStake&&Object.hasOwnProperty.call(e,"minStake")&&t.uint32(16).int64(e.minStake),null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(24).int64(e.nodeId),null!=e.rewardRate&&Object.hasOwnProperty.call(e,"rewardRate")&&t.uint32(32).int64(e.rewardRate),null!=e.stake&&Object.hasOwnProperty.call(e,"stake")&&t.uint32(40).int64(e.stake),null!=e.stakeNotRewarded&&Object.hasOwnProperty.call(e,"stakeNotRewarded")&&t.uint32(48).int64(e.stakeNotRewarded),null!=e.stakeRewarded&&Object.hasOwnProperty.call(e,"stakeRewarded")&&t.uint32(56).int64(e.stakeRewarded),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NodeStake;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.maxStake=e.int64();break;case 2:o.minStake=e.int64();break;case 3:o.nodeId=e.int64();break;case 4:o.rewardRate=e.int64();break;case 5:o.stake=e.int64();break;case 6:o.stakeNotRewarded=e.int64();break;case 7:o.stakeRewarded=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NodeStake"},e}(),t.ConsensusGetTopicInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.topicID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusGetTopicInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.topicID=i.proto.TopicID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusGetTopicInfoQuery"},e}(),t.ConsensusGetTopicInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.topicID=null,e.prototype.topicInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(18).fork()).ldelim(),null!=e.topicInfo&&Object.hasOwnProperty.call(e,"topicInfo")&&i.proto.ConsensusTopicInfo.encode(e.topicInfo,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusGetTopicInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.topicID=i.proto.TopicID.decode(e,e.uint32());break;case 5:o.topicInfo=i.proto.ConsensusTopicInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusGetTopicInfoResponse"},e}(),t.ResponseType=function(){const e={},t=Object.create(e);return t[e[0]="ANSWER_ONLY"]=0,t[e[1]="ANSWER_STATE_PROOF"]=1,t[e[2]="COST_ANSWER"]=2,t[e[3]="COST_ANSWER_STATE_PROOF"]=3,t}(),t.QueryHeader=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.payment=null,e.prototype.responseType=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.payment&&Object.hasOwnProperty.call(e,"payment")&&i.proto.Transaction.encode(e.payment,t.uint32(10).fork()).ldelim(),null!=e.responseType&&Object.hasOwnProperty.call(e,"responseType")&&t.uint32(16).int32(e.responseType),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.QueryHeader;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.payment=i.proto.Transaction.decode(e,e.uint32());break;case 2:o.responseType=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.QueryHeader"},e}(),t.ResponseHeader=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nodeTransactionPrecheckCode=0,e.prototype.responseType=0,e.prototype.cost=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.stateProof=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.nodeTransactionPrecheckCode&&Object.hasOwnProperty.call(e,"nodeTransactionPrecheckCode")&&t.uint32(8).int32(e.nodeTransactionPrecheckCode),null!=e.responseType&&Object.hasOwnProperty.call(e,"responseType")&&t.uint32(16).int32(e.responseType),null!=e.cost&&Object.hasOwnProperty.call(e,"cost")&&t.uint32(24).uint64(e.cost),null!=e.stateProof&&Object.hasOwnProperty.call(e,"stateProof")&&t.uint32(34).bytes(e.stateProof),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ResponseHeader;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.nodeTransactionPrecheckCode=e.int32();break;case 2:o.responseType=e.int32();break;case 3:o.cost=e.uint64();break;case 4:o.stateProof=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ResponseHeader"},e}(),t.ConsensusTopicInfo=function(){function e(e){if(this.feeExemptKeyList=[],this.customFees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.memo="",e.prototype.runningHash=o.newBuffer([]),e.prototype.sequenceNumber=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.expirationTime=null,e.prototype.adminKey=null,e.prototype.submitKey=null,e.prototype.autoRenewPeriod=null,e.prototype.autoRenewAccount=null,e.prototype.ledgerId=o.newBuffer([]),e.prototype.feeScheduleKey=null,e.prototype.feeExemptKeyList=o.emptyArray,e.prototype.customFees=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(10).string(e.memo),null!=e.runningHash&&Object.hasOwnProperty.call(e,"runningHash")&&t.uint32(18).bytes(e.runningHash),null!=e.sequenceNumber&&Object.hasOwnProperty.call(e,"sequenceNumber")&&t.uint32(24).uint64(e.sequenceNumber),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(34).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(42).fork()).ldelim(),null!=e.submitKey&&Object.hasOwnProperty.call(e,"submitKey")&&i.proto.Key.encode(e.submitKey,t.uint32(50).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(58).fork()).ldelim(),null!=e.autoRenewAccount&&Object.hasOwnProperty.call(e,"autoRenewAccount")&&i.proto.AccountID.encode(e.autoRenewAccount,t.uint32(66).fork()).ldelim(),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(74).bytes(e.ledgerId),null!=e.feeScheduleKey&&Object.hasOwnProperty.call(e,"feeScheduleKey")&&i.proto.Key.encode(e.feeScheduleKey,t.uint32(82).fork()).ldelim(),null!=e.feeExemptKeyList&&e.feeExemptKeyList.length)for(var r=0;r<e.feeExemptKeyList.length;++r)i.proto.Key.encode(e.feeExemptKeyList[r],t.uint32(90).fork()).ldelim();if(null!=e.customFees&&e.customFees.length)for(r=0;r<e.customFees.length;++r)i.proto.FixedCustomFee.encode(e.customFees[r],t.uint32(98).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ConsensusTopicInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.memo=e.string();break;case 2:o.runningHash=e.bytes();break;case 3:o.sequenceNumber=e.uint64();break;case 4:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 5:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 6:o.submitKey=i.proto.Key.decode(e,e.uint32());break;case 7:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 8:o.autoRenewAccount=i.proto.AccountID.decode(e,e.uint32());break;case 9:o.ledgerId=e.bytes();break;case 10:o.feeScheduleKey=i.proto.Key.decode(e,e.uint32());break;case 11:o.feeExemptKeyList&&o.feeExemptKeyList.length||(o.feeExemptKeyList=[]),o.feeExemptKeyList.push(i.proto.Key.decode(e,e.uint32()));break;case 12:o.customFees&&o.customFees.length||(o.customFees=[]),o.customFees.push(i.proto.FixedCustomFee.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ConsensusTopicInfo"},e}(),t.ConsensusService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createTopic=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createTopic"}),Object.defineProperty(t.prototype.updateTopic=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateTopic"}),Object.defineProperty(t.prototype.deleteTopic=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteTopic"}),Object.defineProperty(t.prototype.submitMessage=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"submitMessage"}),Object.defineProperty(t.prototype.getTopicInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getTopicInfo"}),t}(),t.Query=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.getByKey=null,e.prototype.getBySolidityID=null,e.prototype.contractCallLocal=null,e.prototype.contractGetInfo=null,e.prototype.contractGetBytecode=null,e.prototype.ContractGetRecords=null,e.prototype.cryptogetAccountBalance=null,e.prototype.cryptoGetAccountRecords=null,e.prototype.cryptoGetInfo=null,e.prototype.cryptoGetLiveHash=null,e.prototype.cryptoGetProxyStakers=null,e.prototype.fileGetContents=null,e.prototype.fileGetInfo=null,e.prototype.transactionGetReceipt=null,e.prototype.transactionGetRecord=null,e.prototype.transactionGetFastRecord=null,e.prototype.consensusGetTopicInfo=null,e.prototype.networkGetVersionInfo=null,e.prototype.tokenGetInfo=null,e.prototype.scheduleGetInfo=null,e.prototype.tokenGetAccountNftInfos=null,e.prototype.tokenGetNftInfo=null,e.prototype.tokenGetNftInfos=null,e.prototype.networkGetExecutionTime=null,e.prototype.accountDetails=null,Object.defineProperty(e.prototype,"query",{get:o.oneOfGetter(t=["getByKey","getBySolidityID","contractCallLocal","contractGetInfo","contractGetBytecode","ContractGetRecords","cryptogetAccountBalance","cryptoGetAccountRecords","cryptoGetInfo","cryptoGetLiveHash","cryptoGetProxyStakers","fileGetContents","fileGetInfo","transactionGetReceipt","transactionGetRecord","transactionGetFastRecord","consensusGetTopicInfo","networkGetVersionInfo","tokenGetInfo","scheduleGetInfo","tokenGetAccountNftInfos","tokenGetNftInfo","tokenGetNftInfos","networkGetExecutionTime","accountDetails"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.getByKey&&Object.hasOwnProperty.call(e,"getByKey")&&i.proto.GetByKeyQuery.encode(e.getByKey,t.uint32(10).fork()).ldelim(),null!=e.getBySolidityID&&Object.hasOwnProperty.call(e,"getBySolidityID")&&i.proto.GetBySolidityIDQuery.encode(e.getBySolidityID,t.uint32(18).fork()).ldelim(),null!=e.contractCallLocal&&Object.hasOwnProperty.call(e,"contractCallLocal")&&i.proto.ContractCallLocalQuery.encode(e.contractCallLocal,t.uint32(26).fork()).ldelim(),null!=e.contractGetInfo&&Object.hasOwnProperty.call(e,"contractGetInfo")&&i.proto.ContractGetInfoQuery.encode(e.contractGetInfo,t.uint32(34).fork()).ldelim(),null!=e.contractGetBytecode&&Object.hasOwnProperty.call(e,"contractGetBytecode")&&i.proto.ContractGetBytecodeQuery.encode(e.contractGetBytecode,t.uint32(42).fork()).ldelim(),null!=e.ContractGetRecords&&Object.hasOwnProperty.call(e,"ContractGetRecords")&&i.proto.ContractGetRecordsQuery.encode(e.ContractGetRecords,t.uint32(50).fork()).ldelim(),null!=e.cryptogetAccountBalance&&Object.hasOwnProperty.call(e,"cryptogetAccountBalance")&&i.proto.CryptoGetAccountBalanceQuery.encode(e.cryptogetAccountBalance,t.uint32(58).fork()).ldelim(),null!=e.cryptoGetAccountRecords&&Object.hasOwnProperty.call(e,"cryptoGetAccountRecords")&&i.proto.CryptoGetAccountRecordsQuery.encode(e.cryptoGetAccountRecords,t.uint32(66).fork()).ldelim(),null!=e.cryptoGetInfo&&Object.hasOwnProperty.call(e,"cryptoGetInfo")&&i.proto.CryptoGetInfoQuery.encode(e.cryptoGetInfo,t.uint32(74).fork()).ldelim(),null!=e.cryptoGetLiveHash&&Object.hasOwnProperty.call(e,"cryptoGetLiveHash")&&i.proto.CryptoGetLiveHashQuery.encode(e.cryptoGetLiveHash,t.uint32(82).fork()).ldelim(),null!=e.cryptoGetProxyStakers&&Object.hasOwnProperty.call(e,"cryptoGetProxyStakers")&&i.proto.CryptoGetStakersQuery.encode(e.cryptoGetProxyStakers,t.uint32(90).fork()).ldelim(),null!=e.fileGetContents&&Object.hasOwnProperty.call(e,"fileGetContents")&&i.proto.FileGetContentsQuery.encode(e.fileGetContents,t.uint32(98).fork()).ldelim(),null!=e.fileGetInfo&&Object.hasOwnProperty.call(e,"fileGetInfo")&&i.proto.FileGetInfoQuery.encode(e.fileGetInfo,t.uint32(106).fork()).ldelim(),null!=e.transactionGetReceipt&&Object.hasOwnProperty.call(e,"transactionGetReceipt")&&i.proto.TransactionGetReceiptQuery.encode(e.transactionGetReceipt,t.uint32(114).fork()).ldelim(),null!=e.transactionGetRecord&&Object.hasOwnProperty.call(e,"transactionGetRecord")&&i.proto.TransactionGetRecordQuery.encode(e.transactionGetRecord,t.uint32(122).fork()).ldelim(),null!=e.transactionGetFastRecord&&Object.hasOwnProperty.call(e,"transactionGetFastRecord")&&i.proto.TransactionGetFastRecordQuery.encode(e.transactionGetFastRecord,t.uint32(130).fork()).ldelim(),null!=e.consensusGetTopicInfo&&Object.hasOwnProperty.call(e,"consensusGetTopicInfo")&&i.proto.ConsensusGetTopicInfoQuery.encode(e.consensusGetTopicInfo,t.uint32(402).fork()).ldelim(),null!=e.networkGetVersionInfo&&Object.hasOwnProperty.call(e,"networkGetVersionInfo")&&i.proto.NetworkGetVersionInfoQuery.encode(e.networkGetVersionInfo,t.uint32(410).fork()).ldelim(),null!=e.tokenGetInfo&&Object.hasOwnProperty.call(e,"tokenGetInfo")&&i.proto.TokenGetInfoQuery.encode(e.tokenGetInfo,t.uint32(418).fork()).ldelim(),null!=e.scheduleGetInfo&&Object.hasOwnProperty.call(e,"scheduleGetInfo")&&i.proto.ScheduleGetInfoQuery.encode(e.scheduleGetInfo,t.uint32(426).fork()).ldelim(),null!=e.tokenGetAccountNftInfos&&Object.hasOwnProperty.call(e,"tokenGetAccountNftInfos")&&i.proto.TokenGetAccountNftInfosQuery.encode(e.tokenGetAccountNftInfos,t.uint32(434).fork()).ldelim(),null!=e.tokenGetNftInfo&&Object.hasOwnProperty.call(e,"tokenGetNftInfo")&&i.proto.TokenGetNftInfoQuery.encode(e.tokenGetNftInfo,t.uint32(442).fork()).ldelim(),null!=e.tokenGetNftInfos&&Object.hasOwnProperty.call(e,"tokenGetNftInfos")&&i.proto.TokenGetNftInfosQuery.encode(e.tokenGetNftInfos,t.uint32(450).fork()).ldelim(),null!=e.networkGetExecutionTime&&Object.hasOwnProperty.call(e,"networkGetExecutionTime")&&i.proto.NetworkGetExecutionTimeQuery.encode(e.networkGetExecutionTime,t.uint32(458).fork()).ldelim(),null!=e.accountDetails&&Object.hasOwnProperty.call(e,"accountDetails")&&i.proto.GetAccountDetailsQuery.encode(e.accountDetails,t.uint32(466).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Query;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.getByKey=i.proto.GetByKeyQuery.decode(e,e.uint32());break;case 2:o.getBySolidityID=i.proto.GetBySolidityIDQuery.decode(e,e.uint32());break;case 3:o.contractCallLocal=i.proto.ContractCallLocalQuery.decode(e,e.uint32());break;case 4:o.contractGetInfo=i.proto.ContractGetInfoQuery.decode(e,e.uint32());break;case 5:o.contractGetBytecode=i.proto.ContractGetBytecodeQuery.decode(e,e.uint32());break;case 6:o.ContractGetRecords=i.proto.ContractGetRecordsQuery.decode(e,e.uint32());break;case 7:o.cryptogetAccountBalance=i.proto.CryptoGetAccountBalanceQuery.decode(e,e.uint32());break;case 8:o.cryptoGetAccountRecords=i.proto.CryptoGetAccountRecordsQuery.decode(e,e.uint32());break;case 9:o.cryptoGetInfo=i.proto.CryptoGetInfoQuery.decode(e,e.uint32());break;case 10:o.cryptoGetLiveHash=i.proto.CryptoGetLiveHashQuery.decode(e,e.uint32());break;case 11:o.cryptoGetProxyStakers=i.proto.CryptoGetStakersQuery.decode(e,e.uint32());break;case 12:o.fileGetContents=i.proto.FileGetContentsQuery.decode(e,e.uint32());break;case 13:o.fileGetInfo=i.proto.FileGetInfoQuery.decode(e,e.uint32());break;case 14:o.transactionGetReceipt=i.proto.TransactionGetReceiptQuery.decode(e,e.uint32());break;case 15:o.transactionGetRecord=i.proto.TransactionGetRecordQuery.decode(e,e.uint32());break;case 16:o.transactionGetFastRecord=i.proto.TransactionGetFastRecordQuery.decode(e,e.uint32());break;case 50:o.consensusGetTopicInfo=i.proto.ConsensusGetTopicInfoQuery.decode(e,e.uint32());break;case 51:o.networkGetVersionInfo=i.proto.NetworkGetVersionInfoQuery.decode(e,e.uint32());break;case 52:o.tokenGetInfo=i.proto.TokenGetInfoQuery.decode(e,e.uint32());break;case 53:o.scheduleGetInfo=i.proto.ScheduleGetInfoQuery.decode(e,e.uint32());break;case 54:o.tokenGetAccountNftInfos=i.proto.TokenGetAccountNftInfosQuery.decode(e,e.uint32());break;case 55:o.tokenGetNftInfo=i.proto.TokenGetNftInfoQuery.decode(e,e.uint32());break;case 56:o.tokenGetNftInfos=i.proto.TokenGetNftInfosQuery.decode(e,e.uint32());break;case 57:o.networkGetExecutionTime=i.proto.NetworkGetExecutionTimeQuery.decode(e,e.uint32());break;case 58:o.accountDetails=i.proto.GetAccountDetailsQuery.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Query"},e}(),t.GetByKeyQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.key=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&i.proto.Key.encode(e.key,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetByKeyQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.key=i.proto.Key.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetByKeyQuery"},e}(),t.EntityID=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.accountID=null,e.prototype.liveHash=null,e.prototype.fileID=null,e.prototype.contractID=null,Object.defineProperty(e.prototype,"entity",{get:o.oneOfGetter(t=["accountID","liveHash","fileID","contractID"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(10).fork()).ldelim(),null!=e.liveHash&&Object.hasOwnProperty.call(e,"liveHash")&&i.proto.LiveHash.encode(e.liveHash,t.uint32(18).fork()).ldelim(),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(26).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(34).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.EntityID;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.liveHash=i.proto.LiveHash.decode(e,e.uint32());break;case 3:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 4:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.EntityID"},e}(),t.GetByKeyResponse=function(){function e(e){if(this.entities=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.entities=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.entities&&e.entities.length)for(var r=0;r<e.entities.length;++r)i.proto.EntityID.encode(e.entities[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetByKeyResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.entities&&o.entities.length||(o.entities=[]),o.entities.push(i.proto.EntityID.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetByKeyResponse"},e}(),t.GetBySolidityIDQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.solidityID="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.solidityID&&Object.hasOwnProperty.call(e,"solidityID")&&t.uint32(18).string(e.solidityID),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetBySolidityIDQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.solidityID=e.string();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetBySolidityIDQuery"},e}(),t.GetBySolidityIDResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.prototype.fileID=null,e.prototype.contractID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(26).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(34).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetBySolidityIDResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 4:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetBySolidityIDResponse"},e}(),t.ContractCallLocalQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.contractID=null,e.prototype.gas=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.functionParameters=o.newBuffer([]),e.prototype.maxResultSize=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.senderId=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),null!=e.gas&&Object.hasOwnProperty.call(e,"gas")&&t.uint32(24).int64(e.gas),null!=e.functionParameters&&Object.hasOwnProperty.call(e,"functionParameters")&&t.uint32(34).bytes(e.functionParameters),null!=e.maxResultSize&&Object.hasOwnProperty.call(e,"maxResultSize")&&t.uint32(40).int64(e.maxResultSize),null!=e.senderId&&Object.hasOwnProperty.call(e,"senderId")&&i.proto.AccountID.encode(e.senderId,t.uint32(50).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractCallLocalQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 3:o.gas=e.int64();break;case 4:o.functionParameters=e.bytes();break;case 5:o.maxResultSize=e.int64();break;case 6:o.senderId=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractCallLocalQuery"},e}(),t.ContractCallLocalResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.functionResult=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.functionResult&&Object.hasOwnProperty.call(e,"functionResult")&&i.proto.ContractFunctionResult.encode(e.functionResult,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractCallLocalResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.functionResult=i.proto.ContractFunctionResult.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractCallLocalResponse"},e}(),t.ContractNonceInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractId=null,e.prototype.nonce=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contractId&&Object.hasOwnProperty.call(e,"contractId")&&i.proto.ContractID.encode(e.contractId,t.uint32(10).fork()).ldelim(),null!=e.nonce&&Object.hasOwnProperty.call(e,"nonce")&&t.uint32(16).int64(e.nonce),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractNonceInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractId=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.nonce=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractNonceInfo"},e}(),t.ContractLoginfo=function(){function e(e){if(this.topic=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractID=null,e.prototype.bloom=o.newBuffer([]),e.prototype.topic=o.emptyArray,e.prototype.data=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.bloom&&Object.hasOwnProperty.call(e,"bloom")&&t.uint32(18).bytes(e.bloom),null!=e.topic&&e.topic.length)for(var r=0;r<e.topic.length;++r)t.uint32(26).bytes(e.topic[r]);return null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(34).bytes(e.data),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractLoginfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.bloom=e.bytes();break;case 3:o.topic&&o.topic.length||(o.topic=[]),o.topic.push(e.bytes());break;case 4:o.data=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractLoginfo"},e}(),t.ContractFunctionResult=function(){function e(e){if(this.logInfo=[],this.createdContractIDs=[],this.contractNonces=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractID=null,e.prototype.contractCallResult=o.newBuffer([]),e.prototype.errorMessage="",e.prototype.bloom=o.newBuffer([]),e.prototype.gasUsed=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.logInfo=o.emptyArray,e.prototype.createdContractIDs=o.emptyArray,e.prototype.evmAddress=null,e.prototype.gas=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.functionParameters=o.newBuffer([]),e.prototype.senderId=null,e.prototype.contractNonces=o.emptyArray,e.prototype.signerNonce=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.contractCallResult&&Object.hasOwnProperty.call(e,"contractCallResult")&&t.uint32(18).bytes(e.contractCallResult),null!=e.errorMessage&&Object.hasOwnProperty.call(e,"errorMessage")&&t.uint32(26).string(e.errorMessage),null!=e.bloom&&Object.hasOwnProperty.call(e,"bloom")&&t.uint32(34).bytes(e.bloom),null!=e.gasUsed&&Object.hasOwnProperty.call(e,"gasUsed")&&t.uint32(40).uint64(e.gasUsed),null!=e.logInfo&&e.logInfo.length)for(var r=0;r<e.logInfo.length;++r)i.proto.ContractLoginfo.encode(e.logInfo[r],t.uint32(50).fork()).ldelim();if(null!=e.createdContractIDs&&e.createdContractIDs.length)for(r=0;r<e.createdContractIDs.length;++r)i.proto.ContractID.encode(e.createdContractIDs[r],t.uint32(58).fork()).ldelim();if(null!=e.evmAddress&&Object.hasOwnProperty.call(e,"evmAddress")&&i.google.protobuf.BytesValue.encode(e.evmAddress,t.uint32(74).fork()).ldelim(),null!=e.gas&&Object.hasOwnProperty.call(e,"gas")&&t.uint32(80).int64(e.gas),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(88).int64(e.amount),null!=e.functionParameters&&Object.hasOwnProperty.call(e,"functionParameters")&&t.uint32(98).bytes(e.functionParameters),null!=e.senderId&&Object.hasOwnProperty.call(e,"senderId")&&i.proto.AccountID.encode(e.senderId,t.uint32(106).fork()).ldelim(),null!=e.contractNonces&&e.contractNonces.length)for(r=0;r<e.contractNonces.length;++r)i.proto.ContractNonceInfo.encode(e.contractNonces[r],t.uint32(114).fork()).ldelim();return null!=e.signerNonce&&Object.hasOwnProperty.call(e,"signerNonce")&&i.google.protobuf.Int64Value.encode(e.signerNonce,t.uint32(122).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractFunctionResult;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.contractCallResult=e.bytes();break;case 3:o.errorMessage=e.string();break;case 4:o.bloom=e.bytes();break;case 5:o.gasUsed=e.uint64();break;case 6:o.logInfo&&o.logInfo.length||(o.logInfo=[]),o.logInfo.push(i.proto.ContractLoginfo.decode(e,e.uint32()));break;case 7:o.createdContractIDs&&o.createdContractIDs.length||(o.createdContractIDs=[]),o.createdContractIDs.push(i.proto.ContractID.decode(e,e.uint32()));break;case 9:o.evmAddress=i.google.protobuf.BytesValue.decode(e,e.uint32());break;case 10:o.gas=e.int64();break;case 11:o.amount=e.int64();break;case 12:o.functionParameters=e.bytes();break;case 13:o.senderId=i.proto.AccountID.decode(e,e.uint32());break;case 14:o.contractNonces&&o.contractNonces.length||(o.contractNonces=[]),o.contractNonces.push(i.proto.ContractNonceInfo.decode(e,e.uint32()));break;case 15:o.signerNonce=i.google.protobuf.Int64Value.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractFunctionResult"},e}(),t.ContractGetInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.contractID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetInfoQuery"},e}(),t.ContractGetInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.contractInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.contractInfo&&Object.hasOwnProperty.call(e,"contractInfo")&&i.proto.ContractGetInfoResponse.ContractInfo.encode(e.contractInfo,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.contractInfo=i.proto.ContractGetInfoResponse.ContractInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetInfoResponse"},e.ContractInfo=function(){function e(e){if(this.tokenRelationships=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractID=null,e.prototype.accountID=null,e.prototype.contractAccountID="",e.prototype.adminKey=null,e.prototype.expirationTime=null,e.prototype.autoRenewPeriod=null,e.prototype.storage=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.memo="",e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.deleted=!1,e.prototype.tokenRelationships=o.emptyArray,e.prototype.ledgerId=o.newBuffer([]),e.prototype.autoRenewAccountId=null,e.prototype.maxAutomaticTokenAssociations=0,e.prototype.stakingInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.contractAccountID&&Object.hasOwnProperty.call(e,"contractAccountID")&&t.uint32(26).string(e.contractAccountID),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(34).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(42).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(50).fork()).ldelim(),null!=e.storage&&Object.hasOwnProperty.call(e,"storage")&&t.uint32(56).int64(e.storage),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(66).string(e.memo),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(72).uint64(e.balance),null!=e.deleted&&Object.hasOwnProperty.call(e,"deleted")&&t.uint32(80).bool(e.deleted),null!=e.tokenRelationships&&e.tokenRelationships.length)for(var r=0;r<e.tokenRelationships.length;++r)i.proto.TokenRelationship.encode(e.tokenRelationships[r],t.uint32(90).fork()).ldelim();return null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(98).bytes(e.ledgerId),null!=e.autoRenewAccountId&&Object.hasOwnProperty.call(e,"autoRenewAccountId")&&i.proto.AccountID.encode(e.autoRenewAccountId,t.uint32(106).fork()).ldelim(),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&t.uint32(112).int32(e.maxAutomaticTokenAssociations),null!=e.stakingInfo&&Object.hasOwnProperty.call(e,"stakingInfo")&&i.proto.StakingInfo.encode(e.stakingInfo,t.uint32(122).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetInfoResponse.ContractInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.contractAccountID=e.string();break;case 4:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 5:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 6:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 7:o.storage=e.int64();break;case 8:o.memo=e.string();break;case 9:o.balance=e.uint64();break;case 10:o.deleted=e.bool();break;case 11:o.tokenRelationships&&o.tokenRelationships.length||(o.tokenRelationships=[]),o.tokenRelationships.push(i.proto.TokenRelationship.decode(e,e.uint32()));break;case 12:o.ledgerId=e.bytes();break;case 13:o.autoRenewAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 14:o.maxAutomaticTokenAssociations=e.int32();break;case 15:o.stakingInfo=i.proto.StakingInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetInfoResponse.ContractInfo"},e}(),e}(),t.ContractGetBytecodeQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.contractID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetBytecodeQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetBytecodeQuery"},e}(),t.ContractGetBytecodeResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.bytecode=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.bytecode&&Object.hasOwnProperty.call(e,"bytecode")&&t.uint32(50).bytes(e.bytecode),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetBytecodeResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 6:o.bytecode=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetBytecodeResponse"},e}(),t.ContractGetRecordsQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.contractID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetRecordsQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetRecordsQuery"},e}(),t.ContractGetRecordsResponse=function(){function e(e){if(this.records=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.contractID=null,e.prototype.records=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(18).fork()).ldelim(),null!=e.records&&e.records.length)for(var r=0;r<e.records.length;++r)i.proto.TransactionRecord.encode(e.records[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractGetRecordsResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 3:o.records&&o.records.length||(o.records=[]),o.records.push(i.proto.TransactionRecord.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractGetRecordsResponse"},e}(),t.TransactionRecord=function(){function e(e){if(this.tokenTransferLists=[],this.assessedCustomFees=[],this.automaticTokenAssociations=[],this.paidStakingRewards=[],this.newPendingAirdrops=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.receipt=null,e.prototype.transactionHash=o.newBuffer([]),e.prototype.consensusTimestamp=null,e.prototype.transactionID=null,e.prototype.memo="",e.prototype.transactionFee=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.contractCallResult=null,e.prototype.contractCreateResult=null,e.prototype.transferList=null,e.prototype.tokenTransferLists=o.emptyArray,e.prototype.scheduleRef=null,e.prototype.assessedCustomFees=o.emptyArray,e.prototype.automaticTokenAssociations=o.emptyArray,e.prototype.parentConsensusTimestamp=null,e.prototype.alias=o.newBuffer([]),e.prototype.ethereumHash=o.newBuffer([]),e.prototype.paidStakingRewards=o.emptyArray,e.prototype.prngBytes=null,e.prototype.prngNumber=null,e.prototype.evmAddress=o.newBuffer([]),e.prototype.newPendingAirdrops=o.emptyArray,Object.defineProperty(e.prototype,"body",{get:o.oneOfGetter(t=["contractCallResult","contractCreateResult"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"entropy",{get:o.oneOfGetter(t=["prngBytes","prngNumber"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.receipt&&Object.hasOwnProperty.call(e,"receipt")&&i.proto.TransactionReceipt.encode(e.receipt,t.uint32(10).fork()).ldelim(),null!=e.transactionHash&&Object.hasOwnProperty.call(e,"transactionHash")&&t.uint32(18).bytes(e.transactionHash),null!=e.consensusTimestamp&&Object.hasOwnProperty.call(e,"consensusTimestamp")&&i.proto.Timestamp.encode(e.consensusTimestamp,t.uint32(26).fork()).ldelim(),null!=e.transactionID&&Object.hasOwnProperty.call(e,"transactionID")&&i.proto.TransactionID.encode(e.transactionID,t.uint32(34).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(42).string(e.memo),null!=e.transactionFee&&Object.hasOwnProperty.call(e,"transactionFee")&&t.uint32(48).uint64(e.transactionFee),null!=e.contractCallResult&&Object.hasOwnProperty.call(e,"contractCallResult")&&i.proto.ContractFunctionResult.encode(e.contractCallResult,t.uint32(58).fork()).ldelim(),null!=e.contractCreateResult&&Object.hasOwnProperty.call(e,"contractCreateResult")&&i.proto.ContractFunctionResult.encode(e.contractCreateResult,t.uint32(66).fork()).ldelim(),null!=e.transferList&&Object.hasOwnProperty.call(e,"transferList")&&i.proto.TransferList.encode(e.transferList,t.uint32(82).fork()).ldelim(),null!=e.tokenTransferLists&&e.tokenTransferLists.length)for(var r=0;r<e.tokenTransferLists.length;++r)i.proto.TokenTransferList.encode(e.tokenTransferLists[r],t.uint32(90).fork()).ldelim();if(null!=e.scheduleRef&&Object.hasOwnProperty.call(e,"scheduleRef")&&i.proto.ScheduleID.encode(e.scheduleRef,t.uint32(98).fork()).ldelim(),null!=e.assessedCustomFees&&e.assessedCustomFees.length)for(r=0;r<e.assessedCustomFees.length;++r)i.proto.AssessedCustomFee.encode(e.assessedCustomFees[r],t.uint32(106).fork()).ldelim();if(null!=e.automaticTokenAssociations&&e.automaticTokenAssociations.length)for(r=0;r<e.automaticTokenAssociations.length;++r)i.proto.TokenAssociation.encode(e.automaticTokenAssociations[r],t.uint32(114).fork()).ldelim();if(null!=e.parentConsensusTimestamp&&Object.hasOwnProperty.call(e,"parentConsensusTimestamp")&&i.proto.Timestamp.encode(e.parentConsensusTimestamp,t.uint32(122).fork()).ldelim(),null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&t.uint32(130).bytes(e.alias),null!=e.ethereumHash&&Object.hasOwnProperty.call(e,"ethereumHash")&&t.uint32(138).bytes(e.ethereumHash),null!=e.paidStakingRewards&&e.paidStakingRewards.length)for(r=0;r<e.paidStakingRewards.length;++r)i.proto.AccountAmount.encode(e.paidStakingRewards[r],t.uint32(146).fork()).ldelim();if(null!=e.prngBytes&&Object.hasOwnProperty.call(e,"prngBytes")&&t.uint32(154).bytes(e.prngBytes),null!=e.prngNumber&&Object.hasOwnProperty.call(e,"prngNumber")&&t.uint32(160).int32(e.prngNumber),null!=e.evmAddress&&Object.hasOwnProperty.call(e,"evmAddress")&&t.uint32(170).bytes(e.evmAddress),null!=e.newPendingAirdrops&&e.newPendingAirdrops.length)for(r=0;r<e.newPendingAirdrops.length;++r)i.proto.PendingAirdropRecord.encode(e.newPendingAirdrops[r],t.uint32(178).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionRecord;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.receipt=i.proto.TransactionReceipt.decode(e,e.uint32());break;case 2:o.transactionHash=e.bytes();break;case 3:o.consensusTimestamp=i.proto.Timestamp.decode(e,e.uint32());break;case 4:o.transactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 5:o.memo=e.string();break;case 6:o.transactionFee=e.uint64();break;case 7:o.contractCallResult=i.proto.ContractFunctionResult.decode(e,e.uint32());break;case 8:o.contractCreateResult=i.proto.ContractFunctionResult.decode(e,e.uint32());break;case 10:o.transferList=i.proto.TransferList.decode(e,e.uint32());break;case 11:o.tokenTransferLists&&o.tokenTransferLists.length||(o.tokenTransferLists=[]),o.tokenTransferLists.push(i.proto.TokenTransferList.decode(e,e.uint32()));break;case 12:o.scheduleRef=i.proto.ScheduleID.decode(e,e.uint32());break;case 13:o.assessedCustomFees&&o.assessedCustomFees.length||(o.assessedCustomFees=[]),o.assessedCustomFees.push(i.proto.AssessedCustomFee.decode(e,e.uint32()));break;case 14:o.automaticTokenAssociations&&o.automaticTokenAssociations.length||(o.automaticTokenAssociations=[]),o.automaticTokenAssociations.push(i.proto.TokenAssociation.decode(e,e.uint32()));break;case 15:o.parentConsensusTimestamp=i.proto.Timestamp.decode(e,e.uint32());break;case 16:o.alias=e.bytes();break;case 17:o.ethereumHash=e.bytes();break;case 18:o.paidStakingRewards&&o.paidStakingRewards.length||(o.paidStakingRewards=[]),o.paidStakingRewards.push(i.proto.AccountAmount.decode(e,e.uint32()));break;case 19:o.prngBytes=e.bytes();break;case 20:o.prngNumber=e.int32();break;case 21:o.evmAddress=e.bytes();break;case 22:o.newPendingAirdrops&&o.newPendingAirdrops.length||(o.newPendingAirdrops=[]),o.newPendingAirdrops.push(i.proto.PendingAirdropRecord.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionRecord"},e}(),t.PendingAirdropRecord=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.pendingAirdropId=null,e.prototype.pendingAirdropValue=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.pendingAirdropId&&Object.hasOwnProperty.call(e,"pendingAirdropId")&&i.proto.PendingAirdropId.encode(e.pendingAirdropId,t.uint32(10).fork()).ldelim(),null!=e.pendingAirdropValue&&Object.hasOwnProperty.call(e,"pendingAirdropValue")&&i.proto.PendingAirdropValue.encode(e.pendingAirdropValue,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.PendingAirdropRecord;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.pendingAirdropId=i.proto.PendingAirdropId.decode(e,e.uint32());break;case 2:o.pendingAirdropValue=i.proto.PendingAirdropValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.PendingAirdropRecord"},e}(),t.TransactionReceipt=function(){function e(e){if(this.serialNumbers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.status=0,e.prototype.accountID=null,e.prototype.fileID=null,e.prototype.contractID=null,e.prototype.exchangeRate=null,e.prototype.topicID=null,e.prototype.topicSequenceNumber=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.topicRunningHash=o.newBuffer([]),e.prototype.topicRunningHashVersion=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.tokenID=null,e.prototype.newTotalSupply=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.scheduleID=null,e.prototype.scheduledTransactionID=null,e.prototype.serialNumbers=o.emptyArray,e.prototype.nodeId=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(8).int32(e.status),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(26).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(34).fork()).ldelim(),null!=e.exchangeRate&&Object.hasOwnProperty.call(e,"exchangeRate")&&i.proto.ExchangeRateSet.encode(e.exchangeRate,t.uint32(42).fork()).ldelim(),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&i.proto.TopicID.encode(e.topicID,t.uint32(50).fork()).ldelim(),null!=e.topicSequenceNumber&&Object.hasOwnProperty.call(e,"topicSequenceNumber")&&t.uint32(56).uint64(e.topicSequenceNumber),null!=e.topicRunningHash&&Object.hasOwnProperty.call(e,"topicRunningHash")&&t.uint32(66).bytes(e.topicRunningHash),null!=e.topicRunningHashVersion&&Object.hasOwnProperty.call(e,"topicRunningHashVersion")&&t.uint32(72).uint64(e.topicRunningHashVersion),null!=e.tokenID&&Object.hasOwnProperty.call(e,"tokenID")&&i.proto.TokenID.encode(e.tokenID,t.uint32(82).fork()).ldelim(),null!=e.newTotalSupply&&Object.hasOwnProperty.call(e,"newTotalSupply")&&t.uint32(88).uint64(e.newTotalSupply),null!=e.scheduleID&&Object.hasOwnProperty.call(e,"scheduleID")&&i.proto.ScheduleID.encode(e.scheduleID,t.uint32(98).fork()).ldelim(),null!=e.scheduledTransactionID&&Object.hasOwnProperty.call(e,"scheduledTransactionID")&&i.proto.TransactionID.encode(e.scheduledTransactionID,t.uint32(106).fork()).ldelim(),null!=e.serialNumbers&&e.serialNumbers.length){t.uint32(114).fork();for(var r=0;r<e.serialNumbers.length;++r)t.int64(e.serialNumbers[r]);t.ldelim()}return null!=e.nodeId&&Object.hasOwnProperty.call(e,"nodeId")&&t.uint32(120).uint64(e.nodeId),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionReceipt;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.status=e.int32();break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 4:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;case 5:o.exchangeRate=i.proto.ExchangeRateSet.decode(e,e.uint32());break;case 6:o.topicID=i.proto.TopicID.decode(e,e.uint32());break;case 7:o.topicSequenceNumber=e.uint64();break;case 8:o.topicRunningHash=e.bytes();break;case 9:o.topicRunningHashVersion=e.uint64();break;case 10:o.tokenID=i.proto.TokenID.decode(e,e.uint32());break;case 11:o.newTotalSupply=e.uint64();break;case 12:o.scheduleID=i.proto.ScheduleID.decode(e,e.uint32());break;case 13:o.scheduledTransactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 14:if(o.serialNumbers&&o.serialNumbers.length||(o.serialNumbers=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.serialNumbers.push(e.int64());else o.serialNumbers.push(e.int64());break;case 15:o.nodeId=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionReceipt"},e}(),t.ExchangeRate=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.hbarEquiv=0,e.prototype.centEquiv=0,e.prototype.expirationTime=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.hbarEquiv&&Object.hasOwnProperty.call(e,"hbarEquiv")&&t.uint32(8).int32(e.hbarEquiv),null!=e.centEquiv&&Object.hasOwnProperty.call(e,"centEquiv")&&t.uint32(16).int32(e.centEquiv),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.TimestampSeconds.encode(e.expirationTime,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ExchangeRate;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.hbarEquiv=e.int32();break;case 2:o.centEquiv=e.int32();break;case 3:o.expirationTime=i.proto.TimestampSeconds.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ExchangeRate"},e}(),t.ExchangeRateSet=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.currentRate=null,e.prototype.nextRate=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.currentRate&&Object.hasOwnProperty.call(e,"currentRate")&&i.proto.ExchangeRate.encode(e.currentRate,t.uint32(10).fork()).ldelim(),null!=e.nextRate&&Object.hasOwnProperty.call(e,"nextRate")&&i.proto.ExchangeRate.encode(e.nextRate,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ExchangeRateSet;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.currentRate=i.proto.ExchangeRate.decode(e,e.uint32());break;case 2:o.nextRate=i.proto.ExchangeRate.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ExchangeRateSet"},e}(),t.CryptoGetAccountBalanceQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.header=null,e.prototype.accountID=null,e.prototype.contractID=null,Object.defineProperty(e.prototype,"balanceSource",{get:o.oneOfGetter(t=["accountID","contractID"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.contractID&&Object.hasOwnProperty.call(e,"contractID")&&i.proto.ContractID.encode(e.contractID,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetAccountBalanceQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.contractID=i.proto.ContractID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetAccountBalanceQuery"},e}(),t.CryptoGetAccountBalanceResponse=function(){function e(e){if(this.tokenBalances=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.tokenBalances=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(24).uint64(e.balance),null!=e.tokenBalances&&e.tokenBalances.length)for(var r=0;r<e.tokenBalances.length;++r)i.proto.TokenBalance.encode(e.tokenBalances[r],t.uint32(34).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetAccountBalanceResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.balance=e.uint64();break;case 4:o.tokenBalances&&o.tokenBalances.length||(o.tokenBalances=[]),o.tokenBalances.push(i.proto.TokenBalance.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetAccountBalanceResponse"},e}(),t.CryptoGetAccountRecordsQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetAccountRecordsQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetAccountRecordsQuery"},e}(),t.CryptoGetAccountRecordsResponse=function(){function e(e){if(this.records=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.prototype.records=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.records&&e.records.length)for(var r=0;r<e.records.length;++r)i.proto.TransactionRecord.encode(e.records[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetAccountRecordsResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.records&&o.records.length||(o.records=[]),o.records.push(i.proto.TransactionRecord.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetAccountRecordsResponse"},e}(),t.CryptoGetInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetInfoQuery"},e}(),t.CryptoGetInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountInfo&&Object.hasOwnProperty.call(e,"accountInfo")&&i.proto.CryptoGetInfoResponse.AccountInfo.encode(e.accountInfo,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.accountInfo=i.proto.CryptoGetInfoResponse.AccountInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetInfoResponse"},e.AccountInfo=function(){function e(e){if(this.liveHashes=[],this.tokenRelationships=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountID=null,e.prototype.contractAccountID="",e.prototype.deleted=!1,e.prototype.proxyAccountID=null,e.prototype.proxyReceived=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.key=null,e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.generateSendRecordThreshold=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.generateReceiveRecordThreshold=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.receiverSigRequired=!1,e.prototype.expirationTime=null,e.prototype.autoRenewPeriod=null,e.prototype.liveHashes=o.emptyArray,e.prototype.tokenRelationships=o.emptyArray,e.prototype.memo="",e.prototype.ownedNfts=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.maxAutomaticTokenAssociations=0,e.prototype.alias=o.newBuffer([]),e.prototype.ledgerId=o.newBuffer([]),e.prototype.ethereumNonce=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.stakingInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(10).fork()).ldelim(),null!=e.contractAccountID&&Object.hasOwnProperty.call(e,"contractAccountID")&&t.uint32(18).string(e.contractAccountID),null!=e.deleted&&Object.hasOwnProperty.call(e,"deleted")&&t.uint32(24).bool(e.deleted),null!=e.proxyAccountID&&Object.hasOwnProperty.call(e,"proxyAccountID")&&i.proto.AccountID.encode(e.proxyAccountID,t.uint32(34).fork()).ldelim(),null!=e.proxyReceived&&Object.hasOwnProperty.call(e,"proxyReceived")&&t.uint32(48).int64(e.proxyReceived),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&i.proto.Key.encode(e.key,t.uint32(58).fork()).ldelim(),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(64).uint64(e.balance),null!=e.generateSendRecordThreshold&&Object.hasOwnProperty.call(e,"generateSendRecordThreshold")&&t.uint32(72).uint64(e.generateSendRecordThreshold),null!=e.generateReceiveRecordThreshold&&Object.hasOwnProperty.call(e,"generateReceiveRecordThreshold")&&t.uint32(80).uint64(e.generateReceiveRecordThreshold),null!=e.receiverSigRequired&&Object.hasOwnProperty.call(e,"receiverSigRequired")&&t.uint32(88).bool(e.receiverSigRequired),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(98).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(106).fork()).ldelim(),null!=e.liveHashes&&e.liveHashes.length)for(var r=0;r<e.liveHashes.length;++r)i.proto.LiveHash.encode(e.liveHashes[r],t.uint32(114).fork()).ldelim();if(null!=e.tokenRelationships&&e.tokenRelationships.length)for(r=0;r<e.tokenRelationships.length;++r)i.proto.TokenRelationship.encode(e.tokenRelationships[r],t.uint32(122).fork()).ldelim();return null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(130).string(e.memo),null!=e.ownedNfts&&Object.hasOwnProperty.call(e,"ownedNfts")&&t.uint32(136).int64(e.ownedNfts),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&t.uint32(144).int32(e.maxAutomaticTokenAssociations),null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&t.uint32(154).bytes(e.alias),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(162).bytes(e.ledgerId),null!=e.ethereumNonce&&Object.hasOwnProperty.call(e,"ethereumNonce")&&t.uint32(168).int64(e.ethereumNonce),null!=e.stakingInfo&&Object.hasOwnProperty.call(e,"stakingInfo")&&i.proto.StakingInfo.encode(e.stakingInfo,t.uint32(178).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetInfoResponse.AccountInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.contractAccountID=e.string();break;case 3:o.deleted=e.bool();break;case 4:o.proxyAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 6:o.proxyReceived=e.int64();break;case 7:o.key=i.proto.Key.decode(e,e.uint32());break;case 8:o.balance=e.uint64();break;case 9:o.generateSendRecordThreshold=e.uint64();break;case 10:o.generateReceiveRecordThreshold=e.uint64();break;case 11:o.receiverSigRequired=e.bool();break;case 12:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 13:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 14:o.liveHashes&&o.liveHashes.length||(o.liveHashes=[]),o.liveHashes.push(i.proto.LiveHash.decode(e,e.uint32()));break;case 15:o.tokenRelationships&&o.tokenRelationships.length||(o.tokenRelationships=[]),o.tokenRelationships.push(i.proto.TokenRelationship.decode(e,e.uint32()));break;case 16:o.memo=e.string();break;case 17:o.ownedNfts=e.int64();break;case 18:o.maxAutomaticTokenAssociations=e.int32();break;case 19:o.alias=e.bytes();break;case 20:o.ledgerId=e.bytes();break;case 21:o.ethereumNonce=e.int64();break;case 22:o.stakingInfo=i.proto.StakingInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetInfoResponse.AccountInfo"},e}(),e}(),t.CryptoGetLiveHashQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.prototype.hash=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(26).bytes(e.hash),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetLiveHashQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.hash=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetLiveHashQuery"},e}(),t.CryptoGetLiveHashResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.liveHash=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.liveHash&&Object.hasOwnProperty.call(e,"liveHash")&&i.proto.LiveHash.encode(e.liveHash,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetLiveHashResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.liveHash=i.proto.LiveHash.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetLiveHashResponse"},e}(),t.CryptoGetStakersQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetStakersQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetStakersQuery"},e}(),t.ProxyStaker=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountID=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(10).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(16).int64(e.amount),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ProxyStaker;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.amount=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ProxyStaker"},e}(),t.AllProxyStakers=function(){function e(e){if(this.proxyStaker=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountID=null,e.prototype.proxyStaker=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(10).fork()).ldelim(),null!=e.proxyStaker&&e.proxyStaker.length)for(var r=0;r<e.proxyStaker.length;++r)i.proto.ProxyStaker.encode(e.proxyStaker[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.AllProxyStakers;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.proxyStaker&&o.proxyStaker.length||(o.proxyStaker=[]),o.proxyStaker.push(i.proto.ProxyStaker.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.AllProxyStakers"},e}(),t.CryptoGetStakersResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.stakers=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.stakers&&Object.hasOwnProperty.call(e,"stakers")&&i.proto.AllProxyStakers.encode(e.stakers,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.CryptoGetStakersResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 3:o.stakers=i.proto.AllProxyStakers.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.CryptoGetStakersResponse"},e}(),t.FileGetContentsQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.fileID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileGetContentsQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.fileID=i.proto.FileID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileGetContentsQuery"},e}(),t.FileGetContentsResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.fileContents=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.fileContents&&Object.hasOwnProperty.call(e,"fileContents")&&i.proto.FileGetContentsResponse.FileContents.encode(e.fileContents,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileGetContentsResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.fileContents=i.proto.FileGetContentsResponse.FileContents.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileGetContentsResponse"},e.FileContents=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileID=null,e.prototype.contents=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(10).fork()).ldelim(),null!=e.contents&&Object.hasOwnProperty.call(e,"contents")&&t.uint32(18).bytes(e.contents),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileGetContentsResponse.FileContents;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 2:o.contents=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileGetContentsResponse.FileContents"},e}(),e}(),t.FileGetInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.fileID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileGetInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.fileID=i.proto.FileID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileGetInfoQuery"},e}(),t.FileGetInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.fileInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.fileInfo&&Object.hasOwnProperty.call(e,"fileInfo")&&i.proto.FileGetInfoResponse.FileInfo.encode(e.fileInfo,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileGetInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.fileInfo=i.proto.FileGetInfoResponse.FileInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileGetInfoResponse"},e.FileInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileID=null,e.prototype.size=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.expirationTime=null,e.prototype.deleted=!1,e.prototype.keys=null,e.prototype.memo="",e.prototype.ledgerId=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileID&&Object.hasOwnProperty.call(e,"fileID")&&i.proto.FileID.encode(e.fileID,t.uint32(10).fork()).ldelim(),null!=e.size&&Object.hasOwnProperty.call(e,"size")&&t.uint32(16).int64(e.size),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(26).fork()).ldelim(),null!=e.deleted&&Object.hasOwnProperty.call(e,"deleted")&&t.uint32(32).bool(e.deleted),null!=e.keys&&Object.hasOwnProperty.call(e,"keys")&&i.proto.KeyList.encode(e.keys,t.uint32(42).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(50).string(e.memo),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(58).bytes(e.ledgerId),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.FileGetInfoResponse.FileInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileID=i.proto.FileID.decode(e,e.uint32());break;case 2:o.size=e.int64();break;case 3:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 4:o.deleted=e.bool();break;case 5:o.keys=i.proto.KeyList.decode(e,e.uint32());break;case 6:o.memo=e.string();break;case 7:o.ledgerId=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.FileGetInfoResponse.FileInfo"},e}(),e}(),t.TransactionGetReceiptQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.transactionID=null,e.prototype.includeDuplicates=!1,e.prototype.includeChildReceipts=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.transactionID&&Object.hasOwnProperty.call(e,"transactionID")&&i.proto.TransactionID.encode(e.transactionID,t.uint32(18).fork()).ldelim(),null!=e.includeDuplicates&&Object.hasOwnProperty.call(e,"includeDuplicates")&&t.uint32(24).bool(e.includeDuplicates),null!=e.includeChildReceipts&&Object.hasOwnProperty.call(e,"includeChildReceipts")&&t.uint32(32).bool(e.includeChildReceipts),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionGetReceiptQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.transactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 3:o.includeDuplicates=e.bool();break;case 4:o.includeChildReceipts=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionGetReceiptQuery"},e}(),t.TransactionGetReceiptResponse=function(){function e(e){if(this.duplicateTransactionReceipts=[],this.childTransactionReceipts=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.receipt=null,e.prototype.duplicateTransactionReceipts=o.emptyArray,e.prototype.childTransactionReceipts=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.receipt&&Object.hasOwnProperty.call(e,"receipt")&&i.proto.TransactionReceipt.encode(e.receipt,t.uint32(18).fork()).ldelim(),null!=e.duplicateTransactionReceipts&&e.duplicateTransactionReceipts.length)for(var r=0;r<e.duplicateTransactionReceipts.length;++r)i.proto.TransactionReceipt.encode(e.duplicateTransactionReceipts[r],t.uint32(34).fork()).ldelim();if(null!=e.childTransactionReceipts&&e.childTransactionReceipts.length)for(r=0;r<e.childTransactionReceipts.length;++r)i.proto.TransactionReceipt.encode(e.childTransactionReceipts[r],t.uint32(42).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionGetReceiptResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.receipt=i.proto.TransactionReceipt.decode(e,e.uint32());break;case 4:o.duplicateTransactionReceipts&&o.duplicateTransactionReceipts.length||(o.duplicateTransactionReceipts=[]),o.duplicateTransactionReceipts.push(i.proto.TransactionReceipt.decode(e,e.uint32()));break;case 5:o.childTransactionReceipts&&o.childTransactionReceipts.length||(o.childTransactionReceipts=[]),o.childTransactionReceipts.push(i.proto.TransactionReceipt.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionGetReceiptResponse"},e}(),t.TransactionGetRecordQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.transactionID=null,e.prototype.includeDuplicates=!1,e.prototype.includeChildRecords=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.transactionID&&Object.hasOwnProperty.call(e,"transactionID")&&i.proto.TransactionID.encode(e.transactionID,t.uint32(18).fork()).ldelim(),null!=e.includeDuplicates&&Object.hasOwnProperty.call(e,"includeDuplicates")&&t.uint32(24).bool(e.includeDuplicates),null!=e.includeChildRecords&&Object.hasOwnProperty.call(e,"includeChildRecords")&&t.uint32(32).bool(e.includeChildRecords),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionGetRecordQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.transactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 3:o.includeDuplicates=e.bool();break;case 4:o.includeChildRecords=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionGetRecordQuery"},e}(),t.TransactionGetRecordResponse=function(){function e(e){if(this.duplicateTransactionRecords=[],this.childTransactionRecords=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.transactionRecord=null,e.prototype.duplicateTransactionRecords=o.emptyArray,e.prototype.childTransactionRecords=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.transactionRecord&&Object.hasOwnProperty.call(e,"transactionRecord")&&i.proto.TransactionRecord.encode(e.transactionRecord,t.uint32(26).fork()).ldelim(),null!=e.duplicateTransactionRecords&&e.duplicateTransactionRecords.length)for(var r=0;r<e.duplicateTransactionRecords.length;++r)i.proto.TransactionRecord.encode(e.duplicateTransactionRecords[r],t.uint32(34).fork()).ldelim();if(null!=e.childTransactionRecords&&e.childTransactionRecords.length)for(r=0;r<e.childTransactionRecords.length;++r)i.proto.TransactionRecord.encode(e.childTransactionRecords[r],t.uint32(42).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionGetRecordResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 3:o.transactionRecord=i.proto.TransactionRecord.decode(e,e.uint32());break;case 4:o.duplicateTransactionRecords&&o.duplicateTransactionRecords.length||(o.duplicateTransactionRecords=[]),o.duplicateTransactionRecords.push(i.proto.TransactionRecord.decode(e,e.uint32()));break;case 5:o.childTransactionRecords&&o.childTransactionRecords.length||(o.childTransactionRecords=[]),o.childTransactionRecords.push(i.proto.TransactionRecord.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionGetRecordResponse"},e}(),t.TransactionGetFastRecordQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.transactionID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.transactionID&&Object.hasOwnProperty.call(e,"transactionID")&&i.proto.TransactionID.encode(e.transactionID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionGetFastRecordQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.transactionID=i.proto.TransactionID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionGetFastRecordQuery"},e}(),t.TransactionGetFastRecordResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.transactionRecord=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.transactionRecord&&Object.hasOwnProperty.call(e,"transactionRecord")&&i.proto.TransactionRecord.encode(e.transactionRecord,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionGetFastRecordResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.transactionRecord=i.proto.TransactionRecord.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionGetFastRecordResponse"},e}(),t.NetworkGetVersionInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NetworkGetVersionInfoQuery;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.header=i.proto.QueryHeader.decode(e,e.uint32());else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NetworkGetVersionInfoQuery"},e}(),t.NetworkGetVersionInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.hapiProtoVersion=null,e.prototype.hederaServicesVersion=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.hapiProtoVersion&&Object.hasOwnProperty.call(e,"hapiProtoVersion")&&i.proto.SemanticVersion.encode(e.hapiProtoVersion,t.uint32(18).fork()).ldelim(),null!=e.hederaServicesVersion&&Object.hasOwnProperty.call(e,"hederaServicesVersion")&&i.proto.SemanticVersion.encode(e.hederaServicesVersion,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NetworkGetVersionInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.hapiProtoVersion=i.proto.SemanticVersion.decode(e,e.uint32());break;case 3:o.hederaServicesVersion=i.proto.SemanticVersion.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NetworkGetVersionInfoResponse"},e}(),t.NetworkGetExecutionTimeQuery=function(){function e(e){if(this.transactionIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.transactionIds=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.transactionIds&&e.transactionIds.length)for(var r=0;r<e.transactionIds.length;++r)i.proto.TransactionID.encode(e.transactionIds[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NetworkGetExecutionTimeQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.transactionIds&&o.transactionIds.length||(o.transactionIds=[]),o.transactionIds.push(i.proto.TransactionID.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NetworkGetExecutionTimeQuery"},e}(),t.NetworkGetExecutionTimeResponse=function(){function e(e){if(this.executionTimes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.executionTimes=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.executionTimes&&e.executionTimes.length){t.uint32(18).fork();for(var r=0;r<e.executionTimes.length;++r)t.uint64(e.executionTimes[r]);t.ldelim()}return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.NetworkGetExecutionTimeResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:if(o.executionTimes&&o.executionTimes.length||(o.executionTimes=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.executionTimes.push(e.uint64());else o.executionTimes.push(e.uint64());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.NetworkGetExecutionTimeResponse"},e}(),t.TokenGetInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.token=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.token&&Object.hasOwnProperty.call(e,"token")&&i.proto.TokenID.encode(e.token,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.token=i.proto.TokenID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetInfoQuery"},e}(),t.TokenInfo=function(){function e(e){if(this.customFees=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.name="",e.prototype.symbol="",e.prototype.decimals=0,e.prototype.totalSupply=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.treasury=null,e.prototype.adminKey=null,e.prototype.kycKey=null,e.prototype.freezeKey=null,e.prototype.wipeKey=null,e.prototype.supplyKey=null,e.prototype.defaultFreezeStatus=0,e.prototype.defaultKycStatus=0,e.prototype.deleted=!1,e.prototype.autoRenewAccount=null,e.prototype.autoRenewPeriod=null,e.prototype.expiry=null,e.prototype.memo="",e.prototype.tokenType=0,e.prototype.supplyType=0,e.prototype.maxSupply=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.feeScheduleKey=null,e.prototype.customFees=o.emptyArray,e.prototype.pauseKey=null,e.prototype.pauseStatus=0,e.prototype.ledgerId=o.newBuffer([]),e.prototype.metadata=o.newBuffer([]),e.prototype.metadataKey=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.symbol&&Object.hasOwnProperty.call(e,"symbol")&&t.uint32(26).string(e.symbol),null!=e.decimals&&Object.hasOwnProperty.call(e,"decimals")&&t.uint32(32).uint32(e.decimals),null!=e.totalSupply&&Object.hasOwnProperty.call(e,"totalSupply")&&t.uint32(40).uint64(e.totalSupply),null!=e.treasury&&Object.hasOwnProperty.call(e,"treasury")&&i.proto.AccountID.encode(e.treasury,t.uint32(50).fork()).ldelim(),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(58).fork()).ldelim(),null!=e.kycKey&&Object.hasOwnProperty.call(e,"kycKey")&&i.proto.Key.encode(e.kycKey,t.uint32(66).fork()).ldelim(),null!=e.freezeKey&&Object.hasOwnProperty.call(e,"freezeKey")&&i.proto.Key.encode(e.freezeKey,t.uint32(74).fork()).ldelim(),null!=e.wipeKey&&Object.hasOwnProperty.call(e,"wipeKey")&&i.proto.Key.encode(e.wipeKey,t.uint32(82).fork()).ldelim(),null!=e.supplyKey&&Object.hasOwnProperty.call(e,"supplyKey")&&i.proto.Key.encode(e.supplyKey,t.uint32(90).fork()).ldelim(),null!=e.defaultFreezeStatus&&Object.hasOwnProperty.call(e,"defaultFreezeStatus")&&t.uint32(96).int32(e.defaultFreezeStatus),null!=e.defaultKycStatus&&Object.hasOwnProperty.call(e,"defaultKycStatus")&&t.uint32(104).int32(e.defaultKycStatus),null!=e.deleted&&Object.hasOwnProperty.call(e,"deleted")&&t.uint32(112).bool(e.deleted),null!=e.autoRenewAccount&&Object.hasOwnProperty.call(e,"autoRenewAccount")&&i.proto.AccountID.encode(e.autoRenewAccount,t.uint32(122).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(130).fork()).ldelim(),null!=e.expiry&&Object.hasOwnProperty.call(e,"expiry")&&i.proto.Timestamp.encode(e.expiry,t.uint32(138).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(146).string(e.memo),null!=e.tokenType&&Object.hasOwnProperty.call(e,"tokenType")&&t.uint32(152).int32(e.tokenType),null!=e.supplyType&&Object.hasOwnProperty.call(e,"supplyType")&&t.uint32(160).int32(e.supplyType),null!=e.maxSupply&&Object.hasOwnProperty.call(e,"maxSupply")&&t.uint32(168).int64(e.maxSupply),null!=e.feeScheduleKey&&Object.hasOwnProperty.call(e,"feeScheduleKey")&&i.proto.Key.encode(e.feeScheduleKey,t.uint32(178).fork()).ldelim(),null!=e.customFees&&e.customFees.length)for(var r=0;r<e.customFees.length;++r)i.proto.CustomFee.encode(e.customFees[r],t.uint32(186).fork()).ldelim();return null!=e.pauseKey&&Object.hasOwnProperty.call(e,"pauseKey")&&i.proto.Key.encode(e.pauseKey,t.uint32(194).fork()).ldelim(),null!=e.pauseStatus&&Object.hasOwnProperty.call(e,"pauseStatus")&&t.uint32(200).int32(e.pauseStatus),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(210).bytes(e.ledgerId),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&t.uint32(218).bytes(e.metadata),null!=e.metadataKey&&Object.hasOwnProperty.call(e,"metadataKey")&&i.proto.Key.encode(e.metadataKey,t.uint32(226).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.name=e.string();break;case 3:o.symbol=e.string();break;case 4:o.decimals=e.uint32();break;case 5:o.totalSupply=e.uint64();break;case 6:o.treasury=i.proto.AccountID.decode(e,e.uint32());break;case 7:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 8:o.kycKey=i.proto.Key.decode(e,e.uint32());break;case 9:o.freezeKey=i.proto.Key.decode(e,e.uint32());break;case 10:o.wipeKey=i.proto.Key.decode(e,e.uint32());break;case 11:o.supplyKey=i.proto.Key.decode(e,e.uint32());break;case 12:o.defaultFreezeStatus=e.int32();break;case 13:o.defaultKycStatus=e.int32();break;case 14:o.deleted=e.bool();break;case 15:o.autoRenewAccount=i.proto.AccountID.decode(e,e.uint32());break;case 16:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 17:o.expiry=i.proto.Timestamp.decode(e,e.uint32());break;case 18:o.memo=e.string();break;case 19:o.tokenType=e.int32();break;case 20:o.supplyType=e.int32();break;case 21:o.maxSupply=e.int64();break;case 22:o.feeScheduleKey=i.proto.Key.decode(e,e.uint32());break;case 23:o.customFees&&o.customFees.length||(o.customFees=[]),o.customFees.push(i.proto.CustomFee.decode(e,e.uint32()));break;case 24:o.pauseKey=i.proto.Key.decode(e,e.uint32());break;case 25:o.pauseStatus=e.int32();break;case 26:o.ledgerId=e.bytes();break;case 27:o.metadata=e.bytes();break;case 28:o.metadataKey=i.proto.Key.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenInfo"},e}(),t.TokenGetInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.tokenInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.tokenInfo&&Object.hasOwnProperty.call(e,"tokenInfo")&&i.proto.TokenInfo.encode(e.tokenInfo,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.tokenInfo=i.proto.TokenInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetInfoResponse"},e}(),t.ScheduleGetInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.scheduleID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.scheduleID&&Object.hasOwnProperty.call(e,"scheduleID")&&i.proto.ScheduleID.encode(e.scheduleID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleGetInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.scheduleID=i.proto.ScheduleID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleGetInfoQuery"},e}(),t.ScheduleInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.scheduleID=null,e.prototype.deletionTime=null,e.prototype.executionTime=null,e.prototype.expirationTime=null,e.prototype.scheduledTransactionBody=null,e.prototype.memo="",e.prototype.adminKey=null,e.prototype.signers=null,e.prototype.creatorAccountID=null,e.prototype.payerAccountID=null,e.prototype.scheduledTransactionID=null,e.prototype.ledgerId=o.newBuffer([]),e.prototype.waitForExpiry=!1,Object.defineProperty(e.prototype,"data",{get:o.oneOfGetter(t=["deletionTime","executionTime"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.scheduleID&&Object.hasOwnProperty.call(e,"scheduleID")&&i.proto.ScheduleID.encode(e.scheduleID,t.uint32(10).fork()).ldelim(),null!=e.deletionTime&&Object.hasOwnProperty.call(e,"deletionTime")&&i.proto.Timestamp.encode(e.deletionTime,t.uint32(18).fork()).ldelim(),null!=e.executionTime&&Object.hasOwnProperty.call(e,"executionTime")&&i.proto.Timestamp.encode(e.executionTime,t.uint32(26).fork()).ldelim(),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(34).fork()).ldelim(),null!=e.scheduledTransactionBody&&Object.hasOwnProperty.call(e,"scheduledTransactionBody")&&i.proto.SchedulableTransactionBody.encode(e.scheduledTransactionBody,t.uint32(42).fork()).ldelim(),null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(50).string(e.memo),null!=e.adminKey&&Object.hasOwnProperty.call(e,"adminKey")&&i.proto.Key.encode(e.adminKey,t.uint32(58).fork()).ldelim(),null!=e.signers&&Object.hasOwnProperty.call(e,"signers")&&i.proto.KeyList.encode(e.signers,t.uint32(66).fork()).ldelim(),null!=e.creatorAccountID&&Object.hasOwnProperty.call(e,"creatorAccountID")&&i.proto.AccountID.encode(e.creatorAccountID,t.uint32(74).fork()).ldelim(),null!=e.payerAccountID&&Object.hasOwnProperty.call(e,"payerAccountID")&&i.proto.AccountID.encode(e.payerAccountID,t.uint32(82).fork()).ldelim(),null!=e.scheduledTransactionID&&Object.hasOwnProperty.call(e,"scheduledTransactionID")&&i.proto.TransactionID.encode(e.scheduledTransactionID,t.uint32(90).fork()).ldelim(),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(98).bytes(e.ledgerId),null!=e.waitForExpiry&&Object.hasOwnProperty.call(e,"waitForExpiry")&&t.uint32(104).bool(e.waitForExpiry),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.scheduleID=i.proto.ScheduleID.decode(e,e.uint32());break;case 2:o.deletionTime=i.proto.Timestamp.decode(e,e.uint32());break;case 3:o.executionTime=i.proto.Timestamp.decode(e,e.uint32());break;case 4:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 5:o.scheduledTransactionBody=i.proto.SchedulableTransactionBody.decode(e,e.uint32());break;case 6:o.memo=e.string();break;case 7:o.adminKey=i.proto.Key.decode(e,e.uint32());break;case 8:o.signers=i.proto.KeyList.decode(e,e.uint32());break;case 9:o.creatorAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 10:o.payerAccountID=i.proto.AccountID.decode(e,e.uint32());break;case 11:o.scheduledTransactionID=i.proto.TransactionID.decode(e,e.uint32());break;case 12:o.ledgerId=e.bytes();break;case 13:o.waitForExpiry=e.bool();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleInfo"},e}(),t.ScheduleGetInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.scheduleInfo=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.scheduleInfo&&Object.hasOwnProperty.call(e,"scheduleInfo")&&i.proto.ScheduleInfo.encode(e.scheduleInfo,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ScheduleGetInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.scheduleInfo=i.proto.ScheduleInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ScheduleGetInfoResponse"},e}(),t.TokenGetAccountNftInfosQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountID=null,e.prototype.start=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.end=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.start&&Object.hasOwnProperty.call(e,"start")&&t.uint32(24).int64(e.start),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&t.uint32(32).int64(e.end),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetAccountNftInfosQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.start=e.int64();break;case 4:o.end=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetAccountNftInfosQuery"},e}(),t.TokenGetAccountNftInfosResponse=function(){function e(e){if(this.nfts=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.nfts=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.nfts&&e.nfts.length)for(var r=0;r<e.nfts.length;++r)i.proto.TokenNftInfo.encode(e.nfts[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetAccountNftInfosResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.nfts&&o.nfts.length||(o.nfts=[]),o.nfts.push(i.proto.TokenNftInfo.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetAccountNftInfosResponse"},e}(),t.TokenGetNftInfoQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.nftID=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.nftID&&Object.hasOwnProperty.call(e,"nftID")&&i.proto.NftID.encode(e.nftID,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetNftInfoQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.nftID=i.proto.NftID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetNftInfoQuery"},e}(),t.TokenNftInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.nftID=null,e.prototype.accountID=null,e.prototype.creationTime=null,e.prototype.metadata=o.newBuffer([]),e.prototype.ledgerId=o.newBuffer([]),e.prototype.spenderId=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.nftID&&Object.hasOwnProperty.call(e,"nftID")&&i.proto.NftID.encode(e.nftID,t.uint32(10).fork()).ldelim(),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(18).fork()).ldelim(),null!=e.creationTime&&Object.hasOwnProperty.call(e,"creationTime")&&i.proto.Timestamp.encode(e.creationTime,t.uint32(26).fork()).ldelim(),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&t.uint32(34).bytes(e.metadata),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(42).bytes(e.ledgerId),null!=e.spenderId&&Object.hasOwnProperty.call(e,"spenderId")&&i.proto.AccountID.encode(e.spenderId,t.uint32(50).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenNftInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.nftID=i.proto.NftID.decode(e,e.uint32());break;case 2:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.creationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 4:o.metadata=e.bytes();break;case 5:o.ledgerId=e.bytes();break;case 6:o.spenderId=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenNftInfo"},e}(),t.TokenGetNftInfoResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.nft=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.nft&&Object.hasOwnProperty.call(e,"nft")&&i.proto.TokenNftInfo.encode(e.nft,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetNftInfoResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.nft=i.proto.TokenNftInfo.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetNftInfoResponse"},e}(),t.TokenGetNftInfosQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.tokenID=null,e.prototype.start=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.end=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.tokenID&&Object.hasOwnProperty.call(e,"tokenID")&&i.proto.TokenID.encode(e.tokenID,t.uint32(18).fork()).ldelim(),null!=e.start&&Object.hasOwnProperty.call(e,"start")&&t.uint32(24).int64(e.start),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&t.uint32(32).int64(e.end),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetNftInfosQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.tokenID=i.proto.TokenID.decode(e,e.uint32());break;case 3:o.start=e.int64();break;case 4:o.end=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetNftInfosQuery"},e}(),t.TokenGetNftInfosResponse=function(){function e(e){if(this.nfts=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.tokenID=null,e.prototype.nfts=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.tokenID&&Object.hasOwnProperty.call(e,"tokenID")&&i.proto.TokenID.encode(e.tokenID,t.uint32(18).fork()).ldelim(),null!=e.nfts&&e.nfts.length)for(var r=0;r<e.nfts.length;++r)i.proto.TokenNftInfo.encode(e.nfts[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenGetNftInfosResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.tokenID=i.proto.TokenID.decode(e,e.uint32());break;case 3:o.nfts&&o.nfts.length||(o.nfts=[]),o.nfts.push(i.proto.TokenNftInfo.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenGetNftInfosResponse"},e}(),t.GetAccountDetailsQuery=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountId=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.QueryHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetAccountDetailsQuery;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.QueryHeader.decode(e,e.uint32());break;case 2:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetAccountDetailsQuery"},e}(),t.GetAccountDetailsResponse=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.header=null,e.prototype.accountDetails=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.header&&Object.hasOwnProperty.call(e,"header")&&i.proto.ResponseHeader.encode(e.header,t.uint32(10).fork()).ldelim(),null!=e.accountDetails&&Object.hasOwnProperty.call(e,"accountDetails")&&i.proto.GetAccountDetailsResponse.AccountDetails.encode(e.accountDetails,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetAccountDetailsResponse;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.header=i.proto.ResponseHeader.decode(e,e.uint32());break;case 2:o.accountDetails=i.proto.GetAccountDetailsResponse.AccountDetails.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetAccountDetailsResponse"},e.AccountDetails=function(){function e(e){if(this.tokenRelationships=[],this.grantedCryptoAllowances=[],this.grantedNftAllowances=[],this.grantedTokenAllowances=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountId=null,e.prototype.contractAccountId="",e.prototype.deleted=!1,e.prototype.proxyAccountId=null,e.prototype.proxyReceived=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.key=null,e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.receiverSigRequired=!1,e.prototype.expirationTime=null,e.prototype.autoRenewPeriod=null,e.prototype.tokenRelationships=o.emptyArray,e.prototype.memo="",e.prototype.ownedNfts=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.maxAutomaticTokenAssociations=0,e.prototype.alias=o.newBuffer([]),e.prototype.ledgerId=o.newBuffer([]),e.prototype.grantedCryptoAllowances=o.emptyArray,e.prototype.grantedNftAllowances=o.emptyArray,e.prototype.grantedTokenAllowances=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountId&&Object.hasOwnProperty.call(e,"accountId")&&i.proto.AccountID.encode(e.accountId,t.uint32(10).fork()).ldelim(),null!=e.contractAccountId&&Object.hasOwnProperty.call(e,"contractAccountId")&&t.uint32(18).string(e.contractAccountId),null!=e.deleted&&Object.hasOwnProperty.call(e,"deleted")&&t.uint32(24).bool(e.deleted),null!=e.proxyAccountId&&Object.hasOwnProperty.call(e,"proxyAccountId")&&i.proto.AccountID.encode(e.proxyAccountId,t.uint32(34).fork()).ldelim(),null!=e.proxyReceived&&Object.hasOwnProperty.call(e,"proxyReceived")&&t.uint32(40).int64(e.proxyReceived),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&i.proto.Key.encode(e.key,t.uint32(50).fork()).ldelim(),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(56).uint64(e.balance),null!=e.receiverSigRequired&&Object.hasOwnProperty.call(e,"receiverSigRequired")&&t.uint32(64).bool(e.receiverSigRequired),null!=e.expirationTime&&Object.hasOwnProperty.call(e,"expirationTime")&&i.proto.Timestamp.encode(e.expirationTime,t.uint32(74).fork()).ldelim(),null!=e.autoRenewPeriod&&Object.hasOwnProperty.call(e,"autoRenewPeriod")&&i.proto.Duration.encode(e.autoRenewPeriod,t.uint32(82).fork()).ldelim(),null!=e.tokenRelationships&&e.tokenRelationships.length)for(var r=0;r<e.tokenRelationships.length;++r)i.proto.TokenRelationship.encode(e.tokenRelationships[r],t.uint32(90).fork()).ldelim();if(null!=e.memo&&Object.hasOwnProperty.call(e,"memo")&&t.uint32(98).string(e.memo),null!=e.ownedNfts&&Object.hasOwnProperty.call(e,"ownedNfts")&&t.uint32(104).int64(e.ownedNfts),null!=e.maxAutomaticTokenAssociations&&Object.hasOwnProperty.call(e,"maxAutomaticTokenAssociations")&&t.uint32(112).int32(e.maxAutomaticTokenAssociations),null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&t.uint32(122).bytes(e.alias),null!=e.ledgerId&&Object.hasOwnProperty.call(e,"ledgerId")&&t.uint32(130).bytes(e.ledgerId),null!=e.grantedCryptoAllowances&&e.grantedCryptoAllowances.length)for(r=0;r<e.grantedCryptoAllowances.length;++r)i.proto.GrantedCryptoAllowance.encode(e.grantedCryptoAllowances[r],t.uint32(138).fork()).ldelim();if(null!=e.grantedNftAllowances&&e.grantedNftAllowances.length)for(r=0;r<e.grantedNftAllowances.length;++r)i.proto.GrantedNftAllowance.encode(e.grantedNftAllowances[r],t.uint32(146).fork()).ldelim();if(null!=e.grantedTokenAllowances&&e.grantedTokenAllowances.length)for(r=0;r<e.grantedTokenAllowances.length;++r)i.proto.GrantedTokenAllowance.encode(e.grantedTokenAllowances[r],t.uint32(154).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GetAccountDetailsResponse.AccountDetails;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountId=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.contractAccountId=e.string();break;case 3:o.deleted=e.bool();break;case 4:o.proxyAccountId=i.proto.AccountID.decode(e,e.uint32());break;case 5:o.proxyReceived=e.int64();break;case 6:o.key=i.proto.Key.decode(e,e.uint32());break;case 7:o.balance=e.uint64();break;case 8:o.receiverSigRequired=e.bool();break;case 9:o.expirationTime=i.proto.Timestamp.decode(e,e.uint32());break;case 10:o.autoRenewPeriod=i.proto.Duration.decode(e,e.uint32());break;case 11:o.tokenRelationships&&o.tokenRelationships.length||(o.tokenRelationships=[]),o.tokenRelationships.push(i.proto.TokenRelationship.decode(e,e.uint32()));break;case 12:o.memo=e.string();break;case 13:o.ownedNfts=e.int64();break;case 14:o.maxAutomaticTokenAssociations=e.int32();break;case 15:o.alias=e.bytes();break;case 16:o.ledgerId=e.bytes();break;case 17:o.grantedCryptoAllowances&&o.grantedCryptoAllowances.length||(o.grantedCryptoAllowances=[]),o.grantedCryptoAllowances.push(i.proto.GrantedCryptoAllowance.decode(e,e.uint32()));break;case 18:o.grantedNftAllowances&&o.grantedNftAllowances.length||(o.grantedNftAllowances=[]),o.grantedNftAllowances.push(i.proto.GrantedNftAllowance.decode(e,e.uint32()));break;case 19:o.grantedTokenAllowances&&o.grantedTokenAllowances.length||(o.grantedTokenAllowances=[]),o.grantedTokenAllowances.push(i.proto.GrantedTokenAllowance.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GetAccountDetailsResponse.AccountDetails"},e}(),e}(),t.GrantedCryptoAllowance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.spender=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.spender&&Object.hasOwnProperty.call(e,"spender")&&i.proto.AccountID.encode(e.spender,t.uint32(10).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(16).int64(e.amount),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GrantedCryptoAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.spender=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.amount=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GrantedCryptoAllowance"},e}(),t.GrantedNftAllowance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.spender=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.spender&&Object.hasOwnProperty.call(e,"spender")&&i.proto.AccountID.encode(e.spender,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GrantedNftAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.spender=i.proto.AccountID.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GrantedNftAllowance"},e}(),t.GrantedTokenAllowance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.spender=null,e.prototype.amount=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.spender&&Object.hasOwnProperty.call(e,"spender")&&i.proto.AccountID.encode(e.spender,t.uint32(18).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(24).int64(e.amount),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.GrantedTokenAllowance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.spender=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.amount=e.int64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.GrantedTokenAllowance"},e}(),t.Response=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.getByKey=null,e.prototype.getBySolidityID=null,e.prototype.contractCallLocal=null,e.prototype.contractGetBytecodeResponse=null,e.prototype.contractGetInfo=null,e.prototype.contractGetRecordsResponse=null,e.prototype.cryptogetAccountBalance=null,e.prototype.cryptoGetAccountRecords=null,e.prototype.cryptoGetInfo=null,e.prototype.cryptoGetLiveHash=null,e.prototype.cryptoGetProxyStakers=null,e.prototype.fileGetContents=null,e.prototype.fileGetInfo=null,e.prototype.transactionGetReceipt=null,e.prototype.transactionGetRecord=null,e.prototype.transactionGetFastRecord=null,e.prototype.consensusGetTopicInfo=null,e.prototype.networkGetVersionInfo=null,e.prototype.tokenGetInfo=null,e.prototype.scheduleGetInfo=null,e.prototype.tokenGetAccountNftInfos=null,e.prototype.tokenGetNftInfo=null,e.prototype.tokenGetNftInfos=null,e.prototype.networkGetExecutionTime=null,e.prototype.accountDetails=null,Object.defineProperty(e.prototype,"response",{get:o.oneOfGetter(t=["getByKey","getBySolidityID","contractCallLocal","contractGetBytecodeResponse","contractGetInfo","contractGetRecordsResponse","cryptogetAccountBalance","cryptoGetAccountRecords","cryptoGetInfo","cryptoGetLiveHash","cryptoGetProxyStakers","fileGetContents","fileGetInfo","transactionGetReceipt","transactionGetRecord","transactionGetFastRecord","consensusGetTopicInfo","networkGetVersionInfo","tokenGetInfo","scheduleGetInfo","tokenGetAccountNftInfos","tokenGetNftInfo","tokenGetNftInfos","networkGetExecutionTime","accountDetails"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.getByKey&&Object.hasOwnProperty.call(e,"getByKey")&&i.proto.GetByKeyResponse.encode(e.getByKey,t.uint32(10).fork()).ldelim(),null!=e.getBySolidityID&&Object.hasOwnProperty.call(e,"getBySolidityID")&&i.proto.GetBySolidityIDResponse.encode(e.getBySolidityID,t.uint32(18).fork()).ldelim(),null!=e.contractCallLocal&&Object.hasOwnProperty.call(e,"contractCallLocal")&&i.proto.ContractCallLocalResponse.encode(e.contractCallLocal,t.uint32(26).fork()).ldelim(),null!=e.contractGetInfo&&Object.hasOwnProperty.call(e,"contractGetInfo")&&i.proto.ContractGetInfoResponse.encode(e.contractGetInfo,t.uint32(34).fork()).ldelim(),null!=e.contractGetBytecodeResponse&&Object.hasOwnProperty.call(e,"contractGetBytecodeResponse")&&i.proto.ContractGetBytecodeResponse.encode(e.contractGetBytecodeResponse,t.uint32(42).fork()).ldelim(),null!=e.contractGetRecordsResponse&&Object.hasOwnProperty.call(e,"contractGetRecordsResponse")&&i.proto.ContractGetRecordsResponse.encode(e.contractGetRecordsResponse,t.uint32(50).fork()).ldelim(),null!=e.cryptogetAccountBalance&&Object.hasOwnProperty.call(e,"cryptogetAccountBalance")&&i.proto.CryptoGetAccountBalanceResponse.encode(e.cryptogetAccountBalance,t.uint32(58).fork()).ldelim(),null!=e.cryptoGetAccountRecords&&Object.hasOwnProperty.call(e,"cryptoGetAccountRecords")&&i.proto.CryptoGetAccountRecordsResponse.encode(e.cryptoGetAccountRecords,t.uint32(66).fork()).ldelim(),null!=e.cryptoGetInfo&&Object.hasOwnProperty.call(e,"cryptoGetInfo")&&i.proto.CryptoGetInfoResponse.encode(e.cryptoGetInfo,t.uint32(74).fork()).ldelim(),null!=e.cryptoGetLiveHash&&Object.hasOwnProperty.call(e,"cryptoGetLiveHash")&&i.proto.CryptoGetLiveHashResponse.encode(e.cryptoGetLiveHash,t.uint32(82).fork()).ldelim(),null!=e.cryptoGetProxyStakers&&Object.hasOwnProperty.call(e,"cryptoGetProxyStakers")&&i.proto.CryptoGetStakersResponse.encode(e.cryptoGetProxyStakers,t.uint32(90).fork()).ldelim(),null!=e.fileGetContents&&Object.hasOwnProperty.call(e,"fileGetContents")&&i.proto.FileGetContentsResponse.encode(e.fileGetContents,t.uint32(98).fork()).ldelim(),null!=e.fileGetInfo&&Object.hasOwnProperty.call(e,"fileGetInfo")&&i.proto.FileGetInfoResponse.encode(e.fileGetInfo,t.uint32(106).fork()).ldelim(),null!=e.transactionGetReceipt&&Object.hasOwnProperty.call(e,"transactionGetReceipt")&&i.proto.TransactionGetReceiptResponse.encode(e.transactionGetReceipt,t.uint32(114).fork()).ldelim(),null!=e.transactionGetRecord&&Object.hasOwnProperty.call(e,"transactionGetRecord")&&i.proto.TransactionGetRecordResponse.encode(e.transactionGetRecord,t.uint32(122).fork()).ldelim(),null!=e.transactionGetFastRecord&&Object.hasOwnProperty.call(e,"transactionGetFastRecord")&&i.proto.TransactionGetFastRecordResponse.encode(e.transactionGetFastRecord,t.uint32(130).fork()).ldelim(),null!=e.consensusGetTopicInfo&&Object.hasOwnProperty.call(e,"consensusGetTopicInfo")&&i.proto.ConsensusGetTopicInfoResponse.encode(e.consensusGetTopicInfo,t.uint32(1202).fork()).ldelim(),null!=e.networkGetVersionInfo&&Object.hasOwnProperty.call(e,"networkGetVersionInfo")&&i.proto.NetworkGetVersionInfoResponse.encode(e.networkGetVersionInfo,t.uint32(1210).fork()).ldelim(),null!=e.tokenGetInfo&&Object.hasOwnProperty.call(e,"tokenGetInfo")&&i.proto.TokenGetInfoResponse.encode(e.tokenGetInfo,t.uint32(1218).fork()).ldelim(),null!=e.scheduleGetInfo&&Object.hasOwnProperty.call(e,"scheduleGetInfo")&&i.proto.ScheduleGetInfoResponse.encode(e.scheduleGetInfo,t.uint32(1226).fork()).ldelim(),null!=e.tokenGetAccountNftInfos&&Object.hasOwnProperty.call(e,"tokenGetAccountNftInfos")&&i.proto.TokenGetAccountNftInfosResponse.encode(e.tokenGetAccountNftInfos,t.uint32(1234).fork()).ldelim(),null!=e.tokenGetNftInfo&&Object.hasOwnProperty.call(e,"tokenGetNftInfo")&&i.proto.TokenGetNftInfoResponse.encode(e.tokenGetNftInfo,t.uint32(1242).fork()).ldelim(),null!=e.tokenGetNftInfos&&Object.hasOwnProperty.call(e,"tokenGetNftInfos")&&i.proto.TokenGetNftInfosResponse.encode(e.tokenGetNftInfos,t.uint32(1250).fork()).ldelim(),null!=e.networkGetExecutionTime&&Object.hasOwnProperty.call(e,"networkGetExecutionTime")&&i.proto.NetworkGetExecutionTimeResponse.encode(e.networkGetExecutionTime,t.uint32(1258).fork()).ldelim(),null!=e.accountDetails&&Object.hasOwnProperty.call(e,"accountDetails")&&i.proto.GetAccountDetailsResponse.encode(e.accountDetails,t.uint32(1266).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.Response;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.getByKey=i.proto.GetByKeyResponse.decode(e,e.uint32());break;case 2:o.getBySolidityID=i.proto.GetBySolidityIDResponse.decode(e,e.uint32());break;case 3:o.contractCallLocal=i.proto.ContractCallLocalResponse.decode(e,e.uint32());break;case 5:o.contractGetBytecodeResponse=i.proto.ContractGetBytecodeResponse.decode(e,e.uint32());break;case 4:o.contractGetInfo=i.proto.ContractGetInfoResponse.decode(e,e.uint32());break;case 6:o.contractGetRecordsResponse=i.proto.ContractGetRecordsResponse.decode(e,e.uint32());break;case 7:o.cryptogetAccountBalance=i.proto.CryptoGetAccountBalanceResponse.decode(e,e.uint32());break;case 8:o.cryptoGetAccountRecords=i.proto.CryptoGetAccountRecordsResponse.decode(e,e.uint32());break;case 9:o.cryptoGetInfo=i.proto.CryptoGetInfoResponse.decode(e,e.uint32());break;case 10:o.cryptoGetLiveHash=i.proto.CryptoGetLiveHashResponse.decode(e,e.uint32());break;case 11:o.cryptoGetProxyStakers=i.proto.CryptoGetStakersResponse.decode(e,e.uint32());break;case 12:o.fileGetContents=i.proto.FileGetContentsResponse.decode(e,e.uint32());break;case 13:o.fileGetInfo=i.proto.FileGetInfoResponse.decode(e,e.uint32());break;case 14:o.transactionGetReceipt=i.proto.TransactionGetReceiptResponse.decode(e,e.uint32());break;case 15:o.transactionGetRecord=i.proto.TransactionGetRecordResponse.decode(e,e.uint32());break;case 16:o.transactionGetFastRecord=i.proto.TransactionGetFastRecordResponse.decode(e,e.uint32());break;case 150:o.consensusGetTopicInfo=i.proto.ConsensusGetTopicInfoResponse.decode(e,e.uint32());break;case 151:o.networkGetVersionInfo=i.proto.NetworkGetVersionInfoResponse.decode(e,e.uint32());break;case 152:o.tokenGetInfo=i.proto.TokenGetInfoResponse.decode(e,e.uint32());break;case 153:o.scheduleGetInfo=i.proto.ScheduleGetInfoResponse.decode(e,e.uint32());break;case 154:o.tokenGetAccountNftInfos=i.proto.TokenGetAccountNftInfosResponse.decode(e,e.uint32());break;case 155:o.tokenGetNftInfo=i.proto.TokenGetNftInfoResponse.decode(e,e.uint32());break;case 156:o.tokenGetNftInfos=i.proto.TokenGetNftInfosResponse.decode(e,e.uint32());break;case 157:o.networkGetExecutionTime=i.proto.NetworkGetExecutionTimeResponse.decode(e,e.uint32());break;case 158:o.accountDetails=i.proto.GetAccountDetailsResponse.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.Response"},e}(),t.CryptoService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createAccount"}),Object.defineProperty(t.prototype.updateAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateAccount"}),Object.defineProperty(t.prototype.cryptoTransfer=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"cryptoTransfer"}),Object.defineProperty(t.prototype.cryptoDelete=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"cryptoDelete"}),Object.defineProperty(t.prototype.approveAllowances=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"approveAllowances"}),Object.defineProperty(t.prototype.deleteAllowances=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteAllowances"}),Object.defineProperty(t.prototype.addLiveHash=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"addLiveHash"}),Object.defineProperty(t.prototype.deleteLiveHash=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteLiveHash"}),Object.defineProperty(t.prototype.getLiveHash=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getLiveHash"}),Object.defineProperty(t.prototype.getAccountRecords=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getAccountRecords"}),Object.defineProperty(t.prototype.cryptoGetBalance=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"cryptoGetBalance"}),Object.defineProperty(t.prototype.getAccountInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getAccountInfo"}),Object.defineProperty(t.prototype.getTransactionReceipts=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getTransactionReceipts"}),Object.defineProperty(t.prototype.getTxRecordByTxID=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getTxRecordByTxID"}),t}(),t.FileService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createFile=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createFile"}),Object.defineProperty(t.prototype.updateFile=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateFile"}),Object.defineProperty(t.prototype.deleteFile=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteFile"}),Object.defineProperty(t.prototype.appendContent=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"appendContent"}),Object.defineProperty(t.prototype.getFileContent=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getFileContent"}),Object.defineProperty(t.prototype.getFileInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getFileInfo"}),Object.defineProperty(t.prototype.systemDelete=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"systemDelete"}),Object.defineProperty(t.prototype.systemUndelete=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"systemUndelete"}),t}(),t.FreezeService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.freeze=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"freeze"}),t}(),t.NetworkService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.getVersionInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getVersionInfo"}),Object.defineProperty(t.prototype.getAccountDetails=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getAccountDetails"}),Object.defineProperty(t.prototype.getExecutionTime=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getExecutionTime"}),Object.defineProperty(t.prototype.uncheckedSubmit=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"uncheckedSubmit"}),t}(),t.ScheduleService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createSchedule=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createSchedule"}),Object.defineProperty(t.prototype.signSchedule=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"signSchedule"}),Object.defineProperty(t.prototype.deleteSchedule=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteSchedule"}),Object.defineProperty(t.prototype.getScheduleInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getScheduleInfo"}),t}(),t.SmartContractService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createContract=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createContract"}),Object.defineProperty(t.prototype.updateContract=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateContract"}),Object.defineProperty(t.prototype.contractCallMethod=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"contractCallMethod"}),Object.defineProperty(t.prototype.contractCallLocalMethod=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"contractCallLocalMethod"}),Object.defineProperty(t.prototype.getContractInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getContractInfo"}),Object.defineProperty(t.prototype.contractGetBytecode=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"ContractGetBytecode"}),Object.defineProperty(t.prototype.getBySolidityID=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getBySolidityID"}),Object.defineProperty(t.prototype.getTxRecordByContractID=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getTxRecordByContractID"}),Object.defineProperty(t.prototype.deleteContract=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteContract"}),Object.defineProperty(t.prototype.systemDelete=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"systemDelete"}),Object.defineProperty(t.prototype.systemUndelete=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"systemUndelete"}),Object.defineProperty(t.prototype.callEthereum=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"callEthereum"}),t}(),t.ThrottleGroup=function(){function e(e){if(this.operations=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.operations=o.emptyArray,e.prototype.milliOpsPerSec=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.operations&&e.operations.length){t.uint32(10).fork();for(var r=0;r<e.operations.length;++r)t.int32(e.operations[r]);t.ldelim()}return null!=e.milliOpsPerSec&&Object.hasOwnProperty.call(e,"milliOpsPerSec")&&t.uint32(16).uint64(e.milliOpsPerSec),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ThrottleGroup;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:if(o.operations&&o.operations.length||(o.operations=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.operations.push(e.int32());else o.operations.push(e.int32());break;case 2:o.milliOpsPerSec=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ThrottleGroup"},e}(),t.ThrottleBucket=function(){function e(e){if(this.throttleGroups=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.name="",e.prototype.burstPeriodMs=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.throttleGroups=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.burstPeriodMs&&Object.hasOwnProperty.call(e,"burstPeriodMs")&&t.uint32(16).uint64(e.burstPeriodMs),null!=e.throttleGroups&&e.throttleGroups.length)for(var r=0;r<e.throttleGroups.length;++r)i.proto.ThrottleGroup.encode(e.throttleGroups[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ThrottleBucket;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.name=e.string();break;case 2:o.burstPeriodMs=e.uint64();break;case 3:o.throttleGroups&&o.throttleGroups.length||(o.throttleGroups=[]),o.throttleGroups.push(i.proto.ThrottleGroup.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ThrottleBucket"},e}(),t.ThrottleDefinitions=function(){function e(e){if(this.throttleBuckets=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.throttleBuckets=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.throttleBuckets&&e.throttleBuckets.length)for(var r=0;r<e.throttleBuckets.length;++r)i.proto.ThrottleBucket.encode(e.throttleBuckets[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ThrottleDefinitions;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.throttleBuckets&&o.throttleBuckets.length||(o.throttleBuckets=[]),o.throttleBuckets.push(i.proto.ThrottleBucket.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ThrottleDefinitions"},e}(),t.TokenService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.createToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"createToken"}),Object.defineProperty(t.prototype.updateToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateToken"}),Object.defineProperty(t.prototype.mintToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"mintToken"}),Object.defineProperty(t.prototype.burnToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"burnToken"}),Object.defineProperty(t.prototype.deleteToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"deleteToken"}),Object.defineProperty(t.prototype.wipeTokenAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"wipeTokenAccount"}),Object.defineProperty(t.prototype.freezeTokenAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"freezeTokenAccount"}),Object.defineProperty(t.prototype.unfreezeTokenAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"unfreezeTokenAccount"}),Object.defineProperty(t.prototype.grantKycToTokenAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"grantKycToTokenAccount"}),Object.defineProperty(t.prototype.revokeKycFromTokenAccount=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"revokeKycFromTokenAccount"}),Object.defineProperty(t.prototype.associateTokens=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"associateTokens"}),Object.defineProperty(t.prototype.dissociateTokens=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"dissociateTokens"}),Object.defineProperty(t.prototype.updateTokenFeeSchedule=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateTokenFeeSchedule"}),Object.defineProperty(t.prototype.getTokenInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getTokenInfo"}),Object.defineProperty(t.prototype.getTokenNftInfo=function e(t,r){return this.rpcCall(e,i.proto.Query,i.proto.Response,t,r)},"name",{value:"getTokenNftInfo"}),Object.defineProperty(t.prototype.pauseToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"pauseToken"}),Object.defineProperty(t.prototype.unpauseToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"unpauseToken"}),Object.defineProperty(t.prototype.updateNfts=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"updateNfts"}),Object.defineProperty(t.prototype.rejectToken=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"rejectToken"}),Object.defineProperty(t.prototype.airdropTokens=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"airdropTokens"}),Object.defineProperty(t.prototype.cancelAirdrop=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"cancelAirdrop"}),Object.defineProperty(t.prototype.claimAirdrop=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"claimAirdrop"}),t}(),t.SignedTransaction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.bodyBytes=o.newBuffer([]),e.prototype.sigMap=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.bodyBytes&&Object.hasOwnProperty.call(e,"bodyBytes")&&t.uint32(10).bytes(e.bodyBytes),null!=e.sigMap&&Object.hasOwnProperty.call(e,"sigMap")&&i.proto.SignatureMap.encode(e.sigMap,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SignedTransaction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.bodyBytes=e.bytes();break;case 2:o.sigMap=i.proto.SignatureMap.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SignedTransaction"},e}(),t.UtilService=function(){function t(t,r,n){e.rpc.Service.call(this,t,r,n)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(t.prototype.prng=function e(t,r){return this.rpcCall(e,i.proto.Transaction,i.proto.TransactionResponse,t,r)},"name",{value:"prng"}),t}(),t.TokenUnitBalance=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.tokenId=null,e.prototype.balance=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.tokenId&&Object.hasOwnProperty.call(e,"tokenId")&&i.proto.TokenID.encode(e.tokenId,t.uint32(10).fork()).ldelim(),null!=e.balance&&Object.hasOwnProperty.call(e,"balance")&&t.uint32(16).uint64(e.balance),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TokenUnitBalance;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.tokenId=i.proto.TokenID.decode(e,e.uint32());break;case 2:o.balance=e.uint64();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TokenUnitBalance"},e}(),t.SingleAccountBalances=function(){function e(e){if(this.tokenUnitBalances=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.accountID=null,e.prototype.hbarBalance=o.Long?o.Long.fromBits(0,0,!0):0,e.prototype.tokenUnitBalances=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.accountID&&Object.hasOwnProperty.call(e,"accountID")&&i.proto.AccountID.encode(e.accountID,t.uint32(10).fork()).ldelim(),null!=e.hbarBalance&&Object.hasOwnProperty.call(e,"hbarBalance")&&t.uint32(16).uint64(e.hbarBalance),null!=e.tokenUnitBalances&&e.tokenUnitBalances.length)for(var r=0;r<e.tokenUnitBalances.length;++r)i.proto.TokenUnitBalance.encode(e.tokenUnitBalances[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SingleAccountBalances;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.accountID=i.proto.AccountID.decode(e,e.uint32());break;case 2:o.hbarBalance=e.uint64();break;case 3:o.tokenUnitBalances&&o.tokenUnitBalances.length||(o.tokenUnitBalances=[]),o.tokenUnitBalances.push(i.proto.TokenUnitBalance.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SingleAccountBalances"},e}(),t.AllAccountBalances=function(){function e(e){if(this.allAccounts=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.consensusTimestamp=null,e.prototype.allAccounts=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.consensusTimestamp&&Object.hasOwnProperty.call(e,"consensusTimestamp")&&i.proto.Timestamp.encode(e.consensusTimestamp,t.uint32(10).fork()).ldelim(),null!=e.allAccounts&&e.allAccounts.length)for(var r=0;r<e.allAccounts.length;++r)i.proto.SingleAccountBalances.encode(e.allAccounts[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.AllAccountBalances;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.consensusTimestamp=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.allAccounts&&o.allAccounts.length||(o.allAccounts=[]),o.allAccounts.push(i.proto.SingleAccountBalances.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.AllAccountBalances"},e}(),t.ContractActions=function(){function e(e){if(this.contractActions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractActions=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.contractActions&&e.contractActions.length)for(var r=0;r<e.contractActions.length;++r)i.proto.ContractAction.encode(e.contractActions[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractActions;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.contractActions&&o.contractActions.length||(o.contractActions=[]),o.contractActions.push(i.proto.ContractAction.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractActions"},e}(),t.ContractActionType=function(){const e={},t=Object.create(e);return t[e[0]="NO_ACTION"]=0,t[e[1]="CALL"]=1,t[e[2]="CREATE"]=2,t[e[3]="PRECOMPILE"]=3,t[e[4]="SYSTEM"]=4,t}(),t.CallOperationType=function(){const e={},t=Object.create(e);return t[e[0]="OP_UNKNOWN"]=0,t[e[1]="OP_CALL"]=1,t[e[2]="OP_CALLCODE"]=2,t[e[3]="OP_DELEGATECALL"]=3,t[e[4]="OP_STATICCALL"]=4,t[e[5]="OP_CREATE"]=5,t[e[6]="OP_CREATE2"]=6,t}(),t.ContractAction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.callType=0,e.prototype.callingAccount=null,e.prototype.callingContract=null,e.prototype.gas=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.input=o.newBuffer([]),e.prototype.recipientAccount=null,e.prototype.recipientContract=null,e.prototype.targetedAddress=null,e.prototype.value=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.gasUsed=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.output=null,e.prototype.revertReason=null,e.prototype.error=null,e.prototype.callDepth=0,e.prototype.callOperationType=0,Object.defineProperty(e.prototype,"caller",{get:o.oneOfGetter(t=["callingAccount","callingContract"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"recipient",{get:o.oneOfGetter(t=["recipientAccount","recipientContract","targetedAddress"]),set:o.oneOfSetter(t)}),Object.defineProperty(e.prototype,"resultData",{get:o.oneOfGetter(t=["output","revertReason","error"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.callType&&Object.hasOwnProperty.call(e,"callType")&&t.uint32(8).int32(e.callType),null!=e.callingAccount&&Object.hasOwnProperty.call(e,"callingAccount")&&i.proto.AccountID.encode(e.callingAccount,t.uint32(18).fork()).ldelim(),null!=e.callingContract&&Object.hasOwnProperty.call(e,"callingContract")&&i.proto.ContractID.encode(e.callingContract,t.uint32(26).fork()).ldelim(),null!=e.gas&&Object.hasOwnProperty.call(e,"gas")&&t.uint32(32).int64(e.gas),null!=e.input&&Object.hasOwnProperty.call(e,"input")&&t.uint32(42).bytes(e.input),null!=e.recipientAccount&&Object.hasOwnProperty.call(e,"recipientAccount")&&i.proto.AccountID.encode(e.recipientAccount,t.uint32(50).fork()).ldelim(),null!=e.recipientContract&&Object.hasOwnProperty.call(e,"recipientContract")&&i.proto.ContractID.encode(e.recipientContract,t.uint32(58).fork()).ldelim(),null!=e.targetedAddress&&Object.hasOwnProperty.call(e,"targetedAddress")&&t.uint32(66).bytes(e.targetedAddress),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(72).int64(e.value),null!=e.gasUsed&&Object.hasOwnProperty.call(e,"gasUsed")&&t.uint32(80).int64(e.gasUsed),null!=e.output&&Object.hasOwnProperty.call(e,"output")&&t.uint32(90).bytes(e.output),null!=e.revertReason&&Object.hasOwnProperty.call(e,"revertReason")&&t.uint32(98).bytes(e.revertReason),null!=e.error&&Object.hasOwnProperty.call(e,"error")&&t.uint32(106).bytes(e.error),null!=e.callDepth&&Object.hasOwnProperty.call(e,"callDepth")&&t.uint32(112).int32(e.callDepth),null!=e.callOperationType&&Object.hasOwnProperty.call(e,"callOperationType")&&t.uint32(120).int32(e.callOperationType),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractAction;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.callType=e.int32();break;case 2:o.callingAccount=i.proto.AccountID.decode(e,e.uint32());break;case 3:o.callingContract=i.proto.ContractID.decode(e,e.uint32());break;case 4:o.gas=e.int64();break;case 5:o.input=e.bytes();break;case 6:o.recipientAccount=i.proto.AccountID.decode(e,e.uint32());break;case 7:o.recipientContract=i.proto.ContractID.decode(e,e.uint32());break;case 8:o.targetedAddress=e.bytes();break;case 9:o.value=e.int64();break;case 10:o.gasUsed=e.int64();break;case 11:o.output=e.bytes();break;case 12:o.revertReason=e.bytes();break;case 13:o.error=e.bytes();break;case 14:o.callDepth=e.int32();break;case 15:o.callOperationType=e.int32();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractAction"},e}(),t.ContractBytecode=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractId=null,e.prototype.initcode=o.newBuffer([]),e.prototype.runtimeBytecode=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.contractId&&Object.hasOwnProperty.call(e,"contractId")&&i.proto.ContractID.encode(e.contractId,t.uint32(10).fork()).ldelim(),null!=e.initcode&&Object.hasOwnProperty.call(e,"initcode")&&t.uint32(18).bytes(e.initcode),null!=e.runtimeBytecode&&Object.hasOwnProperty.call(e,"runtimeBytecode")&&t.uint32(26).bytes(e.runtimeBytecode),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractBytecode;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractId=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.initcode=e.bytes();break;case 3:o.runtimeBytecode=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractBytecode"},e}(),t.ContractStateChanges=function(){function e(e){if(this.contractStateChanges=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractStateChanges=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.contractStateChanges&&e.contractStateChanges.length)for(var r=0;r<e.contractStateChanges.length;++r)i.proto.ContractStateChange.encode(e.contractStateChanges[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractStateChanges;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.contractStateChanges&&o.contractStateChanges.length||(o.contractStateChanges=[]),o.contractStateChanges.push(i.proto.ContractStateChange.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractStateChanges"},e}(),t.ContractStateChange=function(){function e(e){if(this.storageChanges=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.contractId=null,e.prototype.storageChanges=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.contractId&&Object.hasOwnProperty.call(e,"contractId")&&i.proto.ContractID.encode(e.contractId,t.uint32(10).fork()).ldelim(),null!=e.storageChanges&&e.storageChanges.length)for(var r=0;r<e.storageChanges.length;++r)i.proto.StorageChange.encode(e.storageChanges[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.ContractStateChange;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.contractId=i.proto.ContractID.decode(e,e.uint32());break;case 2:o.storageChanges&&o.storageChanges.length||(o.storageChanges=[]),o.storageChanges.push(i.proto.StorageChange.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.ContractStateChange"},e}(),t.StorageChange=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.slot=o.newBuffer([]),e.prototype.valueRead=o.newBuffer([]),e.prototype.valueWritten=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.slot&&Object.hasOwnProperty.call(e,"slot")&&t.uint32(10).bytes(e.slot),null!=e.valueRead&&Object.hasOwnProperty.call(e,"valueRead")&&t.uint32(18).bytes(e.valueRead),null!=e.valueWritten&&Object.hasOwnProperty.call(e,"valueWritten")&&i.google.protobuf.BytesValue.encode(e.valueWritten,t.uint32(26).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.StorageChange;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.slot=e.bytes();break;case 2:o.valueRead=e.bytes();break;case 3:o.valueWritten=i.google.protobuf.BytesValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.StorageChange"},e}(),t.HashAlgorithm=function(){const e={},t=Object.create(e);return t[e[0]="HASH_ALGORITHM_UNKNOWN"]=0,t[e[1]="SHA_384"]=1,t}(),t.HashObject=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.algorithm=0,e.prototype.length=0,e.prototype.hash=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.algorithm&&Object.hasOwnProperty.call(e,"algorithm")&&t.uint32(8).int32(e.algorithm),null!=e.length&&Object.hasOwnProperty.call(e,"length")&&t.uint32(16).int32(e.length),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(26).bytes(e.hash),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.HashObject;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.algorithm=e.int32();break;case 2:o.length=e.int32();break;case 3:o.hash=e.bytes();break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.HashObject"},e}(),t.RecordStreamFile=function(){function e(e){if(this.recordStreamItems=[],this.sidecars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.hapiProtoVersion=null,e.prototype.startObjectRunningHash=null,e.prototype.recordStreamItems=o.emptyArray,e.prototype.endObjectRunningHash=null,e.prototype.blockNumber=o.Long?o.Long.fromBits(0,0,!1):0,e.prototype.sidecars=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.hapiProtoVersion&&Object.hasOwnProperty.call(e,"hapiProtoVersion")&&i.proto.SemanticVersion.encode(e.hapiProtoVersion,t.uint32(10).fork()).ldelim(),null!=e.startObjectRunningHash&&Object.hasOwnProperty.call(e,"startObjectRunningHash")&&i.proto.HashObject.encode(e.startObjectRunningHash,t.uint32(18).fork()).ldelim(),null!=e.recordStreamItems&&e.recordStreamItems.length)for(var r=0;r<e.recordStreamItems.length;++r)i.proto.RecordStreamItem.encode(e.recordStreamItems[r],t.uint32(26).fork()).ldelim();if(null!=e.endObjectRunningHash&&Object.hasOwnProperty.call(e,"endObjectRunningHash")&&i.proto.HashObject.encode(e.endObjectRunningHash,t.uint32(34).fork()).ldelim(),null!=e.blockNumber&&Object.hasOwnProperty.call(e,"blockNumber")&&t.uint32(40).int64(e.blockNumber),null!=e.sidecars&&e.sidecars.length)for(r=0;r<e.sidecars.length;++r)i.proto.SidecarMetadata.encode(e.sidecars[r],t.uint32(50).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.RecordStreamFile;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.hapiProtoVersion=i.proto.SemanticVersion.decode(e,e.uint32());break;case 2:o.startObjectRunningHash=i.proto.HashObject.decode(e,e.uint32());break;case 3:o.recordStreamItems&&o.recordStreamItems.length||(o.recordStreamItems=[]),o.recordStreamItems.push(i.proto.RecordStreamItem.decode(e,e.uint32()));break;case 4:o.endObjectRunningHash=i.proto.HashObject.decode(e,e.uint32());break;case 5:o.blockNumber=e.int64();break;case 6:o.sidecars&&o.sidecars.length||(o.sidecars=[]),o.sidecars.push(i.proto.SidecarMetadata.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.RecordStreamFile"},e}(),t.RecordStreamItem=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.transaction=null,e.prototype.record=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&i.proto.Transaction.encode(e.transaction,t.uint32(10).fork()).ldelim(),null!=e.record&&Object.hasOwnProperty.call(e,"record")&&i.proto.TransactionRecord.encode(e.record,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.RecordStreamItem;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.transaction=i.proto.Transaction.decode(e,e.uint32());break;case 2:o.record=i.proto.TransactionRecord.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.RecordStreamItem"},e}(),t.SidecarMetadata=function(){function e(e){if(this.types=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.hash=null,e.prototype.id=0,e.prototype.types=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&i.proto.HashObject.encode(e.hash,t.uint32(10).fork()).ldelim(),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(16).int32(e.id),null!=e.types&&e.types.length){t.uint32(26).fork();for(var r=0;r<e.types.length;++r)t.int32(e.types[r]);t.ldelim()}return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SidecarMetadata;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.hash=i.proto.HashObject.decode(e,e.uint32());break;case 2:o.id=e.int32();break;case 3:if(o.types&&o.types.length||(o.types=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)o.types.push(e.int32());else o.types.push(e.int32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SidecarMetadata"},e}(),t.SidecarType=function(){const e={},t=Object.create(e);return t[e[0]="SIDECAR_TYPE_UNKNOWN"]=0,t[e[1]="CONTRACT_STATE_CHANGE"]=1,t[e[2]="CONTRACT_ACTION"]=2,t[e[3]="CONTRACT_BYTECODE"]=3,t}(),t.SidecarFile=function(){function e(e){if(this.sidecarRecords=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.sidecarRecords=o.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=n.create()),null!=e.sidecarRecords&&e.sidecarRecords.length)for(var r=0;r<e.sidecarRecords.length;++r)i.proto.TransactionSidecarRecord.encode(e.sidecarRecords[r],t.uint32(10).fork()).ldelim();return t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SidecarFile;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.sidecarRecords&&o.sidecarRecords.length||(o.sidecarRecords=[]),o.sidecarRecords.push(i.proto.TransactionSidecarRecord.decode(e,e.uint32()));else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SidecarFile"},e}(),t.TransactionSidecarRecord=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}let t;return e.prototype.consensusTimestamp=null,e.prototype.migration=!1,e.prototype.stateChanges=null,e.prototype.actions=null,e.prototype.bytecode=null,Object.defineProperty(e.prototype,"sidecarRecords",{get:o.oneOfGetter(t=["stateChanges","actions","bytecode"]),set:o.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.consensusTimestamp&&Object.hasOwnProperty.call(e,"consensusTimestamp")&&i.proto.Timestamp.encode(e.consensusTimestamp,t.uint32(10).fork()).ldelim(),null!=e.migration&&Object.hasOwnProperty.call(e,"migration")&&t.uint32(16).bool(e.migration),null!=e.stateChanges&&Object.hasOwnProperty.call(e,"stateChanges")&&i.proto.ContractStateChanges.encode(e.stateChanges,t.uint32(26).fork()).ldelim(),null!=e.actions&&Object.hasOwnProperty.call(e,"actions")&&i.proto.ContractActions.encode(e.actions,t.uint32(34).fork()).ldelim(),null!=e.bytecode&&Object.hasOwnProperty.call(e,"bytecode")&&i.proto.ContractBytecode.encode(e.bytecode,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.TransactionSidecarRecord;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.consensusTimestamp=i.proto.Timestamp.decode(e,e.uint32());break;case 2:o.migration=e.bool();break;case 3:o.stateChanges=i.proto.ContractStateChanges.decode(e,e.uint32());break;case 4:o.actions=i.proto.ContractActions.decode(e,e.uint32());break;case 5:o.bytecode=i.proto.ContractBytecode.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.TransactionSidecarRecord"},e}(),t.SignatureFile=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.fileSignature=null,e.prototype.metadataSignature=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.fileSignature&&Object.hasOwnProperty.call(e,"fileSignature")&&i.proto.SignatureObject.encode(e.fileSignature,t.uint32(10).fork()).ldelim(),null!=e.metadataSignature&&Object.hasOwnProperty.call(e,"metadataSignature")&&i.proto.SignatureObject.encode(e.metadataSignature,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SignatureFile;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.fileSignature=i.proto.SignatureObject.decode(e,e.uint32());break;case 2:o.metadataSignature=i.proto.SignatureObject.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SignatureFile"},e}(),t.SignatureObject=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.type=0,e.prototype.length=0,e.prototype.checksum=0,e.prototype.signature=o.newBuffer([]),e.prototype.hashObject=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.length&&Object.hasOwnProperty.call(e,"length")&&t.uint32(16).int32(e.length),null!=e.checksum&&Object.hasOwnProperty.call(e,"checksum")&&t.uint32(24).int32(e.checksum),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(34).bytes(e.signature),null!=e.hashObject&&Object.hasOwnProperty.call(e,"hashObject")&&i.proto.HashObject.encode(e.hashObject,t.uint32(42).fork()).ldelim(),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.proto.SignatureObject;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.type=e.int32();break;case 2:o.length=e.int32();break;case 3:o.checksum=e.int32();break;case 4:o.signature=e.bytes();break;case 5:o.hashObject=i.proto.HashObject.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/proto.SignatureObject"},e}(),t.SignatureType=function(){const e={},t=Object.create(e);return t[e[0]="SIGNATURE_TYPE_UNKNOWN"]=0,t[e[1]="SHA_384_WITH_RSA"]=1,t}(),t})(),proto.google=i.google=(()=>{const e={};return e.protobuf=function(){const e={};return e.DoubleValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(9).double(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.DoubleValue;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.double();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.DoubleValue"},e}(),e.FloatValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.FloatValue;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.float();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.FloatValue"},e}(),e.Int64Value=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=o.Long?o.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).int64(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.Int64Value;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.int64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.Int64Value"},e}(),e.UInt64Value=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=o.Long?o.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).uint64(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.UInt64Value;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.uint64();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.UInt64Value"},e}(),e.Int32Value=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).int32(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.Int32Value;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.int32();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.Int32Value"},e}(),e.UInt32Value=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).uint32(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.UInt32Value;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.uint32();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.UInt32Value"},e}(),e.BoolValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=!1,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).bool(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.BoolValue;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.bool();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.BoolValue"},e}(),e.StringValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(10).string(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.StringValue;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.string();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.StringValue"},e}(),e.BytesValue=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.value=o.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=n.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(10).bytes(e.value),t},e.decode=function(e,t){e instanceof r||(e=r.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new i.google.protobuf.BytesValue;e.pos<n;){var a=e.uint32();if(a>>>3==1)o.value=e.bytes();else e.skipType(7&a)}return o},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/google.protobuf.BytesValue"},e}(),e}(),e})(),proto}function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1,Object.defineProperty(lib,"__esModule",{value:!0}),lib.proto=lib.google=lib.com=lib.Writer=lib.Reader=void 0;var e,t,r=a(requireMinimal()),n=(e=requireUmd())&&e.__esModule?e:{default:e},o=a(requireProto());function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}function a(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}return null==(t=r.util).Long&&(console.log("Patching Protobuf Long.js instance..."),t.Long=n.default,null!=r.Reader._configure&&r.Reader._configure(r.BufferReader)),lib.Reader=r.Reader,lib.Writer=r.Writer,lib.proto=o.proto,lib.com=o.com,lib.google=o.google,lib}var libExports=requireLib();class HederaMirrorNode{constructor(e,t){this.network=e,this.baseUrl=this.getMirrorNodeUrl(),this.logger=t,this.isServerEnvironment="undefined"==typeof window}getMirrorNodeUrl(){return"mainnet"===this.network?"https://mainnet-public.mirrornode.hedera.com":"https://testnet.mirrornode.hedera.com"}getBaseUrl(){return this.baseUrl}async getPublicKey(e){this.logger.info(`Getting public key for account ${e}`);const t=await this.requestAccount(e);try{if(!t||!t.key)throw new Error(`Failed to retrieve public key for account ID: ${e}`);return i$8.fromString(t.key.key)}catch(r){const e=`Error fetching public key from Mirror Node: ${r.message}`;throw this.logger.error(e),new Error(e)}}async getAccountMemo(e){for(let r=0;r<3;r++)try{const t=`${this.baseUrl}/api/v1/accounts/${e}`,n=(await axios.get(t)).data;if(n&&n.memo)return n.memo;this.logger.error(`No memo found for account ${e}`),r<2&&await new Promise((e=>setTimeout(e,2e3)))}catch(t){const e=`Error getting account memo (attempt ${r+1}): ${t.message}`;this.logger.error(e),r<2&&await new Promise((e=>setTimeout(e,2e3)))}return null}async getTopicInfo(e){try{const t=`${this.baseUrl}/api/v1/topics/${e}`;return(await axios.get(t)).data}catch(t){const e=`Error retrieving topic information: ${t.message}`;throw this.logger.error(e),new Error(e)}}async getTopicFees(e){try{return(await this.getTopicInfo(e)).custom_fees}catch(t){const e=`Error retrieving topic fees: ${t.message}`;return this.logger.error(e),null}}async getHBARPrice(e){try{const t=s$a.fromDate(e).toString(),r=await fetch(`https://mainnet-public.mirrornode.hedera.com/api/v1/network/exchangerate?timestamp=${t}`),n=await r.json();return Number(n?.current_rate?.cent_equivalent)/Number(n?.current_rate?.hbar_equivalent)/100}catch(t){const e=`Error retrieving HBAR price: ${t.message}`;return this.logger.error(e),null}}async getTokenInfo(e){this.logger.debug(`Fetching token info for ${e}`);try{const t=`${this.baseUrl}/api/v1/tokens/${e}`,r=await axios.get(t);return r.data?(this.logger.trace(`Token info found for ${e}:`,r.data),r.data):(this.logger.warn(`No token info found for ${e}`),null)}catch(t){const r=`Error fetching token info for ${e}: ${t.message}`;return this.logger.error(r),null}}async getTopicMessages(e){this.logger.trace(`Querying messages for topic ${e}`);let t=`${this.baseUrl}/api/v1/topics/${e}/messages`;const r=[];for(;t;)try{const e=(await axios.get(t)).data;if(e.messages&&e.messages.length>0)for(const t of e.messages)try{if(!t.message)continue;let e,o;try{e=this.isServerEnvironment?Buffer.from(t.message,"base64").toString("utf-8"):(new TextDecoder).decode(Uint8Array.from(atob(t.message),(e=>e.charCodeAt(0))))}catch(n){const e=`Error decoding message: ${n}`;this.logger.error(e);continue}try{o=JSON.parse(e)}catch(n){const t=`Invalid JSON message content: ${e}`;return void this.logger.error(t)}o.sequence_number=t.sequence_number,r.push({...o,consensus_timestamp:t.consensus_timestamp,sequence_number:t.sequence_number,created:new Date(1e3*Number(t.consensus_timestamp))})}catch(n){const e=`Error processing message: ${n.message}`;this.logger.error(e)}t=e.links?.next?`${this.baseUrl}${e.links.next}`:""}catch(o){const t=`Error querying topic messages: ${o.message} on ${e}`;throw this.logger.error(t),new Error(t)}return r}async requestAccount(e){try{const t=`${this.baseUrl}/api/v1/accounts/${e}`,r=await axios.get(t);if(!r.data)throw new Error(`Failed to make request to mirror node for account: ${e}`);return r.data}catch(t){const e=`Failed to fetch account: ${t.message}`;throw this.logger.error(e),new Error(e)}}async checkKeyListAccess(e,t){try{const r=libExports.proto.Key.decode(e);return this.evaluateKeyAccess(r,t)}catch(r){const e=`Error decoding protobuf key: ${r.message}`;throw this.logger.error(e),new Error(e)}}async evaluateKeyAccess(e,t){return e.ed25519?this.compareEd25519Key(e.ed25519,t):e.keyList?this.evaluateKeyList(e.keyList,t):!(!e.thresholdKey||!e.thresholdKey.keys)&&this.evaluateKeyList(e.thresholdKey.keys,t)}async evaluateKeyList(e,t){const r=e.keys||[];for(const o of r)if(o)if(o.ed25519){if(this.compareEd25519Key(o.ed25519,t))return!0}else if(o.keyList||o.thresholdKey)try{const e=libExports.proto.Key.encode({...o.keyList?{keyList:o.keyList}:{},...o.thresholdKey?{thresholdKey:o.thresholdKey}:{}}).finish();if(await this.checkKeyListAccess(Buffer.from(e),t))return!0}catch(n){const e=`Error in nested key: ${n.message}`;this.logger.debug(e)}return!1}compareEd25519Key(e,t){try{return i$8.fromBytes(Buffer.from(e)).toString()===t.toString()}catch(r){const e=`Error comparing Ed25519 key: ${r.message}`;return this.logger.debug(e),!1}}}var ProfileType=(e=>(e[e.PERSONAL=0]="PERSONAL",e[e.AI_AGENT=1]="AI_AGENT",e))(ProfileType||{}),AIAgentType=(e=>(e[e.MANUAL=0]="MANUAL",e[e.AUTONOMOUS=1]="AUTONOMOUS",e))(AIAgentType||{}),EndpointType=(e=>(e[e.REST=0]="REST",e[e.WEBSOCKET=1]="WEBSOCKET",e[e.GRPC=2]="GRPC",e))(EndpointType||{}),AIAgentCapability=(e=>(e[e.TEXT_GENERATION=0]="TEXT_GENERATION",e[e.IMAGE_GENERATION=1]="IMAGE_GENERATION",e[e.AUDIO_GENERATION=2]="AUDIO_GENERATION",e[e.VIDEO_GENERATION=3]="VIDEO_GENERATION",e[e.CODE_GENERATION=4]="CODE_GENERATION",e[e.LANGUAGE_TRANSLATION=5]="LANGUAGE_TRANSLATION",e[e.SUMMARIZATION_EXTRACTION=6]="SUMMARIZATION_EXTRACTION",e[e.KNOWLEDGE_RETRIEVAL=7]="KNOWLEDGE_RETRIEVAL",e[e.DATA_INTEGRATION=8]="DATA_INTEGRATION",e[e.MARKET_INTELLIGENCE=9]="MARKET_INTELLIGENCE",e[e.TRANSACTION_ANALYTICS=10]="TRANSACTION_ANALYTICS",e[e.SMART_CONTRACT_AUDIT=11]="SMART_CONTRACT_AUDIT",e[e.GOVERNANCE_FACILITATION=12]="GOVERNANCE_FACILITATION",e[e.SECURITY_MONITORING=13]="SECURITY_MONITORING",e[e.COMPLIANCE_ANALYSIS=14]="COMPLIANCE_ANALYSIS",e[e.FRAUD_DETECTION=15]="FRAUD_DETECTION",e[e.MULTI_AGENT_COORDINATION=16]="MULTI_AGENT_COORDINATION",e[e.API_INTEGRATION=17]="API_INTEGRATION",e[e.WORKFLOW_AUTOMATION=18]="WORKFLOW_AUTOMATION",e))(AIAgentCapability||{}),InboundTopicType=(e=>(e.PUBLIC="PUBLIC",e.CONTROLLED="CONTROLLED",e.FEE_BASED="FEE_BASED",e))(InboundTopicType||{});const SUPPORTED_SOCIAL_PLATFORMS=["twitter","github","discord","telegram","linkedin","youtube","website","x"],capabilityNameToCapabilityMap={text_generation:0,image_generation:1,audio_generation:2,video_generation:3,code_generation:4,language_translation:5,summarization:6,extraction:6,knowledge_retrieval:7,data_integration:8,data_visualization:8,market_intelligence:9,transaction_analytics:10,smart_contract_audit:11,governance:12,security_monitoring:13,compliance_analysis:14,fraud_detection:15,multi_agent:16,api_integration:17,workflow_automation:18},SocialLinkSchema=z.object({platform:z.string().min(1),handle:z.string().min(1)}),AIAgentDetailsSchema=z.object({type:z.nativeEnum(AIAgentType),capabilities:z.array(z.nativeEnum(AIAgentCapability)).min(1),model:z.string().min(1),creator:z.string().optional()}),BaseProfileSchema=z.object({version:z.string().min(1),type:z.nativeEnum(ProfileType),display_name:z.string().min(1),alias:z.string().optional(),bio:z.string().optional(),socials:z.array(SocialLinkSchema).optional(),profileImage:z.string().optional(),properties:z.record(z.any()).optional(),inboundTopicId:z.string().optional(),outboundTopicId:z.string().optional()}),PersonalProfileSchema=BaseProfileSchema.extend({type:z.literal(ProfileType.PERSONAL),language:z.string().optional(),timezone:z.string().optional()}),AIAgentProfileSchema=BaseProfileSchema.extend({type:z.literal(ProfileType.AI_AGENT),aiAgent:AIAgentDetailsSchema}),HCS11ProfileSchema=z.union([PersonalProfileSchema,AIAgentProfileSchema]);class HCS11Client{constructor(e){if(this.client="mainnet"===e.network?i$1.forMainnet():i$1.forTestnet(),this.auth=e.auth,this.network=e.network,this.mirrorNode=new HederaMirrorNode(this.network,this.logger),this.auth.privateKey){const e=y.fromString(this.auth.privateKey);this.client.setOperator(this.auth.operatorId,e)}this.logger=Logger$2.getInstance({level:e.logLevel||"info",module:"HCS-11"})}getClient(){return this.client}getOperatorId(){return this.auth.operatorId}createPersonalProfile(e,t){return{version:"1.0",type:ProfileType.PERSONAL,display_name:e,alias:t?.alias,bio:t?.bio,socials:t?.socials,profileImage:t?.profileImage,properties:t?.properties,inboundTopicId:t?.inboundTopicId,outboundTopicId:t?.outboundTopicId}}createAIAgentProfile(e,t,r,n,o){const i=this.validateProfile({version:"1.0",type:ProfileType.AI_AGENT,display_name:e,alias:o?.alias,bio:o?.bio,socials:o?.socials,profileImage:o?.profileImage,properties:o?.properties,inboundTopicId:o?.inboundTopicId,outboundTopicId:o?.outboundTopicId,aiAgent:{type:t,capabilities:r,model:n,creator:o?.creator}});if(!i.valid)throw new Error(`Invalid AI Agent Profile: ${i.errors.join(", ")}`);return{version:"1.0",type:ProfileType.AI_AGENT,display_name:e,alias:o?.alias,bio:o?.bio,socials:o?.socials,profileImage:o?.profileImage,properties:o?.properties,inboundTopicId:o?.inboundTopicId,outboundTopicId:o?.outboundTopicId,aiAgent:{type:t,capabilities:r,model:n,creator:o?.creator}}}validateProfile(e){const t=HCS11ProfileSchema.safeParse(e);if(t.success)return{valid:!0,errors:[]};return{valid:!1,errors:t.error.errors.map((e=>{const t=e.path.join(".");let r=e.message;if("invalid_type"===e.code)r=`Expected ${e.expected}, got ${e.received}`;else if("invalid_enum_value"===e.code){const t=e.options?.join(", ");r=`Invalid value. Valid options are: ${t}`}else"too_small"===e.code&&"string"===e.type&&(r="Cannot be empty");return`${t}: ${r}`}))}}profileToJSONString(e){return JSON.stringify(e)}parseProfileFromString(e){try{const t=JSON.parse(e),r=this.validateProfile(t);return r.valid?t:(this.logger.error("Invalid profile format:",r.errors),null)}catch(t){return this.logger.error("Error parsing profile:"),null}}setProfileForAccountMemo(e,t=1){return`hcs-11:hcs://${t}/${e}`}async executeTransaction(e){try{if(this.auth.privateKey){const t=await e.signWithOperator(this.client),r=await t.execute(this.client),n=await r.getReceipt(this.client);return n.status.toString()!==e$6.Success.toString()?{success:!1,error:`Transaction failed: ${n.status.toString()}`}:{success:!0,result:n}}if(!this.auth.signer)throw new Error("No valid authentication method provided");const t=this.auth.signer,r=await e.freezeWithSigner(t),n=await r.executeWithSigner(t),o=await n.getReceiptWithSigner(t);return o.status.toString()!==e$6.Success.toString()?{success:!1,error:`Transaction failed: ${o.status.toString()}: ${e$6.Success.toString()}`}:{success:!0,result:o}}catch(t){return{success:!1,error:t instanceof Error?t.message:"Unknown error during transaction execution"}}}async inscribeImage(e,t,r){try{const n=r?.progressCallback,o=new ProgressReporter({module:"HCS11-Image",logger:this.logger,callback:n});o.preparing("Preparing to inscribe image",0);const i=mimeTypesExports.lookup(t)||"application/octet-stream",a=r?.waitForConfirmation??!0;let s;if(this.auth.signer){if(!("accountId"in this.auth.signer))throw o.failed("Signer must be a DAppSigner for inscription"),new Error("Signer must be a DAppSigner for inscription");o.preparing("Using signer for inscription",10),s=await inscribeWithSigner({type:"buffer",buffer:e,fileName:t,mimeType:i},this.auth.signer,{network:this.network,waitForConfirmation:a,waitMaxAttempts:150,waitIntervalMs:4e3,logging:{level:"debug"},progressCallback:e=>{const t=10+.8*(e.progressPercent||0);o.report({stage:e.stage,message:e.message,progressPercent:t,details:e.details})}})}else{if(!this.auth.privateKey)throw o.failed("Private key is required for inscription"),this.logger.error("Private key is required for inscription"),new Error("Private key is required for inscription");o.preparing("Using private key for inscription",10),s=await inscribe({type:"buffer",buffer:e,fileName:t,mimeType:i},{accountId:this.auth.operatorId,privateKey:this.auth.privateKey,network:this.network},{waitForConfirmation:a,waitMaxAttempts:150,waitIntervalMs:2e3,logging:{level:"debug"},progressCallback:e=>{const t=10+.8*(e.progressPercent||0);o.report({stage:e.stage,message:e.message,progressPercent:t,details:e.details})}})}return s.confirmed?(o.completed("Image inscription completed",{topic_id:s.inscription.topic_id}),{imageTopicId:s.inscription.topic_id||"",transactionId:s.result.jobId,success:!0}):(o.verifying("Waiting for inscription confirmation",50,{jobId:s.result.jobId}),{imageTopicId:"",transactionId:s.result.jobId,success:!1,error:"Inscription not confirmed"})}catch(n){return this.logger.error("Error inscribing image:",n),{imageTopicId:"",transactionId:"",success:!1,error:n.message||"Error inscribing image"}}}async inscribeProfile(e,t){this.logger.info("Inscribing HCS-11 profile");const r=t?.progressCallback,n=new ProgressReporter({module:"HCS11-Profile",logger:this.logger,callback:r});n.preparing("Validating profile data",5);const o=this.validateProfile(e);if(!o.valid)return n.failed(`Invalid profile: ${o.errors.join(", ")}`),{profileTopicId:"",transactionId:"",success:!1,error:`Invalid profile: ${o.errors.join(", ")}`};n.preparing("Formatting profile for inscription",15);const i=this.profileToJSONString(e),a=`profile-${e.display_name.toLowerCase().replace(/\s+/g,"-")}.json`;try{const e=Buffer.from(i,"utf-8"),t="application/json";n.preparing("Preparing profile for inscription",20);const r={type:"buffer",buffer:e,fileName:a,mimeType:t},o={waitForConfirmation:!0,mode:"file",network:this.network,waitMaxAttempts:100,waitIntervalMs:2e3,progressCallback:e=>{const t=20+.75*Number(e?.progressPercent||0);n?.report({stage:e.stage,message:e.message,progressPercent:t,details:e.details})}};n.submitting("Submitting profile to Hedera network",30);const s=this.auth.privateKey?await inscribe(r,{accountId:this.auth.operatorId,privateKey:this.auth.privateKey,network:this.network},o):await inscribeWithSigner(r,this.auth.signer,o);if(!s.confirmed||!s.inscription.topic_id)return n.failed("Failed to inscribe profile content"),{profileTopicId:"",transactionId:"",success:!1,error:"Failed to inscribe profile content"};const c=s.inscription.topic_id;return n.completed("Profile inscription completed",{topicId:c,transactionId:s.result.transactionId}),{profileTopicId:c,transactionId:s.result.transactionId,success:!0}}catch(s){return n.failed(`Error inscribing profile: ${s.message||"Unknown error"}`),{profileTopicId:"",transactionId:"",success:!1,error:s.message||"Unknown error during inscription"}}}async updateAccountMemoWithProfile(e,t){try{this.logger.info(`Updating account memo for ${e} with profile ${t}`);const r=this.setProfileForAccountMemo(t),n=(new s$4).setAccountMemo(r).setAccountId(e);return this.executeTransaction(n)}catch(r){return this.logger.error(`Error updating account memo: ${r instanceof Error?r.message:"Unknown error"}`),{success:!1,error:r instanceof Error?r.message:"Unknown error updating account memo"}}}async createAndInscribeProfile(e,t=!0,r){const n=r?.progressCallback,o=new ProgressReporter({module:"HCS11-ProfileCreation",logger:this.logger,callback:n});o.preparing("Starting profile creation process",0);const i=o.createSubProgress({minPercent:0,maxPercent:80,logPrefix:"Inscription"}),a=await this.inscribeProfile(e,{...r,progressCallback:e=>{i.report({stage:e.stage,message:e.message,progressPercent:e.progressPercent,details:e.details})}});if(!a?.success)return o.failed("Profile inscription failed",{error:a?.error}),a;if(o.confirming("Profile inscribed, updating account memo",85),t){const e=await this.updateAccountMemoWithProfile(this.auth.operatorId,a.profileTopicId);if(!e.success)return o.failed("Failed to update account memo",{error:e?.error}),{...a,success:!1,error:e?.error}}return o.completed("Profile creation completed successfully",{profileTopicId:a.profileTopicId,transactionId:a.transactionId}),a}async getCapabilitiesFromTags(e){const t=[];if(0===e.length)return[AIAgentCapability.TEXT_GENERATION];for(const r of e){const e=capabilityNameToCapabilityMap[r.toLowerCase()];void 0===e||t.includes(e)||t.push(e)}return 0===t.length&&t.push(AIAgentCapability.TEXT_GENERATION),t}getAgentTypeFromMetadata(e){return"autonomous"===e.type?AIAgentType.AUTONOMOUS:AIAgentType.MANUAL}async fetchProfileByAccountId(e,t){try{this.logger.info(`Fetching profile for account ${e.toString()} on ${this.network}`);const n=await this.mirrorNode.getAccountMemo(e.toString());if(this.logger.info(`Got account memo: ${n}`),!n?.startsWith("hcs-11:"))return{success:!1,error:`Account ${e.toString()} does not have a valid HCS-11 memo`};this.logger.info(`Found HCS-11 memo: ${n}`);const o=n.substring(7);if(!o?.startsWith("hcs://")){if(o.startsWith("ipfs://")){this.logger.warn("IPFS protocol references are not fully supported");const e=await fetch(`https://ipfs.io/ipfs/${o.replace("ipfs://","")}`),t=await e.json();return{success:!0,profile:t,topicInfo:{inboundTopic:t.inboundTopicId,outboundTopic:t.outboundTopicId,profileTopicId:t.profileTopicId}}}if(o.startsWith("ar://")){const e=o.replace("ar://",""),t=await fetch(`https://arweave.net/${e}`);if(!t.ok)return{success:!1,error:`Failed to fetch profile from Arweave ${e}: ${t.statusText}`};const r=await t.json();return{success:!0,profile:r,topicInfo:{inboundTopic:r.inboundTopicId,outboundTopic:r.outboundTopicId,profileTopicId:r.profileTopicId}}}return{success:!1,error:`Invalid protocol reference format: ${o}`}}{const e=o.match(/hcs:\/\/(\d+)\/(.+)/);if(!e)return{success:!1,error:`Invalid HCS protocol reference format: ${o}`};const[n,i,a]=e,s=t||this.network||"mainnet";this.logger.info(`Retrieving profile from Kiloscribe CDN: ${a}`);const c=`https://kiloscribe.com/api/inscription-cdn/${a}?network=${s}`;try{const e=await fetch(c);if(!e.ok)return{success:!1,error:`Failed to fetch profile from Kiloscribe CDN: ${e.statusText}`};const t=await e.json();return t?{success:!0,profile:t,topicInfo:{inboundTopic:t.inboundTopicId,outboundTopic:t.outboundTopicId,profileTopicId:a}}:{success:!1,error:`No profile data found for topic ${a}`}}catch(r){return this.logger.error(`Error retrieving from Kiloscribe CDN: ${r.message}`),{success:!1,error:`Error retrieving from Kiloscribe CDN: ${r.message}`}}}}catch(n){return this.logger.error(`Error fetching profile: ${n.message}`),{success:!1,error:`Error fetching profile: ${n.message}`}}}}const sleep=e=>new Promise((t=>setTimeout(t,e)));class Registration{async checkRegistrationStatus(e,t,r,n){try{const o=await fetch(`${r}/api/request-confirm`,{method:"POST",headers:{"Content-Type":"application/json","X-Network":t},body:JSON.stringify({transaction_id:e})});if(!o.ok){const e=`Failed to confirm registration: ${o.statusText}`;throw n&&n.error(e),new Error(e)}return await o.json()}catch(o){throw n&&n.error(`Error checking registration status: ${o.message}`),o}}async waitForRegistrationConfirmation(e,t,r,n=60,o=2e3,i){let a=0;for(;a<n;){i&&i.info(`Checking registration status. Attempt ${a+1}/${n}`);const s=await this.checkRegistrationStatus(e,t,r,i);if("success"===s.status)return i&&i.info("Registration confirmed successfully"),!0;if("failed"===s.status)throw i&&i.error("Registration confirmation failed"),new Error("Registration confirmation failed");i&&i.info(`Registration still pending. Waiting ${o}ms before next attempt`),await new Promise((e=>setTimeout(e,o))),a++}return i&&i.warn(`Registration not confirmed after ${n} attempts`),!1}async executeRegistration(e,t="mainnet",r="https://moonscape.tech",n){try{n&&n.info("Registering agent with guarded registry");try{const r=new HCS11Client({network:t,auth:{operatorId:"0.0.0"}});n?.info(`Fetching profile by account ID ${e} on ${t}`),await sleep(5e3);const o=await r.fetchProfileByAccountId(e,t);if(n?.info("Profile fetched",o),o?.error)return n?.error("Error fetching profile",o.error),{error:o.error,success:!1};if(!o?.success||!o?.profile)return n&&n.error("Profile not found for agent registration"),{error:"Profile not found for the provided account ID",success:!1};if(!o.profile.inboundTopicId)return n&&n.error("Missing inbound topic ID in profile"),{error:"Profile is missing required inbound topic ID",success:!1};if(!o.profile.outboundTopicId)return n&&n.error("Missing outbound topic ID in profile"),{error:"Profile is missing required outbound topic ID",success:!1};n&&n.info(`Profile validation successful. Inbound topic: ${o.profile.inboundTopicId}, Outbound topic: ${o.profile.outboundTopicId}`)}catch(o){return n&&n.error(`Error validating profile: ${o.message}`),{error:`Error validating profile: ${o.message}`,success:!1}}const i=await fetch(`${r}/api/request-register`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"*/*","Accept-Language":"en;q=0.5",Origin:r,Referer:`${r}/`,"X-Network":t},body:JSON.stringify({accountId:e})}),a=await i.json();return i.ok?(n&&n.info(`Created new registration request. Transaction ID: ${a.transaction_id}`),{transactionId:a.transaction_id,transaction:a.transaction,success:!0}):a.details?.length>0?{validationErrors:a.details,error:a.error||"Validation failed",success:!1}:{error:a.error||"Failed to register agent",success:!1}}catch(i){return{error:`Error during registration request: ${i.message}`,success:!1}}}async findRegistrations(e={},t="https://moonscape.tech"){try{const r=new URLSearchParams;e.tags?.forEach((e=>r.append("tags",e))),e.accountId&&r.append("accountId",e.accountId),e.network&&r.append("network",e.network);const n=await fetch(`${t}/api/registrations?${r}`,{headers:{Accept:"*/*","Accept-Language":"en;q=0.5",Origin:t,Referer:`${t}/`}});if(!n.ok){return{registrations:[],error:await n.text()||"Failed to fetch registrations",success:!1}}const o=await n.json();return o.error?{registrations:[],error:o.error,success:!1}:{registrations:o.registrations||[],success:!0}}catch(r){return{registrations:[],error:`Error fetching registrations: ${r.message}`,success:!1}}}}var Hcs10MemoType=(e=>(e.INBOUND="inbound",e.OUTBOUND="outbound",e.CONNECTION="connection",e))(Hcs10MemoType||{});class HCS10BaseClient extends Registration{constructor(e){super(),this.network=e.network,this.logger=Logger$2.getInstance({level:e.logLevel||"info",module:"HCS10-BaseClient",prettyPrint:e.prettyPrint}),this.mirrorNode=new HederaMirrorNode(e.network,this.logger),this.feeAmount=e.feeAmount||.001}extractTopicFromOperatorId(e){if(!e)return"";const t=e.split("@");return t.length>0?t[0]:""}extractAccountFromOperatorId(e){if(!e)return"";const t=e.split("@");return t.length>1?t[1]:""}async getMessageStream(e){try{const t=await this.mirrorNode.getTopicMessages(e),r=["message","close_connection"];return{messages:t.filter((e=>{if("hcs-10"!==e.p||!r.includes(e.op))return!1;if("message"===e.op){if(!e.data)return!1;if(!e.operator_id)return!1;if(!this.isValidOperatorId(e.operator_id))return!1}if("close_connection"===e.op){if(!e.operator_id)return!1;if(!this.isValidOperatorId(e.operator_id))return!1}return!0}))}}catch(t){return this.logger&&this.logger.error(`Error fetching messages: ${t.message}`),{messages:[]}}}async getPublicTopicInfo(e){try{return await this.mirrorNode.getTopicInfo(e)}catch(t){return this.logger.error(`Error getting public topic info for ${e}:`,t),null}}async canSubmitToTopic(e,t){try{const n=await this.mirrorNode.getTopicInfo(e);if(!n)return{canSubmit:!1,requiresFee:!1,reason:"Topic does not exist"};if(!n.submit_key?.key)return{canSubmit:!0,requiresFee:!1};try{const e=await this.mirrorNode.getPublicKey(t);if("ProtobufEncoded"===n.submit_key._type){const t=Buffer.from(n.submit_key.key,"hex");if(await this.mirrorNode.checkKeyListAccess(t,e))return{canSubmit:!0,requiresFee:!1}}else{const t=i$8.fromString(n.submit_key.key);if(e.toString()===t.toString())return{canSubmit:!0,requiresFee:!1}}}catch(r){this.logger.error(`Key validation error: ${r instanceof Error?r.message:String(r)}`)}return n.fee_schedule_key?.key&&n.custom_fees?.fixed_fees?.length>0?{canSubmit:!0,requiresFee:!0,reason:"Requires fee payment via HIP-991"}:{canSubmit:!1,requiresFee:!1,reason:"User does not have submit permission for this topic"}}catch(r){const e=r instanceof Error?r.message:String(r);return this.logger.error(`Topic submission validation error: ${e}`),{canSubmit:!1,requiresFee:!1,reason:`Error: ${e}`}}}async getMessages(e){try{const t=await this.mirrorNode.getTopicMessages(e);return{messages:t.filter((e=>{if("hcs-10"!==e.p)return!1;if("message"===e.op){if(!e.data)return!1;if(e.operator_id&&!this.isValidOperatorId(e.operator_id))return!1}return!0}))}}catch(t){return this.logger&&this.logger.error(`Error fetching messages: ${t.message}`),{messages:[]}}}async requestAccount(e){try{return await this.mirrorNode.requestAccount(e)}catch(t){throw this.logger.error("Failed to fetch account",t),t}}async getAccountMemo(e){return await this.mirrorNode.getAccountMemo(e)}async retrieveProfile(e,t){this.logger.debug(`Retrieving profile for account: ${e}`);const r=`${e}-${this.network}`;if(!t){const t=HCS10Cache.getInstance().get(r);if(t)return this.logger.debug(`Cache hit for profile: ${e}`),t}try{const t=new HCS11Client({network:this.network,auth:{operatorId:"0.0.0"},logLevel:"info"}),n=await t.fetchProfileByAccountId(e,this.network);if(!n?.success)return this.logger.error(`Failed to retrieve profile for account ID: ${e}`,n?.error),{profile:null,success:!1,error:n?.error||`Failed to retrieve profile for account ID: ${e}`};const o=n.profile;let i=null;n.topicInfo?.inboundTopic&&n.topicInfo?.outboundTopic&&n.topicInfo?.profileTopicId&&(i={inboundTopic:n.topicInfo.inboundTopic,outboundTopic:n.topicInfo.outboundTopic,profileTopicId:n.topicInfo.profileTopicId});const a={profile:o,topicInfo:i,success:!0};return HCS10Cache.getInstance().set(r,a),a}catch(n){const e=`Failed to retrieve profile: ${n.message}`;return this.logger.error(e),{profile:null,success:!1,error:e}}}async retrieveOutboundConnectTopic(e){return await this.retrieveCommunicationTopics(e,!0)}async retrieveCommunicationTopics(e,t){try{const r=await this.retrieveProfile(e,t);if(!r?.success)throw new Error(r.error||"Failed to retrieve profile");const n=r.profile;if(!n.inboundTopicId||!n.outboundTopicId)throw new Error("Invalid HCS-11 profile for HCS-10 agent: missing inboundTopicId or outboundTopicId");if(!r.topicInfo)throw new Error(`TopicInfo is missing in the profile for account ${e}`);return r.topicInfo}catch(r){const e=r,t=`Failed to retrieve topic info: ${e.message}`;throw this.logger.error(t),e}}async retrieveOutboundMessages(e){try{const t=await this.retrieveCommunicationTopics(e);if(!t)return this.logger.warn(`No outbound connect topic found for agentAccountId: ${e}`),[];return(await this.getMessages(t.outboundTopic)).messages.filter((e=>"hcs-10"===e.p&&("connection_request"===e.op||"connection_created"===e.op||"message"===e.op)))}catch(t){const e=`Failed to retrieve outbound messages: ${t.message}`;return this.logger.error(e),[]}}async hasConnectionCreated(e,t){try{const r=await this.retrieveCommunicationTopics(e);return(await this.retrieveOutboundMessages(r.outboundTopic)).some((e=>"connection_created"===e.op&&e.connection_id===t))}catch(r){const e=`Failed to check connection created: ${r.message}`;return this.logger.error(e),!1}}async getMessageContent(e){const t=e.match(/^hcs:\/\/(\d+)\/([0-9.]+)$/);if(!t)return e;const[r,n,o]=t;this.logger.info(`Resolving HRL reference: standard=${n}, topicId=${o}`);try{const e=`https://kiloscribe.com/api/inscription-cdn/${o}?network=${this.network}`,t=await axios.get(e);if(!t.data)throw new Error(`Failed to fetch content from topic: ${o}`);return t.data.content||t.data.text||JSON.stringify(t.data)}catch(i){const e=`Error resolving HRL reference: ${i.message}`;throw this.logger.error(e),new Error(e)}}async submitConnectionRequest(e,t){const r=this.getAccountAndSigner();if(!r?.accountId)throw new Error("Operator account ID is not set");const n=await this.getOperatorId(),o=r.accountId,i=await this.canSubmitToTopic(e,o);if(!i?.canSubmit)throw new Error(`Cannot submit to topic: ${i.reason}`);const a=await this.retrieveInboundAccountId(e);if(!a)throw new Error("Failed to retrieve topic info account ID");const s={p:"hcs-10",op:"connection_request",operator_id:n,m:t},c=i.requiresFee,u=await this.submitPayload(e,s,void 0,c);this.logger.info(`Submitted connection request to topic ID: ${e}`);const l=await this.retrieveCommunicationTopics(o);if(!l)throw new Error("Failed to retrieve outbound topic");const d=u.topicSequenceNumber?.toNumber();if(!d)throw new Error("Failed to get response sequence number");const p=`${e}@${a}`;return await this.submitPayload(l.outboundTopic,{...s,outbound_topic_id:l.outboundTopic,connection_request_id:d,operator_id:p}),u}async recordOutboundConnectionConfirmation({outboundTopicId:e,requestorOutboundTopicId:t,connectionRequestId:r,confirmedRequestId:n,connectionTopicId:o,operatorId:i,memo:a}){const s={p:"hcs-10",op:"connection_created",connection_topic_id:o,outbound_topic_id:e,requestor_outbound_topic_id:t,confirmed_request_id:n,connection_request_id:r,operator_id:i,m:a};return await this.submitPayload(e,s)}async waitForConnectionConfirmation(e,t,r=60,n=2e3,o=!0){this.logger.info(`Waiting for connection confirmation on inbound topic ${e} for request ID ${t}`);for(let i=0;i<r;i++){this.logger.info(`Attempt ${i+1}/${r} to find connection confirmation`);const a=(await this.mirrorNode.getTopicMessages(e)).filter((e=>"connection_created"===e.op));if(this.logger.info(`Found ${a.length} connection_created messages`),a.length>0)for(const e of a)if(Number(e.connection_id)===Number(t)){const r={connectionTopicId:e.connection_topic_id,sequence_number:Number(e.sequence_number),confirmedBy:e.operator_id,memo:e.m},n=this.extractAccountFromOperatorId(r.confirmedBy),i=this.getAccountAndSigner(),a=await this.retrieveCommunicationTopics(n),s=await this.retrieveCommunicationTopics(i.accountId);return this.logger.info("Connection confirmation found",r),o&&await this.recordOutboundConnectionConfirmation({requestorOutboundTopicId:a.outboundTopic,outboundTopicId:s.outboundTopic,connectionRequestId:t,confirmedRequestId:r.sequence_number,connectionTopicId:r.connectionTopicId,operatorId:r.confirmedBy,memo:r.memo||"Connection confirmed"}),r}i<r-1&&(this.logger.info(`No matching confirmation found, waiting ${n}ms before retrying...`),await new Promise((e=>setTimeout(e,n))))}throw new Error(`Connection confirmation not found after ${r} attempts for request ID ${t}`)}async getOperatorId(e){if(this.operatorId&&!e)return this.operatorId;const t=this.getAccountAndSigner();if(!t.accountId)throw new Error("Operator ID not found");const r=await this.retrieveProfile(t.accountId);if(!r.success)throw new Error("Failed to retrieve profile");const n=`${r.topicInfo?.inboundTopic}@${t.accountId}`;return this.operatorId=n,n}async retrieveInboundAccountId(e){const t=await this.mirrorNode.getTopicInfo(e);if(!t?.memo)throw new Error("Failed to retrieve topic info");const r=t.memo.toString().split(":"),n=r?.[4];if(!n)throw new Error("Failed to retrieve topic info account ID");return n}clearCache(){HCS10Cache.getInstance().clear()}_generateHcs10Memo(e,t){const r=t.ttl??60;switch(e){case"inbound":if(!t.accountId)throw new Error("accountId is required for inbound memo");return`hcs-10:0:${r}:0:${t.accountId}`;case"outbound":return`hcs-10:0:${r}:1`;case"connection":if(!t.inboundTopicId||void 0===t.connectionId)throw new Error("inboundTopicId and connectionId are required for connection memo");return`hcs-10:1:${r}:2:${t.inboundTopicId}:${t.connectionId}`;default:throw new Error(`Invalid HCS-10 memo type: ${e}`)}}async checkRegistrationStatus(e,t,r){try{const n=await fetch(`${r}/api/request-confirm`,{method:"POST",headers:{"Content-Type":"application/json","X-Network":t},body:JSON.stringify({transaction_id:e})});if(!n.ok)throw new Error(`Failed to confirm registration: ${n.statusText}`);return await n.json()}catch(n){const e=n,t=`Error checking registration status: ${e.message}`;throw this.logger.error(t),e}}isValidOperatorId(e){if(!e)return!1;const t=e.split("@");if(2!==t.length)return!1;const r=t[0],n=t[1];if(!r)return!1;if(!n)return!1;const o=/^[0-9]+\.[0-9]+\.[0-9]+$/;return!!o.test(n)&&!!o.test(r)}}class HCS10Cache{constructor(){this.CACHE_TTL=36e5,this.cache=new Map,this.cacheExpiry=new Map}static getInstance(){return HCS10Cache.instance||(HCS10Cache.instance=new HCS10Cache),HCS10Cache.instance}set(e,t){this.cache.set(e,t),this.cacheExpiry.set(e,Date.now()+this.CACHE_TTL)}get(e){const t=this.cacheExpiry.get(e);if(t&&t>Date.now())return this.cache.get(e);t&&(this.cache.delete(e),this.cacheExpiry.delete(e))}clear(){this.cache.clear(),this.cacheExpiry.clear()}}class PayloadSizeError extends Error{constructor(e,t){super(e),this.payloadSize=t,this.name="PayloadSizeError"}}class AccountCreationError extends Error{constructor(e){super(e),this.name="AccountCreationError"}}class TopicCreationError extends Error{constructor(e){super(e),this.name="TopicCreationError"}}class ConnectionConfirmationError extends Error{constructor(e){super(e),this.name="ConnectionConfirmationError"}}class AgentBuilder{constructor(){this.config={},this.logger=Logger$2.getInstance({module:"AgentBuilder"})}setName(e){return this.config.name=e,this}setAlias(e){return this.config.alias=e,this}setBio(e){return this.config.bio=e,this}setDescription(e){return this.config.bio=e,this}setCapabilities(e){return this.config.capabilities=e,this}setAgentType(e){return this.config.metadata?this.config.metadata.type=e:this.config.metadata={type:e},this}setType(e){return this.config.metadata?this.config.metadata.type=e:this.config.metadata={type:e},this}setModel(e){return this.config.metadata||(this.config.metadata={type:"manual"}),this.config.metadata.model=e,this}setCreator(e){return this.config.metadata||(this.config.metadata={type:"manual"}),this.config.metadata.creator=e,this}addSocial(e,t){return this.config.metadata||(this.config.metadata={type:"manual"}),this.config.metadata.socials||(this.config.metadata.socials={}),this.config.metadata.socials[e]=t,this}addProperty(e,t){return this.config.metadata||(this.config.metadata={type:"manual"}),this.config.metadata.properties||(this.config.metadata.properties={}),this.config.metadata.properties[e]=t,this}setMetadata(e){return this.config.metadata=e,this}setProfilePicture(e,t){return this.config.pfpBuffer=e,this.config.pfpFileName=t,this}setExistingProfilePicture(e){return this.config.existingPfpTopicId=e,this}setNetwork(e){return this.config.network=e,this}setInboundTopicType(e){return this.config.inboundTopicType=e,this}setFeeConfig(e){return this.config.feeConfig=e,this}setConnectionFeeConfig(e){return this.config.connectionFeeConfig=e,this}setExistingAccount(e,t){return this.config.existingAccount={accountId:e,privateKey:t},this}build(){if(!this.config.name)throw new Error("Agent display name is required");if(this.config.bio||this.logger?.warn("Agent description is not set"),this.config.pfpBuffer||this.config.existingPfpTopicId||this.logger.warn("No profile picture provided or referenced."),!this.config.network)throw new Error("Network is required");if(this.config.inboundTopicType||(this.config.inboundTopicType=InboundTopicType.PUBLIC),this.config.capabilities||(this.config.capabilities=[]),this.config.metadata?this.config.metadata.type||(this.config.metadata.type="manual"):this.config.metadata={type:"manual"},this.config.inboundTopicType===InboundTopicType.FEE_BASED&&!this.config.feeConfig)throw new Error("Fee configuration is required for fee-based topics");return this.config}}class PersonBuilder{constructor(){this.config={version:"1.0",type:0},this.logger=Logger$2.getInstance({module:"PersonBuilder"})}setName(e){return this.config.display_name=e,this}setAlias(e){return this.config.alias=e,this}setBio(e){return this.config.bio=e,this}setDescription(e){return this.setBio(e)}addSocial(e,t){this.config.socials||(this.config.socials=[]);const r=this.config.socials.find((t=>t.platform===e));return r?r.handle=t:this.config.socials.push({platform:e,handle:t}),this}setProfileImage(e){return this.config.profileImage=e,this}setProfilePicture(e,t){return this.config.pfpBuffer=e,this.config.pfpFileName=t,this}setExistingProfilePicture(e){return this.config.profileImage=`hcs://1/${e}`,this}addProperty(e,t){return this.config.properties||(this.config.properties={}),this.config.properties[e]=t,this}setInboundTopicId(e){return this.config.inboundTopicId=e,this}setOutboundTopicId(e){return this.config.outboundTopicId=e,this}getProfilePicture(){return{pfpBuffer:this.config.pfpBuffer,pfpFileName:this.config.pfpFileName}}build(){if(!this.config.display_name)throw new Error("Display name is required for the profile");return this.config.bio||this.logger.warn("No bio provided for person profile"),this.config.pfpBuffer||this.config.profileImage||this.logger.warn("No profile picture provided or referenced"),{version:this.config.version,type:0,display_name:this.config.display_name,alias:this.config.alias,bio:this.config.bio,socials:this.config.socials,profileImage:this.config.profileImage,properties:this.config.properties,inboundTopicId:this.config.inboundTopicId,outboundTopicId:this.config.outboundTopicId,pfpBuffer:this.config.pfpBuffer,pfpFileName:this.config.pfpFileName}}}async function accountIdsToExemptKeys(e,t,r){const n=new HederaMirrorNode(t,r),o=[];for(const a of e)try{const e=await n.getPublicKey(a);o.push(e)}catch(i){r&&r.warn(`Could not get public key for account ${a}: ${i}`)}return o}class HCS10Client extends HCS10BaseClient{constructor(e){super({network:e.network,logLevel:e.logLevel,prettyPrint:e.prettyPrint,feeAmount:e.feeAmount}),this.client="mainnet"===e.network?i$1.forMainnet():i$1.forTestnet(),this.operatorPrivateKey=y.fromString(e.operatorPrivateKey),this.network=e.network,this.client.setOperator(e.operatorId,this.operatorPrivateKey.toString()),this.logger=Logger$2.getInstance({level:e.logLevel||"info",module:"HCS-SDK"}),this.guardedRegistryBaseUrl=e.guardedRegistryBaseUrl||"https://moonscape.tech",this.hcs11Client=new HCS11Client({network:e.network,auth:{operatorId:e.operatorId,privateKey:e.operatorPrivateKey},logLevel:e.logLevel})}getClient(){return this.client}async createAccount(e=50){this.logger.info(`Creating new account with ${e} HBAR initial balance`);const t=y.generate(),r=(new l).setKey(t.publicKey).setInitialBalance(new e$7(e));this.logger.debug("Executing account creation transaction");const n=await r.execute(this.client),o=(await n.getReceipt(this.client)).accountId;if(!o)throw this.logger.error("Account creation failed: accountId is null"),new AccountCreationError("Failed to create account: accountId is null");return this.logger.info(`Account created successfully: ${o.toString()}`),{accountId:o.toString(),privateKey:t.toString()}}async createInboundTopic(e,t,r=60,n){const o=this._generateHcs10Memo(Hcs10MemoType.INBOUND,{accountId:e,ttl:r});let i,a;switch(t){case InboundTopicType.PUBLIC:i=!1;break;case InboundTopicType.CONTROLLED:i=!0;break;case InboundTopicType.FEE_BASED:if(i=!1,!n)throw new Error("Fee configuration builder is required for fee-based topics");n.customFees.forEach((t=>{t.feeCollectorAccountId||(this.logger.debug(`Defaulting fee collector for token ${t.feeTokenId||"HBAR"} to agent ${e}`),t.feeCollectorAccountId=e)})),a=n.build();break;default:throw new Error(`Unsupported inbound topic type: ${t}`)}return this.createTopic(o,!0,i,a)}async createAgent(e,t=60){const r=e.build(),n=this._generateHcs10Memo(Hcs10MemoType.OUTBOUND,{ttl:t}),o=await this.createTopic(n,!0,!0);this.logger.info(`Created new outbound topic ID: ${o}`);const i=this.client.operatorAccountId?.toString();if(!i)throw new Error("Failed to retrieve operator account ID");const a=await this.createInboundTopic(i,r.inboundTopicType,t,r.inboundTopicType===InboundTopicType.FEE_BASED?r.feeConfig:void 0);let s=r.existingPfpTopicId||"";if(!s&&r.pfpBuffer&&r.pfpBuffer.length>0){this.logger.info("Inscribing new profile picture");s=(await this.inscribePfp(r.pfpBuffer,r.pfpFileName)).pfpTopicId,this.logger.info(`Profile picture inscribed with topic ID: ${s}`)}else r.existingPfpTopicId&&this.logger.info(`Using existing profile picture with topic ID: ${r.existingPfpTopicId}`);const c=(await this.storeHCS11Profile(r.name,r.bio,a,o,r.capabilities,r.metadata,r.pfpBuffer&&r.pfpBuffer.length>0?r.pfpBuffer:void 0,r.pfpFileName,r.existingPfpTopicId)).profileTopicId;return this.logger.info(`Profile stored with topic ID: ${c}`),{inboundTopicId:a,outboundTopicId:o,pfpTopicId:s,profileTopicId:c}}async inscribePfp(e,t){try{this.logger.info("Inscribing profile picture using HCS-11 client");const r=await this.hcs11Client.inscribeImage(e,t);if(!r.success)throw this.logger.error(`Failed to inscribe profile picture: ${r.error}`),new Error(r?.error||"Failed to inscribe profile picture");return this.logger.info(`Successfully inscribed profile picture with topic ID: ${r.imageTopicId}`),{pfpTopicId:r.imageTopicId,transactionId:r.transactionId,success:!0}}catch(r){const e=r,t=`Error inscribing profile picture: ${e.message}`;return this.logger.error(t),{pfpTopicId:"",transactionId:"",success:!1,error:e.message}}}async storeHCS11Profile(e,t,r,n,o=[],i,a,s,c){try{let u=c||"";if(!u&&a&&s){this.logger.info("Inscribing profile picture for HCS-11 profile");const e=await this.inscribePfp(a,s);e.success?u=e.pfpTopicId:this.logger.warn(`Failed to inscribe profile picture: ${e.error}, proceeding without pfp`)}else c&&(this.logger.info(`Using existing profile picture with topic ID: ${c} for HCS-11 profile`),u=c);const l=this.hcs11Client.getAgentTypeFromMetadata({type:i.type||"autonomous"}),d=i.socials?Object.entries(i.socials).filter((([e,t])=>t)).map((([e,t])=>({platform:e,handle:t}))):void 0,p=this.hcs11Client.createAIAgentProfile(e,l,o,i.model||"unknown",{alias:e.toLowerCase().replace(/\s+/g,"_"),bio:t,profileImage:u?`hcs://1/${u}`:void 0,socials:d,properties:i.properties,inboundTopicId:r,outboundTopicId:n,creator:i.creator}),f=await this.hcs11Client.createAndInscribeProfile(p,!0);if(!f.success)throw this.logger.error(`Failed to inscribe profile: ${f.error}`),new Error(f.error||"Failed to inscribe profile");return this.logger.info(`Profile inscribed with topic ID: ${f.profileTopicId}, transaction ID: ${f.transactionId}`),{profileTopicId:f.profileTopicId,pfpTopicId:u,transactionId:f.transactionId,success:!0}}catch(u){const e=u,t=`Error storing HCS-11 profile: ${e.message}`;return this.logger.error(t),{profileTopicId:"",pfpTopicId:"",transactionId:"",success:!1,error:e.message}}}async setupFees(e,t,r=[]){let n=e;if(!this.client.operatorPublicKey)return n;if(!t.customFees||0===t.customFees.length)return this.logger.warn("No custom fees provided in fee config for setupFees"),n;t.customFees.length>10&&(this.logger.warn("More than 10 custom fees provided, only the first 10 will be used"),t.customFees=t.customFees.slice(0,10));const o=t.customFees.map((e=>{if(!e.feeCollectorAccountId)return this.logger.error("Internal Error: Fee collector ID missing in setupFees"),null;if("FIXED_FEE"===e.type){const t=(new l$1).setAmount(Number(e.feeAmount.amount)).setFeeCollectorAccountId(f.fromString(e.feeCollectorAccountId));return e.feeTokenId&&t.setDenominatingTokenId(u$4.fromString(e.feeTokenId)),t}return null})).filter(Boolean);if(0===o.length)return this.logger.warn("No valid custom fees to apply in setupFees"),n;const i=[...t.exemptAccounts||[],...r];return i.length>0&&(n=await this.setupExemptKeys(e,i)),n.setFeeScheduleKey(this.client.operatorPublicKey).setCustomFees(o)}async setupExemptKeys(e,t){let r=e;const n=Array.from(new Set(t)).filter((e=>e!==this.client.operatorAccountId?.toString()));let o=[];if(n.length>0)try{o=await accountIdsToExemptKeys(n,this.network,this.logger)}catch(i){const e=`Error getting exempt keys: ${i.message}, continuing without exempt keys`;this.logger.warn(e)}return o.length>0&&(r=r.setFeeExemptKeys(o)),r}async handleConnectionRequest(e,t,r,n,o=60){const i=this._generateHcs10Memo(Hcs10MemoType.CONNECTION,{ttl:o,inboundTopicId:e,connectionId:r});this.logger.info(`Handling connection request ${r} from ${t}`);const a=this.getClient().operatorAccountId?.toString();if(!a)throw new Error("Failed to retrieve operator account ID");let s=await this.mirrorNode.getPublicKey(t);const c=await this.mirrorNode.getPublicKey(a);if(!c)throw new Error("Failed to retrieve public key");const u=new s$9([c,s],1);let l;try{if(n){const e=n.build(),t={...e,exemptAccounts:[...e.exemptAccounts||[]]};l=await this.createTopic(i,u,u,t)}else l=await this.createTopic(i,u,u);this.logger.info(`Created new connection topic ID: ${l}`)}catch(y){const e=`Failed to create connection topic: ${y}`;throw this.logger.error(e),new TopicCreationError(e)}const d=`${e}@${a}`,p=await this.confirmConnection(e,l,t,r,"Connection accepted. Looking forward to collaborating!"),f=await this.retrieveCommunicationTopics(a),h=await this.retrieveCommunicationTopics(t),m=`${h.inboundTopic}@${t}`;return await this.recordOutboundConnectionConfirmation({outboundTopicId:f.outboundTopic,requestorOutboundTopicId:h.outboundTopic,connectionRequestId:r,confirmedRequestId:p,connectionTopicId:l,operatorId:m,memo:`Connection established with ${t}`}),{connectionTopicId:l,confirmedConnectionSequenceNumber:p,operatorId:d}}async confirmConnection(e,t,r,n,o,i){const a=await this.getOperatorId();this.logger.info(`Confirming connection with ID ${n}`);const s={p:"hcs-10",op:"connection_created",connection_topic_id:t,connected_account_id:r,operator_id:a,connection_id:n,m:o},c=await this.canSubmitToTopic(e,this.client.operatorAccountId?.toString()||""),u=await this.submitPayload(e,s,i,c.requiresFee),l=u.topicSequenceNumber?.toNumber();if(!l)throw new ConnectionConfirmationError("Failed to confirm connection: sequence number is null");return l}async sendMessage(e,t,r,n,o){const i=await this.canSubmitToTopic(e,this.client.operatorAccountId?.toString()||""),a={p:"hcs-10",op:"message",operator_id:await this.getOperatorId(),data:t,m:r},s=JSON.stringify(a);if(Buffer.from(s).length>1e3){this.logger.info("Message payload exceeds 1000 bytes, storing via inscription");try{const e=Buffer.from(t),r=`message-${Date.now()}.json`,n=await this.inscribeFile(e,r,{progressCallback:o?.progressCallback,waitMaxAttempts:o?.waitMaxAttempts,waitIntervalMs:o?.waitIntervalMs});if(!n?.topic_id)throw new Error("Failed to inscribe large message content");a.data=`hcs://1/${n.topic_id}`,this.logger.info(`Large message inscribed with topic ID: ${n.topic_id}`)}catch(c){const e=`Error inscribing large message: ${c.message}`;throw this.logger.error(e),new Error(e)}}return this.logger.info("Submitting message to connection topic",a),await this.submitPayload(e,a,n,i.requiresFee)}async createTopic(e,t,r,n){this.logger.info("Creating topic");const o=(new c$1).setTopicMemo(e);t&&("boolean"==typeof t&&t&&this.client.operatorPublicKey?(o.setAdminKey(this.client.operatorPublicKey),o.setAutoRenewAccountId(this.client.operatorAccountId)):(t instanceof i$8||t instanceof s$9)&&(o.setAdminKey(t),this.client.operatorAccountId&&o.setAutoRenewAccountId(this.client.operatorAccountId))),r&&("boolean"==typeof r&&r&&this.client.operatorPublicKey?o.setSubmitKey(this.client.operatorPublicKey):(r instanceof i$8||r instanceof s$9)&&o.setSubmitKey(r)),n&&await this.setupFees(o,n),this.logger.debug("Executing topic creation transaction");const i=await o.execute(this.client),a=await i.getReceipt(this.client);if(!a.topicId)throw this.logger.error("Failed to create topic: topicId is null"),new Error("Failed to create topic: topicId is null");return a.topicId.toString()}async submitPayload(e,t,r,n=!1){const o="string"==typeof t?t:JSON.stringify(t),i=Buffer.byteLength(o,"utf8");if(i>1e3)throw new PayloadSizeError("Payload size exceeds 1000 bytes limit",i);const a=(new u).setTopicId(m$1.fromString(e)).setMessage(o);let s;if(n&&(this.logger.info("Topic requires fee payment, setting max transaction fee"),a.setMaxTransactionFee(new e$7(this.feeAmount))),r){const e=a.freezeWith(this.client),t=await e.sign(r);s=await t.execute(this.client)}else s=await a.execute(this.client);const c=await s.getReceipt(this.client);if(!c)throw this.logger.error("Failed to submit message: receipt is null"),new Error("Failed to submit message: receipt is null");return this.logger.info("Message submitted successfully"),c}async inscribeFile(e,t,r){if(this.logger.info("Inscribing file"),!this.client.operatorAccountId)throw this.logger.error("Operator account ID is not set"),new Error("Operator account ID is not set");if(!this.operatorPrivateKey)throw this.logger.error("Operator private key is not set"),new Error("Operator private key is not set");const n=mimeTypesExports.lookup(t)||"application/octet-stream",o=await InscriptionSDK.createWithAuth({type:"server",accountId:this.client.operatorAccountId.toString(),privateKey:this.operatorPrivateKey.toString(),network:this.network}),i={mode:"file",waitForConfirmation:!0,waitMaxAttempts:r?.waitMaxAttempts||30,waitIntervalMs:r?.waitIntervalMs||4e3,progressCallback:r?.progressCallback,logging:{level:this.logger.getLevel?this.logger.getLevel():"info"}},a=await inscribe({type:"buffer",buffer:e,fileName:t,mimeType:n},{accountId:this.client.operatorAccountId.toString(),privateKey:this.operatorPrivateKey.toString(),network:this.network},i,o);if(!a.confirmed||!a.inscription)throw new Error("Inscription was not confirmed");return a.inscription}async waitForConnectionConfirmation(e,t,r=60,n=2e3,o=!0){this.logger.info(`Waiting for connection confirmation on inbound topic ${e} for request ID ${t}`);for(let i=0;i<r;i++){this.logger.info(`Attempt ${i+1}/${r} to find connection confirmation`);const a=(await this.mirrorNode.getTopicMessages(e)).filter((e=>"connection_created"===e.op));if(this.logger.info(`Found ${a.length} connection_created messages`),a.length>0)for(const e of a)if(Number(e.connection_id)===Number(t)){const r={connectionTopicId:e.connection_topic_id,sequence_number:Number(e.sequence_number),confirmedBy:e.operator_id,memo:e.m},n=this.extractAccountFromOperatorId(r.confirmedBy),i=this.getAccountAndSigner(),a=await this.retrieveCommunicationTopics(n),s=await this.retrieveCommunicationTopics(i.accountId);return this.logger.info("Connection confirmation found",r),o&&await this.recordOutboundConnectionConfirmation({requestorOutboundTopicId:a.outboundTopic,outboundTopicId:s.outboundTopic,connectionRequestId:t,confirmedRequestId:r.sequence_number,connectionTopicId:r.connectionTopicId,operatorId:r.confirmedBy,memo:r.memo||"Connection confirmed"}),r}i<r-1&&(this.logger.info(`No matching confirmation found, waiting ${n}ms before retrying...`),await new Promise((e=>setTimeout(e,n))))}throw new Error(`Connection confirmation not found after ${r} attempts for request ID ${t}`)}getAccountAndSigner(){return{accountId:this.client.operatorAccountId.toString(),signer:this.operatorPrivateKey}}async createAndRegisterAgent(e,t){try{const r=e.build(),n=t?.progressCallback,o=t?.baseUrl||this.guardedRegistryBaseUrl;let i=t?.existingState||void 0;n&&n({stage:"preparing",message:"Preparing agent registration",progressPercent:10,details:{state:i}});const a=r.existingAccount||await this.createAccount(t?.initialBalance);n&&n({stage:"preparing",message:"Created account or using existing account",progressPercent:20,details:{state:i,account:a}});const s=new HCS10Client({network:r.network,operatorId:a.accountId,operatorPrivateKey:a.privateKey,operatorPublicKey:y.fromString(a.privateKey).publicKey.toString(),logLevel:"info",guardedRegistryBaseUrl:o});n&&n({stage:"preparing",message:"Initialized agent client",progressPercent:30,details:{state:i}});const{outboundTopicId:c,inboundTopicId:u,pfpTopicId:l,profileTopicId:d}=await s.createAgent(e);n&&n({stage:"submitting",message:"Created agent with topics and profile",progressPercent:60,details:{state:i,outboundTopicId:c,inboundTopicId:u,pfpTopicId:l,profileTopicId:d}});const p=`${u}@${a.accountId}`,f=await s.registerAgentWithGuardedRegistry(a.accountId,r.network,{progressCallback:e=>{const t=60+.4*(e.progressPercent||0);n&&n({stage:e.stage,message:e.message,progressPercent:t,details:{...e.details,outboundTopicId:c,inboundTopicId:u,pfpTopicId:l,profileTopicId:d,operatorId:p,state:e.details?.state||i}})},existingState:i});return f.success?(n&&n({stage:"completed",message:"Agent creation and registration complete",progressPercent:100,details:{outboundTopicId:c,inboundTopicId:u,pfpTopicId:l,profileTopicId:d,operatorId:p,state:f.state}}),{...f,metadata:{accountId:a.accountId,privateKey:a.privateKey,operatorId:p,inboundTopicId:u,outboundTopicId:c,profileTopicId:d,pfpTopicId:l}}):f}catch(r){const e=r,t=`Failed to create and register agent: ${e.message}`;return this.logger.error(t),{error:e.message,success:!1}}}async registerAgentWithGuardedRegistry(e,t=this.network,r){try{this.logger.info("Registering agent with guarded registry");const n=r?.maxAttempts??60,o=r?.delayMs??2e3,i=r?.progressCallback;let a=r?.existingState||{currentStage:"registration",completedPercentage:0,createdResources:[]};i&&i({stage:"preparing",message:"Preparing agent registration",progressPercent:10,details:{state:a}});const s=await this.executeRegistration(e,t,this.guardedRegistryBaseUrl,this.logger);if(!s.success)return{...s,state:a};if(i&&i({stage:"submitting",message:"Submitting registration to registry",progressPercent:30,details:{transactionId:s.transactionId,state:a}}),s.transaction){const e=A.fromBytes(Buffer.from(s.transaction,"base64"));this.logger.info("Processing registration transaction"),await e.execute(this.client),this.logger.info("Successfully processed registration transaction")}i&&i({stage:"confirming",message:"Confirming registration transaction",progressPercent:60,details:{accountId:e,transactionId:s.transactionId,state:a}});const c=await this.waitForRegistrationConfirmation(s.transactionId,t,this.guardedRegistryBaseUrl,n,o,this.logger);return a.currentStage="complete",a.completedPercentage=100,a.createdResources||(a.createdResources=[]),s.transactionId&&a.createdResources.push(`registration:${s.transactionId}`),i&&i({stage:"completed",message:"Agent registration complete",progressPercent:100,details:{confirmed:c,transactionId:s.transactionId,state:a}}),{...s,confirmed:c,state:a}}catch(n){const e=n,t=`Failed to register agent: ${e.message}`;return this.logger.error(t),{error:e.message,success:!1}}}async registerAgent(e,t,r,n,o){this.logger.info("Registering agent");const i={p:"hcs-10",op:"register",account_id:t,inbound_topic_id:r,m:n};await this.submitPayload(e,i,o)}async getInboundTopicType(e){try{const t=await this.mirrorNode.getTopicInfo(e);if(!t)throw new Error("Topic does not exist");if(!(t.submit_key&&t.submit_key.key))return InboundTopicType.PUBLIC;if(t.fee_schedule_key&&t.fee_schedule_key.key&&t.custom_fees){const r=t.custom_fees;if(r&&r.fixed_fees&&r.fixed_fees.length>0)return this.logger.info(`Topic ${e} is fee-based with ${r.fixed_fees.length} custom fees`),InboundTopicType.FEE_BASED}return InboundTopicType.CONTROLLED}catch(t){const e=`Error determining topic type: ${t.message}`;throw this.logger.error(e),new Error(e)}}getNetwork(){return this.network}getLogger(){return this.logger}getOperatorAccountId(){return this.client.operatorAccountId?.toString()??null}}const isBrowser="undefined"!=typeof window;class BrowserHCSClient extends HCS10BaseClient{constructor(e){let t;if(super({network:e.network,logLevel:e.logLevel,prettyPrint:e.prettyPrint,feeAmount:e.feeAmount}),this.hcs11Client=null,this.hwc=e.hwc,e.guardedRegistryBaseUrl?this.guardedRegistryBaseUrl=e.guardedRegistryBaseUrl:this.guardedRegistryBaseUrl="https://moonscape.tech",t=e.logLevel?e.logLevel:"info",this.logger=Logger$2.getInstance({level:t,module:"HCS-Browser",prettyPrint:e.prettyPrint}),isBrowser)try{const{accountId:t,signer:r}=this.getAccountAndSigner();this.hcs11Client=new HCS11Client({network:e.network,auth:{operatorId:t,signer:r},logLevel:e.logLevel})}catch(r){this.logger.warn(`Failed to initialize HCS11Client: ${r}`)}else this.logger.error("BrowserHCSClient initialized in server environment - browser-specific features will not be available. Use HCS10Client instead.")}async sendMessage(e,t,r,n,o){this.logger.info("Sending message");const i={p:"hcs-10",op:"message",operator_id:await this.getOperatorId(),data:t,m:r},a=await this.canSubmitToTopic(e,this.hwc.getAccountInfo().accountId),s=JSON.stringify(i);if(Buffer.from(s).length>1e3){this.logger.info("Message payload exceeds 1000 bytes, storing via inscription");try{const e=Buffer.from(t),r=`message-${Date.now()}.json`,n=await this.inscribeFile(e,r,{progressCallback:o?.progressCallback,waitMaxAttempts:o?.waitMaxAttempts,waitIntervalMs:o?.waitIntervalMs});if(!n?.topic_id)throw new Error("Failed to inscribe large message content");i.data=`hcs://1/${n.topic_id}`,this.logger.info(`Large message inscribed with topic ID: ${n.topic_id}`)}catch(c){throw this.logger.error("Error inscribing large message:",c),new Error(`Failed to handle large message: ${c instanceof Error?c.message:"Unknown error"}`)}}return await this.submitPayload(e,i,n,a.requiresFee)}async getPublicKey(e){return await this.mirrorNode.getPublicKey(e)}async handleConnectionRequest(e,t,r,n="Connection accepted. Looking forward to collaborating!",o=60){this.logger.info("Handling connection request");const i=this.hwc.getAccountInfo().accountId;if(!i)throw new Error("Failed to retrieve user account ID");const a=await this.mirrorNode.getPublicKey(t),s=await this.mirrorNode.getPublicKey(i);if(!s)throw new Error("Failed to retrieve public key");const c=new s$9([s,a],1),u=this._generateHcs10Memo(Hcs10MemoType.CONNECTION,{ttl:o,inboundTopicId:e,connectionId:r}),l=(new c$1).setTopicMemo(u).setAutoRenewAccountId(f.fromString(i)).setAdminKey(c).setSubmitKey(c);this.logger.debug("Executing topic creation transaction");const d=await this.hwc.executeTransactionWithErrorHandling(l,!1);if(d?.error)throw this.logger.error(d.error),new Error(d.error);const p=d?.result;if(!p?.topicId)throw this.logger.error("Failed to create topic: topicId is null"),new Error("Failed to create topic: topicId is null");const h=p.topicId.toString(),m=`${e}@${i}`,y=await this.confirmConnection(e,h,t,r,m,n),g=await this.retrieveCommunicationTopics(i),b=await this.retrieveCommunicationTopics(t),w=`${b.inboundTopic}@${t}`;return await this.recordOutboundConnectionConfirmation({outboundTopicId:g.outboundTopic,requestorOutboundTopicId:b.outboundTopic,connectionRequestId:r,confirmedRequestId:y,connectionTopicId:h,operatorId:w,memo:`Connection established with ${t}`}),{connectionTopicId:h,confirmedConnectionSequenceNumber:y,operatorId:m}}async confirmConnection(e,t,r,n,o,i){this.logger.info("Confirming connection");const a={p:"hcs-10",op:"connection_created",connection_topic_id:t,connected_account_id:r,operator_id:o,connection_id:n,m:i},s=await this.submitPayload(e,a);if(!s?.topicSequenceNumber)throw this.logger.error("Failed to confirm connection: sequence number is null"),new Error("Failed to confirm connection: sequence number is null");return s.topicSequenceNumber.toNumber()}async create(e,t){const r=t?.progressCallback,n=new ProgressReporter({module:"ProfileCreate",logger:this.logger,callback:r});try{const r=e instanceof AgentBuilder;let o;if(o=t?.existingState?t.existingState:{currentStage:"init",completedPercentage:0,createdResources:[]},r){this.logger.info("Creating Agent Profile and HCS-10 Topics");const t=e.build();o.agentMetadata=t.metadata}else this.logger.info("Creating Person HCS-11 Profile");n.preparing(`Starting ${r?"agent":"person"} resource creation`,0,{state:o});const{inboundTopicId:i,outboundTopicId:a,state:s}=await this.createCommunicationTopics(t,n);let c,u,l;if(o=s,r||(e.setInboundTopicId(i),e.setOutboundTopicId(a)),r){const t=e.build();c=t.existingPfpTopicId||o.pfpTopicId,u=t.pfpBuffer,l=t.pfpFileName||"pfp.png"}else{const t=e.build();c=o.pfpTopicId,u=t.pfpBuffer,l=t.pfpFileName}!c&&u&&l?c=await this.handleProfilePictureCreation(u,l,o,n):c&&(n.preparing(`Using existing profile picture: ${c}`,50,{state:o}),o.pfpTopicId=c),await this.createAndInscribeProfile(r,e,c,o,i,a,t,n),o.currentStage="complete",o.completedPercentage=100,n.completed((r?"Agent":"Person")+" profile created successfully",{profileTopicId:o.profileTopicId,inboundTopicId:i,outboundTopicId:a,pfpTopicId:c,state:o});let d="";o.outboundTopicId&&(d=o.outboundTopicId);let p="";o.inboundTopicId&&(p=o.inboundTopicId);let f="";o.pfpTopicId&&(f=o.pfpTopicId);let h="";return o.profileTopicId&&(h=o.profileTopicId),{outboundTopicId:d,inboundTopicId:p,pfpTopicId:f,profileTopicId:h,success:!0,state:o}}catch(o){return n.failed("Error during profile creation",{error:o.message}),{outboundTopicId:"",inboundTopicId:"",pfpTopicId:"",profileTopicId:"",success:!1,error:o.message,state:{currentStage:"init",completedPercentage:0,error:o.message}}}}async handleProfilePictureCreation(e,t,r,n){r.currentStage="pfp",n.preparing("Creating profile picture",30,{state:r});const o=n.createSubProgress({minPercent:30,maxPercent:50,logPrefix:"PFP"}),i=await this.inscribePfp(e,t,{progressCallback:e=>o.report({...e,progressPercent:e.progressPercent??0,details:{...e.details,state:r}})});if(!i.success){let e="Failed to inscribe profile picture";throw i.error&&(e=i.error),new Error(e)}const a=i.pfpTopicId;return r.pfpTopicId=a,r.createdResources&&r.createdResources.push(`pfp:${r.pfpTopicId}`),n.preparing("Profile picture created",50,{state:r}),a}async createAndInscribeProfile(e,t,r,n,o,i,a,s){if(!this.hcs11Client)throw s&&s.failed("HCS11Client is not available"),new Error("HCS11Client is not available");if(this.logger.info("Creating and inscribing profile"),n.profileTopicId)s&&s.preparing(`Using existing ${e?"agent":"person"} profile`,95,{state:n});else{s&&s.preparing(`Storing HCS-11 ${e?"agent":"person"} profile`,80);const c=s?.createSubProgress({minPercent:80,maxPercent:95,logPrefix:"StoreProfile"});let u;if(e){const e=t.build(),n=e.metadata?.socials?Object.entries(e.metadata.socials).map((([e,t])=>({platform:e,handle:t}))):[];u=this.hcs11Client.createAIAgentProfile(e.name,"manual"===e.metadata?.type?0:1,e.capabilities||[],e.metadata?.model||"unknown",{alias:e.name.toLowerCase().replace(/\s+/g,"_"),bio:e.bio,profileImage:r?`hcs://1/${r}`:void 0,socials:n,properties:e.metadata?.properties||{},inboundTopicId:o,outboundTopicId:i,creator:e.metadata?.creator})}else{const e=t.build(),{pfpBuffer:n,pfpFileName:a,...s}=e;u=this.hcs11Client.createPersonalProfile(e.display_name,{alias:e.alias,bio:e.bio,socials:e.socials,profileImage:r?`hcs://1/${r}`:e.profileImage,properties:e.properties,inboundTopicId:o,outboundTopicId:i})}const l=await this.hcs11Client.createAndInscribeProfile(u,a?.updateAccountMemo??!0,{progressCallback:e=>c?.report({...e,progressPercent:e.progressPercent??0})});if(!l.success){s&&s.failed(`Failed to inscribe ${e?"agent":"person"} profile`,{error:l.error});let t=`Failed to inscribe ${e?"agent":"person"} profile`;throw l.error&&(t=l.error),new Error(t)}n.profileTopicId=l.profileTopicId,n.createdResources&&n.createdResources.push(`profile:${l.profileTopicId}`),s&&s.preparing("HCS-11 Profile stored",95,{state:n})}}initializeRegistrationState(e,t){const r=t||{inboundTopicId:e,currentStage:"registration",completedPercentage:0,createdResources:[]};return"registration"!==r.currentStage&&"complete"!==r.currentStage&&(r.currentStage="registration"),r}updateStateForCompletedRegistration(e,t){e.currentStage="complete",e.completedPercentage=100,e.createdResources&&e.createdResources.push(`registration:${t}`)}async registerAgentWithGuardedRegistry(e,t=this.network,r){try{this.logger.info("Registering agent with guarded registry");const n=(await this.retrieveProfile(e)).topicInfo.inboundTopic,o=this.initializeRegistrationState(n,r?.existingState),i=new ProgressReporter({module:"AgentRegistration",logger:this.logger,callback:r?.progressCallback});i.preparing("Preparing agent registration",10,{inboundTopicId:n,accountId:e});const a=await this.executeRegistration(e,t,this.guardedRegistryBaseUrl,this.logger);if(!a.success)return{...a,state:o};if(i.submitting("Submitting registration to registry",30,{transactionId:a.transactionId}),a.transaction){const e=A.fromBytes(Buffer.from(a.transaction,"base64"));this.logger.info("Processing registration transaction");const t=await this.hwc.executeTransactionWithErrorHandling(e,!0);if(t.error)return{...a,error:t.error,success:!1,state:o};this.logger.info("Successfully processed registration transaction")}i.confirming("Confirming registration transaction",60,{accountId:e,inboundTopicId:n,transactionId:a.transactionId});const s=r?.maxAttempts??60,c=r?.delayMs??2e3,u=await this.waitForRegistrationConfirmation(a.transactionId,t,this.guardedRegistryBaseUrl,s,c,this.logger);return this.updateStateForCompletedRegistration(o,n),i.completed("Agent registration complete",{transactionId:a.transactionId,inboundTopicId:n,state:o,confirmed:u}),{...a,confirmed:u,state:o}}catch(n){return this.logger.error(`Registration error: ${n.message}`),{error:`Error during registration: ${n.message}`,success:!1,state:{currentStage:"registration",completedPercentage:0,error:n.message}}}}async createAndRegisterAgent(e,t){try{const r=e.build(),n=t?.progressCallback,o=new ProgressReporter({module:"AgentCreateRegister",logger:this.logger,callback:n});let i=t?.existingState||{currentStage:"init",completedPercentage:0,createdResources:[]};if(i.agentMetadata=r.metadata,o.preparing("Starting agent creation process",0,{state:i}),"complete"!==i.currentStage||!i.inboundTopicId||!i.outboundTopicId||!i.profileTopicId){const t=await this.create(e,{progressCallback:e=>{const t=.3*(e.progressPercent||0);o.report({...e,progressPercent:t,details:{...e.details,state:e.details?.state||i}})},existingState:i,updateAccountMemo:!1});if(!("state"in t))throw new Error("Create method did not return expected agent state.");if(!t.success)throw new Error(t.error||"Failed to create agent resources");i=t.state,i.agentMetadata=r.metadata}o.preparing(`Agent creation status: ${i.currentStage}, ${i.completedPercentage}%`,30,{state:i});const{accountId:a}=this.getAccountAndSigner();if("complete"!==i.currentStage||!i.createdResources?.includes(`registration:${i.inboundTopicId}`)){t?.baseUrl&&(this.guardedRegistryBaseUrl=t.baseUrl);const e=await this.registerAgentWithGuardedRegistry(a,r.network,{progressCallback:e=>{const t=30+.7*(e.progressPercent||0);o.report({...e,progressPercent:t,details:{...e.details,state:e.details?.state||i}})},maxAttempts:t?.maxAttempts,delayMs:t?.delayMs,existingState:i});if(!e.success)throw new Error(e.error||"Failed to register agent with registry");i=e.state,i.profileTopicId&&await(this.hcs11Client?.updateAccountMemoWithProfile(a,i.profileTopicId))}return o.completed("Agent creation and registration complete",{state:i}),{success:!0,state:i,metadata:{accountId:a,operatorId:`${i.inboundTopicId}@${a}`,inboundTopicId:i.inboundTopicId,outboundTopicId:i.outboundTopicId,profileTopicId:i.profileTopicId,pfpTopicId:i.pfpTopicId,privateKey:null,...i.agentMetadata}}}catch(r){return this.logger.error(`Failed to create and register agent: ${r.message}`),{success:!1,error:`Failed to create and register agent: ${r.message}`,state:t?.existingState||{currentStage:"init",completedPercentage:0,error:r.message}}}}async storeHCS11Profile(e,t,r,n,o=[],i={},a,s,c,u){try{const l=u?.progressCallback,d=new ProgressReporter({module:"StoreHCS11Profile",logger:this.logger,callback:l});d.preparing("Preparing agent profile data",0);let p=c;if(!p&&a&&s){const e=d.createSubProgress({minPercent:0,maxPercent:60,logPrefix:"PFP"}),t=await this.inscribePfp(a,s,{progressCallback:t=>{e.report({stage:t.stage,message:t.message,progressPercent:t.progressPercent||0,details:t.details})}});t.success?p=t.pfpTopicId:d.failed("Failed to inscribe profile picture, continuing without PFP")}else c?d.preparing(`Using existing profile picture: ${c}`,30):d.preparing("No profile picture provided",30);if(!this.hcs11Client)return d.failed("HCS11Client is not available in this environment"),{profileTopicId:"",success:!1,error:"HCS11Client is not available in this environment",transactionId:""};const f=this.hcs11Client.getAgentTypeFromMetadata({type:i.type||"autonomous"});d.preparing("Building agent profile",65);const h=i.socials?Object.entries(i.socials).filter((([e,t])=>t)).map((([e,t])=>({platform:e,handle:t}))):void 0,m=this.hcs11Client.createAIAgentProfile(e,f,o,i.model||"unknown",{alias:e.toLowerCase().replace(/\s+/g,"_"),bio:t,profileImage:p?`hcs://1/${p}`:void 0,socials:h,properties:{version:i.version||"1.0.0",creator:i.creator||"Unknown",supported_languages:i.supported_languages||["en"],permissions:i.permissions||[],model_details:i.model_details,training:i.training,capabilities_description:i.capabilities_description,...i},inboundTopicId:r,outboundTopicId:n,creator:i.creator}),y=d.createSubProgress({minPercent:65,maxPercent:100,logPrefix:"Profile"}),g=await this.hcs11Client.createAndInscribeProfile(m,!0,{progressCallback:e=>{y.report({stage:e.stage,message:e.message,progressPercent:e.progressPercent||0,details:e.details})}});return g.success?(d.completed("Profile stored successfully",{profileTopicId:g.profileTopicId}),{profileTopicId:g.profileTopicId,pfpTopicId:p,success:!0,transactionId:g.transactionId||""}):(d.failed("Failed to inscribe profile"),{profileTopicId:"",success:!1,error:g.error||"Failed to inscribe profile",transactionId:g.transactionId||""})}catch(l){return this.logger.error(`Error storing HCS11 profile: ${l.message}`),{profileTopicId:"",success:!1,error:l.message,transactionId:""}}}async createTopic(e,t,r){this.logger.info("Creating topic");const{accountId:n,signer:o}=this.getAccountAndSigner(),i=(new c$1).setTopicMemo(e),a=await this.mirrorNode.getPublicKey(n);t&&a&&(i.setAdminKey(a),i.setAutoRenewAccountId(n)),r&&a&&i.setSubmitKey(a);const s=await this.hwc.executeTransactionWithErrorHandling(i,!1),c=s.error;if(c)return this.logger.error(c),{success:!1,error:c};const u=s.result;return u?.topicId?{success:!0,topicId:u.topicId.toString()}:(this.logger.error("Failed to create topic: topicId is null"),{success:!1,error:"Failed to create topic: topicId is null"})}async submitPayload(e,t,r,n){let o;this.logger.debug(`Submitting payload to topic ${e}`),o="string"==typeof t?t:JSON.stringify(t);const i=(new u).setTopicId(e).setMessage(o);let a;if(n&&(this.logger.info("Topic requires fee payment, setting max transaction fee"),i.setMaxTransactionFee(new e$7(this.feeAmount))),r){const{accountId:e,signer:t}=this.getAccountAndSigner();i.freezeWithSigner(t);const n=await i.sign(r);a=await this.hwc.executeTransactionWithErrorHandling(n,!0)}else a=await this.hwc.executeTransactionWithErrorHandling(i,!1);if(a?.error)throw this.logger.error(`Failed to submit payload: ${a.error}`),new Error(`Failed to submit payload: ${a.error}`);if(!a?.result)throw this.logger.error("Failed to submit message: receipt is null or undefined"),new Error("Failed to submit message: receipt is null or undefined");return this.logger.debug("Payload submitted successfully via HWC"),a.result}async inscribeFile(e,t,r){const{accountId:n,signer:o}=this.getAccountAndSigner(),i=mimeTypesExports.lookup(t)||"application/octet-stream",a=await InscriptionSDK.createWithAuth({type:"client",accountId:n,signer:o,network:this.network}),s={mode:"file",waitForConfirmation:!0,waitMaxAttempts:r?.waitMaxAttempts||30,waitIntervalMs:r?.waitIntervalMs||4e3,progressCallback:r?.progressCallback,logging:{level:this.logger.getLevel?this.logger.getLevel():"info"}},c=await inscribeWithSigner({type:"buffer",buffer:e,fileName:t,mimeType:i},o,{...s,network:this.network},a);if(!c.confirmed||!c.inscription)throw new Error("Inscription was not confirmed");return c.inscription}getAccountAndSigner(){const e=this?.hwc?.getAccountInfo(),t=e?.accountId?.toString(),r=this?.hwc?.dAppConnector?.signers?.find((e=>e.getAccountId().toString()===t));if(!r)throw this.logger.error("Failed to find signer",{accountId:t,signers:this?.hwc?.dAppConnector?.signers,accountInfo:e}),new Error("Failed to find signer");return{accountId:t,signer:r}}async inscribePfp(e,t,r){try{const n=r?.progressCallback,o=new ProgressReporter({module:"PFP-Inscription",logger:this.logger,callback:n});if(!this.hcs11Client)return o.failed("HCS11Client is not available in this environment"),{pfpTopicId:"",success:!1,error:"HCS11Client is not available in this environment",transactionId:""};o.preparing("Preparing to inscribe profile picture",10),this.logger.info("Inscribing profile picture using HCS-11 client");const i=e=>{o.report({stage:e.stage||"confirming",message:e.message||"Processing PFP inscription",progressPercent:e.progressPercent||50,details:e.details})},a=await this.hcs11Client.inscribeImage(e,t,{progressCallback:i});if(!a.success){let e="Failed to inscribe profile picture";a.error&&(e=a.error);let t="";return a.transactionId&&(t=a.transactionId),{pfpTopicId:"",success:!1,error:e,transactionId:t}}return o.completed("Successfully inscribed profile picture",{pfpTopicId:a.imageTopicId}),this.logger.info(`Successfully inscribed profile picture with topic ID: ${a.imageTopicId}`),{pfpTopicId:a.imageTopicId,success:!0,transactionId:a.transactionId||""}}catch(n){return this.logger.error(`Error inscribing profile picture: ${n.message}`),{pfpTopicId:"",success:!1,error:n.message,transactionId:""}}}async createCommunicationTopics(e,t){let r=e?.existingState||{currentStage:"init",completedPercentage:0,createdResources:[]};t&&t.preparing("Starting communication topic creation",0,{state:r});const{accountId:n}=this.getAccountAndSigner();if(!r.outboundTopicId){r.currentStage="topics",t&&t.preparing("Creating outbound topic",5,{state:r});const o=this._generateHcs10Memo(Hcs10MemoType.OUTBOUND,{ttl:e?.ttl,accountId:n}),i=await this.createTopic(o,!0,!0);if(!i.success||!i.topicId)throw new Error(i.error||"Failed to create outbound topic");r.outboundTopicId=i.topicId,r.createdResources&&r.createdResources.push(`outbound:${r.outboundTopicId}`)}if(!r.inboundTopicId){r.currentStage="topics",t&&t.preparing("Creating inbound topic",10,{state:r});const o=this._generateHcs10Memo(Hcs10MemoType.INBOUND,{ttl:e?.ttl,accountId:n}),i=await this.createTopic(o,!0,!1);if(!i.success||!i.topicId)throw new Error(i.error||"Failed to create inbound topic");r.inboundTopicId=i.topicId,r.createdResources&&r.createdResources.push(`inbound:${r.inboundTopicId}`)}return{inboundTopicId:r.inboundTopicId,outboundTopicId:r.outboundTopicId,state:r}}}class ConnectionsManager{constructor(e){this.connections=new Map,this.pendingRequests=new Map,this.profileCache=new Map,this.filterPendingAccountIds=new Set;const t={module:"ConnectionsManager",level:e?.logLevel||"info",prettyPrint:!0};if(this.logger=new Logger$2(t),e?.filterPendingAccountIds&&(this.filterPendingAccountIds=new Set(e.filterPendingAccountIds)),!e.baseClient)throw new Error("ConnectionsManager requires a baseClient to operate");this.baseClient=e.baseClient}async fetchConnectionData(e){try{const t=await this.baseClient.retrieveCommunicationTopics(e),[r,n]=await Promise.all([this.baseClient.getMessages(t.outboundTopic),this.baseClient.getMessages(t.inboundTopic)]);return this.processOutboundMessages(r.messages||[],e),this.processInboundMessages(n.messages||[],e),await this.checkTargetInboundTopicsForConfirmations(),await this.fetchProfilesForConnections(e),await this.fetchConnectionActivity(),this.getAllConnections()}catch(t){return this.logger.error("Error fetching connection data:",t),this.getAllConnections()}}async checkTargetInboundTopicsForConfirmations(){const e=Array.from(this.connections.values()).filter((e=>e.isPending&&e.targetInboundTopicId));if(0===e.length)return;const t=new Map;e.forEach((e=>{if(e.targetInboundTopicId){const r=t.get(e.targetInboundTopicId)||[];r.push(e),t.set(e.targetInboundTopicId,r)}}));for(const[n,o]of t.entries())for(let e=1;e<=2;e++)try{const t=(await this.baseClient.getMessages(n)).messages||[];let r=!1;for(const e of o){const n=e.connectionRequestId;if(!n)continue;const o=t.find((e=>"connection_created"===e.op&&e.connection_id===n&&e.connection_topic_id));if(o?.connection_topic_id){r=!0;const t=o.connection_topic_id;let i=e.connectionTopicId;!i.startsWith("req-")&&e.uniqueRequestKey&&(i=e.uniqueRequestKey);const a={connectionTopicId:t,targetAccountId:e.targetAccountId,targetAgentName:e.targetAgentName,targetInboundTopicId:e.targetInboundTopicId,status:"established",isPending:!1,needsConfirmation:!1,created:new Date(o.created||e.created),profileInfo:e.profileInfo,connectionRequestId:n,uniqueRequestKey:e.uniqueRequestKey};this.connections.set(t,a),i&&i!==t&&this.connections.delete(i),this.logger.debug(`Confirmed connection in target inbound topic: ${t}`)}}if(r||2===e)break;await new Promise((e=>setTimeout(e,500)))}catch(r){if(this.logger.debug(`Error fetching target inbound topic ${n}:`,r),2===e)break;await new Promise((e=>setTimeout(e,500)))}}async fetchProfilesForConnections(e){const t=new Set;for(const n of this.connections.values())n.targetAccountId&&!this.profileCache.has(n.targetAccountId)&&t.add(n.targetAccountId);const r=Array.from(t).map((async e=>{try{const t=await this.baseClient.retrieveProfile(e);t.success&&t.profile&&(this.addProfileInfo(e,t.profile),this.updatePendingConnectionsWithProfileInfo(e,t.profile))}catch(t){this.logger.debug(`Failed to fetch profile for ${e}:`,t)}}));await Promise.allSettled(r)}updatePendingConnectionsWithProfileInfo(e,t){const r=Array.from(this.connections.values()).filter((t=>t.targetAccountId===e&&(t.isPending||t.needsConfirmation)&&!t.targetInboundTopicId));if(r.length>0&&t.inboundTopicId)for(const n of r){const e={...n,targetInboundTopicId:t.inboundTopicId};this.connections.set(n.connectionTopicId,e)}}async fetchConnectionActivity(){const e=this.getActiveConnections().map((async e=>{try{const t=await this.baseClient.getMessages(e.connectionTopicId);t?.messages?.length>0&&this.processConnectionMessages(e.connectionTopicId,t.messages)}catch(t){this.logger.debug(`Failed to fetch activity for ${e.connectionTopicId}:`,t)}}));await Promise.allSettled(e)}shouldFilterAccount(e){return!!this.filterPendingAccountIds.has(e)&&!this.hasEstablishedConnectionWithAccount(e)}processOutboundMessages(e,t){if(!e||0===e.length)return Array.from(this.connections.values());const r=e.filter((e=>"connection_request"===e.op&&e.connection_request_id));for(const i of r){const e=i.connection_request_id,r=i.operator_id||"",n=this.baseClient.extractAccountFromOperatorId(r),o=this.baseClient.extractTopicFromOperatorId(r);if(this.shouldFilterAccount(n)){this.logger.debug(`Filtering out outbound request to account: ${n}`);continue}const a=Array.from(this.connections.values()).some((t=>t.connectionRequestId===e&&!t.isPending)),s=`req-${e}:${r}`;a||this.pendingRequests.has(s)||(this.pendingRequests.set(s,{id:e,requesterId:t,requesterTopicId:i.outbound_topic_id||"",targetAccountId:n,targetTopicId:o,operatorId:r,sequenceNumber:i.sequence_number,created:i.created||new Date,memo:i.m,status:"pending"}),this.connections.has(s)||this.connections.set(s,{connectionTopicId:s,targetAccountId:n,targetInboundTopicId:o,status:"pending",isPending:!0,needsConfirmation:!1,created:i.created||new Date,connectionRequestId:e,uniqueRequestKey:s}))}const n=e.filter((e=>"connection_created"===e.op&&e.connection_topic_id&&e.connection_request_id));for(const i of n){const e=i.connection_request_id,t=i.connection_topic_id,r=this.baseClient.extractAccountFromOperatorId(i.operator_id||"");if(this.shouldFilterAccount(r)){this.logger.debug(`Filtering out outbound confirmation to account: ${r}`);continue}const n=`req-${e}:${i.operator_id}`,o=this.pendingRequests.get(n);o&&(o.status="confirmed"),this.connections.has(n)&&this.connections.delete(n);const a=Array.from(this.connections.entries()).filter((([t,r])=>r.connectionRequestId===e));for(const[i,s]of a)i!==t&&this.connections.delete(i);if(this.connections.has(t)){const r=this.connections.get(t);this.connections.set(t,{...r,status:"established",isPending:!1,needsConfirmation:!1,connectionRequestId:e,confirmedRequestId:i.confirmed_request_id,requesterOutboundTopicId:i.outbound_topic_id,uniqueRequestKey:n})}else this.connections.set(t,{connectionTopicId:t,targetAccountId:r,status:"established",isPending:!1,needsConfirmation:!1,created:i.created||new Date,connectionRequestId:e,confirmedRequestId:i.confirmed_request_id,requesterOutboundTopicId:i.outbound_topic_id,uniqueRequestKey:n})}const o=e.filter((e=>"connection_closed"===e.op||"close_connection"===e.op&&e.connection_topic_id));for(const i of o){const e=i.connection_topic_id;if(this.connections.has(e)){const t=this.connections.get(e);if(this.shouldFilterAccount(t.targetAccountId)&&"established"!==t.status)continue;const r=i.connection_request_id&&i.operator_id?`req-${i.connection_request_id}:${i.operator_id}`:void 0;this.connections.set(e,{...t,status:"closed",isPending:!1,needsConfirmation:!1,lastActivity:i.created||new Date,closedReason:i.reason,closeMethod:i.close_method,uniqueRequestKey:r})}}return Array.from(this.connections.values()).filter((e=>"established"===e.status||"closed"===e.status||!this.filterPendingAccountIds.has(e.targetAccountId)))}processInboundMessages(e,t){if(!e||0===e.length)return Array.from(this.connections.values());const r=e.filter((e=>"connection_request"===e.op&&e.sequence_number));for(const o of r){const t=o.sequence_number,r=o.operator_id||"",n=this.baseClient.extractAccountFromOperatorId(r),i=this.baseClient.extractTopicFromOperatorId(r);if(this.shouldFilterAccount(n)){this.logger.debug(`Filtering out request from account: ${n}`);continue}if(!e.some((e=>"connection_created"===e.op&&e.connection_id===t))){const e=`inb-${t}:${r}`;this.connections.has(e)||this.connections.set(e,{connectionTopicId:e,targetAccountId:n,targetInboundTopicId:i,status:"needs_confirmation",isPending:!1,needsConfirmation:!0,created:o.created||new Date,inboundRequestId:t,uniqueRequestKey:e})}}const n=e.filter((e=>"connection_created"===e.op&&e.connection_topic_id&&e.connection_id));for(const o of n){const e=o.connection_id,t=o.connection_topic_id,r=o.connected_account_id||"";if(this.shouldFilterAccount(r)){this.logger.debug(`Filtering out confirmation for account: ${r}`);continue}const n=`inb-${e}:${o.operator_id}`;this.connections.has(n)&&this.connections.delete(n);const i=Array.from(this.connections.entries()).filter((([t,r])=>r.inboundRequestId===e));for(const[o,a]of i)o!==t&&this.connections.delete(o);if(this.connections.has(t)){const r=this.connections.get(t);this.connections.set(t,{...r,status:"established",isPending:!1,needsConfirmation:!1,inboundRequestId:e,uniqueRequestKey:n})}else this.connections.set(t,{connectionTopicId:t,targetAccountId:r,status:"established",isPending:!1,needsConfirmation:!1,created:o.created||new Date,inboundRequestId:e,uniqueRequestKey:n})}return Array.from(this.connections.values()).filter((e=>"established"===e.status||"closed"===e.status||!this.filterPendingAccountIds.has(e.targetAccountId)))}processConnectionMessages(e,t){if(!t||0===t.length||!this.connections.has(e))return this.connections.get(e);const r=t.filter((e=>e.created)).sort(((e,t)=>{const r=e.created?new Date(e.created).getTime():0;return(t.created?new Date(t.created).getTime():0)-r}))[0];if(r?.created){const t=this.connections.get(e);this.connections.set(e,{...t,lastActivity:r.created})}const n=t.find((e=>"close_connection"===e.op));if(n){const t=this.connections.get(e);this.connections.set(e,{...t,status:"closed",lastActivity:n.created||new Date,closedReason:n.reason,closeMethod:"explicit"})}return this.connections.get(e)}addProfileInfo(e,t){this.profileCache.set(e,t);const r=Array.from(this.connections.values()).filter((t=>t.targetAccountId===e));for(const n of r)this.connections.set(n.connectionTopicId,{...n,profileInfo:t,targetAgentName:t.display_name,targetInboundTopicId:t.inboundTopicId,targetOutboundTopicId:t.outboundTopicId})}getAllConnections(){return Array.from(this.connections.values()).filter((e=>"established"===e.status||"closed"===e.status||!this.filterPendingAccountIds.has(e.targetAccountId)||this.hasEstablishedConnectionWithAccount(e.targetAccountId)))}getPendingRequests(){return Array.from(this.connections.values()).filter((e=>e.isPending&&(!this.filterPendingAccountIds.has(e.targetAccountId)||this.hasEstablishedConnectionWithAccount(e.targetAccountId))))}hasEstablishedConnectionWithAccount(e){return Array.from(this.connections.values()).some((t=>t.targetAccountId===e&&"established"===t.status))}getActiveConnections(){return Array.from(this.connections.values()).filter((e=>"established"===e.status))}getConnectionsNeedingConfirmation(){return Array.from(this.connections.values()).filter((e=>e.needsConfirmation&&(!this.filterPendingAccountIds.has(e.targetAccountId)||this.hasEstablishedConnectionWithAccount(e.targetAccountId))))}getConnectionByTopicId(e){return this.connections.get(e)}getConnection(e,t){return Array.from(this.connections.values()).find((t=>t.connectionRequestId===e||t.inboundRequestId===e))}getConnectionByAccountId(e){return Array.from(this.connections.values()).find((t=>t.targetAccountId===e&&"established"===t.status))}getConnectionsByAccountId(e){return Array.from(this.connections.values()).filter((t=>t.targetAccountId===e))}updateOrAddConnection(e){this.connections.set(e.connectionTopicId,e)}clearAll(){this.connections.clear(),this.pendingRequests.clear()}}var CustomFeeType=(e=>(e.FIXED_FEE="FIXED_FEE",e.FRACTIONAL_FEE="FRACTIONAL_FEE",e.ROYALTY_FEE="ROYALTY_FEE",e))(CustomFeeType||{});class FeeConfigBuilder{constructor(e){this.customFees=[],this.logger=e.logger,this.mirrorNode=new HederaMirrorNode(e.network,e.logger),this.defaultCollectorAccountId=e.defaultCollectorAccountId||""}static forHbar(e,t,r,n,o=[]){return new FeeConfigBuilder({network:r,logger:n,defaultCollectorAccountId:t}).addHbarFee(e,t,o)}static async forToken(e,t,r,n,o,i=[],a){const s=new FeeConfigBuilder({network:n,logger:o,defaultCollectorAccountId:r});return await s.addTokenFee(e,t,r,a,i),s}addHbarFee(e,t,r=[]){if(e<=0)throw new Error("HBAR amount must be greater than zero");return this.customFees.push({feeAmount:{amount:1e8*e,decimals:0},feeCollectorAccountId:t||"",feeTokenId:void 0,exemptAccounts:[...r],type:CustomFeeType.FIXED_FEE}),this}async addTokenFee(e,t,r,n,o=[]){if(e<=0)throw new Error("Token amount must be greater than zero");if(!t)throw new Error("Fee token ID is required when adding a token fee");let i=n;if(void 0===i)try{const e=await this.mirrorNode.getTokenInfo(t);e?.decimals?(i=parseInt(e.decimals,10),this.logger.info(`Fetched decimals for ${t}: ${i}`)):(this.logger.warn(`Could not fetch decimals for ${t}, defaulting to 0.`),i=0)}catch(a){this.logger.error(`Error fetching decimals for ${t}, defaulting to 0: ${a}`),i=0}return this.customFees.push({feeAmount:{amount:e*10**i,decimals:i},feeCollectorAccountId:r||"",feeTokenId:t,exemptAccounts:[...o],type:CustomFeeType.FIXED_FEE}),this}build(){if(0===this.customFees.length)throw new Error("At least one fee must be added using addHbarFee/addTokenFee or created using forHbar/forToken");if(this.customFees.length>10)throw new Error("Maximum of 10 custom fees per topic allowed");const e=new Set;return this.customFees.forEach((t=>{t.exemptAccounts.forEach((t=>e.add(t)))})),{customFees:this.customFees,exemptAccounts:Array.from(e)}}}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==global$2?global$2:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dist={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});for(var t={},r={byteLength:function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=c(e),a=n[0],s=n[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),l=0,d=s>0?a-4:a;for(r=0;r<d;r+=4)t=o[e.charCodeAt(r)]<<18|o[e.charCodeAt(r+1)]<<12|o[e.charCodeAt(r+2)]<<6|o[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===s&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},fromByteArray:function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")}},n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=a[s],o[a.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 u(e,t,r){for(var o,i,a=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;var l={
150
150
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
151
151
  read:function(e,t,r,n,o){var i,a,s=8*o-n-1,c=(1<<s)-1,u=c>>1,l=-7,d=r?o-1:0,p=r?-1:1,f=e[t+d];for(d+=p,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+e[t+d],d+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=p,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),i-=u}return(f?-1:1)*a*Math.pow(2,i-n)},write:function(e,t,r,n,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,d=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?p/c:p*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,o),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[r+f]=255&s,f+=h,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[r+f]=255&a,f+=h,a/=256,u-=8);e[r+f-h]|=128*m}};
152
152
  /*!
@@ -155,5 +155,5 @@ read:function(e,t,r,n,o){var i,a,s=8*o-n-1,c=(1<<s)-1,u=c>>1,l=-7,d=r?o-1:0,p=r?
155
155
  * @author Feross Aboukhadijeh <https://feross.org>
156
156
  * @license MIT
157
157
  */
158
- !function(e){const t=r,n=l,o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=d,e.SlowBuffer=function(e){+e!=e&&(e=0);return d.alloc(+e)},e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i;const{Uint8Array:a,ArrayBuffer:s,SharedArrayBuffer:c}=globalThis;function u(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new a(e);return Object.setPrototypeOf(t,d.prototype),t}function d(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return p(e,t,r)}function p(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!d.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let n=u(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(s.isView(e))return function(e){if(X(e,a)){const t=new a(e);return y(t.buffer,t.byteOffset,t.byteLength)}return m(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,s)||e&&X(e.buffer,s))return y(e,t,r);if(void 0!==c&&(X(e,c)||e&&X(e.buffer,c)))return y(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return d.from(n,t,r);const o=function(e){if(d.isBuffer(e)){const t=0|g(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||J(e.length)?u(0):m(e);if("Buffer"===e.type&&Array.isArray(e.data))return m(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return d.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return f(e),u(e<0?0:0|g(e))}function m(e){const t=e.length<0?0:0|g(e.length),r=u(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function y(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new a(e):void 0===r?new a(e,t):new a(e,t,r),Object.setPrototypeOf(n,d.prototype),n}function g(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function b(e,t){if(d.isBuffer(e))return e.length;if(s.isView(e)||X(e,s))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(e).length;default:if(o)return n?-1:W(e).length;t=(""+t).toLowerCase(),o=!0}}function w(e,t,r){let 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 B(this,t,r);case"utf8":case"utf-8":return R(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function k(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=d.from(t,n)),d.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof a.prototype.indexOf?o?a.prototype.indexOf.call(e,t,r):a.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,o){let i,a=1,s=e.length,c=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;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(u(e,i)===u(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===c)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+c>s&&(r=s-c),i=r;i>=0;i--){let r=!0;for(let n=0;n<c;n++)if(u(e,i+n)!==u(t,n)){r=!1;break}if(r)return i}return-1}function T(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function I(e,t,r,n){return Y(W(t,e.length-r),e,r,n)}function A(e,t,r,n){return Y(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function O(e,t,r,n){return Y(Q(t),e,r,n)}function E(e,t,r,n){return Y(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function S(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function R(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(i=c));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}d.TYPED_ARRAY_SUPPORT=function(){try{const e=new a(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,a.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),d.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}}),d.poolSize=8192,d.from=function(e,t,r){return p(e,t,r)},Object.setPrototypeOf(d.prototype,a.prototype),Object.setPrototypeOf(d,a),d.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},d.allocUnsafe=function(e){return h(e)},d.allocUnsafeSlow=function(e){return h(e)},d.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==d.prototype},d.compare=function(e,t){if(X(e,a)&&(e=d.from(e,e.offset,e.byteLength)),X(t,a)&&(t=d.from(t,t.offset,t.byteLength)),!d.isBuffer(e)||!d.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},d.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}},d.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return d.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=d.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(X(t,a))o+t.length>n.length?(d.isBuffer(t)||(t=d.from(t)),t.copy(n,o)):a.prototype.set.call(n,t,o);else{if(!d.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},d.byteLength=b,d.prototype._isBuffer=!0,d.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},d.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},d.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},d.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?R(this,0,e):w.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(e){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===d.compare(this,e)},d.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(d.prototype[o]=d.prototype.inspect),d.prototype.compare=function(e,t,r,n,o){if(X(e,a)&&(e=d.from(e,e.offset,e.byteLength)),!d.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const c=Math.min(i,s),u=this.slice(n,o),l=e.slice(t,r);for(let a=0;a<c;++a)if(u[a]!==l[a]){i=u[a],s=l[a];break}return i<s?-1:s<i?1:0},d.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},d.prototype.indexOf=function(e,t,r){return k(this,e,t,r,!0)},d.prototype.lastIndexOf=function(e,t,r){return k(this,e,t,r,!1)},d.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)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return T(this,e,t,r);case"utf8":case"utf-8":return I(this,e,t,r);case"ascii":case"latin1":case"binary":return A(this,e,t,r);case"base64":return O(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function P(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function C(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let i=t;i<r;++i)o+=ee[e[i]];return o}function N(e,t,r){const n=e.slice(t,r);let o="";for(let i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function D(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 M(e,t,r,n,o,i){if(!d.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function $(e,t,r,n,o){H(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,o){H(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,o,i){return t=+t,r>>>=0,i||j(e,0,r,4),n.write(e,t,r,o,23,4),r+4}function F(e,t,r,o,i){return t=+t,r>>>=0,i||j(e,0,r,8),n.write(e,t,r,o,52,8),r+8}d.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,d.prototype),n},d.prototype.readUintLE=d.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},d.prototype.readUintBE=d.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},d.prototype.readUint8=d.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readBigUInt64LE=te((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),d.prototype.readBigUInt64BE=te((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),d.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},d.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},d.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},d.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},d.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},d.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readBigInt64LE=te((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),d.prototype.readBigInt64BE=te((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),d.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),n.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),n.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),n.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),n.read(this,e,!1,52,8)},d.prototype.writeUintLE=d.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){M(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){M(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},d.prototype.writeUint8=d.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeBigUInt64LE=te((function(e,t=0){return $(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),d.prototype.writeBigUInt64BE=te((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),d.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+r},d.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+r},d.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},d.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},d.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeBigInt64LE=te((function(e,t=0){return $(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),d.prototype.writeBigInt64BE=te((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),d.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},d.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},d.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},d.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},d.prototype.copy=function(e,t,r,n){if(!d.isBuffer(e))throw new TypeError("argument should be a Buffer");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("Index out of range");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);const o=n-r;return this===e&&"function"==typeof a.prototype.copyWithin?this.copyWithin(t,r,n):a.prototype.set.call(e,this.subarray(r,n),t),o},d.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!d.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=d.isBuffer(e)?e:d.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const q={};function K(e,t,r){q[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function G(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function H(e,t,r,n,o,i){if(e>r||e<t){const r="bigint"==typeof t?"n":"";let n;throw n=0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`,new q.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,r){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,o,i)}function V(e,t){if("number"!=typeof e)throw new q.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw V(e,r),new q.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new q.ERR_BUFFER_OUT_OF_BOUNDS;throw new q.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}K("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),K("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),K("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=G(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=G(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const Z=/[^+/0-9A-Za-z-_]/g;function W(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Q(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const ee=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function te(e){return"undefined"==typeof BigInt?re:e}function re(){throw new Error("BigInt not supported")}}(t);const d=t.Buffer;e.Blob=t.Blob,e.BlobOptions=t.BlobOptions,e.Buffer=t.Buffer,e.File=t.File,e.FileOptions=t.FileOptions,e.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,e.SlowBuffer=t.SlowBuffer,e.TranscodeEncoding=t.TranscodeEncoding,e.atob=t.atob,e.btoa=t.btoa,e.constants=t.constants,e.default=d,e.isAscii=t.isAscii,e.isUtf8=t.isUtf8,e.kMaxLength=t.kMaxLength,e.kStringMaxLength=t.kStringMaxLength,e.resolveObjectURL=t.resolveObjectURL,e.transcode=t.transcode}(dist)),dist}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var e,t="object"==typeof Reflect?Reflect:null,r=t&&"function"==typeof t.apply?t.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}events.exports=o,events.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}h(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&h(e,"error",t,r)}(e,o,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var o,i,c,u;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),c=i[t]),void 0===c)c=i[t]=r,++e._eventsCount;else if("function"==typeof c?c=i[t]=n?[r,c]:[c,r]:n?c.unshift(r):c.push(r),(o=s(e))>0&&c.length>o&&!c.warned){c.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=c.length,u=l,console&&console.warn&&console.warn(u)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=u.bind(n);return o.listener=r,n.wrapFn=o,o}function d(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):f(o,o.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function h(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}return Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return s(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=f(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,l(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,l(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,o,i,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},events.exports}var string_decoder={},safeBuffer={exports:{}},hasRequiredSafeBuffer,hasRequiredString_decoder;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,function(e,t){var r=requireDist(),n=r.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function i(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=i),i.prototype=Object.create(n.prototype),o(n,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var o=n(e);return void 0!==t?"string"==typeof r?o.fill(t,r):o.fill(t):o.fill(0),o},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer,safeBuffer.exports)),safeBuffer.exports}function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var e=requireSafeBuffer().Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(r){var n;switch(this.encoding=function(r){var n=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(r);if("string"!=typeof n&&(e.isEncoding===t||!t(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=i,this.end=a,n=4;break;case"utf8":this.fillLast=o,n=4;break;case"base64":this.text=s,this.end=c,n=3;break;default:return this.write=u,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function n(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function i(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function a(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function s(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function l(e){return e&&e.length?this.write(e):""}return string_decoder.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},r.prototype.text=function(e,t){var r=function(e,t,r){var o=t.length-1;if(o<r)return 0;var i=n(t[o]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--o<r||-2===i)return 0;if(i=n(t[o]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--o<r||-2===i)return 0;if(i=n(t[o]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var o=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,o),e.toString("utf8",t,o)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},string_decoder}var inherits_browser={exports:{}},hasRequiredInherits_browser,streamBrowser,hasRequiredStreamBrowser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,"function"==typeof Object.create?inherits_browser.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),inherits_browser.exports}function requireStreamBrowser(){return hasRequiredStreamBrowser?streamBrowser:(hasRequiredStreamBrowser=1,streamBrowser=requireEvents().EventEmitter)}var util={},types={},shams$1,hasRequiredShams$1,shams,hasRequiredShams,esObjectAtoms,hasRequiredEsObjectAtoms,esErrors,hasRequiredEsErrors,_eval,hasRequired_eval,range,hasRequiredRange,ref,hasRequiredRef,syntax,hasRequiredSyntax,type,hasRequiredType,uri,hasRequiredUri,abs,hasRequiredAbs,floor,hasRequiredFloor,max,hasRequiredMax,min,hasRequiredMin,pow,hasRequiredPow,round,hasRequiredRound,_isNaN,hasRequired_isNaN,sign,hasRequiredSign,gOPD,hasRequiredGOPD,gopd,hasRequiredGopd,esDefineProperty,hasRequiredEsDefineProperty,hasSymbols,hasRequiredHasSymbols,Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf,Object_getPrototypeOf,hasRequiredObject_getPrototypeOf,implementation,hasRequiredImplementation,functionBind,hasRequiredFunctionBind,functionCall,hasRequiredFunctionCall,functionApply,hasRequiredFunctionApply,reflectApply,hasRequiredReflectApply,actualApply,hasRequiredActualApply,callBindApplyHelpers,hasRequiredCallBindApplyHelpers,get,hasRequiredGet,getProto,hasRequiredGetProto,hasown,hasRequiredHasown,getIntrinsic,hasRequiredGetIntrinsic,callBound,hasRequiredCallBound,isArguments,hasRequiredIsArguments,isRegex,hasRequiredIsRegex,safeRegexTest,hasRequiredSafeRegexTest,isGeneratorFunction,hasRequiredIsGeneratorFunction,isCallable,hasRequiredIsCallable,forEach_1,hasRequiredForEach,possibleTypedArrayNames,hasRequiredPossibleTypedArrayNames,availableTypedArrays,hasRequiredAvailableTypedArrays;function requireShams$1(){return hasRequiredShams$1?shams$1:(hasRequiredShams$1=1,shams$1=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0})}function requireShams(){if(hasRequiredShams)return shams;hasRequiredShams=1;var e=requireShams$1();return shams=function(){return e()&&!!Symbol.toStringTag}}function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms?esObjectAtoms:(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object)}function requireEsErrors(){return hasRequiredEsErrors?esErrors:(hasRequiredEsErrors=1,esErrors=Error)}function require_eval(){return hasRequired_eval?_eval:(hasRequired_eval=1,_eval=EvalError)}function requireRange(){return hasRequiredRange?range:(hasRequiredRange=1,range=RangeError)}function requireRef(){return hasRequiredRef?ref:(hasRequiredRef=1,ref=ReferenceError)}function requireSyntax(){return hasRequiredSyntax?syntax:(hasRequiredSyntax=1,syntax=SyntaxError)}function requireType(){return hasRequiredType?type:(hasRequiredType=1,type=TypeError)}function requireUri(){return hasRequiredUri?uri:(hasRequiredUri=1,uri=URIError)}function requireAbs(){return hasRequiredAbs?abs:(hasRequiredAbs=1,abs=Math.abs)}function requireFloor(){return hasRequiredFloor?floor:(hasRequiredFloor=1,floor=Math.floor)}function requireMax(){return hasRequiredMax?max:(hasRequiredMax=1,max=Math.max)}function requireMin(){return hasRequiredMin?min:(hasRequiredMin=1,min=Math.min)}function requirePow(){return hasRequiredPow?pow:(hasRequiredPow=1,pow=Math.pow)}function requireRound(){return hasRequiredRound?round:(hasRequiredRound=1,round=Math.round)}function require_isNaN(){return hasRequired_isNaN?_isNaN:(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(e){return e!=e})}function requireSign(){if(hasRequiredSign)return sign;hasRequiredSign=1;var e=require_isNaN();return sign=function(t){return e(t)||0===t?t:t<0?-1:1}}function requireGOPD(){return hasRequiredGOPD?gOPD:(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor)}function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var e=requireGOPD();if(e)try{e([],"length")}catch(t){e=null}return gopd=e}function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return esDefineProperty=e}function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var e="undefined"!=typeof Symbol&&Symbol,t=requireShams$1();return hasSymbols=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf?Reflect_getPrototypeOf:(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function requireObject_getPrototypeOf(){return hasRequiredObject_getPrototypeOf?Object_getPrototypeOf:(hasRequiredObject_getPrototypeOf=1,Object_getPrototypeOf=requireEsObjectAtoms().getPrototypeOf||null)}function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var e=Object.prototype.toString,t=Math.max,r=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};return implementation=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e,t){for(var r=[],n=t,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),s=t(0,o.length-a.length),c=[],u=0;u<s;u++)c[u]="$"+u;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(c,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var e=o.apply(this,r(a,arguments));return Object(e)===e?e:this}return o.apply(n,r(a,arguments))})),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i},implementation}function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var e=requireImplementation();return functionBind=Function.prototype.bind||e}function requireFunctionCall(){return hasRequiredFunctionCall?functionCall:(hasRequiredFunctionCall=1,functionCall=Function.prototype.call)}function requireFunctionApply(){return hasRequiredFunctionApply?functionApply:(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply)}function requireReflectApply(){return hasRequiredReflectApply?reflectApply:(hasRequiredReflectApply=1,reflectApply="undefined"!=typeof Reflect&&Reflect&&Reflect.apply)}function requireActualApply(){if(hasRequiredActualApply)return actualApply;hasRequiredActualApply=1;var e=requireFunctionBind(),t=requireFunctionApply(),r=requireFunctionCall(),n=requireReflectApply();return actualApply=n||e.call(r,t)}function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var e=requireFunctionBind(),t=requireType(),r=requireFunctionCall(),n=requireActualApply();return callBindApplyHelpers=function(o){if(o.length<1||"function"!=typeof o[0])throw new t("a function is required");return n(e,r,o)}}function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var e,t=requireCallBindApplyHelpers(),r=requireGopd();try{e=[].__proto__===Array.prototype}catch(a){if(!a||"object"!=typeof a||!("code"in a)||"ERR_PROTO_ACCESS"!==a.code)throw a}var n=!!e&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return get=n&&"function"==typeof n.get?t([n.get]):"function"==typeof i&&function(e){return i(null==e?e:o(e))}}function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var e=requireReflect_getPrototypeOf(),t=requireObject_getPrototypeOf(),r=requireGet();return getProto=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:r?function(e){return r(e)}:null}function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=requireFunctionBind();return hasown=r.call(e,t)}function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;var e;hasRequiredGetIntrinsic=1;var t=requireEsObjectAtoms(),r=requireEsErrors(),n=require_eval(),o=requireRange(),i=requireRef(),a=requireSyntax(),s=requireType(),c=requireUri(),u=requireAbs(),l=requireFloor(),d=requireMax(),p=requireMin(),f=requirePow(),h=requireRound(),m=requireSign(),y=Function,g=function(e){try{return y('"use strict"; return ('+e+").constructor;")()}catch(t){}},b=requireGopd(),w=requireEsDefineProperty(),v=function(){throw new s},k=b?function(){try{return v}catch(e){try{return b(arguments,"callee").get}catch(t){return v}}}():v,_=requireHasSymbols()(),T=requireGetProto(),I=requireObject_getPrototypeOf(),A=requireReflect_getPrototypeOf(),O=requireFunctionApply(),E=requireFunctionCall(),S={},R="undefined"!=typeof Uint8Array&&T?T(Uint8Array):e,x={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":_&&T?T([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":S,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&T?T(T([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&_&&T?T((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&_&&T?T((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&T?T(""[Symbol.iterator]()):e,"%Symbol%":_?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":k,"%TypedArray%":R,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":E,"%Function.prototype.apply%":O,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":I,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":m,"%Reflect.getPrototypeOf%":A};if(T)try{null.error}catch(G){var P=T(T(G));x["%Error.prototype%"]=P}var C=function e(t){var r;if("%AsyncFunction%"===t)r=g("async function () {}");else if("%GeneratorFunction%"===t)r=g("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=g("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&T&&(r=T(o.prototype))}return x[t]=r,r},B={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},N=requireFunctionBind(),D=requireHasown(),M=N.call(E,Array.prototype.concat),$=N.call(O,Array.prototype.splice),L=N.call(E,String.prototype.replace),j=N.call(E,String.prototype.slice),U=N.call(E,RegExp.prototype.exec),F=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,K=function(e,t){var r,n=e;if(D(B,n)&&(n="%"+(r=B[n])[0]+"%"),D(x,n)){var o=x[n];if(o===S&&(o=C(n)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new a("intrinsic "+e+" does not exist!")};return getIntrinsic=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===U(/^%?[^%]*%?$/,e))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=j(e,0,1),r=j(e,-1);if("%"===t&&"%"!==r)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new a("invalid intrinsic syntax, expected opening `%`");var n=[];return L(e,F,(function(e,t,r,o){n[n.length]=r?L(o,q,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=K("%"+n+"%",t),i=o.name,c=o.value,u=!1,l=o.alias;l&&(n=l[0],$(r,M([0,1],l)));for(var d=1,p=!0;d<r.length;d+=1){var f=r[d],h=j(f,0,1),m=j(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===m||"'"===m||"`"===m)&&h!==m)throw new a("property names with quotes must have matching quotes");if("constructor"!==f&&p||(u=!0),D(x,i="%"+(n+="."+f)+"%"))c=x[i];else if(null!=c){if(!(f in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&d+1>=r.length){var y=b(c,f);c=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[f]}else p=D(c,f),c=c[f];p&&!u&&(x[i]=c)}}return c},getIntrinsic}function requireCallBound(){if(hasRequiredCallBound)return callBound;hasRequiredCallBound=1;var e=requireGetIntrinsic(),t=requireCallBindApplyHelpers(),r=t([e("%String.prototype.indexOf%")]);return callBound=function(n,o){var i=e(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?t([i]):i}}function requireIsArguments(){if(hasRequiredIsArguments)return isArguments;hasRequiredIsArguments=1;var e=requireShams()(),t=requireCallBound()("Object.prototype.toString"),r=function(r){return!(e&&r&&"object"==typeof r&&Symbol.toStringTag in r)&&"[object Arguments]"===t(r)},n=function(e){return!!r(e)||null!==e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==t(e)&&"callee"in e&&"[object Function]"===t(e.callee)},o=function(){return r(arguments)}();return r.isLegacyArguments=n,isArguments=o?r:n}function requireIsRegex(){if(hasRequiredIsRegex)return isRegex;hasRequiredIsRegex=1;var e,t=requireCallBound(),r=requireShams()(),n=requireHasown(),o=requireGopd();if(r){var i=t("RegExp.prototype.exec"),a={},s=function(){throw a},c={toString:s,valueOf:s};"symbol"==typeof Symbol.toPrimitive&&(c[Symbol.toPrimitive]=s),e=function(e){if(!e||"object"!=typeof e)return!1;var t=o(e,"lastIndex");if(!(t&&n(t,"value")))return!1;try{i(e,c)}catch(r){return r===a}}}else{var u=t("Object.prototype.toString");e=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}}return isRegex=e}function requireSafeRegexTest(){if(hasRequiredSafeRegexTest)return safeRegexTest;hasRequiredSafeRegexTest=1;var e=requireCallBound(),t=requireIsRegex(),r=e("RegExp.prototype.exec"),n=requireType();return safeRegexTest=function(e){if(!t(e))throw new n("`regex` must be a RegExp");return function(t){return null!==r(e,t)}}}function requireIsGeneratorFunction(){if(hasRequiredIsGeneratorFunction)return isGeneratorFunction;hasRequiredIsGeneratorFunction=1;var e,t=requireCallBound(),r=requireSafeRegexTest()(/^\s*(?:function)?\*/),n=requireShams()(),o=requireGetProto(),i=t("Object.prototype.toString"),a=t("Function.prototype.toString");return isGeneratorFunction=function(t){if("function"!=typeof t)return!1;if(r(a(t)))return!0;if(!n)return"[object GeneratorFunction]"===i(t);if(!o)return!1;if(void 0===e){var s=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch(e){}}();e=!!s&&o(s)}return o(t)===e}}function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var e,t,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw t}}),t={},n((function(){throw 42}),null,e)}catch(p){p!==t&&(n=null)}else n=null;var o=/^\s*class\b/,i=function(e){try{var t=r.call(e);return o.test(t)}catch(n){return!1}},a=function(e){try{return!i(e)&&(r.call(e),!0)}catch(t){return!1}},s=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var d=document.all;s.call(d)===s.call(document.all)&&(l=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(r){}return!1})}return isCallable=n?function(r){if(l(r))return!0;if(!r)return!1;if("function"!=typeof r&&"object"!=typeof r)return!1;try{n(r,null,e)}catch(o){if(o!==t)return!1}return!i(r)&&a(r)}:function(e){if(l(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(i(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}}function requireForEach(){if(hasRequiredForEach)return forEach_1;hasRequiredForEach=1;var e=requireIsCallable(),t=Object.prototype.toString,r=Object.prototype.hasOwnProperty;return forEach_1=function(n,o,i){if(!e(o))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=i),"[object Array]"===t.call(n)?function(e,t,n){for(var o=0,i=e.length;o<i;o++)r.call(e,o)&&(null==n?t(e[o],o,e):t.call(n,e[o],o,e))}(n,o,a):"string"==typeof n?function(e,t,r){for(var n=0,o=e.length;n<o;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(n,o,a):function(e,t,n){for(var o in e)r.call(e,o)&&(null==n?t(e[o],o,e):t.call(n,e[o],o,e))}(n,o,a)},forEach_1}function requirePossibleTypedArrayNames(){return hasRequiredPossibleTypedArrayNames?possibleTypedArrayNames:(hasRequiredPossibleTypedArrayNames=1,possibleTypedArrayNames=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"])}function requireAvailableTypedArrays(){if(hasRequiredAvailableTypedArrays)return availableTypedArrays;hasRequiredAvailableTypedArrays=1;var e=requirePossibleTypedArrayNames(),t="undefined"==typeof globalThis?commonjsGlobal:globalThis;return availableTypedArrays=function(){for(var r=[],n=0;n<e.length;n++)"function"==typeof t[e[n]]&&(r[r.length]=e[n]);return r}}var callBind={exports:{}},defineDataProperty,hasRequiredDefineDataProperty,hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors,setFunctionLength,hasRequiredSetFunctionLength,applyBind,hasRequiredApplyBind,hasRequiredCallBind,whichTypedArray,hasRequiredWhichTypedArray,isTypedArray,hasRequiredIsTypedArray,hasRequiredTypes,isBufferBrowser,hasRequiredIsBufferBrowser,hasRequiredUtil,buffer_list,hasRequiredBuffer_list,destroy_1,hasRequiredDestroy;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var e=requireEsDefineProperty(),t=requireSyntax(),r=requireType(),n=requireGopd();return defineDataProperty=function(o,i,a){if(!o||"object"!=typeof o&&"function"!=typeof o)throw new r("`obj` must be an object or a function`");if("string"!=typeof i&&"symbol"!=typeof i)throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new r("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],d=!!n&&n(o,i);if(e)e(o,i,{configurable:null===u&&d?d.configurable:!u,enumerable:null===s&&d?d.enumerable:!s,value:a,writable:null===c&&d?d.writable:!c});else{if(!l&&(s||c||u))throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");o[i]=a}},defineDataProperty}function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var e=requireEsDefineProperty(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return 1!==e([],"length",{value:1}).length}catch(t){return!0}},hasPropertyDescriptors_1=t}function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var e=requireGetIntrinsic(),t=requireDefineDataProperty(),r=requireHasPropertyDescriptors()(),n=requireGopd(),o=requireType(),i=e("%Math.floor%");return setFunctionLength=function(e,a){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof a||a<0||a>4294967295||i(a)!==a)throw new o("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],c=!0,u=!0;if("length"in e&&n){var l=n(e,"length");l&&!l.configurable&&(c=!1),l&&!l.writable&&(u=!1)}return(c||u||!s)&&(r?t(e,"length",a,!0,!0):t(e,"length",a)),e},setFunctionLength}function requireApplyBind(){if(hasRequiredApplyBind)return applyBind;hasRequiredApplyBind=1;var e=requireFunctionBind(),t=requireFunctionApply(),r=requireActualApply();return applyBind=function(){return r(e,t,arguments)},applyBind}function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,e=callBind,t=requireSetFunctionLength(),r=requireEsDefineProperty(),n=requireCallBindApplyHelpers(),o=requireApplyBind(),e.exports=function(e){var r=n(arguments),o=e.length-(arguments.length-1);return t(r,1+(o>0?o:0),!0)},r?r(e.exports,"apply",{value:o}):e.exports.apply=o),callBind.exports;var e,t,r,n,o}function requireWhichTypedArray(){if(hasRequiredWhichTypedArray)return whichTypedArray;hasRequiredWhichTypedArray=1;var e=requireForEach(),t=requireAvailableTypedArrays(),r=requireCallBind(),n=requireCallBound(),o=requireGopd(),i=n("Object.prototype.toString"),a=requireShams()(),s="undefined"==typeof globalThis?commonjsGlobal:globalThis,c=t(),u=n("String.prototype.slice"),l=Object.getPrototypeOf,d=n("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},p={__proto__:null};e(c,a&&o&&l?function(e){var t=new s[e];if(Symbol.toStringTag in t){var n=l(t),i=o(n,Symbol.toStringTag);if(!i){var a=l(n);i=o(a,Symbol.toStringTag)}p["$"+e]=r(i.get)}}:function(e){var t=new s[e],n=t.slice||t.set;n&&(p["$"+e]=r(n))});return whichTypedArray=function(t){if(!t||"object"!=typeof t)return!1;if(!a){var r=u(i(t),8,-1);return d(c,r)>-1?r:"Object"===r&&function(t){var r=!1;return e(p,(function(e,n){if(!r)try{e(t),r=u(n,1)}catch(o){}})),r}(t)}return o?function(t){var r=!1;return e(p,(function(e,n){if(!r)try{"$"+e(t)===n&&(r=u(n,1))}catch(o){}})),r}(t):null}}function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray;hasRequiredIsTypedArray=1;var e=requireWhichTypedArray();return isTypedArray=function(t){return!!e(t)}}function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,function(e){var t=requireIsArguments(),r=requireIsGeneratorFunction(),n=requireWhichTypedArray(),o=requireIsTypedArray();function i(e){return e.call.bind(e)}var a="undefined"!=typeof BigInt,s="undefined"!=typeof Symbol,c=i(Object.prototype.toString),u=i(Number.prototype.valueOf),l=i(String.prototype.valueOf),d=i(Boolean.prototype.valueOf);if(a)var p=i(BigInt.prototype.valueOf);if(s)var f=i(Symbol.prototype.valueOf);function h(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(r){return!1}}function m(e){return"[object Map]"===c(e)}function y(e){return"[object Set]"===c(e)}function g(e){return"[object WeakMap]"===c(e)}function b(e){return"[object WeakSet]"===c(e)}function w(e){return"[object ArrayBuffer]"===c(e)}function v(e){return"undefined"!=typeof ArrayBuffer&&(w.working?w(e):e instanceof ArrayBuffer)}function k(e){return"[object DataView]"===c(e)}function _(e){return"undefined"!=typeof DataView&&(k.working?k(e):e instanceof DataView)}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o,e.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||_(e)},e.isUint8Array=function(e){return"Uint8Array"===n(e)},e.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===n(e)},e.isUint16Array=function(e){return"Uint16Array"===n(e)},e.isUint32Array=function(e){return"Uint32Array"===n(e)},e.isInt8Array=function(e){return"Int8Array"===n(e)},e.isInt16Array=function(e){return"Int16Array"===n(e)},e.isInt32Array=function(e){return"Int32Array"===n(e)},e.isFloat32Array=function(e){return"Float32Array"===n(e)},e.isFloat64Array=function(e){return"Float64Array"===n(e)},e.isBigInt64Array=function(e){return"BigInt64Array"===n(e)},e.isBigUint64Array=function(e){return"BigUint64Array"===n(e)},m.working="undefined"!=typeof Map&&m(new Map),e.isMap=function(e){return"undefined"!=typeof Map&&(m.working?m(e):e instanceof Map)},y.working="undefined"!=typeof Set&&y(new Set),e.isSet=function(e){return"undefined"!=typeof Set&&(y.working?y(e):e instanceof Set)},g.working="undefined"!=typeof WeakMap&&g(new WeakMap),e.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(g.working?g(e):e instanceof WeakMap)},b.working="undefined"!=typeof WeakSet&&b(new WeakSet),e.isWeakSet=function(e){return b(e)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),e.isArrayBuffer=v,k.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&k(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=_;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function I(e){return"[object SharedArrayBuffer]"===c(e)}function A(e){return void 0!==T&&(void 0===I.working&&(I.working=I(new T)),I.working?I(e):e instanceof T)}function O(e){return h(e,u)}function E(e){return h(e,l)}function S(e){return h(e,d)}function R(e){return a&&h(e,p)}function x(e){return s&&h(e,f)}e.isSharedArrayBuffer=A,e.isAsyncFunction=function(e){return"[object AsyncFunction]"===c(e)},e.isMapIterator=function(e){return"[object Map Iterator]"===c(e)},e.isSetIterator=function(e){return"[object Set Iterator]"===c(e)},e.isGeneratorObject=function(e){return"[object Generator]"===c(e)},e.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===c(e)},e.isNumberObject=O,e.isStringObject=E,e.isBooleanObject=S,e.isBigIntObject=R,e.isSymbolObject=x,e.isBoxedPrimitive=function(e){return O(e)||E(e)||S(e)||R(e)||x(e)},e.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(v(e)||A(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))}(types)),types}function requireIsBufferBrowser(){return hasRequiredIsBufferBrowser?isBufferBrowser:(hasRequiredIsBufferBrowser=1,isBufferBrowser=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8})}function requireUtil(){return hasRequiredUtil||(hasRequiredUtil=1,function(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},r=/%[sdj%]/g;e.format=function(e){if(!y(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(a(arguments[n]));return t.join(" ")}n=1;for(var o=arguments,i=o.length,s=String(e).replace(r,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch(t){return"[Circular]"}default:return e}})),c=o[n];n<i;c=o[++n])h(c)||!w(c)?s+=" "+c:s+=" "+a(c);return s},e.deprecate=function(t,r){if(void 0!==process$1&&!0===process$1.noDeprecation)return t;if(void 0===process$1)return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(process$1.throwDeprecation)throw new Error(r);process$1.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var n={},o=/^$/;if(process$1.env.NODE_DEBUG){var i=process$1.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+i+"$","i")}function a(t,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),f(r)?n.showHidden=r:r&&e._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,t,n.depth)}function s(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function c(e,t){return e}function u(t,r,n){if(t.customInspect&&r&&_(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return y(o)||(o=u(t,o,n)),o}var i=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(m(t))return e.stylize(""+t,"number");if(f(t))return e.stylize(""+t,"boolean");if(h(t))return e.stylize("null","null")}(t,r);if(i)return i;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),k(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(_(r)){var c=r.name?": "+r.name:"";return t.stylize("[Function"+c+"]","special")}if(b(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(v(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return l(r)}var w,T="",I=!1,A=["{","}"];(p(r)&&(I=!0,A=["[","]"]),_(r))&&(T=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(T=" "+RegExp.prototype.toString.call(r)),v(r)&&(T=" "+Date.prototype.toUTCString.call(r)),k(r)&&(T=" "+l(r)),0!==a.length||I&&0!=r.length?n<0?b(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),w=I?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)O(t,String(a))?i.push(d(e,t,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(d(e,t,r,n,o,!0))})),i}(t,r,n,s,a):a.map((function(e){return d(t,r,n,s,e,I)})),t.seen.pop(),function(e,t,r){var n=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(w,T,A)):A[0]+T+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),O(n,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=h(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),g(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function h(e){return null===e}function m(e){return"number"==typeof e}function y(e){return"string"==typeof e}function g(e){return void 0===e}function b(e){return w(e)&&"[object RegExp]"===T(e)}function w(e){return"object"==typeof e&&null!==e}function v(e){return w(e)&&"[object Date]"===T(e)}function k(e){return w(e)&&("[object Error]"===T(e)||e instanceof Error)}function _(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!n[t])if(o.test(t)){var r=process$1.pid;n[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else n[t]=function(){};return n[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=requireTypes(),e.isArray=p,e.isBoolean=f,e.isNull=h,e.isNullOrUndefined=function(e){return null==e},e.isNumber=m,e.isString=y,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=g,e.isRegExp=b,e.types.isRegExp=b,e.isObject=w,e.isDate=v,e.types.isDate=v,e.isError=k,e.types.isNativeError=k,e.isFunction=_,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},e.isBuffer=requireIsBufferBrowser();var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[I((t=new Date).getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":"),[t.getDate(),A[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=requireInherits_browser(),e._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var E="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function S(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(E&&e[E]){var r;if("function"!=typeof(r=e[E]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,E,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,o)}catch(a){r(a)}return n}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),E&&Object.defineProperty(r,E,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,t(e))},e.promisify.custom=E,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var n=t.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var o=this,i=function(){return n.apply(o,arguments)};e.apply(this,t).then((function(e){process$1.nextTick(i.bind(null,null,e))}),(function(e){process$1.nextTick(S.bind(null,e,i))}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,t(e)),r}}(util)),util}function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t,r){return function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}hasRequiredBuffer_list=1;var i=requireDist().Buffer,a=requireUtil().inspect,s=a&&a.custom||"inspect";return buffer_list=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return n(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return i.alloc(0);for(var t,r,n,o=i.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,n=s,i.prototype.copy.call(t,r,n),s+=a.data.length,a=a.next;return o}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var o=t.data,i=e>o.length?o.length:e;if(i===o.length?n+=o:n+=o.slice(0,e),0===(e-=i)){i===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=i.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,a),0===(e-=a)){a===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(a));break}++n}return this.length-=n,t}},{key:s,value:function(e,r){return a(this,t(t({},r),{},{depth:0,customInspect:!1}))}}]),e}()}function requireDestroy(){if(hasRequiredDestroy)return destroy_1;function e(e,n){r(e,n),t(e)}function t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}return hasRequiredDestroy=1,destroy_1={destroy:function(n,o){var i=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(o?o(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process$1.nextTick(r,this,n)):process$1.nextTick(r,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,(function(r){!o&&r?i._writableState?i._writableState.errorEmitted?process$1.nextTick(t,i):(i._writableState.errorEmitted=!0,process$1.nextTick(e,i,r)):process$1.nextTick(e,i,r):o?(process$1.nextTick(t,i),o(r)):process$1.nextTick(t,i)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}var errorsBrowser={},hasRequiredErrorsBrowser,state,hasRequiredState,browser,hasRequiredBrowser,_stream_writable,hasRequired_stream_writable,_stream_duplex,hasRequired_stream_duplex,endOfStream,hasRequiredEndOfStream,async_iterator,hasRequiredAsync_iterator,fromBrowser,hasRequiredFromBrowser,_stream_readable,hasRequired_stream_readable,_stream_transform,hasRequired_stream_transform,_stream_passthrough,hasRequired_stream_passthrough,pipeline_1,hasRequiredPipeline,streamBrowserify,hasRequiredStreamBrowserify;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;var e={};function t(t,r,n){n||(n=Error);var o=function(e){var t,n;function o(t,n,o){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,o))||this}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,o}(n);o.prototype.name=n.name,o.prototype.code=t,e[t]=o}function r(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}return t("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),t("ERR_INVALID_ARG_TYPE",(function(e,t,n){var o,i,a;if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(o," ").concat(r(t,"type"));else{var s=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(s," ").concat(o," ").concat(r(t,"type"))}return a+=". Received type ".concat(typeof n)}),TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=e,errorsBrowser}function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var e=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;return state={getHighWaterMark:function(t,r,n,o){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(r,o,n);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new e(o?n:"highWaterMark",i);return Math.floor(i)}return t.objectMode?16:16384}}}function requireBrowser(){if(hasRequiredBrowser)return browser;function e(e){try{if(!commonjsGlobal.localStorage)return!1}catch(r){return!1}var t=commonjsGlobal.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}return hasRequiredBrowser=1,browser=function(t,r){if(e("noDeprecation"))return t;var n=!1;return function(){if(!n){if(e("throwDeprecation"))throw new Error(r);e("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}},browser}function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var t;hasRequired_stream_writable=1,_stream_writable=k,k.WritableState=v;var r={deprecate:requireBrowser()},n=requireStreamBrowser(),o=requireDist().Buffer,i=(void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var a,s=requireDestroy(),c=requireState().getHighWaterMark,u=requireErrorsBrowser().codes,l=u.ERR_INVALID_ARG_TYPE,d=u.ERR_METHOD_NOT_IMPLEMENTED,p=u.ERR_MULTIPLE_CALLBACK,f=u.ERR_STREAM_CANNOT_PIPE,h=u.ERR_STREAM_DESTROYED,m=u.ERR_STREAM_NULL_VALUES,y=u.ERR_STREAM_WRITE_AFTER_END,g=u.ERR_UNKNOWN_ENCODING,b=s.errorOrDestroy;function w(){}function v(r,n,o){t=t||require_stream_duplex(),r=r||{},"boolean"!=typeof o&&(o=n instanceof t),this.objectMode=!!r.objectMode,o&&(this.objectMode=this.objectMode||!!r.writableObjectMode),this.highWaterMark=c(this,r,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!1===r.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new p;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(process$1.nextTick(o,n),process$1.nextTick(E,e,t),e._writableState.errorEmitted=!0,b(e,n)):(o(n),e._writableState.errorEmitted=!0,b(e,n),E(e,t))}(e,r,n,t,o);else{var i=A(r)||e.destroyed;i||r.corked||r.bufferProcessing||!r.bufferedRequest||I(e,r),n?process$1.nextTick(T,e,r,i,o):T(e,r,i,o)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==r.emitClose,this.autoDestroy=!!r.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function k(e){var r=this instanceof(t=t||require_stream_duplex());if(!r&&!a.call(k,this))return new k(e);this._writableState=new v(e,this,r),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),n.call(this)}function _(e,t,r,n,o,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new h("write")):r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function T(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function I(t,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(t._writev&&n&&n.next){var o=r.bufferedRequestCount,i=new Array(o),a=r.corkedRequestsFree;a.entry=n;for(var s=0,c=!0;n;)i[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;i.allBuffers=c,_(t,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,d=n.callback;if(_(t,r,!1,r.objectMode?1:u.length,u,l,d),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function A(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=A(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process$1.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}return requireInherits_browser()(k,n),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===k&&(e&&e._writableState instanceof v)}})):a=function(e){return e instanceof this},k.prototype.pipe=function(){b(this,new f)},k.prototype.write=function(e,t,r){var n,a=this._writableState,s=!1,c=!a.objectMode&&(n=e,o.isBuffer(n)||n instanceof i);return c&&!o.isBuffer(e)&&(e=function(e){return o.from(e)}(e)),"function"==typeof t&&(r=t,t=null),c?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof r&&(r=w),a.ending?function(e,t){var r=new y;b(e,r),process$1.nextTick(t,r)}(this,r):(c||function(e,t,r,n){var o;return null===r?o=new m:"string"==typeof r||t.objectMode||(o=new l("chunk",["string","Buffer"],r)),!o||(b(e,o),process$1.nextTick(n,o),!1)}(this,a,e,r))&&(a.pendingcb++,s=function(e,t,r,n,i,a){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=o.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var c=t.objectMode?1:n.length;t.length+=c;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else _(e,t,!1,c,n,i,a);return u}(this,a,c,e,t,r)),s},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||I(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new g(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new d("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?process$1.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=s.destroy,k.prototype._undestroy=s.undestroy,k.prototype._destroy=function(e,t){t(e)},_stream_writable}function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var e=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};_stream_duplex=a;var t=require_stream_readable(),r=require_stream_writable();requireInherits_browser()(a,t);for(var n=e(r.prototype),o=0;o<n.length;o++){var i=n[o];a.prototype[i]||(a.prototype[i]=r.prototype[i])}function a(e){if(!(this instanceof a))return new a(e);t.call(this,e),r.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",s)))}function s(){this._writableState.ended||process$1.nextTick(c,this)}function c(e){e.end()}return Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),_stream_duplex}function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var e=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function t(){}return endOfStream=function r(n,o,i){if("function"==typeof o)return r(n,null,o);o||(o={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}(i||t);var a=o.readable||!1!==o.readable&&n.readable,s=o.writable||!1!==o.writable&&n.writable,c=function(){n.writable||l()},u=n._writableState&&n._writableState.finished,l=function(){s=!1,u=!0,a||i.call(n)},d=n._readableState&&n._readableState.endEmitted,p=function(){a=!1,d=!0,s||i.call(n)},f=function(e){i.call(n,e)},h=function(){var t;return a&&!d?(n._readableState&&n._readableState.ended||(t=new e),i.call(n,t)):s&&!u?(n._writableState&&n._writableState.ended||(t=new e),i.call(n,t)):void 0},m=function(){n.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(n)?s&&!n._writableState&&(n.on("end",c),n.on("close",c)):(n.on("complete",l),n.on("abort",h),n.req?m():n.on("request",m)),n.on("end",p),n.on("finish",l),!1!==o.error&&n.on("error",f),n.on("close",h),function(){n.removeListener("complete",l),n.removeListener("abort",h),n.removeListener("request",m),n.req&&n.req.removeListener("finish",l),n.removeListener("end",c),n.removeListener("close",c),n.removeListener("finish",l),n.removeListener("end",p),n.removeListener("error",f),n.removeListener("close",h)}},endOfStream}function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;var e;function t(e,t,r){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}hasRequiredAsync_iterator=1;var r=requireEndOfStream(),n=Symbol("lastResolve"),o=Symbol("lastReject"),i=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),c=Symbol("handlePromise"),u=Symbol("stream");function l(e,t){return{value:e,done:t}}function d(e){var t=e[n];if(null!==t){var r=e[u].read();null!==r&&(e[s]=null,e[n]=null,e[o]=null,t(l(r,!1)))}}function p(e){process$1.nextTick(d,e)}var f=Object.getPrototypeOf((function(){})),h=Object.setPrototypeOf((t(e={get stream(){return this[u]},next:function(){var e=this,t=this[i];if(null!==t)return Promise.reject(t);if(this[a])return Promise.resolve(l(void 0,!0));if(this[u].destroyed)return new Promise((function(t,r){process$1.nextTick((function(){e[i]?r(e[i]):t(l(void 0,!0))}))}));var r,n=this[s];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[a]?r(l(void 0,!0)):t[c](r,n)}),n)}}(n,this));else{var o=this[u].read();if(null!==o)return Promise.resolve(l(o,!1));r=new Promise(this[c])}return this[s]=r,r}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,r){e[u].destroy(null,(function(e){e?r(e):t(l(void 0,!0))}))}))})),e),f);return async_iterator=function(e){var d,f=Object.create(h,(t(d={},u,{value:e,writable:!0}),t(d,n,{value:null,writable:!0}),t(d,o,{value:null,writable:!0}),t(d,i,{value:null,writable:!0}),t(d,a,{value:e._readableState.endEmitted,writable:!0}),t(d,c,{value:function(e,t){var r=f[u].read();r?(f[s]=null,f[n]=null,f[o]=null,e(l(r,!1))):(f[n]=e,f[o]=t)},writable:!0}),d));return f[s]=null,r(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=f[o];return null!==t&&(f[s]=null,f[n]=null,f[o]=null,t(e)),void(f[i]=e)}var r=f[n];null!==r&&(f[s]=null,f[n]=null,f[o]=null,r(l(void 0,!0))),f[a]=!0})),e.on("readable",p.bind(null,f)),f}}function requireFromBrowser(){return hasRequiredFromBrowser?fromBrowser:(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")})}function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;var e;hasRequired_stream_readable=1,_stream_readable=k,k.ReadableState=v,requireEvents().EventEmitter;var t=function(e,t){return e.listeners(t).length},r=requireStreamBrowser(),n=requireDist().Buffer,o=(void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var i,a=requireUtil();i=a&&a.debuglog?a.debuglog("stream"):function(){};var s,c,u,l=requireBuffer_list(),d=requireDestroy(),p=requireState().getHighWaterMark,f=requireErrorsBrowser().codes,h=f.ERR_INVALID_ARG_TYPE,m=f.ERR_STREAM_PUSH_AFTER_EOF,y=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;requireInherits_browser()(k,r);var b=d.errorOrDestroy,w=["error","close","destroy","pause","resume"];function v(t,r,n){e=e||require_stream_duplex(),t=t||{},"boolean"!=typeof n&&(n=r instanceof e),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=p(this,t,"readableHighWaterMark",n),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(s||(s=requireString_decoder().StringDecoder),this.decoder=new s(t.encoding),this.encoding=t.encoding)}function k(t){if(e=e||require_stream_duplex(),!(this instanceof k))return new k(t);var n=this instanceof e;this._readableState=new v(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),r.call(this)}function _(e,t,r,a,s){i("readableAddChunk",t);var c,u=e._readableState;if(null===t)u.reading=!1,function(e,t){if(i("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,E(e)))}(e,u);else if(s||(c=function(e,t){var r;i=t,n.isBuffer(i)||i instanceof o||"string"==typeof t||void 0===t||e.objectMode||(r=new h("chunk",["string","Buffer","Uint8Array"],t));var i;return r}(u,t)),c)b(e,c);else if(u.objectMode||t&&t.length>0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===n.prototype||(t=function(e){return n.from(e)}(t)),a)u.endEmitted?b(e,new g):T(e,u,t,!0);else if(u.ended)b(e,new m);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?T(e,u,t,!1):S(e,u)):T(e,u,t,!1)}else a||(u.reading=!1,S(e,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function T(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&O(e)),S(e,t)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=d.destroy,k.prototype._undestroy=d.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var r,o=this._readableState;return o.objectMode?r=!0:"string"==typeof e&&((t=t||o.defaultEncoding)!==o.encoding&&(e=n.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},k.prototype.unshift=function(e){return _(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(e){s||(s=requireString_decoder().StringDecoder);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var I=1073741824;function A(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process$1.nextTick(E,e))}function E(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,B(e)}function S(e,t){t.readingMore||(t.readingMore=!0,process$1.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function x(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){i("readable nexttick read 0"),e.read(0)}function C(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),B(e),t.flowing&&!t.reading&&e.read(0)}function B(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function D(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process$1.nextTick(M,t,e))}function M(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function $(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}return k.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):O(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",o=!0),t.ended||t.reading?i("reading or ended",o=!1):o&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=A(r,t))),null===(n=e>0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){b(this,new y("_read()"))},k.prototype.pipe=function(e,r){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,i("pipe count=%d opts=%j",o.pipesCount,r);var a=(!r||!1!==r.end)&&e!==process$1.stdout&&e!==process$1.stderr?c:m;function s(t,r){i("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,i("cleanup"),e.removeListener("close",f),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",p),e.removeListener("unpipe",s),n.removeListener("end",c),n.removeListener("end",m),n.removeListener("data",d),l=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function c(){i("onend"),e.end()}o.endEmitted?process$1.nextTick(a):n.once("end",a),e.on("unpipe",s);var u=function(e){return function(){var r=e._readableState;i("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,0===r.awaitDrain&&t(e,"data")&&(r.flowing=!0,B(e))}}(n);e.on("drain",u);var l=!1;function d(t){i("ondata");var r=e.write(t);i("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!l&&(i("false write response, pause",o.awaitDrain),o.awaitDrain++),n.pause())}function p(r){i("onerror",r),m(),e.removeListener("error",p),0===t(e,"error")&&b(e,r)}function f(){e.removeListener("finish",h),m()}function h(){i("onfinish"),e.removeListener("close",f),m()}function m(){i("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",f),e.once("finish",h),e.emit("pipe",n),o.flowing||(i("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var a=$(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},k.prototype.on=function(e,t){var n=r.prototype.on.call(this,e,t),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,i("on readable",o.length,o.reading),o.length?O(this):o.reading||process$1.nextTick(P,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=r.prototype.removeListener.call(this,e,t);return"readable"===e&&process$1.nextTick(x,this),n},k.prototype.removeAllListeners=function(e){var t=r.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process$1.nextTick(x,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process$1.nextTick(C,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o)||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<w.length;a++)e.on(w[a],this.emit.bind(this,w[a]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=requireAsync_iterator()),c(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=N,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(e,t){return void 0===u&&(u=requireFromBrowser()),u(k,e,t)}),_stream_readable}function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=s;var e=requireErrorsBrowser().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,r=e.ERR_MULTIPLE_CALLBACK,n=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=e.ERR_TRANSFORM_WITH_LENGTH_0,i=require_stream_duplex();function a(e,t){var n=this._transformState;n.transforming=!1;var o=n.writecb;if(null===o)return this.emit("error",new r);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),o(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);i.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?u(this,null,null):this._flush((function(t,r){u(e,t,r)}))}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new o;if(e._transformState.transforming)throw new n;return e.push(null)}return requireInherits_browser()(s,i),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,i.prototype.push.call(this,e,t)},s.prototype._transform=function(e,r,n){n(new t("_transform()"))},s.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},s.prototype._destroy=function(e,t){i.prototype._destroy.call(this,e,(function(e){t(e)}))},_stream_transform}function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=t;var e=require_stream_transform();function t(r){if(!(this instanceof t))return new t(r);e.call(this,r)}return requireInherits_browser()(t,e),t.prototype._transform=function(e,t,r){r(null,e)},_stream_passthrough}function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;var e;hasRequiredPipeline=1;var t=requireErrorsBrowser().codes,r=t.ERR_MISSING_ARGS,n=t.ERR_STREAM_DESTROYED;function o(e){if(e)throw e}function i(e){e()}function a(e,t){return e.pipe(t)}return pipeline_1=function(){for(var t=arguments.length,s=new Array(t),c=0;c<t;c++)s[c]=arguments[c];var u,l=function(e){return e.length?"function"!=typeof e[e.length-1]?o:e.pop():o}(s);if(Array.isArray(s[0])&&(s=s[0]),s.length<2)throw new r("streams");var d=s.map((function(t,r){var o=r<s.length-1;return function(t,r,o,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var a=!1;t.on("close",(function(){a=!0})),void 0===e&&(e=requireEndOfStream()),e(t,{readable:r,writable:o},(function(e){if(e)return i(e);a=!0,i()}));var s=!1;return function(e){if(!a&&!s)return s=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void i(e||new n("pipe"))}}(t,o,r>0,(function(e){u||(u=e),e&&d.forEach(i),o||(d.forEach(i),l(u))}))}));return s.reduce(a)},pipeline_1}function requireStreamBrowserify(){if(hasRequiredStreamBrowserify)return streamBrowserify;hasRequiredStreamBrowserify=1,streamBrowserify=t;var e=requireEvents().EventEmitter;function t(){e.call(this)}return requireInherits_browser()(t,e),t.Readable=require_stream_readable(),t.Writable=require_stream_writable(),t.Duplex=require_stream_duplex(),t.Transform=require_stream_transform(),t.PassThrough=require_stream_passthrough(),t.finished=requireEndOfStream(),t.pipeline=requirePipeline(),t.Stream=t,t.prototype.pipe=function(t,r){var n=this;function o(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",o),t.on("drain",i),t._isStdio||r&&!1===r.end||(n.on("end",s),n.on("close",c));var a=!1;function s(){a||(a=!0,t.end())}function c(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){if(l(),0===e.listenerCount(this,"error"))throw t}function l(){n.removeListener("data",o),t.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",c),n.removeListener("error",u),t.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),t.removeListener("close",l)}return n.on("error",u),t.on("error",u),n.on("end",l),n.on("close",l),t.on("close",l),t.emit("pipe",n),t},streamBrowserify}var streamBrowserifyExports=requireStreamBrowserify();const index=getDefaultExportFromCjs(streamBrowserifyExports),index$1=Object.freeze(Object.defineProperty({__proto__:null,default:index},Symbol.toStringTag,{value:"Module"})),indexDXKaNRfg=Object.freeze(Object.defineProperty({__proto__:null,i:index$1},Symbol.toStringTag,{value:"Module"}));exports.AIAgentCapability=AIAgentCapability,exports.AIAgentType=AIAgentType,exports.AccountCreationError=AccountCreationError,exports.AgentBuilder=AgentBuilder,exports.BrowserHCSClient=BrowserHCSClient,exports.ConnectionConfirmationError=ConnectionConfirmationError,exports.CustomFeeType=CustomFeeType,exports.EVMBridge=EVMBridge,exports.EndpointType=EndpointType,exports.FeeConfigBuilder=FeeConfigBuilder,exports.HCS=HCS,exports.HCS10BaseClient=HCS10BaseClient,exports.HCS10Cache=HCS10Cache,exports.HCS10Client=HCS10Client,exports.HCS11Client=HCS11Client,exports.Hcs10MemoType=Hcs10MemoType,exports.HederaMirrorNode=HederaMirrorNode,exports.InboundTopicType=InboundTopicType,exports.Logger=Logger$2,exports.PayloadSizeError=PayloadSizeError,exports.PersonBuilder=PersonBuilder,exports.ProfileType=ProfileType,exports.ProgressReporter=ProgressReporter,exports.Registration=Registration,exports.SUPPORTED_SOCIAL_PLATFORMS=SUPPORTED_SOCIAL_PLATFORMS,exports.TopicCreationError=TopicCreationError,exports.WasmBridge=WasmBridge,exports.accountIdsToExemptKeys=accountIdsToExemptKeys,exports.capabilityNameToCapabilityMap=capabilityNameToCapabilityMap,exports.inscribe=inscribe,exports.inscribeWithSigner=inscribeWithSigner,exports.retrieveInscription=retrieveInscription,exports.sleep=sleep$1,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}));
158
+ !function(e){const t=r,n=l,o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=d,e.SlowBuffer=function(e){+e!=e&&(e=0);return d.alloc(+e)},e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i;const{Uint8Array:a,ArrayBuffer:s,SharedArrayBuffer:c}=globalThis;function u(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new a(e);return Object.setPrototypeOf(t,d.prototype),t}function d(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return p(e,t,r)}function p(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!d.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let n=u(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(s.isView(e))return function(e){if(X(e,a)){const t=new a(e);return y(t.buffer,t.byteOffset,t.byteLength)}return m(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,s)||e&&X(e.buffer,s))return y(e,t,r);if(void 0!==c&&(X(e,c)||e&&X(e.buffer,c)))return y(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return d.from(n,t,r);const o=function(e){if(d.isBuffer(e)){const t=0|g(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||J(e.length)?u(0):m(e);if("Buffer"===e.type&&Array.isArray(e.data))return m(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return d.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return f(e),u(e<0?0:0|g(e))}function m(e){const t=e.length<0?0:0|g(e.length),r=u(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function y(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new a(e):void 0===r?new a(e,t):new a(e,t,r),Object.setPrototypeOf(n,d.prototype),n}function g(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function b(e,t){if(d.isBuffer(e))return e.length;if(s.isView(e)||X(e,s))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(e).length;default:if(o)return n?-1:W(e).length;t=(""+t).toLowerCase(),o=!0}}function w(e,t,r){let 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 B(this,t,r);case"utf8":case"utf-8":return R(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function k(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=d.from(t,n)),d.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof a.prototype.indexOf?o?a.prototype.indexOf.call(e,t,r):a.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,o){let i,a=1,s=e.length,c=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;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(u(e,i)===u(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===c)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+c>s&&(r=s-c),i=r;i>=0;i--){let r=!0;for(let n=0;n<c;n++)if(u(e,i+n)!==u(t,n)){r=!1;break}if(r)return i}return-1}function T(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function I(e,t,r,n){return Y(W(t,e.length-r),e,r,n)}function A(e,t,r,n){return Y(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function O(e,t,r,n){return Y(Q(t),e,r,n)}function E(e,t,r,n){return Y(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function S(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function R(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(i=c));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}d.TYPED_ARRAY_SUPPORT=function(){try{const e=new a(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,a.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),d.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}}),d.poolSize=8192,d.from=function(e,t,r){return p(e,t,r)},Object.setPrototypeOf(d.prototype,a.prototype),Object.setPrototypeOf(d,a),d.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},d.allocUnsafe=function(e){return h(e)},d.allocUnsafeSlow=function(e){return h(e)},d.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==d.prototype},d.compare=function(e,t){if(X(e,a)&&(e=d.from(e,e.offset,e.byteLength)),X(t,a)&&(t=d.from(t,t.offset,t.byteLength)),!d.isBuffer(e)||!d.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},d.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}},d.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return d.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=d.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(X(t,a))o+t.length>n.length?(d.isBuffer(t)||(t=d.from(t)),t.copy(n,o)):a.prototype.set.call(n,t,o);else{if(!d.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},d.byteLength=b,d.prototype._isBuffer=!0,d.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},d.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},d.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},d.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?R(this,0,e):w.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(e){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===d.compare(this,e)},d.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(d.prototype[o]=d.prototype.inspect),d.prototype.compare=function(e,t,r,n,o){if(X(e,a)&&(e=d.from(e,e.offset,e.byteLength)),!d.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const c=Math.min(i,s),u=this.slice(n,o),l=e.slice(t,r);for(let a=0;a<c;++a)if(u[a]!==l[a]){i=u[a],s=l[a];break}return i<s?-1:s<i?1:0},d.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},d.prototype.indexOf=function(e,t,r){return k(this,e,t,r,!0)},d.prototype.lastIndexOf=function(e,t,r){return k(this,e,t,r,!1)},d.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)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return T(this,e,t,r);case"utf8":case"utf-8":return I(this,e,t,r);case"ascii":case"latin1":case"binary":return A(this,e,t,r);case"base64":return O(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function P(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function C(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let i=t;i<r;++i)o+=ee[e[i]];return o}function N(e,t,r){const n=e.slice(t,r);let o="";for(let i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function D(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 M(e,t,r,n,o,i){if(!d.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function $(e,t,r,n,o){H(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,o){H(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,o,i){return t=+t,r>>>=0,i||j(e,0,r,4),n.write(e,t,r,o,23,4),r+4}function F(e,t,r,o,i){return t=+t,r>>>=0,i||j(e,0,r,8),n.write(e,t,r,o,52,8),r+8}d.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,d.prototype),n},d.prototype.readUintLE=d.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},d.prototype.readUintBE=d.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},d.prototype.readUint8=d.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readBigUInt64LE=te((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),d.prototype.readBigUInt64BE=te((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),d.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},d.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},d.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},d.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},d.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},d.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readBigInt64LE=te((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),d.prototype.readBigInt64BE=te((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),d.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),n.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),n.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),n.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),n.read(this,e,!1,52,8)},d.prototype.writeUintLE=d.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){M(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){M(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},d.prototype.writeUint8=d.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeBigUInt64LE=te((function(e,t=0){return $(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),d.prototype.writeBigUInt64BE=te((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),d.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+r},d.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+r},d.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},d.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},d.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeBigInt64LE=te((function(e,t=0){return $(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),d.prototype.writeBigInt64BE=te((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),d.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},d.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},d.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},d.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},d.prototype.copy=function(e,t,r,n){if(!d.isBuffer(e))throw new TypeError("argument should be a Buffer");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("Index out of range");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);const o=n-r;return this===e&&"function"==typeof a.prototype.copyWithin?this.copyWithin(t,r,n):a.prototype.set.call(e,this.subarray(r,n),t),o},d.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!d.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=d.isBuffer(e)?e:d.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const q={};function K(e,t,r){q[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function G(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function H(e,t,r,n,o,i){if(e>r||e<t){const r="bigint"==typeof t?"n":"";let n;throw n=0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`,new q.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,r){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,o,i)}function V(e,t){if("number"!=typeof e)throw new q.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw V(e,r),new q.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new q.ERR_BUFFER_OUT_OF_BOUNDS;throw new q.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}K("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),K("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),K("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=G(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=G(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const Z=/[^+/0-9A-Za-z-_]/g;function W(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Q(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const ee=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function te(e){return"undefined"==typeof BigInt?re:e}function re(){throw new Error("BigInt not supported")}}(t);const d=t.Buffer;e.Blob=t.Blob,e.BlobOptions=t.BlobOptions,e.Buffer=t.Buffer,e.File=t.File,e.FileOptions=t.FileOptions,e.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,e.SlowBuffer=t.SlowBuffer,e.TranscodeEncoding=t.TranscodeEncoding,e.atob=t.atob,e.btoa=t.btoa,e.constants=t.constants,e.default=d,e.isAscii=t.isAscii,e.isUtf8=t.isUtf8,e.kMaxLength=t.kMaxLength,e.kStringMaxLength=t.kStringMaxLength,e.resolveObjectURL=t.resolveObjectURL,e.transcode=t.transcode}(dist)),dist}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var e,t="object"==typeof Reflect?Reflect:null,r=t&&"function"==typeof t.apply?t.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}events.exports=o,events.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}h(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&h(e,"error",t,r)}(e,o,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var o,i,c,u;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),c=i[t]),void 0===c)c=i[t]=r,++e._eventsCount;else if("function"==typeof c?c=i[t]=n?[r,c]:[c,r]:n?c.unshift(r):c.push(r),(o=s(e))>0&&c.length>o&&!c.warned){c.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=c.length,u=l,console&&console.warn&&console.warn(u)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=u.bind(n);return o.listener=r,n.wrapFn=o,o}function d(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):f(o,o.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function h(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}return Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return s(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=f(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,l(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,l(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,o,i,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},events.exports}var string_decoder={},safeBuffer={exports:{}},hasRequiredSafeBuffer,hasRequiredString_decoder;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,function(e,t){var r=requireDist(),n=r.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function i(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=i),i.prototype=Object.create(n.prototype),o(n,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var o=n(e);return void 0!==t?"string"==typeof r?o.fill(t,r):o.fill(t):o.fill(0),o},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer,safeBuffer.exports)),safeBuffer.exports}function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var e=requireSafeBuffer().Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(r){var n;switch(this.encoding=function(r){var n=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(r);if("string"!=typeof n&&(e.isEncoding===t||!t(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=i,this.end=a,n=4;break;case"utf8":this.fillLast=o,n=4;break;case"base64":this.text=s,this.end=c,n=3;break;default:return this.write=u,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(n)}function n(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function i(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function a(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function s(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function l(e){return e&&e.length?this.write(e):""}return string_decoder.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},r.prototype.text=function(e,t){var r=function(e,t,r){var o=t.length-1;if(o<r)return 0;var i=n(t[o]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--o<r||-2===i)return 0;if(i=n(t[o]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--o<r||-2===i)return 0;if(i=n(t[o]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var o=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,o),e.toString("utf8",t,o)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},string_decoder}var inherits_browser={exports:{}},hasRequiredInherits_browser,streamBrowser,hasRequiredStreamBrowser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,"function"==typeof Object.create?inherits_browser.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),inherits_browser.exports}function requireStreamBrowser(){return hasRequiredStreamBrowser?streamBrowser:(hasRequiredStreamBrowser=1,streamBrowser=requireEvents().EventEmitter)}var util={},types={},shams$1,hasRequiredShams$1,shams,hasRequiredShams,esObjectAtoms,hasRequiredEsObjectAtoms,esErrors,hasRequiredEsErrors,_eval,hasRequired_eval,range,hasRequiredRange,ref,hasRequiredRef,syntax,hasRequiredSyntax,type,hasRequiredType,uri,hasRequiredUri,abs,hasRequiredAbs,floor,hasRequiredFloor,max,hasRequiredMax,min,hasRequiredMin,pow,hasRequiredPow,round,hasRequiredRound,_isNaN,hasRequired_isNaN,sign,hasRequiredSign,gOPD,hasRequiredGOPD,gopd,hasRequiredGopd,esDefineProperty,hasRequiredEsDefineProperty,hasSymbols,hasRequiredHasSymbols,Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf,Object_getPrototypeOf,hasRequiredObject_getPrototypeOf,implementation,hasRequiredImplementation,functionBind,hasRequiredFunctionBind,functionCall,hasRequiredFunctionCall,functionApply,hasRequiredFunctionApply,reflectApply,hasRequiredReflectApply,actualApply,hasRequiredActualApply,callBindApplyHelpers,hasRequiredCallBindApplyHelpers,get,hasRequiredGet,getProto,hasRequiredGetProto,hasown,hasRequiredHasown,getIntrinsic,hasRequiredGetIntrinsic,callBound,hasRequiredCallBound,isArguments,hasRequiredIsArguments,isRegex,hasRequiredIsRegex,safeRegexTest,hasRequiredSafeRegexTest,isGeneratorFunction,hasRequiredIsGeneratorFunction,isCallable,hasRequiredIsCallable,forEach_1,hasRequiredForEach,possibleTypedArrayNames,hasRequiredPossibleTypedArrayNames,availableTypedArrays,hasRequiredAvailableTypedArrays;function requireShams$1(){return hasRequiredShams$1?shams$1:(hasRequiredShams$1=1,shams$1=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0})}function requireShams(){if(hasRequiredShams)return shams;hasRequiredShams=1;var e=requireShams$1();return shams=function(){return e()&&!!Symbol.toStringTag}}function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms?esObjectAtoms:(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object)}function requireEsErrors(){return hasRequiredEsErrors?esErrors:(hasRequiredEsErrors=1,esErrors=Error)}function require_eval(){return hasRequired_eval?_eval:(hasRequired_eval=1,_eval=EvalError)}function requireRange(){return hasRequiredRange?range:(hasRequiredRange=1,range=RangeError)}function requireRef(){return hasRequiredRef?ref:(hasRequiredRef=1,ref=ReferenceError)}function requireSyntax(){return hasRequiredSyntax?syntax:(hasRequiredSyntax=1,syntax=SyntaxError)}function requireType(){return hasRequiredType?type:(hasRequiredType=1,type=TypeError)}function requireUri(){return hasRequiredUri?uri:(hasRequiredUri=1,uri=URIError)}function requireAbs(){return hasRequiredAbs?abs:(hasRequiredAbs=1,abs=Math.abs)}function requireFloor(){return hasRequiredFloor?floor:(hasRequiredFloor=1,floor=Math.floor)}function requireMax(){return hasRequiredMax?max:(hasRequiredMax=1,max=Math.max)}function requireMin(){return hasRequiredMin?min:(hasRequiredMin=1,min=Math.min)}function requirePow(){return hasRequiredPow?pow:(hasRequiredPow=1,pow=Math.pow)}function requireRound(){return hasRequiredRound?round:(hasRequiredRound=1,round=Math.round)}function require_isNaN(){return hasRequired_isNaN?_isNaN:(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(e){return e!=e})}function requireSign(){if(hasRequiredSign)return sign;hasRequiredSign=1;var e=require_isNaN();return sign=function(t){return e(t)||0===t?t:t<0?-1:1}}function requireGOPD(){return hasRequiredGOPD?gOPD:(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor)}function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var e=requireGOPD();if(e)try{e([],"length")}catch(t){e=null}return gopd=e}function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return esDefineProperty=e}function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var e="undefined"!=typeof Symbol&&Symbol,t=requireShams$1();return hasSymbols=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf?Reflect_getPrototypeOf:(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function requireObject_getPrototypeOf(){return hasRequiredObject_getPrototypeOf?Object_getPrototypeOf:(hasRequiredObject_getPrototypeOf=1,Object_getPrototypeOf=requireEsObjectAtoms().getPrototypeOf||null)}function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var e=Object.prototype.toString,t=Math.max,r=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};return implementation=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e,t){for(var r=[],n=t,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),s=t(0,o.length-a.length),c=[],u=0;u<s;u++)c[u]="$"+u;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(c,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var e=o.apply(this,r(a,arguments));return Object(e)===e?e:this}return o.apply(n,r(a,arguments))})),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i},implementation}function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var e=requireImplementation();return functionBind=Function.prototype.bind||e}function requireFunctionCall(){return hasRequiredFunctionCall?functionCall:(hasRequiredFunctionCall=1,functionCall=Function.prototype.call)}function requireFunctionApply(){return hasRequiredFunctionApply?functionApply:(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply)}function requireReflectApply(){return hasRequiredReflectApply?reflectApply:(hasRequiredReflectApply=1,reflectApply="undefined"!=typeof Reflect&&Reflect&&Reflect.apply)}function requireActualApply(){if(hasRequiredActualApply)return actualApply;hasRequiredActualApply=1;var e=requireFunctionBind(),t=requireFunctionApply(),r=requireFunctionCall(),n=requireReflectApply();return actualApply=n||e.call(r,t)}function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var e=requireFunctionBind(),t=requireType(),r=requireFunctionCall(),n=requireActualApply();return callBindApplyHelpers=function(o){if(o.length<1||"function"!=typeof o[0])throw new t("a function is required");return n(e,r,o)}}function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var e,t=requireCallBindApplyHelpers(),r=requireGopd();try{e=[].__proto__===Array.prototype}catch(a){if(!a||"object"!=typeof a||!("code"in a)||"ERR_PROTO_ACCESS"!==a.code)throw a}var n=!!e&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return get=n&&"function"==typeof n.get?t([n.get]):"function"==typeof i&&function(e){return i(null==e?e:o(e))}}function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var e=requireReflect_getPrototypeOf(),t=requireObject_getPrototypeOf(),r=requireGet();return getProto=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:r?function(e){return r(e)}:null}function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=requireFunctionBind();return hasown=r.call(e,t)}function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;var e;hasRequiredGetIntrinsic=1;var t=requireEsObjectAtoms(),r=requireEsErrors(),n=require_eval(),o=requireRange(),i=requireRef(),a=requireSyntax(),s=requireType(),c=requireUri(),u=requireAbs(),l=requireFloor(),d=requireMax(),p=requireMin(),f=requirePow(),h=requireRound(),m=requireSign(),y=Function,g=function(e){try{return y('"use strict"; return ('+e+").constructor;")()}catch(t){}},b=requireGopd(),w=requireEsDefineProperty(),v=function(){throw new s},k=b?function(){try{return v}catch(e){try{return b(arguments,"callee").get}catch(t){return v}}}():v,_=requireHasSymbols()(),T=requireGetProto(),I=requireObject_getPrototypeOf(),A=requireReflect_getPrototypeOf(),O=requireFunctionApply(),E=requireFunctionCall(),S={},R="undefined"!=typeof Uint8Array&&T?T(Uint8Array):e,x={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":_&&T?T([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":S,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&T?T(T([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&_&&T?T((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&_&&T?T((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&T?T(""[Symbol.iterator]()):e,"%Symbol%":_?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":k,"%TypedArray%":R,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":E,"%Function.prototype.apply%":O,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":I,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":m,"%Reflect.getPrototypeOf%":A};if(T)try{null.error}catch(G){var P=T(T(G));x["%Error.prototype%"]=P}var C=function e(t){var r;if("%AsyncFunction%"===t)r=g("async function () {}");else if("%GeneratorFunction%"===t)r=g("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=g("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&T&&(r=T(o.prototype))}return x[t]=r,r},B={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},N=requireFunctionBind(),D=requireHasown(),M=N.call(E,Array.prototype.concat),$=N.call(O,Array.prototype.splice),L=N.call(E,String.prototype.replace),j=N.call(E,String.prototype.slice),U=N.call(E,RegExp.prototype.exec),F=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,K=function(e,t){var r,n=e;if(D(B,n)&&(n="%"+(r=B[n])[0]+"%"),D(x,n)){var o=x[n];if(o===S&&(o=C(n)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new a("intrinsic "+e+" does not exist!")};return getIntrinsic=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===U(/^%?[^%]*%?$/,e))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=j(e,0,1),r=j(e,-1);if("%"===t&&"%"!==r)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new a("invalid intrinsic syntax, expected opening `%`");var n=[];return L(e,F,(function(e,t,r,o){n[n.length]=r?L(o,q,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=K("%"+n+"%",t),i=o.name,c=o.value,u=!1,l=o.alias;l&&(n=l[0],$(r,M([0,1],l)));for(var d=1,p=!0;d<r.length;d+=1){var f=r[d],h=j(f,0,1),m=j(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===m||"'"===m||"`"===m)&&h!==m)throw new a("property names with quotes must have matching quotes");if("constructor"!==f&&p||(u=!0),D(x,i="%"+(n+="."+f)+"%"))c=x[i];else if(null!=c){if(!(f in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&d+1>=r.length){var y=b(c,f);c=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[f]}else p=D(c,f),c=c[f];p&&!u&&(x[i]=c)}}return c},getIntrinsic}function requireCallBound(){if(hasRequiredCallBound)return callBound;hasRequiredCallBound=1;var e=requireGetIntrinsic(),t=requireCallBindApplyHelpers(),r=t([e("%String.prototype.indexOf%")]);return callBound=function(n,o){var i=e(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?t([i]):i}}function requireIsArguments(){if(hasRequiredIsArguments)return isArguments;hasRequiredIsArguments=1;var e=requireShams()(),t=requireCallBound()("Object.prototype.toString"),r=function(r){return!(e&&r&&"object"==typeof r&&Symbol.toStringTag in r)&&"[object Arguments]"===t(r)},n=function(e){return!!r(e)||null!==e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==t(e)&&"callee"in e&&"[object Function]"===t(e.callee)},o=function(){return r(arguments)}();return r.isLegacyArguments=n,isArguments=o?r:n}function requireIsRegex(){if(hasRequiredIsRegex)return isRegex;hasRequiredIsRegex=1;var e,t=requireCallBound(),r=requireShams()(),n=requireHasown(),o=requireGopd();if(r){var i=t("RegExp.prototype.exec"),a={},s=function(){throw a},c={toString:s,valueOf:s};"symbol"==typeof Symbol.toPrimitive&&(c[Symbol.toPrimitive]=s),e=function(e){if(!e||"object"!=typeof e)return!1;var t=o(e,"lastIndex");if(!(t&&n(t,"value")))return!1;try{i(e,c)}catch(r){return r===a}}}else{var u=t("Object.prototype.toString");e=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}}return isRegex=e}function requireSafeRegexTest(){if(hasRequiredSafeRegexTest)return safeRegexTest;hasRequiredSafeRegexTest=1;var e=requireCallBound(),t=requireIsRegex(),r=e("RegExp.prototype.exec"),n=requireType();return safeRegexTest=function(e){if(!t(e))throw new n("`regex` must be a RegExp");return function(t){return null!==r(e,t)}}}function requireIsGeneratorFunction(){if(hasRequiredIsGeneratorFunction)return isGeneratorFunction;hasRequiredIsGeneratorFunction=1;var e,t=requireCallBound(),r=requireSafeRegexTest()(/^\s*(?:function)?\*/),n=requireShams()(),o=requireGetProto(),i=t("Object.prototype.toString"),a=t("Function.prototype.toString");return isGeneratorFunction=function(t){if("function"!=typeof t)return!1;if(r(a(t)))return!0;if(!n)return"[object GeneratorFunction]"===i(t);if(!o)return!1;if(void 0===e){var s=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch(e){}}();e=!!s&&o(s)}return o(t)===e}}function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var e,t,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw t}}),t={},n((function(){throw 42}),null,e)}catch(p){p!==t&&(n=null)}else n=null;var o=/^\s*class\b/,i=function(e){try{var t=r.call(e);return o.test(t)}catch(n){return!1}},a=function(e){try{return!i(e)&&(r.call(e),!0)}catch(t){return!1}},s=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var d=document.all;s.call(d)===s.call(document.all)&&(l=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(r){}return!1})}return isCallable=n?function(r){if(l(r))return!0;if(!r)return!1;if("function"!=typeof r&&"object"!=typeof r)return!1;try{n(r,null,e)}catch(o){if(o!==t)return!1}return!i(r)&&a(r)}:function(e){if(l(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(i(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}}function requireForEach(){if(hasRequiredForEach)return forEach_1;hasRequiredForEach=1;var e=requireIsCallable(),t=Object.prototype.toString,r=Object.prototype.hasOwnProperty;return forEach_1=function(n,o,i){if(!e(o))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=i),"[object Array]"===t.call(n)?function(e,t,n){for(var o=0,i=e.length;o<i;o++)r.call(e,o)&&(null==n?t(e[o],o,e):t.call(n,e[o],o,e))}(n,o,a):"string"==typeof n?function(e,t,r){for(var n=0,o=e.length;n<o;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(n,o,a):function(e,t,n){for(var o in e)r.call(e,o)&&(null==n?t(e[o],o,e):t.call(n,e[o],o,e))}(n,o,a)},forEach_1}function requirePossibleTypedArrayNames(){return hasRequiredPossibleTypedArrayNames?possibleTypedArrayNames:(hasRequiredPossibleTypedArrayNames=1,possibleTypedArrayNames=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"])}function requireAvailableTypedArrays(){if(hasRequiredAvailableTypedArrays)return availableTypedArrays;hasRequiredAvailableTypedArrays=1;var e=requirePossibleTypedArrayNames(),t="undefined"==typeof globalThis?commonjsGlobal:globalThis;return availableTypedArrays=function(){for(var r=[],n=0;n<e.length;n++)"function"==typeof t[e[n]]&&(r[r.length]=e[n]);return r}}var callBind={exports:{}},defineDataProperty,hasRequiredDefineDataProperty,hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors,setFunctionLength,hasRequiredSetFunctionLength,applyBind,hasRequiredApplyBind,hasRequiredCallBind,whichTypedArray,hasRequiredWhichTypedArray,isTypedArray,hasRequiredIsTypedArray,hasRequiredTypes,isBufferBrowser,hasRequiredIsBufferBrowser,hasRequiredUtil,buffer_list,hasRequiredBuffer_list,destroy_1,hasRequiredDestroy;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var e=requireEsDefineProperty(),t=requireSyntax(),r=requireType(),n=requireGopd();return defineDataProperty=function(o,i,a){if(!o||"object"!=typeof o&&"function"!=typeof o)throw new r("`obj` must be an object or a function`");if("string"!=typeof i&&"symbol"!=typeof i)throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new r("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],d=!!n&&n(o,i);if(e)e(o,i,{configurable:null===u&&d?d.configurable:!u,enumerable:null===s&&d?d.enumerable:!s,value:a,writable:null===c&&d?d.writable:!c});else{if(!l&&(s||c||u))throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");o[i]=a}},defineDataProperty}function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var e=requireEsDefineProperty(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return 1!==e([],"length",{value:1}).length}catch(t){return!0}},hasPropertyDescriptors_1=t}function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var e=requireGetIntrinsic(),t=requireDefineDataProperty(),r=requireHasPropertyDescriptors()(),n=requireGopd(),o=requireType(),i=e("%Math.floor%");return setFunctionLength=function(e,a){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof a||a<0||a>4294967295||i(a)!==a)throw new o("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],c=!0,u=!0;if("length"in e&&n){var l=n(e,"length");l&&!l.configurable&&(c=!1),l&&!l.writable&&(u=!1)}return(c||u||!s)&&(r?t(e,"length",a,!0,!0):t(e,"length",a)),e},setFunctionLength}function requireApplyBind(){if(hasRequiredApplyBind)return applyBind;hasRequiredApplyBind=1;var e=requireFunctionBind(),t=requireFunctionApply(),r=requireActualApply();return applyBind=function(){return r(e,t,arguments)},applyBind}function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,e=callBind,t=requireSetFunctionLength(),r=requireEsDefineProperty(),n=requireCallBindApplyHelpers(),o=requireApplyBind(),e.exports=function(e){var r=n(arguments),o=e.length-(arguments.length-1);return t(r,1+(o>0?o:0),!0)},r?r(e.exports,"apply",{value:o}):e.exports.apply=o),callBind.exports;var e,t,r,n,o}function requireWhichTypedArray(){if(hasRequiredWhichTypedArray)return whichTypedArray;hasRequiredWhichTypedArray=1;var e=requireForEach(),t=requireAvailableTypedArrays(),r=requireCallBind(),n=requireCallBound(),o=requireGopd(),i=n("Object.prototype.toString"),a=requireShams()(),s="undefined"==typeof globalThis?commonjsGlobal:globalThis,c=t(),u=n("String.prototype.slice"),l=Object.getPrototypeOf,d=n("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},p={__proto__:null};e(c,a&&o&&l?function(e){var t=new s[e];if(Symbol.toStringTag in t){var n=l(t),i=o(n,Symbol.toStringTag);if(!i){var a=l(n);i=o(a,Symbol.toStringTag)}p["$"+e]=r(i.get)}}:function(e){var t=new s[e],n=t.slice||t.set;n&&(p["$"+e]=r(n))});return whichTypedArray=function(t){if(!t||"object"!=typeof t)return!1;if(!a){var r=u(i(t),8,-1);return d(c,r)>-1?r:"Object"===r&&function(t){var r=!1;return e(p,(function(e,n){if(!r)try{e(t),r=u(n,1)}catch(o){}})),r}(t)}return o?function(t){var r=!1;return e(p,(function(e,n){if(!r)try{"$"+e(t)===n&&(r=u(n,1))}catch(o){}})),r}(t):null}}function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray;hasRequiredIsTypedArray=1;var e=requireWhichTypedArray();return isTypedArray=function(t){return!!e(t)}}function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,function(e){var t=requireIsArguments(),r=requireIsGeneratorFunction(),n=requireWhichTypedArray(),o=requireIsTypedArray();function i(e){return e.call.bind(e)}var a="undefined"!=typeof BigInt,s="undefined"!=typeof Symbol,c=i(Object.prototype.toString),u=i(Number.prototype.valueOf),l=i(String.prototype.valueOf),d=i(Boolean.prototype.valueOf);if(a)var p=i(BigInt.prototype.valueOf);if(s)var f=i(Symbol.prototype.valueOf);function h(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(r){return!1}}function m(e){return"[object Map]"===c(e)}function y(e){return"[object Set]"===c(e)}function g(e){return"[object WeakMap]"===c(e)}function b(e){return"[object WeakSet]"===c(e)}function w(e){return"[object ArrayBuffer]"===c(e)}function v(e){return"undefined"!=typeof ArrayBuffer&&(w.working?w(e):e instanceof ArrayBuffer)}function k(e){return"[object DataView]"===c(e)}function _(e){return"undefined"!=typeof DataView&&(k.working?k(e):e instanceof DataView)}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o,e.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||_(e)},e.isUint8Array=function(e){return"Uint8Array"===n(e)},e.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===n(e)},e.isUint16Array=function(e){return"Uint16Array"===n(e)},e.isUint32Array=function(e){return"Uint32Array"===n(e)},e.isInt8Array=function(e){return"Int8Array"===n(e)},e.isInt16Array=function(e){return"Int16Array"===n(e)},e.isInt32Array=function(e){return"Int32Array"===n(e)},e.isFloat32Array=function(e){return"Float32Array"===n(e)},e.isFloat64Array=function(e){return"Float64Array"===n(e)},e.isBigInt64Array=function(e){return"BigInt64Array"===n(e)},e.isBigUint64Array=function(e){return"BigUint64Array"===n(e)},m.working="undefined"!=typeof Map&&m(new Map),e.isMap=function(e){return"undefined"!=typeof Map&&(m.working?m(e):e instanceof Map)},y.working="undefined"!=typeof Set&&y(new Set),e.isSet=function(e){return"undefined"!=typeof Set&&(y.working?y(e):e instanceof Set)},g.working="undefined"!=typeof WeakMap&&g(new WeakMap),e.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(g.working?g(e):e instanceof WeakMap)},b.working="undefined"!=typeof WeakSet&&b(new WeakSet),e.isWeakSet=function(e){return b(e)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),e.isArrayBuffer=v,k.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&k(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=_;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function I(e){return"[object SharedArrayBuffer]"===c(e)}function A(e){return void 0!==T&&(void 0===I.working&&(I.working=I(new T)),I.working?I(e):e instanceof T)}function O(e){return h(e,u)}function E(e){return h(e,l)}function S(e){return h(e,d)}function R(e){return a&&h(e,p)}function x(e){return s&&h(e,f)}e.isSharedArrayBuffer=A,e.isAsyncFunction=function(e){return"[object AsyncFunction]"===c(e)},e.isMapIterator=function(e){return"[object Map Iterator]"===c(e)},e.isSetIterator=function(e){return"[object Set Iterator]"===c(e)},e.isGeneratorObject=function(e){return"[object Generator]"===c(e)},e.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===c(e)},e.isNumberObject=O,e.isStringObject=E,e.isBooleanObject=S,e.isBigIntObject=R,e.isSymbolObject=x,e.isBoxedPrimitive=function(e){return O(e)||E(e)||S(e)||R(e)||x(e)},e.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(v(e)||A(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))}(types)),types}function requireIsBufferBrowser(){return hasRequiredIsBufferBrowser?isBufferBrowser:(hasRequiredIsBufferBrowser=1,isBufferBrowser=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8})}function requireUtil(){return hasRequiredUtil||(hasRequiredUtil=1,function(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},r=/%[sdj%]/g;e.format=function(e){if(!y(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(a(arguments[n]));return t.join(" ")}n=1;for(var o=arguments,i=o.length,s=String(e).replace(r,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch(t){return"[Circular]"}default:return e}})),c=o[n];n<i;c=o[++n])h(c)||!w(c)?s+=" "+c:s+=" "+a(c);return s},e.deprecate=function(t,r){if(void 0!==process$1&&!0===process$1.noDeprecation)return t;if(void 0===process$1)return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(process$1.throwDeprecation)throw new Error(r);process$1.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var n={},o=/^$/;if(process$1.env.NODE_DEBUG){var i=process$1.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+i+"$","i")}function a(t,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),f(r)?n.showHidden=r:r&&e._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,t,n.depth)}function s(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function c(e,t){return e}function u(t,r,n){if(t.customInspect&&r&&_(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return y(o)||(o=u(t,o,n)),o}var i=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(m(t))return e.stylize(""+t,"number");if(f(t))return e.stylize(""+t,"boolean");if(h(t))return e.stylize("null","null")}(t,r);if(i)return i;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),k(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(_(r)){var c=r.name?": "+r.name:"";return t.stylize("[Function"+c+"]","special")}if(b(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(v(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return l(r)}var w,T="",I=!1,A=["{","}"];(p(r)&&(I=!0,A=["[","]"]),_(r))&&(T=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(T=" "+RegExp.prototype.toString.call(r)),v(r)&&(T=" "+Date.prototype.toUTCString.call(r)),k(r)&&(T=" "+l(r)),0!==a.length||I&&0!=r.length?n<0?b(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),w=I?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)O(t,String(a))?i.push(d(e,t,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(d(e,t,r,n,o,!0))})),i}(t,r,n,s,a):a.map((function(e){return d(t,r,n,s,e,I)})),t.seen.pop(),function(e,t,r){var n=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(w,T,A)):A[0]+T+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),O(n,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=h(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),g(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function h(e){return null===e}function m(e){return"number"==typeof e}function y(e){return"string"==typeof e}function g(e){return void 0===e}function b(e){return w(e)&&"[object RegExp]"===T(e)}function w(e){return"object"==typeof e&&null!==e}function v(e){return w(e)&&"[object Date]"===T(e)}function k(e){return w(e)&&("[object Error]"===T(e)||e instanceof Error)}function _(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!n[t])if(o.test(t)){var r=process$1.pid;n[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else n[t]=function(){};return n[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=requireTypes(),e.isArray=p,e.isBoolean=f,e.isNull=h,e.isNullOrUndefined=function(e){return null==e},e.isNumber=m,e.isString=y,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=g,e.isRegExp=b,e.types.isRegExp=b,e.isObject=w,e.isDate=v,e.types.isDate=v,e.isError=k,e.types.isNativeError=k,e.isFunction=_,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},e.isBuffer=requireIsBufferBrowser();var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[I((t=new Date).getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":"),[t.getDate(),A[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=requireInherits_browser(),e._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var E="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function S(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(E&&e[E]){var r;if("function"!=typeof(r=e[E]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,E,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,o)}catch(a){r(a)}return n}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),E&&Object.defineProperty(r,E,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,t(e))},e.promisify.custom=E,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var n=t.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var o=this,i=function(){return n.apply(o,arguments)};e.apply(this,t).then((function(e){process$1.nextTick(i.bind(null,null,e))}),(function(e){process$1.nextTick(S.bind(null,e,i))}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,t(e)),r}}(util)),util}function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t,r){return function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}hasRequiredBuffer_list=1;var i=requireDist().Buffer,a=requireUtil().inspect,s=a&&a.custom||"inspect";return buffer_list=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return n(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return i.alloc(0);for(var t,r,n,o=i.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,n=s,i.prototype.copy.call(t,r,n),s+=a.data.length,a=a.next;return o}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var o=t.data,i=e>o.length?o.length:e;if(i===o.length?n+=o:n+=o.slice(0,e),0===(e-=i)){i===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=i.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,a),0===(e-=a)){a===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(a));break}++n}return this.length-=n,t}},{key:s,value:function(e,r){return a(this,t(t({},r),{},{depth:0,customInspect:!1}))}}]),e}()}function requireDestroy(){if(hasRequiredDestroy)return destroy_1;function e(e,n){r(e,n),t(e)}function t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}return hasRequiredDestroy=1,destroy_1={destroy:function(n,o){var i=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(o?o(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process$1.nextTick(r,this,n)):process$1.nextTick(r,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,(function(r){!o&&r?i._writableState?i._writableState.errorEmitted?process$1.nextTick(t,i):(i._writableState.errorEmitted=!0,process$1.nextTick(e,i,r)):process$1.nextTick(e,i,r):o?(process$1.nextTick(t,i),o(r)):process$1.nextTick(t,i)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}var errorsBrowser={},hasRequiredErrorsBrowser,state,hasRequiredState,browser,hasRequiredBrowser,_stream_writable,hasRequired_stream_writable,_stream_duplex,hasRequired_stream_duplex,endOfStream,hasRequiredEndOfStream,async_iterator,hasRequiredAsync_iterator,fromBrowser,hasRequiredFromBrowser,_stream_readable,hasRequired_stream_readable,_stream_transform,hasRequired_stream_transform,_stream_passthrough,hasRequired_stream_passthrough,pipeline_1,hasRequiredPipeline,streamBrowserify,hasRequiredStreamBrowserify;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;var e={};function t(t,r,n){n||(n=Error);var o=function(e){var t,n;function o(t,n,o){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,o))||this}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,o}(n);o.prototype.name=n.name,o.prototype.code=t,e[t]=o}function r(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}return t("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),t("ERR_INVALID_ARG_TYPE",(function(e,t,n){var o,i,a;if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(o," ").concat(r(t,"type"));else{var s=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(s," ").concat(o," ").concat(r(t,"type"))}return a+=". Received type ".concat(typeof n)}),TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=e,errorsBrowser}function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var e=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;return state={getHighWaterMark:function(t,r,n,o){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(r,o,n);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new e(o?n:"highWaterMark",i);return Math.floor(i)}return t.objectMode?16:16384}}}function requireBrowser(){if(hasRequiredBrowser)return browser;function e(e){try{if(!commonjsGlobal.localStorage)return!1}catch(r){return!1}var t=commonjsGlobal.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}return hasRequiredBrowser=1,browser=function(t,r){if(e("noDeprecation"))return t;var n=!1;return function(){if(!n){if(e("throwDeprecation"))throw new Error(r);e("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}},browser}function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var t;hasRequired_stream_writable=1,_stream_writable=k,k.WritableState=v;var r={deprecate:requireBrowser()},n=requireStreamBrowser(),o=requireDist().Buffer,i=(void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var a,s=requireDestroy(),c=requireState().getHighWaterMark,u=requireErrorsBrowser().codes,l=u.ERR_INVALID_ARG_TYPE,d=u.ERR_METHOD_NOT_IMPLEMENTED,p=u.ERR_MULTIPLE_CALLBACK,f=u.ERR_STREAM_CANNOT_PIPE,h=u.ERR_STREAM_DESTROYED,m=u.ERR_STREAM_NULL_VALUES,y=u.ERR_STREAM_WRITE_AFTER_END,g=u.ERR_UNKNOWN_ENCODING,b=s.errorOrDestroy;function w(){}function v(r,n,o){t=t||require_stream_duplex(),r=r||{},"boolean"!=typeof o&&(o=n instanceof t),this.objectMode=!!r.objectMode,o&&(this.objectMode=this.objectMode||!!r.writableObjectMode),this.highWaterMark=c(this,r,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!1===r.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new p;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(process$1.nextTick(o,n),process$1.nextTick(E,e,t),e._writableState.errorEmitted=!0,b(e,n)):(o(n),e._writableState.errorEmitted=!0,b(e,n),E(e,t))}(e,r,n,t,o);else{var i=A(r)||e.destroyed;i||r.corked||r.bufferProcessing||!r.bufferedRequest||I(e,r),n?process$1.nextTick(T,e,r,i,o):T(e,r,i,o)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==r.emitClose,this.autoDestroy=!!r.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function k(e){var r=this instanceof(t=t||require_stream_duplex());if(!r&&!a.call(k,this))return new k(e);this._writableState=new v(e,this,r),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),n.call(this)}function _(e,t,r,n,o,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new h("write")):r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function T(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function I(t,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(t._writev&&n&&n.next){var o=r.bufferedRequestCount,i=new Array(o),a=r.corkedRequestsFree;a.entry=n;for(var s=0,c=!0;n;)i[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;i.allBuffers=c,_(t,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,d=n.callback;if(_(t,r,!1,r.objectMode?1:u.length,u,l,d),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function A(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=A(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process$1.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}return requireInherits_browser()(k,n),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===k&&(e&&e._writableState instanceof v)}})):a=function(e){return e instanceof this},k.prototype.pipe=function(){b(this,new f)},k.prototype.write=function(e,t,r){var n,a=this._writableState,s=!1,c=!a.objectMode&&(n=e,o.isBuffer(n)||n instanceof i);return c&&!o.isBuffer(e)&&(e=function(e){return o.from(e)}(e)),"function"==typeof t&&(r=t,t=null),c?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof r&&(r=w),a.ending?function(e,t){var r=new y;b(e,r),process$1.nextTick(t,r)}(this,r):(c||function(e,t,r,n){var o;return null===r?o=new m:"string"==typeof r||t.objectMode||(o=new l("chunk",["string","Buffer"],r)),!o||(b(e,o),process$1.nextTick(n,o),!1)}(this,a,e,r))&&(a.pendingcb++,s=function(e,t,r,n,i,a){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=o.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var c=t.objectMode?1:n.length;t.length+=c;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else _(e,t,!1,c,n,i,a);return u}(this,a,c,e,t,r)),s},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||I(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new g(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new d("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?process$1.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=s.destroy,k.prototype._undestroy=s.undestroy,k.prototype._destroy=function(e,t){t(e)},_stream_writable}function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var e=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};_stream_duplex=a;var t=require_stream_readable(),r=require_stream_writable();requireInherits_browser()(a,t);for(var n=e(r.prototype),o=0;o<n.length;o++){var i=n[o];a.prototype[i]||(a.prototype[i]=r.prototype[i])}function a(e){if(!(this instanceof a))return new a(e);t.call(this,e),r.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",s)))}function s(){this._writableState.ended||process$1.nextTick(c,this)}function c(e){e.end()}return Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),_stream_duplex}function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var e=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function t(){}return endOfStream=function r(n,o,i){if("function"==typeof o)return r(n,null,o);o||(o={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}(i||t);var a=o.readable||!1!==o.readable&&n.readable,s=o.writable||!1!==o.writable&&n.writable,c=function(){n.writable||l()},u=n._writableState&&n._writableState.finished,l=function(){s=!1,u=!0,a||i.call(n)},d=n._readableState&&n._readableState.endEmitted,p=function(){a=!1,d=!0,s||i.call(n)},f=function(e){i.call(n,e)},h=function(){var t;return a&&!d?(n._readableState&&n._readableState.ended||(t=new e),i.call(n,t)):s&&!u?(n._writableState&&n._writableState.ended||(t=new e),i.call(n,t)):void 0},m=function(){n.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(n)?s&&!n._writableState&&(n.on("end",c),n.on("close",c)):(n.on("complete",l),n.on("abort",h),n.req?m():n.on("request",m)),n.on("end",p),n.on("finish",l),!1!==o.error&&n.on("error",f),n.on("close",h),function(){n.removeListener("complete",l),n.removeListener("abort",h),n.removeListener("request",m),n.req&&n.req.removeListener("finish",l),n.removeListener("end",c),n.removeListener("close",c),n.removeListener("finish",l),n.removeListener("end",p),n.removeListener("error",f),n.removeListener("close",h)}},endOfStream}function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;var e;function t(e,t,r){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}hasRequiredAsync_iterator=1;var r=requireEndOfStream(),n=Symbol("lastResolve"),o=Symbol("lastReject"),i=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),c=Symbol("handlePromise"),u=Symbol("stream");function l(e,t){return{value:e,done:t}}function d(e){var t=e[n];if(null!==t){var r=e[u].read();null!==r&&(e[s]=null,e[n]=null,e[o]=null,t(l(r,!1)))}}function p(e){process$1.nextTick(d,e)}var f=Object.getPrototypeOf((function(){})),h=Object.setPrototypeOf((t(e={get stream(){return this[u]},next:function(){var e=this,t=this[i];if(null!==t)return Promise.reject(t);if(this[a])return Promise.resolve(l(void 0,!0));if(this[u].destroyed)return new Promise((function(t,r){process$1.nextTick((function(){e[i]?r(e[i]):t(l(void 0,!0))}))}));var r,n=this[s];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[a]?r(l(void 0,!0)):t[c](r,n)}),n)}}(n,this));else{var o=this[u].read();if(null!==o)return Promise.resolve(l(o,!1));r=new Promise(this[c])}return this[s]=r,r}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,r){e[u].destroy(null,(function(e){e?r(e):t(l(void 0,!0))}))}))})),e),f);return async_iterator=function(e){var d,f=Object.create(h,(t(d={},u,{value:e,writable:!0}),t(d,n,{value:null,writable:!0}),t(d,o,{value:null,writable:!0}),t(d,i,{value:null,writable:!0}),t(d,a,{value:e._readableState.endEmitted,writable:!0}),t(d,c,{value:function(e,t){var r=f[u].read();r?(f[s]=null,f[n]=null,f[o]=null,e(l(r,!1))):(f[n]=e,f[o]=t)},writable:!0}),d));return f[s]=null,r(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=f[o];return null!==t&&(f[s]=null,f[n]=null,f[o]=null,t(e)),void(f[i]=e)}var r=f[n];null!==r&&(f[s]=null,f[n]=null,f[o]=null,r(l(void 0,!0))),f[a]=!0})),e.on("readable",p.bind(null,f)),f}}function requireFromBrowser(){return hasRequiredFromBrowser?fromBrowser:(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")})}function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;var e;hasRequired_stream_readable=1,_stream_readable=k,k.ReadableState=v,requireEvents().EventEmitter;var t=function(e,t){return e.listeners(t).length},r=requireStreamBrowser(),n=requireDist().Buffer,o=(void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var i,a=requireUtil();i=a&&a.debuglog?a.debuglog("stream"):function(){};var s,c,u,l=requireBuffer_list(),d=requireDestroy(),p=requireState().getHighWaterMark,f=requireErrorsBrowser().codes,h=f.ERR_INVALID_ARG_TYPE,m=f.ERR_STREAM_PUSH_AFTER_EOF,y=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;requireInherits_browser()(k,r);var b=d.errorOrDestroy,w=["error","close","destroy","pause","resume"];function v(t,r,n){e=e||require_stream_duplex(),t=t||{},"boolean"!=typeof n&&(n=r instanceof e),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=p(this,t,"readableHighWaterMark",n),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(s||(s=requireString_decoder().StringDecoder),this.decoder=new s(t.encoding),this.encoding=t.encoding)}function k(t){if(e=e||require_stream_duplex(),!(this instanceof k))return new k(t);var n=this instanceof e;this._readableState=new v(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),r.call(this)}function _(e,t,r,a,s){i("readableAddChunk",t);var c,u=e._readableState;if(null===t)u.reading=!1,function(e,t){if(i("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,E(e)))}(e,u);else if(s||(c=function(e,t){var r;i=t,n.isBuffer(i)||i instanceof o||"string"==typeof t||void 0===t||e.objectMode||(r=new h("chunk",["string","Buffer","Uint8Array"],t));var i;return r}(u,t)),c)b(e,c);else if(u.objectMode||t&&t.length>0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===n.prototype||(t=function(e){return n.from(e)}(t)),a)u.endEmitted?b(e,new g):T(e,u,t,!0);else if(u.ended)b(e,new m);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?T(e,u,t,!1):S(e,u)):T(e,u,t,!1)}else a||(u.reading=!1,S(e,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function T(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&O(e)),S(e,t)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=d.destroy,k.prototype._undestroy=d.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var r,o=this._readableState;return o.objectMode?r=!0:"string"==typeof e&&((t=t||o.defaultEncoding)!==o.encoding&&(e=n.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},k.prototype.unshift=function(e){return _(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(e){s||(s=requireString_decoder().StringDecoder);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var I=1073741824;function A(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process$1.nextTick(E,e))}function E(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,B(e)}function S(e,t){t.readingMore||(t.readingMore=!0,process$1.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function x(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){i("readable nexttick read 0"),e.read(0)}function C(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),B(e),t.flowing&&!t.reading&&e.read(0)}function B(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function D(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process$1.nextTick(M,t,e))}function M(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function $(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}return k.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):O(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",o=!0),t.ended||t.reading?i("reading or ended",o=!1):o&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=A(r,t))),null===(n=e>0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){b(this,new y("_read()"))},k.prototype.pipe=function(e,r){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,i("pipe count=%d opts=%j",o.pipesCount,r);var a=(!r||!1!==r.end)&&e!==process$1.stdout&&e!==process$1.stderr?c:m;function s(t,r){i("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,i("cleanup"),e.removeListener("close",f),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",p),e.removeListener("unpipe",s),n.removeListener("end",c),n.removeListener("end",m),n.removeListener("data",d),l=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function c(){i("onend"),e.end()}o.endEmitted?process$1.nextTick(a):n.once("end",a),e.on("unpipe",s);var u=function(e){return function(){var r=e._readableState;i("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,0===r.awaitDrain&&t(e,"data")&&(r.flowing=!0,B(e))}}(n);e.on("drain",u);var l=!1;function d(t){i("ondata");var r=e.write(t);i("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!l&&(i("false write response, pause",o.awaitDrain),o.awaitDrain++),n.pause())}function p(r){i("onerror",r),m(),e.removeListener("error",p),0===t(e,"error")&&b(e,r)}function f(){e.removeListener("finish",h),m()}function h(){i("onfinish"),e.removeListener("close",f),m()}function m(){i("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",f),e.once("finish",h),e.emit("pipe",n),o.flowing||(i("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var a=$(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},k.prototype.on=function(e,t){var n=r.prototype.on.call(this,e,t),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,i("on readable",o.length,o.reading),o.length?O(this):o.reading||process$1.nextTick(P,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=r.prototype.removeListener.call(this,e,t);return"readable"===e&&process$1.nextTick(x,this),n},k.prototype.removeAllListeners=function(e){var t=r.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process$1.nextTick(x,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process$1.nextTick(C,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o)||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<w.length;a++)e.on(w[a],this.emit.bind(this,w[a]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=requireAsync_iterator()),c(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=N,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(e,t){return void 0===u&&(u=requireFromBrowser()),u(k,e,t)}),_stream_readable}function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=s;var e=requireErrorsBrowser().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,r=e.ERR_MULTIPLE_CALLBACK,n=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=e.ERR_TRANSFORM_WITH_LENGTH_0,i=require_stream_duplex();function a(e,t){var n=this._transformState;n.transforming=!1;var o=n.writecb;if(null===o)return this.emit("error",new r);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),o(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);i.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?u(this,null,null):this._flush((function(t,r){u(e,t,r)}))}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new o;if(e._transformState.transforming)throw new n;return e.push(null)}return requireInherits_browser()(s,i),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,i.prototype.push.call(this,e,t)},s.prototype._transform=function(e,r,n){n(new t("_transform()"))},s.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},s.prototype._destroy=function(e,t){i.prototype._destroy.call(this,e,(function(e){t(e)}))},_stream_transform}function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=t;var e=require_stream_transform();function t(r){if(!(this instanceof t))return new t(r);e.call(this,r)}return requireInherits_browser()(t,e),t.prototype._transform=function(e,t,r){r(null,e)},_stream_passthrough}function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;var e;hasRequiredPipeline=1;var t=requireErrorsBrowser().codes,r=t.ERR_MISSING_ARGS,n=t.ERR_STREAM_DESTROYED;function o(e){if(e)throw e}function i(e){e()}function a(e,t){return e.pipe(t)}return pipeline_1=function(){for(var t=arguments.length,s=new Array(t),c=0;c<t;c++)s[c]=arguments[c];var u,l=function(e){return e.length?"function"!=typeof e[e.length-1]?o:e.pop():o}(s);if(Array.isArray(s[0])&&(s=s[0]),s.length<2)throw new r("streams");var d=s.map((function(t,r){var o=r<s.length-1;return function(t,r,o,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var a=!1;t.on("close",(function(){a=!0})),void 0===e&&(e=requireEndOfStream()),e(t,{readable:r,writable:o},(function(e){if(e)return i(e);a=!0,i()}));var s=!1;return function(e){if(!a&&!s)return s=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void i(e||new n("pipe"))}}(t,o,r>0,(function(e){u||(u=e),e&&d.forEach(i),o||(d.forEach(i),l(u))}))}));return s.reduce(a)},pipeline_1}function requireStreamBrowserify(){if(hasRequiredStreamBrowserify)return streamBrowserify;hasRequiredStreamBrowserify=1,streamBrowserify=t;var e=requireEvents().EventEmitter;function t(){e.call(this)}return requireInherits_browser()(t,e),t.Readable=require_stream_readable(),t.Writable=require_stream_writable(),t.Duplex=require_stream_duplex(),t.Transform=require_stream_transform(),t.PassThrough=require_stream_passthrough(),t.finished=requireEndOfStream(),t.pipeline=requirePipeline(),t.Stream=t,t.prototype.pipe=function(t,r){var n=this;function o(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",o),t.on("drain",i),t._isStdio||r&&!1===r.end||(n.on("end",s),n.on("close",c));var a=!1;function s(){a||(a=!0,t.end())}function c(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){if(l(),0===e.listenerCount(this,"error"))throw t}function l(){n.removeListener("data",o),t.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",c),n.removeListener("error",u),t.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),t.removeListener("close",l)}return n.on("error",u),t.on("error",u),n.on("end",l),n.on("close",l),t.on("close",l),t.emit("pipe",n),t},streamBrowserify}var streamBrowserifyExports=requireStreamBrowserify();const index=getDefaultExportFromCjs(streamBrowserifyExports),index$1=Object.freeze(Object.defineProperty({__proto__:null,default:index},Symbol.toStringTag,{value:"Module"})),indexDXKaNRfg=Object.freeze(Object.defineProperty({__proto__:null,i:index$1},Symbol.toStringTag,{value:"Module"}));exports.AIAgentCapability=AIAgentCapability,exports.AIAgentType=AIAgentType,exports.AccountCreationError=AccountCreationError,exports.AgentBuilder=AgentBuilder,exports.BrowserHCSClient=BrowserHCSClient,exports.ConnectionConfirmationError=ConnectionConfirmationError,exports.ConnectionsManager=ConnectionsManager,exports.CustomFeeType=CustomFeeType,exports.EVMBridge=EVMBridge,exports.EndpointType=EndpointType,exports.FeeConfigBuilder=FeeConfigBuilder,exports.HCS=HCS,exports.HCS10BaseClient=HCS10BaseClient,exports.HCS10Cache=HCS10Cache,exports.HCS10Client=HCS10Client,exports.HCS11Client=HCS11Client,exports.Hcs10MemoType=Hcs10MemoType,exports.HederaMirrorNode=HederaMirrorNode,exports.InboundTopicType=InboundTopicType,exports.Logger=Logger$2,exports.PayloadSizeError=PayloadSizeError,exports.PersonBuilder=PersonBuilder,exports.ProfileType=ProfileType,exports.ProgressReporter=ProgressReporter,exports.Registration=Registration,exports.SUPPORTED_SOCIAL_PLATFORMS=SUPPORTED_SOCIAL_PLATFORMS,exports.TopicCreationError=TopicCreationError,exports.WasmBridge=WasmBridge,exports.accountIdsToExemptKeys=accountIdsToExemptKeys,exports.capabilityNameToCapabilityMap=capabilityNameToCapabilityMap,exports.inscribe=inscribe,exports.inscribeWithSigner=inscribeWithSigner,exports.retrieveInscription=retrieveInscription,exports.sleep=sleep$1,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}));
159
159
  //# sourceMappingURL=standards-sdk.umd.js.map