Files
to_session/text/3.65.22_0/scripts/domainWarning/TronWeb.node-TKYKKZRR.js
Administrator a0720d80dc fefdwef
2025-11-12 12:54:37 +08:00

26 lines
1.1 MiB
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{a as H_}from"./chunk-J3GMOYOU.js";import{a as eo,b as Sp,c as va}from"./chunk-WA5I4UXK.js";import{a as G_}from"./chunk-TQ6NB2ZI.js";import{a as jn,b as V_,c as Ro,d as vl,e as yt,f as Tp,g as Qo}from"./chunk-N6BHCQW5.js";import{a as Ze,b as gt,c as br}from"./chunk-D6YIFZDV.js";import{c as z_,d as q_}from"./chunk-KN4Z5IE2.js";import{a as j_}from"./chunk-YHVKZE66.js";import{D as W_,E as Fo,F as kb,G as U_,J as Pp,K as L_,g as Ep}from"./chunk-QO4BJAKR.js";import{b as N_,c as R,d as D_,f as Ri,g as Ib,n as process,o as g,p as k,q as y}from"./chunk-QTLWQ5AJ.js";var bl=R((Mq,Mo)=>{g();y();function Op(e){return Mo.exports=Op=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo.exports.__esModule=!0,Mo.exports.default=Mo.exports,Op(e)}Mo.exports=Op,Mo.exports.__esModule=!0,Mo.exports.default=Mo.exports});var Rb=R((Wq,No)=>{g();y();var $_=bl().default;function Fb(){"use strict";No.exports=Fb=function(){return e},No.exports.__esModule=!0,No.exports.default=No.exports;var e={},t=Object.prototype,r=t.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function n(ce,ie,_e){return Object.defineProperty(ce,ie,{value:_e,enumerable:!0,configurable:!0,writable:!0}),ce[ie]}try{n({},"")}catch{n=function(_e,be,Oe){return _e[be]=Oe}}function i(ce,ie,_e,be){var Oe=ie&&ie.prototype instanceof x?ie:x,X=Object.create(Oe.prototype),Ue=new Ye(be||[]);return X._invoke=function(Yt,zt,Z){var re="suspendedStart";return function(pe,ue){if(re==="executing")throw new Error("Generator is already running");if(re==="completed"){if(pe==="throw")throw ue;return Ae()}for(Z.method=pe,Z.arg=ue;;){var se=Z.delegate;if(se){var Ke=Ne(se,Z);if(Ke){if(Ke===l)continue;return Ke}}if(Z.method==="next")Z.sent=Z._sent=Z.arg;else if(Z.method==="throw"){if(re==="suspendedStart")throw re="completed",Z.arg;Z.dispatchException(Z.arg)}else Z.method==="return"&&Z.abrupt("return",Z.arg);re="executing";var xt=u(Yt,zt,Z);if(xt.type==="normal"){if(re=Z.done?"completed":"suspendedYield",xt.arg===l)continue;return{value:xt.arg,done:Z.done}}xt.type==="throw"&&(re="completed",Z.method="throw",Z.arg=xt.arg)}}}(ce,_e,Ue),X}function u(ce,ie,_e){try{return{type:"normal",arg:ce.call(ie,_e)}}catch(be){return{type:"throw",arg:be}}}e.wrap=i;var l={};function x(){}function N(){}function F(){}var G={};n(G,a,function(){return this});var K=Object.getPrototypeOf,te=K&&K(K(rt([])));te&&te!==t&&r.call(te,a)&&(G=te);var ae=F.prototype=x.prototype=Object.create(G);function ge(ce){["next","throw","return"].forEach(function(ie){n(ce,ie,function(_e){return this._invoke(ie,_e)})})}function Ce(ce,ie){function _e(Oe,X,Ue,Yt){var zt=u(ce[Oe],ce,X);if(zt.type!=="throw"){var Z=zt.arg,re=Z.value;return re&&$_(re)=="object"&&r.call(re,"__await")?ie.resolve(re.__await).then(function(pe){_e("next",pe,Ue,Yt)},function(pe){_e("throw",pe,Ue,Yt)}):ie.resolve(re).then(function(pe){Z.value=pe,Ue(Z)},function(pe){return _e("throw",pe,Ue,Yt)})}Yt(zt.arg)}var be;this._invoke=function(Oe,X){function Ue(){return new ie(function(Yt,zt){_e(Oe,X,Yt,zt)})}return be=be?be.then(Ue,Ue):Ue()}}function Ne(ce,ie){var _e=ce.iterator[ie.method];if(_e===void 0){if(ie.delegate=null,ie.method==="throw"){if(ce.iterator.return&&(ie.method="return",ie.arg=void 0,Ne(ce,ie),ie.method==="throw"))return l;ie.method="throw",ie.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var be=u(_e,ce.iterator,ie.arg);if(be.type==="throw")return ie.method="throw",ie.arg=be.arg,ie.delegate=null,l;var Oe=be.arg;return Oe?Oe.done?(ie[ce.resultName]=Oe.value,ie.next=ce.nextLoc,ie.method!=="return"&&(ie.method="next",ie.arg=void 0),ie.delegate=null,l):Oe:(ie.method="throw",ie.arg=new TypeError("iterator result is not an object"),ie.delegate=null,l)}function Pe(ce){var ie={tryLoc:ce[0]};1 in ce&&(ie.catchLoc=ce[1]),2 in ce&&(ie.finallyLoc=ce[2],ie.afterLoc=ce[3]),this.tryEntries.push(ie)}function Se(ce){var ie=ce.completion||{};ie.type="normal",delete ie.arg,ce.completion=ie}function Ye(ce){this.tryEntries=[{tryLoc:"root"}],ce.forEach(Pe,this),this.reset(!0)}function rt(ce){if(ce){var ie=ce[a];if(ie)return ie.call(ce);if(typeof ce.next=="function")return ce;if(!isNaN(ce.length)){var _e=-1,be=function Oe(){for(;++_e<ce.length;)if(r.call(ce,_e))return Oe.value=ce[_e],Oe.done=!1,Oe;return Oe.value=void 0,Oe.done=!0,Oe};return be.next=be}}return{next:Ae}}function Ae(){return{value:void 0,done:!0}}return N.prototype=F,n(ae,"constructor",F),n(F,"constructor",N),N.displayName=n(F,s,"GeneratorFunction"),e.isGeneratorFunction=function(ce){var ie=typeof ce=="function"&&ce.constructor;return!!ie&&(ie===N||(ie.displayName||ie.name)==="GeneratorFunction")},e.mark=function(ce){return Object.setPrototypeOf?Object.setPrototypeOf(ce,F):(ce.__proto__=F,n(ce,s,"GeneratorFunction")),ce.prototype=Object.create(ae),ce},e.awrap=function(ce){return{__await:ce}},ge(Ce.prototype),n(Ce.prototype,c,function(){return this}),e.AsyncIterator=Ce,e.async=function(ce,ie,_e,be,Oe){Oe===void 0&&(Oe=Promise);var X=new Ce(i(ce,ie,_e,be),Oe);return e.isGeneratorFunction(ie)?X:X.next().then(function(Ue){return Ue.done?Ue.value:X.next()})},ge(ae),n(ae,s,"Generator"),n(ae,a,function(){return this}),n(ae,"toString",function(){return"[object Generator]"}),e.keys=function(ce){var ie=[];for(var _e in ce)ie.push(_e);return ie.reverse(),function be(){for(;ie.length;){var Oe=ie.pop();if(Oe in ce)return be.value=Oe,be.done=!1,be}return be.done=!0,be}},e.values=rt,Ye.prototype={constructor:Ye,reset:function(ie){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Se),!ie)for(var _e in this)_e.charAt(0)==="t"&&r.call(this,_e)&&!isNaN(+_e.slice(1))&&(this[_e]=void 0)},stop:function(){this.done=!0;var ie=this.tryEntries[0].completion;if(ie.type==="throw")throw ie.arg;return this.rval},dispatchException:function(ie){if(this.done)throw ie;var _e=this;function be(Z,re){return Ue.type="throw",Ue.arg=ie,_e.next=Z,re&&(_e.method="next",_e.arg=void 0),!!re}for(var Oe=this.tryEntries.length-1;Oe>=0;--Oe){var X=this.tryEntries[Oe],Ue=X.completion;if(X.tryLoc==="root")return be("end");if(X.tryLoc<=this.prev){var Yt=r.call(X,"catchLoc"),zt=r.call(X,"finallyLoc");if(Yt&&zt){if(this.prev<X.catchLoc)return be(X.catchLoc,!0);if(this.prev<X.finallyLoc)return be(X.finallyLoc)}else if(Yt){if(this.prev<X.catchLoc)return be(X.catchLoc,!0)}else{if(!zt)throw new Error("try statement without catch or finally");if(this.prev<X.finallyLoc)return be(X.finallyLoc)}}}},abrupt:function(ie,_e){for(var be=this.tryEntries.length-1;be>=0;--be){var Oe=this.tryEntries[be];if(Oe.tryLoc<=this.prev&&r.call(Oe,"finallyLoc")&&this.prev<Oe.finallyLoc){var X=Oe;break}}X&&(ie==="break"||ie==="continue")&&X.tryLoc<=_e&&_e<=X.finallyLoc&&(X=null);var Ue=X?X.completion:{};return Ue.type=ie,Ue.arg=_e,X?(this.method="next",this.next=X.finallyLoc,l):this.complete(Ue)},complete:function(ie,_e){if(ie.type==="throw")throw ie.arg;return ie.type==="break"||ie.type==="continue"?this.next=ie.arg:ie.type==="return"?(this.rval=this.arg=ie.arg,this.method="return",this.next="end"):ie.type==="normal"&&_e&&(this.next=_e),l},finish:function(ie){for(var _e=this.tryEntries.length-1;_e>=0;--_e){var be=this.tryEntries[_e];if(be.finallyLoc===ie)return this.complete(be.completion,be.afterLoc),Se(be),l}},catch:function(ie){for(var _e=this.tryEntries.length-1;_e>=0;--_e){var be=this.tryEntries[_e];if(be.tryLoc===ie){var Oe=be.completion;if(Oe.type==="throw"){var X=Oe.arg;Se(be)}return X}}throw new Error("illegal catch attempt")},delegateYield:function(ie,_e,be){return this.delegate={iterator:rt(ie),resultName:_e,nextLoc:be},this.method==="next"&&(this.arg=void 0),l}},e}No.exports=Fb,No.exports.__esModule=!0,No.exports.default=No.exports});var Nb=R((jq,Mb)=>{g();y();var ml=Rb()();Mb.exports=ml;try{regeneratorRuntime=ml}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=ml:Function("r","regeneratorRuntime = r")(ml)}});var Wb=R((Vq,Mi)=>{g();y();function Db(e,t,r,o,a,c,s){try{var n=e[c](s),i=n.value}catch(u){r(u);return}n.done?t(i):Promise.resolve(i).then(o,a)}function K_(e){return function(){var t=this,r=arguments;return new Promise(function(o,a){var c=e.apply(t,r);function s(i){Db(c,o,a,s,n,"next",i)}function n(i){Db(c,o,a,s,n,"throw",i)}s(void 0)})}}Mi.exports=K_,Mi.exports.__esModule=!0,Mi.exports.default=Mi.exports});var Ub=R(($q,Ni)=>{g();y();function Z_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Ni.exports=Z_,Ni.exports.__esModule=!0,Ni.exports.default=Ni.exports});var jb=R((Jq,Di)=>{g();y();function Lb(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function J_(e,t,r){return t&&Lb(e.prototype,t),r&&Lb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}Di.exports=J_,Di.exports.__esModule=!0,Di.exports.default=Di.exports});var zb=R((Qq,Wi)=>{g();y();function Y_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Wi.exports=Y_,Wi.exports.__esModule=!0,Wi.exports.default=Wi.exports});var ba=R(xl=>{"use strict";g();y();Object.defineProperty(xl,"__esModule",{value:!0});xl.version=void 0;xl.version="abi/5.7.0"});var Pl=R(Le=>{"use strict";g();y();var Cl=Le&&Le.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Le,"__esModule",{value:!0});Le.ErrorFragment=Le.FunctionFragment=Le.ConstructorFragment=Le.EventFragment=Le.Fragment=Le.ParamType=Le.FormatTypes=void 0;var Rp=br(),X_=yt(),Bl=Ze(),Q_=ba(),et=new Bl.Logger(Q_.version),zn={},qb={calldata:!0,memory:!0,storage:!0},e7={calldata:!0,memory:!0};function Al(e,t){if(e==="bytes"||e==="string"){if(qb[t])return!0}else if(e==="address"){if(t==="payable")return!0}else if((e.indexOf("[")>=0||e==="tuple")&&e7[t])return!0;return(qb[t]||t==="payable")&&et.throwArgumentError("invalid modifier","name",t),!1}function t7(e,t){var r=e;function o(x){et.throwArgumentError("unexpected character at position "+x,"param",e)}e=e.replace(/\s/g," ");function a(x){var N={type:"",name:"",parent:x,state:{allowType:!0}};return t&&(N.indexed=!1),N}for(var c={type:"",name:"",state:{allowType:!0}},s=c,n=0;n<e.length;n++){var i=e[n];switch(i){case"(":s.state.allowType&&s.type===""?s.type="tuple":s.state.allowParams||o(n),s.state.allowType=!1,s.type=ma(s.type),s.components=[a(s)],s=s.components[0];break;case")":delete s.state,s.name==="indexed"&&(t||o(n),s.indexed=!0,s.name=""),Al(s.type,s.name)&&(s.name=""),s.type=ma(s.type);var u=s;s=s.parent,s||o(n),delete u.parent,s.state.allowParams=!1,s.state.allowName=!0,s.state.allowArray=!0;break;case",":delete s.state,s.name==="indexed"&&(t||o(n),s.indexed=!0,s.name=""),Al(s.type,s.name)&&(s.name=""),s.type=ma(s.type);var l=a(s.parent);s.parent.components.push(l),delete s.parent,s=l;break;case" ":s.state.allowType&&s.type!==""&&(s.type=ma(s.type),delete s.state.allowType,s.state.allowName=!0,s.state.allowParams=!0),s.state.allowName&&s.name!==""&&(s.name==="indexed"?(t||o(n),s.indexed&&o(n),s.indexed=!0,s.name=""):Al(s.type,s.name)?s.name="":s.state.allowName=!1);break;case"[":s.state.allowArray||o(n),s.type+=i,s.state.allowArray=!1,s.state.allowName=!1,s.state.readArray=!0;break;case"]":s.state.readArray||o(n),s.type+=i,s.state.readArray=!1,s.state.allowArray=!0,s.state.allowName=!0;break;default:s.state.allowType?(s.type+=i,s.state.allowParams=!0,s.state.allowArray=!0):s.state.allowName?(s.name+=i,delete s.state.allowArray):s.state.readArray?s.type+=i:o(n)}}return s.parent&&et.throwArgumentError("unexpected eof","param",e),delete c.state,s.name==="indexed"?(t||o(r.length-7),s.indexed&&o(r.length-7),s.indexed=!0,s.name=""):Al(s.type,s.name)&&(s.name=""),c.type=ma(c.type),c}function wl(e,t){for(var r in t)(0,X_.defineReadOnly)(e,r,t[r])}Le.FormatTypes=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"});var r7=new RegExp(/^(.*)\[([0-9]*)\]$/),qn=function(){function e(t,r){t!==zn&&et.throwError("use fromString",Bl.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),wl(this,r);var o=this.type.match(r7);o?wl(this,{arrayLength:parseInt(o[2]||"-1"),arrayChildren:e.fromObject({type:o[1],components:this.components}),baseType:"array"}):wl(this,{arrayLength:null,arrayChildren:null,baseType:this.components!=null?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return e.prototype.format=function(t){if(t||(t=Le.FormatTypes.sighash),Le.FormatTypes[t]||et.throwArgumentError("invalid format type","format",t),t===Le.FormatTypes.json){var r={type:this.baseType==="tuple"?"tuple":this.type,name:this.name||void 0};return typeof this.indexed=="boolean"&&(r.indexed=this.indexed),this.components&&(r.components=this.components.map(function(a){return JSON.parse(a.format(t))})),JSON.stringify(r)}var o="";return this.baseType==="array"?(o+=this.arrayChildren.format(t),o+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(t!==Le.FormatTypes.sighash&&(o+=this.type),o+="("+this.components.map(function(a){return a.format(t)}).join(t===Le.FormatTypes.full?", ":",")+")"):o+=this.type,t!==Le.FormatTypes.sighash&&(this.indexed===!0&&(o+=" indexed"),t===Le.FormatTypes.full&&this.name&&(o+=" "+this.name)),o},e.from=function(t,r){return typeof t=="string"?e.fromString(t,r):e.fromObject(t)},e.fromObject=function(t){return e.isParamType(t)?t:new e(zn,{name:t.name||null,type:ma(t.type),indexed:t.indexed==null?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})},e.fromString=function(t,r){function o(a){return e.fromObject({name:a.name,type:a.type,indexed:a.indexed,components:a.components})}return o(t7(t,!!r))},e.isParamType=function(t){return!!(t!=null&&t._isParamType)},e}();Le.ParamType=qn;function Ui(e,t){return n7(e).map(function(r){return qn.fromString(r,t)})}var El=function(){function e(t,r){t!==zn&&et.throwError("use a static from method",Bl.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),wl(this,r),this._isFragment=!0,Object.freeze(this)}return e.from=function(t){return e.isFragment(t)?t:typeof t=="string"?e.fromString(t):e.fromObject(t)},e.fromObject=function(t){if(e.isFragment(t))return t;switch(t.type){case"function":return kp.fromObject(t);case"event":return Ip.fromObject(t);case"constructor":return _l.fromObject(t);case"error":return Fp.fromObject(t);case"fallback":case"receive":return null}return et.throwArgumentError("invalid fragment object","value",t)},e.fromString=function(t){return t=t.replace(/\s/g," "),t=t.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),t=t.trim(),t.split(" ")[0]==="event"?Ip.fromString(t.substring(5).trim()):t.split(" ")[0]==="function"?kp.fromString(t.substring(8).trim()):t.split("(")[0].trim()==="constructor"?_l.fromString(t.trim()):t.split(" ")[0]==="error"?Fp.fromString(t.substring(5).trim()):et.throwArgumentError("unsupported fragment","value",t)},e.isFragment=function(t){return!!(t&&t._isFragment)},e}();Le.Fragment=El;var Ip=function(e){Cl(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.format=function(r){if(r||(r=Le.FormatTypes.sighash),Le.FormatTypes[r]||et.throwArgumentError("invalid format type","format",r),r===Le.FormatTypes.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(function(a){return JSON.parse(a.format(r))})});var o="";return r!==Le.FormatTypes.sighash&&(o+="event "),o+=this.name+"("+this.inputs.map(function(a){return a.format(r)}).join(r===Le.FormatTypes.full?", ":",")+") ",r!==Le.FormatTypes.sighash&&this.anonymous&&(o+="anonymous "),o.trim()},t.from=function(r){return typeof r=="string"?t.fromString(r):t.fromObject(r)},t.fromObject=function(r){if(t.isEventFragment(r))return r;r.type!=="event"&&et.throwArgumentError("invalid event object","value",r);var o={name:Li(r.name),anonymous:r.anonymous,inputs:r.inputs?r.inputs.map(qn.fromObject):[],type:"event"};return new t(zn,o)},t.fromString=function(r){var o=r.match(ji);o||et.throwArgumentError("invalid event string","value",r);var a=!1;return o[3].split(" ").forEach(function(c){switch(c.trim()){case"anonymous":a=!0;break;case"":break;default:et.warn("unknown modifier: "+c)}}),t.fromObject({name:o[1].trim(),anonymous:a,inputs:Ui(o[2],!0),type:"event"})},t.isEventFragment=function(r){return r&&r._isFragment&&r.type==="event"},t}(El);Le.EventFragment=Ip;function Gb(e,t){t.gas=null;var r=e.split("@");return r.length!==1?(r.length>2&&et.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||et.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=Rp.BigNumber.from(r[1]),r[0]):e}function Hb(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach(function(r){switch(r.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function $b(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return e.stateMutability!=null?(t.stateMutability=e.stateMutability,t.constant=t.stateMutability==="view"||t.stateMutability==="pure",e.constant!=null&&!!e.constant!==t.constant&&et.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable=t.stateMutability==="payable",e.payable!=null&&!!e.payable!==t.payable&&et.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):e.payable!=null?(t.payable=!!e.payable,e.constant==null&&!t.payable&&e.type!=="constructor"&&et.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&et.throwArgumentError("cannot have constant payable function","value",e)):e.constant!=null?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):e.type!=="constructor"&&et.throwArgumentError("unable to determine stateMutability","value",e),t}var _l=function(e){Cl(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.format=function(r){if(r||(r=Le.FormatTypes.sighash),Le.FormatTypes[r]||et.throwArgumentError("invalid format type","format",r),r===Le.FormatTypes.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(function(a){return JSON.parse(a.format(r))})});r===Le.FormatTypes.sighash&&et.throwError("cannot format a constructor for sighash",Bl.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var o="constructor("+this.inputs.map(function(a){return a.format(r)}).join(r===Le.FormatTypes.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(o+=this.stateMutability+" "),o.trim()},t.from=function(r){return typeof r=="string"?t.fromString(r):t.fromObject(r)},t.fromObject=function(r){if(t.isConstructorFragment(r))return r;r.type!=="constructor"&&et.throwArgumentError("invalid constructor object","value",r);var o=$b(r);o.constant&&et.throwArgumentError("constructor cannot be constant","value",r);var a={name:null,type:r.type,inputs:r.inputs?r.inputs.map(qn.fromObject):[],payable:o.payable,stateMutability:o.stateMutability,gas:r.gas?Rp.BigNumber.from(r.gas):null};return new t(zn,a)},t.fromString=function(r){var o={type:"constructor"};r=Gb(r,o);var a=r.match(ji);return(!a||a[1].trim()!=="constructor")&&et.throwArgumentError("invalid constructor string","value",r),o.inputs=Ui(a[2].trim(),!1),Hb(a[3].trim(),o),t.fromObject(o)},t.isConstructorFragment=function(r){return r&&r._isFragment&&r.type==="constructor"},t}(El);Le.ConstructorFragment=_l;var kp=function(e){Cl(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.format=function(r){if(r||(r=Le.FormatTypes.sighash),Le.FormatTypes[r]||et.throwArgumentError("invalid format type","format",r),r===Le.FormatTypes.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(function(a){return JSON.parse(a.format(r))}),outputs:this.outputs.map(function(a){return JSON.parse(a.format(r))})});var o="";return r!==Le.FormatTypes.sighash&&(o+="function "),o+=this.name+"("+this.inputs.map(function(a){return a.format(r)}).join(r===Le.FormatTypes.full?", ":",")+") ",r!==Le.FormatTypes.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(o+=this.stateMutability+" "):this.constant&&(o+="view "),this.outputs&&this.outputs.length&&(o+="returns ("+this.outputs.map(function(a){return a.format(r)}).join(", ")+") "),this.gas!=null&&(o+="@"+this.gas.toString()+" ")),o.trim()},t.from=function(r){return typeof r=="string"?t.fromString(r):t.fromObject(r)},t.fromObject=function(r){if(t.isFunctionFragment(r))return r;r.type!=="function"&&et.throwArgumentError("invalid function object","value",r);var o=$b(r),a={type:r.type,name:Li(r.name),constant:o.constant,inputs:r.inputs?r.inputs.map(qn.fromObject):[],outputs:r.outputs?r.outputs.map(qn.fromObject):[],payable:o.payable,stateMutability:o.stateMutability,gas:r.gas?Rp.BigNumber.from(r.gas):null};return new t(zn,a)},t.fromString=function(r){var o={type:"function"};r=Gb(r,o);var a=r.split(" returns ");a.length>2&&et.throwArgumentError("invalid function string","value",r);var c=a[0].match(ji);if(c||et.throwArgumentError("invalid function signature","value",r),o.name=c[1].trim(),o.name&&Li(o.name),o.inputs=Ui(c[2],!1),Hb(c[3].trim(),o),a.length>1){var s=a[1].match(ji);(s[1].trim()!=""||s[3].trim()!="")&&et.throwArgumentError("unexpected tokens","value",r),o.outputs=Ui(s[2],!1)}else o.outputs=[];return t.fromObject(o)},t.isFunctionFragment=function(r){return r&&r._isFragment&&r.type==="function"},t}(_l);Le.FunctionFragment=kp;function Vb(e){var t=e.format();return(t==="Error(string)"||t==="Panic(uint256)")&&et.throwArgumentError("cannot specify user defined "+t+" error","fragment",e),e}var Fp=function(e){Cl(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.format=function(r){if(r||(r=Le.FormatTypes.sighash),Le.FormatTypes[r]||et.throwArgumentError("invalid format type","format",r),r===Le.FormatTypes.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(function(a){return JSON.parse(a.format(r))})});var o="";return r!==Le.FormatTypes.sighash&&(o+="error "),o+=this.name+"("+this.inputs.map(function(a){return a.format(r)}).join(r===Le.FormatTypes.full?", ":",")+") ",o.trim()},t.from=function(r){return typeof r=="string"?t.fromString(r):t.fromObject(r)},t.fromObject=function(r){if(t.isErrorFragment(r))return r;r.type!=="error"&&et.throwArgumentError("invalid error object","value",r);var o={type:r.type,name:Li(r.name),inputs:r.inputs?r.inputs.map(qn.fromObject):[]};return Vb(new t(zn,o))},t.fromString=function(r){var o={type:"error"},a=r.match(ji);return a||et.throwArgumentError("invalid error signature","value",r),o.name=a[1].trim(),o.name&&Li(o.name),o.inputs=Ui(a[2],!1),Vb(t.fromObject(o))},t.isErrorFragment=function(r){return r&&r._isFragment&&r.type==="error"},t}(El);Le.ErrorFragment=Fp;function ma(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var o7=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Li(e){return(!e||!e.match(o7))&&et.throwArgumentError('invalid identifier "'+e+'"',"value",e),e}var ji=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function n7(e){e=e.trim();for(var t=[],r="",o=0,a=0;a<e.length;a++){var c=e[a];c===","&&o===0?(t.push(r),r=""):(r+=c,c==="("?o++:c===")"&&(o--,o===-1&&et.throwArgumentError("unbalanced parenthesis","value",e)))}return r&&t.push(r),t}});var Ur=R(po=>{"use strict";g();y();Object.defineProperty(po,"__esModule",{value:!0});po.Reader=po.Writer=po.Coder=po.checkResultErrors=void 0;var en=gt(),Kb=br(),zi=yt(),Mp=Ze(),a7=ba(),Np=new Mp.Logger(a7.version);function i7(e){var t=[],r=function(o,a){if(!!Array.isArray(a))for(var c in a){var s=o.slice();s.push(c);try{r(s,a[c])}catch(n){t.push({path:s,error:n})}}};return r([],e),t}po.checkResultErrors=i7;var s7=function(){function e(t,r,o,a){this.name=t,this.type=r,this.localName=o,this.dynamic=a}return e.prototype._throwError=function(t,r){Np.throwArgumentError(t,this.localName,r)},e}();po.Coder=s7;var c7=function(){function e(t){(0,zi.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return Object.defineProperty(e.prototype,"data",{get:function(){return(0,en.hexConcat)(this._data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._dataLength},enumerable:!1,configurable:!0}),e.prototype._writeData=function(t){return this._data.push(t),this._dataLength+=t.length,t.length},e.prototype.appendWriter=function(t){return this._writeData((0,en.concat)(t._data))},e.prototype.writeBytes=function(t){var r=(0,en.arrayify)(t),o=r.length%this.wordSize;return o&&(r=(0,en.concat)([r,this._padding.slice(o)])),this._writeData(r)},e.prototype._getValue=function(t){var r=(0,en.arrayify)(Kb.BigNumber.from(t));return r.length>this.wordSize&&Np.throwError("value out-of-bounds",Mp.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=(0,en.concat)([this._padding.slice(r.length%this.wordSize),r])),r},e.prototype.writeValue=function(t){return this._writeData(this._getValue(t))},e.prototype.writeUpdatableValue=function(){var t=this,r=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(o){t._data[r]=t._getValue(o)}},e}();po.Writer=c7;var u7=function(){function e(t,r,o,a){(0,zi.defineReadOnly)(this,"_data",(0,en.arrayify)(t)),(0,zi.defineReadOnly)(this,"wordSize",r||32),(0,zi.defineReadOnly)(this,"_coerceFunc",o),(0,zi.defineReadOnly)(this,"allowLoose",a),this._offset=0}return Object.defineProperty(e.prototype,"data",{get:function(){return(0,en.hexlify)(this._data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"consumed",{get:function(){return this._offset},enumerable:!1,configurable:!0}),e.coerce=function(t,r){var o=t.match("^u?int([0-9]+)$");return o&&parseInt(o[1])<=48&&(r=r.toNumber()),r},e.prototype.coerce=function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)},e.prototype._peekBytes=function(t,r,o){var a=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+a>this._data.length&&(this.allowLoose&&o&&this._offset+r<=this._data.length?a=r:Np.throwError("data out-of-bounds",Mp.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+a})),this._data.slice(this._offset,this._offset+a)},e.prototype.subReader=function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)},e.prototype.readBytes=function(t,r){var o=this._peekBytes(0,t,!!r);return this._offset+=o.length,o.slice(0,t)},e.prototype.readValue=function(){return Kb.BigNumber.from(this.readBytes(this.wordSize))},e}();po.Reader=u7});var Jb=R(xa=>{"use strict";g();y();var l7=xa&&xa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(xa,"__esModule",{value:!0});xa.AddressCoder=void 0;var Zb=Ro(),d7=gt(),f7=Ur(),p7=function(e){l7(t,e);function t(r){return e.call(this,"address","address",r,!1)||this}return t.prototype.defaultValue=function(){return"0x0000000000000000000000000000000000000000"},t.prototype.encode=function(r,o){try{o=(0,Zb.getAddress)(o)}catch(a){this._throwError(a.message,o)}return r.writeValue(o)},t.prototype.decode=function(r){return(0,Zb.getAddress)((0,d7.hexZeroPad)(r.readValue().toHexString(),20))},t}(f7.Coder);xa.AddressCoder=p7});var Yb=R(Aa=>{"use strict";g();y();var h7=Aa&&Aa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Aa,"__esModule",{value:!0});Aa.AnonymousCoder=void 0;var g7=Ur(),y7=function(e){h7(t,e);function t(r){var o=e.call(this,r.name,r.type,void 0,r.dynamic)||this;return o.coder=r,o}return t.prototype.defaultValue=function(){return this.coder.defaultValue()},t.prototype.encode=function(r,o){return this.coder.encode(r,o)},t.prototype.decode=function(r){return this.coder.decode(r)},t}(g7.Coder);Aa.AnonymousCoder=y7});var Wp=R(ho=>{"use strict";g();y();var v7=ho&&ho.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(ho,"__esModule",{value:!0});ho.ArrayCoder=ho.unpack=ho.pack=void 0;var _a=Ze(),b7=ba(),wa=new _a.Logger(b7.version),Dp=Ur(),m7=Yb();function Xb(e,t,r){var o=null;if(Array.isArray(r))o=r;else if(r&&typeof r=="object"){var a={};o=t.map(function(u){var l=u.localName;return l||wa.throwError("cannot encode object for signature with missing names",_a.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:u,value:r}),a[l]&&wa.throwError("cannot encode object for signature with duplicate names",_a.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:u,value:r}),a[l]=!0,r[l]})}else wa.throwArgumentError("invalid tuple value","tuple",r);t.length!==o.length&&wa.throwArgumentError("types/value length mismatch","tuple",r);var c=new Dp.Writer(e.wordSize),s=new Dp.Writer(e.wordSize),n=[];t.forEach(function(u,l){var x=o[l];if(u.dynamic){var N=s.length;u.encode(s,x);var F=c.writeUpdatableValue();n.push(function(G){F(G+N)})}else u.encode(c,x)}),n.forEach(function(u){u(c.length)});var i=e.appendWriter(c);return i+=e.appendWriter(s),i}ho.pack=Xb;function Qb(e,t){var r=[],o=e.subReader(0);t.forEach(function(n){var i=null;if(n.dynamic){var u=e.readValue(),l=o.subReader(u.toNumber());try{i=n.decode(l)}catch(x){if(x.code===_a.Logger.errors.BUFFER_OVERRUN)throw x;i=x,i.baseType=n.name,i.name=n.localName,i.type=n.type}}else try{i=n.decode(e)}catch(x){if(x.code===_a.Logger.errors.BUFFER_OVERRUN)throw x;i=x,i.baseType=n.name,i.name=n.localName,i.type=n.type}i!=null&&r.push(i)});var a=t.reduce(function(n,i){var u=i.localName;return u&&(n[u]||(n[u]=0),n[u]++),n},{});t.forEach(function(n,i){var u=n.localName;if(!(!u||a[u]!==1)&&(u==="length"&&(u="_length"),r[u]==null)){var l=r[i];l instanceof Error?Object.defineProperty(r,u,{enumerable:!0,get:function(){throw l}}):r[u]=l}});for(var c=function(n){var i=r[n];i instanceof Error&&Object.defineProperty(r,n,{enumerable:!0,get:function(){throw i}})},s=0;s<r.length;s++)c(s);return Object.freeze(r)}ho.unpack=Qb;var x7=function(e){v7(t,e);function t(r,o,a){var c=this,s=r.type+"["+(o>=0?o:"")+"]",n=o===-1||r.dynamic;return c=e.call(this,"array",s,a,n)||this,c.coder=r,c.length=o,c}return t.prototype.defaultValue=function(){for(var r=this.coder.defaultValue(),o=[],a=0;a<this.length;a++)o.push(r);return o},t.prototype.encode=function(r,o){Array.isArray(o)||this._throwError("expected array value",o);var a=this.length;a===-1&&(a=o.length,r.writeValue(o.length)),wa.checkArgumentCount(o.length,a,"coder array"+(this.localName?" "+this.localName:""));for(var c=[],s=0;s<o.length;s++)c.push(this.coder);return Xb(r,c,o)},t.prototype.decode=function(r){var o=this.length;o===-1&&(o=r.readValue().toNumber(),o*32>r._data.length&&wa.throwError("insufficient data length",_a.Logger.errors.BUFFER_OVERRUN,{length:r._data.length,count:o}));for(var a=[],c=0;c<o;c++)a.push(new m7.AnonymousCoder(this.coder));return r.coerce(this.name,Qb(r,a))},t}(Dp.Coder);ho.ArrayCoder=x7});var em=R(Ca=>{"use strict";g();y();var A7=Ca&&Ca.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Ca,"__esModule",{value:!0});Ca.BooleanCoder=void 0;var w7=Ur(),_7=function(e){A7(t,e);function t(r){return e.call(this,"bool","bool",r,!1)||this}return t.prototype.defaultValue=function(){return!1},t.prototype.encode=function(r,o){return r.writeValue(o?1:0)},t.prototype.decode=function(r){return r.coerce(this.type,!r.readValue().isZero())},t}(w7.Coder);Ca.BooleanCoder=_7});var Up=R(tn=>{"use strict";g();y();var tm=tn&&tn.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(tn,"__esModule",{value:!0});tn.BytesCoder=tn.DynamicBytesCoder=void 0;var rm=gt(),C7=Ur(),om=function(e){tm(t,e);function t(r,o){return e.call(this,r,r,o,!0)||this}return t.prototype.defaultValue=function(){return"0x"},t.prototype.encode=function(r,o){o=(0,rm.arrayify)(o);var a=r.writeValue(o.length);return a+=r.writeBytes(o),a},t.prototype.decode=function(r){return r.readBytes(r.readValue().toNumber(),!0)},t}(C7.Coder);tn.DynamicBytesCoder=om;var B7=function(e){tm(t,e);function t(r){return e.call(this,"bytes",r)||this}return t.prototype.decode=function(r){return r.coerce(this.name,(0,rm.hexlify)(e.prototype.decode.call(this,r)))},t}(om);tn.BytesCoder=B7});var am=R(Ba=>{"use strict";g();y();var E7=Ba&&Ba.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Ba,"__esModule",{value:!0});Ba.FixedBytesCoder=void 0;var nm=gt(),P7=Ur(),T7=function(e){E7(t,e);function t(r,o){var a=this,c="bytes"+String(r);return a=e.call(this,c,c,o,!1)||this,a.size=r,a}return t.prototype.defaultValue=function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)},t.prototype.encode=function(r,o){var a=(0,nm.arrayify)(o);return a.length!==this.size&&this._throwError("incorrect data length",o),r.writeBytes(a)},t.prototype.decode=function(r){return r.coerce(this.name,(0,nm.hexlify)(r.readBytes(this.size)))},t}(P7.Coder);Ba.FixedBytesCoder=T7});var im=R(Ea=>{"use strict";g();y();var S7=Ea&&Ea.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Ea,"__esModule",{value:!0});Ea.NullCoder=void 0;var O7=Ur(),I7=function(e){S7(t,e);function t(r){return e.call(this,"null","",r,!1)||this}return t.prototype.defaultValue=function(){return null},t.prototype.encode=function(r,o){return o!=null&&this._throwError("not null",o),r.writeBytes([])},t.prototype.decode=function(r){return r.readBytes(0),r.coerce(this.name,null)},t}(O7.Coder);Ea.NullCoder=I7});var sm=R(Pa=>{"use strict";g();y();var k7=Pa&&Pa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.NumberCoder=void 0;var F7=br(),Tl=vl(),R7=Ur(),M7=function(e){k7(t,e);function t(r,o,a){var c=this,s=(o?"int":"uint")+r*8;return c=e.call(this,s,s,a,!1)||this,c.size=r,c.signed=o,c}return t.prototype.defaultValue=function(){return 0},t.prototype.encode=function(r,o){var a=F7.BigNumber.from(o),c=Tl.MaxUint256.mask(r.wordSize*8);if(this.signed){var s=c.mask(this.size*8-1);(a.gt(s)||a.lt(s.add(Tl.One).mul(Tl.NegativeOne)))&&this._throwError("value out-of-bounds",o)}else(a.lt(Tl.Zero)||a.gt(c.mask(this.size*8)))&&this._throwError("value out-of-bounds",o);return a=a.toTwos(this.size*8).mask(this.size*8),this.signed&&(a=a.fromTwos(this.size*8).toTwos(8*r.wordSize)),r.writeValue(a)},t.prototype.decode=function(r){var o=r.readValue().mask(this.size*8);return this.signed&&(o=o.fromTwos(this.size*8)),r.coerce(this.name,o)},t}(R7.Coder);Pa.NumberCoder=M7});var um=R(Ta=>{"use strict";g();y();var N7=Ta&&Ta.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Ta,"__esModule",{value:!0});Ta.StringCoder=void 0;var cm=eo(),D7=Up(),W7=function(e){N7(t,e);function t(r){return e.call(this,"string",r)||this}return t.prototype.defaultValue=function(){return""},t.prototype.encode=function(r,o){return e.prototype.encode.call(this,r,(0,cm.toUtf8Bytes)(o))},t.prototype.decode=function(r){return(0,cm.toUtf8String)(e.prototype.decode.call(this,r))},t}(D7.DynamicBytesCoder);Ta.StringCoder=W7});var dm=R(Sa=>{"use strict";g();y();var U7=Sa&&Sa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Sa,"__esModule",{value:!0});Sa.TupleCoder=void 0;var L7=Ur(),lm=Wp(),j7=function(e){U7(t,e);function t(r,o){var a=this,c=!1,s=[];r.forEach(function(i){i.dynamic&&(c=!0),s.push(i.type)});var n="tuple("+s.join(",")+")";return a=e.call(this,"tuple",n,o,c)||this,a.coders=r,a}return t.prototype.defaultValue=function(){var r=[];this.coders.forEach(function(a){r.push(a.defaultValue())});var o=this.coders.reduce(function(a,c){var s=c.localName;return s&&(a[s]||(a[s]=0),a[s]++),a},{});return this.coders.forEach(function(a,c){var s=a.localName;!s||o[s]!==1||(s==="length"&&(s="_length"),r[s]==null&&(r[s]=r[c]))}),Object.freeze(r)},t.prototype.encode=function(r,o){return(0,lm.pack)(r,this.coders,o)},t.prototype.decode=function(r){return r.coerce(this.name,(0,lm.unpack)(r,this.coders))},t}(L7.Coder);Sa.TupleCoder=j7});var jp=R(Oa=>{"use strict";g();y();Object.defineProperty(Oa,"__esModule",{value:!0});Oa.defaultAbiCoder=Oa.AbiCoder=void 0;var z7=gt(),q7=yt(),pm=Ze(),V7=ba(),Sl=new pm.Logger(V7.version),fm=Ur(),G7=Jb(),H7=Wp(),$7=em(),K7=Up(),Z7=am(),J7=im(),Y7=sm(),X7=um(),Ol=dm(),Lp=Pl(),Q7=new RegExp(/^bytes([0-9]*)$/),eC=new RegExp(/^(u?int)([0-9]*)$/),hm=function(){function e(t){(0,q7.defineReadOnly)(this,"coerceFunc",t||null)}return e.prototype._getCoder=function(t){var r=this;switch(t.baseType){case"address":return new G7.AddressCoder(t.name);case"bool":return new $7.BooleanCoder(t.name);case"string":return new X7.StringCoder(t.name);case"bytes":return new K7.BytesCoder(t.name);case"array":return new H7.ArrayCoder(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new Ol.TupleCoder((t.components||[]).map(function(c){return r._getCoder(c)}),t.name);case"":return new J7.NullCoder(t.name)}var o=t.type.match(eC);if(o){var a=parseInt(o[2]||"256");return(a===0||a>256||a%8!==0)&&Sl.throwArgumentError("invalid "+o[1]+" bit length","param",t),new Y7.NumberCoder(a/8,o[1]==="int",t.name)}if(o=t.type.match(Q7),o){var a=parseInt(o[1]);return(a===0||a>32)&&Sl.throwArgumentError("invalid bytes length","param",t),new Z7.FixedBytesCoder(a,t.name)}return Sl.throwArgumentError("invalid type","type",t.type)},e.prototype._getWordSize=function(){return 32},e.prototype._getReader=function(t,r){return new fm.Reader(t,this._getWordSize(),this.coerceFunc,r)},e.prototype._getWriter=function(){return new fm.Writer(this._getWordSize())},e.prototype.getDefaultValue=function(t){var r=this,o=t.map(function(c){return r._getCoder(Lp.ParamType.from(c))}),a=new Ol.TupleCoder(o,"_");return a.defaultValue()},e.prototype.encode=function(t,r){var o=this;t.length!==r.length&&Sl.throwError("types/values length mismatch",pm.Logger.errors.INVALID_ARGUMENT,{count:{types:t.length,values:r.length},value:{types:t,values:r}});var a=t.map(function(n){return o._getCoder(Lp.ParamType.from(n))}),c=new Ol.TupleCoder(a,"_"),s=this._getWriter();return c.encode(s,r),s.data},e.prototype.decode=function(t,r,o){var a=this,c=t.map(function(n){return a._getCoder(Lp.ParamType.from(n))}),s=new Ol.TupleCoder(c,"_");return s.decode(this._getReader((0,z7.arrayify)(r),o))},e}();Oa.AbiCoder=hm;Oa.defaultAbiCoder=new hm});var Am=R(ir=>{"use strict";g();y();var Fl=ir&&ir.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(ir,"__esModule",{value:!0});ir.Interface=ir.Indexed=ir.ErrorDescription=ir.TransactionDescription=ir.LogDescription=ir.checkResultErrors=void 0;var tC=Ro(),gm=br(),wt=gt(),Il=va(),ym=jn(),Xt=yt(),rC=jp(),oC=Ur();Object.defineProperty(ir,"checkResultErrors",{enumerable:!0,get:function(){return oC.checkResultErrors}});var Do=Pl(),kl=Ze(),nC=ba(),Et=new kl.Logger(nC.version),bm=function(e){Fl(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Xt.Description);ir.LogDescription=bm;var mm=function(e){Fl(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Xt.Description);ir.TransactionDescription=mm;var xm=function(e){Fl(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Xt.Description);ir.ErrorDescription=xm;var zp=function(e){Fl(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.isIndexed=function(r){return!!(r&&r._isIndexed)},t}(Xt.Description);ir.Indexed=zp;var aC={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function vm(e,t){var r=new Error("deferred error during ABI decoding triggered accessing "+e);return r.error=t,r}var iC=function(){function e(t){var r=this.constructor,o=this,a=[];typeof t=="string"?a=JSON.parse(t):a=t,(0,Xt.defineReadOnly)(this,"fragments",a.map(function(c){return Do.Fragment.from(c)}).filter(function(c){return c!=null})),(0,Xt.defineReadOnly)(this,"_abiCoder",(0,Xt.getStatic)(r,"getAbiCoder")()),(0,Xt.defineReadOnly)(this,"functions",{}),(0,Xt.defineReadOnly)(this,"errors",{}),(0,Xt.defineReadOnly)(this,"events",{}),(0,Xt.defineReadOnly)(this,"structs",{}),this.fragments.forEach(function(c){var s=null;switch(c.type){case"constructor":if(o.deploy){Et.warn("duplicate definition - constructor");return}(0,Xt.defineReadOnly)(o,"deploy",c);return;case"function":s=o.functions;break;case"event":s=o.events;break;case"error":s=o.errors;break;default:return}var n=c.format();if(s[n]){Et.warn("duplicate definition - "+n);return}s[n]=c}),this.deploy||(0,Xt.defineReadOnly)(this,"deploy",Do.ConstructorFragment.from({payable:!1,type:"constructor"})),(0,Xt.defineReadOnly)(this,"_isInterface",!0)}return e.prototype.format=function(t){t||(t=Do.FormatTypes.full),t===Do.FormatTypes.sighash&&Et.throwArgumentError("interface does not support formatting sighash","format",t);var r=this.fragments.map(function(o){return o.format(t)});return t===Do.FormatTypes.json?JSON.stringify(r.map(function(o){return JSON.parse(o)})):r},e.getAbiCoder=function(){return rC.defaultAbiCoder},e.getAddress=function(t){return(0,tC.getAddress)(t)},e.getSighash=function(t){return(0,wt.hexDataSlice)((0,Il.id)(t.format()),0,4)},e.getEventTopic=function(t){return(0,Il.id)(t.format())},e.prototype.getFunction=function(t){if((0,wt.isHexString)(t)){for(var r in this.functions)if(t===this.getSighash(r))return this.functions[r];Et.throwArgumentError("no matching function","sighash",t)}if(t.indexOf("(")===-1){var o=t.trim(),a=Object.keys(this.functions).filter(function(s){return s.split("(")[0]===o});return a.length===0?Et.throwArgumentError("no matching function","name",o):a.length>1&&Et.throwArgumentError("multiple matching functions","name",o),this.functions[a[0]]}var c=this.functions[Do.FunctionFragment.fromString(t).format()];return c||Et.throwArgumentError("no matching function","signature",t),c},e.prototype.getEvent=function(t){if((0,wt.isHexString)(t)){var r=t.toLowerCase();for(var o in this.events)if(r===this.getEventTopic(o))return this.events[o];Et.throwArgumentError("no matching event","topichash",r)}if(t.indexOf("(")===-1){var a=t.trim(),c=Object.keys(this.events).filter(function(n){return n.split("(")[0]===a});return c.length===0?Et.throwArgumentError("no matching event","name",a):c.length>1&&Et.throwArgumentError("multiple matching events","name",a),this.events[c[0]]}var s=this.events[Do.EventFragment.fromString(t).format()];return s||Et.throwArgumentError("no matching event","signature",t),s},e.prototype.getError=function(t){if((0,wt.isHexString)(t)){var r=(0,Xt.getStatic)(this.constructor,"getSighash");for(var o in this.errors){var a=this.errors[o];if(t===r(a))return this.errors[o]}Et.throwArgumentError("no matching error","sighash",t)}if(t.indexOf("(")===-1){var c=t.trim(),s=Object.keys(this.errors).filter(function(i){return i.split("(")[0]===c});return s.length===0?Et.throwArgumentError("no matching error","name",c):s.length>1&&Et.throwArgumentError("multiple matching errors","name",c),this.errors[s[0]]}var n=this.errors[Do.FunctionFragment.fromString(t).format()];return n||Et.throwArgumentError("no matching error","signature",t),n},e.prototype.getSighash=function(t){if(typeof t=="string")try{t=this.getFunction(t)}catch(r){try{t=this.getError(t)}catch{throw r}}return(0,Xt.getStatic)(this.constructor,"getSighash")(t)},e.prototype.getEventTopic=function(t){return typeof t=="string"&&(t=this.getEvent(t)),(0,Xt.getStatic)(this.constructor,"getEventTopic")(t)},e.prototype._decodeParams=function(t,r){return this._abiCoder.decode(t,r)},e.prototype._encodeParams=function(t,r){return this._abiCoder.encode(t,r)},e.prototype.encodeDeploy=function(t){return this._encodeParams(this.deploy.inputs,t||[])},e.prototype.decodeErrorResult=function(t,r){typeof t=="string"&&(t=this.getError(t));var o=(0,wt.arrayify)(r);return(0,wt.hexlify)(o.slice(0,4))!==this.getSighash(t)&&Et.throwArgumentError("data signature does not match error "+t.name+".","data",(0,wt.hexlify)(o)),this._decodeParams(t.inputs,o.slice(4))},e.prototype.encodeErrorResult=function(t,r){return typeof t=="string"&&(t=this.getError(t)),(0,wt.hexlify)((0,wt.concat)([this.getSighash(t),this._encodeParams(t.inputs,r||[])]))},e.prototype.decodeFunctionData=function(t,r){typeof t=="string"&&(t=this.getFunction(t));var o=(0,wt.arrayify)(r);return(0,wt.hexlify)(o.slice(0,4))!==this.getSighash(t)&&Et.throwArgumentError("data signature does not match function "+t.name+".","data",(0,wt.hexlify)(o)),this._decodeParams(t.inputs,o.slice(4))},e.prototype.encodeFunctionData=function(t,r){return typeof t=="string"&&(t=this.getFunction(t)),(0,wt.hexlify)((0,wt.concat)([this.getSighash(t),this._encodeParams(t.inputs,r||[])]))},e.prototype.decodeFunctionResult=function(t,r){typeof t=="string"&&(t=this.getFunction(t));var o=(0,wt.arrayify)(r),a=null,c="",s=null,n=null,i=null;switch(o.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,o)}catch{}break;case 4:{var u=(0,wt.hexlify)(o.slice(0,4)),l=aC[u];if(l)s=this._abiCoder.decode(l.inputs,o.slice(4)),n=l.name,i=l.signature,l.reason&&(a=s[0]),n==="Error"?c="; VM Exception while processing transaction: reverted with reason string "+JSON.stringify(s[0]):n==="Panic"&&(c="; VM Exception while processing transaction: reverted with panic code "+s[0]);else try{var x=this.getError(u);s=this._abiCoder.decode(x.inputs,o.slice(4)),n=x.name,i=x.format()}catch{}break}}return Et.throwError("call revert exception"+c,kl.Logger.errors.CALL_EXCEPTION,{method:t.format(),data:(0,wt.hexlify)(r),errorArgs:s,errorName:n,errorSignature:i,reason:a})},e.prototype.encodeFunctionResult=function(t,r){return typeof t=="string"&&(t=this.getFunction(t)),(0,wt.hexlify)(this._abiCoder.encode(t.outputs,r||[]))},e.prototype.encodeFilterTopics=function(t,r){var o=this;typeof t=="string"&&(t=this.getEvent(t)),r.length>t.inputs.length&&Et.throwError("too many arguments for "+t.format(),kl.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});var a=[];t.anonymous||a.push(this.getEventTopic(t));var c=function(s,n){return s.type==="string"?(0,Il.id)(n):s.type==="bytes"?(0,ym.keccak256)((0,wt.hexlify)(n)):(s.type==="bool"&&typeof n=="boolean"&&(n=n?"0x01":"0x00"),s.type.match(/^u?int/)&&(n=gm.BigNumber.from(n).toHexString()),s.type==="address"&&o._abiCoder.encode(["address"],[n]),(0,wt.hexZeroPad)((0,wt.hexlify)(n),32))};for(r.forEach(function(s,n){var i=t.inputs[n];if(!i.indexed){s!=null&&Et.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,s);return}s==null?a.push(null):i.baseType==="array"||i.baseType==="tuple"?Et.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,s):Array.isArray(s)?a.push(s.map(function(u){return c(i,u)})):a.push(c(i,s))});a.length&&a[a.length-1]===null;)a.pop();return a},e.prototype.encodeEventLog=function(t,r){var o=this;typeof t=="string"&&(t=this.getEvent(t));var a=[],c=[],s=[];return t.anonymous||a.push(this.getEventTopic(t)),r.length!==t.inputs.length&&Et.throwArgumentError("event arguments/values mismatch","values",r),t.inputs.forEach(function(n,i){var u=r[i];if(n.indexed)if(n.type==="string")a.push((0,Il.id)(u));else if(n.type==="bytes")a.push((0,ym.keccak256)(u));else{if(n.baseType==="tuple"||n.baseType==="array")throw new Error("not implemented");a.push(o._abiCoder.encode([n.type],[u]))}else c.push(n),s.push(u)}),{data:this._abiCoder.encode(c,s),topics:a}},e.prototype.decodeEventLog=function(t,r,o){if(typeof t=="string"&&(t=this.getEvent(t)),o!=null&&!t.anonymous){var a=this.getEventTopic(t);(!(0,wt.isHexString)(o[0],32)||o[0].toLowerCase()!==a)&&Et.throwError("fragment/topic mismatch",kl.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:a,value:o[0]}),o=o.slice(1)}var c=[],s=[],n=[];t.inputs.forEach(function(K,te){K.indexed?K.type==="string"||K.type==="bytes"||K.baseType==="tuple"||K.baseType==="array"?(c.push(Do.ParamType.fromObject({type:"bytes32",name:K.name})),n.push(!0)):(c.push(K),n.push(!1)):(s.push(K),n.push(!1))});var i=o!=null?this._abiCoder.decode(c,(0,wt.concat)(o)):null,u=this._abiCoder.decode(s,r,!0),l=[],x=0,N=0;t.inputs.forEach(function(K,te){if(K.indexed)if(i==null)l[te]=new zp({_isIndexed:!0,hash:null});else if(n[te])l[te]=new zp({_isIndexed:!0,hash:i[N++]});else try{l[te]=i[N++]}catch(ge){l[te]=ge}else try{l[te]=u[x++]}catch(ge){l[te]=ge}if(K.name&&l[K.name]==null){var ae=l[te];ae instanceof Error?Object.defineProperty(l,K.name,{enumerable:!0,get:function(){throw vm("property "+JSON.stringify(K.name),ae)}}):l[K.name]=ae}});for(var F=function(K){var te=l[K];te instanceof Error&&Object.defineProperty(l,K,{enumerable:!0,get:function(){throw vm("index "+K,te)}})},G=0;G<l.length;G++)F(G);return Object.freeze(l)},e.prototype.parseTransaction=function(t){var r=this.getFunction(t.data.substring(0,10).toLowerCase());return r?new mm({args:this._abiCoder.decode(r.inputs,"0x"+t.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:gm.BigNumber.from(t.value||"0")}):null},e.prototype.parseLog=function(t){var r=this.getEvent(t.topics[0]);return!r||r.anonymous?null:new bm({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,t.data,t.topics)})},e.prototype.parseError=function(t){var r=(0,wt.hexlify)(t),o=this.getError(r.substring(0,10).toLowerCase());return o?new xm({args:this._abiCoder.decode(o.inputs,"0x"+r.substring(10)),errorFragment:o,name:o.name,signature:o.format(),sighash:this.getSighash(o)}):null},e.isInterface=function(t){return!!(t&&t._isInterface)},e}();ir.Interface=iC});var qp=R(lt=>{"use strict";g();y();Object.defineProperty(lt,"__esModule",{value:!0});lt.TransactionDescription=lt.LogDescription=lt.checkResultErrors=lt.Indexed=lt.Interface=lt.defaultAbiCoder=lt.AbiCoder=lt.FormatTypes=lt.ParamType=lt.FunctionFragment=lt.Fragment=lt.EventFragment=lt.ErrorFragment=lt.ConstructorFragment=void 0;var Vn=Pl();Object.defineProperty(lt,"ConstructorFragment",{enumerable:!0,get:function(){return Vn.ConstructorFragment}});Object.defineProperty(lt,"ErrorFragment",{enumerable:!0,get:function(){return Vn.ErrorFragment}});Object.defineProperty(lt,"EventFragment",{enumerable:!0,get:function(){return Vn.EventFragment}});Object.defineProperty(lt,"FormatTypes",{enumerable:!0,get:function(){return Vn.FormatTypes}});Object.defineProperty(lt,"Fragment",{enumerable:!0,get:function(){return Vn.Fragment}});Object.defineProperty(lt,"FunctionFragment",{enumerable:!0,get:function(){return Vn.FunctionFragment}});Object.defineProperty(lt,"ParamType",{enumerable:!0,get:function(){return Vn.ParamType}});var wm=jp();Object.defineProperty(lt,"AbiCoder",{enumerable:!0,get:function(){return wm.AbiCoder}});Object.defineProperty(lt,"defaultAbiCoder",{enumerable:!0,get:function(){return wm.defaultAbiCoder}});var qi=Am();Object.defineProperty(lt,"checkResultErrors",{enumerable:!0,get:function(){return qi.checkResultErrors}});Object.defineProperty(lt,"Indexed",{enumerable:!0,get:function(){return qi.Indexed}});Object.defineProperty(lt,"Interface",{enumerable:!0,get:function(){return qi.Interface}});Object.defineProperty(lt,"LogDescription",{enumerable:!0,get:function(){return qi.LogDescription}});Object.defineProperty(lt,"TransactionDescription",{enumerable:!0,get:function(){return qi.TransactionDescription}})});var _m=R(Rl=>{"use strict";g();y();Object.defineProperty(Rl,"__esModule",{value:!0});Rl.version=void 0;Rl.version="abstract-provider/5.7.0"});var Ia=R(Vt=>{"use strict";g();y();var Nl=Vt&&Vt.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),sC=Vt&&Vt.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},cC=Vt&&Vt.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.Provider=Vt.TransactionOrderForkEvent=Vt.TransactionForkEvent=Vt.BlockForkEvent=Vt.ForkEvent=void 0;var uC=br(),Ml=gt(),Vp=yt(),lC=Ze(),dC=_m(),Vi=new lC.Logger(dC.version),Dl=function(e){Nl(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.isForkEvent=function(r){return!!(r&&r._isForkEvent)},t}(Vp.Description);Vt.ForkEvent=Dl;var fC=function(e){Nl(t,e);function t(r,o){var a=this;return(0,Ml.isHexString)(r,32)||Vi.throwArgumentError("invalid blockHash","blockHash",r),a=e.call(this,{_isForkEvent:!0,_isBlockForkEvent:!0,expiry:o||0,blockHash:r})||this,a}return t}(Dl);Vt.BlockForkEvent=fC;var pC=function(e){Nl(t,e);function t(r,o){var a=this;return(0,Ml.isHexString)(r,32)||Vi.throwArgumentError("invalid transaction hash","hash",r),a=e.call(this,{_isForkEvent:!0,_isTransactionForkEvent:!0,expiry:o||0,hash:r})||this,a}return t}(Dl);Vt.TransactionForkEvent=pC;var hC=function(e){Nl(t,e);function t(r,o,a){var c=this;return(0,Ml.isHexString)(r,32)||Vi.throwArgumentError("invalid transaction hash","beforeHash",r),(0,Ml.isHexString)(o,32)||Vi.throwArgumentError("invalid transaction hash","afterHash",o),c=e.call(this,{_isForkEvent:!0,_isTransactionOrderForkEvent:!0,expiry:a||0,beforeHash:r,afterHash:o})||this,c}return t}(Dl);Vt.TransactionOrderForkEvent=hC;var gC=function(){function e(){var t=this.constructor;Vi.checkAbstract(t,e),(0,Vp.defineReadOnly)(this,"_isProvider",!0)}return e.prototype.getFeeData=function(){return sC(this,void 0,void 0,function(){var t,r,o,a,c,s;return cC(this,function(n){switch(n.label){case 0:return[4,(0,Vp.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(function(i){return null})})];case 1:return t=n.sent(),r=t.block,o=t.gasPrice,a=null,c=null,s=null,r&&r.baseFeePerGas&&(a=r.baseFeePerGas,s=uC.BigNumber.from("1500000000"),c=r.baseFeePerGas.mul(2).add(s)),[2,{lastBaseFeePerGas:a,maxFeePerGas:c,maxPriorityFeePerGas:s,gasPrice:o}]}})})},e.prototype.addListener=function(t,r){return this.on(t,r)},e.prototype.removeListener=function(t,r){return this.off(t,r)},e.isProvider=function(t){return!!(t&&t._isProvider)},e}();Vt.Provider=gC});var Cm=R(Wl=>{"use strict";g();y();Object.defineProperty(Wl,"__esModule",{value:!0});Wl.version=void 0;Wl.version="abstract-signer/5.7.0"});var Gi=R(jr=>{"use strict";g();y();var yC=jr&&jr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),to=jr&&jr.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},ro=jr&&jr.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(jr,"__esModule",{value:!0});jr.VoidSigner=jr.Signer=void 0;var rn=yt(),Wo=Ze(),vC=Cm(),Lr=new Wo.Logger(vC.version),bC=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],mC=[Wo.Logger.errors.INSUFFICIENT_FUNDS,Wo.Logger.errors.NONCE_EXPIRED,Wo.Logger.errors.REPLACEMENT_UNDERPRICED],Bm=function(){function e(){var t=this.constructor;Lr.checkAbstract(t,e),(0,rn.defineReadOnly)(this,"_isSigner",!0)}return e.prototype.getBalance=function(t){return to(this,void 0,void 0,function(){return ro(this,function(r){switch(r.label){case 0:return this._checkProvider("getBalance"),[4,this.provider.getBalance(this.getAddress(),t)];case 1:return[2,r.sent()]}})})},e.prototype.getTransactionCount=function(t){return to(this,void 0,void 0,function(){return ro(this,function(r){switch(r.label){case 0:return this._checkProvider("getTransactionCount"),[4,this.provider.getTransactionCount(this.getAddress(),t)];case 1:return[2,r.sent()]}})})},e.prototype.estimateGas=function(t){return to(this,void 0,void 0,function(){var r;return ro(this,function(o){switch(o.label){case 0:return this._checkProvider("estimateGas"),[4,(0,rn.resolveProperties)(this.checkTransaction(t))];case 1:return r=o.sent(),[4,this.provider.estimateGas(r)];case 2:return[2,o.sent()]}})})},e.prototype.call=function(t,r){return to(this,void 0,void 0,function(){var o;return ro(this,function(a){switch(a.label){case 0:return this._checkProvider("call"),[4,(0,rn.resolveProperties)(this.checkTransaction(t))];case 1:return o=a.sent(),[4,this.provider.call(o,r)];case 2:return[2,a.sent()]}})})},e.prototype.sendTransaction=function(t){return to(this,void 0,void 0,function(){var r,o;return ro(this,function(a){switch(a.label){case 0:return this._checkProvider("sendTransaction"),[4,this.populateTransaction(t)];case 1:return r=a.sent(),[4,this.signTransaction(r)];case 2:return o=a.sent(),[4,this.provider.sendTransaction(o)];case 3:return[2,a.sent()]}})})},e.prototype.getChainId=function(){return to(this,void 0,void 0,function(){var t;return ro(this,function(r){switch(r.label){case 0:return this._checkProvider("getChainId"),[4,this.provider.getNetwork()];case 1:return t=r.sent(),[2,t.chainId]}})})},e.prototype.getGasPrice=function(){return to(this,void 0,void 0,function(){return ro(this,function(t){switch(t.label){case 0:return this._checkProvider("getGasPrice"),[4,this.provider.getGasPrice()];case 1:return[2,t.sent()]}})})},e.prototype.getFeeData=function(){return to(this,void 0,void 0,function(){return ro(this,function(t){switch(t.label){case 0:return this._checkProvider("getFeeData"),[4,this.provider.getFeeData()];case 1:return[2,t.sent()]}})})},e.prototype.resolveName=function(t){return to(this,void 0,void 0,function(){return ro(this,function(r){switch(r.label){case 0:return this._checkProvider("resolveName"),[4,this.provider.resolveName(t)];case 1:return[2,r.sent()]}})})},e.prototype.checkTransaction=function(t){for(var r in t)bC.indexOf(r)===-1&&Lr.throwArgumentError("invalid transaction key: "+r,"transaction",t);var o=(0,rn.shallowCopy)(t);return o.from==null?o.from=this.getAddress():o.from=Promise.all([Promise.resolve(o.from),this.getAddress()]).then(function(a){return a[0].toLowerCase()!==a[1].toLowerCase()&&Lr.throwArgumentError("from address mismatch","transaction",t),a[0]}),o},e.prototype.populateTransaction=function(t){return to(this,void 0,void 0,function(){var r,o,a,c,s=this;return ro(this,function(n){switch(n.label){case 0:return[4,(0,rn.resolveProperties)(this.checkTransaction(t))];case 1:return r=n.sent(),r.to!=null&&(r.to=Promise.resolve(r.to).then(function(i){return to(s,void 0,void 0,function(){var u;return ro(this,function(l){switch(l.label){case 0:return i==null?[2,null]:[4,this.resolveName(i)];case 1:return u=l.sent(),u==null&&Lr.throwArgumentError("provided ENS name resolves to null","tx.to",i),[2,u]}})})}),r.to.catch(function(i){})),o=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null,r.gasPrice!=null&&(r.type===2||o)?Lr.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",t):(r.type===0||r.type===1)&&o&&Lr.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",t),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null?(r.type=2,[3,5]):[3,2];case 2:return r.type===0||r.type===1?(r.gasPrice==null&&(r.gasPrice=this.getGasPrice()),[3,5]):[3,3];case 3:return[4,this.getFeeData()];case 4:a=n.sent(),r.type==null?a.maxFeePerGas!=null&&a.maxPriorityFeePerGas!=null?(r.type=2,r.gasPrice!=null?(c=r.gasPrice,delete r.gasPrice,r.maxFeePerGas=c,r.maxPriorityFeePerGas=c):(r.maxFeePerGas==null&&(r.maxFeePerGas=a.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=a.maxPriorityFeePerGas))):a.gasPrice!=null?(o&&Lr.throwError("network does not support EIP-1559",Wo.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=a.gasPrice),r.type=0):Lr.throwError("failed to get consistent fee data",Wo.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"}):r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=a.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=a.maxPriorityFeePerGas)),n.label=5;case 5:return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(function(i){if(mC.indexOf(i.code)>=0)throw i;return Lr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Wo.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(function(i){return i[1]!==0&&i[0]!==i[1]&&Lr.throwArgumentError("chainId address mismatch","transaction",t),i[0]}),[4,(0,rn.resolveProperties)(r)];case 6:return[2,n.sent()]}})})},e.prototype._checkProvider=function(t){this.provider||Lr.throwError("missing provider",Wo.Logger.errors.UNSUPPORTED_OPERATION,{operation:t||"_checkProvider"})},e.isSigner=function(t){return!!(t&&t._isSigner)},e}();jr.Signer=Bm;var xC=function(e){yC(t,e);function t(r,o){var a=e.call(this)||this;return(0,rn.defineReadOnly)(a,"address",r),(0,rn.defineReadOnly)(a,"provider",o||null),a}return t.prototype.getAddress=function(){return Promise.resolve(this.address)},t.prototype._fail=function(r,o){return Promise.resolve().then(function(){Lr.throwError(r,Wo.Logger.errors.UNSUPPORTED_OPERATION,{operation:o})})},t.prototype.signMessage=function(r){return this._fail("VoidSigner cannot sign messages","signMessage")},t.prototype.signTransaction=function(r){return this._fail("VoidSigner cannot sign transactions","signTransaction")},t.prototype._signTypedData=function(r,o,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")},t.prototype.connect=function(r){return new t(this.address,r)},t}(Bm);jr.VoidSigner=xC});var Em=R(Ul=>{"use strict";g();y();Object.defineProperty(Ul,"__esModule",{value:!0});Ul.version=void 0;Ul.version="contracts/5.7.0"});var Rm=R(sr=>{"use strict";g();y();var zl=sr&&sr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),nn=sr&&sr.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},an=sr&&sr.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},AC=sr&&sr.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var o=0,a=t.length,c;o<a;o++)(c||!(o in t))&&(c||(c=Array.prototype.slice.call(t,0,o)),c[o]=t[o]);return e.concat(c||Array.prototype.slice.call(t))};Object.defineProperty(sr,"__esModule",{value:!0});sr.ContractFactory=sr.Contract=sr.BaseContract=void 0;var Ll=qp(),wC=Ia(),Gp=Gi(),$i=Ro(),on=br(),Gn=gt(),Fe=yt(),_C=Qo(),Qt=Ze(),CC=Em(),pt=new Qt.Logger(CC.version),BC={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function jl(e,t){return nn(this,void 0,void 0,function(){var r,o;return an(this,function(a){switch(a.label){case 0:return[4,t];case 1:r=a.sent(),typeof r!="string"&&pt.throwArgumentError("invalid address or ENS name","name",r);try{return[2,(0,$i.getAddress)(r)]}catch{}return e||pt.throwError("a provider or signer is needed to resolve ENS names",Qt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"}),[4,e.resolveName(r)];case 2:return o=a.sent(),o==null&&pt.throwArgumentError("resolver or addr is not configured for ENS name","name",r),[2,o]}})})}function Hi(e,t,r){return nn(this,void 0,void 0,function(){return an(this,function(o){switch(o.label){case 0:return Array.isArray(r)?[4,Promise.all(r.map(function(a,c){return Hi(e,Array.isArray(t)?t[c]:t[a.name],a)}))]:[3,2];case 1:return[2,o.sent()];case 2:return r.type!=="address"?[3,4]:[4,jl(e,t)];case 3:return[2,o.sent()];case 4:return r.type!=="tuple"?[3,6]:[4,Hi(e,t,r.components)];case 5:return[2,o.sent()];case 6:return r.baseType!=="array"?[3,8]:Array.isArray(t)?[4,Promise.all(t.map(function(a){return Hi(e,a,r.arrayChildren)}))]:[2,Promise.reject(pt.makeError("invalid value for array",Qt.Logger.errors.INVALID_ARGUMENT,{argument:"value",value:t}))];case 7:return[2,o.sent()];case 8:return[2,t]}})})}function ql(e,t,r){return nn(this,void 0,void 0,function(){var o,a,c,s,n,i,u,l,x,N,F=this;return an(this,function(G){switch(G.label){case 0:return o={},r.length===t.inputs.length+1&&typeof r[r.length-1]=="object"&&(o=(0,Fe.shallowCopy)(r.pop())),pt.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?o.from?o.from=(0,Fe.resolveProperties)({override:jl(e.signer,o.from),signer:e.signer.getAddress()}).then(function(K){return nn(F,void 0,void 0,function(){return an(this,function(te){return(0,$i.getAddress)(K.signer)!==K.override&&pt.throwError("Contract with a Signer cannot override from",Qt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),[2,K.override]})})}):o.from=e.signer.getAddress():o.from&&(o.from=jl(e.provider,o.from)),[4,(0,Fe.resolveProperties)({args:Hi(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:(0,Fe.resolveProperties)(o)||{}})];case 1:if(a=G.sent(),c=e.interface.encodeFunctionData(t,a.args),s={data:c,to:a.address},n=a.overrides,n.nonce!=null&&(s.nonce=on.BigNumber.from(n.nonce).toNumber()),n.gasLimit!=null&&(s.gasLimit=on.BigNumber.from(n.gasLimit)),n.gasPrice!=null&&(s.gasPrice=on.BigNumber.from(n.gasPrice)),n.maxFeePerGas!=null&&(s.maxFeePerGas=on.BigNumber.from(n.maxFeePerGas)),n.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=on.BigNumber.from(n.maxPriorityFeePerGas)),n.from!=null&&(s.from=n.from),n.type!=null&&(s.type=n.type),n.accessList!=null&&(s.accessList=(0,_C.accessListify)(n.accessList)),s.gasLimit==null&&t.gas!=null){for(i=21e3,u=(0,Gn.arrayify)(c),l=0;l<u.length;l++)i+=4,u[l]&&(i+=64);s.gasLimit=on.BigNumber.from(t.gas).add(i)}return n.value&&(x=on.BigNumber.from(n.value),!x.isZero()&&!t.payable&&pt.throwError("non-payable method cannot override value",Qt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:o.value}),s.value=x),n.customData&&(s.customData=(0,Fe.shallowCopy)(n.customData)),n.ccipReadEnabled&&(s.ccipReadEnabled=!!n.ccipReadEnabled),delete o.nonce,delete o.gasLimit,delete o.gasPrice,delete o.from,delete o.value,delete o.type,delete o.accessList,delete o.maxFeePerGas,delete o.maxPriorityFeePerGas,delete o.customData,delete o.ccipReadEnabled,N=Object.keys(o).filter(function(K){return o[K]!=null}),N.length&&pt.throwError("cannot override "+N.map(function(K){return JSON.stringify(K)}).join(","),Qt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:N}),[2,s]}})})}function EC(e,t){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return ql(e,t,r)}}function PC(e,t){var r=e.signer||e.provider;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return nn(this,void 0,void 0,function(){var c;return an(this,function(s){switch(s.label){case 0:return r||pt.throwError("estimate require a provider or signer",Qt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"}),[4,ql(e,t,o)];case 1:return c=s.sent(),[4,r.estimateGas(c)];case 2:return[2,s.sent()]}})})}}function Om(e,t){var r=t.wait.bind(t);t.wait=function(o){return r(o).then(function(a){return a.events=a.logs.map(function(c){var s=(0,Fe.deepCopy)(c),n=null;try{n=e.interface.parseLog(c)}catch{}return n&&(s.args=n.args,s.decode=function(i,u){return e.interface.decodeEventLog(n.eventFragment,i,u)},s.event=n.name,s.eventSignature=n.signature),s.removeListener=function(){return e.provider},s.getBlock=function(){return e.provider.getBlock(a.blockHash)},s.getTransaction=function(){return e.provider.getTransaction(a.transactionHash)},s.getTransactionReceipt=function(){return Promise.resolve(a)},s}),a})}}function Im(e,t,r){var o=e.signer||e.provider;return function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return nn(this,void 0,void 0,function(){var s,n,i,u,l;return an(this,function(x){switch(x.label){case 0:return s=void 0,a.length===t.inputs.length+1&&typeof a[a.length-1]=="object"?(n=(0,Fe.shallowCopy)(a.pop()),n.blockTag==null?[3,2]:[4,n.blockTag]):[3,3];case 1:s=x.sent(),x.label=2;case 2:delete n.blockTag,a.push(n),x.label=3;case 3:return e.deployTransaction==null?[3,5]:[4,e._deployed(s)];case 4:x.sent(),x.label=5;case 5:return[4,ql(e,t,a)];case 6:return i=x.sent(),[4,o.call(i,s)];case 7:u=x.sent();try{return l=e.interface.decodeFunctionResult(t,u),r&&t.outputs.length===1&&(l=l[0]),[2,l]}catch(N){throw N.code===Qt.Logger.errors.CALL_EXCEPTION&&(N.address=e.address,N.args=a,N.transaction=i),N}return[2]}})})}}function TC(e,t){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return nn(this,void 0,void 0,function(){var a,c;return an(this,function(s){switch(s.label){case 0:return e.signer||pt.throwError("sending a transaction requires a signer",Qt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),e.deployTransaction==null?[3,2]:[4,e._deployed()];case 1:s.sent(),s.label=2;case 2:return[4,ql(e,t,r)];case 3:return a=s.sent(),[4,e.signer.sendTransaction(a)];case 4:return c=s.sent(),Om(e,c),[2,c]}})})}}function Pm(e,t,r){return t.constant?Im(e,t,r):TC(e,t)}function km(e){return e.address&&(e.topics==null||e.topics.length===0)?"*":(e.address||"*")+"@"+(e.topics?e.topics.map(function(t){return Array.isArray(t)?t.join("|"):t}).join(":"):"")}var Ki=function(){function e(t,r){(0,Fe.defineReadOnly)(this,"tag",t),(0,Fe.defineReadOnly)(this,"filter",r),this._listeners=[]}return e.prototype.addListener=function(t,r){this._listeners.push({listener:t,once:r})},e.prototype.removeListener=function(t){var r=!1;this._listeners=this._listeners.filter(function(o){return r||o.listener!==t?!0:(r=!0,!1)})},e.prototype.removeAllListeners=function(){this._listeners=[]},e.prototype.listeners=function(){return this._listeners.map(function(t){return t.listener})},e.prototype.listenerCount=function(){return this._listeners.length},e.prototype.run=function(t){var r=this,o=this.listenerCount();return this._listeners=this._listeners.filter(function(a){var c=t.slice();return setTimeout(function(){a.listener.apply(r,c)},0),!a.once}),o},e.prototype.prepareEvent=function(t){},e.prototype.getEmit=function(t){return[t]},e}(),SC=function(e){zl(t,e);function t(){return e.call(this,"error",null)||this}return t}(Ki),Tm=function(e){zl(t,e);function t(r,o,a,c){var s=this,n={address:r},i=o.getEventTopic(a);return c?(i!==c[0]&&pt.throwArgumentError("topic mismatch","topics",c),n.topics=c.slice()):n.topics=[i],s=e.call(this,km(n),n)||this,(0,Fe.defineReadOnly)(s,"address",r),(0,Fe.defineReadOnly)(s,"interface",o),(0,Fe.defineReadOnly)(s,"fragment",a),s}return t.prototype.prepareEvent=function(r){var o=this;e.prototype.prepareEvent.call(this,r),r.event=this.fragment.name,r.eventSignature=this.fragment.format(),r.decode=function(a,c){return o.interface.decodeEventLog(o.fragment,a,c)};try{r.args=this.interface.decodeEventLog(this.fragment,r.data,r.topics)}catch(a){r.args=null,r.decodeError=a}},t.prototype.getEmit=function(r){var o=(0,Ll.checkResultErrors)(r.args);if(o.length)throw o[0].error;var a=(r.args||[]).slice();return a.push(r),a},t}(Ki),Sm=function(e){zl(t,e);function t(r,o){var a=e.call(this,"*",{address:r})||this;return(0,Fe.defineReadOnly)(a,"address",r),(0,Fe.defineReadOnly)(a,"interface",o),a}return t.prototype.prepareEvent=function(r){var o=this;e.prototype.prepareEvent.call(this,r);try{var a=this.interface.parseLog(r);r.event=a.name,r.eventSignature=a.signature,r.decode=function(c,s){return o.interface.decodeEventLog(a.eventFragment,c,s)},r.args=a.args}catch{}},t}(Ki),Fm=function(){function e(t,r,o){var a=this.constructor,c=this;(0,Fe.defineReadOnly)(this,"interface",(0,Fe.getStatic)(a,"getInterface")(r)),o==null?((0,Fe.defineReadOnly)(this,"provider",null),(0,Fe.defineReadOnly)(this,"signer",null)):Gp.Signer.isSigner(o)?((0,Fe.defineReadOnly)(this,"provider",o.provider||null),(0,Fe.defineReadOnly)(this,"signer",o)):wC.Provider.isProvider(o)?((0,Fe.defineReadOnly)(this,"provider",o),(0,Fe.defineReadOnly)(this,"signer",null)):pt.throwArgumentError("invalid signer or provider","signerOrProvider",o),(0,Fe.defineReadOnly)(this,"callStatic",{}),(0,Fe.defineReadOnly)(this,"estimateGas",{}),(0,Fe.defineReadOnly)(this,"functions",{}),(0,Fe.defineReadOnly)(this,"populateTransaction",{}),(0,Fe.defineReadOnly)(this,"filters",{});{var s={};Object.keys(this.interface.events).forEach(function(u){var l=c.interface.events[u];(0,Fe.defineReadOnly)(c.filters,u,function(){for(var x=[],N=0;N<arguments.length;N++)x[N]=arguments[N];return{address:c.address,topics:c.interface.encodeFilterTopics(l,x)}}),s[l.name]||(s[l.name]=[]),s[l.name].push(u)}),Object.keys(s).forEach(function(u){var l=s[u];l.length===1?(0,Fe.defineReadOnly)(c.filters,u,c.filters[l[0]]):pt.warn("Duplicate definition of "+u+" ("+l.join(", ")+")")})}if((0,Fe.defineReadOnly)(this,"_runningEvents",{}),(0,Fe.defineReadOnly)(this,"_wrappedEmits",{}),t==null&&pt.throwArgumentError("invalid contract address or ENS name","addressOrName",t),(0,Fe.defineReadOnly)(this,"address",t),this.provider)(0,Fe.defineReadOnly)(this,"resolvedAddress",jl(this.provider,t));else try{(0,Fe.defineReadOnly)(this,"resolvedAddress",Promise.resolve((0,$i.getAddress)(t)))}catch{pt.throwError("provider is required to use ENS name as contract address",Qt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(function(u){});var n={},i={};Object.keys(this.interface.functions).forEach(function(u){var l=c.interface.functions[u];if(i[u]){pt.warn("Duplicate ABI entry for "+JSON.stringify(u));return}i[u]=!0;{var x=l.name;n["%"+x]||(n["%"+x]=[]),n["%"+x].push(u)}c[u]==null&&(0,Fe.defineReadOnly)(c,u,Pm(c,l,!0)),c.functions[u]==null&&(0,Fe.defineReadOnly)(c.functions,u,Pm(c,l,!1)),c.callStatic[u]==null&&(0,Fe.defineReadOnly)(c.callStatic,u,Im(c,l,!0)),c.populateTransaction[u]==null&&(0,Fe.defineReadOnly)(c.populateTransaction,u,EC(c,l)),c.estimateGas[u]==null&&(0,Fe.defineReadOnly)(c.estimateGas,u,PC(c,l))}),Object.keys(n).forEach(function(u){var l=n[u];if(!(l.length>1)){u=u.substring(1);var x=l[0];try{c[u]==null&&(0,Fe.defineReadOnly)(c,u,c[x])}catch{}c.functions[u]==null&&(0,Fe.defineReadOnly)(c.functions,u,c.functions[x]),c.callStatic[u]==null&&(0,Fe.defineReadOnly)(c.callStatic,u,c.callStatic[x]),c.populateTransaction[u]==null&&(0,Fe.defineReadOnly)(c.populateTransaction,u,c.populateTransaction[x]),c.estimateGas[u]==null&&(0,Fe.defineReadOnly)(c.estimateGas,u,c.estimateGas[x])}})}return e.getContractAddress=function(t){return(0,$i.getContractAddress)(t)},e.getInterface=function(t){return Ll.Interface.isInterface(t)?t:new Ll.Interface(t)},e.prototype.deployed=function(){return this._deployed()},e.prototype._deployed=function(t){var r=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(function(){return r}):this._deployedPromise=this.provider.getCode(this.address,t).then(function(o){return o==="0x"&&pt.throwError("contract not deployed",Qt.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:r.address,operation:"getDeployed"}),r})),this._deployedPromise},e.prototype.fallback=function(t){var r=this;this.signer||pt.throwError("sending a transactions require a signer",Qt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var o=(0,Fe.shallowCopy)(t||{});return["from","to"].forEach(function(a){o[a]!=null&&pt.throwError("cannot override "+a,Qt.Logger.errors.UNSUPPORTED_OPERATION,{operation:a})}),o.to=this.resolvedAddress,this.deployed().then(function(){return r.signer.sendTransaction(o)})},e.prototype.connect=function(t){typeof t=="string"&&(t=new Gp.VoidSigner(t,this.provider));var r=new this.constructor(this.address,this.interface,t);return this.deployTransaction&&(0,Fe.defineReadOnly)(r,"deployTransaction",this.deployTransaction),r},e.prototype.attach=function(t){return new this.constructor(t,this.interface,this.signer||this.provider)},e.isIndexed=function(t){return Ll.Indexed.isIndexed(t)},e.prototype._normalizeRunningEvent=function(t){return this._runningEvents[t.tag]?this._runningEvents[t.tag]:t},e.prototype._getRunningEvent=function(t){if(typeof t=="string"){if(t==="error")return this._normalizeRunningEvent(new SC);if(t==="event")return this._normalizeRunningEvent(new Ki("event",null));if(t==="*")return this._normalizeRunningEvent(new Sm(this.address,this.interface));var r=this.interface.getEvent(t);return this._normalizeRunningEvent(new Tm(this.address,this.interface,r))}if(t.topics&&t.topics.length>0){try{var o=t.topics[0];if(typeof o!="string")throw new Error("invalid topic");var r=this.interface.getEvent(o);return this._normalizeRunningEvent(new Tm(this.address,this.interface,r,t.topics))}catch{}var a={address:this.address,topics:t.topics};return this._normalizeRunningEvent(new Ki(km(a),a))}return this._normalizeRunningEvent(new Sm(this.address,this.interface))},e.prototype._checkRunningEvents=function(t){if(t.listenerCount()===0){delete this._runningEvents[t.tag];var r=this._wrappedEmits[t.tag];r&&t.filter&&(this.provider.off(t.filter,r),delete this._wrappedEmits[t.tag])}},e.prototype._wrapEvent=function(t,r,o){var a=this,c=(0,Fe.deepCopy)(r);return c.removeListener=function(){!o||(t.removeListener(o),a._checkRunningEvents(t))},c.getBlock=function(){return a.provider.getBlock(r.blockHash)},c.getTransaction=function(){return a.provider.getTransaction(r.transactionHash)},c.getTransactionReceipt=function(){return a.provider.getTransactionReceipt(r.transactionHash)},t.prepareEvent(c),c},e.prototype._addEventListener=function(t,r,o){var a=this;if(this.provider||pt.throwError("events require a provider or a signer with a provider",Qt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),t.addListener(r,o),this._runningEvents[t.tag]=t,!this._wrappedEmits[t.tag]){var c=function(s){var n=a._wrapEvent(t,s,r);if(n.decodeError==null)try{var i=t.getEmit(n);a.emit.apply(a,AC([t.filter],i,!1))}catch(u){n.decodeError=u.error}t.filter!=null&&a.emit("event",n),n.decodeError!=null&&a.emit("error",n.decodeError,n)};this._wrappedEmits[t.tag]=c,t.filter!=null&&this.provider.on(t.filter,c)}},e.prototype.queryFilter=function(t,r,o){var a=this,c=this._getRunningEvent(t),s=(0,Fe.shallowCopy)(c.filter);return typeof r=="string"&&(0,Gn.isHexString)(r,32)?(o!=null&&pt.throwArgumentError("cannot specify toBlock with blockhash","toBlock",o),s.blockHash=r):(s.fromBlock=r??0,s.toBlock=o??"latest"),this.provider.getLogs(s).then(function(n){return n.map(function(i){return a._wrapEvent(c,i,null)})})},e.prototype.on=function(t,r){return this._addEventListener(this._getRunningEvent(t),r,!1),this},e.prototype.once=function(t,r){return this._addEventListener(this._getRunningEvent(t),r,!0),this},e.prototype.emit=function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(!this.provider)return!1;var a=this._getRunningEvent(t),c=a.run(r)>0;return this._checkRunningEvents(a),c},e.prototype.listenerCount=function(t){var r=this;return this.provider?t==null?Object.keys(this._runningEvents).reduce(function(o,a){return o+r._runningEvents[a].listenerCount()},0):this._getRunningEvent(t).listenerCount():0},e.prototype.listeners=function(t){if(!this.provider)return[];if(t==null){var r=[];for(var o in this._runningEvents)this._runningEvents[o].listeners().forEach(function(a){r.push(a)});return r}return this._getRunningEvent(t).listeners()},e.prototype.removeAllListeners=function(t){if(!this.provider)return this;if(t==null){for(var r in this._runningEvents){var o=this._runningEvents[r];o.removeAllListeners(),this._checkRunningEvents(o)}return this}var a=this._getRunningEvent(t);return a.removeAllListeners(),this._checkRunningEvents(a),this},e.prototype.off=function(t,r){if(!this.provider)return this;var o=this._getRunningEvent(t);return o.removeListener(r),this._checkRunningEvents(o),this},e.prototype.removeListener=function(t,r){return this.off(t,r)},e}();sr.BaseContract=Fm;var Hp=function(e){zl(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Fm);sr.Contract=Hp;var OC=function(){function e(t,r,o){var a=this.constructor,c=null;typeof r=="string"?c=r:(0,Gn.isBytes)(r)?c=(0,Gn.hexlify)(r):r&&typeof r.object=="string"?c=r.object:c="!",c.substring(0,2)!=="0x"&&(c="0x"+c),(!(0,Gn.isHexString)(c)||c.length%2)&&pt.throwArgumentError("invalid bytecode","bytecode",r),o&&!Gp.Signer.isSigner(o)&&pt.throwArgumentError("invalid signer","signer",o),(0,Fe.defineReadOnly)(this,"bytecode",c),(0,Fe.defineReadOnly)(this,"interface",(0,Fe.getStatic)(a,"getInterface")(t)),(0,Fe.defineReadOnly)(this,"signer",o||null)}return e.prototype.getDeployTransaction=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o={};if(t.length===this.interface.deploy.inputs.length+1&&typeof t[t.length-1]=="object"){o=(0,Fe.shallowCopy)(t.pop());for(var a in o)if(!BC[a])throw new Error("unknown transaction override "+a)}if(["data","from","to"].forEach(function(s){o[s]!=null&&pt.throwError("cannot override "+s,Qt.Logger.errors.UNSUPPORTED_OPERATION,{operation:s})}),o.value){var c=on.BigNumber.from(o.value);!c.isZero()&&!this.interface.deploy.payable&&pt.throwError("non-payable constructor cannot override value",Qt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:o.value})}return pt.checkArgumentCount(t.length,this.interface.deploy.inputs.length," in Contract constructor"),o.data=(0,Gn.hexlify)((0,Gn.concat)([this.bytecode,this.interface.encodeDeploy(t)])),o},e.prototype.deploy=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return nn(this,void 0,void 0,function(){var o,a,c,s,n,i;return an(this,function(u){switch(u.label){case 0:return o={},t.length===this.interface.deploy.inputs.length+1&&(o=t.pop()),pt.checkArgumentCount(t.length,this.interface.deploy.inputs.length," in Contract constructor"),[4,Hi(this.signer,t,this.interface.deploy.inputs)];case 1:return a=u.sent(),a.push(o),c=this.getDeployTransaction.apply(this,a),[4,this.signer.sendTransaction(c)];case 2:return s=u.sent(),n=(0,Fe.getStatic)(this.constructor,"getContractAddress")(s),i=(0,Fe.getStatic)(this.constructor,"getContract")(n,this.interface,this.signer),Om(i,s),(0,Fe.defineReadOnly)(i,"deployTransaction",s),[2,i]}})})},e.prototype.attach=function(t){return this.constructor.getContract(t,this.interface,this.signer)},e.prototype.connect=function(t){return new this.constructor(this.interface,this.bytecode,t)},e.fromSolidity=function(t,r){t==null&&pt.throwError("missing compiler output",Qt.Logger.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof t=="string"&&(t=JSON.parse(t));var o=t.abi,a=null;return t.bytecode?a=t.bytecode:t.evm&&t.evm.bytecode&&(a=t.evm.bytecode),new this(o,a,r)},e.getInterface=function(t){return Hp.getInterface(t)},e.getContractAddress=function(t){return(0,$i.getContractAddress)(t)},e.getContract=function(t,r,o){return new Hp(t,r,o)},e}();sr.ContractFactory=OC});var Gl=R(sn=>{"use strict";g();y();Object.defineProperty(sn,"__esModule",{value:!0});sn.Base58=sn.Base32=sn.BaseX=void 0;var Mm=gt(),Vl=yt(),$p=function(){function e(t){(0,Vl.defineReadOnly)(this,"alphabet",t),(0,Vl.defineReadOnly)(this,"base",t.length),(0,Vl.defineReadOnly)(this,"_alphabetMap",{}),(0,Vl.defineReadOnly)(this,"_leader",t.charAt(0));for(var r=0;r<t.length;r++)this._alphabetMap[t.charAt(r)]=r}return e.prototype.encode=function(t){var r=(0,Mm.arrayify)(t);if(r.length===0)return"";for(var o=[0],a=0;a<r.length;++a){for(var c=r[a],s=0;s<o.length;++s)c+=o[s]<<8,o[s]=c%this.base,c=c/this.base|0;for(;c>0;)o.push(c%this.base),c=c/this.base|0}for(var n="",i=0;r[i]===0&&i<r.length-1;++i)n+=this._leader;for(var u=o.length-1;u>=0;--u)n+=this.alphabet[o[u]];return n},e.prototype.decode=function(t){if(typeof t!="string")throw new TypeError("Expected String");var r=[];if(t.length===0)return new Uint8Array(r);r.push(0);for(var o=0;o<t.length;o++){var a=this._alphabetMap[t[o]];if(a===void 0)throw new Error("Non-base"+this.base+" character");for(var c=a,s=0;s<r.length;++s)c+=r[s]*this.base,r[s]=c&255,c>>=8;for(;c>0;)r.push(c&255),c>>=8}for(var n=0;t[n]===this._leader&&n<t.length-1;++n)r.push(0);return(0,Mm.arrayify)(new Uint8Array(r.reverse()))},e}();sn.BaseX=$p;var IC=new $p("abcdefghijklmnopqrstuvwxyz234567");sn.Base32=IC;var kC=new $p("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");sn.Base58=kC});var Kp=R(Zi=>{"use strict";g();y();Object.defineProperty(Zi,"__esModule",{value:!0});Zi.SupportedAlgorithm=void 0;var FC;(function(e){e.sha256="sha256",e.sha512="sha512"})(FC=Zi.SupportedAlgorithm||(Zi.SupportedAlgorithm={}))});var Nm=R(Hl=>{"use strict";g();y();Object.defineProperty(Hl,"__esModule",{value:!0});Hl.version=void 0;Hl.version="sha2/5.7.0"});var Wm=R(zr=>{"use strict";g();y();var RC=zr&&zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zr,"__esModule",{value:!0});zr.computeHmac=zr.sha512=zr.sha256=zr.ripemd160=void 0;var Ji=RC(Pp()),Yi=gt(),MC=Kp(),Dm=Ze(),NC=Nm(),DC=new Dm.Logger(NC.version);function WC(e){return"0x"+Ji.default.ripemd160().update((0,Yi.arrayify)(e)).digest("hex")}zr.ripemd160=WC;function UC(e){return"0x"+Ji.default.sha256().update((0,Yi.arrayify)(e)).digest("hex")}zr.sha256=UC;function LC(e){return"0x"+Ji.default.sha512().update((0,Yi.arrayify)(e)).digest("hex")}zr.sha512=LC;function jC(e,t,r){return MC.SupportedAlgorithm[e]||DC.throwError("unsupported algorithm "+e,Dm.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+Ji.default.hmac(Ji.default[e],(0,Yi.arrayify)(t)).update((0,Yi.arrayify)(r)).digest("hex")}zr.computeHmac=jC});var Hn=R(qr=>{"use strict";g();y();Object.defineProperty(qr,"__esModule",{value:!0});qr.SupportedAlgorithm=qr.sha512=qr.sha256=qr.ripemd160=qr.computeHmac=void 0;var $l=Wm();Object.defineProperty(qr,"computeHmac",{enumerable:!0,get:function(){return $l.computeHmac}});Object.defineProperty(qr,"ripemd160",{enumerable:!0,get:function(){return $l.ripemd160}});Object.defineProperty(qr,"sha256",{enumerable:!0,get:function(){return $l.sha256}});Object.defineProperty(qr,"sha512",{enumerable:!0,get:function(){return $l.sha512}});var zC=Kp();Object.defineProperty(qr,"SupportedAlgorithm",{enumerable:!0,get:function(){return zC.SupportedAlgorithm}})});var Lm=R(Kl=>{"use strict";g();y();Object.defineProperty(Kl,"__esModule",{value:!0});Kl.pbkdf2=void 0;var ka=gt(),Um=Hn();function qC(e,t,r,o,a){e=(0,ka.arrayify)(e),t=(0,ka.arrayify)(t);var c,s=1,n=new Uint8Array(o),i=new Uint8Array(t.length+4);i.set(t);for(var u,l,x=1;x<=s;x++){i[t.length]=x>>24&255,i[t.length+1]=x>>16&255,i[t.length+2]=x>>8&255,i[t.length+3]=x&255;var N=(0,ka.arrayify)((0,Um.computeHmac)(a,e,i));c||(c=N.length,l=new Uint8Array(c),s=Math.ceil(o/c),u=o-(s-1)*c),l.set(N);for(var F=1;F<r;F++){N=(0,ka.arrayify)((0,Um.computeHmac)(a,e,N));for(var G=0;G<c;G++)l[G]^=N[G]}var K=(x-1)*c,te=x===s?u:c;n.set((0,ka.arrayify)(l).slice(0,te),K)}return(0,ka.hexlify)(n)}Kl.pbkdf2=qC});var Jl=R(Zl=>{"use strict";g();y();Object.defineProperty(Zl,"__esModule",{value:!0});Zl.pbkdf2=void 0;var VC=Lm();Object.defineProperty(Zl,"pbkdf2",{enumerable:!0,get:function(){return VC.pbkdf2}})});var jm=R(Yl=>{"use strict";g();y();Object.defineProperty(Yl,"__esModule",{value:!0});Yl.version=void 0;Yl.version="wordlists/5.7.0"});var Zp=R($n=>{"use strict";g();y();Object.defineProperty($n,"__esModule",{value:!0});$n.Wordlist=$n.logger=void 0;var GC=!1,HC=va(),zm=yt(),$C=Ze(),KC=jm();$n.logger=new $C.Logger(KC.version);var ZC=function(){function e(t){var r=this.constructor;$n.logger.checkAbstract(r,e),(0,zm.defineReadOnly)(this,"locale",t)}return e.prototype.split=function(t){return t.toLowerCase().split(/ +/g)},e.prototype.join=function(t){return t.join(" ")},e.check=function(t){for(var r=[],o=0;o<2048;o++){var a=t.getWord(o);if(o!==t.getWordIndex(a))return"0x";r.push(a)}return(0,HC.id)(r.join(`
`)+`
`)},e.register=function(t,r){if(r||(r=t.locale),GC)try{var o=window;o._ethers&&o._ethers.wordlists&&(o._ethers.wordlists[r]||(0,zm.defineReadOnly)(o._ethers.wordlists,r,t))}catch{}},e}();$n.Wordlist=ZC});var Gm=R(Fa=>{"use strict";g();y();var JC=Fa&&Fa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Fa,"__esModule",{value:!0});Fa.langEn=void 0;var Jp=Zp(),YC="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",Xi=null;function qm(e){if(Xi==null&&(Xi=YC.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),Jp.Wordlist.check(e)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw Xi=null,new Error("BIP39 Wordlist for en (English) FAILED")}var XC=function(e){JC(t,e);function t(){return e.call(this,"en")||this}return t.prototype.getWord=function(r){return qm(this),Xi[r]},t.prototype.getWordIndex=function(r){return qm(this),Xi.indexOf(r)},t}(Jp.Wordlist),Vm=new XC;Fa.langEn=Vm;Jp.Wordlist.register(Vm)});var Hm=R(Xl=>{"use strict";g();y();Object.defineProperty(Xl,"__esModule",{value:!0});Xl.wordlists=void 0;var go=Gm();Xl.wordlists={cz:go.langEn,en:go.langEn,es:go.langEn,fr:go.langEn,it:go.langEn,ja:go.langEn,ko:go.langEn,zh:go.langEn,zh_cn:go.langEn,zh_tw:go.langEn}});var Yp=R(cn=>{"use strict";g();y();Object.defineProperty(cn,"__esModule",{value:!0});cn.wordlists=cn.Wordlist=cn.logger=void 0;var $m=Zp();Object.defineProperty(cn,"logger",{enumerable:!0,get:function(){return $m.logger}});Object.defineProperty(cn,"Wordlist",{enumerable:!0,get:function(){return $m.Wordlist}});var QC=Hm();Object.defineProperty(cn,"wordlists",{enumerable:!0,get:function(){return QC.wordlists}})});var Km=R(Ql=>{"use strict";g();y();Object.defineProperty(Ql,"__esModule",{value:!0});Ql.version=void 0;Ql.version="hdnode/5.7.0"});var td=R(ur=>{"use strict";g();y();Object.defineProperty(ur,"__esModule",{value:!0});ur.getAccountPath=ur.isValidMnemonic=ur.entropyToMnemonic=ur.mnemonicToEntropy=ur.mnemonicToSeed=ur.HDNode=ur.defaultPath=void 0;var Xm=Gl(),ht=gt(),Qm=br(),Qi=eo(),eB=Jl(),cr=yt(),Zm=Tp(),yo=Hn(),tB=Qo(),Jm=Yp(),rB=Ze(),oB=Km(),es=new rB.Logger(oB.version),nB=Qm.BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),aB=(0,Qi.toUtf8Bytes)("Bitcoin seed"),Ma=2147483648;function e1(e){return(1<<e)-1<<8-e}function iB(e){return(1<<e)-1}function ed(e){return(0,ht.hexZeroPad)((0,ht.hexlify)(e),32)}function Ym(e){return Xm.Base58.encode((0,ht.concat)([e,(0,ht.hexDataSlice)((0,yo.sha256)((0,yo.sha256)(e)),0,4)]))}function Xp(e){if(e==null)return Jm.wordlists.en;if(typeof e=="string"){var t=Jm.wordlists[e];return t==null&&es.throwArgumentError("unknown locale","wordlist",e),t}return e}var Ra={};ur.defaultPath="m/44'/60'/0'/0/0";var sB=function(){function e(t,r,o,a,c,s,n,i){if(t!==Ra)throw new Error("HDNode constructor cannot be called directly");if(r){var u=new Zm.SigningKey(r);(0,cr.defineReadOnly)(this,"privateKey",u.privateKey),(0,cr.defineReadOnly)(this,"publicKey",u.compressedPublicKey)}else(0,cr.defineReadOnly)(this,"privateKey",null),(0,cr.defineReadOnly)(this,"publicKey",(0,ht.hexlify)(o));(0,cr.defineReadOnly)(this,"parentFingerprint",a),(0,cr.defineReadOnly)(this,"fingerprint",(0,ht.hexDataSlice)((0,yo.ripemd160)((0,yo.sha256)(this.publicKey)),0,4)),(0,cr.defineReadOnly)(this,"address",(0,tB.computeAddress)(this.publicKey)),(0,cr.defineReadOnly)(this,"chainCode",c),(0,cr.defineReadOnly)(this,"index",s),(0,cr.defineReadOnly)(this,"depth",n),i==null?((0,cr.defineReadOnly)(this,"mnemonic",null),(0,cr.defineReadOnly)(this,"path",null)):typeof i=="string"?((0,cr.defineReadOnly)(this,"mnemonic",null),(0,cr.defineReadOnly)(this,"path",i)):((0,cr.defineReadOnly)(this,"mnemonic",i),(0,cr.defineReadOnly)(this,"path",i.path))}return Object.defineProperty(e.prototype,"extendedKey",{get:function(){if(this.depth>=256)throw new Error("Depth too large!");return Ym((0,ht.concat)([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",(0,ht.hexlify)(this.depth),this.parentFingerprint,(0,ht.hexZeroPad)((0,ht.hexlify)(this.index),4),this.chainCode,this.privateKey!=null?(0,ht.concat)(["0x00",this.privateKey]):this.publicKey]))},enumerable:!1,configurable:!0}),e.prototype.neuter=function(){return new e(Ra,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)},e.prototype._derive=function(t){if(t>4294967295)throw new Error("invalid index - "+String(t));var r=this.path;r&&(r+="/"+(t&~Ma));var o=new Uint8Array(37);if(t&Ma){if(!this.privateKey)throw new Error("cannot derive child of neutered node");o.set((0,ht.arrayify)(this.privateKey),1),r&&(r+="'")}else o.set((0,ht.arrayify)(this.publicKey));for(var a=24;a>=0;a-=8)o[33+(a>>3)]=t>>24-a&255;var c=(0,ht.arrayify)((0,yo.computeHmac)(yo.SupportedAlgorithm.sha512,this.chainCode,o)),s=c.slice(0,32),n=c.slice(32),i=null,u=null;if(this.privateKey)i=ed(Qm.BigNumber.from(s).add(this.privateKey).mod(nB));else{var l=new Zm.SigningKey((0,ht.hexlify)(s));u=l._addPoint(this.publicKey)}var x=r,N=this.mnemonic;return N&&(x=Object.freeze({phrase:N.phrase,path:r,locale:N.locale||"en"})),new e(Ra,i,u,this.fingerprint,ed(n),t,this.depth+1,x)},e.prototype.derivePath=function(t){var r=t.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+t);r[0]==="m"&&r.shift();for(var o=this,a=0;a<r.length;a++){var c=r[a];if(c.match(/^[0-9]+'$/)){var s=parseInt(c.substring(0,c.length-1));if(s>=Ma)throw new Error("invalid path index - "+c);o=o._derive(Ma+s)}else if(c.match(/^[0-9]+$/)){var s=parseInt(c);if(s>=Ma)throw new Error("invalid path index - "+c);o=o._derive(s)}else throw new Error("invalid path component - "+c)}return o},e._fromSeed=function(t,r){var o=(0,ht.arrayify)(t);if(o.length<16||o.length>64)throw new Error("invalid seed");var a=(0,ht.arrayify)((0,yo.computeHmac)(yo.SupportedAlgorithm.sha512,aB,o));return new e(Ra,ed(a.slice(0,32)),null,"0x00000000",ed(a.slice(32)),0,0,r)},e.fromMnemonic=function(t,r,o){return o=Xp(o),t=r1(Qp(t,o),o),e._fromSeed(t1(t,r),{phrase:t,path:"m",locale:o.locale})},e.fromSeed=function(t){return e._fromSeed(t,null)},e.fromExtendedKey=function(t){var r=Xm.Base58.decode(t);(r.length!==82||Ym(r.slice(0,78))!==t)&&es.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var o=r[4],a=(0,ht.hexlify)(r.slice(5,9)),c=parseInt((0,ht.hexlify)(r.slice(9,13)).substring(2),16),s=(0,ht.hexlify)(r.slice(13,45)),n=r.slice(45,78);switch((0,ht.hexlify)(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new e(Ra,null,(0,ht.hexlify)(n),a,s,c,o,null);case"0x0488ade4":case"0x04358394 ":if(n[0]!==0)break;return new e(Ra,(0,ht.hexlify)(n.slice(1)),null,a,s,c,o,null)}return es.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")},e}();ur.HDNode=sB;function t1(e,t){t||(t="");var r=(0,Qi.toUtf8Bytes)("mnemonic"+t,Qi.UnicodeNormalizationForm.NFKD);return(0,eB.pbkdf2)((0,Qi.toUtf8Bytes)(e,Qi.UnicodeNormalizationForm.NFKD),r,2048,64,"sha512")}ur.mnemonicToSeed=t1;function Qp(e,t){t=Xp(t),es.checkNormalize();var r=t.split(e);if(r.length%3!==0)throw new Error("invalid mnemonic");for(var o=(0,ht.arrayify)(new Uint8Array(Math.ceil(11*r.length/8))),a=0,c=0;c<r.length;c++){var s=t.getWordIndex(r[c].normalize("NFKD"));if(s===-1)throw new Error("invalid mnemonic");for(var n=0;n<11;n++)s&1<<10-n&&(o[a>>3]|=1<<7-a%8),a++}var i=32*r.length/3,u=r.length/3,l=e1(u),x=(0,ht.arrayify)((0,yo.sha256)(o.slice(0,i/8)))[0]&l;if(x!==(o[o.length-1]&l))throw new Error("invalid checksum");return(0,ht.hexlify)(o.slice(0,i/8))}ur.mnemonicToEntropy=Qp;function r1(e,t){if(t=Xp(t),e=(0,ht.arrayify)(e),e.length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");for(var r=[0],o=11,a=0;a<e.length;a++)o>8?(r[r.length-1]<<=8,r[r.length-1]|=e[a],o-=8):(r[r.length-1]<<=o,r[r.length-1]|=e[a]>>8-o,r.push(e[a]&iB(8-o)),o+=3);var c=e.length/4,s=(0,ht.arrayify)((0,yo.sha256)(e))[0]&e1(c);return r[r.length-1]<<=c,r[r.length-1]|=s>>8-c,t.join(r.map(function(n){return t.getWord(n)}))}ur.entropyToMnemonic=r1;function cB(e,t){try{return Qp(e,t),!0}catch{}return!1}ur.isValidMnemonic=cB;function uB(e){return(typeof e!="number"||e<0||e>=Ma||e%1)&&es.throwArgumentError("invalid account index","index",e),"m/44'/60'/"+e+"'/0/0"}ur.getAccountPath=uB});var o1=R(rd=>{"use strict";g();y();Object.defineProperty(rd,"__esModule",{value:!0});rd.version=void 0;rd.version="random/5.7.0"});var i1=R(nd=>{"use strict";g();y();Object.defineProperty(nd,"__esModule",{value:!0});nd.randomBytes=void 0;var lB=gt(),a1=Ze(),dB=o1(),e0=new a1.Logger(dB.version);function fB(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}var n1=fB(),od=n1.crypto||n1.msCrypto;(!od||!od.getRandomValues)&&(e0.warn("WARNING: Missing strong random number source"),od={getRandomValues:function(e){return e0.throwError("no secure random source avaialble",a1.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function pB(e){(e<=0||e>1024||e%1||e!=e)&&e0.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return od.getRandomValues(t),(0,lB.arrayify)(t)}nd.randomBytes=pB});var s1=R(ad=>{"use strict";g();y();Object.defineProperty(ad,"__esModule",{value:!0});ad.shuffled=void 0;function hB(e){e=e.slice();for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),o=e[t];e[t]=e[r],e[r]=o}return e}ad.shuffled=hB});var ts=R(Na=>{"use strict";g();y();Object.defineProperty(Na,"__esModule",{value:!0});Na.shuffled=Na.randomBytes=void 0;var gB=i1();Object.defineProperty(Na,"randomBytes",{enumerable:!0,get:function(){return gB.randomBytes}});var yB=s1();Object.defineProperty(Na,"shuffled",{enumerable:!0,get:function(){return yB.shuffled}})});var r0=R((t0,c1)=>{"use strict";g();y();(function(e){function t(Z){return parseInt(Z)===Z}function r(Z){if(!t(Z.length))return!1;for(var re=0;re<Z.length;re++)if(!t(Z[re])||Z[re]<0||Z[re]>255)return!1;return!0}function o(Z,re){if(Z.buffer&&ArrayBuffer.isView(Z)&&Z.name==="Uint8Array")return re&&(Z.slice?Z=Z.slice():Z=Array.prototype.slice.call(Z)),Z;if(Array.isArray(Z)){if(!r(Z))throw new Error("Array contains invalid value: "+Z);return new Uint8Array(Z)}if(t(Z.length)&&r(Z))return new Uint8Array(Z);throw new Error("unsupported array-like object")}function a(Z){return new Uint8Array(Z)}function c(Z,re,pe,ue,se){(ue!=null||se!=null)&&(Z.slice?Z=Z.slice(ue,se):Z=Array.prototype.slice.call(Z,ue,se)),re.set(Z,pe)}var s=function(){function Z(pe){var ue=[],se=0;for(pe=encodeURI(pe);se<pe.length;){var Ke=pe.charCodeAt(se++);Ke===37?(ue.push(parseInt(pe.substr(se,2),16)),se+=2):ue.push(Ke)}return o(ue)}function re(pe){for(var ue=[],se=0;se<pe.length;){var Ke=pe[se];Ke<128?(ue.push(String.fromCharCode(Ke)),se++):Ke>191&&Ke<224?(ue.push(String.fromCharCode((Ke&31)<<6|pe[se+1]&63)),se+=2):(ue.push(String.fromCharCode((Ke&15)<<12|(pe[se+1]&63)<<6|pe[se+2]&63)),se+=3)}return ue.join("")}return{toBytes:Z,fromBytes:re}}(),n=function(){function Z(ue){for(var se=[],Ke=0;Ke<ue.length;Ke+=2)se.push(parseInt(ue.substr(Ke,2),16));return se}var re="0123456789abcdef";function pe(ue){for(var se=[],Ke=0;Ke<ue.length;Ke++){var xt=ue[Ke];se.push(re[(xt&240)>>4]+re[xt&15])}return se.join("")}return{toBytes:Z,fromBytes:pe}}(),i={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],l=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],x=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],N=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],F=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],G=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],K=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],te=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],ae=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],ge=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Ce=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Ne=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Pe=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],Se=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Ye=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function rt(Z){for(var re=[],pe=0;pe<Z.length;pe+=4)re.push(Z[pe]<<24|Z[pe+1]<<16|Z[pe+2]<<8|Z[pe+3]);return re}var Ae=function(Z){if(!(this instanceof Ae))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:o(Z,!0)}),this._prepare()};Ae.prototype._prepare=function(){var Z=i[this.key.length];if(Z==null)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var re=0;re<=Z;re++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var pe=(Z+1)*4,ue=this.key.length/4,se=rt(this.key),Ke,re=0;re<ue;re++)Ke=re>>2,this._Ke[Ke][re%4]=se[re],this._Kd[Z-Ke][re%4]=se[re];for(var xt=0,At=ue,Ct;At<pe;){if(Ct=se[ue-1],se[0]^=l[Ct>>16&255]<<24^l[Ct>>8&255]<<16^l[Ct&255]<<8^l[Ct>>24&255]^u[xt]<<24,xt+=1,ue!=8)for(var re=1;re<ue;re++)se[re]^=se[re-1];else{for(var re=1;re<ue/2;re++)se[re]^=se[re-1];Ct=se[ue/2-1],se[ue/2]^=l[Ct&255]^l[Ct>>8&255]<<8^l[Ct>>16&255]<<16^l[Ct>>24&255]<<24;for(var re=ue/2+1;re<ue;re++)se[re]^=se[re-1]}for(var re=0,co,uo;re<ue&&At<pe;)co=At>>2,uo=At%4,this._Ke[co][uo]=se[re],this._Kd[Z-co][uo]=se[re++],At++}for(var co=1;co<Z;co++)for(var uo=0;uo<4;uo++)Ct=this._Kd[co][uo],this._Kd[co][uo]=Ne[Ct>>24&255]^Pe[Ct>>16&255]^Se[Ct>>8&255]^Ye[Ct&255]},Ae.prototype.encrypt=function(Z){if(Z.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var re=this._Ke.length-1,pe=[0,0,0,0],ue=rt(Z),se=0;se<4;se++)ue[se]^=this._Ke[0][se];for(var Ke=1;Ke<re;Ke++){for(var se=0;se<4;se++)pe[se]=N[ue[se]>>24&255]^F[ue[(se+1)%4]>>16&255]^G[ue[(se+2)%4]>>8&255]^K[ue[(se+3)%4]&255]^this._Ke[Ke][se];ue=pe.slice()}for(var xt=a(16),At,se=0;se<4;se++)At=this._Ke[re][se],xt[4*se]=(l[ue[se]>>24&255]^At>>24)&255,xt[4*se+1]=(l[ue[(se+1)%4]>>16&255]^At>>16)&255,xt[4*se+2]=(l[ue[(se+2)%4]>>8&255]^At>>8)&255,xt[4*se+3]=(l[ue[(se+3)%4]&255]^At)&255;return xt},Ae.prototype.decrypt=function(Z){if(Z.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var re=this._Kd.length-1,pe=[0,0,0,0],ue=rt(Z),se=0;se<4;se++)ue[se]^=this._Kd[0][se];for(var Ke=1;Ke<re;Ke++){for(var se=0;se<4;se++)pe[se]=te[ue[se]>>24&255]^ae[ue[(se+3)%4]>>16&255]^ge[ue[(se+2)%4]>>8&255]^Ce[ue[(se+1)%4]&255]^this._Kd[Ke][se];ue=pe.slice()}for(var xt=a(16),At,se=0;se<4;se++)At=this._Kd[re][se],xt[4*se]=(x[ue[se]>>24&255]^At>>24)&255,xt[4*se+1]=(x[ue[(se+3)%4]>>16&255]^At>>16)&255,xt[4*se+2]=(x[ue[(se+2)%4]>>8&255]^At>>8)&255,xt[4*se+3]=(x[ue[(se+1)%4]&255]^At)&255;return xt};var ce=function(Z){if(!(this instanceof ce))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Ae(Z)};ce.prototype.encrypt=function(Z){if(Z=o(Z),Z.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var re=a(Z.length),pe=a(16),ue=0;ue<Z.length;ue+=16)c(Z,pe,0,ue,ue+16),pe=this._aes.encrypt(pe),c(pe,re,ue);return re},ce.prototype.decrypt=function(Z){if(Z=o(Z),Z.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var re=a(Z.length),pe=a(16),ue=0;ue<Z.length;ue+=16)c(Z,pe,0,ue,ue+16),pe=this._aes.decrypt(pe),c(pe,re,ue);return re};var ie=function(Z,re){if(!(this instanceof ie))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",!re)re=a(16);else if(re.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastCipherblock=o(re,!0),this._aes=new Ae(Z)};ie.prototype.encrypt=function(Z){if(Z=o(Z),Z.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var re=a(Z.length),pe=a(16),ue=0;ue<Z.length;ue+=16){c(Z,pe,0,ue,ue+16);for(var se=0;se<16;se++)pe[se]^=this._lastCipherblock[se];this._lastCipherblock=this._aes.encrypt(pe),c(this._lastCipherblock,re,ue)}return re},ie.prototype.decrypt=function(Z){if(Z=o(Z),Z.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var re=a(Z.length),pe=a(16),ue=0;ue<Z.length;ue+=16){c(Z,pe,0,ue,ue+16),pe=this._aes.decrypt(pe);for(var se=0;se<16;se++)re[ue+se]=pe[se]^this._lastCipherblock[se];c(Z,this._lastCipherblock,0,ue,ue+16)}return re};var _e=function(Z,re,pe){if(!(this instanceof _e))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",!re)re=a(16);else if(re.length!=16)throw new Error("invalid initialation vector size (must be 16 size)");pe||(pe=1),this.segmentSize=pe,this._shiftRegister=o(re,!0),this._aes=new Ae(Z)};_e.prototype.encrypt=function(Z){if(Z.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var re=o(Z,!0),pe,ue=0;ue<re.length;ue+=this.segmentSize){pe=this._aes.encrypt(this._shiftRegister);for(var se=0;se<this.segmentSize;se++)re[ue+se]^=pe[se];c(this._shiftRegister,this._shiftRegister,0,this.segmentSize),c(re,this._shiftRegister,16-this.segmentSize,ue,ue+this.segmentSize)}return re},_e.prototype.decrypt=function(Z){if(Z.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var re=o(Z,!0),pe,ue=0;ue<re.length;ue+=this.segmentSize){pe=this._aes.encrypt(this._shiftRegister);for(var se=0;se<this.segmentSize;se++)re[ue+se]^=pe[se];c(this._shiftRegister,this._shiftRegister,0,this.segmentSize),c(Z,this._shiftRegister,16-this.segmentSize,ue,ue+this.segmentSize)}return re};var be=function(Z,re){if(!(this instanceof be))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",!re)re=a(16);else if(re.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastPrecipher=o(re,!0),this._lastPrecipherIndex=16,this._aes=new Ae(Z)};be.prototype.encrypt=function(Z){for(var re=o(Z,!0),pe=0;pe<re.length;pe++)this._lastPrecipherIndex===16&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),re[pe]^=this._lastPrecipher[this._lastPrecipherIndex++];return re},be.prototype.decrypt=be.prototype.encrypt;var Oe=function(Z){if(!(this instanceof Oe))throw Error("Counter must be instanitated with `new`");Z!==0&&!Z&&(Z=1),typeof Z=="number"?(this._counter=a(16),this.setValue(Z)):this.setBytes(Z)};Oe.prototype.setValue=function(Z){if(typeof Z!="number"||parseInt(Z)!=Z)throw new Error("invalid counter value (must be an integer)");for(var re=15;re>=0;--re)this._counter[re]=Z%256,Z=Z>>8},Oe.prototype.setBytes=function(Z){if(Z=o(Z,!0),Z.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=Z},Oe.prototype.increment=function(){for(var Z=15;Z>=0;Z--)if(this._counter[Z]===255)this._counter[Z]=0;else{this._counter[Z]++;break}};var X=function(Z,re){if(!(this instanceof X))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",re instanceof Oe||(re=new Oe(re)),this._counter=re,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Ae(Z)};X.prototype.encrypt=function(Z){for(var re=o(Z,!0),pe=0;pe<re.length;pe++)this._remainingCounterIndex===16&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),re[pe]^=this._remainingCounter[this._remainingCounterIndex++];return re},X.prototype.decrypt=X.prototype.encrypt;function Ue(Z){Z=o(Z,!0);var re=16-Z.length%16,pe=a(Z.length+re);c(Z,pe);for(var ue=Z.length;ue<pe.length;ue++)pe[ue]=re;return pe}function Yt(Z){if(Z=o(Z,!0),Z.length<16)throw new Error("PKCS#7 invalid length");var re=Z[Z.length-1];if(re>16)throw new Error("PKCS#7 padding byte out of range");for(var pe=Z.length-re,ue=0;ue<re;ue++)if(Z[pe+ue]!==re)throw new Error("PKCS#7 invalid padding byte");var se=a(pe);return c(Z,se,0,0,pe),se}var zt={AES:Ae,Counter:Oe,ModeOfOperation:{ecb:ce,cbc:ie,cfb:_e,ofb:be,ctr:X},utils:{hex:n,utf8:s},padding:{pkcs7:{pad:Ue,strip:Yt}},_arrayTest:{coerceArray:o,createArray:a,copyArray:c}};typeof t0<"u"?c1.exports=zt:typeof define=="function"&&define.amd?define(zt):(e.aesjs&&(zt._aesjs=e.aesjs),e.aesjs=zt)})(t0)});var o0=R(id=>{"use strict";g();y();Object.defineProperty(id,"__esModule",{value:!0});id.version=void 0;id.version="json-wallets/5.7.0"});var n0=R(Vr=>{"use strict";g();y();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.uuidV4=Vr.searchPath=Vr.getPassword=Vr.zpad=Vr.looseArrayify=void 0;var sd=gt(),u1=eo();function vB(e){return typeof e=="string"&&e.substring(0,2)!=="0x"&&(e="0x"+e),(0,sd.arrayify)(e)}Vr.looseArrayify=vB;function bB(e,t){for(e=String(e);e.length<t;)e="0"+e;return e}Vr.zpad=bB;function mB(e){return typeof e=="string"?(0,u1.toUtf8Bytes)(e,u1.UnicodeNormalizationForm.NFKC):(0,sd.arrayify)(e)}Vr.getPassword=mB;function xB(e,t){for(var r=e,o=t.toLowerCase().split("/"),a=0;a<o.length;a++){var c=null;for(var s in r)if(s.toLowerCase()===o[a]){c=r[s];break}if(c===null)return null;r=c}return r}Vr.searchPath=xB;function AB(e){var t=(0,sd.arrayify)(e);t[6]=t[6]&15|64,t[8]=t[8]&63|128;var r=(0,sd.hexlify)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}Vr.uuidV4=AB});var p1=R(vo=>{"use strict";g();y();var wB=vo&&vo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),_B=vo&&vo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vo,"__esModule",{value:!0});vo.decrypt=vo.CrowdsaleAccount=void 0;var l1=_B(r0()),CB=Ro(),d1=gt(),BB=jn(),EB=Jl(),PB=eo(),TB=yt(),SB=Ze(),OB=o0(),IB=new SB.Logger(OB.version),cd=n0(),f1=function(e){wB(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.isCrowdsaleAccount=function(r){return!!(r&&r._isCrowdsaleAccount)},t}(TB.Description);vo.CrowdsaleAccount=f1;function kB(e,t){var r=JSON.parse(e);t=(0,cd.getPassword)(t);var o=(0,CB.getAddress)((0,cd.searchPath)(r,"ethaddr")),a=(0,cd.looseArrayify)((0,cd.searchPath)(r,"encseed"));(!a||a.length%16!==0)&&IB.throwArgumentError("invalid encseed","json",e);for(var c=(0,d1.arrayify)((0,EB.pbkdf2)(t,t,2e3,32,"sha256")).slice(0,16),s=a.slice(0,16),n=a.slice(16),i=new l1.default.ModeOfOperation.cbc(c,s),u=l1.default.padding.pkcs7.strip((0,d1.arrayify)(i.decrypt(n))),l="",x=0;x<u.length;x++)l+=String.fromCharCode(u[x]);var N=(0,PB.toUtf8Bytes)(l),F=(0,BB.keccak256)(N);return new f1({_isCrowdsaleAccount:!0,address:o,privateKey:F})}vo.decrypt=kB});var v1=R(un=>{"use strict";g();y();Object.defineProperty(un,"__esModule",{value:!0});un.getJsonWalletAddress=un.isKeystoreWallet=un.isCrowdsaleWallet=void 0;var h1=Ro();function g1(e){var t=null;try{t=JSON.parse(e)}catch{return!1}return t.encseed&&t.ethaddr}un.isCrowdsaleWallet=g1;function y1(e){var t=null;try{t=JSON.parse(e)}catch{return!1}return!(!t.version||parseInt(t.version)!==t.version||parseInt(t.version)!==3)}un.isKeystoreWallet=y1;function FB(e){if(g1(e))try{return(0,h1.getAddress)(JSON.parse(e).ethaddr)}catch{return null}if(y1(e))try{return(0,h1.getAddress)(JSON.parse(e).address)}catch{return null}return null}un.getJsonWalletAddress=FB});var P1=R(Gt=>{"use strict";g();y();var RB=Gt&&Gt.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),MB=Gt&&Gt.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},NB=Gt&&Gt.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},m1=Gt&&Gt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.encrypt=Gt.decrypt=Gt.decryptSync=Gt.KeystoreAccount=void 0;var ln=m1(r0()),s0=m1(H_()),x1=Ro(),Mt=gt(),Kn=td(),A1=jn(),DB=Jl(),ud=ts(),WB=yt(),w1=Qo(),at=n0(),a0=Ze(),UB=o0(),i0=new a0.Logger(UB.version);function b1(e){return e!=null&&e.mnemonic&&e.mnemonic.phrase}var _1=function(e){RB(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.isKeystoreAccount=function(r){return!!(r&&r._isKeystoreAccount)},t}(WB.Description);Gt.KeystoreAccount=_1;function LB(e,t,r){var o=(0,at.searchPath)(e,"crypto/cipher");if(o==="aes-128-ctr"){var a=(0,at.looseArrayify)((0,at.searchPath)(e,"crypto/cipherparams/iv")),c=new ln.default.Counter(a),s=new ln.default.ModeOfOperation.ctr(t,c);return(0,Mt.arrayify)(s.decrypt(r))}return null}function C1(e,t){var r=(0,at.looseArrayify)((0,at.searchPath)(e,"crypto/ciphertext")),o=(0,Mt.hexlify)((0,A1.keccak256)((0,Mt.concat)([t.slice(16,32),r]))).substring(2);if(o!==(0,at.searchPath)(e,"crypto/mac").toLowerCase())throw new Error("invalid password");var a=LB(e,t.slice(0,16),r);a||i0.throwError("unsupported cipher",a0.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});var c=t.slice(32,64),s=(0,w1.computeAddress)(a);if(e.address){var n=e.address.toLowerCase();if(n.substring(0,2)!=="0x"&&(n="0x"+n),(0,x1.getAddress)(n)!==s)throw new Error("address mismatch")}var i={_isKeystoreAccount:!0,address:s,privateKey:(0,Mt.hexlify)(a)};if((0,at.searchPath)(e,"x-ethers/version")==="0.1"){var u=(0,at.looseArrayify)((0,at.searchPath)(e,"x-ethers/mnemonicCiphertext")),l=(0,at.looseArrayify)((0,at.searchPath)(e,"x-ethers/mnemonicCounter")),x=new ln.default.Counter(l),N=new ln.default.ModeOfOperation.ctr(c,x),F=(0,at.searchPath)(e,"x-ethers/path")||Kn.defaultPath,G=(0,at.searchPath)(e,"x-ethers/locale")||"en",K=(0,Mt.arrayify)(N.decrypt(u));try{var te=(0,Kn.entropyToMnemonic)(K,G),ae=Kn.HDNode.fromMnemonic(te,null,G).derivePath(F);if(ae.privateKey!=i.privateKey)throw new Error("mnemonic mismatch");i.mnemonic=ae.mnemonic}catch(ge){if(ge.code!==a0.Logger.errors.INVALID_ARGUMENT||ge.argument!=="wordlist")throw ge}}return new _1(i)}function B1(e,t,r,o,a){return(0,Mt.arrayify)((0,DB.pbkdf2)(e,t,r,o,a))}function jB(e,t,r,o,a){return Promise.resolve(B1(e,t,r,o,a))}function E1(e,t,r,o,a){var c=(0,at.getPassword)(t),s=(0,at.searchPath)(e,"crypto/kdf");if(s&&typeof s=="string"){var n=function(te,ae){return i0.throwArgumentError("invalid key-derivation function parameters",te,ae)};if(s.toLowerCase()==="scrypt"){var i=(0,at.looseArrayify)((0,at.searchPath)(e,"crypto/kdfparams/salt")),u=parseInt((0,at.searchPath)(e,"crypto/kdfparams/n")),l=parseInt((0,at.searchPath)(e,"crypto/kdfparams/r")),x=parseInt((0,at.searchPath)(e,"crypto/kdfparams/p"));(!u||!l||!x)&&n("kdf",s),(u&u-1)!==0&&n("N",u);var N=parseInt((0,at.searchPath)(e,"crypto/kdfparams/dklen"));return N!==32&&n("dklen",N),o(c,i,u,l,x,64,a)}else if(s.toLowerCase()==="pbkdf2"){var i=(0,at.looseArrayify)((0,at.searchPath)(e,"crypto/kdfparams/salt")),F=null,G=(0,at.searchPath)(e,"crypto/kdfparams/prf");G==="hmac-sha256"?F="sha256":G==="hmac-sha512"?F="sha512":n("prf",G);var K=parseInt((0,at.searchPath)(e,"crypto/kdfparams/c")),N=parseInt((0,at.searchPath)(e,"crypto/kdfparams/dklen"));return N!==32&&n("dklen",N),r(c,i,K,N,F)}}return i0.throwArgumentError("unsupported key-derivation function","kdf",s)}function zB(e,t){var r=JSON.parse(e),o=E1(r,t,B1,s0.default.syncScrypt);return C1(r,o)}Gt.decryptSync=zB;function qB(e,t,r){return MB(this,void 0,void 0,function(){var o,a;return NB(this,function(c){switch(c.label){case 0:return o=JSON.parse(e),[4,E1(o,t,jB,s0.default.scrypt,r)];case 1:return a=c.sent(),[2,C1(o,a)]}})})}Gt.decrypt=qB;function VB(e,t,r,o){try{if((0,x1.getAddress)(e.address)!==(0,w1.computeAddress)(e.privateKey))throw new Error("address/privateKey mismatch");if(b1(e)){var a=e.mnemonic,c=Kn.HDNode.fromMnemonic(a.phrase,null,a.locale).derivePath(a.path||Kn.defaultPath);if(c.privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(Ce){return Promise.reject(Ce)}typeof r=="function"&&!o&&(o=r,r={}),r||(r={});var s=(0,Mt.arrayify)(e.privateKey),n=(0,at.getPassword)(t),i=null,u=null,l=null;if(b1(e)){var x=e.mnemonic;i=(0,Mt.arrayify)((0,Kn.mnemonicToEntropy)(x.phrase,x.locale||"en")),u=x.path||Kn.defaultPath,l=x.locale||"en"}var N=r.client;N||(N="ethers.js");var F=null;r.salt?F=(0,Mt.arrayify)(r.salt):F=(0,ud.randomBytes)(32);var G=null;if(r.iv){if(G=(0,Mt.arrayify)(r.iv),G.length!==16)throw new Error("invalid iv")}else G=(0,ud.randomBytes)(16);var K=null;if(r.uuid){if(K=(0,Mt.arrayify)(r.uuid),K.length!==16)throw new Error("invalid uuid")}else K=(0,ud.randomBytes)(16);var te=1<<17,ae=8,ge=1;return r.scrypt&&(r.scrypt.N&&(te=r.scrypt.N),r.scrypt.r&&(ae=r.scrypt.r),r.scrypt.p&&(ge=r.scrypt.p)),s0.default.scrypt(n,F,te,ae,ge,64,o).then(function(Ce){Ce=(0,Mt.arrayify)(Ce);var Ne=Ce.slice(0,16),Pe=Ce.slice(16,32),Se=Ce.slice(32,64),Ye=new ln.default.Counter(G),rt=new ln.default.ModeOfOperation.ctr(Ne,Ye),Ae=(0,Mt.arrayify)(rt.encrypt(s)),ce=(0,A1.keccak256)((0,Mt.concat)([Pe,Ae])),ie={address:e.address.substring(2).toLowerCase(),id:(0,at.uuidV4)(K),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,Mt.hexlify)(G).substring(2)},ciphertext:(0,Mt.hexlify)(Ae).substring(2),kdf:"scrypt",kdfparams:{salt:(0,Mt.hexlify)(F).substring(2),n:te,dklen:32,p:ge,r:ae},mac:ce.substring(2)}};if(i){var _e=(0,ud.randomBytes)(16),be=new ln.default.Counter(_e),Oe=new ln.default.ModeOfOperation.ctr(Se,be),X=(0,Mt.arrayify)(Oe.encrypt(i)),Ue=new Date,Yt=Ue.getUTCFullYear()+"-"+(0,at.zpad)(Ue.getUTCMonth()+1,2)+"-"+(0,at.zpad)(Ue.getUTCDate(),2)+"T"+(0,at.zpad)(Ue.getUTCHours(),2)+"-"+(0,at.zpad)(Ue.getUTCMinutes(),2)+"-"+(0,at.zpad)(Ue.getUTCSeconds(),2)+".0Z";ie["x-ethers"]={client:N,gethFilename:"UTC--"+Yt+"--"+ie.address,mnemonicCounter:(0,Mt.hexlify)(_e).substring(2),mnemonicCiphertext:(0,Mt.hexlify)(X).substring(2),path:u,locale:l,version:"0.1"}}return JSON.stringify(ie)})}Gt.encrypt=VB});var u0=R(Nt=>{"use strict";g();y();Object.defineProperty(Nt,"__esModule",{value:!0});Nt.decryptJsonWalletSync=Nt.decryptJsonWallet=Nt.getJsonWalletAddress=Nt.isKeystoreWallet=Nt.isCrowdsaleWallet=Nt.encryptKeystore=Nt.decryptKeystoreSync=Nt.decryptKeystore=Nt.decryptCrowdsale=void 0;var c0=p1();Object.defineProperty(Nt,"decryptCrowdsale",{enumerable:!0,get:function(){return c0.decrypt}});var Zn=v1();Object.defineProperty(Nt,"getJsonWalletAddress",{enumerable:!0,get:function(){return Zn.getJsonWalletAddress}});Object.defineProperty(Nt,"isCrowdsaleWallet",{enumerable:!0,get:function(){return Zn.isCrowdsaleWallet}});Object.defineProperty(Nt,"isKeystoreWallet",{enumerable:!0,get:function(){return Zn.isKeystoreWallet}});var rs=P1();Object.defineProperty(Nt,"decryptKeystore",{enumerable:!0,get:function(){return rs.decrypt}});Object.defineProperty(Nt,"decryptKeystoreSync",{enumerable:!0,get:function(){return rs.decryptSync}});Object.defineProperty(Nt,"encryptKeystore",{enumerable:!0,get:function(){return rs.encrypt}});function GB(e,t,r){if((0,Zn.isCrowdsaleWallet)(e)){r&&r(0);var o=(0,c0.decrypt)(e,t);return r&&r(1),Promise.resolve(o)}return(0,Zn.isKeystoreWallet)(e)?(0,rs.decrypt)(e,t,r):Promise.reject(new Error("invalid JSON wallet"))}Nt.decryptJsonWallet=GB;function HB(e,t){if((0,Zn.isCrowdsaleWallet)(e))return(0,c0.decrypt)(e,t);if((0,Zn.isKeystoreWallet)(e))return(0,rs.decryptSync)(e,t);throw new Error("invalid JSON wallet")}Nt.decryptJsonWalletSync=HB});var T1=R(ld=>{"use strict";g();y();Object.defineProperty(ld,"__esModule",{value:!0});ld.version=void 0;ld.version="wallet/5.7.0"});var f0=R(Pr=>{"use strict";g();y();var $B=Pr&&Pr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),S1=Pr&&Pr.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},O1=Pr&&Pr.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(Pr,"__esModule",{value:!0});Pr.verifyTypedData=Pr.verifyMessage=Pr.Wallet=void 0;var I1=Ro(),KB=Ia(),ZB=Gi(),Wa=gt(),ns=va(),os=td(),k1=jn(),bo=yt(),JB=ts(),l0=Tp(),d0=u0(),Jn=Qo(),F1=Ze(),YB=T1(),Da=new F1.Logger(YB.version);function XB(e){return e!=null&&(0,Wa.isHexString)(e.privateKey,32)&&e.address!=null}function QB(e){var t=e.mnemonic;return t&&t.phrase}var eE=function(e){$B(t,e);function t(r,o){var a=e.call(this)||this;if(XB(r)){var c=new l0.SigningKey(r.privateKey);if((0,bo.defineReadOnly)(a,"_signingKey",function(){return c}),(0,bo.defineReadOnly)(a,"address",(0,Jn.computeAddress)(a.publicKey)),a.address!==(0,I1.getAddress)(r.address)&&Da.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),QB(r)){var s=r.mnemonic;(0,bo.defineReadOnly)(a,"_mnemonic",function(){return{phrase:s.phrase,path:s.path||os.defaultPath,locale:s.locale||"en"}});var n=a.mnemonic,i=os.HDNode.fromMnemonic(n.phrase,null,n.locale).derivePath(n.path);(0,Jn.computeAddress)(i.privateKey)!==a.address&&Da.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,bo.defineReadOnly)(a,"_mnemonic",function(){return null})}else{if(l0.SigningKey.isSigningKey(r))r.curve!=="secp256k1"&&Da.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,bo.defineReadOnly)(a,"_signingKey",function(){return r});else{typeof r=="string"&&r.match(/^[0-9a-f]*$/i)&&r.length===64&&(r="0x"+r);var u=new l0.SigningKey(r);(0,bo.defineReadOnly)(a,"_signingKey",function(){return u})}(0,bo.defineReadOnly)(a,"_mnemonic",function(){return null}),(0,bo.defineReadOnly)(a,"address",(0,Jn.computeAddress)(a.publicKey))}return o&&!KB.Provider.isProvider(o)&&Da.throwArgumentError("invalid provider","provider",o),(0,bo.defineReadOnly)(a,"provider",o||null),a}return Object.defineProperty(t.prototype,"mnemonic",{get:function(){return this._mnemonic()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"privateKey",{get:function(){return this._signingKey().privateKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"publicKey",{get:function(){return this._signingKey().publicKey},enumerable:!1,configurable:!0}),t.prototype.getAddress=function(){return Promise.resolve(this.address)},t.prototype.connect=function(r){return new t(this,r)},t.prototype.signTransaction=function(r){var o=this;return(0,bo.resolveProperties)(r).then(function(a){a.from!=null&&((0,I1.getAddress)(a.from)!==o.address&&Da.throwArgumentError("transaction from address mismatch","transaction.from",r.from),delete a.from);var c=o._signingKey().signDigest((0,k1.keccak256)((0,Jn.serialize)(a)));return(0,Jn.serialize)(a,c)})},t.prototype.signMessage=function(r){return S1(this,void 0,void 0,function(){return O1(this,function(o){return[2,(0,Wa.joinSignature)(this._signingKey().signDigest((0,ns.hashMessage)(r)))]})})},t.prototype._signTypedData=function(r,o,a){return S1(this,void 0,void 0,function(){var c,s=this;return O1(this,function(n){switch(n.label){case 0:return[4,ns._TypedDataEncoder.resolveNames(r,o,a,function(i){return s.provider==null&&Da.throwError("cannot resolve ENS names without a provider",F1.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:i}),s.provider.resolveName(i)})];case 1:return c=n.sent(),[2,(0,Wa.joinSignature)(this._signingKey().signDigest(ns._TypedDataEncoder.hash(c.domain,o,c.value)))]}})})},t.prototype.encrypt=function(r,o,a){if(typeof o=="function"&&!a&&(a=o,o={}),a&&typeof a!="function")throw new Error("invalid callback");return o||(o={}),(0,d0.encryptKeystore)(this,r,o,a)},t.createRandom=function(r){var o=(0,JB.randomBytes)(16);r||(r={}),r.extraEntropy&&(o=(0,Wa.arrayify)((0,Wa.hexDataSlice)((0,k1.keccak256)((0,Wa.concat)([o,r.extraEntropy])),0,16)));var a=(0,os.entropyToMnemonic)(o,r.locale);return t.fromMnemonic(a,r.path,r.locale)},t.fromEncryptedJson=function(r,o,a){return(0,d0.decryptJsonWallet)(r,o,a).then(function(c){return new t(c)})},t.fromEncryptedJsonSync=function(r,o){return new t((0,d0.decryptJsonWalletSync)(r,o))},t.fromMnemonic=function(r,o,a){return o||(o=os.defaultPath),new t(os.HDNode.fromMnemonic(r,null,a).derivePath(o))},t}(ZB.Signer);Pr.Wallet=eE;function tE(e,t){return(0,Jn.recoverAddress)((0,ns.hashMessage)(e),t)}Pr.verifyMessage=tE;function rE(e,t,r,o){return(0,Jn.recoverAddress)(ns._TypedDataEncoder.hash(e,t,r),o)}Pr.verifyTypedData=rE});var R1=R(dd=>{"use strict";g();y();Object.defineProperty(dd,"__esModule",{value:!0});dd.version=void 0;dd.version="networks/5.7.1"});var p0=R(hd=>{"use strict";g();y();Object.defineProperty(hd,"__esModule",{value:!0});hd.getNetwork=void 0;var oE=Ze(),nE=R1(),M1=new oE.Logger(nE.version);function aE(e){return e&&typeof e.renetwork=="function"}function Uo(e){var t=function(r,o){o==null&&(o={});var a=[];if(r.InfuraProvider&&o.infura!=="-")try{a.push(new r.InfuraProvider(e,o.infura))}catch{}if(r.EtherscanProvider&&o.etherscan!=="-")try{a.push(new r.EtherscanProvider(e,o.etherscan))}catch{}if(r.AlchemyProvider&&o.alchemy!=="-")try{a.push(new r.AlchemyProvider(e,o.alchemy))}catch{}if(r.PocketProvider&&o.pocket!=="-"){var c=["goerli","ropsten","rinkeby","sepolia"];try{var s=new r.PocketProvider(e,o.pocket);s.network&&c.indexOf(s.network.name)===-1&&a.push(s)}catch{}}if(r.CloudflareProvider&&o.cloudflare!=="-")try{a.push(new r.CloudflareProvider(e))}catch{}if(r.AnkrProvider&&o.ankr!=="-")try{var c=["ropsten"],s=new r.AnkrProvider(e,o.ankr);s.network&&c.indexOf(s.network.name)===-1&&a.push(s)}catch{}if(a.length===0)return null;if(r.FallbackProvider){var n=1;return o.quorum!=null?n=o.quorum:e==="homestead"&&(n=2),new r.FallbackProvider(a,n)}return a[0]};return t.renetwork=function(r){return Uo(r)},t}function pd(e,t){var r=function(o,a){return o.JsonRpcProvider?new o.JsonRpcProvider(e,t):null};return r.renetwork=function(o){return pd(e,o)},r}var N1={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Uo("homestead")},D1={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Uo("ropsten")},W1={chainId:63,name:"classicMordor",_defaultProvider:pd("https://www.ethercluster.com/mordor","classicMordor")},fd={unspecified:{chainId:0,name:"unspecified"},homestead:N1,mainnet:N1,morden:{chainId:2,name:"morden"},ropsten:D1,testnet:D1,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Uo("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Uo("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Uo("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Uo("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:pd("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:W1,classicTestnet:W1,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:pd("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Uo("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Uo("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function iE(e){if(e==null)return null;if(typeof e=="number"){for(var t in fd){var r=fd[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if(typeof e=="string"){var o=fd[e];return o==null?null:{name:o.name,chainId:o.chainId,ensAddress:o.ensAddress,_defaultProvider:o._defaultProvider||null}}var a=fd[e.name];if(!a)return typeof e.chainId!="number"&&M1.throwArgumentError("invalid network chainId","network",e),e;e.chainId!==0&&e.chainId!==a.chainId&&M1.throwArgumentError("network chainId mismatch","network",e);var c=e._defaultProvider||null;return c==null&&a._defaultProvider&&(aE(a._defaultProvider)?c=a._defaultProvider.renetwork(e):c=a._defaultProvider),{name:e.name,chainId:a.chainId,ensAddress:e.ensAddress||a.ensAddress||null,_defaultProvider:c}}hd.getNetwork=iE});var U1=R(gd=>{"use strict";g();y();Object.defineProperty(gd,"__esModule",{value:!0});gd.version=void 0;gd.version="web/5.7.1"});var L1=R(dn=>{"use strict";g();y();var sE=dn&&dn.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},cE=dn&&dn.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(dn,"__esModule",{value:!0});dn.getUrl=void 0;var uE=gt();function lE(e,t){return sE(this,void 0,void 0,function(){var r,o,a,c,s;return cE(this,function(n){switch(n.label){case 0:return t==null&&(t={}),r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0},t.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),t.fetchOptions!=null&&(o=t.fetchOptions,o.mode&&(r.mode=o.mode),o.cache&&(r.cache=o.cache),o.credentials&&(r.credentials=o.credentials),o.redirect&&(r.redirect=o.redirect),o.referrer&&(r.referrer=o.referrer)),[4,fetch(e,r)];case 1:return a=n.sent(),[4,a.arrayBuffer()];case 2:return c=n.sent(),s={},a.headers.forEach?a.headers.forEach(function(i,u){s[u.toLowerCase()]=i}):a.headers.keys().forEach(function(i){s[i.toLowerCase()]=a.headers.get(i)}),[2,{headers:s,statusCode:a.status,statusMessage:a.statusText,body:(0,uE.arrayify)(new Uint8Array(c))}]}})})}dn.getUrl=lE});var Yn=R(Gr=>{"use strict";g();y();var dE=Gr&&Gr.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},fE=Gr&&Gr.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.poll=Gr.fetchJson=Gr._fetchData=void 0;var j1=Sp(),z1=gt(),yd=yt(),as=eo(),Lo=Ze(),pE=U1(),oo=new Lo.Logger(pE.version),hE=L1();function q1(e){return new Promise(function(t){setTimeout(t,e)})}function fn(e,t){if(e==null)return null;if(typeof e=="string")return e;if((0,z1.isBytesLike)(e)){if(t&&(t.split("/")[0]==="text"||t.split(";")[0].trim()==="application/json"))try{return(0,as.toUtf8String)(e)}catch{}return(0,z1.hexlify)(e)}return e}function gE(e){return(0,as.toUtf8Bytes)(e.replace(/%([0-9a-f][0-9a-f])/gi,function(t,r){return String.fromCharCode(parseInt(r,16))}))}function V1(e,t,r){var o=typeof e=="object"&&e.throttleLimit!=null?e.throttleLimit:12;oo.assertArgument(o>0&&o%1===0,"invalid connection throttle limit","connection.throttleLimit",o);var a=typeof e=="object"?e.throttleCallback:null,c=typeof e=="object"&&typeof e.throttleSlotInterval=="number"?e.throttleSlotInterval:100;oo.assertArgument(c>0&&c%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",c);var s=typeof e=="object"?!!e.errorPassThrough:!1,n={},i=null,u={method:"GET"},l=!1,x=2*60*1e3;if(typeof e=="string")i=e;else if(typeof e=="object"){if((e==null||e.url==null)&&oo.throwArgumentError("missing URL","connection.url",e),i=e.url,typeof e.timeout=="number"&&e.timeout>0&&(x=e.timeout),e.headers)for(var N in e.headers)n[N.toLowerCase()]={key:N,value:String(e.headers[N])},["if-none-match","if-modified-since"].indexOf(N.toLowerCase())>=0&&(l=!0);if(u.allowGzip=!!e.allowGzip,e.user!=null&&e.password!=null){i.substring(0,6)!=="https:"&&e.allowInsecureAuthentication!==!0&&oo.throwError("basic authentication requires a secure https url",Lo.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:i,user:e.user,password:"[REDACTED]"});var F=e.user+":"+e.password;n.authorization={key:"Authorization",value:"Basic "+(0,j1.encode)((0,as.toUtf8Bytes)(F))}}e.skipFetchSetup!=null&&(u.skipFetchSetup=!!e.skipFetchSetup),e.fetchOptions!=null&&(u.fetchOptions=(0,yd.shallowCopy)(e.fetchOptions))}var G=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),K=i?i.match(G):null;if(K)try{var te={statusCode:200,statusMessage:"OK",headers:{"content-type":K[1]||"text/plain"},body:K[2]?(0,j1.decode)(K[3]):gE(K[3])},ae=te.body;return r&&(ae=r(te.body,te)),Promise.resolve(ae)}catch(Pe){oo.throwError("processing response error",Lo.Logger.errors.SERVER_ERROR,{body:fn(K[1],K[2]),error:Pe,requestBody:null,requestMethod:"GET",url:i})}t&&(u.method="POST",u.body=t,n["content-type"]==null&&(n["content-type"]={key:"Content-Type",value:"application/octet-stream"}),n["content-length"]==null&&(n["content-length"]={key:"Content-Length",value:String(t.length)}));var ge={};Object.keys(n).forEach(function(Pe){var Se=n[Pe];ge[Se.key]=Se.value}),u.headers=ge;var Ce=function(){var Pe=null,Se=new Promise(function(rt,Ae){x&&(Pe=setTimeout(function(){Pe!=null&&(Pe=null,Ae(oo.makeError("timeout",Lo.Logger.errors.TIMEOUT,{requestBody:fn(u.body,ge["content-type"]),requestMethod:u.method,timeout:x,url:i})))},x))}),Ye=function(){Pe!=null&&(clearTimeout(Pe),Pe=null)};return{promise:Se,cancel:Ye}}(),Ne=function(){return dE(this,void 0,void 0,function(){var Pe,Se,Ye,Oe,rt,Ae,ce,ie,_e,be,Oe,X;return fE(this,function(Ue){switch(Ue.label){case 0:Pe=0,Ue.label=1;case 1:if(!(Pe<o))return[3,20];Se=null,Ue.label=2;case 2:return Ue.trys.push([2,9,,10]),[4,(0,hE.getUrl)(i,u)];case 3:return Se=Ue.sent(),Pe<o?Se.statusCode===301||Se.statusCode===302?(Ye=Se.headers.location||"",u.method==="GET"&&Ye.match(/^https:/)?(i=Se.headers.location,[3,19]):[3,8]):[3,4]:[3,8];case 4:return Se.statusCode!==429?[3,8]:(Oe=!0,a?[4,a(Pe,i)]:[3,6]);case 5:Oe=Ue.sent(),Ue.label=6;case 6:return Oe?(rt=0,Ae=Se.headers["retry-after"],typeof Ae=="string"&&Ae.match(/^[1-9][0-9]*$/)?rt=parseInt(Ae)*1e3:rt=c*parseInt(String(Math.random()*Math.pow(2,Pe))),[4,q1(rt)]):[3,8];case 7:return Ue.sent(),[3,19];case 8:return[3,10];case 9:return ce=Ue.sent(),Se=ce.response,Se==null&&(Ce.cancel(),oo.throwError("missing response",Lo.Logger.errors.SERVER_ERROR,{requestBody:fn(u.body,ge["content-type"]),requestMethod:u.method,serverError:ce,url:i})),[3,10];case 10:if(ie=Se.body,l&&Se.statusCode===304?ie=null:!s&&(Se.statusCode<200||Se.statusCode>=300)&&(Ce.cancel(),oo.throwError("bad response",Lo.Logger.errors.SERVER_ERROR,{status:Se.statusCode,headers:Se.headers,body:fn(ie,Se.headers?Se.headers["content-type"]:null),requestBody:fn(u.body,ge["content-type"]),requestMethod:u.method,url:i})),!r)return[3,18];Ue.label=11;case 11:return Ue.trys.push([11,13,,18]),[4,r(ie,Se)];case 12:return _e=Ue.sent(),Ce.cancel(),[2,_e];case 13:return be=Ue.sent(),be.throttleRetry&&Pe<o?(Oe=!0,a?[4,a(Pe,i)]:[3,15]):[3,17];case 14:Oe=Ue.sent(),Ue.label=15;case 15:return Oe?(X=c*parseInt(String(Math.random()*Math.pow(2,Pe))),[4,q1(X)]):[3,17];case 16:return Ue.sent(),[3,19];case 17:return Ce.cancel(),oo.throwError("processing response error",Lo.Logger.errors.SERVER_ERROR,{body:fn(ie,Se.headers?Se.headers["content-type"]:null),error:be,requestBody:fn(u.body,ge["content-type"]),requestMethod:u.method,url:i}),[3,18];case 18:return Ce.cancel(),[2,ie];case 19:return Pe++,[3,1];case 20:return[2,oo.throwError("failed response",Lo.Logger.errors.SERVER_ERROR,{requestBody:fn(u.body,ge["content-type"]),requestMethod:u.method,url:i})]}})})}();return Promise.race([Ce.promise,Ne])}Gr._fetchData=V1;function yE(e,t,r){var o=function(n,i){var u=null;if(n!=null)try{u=JSON.parse((0,as.toUtf8String)(n))}catch(l){oo.throwError("invalid JSON",Lo.Logger.errors.SERVER_ERROR,{body:n,error:l})}return r&&(u=r(u,i)),u},a=null;if(t!=null){a=(0,as.toUtf8Bytes)(t);var c=typeof e=="string"?{url:e}:(0,yd.shallowCopy)(e);if(c.headers){var s=Object.keys(c.headers).filter(function(n){return n.toLowerCase()==="content-type"}).length!==0;s||(c.headers=(0,yd.shallowCopy)(c.headers),c.headers["content-type"]="application/json")}else c.headers={"content-type":"application/json"};e=c}return V1(e,a,o)}Gr.fetchJson=yE;function vE(e,t){return t||(t={}),t=(0,yd.shallowCopy)(t),t.floor==null&&(t.floor=0),t.ceiling==null&&(t.ceiling=1e4),t.interval==null&&(t.interval=250),new Promise(function(r,o){var a=null,c=!1,s=function(){return c?!1:(c=!0,a&&clearTimeout(a),!0)};t.timeout&&(a=setTimeout(function(){s()&&o(new Error("timeout"))},t.timeout));var n=t.retryLimit,i=0;function u(){return e().then(function(l){if(l!==void 0)s()&&r(l);else if(t.oncePoll)t.oncePoll.once("poll",u);else if(t.onceBlock)t.onceBlock.once("block",u);else if(!c){if(i++,i>n){s()&&o(new Error("retry limit reached"));return}var x=t.interval*parseInt(String(Math.random()*Math.pow(2,i)));x<t.floor&&(x=t.floor),x>t.ceiling&&(x=t.ceiling),setTimeout(u,x)}return null},function(l){s()&&o(l)})}u()})}Gr.poll=vE});var K1=R((t$,$1)=>{"use strict";g();y();var bd="qpzry9x8gf2tvdw0s3jn54khce6mua7l",h0={};for(is=0;is<bd.length;is++){if(vd=bd.charAt(is),h0[vd]!==void 0)throw new TypeError(vd+" is ambiguous");h0[vd]=is}var vd,is;function Ua(e){var t=e>>25;return(e&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function G1(e){for(var t=1,r=0;r<e.length;++r){var o=e.charCodeAt(r);if(o<33||o>126)return"Invalid prefix ("+e+")";t=Ua(t)^o>>5}for(t=Ua(t),r=0;r<e.length;++r){var a=e.charCodeAt(r);t=Ua(t)^a&31}return t}function bE(e,t,r){if(r=r||90,e.length+7+t.length>r)throw new TypeError("Exceeds length limit");e=e.toLowerCase();var o=G1(e);if(typeof o=="string")throw new Error(o);for(var a=e+"1",c=0;c<t.length;++c){var s=t[c];if(s>>5!==0)throw new Error("Non 5-bit word");o=Ua(o)^s,a+=bd.charAt(s)}for(c=0;c<6;++c)o=Ua(o);for(o^=1,c=0;c<6;++c){var n=o>>(5-c)*5&31;a+=bd.charAt(n)}return a}function H1(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var r=e.toLowerCase(),o=e.toUpperCase();if(e!==r&&e!==o)return"Mixed-case string "+e;e=r;var a=e.lastIndexOf("1");if(a===-1)return"No separator character for "+e;if(a===0)return"Missing prefix for "+e;var c=e.slice(0,a),s=e.slice(a+1);if(s.length<6)return"Data too short";var n=G1(c);if(typeof n=="string")return n;for(var i=[],u=0;u<s.length;++u){var l=s.charAt(u),x=h0[l];if(x===void 0)return"Unknown character "+l;n=Ua(n)^x,!(u+6>=s.length)&&i.push(x)}return n!==1?"Invalid checksum for "+e:{prefix:c,words:i}}function mE(){var e=H1.apply(null,arguments);if(typeof e=="object")return e}function xE(e){var t=H1.apply(null,arguments);if(typeof t=="object")return t;throw new Error(t)}function md(e,t,r,o){for(var a=0,c=0,s=(1<<r)-1,n=[],i=0;i<e.length;++i)for(a=a<<t|e[i],c+=t;c>=r;)c-=r,n.push(a>>c&s);if(o)c>0&&n.push(a<<r-c&s);else{if(c>=t)return"Excess padding";if(a<<r-c&s)return"Non-zero padding"}return n}function AE(e){var t=md(e,8,5,!0);if(Array.isArray(t))return t}function wE(e){var t=md(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)}function _E(e){var t=md(e,5,8,!1);if(Array.isArray(t))return t}function CE(e){var t=md(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}$1.exports={decodeUnsafe:mE,decode:xE,encode:bE,toWordsUnsafe:AE,toWords:wE,fromWordsUnsafe:_E,fromWords:CE}});var er=R(xd=>{"use strict";g();y();Object.defineProperty(xd,"__esModule",{value:!0});xd.version=void 0;xd.version="providers/5.7.2"});var pn=R(xo=>{"use strict";g();y();Object.defineProperty(xo,"__esModule",{value:!0});xo.showThrottleMessage=xo.isCommunityResource=xo.isCommunityResourcable=xo.Formatter=void 0;var g0=Ro(),jo=br(),mo=gt(),BE=vl(),EE=yt(),Z1=Qo(),PE=Ze(),TE=er(),ss=new PE.Logger(TE.version),SE=function(){function e(){this.formats=this.getDefaultFormats()}return e.prototype.getDefaultFormats=function(){var t=this,r={},o=this.address.bind(this),a=this.bigNumber.bind(this),c=this.blockTag.bind(this),s=this.data.bind(this),n=this.hash.bind(this),i=this.hex.bind(this),u=this.number.bind(this),l=this.type.bind(this),x=function(N){return t.data(N,!0)};return r.transaction={hash:n,type:l,accessList:e.allowNull(this.accessList.bind(this),null),blockHash:e.allowNull(n,null),blockNumber:e.allowNull(u,null),transactionIndex:e.allowNull(u,null),confirmations:e.allowNull(u,null),from:o,gasPrice:e.allowNull(a),maxPriorityFeePerGas:e.allowNull(a),maxFeePerGas:e.allowNull(a),gasLimit:a,to:e.allowNull(o,null),value:a,nonce:u,data:s,r:e.allowNull(this.uint256),s:e.allowNull(this.uint256),v:e.allowNull(u),creates:e.allowNull(o,null),raw:e.allowNull(s)},r.transactionRequest={from:e.allowNull(o),nonce:e.allowNull(u),gasLimit:e.allowNull(a),gasPrice:e.allowNull(a),maxPriorityFeePerGas:e.allowNull(a),maxFeePerGas:e.allowNull(a),to:e.allowNull(o),value:e.allowNull(a),data:e.allowNull(x),type:e.allowNull(u),accessList:e.allowNull(this.accessList.bind(this),null)},r.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:n,address:o,topics:e.arrayOf(n),data:s,logIndex:u,blockHash:n},r.receipt={to:e.allowNull(this.address,null),from:e.allowNull(this.address,null),contractAddress:e.allowNull(o,null),transactionIndex:u,root:e.allowNull(i),gasUsed:a,logsBloom:e.allowNull(s),blockHash:n,transactionHash:n,logs:e.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:e.allowNull(u,null),cumulativeGasUsed:a,effectiveGasPrice:e.allowNull(a),status:e.allowNull(u),type:l},r.block={hash:e.allowNull(n),parentHash:n,number:u,timestamp:u,nonce:e.allowNull(i),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:e.allowNull(o),extraData:s,transactions:e.allowNull(e.arrayOf(n)),baseFeePerGas:e.allowNull(a)},r.blockWithTransactions=(0,EE.shallowCopy)(r.block),r.blockWithTransactions.transactions=e.allowNull(e.arrayOf(this.transactionResponse.bind(this))),r.filter={fromBlock:e.allowNull(c,void 0),toBlock:e.allowNull(c,void 0),blockHash:e.allowNull(n,void 0),address:e.allowNull(o,void 0),topics:e.allowNull(this.topics.bind(this),void 0)},r.filterLog={blockNumber:e.allowNull(u),blockHash:e.allowNull(n),transactionIndex:u,removed:e.allowNull(this.boolean.bind(this)),address:o,data:e.allowFalsish(s,"0x"),topics:e.arrayOf(n),transactionHash:n,logIndex:u},r},e.prototype.accessList=function(t){return(0,Z1.accessListify)(t||[])},e.prototype.number=function(t){return t==="0x"?0:jo.BigNumber.from(t).toNumber()},e.prototype.type=function(t){return t==="0x"||t==null?0:jo.BigNumber.from(t).toNumber()},e.prototype.bigNumber=function(t){return jo.BigNumber.from(t)},e.prototype.boolean=function(t){if(typeof t=="boolean")return t;if(typeof t=="string"){if(t=t.toLowerCase(),t==="true")return!0;if(t==="false")return!1}throw new Error("invalid boolean - "+t)},e.prototype.hex=function(t,r){return typeof t=="string"&&(!r&&t.substring(0,2)!=="0x"&&(t="0x"+t),(0,mo.isHexString)(t))?t.toLowerCase():ss.throwArgumentError("invalid hash","value",t)},e.prototype.data=function(t,r){var o=this.hex(t,r);if(o.length%2!==0)throw new Error("invalid data; odd-length - "+t);return o},e.prototype.address=function(t){return(0,g0.getAddress)(t)},e.prototype.callAddress=function(t){if(!(0,mo.isHexString)(t,32))return null;var r=(0,g0.getAddress)((0,mo.hexDataSlice)(t,12));return r===BE.AddressZero?null:r},e.prototype.contractAddress=function(t){return(0,g0.getContractAddress)(t)},e.prototype.blockTag=function(t){if(t==null)return"latest";if(t==="earliest")return"0x0";switch(t){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return t}if(typeof t=="number"||(0,mo.isHexString)(t))return(0,mo.hexValue)(t);throw new Error("invalid blockTag")},e.prototype.hash=function(t,r){var o=this.hex(t,r);return(0,mo.hexDataLength)(o)!==32?ss.throwArgumentError("invalid hash","value",t):o},e.prototype.difficulty=function(t){if(t==null)return null;var r=jo.BigNumber.from(t);try{return r.toNumber()}catch{}return null},e.prototype.uint256=function(t){if(!(0,mo.isHexString)(t))throw new Error("invalid uint256");return(0,mo.hexZeroPad)(t,32)},e.prototype._block=function(t,r){t.author!=null&&t.miner==null&&(t.miner=t.author);var o=t._difficulty!=null?t._difficulty:t.difficulty,a=e.check(r,t);return a._difficulty=o==null?null:jo.BigNumber.from(o),a},e.prototype.block=function(t){return this._block(t,this.formats.block)},e.prototype.blockWithTransactions=function(t){return this._block(t,this.formats.blockWithTransactions)},e.prototype.transactionRequest=function(t){return e.check(this.formats.transactionRequest,t)},e.prototype.transactionResponse=function(t){t.gas!=null&&t.gasLimit==null&&(t.gasLimit=t.gas),t.to&&jo.BigNumber.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),t.input!=null&&t.data==null&&(t.data=t.input),t.to==null&&t.creates==null&&(t.creates=this.contractAddress(t)),(t.type===1||t.type===2)&&t.accessList==null&&(t.accessList=[]);var r=e.check(this.formats.transaction,t);if(t.chainId!=null){var o=t.chainId;(0,mo.isHexString)(o)&&(o=jo.BigNumber.from(o).toNumber()),r.chainId=o}else{var o=t.networkId;o==null&&r.v==null&&(o=t.chainId),(0,mo.isHexString)(o)&&(o=jo.BigNumber.from(o).toNumber()),typeof o!="number"&&r.v!=null&&(o=(r.v-35)/2,o<0&&(o=0),o=parseInt(o)),typeof o!="number"&&(o=0),r.chainId=o}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r},e.prototype.transaction=function(t){return(0,Z1.parse)(t)},e.prototype.receiptLog=function(t){return e.check(this.formats.receiptLog,t)},e.prototype.receipt=function(t){var r=e.check(this.formats.receipt,t);if(r.root!=null)if(r.root.length<=4){var o=jo.BigNumber.from(r.root).toNumber();o===0||o===1?(r.status!=null&&r.status!==o&&ss.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=o,delete r.root):ss.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&ss.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r},e.prototype.topics=function(t){var r=this;return Array.isArray(t)?t.map(function(o){return r.topics(o)}):t!=null?this.hash(t,!0):null},e.prototype.filter=function(t){return e.check(this.formats.filter,t)},e.prototype.filterLog=function(t){return e.check(this.formats.filterLog,t)},e.check=function(t,r){var o={};for(var a in t)try{var c=t[a](r[a]);c!==void 0&&(o[a]=c)}catch(s){throw s.checkKey=a,s.checkValue=r[a],s}return o},e.allowNull=function(t,r){return function(o){return o==null?r:t(o)}},e.allowFalsish=function(t,r){return function(o){return o?t(o):r}},e.arrayOf=function(t){return function(r){if(!Array.isArray(r))throw new Error("not an array");var o=[];return r.forEach(function(a){o.push(t(a))}),o}},e}();xo.Formatter=SE;function Y1(e){return e&&typeof e.isCommunityResource=="function"}xo.isCommunityResourcable=Y1;function OE(e){return Y1(e)&&e.isCommunityResource()}xo.isCommunityResource=OE;var J1=!1;function IE(){J1||(J1=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}xo.showThrottleMessage=IE});var ds=R(dr=>{"use strict";g();y();var kE=dr&&dr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),ze=dr&&dr.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},qe=dr&&dr.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},FE=dr&&dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dr,"__esModule",{value:!0});dr.BaseProvider=dr.Resolver=dr.Event=void 0;var sx=Ia(),RE=Sp(),m0=Gl(),lr=br(),je=gt(),ME=vl(),us=va(),NE=p0(),kt=yt(),X1=Hn(),x0=eo(),ja=Yn(),Q1=FE(K1()),Je=Ze(),DE=er(),$e=new Je.Logger(DE.version),ex=pn(),WE=10;function tx(e){return e==null?"null":((0,je.hexDataLength)(e)!==32&&$e.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function rx(e){for(e=e.slice();e.length>0&&e[e.length-1]==null;)e.pop();return e.map(function(t){if(Array.isArray(t)){var r={};t.forEach(function(a){r[tx(a)]=!0});var o=Object.keys(r);return o.sort(),o.join("|")}else return tx(t)}).join("&")}function UE(e){return e===""?[]:e.split(/&/g).map(function(t){if(t==="")return[];var r=t.split("|").map(function(o){return o==="null"?null:o});return r.length===1?r[0]:r})}function La(e){if(typeof e=="string"){if(e=e.toLowerCase(),(0,je.hexDataLength)(e)===32)return"tx:"+e;if(e.indexOf(":")===-1)return e}else{if(Array.isArray(e))return"filter:*:"+rx(e);if(sx.ForkEvent.isForkEvent(e))throw $e.warn("not implemented"),new Error("not implemented");if(e&&typeof e=="object")return"filter:"+(e.address||"*")+":"+rx(e.topics||[])}throw new Error("invalid event - "+e)}function cs(){return new Date().getTime()}function ox(e){return new Promise(function(t){setTimeout(t,e)})}var LE=["block","network","pending","poll"],cx=function(){function e(t,r,o){(0,kt.defineReadOnly)(this,"tag",t),(0,kt.defineReadOnly)(this,"listener",r),(0,kt.defineReadOnly)(this,"once",o),this._lastBlockNumber=-2,this._inflight=!1}return Object.defineProperty(e.prototype,"event",{get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.tag.split(":")[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hash",{get:function(){var t=this.tag.split(":");return t[0]!=="tx"?null:t[1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){var t=this.tag.split(":");if(t[0]!=="filter")return null;var r=t[1],o=UE(t[2]),a={};return o.length>0&&(a.topics=o),r&&r!=="*"&&(a.address=r),a},enumerable:!1,configurable:!0}),e.prototype.pollable=function(){return this.tag.indexOf(":")>=0||LE.indexOf(this.tag)>=0},e}();dr.Event=cx;var jE={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function y0(e){return(0,je.hexZeroPad)(lr.BigNumber.from(e).toHexString(),32)}function nx(e){return m0.Base58.encode((0,je.concat)([e,(0,je.hexDataSlice)((0,X1.sha256)((0,X1.sha256)(e)),0,4)]))}var ux=new RegExp("^(ipfs)://(.*)$","i"),ax=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),ux,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ad(e,t){try{return(0,x0.toUtf8String)(ls(e,t))}catch{}return null}function ls(e,t){if(e==="0x")return null;var r=lr.BigNumber.from((0,je.hexDataSlice)(e,t,t+32)).toNumber(),o=lr.BigNumber.from((0,je.hexDataSlice)(e,r,r+32)).toNumber();return(0,je.hexDataSlice)(e,r+32,r+32+o)}function v0(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):$e.throwArgumentError("unsupported IPFS format","link",e),"https://gateway.ipfs.io/ipfs/"+e}function ix(e){var t=(0,je.arrayify)(e);if(t.length>32)throw new Error("internal; should not happen");var r=new Uint8Array(32);return r.set(t,32-t.length),r}function zE(e){if(e.length%32===0)return e;var t=new Uint8Array(Math.ceil(e.length/32)*32);return t.set(e),t}function lx(e){for(var t=[],r=0,o=0;o<e.length;o++)t.push(null),r+=32;for(var o=0;o<e.length;o++){var a=(0,je.arrayify)(e[o]);t[o]=ix(r),t.push(ix(a.length)),t.push(zE(a)),r+=32+Math.ceil(a.length/32)*32}return(0,je.hexConcat)(t)}var A0=function(){function e(t,r,o,a){(0,kt.defineReadOnly)(this,"provider",t),(0,kt.defineReadOnly)(this,"name",o),(0,kt.defineReadOnly)(this,"address",t.formatter.address(r)),(0,kt.defineReadOnly)(this,"_resolvedAddress",a)}return e.prototype.supportsWildcard=function(){var t=this;return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then(function(r){return lr.BigNumber.from(r).eq(1)}).catch(function(r){if(r.code===Je.Logger.errors.CALL_EXCEPTION)return!1;throw t._supportsEip2544=null,r})),this._supportsEip2544},e.prototype._fetch=function(t,r){return ze(this,void 0,void 0,function(){var o,a,c,s;return qe(this,function(n){switch(n.label){case 0:return o={to:this.address,ccipReadEnabled:!0,data:(0,je.hexConcat)([t,(0,us.namehash)(this.name),r||"0x"])},a=!1,[4,this.supportsWildcard()];case 1:n.sent()&&(a=!0,o.data=(0,je.hexConcat)(["0x9061b923",lx([(0,us.dnsEncode)(this.name),o.data])])),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,this.provider.call(o)];case 3:return c=n.sent(),(0,je.arrayify)(c).length%32===4&&$e.throwError("resolver threw error",Je.Logger.errors.CALL_EXCEPTION,{transaction:o,data:c}),a&&(c=ls(c,0)),[2,c];case 4:if(s=n.sent(),s.code===Je.Logger.errors.CALL_EXCEPTION)return[2,null];throw s;case 5:return[2]}})})},e.prototype._fetchBytes=function(t,r){return ze(this,void 0,void 0,function(){var o;return qe(this,function(a){switch(a.label){case 0:return[4,this._fetch(t,r)];case 1:return o=a.sent(),o!=null?[2,ls(o,0)]:[2,null]}})})},e.prototype._getAddress=function(t,r){var o=jE[String(t)];if(o==null&&$e.throwError("unsupported coin type: "+t,Je.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress("+t+")"}),o.ilk==="eth")return this.provider.formatter.address(r);var a=(0,je.arrayify)(r);if(o.p2pkh!=null){var c=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(c){var s=parseInt(c[1],16);if(c[2].length===s*2&&s>=1&&s<=75)return nx((0,je.concat)([[o.p2pkh],"0x"+c[2]]))}}if(o.p2sh!=null){var n=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(n){var i=parseInt(n[1],16);if(n[2].length===i*2&&i>=1&&i<=75)return nx((0,je.concat)([[o.p2sh],"0x"+n[2]]))}}if(o.prefix!=null){var u=a[1],l=a[0];if(l===0?u!==20&&u!==32&&(l=-1):l=-1,l>=0&&a.length===2+u&&u>=1&&u<=75){var x=Q1.default.toWords(a.slice(2));return x.unshift(l),Q1.default.encode(o.prefix,x)}}return null},e.prototype.getAddress=function(t){return ze(this,void 0,void 0,function(){var r,o,a,c;return qe(this,function(s){switch(s.label){case 0:if(t==null&&(t=60),t!==60)return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this._fetch("0x3b3b57de")];case 2:return r=s.sent(),r==="0x"||r===ME.HashZero?[2,null]:[2,this.provider.formatter.callAddress(r)];case 3:if(o=s.sent(),o.code===Je.Logger.errors.CALL_EXCEPTION)return[2,null];throw o;case 4:return[4,this._fetchBytes("0xf1cb7e06",y0(t))];case 5:return a=s.sent(),a==null||a==="0x"?[2,null]:(c=this._getAddress(t,a),c==null&&$e.throwError("invalid or unsupported coin data",Je.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress("+t+")",coinType:t,data:a}),[2,c])}})})},e.prototype.getAvatar=function(){return ze(this,void 0,void 0,function(){var t,r,o,a,c,s,n,i,u,l,x,N,F,G,K,te,ae,ge,Ce,Ne,Pe,Se,Ye,rt,Ae;return qe(this,function(ce){switch(ce.label){case 0:t=[{type:"name",content:this.name}],ce.label=1;case 1:return ce.trys.push([1,19,,20]),[4,this.getText("avatar")];case 2:if(r=ce.sent(),r==null)return[2,null];o=0,ce.label=3;case 3:if(!(o<ax.length))return[3,18];if(a=r.match(ax[o]),a==null)return[3,17];switch(c=a[1].toLowerCase(),s=c,s){case"https":return[3,4];case"data":return[3,5];case"ipfs":return[3,6];case"erc721":return[3,7];case"erc1155":return[3,7]}return[3,17];case 4:return t.push({type:"url",content:r}),[2,{linkage:t,url:r}];case 5:return t.push({type:"data",content:r}),[2,{linkage:t,url:r}];case 6:return t.push({type:"ipfs",content:r}),[2,{linkage:t,url:v0(r)}];case 7:return n=c==="erc721"?"0xc87b56dd":"0x0e89341c",t.push({type:c,content:r}),u=this._resolvedAddress,u?[3,9]:[4,this.getAddress()];case 8:u=ce.sent(),ce.label=9;case 9:return i=u,l=(a[2]||"").split("/"),l.length!==2?[2,null]:[4,this.provider.formatter.address(l[0])];case 10:return x=ce.sent(),N=(0,je.hexZeroPad)(lr.BigNumber.from(l[1]).toHexString(),32),c!=="erc721"?[3,12]:(K=(G=this.provider.formatter).callAddress,[4,this.provider.call({to:x,data:(0,je.hexConcat)(["0x6352211e",N])})]);case 11:return F=K.apply(G,[ce.sent()]),i!==F?[2,null]:(t.push({type:"owner",content:F}),[3,14]);case 12:return c!=="erc1155"?[3,14]:(ge=(ae=lr.BigNumber).from,[4,this.provider.call({to:x,data:(0,je.hexConcat)(["0x00fdd58e",(0,je.hexZeroPad)(i,32),N])})]);case 13:if(te=ge.apply(ae,[ce.sent()]),te.isZero())return[2,null];t.push({type:"balance",content:te.toString()}),ce.label=14;case 14:return Ce={to:this.provider.formatter.address(l[0]),data:(0,je.hexConcat)([n,N])},Pe=Ad,[4,this.provider.call(Ce)];case 15:return Ne=Pe.apply(void 0,[ce.sent(),0]),Ne==null?[2,null]:(t.push({type:"metadata-url-base",content:Ne}),c==="erc1155"&&(Ne=Ne.replace("{id}",N.substring(2)),t.push({type:"metadata-url-expanded",content:Ne})),Ne.match(/^ipfs:/i)&&(Ne=v0(Ne)),t.push({type:"metadata-url",content:Ne}),[4,(0,ja.fetchJson)(Ne)]);case 16:if(Se=ce.sent(),!Se)return[2,null];if(t.push({type:"metadata",content:JSON.stringify(Se)}),Ye=Se.image,typeof Ye!="string")return[2,null];if(!Ye.match(/^(https:\/\/|data:)/i)){if(rt=Ye.match(ux),rt==null)return[2,null];t.push({type:"url-ipfs",content:Ye}),Ye=v0(Ye)}return t.push({type:"url",content:Ye}),[2,{linkage:t,url:Ye}];case 17:return o++,[3,3];case 18:return[3,20];case 19:return Ae=ce.sent(),[3,20];case 20:return[2,null]}})})},e.prototype.getContentHash=function(){return ze(this,void 0,void 0,function(){var t,r,o,a,c,s,n,i,u;return qe(this,function(l){switch(l.label){case 0:return[4,this._fetchBytes("0xbc1c58d1")];case 1:return t=l.sent(),t==null||t==="0x"?[2,null]:(r=t.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/),r&&(o=parseInt(r[3],16),r[4].length===o*2)?[2,"ipfs://"+m0.Base58.encode("0x"+r[1])]:(a=t.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/),a&&(c=parseInt(a[3],16),a[4].length===c*2)?[2,"ipns://"+m0.Base58.encode("0x"+a[1])]:(s=t.match(/^0xe40101fa011b20([0-9a-f]*)$/),s&&s[1].length===32*2?[2,"bzz://"+s[1]]:(n=t.match(/^0x90b2c605([0-9a-f]*)$/),n&&n[1].length===34*2?(i={"=":"","+":"-","/":"_"},u=(0,RE.encode)("0x"+n[1]).replace(/[=+\/]/g,function(x){return i[x]}),[2,"sia://"+u]):[2,$e.throwError("invalid or unsupported content hash data",Je.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t})]))))}})})},e.prototype.getText=function(t){return ze(this,void 0,void 0,function(){var r,o;return qe(this,function(a){switch(a.label){case 0:return r=(0,x0.toUtf8Bytes)(t),r=(0,je.concat)([y0(64),y0(r.length),r]),r.length%32!==0&&(r=(0,je.concat)([r,(0,je.hexZeroPad)("0x",32-t.length%32)])),[4,this._fetchBytes("0x59d1d43c",(0,je.hexlify)(r))];case 1:return o=a.sent(),o==null||o==="0x"?[2,null]:[2,(0,x0.toUtf8String)(o)]}})})},e}();dr.Resolver=A0;var b0=null,qE=1,VE=function(e){kE(t,e);function t(r){var o=this.constructor,a=e.call(this)||this;if(a._events=[],a._emitted={block:-2},a.disableCcipRead=!1,a.formatter=o.getFormatter(),(0,kt.defineReadOnly)(a,"anyNetwork",r==="any"),a.anyNetwork&&(r=a.detectNetwork()),r instanceof Promise)a._networkPromise=r,r.catch(function(s){}),a._ready().catch(function(s){});else{var c=(0,kt.getStatic)(o,"getNetwork")(r);c?((0,kt.defineReadOnly)(a,"_network",c),a.emit("network",c,null)):$e.throwArgumentError("invalid network","network",r)}return a._maxInternalBlockNumber=-1024,a._lastBlockNumber=-2,a._maxFilterBlockRange=10,a._pollingInterval=4e3,a._fastQueryDate=0,a}return t.prototype._ready=function(){return ze(this,void 0,void 0,function(){var r,o;return qe(this,function(a){switch(a.label){case 0:if(this._network!=null)return[3,7];if(r=null,!this._networkPromise)return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this._networkPromise];case 2:return r=a.sent(),[3,4];case 3:return o=a.sent(),[3,4];case 4:return r!=null?[3,6]:[4,this.detectNetwork()];case 5:r=a.sent(),a.label=6;case 6:r||$e.throwError("no network detected",Je.Logger.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=r:(0,kt.defineReadOnly)(this,"_network",r),this.emit("network",r,null)),a.label=7;case 7:return[2,this._network]}})})},Object.defineProperty(t.prototype,"ready",{get:function(){var r=this;return(0,ja.poll)(function(){return r._ready().then(function(o){return o},function(o){if(!(o.code===Je.Logger.errors.NETWORK_ERROR&&o.event==="noNetwork"))throw o})})},enumerable:!1,configurable:!0}),t.getFormatter=function(){return b0==null&&(b0=new ex.Formatter),b0},t.getNetwork=function(r){return(0,NE.getNetwork)(r??"homestead")},t.prototype.ccipReadFetch=function(r,o,a){return ze(this,void 0,void 0,function(){var c,s,n,i,u,l,x,N,F;return qe(this,function(G){switch(G.label){case 0:if(this.disableCcipRead||a.length===0)return[2,null];c=r.to.toLowerCase(),s=o.toLowerCase(),n=[],i=0,G.label=1;case 1:return i<a.length?(u=a[i],l=u.replace("{sender}",c).replace("{data}",s),x=u.indexOf("{data}")>=0?null:JSON.stringify({data:s,sender:c}),[4,(0,ja.fetchJson)({url:l,errorPassThrough:!0},x,function(K,te){return K.status=te.statusCode,K})]):[3,4];case 2:if(N=G.sent(),N.data)return[2,N.data];if(F=N.message||"unknown error",N.status>=400&&N.status<500)return[2,$e.throwError("response not found during CCIP fetch: "+F,Je.Logger.errors.SERVER_ERROR,{url:u,errorMessage:F})];n.push(F),G.label=3;case 3:return i++,[3,1];case 4:return[2,$e.throwError("error encountered during CCIP fetch: "+n.map(function(K){return JSON.stringify(K)}).join(", "),Je.Logger.errors.SERVER_ERROR,{urls:a,errorMessages:n})]}})})},t.prototype._getInternalBlockNumber=function(r){return ze(this,void 0,void 0,function(){var o,a,c,s,n,i=this;return qe(this,function(u){switch(u.label){case 0:return[4,this._ready()];case 1:if(u.sent(),!(r>0))return[3,7];u.label=2;case 2:if(!this._internalBlockNumber)return[3,7];o=this._internalBlockNumber,u.label=3;case 3:return u.trys.push([3,5,,6]),[4,o];case 4:return a=u.sent(),cs()-a.respTime<=r?[2,a.blockNumber]:[3,7];case 5:return c=u.sent(),this._internalBlockNumber===o?[3,7]:[3,6];case 6:return[3,2];case 7:return s=cs(),n=(0,kt.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(function(l){return null},function(l){return l})}).then(function(l){var x=l.blockNumber,N=l.networkError;if(N)throw i._internalBlockNumber===n&&(i._internalBlockNumber=null),N;var F=cs();return x=lr.BigNumber.from(x).toNumber(),x<i._maxInternalBlockNumber&&(x=i._maxInternalBlockNumber),i._maxInternalBlockNumber=x,i._setFastBlockNumber(x),{blockNumber:x,reqTime:s,respTime:F}}),this._internalBlockNumber=n,n.catch(function(l){i._internalBlockNumber===n&&(i._internalBlockNumber=null)}),[4,n];case 8:return[2,u.sent().blockNumber]}})})},t.prototype.poll=function(){return ze(this,void 0,void 0,function(){var r,o,a,c,s,n=this;return qe(this,function(i){switch(i.label){case 0:r=qE++,o=[],a=null,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._getInternalBlockNumber(100+this.pollingInterval/2)];case 2:return a=i.sent(),[3,4];case 3:return c=i.sent(),this.emit("error",c),[2];case 4:if(this._setFastBlockNumber(a),this.emit("poll",r,a),a===this._lastBlockNumber)return this.emit("didPoll",r),[2];if(this._emitted.block===-2&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)$e.warn("network block skew detected; skipping block events (emitted="+this._emitted.block+" blockNumber"+a+")"),this.emit("error",$e.makeError("network block skew detected",Je.Logger.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(s=this._emitted.block+1;s<=a;s++)this.emit("block",s);return this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(function(u){if(u!=="block"){var l=n._emitted[u];l!=="pending"&&a-l>12&&delete n._emitted[u]}})),this._lastBlockNumber===-2&&(this._lastBlockNumber=a-1),this._events.forEach(function(u){switch(u.type){case"tx":{var l=u.hash,x=n.getTransactionReceipt(l).then(function(G){return!G||G.blockNumber==null||(n._emitted["t:"+l]=G.blockNumber,n.emit(l,G)),null}).catch(function(G){n.emit("error",G)});o.push(x);break}case"filter":{if(!u._inflight){u._inflight=!0,u._lastBlockNumber===-2&&(u._lastBlockNumber=a-1);var N=u.filter;N.fromBlock=u._lastBlockNumber+1,N.toBlock=a;var F=N.toBlock-n._maxFilterBlockRange;F>N.fromBlock&&(N.fromBlock=F),N.fromBlock<0&&(N.fromBlock=0);var x=n.getLogs(N).then(function(K){u._inflight=!1,K.length!==0&&K.forEach(function(te){te.blockNumber>u._lastBlockNumber&&(u._lastBlockNumber=te.blockNumber),n._emitted["b:"+te.blockHash]=te.blockNumber,n._emitted["t:"+te.transactionHash]=te.blockNumber,n.emit(N,te)})}).catch(function(K){n.emit("error",K),u._inflight=!1});o.push(x)}break}}}),this._lastBlockNumber=a,Promise.all(o).then(function(){n.emit("didPoll",r)}).catch(function(u){n.emit("error",u)}),[2]}})})},t.prototype.resetEventsBlock=function(r){this._lastBlockNumber=r-1,this.polling&&this.poll()},Object.defineProperty(t.prototype,"network",{get:function(){return this._network},enumerable:!1,configurable:!0}),t.prototype.detectNetwork=function(){return ze(this,void 0,void 0,function(){return qe(this,function(r){return[2,$e.throwError("provider does not support network detection",Je.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})]})})},t.prototype.getNetwork=function(){return ze(this,void 0,void 0,function(){var r,o,a;return qe(this,function(c){switch(c.label){case 0:return[4,this._ready()];case 1:return r=c.sent(),[4,this.detectNetwork()];case 2:return o=c.sent(),r.chainId===o.chainId?[3,5]:this.anyNetwork?(this._network=o,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",o,r),[4,ox(0)]):[3,4];case 3:return c.sent(),[2,this._network];case 4:throw a=$e.makeError("underlying network changed",Je.Logger.errors.NETWORK_ERROR,{event:"changed",network:r,detectedNetwork:o}),this.emit("error",a),a;case 5:return[2,r]}})})},Object.defineProperty(t.prototype,"blockNumber",{get:function(){var r=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then(function(o){r._setFastBlockNumber(o)},function(o){}),this._fastBlockNumber!=null?this._fastBlockNumber:-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"polling",{get:function(){return this._poller!=null},set:function(r){var o=this;r&&!this._poller?(this._poller=setInterval(function(){o.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(function(){o.poll(),o._bootstrapPoll=setTimeout(function(){o._poller||o.poll(),o._bootstrapPoll=null},o.pollingInterval)},0))):!r&&this._poller&&(clearInterval(this._poller),this._poller=null)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pollingInterval",{get:function(){return this._pollingInterval},set:function(r){var o=this;if(typeof r!="number"||r<=0||parseInt(String(r))!=r)throw new Error("invalid polling interval");this._pollingInterval=r,this._poller&&(clearInterval(this._poller),this._poller=setInterval(function(){o.poll()},this._pollingInterval))},enumerable:!1,configurable:!0}),t.prototype._getFastBlockNumber=function(){var r=this,o=cs();return o-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=o,this._fastBlockNumberPromise=this.getBlockNumber().then(function(a){return(r._fastBlockNumber==null||a>r._fastBlockNumber)&&(r._fastBlockNumber=a),r._fastBlockNumber})),this._fastBlockNumberPromise},t.prototype._setFastBlockNumber=function(r){this._fastBlockNumber!=null&&r<this._fastBlockNumber||(this._fastQueryDate=cs(),(this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r,this._fastBlockNumberPromise=Promise.resolve(r)))},t.prototype.waitForTransaction=function(r,o,a){return ze(this,void 0,void 0,function(){return qe(this,function(c){return[2,this._waitForTransaction(r,o??1,a||0,null)]})})},t.prototype._waitForTransaction=function(r,o,a,c){return ze(this,void 0,void 0,function(){var s,n=this;return qe(this,function(i){switch(i.label){case 0:return[4,this.getTransactionReceipt(r)];case 1:return s=i.sent(),(s?s.confirmations:0)>=o?[2,s]:[2,new Promise(function(u,l){var x=[],N=!1,F=function(){return N?!0:(N=!0,x.forEach(function(Ce){Ce()}),!1)},G=function(Ce){Ce.confirmations<o||F()||u(Ce)};if(n.on(r,G),x.push(function(){n.removeListener(r,G)}),c){var K=c.startBlock,te=null,ae=function(Ce){return ze(n,void 0,void 0,function(){var Ne=this;return qe(this,function(Pe){switch(Pe.label){case 0:return N?[2]:[4,ox(1e3)];case 1:return Pe.sent(),this.getTransactionCount(c.from).then(function(Se){return ze(Ne,void 0,void 0,function(){var Ye,rt,Ae,ce,ie,_e;return qe(this,function(be){switch(be.label){case 0:return N?[2]:Se<=c.nonce?(K=Ce,[3,9]):[3,1];case 1:return[4,this.getTransaction(r)];case 2:if(Ye=be.sent(),Ye&&Ye.blockNumber!=null)return[2];te==null&&(te=K-3,te<c.startBlock&&(te=c.startBlock)),be.label=3;case 3:return te<=Ce?N?[2]:[4,this.getBlockWithTransactions(te)]:[3,9];case 4:rt=be.sent(),Ae=0,be.label=5;case 5:return Ae<rt.transactions.length?(ce=rt.transactions[Ae],ce.hash===r?[2]:ce.from===c.from&&ce.nonce===c.nonce?N?[2]:[4,this.waitForTransaction(ce.hash,o)]:[3,7]):[3,8];case 6:return ie=be.sent(),F()?[2]:(_e="replaced",ce.data===c.data&&ce.to===c.to&&ce.value.eq(c.value)?_e="repriced":ce.data==="0x"&&ce.from===ce.to&&ce.value.isZero()&&(_e="cancelled"),l($e.makeError("transaction was replaced",Je.Logger.errors.TRANSACTION_REPLACED,{cancelled:_e==="replaced"||_e==="cancelled",reason:_e,replacement:this._wrapTransaction(ce),hash:r,receipt:ie})),[2]);case 7:return Ae++,[3,5];case 8:return te++,[3,3];case 9:return N?[2]:(this.once("block",ae),[2])}})})},function(Se){N||Ne.once("block",ae)}),[2]}})})};if(N)return;n.once("block",ae),x.push(function(){n.removeListener("block",ae)})}if(typeof a=="number"&&a>0){var ge=setTimeout(function(){F()||l($e.makeError("timeout exceeded",Je.Logger.errors.TIMEOUT,{timeout:a}))},a);ge.unref&&ge.unref(),x.push(function(){clearTimeout(ge)})}})]}})})},t.prototype.getBlockNumber=function(){return ze(this,void 0,void 0,function(){return qe(this,function(r){return[2,this._getInternalBlockNumber(0)]})})},t.prototype.getGasPrice=function(){return ze(this,void 0,void 0,function(){var r;return qe(this,function(o){switch(o.label){case 0:return[4,this.getNetwork()];case 1:return o.sent(),[4,this.perform("getGasPrice",{})];case 2:r=o.sent();try{return[2,lr.BigNumber.from(r)]}catch(a){return[2,$e.throwError("bad result from backend",Je.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:r,error:a})]}return[2]}})})},t.prototype.getBalance=function(r,o){return ze(this,void 0,void 0,function(){var a,c;return qe(this,function(s){switch(s.label){case 0:return[4,this.getNetwork()];case 1:return s.sent(),[4,(0,kt.resolveProperties)({address:this._getAddress(r),blockTag:this._getBlockTag(o)})];case 2:return a=s.sent(),[4,this.perform("getBalance",a)];case 3:c=s.sent();try{return[2,lr.BigNumber.from(c)]}catch(n){return[2,$e.throwError("bad result from backend",Je.Logger.errors.SERVER_ERROR,{method:"getBalance",params:a,result:c,error:n})]}return[2]}})})},t.prototype.getTransactionCount=function(r,o){return ze(this,void 0,void 0,function(){var a,c;return qe(this,function(s){switch(s.label){case 0:return[4,this.getNetwork()];case 1:return s.sent(),[4,(0,kt.resolveProperties)({address:this._getAddress(r),blockTag:this._getBlockTag(o)})];case 2:return a=s.sent(),[4,this.perform("getTransactionCount",a)];case 3:c=s.sent();try{return[2,lr.BigNumber.from(c).toNumber()]}catch(n){return[2,$e.throwError("bad result from backend",Je.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:c,error:n})]}return[2]}})})},t.prototype.getCode=function(r,o){return ze(this,void 0,void 0,function(){var a,c;return qe(this,function(s){switch(s.label){case 0:return[4,this.getNetwork()];case 1:return s.sent(),[4,(0,kt.resolveProperties)({address:this._getAddress(r),blockTag:this._getBlockTag(o)})];case 2:return a=s.sent(),[4,this.perform("getCode",a)];case 3:c=s.sent();try{return[2,(0,je.hexlify)(c)]}catch(n){return[2,$e.throwError("bad result from backend",Je.Logger.errors.SERVER_ERROR,{method:"getCode",params:a,result:c,error:n})]}return[2]}})})},t.prototype.getStorageAt=function(r,o,a){return ze(this,void 0,void 0,function(){var c,s;return qe(this,function(n){switch(n.label){case 0:return[4,this.getNetwork()];case 1:return n.sent(),[4,(0,kt.resolveProperties)({address:this._getAddress(r),blockTag:this._getBlockTag(a),position:Promise.resolve(o).then(function(i){return(0,je.hexValue)(i)})})];case 2:return c=n.sent(),[4,this.perform("getStorageAt",c)];case 3:s=n.sent();try{return[2,(0,je.hexlify)(s)]}catch(i){return[2,$e.throwError("bad result from backend",Je.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:c,result:s,error:i})]}return[2]}})})},t.prototype._wrapTransaction=function(r,o,a){var c=this;if(o!=null&&(0,je.hexDataLength)(o)!==32)throw new Error("invalid response - sendTransaction");var s=r;return o!=null&&r.hash!==o&&$e.throwError("Transaction hash mismatch from Provider.sendTransaction.",Je.Logger.errors.UNKNOWN_ERROR,{expectedHash:r.hash,returnedHash:o}),s.wait=function(n,i){return ze(c,void 0,void 0,function(){var u,l;return qe(this,function(x){switch(x.label){case 0:return n==null&&(n=1),i==null&&(i=0),u=void 0,n!==0&&a!=null&&(u={data:r.data,from:r.from,nonce:r.nonce,to:r.to,value:r.value,startBlock:a}),[4,this._waitForTransaction(r.hash,n,i,u)];case 1:return l=x.sent(),l==null&&n===0?[2,null]:(this._emitted["t:"+r.hash]=l.blockNumber,l.status===0&&$e.throwError("transaction failed",Je.Logger.errors.CALL_EXCEPTION,{transactionHash:r.hash,transaction:r,receipt:l}),[2,l])}})})},s},t.prototype.sendTransaction=function(r){return ze(this,void 0,void 0,function(){var o,a,c,s,n;return qe(this,function(i){switch(i.label){case 0:return[4,this.getNetwork()];case 1:return i.sent(),[4,Promise.resolve(r).then(function(u){return(0,je.hexlify)(u)})];case 2:return o=i.sent(),a=this.formatter.transaction(r),a.confirmations==null&&(a.confirmations=0),[4,this._getInternalBlockNumber(100+2*this.pollingInterval)];case 3:c=i.sent(),i.label=4;case 4:return i.trys.push([4,6,,7]),[4,this.perform("sendTransaction",{signedTransaction:o})];case 5:return s=i.sent(),[2,this._wrapTransaction(a,s,c)];case 6:throw n=i.sent(),n.transaction=a,n.transactionHash=a.hash,n;case 7:return[2]}})})},t.prototype._getTransactionRequest=function(r){return ze(this,void 0,void 0,function(){var o,a,c,s,n=this;return qe(this,function(i){switch(i.label){case 0:return[4,r];case 1:return o=i.sent(),a={},["from","to"].forEach(function(u){o[u]!=null&&(a[u]=Promise.resolve(o[u]).then(function(l){return l?n._getAddress(l):null}))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(function(u){o[u]!=null&&(a[u]=Promise.resolve(o[u]).then(function(l){return l?lr.BigNumber.from(l):null}))}),["type"].forEach(function(u){o[u]!=null&&(a[u]=Promise.resolve(o[u]).then(function(l){return l??null}))}),o.accessList&&(a.accessList=this.formatter.accessList(o.accessList)),["data"].forEach(function(u){o[u]!=null&&(a[u]=Promise.resolve(o[u]).then(function(l){return l?(0,je.hexlify)(l):null}))}),s=(c=this.formatter).transactionRequest,[4,(0,kt.resolveProperties)(a)];case 2:return[2,s.apply(c,[i.sent()])]}})})},t.prototype._getFilter=function(r){return ze(this,void 0,void 0,function(){var o,a,c,s=this;return qe(this,function(n){switch(n.label){case 0:return[4,r];case 1:return r=n.sent(),o={},r.address!=null&&(o.address=this._getAddress(r.address)),["blockHash","topics"].forEach(function(i){r[i]!=null&&(o[i]=r[i])}),["fromBlock","toBlock"].forEach(function(i){r[i]!=null&&(o[i]=s._getBlockTag(r[i]))}),c=(a=this.formatter).filter,[4,(0,kt.resolveProperties)(o)];case 2:return[2,c.apply(a,[n.sent()])]}})})},t.prototype._call=function(r,o,a){return ze(this,void 0,void 0,function(){var c,s,n,i,u,l,x,N,F,G,K,te,ae,ge,Ce,Ne;return qe(this,function(Pe){switch(Pe.label){case 0:return a>=WE&&$e.throwError("CCIP read exceeded maximum redirections",Je.Logger.errors.SERVER_ERROR,{redirects:a,transaction:r}),c=r.to,[4,this.perform("call",{transaction:r,blockTag:o})];case 1:if(s=Pe.sent(),!(a>=0&&o==="latest"&&c!=null&&s.substring(0,10)==="0x556f1830"&&(0,je.hexDataLength)(s)%32===4))return[3,5];Pe.label=2;case 2:for(Pe.trys.push([2,4,,5]),n=(0,je.hexDataSlice)(s,4),i=(0,je.hexDataSlice)(n,0,32),lr.BigNumber.from(i).eq(c)||$e.throwError("CCIP Read sender did not match",Je.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:r,data:s}),u=[],l=lr.BigNumber.from((0,je.hexDataSlice)(n,32,64)).toNumber(),x=lr.BigNumber.from((0,je.hexDataSlice)(n,l,l+32)).toNumber(),N=(0,je.hexDataSlice)(n,l+32),F=0;F<x;F++)G=Ad(N,F*32),G==null&&$e.throwError("CCIP Read contained corrupt URL string",Je.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:r,data:s}),u.push(G);return K=ls(n,64),lr.BigNumber.from((0,je.hexDataSlice)(n,100,128)).isZero()||$e.throwError("CCIP Read callback selector included junk",Je.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:r,data:s}),te=(0,je.hexDataSlice)(n,96,100),ae=ls(n,128),[4,this.ccipReadFetch(r,K,u)];case 3:return ge=Pe.sent(),ge==null&&$e.throwError("CCIP Read disabled or provided no URLs",Je.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:r,data:s}),Ce={to:c,data:(0,je.hexConcat)([te,lx([ge,ae])])},[2,this._call(Ce,o,a+1)];case 4:if(Ne=Pe.sent(),Ne.code===Je.Logger.errors.SERVER_ERROR)throw Ne;return[3,5];case 5:try{return[2,(0,je.hexlify)(s)]}catch(Se){return[2,$e.throwError("bad result from backend",Je.Logger.errors.SERVER_ERROR,{method:"call",params:{transaction:r,blockTag:o},result:s,error:Se})]}return[2]}})})},t.prototype.call=function(r,o){return ze(this,void 0,void 0,function(){var a;return qe(this,function(c){switch(c.label){case 0:return[4,this.getNetwork()];case 1:return c.sent(),[4,(0,kt.resolveProperties)({transaction:this._getTransactionRequest(r),blockTag:this._getBlockTag(o),ccipReadEnabled:Promise.resolve(r.ccipReadEnabled)})];case 2:return a=c.sent(),[2,this._call(a.transaction,a.blockTag,a.ccipReadEnabled?0:-1)]}})})},t.prototype.estimateGas=function(r){return ze(this,void 0,void 0,function(){var o,a;return qe(this,function(c){switch(c.label){case 0:return[4,this.getNetwork()];case 1:return c.sent(),[4,(0,kt.resolveProperties)({transaction:this._getTransactionRequest(r)})];case 2:return o=c.sent(),[4,this.perform("estimateGas",o)];case 3:a=c.sent();try{return[2,lr.BigNumber.from(a)]}catch(s){return[2,$e.throwError("bad result from backend",Je.Logger.errors.SERVER_ERROR,{method:"estimateGas",params:o,result:a,error:s})]}return[2]}})})},t.prototype._getAddress=function(r){return ze(this,void 0,void 0,function(){var o;return qe(this,function(a){switch(a.label){case 0:return[4,r];case 1:return r=a.sent(),typeof r!="string"&&$e.throwArgumentError("invalid address or ENS name","name",r),[4,this.resolveName(r)];case 2:return o=a.sent(),o==null&&$e.throwError("ENS name not configured",Je.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName("+JSON.stringify(r)+")"}),[2,o]}})})},t.prototype._getBlock=function(r,o){return ze(this,void 0,void 0,function(){var a,c,s,n,i=this;return qe(this,function(u){switch(u.label){case 0:return[4,this.getNetwork()];case 1:return u.sent(),[4,r];case 2:return r=u.sent(),a=-128,c={includeTransactions:!!o},(0,je.isHexString)(r,32)?(c.blockHash=r,[3,6]):[3,3];case 3:return u.trys.push([3,5,,6]),s=c,[4,this._getBlockTag(r)];case 4:return s.blockTag=u.sent(),(0,je.isHexString)(c.blockTag)&&(a=parseInt(c.blockTag.substring(2),16)),[3,6];case 5:return n=u.sent(),$e.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",r),[3,6];case 6:return[2,(0,ja.poll)(function(){return ze(i,void 0,void 0,function(){var l,x,N,F,G,K,te=this;return qe(this,function(ae){switch(ae.label){case 0:return[4,this.perform("getBlock",c)];case 1:if(l=ae.sent(),l==null)return c.blockHash!=null&&this._emitted["b:"+c.blockHash]==null?[2,null]:c.blockTag!=null&&a>this._emitted.block?[2,null]:[2,void 0];if(!o)return[3,8];x=null,N=0,ae.label=2;case 2:return N<l.transactions.length?(F=l.transactions[N],F.blockNumber!=null?[3,3]:(F.confirmations=0,[3,6])):[3,7];case 3:return F.confirmations!=null?[3,6]:x!=null?[3,5]:[4,this._getInternalBlockNumber(100+2*this.pollingInterval)];case 4:x=ae.sent(),ae.label=5;case 5:G=x-F.blockNumber+1,G<=0&&(G=1),F.confirmations=G,ae.label=6;case 6:return N++,[3,2];case 7:return K=this.formatter.blockWithTransactions(l),K.transactions=K.transactions.map(function(ge){return te._wrapTransaction(ge)}),[2,K];case 8:return[2,this.formatter.block(l)]}})})},{oncePoll:this})]}})})},t.prototype.getBlock=function(r){return this._getBlock(r,!1)},t.prototype.getBlockWithTransactions=function(r){return this._getBlock(r,!0)},t.prototype.getTransaction=function(r){return ze(this,void 0,void 0,function(){var o,a=this;return qe(this,function(c){switch(c.label){case 0:return[4,this.getNetwork()];case 1:return c.sent(),[4,r];case 2:return r=c.sent(),o={transactionHash:this.formatter.hash(r,!0)},[2,(0,ja.poll)(function(){return ze(a,void 0,void 0,function(){var s,n,i,u;return qe(this,function(l){switch(l.label){case 0:return[4,this.perform("getTransaction",o)];case 1:return s=l.sent(),s==null?this._emitted["t:"+r]==null?[2,null]:[2,void 0]:(n=this.formatter.transactionResponse(s),n.blockNumber!=null?[3,2]:(n.confirmations=0,[3,4]));case 2:return n.confirmations!=null?[3,4]:[4,this._getInternalBlockNumber(100+2*this.pollingInterval)];case 3:i=l.sent(),u=i-n.blockNumber+1,u<=0&&(u=1),n.confirmations=u,l.label=4;case 4:return[2,this._wrapTransaction(n)]}})})},{oncePoll:this})]}})})},t.prototype.getTransactionReceipt=function(r){return ze(this,void 0,void 0,function(){var o,a=this;return qe(this,function(c){switch(c.label){case 0:return[4,this.getNetwork()];case 1:return c.sent(),[4,r];case 2:return r=c.sent(),o={transactionHash:this.formatter.hash(r,!0)},[2,(0,ja.poll)(function(){return ze(a,void 0,void 0,function(){var s,n,i,u;return qe(this,function(l){switch(l.label){case 0:return[4,this.perform("getTransactionReceipt",o)];case 1:return s=l.sent(),s==null?this._emitted["t:"+r]==null?[2,null]:[2,void 0]:s.blockHash==null?[2,void 0]:(n=this.formatter.receipt(s),n.blockNumber!=null?[3,2]:(n.confirmations=0,[3,4]));case 2:return n.confirmations!=null?[3,4]:[4,this._getInternalBlockNumber(100+2*this.pollingInterval)];case 3:i=l.sent(),u=i-n.blockNumber+1,u<=0&&(u=1),n.confirmations=u,l.label=4;case 4:return[2,n]}})})},{oncePoll:this})]}})})},t.prototype.getLogs=function(r){return ze(this,void 0,void 0,function(){var o,a;return qe(this,function(c){switch(c.label){case 0:return[4,this.getNetwork()];case 1:return c.sent(),[4,(0,kt.resolveProperties)({filter:this._getFilter(r)})];case 2:return o=c.sent(),[4,this.perform("getLogs",o)];case 3:return a=c.sent(),a.forEach(function(s){s.removed==null&&(s.removed=!1)}),[2,ex.Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)]}})})},t.prototype.getEtherPrice=function(){return ze(this,void 0,void 0,function(){return qe(this,function(r){switch(r.label){case 0:return[4,this.getNetwork()];case 1:return r.sent(),[2,this.perform("getEtherPrice",{})]}})})},t.prototype._getBlockTag=function(r){return ze(this,void 0,void 0,function(){var o;return qe(this,function(a){switch(a.label){case 0:return[4,r];case 1:return r=a.sent(),typeof r=="number"&&r<0?(r%1&&$e.throwArgumentError("invalid BlockTag","blockTag",r),[4,this._getInternalBlockNumber(100+2*this.pollingInterval)]):[3,3];case 2:return o=a.sent(),o+=r,o<0&&(o=0),[2,this.formatter.blockTag(o)];case 3:return[2,this.formatter.blockTag(r)]}})})},t.prototype.getResolver=function(r){return ze(this,void 0,void 0,function(){var o,a,c,s;return qe(this,function(n){switch(n.label){case 0:o=r,n.label=1;case 1:return o===""||o==="."?[2,null]:r!=="eth"&&o==="eth"?[2,null]:[4,this._getResolver(o,"getResolver")];case 2:return a=n.sent(),a==null?[3,5]:(c=new A0(this,a,r),s=o!==r,s?[4,c.supportsWildcard()]:[3,4]);case 3:s=!n.sent(),n.label=4;case 4:return s?[2,null]:[2,c];case 5:return o=o.split(".").slice(1).join("."),[3,1];case 6:return[2]}})})},t.prototype._getResolver=function(r,o){return ze(this,void 0,void 0,function(){var a,c,s;return qe(this,function(n){switch(n.label){case 0:return o==null&&(o="ENS"),[4,this.getNetwork()];case 1:a=n.sent(),a.ensAddress||$e.throwError("network does not support ENS",Je.Logger.errors.UNSUPPORTED_OPERATION,{operation:o,network:a.name}),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,this.call({to:a.ensAddress,data:"0x0178b8bf"+(0,us.namehash)(r).substring(2)})];case 3:return c=n.sent(),[2,this.formatter.callAddress(c)];case 4:return s=n.sent(),[3,5];case 5:return[2,null]}})})},t.prototype.resolveName=function(r){return ze(this,void 0,void 0,function(){var o;return qe(this,function(a){switch(a.label){case 0:return[4,r];case 1:r=a.sent();try{return[2,Promise.resolve(this.formatter.address(r))]}catch(c){if((0,je.isHexString)(r))throw c}return typeof r!="string"&&$e.throwArgumentError("invalid ENS name","name",r),[4,this.getResolver(r)];case 2:return o=a.sent(),o?[4,o.getAddress()]:[2,null];case 3:return[2,a.sent()]}})})},t.prototype.lookupAddress=function(r){return ze(this,void 0,void 0,function(){var o,a,c,s,n;return qe(this,function(i){switch(i.label){case 0:return[4,r];case 1:return r=i.sent(),r=this.formatter.address(r),o=r.substring(2).toLowerCase()+".addr.reverse",[4,this._getResolver(o,"lookupAddress")];case 2:return a=i.sent(),a==null?[2,null]:(s=Ad,[4,this.call({to:a,data:"0x691f3431"+(0,us.namehash)(o).substring(2)})]);case 3:return c=s.apply(void 0,[i.sent(),0]),[4,this.resolveName(c)];case 4:return n=i.sent(),n!=r?[2,null]:[2,c]}})})},t.prototype.getAvatar=function(r){return ze(this,void 0,void 0,function(){var o,a,c,s,n,i,u,l,x,N;return qe(this,function(F){switch(F.label){case 0:return o=null,(0,je.isHexString)(r)?(a=this.formatter.address(r),c=a.substring(2).toLowerCase()+".addr.reverse",[4,this._getResolver(c,"getAvatar")]):[3,10];case 1:if(s=F.sent(),!s)return[2,null];o=new A0(this,s,c),F.label=2;case 2:return F.trys.push([2,4,,5]),[4,o.getAvatar()];case 3:return n=F.sent(),n?[2,n.url]:[3,5];case 4:if(i=F.sent(),i.code!==Je.Logger.errors.CALL_EXCEPTION)throw i;return[3,5];case 5:return F.trys.push([5,8,,9]),l=Ad,[4,this.call({to:s,data:"0x691f3431"+(0,us.namehash)(c).substring(2)})];case 6:return u=l.apply(void 0,[F.sent(),0]),[4,this.getResolver(u)];case 7:return o=F.sent(),[3,9];case 8:if(x=F.sent(),x.code!==Je.Logger.errors.CALL_EXCEPTION)throw x;return[2,null];case 9:return[3,12];case 10:return[4,this.getResolver(r)];case 11:if(o=F.sent(),!o)return[2,null];F.label=12;case 12:return[4,o.getAvatar()];case 13:return N=F.sent(),N==null?[2,null]:[2,N.url]}})})},t.prototype.perform=function(r,o){return $e.throwError(r+" not implemented",Je.Logger.errors.NOT_IMPLEMENTED,{operation:r})},t.prototype._startEvent=function(r){this.polling=this._events.filter(function(o){return o.pollable()}).length>0},t.prototype._stopEvent=function(r){this.polling=this._events.filter(function(o){return o.pollable()}).length>0},t.prototype._addEventListener=function(r,o,a){var c=new cx(La(r),o,a);return this._events.push(c),this._startEvent(c),this},t.prototype.on=function(r,o){return this._addEventListener(r,o,!1)},t.prototype.once=function(r,o){return this._addEventListener(r,o,!0)},t.prototype.emit=function(r){for(var o=this,a=[],c=1;c<arguments.length;c++)a[c-1]=arguments[c];var s=!1,n=[],i=La(r);return this._events=this._events.filter(function(u){return u.tag!==i?!0:(setTimeout(function(){u.listener.apply(o,a)},0),s=!0,u.once?(n.push(u),!1):!0)}),n.forEach(function(u){o._stopEvent(u)}),s},t.prototype.listenerCount=function(r){if(!r)return this._events.length;var o=La(r);return this._events.filter(function(a){return a.tag===o}).length},t.prototype.listeners=function(r){if(r==null)return this._events.map(function(a){return a.listener});var o=La(r);return this._events.filter(function(a){return a.tag===o}).map(function(a){return a.listener})},t.prototype.off=function(r,o){var a=this;if(o==null)return this.removeAllListeners(r);var c=[],s=!1,n=La(r);return this._events=this._events.filter(function(i){return i.tag!==n||i.listener!=o||s?!0:(s=!0,c.push(i),!1)}),c.forEach(function(i){a._stopEvent(i)}),this},t.prototype.removeAllListeners=function(r){var o=this,a=[];if(r==null)a=this._events,this._events=[];else{var c=La(r);this._events=this._events.filter(function(s){return s.tag!==c?!0:(a.push(s),!1)})}return a.forEach(function(s){o._stopEvent(s)}),this},t}(sx.Provider);dr.BaseProvider=VE});var qa=R(Hr=>{"use strict";g();y();var C0=Hr&&Hr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),zo=Hr&&Hr.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},qo=Hr&&Hr.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.JsonRpcProvider=Hr.JsonRpcSigner=void 0;var GE=Gi(),w0=br(),za=gt(),dx=va(),Ft=yt(),fx=eo(),HE=Qo(),hx=Yn(),Ut=Ze(),$E=er(),Dt=new Ut.Logger($E.version),KE=ds(),ZE=["call","estimateGas"];function ps(e,t){if(e==null)return null;if(typeof e.message=="string"&&e.message.match("reverted")){var r=(0,za.isHexString)(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if(typeof e=="object"){for(var o in e){var a=ps(e[o],t);if(a)return a}return null}if(typeof e=="string")try{return ps(JSON.parse(e),t)}catch{}return null}function gx(e,t,r){var o=r.transaction||r.signedTransaction;if(e==="call"){var a=ps(t,!0);if(a)return a.data;Dt.throwError("missing revert data in call exception; Transaction reverted without a reason string",Ut.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:o,error:t})}if(e==="estimateGas"){var a=ps(t.body,!1);a==null&&(a=ps(t,!1)),a&&Dt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Ut.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:a.message,method:e,transaction:o,error:t})}var c=t.message;throw t.code===Ut.Logger.errors.SERVER_ERROR&&t.error&&typeof t.error.message=="string"?c=t.error.message:typeof t.body=="string"?c=t.body:typeof t.responseText=="string"&&(c=t.responseText),c=(c||"").toLowerCase(),c.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Dt.throwError("insufficient funds for intrinsic transaction cost",Ut.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:o}),c.match(/nonce (is )?too low/i)&&Dt.throwError("nonce has already been used",Ut.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:o}),c.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Dt.throwError("replacement fee too low",Ut.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:o}),c.match(/only replay-protected/i)&&Dt.throwError("legacy pre-eip-155 transactions not supported",Ut.Logger.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:o}),ZE.indexOf(e)>=0&&c.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Dt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Ut.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:o}),t}function px(e){return new Promise(function(t){setTimeout(t,e)})}function JE(e){if(e.error){var t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function fs(e){return e&&e.toLowerCase()}var _0={},B0=function(e){C0(t,e);function t(r,o,a){var c=e.call(this)||this;if(r!==_0)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return(0,Ft.defineReadOnly)(c,"provider",o),a==null&&(a=0),typeof a=="string"?((0,Ft.defineReadOnly)(c,"_address",c.provider.formatter.address(a)),(0,Ft.defineReadOnly)(c,"_index",null)):typeof a=="number"?((0,Ft.defineReadOnly)(c,"_index",a),(0,Ft.defineReadOnly)(c,"_address",null)):Dt.throwArgumentError("invalid address or index","addressOrIndex",a),c}return t.prototype.connect=function(r){return Dt.throwError("cannot alter JSON-RPC Signer connection",Ut.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})},t.prototype.connectUnchecked=function(){return new YE(_0,this.provider,this._address||this._index)},t.prototype.getAddress=function(){var r=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(function(o){return o.length<=r._index&&Dt.throwError("unknown account #"+r._index,Ut.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),r.provider.formatter.address(o[r._index])})},t.prototype.sendUncheckedTransaction=function(r){var o=this;r=(0,Ft.shallowCopy)(r);var a=this.getAddress().then(function(s){return s&&(s=s.toLowerCase()),s});if(r.gasLimit==null){var c=(0,Ft.shallowCopy)(r);c.from=a,r.gasLimit=this.provider.estimateGas(c)}return r.to!=null&&(r.to=Promise.resolve(r.to).then(function(s){return zo(o,void 0,void 0,function(){var n;return qo(this,function(i){switch(i.label){case 0:return s==null?[2,null]:[4,this.provider.resolveName(s)];case 1:return n=i.sent(),n==null&&Dt.throwArgumentError("provided ENS name resolves to null","tx.to",s),[2,n]}})})})),(0,Ft.resolveProperties)({tx:(0,Ft.resolveProperties)(r),sender:a}).then(function(s){var n=s.tx,i=s.sender;n.from!=null?n.from.toLowerCase()!==i&&Dt.throwArgumentError("from address mismatch","transaction",r):n.from=i;var u=o.provider.constructor.hexlifyTransaction(n,{from:!0});return o.provider.send("eth_sendTransaction",[u]).then(function(l){return l},function(l){return typeof l.message=="string"&&l.message.match(/user denied/i)&&Dt.throwError("user rejected transaction",Ut.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),gx("sendTransaction",l,u)})})},t.prototype.signTransaction=function(r){return Dt.throwError("signing transactions is unsupported",Ut.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})},t.prototype.sendTransaction=function(r){return zo(this,void 0,void 0,function(){var o,a,c,s=this;return qo(this,function(n){switch(n.label){case 0:return[4,this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval)];case 1:return o=n.sent(),[4,this.sendUncheckedTransaction(r)];case 2:a=n.sent(),n.label=3;case 3:return n.trys.push([3,5,,6]),[4,(0,hx.poll)(function(){return zo(s,void 0,void 0,function(){var i;return qo(this,function(u){switch(u.label){case 0:return[4,this.provider.getTransaction(a)];case 1:return i=u.sent(),i===null?[2,void 0]:[2,this.provider._wrapTransaction(i,a,o)]}})})},{oncePoll:this.provider})];case 4:return[2,n.sent()];case 5:throw c=n.sent(),c.transactionHash=a,c;case 6:return[2]}})})},t.prototype.signMessage=function(r){return zo(this,void 0,void 0,function(){var o,a,c;return qo(this,function(s){switch(s.label){case 0:return o=typeof r=="string"?(0,fx.toUtf8Bytes)(r):r,[4,this.getAddress()];case 1:a=s.sent(),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,this.provider.send("personal_sign",[(0,za.hexlify)(o),a.toLowerCase()])];case 3:return[2,s.sent()];case 4:throw c=s.sent(),typeof c.message=="string"&&c.message.match(/user denied/i)&&Dt.throwError("user rejected signing",Ut.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:r}),c;case 5:return[2]}})})},t.prototype._legacySignMessage=function(r){return zo(this,void 0,void 0,function(){var o,a,c;return qo(this,function(s){switch(s.label){case 0:return o=typeof r=="string"?(0,fx.toUtf8Bytes)(r):r,[4,this.getAddress()];case 1:a=s.sent(),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,this.provider.send("eth_sign",[a.toLowerCase(),(0,za.hexlify)(o)])];case 3:return[2,s.sent()];case 4:throw c=s.sent(),typeof c.message=="string"&&c.message.match(/user denied/i)&&Dt.throwError("user rejected signing",Ut.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:r}),c;case 5:return[2]}})})},t.prototype._signTypedData=function(r,o,a){return zo(this,void 0,void 0,function(){var c,s,n,i=this;return qo(this,function(u){switch(u.label){case 0:return[4,dx._TypedDataEncoder.resolveNames(r,o,a,function(l){return i.provider.resolveName(l)})];case 1:return c=u.sent(),[4,this.getAddress()];case 2:s=u.sent(),u.label=3;case 3:return u.trys.push([3,5,,6]),[4,this.provider.send("eth_signTypedData_v4",[s.toLowerCase(),JSON.stringify(dx._TypedDataEncoder.getPayload(c.domain,o,c.value))])];case 4:return[2,u.sent()];case 5:throw n=u.sent(),typeof n.message=="string"&&n.message.match(/user denied/i)&&Dt.throwError("user rejected signing",Ut.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:c.domain,types:o,value:c.value}}),n;case 6:return[2]}})})},t.prototype.unlock=function(r){return zo(this,void 0,void 0,function(){var o,a;return qo(this,function(c){switch(c.label){case 0:return o=this.provider,[4,this.getAddress()];case 1:return a=c.sent(),[2,o.send("personal_unlockAccount",[a.toLowerCase(),r,null])]}})})},t}(GE.Signer);Hr.JsonRpcSigner=B0;var YE=function(e){C0(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.sendTransaction=function(r){var o=this;return this.sendUncheckedTransaction(r).then(function(a){return{hash:a,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(c){return o.provider.waitForTransaction(a,c)}}})},t}(B0),XE={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},QE=function(e){C0(t,e);function t(r,o){var a=this,c=o;return c==null&&(c=new Promise(function(s,n){setTimeout(function(){a.detectNetwork().then(function(i){s(i)},function(i){n(i)})},0)})),a=e.call(this,c)||this,r||(r=(0,Ft.getStatic)(a.constructor,"defaultUrl")()),typeof r=="string"?(0,Ft.defineReadOnly)(a,"connection",Object.freeze({url:r})):(0,Ft.defineReadOnly)(a,"connection",Object.freeze((0,Ft.shallowCopy)(r))),a._nextId=42,a}return Object.defineProperty(t.prototype,"_cache",{get:function(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache},enumerable:!1,configurable:!0}),t.defaultUrl=function(){return"http://localhost:8545"},t.prototype.detectNetwork=function(){var r=this;return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(function(){r._cache.detectNetwork=null},0)),this._cache.detectNetwork},t.prototype._uncachedDetectNetwork=function(){return zo(this,void 0,void 0,function(){var r,o,a,c;return qo(this,function(s){switch(s.label){case 0:return[4,px(0)];case 1:s.sent(),r=null,s.label=2;case 2:return s.trys.push([2,4,,9]),[4,this.send("eth_chainId",[])];case 3:return r=s.sent(),[3,9];case 4:o=s.sent(),s.label=5;case 5:return s.trys.push([5,7,,8]),[4,this.send("net_version",[])];case 6:return r=s.sent(),[3,8];case 7:return a=s.sent(),[3,8];case 8:return[3,9];case 9:if(r!=null){c=(0,Ft.getStatic)(this.constructor,"getNetwork");try{return[2,c(w0.BigNumber.from(r).toNumber())]}catch(n){return[2,Dt.throwError("could not detect network",Ut.Logger.errors.NETWORK_ERROR,{chainId:r,event:"invalidNetwork",serverError:n})]}}return[2,Dt.throwError("could not detect network",Ut.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})]}})})},t.prototype.getSigner=function(r){return new B0(_0,this,r)},t.prototype.getUncheckedSigner=function(r){return this.getSigner(r).connectUnchecked()},t.prototype.listAccounts=function(){var r=this;return this.send("eth_accounts",[]).then(function(o){return o.map(function(a){return r.formatter.address(a)})})},t.prototype.send=function(r,o){var a=this,c={method:r,params:o,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,Ft.deepCopy)(c),provider:this});var s=["eth_chainId","eth_blockNumber"].indexOf(r)>=0;if(s&&this._cache[r])return this._cache[r];var n=(0,hx.fetchJson)(this.connection,JSON.stringify(c),JE).then(function(i){return a.emit("debug",{action:"response",request:c,response:i,provider:a}),i},function(i){throw a.emit("debug",{action:"response",error:i,request:c,provider:a}),i});return s&&(this._cache[r]=n,setTimeout(function(){a._cache[r]=null},0)),n},t.prototype.prepareRequest=function(r,o){switch(r){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[fs(o.address),o.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[fs(o.address),o.blockTag]];case"getCode":return["eth_getCode",[fs(o.address),o.blockTag]];case"getStorageAt":return["eth_getStorageAt",[fs(o.address),(0,za.hexZeroPad)(o.position,32),o.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[o.signedTransaction]];case"getBlock":return o.blockTag?["eth_getBlockByNumber",[o.blockTag,!!o.includeTransactions]]:o.blockHash?["eth_getBlockByHash",[o.blockHash,!!o.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[o.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[o.transactionHash]];case"call":{var a=(0,Ft.getStatic)(this.constructor,"hexlifyTransaction");return["eth_call",[a(o.transaction,{from:!0}),o.blockTag]]}case"estimateGas":{var a=(0,Ft.getStatic)(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(o.transaction,{from:!0})]]}case"getLogs":return o.filter&&o.filter.address!=null&&(o.filter.address=fs(o.filter.address)),["eth_getLogs",[o.filter]];default:break}return null},t.prototype.perform=function(r,o){return zo(this,void 0,void 0,function(){var a,c,s,n;return qo(this,function(i){switch(i.label){case 0:return r==="call"||r==="estimateGas"?(a=o.transaction,a&&a.type!=null&&w0.BigNumber.from(a.type).isZero()?a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null?[4,this.getFeeData()]:[3,2]:[3,2]):[3,2];case 1:c=i.sent(),c.maxFeePerGas==null&&c.maxPriorityFeePerGas==null&&(o=(0,Ft.shallowCopy)(o),o.transaction=(0,Ft.shallowCopy)(a),delete o.transaction.type),i.label=2;case 2:s=this.prepareRequest(r,o),s==null&&Dt.throwError(r+" not implemented",Ut.Logger.errors.NOT_IMPLEMENTED,{operation:r}),i.label=3;case 3:return i.trys.push([3,5,,6]),[4,this.send(s[0],s[1])];case 4:return[2,i.sent()];case 5:return n=i.sent(),[2,gx(r,n,o)];case 6:return[2]}})})},t.prototype._startEvent=function(r){r.tag==="pending"&&this._startPending(),e.prototype._startEvent.call(this,r)},t.prototype._startPending=function(){if(this._pendingFilter==null){var r=this,o=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=o,o.then(function(a){function c(){r.send("eth_getFilterChanges",[a]).then(function(s){if(r._pendingFilter!=o)return null;var n=Promise.resolve();return s.forEach(function(i){r._emitted["t:"+i.toLowerCase()]="pending",n=n.then(function(){return r.getTransaction(i).then(function(u){return r.emit("pending",u),null})})}),n.then(function(){return px(1e3)})}).then(function(){if(r._pendingFilter!=o){r.send("eth_uninstallFilter",[a]);return}return setTimeout(function(){c()},0),null}).catch(function(s){})}return c(),a}).catch(function(a){})}},t.prototype._stopEvent=function(r){r.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),e.prototype._stopEvent.call(this,r)},t.hexlifyTransaction=function(r,o){var a=(0,Ft.shallowCopy)(XE);if(o)for(var c in o)o[c]&&(a[c]=!0);(0,Ft.checkProperties)(r,a);var s={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(n){if(r[n]!=null){var i=(0,za.hexValue)(w0.BigNumber.from(r[n]));n==="gasLimit"&&(n="gas"),s[n]=i}}),["from","to","data"].forEach(function(n){r[n]!=null&&(s[n]=(0,za.hexlify)(r[n]))}),r.accessList&&(s.accessList=(0,HE.accessListify)(r.accessList)),s},t}(KE.BaseProvider);Hr.JsonRpcProvider=QE});var bx=R(Va=>{"use strict";g();y();Object.defineProperty(Va,"__esModule",{value:!0});Va.WebSocket=void 0;var yx=Ze(),eP=er(),wd=null;Va.WebSocket=wd;try{if(Va.WebSocket=wd=WebSocket,wd==null)throw new Error("inject please")}catch{vx=new yx.Logger(eP.version),Va.WebSocket=wd=function(){vx.throwError("WebSockets not supported in this environment",yx.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var vx});var Cd=R(Ao=>{"use strict";g();y();var tP=Ao&&Ao.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),E0=Ao&&Ao.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},P0=Ao&&Ao.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.WebSocketProvider=void 0;var rP=br(),hn=yt(),oP=qa(),mx=bx(),hs=Ze(),nP=er(),_d=new hs.Logger(nP.version),aP=1,iP=function(e){tP(t,e);function t(r,o){var a=this;o==="any"&&_d.throwError("WebSocketProvider does not support 'any' network yet",hs.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof r=="string"?a=e.call(this,r,o)||this:a=e.call(this,"_websocket",o)||this,a._pollingInterval=-1,a._wsReady=!1,typeof r=="string"?(0,hn.defineReadOnly)(a,"_websocket",new mx.WebSocket(a.connection.url)):(0,hn.defineReadOnly)(a,"_websocket",r),(0,hn.defineReadOnly)(a,"_requests",{}),(0,hn.defineReadOnly)(a,"_subs",{}),(0,hn.defineReadOnly)(a,"_subIds",{}),(0,hn.defineReadOnly)(a,"_detectNetwork",e.prototype.detectNetwork.call(a)),a.websocket.onopen=function(){a._wsReady=!0,Object.keys(a._requests).forEach(function(s){a.websocket.send(a._requests[s].payload)})},a.websocket.onmessage=function(s){var n=s.data,i=JSON.parse(n);if(i.id!=null){var u=String(i.id),l=a._requests[u];if(delete a._requests[u],i.result!==void 0)l.callback(null,i.result),a.emit("debug",{action:"response",request:JSON.parse(l.payload),response:i.result,provider:a});else{var x=null;i.error?(x=new Error(i.error.message||"unknown error"),(0,hn.defineReadOnly)(x,"code",i.error.code||null),(0,hn.defineReadOnly)(x,"response",n)):x=new Error("unknown error"),l.callback(x,void 0),a.emit("debug",{action:"response",error:x,request:JSON.parse(l.payload),provider:a})}}else if(i.method==="eth_subscription"){var N=a._subs[i.params.subscription];N&&N.processFunc(i.params.result)}else console.warn("this should not happen")};var c=setInterval(function(){a.emit("poll")},1e3);return c.unref&&c.unref(),a}return Object.defineProperty(t.prototype,"websocket",{get:function(){return this._websocket},enumerable:!1,configurable:!0}),t.prototype.detectNetwork=function(){return this._detectNetwork},Object.defineProperty(t.prototype,"pollingInterval",{get:function(){return 0},set:function(r){_d.throwError("cannot set polling interval on WebSocketProvider",hs.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})},enumerable:!1,configurable:!0}),t.prototype.resetEventsBlock=function(r){_d.throwError("cannot reset events block on WebSocketProvider",hs.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})},t.prototype.poll=function(){return E0(this,void 0,void 0,function(){return P0(this,function(r){return[2,null]})})},Object.defineProperty(t.prototype,"polling",{set:function(r){!r||_d.throwError("cannot set polling on WebSocketProvider",hs.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})},enumerable:!1,configurable:!0}),t.prototype.send=function(r,o){var a=this,c=aP++;return new Promise(function(s,n){function i(l,x){return l?n(l):s(x)}var u=JSON.stringify({method:r,params:o,id:c,jsonrpc:"2.0"});a.emit("debug",{action:"request",request:JSON.parse(u),provider:a}),a._requests[String(c)]={callback:i,payload:u},a._wsReady&&a.websocket.send(u)})},t.defaultUrl=function(){return"ws://localhost:8546"},t.prototype._subscribe=function(r,o,a){return E0(this,void 0,void 0,function(){var c,s,n=this;return P0(this,function(i){switch(i.label){case 0:return c=this._subIds[r],c==null&&(c=Promise.all(o).then(function(u){return n.send("eth_subscribe",u)}),this._subIds[r]=c),[4,c];case 1:return s=i.sent(),this._subs[s]={tag:r,processFunc:a},[2]}})})},t.prototype._startEvent=function(r){var o=this;switch(r.type){case"block":this._subscribe("block",["newHeads"],function(c){var s=rP.BigNumber.from(c.number).toNumber();o._emitted.block=s,o.emit("block",s)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],function(c){o.emit("pending",c)});break;case"filter":this._subscribe(r.tag,["logs",this._getFilter(r.filter)],function(c){c.removed==null&&(c.removed=!1),o.emit(r.filter,o.formatter.filterLog(c))});break;case"tx":{var a=function(c){var s=c.hash;o.getTransactionReceipt(s).then(function(n){!n||o.emit(s,n)})};a(r),this._subscribe("tx",["newHeads"],function(c){o._events.filter(function(s){return s.type==="tx"}).forEach(a)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",r);break}},t.prototype._stopEvent=function(r){var o=this,a=r.tag;if(r.type==="tx"){if(this._events.filter(function(s){return s.type==="tx"}).length)return;a="tx"}else if(this.listenerCount(r.event))return;var c=this._subIds[a];!c||(delete this._subIds[a],c.then(function(s){!o._subs[s]||(delete o._subs[s],o.send("eth_unsubscribe",[s]))}))},t.prototype.destroy=function(){return E0(this,void 0,void 0,function(){var r=this;return P0(this,function(o){switch(o.label){case 0:return this.websocket.readyState!==mx.WebSocket.CONNECTING?[3,2]:[4,new Promise(function(a){r.websocket.onopen=function(){a(!0)},r.websocket.onerror=function(){a(!1)}})];case 1:o.sent(),o.label=2;case 2:return this.websocket.close(1e3),[2]}})})},t}(oP.JsonRpcProvider);Ao.WebSocketProvider=iP});var gn=R($r=>{"use strict";g();y();var xx=$r&&$r.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),sP=$r&&$r.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},cP=$r&&$r.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty($r,"__esModule",{value:!0});$r.UrlJsonRpcProvider=$r.StaticJsonRpcProvider=void 0;var Ga=yt(),Bd=Ze(),uP=er(),gs=new Bd.Logger(uP.version),lP=qa(),Ax=function(e){xx(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.detectNetwork=function(){return sP(this,void 0,void 0,function(){var r;return cP(this,function(o){switch(o.label){case 0:return r=this.network,r!=null?[3,2]:[4,e.prototype.detectNetwork.call(this)];case 1:r=o.sent(),r||gs.throwError("no network detected",Bd.Logger.errors.UNKNOWN_ERROR,{}),this._network==null&&((0,Ga.defineReadOnly)(this,"_network",r),this.emit("network",r,null)),o.label=2;case 2:return[2,r]}})})},t}(lP.JsonRpcProvider);$r.StaticJsonRpcProvider=Ax;var dP=function(e){xx(t,e);function t(r,o){var a=this.constructor,c=this;gs.checkAbstract(a,t),r=(0,Ga.getStatic)(a,"getNetwork")(r),o=(0,Ga.getStatic)(a,"getApiKey")(o);var s=(0,Ga.getStatic)(a,"getUrl")(r,o);return c=e.call(this,s,r)||this,typeof o=="string"?(0,Ga.defineReadOnly)(c,"apiKey",o):o!=null&&Object.keys(o).forEach(function(n){(0,Ga.defineReadOnly)(c,n,o[n])}),c}return t.prototype._startPending=function(){gs.warn("WARNING: API provider does not support pending filters")},t.prototype.isCommunityResource=function(){return!1},t.prototype.getSigner=function(r){return gs.throwError("API provider does not support signing",Bd.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})},t.prototype.listAccounts=function(){return Promise.resolve([])},t.getApiKey=function(r){return r},t.getUrl=function(r,o){return gs.throwError("not implemented; sub-classes must override getUrl",Bd.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})},t}(Ax);$r.UrlJsonRpcProvider=dP});var Ex=R(yn=>{"use strict";g();y();var _x=yn&&yn.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(yn,"__esModule",{value:!0});yn.AlchemyProvider=yn.AlchemyWebSocketProvider=void 0;var fP=yt(),pP=pn(),hP=Cd(),gP=Ze(),yP=er(),wx=new gP.Logger(yP.version),vP=gn(),Ed="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",Cx=function(e){_x(t,e);function t(r,o){var a=this,c=new Bx(r,o),s=c.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");return a=e.call(this,s,c.network)||this,(0,fP.defineReadOnly)(a,"apiKey",c.apiKey),a}return t.prototype.isCommunityResource=function(){return this.apiKey===Ed},t}(hP.WebSocketProvider);yn.AlchemyWebSocketProvider=Cx;var Bx=function(e){_x(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.getWebSocketProvider=function(r,o){return new Cx(r,o)},t.getApiKey=function(r){return r==null?Ed:(r&&typeof r!="string"&&wx.throwArgumentError("invalid apiKey","apiKey",r),r)},t.getUrl=function(r,o){var a=null;switch(r.name){case"homestead":a="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":a="eth-goerli.g.alchemy.com/v2/";break;case"matic":a="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":a="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":a="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":a="arb-goerli.g.alchemy.com/v2/";break;case"optimism":a="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":a="opt-goerli.g.alchemy.com/v2/";break;default:wx.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+o,throttleCallback:function(c,s){return o===Ed&&(0,pP.showThrottleMessage)(),Promise.resolve(!0)}}},t.prototype.isCommunityResource=function(){return this.apiKey===Ed},t}(vP.UrlJsonRpcProvider);yn.AlchemyProvider=Bx});var Px=R(Ha=>{"use strict";g();y();var bP=Ha&&Ha.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Ha,"__esModule",{value:!0});Ha.AnkrProvider=void 0;var mP=pn(),xP=gn(),AP=Ze(),wP=er(),_P=new AP.Logger(wP.version),Pd="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function CP(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return _P.throwArgumentError("unsupported network","name",e)}var BP=function(e){bP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.isCommunityResource=function(){return this.apiKey===Pd},t.getApiKey=function(r){return r??Pd},t.getUrl=function(r,o){o==null&&(o=Pd);var a={allowGzip:!0,url:"https://"+CP(r.name)+o,throttleCallback:function(c,s){return o.apiKey===Pd&&(0,mP.showThrottleMessage)(),Promise.resolve(!0)}};return o.projectSecret!=null&&(a.user="",a.password=o.projectSecret),a},t}(xP.UrlJsonRpcProvider);Ha.AnkrProvider=BP});var Sx=R(wo=>{"use strict";g();y();var EP=wo&&wo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),PP=wo&&wo.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},TP=wo&&wo.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(wo,"__esModule",{value:!0});wo.CloudflareProvider=void 0;var SP=gn(),OP=Ze(),IP=er(),Tx=new OP.Logger(IP.version),kP=function(e){EP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.getApiKey=function(r){return r!=null&&Tx.throwArgumentError("apiKey not supported for cloudflare","apiKey",r),null},t.getUrl=function(r,o){var a=null;switch(r.name){case"homestead":a="https://cloudflare-eth.com/";break;default:Tx.throwArgumentError("unsupported network","network",arguments[0])}return a},t.prototype.perform=function(r,o){return PP(this,void 0,void 0,function(){var a;return TP(this,function(c){switch(c.label){case 0:return r!=="getBlockNumber"?[3,2]:[4,e.prototype.perform.call(this,"getBlock",{blockTag:"latest"})];case 1:return a=c.sent(),[2,a.number];case 2:return[2,e.prototype.perform.call(this,r,o)]}})})},t}(SP.UrlJsonRpcProvider);wo.CloudflareProvider=kP});var Fx=R(Co=>{"use strict";g();y();var FP=Co&&Co.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),Td=Co&&Co.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},Sd=Co&&Co.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(Co,"__esModule",{value:!0});Co.EtherscanProvider=void 0;var Od=gt(),T0=yt(),RP=Qo(),MP=Yn(),NP=pn(),_o=Ze(),DP=er(),vn=new _o.Logger(DP.version),WP=ds();function Ox(e){var t={};for(var r in e)if(e[r]!=null){var o=e[r];r==="type"&&o===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?o=(0,Od.hexValue)((0,Od.hexlify)(o)):r==="accessList"?o="["+(0,RP.accessListify)(o).map(function(a){return'{address:"'+a.address+'",storageKeys:["'+a.storageKeys.join('","')+'"]}'}).join(",")+"]":o=(0,Od.hexlify)(o),t[r]=o)}return t}function UP(e){if(e.status==0&&(e.message==="No records found"||e.message==="No transactions found"))return e.result;if(e.status!=1||typeof e.message!="string"||!e.message.match(/^OK/)){var t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function Ix(e){if(e&&e.status==0&&e.message=="NOTOK"&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){var t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if(e.jsonrpc!="2.0"){var t=new Error("invalid response");throw t.result=JSON.stringify(e),t}if(e.error){var t=new Error(e.error.message||"unknown error");throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t}return e.result}function kx(e){if(e==="pending")throw new Error("pending not supported");return e==="latest"?e:parseInt(e.substring(2),16)}function S0(e,t,r){if(e==="call"&&t.code===_o.Logger.errors.SERVER_ERROR){var o=t.error;if(o&&(o.message.match(/reverted/i)||o.message.match(/VM execution error/i))){var a=o.data;if(a&&(a="0x"+a.replace(/^.*0x/i,"")),(0,Od.isHexString)(a))return a;vn.throwError("missing revert data in call exception",_o.Logger.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}var c=t.message;throw t.code===_o.Logger.errors.SERVER_ERROR&&(t.error&&typeof t.error.message=="string"?c=t.error.message:typeof t.body=="string"?c=t.body:typeof t.responseText=="string"&&(c=t.responseText)),c=(c||"").toLowerCase(),c.match(/insufficient funds/)&&vn.throwError("insufficient funds for intrinsic transaction cost",_o.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),c.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&vn.throwError("nonce has already been used",_o.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),c.match(/another transaction with same nonce/)&&vn.throwError("replacement fee too low",_o.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),c.match(/execution failed due to an exception|execution reverted/)&&vn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",_o.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}var LP=function(e){FP(t,e);function t(r,o){var a=e.call(this,r)||this;return(0,T0.defineReadOnly)(a,"baseUrl",a.getBaseUrl()),(0,T0.defineReadOnly)(a,"apiKey",o||null),a}return t.prototype.getBaseUrl=function(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";default:}return vn.throwArgumentError("unsupported network","network",this.network.name)},t.prototype.getUrl=function(r,o){var a=Object.keys(o).reduce(function(s,n){var i=o[n];return i!=null&&(s+="&"+n+"="+i),s},""),c=this.apiKey?"&apikey="+this.apiKey:"";return this.baseUrl+"/api?module="+r+a+c},t.prototype.getPostUrl=function(){return this.baseUrl+"/api"},t.prototype.getPostData=function(r,o){return o.module=r,o.apikey=this.apiKey,o},t.prototype.fetch=function(r,o,a){return Td(this,void 0,void 0,function(){var c,s,n,i,u,l,x=this;return Sd(this,function(N){switch(N.label){case 0:return c=a?this.getPostUrl():this.getUrl(r,o),s=a?this.getPostData(r,o):null,n=r==="proxy"?Ix:UP,this.emit("debug",{action:"request",request:c,provider:this}),i={url:c,throttleSlotInterval:1e3,throttleCallback:function(F,G){return x.isCommunityResource()&&(0,NP.showThrottleMessage)(),Promise.resolve(!0)}},u=null,s&&(i.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},u=Object.keys(s).map(function(F){return F+"="+s[F]}).join("&")),[4,(0,MP.fetchJson)(i,u,n||Ix)];case 1:return l=N.sent(),this.emit("debug",{action:"response",request:c,response:(0,T0.deepCopy)(l),provider:this}),[2,l]}})})},t.prototype.detectNetwork=function(){return Td(this,void 0,void 0,function(){return Sd(this,function(r){return[2,this.network]})})},t.prototype.perform=function(r,o){return Td(this,void 0,void 0,function(){var a,s,c,s,n,i,u,l,x,N,F,G,K;return Sd(this,function(te){switch(te.label){case 0:switch(a=r,a){case"getBlockNumber":return[3,1];case"getGasPrice":return[3,2];case"getBalance":return[3,3];case"getTransactionCount":return[3,4];case"getCode":return[3,5];case"getStorageAt":return[3,6];case"sendTransaction":return[3,7];case"getBlock":return[3,8];case"getTransaction":return[3,9];case"getTransactionReceipt":return[3,10];case"call":return[3,11];case"estimateGas":return[3,15];case"getLogs":return[3,19];case"getEtherPrice":return[3,26]}return[3,28];case 1:return[2,this.fetch("proxy",{action:"eth_blockNumber"})];case 2:return[2,this.fetch("proxy",{action:"eth_gasPrice"})];case 3:return[2,this.fetch("account",{action:"balance",address:o.address,tag:o.blockTag})];case 4:return[2,this.fetch("proxy",{action:"eth_getTransactionCount",address:o.address,tag:o.blockTag})];case 5:return[2,this.fetch("proxy",{action:"eth_getCode",address:o.address,tag:o.blockTag})];case 6:return[2,this.fetch("proxy",{action:"eth_getStorageAt",address:o.address,position:o.position,tag:o.blockTag})];case 7:return[2,this.fetch("proxy",{action:"eth_sendRawTransaction",hex:o.signedTransaction},!0).catch(function(ae){return S0("sendTransaction",ae,o.signedTransaction)})];case 8:if(o.blockTag)return[2,this.fetch("proxy",{action:"eth_getBlockByNumber",tag:o.blockTag,boolean:o.includeTransactions?"true":"false"})];throw new Error("getBlock by blockHash not implemented");case 9:return[2,this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:o.transactionHash})];case 10:return[2,this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:o.transactionHash})];case 11:if(o.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");s=Ox(o.transaction),s.module="proxy",s.action="eth_call",te.label=12;case 12:return te.trys.push([12,14,,15]),[4,this.fetch("proxy",s,!0)];case 13:return[2,te.sent()];case 14:return c=te.sent(),[2,S0("call",c,o.transaction)];case 15:s=Ox(o.transaction),s.module="proxy",s.action="eth_estimateGas",te.label=16;case 16:return te.trys.push([16,18,,19]),[4,this.fetch("proxy",s,!0)];case 17:return[2,te.sent()];case 18:return n=te.sent(),[2,S0("estimateGas",n,o.transaction)];case 19:return i={action:"getLogs"},o.filter.fromBlock&&(i.fromBlock=kx(o.filter.fromBlock)),o.filter.toBlock&&(i.toBlock=kx(o.filter.toBlock)),o.filter.address&&(i.address=o.filter.address),o.filter.topics&&o.filter.topics.length>0&&(o.filter.topics.length>1&&vn.throwError("unsupported topic count",_o.Logger.errors.UNSUPPORTED_OPERATION,{topics:o.filter.topics}),o.filter.topics.length===1&&(u=o.filter.topics[0],(typeof u!="string"||u.length!==66)&&vn.throwError("unsupported topic format",_o.Logger.errors.UNSUPPORTED_OPERATION,{topic0:u}),i.topic0=u)),[4,this.fetch("logs",i)];case 20:l=te.sent(),x={},N=0,te.label=21;case 21:return N<l.length?(F=l[N],F.blockHash!=null?[3,24]:x[F.blockNumber]!=null?[3,23]:[4,this.getBlock(F.blockNumber)]):[3,25];case 22:G=te.sent(),G&&(x[F.blockNumber]=G.hash),te.label=23;case 23:F.blockHash=x[F.blockNumber],te.label=24;case 24:return N++,[3,21];case 25:return[2,l];case 26:return this.network.name!=="homestead"?[2,0]:(K=parseFloat,[4,this.fetch("stats",{action:"ethprice"})]);case 27:return[2,K.apply(void 0,[te.sent().ethusd])];case 28:return[3,29];case 29:return[2,e.prototype.perform.call(this,r,o)]}})})},t.prototype.getHistory=function(r,o,a){return Td(this,void 0,void 0,function(){var c,s,n,i=this;return Sd(this,function(u){switch(u.label){case 0:return n={action:"txlist"},[4,this.resolveName(r)];case 1:return c=(n.address=u.sent(),n.startblock=o??0,n.endblock=a??99999999,n.sort="asc",n),[4,this.fetch("account",c)];case 2:return s=u.sent(),[2,s.map(function(l){["contractAddress","to"].forEach(function(N){l[N]==""&&delete l[N]}),l.creates==null&&l.contractAddress!=null&&(l.creates=l.contractAddress);var x=i.formatter.transactionResponse(l);return l.timeStamp&&(x.timestamp=parseInt(l.timeStamp)),x})]}})})},t.prototype.isCommunityResource=function(){return this.apiKey==null},t}(WP.BaseProvider);Co.EtherscanProvider=LP});var Wx=R(Eo=>{"use strict";g();y();var jP=Eo&&Eo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),Fd=Eo&&Eo.__awaiter||function(e,t,r,o){function a(c){return c instanceof r?c:new r(function(s){s(c)})}return new(r||(r=Promise))(function(c,s){function n(l){try{u(o.next(l))}catch(x){s(x)}}function i(l){try{u(o.throw(l))}catch(x){s(x)}}function u(l){l.done?c(l.value):a(l.value).then(n,i)}u((o=o.apply(e,t||[])).next())})},vs=Eo&&Eo.__generator||function(e,t){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,a,c,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(u){return function(l){return i([u,l])}}function i(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(c=u[0]&2?a.return:u[0]?a.throw||((c=a.return)&&c.call(a),0):a.next)&&!(c=c.call(a,u[1])).done)return c;switch(a=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){r.label=u[1];break}if(u[0]===6&&r.label<c[1]){r.label=c[1],c=u;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(u);break}c[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{o=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(Eo,"__esModule",{value:!0});Eo.FallbackProvider=void 0;var zP=Ia(),qP=br(),$a=gt(),Bo=yt(),VP=ts(),GP=Yn(),HP=ds(),Rx=pn(),bn=Ze(),$P=er(),Xn=new bn.Logger($P.version);function Id(){return new Date().getTime()}function Mx(e){for(var t=null,r=0;r<e.length;r++){var o=e[r];if(o==null)return null;t?t.name===o.name&&t.chainId===o.chainId&&(t.ensAddress===o.ensAddress||t.ensAddress==null&&o.ensAddress==null)||Xn.throwArgumentError("provider mismatch","networks",e):t=o}return t}function Nx(e,t){e=e.slice().sort();var r=Math.floor(e.length/2);if(e.length%2)return e[r];var o=e[r-1],a=e[r];return t!=null&&Math.abs(o-a)>t?null:(o+a)/2}function Ka(e){if(e===null)return"null";if(typeof e=="number"||typeof e=="boolean")return JSON.stringify(e);if(typeof e=="string")return e;if(qP.BigNumber.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map(function(r){return Ka(r)}));if(typeof e=="object"){var t=Object.keys(e);return t.sort(),"{"+t.map(function(r){var o=e[r];return typeof o=="function"?o="[function]":o=Ka(o),JSON.stringify(r)+":"+o}).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}var KP=1;function Dx(e){var t=null,r=null,o=new Promise(function(s){t=function(){r&&(clearTimeout(r),r=null),s()},r=setTimeout(t,e)}),a=function(s){return o=o.then(s),o};function c(){return o}return{cancel:t,getPromise:c,wait:a}}var ZP=[bn.Logger.errors.CALL_EXCEPTION,bn.Logger.errors.INSUFFICIENT_FUNDS,bn.Logger.errors.NONCE_EXPIRED,bn.Logger.errors.REPLACEMENT_UNDERPRICED,bn.Logger.errors.UNPREDICTABLE_GAS_LIMIT],JP=["address","args","errorArgs","errorSignature","method","transaction"];function kd(e,t){var r={weight:e.weight};return Object.defineProperty(r,"provider",{get:function(){return e.provider}}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r}function YP(e,t){return function(r){var o={};r.forEach(function(n){var i=e(n.result);o[i]||(o[i]={count:0,result:n.result}),o[i].count++});for(var a=Object.keys(o),c=0;c<a.length;c++){var s=o[a[c]];if(s.count>=t)return s.result}}}function XP(e,t,r){var o=Ka;switch(t){case"getBlockNumber":return function(a){var c=a.map(function(n){return n.result}),s=Nx(a.map(function(n){return n.result}),2);if(s!=null)return s=Math.ceil(s),c.indexOf(s+1)>=0&&s++,s>=e._highestBlockNumber&&(e._highestBlockNumber=s),e._highestBlockNumber};case"getGasPrice":return function(a){var c=a.map(function(s){return s.result});return c.sort(),c[Math.floor(c.length/2)]};case"getEtherPrice":return function(a){return Nx(a.map(function(c){return c.result}))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":o=function(a){return a==null?null:(a=(0,Bo.shallowCopy)(a),a.confirmations=-1,Ka(a))};break;case"getBlock":r.includeTransactions?o=function(a){return a==null?null:(a=(0,Bo.shallowCopy)(a),a.transactions=a.transactions.map(function(c){return c=(0,Bo.shallowCopy)(c),c.confirmations=-1,c}),Ka(a))}:o=function(a){return a==null?null:Ka(a)};break;default:throw new Error("unknown method: "+t)}return YP(o,e.quorum)}function ys(e,t){return Fd(this,void 0,void 0,function(){var r;return vs(this,function(o){return r=e.provider,r.blockNumber!=null&&r.blockNumber>=t||t===-1?[2,r]:[2,(0,GP.poll)(function(){return new Promise(function(a,c){setTimeout(function(){return r.blockNumber>=t?a(r):e.cancelled?a(null):a(void 0)},0)})},{oncePoll:r})]})})}function QP(e,t,r,o){return Fd(this,void 0,void 0,function(){var a,c,s;return vs(this,function(n){switch(n.label){case 0:switch(a=e.provider,c=r,c){case"getBlockNumber":return[3,1];case"getGasPrice":return[3,1];case"getEtherPrice":return[3,2];case"getBalance":return[3,3];case"getTransactionCount":return[3,3];case"getCode":return[3,3];case"getStorageAt":return[3,6];case"getBlock":return[3,9];case"call":return[3,12];case"estimateGas":return[3,12];case"getTransaction":return[3,15];case"getTransactionReceipt":return[3,15];case"getLogs":return[3,16]}return[3,19];case 1:return[2,a[r]()];case 2:return a.getEtherPrice?[2,a.getEtherPrice()]:[3,19];case 3:return o.blockTag&&(0,$a.isHexString)(o.blockTag)?[4,ys(e,t)]:[3,5];case 4:a=n.sent(),n.label=5;case 5:return[2,a[r](o.address,o.blockTag||"latest")];case 6:return o.blockTag&&(0,$a.isHexString)(o.blockTag)?[4,ys(e,t)]:[3,8];case 7:a=n.sent(),n.label=8;case 8:return[2,a.getStorageAt(o.address,o.position,o.blockTag||"latest")];case 9:return o.blockTag&&(0,$a.isHexString)(o.blockTag)?[4,ys(e,t)]:[3,11];case 10:a=n.sent(),n.label=11;case 11:return[2,a[o.includeTransactions?"getBlockWithTransactions":"getBlock"](o.blockTag||o.blockHash)];case 12:return o.blockTag&&(0,$a.isHexString)(o.blockTag)?[4,ys(e,t)]:[3,14];case 13:a=n.sent(),n.label=14;case 14:return r==="call"&&o.blockTag?[2,a[r](o.transaction,o.blockTag)]:[2,a[r](o.transaction)];case 15:return[2,a[r](o.transactionHash)];case 16:return s=o.filter,s.fromBlock&&(0,$a.isHexString)(s.fromBlock)||s.toBlock&&(0,$a.isHexString)(s.toBlock)?[4,ys(e,t)]:[3,18];case 17:a=n.sent(),n.label=18;case 18:return[2,a.getLogs(s)];case 19:return[2,Xn.throwError("unknown method error",bn.Logger.errors.UNKNOWN_ERROR,{method:r,params:o})]}})})}var eT=function(e){jP(t,e);function t(r,o){var a=this;r.length===0&&Xn.throwArgumentError("missing providers","providers",r);var c=r.map(function(i,u){if(zP.Provider.isProvider(i)){var l=(0,Rx.isCommunityResource)(i)?2e3:750,x=1;return Object.freeze({provider:i,weight:1,stallTimeout:l,priority:x})}var N=(0,Bo.shallowCopy)(i);N.priority==null&&(N.priority=1),N.stallTimeout==null&&(N.stallTimeout=(0,Rx.isCommunityResource)(i)?2e3:750),N.weight==null&&(N.weight=1);var F=N.weight;return(F%1||F>512||F<1)&&Xn.throwArgumentError("invalid weight; must be integer in [1, 512]","providers["+u+"].weight",F),Object.freeze(N)}),s=c.reduce(function(i,u){return i+u.weight},0);o==null?o=s/2:o>s&&Xn.throwArgumentError("quorum will always fail; larger than total weight","quorum",o);var n=Mx(c.map(function(i){return i.provider.network}));return n==null&&(n=new Promise(function(i,u){setTimeout(function(){a.detectNetwork().then(i,u)},0)})),a=e.call(this,n)||this,(0,Bo.defineReadOnly)(a,"providerConfigs",Object.freeze(c)),(0,Bo.defineReadOnly)(a,"quorum",o),a._highestBlockNumber=-1,a}return t.prototype.detectNetwork=function(){return Fd(this,void 0,void 0,function(){var r;return vs(this,function(o){switch(o.label){case 0:return[4,Promise.all(this.providerConfigs.map(function(a){return a.provider.getNetwork()}))];case 1:return r=o.sent(),[2,Mx(r)]}})})},t.prototype.perform=function(r,o){return Fd(this,void 0,void 0,function(){var a,c,s,n,i,u,l,x,N,F,G,K=this;return vs(this,function(te){switch(te.label){case 0:return r!=="sendTransaction"?[3,2]:[4,Promise.all(this.providerConfigs.map(function(ae){return ae.provider.sendTransaction(o.signedTransaction).then(function(ge){return ge.hash},function(ge){return ge})}))];case 1:for(a=te.sent(),c=0;c<a.length;c++)if(s=a[c],typeof s=="string")return[2,s];throw a[0];case 2:return this._highestBlockNumber===-1&&r!=="getBlockNumber"?[4,this.getBlockNumber()]:[3,4];case 3:te.sent(),te.label=4;case 4:n=XP(this,r,o),i=(0,VP.shuffled)(this.providerConfigs.map(Bo.shallowCopy)),i.sort(function(ae,ge){return ae.priority-ge.priority}),u=this._highestBlockNumber,l=0,x=!0,N=function(){var ae,ge,Ce,Ne,Pe,Se,Ye;return vs(this,function(rt){switch(rt.label){case 0:for(ae=Id(),ge=i.filter(function(Ae){return Ae.runner&&ae-Ae.start<Ae.stallTimeout}).reduce(function(Ae,ce){return Ae+ce.weight},0),Ce=function(){var Ae=i[l++],ce=KP++;Ae.start=Id(),Ae.staller=Dx(Ae.stallTimeout),Ae.staller.wait(function(){Ae.staller=null}),Ae.runner=QP(Ae,u,r,o).then(function(ie){Ae.done=!0,Ae.result=ie,K.listenerCount("debug")&&K.emit("debug",{action:"request",rid:ce,backend:kd(Ae,Id()),request:{method:r,params:(0,Bo.deepCopy)(o)},provider:K})},function(ie){Ae.done=!0,Ae.error=ie,K.listenerCount("debug")&&K.emit("debug",{action:"request",rid:ce,backend:kd(Ae,Id()),request:{method:r,params:(0,Bo.deepCopy)(o)},provider:K})}),F.listenerCount("debug")&&F.emit("debug",{action:"request",rid:ce,backend:kd(Ae,null),request:{method:r,params:(0,Bo.deepCopy)(o)},provider:F}),ge+=Ae.weight};ge<F.quorum&&l<i.length;)Ce();return Ne=[],i.forEach(function(Ae){Ae.done||!Ae.runner||(Ne.push(Ae.runner),Ae.staller&&Ne.push(Ae.staller.getPromise()))}),Ne.length?[4,Promise.race(Ne)]:[3,2];case 1:rt.sent(),rt.label=2;case 2:return Pe=i.filter(function(Ae){return Ae.done&&Ae.error==null}),Pe.length>=F.quorum?(Se=n(Pe),Se!==void 0?(i.forEach(function(Ae){Ae.staller&&Ae.staller.cancel(),Ae.cancelled=!0}),[2,{value:Se}]):x?[3,4]:[4,Dx(100).getPromise()]):[3,5];case 3:rt.sent(),rt.label=4;case 4:x=!1,rt.label=5;case 5:return Ye=i.reduce(function(Ae,ce){if(!ce.done||ce.error==null)return Ae;var ie=ce.error.code;return ZP.indexOf(ie)>=0&&(Ae[ie]||(Ae[ie]={error:ce.error,weight:0}),Ae[ie].weight+=ce.weight),Ae},{}),Object.keys(Ye).forEach(function(Ae){var ce=Ye[Ae];if(!(ce.weight<K.quorum)){i.forEach(function(be){be.staller&&be.staller.cancel(),be.cancelled=!0});var ie=ce.error,_e={};JP.forEach(function(be){ie[be]!=null&&(_e[be]=ie[be])}),Xn.throwError(ie.reason||ie.message,Ae,_e)}}),i.filter(function(Ae){return!Ae.done}).length===0?[2,"break"]:[2]}})},F=this,te.label=5;case 5:return[5,N()];case 6:return G=te.sent(),typeof G=="object"?[2,G.value]:G==="break"?[3,7]:[3,5];case 7:return i.forEach(function(ae){ae.staller&&ae.staller.cancel(),ae.cancelled=!0}),[2,Xn.throwError("failed to meet quorum",bn.Logger.errors.SERVER_ERROR,{method:r,params:o,results:i.map(function(ae){return kd(ae)}),provider:this})]}})})},t}(HP.BaseProvider);Eo.FallbackProvider=eT});var Ux=R(Rd=>{"use strict";g();y();Object.defineProperty(Rd,"__esModule",{value:!0});Rd.IpcProvider=void 0;var tT=null;Rd.IpcProvider=tT});var qx=R(mn=>{"use strict";g();y();var Lx=mn&&mn.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(mn,"__esModule",{value:!0});mn.InfuraProvider=mn.InfuraWebSocketProvider=void 0;var O0=yt(),rT=Cd(),oT=pn(),I0=Ze(),nT=er(),Md=new I0.Logger(nT.version),aT=gn(),bs="84842078b09946638c03157f83405213",jx=function(e){Lx(t,e);function t(r,o){var a=this,c=new zx(r,o),s=c.connection;s.password&&Md.throwError("INFURA WebSocket project secrets unsupported",I0.Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});var n=s.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");return a=e.call(this,n,r)||this,(0,O0.defineReadOnly)(a,"apiKey",c.projectId),(0,O0.defineReadOnly)(a,"projectId",c.projectId),(0,O0.defineReadOnly)(a,"projectSecret",c.projectSecret),a}return t.prototype.isCommunityResource=function(){return this.projectId===bs},t}(rT.WebSocketProvider);mn.InfuraWebSocketProvider=jx;var zx=function(e){Lx(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.getWebSocketProvider=function(r,o){return new jx(r,o)},t.getApiKey=function(r){var o={apiKey:bs,projectId:bs,projectSecret:null};return r==null||(typeof r=="string"?o.projectId=r:r.projectSecret!=null?(Md.assertArgument(typeof r.projectId=="string","projectSecret requires a projectId","projectId",r.projectId),Md.assertArgument(typeof r.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),o.projectId=r.projectId,o.projectSecret=r.projectSecret):r.projectId&&(o.projectId=r.projectId),o.apiKey=o.projectId),o},t.getUrl=function(r,o){var a=null;switch(r?r.name:"unknown"){case"homestead":a="mainnet.infura.io";break;case"goerli":a="goerli.infura.io";break;case"sepolia":a="sepolia.infura.io";break;case"matic":a="polygon-mainnet.infura.io";break;case"maticmum":a="polygon-mumbai.infura.io";break;case"optimism":a="optimism-mainnet.infura.io";break;case"optimism-goerli":a="optimism-goerli.infura.io";break;case"arbitrum":a="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":a="arbitrum-goerli.infura.io";break;default:Md.throwError("unsupported network",I0.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:r})}var c={allowGzip:!0,url:"https://"+a+"/v3/"+o.projectId,throttleCallback:function(s,n){return o.projectId===bs&&(0,oT.showThrottleMessage)(),Promise.resolve(!0)}};return o.projectSecret!=null&&(c.user="",c.password=o.projectSecret),c},t.prototype.isCommunityResource=function(){return this.projectId===bs},t}(aT.UrlJsonRpcProvider);mn.InfuraProvider=zx});var Vx=R(Za=>{"use strict";g();y();var iT=Za&&Za.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Za,"__esModule",{value:!0});Za.JsonRpcBatchProvider=void 0;var sT=yt(),cT=Yn(),uT=qa(),lT=function(e){iT(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.send=function(r,o){var a=this,c={method:r,params:o,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);var s={request:c,resolve:null,reject:null},n=new Promise(function(i,u){s.resolve=i,s.reject=u});return this._pendingBatch.push(s),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(function(){var i=a._pendingBatch;a._pendingBatch=null,a._pendingBatchAggregator=null;var u=i.map(function(l){return l.request});return a.emit("debug",{action:"requestBatch",request:(0,sT.deepCopy)(u),provider:a}),(0,cT.fetchJson)(a.connection,JSON.stringify(u)).then(function(l){a.emit("debug",{action:"response",request:u,response:l,provider:a}),i.forEach(function(x,N){var F=l[N];if(F.error){var G=new Error(F.error.message);G.code=F.error.code,G.data=F.error.data,x.reject(G)}else x.resolve(F.result)})},function(l){a.emit("debug",{action:"response",error:l,request:u,provider:a}),i.forEach(function(x){x.reject(l)})})},10)),n},t}(uT.JsonRpcProvider);Za.JsonRpcBatchProvider=lT});var Gx=R(Ja=>{"use strict";g();y();var dT=Ja&&Ja.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Ja,"__esModule",{value:!0});Ja.NodesmithProvider=void 0;var fT=gn(),pT=Ze(),hT=er(),k0=new pT.Logger(hT.version),gT="ETHERS_JS_SHARED",yT=function(e){dT(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.getApiKey=function(r){return r&&typeof r!="string"&&k0.throwArgumentError("invalid apiKey","apiKey",r),r||gT},t.getUrl=function(r,o){k0.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");var a=null;switch(r.name){case"homestead":a="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":a="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":a="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":a="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":a="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:k0.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+o},t}(fT.UrlJsonRpcProvider);Ja.NodesmithProvider=yT});var Zx=R(Ya=>{"use strict";g();y();var vT=Ya&&Ya.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Ya,"__esModule",{value:!0});Ya.PocketProvider=void 0;var Kx=Ze(),bT=er(),Hx=new Kx.Logger(bT.version),mT=gn(),$x="62e1ad51b37b8e00394bda3b",xT=function(e){vT(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.getApiKey=function(r){var o={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return r==null?o.applicationId=$x:typeof r=="string"?o.applicationId=r:r.applicationSecretKey!=null?(o.applicationId=r.applicationId,o.applicationSecretKey=r.applicationSecretKey):r.applicationId?o.applicationId=r.applicationId:Hx.throwArgumentError("unsupported PocketProvider apiKey","apiKey",r),o},t.getUrl=function(r,o){var a=null;switch(r?r.name:"unknown"){case"goerli":a="eth-goerli.gateway.pokt.network";break;case"homestead":a="eth-mainnet.gateway.pokt.network";break;case"kovan":a="poa-kovan.gateway.pokt.network";break;case"matic":a="poly-mainnet.gateway.pokt.network";break;case"maticmum":a="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":a="eth-rinkeby.gateway.pokt.network";break;case"ropsten":a="eth-ropsten.gateway.pokt.network";break;default:Hx.throwError("unsupported network",Kx.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:r})}var c="https://"+a+"/v1/lb/"+o.applicationId,s={headers:{},url:c};return o.applicationSecretKey!=null&&(s.user="",s.password=o.applicationSecretKey),s},t.prototype.isCommunityResource=function(){return this.applicationId===$x},t}(mT.UrlJsonRpcProvider);Ya.PocketProvider=xT});var Xx=R(Xa=>{"use strict";g();y();var AT=Xa&&Xa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(Xa,"__esModule",{value:!0});Xa.Web3Provider=void 0;var Nd=yt(),wT=Ze(),_T=er(),Jx=new wT.Logger(_T.version),CT=qa(),BT=1;function Yx(e,t){var r="Web3LegacyFetcher";return function(o,a){var c=this,s={method:o,params:a,id:BT++,jsonrpc:"2.0"};return new Promise(function(n,i){c.emit("debug",{action:"request",fetcher:r,request:(0,Nd.deepCopy)(s),provider:c}),t(s,function(u,l){if(u)return c.emit("debug",{action:"response",fetcher:r,error:u,request:s,provider:c}),i(u);if(c.emit("debug",{action:"response",fetcher:r,request:s,response:l,provider:c}),l.error){var x=new Error(l.error.message);return x.code=l.error.code,x.data=l.error.data,i(x)}n(l.result)})})}}function ET(e){return function(t,r){var o=this;r==null&&(r=[]);var a={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,Nd.deepCopy)(a),provider:this}),e.request(a).then(function(c){return o.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:c,provider:o}),c},function(c){throw o.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:c,provider:o}),c})}}var PT=function(e){AT(t,e);function t(r,o){var a=this;r==null&&Jx.throwArgumentError("missing provider","provider",r);var c=null,s=null,n=null;return typeof r=="function"?(c="unknown:",s=r):(c=r.host||r.path||"",!c&&r.isMetaMask&&(c="metamask"),n=r,r.request?(c===""&&(c="eip-1193:"),s=ET(r)):r.sendAsync?s=Yx(r,r.sendAsync.bind(r)):r.send?s=Yx(r,r.send.bind(r)):Jx.throwArgumentError("unsupported provider","provider",r),c||(c="unknown:")),a=e.call(this,c,o)||this,(0,Nd.defineReadOnly)(a,"jsonRpcFetchFunc",s),(0,Nd.defineReadOnly)(a,"provider",n),a}return t.prototype.send=function(r,o){return this.jsonRpcFetchFunc(r,o)},t}(CT.JsonRpcProvider);Xa.Web3Provider=PT});var M0=R(Re=>{"use strict";g();y();Object.defineProperty(Re,"__esModule",{value:!0});Re.Formatter=Re.showThrottleMessage=Re.isCommunityResourcable=Re.isCommunityResource=Re.getNetwork=Re.getDefaultProvider=Re.JsonRpcSigner=Re.IpcProvider=Re.WebSocketProvider=Re.Web3Provider=Re.StaticJsonRpcProvider=Re.PocketProvider=Re.NodesmithProvider=Re.JsonRpcBatchProvider=Re.JsonRpcProvider=Re.InfuraWebSocketProvider=Re.InfuraProvider=Re.EtherscanProvider=Re.CloudflareProvider=Re.AnkrProvider=Re.AlchemyWebSocketProvider=Re.AlchemyProvider=Re.FallbackProvider=Re.UrlJsonRpcProvider=Re.Resolver=Re.BaseProvider=Re.Provider=void 0;var TT=Ia();Object.defineProperty(Re,"Provider",{enumerable:!0,get:function(){return TT.Provider}});var e2=p0();Object.defineProperty(Re,"getNetwork",{enumerable:!0,get:function(){return e2.getNetwork}});var t2=ds();Object.defineProperty(Re,"BaseProvider",{enumerable:!0,get:function(){return t2.BaseProvider}});Object.defineProperty(Re,"Resolver",{enumerable:!0,get:function(){return t2.Resolver}});var F0=Ex();Object.defineProperty(Re,"AlchemyProvider",{enumerable:!0,get:function(){return F0.AlchemyProvider}});Object.defineProperty(Re,"AlchemyWebSocketProvider",{enumerable:!0,get:function(){return F0.AlchemyWebSocketProvider}});var r2=Px();Object.defineProperty(Re,"AnkrProvider",{enumerable:!0,get:function(){return r2.AnkrProvider}});var o2=Sx();Object.defineProperty(Re,"CloudflareProvider",{enumerable:!0,get:function(){return o2.CloudflareProvider}});var n2=Fx();Object.defineProperty(Re,"EtherscanProvider",{enumerable:!0,get:function(){return n2.EtherscanProvider}});var a2=Wx();Object.defineProperty(Re,"FallbackProvider",{enumerable:!0,get:function(){return a2.FallbackProvider}});var i2=Ux();Object.defineProperty(Re,"IpcProvider",{enumerable:!0,get:function(){return i2.IpcProvider}});var R0=qx();Object.defineProperty(Re,"InfuraProvider",{enumerable:!0,get:function(){return R0.InfuraProvider}});Object.defineProperty(Re,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return R0.InfuraWebSocketProvider}});var Dd=qa();Object.defineProperty(Re,"JsonRpcProvider",{enumerable:!0,get:function(){return Dd.JsonRpcProvider}});Object.defineProperty(Re,"JsonRpcSigner",{enumerable:!0,get:function(){return Dd.JsonRpcSigner}});var ST=Vx();Object.defineProperty(Re,"JsonRpcBatchProvider",{enumerable:!0,get:function(){return ST.JsonRpcBatchProvider}});var s2=Gx();Object.defineProperty(Re,"NodesmithProvider",{enumerable:!0,get:function(){return s2.NodesmithProvider}});var c2=Zx();Object.defineProperty(Re,"PocketProvider",{enumerable:!0,get:function(){return c2.PocketProvider}});var u2=gn();Object.defineProperty(Re,"StaticJsonRpcProvider",{enumerable:!0,get:function(){return u2.StaticJsonRpcProvider}});Object.defineProperty(Re,"UrlJsonRpcProvider",{enumerable:!0,get:function(){return u2.UrlJsonRpcProvider}});var l2=Xx();Object.defineProperty(Re,"Web3Provider",{enumerable:!0,get:function(){return l2.Web3Provider}});var d2=Cd();Object.defineProperty(Re,"WebSocketProvider",{enumerable:!0,get:function(){return d2.WebSocketProvider}});var Wd=pn();Object.defineProperty(Re,"Formatter",{enumerable:!0,get:function(){return Wd.Formatter}});Object.defineProperty(Re,"isCommunityResourcable",{enumerable:!0,get:function(){return Wd.isCommunityResourcable}});Object.defineProperty(Re,"isCommunityResource",{enumerable:!0,get:function(){return Wd.isCommunityResource}});Object.defineProperty(Re,"showThrottleMessage",{enumerable:!0,get:function(){return Wd.showThrottleMessage}});var f2=Ze(),OT=er(),Qx=new f2.Logger(OT.version);function IT(e,t){if(e==null&&(e="homestead"),typeof e=="string"){var r=e.match(/^(ws|http)s?:/i);if(r)switch(r[1].toLowerCase()){case"http":case"https":return new Dd.JsonRpcProvider(e);case"ws":case"wss":return new d2.WebSocketProvider(e);default:Qx.throwArgumentError("unsupported URL scheme","network",e)}}var o=(0,e2.getNetwork)(e);return(!o||!o._defaultProvider)&&Qx.throwError("unsupported getDefaultProvider network",f2.Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),o._defaultProvider({FallbackProvider:a2.FallbackProvider,AlchemyProvider:F0.AlchemyProvider,AnkrProvider:r2.AnkrProvider,CloudflareProvider:o2.CloudflareProvider,EtherscanProvider:n2.EtherscanProvider,InfuraProvider:R0.InfuraProvider,JsonRpcProvider:Dd.JsonRpcProvider,NodesmithProvider:s2.NodesmithProvider,PocketProvider:c2.PocketProvider,Web3Provider:l2.Web3Provider,IpcProvider:i2.IpcProvider},t)}Re.getDefaultProvider=IT});var p2=R(Ud=>{"use strict";g();y();Object.defineProperty(Ud,"__esModule",{value:!0});Ud.version=void 0;Ud.version="solidity/5.7.0"});var g2=R(xn=>{"use strict";g();y();Object.defineProperty(xn,"__esModule",{value:!0});xn.sha256=xn.keccak256=xn.pack=void 0;var kT=br(),no=gt(),FT=jn(),RT=Hn(),MT=eo(),NT=new RegExp("^bytes([0-9]+)$"),DT=new RegExp("^(u?int)([0-9]*)$"),WT=new RegExp("^(.*)\\[([0-9]*)\\]$"),UT="0000000000000000000000000000000000000000000000000000000000000000",LT=Ze(),jT=p2(),Qa=new LT.Logger(jT.version);function h2(e,t,r){switch(e){case"address":return r?(0,no.zeroPad)(t,32):(0,no.arrayify)(t);case"string":return(0,MT.toUtf8Bytes)(t);case"bytes":return(0,no.arrayify)(t);case"bool":return t=t?"0x01":"0x00",r?(0,no.zeroPad)(t,32):(0,no.arrayify)(t)}var o=e.match(DT);if(o){var a=parseInt(o[2]||"256");return(o[2]&&String(a)!==o[2]||a%8!==0||a===0||a>256)&&Qa.throwArgumentError("invalid number type","type",e),r&&(a=256),t=kT.BigNumber.from(t).toTwos(a),(0,no.zeroPad)(t,a/8)}if(o=e.match(NT),o){var a=parseInt(o[1]);return(String(a)!==o[1]||a===0||a>32)&&Qa.throwArgumentError("invalid bytes type","type",e),(0,no.arrayify)(t).byteLength!==a&&Qa.throwArgumentError("invalid value for "+e,"value",t),r?(0,no.arrayify)((t+UT).substring(0,66)):t}if(o=e.match(WT),o&&Array.isArray(t)){var c=o[1],s=parseInt(o[2]||String(t.length));s!=t.length&&Qa.throwArgumentError("invalid array length for "+e,"value",t);var n=[];return t.forEach(function(i){n.push(h2(c,i,!0))}),(0,no.concat)(n)}return Qa.throwArgumentError("invalid type","type",e)}function N0(e,t){e.length!=t.length&&Qa.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);var r=[];return e.forEach(function(o,a){r.push(h2(o,t[a]))}),(0,no.hexlify)((0,no.concat)(r))}xn.pack=N0;function zT(e,t){return(0,FT.keccak256)(N0(e,t))}xn.keccak256=zT;function qT(e,t){return(0,RT.sha256)(N0(e,t))}xn.sha256=qT});var x2=R(H=>{"use strict";g();y();var VT=H&&H.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),GT=H&&H.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),y2=H&&H.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&VT(t,e,r);return GT(t,e),t};Object.defineProperty(H,"__esModule",{value:!0});H.formatBytes32String=H.Utf8ErrorFuncs=H.toUtf8String=H.toUtf8CodePoints=H.toUtf8Bytes=H._toEscapedUtf8String=H.nameprep=H.hexDataSlice=H.hexDataLength=H.hexZeroPad=H.hexValue=H.hexStripZeros=H.hexConcat=H.isHexString=H.hexlify=H.base64=H.base58=H.TransactionDescription=H.LogDescription=H.Interface=H.SigningKey=H.HDNode=H.defaultPath=H.isBytesLike=H.isBytes=H.zeroPad=H.stripZeros=H.concat=H.arrayify=H.shallowCopy=H.resolveProperties=H.getStatic=H.defineReadOnly=H.deepCopy=H.checkProperties=H.poll=H.fetchJson=H._fetchData=H.RLP=H.Logger=H.checkResultErrors=H.FormatTypes=H.ParamType=H.FunctionFragment=H.EventFragment=H.ErrorFragment=H.ConstructorFragment=H.Fragment=H.defaultAbiCoder=H.AbiCoder=void 0;H.Indexed=H.Utf8ErrorReason=H.UnicodeNormalizationForm=H.SupportedAlgorithm=H.mnemonicToSeed=H.isValidMnemonic=H.entropyToMnemonic=H.mnemonicToEntropy=H.getAccountPath=H.verifyTypedData=H.verifyMessage=H.recoverPublicKey=H.computePublicKey=H.recoverAddress=H.computeAddress=H.getJsonWalletAddress=H.TransactionTypes=H.serializeTransaction=H.parseTransaction=H.accessListify=H.joinSignature=H.splitSignature=H.soliditySha256=H.solidityKeccak256=H.solidityPack=H.shuffled=H.randomBytes=H.sha512=H.sha256=H.ripemd160=H.keccak256=H.computeHmac=H.commify=H.parseUnits=H.formatUnits=H.parseEther=H.formatEther=H.isAddress=H.getCreate2Address=H.getContractAddress=H.getIcapAddress=H.getAddress=H._TypedDataEncoder=H.id=H.isValidName=H.namehash=H.hashMessage=H.dnsEncode=H.parseBytes32String=void 0;var Tr=qp();Object.defineProperty(H,"AbiCoder",{enumerable:!0,get:function(){return Tr.AbiCoder}});Object.defineProperty(H,"checkResultErrors",{enumerable:!0,get:function(){return Tr.checkResultErrors}});Object.defineProperty(H,"ConstructorFragment",{enumerable:!0,get:function(){return Tr.ConstructorFragment}});Object.defineProperty(H,"defaultAbiCoder",{enumerable:!0,get:function(){return Tr.defaultAbiCoder}});Object.defineProperty(H,"ErrorFragment",{enumerable:!0,get:function(){return Tr.ErrorFragment}});Object.defineProperty(H,"EventFragment",{enumerable:!0,get:function(){return Tr.EventFragment}});Object.defineProperty(H,"FormatTypes",{enumerable:!0,get:function(){return Tr.FormatTypes}});Object.defineProperty(H,"Fragment",{enumerable:!0,get:function(){return Tr.Fragment}});Object.defineProperty(H,"FunctionFragment",{enumerable:!0,get:function(){return Tr.FunctionFragment}});Object.defineProperty(H,"Indexed",{enumerable:!0,get:function(){return Tr.Indexed}});Object.defineProperty(H,"Interface",{enumerable:!0,get:function(){return Tr.Interface}});Object.defineProperty(H,"LogDescription",{enumerable:!0,get:function(){return Tr.LogDescription}});Object.defineProperty(H,"ParamType",{enumerable:!0,get:function(){return Tr.ParamType}});Object.defineProperty(H,"TransactionDescription",{enumerable:!0,get:function(){return Tr.TransactionDescription}});var ms=Ro();Object.defineProperty(H,"getAddress",{enumerable:!0,get:function(){return ms.getAddress}});Object.defineProperty(H,"getCreate2Address",{enumerable:!0,get:function(){return ms.getCreate2Address}});Object.defineProperty(H,"getContractAddress",{enumerable:!0,get:function(){return ms.getContractAddress}});Object.defineProperty(H,"getIcapAddress",{enumerable:!0,get:function(){return ms.getIcapAddress}});Object.defineProperty(H,"isAddress",{enumerable:!0,get:function(){return ms.isAddress}});var HT=y2(Sp());H.base64=HT;var $T=Gl();Object.defineProperty(H,"base58",{enumerable:!0,get:function(){return $T.Base58}});var fr=gt();Object.defineProperty(H,"arrayify",{enumerable:!0,get:function(){return fr.arrayify}});Object.defineProperty(H,"concat",{enumerable:!0,get:function(){return fr.concat}});Object.defineProperty(H,"hexConcat",{enumerable:!0,get:function(){return fr.hexConcat}});Object.defineProperty(H,"hexDataSlice",{enumerable:!0,get:function(){return fr.hexDataSlice}});Object.defineProperty(H,"hexDataLength",{enumerable:!0,get:function(){return fr.hexDataLength}});Object.defineProperty(H,"hexlify",{enumerable:!0,get:function(){return fr.hexlify}});Object.defineProperty(H,"hexStripZeros",{enumerable:!0,get:function(){return fr.hexStripZeros}});Object.defineProperty(H,"hexValue",{enumerable:!0,get:function(){return fr.hexValue}});Object.defineProperty(H,"hexZeroPad",{enumerable:!0,get:function(){return fr.hexZeroPad}});Object.defineProperty(H,"isBytes",{enumerable:!0,get:function(){return fr.isBytes}});Object.defineProperty(H,"isBytesLike",{enumerable:!0,get:function(){return fr.isBytesLike}});Object.defineProperty(H,"isHexString",{enumerable:!0,get:function(){return fr.isHexString}});Object.defineProperty(H,"joinSignature",{enumerable:!0,get:function(){return fr.joinSignature}});Object.defineProperty(H,"zeroPad",{enumerable:!0,get:function(){return fr.zeroPad}});Object.defineProperty(H,"splitSignature",{enumerable:!0,get:function(){return fr.splitSignature}});Object.defineProperty(H,"stripZeros",{enumerable:!0,get:function(){return fr.stripZeros}});var ei=va();Object.defineProperty(H,"_TypedDataEncoder",{enumerable:!0,get:function(){return ei._TypedDataEncoder}});Object.defineProperty(H,"dnsEncode",{enumerable:!0,get:function(){return ei.dnsEncode}});Object.defineProperty(H,"hashMessage",{enumerable:!0,get:function(){return ei.hashMessage}});Object.defineProperty(H,"id",{enumerable:!0,get:function(){return ei.id}});Object.defineProperty(H,"isValidName",{enumerable:!0,get:function(){return ei.isValidName}});Object.defineProperty(H,"namehash",{enumerable:!0,get:function(){return ei.namehash}});var Qn=td();Object.defineProperty(H,"defaultPath",{enumerable:!0,get:function(){return Qn.defaultPath}});Object.defineProperty(H,"entropyToMnemonic",{enumerable:!0,get:function(){return Qn.entropyToMnemonic}});Object.defineProperty(H,"getAccountPath",{enumerable:!0,get:function(){return Qn.getAccountPath}});Object.defineProperty(H,"HDNode",{enumerable:!0,get:function(){return Qn.HDNode}});Object.defineProperty(H,"isValidMnemonic",{enumerable:!0,get:function(){return Qn.isValidMnemonic}});Object.defineProperty(H,"mnemonicToEntropy",{enumerable:!0,get:function(){return Qn.mnemonicToEntropy}});Object.defineProperty(H,"mnemonicToSeed",{enumerable:!0,get:function(){return Qn.mnemonicToSeed}});var KT=u0();Object.defineProperty(H,"getJsonWalletAddress",{enumerable:!0,get:function(){return KT.getJsonWalletAddress}});var ZT=jn();Object.defineProperty(H,"keccak256",{enumerable:!0,get:function(){return ZT.keccak256}});var JT=Ze();Object.defineProperty(H,"Logger",{enumerable:!0,get:function(){return JT.Logger}});var Ld=Hn();Object.defineProperty(H,"computeHmac",{enumerable:!0,get:function(){return Ld.computeHmac}});Object.defineProperty(H,"ripemd160",{enumerable:!0,get:function(){return Ld.ripemd160}});Object.defineProperty(H,"sha256",{enumerable:!0,get:function(){return Ld.sha256}});Object.defineProperty(H,"sha512",{enumerable:!0,get:function(){return Ld.sha512}});var D0=g2();Object.defineProperty(H,"solidityKeccak256",{enumerable:!0,get:function(){return D0.keccak256}});Object.defineProperty(H,"solidityPack",{enumerable:!0,get:function(){return D0.pack}});Object.defineProperty(H,"soliditySha256",{enumerable:!0,get:function(){return D0.sha256}});var v2=ts();Object.defineProperty(H,"randomBytes",{enumerable:!0,get:function(){return v2.randomBytes}});Object.defineProperty(H,"shuffled",{enumerable:!0,get:function(){return v2.shuffled}});var ti=yt();Object.defineProperty(H,"checkProperties",{enumerable:!0,get:function(){return ti.checkProperties}});Object.defineProperty(H,"deepCopy",{enumerable:!0,get:function(){return ti.deepCopy}});Object.defineProperty(H,"defineReadOnly",{enumerable:!0,get:function(){return ti.defineReadOnly}});Object.defineProperty(H,"getStatic",{enumerable:!0,get:function(){return ti.getStatic}});Object.defineProperty(H,"resolveProperties",{enumerable:!0,get:function(){return ti.resolveProperties}});Object.defineProperty(H,"shallowCopy",{enumerable:!0,get:function(){return ti.shallowCopy}});var YT=y2(V_());H.RLP=YT;var W0=Tp();Object.defineProperty(H,"computePublicKey",{enumerable:!0,get:function(){return W0.computePublicKey}});Object.defineProperty(H,"recoverPublicKey",{enumerable:!0,get:function(){return W0.recoverPublicKey}});Object.defineProperty(H,"SigningKey",{enumerable:!0,get:function(){return W0.SigningKey}});var An=eo();Object.defineProperty(H,"formatBytes32String",{enumerable:!0,get:function(){return An.formatBytes32String}});Object.defineProperty(H,"nameprep",{enumerable:!0,get:function(){return An.nameprep}});Object.defineProperty(H,"parseBytes32String",{enumerable:!0,get:function(){return An.parseBytes32String}});Object.defineProperty(H,"_toEscapedUtf8String",{enumerable:!0,get:function(){return An._toEscapedUtf8String}});Object.defineProperty(H,"toUtf8Bytes",{enumerable:!0,get:function(){return An.toUtf8Bytes}});Object.defineProperty(H,"toUtf8CodePoints",{enumerable:!0,get:function(){return An.toUtf8CodePoints}});Object.defineProperty(H,"toUtf8String",{enumerable:!0,get:function(){return An.toUtf8String}});Object.defineProperty(H,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return An.Utf8ErrorFuncs}});var ri=Qo();Object.defineProperty(H,"accessListify",{enumerable:!0,get:function(){return ri.accessListify}});Object.defineProperty(H,"computeAddress",{enumerable:!0,get:function(){return ri.computeAddress}});Object.defineProperty(H,"parseTransaction",{enumerable:!0,get:function(){return ri.parse}});Object.defineProperty(H,"recoverAddress",{enumerable:!0,get:function(){return ri.recoverAddress}});Object.defineProperty(H,"serializeTransaction",{enumerable:!0,get:function(){return ri.serialize}});Object.defineProperty(H,"TransactionTypes",{enumerable:!0,get:function(){return ri.TransactionTypes}});var xs=G_();Object.defineProperty(H,"commify",{enumerable:!0,get:function(){return xs.commify}});Object.defineProperty(H,"formatEther",{enumerable:!0,get:function(){return xs.formatEther}});Object.defineProperty(H,"parseEther",{enumerable:!0,get:function(){return xs.parseEther}});Object.defineProperty(H,"formatUnits",{enumerable:!0,get:function(){return xs.formatUnits}});Object.defineProperty(H,"parseUnits",{enumerable:!0,get:function(){return xs.parseUnits}});var b2=f0();Object.defineProperty(H,"verifyMessage",{enumerable:!0,get:function(){return b2.verifyMessage}});Object.defineProperty(H,"verifyTypedData",{enumerable:!0,get:function(){return b2.verifyTypedData}});var U0=Yn();Object.defineProperty(H,"_fetchData",{enumerable:!0,get:function(){return U0._fetchData}});Object.defineProperty(H,"fetchJson",{enumerable:!0,get:function(){return U0.fetchJson}});Object.defineProperty(H,"poll",{enumerable:!0,get:function(){return U0.poll}});var XT=Hn();Object.defineProperty(H,"SupportedAlgorithm",{enumerable:!0,get:function(){return XT.SupportedAlgorithm}});var m2=eo();Object.defineProperty(H,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return m2.UnicodeNormalizationForm}});Object.defineProperty(H,"Utf8ErrorReason",{enumerable:!0,get:function(){return m2.Utf8ErrorReason}})});var A2=R(jd=>{"use strict";g();y();Object.defineProperty(jd,"__esModule",{value:!0});jd.version=void 0;jd.version="ethers/5.7.2"});var z0=R(He=>{"use strict";g();y();var QT=He&&He.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),eS=He&&He.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),L0=He&&He.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&QT(t,e,r);return eS(t,e),t};Object.defineProperty(He,"__esModule",{value:!0});He.Wordlist=He.version=He.wordlists=He.utils=He.logger=He.errors=He.constants=He.FixedNumber=He.BigNumber=He.ContractFactory=He.Contract=He.BaseContract=He.providers=He.getDefaultProvider=He.VoidSigner=He.Wallet=He.Signer=void 0;var j0=Rm();Object.defineProperty(He,"BaseContract",{enumerable:!0,get:function(){return j0.BaseContract}});Object.defineProperty(He,"Contract",{enumerable:!0,get:function(){return j0.Contract}});Object.defineProperty(He,"ContractFactory",{enumerable:!0,get:function(){return j0.ContractFactory}});var w2=br();Object.defineProperty(He,"BigNumber",{enumerable:!0,get:function(){return w2.BigNumber}});Object.defineProperty(He,"FixedNumber",{enumerable:!0,get:function(){return w2.FixedNumber}});var _2=Gi();Object.defineProperty(He,"Signer",{enumerable:!0,get:function(){return _2.Signer}});Object.defineProperty(He,"VoidSigner",{enumerable:!0,get:function(){return _2.VoidSigner}});var tS=f0();Object.defineProperty(He,"Wallet",{enumerable:!0,get:function(){return tS.Wallet}});var rS=L0(vl());He.constants=rS;var oS=L0(M0());He.providers=oS;var nS=M0();Object.defineProperty(He,"getDefaultProvider",{enumerable:!0,get:function(){return nS.getDefaultProvider}});var C2=Yp();Object.defineProperty(He,"Wordlist",{enumerable:!0,get:function(){return C2.Wordlist}});Object.defineProperty(He,"wordlists",{enumerable:!0,get:function(){return C2.wordlists}});var aS=L0(x2());He.utils=aS;var B2=Ze();Object.defineProperty(He,"errors",{enumerable:!0,get:function(){return B2.ErrorCode}});var E2=A2();Object.defineProperty(He,"version",{enumerable:!0,get:function(){return E2.version}});var iS=new B2.Logger(E2.version);He.logger=iS});var T2=R(Ve=>{"use strict";g();y();var sS=Ve&&Ve.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),cS=Ve&&Ve.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),uS=Ve&&Ve.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&sS(t,e,r);return cS(t,e),t};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.Wordlist=Ve.version=Ve.wordlists=Ve.utils=Ve.logger=Ve.errors=Ve.constants=Ve.FixedNumber=Ve.BigNumber=Ve.ContractFactory=Ve.Contract=Ve.BaseContract=Ve.providers=Ve.getDefaultProvider=Ve.VoidSigner=Ve.Wallet=Ve.Signer=Ve.ethers=void 0;var P2=uS(z0());Ve.ethers=P2;try{q0=window,q0._ethers==null&&(q0._ethers=P2)}catch{}var q0,tr=z0();Object.defineProperty(Ve,"Signer",{enumerable:!0,get:function(){return tr.Signer}});Object.defineProperty(Ve,"Wallet",{enumerable:!0,get:function(){return tr.Wallet}});Object.defineProperty(Ve,"VoidSigner",{enumerable:!0,get:function(){return tr.VoidSigner}});Object.defineProperty(Ve,"getDefaultProvider",{enumerable:!0,get:function(){return tr.getDefaultProvider}});Object.defineProperty(Ve,"providers",{enumerable:!0,get:function(){return tr.providers}});Object.defineProperty(Ve,"BaseContract",{enumerable:!0,get:function(){return tr.BaseContract}});Object.defineProperty(Ve,"Contract",{enumerable:!0,get:function(){return tr.Contract}});Object.defineProperty(Ve,"ContractFactory",{enumerable:!0,get:function(){return tr.ContractFactory}});Object.defineProperty(Ve,"BigNumber",{enumerable:!0,get:function(){return tr.BigNumber}});Object.defineProperty(Ve,"FixedNumber",{enumerable:!0,get:function(){return tr.FixedNumber}});Object.defineProperty(Ve,"constants",{enumerable:!0,get:function(){return tr.constants}});Object.defineProperty(Ve,"errors",{enumerable:!0,get:function(){return tr.errors}});Object.defineProperty(Ve,"logger",{enumerable:!0,get:function(){return tr.logger}});Object.defineProperty(Ve,"utils",{enumerable:!0,get:function(){return tr.utils}});Object.defineProperty(Ve,"wordlists",{enumerable:!0,get:function(){return tr.wordlists}});Object.defineProperty(Ve,"version",{enumerable:!0,get:function(){return tr.version}});Object.defineProperty(Ve,"Wordlist",{enumerable:!0,get:function(){return tr.Wordlist}})});var O2=R((BK,S2)=>{g();y();S2.exports=function(e){return(t,...r)=>function(o,...a){return new Promise((c,s)=>{o(...a,(n,i)=>{n?s(n):c(i)})})}(t.bind(e),...r)}});var eh=R(rr=>{g();y();var K0=typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,r){e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value)},ea=typeof window<"u"&&window===rr?rr:typeof globalThis<"u"&&globalThis!=null?globalThis:rr;function lS(e,t){if(t){var r=ea;e=e.split(".");for(var o=0;o<e.length-1;o++){var a=e[o];a in r||(r[a]={}),r=r[a]}e=e[e.length-1],o=r[e],t=t(o),t!=o&&t!=null&&K0(r,e,{configurable:!0,writable:!0,value:t})}}function dS(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function N2(){N2=function(){},ea.Symbol||(ea.Symbol=fS)}function D2(e,t){this.a=e,K0(this,"description",{configurable:!0,writable:!0,value:t})}D2.prototype.toString=function(){return this.a};var fS=function(){function e(r){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new D2("jscomp_symbol_"+(r||"")+"_"+t++,r)}var t=0;return e}();function Z0(){N2();var e=ea.Symbol.iterator;e||(e=ea.Symbol.iterator=ea.Symbol("Symbol.iterator")),typeof Array.prototype[e]!="function"&&K0(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return pS(dS(this))}}),Z0=function(){}}function pS(e){return Z0(),e={next:e},e[ea.Symbol.iterator]=function(){return this},e}function hS(e,t){Z0(),e instanceof String&&(e+="");var r=0,o={next:function(){if(r<e.length){var a=r++;return{value:t(a,e[a]),done:!1}}return o.next=function(){return{done:!0,value:void 0}},o.next()}};return o[Symbol.iterator]=function(){return o},o}lS("Array.prototype.entries",function(e){return e||function(){return hS(this,function(t,r){return[t,r]})}});var gS=rr||self;function Ee(e,t,r){e=e.split("."),r=r||gS,e[0]in r||typeof r.execScript>"u"||r.execScript("var "+e[0]);for(var o;e.length&&(o=e.shift());)e.length||t===void 0?r[o]&&r[o]!==Object.prototype[o]?r=r[o]:r=r[o]={}:r[o]=t}function Vo(e){var t=typeof e;if(t=="object")if(e){if(e instanceof Array)return"array";if(e instanceof Object)return t;var r=Object.prototype.toString.call(e);if(r=="[object Window]")return"object";if(r=="[object Array]"||typeof e.length=="number"&&typeof e.splice<"u"&&typeof e.propertyIsEnumerable<"u"&&!e.propertyIsEnumerable("splice"))return"array";if(r=="[object Function]"||typeof e.call<"u"&&typeof e.propertyIsEnumerable<"u"&&!e.propertyIsEnumerable("call"))return"function"}else return"null";else if(t=="function"&&typeof e.call>"u")return"object";return t}function I2(e){var t=typeof e;return t=="object"&&e!=null||t=="function"}function yS(e,t,r){Ee(e,t,r)}function vS(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}var k2="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function bS(e,t){for(var r,o,a=1;a<arguments.length;a++){o=arguments[a];for(r in o)e[r]=o[r];for(var c=0;c<k2.length;c++)r=k2[c],Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}}var mS=Array.prototype.forEach?function(e,t){Array.prototype.forEach.call(e,t,void 0)}:function(e,t){for(var r=e.length,o=typeof e=="string"?e.split(""):e,a=0;a<r;a++)a in o&&t.call(void 0,o[a],a,e)},Bs=Array.prototype.map?function(e,t){return Array.prototype.map.call(e,t,void 0)}:function(e,t){for(var r=e.length,o=Array(r),a=typeof e=="string"?e.split(""):e,c=0;c<r;c++)c in a&&(o[c]=t.call(void 0,a[c],c,e));return o};function xS(e,t,r){return 2>=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,r)}function qd(e,t,r,o){var a="Assertion failed";if(r){a+=": "+r;var c=o}else e&&(a+=": "+e,c=t);throw Error(a,c||[])}function oe(e,t,r){for(var o=[],a=2;a<arguments.length;++a)o[a-2]=arguments[a];return e||qd("",null,t,o),e}function AS(e,t,r){for(var o=[],a=2;a<arguments.length;++a)o[a-2]=arguments[a];typeof e!="string"&&qd("Expected string but got %s: %s.",[Vo(e),e],t,o)}function wS(e,t,r){for(var o=[],a=2;a<arguments.length;++a)o[a-2]=arguments[a];Array.isArray(e)||qd("Expected array but got %s: %s.",[Vo(e),e],t,o)}function Lt(e,t){for(var r=[],o=1;o<arguments.length;++o)r[o-1]=arguments[o];throw Error("Failure"+(e?": "+e:""),r)}function io(e,t,r,o){for(var a=[],c=3;c<arguments.length;++c)a[c-3]=arguments[c];e instanceof t||qd("Expected instanceof %s but got %s.",[F2(t),F2(e)],r,a)}function F2(e){return e instanceof Function?e.displayName||e.name||"unknown type name":e instanceof Object?e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e):e===null?"null":typeof e}function We(e,t){if(this.c=e,this.b=t,this.a={},this.arrClean=!0,0<this.c.length){for(e=0;e<this.c.length;e++){t=this.c[e];var r=t[0];this.a[r.toString()]=new W2(r,t[1])}this.arrClean=!0}}Ee("jspb.Map",We,void 0);We.prototype.g=function(){if(this.arrClean){if(this.b){var e=this.a,t;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var r=e[t].a;r&&r.g()}}}else{for(this.c.length=0,e=wn(this),e.sort(),t=0;t<e.length;t++){var o=this.a[e[t]];(r=o.a)&&r.g(),this.c.push([o.key,o.value])}this.arrClean=!0}return this.c};We.prototype.toArray=We.prototype.g;We.prototype.Mc=function(e,t){for(var r=this.g(),o=[],a=0;a<r.length;a++){var c=this.a[r[a][0].toString()];ni(this,c);var s=c.a;s?(oe(t),o.push([c.key,t(e,s)])):o.push([c.key,c.value])}return o};We.prototype.toObject=We.prototype.Mc;We.fromObject=function(e,t,r){t=new We([],t);for(var o=0;o<e.length;o++){var a=e[o][0],c=r(e[o][1]);t.set(a,c)}return t};function Es(e){this.a=0,this.b=e}Es.prototype.next=function(){return this.a<this.b.length?{done:!1,value:this.b[this.a++]}:{done:!0,value:void 0}};typeof Symbol<"u"&&(Es.prototype[Symbol.iterator]=function(){return this});We.prototype.Jb=function(){return wn(this).length};We.prototype.getLength=We.prototype.Jb;We.prototype.clear=function(){this.a={},this.arrClean=!1};We.prototype.clear=We.prototype.clear;We.prototype.Cb=function(e){e=e.toString();var t=this.a.hasOwnProperty(e);return delete this.a[e],this.arrClean=!1,t};We.prototype.del=We.prototype.Cb;We.prototype.Eb=function(){var e=[],t=wn(this);t.sort();for(var r=0;r<t.length;r++){var o=this.a[t[r]];e.push([o.key,o.value])}return e};We.prototype.getEntryList=We.prototype.Eb;We.prototype.entries=function(){var e=[],t=wn(this);t.sort();for(var r=0;r<t.length;r++){var o=this.a[t[r]];e.push([o.key,ni(this,o)])}return new Es(e)};We.prototype.entries=We.prototype.entries;We.prototype.keys=function(){var e=[],t=wn(this);t.sort();for(var r=0;r<t.length;r++)e.push(this.a[t[r]].key);return new Es(e)};We.prototype.keys=We.prototype.keys;We.prototype.values=function(){var e=[],t=wn(this);t.sort();for(var r=0;r<t.length;r++)e.push(ni(this,this.a[t[r]]));return new Es(e)};We.prototype.values=We.prototype.values;We.prototype.forEach=function(e,t){var r=wn(this);r.sort();for(var o=0;o<r.length;o++){var a=this.a[r[o]];e.call(t,ni(this,a),a.key,this)}};We.prototype.forEach=We.prototype.forEach;We.prototype.set=function(e,t){var r=new W2(e);return this.b?(r.a=t,r.value=t.g()):r.value=t,this.a[e.toString()]=r,this.arrClean=!1,this};We.prototype.set=We.prototype.set;function ni(e,t){return e.b?(t.a||(t.a=new e.b(t.value)),t.a):t.value}We.prototype.get=function(e){if(e=this.a[e.toString()])return ni(this,e)};We.prototype.get=We.prototype.get;We.prototype.has=function(e){return e.toString()in this.a};We.prototype.has=We.prototype.has;We.prototype.Jc=function(e,t,r,o,a){var c=wn(this);c.sort();for(var s=0;s<c.length;s++){var n=this.a[c[s]];t.Va(e),r.call(t,1,n.key),this.b?o.call(t,2,ni(this,n),a):o.call(t,2,n.value),t.Ya()}};We.prototype.serializeBinary=We.prototype.Jc;We.deserializeBinary=function(e,t,r,o,a,c,s){for(;t.oa()&&!t.bb();){var n=t.c;n==1?c=r.call(t):n==2&&(e.b?(oe(a),s||(s=new e.b),o.call(t,s,a)):s=o.call(t))}oe(c!=null),oe(s!=null),e.set(c,s)};function wn(e){e=e.a;var t=[],r;for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}function W2(e,t){this.key=e,this.value=t,this.a=void 0}function U2(e){if(8192>=e.length)return String.fromCharCode.apply(null,e);for(var t="",r=0;r<e.length;r+=8192)t+=String.fromCharCode.apply(null,xS(e,r,r+8192));return t}var V0={"\0":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"},zd={"'":"\\'"},L2={},As=null;function j2(e,t){t===void 0&&(t=0),q2(),t=L2[t];for(var r=[],o=0;o<e.length;o+=3){var a=e[o],c=o+1<e.length,s=c?e[o+1]:0,n=o+2<e.length,i=n?e[o+2]:0,u=a>>2;a=(a&3)<<4|s>>4,s=(s&15)<<2|i>>6,i&=63,n||(i=64,c||(s=64)),r.push(t[u],t[a],t[s]||"",t[i]||"")}return r.join("")}function z2(e){var t=e.length,r=3*t/4;r%3?r=Math.floor(r):"=.".indexOf(e[t-1])!=-1&&(r="=.".indexOf(e[t-2])!=-1?r-2:r-1);var o=new Uint8Array(r),a=0;return _S(e,function(c){o[a++]=c}),o.subarray(0,a)}function _S(e,t){function r(i){for(;o<e.length;){var u=e.charAt(o++),l=As[u];if(l!=null)return l;if(!/^[\s\xa0]*$/.test(u))throw Error("Unknown base64 encoding at char: "+u)}return i}q2();for(var o=0;;){var a=r(-1),c=r(0),s=r(64),n=r(64);if(n===64&&a===-1)break;t(a<<2|c>>4),s!=64&&(t(c<<4&240|s>>2),n!=64&&t(s<<6&192|n))}}function q2(){if(!As){As={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var o=e.concat(t[r].split(""));L2[r]=o;for(var a=0;a<o.length;a++){var c=o[a];As[c]===void 0&&(As[c]=a)}}}}Ee("jspb.ConstBinaryMessage",function(){},void 0);Ee("jspb.BinaryMessage",function(){},void 0);Ee("jspb.BinaryConstants.FieldType",{yb:-1,ee:1,FLOAT:2,ke:3,te:4,je:5,xb:6,wb:7,BOOL:8,re:9,ie:10,le:11,ce:12,se:13,ge:14,me:15,ne:16,oe:17,pe:18,he:30,ve:31},void 0);Ee("jspb.BinaryConstants.WireType",{yb:-1,ue:0,xb:1,de:2,qe:3,fe:4,wb:5},void 0);Ee("jspb.BinaryConstants.FieldTypeToWireType",function(e){switch(e){case 5:case 3:case 13:case 4:case 17:case 18:case 8:case 14:case 31:return 0;case 1:case 6:case 16:case 30:return 1;case 9:case 11:case 12:return 2;case 2:case 7:case 15:return 5;default:return-1}},void 0);Ee("jspb.BinaryConstants.INVALID_FIELD_NUMBER",-1,void 0);Ee("jspb.BinaryConstants.FLOAT32_EPS",1401298464324817e-60,void 0);Ee("jspb.BinaryConstants.FLOAT32_MIN",11754943508222875e-54,void 0);Ee("jspb.BinaryConstants.FLOAT32_MAX",34028234663852886e22,void 0);Ee("jspb.BinaryConstants.FLOAT64_EPS",5e-324,void 0);Ee("jspb.BinaryConstants.FLOAT64_MIN",22250738585072014e-324,void 0);Ee("jspb.BinaryConstants.FLOAT64_MAX",17976931348623157e292,void 0);Ee("jspb.BinaryConstants.TWO_TO_20",1048576,void 0);Ee("jspb.BinaryConstants.TWO_TO_23",8388608,void 0);Ee("jspb.BinaryConstants.TWO_TO_31",2147483648,void 0);Ee("jspb.BinaryConstants.TWO_TO_32",4294967296,void 0);Ee("jspb.BinaryConstants.TWO_TO_52",4503599627370496,void 0);Ee("jspb.BinaryConstants.TWO_TO_63",9223372036854776e3,void 0);Ee("jspb.BinaryConstants.TWO_TO_64",18446744073709552e3,void 0);Ee("jspb.BinaryConstants.ZERO_HASH","\0\0\0\0\0\0\0\0",void 0);var ct=0,dt=0;Ee("jspb.utils.getSplit64Low",function(){return ct},void 0);Ee("jspb.utils.getSplit64High",function(){return dt},void 0);function J0(e){var t=e>>>0;e=Math.floor((e-t)/4294967296)>>>0,ct=t,dt=e}Ee("jspb.utils.splitUint64",J0,void 0);function Ps(e){var t=0>e;e=Math.abs(e);var r=e>>>0;e=Math.floor((e-r)/4294967296),e>>>=0,t&&(e=~e>>>0,r=(~r>>>0)+1,4294967295<r&&(r=0,e++,4294967295<e&&(e=0))),ct=r,dt=e}Ee("jspb.utils.splitInt64",Ps,void 0);function V2(e){var t=0>e;e=2*Math.abs(e),J0(e),e=ct;var r=dt;t&&(e==0?r==0?r=e=4294967295:(r--,e=4294967295):e--),ct=e,dt=r}Ee("jspb.utils.splitZigzag64",V2,void 0);function G2(e){var t=0>e?1:0;if(e=t?-e:e,e===0)0<1/e?ct=dt=0:(dt=0,ct=2147483648);else if(isNaN(e))dt=0,ct=2147483647;else if(34028234663852886e22<e)dt=0,ct=(t<<31|2139095040)>>>0;else if(11754943508222875e-54>e)e=Math.round(e/Math.pow(2,-149)),dt=0,ct=(t<<31|e)>>>0;else{var r=Math.floor(Math.log(e)/Math.LN2);e*=Math.pow(2,-r),e=Math.round(8388608*e),16777216<=e&&++r,dt=0,ct=(t<<31|r+127<<23|e&8388607)>>>0}}Ee("jspb.utils.splitFloat32",G2,void 0);function H2(e){var t=0>e?1:0;if(e=t?-e:e,e===0)dt=0<1/e?0:2147483648,ct=0;else if(isNaN(e))dt=2147483647,ct=4294967295;else if(17976931348623157e292<e)dt=(t<<31|2146435072)>>>0,ct=0;else if(22250738585072014e-324>e)e/=Math.pow(2,-1074),dt=(t<<31|e/4294967296)>>>0,ct=e>>>0;else{var r=e,o=0;if(2<=r)for(;2<=r&&1023>o;)o++,r/=2;else for(;1>r&&-1022<o;)r*=2,o--;e*=Math.pow(2,-o),dt=(t<<31|o+1023<<20|1048576*e&1048575)>>>0,ct=4503599627370496*e>>>0}}Ee("jspb.utils.splitFloat64",H2,void 0);function _n(e){var t=e.charCodeAt(4),r=e.charCodeAt(5),o=e.charCodeAt(6),a=e.charCodeAt(7);ct=e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)>>>0,dt=t+(r<<8)+(o<<16)+(a<<24)>>>0}Ee("jspb.utils.splitHash64",_n,void 0);function ai(e,t){return 4294967296*t+(e>>>0)}Ee("jspb.utils.joinUint64",ai,void 0);function Ts(e,t){var r=t&2147483648;return r&&(e=~e+1>>>0,t=~t>>>0,e==0&&(t=t+1>>>0)),e=ai(e,t),r?-e:e}Ee("jspb.utils.joinInt64",Ts,void 0);function Vd(e,t,r){var o=t>>31;return r(e<<1^o,(t<<1|e>>>31)^o)}Ee("jspb.utils.toZigzag64",Vd,void 0);function $2(e,t){return Gd(e,t,Ts)}Ee("jspb.utils.joinZigzag64",$2,void 0);function Gd(e,t,r){var o=-(e&1);return r((e>>>1|t<<31)^o,t>>>1^o)}Ee("jspb.utils.fromZigzag64",Gd,void 0);function K2(e){var t=2*(e>>31)+1,r=e>>>23&255;return e&=8388607,r==255?e?NaN:1/0*t:r==0?t*Math.pow(2,-149)*e:t*Math.pow(2,r-150)*(e+Math.pow(2,23))}Ee("jspb.utils.joinFloat32",K2,void 0);function Z2(e,t){var r=2*(t>>31)+1,o=t>>>20&2047;return e=4294967296*(t&1048575)+e,o==2047?e?NaN:1/0*r:o==0?r*Math.pow(2,-1074)*e:r*Math.pow(2,o-1075)*(e+4503599627370496)}Ee("jspb.utils.joinFloat64",Z2,void 0);function Hd(e,t){return String.fromCharCode(e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255,t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255)}Ee("jspb.utils.joinHash64",Hd,void 0);Ee("jspb.utils.DIGITS","0123456789abcdef".split(""),void 0);function Ss(e,t){function r(a,c){return a=a?String(a):"",c?"0000000".slice(a.length)+a:a}if(2097151>=t)return""+ai(e,t);var o=(e>>>24|t<<8)>>>0&16777215;return t=t>>16&65535,e=(e&16777215)+6777216*o+6710656*t,o+=8147497*t,t*=2,1e7<=e&&(o+=Math.floor(e/1e7),e%=1e7),1e7<=o&&(t+=Math.floor(o/1e7),o%=1e7),r(t,0)+r(o,t)+r(e,1)}Ee("jspb.utils.joinUnsignedDecimalString",Ss,void 0);function Os(e,t){var r=t&2147483648;return r&&(e=~e+1>>>0,t=~t+(e==0?1:0)>>>0),e=Ss(e,t),r?"-"+e:e}Ee("jspb.utils.joinSignedDecimalString",Os,void 0);function J2(e,t){_n(e),e=ct;var r=dt;return t?Os(e,r):Ss(e,r)}Ee("jspb.utils.hash64ToDecimalString",J2,void 0);Ee("jspb.utils.hash64ArrayToDecimalStrings",function(e,t){for(var r=Array(e.length),o=0;o<e.length;o++)r[o]=J2(e[o],t);return r},void 0);function Is(e){function t(s,n){for(var i=0;8>i&&(s!==1||0<n);i++)n=s*a[i]+n,a[i]=n&255,n>>>=8}function r(){for(var s=0;8>s;s++)a[s]=~a[s]&255}oe(0<e.length);var o=!1;e[0]==="-"&&(o=!0,e=e.slice(1));for(var a=[0,0,0,0,0,0,0,0],c=0;c<e.length;c++)t(10,e.charCodeAt(c)-48);return o&&(r(),t(1,1)),U2(a)}Ee("jspb.utils.decimalStringToHash64",Is,void 0);Ee("jspb.utils.splitDecimalString",function(e){_n(Is(e))},void 0);function R2(e){return String.fromCharCode(10>e?48+e:87+e)}function M2(e){return 97<=e?e-97+10:e-48}Ee("jspb.utils.hash64ToHexString",function(e){var t=Array(18);t[0]="0",t[1]="x";for(var r=0;8>r;r++){var o=e.charCodeAt(7-r);t[2*r+2]=R2(o>>4),t[2*r+3]=R2(o&15)}return t.join("")},void 0);Ee("jspb.utils.hexStringToHash64",function(e){e=e.toLowerCase(),oe(e.length==18),oe(e[0]=="0"),oe(e[1]=="x");for(var t="",r=0;8>r;r++)t=String.fromCharCode(16*M2(e.charCodeAt(2*r+2))+M2(e.charCodeAt(2*r+3)))+t;return t},void 0);Ee("jspb.utils.hash64ToNumber",function(e,t){_n(e),e=ct;var r=dt;return t?Ts(e,r):ai(e,r)},void 0);Ee("jspb.utils.numberToHash64",function(e){return Ps(e),Hd(ct,dt)},void 0);Ee("jspb.utils.countVarints",function(e,t,r){for(var o=0,a=t;a<r;a++)o+=e[a]>>7;return r-t-o},void 0);Ee("jspb.utils.countVarintFields",function(e,t,r,o){var a=0;if(o*=8,128>o)for(;t<r&&e[t++]==o;)for(a++;;){var c=e[t++];if((c&128)==0)break}else for(;t<r;){for(c=o;128<c;){if(e[t]!=(c&127|128))return a;t++,c>>=7}if(e[t++]!=c)break;for(a++;c=e[t++],(c&128)!=0;);}return a},void 0);function Y2(e,t,r,o,a){var c=0;if(128>o)for(;t<r&&e[t++]==o;)c++,t+=a;else for(;t<r;){for(var s=o;128<s;){if(e[t++]!=(s&127|128))return c;s>>=7}if(e[t++]!=s)break;c++,t+=a}return c}Ee("jspb.utils.countFixed32Fields",function(e,t,r,o){return Y2(e,t,r,8*o+5,4)},void 0);Ee("jspb.utils.countFixed64Fields",function(e,t,r,o){return Y2(e,t,r,8*o+1,8)},void 0);Ee("jspb.utils.countDelimitedFields",function(e,t,r,o){var a=0;for(o=8*o+2;t<r;){for(var c=o;128<c;){if(e[t++]!=(c&127|128))return a;c>>=7}if(e[t++]!=c)break;a++;for(var s=0,n=1;c=e[t++],s+=(c&127)*n,n*=128,(c&128)!=0;);t+=s}return a},void 0);Ee("jspb.utils.debugBytesToTextFormat",function(e){var t='"';if(e){e=$d(e);for(var r=0;r<e.length;r++)t+="\\x",16>e[r]&&(t+="0"),t+=e[r].toString(16)}return t+'"'},void 0);Ee("jspb.utils.debugScalarToTextFormat",function(e){if(typeof e=="string"){e=String(e);for(var t=['"'],r=0;r<e.length;r++){var o=e.charAt(r),a=o.charCodeAt(0),c=r+1,s;(s=V0[o])||(31<a&&127>a||(a=o,a in zd?o=zd[a]:a in V0?o=zd[a]=V0[a]:(s=a.charCodeAt(0),31<s&&127>s?o=a:(256>s?(o="\\x",(16>s||256<s)&&(o+="0")):(o="\\u",4096>s&&(o+="0")),o+=s.toString(16).toUpperCase()),o=zd[a]=o)),s=o),t[c]=s}t.push('"'),e=t.join("")}else e=e.toString();return e},void 0);Ee("jspb.utils.stringToByteArray",function(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++){var o=e.charCodeAt(r);if(255<o)throw Error("Conversion error: string contains codepoint outside of byte range");t[r]=o}return t},void 0);function $d(e){return e.constructor===Uint8Array?e:e.constructor===ArrayBuffer?new Uint8Array(e):e.constructor===Array?new Uint8Array(e):e.constructor===String?z2(e):e instanceof Uint8Array?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):(Lt("Type not convertible to Uint8Array."),new Uint8Array(0))}Ee("jspb.utils.byteSourceToUint8Array",$d,void 0);function ee(e,t,r){this.b=null,this.a=this.c=this.h=0,this.v=!1,e&&this.H(e,t,r)}Ee("jspb.BinaryDecoder",ee,void 0);var ws=[];ee.getInstanceCacheLength=function(){return ws.length};function Kd(e,t,r){if(ws.length){var o=ws.pop();return e&&o.H(e,t,r),o}return new ee(e,t,r)}ee.alloc=Kd;ee.prototype.Ca=function(){this.clear(),100>ws.length&&ws.push(this)};ee.prototype.free=ee.prototype.Ca;ee.prototype.clone=function(){return Kd(this.b,this.h,this.c-this.h)};ee.prototype.clone=ee.prototype.clone;ee.prototype.clear=function(){this.b=null,this.a=this.c=this.h=0,this.v=!1};ee.prototype.clear=ee.prototype.clear;ee.prototype.Y=function(){return this.b};ee.prototype.getBuffer=ee.prototype.Y;ee.prototype.H=function(e,t,r){this.b=$d(e),this.h=t!==void 0?t:0,this.c=r!==void 0?this.h+r:this.b.length,this.a=this.h};ee.prototype.setBlock=ee.prototype.H;ee.prototype.Db=function(){return this.c};ee.prototype.getEnd=ee.prototype.Db;ee.prototype.setEnd=function(e){this.c=e};ee.prototype.setEnd=ee.prototype.setEnd;ee.prototype.reset=function(){this.a=this.h};ee.prototype.reset=ee.prototype.reset;ee.prototype.B=function(){return this.a};ee.prototype.getCursor=ee.prototype.B;ee.prototype.Ma=function(e){this.a=e};ee.prototype.setCursor=ee.prototype.Ma;ee.prototype.advance=function(e){this.a+=e,oe(this.a<=this.c)};ee.prototype.advance=ee.prototype.advance;ee.prototype.ya=function(){return this.a==this.c};ee.prototype.atEnd=ee.prototype.ya;ee.prototype.Qb=function(){return this.a>this.c};ee.prototype.pastEnd=ee.prototype.Qb;ee.prototype.getError=function(){return this.v||0>this.a||this.a>this.c};ee.prototype.getError=ee.prototype.getError;ee.prototype.w=function(e){for(var t=128,r=0,o=0,a=0;4>a&&128<=t;a++)t=this.b[this.a++],r|=(t&127)<<7*a;if(128<=t&&(t=this.b[this.a++],r|=(t&127)<<28,o|=(t&127)>>4),128<=t)for(a=0;5>a&&128<=t;a++)t=this.b[this.a++],o|=(t&127)<<7*a+3;if(128>t)return e(r>>>0,o>>>0);Lt("Failed to read varint, encoding is invalid."),this.v=!0};ee.prototype.readSplitVarint64=ee.prototype.w;ee.prototype.ea=function(e){return this.w(function(t,r){return Gd(t,r,e)})};ee.prototype.readSplitZigzagVarint64=ee.prototype.ea;ee.prototype.ta=function(e){var t=this.b,r=this.a;this.a+=8;for(var o=0,a=0,c=r+7;c>=r;c--)o=o<<8|t[c],a=a<<8|t[c+4];return e(o,a)};ee.prototype.readSplitFixed64=ee.prototype.ta;ee.prototype.kb=function(){for(;this.b[this.a]&128;)this.a++;this.a++};ee.prototype.skipVarint=ee.prototype.kb;ee.prototype.mb=function(e){for(;128<e;)this.a--,e>>>=7;this.a--};ee.prototype.unskipVarint=ee.prototype.mb;ee.prototype.o=function(){var e=this.b,t=e[this.a],r=t&127;return 128>t?(this.a+=1,oe(this.a<=this.c),r):(t=e[this.a+1],r|=(t&127)<<7,128>t?(this.a+=2,oe(this.a<=this.c),r):(t=e[this.a+2],r|=(t&127)<<14,128>t?(this.a+=3,oe(this.a<=this.c),r):(t=e[this.a+3],r|=(t&127)<<21,128>t?(this.a+=4,oe(this.a<=this.c),r):(t=e[this.a+4],r|=(t&15)<<28,128>t?(this.a+=5,oe(this.a<=this.c),r>>>0):(this.a+=5,128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&oe(!1),oe(this.a<=this.c),r)))))};ee.prototype.readUnsignedVarint32=ee.prototype.o;ee.prototype.da=function(){return~~this.o()};ee.prototype.readSignedVarint32=ee.prototype.da;ee.prototype.O=function(){return this.o().toString()};ee.prototype.Ea=function(){return this.da().toString()};ee.prototype.readSignedVarint32String=ee.prototype.Ea;ee.prototype.Ia=function(){var e=this.o();return e>>>1^-(e&1)};ee.prototype.readZigzagVarint32=ee.prototype.Ia;ee.prototype.Ga=function(){return this.w(ai)};ee.prototype.readUnsignedVarint64=ee.prototype.Ga;ee.prototype.Ha=function(){return this.w(Ss)};ee.prototype.readUnsignedVarint64String=ee.prototype.Ha;ee.prototype.sa=function(){return this.w(Ts)};ee.prototype.readSignedVarint64=ee.prototype.sa;ee.prototype.Fa=function(){return this.w(Os)};ee.prototype.readSignedVarint64String=ee.prototype.Fa;ee.prototype.Ja=function(){return this.w($2)};ee.prototype.readZigzagVarint64=ee.prototype.Ja;ee.prototype.fb=function(){return this.ea(Hd)};ee.prototype.readZigzagVarintHash64=ee.prototype.fb;ee.prototype.Ka=function(){return this.ea(Os)};ee.prototype.readZigzagVarint64String=ee.prototype.Ka;ee.prototype.Gc=function(){var e=this.b[this.a];return this.a+=1,oe(this.a<=this.c),e};ee.prototype.readUint8=ee.prototype.Gc;ee.prototype.Ec=function(){var e=this.b[this.a],t=this.b[this.a+1];return this.a+=2,oe(this.a<=this.c),e<<0|t<<8};ee.prototype.readUint16=ee.prototype.Ec;ee.prototype.m=function(){var e=this.b[this.a],t=this.b[this.a+1],r=this.b[this.a+2],o=this.b[this.a+3];return this.a+=4,oe(this.a<=this.c),(e<<0|t<<8|r<<16|o<<24)>>>0};ee.prototype.readUint32=ee.prototype.m;ee.prototype.ga=function(){var e=this.m(),t=this.m();return ai(e,t)};ee.prototype.readUint64=ee.prototype.ga;ee.prototype.ha=function(){var e=this.m(),t=this.m();return Ss(e,t)};ee.prototype.readUint64String=ee.prototype.ha;ee.prototype.Xb=function(){var e=this.b[this.a];return this.a+=1,oe(this.a<=this.c),e<<24>>24};ee.prototype.readInt8=ee.prototype.Xb;ee.prototype.Vb=function(){var e=this.b[this.a],t=this.b[this.a+1];return this.a+=2,oe(this.a<=this.c),(e<<0|t<<8)<<16>>16};ee.prototype.readInt16=ee.prototype.Vb;ee.prototype.P=function(){var e=this.b[this.a],t=this.b[this.a+1],r=this.b[this.a+2],o=this.b[this.a+3];return this.a+=4,oe(this.a<=this.c),e<<0|t<<8|r<<16|o<<24};ee.prototype.readInt32=ee.prototype.P;ee.prototype.ba=function(){var e=this.m(),t=this.m();return Ts(e,t)};ee.prototype.readInt64=ee.prototype.ba;ee.prototype.ca=function(){var e=this.m(),t=this.m();return Os(e,t)};ee.prototype.readInt64String=ee.prototype.ca;ee.prototype.aa=function(){var e=this.m();return K2(e,0)};ee.prototype.readFloat=ee.prototype.aa;ee.prototype.Z=function(){var e=this.m(),t=this.m();return Z2(e,t)};ee.prototype.readDouble=ee.prototype.Z;ee.prototype.pa=function(){return!!this.b[this.a++]};ee.prototype.readBool=ee.prototype.pa;ee.prototype.ra=function(){return this.da()};ee.prototype.readEnum=ee.prototype.ra;ee.prototype.fa=function(e){var t=this.b,r=this.a;e=r+e;for(var o=[],a="";r<e;){var c=t[r++];if(128>c)o.push(c);else{if(192>c)continue;if(224>c){var s=t[r++];o.push((c&31)<<6|s&63)}else if(240>c){s=t[r++];var n=t[r++];o.push((c&15)<<12|(s&63)<<6|n&63)}else if(248>c){s=t[r++],n=t[r++];var i=t[r++];c=(c&7)<<18|(s&63)<<12|(n&63)<<6|i&63,c-=65536,o.push((c>>10&1023)+55296,(c&1023)+56320)}}8192<=o.length&&(a+=String.fromCharCode.apply(null,o),o.length=0)}return a+=U2(o),this.a=r,a};ee.prototype.readString=ee.prototype.fa;ee.prototype.Dc=function(){var e=this.o();return this.fa(e)};ee.prototype.readStringWithLength=ee.prototype.Dc;ee.prototype.qa=function(e){if(0>e||this.a+e>this.b.length)return this.v=!0,Lt("Invalid byte length!"),new Uint8Array(0);var t=this.b.subarray(this.a,this.a+e);return this.a+=e,oe(this.a<=this.c),t};ee.prototype.readBytes=ee.prototype.qa;ee.prototype.ia=function(){return this.w(Hd)};ee.prototype.readVarintHash64=ee.prototype.ia;ee.prototype.$=function(){var e=this.b,t=this.a,r=e[t],o=e[t+1],a=e[t+2],c=e[t+3],s=e[t+4],n=e[t+5],i=e[t+6];return e=e[t+7],this.a+=8,String.fromCharCode(r,o,a,c,s,n,i,e)};ee.prototype.readFixedHash64=ee.prototype.$;function W(e,t,r){this.a=Kd(e,t,r),this.O=this.a.B(),this.b=this.c=-1,this.h=!1,this.v=null}Ee("jspb.BinaryReader",W,void 0);var oi=[];W.clearInstanceCache=function(){oi=[]};W.getInstanceCacheLength=function(){return oi.length};function X2(e,t,r){if(oi.length){var o=oi.pop();return e&&o.a.H(e,t,r),o}return new W(e,t,r)}W.alloc=X2;W.prototype.zb=X2;W.prototype.alloc=W.prototype.zb;W.prototype.Ca=function(){this.a.clear(),this.b=this.c=-1,this.h=!1,this.v=null,100>oi.length&&oi.push(this)};W.prototype.free=W.prototype.Ca;W.prototype.Fb=function(){return this.O};W.prototype.getFieldCursor=W.prototype.Fb;W.prototype.B=function(){return this.a.B()};W.prototype.getCursor=W.prototype.B;W.prototype.Y=function(){return this.a.Y()};W.prototype.getBuffer=W.prototype.Y;W.prototype.Hb=function(){return this.c};W.prototype.getFieldNumber=W.prototype.Hb;W.prototype.Lb=function(){return this.b};W.prototype.getWireType=W.prototype.Lb;W.prototype.Mb=function(){return this.b==2};W.prototype.isDelimited=W.prototype.Mb;W.prototype.bb=function(){return this.b==4};W.prototype.isEndGroup=W.prototype.bb;W.prototype.getError=function(){return this.h||this.a.getError()};W.prototype.getError=W.prototype.getError;W.prototype.H=function(e,t,r){this.a.H(e,t,r),this.b=this.c=-1};W.prototype.setBlock=W.prototype.H;W.prototype.reset=function(){this.a.reset(),this.b=this.c=-1};W.prototype.reset=W.prototype.reset;W.prototype.advance=function(e){this.a.advance(e)};W.prototype.advance=W.prototype.advance;W.prototype.oa=function(){if(this.a.ya())return!1;if(this.getError())return Lt("Decoder hit an error"),!1;this.O=this.a.B();var e=this.a.o(),t=e>>>3;return e&=7,e!=0&&e!=5&&e!=1&&e!=2&&e!=3&&e!=4?(Lt("Invalid wire type: %s (at position %s)",e,this.O),this.h=!0,!1):(this.c=t,this.b=e,!0)};W.prototype.nextField=W.prototype.oa;W.prototype.Oa=function(){this.a.mb(this.c<<3|this.b)};W.prototype.unskipHeader=W.prototype.Oa;W.prototype.Lc=function(){var e=this.c;for(this.Oa();this.oa()&&this.c==e;)this.C();this.a.ya()||this.Oa()};W.prototype.skipMatchingFields=W.prototype.Lc;W.prototype.lb=function(){this.b!=0?(Lt("Invalid wire type for skipVarintField"),this.C()):this.a.kb()};W.prototype.skipVarintField=W.prototype.lb;W.prototype.gb=function(){if(this.b!=2)Lt("Invalid wire type for skipDelimitedField"),this.C();else{var e=this.a.o();this.a.advance(e)}};W.prototype.skipDelimitedField=W.prototype.gb;W.prototype.hb=function(){this.b!=5?(Lt("Invalid wire type for skipFixed32Field"),this.C()):this.a.advance(4)};W.prototype.skipFixed32Field=W.prototype.hb;W.prototype.ib=function(){this.b!=1?(Lt("Invalid wire type for skipFixed64Field"),this.C()):this.a.advance(8)};W.prototype.skipFixed64Field=W.prototype.ib;W.prototype.jb=function(){var e=this.c;do{if(!this.oa()){Lt("Unmatched start-group tag: stream EOF"),this.h=!0;break}if(this.b==4){this.c!=e&&(Lt("Unmatched end-group tag"),this.h=!0);break}this.C()}while(1)};W.prototype.skipGroup=W.prototype.jb;W.prototype.C=function(){switch(this.b){case 0:this.lb();break;case 1:this.ib();break;case 2:this.gb();break;case 5:this.hb();break;case 3:this.jb();break;default:Lt("Invalid wire encoding for field.")}};W.prototype.skipField=W.prototype.C;W.prototype.Hc=function(e,t){this.v===null&&(this.v={}),oe(!this.v[e]),this.v[e]=t};W.prototype.registerReadCallback=W.prototype.Hc;W.prototype.Ic=function(e){return oe(this.v!==null),e=this.v[e],oe(e),e(this)};W.prototype.runReadCallback=W.prototype.Ic;W.prototype.Yb=function(e,t){oe(this.b==2);var r=this.a.c,o=this.a.o();o=this.a.B()+o,this.a.setEnd(o),t(e,this),this.a.Ma(o),this.a.setEnd(r)};W.prototype.readMessage=W.prototype.Yb;W.prototype.Ub=function(e,t,r){oe(this.b==3),oe(this.c==e),r(t,this),this.h||this.b==4||(Lt("Group submessage did not end with an END_GROUP tag"),this.h=!0)};W.prototype.readGroup=W.prototype.Ub;W.prototype.Gb=function(){oe(this.b==2);var e=this.a.o(),t=this.a.B(),r=t+e;return e=Kd(this.a.Y(),t,e),this.a.Ma(r),e};W.prototype.getFieldDecoder=W.prototype.Gb;W.prototype.P=function(){return oe(this.b==0),this.a.da()};W.prototype.readInt32=W.prototype.P;W.prototype.Wb=function(){return oe(this.b==0),this.a.Ea()};W.prototype.readInt32String=W.prototype.Wb;W.prototype.ba=function(){return oe(this.b==0),this.a.sa()};W.prototype.readInt64=W.prototype.ba;W.prototype.ca=function(){return oe(this.b==0),this.a.Fa()};W.prototype.readInt64String=W.prototype.ca;W.prototype.m=function(){return oe(this.b==0),this.a.o()};W.prototype.readUint32=W.prototype.m;W.prototype.Fc=function(){return oe(this.b==0),this.a.O()};W.prototype.readUint32String=W.prototype.Fc;W.prototype.ga=function(){return oe(this.b==0),this.a.Ga()};W.prototype.readUint64=W.prototype.ga;W.prototype.ha=function(){return oe(this.b==0),this.a.Ha()};W.prototype.readUint64String=W.prototype.ha;W.prototype.zc=function(){return oe(this.b==0),this.a.Ia()};W.prototype.readSint32=W.prototype.zc;W.prototype.Ac=function(){return oe(this.b==0),this.a.Ja()};W.prototype.readSint64=W.prototype.Ac;W.prototype.Bc=function(){return oe(this.b==0),this.a.Ka()};W.prototype.readSint64String=W.prototype.Bc;W.prototype.Rb=function(){return oe(this.b==5),this.a.m()};W.prototype.readFixed32=W.prototype.Rb;W.prototype.Sb=function(){return oe(this.b==1),this.a.ga()};W.prototype.readFixed64=W.prototype.Sb;W.prototype.Tb=function(){return oe(this.b==1),this.a.ha()};W.prototype.readFixed64String=W.prototype.Tb;W.prototype.vc=function(){return oe(this.b==5),this.a.P()};W.prototype.readSfixed32=W.prototype.vc;W.prototype.wc=function(){return oe(this.b==5),this.a.P().toString()};W.prototype.readSfixed32String=W.prototype.wc;W.prototype.xc=function(){return oe(this.b==1),this.a.ba()};W.prototype.readSfixed64=W.prototype.xc;W.prototype.yc=function(){return oe(this.b==1),this.a.ca()};W.prototype.readSfixed64String=W.prototype.yc;W.prototype.aa=function(){return oe(this.b==5),this.a.aa()};W.prototype.readFloat=W.prototype.aa;W.prototype.Z=function(){return oe(this.b==1),this.a.Z()};W.prototype.readDouble=W.prototype.Z;W.prototype.pa=function(){return oe(this.b==0),!!this.a.o()};W.prototype.readBool=W.prototype.pa;W.prototype.ra=function(){return oe(this.b==0),this.a.sa()};W.prototype.readEnum=W.prototype.ra;W.prototype.fa=function(){oe(this.b==2);var e=this.a.o();return this.a.fa(e)};W.prototype.readString=W.prototype.fa;W.prototype.qa=function(){oe(this.b==2);var e=this.a.o();return this.a.qa(e)};W.prototype.readBytes=W.prototype.qa;W.prototype.ia=function(){return oe(this.b==0),this.a.ia()};W.prototype.readVarintHash64=W.prototype.ia;W.prototype.Cc=function(){return oe(this.b==0),this.a.fb()};W.prototype.readSintHash64=W.prototype.Cc;W.prototype.w=function(e){return oe(this.b==0),this.a.w(e)};W.prototype.readSplitVarint64=W.prototype.w;W.prototype.ea=function(e){return oe(this.b==0),this.a.w(function(t,r){return Gd(t,r,e)})};W.prototype.readSplitZigzagVarint64=W.prototype.ea;W.prototype.$=function(){return oe(this.b==1),this.a.$()};W.prototype.readFixedHash64=W.prototype.$;W.prototype.ta=function(e){return oe(this.b==1),this.a.ta(e)};W.prototype.readSplitFixed64=W.prototype.ta;function Pt(e,t){oe(e.b==2);var r=e.a.o();r=e.a.B()+r;for(var o=[];e.a.B()<r;)o.push(t.call(e.a));return o}W.prototype.gc=function(){return Pt(this,this.a.da)};W.prototype.readPackedInt32=W.prototype.gc;W.prototype.hc=function(){return Pt(this,this.a.Ea)};W.prototype.readPackedInt32String=W.prototype.hc;W.prototype.ic=function(){return Pt(this,this.a.sa)};W.prototype.readPackedInt64=W.prototype.ic;W.prototype.jc=function(){return Pt(this,this.a.Fa)};W.prototype.readPackedInt64String=W.prototype.jc;W.prototype.qc=function(){return Pt(this,this.a.o)};W.prototype.readPackedUint32=W.prototype.qc;W.prototype.rc=function(){return Pt(this,this.a.O)};W.prototype.readPackedUint32String=W.prototype.rc;W.prototype.sc=function(){return Pt(this,this.a.Ga)};W.prototype.readPackedUint64=W.prototype.sc;W.prototype.tc=function(){return Pt(this,this.a.Ha)};W.prototype.readPackedUint64String=W.prototype.tc;W.prototype.nc=function(){return Pt(this,this.a.Ia)};W.prototype.readPackedSint32=W.prototype.nc;W.prototype.oc=function(){return Pt(this,this.a.Ja)};W.prototype.readPackedSint64=W.prototype.oc;W.prototype.pc=function(){return Pt(this,this.a.Ka)};W.prototype.readPackedSint64String=W.prototype.pc;W.prototype.bc=function(){return Pt(this,this.a.m)};W.prototype.readPackedFixed32=W.prototype.bc;W.prototype.cc=function(){return Pt(this,this.a.ga)};W.prototype.readPackedFixed64=W.prototype.cc;W.prototype.dc=function(){return Pt(this,this.a.ha)};W.prototype.readPackedFixed64String=W.prototype.dc;W.prototype.kc=function(){return Pt(this,this.a.P)};W.prototype.readPackedSfixed32=W.prototype.kc;W.prototype.lc=function(){return Pt(this,this.a.ba)};W.prototype.readPackedSfixed64=W.prototype.lc;W.prototype.mc=function(){return Pt(this,this.a.ca)};W.prototype.readPackedSfixed64String=W.prototype.mc;W.prototype.fc=function(){return Pt(this,this.a.aa)};W.prototype.readPackedFloat=W.prototype.fc;W.prototype.$b=function(){return Pt(this,this.a.Z)};W.prototype.readPackedDouble=W.prototype.$b;W.prototype.Zb=function(){return Pt(this,this.a.pa)};W.prototype.readPackedBool=W.prototype.Zb;W.prototype.ac=function(){return Pt(this,this.a.ra)};W.prototype.readPackedEnum=W.prototype.ac;W.prototype.uc=function(){return Pt(this,this.a.ia)};W.prototype.readPackedVarintHash64=W.prototype.uc;W.prototype.ec=function(){return Pt(this,this.a.$)};W.prototype.readPackedFixedHash64=W.prototype.ec;function _s(e,t,r,o,a){this.ma=e,this.Ba=t,this.la=r,this.Na=o,this.na=a}Ee("jspb.ExtensionFieldInfo",_s,void 0);function Q2(e,t,r,o,a,c){this.Za=e,this.za=t,this.Aa=r,this.Wa=o,this.Ab=a,this.Nb=c}Ee("jspb.ExtensionFieldBinaryInfo",Q2,void 0);_s.prototype.F=function(){return!!this.la};_s.prototype.isMessageType=_s.prototype.F;function we(){}Ee("jspb.Message",we,void 0);we.GENERATE_TO_OBJECT=!0;we.GENERATE_FROM_OBJECT=!0;var Zd=typeof Uint8Array=="function";we.prototype.Ib=function(){return this.b};we.prototype.getJsPbMessageId=we.prototype.Ib;we.initialize=function(e,t,r,o,a,c){e.f=null,t||(t=r?[r]:[]),e.b=r?String(r):void 0,e.D=r===0?-1:0,e.u=t;e:{if(r=e.u.length,t=-1,r&&(t=r-1,r=e.u[t],!(r===null||typeof r!="object"||Array.isArray(r)||Zd&&r instanceof Uint8Array))){e.G=t-e.D,e.i=r;break e}-1<o?(e.G=Math.max(o,t+1-e.D),e.i=null):e.G=Number.MAX_VALUE}if(e.a={},a)for(o=0;o<a.length;o++)t=a[o],t<e.G?(t+=e.D,e.u[t]=e.u[t]||Cs):(Jd(e),e.i[t]=e.i[t]||Cs);if(c&&c.length)for(o=0;o<c.length;o++)Y0(e,c[o])};var Cs=Object.freeze?Object.freeze([]):[];function Jd(e){var t=e.G+e.D;e.u[t]||(e.i=e.u[t]={})}function e4(e,t,r){for(var o=[],a=0;a<e.length;a++)o[a]=t.call(e[a],r,e[a]);return o}we.toObjectList=e4;we.toObjectExtension=function(e,t,r,o,a){for(var c in r){var s=r[c],n=o.call(e,s);if(n!=null){for(var i in s.Ba)if(s.Ba.hasOwnProperty(i))break;t[i]=s.Na?s.na?e4(n,s.Na,a):s.Na(a,n):n}}};we.serializeBinaryExtensions=function(e,t,r,o){for(var a in r){var c=r[a],s=c.Za;if(!c.Aa)throw Error("Message extension present that was generated without binary serialization support");var n=o.call(e,s);if(n!=null)if(s.F())if(c.Wa)c.Aa.call(t,s.ma,n,c.Wa);else throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format");else c.Aa.call(t,s.ma,n)}};we.readBinaryExtension=function(e,t,r,o,a){var c=r[t.c];if(c){if(r=c.Za,!c.za)throw Error("Deserializing extension whose generated code does not support binary format");if(r.F()){var s=new r.la;c.za.call(t,s,c.Ab)}else s=c.za.call(t);r.na&&!c.Nb?(t=o.call(e,r))?t.push(s):a.call(e,r,[s]):a.call(e,r,s)}else t.C()};function kr(e,t){if(t<e.G){t+=e.D;var r=e.u[t];return r===Cs?e.u[t]=[]:r}if(e.i)return r=e.i[t],r===Cs?e.i[t]=[]:r}we.getField=kr;we.getRepeatedField=function(e,t){return kr(e,t)};function t4(e,t){return e=kr(e,t),e==null?e:+e}we.getOptionalFloatingPointField=t4;function r4(e,t){return e=kr(e,t),e==null?e:!!e}we.getBooleanField=r4;we.getRepeatedFloatingPointField=function(e,t){var r=kr(e,t);if(e.a||(e.a={}),!e.a[t]){for(var o=0;o<r.length;o++)r[o]=+r[o];e.a[t]=!0}return r};we.getRepeatedBooleanField=function(e,t){var r=kr(e,t);if(e.a||(e.a={}),!e.a[t]){for(var o=0;o<r.length;o++)r[o]=!!r[o];e.a[t]=!0}return r};function o4(e){return e==null||typeof e=="string"?e:Zd&&e instanceof Uint8Array?j2(e):(Lt("Cannot coerce to b64 string: "+Vo(e)),null)}we.bytesAsB64=o4;function n4(e){return e==null||e instanceof Uint8Array?e:typeof e=="string"?z2(e):(Lt("Cannot coerce to Uint8Array: "+Vo(e)),null)}we.bytesAsU8=n4;we.bytesListAsB64=function(e){return a4(e),e.length&&typeof e[0]!="string"?Bs(e,o4):e};we.bytesListAsU8=function(e){return a4(e),!e.length||e[0]instanceof Uint8Array?e:Bs(e,n4)};function a4(e){if(e&&1<e.length){var t=Vo(e[0]);mS(e,function(r){Vo(r)!=t&&Lt("Inconsistent type in JSPB repeated field array. Got "+Vo(r)+" expected "+t)})}}function i4(e,t,r){return e=kr(e,t),e??r}we.getFieldWithDefault=i4;we.getBooleanFieldWithDefault=function(e,t,r){return e=r4(e,t),e??r};we.getFloatingPointFieldWithDefault=function(e,t,r){return e=t4(e,t),e??r};we.getFieldProto3=i4;we.getMapField=function(e,t,r,o){if(e.f||(e.f={}),t in e.f)return e.f[t];var a=kr(e,t);if(!a){if(r)return;a=[],Go(e,t,a)}return e.f[t]=new We(a,o)};function Go(e,t,r){return io(e,we),t<e.G?e.u[t+e.D]=r:(Jd(e),e.i[t]=r),e}we.setField=Go;we.setProto3IntField=function(e,t,r){return ta(e,t,r,0)};we.setProto3FloatField=function(e,t,r){return ta(e,t,r,0)};we.setProto3BooleanField=function(e,t,r){return ta(e,t,r,!1)};we.setProto3StringField=function(e,t,r){return ta(e,t,r,"")};we.setProto3BytesField=function(e,t,r){return ta(e,t,r,"")};we.setProto3EnumField=function(e,t,r){return ta(e,t,r,0)};we.setProto3StringIntField=function(e,t,r){return ta(e,t,r,"0")};function ta(e,t,r,o){return io(e,we),r!==o?Go(e,t,r):t<e.G?e.u[t+e.D]=null:(Jd(e),delete e.i[t]),e}we.addToRepeatedField=function(e,t,r,o){return io(e,we),t=kr(e,t),o!=null?t.splice(o,0,r):t.push(r),e};function s4(e,t,r,o){return io(e,we),(r=Y0(e,r))&&r!==t&&o!==void 0&&(e.f&&r in e.f&&(e.f[r]=void 0),Go(e,r,void 0)),Go(e,t,o)}we.setOneofField=s4;function Y0(e,t){for(var r,o,a=0;a<t.length;a++){var c=t[a],s=kr(e,c);s!=null&&(r=c,o=s,Go(e,c,void 0))}return r?(Go(e,r,o),r):0}we.computeOneofCase=Y0;we.getWrapperField=function(e,t,r,o){if(e.f||(e.f={}),!e.f[r]){var a=kr(e,r);(o||a)&&(e.f[r]=new t(a))}return e.f[r]};we.getRepeatedWrapperField=function(e,t,r){return c4(e,t,r),t=e.f[r],t==Cs&&(t=e.f[r]=[]),t};function c4(e,t,r){if(e.f||(e.f={}),!e.f[r]){for(var o=kr(e,r),a=[],c=0;c<o.length;c++)a[c]=new t(o[c]);e.f[r]=a}}we.setWrapperField=function(e,t,r){io(e,we),e.f||(e.f={});var o=r&&r.g();return e.f[t]=r,Go(e,t,o)};we.setOneofWrapperField=function(e,t,r,o){io(e,we),e.f||(e.f={});var a=o&&o.g();return e.f[t]=o,s4(e,t,r,a)};we.setRepeatedWrapperField=function(e,t,r){io(e,we),e.f||(e.f={}),r=r||[];for(var o=[],a=0;a<r.length;a++)o[a]=r[a].g();return e.f[t]=r,Go(e,t,o)};we.addToRepeatedWrapperField=function(e,t,r,o,a){c4(e,o,t);var c=e.f[t];return c||(c=e.f[t]=[]),r=r||new o,e=kr(e,t),a!=null?(c.splice(a,0,r),e.splice(a,0,r.g())):(c.push(r),e.push(r.g())),r};we.toMap=function(e,t,r,o){for(var a={},c=0;c<e.length;c++)a[t.call(e[c])]=r?r.call(e[c],o,e[c]):e[c];return a};function u4(e){if(e.f)for(var t in e.f){var r=e.f[t];if(Array.isArray(r))for(var o=0;o<r.length;o++)r[o]&&r[o].g();else r&&r.g()}}we.prototype.g=function(){return u4(this),this.u};we.prototype.toArray=we.prototype.g;we.prototype.toString=function(){return u4(this),this.u.toString()};we.prototype.getExtension=function(e){if(this.i){this.f||(this.f={});var t=e.ma;if(e.na){if(e.F())return this.f[t]||(this.f[t]=Bs(this.i[t]||[],function(r){return new e.la(r)})),this.f[t]}else if(e.F())return!this.f[t]&&this.i[t]&&(this.f[t]=new e.la(this.i[t])),this.f[t];return this.i[t]}};we.prototype.getExtension=we.prototype.getExtension;we.prototype.Kc=function(e,t){this.f||(this.f={}),Jd(this);var r=e.ma;return e.na?(t=t||[],e.F()?(this.f[r]=t,this.i[r]=Bs(t,function(o){return o.g()})):this.i[r]=t):e.F()?(this.f[r]=t,this.i[r]=t&&t.g()):this.i[r]=t,this};we.prototype.setExtension=we.prototype.Kc;we.difference=function(e,t){if(!(e instanceof t.constructor))throw Error("Messages have different types.");var r=e.g();t=t.g();var o=[],a=0,c=r.length>t.length?r.length:t.length;for(e.b&&(o[0]=e.b,a=1);a<c;a++)ks(r[a],t[a])||(o[a]=t[a]);return new e.constructor(o)};we.equals=function(e,t){return e==t||!(!e||!t)&&e instanceof t.constructor&&ks(e.g(),t.g())};function G0(e,t){e=e||{},t=t||{};var r={},o;for(o in e)r[o]=0;for(o in t)r[o]=0;for(o in r)if(!ks(e[o],t[o]))return!1;return!0}we.compareExtensions=G0;function ks(e,t){if(e==t)return!0;if(!I2(e)||!I2(t))return typeof e=="number"&&isNaN(e)||typeof t=="number"&&isNaN(t)?String(e)==String(t):!1;if(e.constructor!=t.constructor)return!1;if(Zd&&e.constructor===Uint8Array){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}if(e.constructor===Array){var o=void 0,a=void 0,c=Math.max(e.length,t.length);for(r=0;r<c;r++){var s=e[r],n=t[r];if(s&&s.constructor==Object&&(oe(o===void 0),oe(r===e.length-1),o=s,s=void 0),n&&n.constructor==Object&&(oe(a===void 0),oe(r===t.length-1),a=n,n=void 0),!ks(s,n))return!1}return o||a?(o=o||{},a=a||{},G0(o,a)):!0}if(e.constructor===Object)return G0(e,t);throw Error("Invalid type in JSPB array")}we.compareFields=ks;we.prototype.Bb=function(){return Yd(this)};we.prototype.cloneMessage=we.prototype.Bb;we.prototype.clone=function(){return Yd(this)};we.prototype.clone=we.prototype.clone;we.clone=function(e){return Yd(e)};function Yd(e){return new e.constructor(H0(e.g()))}we.copyInto=function(e,t){io(e,we),io(t,we),oe(e.constructor==t.constructor,"Copy source and target message should have the same type."),e=Yd(e);for(var r=t.g(),o=e.g(),a=r.length=0;a<o.length;a++)r[a]=o[a];t.f=e.f,t.i=e.i};function H0(e){if(Array.isArray(e)){for(var t=Array(e.length),r=0;r<e.length;r++){var o=e[r];o!=null&&(t[r]=typeof o=="object"?H0(oe(o)):o)}return t}if(Zd&&e instanceof Uint8Array)return new Uint8Array(e);t={};for(r in e)o=e[r],o!=null&&(t[r]=typeof o=="object"?H0(oe(o)):o);return t}we.registerMessageType=function(e,t){t.we=e};var ao={dump:function(e){return io(e,we,"jspb.Message instance expected"),oe(e.getExtension,"Only unobfuscated and unoptimized compilation modes supported."),ao.X(e)}};Ee("jspb.debug.dump",ao.dump,void 0);ao.X=function(e){var t=Vo(e);if(t=="number"||t=="string"||t=="boolean"||t=="null"||t=="undefined"||typeof Uint8Array<"u"&&e instanceof Uint8Array)return e;if(t=="array")return wS(e),Bs(e,ao.X);if(e instanceof We){var r={};e=e.entries();for(var o=e.next();!o.done;o=e.next())r[o.value[0]]=ao.X(o.value[1]);return r}io(e,we,"Only messages expected: "+e),t=e.constructor;var a={$name:t.name||t.displayName};for(n in t.prototype){var c=/^get([A-Z]\w*)/.exec(n);if(c&&n!="getExtension"&&n!="getJsPbMessageId"){var s="has"+c[1];(!e[s]||e[s]())&&(s=e[n](),a[ao.$a(c[1])]=ao.X(s))}}if(e.extensionObject_)return a.$extensions="Recursive dumping of extensions not supported in compiled code. Switch to uncompiled or dump extension object directly",a;for(o in t.extensions)if(/^\d+$/.test(o)){s=t.extensions[o];var n=e.getExtension(s);c=void 0,s=s.Ba;var i=[],u=0;for(c in s)i[u++]=c;c=i[0],n!=null&&(r||(r=a.$extensions={}),r[ao.$a(c)]=ao.X(n))}return a};ao.$a=function(e){return e.replace(/^[A-Z]/,function(t){return t.toLowerCase()})};function ye(){this.a=[]}Ee("jspb.BinaryEncoder",ye,void 0);ye.prototype.length=function(){return this.a.length};ye.prototype.length=ye.prototype.length;ye.prototype.end=function(){var e=this.a;return this.a=[],e};ye.prototype.end=ye.prototype.end;ye.prototype.l=function(e,t){for(oe(e==Math.floor(e)),oe(t==Math.floor(t)),oe(0<=e&&4294967296>e),oe(0<=t&&4294967296>t);0<t||127<e;)this.a.push(e&127|128),e=(e>>>7|t<<25)>>>0,t>>>=7;this.a.push(e)};ye.prototype.writeSplitVarint64=ye.prototype.l;ye.prototype.A=function(e,t){oe(e==Math.floor(e)),oe(t==Math.floor(t)),oe(0<=e&&4294967296>e),oe(0<=t&&4294967296>t),this.s(e),this.s(t)};ye.prototype.writeSplitFixed64=ye.prototype.A;ye.prototype.j=function(e){for(oe(e==Math.floor(e)),oe(0<=e&&4294967296>e);127<e;)this.a.push(e&127|128),e>>>=7;this.a.push(e)};ye.prototype.writeUnsignedVarint32=ye.prototype.j;ye.prototype.M=function(e){if(oe(e==Math.floor(e)),oe(-2147483648<=e&&2147483648>e),0<=e)this.j(e);else{for(var t=0;9>t;t++)this.a.push(e&127|128),e>>=7;this.a.push(1)}};ye.prototype.writeSignedVarint32=ye.prototype.M;ye.prototype.va=function(e){oe(e==Math.floor(e)),oe(0<=e&&18446744073709552e3>e),Ps(e),this.l(ct,dt)};ye.prototype.writeUnsignedVarint64=ye.prototype.va;ye.prototype.ua=function(e){oe(e==Math.floor(e)),oe(-9223372036854776e3<=e&&9223372036854776e3>e),Ps(e),this.l(ct,dt)};ye.prototype.writeSignedVarint64=ye.prototype.ua;ye.prototype.wa=function(e){oe(e==Math.floor(e)),oe(-2147483648<=e&&2147483648>e),this.j((e<<1^e>>31)>>>0)};ye.prototype.writeZigzagVarint32=ye.prototype.wa;ye.prototype.xa=function(e){oe(e==Math.floor(e)),oe(-9223372036854776e3<=e&&9223372036854776e3>e),V2(e),this.l(ct,dt)};ye.prototype.writeZigzagVarint64=ye.prototype.xa;ye.prototype.Ta=function(e){this.W(Is(e))};ye.prototype.writeZigzagVarint64String=ye.prototype.Ta;ye.prototype.W=function(e){var t=this;_n(e),Vd(ct,dt,function(r,o){t.l(r>>>0,o>>>0)})};ye.prototype.writeZigzagVarintHash64=ye.prototype.W;ye.prototype.be=function(e){oe(e==Math.floor(e)),oe(0<=e&&256>e),this.a.push(e>>>0&255)};ye.prototype.writeUint8=ye.prototype.be;ye.prototype.ae=function(e){oe(e==Math.floor(e)),oe(0<=e&&65536>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255)};ye.prototype.writeUint16=ye.prototype.ae;ye.prototype.s=function(e){oe(e==Math.floor(e)),oe(0<=e&&4294967296>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255),this.a.push(e>>>16&255),this.a.push(e>>>24&255)};ye.prototype.writeUint32=ye.prototype.s;ye.prototype.V=function(e){oe(e==Math.floor(e)),oe(0<=e&&18446744073709552e3>e),J0(e),this.s(ct),this.s(dt)};ye.prototype.writeUint64=ye.prototype.V;ye.prototype.Qc=function(e){oe(e==Math.floor(e)),oe(-128<=e&&128>e),this.a.push(e>>>0&255)};ye.prototype.writeInt8=ye.prototype.Qc;ye.prototype.Pc=function(e){oe(e==Math.floor(e)),oe(-32768<=e&&32768>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255)};ye.prototype.writeInt16=ye.prototype.Pc;ye.prototype.S=function(e){oe(e==Math.floor(e)),oe(-2147483648<=e&&2147483648>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255),this.a.push(e>>>16&255),this.a.push(e>>>24&255)};ye.prototype.writeInt32=ye.prototype.S;ye.prototype.T=function(e){oe(e==Math.floor(e)),oe(-9223372036854776e3<=e&&9223372036854776e3>e),Ps(e),this.A(ct,dt)};ye.prototype.writeInt64=ye.prototype.T;ye.prototype.ka=function(e){oe(e==Math.floor(e)),oe(-9223372036854776e3<=+e&&9223372036854776e3>+e),_n(Is(e)),this.A(ct,dt)};ye.prototype.writeInt64String=ye.prototype.ka;ye.prototype.L=function(e){oe(e===1/0||e===-1/0||isNaN(e)||-34028234663852886e22<=e&&34028234663852886e22>=e),G2(e),this.s(ct)};ye.prototype.writeFloat=ye.prototype.L;ye.prototype.J=function(e){oe(e===1/0||e===-1/0||isNaN(e)||-17976931348623157e292<=e&&17976931348623157e292>=e),H2(e),this.s(ct),this.s(dt)};ye.prototype.writeDouble=ye.prototype.J;ye.prototype.I=function(e){oe(typeof e=="boolean"||typeof e=="number"),this.a.push(e?1:0)};ye.prototype.writeBool=ye.prototype.I;ye.prototype.R=function(e){oe(e==Math.floor(e)),oe(-2147483648<=e&&2147483648>e),this.M(e)};ye.prototype.writeEnum=ye.prototype.R;ye.prototype.ja=function(e){this.a.push.apply(this.a,e)};ye.prototype.writeBytes=ye.prototype.ja;ye.prototype.N=function(e){_n(e),this.l(ct,dt)};ye.prototype.writeVarintHash64=ye.prototype.N;ye.prototype.K=function(e){_n(e),this.s(ct),this.s(dt)};ye.prototype.writeFixedHash64=ye.prototype.K;ye.prototype.U=function(e){var t=this.a.length;AS(e);for(var r=0;r<e.length;r++){var o=e.charCodeAt(r);if(128>o)this.a.push(o);else if(2048>o)this.a.push(o>>6|192),this.a.push(o&63|128);else if(65536>o)if(55296<=o&&56319>=o&&r+1<e.length){var a=e.charCodeAt(r+1);56320<=a&&57343>=a&&(o=1024*(o-55296)+a-56320+65536,this.a.push(o>>18|240),this.a.push(o>>12&63|128),this.a.push(o>>6&63|128),this.a.push(o&63|128),r++)}else this.a.push(o>>12|224),this.a.push(o>>6&63|128),this.a.push(o&63|128)}return this.a.length-t};ye.prototype.writeString=ye.prototype.U;function Me(e,t){this.lo=e,this.hi=t}Ee("jspb.arith.UInt64",Me,void 0);Me.prototype.cmp=function(e){return this.hi<e.hi||this.hi==e.hi&&this.lo<e.lo?-1:this.hi==e.hi&&this.lo==e.lo?0:1};Me.prototype.cmp=Me.prototype.cmp;Me.prototype.La=function(){return new Me((this.lo>>>1|(this.hi&1)<<31)>>>0,this.hi>>>1>>>0)};Me.prototype.rightShift=Me.prototype.La;Me.prototype.Da=function(){return new Me(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)};Me.prototype.leftShift=Me.prototype.Da;Me.prototype.cb=function(){return!!(this.hi&2147483648)};Me.prototype.msb=Me.prototype.cb;Me.prototype.Ob=function(){return!!(this.lo&1)};Me.prototype.lsb=Me.prototype.Ob;Me.prototype.Ua=function(){return this.lo==0&&this.hi==0};Me.prototype.zero=Me.prototype.Ua;Me.prototype.add=function(e){return new Me((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)};Me.prototype.add=Me.prototype.add;Me.prototype.sub=function(e){return new Me((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)};Me.prototype.sub=Me.prototype.sub;function $0(e,t){var r=e&65535;e>>>=16;var o=t&65535,a=t>>>16;for(t=r*o+65536*(r*a&65535)+65536*(e*o&65535),r=e*a+(r*a>>>16)+(e*o>>>16);4294967296<=t;)t-=4294967296,r+=1;return new Me(t>>>0,r>>>0)}Me.mul32x32=$0;Me.prototype.eb=function(e){var t=$0(this.lo,e);return e=$0(this.hi,e),e.hi=e.lo,e.lo=0,t.add(e)};Me.prototype.mul=Me.prototype.eb;Me.prototype.Xa=function(e){if(e==0)return[];var t=new Me(0,0),r=new Me(this.lo,this.hi);e=new Me(e,0);for(var o=new Me(1,0);!e.cb();)e=e.Da(),o=o.Da();for(;!o.Ua();)0>=e.cmp(r)&&(t=t.add(o),r=r.sub(e)),e=e.La(),o=o.La();return[t,r]};Me.prototype.div=Me.prototype.Xa;Me.prototype.toString=function(){for(var e="",t=this;!t.Ua();){t=t.Xa(10);var r=t[0];e=t[1].lo+e,t=r}return e==""&&(e="0"),e};Me.prototype.toString=Me.prototype.toString;function ii(e){for(var t=new Me(0,0),r=new Me(0,0),o=0;o<e.length;o++){if("0">e[o]||"9"<e[o])return null;r.lo=parseInt(e[o],10),t=t.eb(10).add(r)}return t}Me.fromString=ii;Me.prototype.clone=function(){return new Me(this.lo,this.hi)};Me.prototype.clone=Me.prototype.clone;function Ht(e,t){this.lo=e,this.hi=t}Ee("jspb.arith.Int64",Ht,void 0);Ht.prototype.add=function(e){return new Ht((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)};Ht.prototype.add=Ht.prototype.add;Ht.prototype.sub=function(e){return new Ht((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)};Ht.prototype.sub=Ht.prototype.sub;Ht.prototype.clone=function(){return new Ht(this.lo,this.hi)};Ht.prototype.clone=Ht.prototype.clone;Ht.prototype.toString=function(){var e=(this.hi&2147483648)!=0,t=new Me(this.lo,this.hi);return e&&(t=new Me(0,0).sub(t)),(e?"-":"")+t.toString()};Ht.prototype.toString=Ht.prototype.toString;function Xd(e){var t=0<e.length&&e[0]=="-";return t&&(e=e.substring(1)),e=ii(e),e===null?null:(t&&(e=new Me(0,0).sub(e)),new Ht(e.lo,e.hi))}Ht.fromString=Xd;function M(){this.c=[],this.b=0,this.a=new ye,this.h=[]}Ee("jspb.BinaryWriter",M,void 0);function l4(e,t){var r=e.a.end();e.c.push(r),e.c.push(t),e.b+=r.length+t.length}function St(e,t){return De(e,t,2),t=e.a.end(),e.c.push(t),e.b+=t.length,t.push(e.b),t}function Ot(e,t){var r=t.pop();for(r=e.b+e.a.length()-r,oe(0<=r);127<r;)t.push(r&127|128),r>>>=7,e.b++;t.push(r),e.b++}M.prototype.pb=function(e,t,r){l4(this,e.subarray(t,r))};M.prototype.writeSerializedMessage=M.prototype.pb;M.prototype.Pb=function(e,t,r){e!=null&&t!=null&&r!=null&&this.pb(e,t,r)};M.prototype.maybeWriteSerializedMessage=M.prototype.Pb;M.prototype.reset=function(){this.c=[],this.a.end(),this.b=0,this.h=[]};M.prototype.reset=M.prototype.reset;M.prototype.ab=function(){oe(this.h.length==0);for(var e=new Uint8Array(this.b+this.a.length()),t=this.c,r=t.length,o=0,a=0;a<r;a++){var c=t[a];e.set(c,o),o+=c.length}return t=this.a.end(),e.set(t,o),o+=t.length,oe(o==e.length),this.c=[e],e};M.prototype.getResultBuffer=M.prototype.ab;M.prototype.Kb=function(e){return j2(this.ab(),e)};M.prototype.getResultBase64String=M.prototype.Kb;M.prototype.Va=function(e){this.h.push(St(this,e))};M.prototype.beginSubMessage=M.prototype.Va;M.prototype.Ya=function(){oe(0<=this.h.length),Ot(this,this.h.pop())};M.prototype.endSubMessage=M.prototype.Ya;function De(e,t,r){oe(1<=t&&t==Math.floor(t)),e.a.j(8*t+r)}M.prototype.Nc=function(e,t,r){switch(e){case 1:this.J(t,r);break;case 2:this.L(t,r);break;case 3:this.T(t,r);break;case 4:this.V(t,r);break;case 5:this.S(t,r);break;case 6:this.Qa(t,r);break;case 7:this.Pa(t,r);break;case 8:this.I(t,r);break;case 9:this.U(t,r);break;case 10:Lt("Group field type not supported in writeAny()");break;case 11:Lt("Message field type not supported in writeAny()");break;case 12:this.ja(t,r);break;case 13:this.s(t,r);break;case 14:this.R(t,r);break;case 15:this.Ra(t,r);break;case 16:this.Sa(t,r);break;case 17:this.rb(t,r);break;case 18:this.sb(t,r);break;case 30:this.K(t,r);break;case 31:this.N(t,r);break;default:Lt("Invalid field type in writeAny()")}};M.prototype.writeAny=M.prototype.Nc;function X0(e,t,r){r!=null&&(De(e,t,0),e.a.j(r))}function Q0(e,t,r){r!=null&&(De(e,t,0),e.a.M(r))}M.prototype.S=function(e,t){t!=null&&(oe(-2147483648<=t&&2147483648>t),Q0(this,e,t))};M.prototype.writeInt32=M.prototype.S;M.prototype.ob=function(e,t){t!=null&&(t=parseInt(t,10),oe(-2147483648<=t&&2147483648>t),Q0(this,e,t))};M.prototype.writeInt32String=M.prototype.ob;M.prototype.T=function(e,t){t!=null&&(oe(-9223372036854776e3<=t&&9223372036854776e3>t),t!=null&&(De(this,e,0),this.a.ua(t)))};M.prototype.writeInt64=M.prototype.T;M.prototype.ka=function(e,t){t!=null&&(t=Xd(t),De(this,e,0),this.a.l(t.lo,t.hi))};M.prototype.writeInt64String=M.prototype.ka;M.prototype.s=function(e,t){t!=null&&(oe(0<=t&&4294967296>t),X0(this,e,t))};M.prototype.writeUint32=M.prototype.s;M.prototype.ub=function(e,t){t!=null&&(t=parseInt(t,10),oe(0<=t&&4294967296>t),X0(this,e,t))};M.prototype.writeUint32String=M.prototype.ub;M.prototype.V=function(e,t){t!=null&&(oe(0<=t&&18446744073709552e3>t),t!=null&&(De(this,e,0),this.a.va(t)))};M.prototype.writeUint64=M.prototype.V;M.prototype.vb=function(e,t){t!=null&&(t=ii(t),De(this,e,0),this.a.l(t.lo,t.hi))};M.prototype.writeUint64String=M.prototype.vb;M.prototype.rb=function(e,t){t!=null&&(oe(-2147483648<=t&&2147483648>t),t!=null&&(De(this,e,0),this.a.wa(t)))};M.prototype.writeSint32=M.prototype.rb;M.prototype.sb=function(e,t){t!=null&&(oe(-9223372036854776e3<=t&&9223372036854776e3>t),t!=null&&(De(this,e,0),this.a.xa(t)))};M.prototype.writeSint64=M.prototype.sb;M.prototype.$d=function(e,t){t!=null&&t!=null&&(De(this,e,0),this.a.W(t))};M.prototype.writeSintHash64=M.prototype.$d;M.prototype.Zd=function(e,t){t!=null&&t!=null&&(De(this,e,0),this.a.Ta(t))};M.prototype.writeSint64String=M.prototype.Zd;M.prototype.Pa=function(e,t){t!=null&&(oe(0<=t&&4294967296>t),De(this,e,5),this.a.s(t))};M.prototype.writeFixed32=M.prototype.Pa;M.prototype.Qa=function(e,t){t!=null&&(oe(0<=t&&18446744073709552e3>t),De(this,e,1),this.a.V(t))};M.prototype.writeFixed64=M.prototype.Qa;M.prototype.nb=function(e,t){t!=null&&(t=ii(t),De(this,e,1),this.a.A(t.lo,t.hi))};M.prototype.writeFixed64String=M.prototype.nb;M.prototype.Ra=function(e,t){t!=null&&(oe(-2147483648<=t&&2147483648>t),De(this,e,5),this.a.S(t))};M.prototype.writeSfixed32=M.prototype.Ra;M.prototype.Sa=function(e,t){t!=null&&(oe(-9223372036854776e3<=t&&9223372036854776e3>t),De(this,e,1),this.a.T(t))};M.prototype.writeSfixed64=M.prototype.Sa;M.prototype.qb=function(e,t){t!=null&&(t=Xd(t),De(this,e,1),this.a.A(t.lo,t.hi))};M.prototype.writeSfixed64String=M.prototype.qb;M.prototype.L=function(e,t){t!=null&&(De(this,e,5),this.a.L(t))};M.prototype.writeFloat=M.prototype.L;M.prototype.J=function(e,t){t!=null&&(De(this,e,1),this.a.J(t))};M.prototype.writeDouble=M.prototype.J;M.prototype.I=function(e,t){t!=null&&(oe(typeof t=="boolean"||typeof t=="number"),De(this,e,0),this.a.I(t))};M.prototype.writeBool=M.prototype.I;M.prototype.R=function(e,t){t!=null&&(oe(-2147483648<=t&&2147483648>t),De(this,e,0),this.a.M(t))};M.prototype.writeEnum=M.prototype.R;M.prototype.U=function(e,t){t!=null&&(e=St(this,e),this.a.U(t),Ot(this,e))};M.prototype.writeString=M.prototype.U;M.prototype.ja=function(e,t){t!=null&&(t=$d(t),De(this,e,2),this.a.j(t.length),l4(this,t))};M.prototype.writeBytes=M.prototype.ja;M.prototype.Rc=function(e,t,r){t!=null&&(e=St(this,e),r(t,this),Ot(this,e))};M.prototype.writeMessage=M.prototype.Rc;M.prototype.Sc=function(e,t,r){t!=null&&(De(this,1,3),De(this,2,0),this.a.M(e),e=St(this,3),r(t,this),Ot(this,e),De(this,1,4))};M.prototype.writeMessageSet=M.prototype.Sc;M.prototype.Oc=function(e,t,r){t!=null&&(De(this,e,3),r(t,this),De(this,e,4))};M.prototype.writeGroup=M.prototype.Oc;M.prototype.K=function(e,t){t!=null&&(oe(t.length==8),De(this,e,1),this.a.K(t))};M.prototype.writeFixedHash64=M.prototype.K;M.prototype.N=function(e,t){t!=null&&(oe(t.length==8),De(this,e,0),this.a.N(t))};M.prototype.writeVarintHash64=M.prototype.N;M.prototype.A=function(e,t,r){De(this,e,1),this.a.A(t,r)};M.prototype.writeSplitFixed64=M.prototype.A;M.prototype.l=function(e,t,r){De(this,e,0),this.a.l(t,r)};M.prototype.writeSplitVarint64=M.prototype.l;M.prototype.tb=function(e,t,r){De(this,e,0);var o=this.a;Vd(t,r,function(a,c){o.l(a>>>0,c>>>0)})};M.prototype.writeSplitZigzagVarint64=M.prototype.tb;M.prototype.Ed=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)Q0(this,e,t[r])};M.prototype.writeRepeatedInt32=M.prototype.Ed;M.prototype.Fd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.ob(e,t[r])};M.prototype.writeRepeatedInt32String=M.prototype.Fd;M.prototype.Gd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++){var o=t[r];o!=null&&(De(this,e,0),this.a.ua(o))}};M.prototype.writeRepeatedInt64=M.prototype.Gd;M.prototype.Qd=function(e,t,r,o){if(t!=null)for(var a=0;a<t.length;a++)this.A(e,r(t[a]),o(t[a]))};M.prototype.writeRepeatedSplitFixed64=M.prototype.Qd;M.prototype.Rd=function(e,t,r,o){if(t!=null)for(var a=0;a<t.length;a++)this.l(e,r(t[a]),o(t[a]))};M.prototype.writeRepeatedSplitVarint64=M.prototype.Rd;M.prototype.Sd=function(e,t,r,o){if(t!=null)for(var a=0;a<t.length;a++)this.tb(e,r(t[a]),o(t[a]))};M.prototype.writeRepeatedSplitZigzagVarint64=M.prototype.Sd;M.prototype.Hd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.ka(e,t[r])};M.prototype.writeRepeatedInt64String=M.prototype.Hd;M.prototype.Ud=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)X0(this,e,t[r])};M.prototype.writeRepeatedUint32=M.prototype.Ud;M.prototype.Vd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.ub(e,t[r])};M.prototype.writeRepeatedUint32String=M.prototype.Vd;M.prototype.Wd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++){var o=t[r];o!=null&&(De(this,e,0),this.a.va(o))}};M.prototype.writeRepeatedUint64=M.prototype.Wd;M.prototype.Xd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.vb(e,t[r])};M.prototype.writeRepeatedUint64String=M.prototype.Xd;M.prototype.Md=function(e,t){if(t!=null)for(var r=0;r<t.length;r++){var o=t[r];o!=null&&(De(this,e,0),this.a.wa(o))}};M.prototype.writeRepeatedSint32=M.prototype.Md;M.prototype.Nd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++){var o=t[r];o!=null&&(De(this,e,0),this.a.xa(o))}};M.prototype.writeRepeatedSint64=M.prototype.Nd;M.prototype.Od=function(e,t){if(t!=null)for(var r=0;r<t.length;r++){var o=t[r];o!=null&&(De(this,e,0),this.a.Ta(o))}};M.prototype.writeRepeatedSint64String=M.prototype.Od;M.prototype.Pd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++){var o=t[r];o!=null&&(De(this,e,0),this.a.W(o))}};M.prototype.writeRepeatedSintHash64=M.prototype.Pd;M.prototype.yd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.Pa(e,t[r])};M.prototype.writeRepeatedFixed32=M.prototype.yd;M.prototype.zd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.Qa(e,t[r])};M.prototype.writeRepeatedFixed64=M.prototype.zd;M.prototype.Ad=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.nb(e,t[r])};M.prototype.writeRepeatedFixed64String=M.prototype.Ad;M.prototype.Jd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.Ra(e,t[r])};M.prototype.writeRepeatedSfixed32=M.prototype.Jd;M.prototype.Kd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.Sa(e,t[r])};M.prototype.writeRepeatedSfixed64=M.prototype.Kd;M.prototype.Ld=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.qb(e,t[r])};M.prototype.writeRepeatedSfixed64String=M.prototype.Ld;M.prototype.Cd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.L(e,t[r])};M.prototype.writeRepeatedFloat=M.prototype.Cd;M.prototype.wd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.J(e,t[r])};M.prototype.writeRepeatedDouble=M.prototype.wd;M.prototype.ud=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.I(e,t[r])};M.prototype.writeRepeatedBool=M.prototype.ud;M.prototype.xd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.R(e,t[r])};M.prototype.writeRepeatedEnum=M.prototype.xd;M.prototype.Td=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.U(e,t[r])};M.prototype.writeRepeatedString=M.prototype.Td;M.prototype.vd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.ja(e,t[r])};M.prototype.writeRepeatedBytes=M.prototype.vd;M.prototype.Id=function(e,t,r){if(t!=null)for(var o=0;o<t.length;o++){var a=St(this,e);r(t[o],this),Ot(this,a)}};M.prototype.writeRepeatedMessage=M.prototype.Id;M.prototype.Dd=function(e,t,r){if(t!=null)for(var o=0;o<t.length;o++)De(this,e,3),r(t[o],this),De(this,e,4)};M.prototype.writeRepeatedGroup=M.prototype.Dd;M.prototype.Bd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.K(e,t[r])};M.prototype.writeRepeatedFixedHash64=M.prototype.Bd;M.prototype.Yd=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.N(e,t[r])};M.prototype.writeRepeatedVarintHash64=M.prototype.Yd;M.prototype.ad=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++)this.a.M(t[r]);Ot(this,e)}};M.prototype.writePackedInt32=M.prototype.ad;M.prototype.bd=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++)this.a.M(parseInt(t[r],10));Ot(this,e)}};M.prototype.writePackedInt32String=M.prototype.bd;M.prototype.cd=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++)this.a.ua(t[r]);Ot(this,e)}};M.prototype.writePackedInt64=M.prototype.cd;M.prototype.md=function(e,t,r,o){if(t!=null){e=St(this,e);for(var a=0;a<t.length;a++)this.a.A(r(t[a]),o(t[a]));Ot(this,e)}};M.prototype.writePackedSplitFixed64=M.prototype.md;M.prototype.nd=function(e,t,r,o){if(t!=null){e=St(this,e);for(var a=0;a<t.length;a++)this.a.l(r(t[a]),o(t[a]));Ot(this,e)}};M.prototype.writePackedSplitVarint64=M.prototype.nd;M.prototype.od=function(e,t,r,o){if(t!=null){e=St(this,e);for(var a=this.a,c=0;c<t.length;c++)Vd(r(t[c]),o(t[c]),function(s,n){a.l(s>>>0,n>>>0)});Ot(this,e)}};M.prototype.writePackedSplitZigzagVarint64=M.prototype.od;M.prototype.dd=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++){var o=Xd(t[r]);this.a.l(o.lo,o.hi)}Ot(this,e)}};M.prototype.writePackedInt64String=M.prototype.dd;M.prototype.pd=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++)this.a.j(t[r]);Ot(this,e)}};M.prototype.writePackedUint32=M.prototype.pd;M.prototype.qd=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++)this.a.j(parseInt(t[r],10));Ot(this,e)}};M.prototype.writePackedUint32String=M.prototype.qd;M.prototype.rd=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++)this.a.va(t[r]);Ot(this,e)}};M.prototype.writePackedUint64=M.prototype.rd;M.prototype.sd=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++){var o=ii(t[r]);this.a.l(o.lo,o.hi)}Ot(this,e)}};M.prototype.writePackedUint64String=M.prototype.sd;M.prototype.hd=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++)this.a.wa(t[r]);Ot(this,e)}};M.prototype.writePackedSint32=M.prototype.hd;M.prototype.jd=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++)this.a.xa(t[r]);Ot(this,e)}};M.prototype.writePackedSint64=M.prototype.jd;M.prototype.kd=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++)this.a.W(Is(t[r]));Ot(this,e)}};M.prototype.writePackedSint64String=M.prototype.kd;M.prototype.ld=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++)this.a.W(t[r]);Ot(this,e)}};M.prototype.writePackedSintHash64=M.prototype.ld;M.prototype.Wc=function(e,t){if(t!=null&&t.length)for(De(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.s(t[e])};M.prototype.writePackedFixed32=M.prototype.Wc;M.prototype.Xc=function(e,t){if(t!=null&&t.length)for(De(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.V(t[e])};M.prototype.writePackedFixed64=M.prototype.Xc;M.prototype.Yc=function(e,t){if(t!=null&&t.length)for(De(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++){var r=ii(t[e]);this.a.A(r.lo,r.hi)}};M.prototype.writePackedFixed64String=M.prototype.Yc;M.prototype.ed=function(e,t){if(t!=null&&t.length)for(De(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.S(t[e])};M.prototype.writePackedSfixed32=M.prototype.ed;M.prototype.fd=function(e,t){if(t!=null&&t.length)for(De(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.T(t[e])};M.prototype.writePackedSfixed64=M.prototype.fd;M.prototype.gd=function(e,t){if(t!=null&&t.length)for(De(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.ka(t[e])};M.prototype.writePackedSfixed64String=M.prototype.gd;M.prototype.$c=function(e,t){if(t!=null&&t.length)for(De(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.L(t[e])};M.prototype.writePackedFloat=M.prototype.$c;M.prototype.Uc=function(e,t){if(t!=null&&t.length)for(De(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.J(t[e])};M.prototype.writePackedDouble=M.prototype.Uc;M.prototype.Tc=function(e,t){if(t!=null&&t.length)for(De(this,e,2),this.a.j(t.length),e=0;e<t.length;e++)this.a.I(t[e])};M.prototype.writePackedBool=M.prototype.Tc;M.prototype.Vc=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++)this.a.R(t[r]);Ot(this,e)}};M.prototype.writePackedEnum=M.prototype.Vc;M.prototype.Zc=function(e,t){if(t!=null&&t.length)for(De(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.K(t[e])};M.prototype.writePackedFixedHash64=M.prototype.Zc;M.prototype.td=function(e,t){if(t!=null&&t.length){e=St(this,e);for(var r=0;r<t.length;r++)this.a.N(t[r]);Ot(this,e)}};M.prototype.writePackedVarintHash64=M.prototype.td;typeof rr=="object"&&(rr.debug=ao,rr.Map=We,rr.Message=we,rr.BinaryReader=W,rr.BinaryWriter=M,rr.ExtensionFieldInfo=_s,rr.ExtensionFieldBinaryInfo=Q2,rr.exportSymbol=yS,rr.inherits=vS,rr.object={extend:bS},rr.typeOf=Vo)});var th=R((IK,Fs)=>{g();y();function CS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}Fs.exports=CS,Fs.exports.__esModule=!0,Fs.exports.default=Fs.exports});var d4=R((RK,Rs)=>{g();y();var BS=th();function ES(e){if(Array.isArray(e))return BS(e)}Rs.exports=ES,Rs.exports.__esModule=!0,Rs.exports.default=Rs.exports});var f4=R((DK,Ms)=>{g();y();function PS(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}Ms.exports=PS,Ms.exports.__esModule=!0,Ms.exports.default=Ms.exports});var rh=R((LK,Ns)=>{g();y();var p4=th();function TS(e,t){if(!!e){if(typeof e=="string")return p4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p4(e,t)}}Ns.exports=TS,Ns.exports.__esModule=!0,Ns.exports.default=Ns.exports});var h4=R((qK,Ds)=>{g();y();function SS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}Ds.exports=SS,Ds.exports.__esModule=!0,Ds.exports.default=Ds.exports});var g4=R((HK,Ws)=>{g();y();var OS=d4(),IS=f4(),kS=rh(),FS=h4();function RS(e){return OS(e)||IS(e)||kS(e)||FS()}Ws.exports=RS,Ws.exports.__esModule=!0,Ws.exports.default=Ws.exports});var y4=R((ZK,Us)=>{g();y();function MS(e){if(Array.isArray(e))return e}Us.exports=MS,Us.exports.__esModule=!0,Us.exports.default=Us.exports});var v4=R((XK,Ls)=>{g();y();function NS(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o=[],a=!0,c=!1,s,n;try{for(r=r.call(e);!(a=(s=r.next()).done)&&(o.push(s.value),!(t&&o.length===t));a=!0);}catch(i){c=!0,n=i}finally{try{!a&&r.return!=null&&r.return()}finally{if(c)throw n}}return o}}Ls.exports=NS,Ls.exports.__esModule=!0,Ls.exports.default=Ls.exports});var b4=R((tZ,js)=>{g();y();function DS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}js.exports=DS,js.exports.__esModule=!0,js.exports.default=js.exports});var m4=R((nZ,zs)=>{g();y();var WS=y4(),US=v4(),LS=rh(),jS=b4();function zS(e,t){return WS(e)||US(e,t)||LS(e,t)||jS()}zs.exports=zS,zs.exports.__esModule=!0,zs.exports.default=zs.exports});var oh=R((sZ,qs)=>{g();y();function qS(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}qs.exports=qS,qs.exports.__esModule=!0,qs.exports.default=qs.exports});var N4=R((Ge,M4)=>{g();y();Ge=M4.exports=tt;var ft;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?ft=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:ft=function(){};Ge.SEMVER_SPEC_VERSION="2.0.0";var ah=256,Qd=Number.MAX_SAFE_INTEGER||9007199254740991,nh=16,vt=Ge.re=[],de=Ge.src=[],Xe=0,si=Xe++;de[si]="0|[1-9]\\d*";var ci=Xe++;de[ci]="[0-9]+";var uh=Xe++;de[uh]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var A4=Xe++;de[A4]="("+de[si]+")\\.("+de[si]+")\\.("+de[si]+")";var w4=Xe++;de[w4]="("+de[ci]+")\\.("+de[ci]+")\\.("+de[ci]+")";var ih=Xe++;de[ih]="(?:"+de[si]+"|"+de[uh]+")";var sh=Xe++;de[sh]="(?:"+de[ci]+"|"+de[uh]+")";var lh=Xe++;de[lh]="(?:-("+de[ih]+"(?:\\."+de[ih]+")*))";var dh=Xe++;de[dh]="(?:-?("+de[sh]+"(?:\\."+de[sh]+")*))";var ch=Xe++;de[ch]="[0-9A-Za-z-]+";var Hs=Xe++;de[Hs]="(?:\\+("+de[ch]+"(?:\\."+de[ch]+")*))";var fh=Xe++,_4="v?"+de[A4]+de[lh]+"?"+de[Hs]+"?";de[fh]="^"+_4+"$";var ph="[v=\\s]*"+de[w4]+de[dh]+"?"+de[Hs]+"?",hh=Xe++;de[hh]="^"+ph+"$";var di=Xe++;de[di]="((?:<|>)?=?)";var ef=Xe++;de[ef]=de[ci]+"|x|X|\\*";var tf=Xe++;de[tf]=de[si]+"|x|X|\\*";var ra=Xe++;de[ra]="[v=\\s]*("+de[tf]+")(?:\\.("+de[tf]+")(?:\\.("+de[tf]+")(?:"+de[lh]+")?"+de[Hs]+"?)?)?";var li=Xe++;de[li]="[v=\\s]*("+de[ef]+")(?:\\.("+de[ef]+")(?:\\.("+de[ef]+")(?:"+de[dh]+")?"+de[Hs]+"?)?)?";var C4=Xe++;de[C4]="^"+de[di]+"\\s*"+de[ra]+"$";var B4=Xe++;de[B4]="^"+de[di]+"\\s*"+de[li]+"$";var E4=Xe++;de[E4]="(?:^|[^\\d])(\\d{1,"+nh+"})(?:\\.(\\d{1,"+nh+"}))?(?:\\.(\\d{1,"+nh+"}))?(?:$|[^\\d])";var cf=Xe++;de[cf]="(?:~>?)";var rf=Xe++;de[rf]="(\\s*)"+de[cf]+"\\s+";vt[rf]=new RegExp(de[rf],"g");var VS="$1~",P4=Xe++;de[P4]="^"+de[cf]+de[ra]+"$";var T4=Xe++;de[T4]="^"+de[cf]+de[li]+"$";var uf=Xe++;de[uf]="(?:\\^)";var of=Xe++;de[of]="(\\s*)"+de[uf]+"\\s+";vt[of]=new RegExp(de[of],"g");var GS="$1^",S4=Xe++;de[S4]="^"+de[uf]+de[ra]+"$";var O4=Xe++;de[O4]="^"+de[uf]+de[li]+"$";var gh=Xe++;de[gh]="^"+de[di]+"\\s*("+ph+")$|^$";var yh=Xe++;de[yh]="^"+de[di]+"\\s*("+_4+")$|^$";var Vs=Xe++;de[Vs]="(\\s*)"+de[di]+"\\s*("+ph+"|"+de[ra]+")";vt[Vs]=new RegExp(de[Vs],"g");var HS="$1$2$3",I4=Xe++;de[I4]="^\\s*("+de[ra]+")\\s+-\\s+("+de[ra]+")\\s*$";var k4=Xe++;de[k4]="^\\s*("+de[li]+")\\s+-\\s+("+de[li]+")\\s*$";var F4=Xe++;de[F4]="(<|>)?=?\\s*\\*";for(Cn=0;Cn<Xe;Cn++)ft(Cn,de[Cn]),vt[Cn]||(vt[Cn]=new RegExp(de[Cn]));var Cn;Ge.parse=oa;function oa(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof tt)return e;if(typeof e!="string"||e.length>ah)return null;var r=t.loose?vt[hh]:vt[fh];if(!r.test(e))return null;try{return new tt(e,t)}catch{return null}}Ge.valid=$S;function $S(e,t){var r=oa(e,t);return r?r.version:null}Ge.clean=KS;function KS(e,t){var r=oa(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}Ge.SemVer=tt;function tt(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof tt){if(e.loose===t.loose)return e;e=e.version}else if(typeof e!="string")throw new TypeError("Invalid Version: "+e);if(e.length>ah)throw new TypeError("version is longer than "+ah+" characters");if(!(this instanceof tt))return new tt(e,t);ft("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?vt[hh]:vt[fh]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Qd||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Qd||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Qd||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(o){if(/^[0-9]+$/.test(o)){var a=+o;if(a>=0&&a<Qd)return a}return o}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}tt.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version};tt.prototype.toString=function(){return this.version};tt.prototype.compare=function(e){return ft("SemVer.compare",this.version,this.options,e),e instanceof tt||(e=new tt(e,this.options)),this.compareMain(e)||this.comparePre(e)};tt.prototype.compareMain=function(e){return e instanceof tt||(e=new tt(e,this.options)),ui(this.major,e.major)||ui(this.minor,e.minor)||ui(this.patch,e.patch)};tt.prototype.comparePre=function(e){if(e instanceof tt||(e=new tt(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],o=e.prerelease[t];if(ft("prerelease compare",t,r,o),r===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(r===void 0)return-1;if(r===o)continue;return ui(r,o)}while(++t)};tt.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this};Ge.inc=ZS;function ZS(e,t,r,o){typeof r=="string"&&(o=r,r=void 0);try{return new tt(e,r).inc(t,o).version}catch{return null}}Ge.diff=JS;function JS(e,t){if(vh(e,t))return null;var r=oa(e),o=oa(t),a="";if(r.prerelease.length||o.prerelease.length){a="pre";var c="prerelease"}for(var s in r)if((s==="major"||s==="minor"||s==="patch")&&r[s]!==o[s])return a+s;return c}Ge.compareIdentifiers=ui;var x4=/^[0-9]+$/;function ui(e,t){var r=x4.test(e),o=x4.test(t);return r&&o&&(e=+e,t=+t),e===t?0:r&&!o?-1:o&&!r?1:e<t?-1:1}Ge.rcompareIdentifiers=YS;function YS(e,t){return ui(t,e)}Ge.major=XS;function XS(e,t){return new tt(e,t).major}Ge.minor=QS;function QS(e,t){return new tt(e,t).minor}Ge.patch=eO;function eO(e,t){return new tt(e,t).patch}Ge.compare=Ho;function Ho(e,t,r){return new tt(e,r).compare(new tt(t,r))}Ge.compareLoose=tO;function tO(e,t){return Ho(e,t,!0)}Ge.rcompare=rO;function rO(e,t,r){return Ho(t,e,r)}Ge.sort=oO;function oO(e,t){return e.sort(function(r,o){return Ge.compare(r,o,t)})}Ge.rsort=nO;function nO(e,t){return e.sort(function(r,o){return Ge.rcompare(r,o,t)})}Ge.gt=Gs;function Gs(e,t,r){return Ho(e,t,r)>0}Ge.lt=nf;function nf(e,t,r){return Ho(e,t,r)<0}Ge.eq=vh;function vh(e,t,r){return Ho(e,t,r)===0}Ge.neq=R4;function R4(e,t,r){return Ho(e,t,r)!==0}Ge.gte=bh;function bh(e,t,r){return Ho(e,t,r)>=0}Ge.lte=mh;function mh(e,t,r){return Ho(e,t,r)<=0}Ge.cmp=af;function af(e,t,r,o){switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return vh(e,r,o);case"!=":return R4(e,r,o);case">":return Gs(e,r,o);case">=":return bh(e,r,o);case"<":return nf(e,r,o);case"<=":return mh(e,r,o);default:throw new TypeError("Invalid operator: "+t)}}Ge.Comparator=Kr;function Kr(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof Kr){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof Kr))return new Kr(e,t);ft("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===$s?this.value="":this.value=this.operator+this.semver.version,ft("comp",this)}var $s={};Kr.prototype.parse=function(e){var t=this.options.loose?vt[gh]:vt[yh],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],this.operator==="="&&(this.operator=""),r[2]?this.semver=new tt(r[2],this.options.loose):this.semver=$s};Kr.prototype.toString=function(){return this.value};Kr.prototype.test=function(e){return ft("Comparator.test",e,this.options.loose),this.semver===$s?!0:(typeof e=="string"&&(e=new tt(e,this.options)),af(e,this.operator,this.semver,this.options))};Kr.prototype.intersects=function(e,t){if(!(e instanceof Kr))throw new TypeError("a Comparator is required");(!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1});var r;if(this.operator==="")return r=new Tt(e.value,t),sf(this.value,r,t);if(e.operator==="")return r=new Tt(this.value,t),sf(e.semver,r,t);var o=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),a=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),c=this.semver.version===e.semver.version,s=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),n=af(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),i=af(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return o||a||c&&s||n||i};Ge.Range=Tt;function Tt(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof Tt)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Tt(e.raw,t);if(e instanceof Kr)return new Tt(e.value,t);if(!(this instanceof Tt))return new Tt(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}Tt.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range};Tt.prototype.toString=function(){return this.range};Tt.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?vt[k4]:vt[I4];e=e.replace(r,hO),ft("hyphen replace",e),e=e.replace(vt[Vs],HS),ft("comparator trim",e,vt[Vs]),e=e.replace(vt[rf],VS),e=e.replace(vt[of],GS),e=e.split(/\s+/).join(" ");var o=t?vt[gh]:vt[yh],a=e.split(" ").map(function(c){return iO(c,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(a=a.filter(function(c){return!!c.match(o)})),a=a.map(function(c){return new Kr(c,this.options)},this),a};Tt.prototype.intersects=function(e,t){if(!(e instanceof Tt))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(o){return e.set.some(function(a){return a.every(function(c){return o.intersects(c,t)})})})})};Ge.toComparators=aO;function aO(e,t){return new Tt(e,t).set.map(function(r){return r.map(function(o){return o.value}).join(" ").trim().split(" ")})}function iO(e,t){return ft("comp",e,t),e=uO(e,t),ft("caret",e),e=sO(e,t),ft("tildes",e),e=dO(e,t),ft("xrange",e),e=pO(e,t),ft("stars",e),e}function mr(e){return!e||e.toLowerCase()==="x"||e==="*"}function sO(e,t){return e.trim().split(/\s+/).map(function(r){return cO(r,t)}).join(" ")}function cO(e,t){var r=t.loose?vt[T4]:vt[P4];return e.replace(r,function(o,a,c,s,n){ft("tilde",e,o,a,c,s,n);var i;return mr(a)?i="":mr(c)?i=">="+a+".0.0 <"+(+a+1)+".0.0":mr(s)?i=">="+a+"."+c+".0 <"+a+"."+(+c+1)+".0":n?(ft("replaceTilde pr",n),i=">="+a+"."+c+"."+s+"-"+n+" <"+a+"."+(+c+1)+".0"):i=">="+a+"."+c+"."+s+" <"+a+"."+(+c+1)+".0",ft("tilde return",i),i})}function uO(e,t){return e.trim().split(/\s+/).map(function(r){return lO(r,t)}).join(" ")}function lO(e,t){ft("caret",e,t);var r=t.loose?vt[O4]:vt[S4];return e.replace(r,function(o,a,c,s,n){ft("caret",e,o,a,c,s,n);var i;return mr(a)?i="":mr(c)?i=">="+a+".0.0 <"+(+a+1)+".0.0":mr(s)?a==="0"?i=">="+a+"."+c+".0 <"+a+"."+(+c+1)+".0":i=">="+a+"."+c+".0 <"+(+a+1)+".0.0":n?(ft("replaceCaret pr",n),a==="0"?c==="0"?i=">="+a+"."+c+"."+s+"-"+n+" <"+a+"."+c+"."+(+s+1):i=">="+a+"."+c+"."+s+"-"+n+" <"+a+"."+(+c+1)+".0":i=">="+a+"."+c+"."+s+"-"+n+" <"+(+a+1)+".0.0"):(ft("no pr"),a==="0"?c==="0"?i=">="+a+"."+c+"."+s+" <"+a+"."+c+"."+(+s+1):i=">="+a+"."+c+"."+s+" <"+a+"."+(+c+1)+".0":i=">="+a+"."+c+"."+s+" <"+(+a+1)+".0.0"),ft("caret return",i),i})}function dO(e,t){return ft("replaceXRanges",e,t),e.split(/\s+/).map(function(r){return fO(r,t)}).join(" ")}function fO(e,t){e=e.trim();var r=t.loose?vt[B4]:vt[C4];return e.replace(r,function(o,a,c,s,n,i){ft("xRange",e,o,a,c,s,n,i);var u=mr(c),l=u||mr(s),x=l||mr(n),N=x;return a==="="&&N&&(a=""),u?a===">"||a==="<"?o="<0.0.0":o="*":a&&N?(l&&(s=0),n=0,a===">"?(a=">=",l?(c=+c+1,s=0,n=0):(s=+s+1,n=0)):a==="<="&&(a="<",l?c=+c+1:s=+s+1),o=a+c+"."+s+"."+n):l?o=">="+c+".0.0 <"+(+c+1)+".0.0":x&&(o=">="+c+"."+s+".0 <"+c+"."+(+s+1)+".0"),ft("xRange return",o),o})}function pO(e,t){return ft("replaceStars",e,t),e.trim().replace(vt[F4],"")}function hO(e,t,r,o,a,c,s,n,i,u,l,x,N){return mr(r)?t="":mr(o)?t=">="+r+".0.0":mr(a)?t=">="+r+"."+o+".0":t=">="+t,mr(i)?n="":mr(u)?n="<"+(+i+1)+".0.0":mr(l)?n="<"+i+"."+(+u+1)+".0":x?n="<="+i+"."+u+"."+l+"-"+x:n="<="+n,(t+" "+n).trim()}Tt.prototype.test=function(e){if(!e)return!1;typeof e=="string"&&(e=new tt(e,this.options));for(var t=0;t<this.set.length;t++)if(gO(this.set[t],e,this.options))return!0;return!1};function gO(e,t,r){for(var o=0;o<e.length;o++)if(!e[o].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(o=0;o<e.length;o++)if(ft(e[o].semver),e[o].semver!==$s&&e[o].semver.prerelease.length>0){var a=e[o].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}Ge.satisfies=sf;function sf(e,t,r){try{t=new Tt(t,r)}catch{return!1}return t.test(e)}Ge.maxSatisfying=yO;function yO(e,t,r){var o=null,a=null;try{var c=new Tt(t,r)}catch{return null}return e.forEach(function(s){c.test(s)&&(!o||a.compare(s)===-1)&&(o=s,a=new tt(o,r))}),o}Ge.minSatisfying=vO;function vO(e,t,r){var o=null,a=null;try{var c=new Tt(t,r)}catch{return null}return e.forEach(function(s){c.test(s)&&(!o||a.compare(s)===1)&&(o=s,a=new tt(o,r))}),o}Ge.minVersion=bO;function bO(e,t){e=new Tt(e,t);var r=new tt("0.0.0");if(e.test(r)||(r=new tt("0.0.0-0"),e.test(r)))return r;r=null;for(var o=0;o<e.set.length;++o){var a=e.set[o];a.forEach(function(c){var s=new tt(c.semver.version);switch(c.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!r||Gs(r,s))&&(r=s);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+c.operator)}})}return r&&e.test(r)?r:null}Ge.validRange=mO;function mO(e,t){try{return new Tt(e,t).range||"*"}catch{return null}}Ge.ltr=xO;function xO(e,t,r){return xh(e,t,"<",r)}Ge.gtr=AO;function AO(e,t,r){return xh(e,t,">",r)}Ge.outside=xh;function xh(e,t,r,o){e=new tt(e,o),t=new Tt(t,o);var a,c,s,n,i;switch(r){case">":a=Gs,c=mh,s=nf,n=">",i=">=";break;case"<":a=nf,c=bh,s=Gs,n="<",i="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sf(e,t,o))return!1;for(var u=0;u<t.set.length;++u){var l=t.set[u],x=null,N=null;if(l.forEach(function(F){F.semver===$s&&(F=new Kr(">=0.0.0")),x=x||F,N=N||F,a(F.semver,x.semver,o)?x=F:s(F.semver,N.semver,o)&&(N=F)}),x.operator===n||x.operator===i||(!N.operator||N.operator===n)&&c(e,N.semver))return!1;if(N.operator===i&&s(e,N.semver))return!1}return!0}Ge.prerelease=wO;function wO(e,t){var r=oa(e,t);return r&&r.prerelease.length?r.prerelease:null}Ge.intersects=_O;function _O(e,t,r){return e=new Tt(e,r),t=new Tt(t,r),e.intersects(t)}Ge.coerce=CO;function CO(e){if(e instanceof tt)return e;if(typeof e!="string")return null;var t=e.match(vt[E4]);return t==null?null:oa(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}});var D4=R((fZ,BO)=>{BO.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}});var Fr=R(W4=>{"use strict";g();y();var so=W4,EO=Fo(),PO=W_(),lf=U_();so.assert=PO;so.toArray=lf.toArray;so.zero2=lf.zero2;so.toHex=lf.toHex;so.encode=lf.encode;function TO(e,t,r){var o=new Array(Math.max(e.bitLength(),r)+1);o.fill(0);for(var a=1<<t+1,c=e.clone(),s=0;s<o.length;s++){var n,i=c.andln(a-1);c.isOdd()?(i>(a>>1)-1?n=(a>>1)-i:n=i,c.isubn(n)):n=0,o[s]=n,c.iushrn(1)}return o}so.getNAF=TO;function SO(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var o=0,a=0,c;e.cmpn(-o)>0||t.cmpn(-a)>0;){var s=e.andln(3)+o&3,n=t.andln(3)+a&3;s===3&&(s=-1),n===3&&(n=-1);var i;(s&1)===0?i=0:(c=e.andln(7)+o&7,(c===3||c===5)&&n===2?i=-s:i=s),r[0].push(i);var u;(n&1)===0?u=0:(c=t.andln(7)+a&7,(c===3||c===5)&&s===2?u=-n:u=n),r[1].push(u),2*o===i+1&&(o=1-o),2*a===u+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return r}so.getJSF=SO;function OO(e,t,r){var o="_"+t;e.prototype[t]=function(){return this[o]!==void 0?this[o]:this[o]=r.call(this)}}so.cachedProperty=OO;function IO(e){return typeof e=="string"?so.toArray(e,"hex"):e}so.parseBytes=IO;function kO(e){return new EO(e,"hex","le")}so.intFromLE=kO});var Zs=R((yZ,U4)=>{"use strict";g();y();var na=Fo(),Ks=Fr(),df=Ks.getNAF,FO=Ks.getJSF,ff=Ks.assert;function Bn(e,t){this.type=e,this.p=new na(t.p,16),this.red=t.prime?na.red(t.prime):na.mont(this.p),this.zero=new na(0).toRed(this.red),this.one=new na(1).toRed(this.red),this.two=new na(2).toRed(this.red),this.n=t.n&&new na(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}U4.exports=Bn;Bn.prototype.point=function(){throw new Error("Not implemented")};Bn.prototype.validate=function(){throw new Error("Not implemented")};Bn.prototype._fixedNafMul=function(t,r){ff(t.precomputed);var o=t._getDoubles(),a=df(r,1,this._bitLength),c=(1<<o.step+1)-(o.step%2===0?2:1);c/=3;var s=[],n,i;for(n=0;n<a.length;n+=o.step){i=0;for(var u=n+o.step-1;u>=n;u--)i=(i<<1)+a[u];s.push(i)}for(var l=this.jpoint(null,null,null),x=this.jpoint(null,null,null),N=c;N>0;N--){for(n=0;n<s.length;n++)i=s[n],i===N?x=x.mixedAdd(o.points[n]):i===-N&&(x=x.mixedAdd(o.points[n].neg()));l=l.add(x)}return l.toP()};Bn.prototype._wnafMul=function(t,r){var o=4,a=t._getNAFPoints(o);o=a.wnd;for(var c=a.points,s=df(r,o,this._bitLength),n=this.jpoint(null,null,null),i=s.length-1;i>=0;i--){for(var u=0;i>=0&&s[i]===0;i--)u++;if(i>=0&&u++,n=n.dblp(u),i<0)break;var l=s[i];ff(l!==0),t.type==="affine"?l>0?n=n.mixedAdd(c[l-1>>1]):n=n.mixedAdd(c[-l-1>>1].neg()):l>0?n=n.add(c[l-1>>1]):n=n.add(c[-l-1>>1].neg())}return t.type==="affine"?n.toP():n};Bn.prototype._wnafMulAdd=function(t,r,o,a,c){var s=this._wnafT1,n=this._wnafT2,i=this._wnafT3,u=0,l,x,N;for(l=0;l<a;l++){N=r[l];var F=N._getNAFPoints(t);s[l]=F.wnd,n[l]=F.points}for(l=a-1;l>=1;l-=2){var G=l-1,K=l;if(s[G]!==1||s[K]!==1){i[G]=df(o[G],s[G],this._bitLength),i[K]=df(o[K],s[K],this._bitLength),u=Math.max(i[G].length,u),u=Math.max(i[K].length,u);continue}var te=[r[G],null,null,r[K]];r[G].y.cmp(r[K].y)===0?(te[1]=r[G].add(r[K]),te[2]=r[G].toJ().mixedAdd(r[K].neg())):r[G].y.cmp(r[K].y.redNeg())===0?(te[1]=r[G].toJ().mixedAdd(r[K]),te[2]=r[G].add(r[K].neg())):(te[1]=r[G].toJ().mixedAdd(r[K]),te[2]=r[G].toJ().mixedAdd(r[K].neg()));var ae=[-3,-1,-5,-7,0,7,5,1,3],ge=FO(o[G],o[K]);for(u=Math.max(ge[0].length,u),i[G]=new Array(u),i[K]=new Array(u),x=0;x<u;x++){var Ce=ge[0][x]|0,Ne=ge[1][x]|0;i[G][x]=ae[(Ce+1)*3+(Ne+1)],i[K][x]=0,n[G]=te}}var Pe=this.jpoint(null,null,null),Se=this._wnafT4;for(l=u;l>=0;l--){for(var Ye=0;l>=0;){var rt=!0;for(x=0;x<a;x++)Se[x]=i[x][l]|0,Se[x]!==0&&(rt=!1);if(!rt)break;Ye++,l--}if(l>=0&&Ye++,Pe=Pe.dblp(Ye),l<0)break;for(x=0;x<a;x++){var Ae=Se[x];Ae!==0&&(Ae>0?N=n[x][Ae-1>>1]:Ae<0&&(N=n[x][-Ae-1>>1].neg()),N.type==="affine"?Pe=Pe.mixedAdd(N):Pe=Pe.add(N))}}for(l=0;l<a;l++)n[l]=null;return c?Pe:Pe.toP()};function Zr(e,t){this.curve=e,this.type=t,this.precomputed=null}Bn.BasePoint=Zr;Zr.prototype.eq=function(){throw new Error("Not implemented")};Zr.prototype.validate=function(){return this.curve.validate(this)};Bn.prototype.decodePoint=function(t,r){t=Ks.toArray(t,r);var o=this.p.byteLength();if((t[0]===4||t[0]===6||t[0]===7)&&t.length-1===2*o){t[0]===6?ff(t[t.length-1]%2===0):t[0]===7&&ff(t[t.length-1]%2===1);var a=this.point(t.slice(1,1+o),t.slice(1+o,1+2*o));return a}else if((t[0]===2||t[0]===3)&&t.length-1===o)return this.pointFromX(t.slice(1,1+o),t[0]===3);throw new Error("Unknown point format")};Zr.prototype.encodeCompressed=function(t){return this.encode(t,!0)};Zr.prototype._encode=function(t){var r=this.curve.p.byteLength(),o=this.getX().toArray("be",r);return t?[this.getY().isEven()?2:3].concat(o):[4].concat(o,this.getY().toArray("be",r))};Zr.prototype.encode=function(t,r){return Ks.encode(this._encode(r),t)};Zr.prototype.precompute=function(t){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,t),r.beta=this._getBeta(),this.precomputed=r,this};Zr.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((t.bitLength()+1)/r.step):!1};Zr.prototype._getDoubles=function(t,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var o=[this],a=this,c=0;c<r;c+=t){for(var s=0;s<t;s++)a=a.dbl();o.push(a)}return{step:t,points:o}};Zr.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],o=(1<<t)-1,a=o===1?null:this.dbl(),c=1;c<o;c++)r[c]=r[c-1].add(a);return{wnd:t,points:r}};Zr.prototype._getBeta=function(){return null};Zr.prototype.dblp=function(t){for(var r=this,o=0;o<t;o++)r=r.dbl();return r}});var j4=R((mZ,L4)=>{"use strict";g();y();var RO=Fr(),It=Fo(),Ah=Ep(),fi=Zs(),MO=RO.assert;function Jr(e){fi.call(this,"short",e),this.a=new It(e.a,16).toRed(this.red),this.b=new It(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Ah(Jr,fi);L4.exports=Jr;Jr.prototype._getEndomorphism=function(t){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,o;if(t.beta)r=new It(t.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);r=a[0].cmp(a[1])<0?a[0]:a[1],r=r.toRed(this.red)}if(t.lambda)o=new It(t.lambda,16);else{var c=this._getEndoRoots(this.n);this.g.mul(c[0]).x.cmp(this.g.x.redMul(r))===0?o=c[0]:(o=c[1],MO(this.g.mul(o).x.cmp(this.g.x.redMul(r))===0))}var s;return t.basis?s=t.basis.map(function(n){return{a:new It(n.a,16),b:new It(n.b,16)}}):s=this._getEndoBasis(o),{beta:r,lambda:o,basis:s}}};Jr.prototype._getEndoRoots=function(t){var r=t===this.p?this.red:It.mont(t),o=new It(2).toRed(r).redInvm(),a=o.redNeg(),c=new It(3).toRed(r).redNeg().redSqrt().redMul(o),s=a.redAdd(c).fromRed(),n=a.redSub(c).fromRed();return[s,n]};Jr.prototype._getEndoBasis=function(t){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),o=t,a=this.n.clone(),c=new It(1),s=new It(0),n=new It(0),i=new It(1),u,l,x,N,F,G,K,te=0,ae,ge;o.cmpn(0)!==0;){var Ce=a.div(o);ae=a.sub(Ce.mul(o)),ge=n.sub(Ce.mul(c));var Ne=i.sub(Ce.mul(s));if(!x&&ae.cmp(r)<0)u=K.neg(),l=c,x=ae.neg(),N=ge;else if(x&&++te===2)break;K=ae,a=o,o=ae,n=c,c=ge,i=s,s=Ne}F=ae.neg(),G=ge;var Pe=x.sqr().add(N.sqr()),Se=F.sqr().add(G.sqr());return Se.cmp(Pe)>=0&&(F=u,G=l),x.negative&&(x=x.neg(),N=N.neg()),F.negative&&(F=F.neg(),G=G.neg()),[{a:x,b:N},{a:F,b:G}]};Jr.prototype._endoSplit=function(t){var r=this.endo.basis,o=r[0],a=r[1],c=a.b.mul(t).divRound(this.n),s=o.b.neg().mul(t).divRound(this.n),n=c.mul(o.a),i=s.mul(a.a),u=c.mul(o.b),l=s.mul(a.b),x=t.sub(n).sub(i),N=u.add(l).neg();return{k1:x,k2:N}};Jr.prototype.pointFromX=function(t,r){t=new It(t,16),t.red||(t=t.toRed(this.red));var o=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),a=o.redSqrt();if(a.redSqr().redSub(o).cmp(this.zero)!==0)throw new Error("invalid point");var c=a.fromRed().isOdd();return(r&&!c||!r&&c)&&(a=a.redNeg()),this.point(t,a)};Jr.prototype.validate=function(t){if(t.inf)return!0;var r=t.x,o=t.y,a=this.a.redMul(r),c=r.redSqr().redMul(r).redIAdd(a).redIAdd(this.b);return o.redSqr().redISub(c).cmpn(0)===0};Jr.prototype._endoWnafMulAdd=function(t,r,o){for(var a=this._endoWnafT1,c=this._endoWnafT2,s=0;s<t.length;s++){var n=this._endoSplit(r[s]),i=t[s],u=i._getBeta();n.k1.negative&&(n.k1.ineg(),i=i.neg(!0)),n.k2.negative&&(n.k2.ineg(),u=u.neg(!0)),a[s*2]=i,a[s*2+1]=u,c[s*2]=n.k1,c[s*2+1]=n.k2}for(var l=this._wnafMulAdd(1,a,c,s*2,o),x=0;x<s*2;x++)a[x]=null,c[x]=null;return l};function $t(e,t,r,o){fi.BasePoint.call(this,e,"affine"),t===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new It(t,16),this.y=new It(r,16),o&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Ah($t,fi.BasePoint);Jr.prototype.point=function(t,r,o){return new $t(this,t,r,o)};Jr.prototype.pointFromJSON=function(t,r){return $t.fromJSON(this,t,r)};$t.prototype._getBeta=function(){if(!!this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var o=this.curve,a=function(c){return o.point(c.x.redMul(o.endo.beta),c.y)};t.beta=r,r.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(a)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(a)}}}return r}};$t.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};$t.fromJSON=function(t,r,o){typeof r=="string"&&(r=JSON.parse(r));var a=t.point(r[0],r[1],o);if(!r[2])return a;function c(n){return t.point(n[0],n[1],o)}var s=r[2];return a.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[a].concat(s.doubles.points.map(c))},naf:s.naf&&{wnd:s.naf.wnd,points:[a].concat(s.naf.points.map(c))}},a};$t.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};$t.prototype.isInfinity=function(){return this.inf};$t.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var r=this.y.redSub(t.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(t.x).redInvm()));var o=r.redSqr().redISub(this.x).redISub(t.x),a=r.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};$t.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,o=this.x.redSqr(),a=t.redInvm(),c=o.redAdd(o).redIAdd(o).redIAdd(r).redMul(a),s=c.redSqr().redISub(this.x.redAdd(this.x)),n=c.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,n)};$t.prototype.getX=function(){return this.x.fromRed()};$t.prototype.getY=function(){return this.y.fromRed()};$t.prototype.mul=function(t){return t=new It(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)};$t.prototype.mulAdd=function(t,r,o){var a=[this,r],c=[t,o];return this.curve.endo?this.curve._endoWnafMulAdd(a,c):this.curve._wnafMulAdd(1,a,c,2)};$t.prototype.jmulAdd=function(t,r,o){var a=[this,r],c=[t,o];return this.curve.endo?this.curve._endoWnafMulAdd(a,c,!0):this.curve._wnafMulAdd(1,a,c,2,!0)};$t.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)};$t.prototype.neg=function(t){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var o=this.precomputed,a=function(c){return c.neg()};r.precomputed={naf:o.naf&&{wnd:o.naf.wnd,points:o.naf.points.map(a)},doubles:o.doubles&&{step:o.doubles.step,points:o.doubles.points.map(a)}}}return r};$t.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function or(e,t,r,o){fi.BasePoint.call(this,e,"jacobian"),t===null&&r===null&&o===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new It(0)):(this.x=new It(t,16),this.y=new It(r,16),this.z=new It(o,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Ah(or,fi.BasePoint);Jr.prototype.jpoint=function(t,r,o){return new or(this,t,r,o)};or.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),r=t.redSqr(),o=this.x.redMul(r),a=this.y.redMul(r).redMul(t);return this.curve.point(o,a)};or.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};or.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var r=t.z.redSqr(),o=this.z.redSqr(),a=this.x.redMul(r),c=t.x.redMul(o),s=this.y.redMul(r.redMul(t.z)),n=t.y.redMul(o.redMul(this.z)),i=a.redSub(c),u=s.redSub(n);if(i.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=i.redSqr(),x=l.redMul(i),N=a.redMul(l),F=u.redSqr().redIAdd(x).redISub(N).redISub(N),G=u.redMul(N.redISub(F)).redISub(s.redMul(x)),K=this.z.redMul(t.z).redMul(i);return this.curve.jpoint(F,G,K)};or.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var r=this.z.redSqr(),o=this.x,a=t.x.redMul(r),c=this.y,s=t.y.redMul(r).redMul(this.z),n=o.redSub(a),i=c.redSub(s);if(n.cmpn(0)===0)return i.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=n.redSqr(),l=u.redMul(n),x=o.redMul(u),N=i.redSqr().redIAdd(l).redISub(x).redISub(x),F=i.redMul(x.redISub(N)).redISub(c.redMul(l)),G=this.z.redMul(n);return this.curve.jpoint(N,F,G)};or.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var o=this;for(r=0;r<t;r++)o=o.dbl();return o}var a=this.curve.a,c=this.curve.tinv,s=this.x,n=this.y,i=this.z,u=i.redSqr().redSqr(),l=n.redAdd(n);for(r=0;r<t;r++){var x=s.redSqr(),N=l.redSqr(),F=N.redSqr(),G=x.redAdd(x).redIAdd(x).redIAdd(a.redMul(u)),K=s.redMul(N),te=G.redSqr().redISub(K.redAdd(K)),ae=K.redISub(te),ge=G.redMul(ae);ge=ge.redIAdd(ge).redISub(F);var Ce=l.redMul(i);r+1<t&&(u=u.redMul(F)),s=te,i=Ce,l=ge}return this.curve.jpoint(s,l.redMul(c),i)};or.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};or.prototype._zeroDbl=function(){var t,r,o;if(this.zOne){var a=this.x.redSqr(),c=this.y.redSqr(),s=c.redSqr(),n=this.x.redAdd(c).redSqr().redISub(a).redISub(s);n=n.redIAdd(n);var i=a.redAdd(a).redIAdd(a),u=i.redSqr().redISub(n).redISub(n),l=s.redIAdd(s);l=l.redIAdd(l),l=l.redIAdd(l),t=u,r=i.redMul(n.redISub(u)).redISub(l),o=this.y.redAdd(this.y)}else{var x=this.x.redSqr(),N=this.y.redSqr(),F=N.redSqr(),G=this.x.redAdd(N).redSqr().redISub(x).redISub(F);G=G.redIAdd(G);var K=x.redAdd(x).redIAdd(x),te=K.redSqr(),ae=F.redIAdd(F);ae=ae.redIAdd(ae),ae=ae.redIAdd(ae),t=te.redISub(G).redISub(G),r=K.redMul(G.redISub(t)).redISub(ae),o=this.y.redMul(this.z),o=o.redIAdd(o)}return this.curve.jpoint(t,r,o)};or.prototype._threeDbl=function(){var t,r,o;if(this.zOne){var a=this.x.redSqr(),c=this.y.redSqr(),s=c.redSqr(),n=this.x.redAdd(c).redSqr().redISub(a).redISub(s);n=n.redIAdd(n);var i=a.redAdd(a).redIAdd(a).redIAdd(this.curve.a),u=i.redSqr().redISub(n).redISub(n);t=u;var l=s.redIAdd(s);l=l.redIAdd(l),l=l.redIAdd(l),r=i.redMul(n.redISub(u)).redISub(l),o=this.y.redAdd(this.y)}else{var x=this.z.redSqr(),N=this.y.redSqr(),F=this.x.redMul(N),G=this.x.redSub(x).redMul(this.x.redAdd(x));G=G.redAdd(G).redIAdd(G);var K=F.redIAdd(F);K=K.redIAdd(K);var te=K.redAdd(K);t=G.redSqr().redISub(te),o=this.y.redAdd(this.z).redSqr().redISub(N).redISub(x);var ae=N.redSqr();ae=ae.redIAdd(ae),ae=ae.redIAdd(ae),ae=ae.redIAdd(ae),r=G.redMul(K.redISub(t)).redISub(ae)}return this.curve.jpoint(t,r,o)};or.prototype._dbl=function(){var t=this.curve.a,r=this.x,o=this.y,a=this.z,c=a.redSqr().redSqr(),s=r.redSqr(),n=o.redSqr(),i=s.redAdd(s).redIAdd(s).redIAdd(t.redMul(c)),u=r.redAdd(r);u=u.redIAdd(u);var l=u.redMul(n),x=i.redSqr().redISub(l.redAdd(l)),N=l.redISub(x),F=n.redSqr();F=F.redIAdd(F),F=F.redIAdd(F),F=F.redIAdd(F);var G=i.redMul(N).redISub(F),K=o.redAdd(o).redMul(a);return this.curve.jpoint(x,G,K)};or.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),r=this.y.redSqr(),o=this.z.redSqr(),a=r.redSqr(),c=t.redAdd(t).redIAdd(t),s=c.redSqr(),n=this.x.redAdd(r).redSqr().redISub(t).redISub(a);n=n.redIAdd(n),n=n.redAdd(n).redIAdd(n),n=n.redISub(s);var i=n.redSqr(),u=a.redIAdd(a);u=u.redIAdd(u),u=u.redIAdd(u),u=u.redIAdd(u);var l=c.redIAdd(n).redSqr().redISub(s).redISub(i).redISub(u),x=r.redMul(l);x=x.redIAdd(x),x=x.redIAdd(x);var N=this.x.redMul(i).redISub(x);N=N.redIAdd(N),N=N.redIAdd(N);var F=this.y.redMul(l.redMul(u.redISub(l)).redISub(n.redMul(i)));F=F.redIAdd(F),F=F.redIAdd(F),F=F.redIAdd(F);var G=this.z.redAdd(n).redSqr().redISub(o).redISub(i);return this.curve.jpoint(N,F,G)};or.prototype.mul=function(t,r){return t=new It(t,r),this.curve._wnafMul(this,t)};or.prototype.eq=function(t){if(t.type==="affine")return this.eq(t.toJ());if(this===t)return!0;var r=this.z.redSqr(),o=t.z.redSqr();if(this.x.redMul(o).redISub(t.x.redMul(r)).cmpn(0)!==0)return!1;var a=r.redMul(this.z),c=o.redMul(t.z);return this.y.redMul(c).redISub(t.y.redMul(a)).cmpn(0)===0};or.prototype.eqXToP=function(t){var r=this.z.redSqr(),o=t.toRed(this.curve.red).redMul(r);if(this.x.cmp(o)===0)return!0;for(var a=t.clone(),c=this.curve.redN.redMul(r);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(o.redIAdd(c),this.x.cmp(o)===0)return!0}};or.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};or.prototype.isInfinity=function(){return this.z.cmpn(0)===0}});var V4=R((wZ,q4)=>{"use strict";g();y();var pi=Fo(),z4=Ep(),pf=Zs(),NO=Fr();function hi(e){pf.call(this,"mont",e),this.a=new pi(e.a,16).toRed(this.red),this.b=new pi(e.b,16).toRed(this.red),this.i4=new pi(4).toRed(this.red).redInvm(),this.two=new pi(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}z4(hi,pf);q4.exports=hi;hi.prototype.validate=function(t){var r=t.normalize().x,o=r.redSqr(),a=o.redMul(r).redAdd(o.redMul(this.a)).redAdd(r),c=a.redSqrt();return c.redSqr().cmp(a)===0};function Kt(e,t,r){pf.BasePoint.call(this,e,"projective"),t===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new pi(t,16),this.z=new pi(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}z4(Kt,pf.BasePoint);hi.prototype.decodePoint=function(t,r){return this.point(NO.toArray(t,r),1)};hi.prototype.point=function(t,r){return new Kt(this,t,r)};hi.prototype.pointFromJSON=function(t){return Kt.fromJSON(this,t)};Kt.prototype.precompute=function(){};Kt.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Kt.fromJSON=function(t,r){return new Kt(t,r[0],r[1]||t.one)};Kt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Kt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Kt.prototype.dbl=function(){var t=this.x.redAdd(this.z),r=t.redSqr(),o=this.x.redSub(this.z),a=o.redSqr(),c=r.redSub(a),s=r.redMul(a),n=c.redMul(a.redAdd(this.curve.a24.redMul(c)));return this.curve.point(s,n)};Kt.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Kt.prototype.diffAdd=function(t,r){var o=this.x.redAdd(this.z),a=this.x.redSub(this.z),c=t.x.redAdd(t.z),s=t.x.redSub(t.z),n=s.redMul(o),i=c.redMul(a),u=r.z.redMul(n.redAdd(i).redSqr()),l=r.x.redMul(n.redISub(i).redSqr());return this.curve.point(u,l)};Kt.prototype.mul=function(t){for(var r=t.clone(),o=this,a=this.curve.point(null,null),c=this,s=[];r.cmpn(0)!==0;r.iushrn(1))s.push(r.andln(1));for(var n=s.length-1;n>=0;n--)s[n]===0?(o=o.diffAdd(a,c),a=a.dbl()):(a=o.diffAdd(a,c),o=o.dbl());return a};Kt.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Kt.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Kt.prototype.eq=function(t){return this.getX().cmp(t.getX())===0};Kt.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Kt.prototype.getX=function(){return this.normalize(),this.x.fromRed()}});var $4=R((BZ,H4)=>{"use strict";g();y();var DO=Fr(),$o=Fo(),G4=Ep(),hf=Zs(),WO=DO.assert;function Po(e){this.twisted=(e.a|0)!==1,this.mOneA=this.twisted&&(e.a|0)===-1,this.extended=this.mOneA,hf.call(this,"edwards",e),this.a=new $o(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new $o(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new $o(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),WO(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(e.c|0)===1}G4(Po,hf);H4.exports=Po;Po.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)};Po.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)};Po.prototype.jpoint=function(t,r,o,a){return this.point(t,r,o,a)};Po.prototype.pointFromX=function(t,r){t=new $o(t,16),t.red||(t=t.toRed(this.red));var o=t.redSqr(),a=this.c2.redSub(this.a.redMul(o)),c=this.one.redSub(this.c2.redMul(this.d).redMul(o)),s=a.redMul(c.redInvm()),n=s.redSqrt();if(n.redSqr().redSub(s).cmp(this.zero)!==0)throw new Error("invalid point");var i=n.fromRed().isOdd();return(r&&!i||!r&&i)&&(n=n.redNeg()),this.point(t,n)};Po.prototype.pointFromY=function(t,r){t=new $o(t,16),t.red||(t=t.toRed(this.red));var o=t.redSqr(),a=o.redSub(this.c2),c=o.redMul(this.d).redMul(this.c2).redSub(this.a),s=a.redMul(c.redInvm());if(s.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,t)}var n=s.redSqrt();if(n.redSqr().redSub(s).cmp(this.zero)!==0)throw new Error("invalid point");return n.fromRed().isOdd()!==r&&(n=n.redNeg()),this.point(n,t)};Po.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var r=t.x.redSqr(),o=t.y.redSqr(),a=r.redMul(this.a).redAdd(o),c=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(o)));return a.cmp(c)===0};function bt(e,t,r,o,a){hf.BasePoint.call(this,e,"projective"),t===null&&r===null&&o===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new $o(t,16),this.y=new $o(r,16),this.z=o?new $o(o,16):this.curve.one,this.t=a&&new $o(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}G4(bt,hf.BasePoint);Po.prototype.pointFromJSON=function(t){return bt.fromJSON(this,t)};Po.prototype.point=function(t,r,o,a){return new bt(this,t,r,o,a)};bt.fromJSON=function(t,r){return new bt(t,r[0],r[1],r[2])};bt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};bt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};bt.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),o=this.z.redSqr();o=o.redIAdd(o);var a=this.curve._mulA(t),c=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),s=a.redAdd(r),n=s.redSub(o),i=a.redSub(r),u=c.redMul(n),l=s.redMul(i),x=c.redMul(i),N=n.redMul(s);return this.curve.point(u,l,N,x)};bt.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),o=this.y.redSqr(),a,c,s,n,i,u;if(this.curve.twisted){n=this.curve._mulA(r);var l=n.redAdd(o);this.zOne?(a=t.redSub(r).redSub(o).redMul(l.redSub(this.curve.two)),c=l.redMul(n.redSub(o)),s=l.redSqr().redSub(l).redSub(l)):(i=this.z.redSqr(),u=l.redSub(i).redISub(i),a=t.redSub(r).redISub(o).redMul(u),c=l.redMul(n.redSub(o)),s=l.redMul(u))}else n=r.redAdd(o),i=this.curve._mulC(this.z).redSqr(),u=n.redSub(i).redSub(i),a=this.curve._mulC(t.redISub(n)).redMul(u),c=this.curve._mulC(n).redMul(r.redISub(o)),s=n.redMul(u);return this.curve.point(a,c,s)};bt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};bt.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),o=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),a=this.t.redMul(this.curve.dd).redMul(t.t),c=this.z.redMul(t.z.redAdd(t.z)),s=o.redSub(r),n=c.redSub(a),i=c.redAdd(a),u=o.redAdd(r),l=s.redMul(n),x=i.redMul(u),N=s.redMul(u),F=n.redMul(i);return this.curve.point(l,x,F,N)};bt.prototype._projAdd=function(t){var r=this.z.redMul(t.z),o=r.redSqr(),a=this.x.redMul(t.x),c=this.y.redMul(t.y),s=this.curve.d.redMul(a).redMul(c),n=o.redSub(s),i=o.redAdd(s),u=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(a).redISub(c),l=r.redMul(n).redMul(u),x,N;return this.curve.twisted?(x=r.redMul(i).redMul(c.redSub(this.curve._mulA(a))),N=n.redMul(i)):(x=r.redMul(i).redMul(c.redSub(a)),N=this.curve._mulC(n).redMul(i)),this.curve.point(l,x,N)};bt.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)};bt.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)};bt.prototype.mulAdd=function(t,r,o){return this.curve._wnafMulAdd(1,[this,r],[t,o],2,!1)};bt.prototype.jmulAdd=function(t,r,o){return this.curve._wnafMulAdd(1,[this,r],[t,o],2,!0)};bt.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this};bt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};bt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};bt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};bt.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0};bt.prototype.eqXToP=function(t){var r=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var o=t.clone(),a=this.curve.redN.redMul(this.z);;){if(o.iadd(this.curve.n),o.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(a),this.x.cmp(r)===0)return!0}};bt.prototype.toP=bt.prototype.normalize;bt.prototype.mixedAdd=bt.prototype.add});var wh=R(K4=>{"use strict";g();y();var gf=K4;gf.base=Zs();gf.short=j4();gf.mont=V4();gf.edwards=$4()});var J4=R((IZ,Z4)=>{g();y();Z4.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}});var yf=R(Q4=>{"use strict";g();y();var Ch=Q4,En=Pp(),_h=wh(),UO=Fr(),Y4=UO.assert;function X4(e){e.type==="short"?this.curve=new _h.short(e):e.type==="edwards"?this.curve=new _h.edwards(e):this.curve=new _h.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,Y4(this.g.validate(),"Invalid curve"),Y4(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}Ch.PresetCurve=X4;function Pn(e,t){Object.defineProperty(Ch,e,{configurable:!0,enumerable:!0,get:function(){var r=new X4(t);return Object.defineProperty(Ch,e,{configurable:!0,enumerable:!0,value:r}),r}})}Pn("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:En.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});Pn("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:En.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});Pn("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:En.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});Pn("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:En.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});Pn("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:En.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]});Pn("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:En.sha256,gRed:!1,g:["9"]});Pn("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:En.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var Bh;try{Bh=J4()}catch{Bh=void 0}Pn("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:En.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",Bh]})});var t3=R((DZ,e3)=>{"use strict";g();y();var LO=Fo(),jO=Fr(),Eh=jO.assert;function pr(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e3.exports=pr;pr.fromPublic=function(t,r,o){return r instanceof pr?r:new pr(t,{pub:r,pubEnc:o})};pr.fromPrivate=function(t,r,o){return r instanceof pr?r:new pr(t,{priv:r,privEnc:o})};pr.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};pr.prototype.getPublic=function(t,r){return typeof t=="string"&&(r=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,t):this.pub};pr.prototype.getPrivate=function(t){return t==="hex"?this.priv.toString(16,2):this.priv};pr.prototype._importPrivate=function(t,r){this.priv=new LO(t,r||16),this.priv=this.priv.umod(this.ec.curve.n)};pr.prototype._importPublic=function(t,r){if(t.x||t.y){this.ec.curve.type==="mont"?Eh(t.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Eh(t.x&&t.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(t.x,t.y);return}this.pub=this.ec.curve.decodePoint(t,r)};pr.prototype.derive=function(t){return t.validate()||Eh(t.validate(),"public point not validated"),t.mul(this.priv).getX()};pr.prototype.sign=function(t,r,o){return this.ec.sign(t,this,r,o)};pr.prototype.verify=function(t,r){return this.ec.verify(t,r,this)};pr.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}});var n3=R((LZ,o3)=>{"use strict";g();y();var vf=Fo(),Sh=Fr(),zO=Sh.assert;function bf(e,t){if(e instanceof bf)return e;this._importDER(e,t)||(zO(e.r&&e.s,"Signature without r or s"),this.r=new vf(e.r,16),this.s=new vf(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}o3.exports=bf;function qO(){this.place=0}function Ph(e,t){var r=e[t.place++];if(!(r&128))return r;var o=r&15;if(o===0||o>4)return!1;for(var a=0,c=0,s=t.place;c<o;c++,s++)a<<=8,a|=e[s],a>>>=0;return a<=127?!1:(t.place=s,a)}function r3(e){for(var t=0,r=e.length-1;!e[t]&&!(e[t+1]&128)&&t<r;)t++;return t===0?e:e.slice(t)}bf.prototype._importDER=function(t,r){t=Sh.toArray(t,r);var o=new qO;if(t[o.place++]!==48)return!1;var a=Ph(t,o);if(a===!1||a+o.place!==t.length||t[o.place++]!==2)return!1;var c=Ph(t,o);if(c===!1)return!1;var s=t.slice(o.place,c+o.place);if(o.place+=c,t[o.place++]!==2)return!1;var n=Ph(t,o);if(n===!1||t.length!==n+o.place)return!1;var i=t.slice(o.place,n+o.place);if(s[0]===0)if(s[1]&128)s=s.slice(1);else return!1;if(i[0]===0)if(i[1]&128)i=i.slice(1);else return!1;return this.r=new vf(s),this.s=new vf(i),this.recoveryParam=null,!0};function Th(e,t){if(t<128){e.push(t);return}var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(r|128);--r;)e.push(t>>>(r<<3)&255);e.push(t)}bf.prototype.toDER=function(t){var r=this.r.toArray(),o=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),o[0]&128&&(o=[0].concat(o)),r=r3(r),o=r3(o);!o[0]&&!(o[1]&128);)o=o.slice(1);var a=[2];Th(a,r.length),a=a.concat(r),a.push(2),Th(a,o.length);var c=a.concat(o),s=[48];return Th(s,c.length),s=s.concat(c),Sh.encode(s,t)}});var c3=R((qZ,s3)=>{"use strict";g();y();var aa=Fo(),a3=L_(),VO=Fr(),Oh=yf(),GO=kb(),i3=VO.assert,Ih=t3(),mf=n3();function Yr(e){if(!(this instanceof Yr))return new Yr(e);typeof e=="string"&&(i3(Object.prototype.hasOwnProperty.call(Oh,e),"Unknown curve "+e),e=Oh[e]),e instanceof Oh.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}s3.exports=Yr;Yr.prototype.keyPair=function(t){return new Ih(this,t)};Yr.prototype.keyFromPrivate=function(t,r){return Ih.fromPrivate(this,t,r)};Yr.prototype.keyFromPublic=function(t,r){return Ih.fromPublic(this,t,r)};Yr.prototype.genKeyPair=function(t){t||(t={});for(var r=new a3({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||GO(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),a=this.n.sub(new aa(2));;){var c=new aa(r.generate(o));if(!(c.cmp(a)>0))return c.iaddn(1),this.keyFromPrivate(c)}};Yr.prototype._truncateToN=function(t,r){var o=t.byteLength()*8-this.n.bitLength();return o>0&&(t=t.ushrn(o)),!r&&t.cmp(this.n)>=0?t.sub(this.n):t};Yr.prototype.sign=function(t,r,o,a){typeof o=="object"&&(a=o,o=null),a||(a={}),r=this.keyFromPrivate(r,o),t=this._truncateToN(new aa(t,16));for(var c=this.n.byteLength(),s=r.getPrivate().toArray("be",c),n=t.toArray("be",c),i=new a3({hash:this.hash,entropy:s,nonce:n,pers:a.pers,persEnc:a.persEnc||"utf8"}),u=this.n.sub(new aa(1)),l=0;;l++){var x=a.k?a.k(l):new aa(i.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(u)>=0)){var N=this.g.mul(x);if(!N.isInfinity()){var F=N.getX(),G=F.umod(this.n);if(G.cmpn(0)!==0){var K=x.invm(this.n).mul(G.mul(r.getPrivate()).iadd(t));if(K=K.umod(this.n),K.cmpn(0)!==0){var te=(N.getY().isOdd()?1:0)|(F.cmp(G)!==0?2:0);return a.canonical&&K.cmp(this.nh)>0&&(K=this.n.sub(K),te^=1),new mf({r:G,s:K,recoveryParam:te})}}}}}};Yr.prototype.verify=function(t,r,o,a){t=this._truncateToN(new aa(t,16)),o=this.keyFromPublic(o,a),r=new mf(r,"hex");var c=r.r,s=r.s;if(c.cmpn(1)<0||c.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var n=s.invm(this.n),i=n.mul(t).umod(this.n),u=n.mul(c).umod(this.n),l;return this.curve._maxwellTrick?(l=this.g.jmulAdd(i,o.getPublic(),u),l.isInfinity()?!1:l.eqXToP(c)):(l=this.g.mulAdd(i,o.getPublic(),u),l.isInfinity()?!1:l.getX().umod(this.n).cmp(c)===0)};Yr.prototype.recoverPubKey=function(e,t,r,o){i3((3&r)===r,"The recovery param is more than two bits"),t=new mf(t,o);var a=this.n,c=new aa(e),s=t.r,n=t.s,i=r&1,u=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");u?s=this.curve.pointFromX(s.add(this.curve.n),i):s=this.curve.pointFromX(s,i);var l=t.r.invm(a),x=a.sub(c).mul(l).umod(a),N=n.mul(l).umod(a);return this.g.mulAdd(x,s,N)};Yr.prototype.getKeyRecoveryParam=function(e,t,r,o){if(t=new mf(t,o),t.recoveryParam!==null)return t.recoveryParam;for(var a=0;a<4;a++){var c;try{c=this.recoverPubKey(e,t,a)}catch{continue}if(c.eq(r))return a}throw new Error("Unable to find valid recovery factor")}});var f3=R((HZ,d3)=>{"use strict";g();y();var Js=Fr(),l3=Js.assert,u3=Js.parseBytes,gi=Js.cachedProperty;function Zt(e,t){this.eddsa=e,this._secret=u3(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=u3(t.pub)}Zt.fromPublic=function(t,r){return r instanceof Zt?r:new Zt(t,{pub:r})};Zt.fromSecret=function(t,r){return r instanceof Zt?r:new Zt(t,{secret:r})};Zt.prototype.secret=function(){return this._secret};gi(Zt,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});gi(Zt,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});gi(Zt,"privBytes",function(){var t=this.eddsa,r=this.hash(),o=t.encodingLength-1,a=r.slice(0,t.encodingLength);return a[0]&=248,a[o]&=127,a[o]|=64,a});gi(Zt,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});gi(Zt,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});gi(Zt,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Zt.prototype.sign=function(t){return l3(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)};Zt.prototype.verify=function(t,r){return this.eddsa.verify(t,r,this)};Zt.prototype.getSecret=function(t){return l3(this._secret,"KeyPair is public only"),Js.encode(this.secret(),t)};Zt.prototype.getPublic=function(t){return Js.encode(this.pubBytes(),t)};d3.exports=Zt});var h3=R((ZZ,p3)=>{"use strict";g();y();var HO=Fo(),xf=Fr(),$O=xf.assert,Af=xf.cachedProperty,KO=xf.parseBytes;function ia(e,t){this.eddsa=e,typeof t!="object"&&(t=KO(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),$O(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof HO&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}Af(ia,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});Af(ia,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});Af(ia,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});Af(ia,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});ia.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};ia.prototype.toHex=function(){return xf.encode(this.toBytes(),"hex").toUpperCase()};p3.exports=ia});var m3=R((XZ,b3)=>{"use strict";g();y();var ZO=Pp(),JO=yf(),yi=Fr(),YO=yi.assert,y3=yi.parseBytes,v3=f3(),g3=h3();function Sr(e){if(YO(e==="ed25519","only tested with ed25519 so far"),!(this instanceof Sr))return new Sr(e);e=JO[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=ZO.sha512}b3.exports=Sr;Sr.prototype.sign=function(t,r){t=y3(t);var o=this.keyFromSecret(r),a=this.hashInt(o.messagePrefix(),t),c=this.g.mul(a),s=this.encodePoint(c),n=this.hashInt(s,o.pubBytes(),t).mul(o.priv()),i=a.add(n).umod(this.curve.n);return this.makeSignature({R:c,S:i,Rencoded:s})};Sr.prototype.verify=function(t,r,o){t=y3(t),r=this.makeSignature(r);var a=this.keyFromPublic(o),c=this.hashInt(r.Rencoded(),a.pubBytes(),t),s=this.g.mul(r.S()),n=r.R().add(a.pub().mul(c));return n.eq(s)};Sr.prototype.hashInt=function(){for(var t=this.hash(),r=0;r<arguments.length;r++)t.update(arguments[r]);return yi.intFromLE(t.digest()).umod(this.curve.n)};Sr.prototype.keyFromPublic=function(t){return v3.fromPublic(this,t)};Sr.prototype.keyFromSecret=function(t){return v3.fromSecret(this,t)};Sr.prototype.makeSignature=function(t){return t instanceof g3?t:new g3(this,t)};Sr.prototype.encodePoint=function(t){var r=t.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=t.getX().isOdd()?128:0,r};Sr.prototype.decodePoint=function(t){t=yi.parseBytes(t);var r=t.length-1,o=t.slice(0,r).concat(t[r]&-129),a=(t[r]&128)!==0,c=yi.intFromLE(o);return this.curve.pointFromY(c,a)};Sr.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)};Sr.prototype.decodeInt=function(t){return yi.intFromLE(t)};Sr.prototype.isPoint=function(t){return t instanceof this.pointClass}});var A3=R(x3=>{"use strict";g();y();var sa=x3;sa.version=D4().version;sa.utils=Fr();sa.rand=kb();sa.curve=wh();sa.curves=yf();sa.ec=c3();sa.eddsa=m3()});var w3=R((nJ,Ko)=>{g();y();function kh(e){return Ko.exports=kh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ko.exports.__esModule=!0,Ko.exports.default=Ko.exports,kh(e)}Ko.exports=kh,Ko.exports.__esModule=!0,Ko.exports.default=Ko.exports});var _3=R((sJ,Zo)=>{g();y();function Fh(e,t){return Zo.exports=Fh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,a){return o.__proto__=a,o},Zo.exports.__esModule=!0,Zo.exports.default=Zo.exports,Fh(e,t)}Zo.exports=Fh,Zo.exports.__esModule=!0,Zo.exports.default=Zo.exports});var C3=R((lJ,Ys)=>{g();y();var XO=_3();function QO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XO(e,t)}Ys.exports=QO,Ys.exports.__esModule=!0,Ys.exports.default=Ys.exports});var B3=R((pJ,Xs)=>{g();y();var eI=bl().default,tI=oh();function rI(e,t){if(t&&(eI(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tI(e)}Xs.exports=rI,Xs.exports.__esModule=!0,Xs.exports.default=Xs.exports});var Rh=R((yJ,E3)=>{"use strict";g();y();E3.exports=function(t,r){return function(){for(var a=new Array(arguments.length),c=0;c<a.length;c++)a[c]=arguments[c];return t.apply(r,a)}}});var xr=R((mJ,O3)=>{"use strict";g();y();var oI=Rh(),Tn=Object.prototype.toString;function Dh(e){return Array.isArray(e)}function Mh(e){return typeof e>"u"}function nI(e){return e!==null&&!Mh(e)&&e.constructor!==null&&!Mh(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function P3(e){return Tn.call(e)==="[object ArrayBuffer]"}function aI(e){return Tn.call(e)==="[object FormData]"}function iI(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&P3(e.buffer),t}function sI(e){return typeof e=="string"}function cI(e){return typeof e=="number"}function T3(e){return e!==null&&typeof e=="object"}function wf(e){if(Tn.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function uI(e){return Tn.call(e)==="[object Date]"}function lI(e){return Tn.call(e)==="[object File]"}function dI(e){return Tn.call(e)==="[object Blob]"}function S3(e){return Tn.call(e)==="[object Function]"}function fI(e){return T3(e)&&S3(e.pipe)}function pI(e){return Tn.call(e)==="[object URLSearchParams]"}function hI(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function gI(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Wh(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),Dh(e))for(var r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}function Nh(){var e={};function t(a,c){wf(e[c])&&wf(a)?e[c]=Nh(e[c],a):wf(a)?e[c]=Nh({},a):Dh(a)?e[c]=a.slice():e[c]=a}for(var r=0,o=arguments.length;r<o;r++)Wh(arguments[r],t);return e}function yI(e,t,r){return Wh(t,function(a,c){r&&typeof a=="function"?e[c]=oI(a,r):e[c]=a}),e}function vI(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}O3.exports={isArray:Dh,isArrayBuffer:P3,isBuffer:nI,isFormData:aI,isArrayBufferView:iI,isString:sI,isNumber:cI,isObject:T3,isPlainObject:wf,isUndefined:Mh,isDate:uI,isFile:lI,isBlob:dI,isFunction:S3,isStream:fI,isURLSearchParams:pI,isStandardBrowserEnv:gI,forEach:Wh,merge:Nh,extend:yI,trim:hI,stripBOM:vI}});var Uh=R((wJ,k3)=>{"use strict";g();y();var vi=xr();function I3(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}k3.exports=function(t,r,o){if(!r)return t;var a;if(o)a=o(r);else if(vi.isURLSearchParams(r))a=r.toString();else{var c=[];vi.forEach(r,function(i,u){i===null||typeof i>"u"||(vi.isArray(i)?u=u+"[]":i=[i],vi.forEach(i,function(x){vi.isDate(x)?x=x.toISOString():vi.isObject(x)&&(x=JSON.stringify(x)),c.push(I3(u)+"="+I3(x))}))}),a=c.join("&")}if(a){var s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}});var R3=R((BJ,F3)=>{"use strict";g();y();var bI=xr();function _f(){this.handlers=[]}_f.prototype.use=function(t,r,o){return this.handlers.push({fulfilled:t,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1};_f.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};_f.prototype.forEach=function(t){bI.forEach(this.handlers,function(o){o!==null&&t(o)})};F3.exports=_f});var N3=R((TJ,M3)=>{"use strict";g();y();var mI=xr();M3.exports=function(t,r){mI.forEach(t,function(a,c){c!==r&&c.toUpperCase()===r.toUpperCase()&&(t[r]=a,delete t[c])})}});var Lh=R((IJ,D3)=>{"use strict";g();y();D3.exports=function(t,r,o,a,c){return t.config=r,o&&(t.code=o),t.request=a,t.response=c,t.isAxiosError=!0,t.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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}});var jh=R((RJ,W3)=>{"use strict";g();y();W3.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});var zh=R((DJ,U3)=>{"use strict";g();y();var xI=Lh();U3.exports=function(t,r,o,a,c){var s=new Error(t);return xI(s,r,o,a,c)}});var j3=R((LJ,L3)=>{"use strict";g();y();var AI=zh();L3.exports=function(t,r,o){var a=o.config.validateStatus;!o.status||!a||a(o.status)?t(o):r(AI("Request failed with status code "+o.status,o.config,null,o.request,o))}});var q3=R((qJ,z3)=>{"use strict";g();y();var Cf=xr();z3.exports=Cf.isStandardBrowserEnv()?function(){return{write:function(r,o,a,c,s,n){var i=[];i.push(r+"="+encodeURIComponent(o)),Cf.isNumber(a)&&i.push("expires="+new Date(a).toGMTString()),Cf.isString(c)&&i.push("path="+c),Cf.isString(s)&&i.push("domain="+s),n===!0&&i.push("secure"),document.cookie=i.join("; ")},read:function(r){var o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var G3=R((HJ,V3)=>{"use strict";g();y();V3.exports=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}});var $3=R((ZJ,H3)=>{"use strict";g();y();H3.exports=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t}});var Z3=R((XJ,K3)=>{"use strict";g();y();var wI=G3(),_I=$3();K3.exports=function(t,r){return t&&!wI(r)?_I(t,r):r}});var Y3=R((tY,J3)=>{"use strict";g();y();var qh=xr(),CI=["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"];J3.exports=function(t){var r={},o,a,c;return t&&qh.forEach(t.split(`
`),function(n){if(c=n.indexOf(":"),o=qh.trim(n.substr(0,c)).toLowerCase(),a=qh.trim(n.substr(c+1)),o){if(r[o]&&CI.indexOf(o)>=0)return;o==="set-cookie"?r[o]=(r[o]?r[o]:[]).concat([a]):r[o]=r[o]?r[o]+", "+a:a}}),r}});var e6=R((nY,Q3)=>{"use strict";g();y();var X3=xr();Q3.exports=X3.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),o;function a(c){var s=c;return t&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return o=a(window.location.href),function(s){var n=X3.isString(s)?a(s):s;return n.protocol===o.protocol&&n.host===o.host}}():function(){return function(){return!0}}()});var Qs=R((sY,t6)=>{"use strict";g();y();function Vh(e){this.message=e}Vh.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Vh.prototype.__CANCEL__=!0;t6.exports=Vh});var Hh=R((lY,r6)=>{"use strict";g();y();var Bf=xr(),BI=j3(),EI=q3(),PI=Uh(),TI=Z3(),SI=Y3(),OI=e6(),Gh=zh(),II=jh(),kI=Qs();r6.exports=function(t){return new Promise(function(o,a){var c=t.data,s=t.headers,n=t.responseType,i;function u(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}Bf.isFormData(c)&&delete s["Content-Type"];var l=new XMLHttpRequest;if(t.auth){var x=t.auth.username||"",N=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.Authorization="Basic "+btoa(x+":"+N)}var F=TI(t.baseURL,t.url);l.open(t.method.toUpperCase(),PI(F,t.params,t.paramsSerializer),!0),l.timeout=t.timeout;function G(){if(!!l){var te="getAllResponseHeaders"in l?SI(l.getAllResponseHeaders()):null,ae=!n||n==="text"||n==="json"?l.responseText:l.response,ge={data:ae,status:l.status,statusText:l.statusText,headers:te,config:t,request:l};BI(function(Ne){o(Ne),u()},function(Ne){a(Ne),u()},ge),l=null}}if("onloadend"in l?l.onloadend=G:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(G)},l.onabort=function(){!l||(a(Gh("Request aborted",t,"ECONNABORTED",l)),l=null)},l.onerror=function(){a(Gh("Network Error",t,null,l)),l=null},l.ontimeout=function(){var ae=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",ge=t.transitional||II;t.timeoutErrorMessage&&(ae=t.timeoutErrorMessage),a(Gh(ae,t,ge.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",l)),l=null},Bf.isStandardBrowserEnv()){var K=(t.withCredentials||OI(F))&&t.xsrfCookieName?EI.read(t.xsrfCookieName):void 0;K&&(s[t.xsrfHeaderName]=K)}"setRequestHeader"in l&&Bf.forEach(s,function(ae,ge){typeof c>"u"&&ge.toLowerCase()==="content-type"?delete s[ge]:l.setRequestHeader(ge,ae)}),Bf.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),n&&n!=="json"&&(l.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&l.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(i=function(te){!l||(a(!te||te&&te.type?new kI("canceled"):te),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i))),c||(c=null),l.send(c)})}});var Pf=R((pY,a6)=>{"use strict";g();y();var nr=xr(),o6=N3(),FI=Lh(),RI=jh(),MI={"Content-Type":"application/x-www-form-urlencoded"};function n6(e,t){!nr.isUndefined(e)&&nr.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function NI(){var e;return typeof XMLHttpRequest<"u"?e=Hh():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(e=Hh()),e}function DI(e,t,r){if(nr.isString(e))try{return(t||JSON.parse)(e),nr.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(e)}var Ef={transitional:RI,adapter:NI(),transformRequest:[function(t,r){return o6(r,"Accept"),o6(r,"Content-Type"),nr.isFormData(t)||nr.isArrayBuffer(t)||nr.isBuffer(t)||nr.isStream(t)||nr.isFile(t)||nr.isBlob(t)?t:nr.isArrayBufferView(t)?t.buffer:nr.isURLSearchParams(t)?(n6(r,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):nr.isObject(t)||r&&r["Content-Type"]==="application/json"?(n6(r,"application/json"),DI(t)):t}],transformResponse:[function(t){var r=this.transitional||Ef.transitional,o=r&&r.silentJSONParsing,a=r&&r.forcedJSONParsing,c=!o&&this.responseType==="json";if(c||a&&nr.isString(t)&&t.length)try{return JSON.parse(t)}catch(s){if(c)throw s.name==="SyntaxError"?FI(s,this,"E_JSON_PARSE"):s}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};nr.forEach(["delete","get","head"],function(t){Ef.headers[t]={}});nr.forEach(["post","put","patch"],function(t){Ef.headers[t]=nr.merge(MI)});a6.exports=Ef});var s6=R((yY,i6)=>{"use strict";g();y();var WI=xr(),UI=Pf();i6.exports=function(t,r,o){var a=this||UI;return WI.forEach(o,function(s){t=s.call(a,t,r)}),t}});var $h=R((mY,c6)=>{"use strict";g();y();c6.exports=function(t){return!!(t&&t.__CANCEL__)}});var d6=R((wY,l6)=>{"use strict";g();y();var u6=xr(),Kh=s6(),LI=$h(),jI=Pf(),zI=Qs();function Zh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zI("canceled")}l6.exports=function(t){Zh(t),t.headers=t.headers||{},t.data=Kh.call(t,t.data,t.headers,t.transformRequest),t.headers=u6.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),u6.forEach(["delete","get","head","post","put","patch","common"],function(a){delete t.headers[a]});var r=t.adapter||jI.adapter;return r(t).then(function(a){return Zh(t),a.data=Kh.call(t,a.data,a.headers,t.transformResponse),a},function(a){return LI(a)||(Zh(t),a&&a.response&&(a.response.data=Kh.call(t,a.response.data,a.response.headers,t.transformResponse))),Promise.reject(a)})}});var Jh=R((BY,f6)=>{"use strict";g();y();var Rr=xr();f6.exports=function(t,r){r=r||{};var o={};function a(l,x){return Rr.isPlainObject(l)&&Rr.isPlainObject(x)?Rr.merge(l,x):Rr.isPlainObject(x)?Rr.merge({},x):Rr.isArray(x)?x.slice():x}function c(l){if(Rr.isUndefined(r[l])){if(!Rr.isUndefined(t[l]))return a(void 0,t[l])}else return a(t[l],r[l])}function s(l){if(!Rr.isUndefined(r[l]))return a(void 0,r[l])}function n(l){if(Rr.isUndefined(r[l])){if(!Rr.isUndefined(t[l]))return a(void 0,t[l])}else return a(void 0,r[l])}function i(l){if(l in r)return a(t[l],r[l]);if(l in t)return a(void 0,t[l])}var u={url:s,method:s,data:s,baseURL:n,transformRequest:n,transformResponse:n,paramsSerializer:n,timeout:n,timeoutMessage:n,withCredentials:n,adapter:n,responseType:n,xsrfCookieName:n,xsrfHeaderName:n,onUploadProgress:n,onDownloadProgress:n,decompress:n,maxContentLength:n,maxBodyLength:n,transport:n,httpAgent:n,httpsAgent:n,cancelToken:n,socketPath:n,responseEncoding:n,validateStatus:i};return Rr.forEach(Object.keys(t).concat(Object.keys(r)),function(x){var N=u[x]||c,F=N(x);Rr.isUndefined(F)&&N!==i||(o[x]=F)}),o}});var Yh=R((TY,p6)=>{g();y();p6.exports={version:"0.26.1"}});var y6=R((IY,g6)=>{"use strict";g();y();var qI=Yh().version,Xh={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Xh[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});var h6={};Xh.transitional=function(t,r,o){function a(c,s){return"[Axios v"+qI+"] Transitional option '"+c+"'"+s+(o?". "+o:"")}return function(c,s,n){if(t===!1)throw new Error(a(s," has been removed"+(r?" in "+r:"")));return r&&!h6[s]&&(h6[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(c,s,n):!0}};function VI(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var o=Object.keys(e),a=o.length;a-- >0;){var c=o[a],s=t[c];if(s){var n=e[c],i=n===void 0||s(n,c,e);if(i!==!0)throw new TypeError("option "+c+" must be "+i);continue}if(r!==!0)throw Error("Unknown option "+c)}}g6.exports={assertOptions:VI,validators:Xh}});var w6=R((RY,A6)=>{"use strict";g();y();var m6=xr(),GI=Uh(),v6=R3(),b6=d6(),Tf=Jh(),x6=y6(),bi=x6.validators;function ec(e){this.defaults=e,this.interceptors={request:new v6,response:new v6}}ec.prototype.request=function(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Tf(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var o=r.transitional;o!==void 0&&x6.assertOptions(o,{silentJSONParsing:bi.transitional(bi.boolean),forcedJSONParsing:bi.transitional(bi.boolean),clarifyTimeoutError:bi.transitional(bi.boolean)},!1);var a=[],c=!0;this.interceptors.request.forEach(function(F){typeof F.runWhen=="function"&&F.runWhen(r)===!1||(c=c&&F.synchronous,a.unshift(F.fulfilled,F.rejected))});var s=[];this.interceptors.response.forEach(function(F){s.push(F.fulfilled,F.rejected)});var n;if(!c){var i=[b6,void 0];for(Array.prototype.unshift.apply(i,a),i=i.concat(s),n=Promise.resolve(r);i.length;)n=n.then(i.shift(),i.shift());return n}for(var u=r;a.length;){var l=a.shift(),x=a.shift();try{u=l(u)}catch(N){x(N);break}}try{n=b6(u)}catch(N){return Promise.reject(N)}for(;s.length;)n=n.then(s.shift(),s.shift());return n};ec.prototype.getUri=function(t){return t=Tf(this.defaults,t),GI(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};m6.forEach(["delete","get","head","options"],function(t){ec.prototype[t]=function(r,o){return this.request(Tf(o||{},{method:t,url:r,data:(o||{}).data}))}});m6.forEach(["post","put","patch"],function(t){ec.prototype[t]=function(r,o,a){return this.request(Tf(a||{},{method:t,url:r,data:o}))}});A6.exports=ec});var C6=R((DY,_6)=>{"use strict";g();y();var HI=Qs();function mi(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(a){t=a});var r=this;this.promise.then(function(o){if(!!r._listeners){var a,c=r._listeners.length;for(a=0;a<c;a++)r._listeners[a](o);r._listeners=null}}),this.promise.then=function(o){var a,c=new Promise(function(s){r.subscribe(s),a=s}).then(o);return c.cancel=function(){r.unsubscribe(a)},c},e(function(a){r.reason||(r.reason=new HI(a),t(r.reason))})}mi.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};mi.prototype.subscribe=function(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]};mi.prototype.unsubscribe=function(t){if(!!this._listeners){var r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}};mi.source=function(){var t,r=new mi(function(a){t=a});return{token:r,cancel:t}};_6.exports=mi});var E6=R((LY,B6)=>{"use strict";g();y();B6.exports=function(t){return function(o){return t.apply(null,o)}}});var T6=R((qY,P6)=>{"use strict";g();y();var $I=xr();P6.exports=function(t){return $I.isObject(t)&&t.isAxiosError===!0}});var I6=R((HY,Qh)=>{"use strict";g();y();var S6=xr(),KI=Rh(),Sf=w6(),ZI=Jh(),JI=Pf();function O6(e){var t=new Sf(e),r=KI(Sf.prototype.request,t);return S6.extend(r,Sf.prototype,t),S6.extend(r,t),r.create=function(a){return O6(ZI(e,a))},r}var To=O6(JI);To.Axios=Sf;To.Cancel=Qs();To.CancelToken=C6();To.isCancel=$h();To.VERSION=Yh().version;To.all=function(t){return Promise.all(t)};To.spread=E6();To.isAxiosError=T6();Qh.exports=To;Qh.exports.default=To});var F6=R((ZY,k6)=>{g();y();k6.exports=I6()});var ve=R((tc,eg)=>{"use strict";g();y();Object.defineProperty(tc,"__esModule",{value:!0});tc.default=YI;function Of(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Of=function(r){return typeof r}:Of=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Of(e)}function YI(e){var t=typeof e=="string"||e instanceof String;if(!t){var r=Of(e);throw e===null?r="null":r==="object"&&(r=e.constructor.name),new TypeError("Expected a string but received a ".concat(r))}}eg.exports=tc.default;eg.exports.default=tc.default});var If=R((rc,tg)=>{"use strict";g();y();Object.defineProperty(rc,"__esModule",{value:!0});rc.default=ek;var XI=QI(ve());function QI(e){return e&&e.__esModule?e:{default:e}}function ek(e){return(0,XI.default)(e),e=Date.parse(e),isNaN(e)?null:new Date(e)}tg.exports=rc.default;tg.exports.default=rc.default});var xi=R(Jt=>{"use strict";g();y();Object.defineProperty(Jt,"__esModule",{value:!0});Jt.commaDecimal=Jt.dotDecimal=Jt.farsiLocales=Jt.arabicLocales=Jt.englishLocales=Jt.decimal=Jt.alphanumeric=Jt.alpha=void 0;var Mr={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[А-Я]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"el-GR":/^[ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψωΆΈΉΊΌΎΏάέήίόύώϊϋΐΰ]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fa-IR":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,"fi-FI":/^[A-ZÅÄÖ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"sl-SI":/^[A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"th-TH":/^[ก-\s]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[АЬЮЯЄIЇҐі]+$/i,"vi-VN":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,"ku-IQ":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i};Jt.alpha=Mr;var Nr={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[0-9А-Я]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"el-GR":/^[0-9ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψωΆΈΉΊΌΎΏάέήίόύώϊϋΐΰ]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fi-FI":/^[0-9A-ZÅÄÖ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"sl-SI":/^[0-9A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[0-9A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๙\s]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9АЬЮЯЄIЇҐі]+$/i,"ku-IQ":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,"vi-VN":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i};Jt.alphanumeric=Nr;var Or={"en-US":".",ar:"\u066B"};Jt.decimal=Or;var rg=["AU","GB","HK","IN","NZ","ZA","ZM"];Jt.englishLocales=rg;for(kf=0;kf<rg.length;kf++)oc="en-".concat(rg[kf]),Mr[oc]=Mr["en-US"],Nr[oc]=Nr["en-US"],Or[oc]=Or["en-US"];var oc,kf,og=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"];Jt.arabicLocales=og;for(Ff=0;Ff<og.length;Ff++)nc="ar-".concat(og[Ff]),Mr[nc]=Mr.ar,Nr[nc]=Nr.ar,Or[nc]=Or.ar;var nc,Ff,ng=["IR","AF"];Jt.farsiLocales=ng;for(Mf=0;Mf<ng.length;Mf++)Rf="fa-".concat(ng[Mf]),Nr[Rf]=Nr.fa,Or[Rf]=Or.ar;var Rf,Mf,ag=["ar-EG","ar-LB","ar-LY"];Jt.dotDecimal=ag;var ig=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","es-ES","fr-CA","fr-FR","id-ID","it-IT","ku-IQ","hi-IN","hu-HU","nb-NO","nn-NO","nl-NL","pl-PL","pt-PT","ru-RU","sl-SI","sr-RS@latin","sr-RS","sv-SE","tr-TR","uk-UA","vi-VN"];Jt.commaDecimal=ig;for(Nf=0;Nf<ag.length;Nf++)Or[ag[Nf]]=Or["en-US"];var Nf;for(Df=0;Df<ig.length;Df++)Or[ig[Df]]=",";var Df;Mr["fr-CA"]=Mr["fr-FR"];Nr["fr-CA"]=Nr["fr-FR"];Mr["pt-BR"]=Mr["pt-PT"];Nr["pt-BR"]=Nr["pt-PT"];Or["pt-BR"]=Or["pt-PT"];Mr["pl-Pl"]=Mr["pl-PL"];Nr["pl-Pl"]=Nr["pl-PL"];Or["pl-Pl"]=Or["pl-PL"];Mr["fa-AF"]=Mr.fa});var sg=R(ac=>{"use strict";g();y();Object.defineProperty(ac,"__esModule",{value:!0});ac.default=ok;ac.locales=void 0;var tk=rk(ve()),R6=xi();function rk(e){return e&&e.__esModule?e:{default:e}}function ok(e,t){(0,tk.default)(e),t=t||{};var r=new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(t.locale?R6.decimal[t.locale]:".","[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$"));if(e===""||e==="."||e==="-"||e==="+")return!1;var o=parseFloat(e.replace(",","."));return r.test(e)&&(!t.hasOwnProperty("min")||o>=t.min)&&(!t.hasOwnProperty("max")||o<=t.max)&&(!t.hasOwnProperty("lt")||o<t.lt)&&(!t.hasOwnProperty("gt")||o>t.gt)}var nk=Object.keys(R6.decimal);ac.locales=nk});var ug=R((ic,cg)=>{"use strict";g();y();Object.defineProperty(ic,"__esModule",{value:!0});ic.default=sk;var ak=ik(sg());function ik(e){return e&&e.__esModule?e:{default:e}}function sk(e){return(0,ak.default)(e)?parseFloat(e):NaN}cg.exports=ic.default;cg.exports.default=ic.default});var M6=R((sc,lg)=>{"use strict";g();y();Object.defineProperty(sc,"__esModule",{value:!0});sc.default=lk;var ck=uk(ve());function uk(e){return e&&e.__esModule?e:{default:e}}function lk(e,t){return(0,ck.default)(e),parseInt(e,t||10)}lg.exports=sc.default;lg.exports.default=sc.default});var N6=R((cc,dg)=>{"use strict";g();y();Object.defineProperty(cc,"__esModule",{value:!0});cc.default=pk;var dk=fk(ve());function fk(e){return e&&e.__esModule?e:{default:e}}function pk(e,t){return(0,dk.default)(e),t?e==="1"||/^true$/i.test(e):e!=="0"&&!/^false$/i.test(e)&&e!==""}dg.exports=cc.default;dg.exports.default=cc.default});var D6=R((uc,fg)=>{"use strict";g();y();Object.defineProperty(uc,"__esModule",{value:!0});uc.default=yk;var hk=gk(ve());function gk(e){return e&&e.__esModule?e:{default:e}}function yk(e,t){return(0,hk.default)(e),e===t}fg.exports=uc.default;fg.exports.default=uc.default});var hg=R((lc,pg)=>{"use strict";g();y();Object.defineProperty(lc,"__esModule",{value:!0});lc.default=vk;function Wf(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wf=function(r){return typeof r}:Wf=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Wf(e)}function vk(e){return Wf(e)==="object"&&e!==null?typeof e.toString=="function"?e=e.toString():e="[object Object]":(e===null||typeof e>"u"||isNaN(e)&&!e.length)&&(e=""),String(e)}pg.exports=lc.default;pg.exports.default=lc.default});var Ir=R((dc,gg)=>{"use strict";g();y();Object.defineProperty(dc,"__esModule",{value:!0});dc.default=bk;function bk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)typeof e[r]>"u"&&(e[r]=t[r]);return e}gg.exports=dc.default;gg.exports.default=dc.default});var U6=R((fc,vg)=>{"use strict";g();y();Object.defineProperty(fc,"__esModule",{value:!0});fc.default=wk;var mk=yg(ve()),W6=yg(hg()),xk=yg(Ir());function yg(e){return e&&e.__esModule?e:{default:e}}var Ak={ignoreCase:!1,minOccurrences:1};function wk(e,t,r){return(0,mk.default)(e),r=(0,xk.default)(r,Ak),r.ignoreCase?e.toLowerCase().split((0,W6.default)(t).toLowerCase()).length>r.minOccurrences:e.split((0,W6.default)(t)).length>r.minOccurrences}vg.exports=fc.default;vg.exports.default=fc.default});var L6=R((pc,bg)=>{"use strict";g();y();Object.defineProperty(pc,"__esModule",{value:!0});pc.default=Bk;var _k=Ck(ve());function Ck(e){return e&&e.__esModule?e:{default:e}}function Bk(e,t,r){return(0,_k.default)(e),Object.prototype.toString.call(t)!=="[object RegExp]"&&(t=new RegExp(t,r)),t.test(e)}bg.exports=pc.default;bg.exports.default=pc.default});var xg=R((hc,mg)=>{"use strict";g();y();Object.defineProperty(hc,"__esModule",{value:!0});hc.default=Tk;var Ek=Pk(ve());function Pk(e){return e&&e.__esModule?e:{default:e}}function Uf(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Uf=function(r){return typeof r}:Uf=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Uf(e)}function Tk(e,t){(0,Ek.default)(e);var r,o;Uf(t)==="object"?(r=t.min||0,o=t.max):(r=arguments[1],o=arguments[2]);var a=encodeURI(e).split(/%..|./).length-1;return a>=r&&(typeof o>"u"||a<=o)}mg.exports=hc.default;mg.exports.default=hc.default});var Lf=R((gc,Ag)=>{"use strict";g();y();Object.defineProperty(gc,"__esModule",{value:!0});gc.default=kk;var Sk=j6(ve()),Ok=j6(Ir());function j6(e){return e&&e.__esModule?e:{default:e}}var Ik={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1};function kk(e,t){(0,Sk.default)(e),t=(0,Ok.default)(t,Ik),t.allow_trailing_dot&&e[e.length-1]==="."&&(e=e.substring(0,e.length-1)),t.allow_wildcard===!0&&e.indexOf("*.")===0&&(e=e.substring(2));var r=e.split("."),o=r[r.length-1];return t.require_tld&&(r.length<2||!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(o)||/\s/.test(o))||!t.allow_numeric_tld&&/^\d+$/.test(o)?!1:r.every(function(a){return!(a.length>63||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(a)||/[\uff01-\uff5e]/.test(a)||/^-|-$/.test(a)||!t.allow_underscores&&/_/.test(a))})}Ag.exports=gc.default;Ag.exports.default=gc.default});var vc=R((yc,_g)=>{"use strict";g();y();Object.defineProperty(yc,"__esModule",{value:!0});yc.default=wg;var Fk=Rk(ve());function Rk(e){return e&&e.__esModule?e:{default:e}}var z6="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",Sn="(".concat(z6,"[.]){3}").concat(z6),Mk=new RegExp("^".concat(Sn,"$")),Wt="(?:[0-9a-fA-F]{1,4})",Nk=new RegExp("^("+"(?:".concat(Wt,":){7}(?:").concat(Wt,"|:)|")+"(?:".concat(Wt,":){6}(?:").concat(Sn,"|:").concat(Wt,"|:)|")+"(?:".concat(Wt,":){5}(?::").concat(Sn,"|(:").concat(Wt,"){1,2}|:)|")+"(?:".concat(Wt,":){4}(?:(:").concat(Wt,"){0,1}:").concat(Sn,"|(:").concat(Wt,"){1,3}|:)|")+"(?:".concat(Wt,":){3}(?:(:").concat(Wt,"){0,2}:").concat(Sn,"|(:").concat(Wt,"){1,4}|:)|")+"(?:".concat(Wt,":){2}(?:(:").concat(Wt,"){0,3}:").concat(Sn,"|(:").concat(Wt,"){1,5}|:)|")+"(?:".concat(Wt,":){1}(?:(:").concat(Wt,"){0,4}:").concat(Sn,"|(:").concat(Wt,"){1,6}|:)|")+"(?::((?::".concat(Wt,"){0,5}:").concat(Sn,"|(?::").concat(Wt,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function wg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if((0,Fk.default)(e),t=String(t),!t)return wg(e,4)||wg(e,6);if(t==="4"){if(!Mk.test(e))return!1;var r=e.split(".").sort(function(o,a){return o-a});return r[3]<=255}return t==="6"?!!Nk.test(e):!1}_g.exports=yc.default;_g.exports.default=yc.default});var V6=R((mc,Bg)=>{"use strict";g();y();Object.defineProperty(mc,"__esModule",{value:!0});mc.default=Zk;var Dk=bc(ve()),Wk=bc(Ir()),Cg=bc(xg()),Uk=bc(Lf()),q6=bc(vc());function bc(e){return e&&e.__esModule?e:{default:e}}var Lk={allow_display_name:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[]},jk=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,zk=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,qk=/^[a-z\d]+$/,Vk=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,Gk=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,Hk=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,$k=254;function Kk(e){var t=e.replace(/^"(.+)"$/,"$1");if(!t.trim())return!1;var r=/[\.";<>]/.test(t);if(r){if(t===e)return!1;var o=t.split('"').length===t.split('\\"').length;if(!o)return!1}return!0}function Zk(e,t){if((0,Dk.default)(e),t=(0,Wk.default)(t,Lk),t.require_display_name||t.allow_display_name){var r=e.match(jk);if(r){var o=r[1];if(e=e.replace(o,"").replace(/(^<|>$)/g,""),o.endsWith(" ")&&(o=o.substr(0,o.length-1)),!Kk(o))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>$k)return!1;var a=e.split("@"),c=a.pop(),s=c.toLowerCase();if(t.host_blacklist.includes(s))return!1;var n=a.join("@");if(t.domain_specific_validation&&(s==="gmail.com"||s==="googlemail.com")){n=n.toLowerCase();var i=n.split("+")[0];if(!(0,Cg.default)(i.replace(/\./g,""),{min:6,max:30}))return!1;for(var u=i.split("."),l=0;l<u.length;l++)if(!qk.test(u[l]))return!1}if(t.ignore_max_length===!1&&(!(0,Cg.default)(n,{max:64})||!(0,Cg.default)(c,{max:254})))return!1;if(!(0,Uk.default)(c,{require_tld:t.require_tld})){if(!t.allow_ip_domain)return!1;if(!(0,q6.default)(c)){if(!c.startsWith("[")||!c.endsWith("]"))return!1;var x=c.substr(1,c.length-2);if(x.length===0||!(0,q6.default)(x))return!1}}if(n[0]==='"')return n=n.slice(1,n.length-1),t.allow_utf8_local_part?Hk.test(n):Vk.test(n);for(var N=t.allow_utf8_local_part?Gk:zk,F=n.split("."),G=0;G<F.length;G++)if(!N.test(F[G]))return!1;return!(t.blacklisted_chars&&n.search(new RegExp("[".concat(t.blacklisted_chars,"]+"),"g"))!==-1)}Bg.exports=mc.default;Bg.exports.default=mc.default});var K6=R((xc,Eg)=>{"use strict";g();y();Object.defineProperty(xc,"__esModule",{value:!0});xc.default=sF;var Jk=jf(ve()),Yk=jf(Lf()),G6=jf(vc()),Xk=jf(Ir());function jf(e){return e&&e.__esModule?e:{default:e}}function Qk(e,t){return oF(e)||rF(e,t)||tF(e,t)||eF()}function eF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tF(e,t){if(!!e){if(typeof e=="string")return H6(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return H6(e,t)}}function H6(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function rF(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],o=!0,a=!1,c=void 0;try{for(var s=e[Symbol.iterator](),n;!(o=(n=s.next()).done)&&(r.push(n.value),!(t&&r.length===t));o=!0);}catch(i){a=!0,c=i}finally{try{!o&&s.return!=null&&s.return()}finally{if(a)throw c}}return r}}function oF(e){if(Array.isArray(e))return e}var nF={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},aF=/^\[([^\]]+)\](?::([0-9]+))?$/;function iF(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function $6(e,t){for(var r=0;r<t.length;r++){var o=t[r];if(e===o||iF(o)&&o.test(e))return!0}return!1}function sF(e,t){if((0,Jk.default)(e),!e||/[\s<>]/.test(e)||e.indexOf("mailto:")===0||(t=(0,Xk.default)(t,nF),t.validate_length&&e.length>=2083)||!t.allow_fragments&&e.includes("#")||!t.allow_query_components&&(e.includes("?")||e.includes("&")))return!1;var r,o,a,c,s,n,i,u;if(i=e.split("#"),e=i.shift(),i=e.split("?"),e=i.shift(),i=e.split("://"),i.length>1){if(r=i.shift().toLowerCase(),t.require_valid_protocol&&t.protocols.indexOf(r)===-1)return!1}else{if(t.require_protocol)return!1;if(e.substr(0,2)==="//"){if(!t.allow_protocol_relative_urls)return!1;i[0]=e.substr(2)}}if(e=i.join("://"),e==="")return!1;if(i=e.split("/"),e=i.shift(),e===""&&!t.require_host)return!0;if(i=e.split("@"),i.length>1){if(t.disallow_auth||i[0]===""||(o=i.shift(),o.indexOf(":")>=0&&o.split(":").length>2))return!1;var l=o.split(":"),x=Qk(l,2),N=x[0],F=x[1];if(N===""&&F==="")return!1}c=i.join("@"),n=null,u=null;var G=c.match(aF);if(G?(a="",u=G[1],n=G[2]||null):(i=c.split(":"),a=i.shift(),i.length&&(n=i.join(":"))),n!==null&&n.length>0){if(s=parseInt(n,10),!/^[0-9]+$/.test(n)||s<=0||s>65535)return!1}else if(t.require_port)return!1;return t.host_whitelist?$6(a,t.host_whitelist):!(!(0,G6.default)(a)&&!(0,Yk.default)(a,t)&&(!u||!(0,G6.default)(u,6))||(a=a||u,t.host_blacklist&&$6(a,t.host_blacklist)))}Eg.exports=xc.default;Eg.exports.default=xc.default});var Z6=R((Ac,Pg)=>{"use strict";g();y();Object.defineProperty(Ac,"__esModule",{value:!0});Ac.default=pF;var cF=uF(ve());function uF(e){return e&&e.__esModule?e:{default:e}}var lF=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/,dF=/^([0-9a-fA-F]){12}$/,fF=/^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/;function pF(e,t){return(0,cF.default)(e),t&&(t.no_colons||t.no_separators)?dF.test(e):lF.test(e)||fF.test(e)}Pg.exports=Ac.default;Pg.exports.default=Ac.default});var eA=R((wc,Tg)=>{"use strict";g();y();Object.defineProperty(wc,"__esModule",{value:!0});wc.default=yF;var hF=Q6(ve()),J6=Q6(vc());function Q6(e){return e&&e.__esModule?e:{default:e}}var gF=/^\d{1,3}$/,Y6=32,X6=128;function yF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(0,hF.default)(e);var r=e.split("/");if(r.length!==2||!gF.test(r[1])||r[1].length>1&&r[1].startsWith("0"))return!1;var o=(0,J6.default)(r[0],t);if(!o)return!1;var a=null;switch(String(t)){case"4":a=Y6;break;case"6":a=X6;break;default:a=(0,J6.default)(r[0],"6")?X6:Y6}return r[1]<=a&&r[1]>=0}Tg.exports=wc.default;Tg.exports.default=wc.default});var Og=R((_c,Sg)=>{"use strict";g();y();Object.defineProperty(_c,"__esModule",{value:!0});_c.default=BF;var tA=vF(Ir());function vF(e){return e&&e.__esModule?e:{default:e}}function bF(e,t){return AF(e)||xF(e,t)||nA(e,t)||mF()}function mF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xF(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],o=!0,a=!1,c=void 0;try{for(var s=e[Symbol.iterator](),n;!(o=(n=s.next()).done)&&(r.push(n.value),!(t&&r.length===t));o=!0);}catch(i){a=!0,c=i}finally{try{!o&&s.return!=null&&s.return()}finally{if(a)throw c}}return r}}function AF(e){if(Array.isArray(e))return e}function wF(e,t){var r;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(r=nA(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(u){throw u},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c=!0,s=!1,n;return{s:function(){r=e[Symbol.iterator]()},n:function(){var u=r.next();return c=u.done,u},e:function(u){s=!0,n=u},f:function(){try{!c&&r.return!=null&&r.return()}finally{if(s)throw n}}}}function nA(e,t){if(!!e){if(typeof e=="string")return rA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rA(e,t)}}function rA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var oA={format:"YYYY/MM/DD",delimiters:["/","-"],strictMode:!1};function _F(e){return/(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(e)}function CF(e,t){for(var r=[],o=Math.min(e.length,t.length),a=0;a<o;a++)r.push([e[a],t[a]]);return r}function BF(e,t){if(typeof t=="string"?t=(0,tA.default)({format:t},oA):t=(0,tA.default)(t,oA),typeof e=="string"&&_F(t.format)){var r=t.delimiters.find(function(x){return t.format.indexOf(x)!==-1}),o=t.strictMode?r:t.delimiters.find(function(x){return e.indexOf(x)!==-1}),a=CF(e.split(o),t.format.toLowerCase().split(r)),c={},s=wF(a),n;try{for(s.s();!(n=s.n()).done;){var i=bF(n.value,2),u=i[0],l=i[1];if(u.length!==l.length)return!1;c[l.charAt(0)]=u}}catch(x){s.e(x)}finally{s.f()}return new Date("".concat(c.m,"/").concat(c.d,"/").concat(c.y)).getDate()===+c.d}return t.strictMode?!1:Object.prototype.toString.call(e)==="[object Date]"&&isFinite(e)}Sg.exports=_c.default;Sg.exports.default=_c.default});var iA=R((Cc,Ig)=>{"use strict";g();y();Object.defineProperty(Cc,"__esModule",{value:!0});Cc.default=OF;var EF=PF(ve());function PF(e){return e&&e.__esModule?e:{default:e}}var TF={loose:!1},aA=["true","false","1","0"],SF=[].concat(aA,["yes","no"]);function OF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:TF;return(0,EF.default)(e),t.loose?SF.includes(e.toLowerCase()):aA.includes(e)}Ig.exports=Cc.default;Ig.exports.default=Cc.default});var sA=R((Bc,kg)=>{"use strict";g();y();Object.defineProperty(Bc,"__esModule",{value:!0});Bc.default=RF;var IF=kF(ve());function kF(e){return e&&e.__esModule?e:{default:e}}var FF=/^[A-Za-z]{2,4}([_-]([A-Za-z]{4}|[\d]{3}))?([_-]([A-Za-z]{2}|[\d]{3}))?$/;function RF(e){return(0,IF.default)(e),e==="en_US_POSIX"||e==="ca_ES_VALENCIA"?!0:FF.test(e)}kg.exports=Bc.default;kg.exports.default=Bc.default});var cA=R(Ec=>{"use strict";g();y();Object.defineProperty(Ec,"__esModule",{value:!0});Ec.default=DF;Ec.locales=void 0;var MF=NF(ve()),Fg=xi();function NF(e){return e&&e.__esModule?e:{default:e}}function DF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,MF.default)(e);var o=e,a=r.ignore;if(a)if(a instanceof RegExp)o=o.replace(a,"");else if(typeof a=="string")o=o.replace(new RegExp("[".concat(a.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(t in Fg.alpha)return Fg.alpha[t].test(o);throw new Error("Invalid locale '".concat(t,"'"))}var WF=Object.keys(Fg.alpha);Ec.locales=WF});var uA=R(Pc=>{"use strict";g();y();Object.defineProperty(Pc,"__esModule",{value:!0});Pc.default=jF;Pc.locales=void 0;var UF=LF(ve()),Rg=xi();function LF(e){return e&&e.__esModule?e:{default:e}}function jF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,UF.default)(e);var o=e,a=r.ignore;if(a)if(a instanceof RegExp)o=o.replace(a,"");else if(typeof a=="string")o=o.replace(new RegExp("[".concat(a.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(t in Rg.alphanumeric)return Rg.alphanumeric[t].test(o);throw new Error("Invalid locale '".concat(t,"'"))}var zF=Object.keys(Rg.alphanumeric);Pc.locales=zF});var lA=R((Tc,Mg)=>{"use strict";g();y();Object.defineProperty(Tc,"__esModule",{value:!0});Tc.default=$F;var qF=GF(ve()),VF=xi();function GF(e){return e&&e.__esModule?e:{default:e}}var HF=/^[0-9]+$/;function $F(e,t){return(0,qF.default)(e),t&&t.no_symbols?HF.test(e):new RegExp("^[+-]?([0-9]*[".concat((t||{}).locale?VF.decimal[t.locale]:".","])?[0-9]+$")).test(e)}Mg.exports=Tc.default;Mg.exports.default=Tc.default});var fA=R((Sc,Ng)=>{"use strict";g();y();Object.defineProperty(Sc,"__esModule",{value:!0});Sc.default=JF;var KF=ZF(ve());function ZF(e){return e&&e.__esModule?e:{default:e}}var dA={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$/};function JF(e,t){(0,KF.default)(e);var r=e.replace(/\s/g,"").toUpperCase();return t.toUpperCase()in dA&&dA[t].test(r)}Ng.exports=Sc.default;Ng.exports.default=Sc.default});var zf=R((Oc,Dg)=>{"use strict";g();y();Object.defineProperty(Oc,"__esModule",{value:!0});Oc.default=tR;var YF=XF(ve());function XF(e){return e&&e.__esModule?e:{default:e}}var QF=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,eR=/^[-+]?[0-9]+$/;function tR(e,t){(0,YF.default)(e),t=t||{};var r=t.hasOwnProperty("allow_leading_zeroes")&&!t.allow_leading_zeroes?QF:eR,o=!t.hasOwnProperty("min")||e>=t.min,a=!t.hasOwnProperty("max")||e<=t.max,c=!t.hasOwnProperty("lt")||e<t.lt,s=!t.hasOwnProperty("gt")||e>t.gt;return r.test(e)&&o&&a&&c&&s}Dg.exports=Oc.default;Dg.exports.default=Oc.default});var pA=R((Ic,Wg)=>{"use strict";g();y();Object.defineProperty(Ic,"__esModule",{value:!0});Ic.default=nR;var rR=oR(zf());function oR(e){return e&&e.__esModule?e:{default:e}}function nR(e){return(0,rR.default)(e,{min:0,max:65535})}Wg.exports=Ic.default;Wg.exports.default=Ic.default});var hA=R((kc,Ug)=>{"use strict";g();y();Object.defineProperty(kc,"__esModule",{value:!0});kc.default=sR;var aR=iR(ve());function iR(e){return e&&e.__esModule?e:{default:e}}function sR(e){return(0,aR.default)(e),e===e.toLowerCase()}Ug.exports=kc.default;Ug.exports.default=kc.default});var gA=R((Fc,Lg)=>{"use strict";g();y();Object.defineProperty(Fc,"__esModule",{value:!0});Fc.default=lR;var cR=uR(ve());function uR(e){return e&&e.__esModule?e:{default:e}}function lR(e){return(0,cR.default)(e),e===e.toUpperCase()}Lg.exports=Fc.default;Lg.exports.default=Fc.default});var yA=R((Rc,jg)=>{"use strict";g();y();Object.defineProperty(Rc,"__esModule",{value:!0});Rc.default=gR;var dR=fR(ve());function fR(e){return e&&e.__esModule?e:{default:e}}var pR=/^[0-9]{15}$/,hR=/^\d{2}-\d{6}-\d{6}-\d{1}$/;function gR(e,t){(0,dR.default)(e),t=t||{};var r=pR;if(t.allow_hyphens&&(r=hR),!r.test(e))return!1;e=e.replace(/-/g,"");for(var o=0,a=2,c=14,s=0;s<c;s++){var n=e.substring(c-s-1,c-s),i=parseInt(n,10)*a;i>=10?o+=i%10+1:o+=i,a===1?a+=1:a-=1}var u=(10-o%10)%10;return u===parseInt(e.substring(14,15),10)}jg.exports=Rc.default;jg.exports.default=Rc.default});var vA=R((Mc,zg)=>{"use strict";g();y();Object.defineProperty(Mc,"__esModule",{value:!0});Mc.default=mR;var yR=vR(ve());function vR(e){return e&&e.__esModule?e:{default:e}}var bR=/^[\x00-\x7F]+$/;function mR(e){return(0,yR.default)(e),bR.test(e)}zg.exports=Mc.default;zg.exports.default=Mc.default});var qg=R(Nc=>{"use strict";g();y();Object.defineProperty(Nc,"__esModule",{value:!0});Nc.default=wR;Nc.fullWidth=void 0;var xR=AR(ve());function AR(e){return e&&e.__esModule?e:{default:e}}var bA=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;Nc.fullWidth=bA;function wR(e){return(0,xR.default)(e),bA.test(e)}});var Vg=R(Dc=>{"use strict";g();y();Object.defineProperty(Dc,"__esModule",{value:!0});Dc.default=BR;Dc.halfWidth=void 0;var _R=CR(ve());function CR(e){return e&&e.__esModule?e:{default:e}}var mA=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;Dc.halfWidth=mA;function BR(e){return(0,_R.default)(e),mA.test(e)}});var xA=R((Wc,Gg)=>{"use strict";g();y();Object.defineProperty(Wc,"__esModule",{value:!0});Wc.default=OR;var ER=SR(ve()),PR=qg(),TR=Vg();function SR(e){return e&&e.__esModule?e:{default:e}}function OR(e){return(0,ER.default)(e),PR.fullWidth.test(e)&&TR.halfWidth.test(e)}Gg.exports=Wc.default;Gg.exports.default=Wc.default});var AA=R((Uc,Hg)=>{"use strict";g();y();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.default=RR;var IR=kR(ve());function kR(e){return e&&e.__esModule?e:{default:e}}var FR=/[^\x00-\x7F]/;function RR(e){return(0,IR.default)(e),FR.test(e)}Hg.exports=Uc.default;Hg.exports.default=Uc.default});var wA=R((Lc,$g)=>{"use strict";g();y();Object.defineProperty(Lc,"__esModule",{value:!0});Lc.default=MR;function MR(e,t){var r=e.join("");return new RegExp(r,t)}$g.exports=Lc.default;$g.exports.default=Lc.default});var CA=R((jc,Kg)=>{"use strict";g();y();Object.defineProperty(jc,"__esModule",{value:!0});jc.default=UR;var NR=_A(ve()),DR=_A(wA());function _A(e){return e&&e.__esModule?e:{default:e}}var WR=(0,DR.default)(["^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)","(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))","?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$"],"i");function UR(e){return(0,NR.default)(e),WR.test(e)}Kg.exports=jc.default;Kg.exports.default=jc.default});var BA=R((zc,Zg)=>{"use strict";g();y();Object.defineProperty(zc,"__esModule",{value:!0});zc.default=qR;var LR=jR(ve());function jR(e){return e&&e.__esModule?e:{default:e}}var zR=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;function qR(e){return(0,LR.default)(e),zR.test(e)}Zg.exports=zc.default;Zg.exports.default=zc.default});var EA=R((Ai,Jg)=>{"use strict";g();y();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.default=void 0;var VR=function(t,r){return t.some(function(o){return r===o})},GR=VR;Ai.default=GR;Jg.exports=Ai.default;Jg.exports.default=Ai.default});var TA=R((qc,Xg)=>{"use strict";g();y();Object.defineProperty(qc,"__esModule",{value:!0});qc.default=XR;var HR=Yg(Ir()),$R=Yg(ve()),KR=Yg(EA()),PA=xi();function Yg(e){return e&&e.__esModule?e:{default:e}}function ZR(e){var t=new RegExp("^[-+]?([0-9]+)?(\\".concat(PA.decimal[e.locale],"[0-9]{").concat(e.decimal_digits,"})").concat(e.force_decimal?"":"?","$"));return t}var JR={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},YR=["","-","+"];function XR(e,t){if((0,$R.default)(e),t=(0,HR.default)(t,JR),t.locale in PA.decimal)return!(0,KR.default)(YR,e.replace(/ /g,""))&&ZR(t).test(e);throw new Error("Invalid locale '".concat(t.locale,"'"))}Xg.exports=qc.default;Xg.exports.default=qc.default});var ey=R((Vc,Qg)=>{"use strict";g();y();Object.defineProperty(Vc,"__esModule",{value:!0});Vc.default=rM;var QR=eM(ve());function eM(e){return e&&e.__esModule?e:{default:e}}var tM=/^(0x|0h)?[0-9A-F]+$/i;function rM(e){return(0,QR.default)(e),tM.test(e)}Qg.exports=Vc.default;Qg.exports.default=Vc.default});var SA=R((Gc,ty)=>{"use strict";g();y();Object.defineProperty(Gc,"__esModule",{value:!0});Gc.default=iM;var oM=nM(ve());function nM(e){return e&&e.__esModule?e:{default:e}}var aM=/^(0o)?[0-7]+$/i;function iM(e){return(0,oM.default)(e),aM.test(e)}ty.exports=Gc.default;ty.exports.default=Gc.default});var IA=R((Hc,ry)=>{"use strict";g();y();Object.defineProperty(Hc,"__esModule",{value:!0});Hc.default=uM;var sM=OA(ve()),cM=OA(ug());function OA(e){return e&&e.__esModule?e:{default:e}}function uM(e,t){return(0,sM.default)(e),(0,cM.default)(e)%parseInt(t,10)===0}ry.exports=Hc.default;ry.exports.default=Hc.default});var kA=R(($c,oy)=>{"use strict";g();y();Object.defineProperty($c,"__esModule",{value:!0});$c.default=pM;var lM=dM(ve());function dM(e){return e&&e.__esModule?e:{default:e}}var fM=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;function pM(e){return(0,lM.default)(e),fM.test(e)}oy.exports=$c.default;oy.exports.default=$c.default});var MA=R((Kc,ny)=>{"use strict";g();y();Object.defineProperty(Kc,"__esModule",{value:!0});Kc.default=bM;var hM=gM(ve());function gM(e){return e&&e.__esModule?e:{default:e}}var FA=/^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/,RA=/^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/,yM=/^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)/,vM=/^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)/;function bM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,hM.default)(e),t?FA.test(e)||RA.test(e)||yM.test(e)||vM.test(e):FA.test(e)||RA.test(e)}ny.exports=Kc.default;ny.exports.default=Kc.default});var NA=R((Zc,ay)=>{"use strict";g();y();Object.defineProperty(Zc,"__esModule",{value:!0});Zc.default=_M;var mM=xM(ve());function xM(e){return e&&e.__esModule?e:{default:e}}var AM=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i,wM=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i;function _M(e){(0,mM.default)(e);var t=e.replace(/\s+/g," ").replace(/\s?(hsla?\(|\)|,)\s?/ig,"$1");return t.indexOf(",")!==-1?AM.test(t):wM.test(t)}ay.exports=Zc.default;ay.exports.default=Zc.default});var DA=R((Jc,iy)=>{"use strict";g();y();Object.defineProperty(Jc,"__esModule",{value:!0});Jc.default=PM;var CM=BM(ve());function BM(e){return e&&e.__esModule?e:{default:e}}var EM=/^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;function PM(e){return(0,CM.default)(e),EM.test(e)}iy.exports=Jc.default;iy.exports.default=Jc.default});var WA=R(Yc=>{"use strict";g();y();Object.defineProperty(Yc,"__esModule",{value:!0});Yc.default=kM;Yc.locales=void 0;var TM=SM(ve());function SM(e){return e&&e.__esModule?e:{default:e}}var sy={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};function OM(e){var t=e.replace(/[\s\-]+/gi,"").toUpperCase(),r=t.slice(0,2).toUpperCase();return r in sy&&sy[r].test(t)}function IM(e){var t=e.replace(/[^A-Z0-9]+/gi,"").toUpperCase(),r=t.slice(4)+t.slice(0,4),o=r.replace(/[A-Z]/g,function(c){return c.charCodeAt(0)-55}),a=o.match(/\d{1,7}/g).reduce(function(c,s){return Number(c+s)%97},"");return a===1}function kM(e){return(0,TM.default)(e),OM(e)&&IM(e)}var FM=Object.keys(sy);Yc.locales=FM});var cy=R(Xc=>{"use strict";g();y();Object.defineProperty(Xc,"__esModule",{value:!0});Xc.default=NM;Xc.CountryCodes=void 0;var RM=MM(ve());function MM(e){return e&&e.__esModule?e:{default:e}}var UA=new Set(["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]);function NM(e){return(0,RM.default)(e),UA.has(e.toUpperCase())}var DM=UA;Xc.CountryCodes=DM});var LA=R((Qc,uy)=>{"use strict";g();y();Object.defineProperty(Qc,"__esModule",{value:!0});Qc.default=zM;var WM=LM(ve()),UM=cy();function LM(e){return e&&e.__esModule?e:{default:e}}var jM=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;function zM(e){return(0,WM.default)(e),UM.CountryCodes.has(e.slice(4,6).toUpperCase())?jM.test(e):!1}uy.exports=Qc.default;uy.exports.default=Qc.default});var jA=R((eu,ly)=>{"use strict";g();y();Object.defineProperty(eu,"__esModule",{value:!0});eu.default=HM;var qM=VM(ve());function VM(e){return e&&e.__esModule?e:{default:e}}var GM=/^[a-f0-9]{32}$/;function HM(e){return(0,qM.default)(e),GM.test(e)}ly.exports=eu.default;ly.exports.default=eu.default});var zA=R((tu,dy)=>{"use strict";g();y();Object.defineProperty(tu,"__esModule",{value:!0});tu.default=JM;var $M=KM(ve());function KM(e){return e&&e.__esModule?e:{default:e}}var ZM={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};function JM(e,t){(0,$M.default)(e);var r=new RegExp("^[a-fA-F0-9]{".concat(ZM[t],"}$"));return r.test(e)}dy.exports=tu.default;dy.exports.default=tu.default});var py=R((ru,fy)=>{"use strict";g();y();Object.defineProperty(ru,"__esModule",{value:!0});ru.default=rN;var YM=qA(ve()),XM=qA(Ir());function qA(e){return e&&e.__esModule?e:{default:e}}var QM=/[^A-Z0-9+\/=]/i,eN=/^[A-Z0-9_\-]*$/i,tN={urlSafe:!1};function rN(e,t){(0,YM.default)(e),t=(0,XM.default)(t,tN);var r=e.length;if(t.urlSafe)return eN.test(e);if(r%4!==0||QM.test(e))return!1;var o=e.indexOf("=");return o===-1||o===r-1||o===r-2&&e[r-1]==="="}fy.exports=ru.default;fy.exports.default=ru.default});var GA=R((ou,hy)=>{"use strict";g();y();Object.defineProperty(ou,"__esModule",{value:!0});ou.default=aN;var oN=VA(ve()),nN=VA(py());function VA(e){return e&&e.__esModule?e:{default:e}}function aN(e){(0,oN.default)(e);var t=e.split("."),r=t.length;return r>3||r<2?!1:t.reduce(function(o,a){return o&&(0,nN.default)(a,{urlSafe:!0})},!0)}hy.exports=ou.default;hy.exports.default=ou.default});var $A=R((nu,gy)=>{"use strict";g();y();Object.defineProperty(nu,"__esModule",{value:!0});nu.default=uN;var iN=HA(ve()),sN=HA(Ir());function HA(e){return e&&e.__esModule?e:{default:e}}function qf(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qf=function(r){return typeof r}:qf=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qf(e)}var cN={allow_primitives:!1};function uN(e,t){(0,iN.default)(e);try{t=(0,sN.default)(t,cN);var r=[];t.allow_primitives&&(r=[null,!1,!0]);var o=JSON.parse(e);return r.includes(o)||!!o&&qf(o)==="object"}catch{}return!1}gy.exports=nu.default;gy.exports.default=nu.default});var ZA=R((au,yy)=>{"use strict";g();y();Object.defineProperty(au,"__esModule",{value:!0});au.default=pN;var lN=KA(ve()),dN=KA(Ir());function KA(e){return e&&e.__esModule?e:{default:e}}var fN={ignore_whitespace:!1};function pN(e,t){return(0,lN.default)(e),t=(0,dN.default)(t,fN),(t.ignore_whitespace?e.trim().length:e.length)===0}yy.exports=au.default;yy.exports.default=au.default});var JA=R((iu,vy)=>{"use strict";g();y();Object.defineProperty(iu,"__esModule",{value:!0});iu.default=yN;var hN=gN(ve());function gN(e){return e&&e.__esModule?e:{default:e}}function Vf(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vf=function(r){return typeof r}:Vf=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Vf(e)}function yN(e,t){(0,hN.default)(e);var r,o;Vf(t)==="object"?(r=t.min||0,o=t.max):(r=arguments[1]||0,o=arguments[2]);var a=e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],c=e.length-a.length;return c>=r&&(typeof o>"u"||c<=o)}vy.exports=iu.default;vy.exports.default=iu.default});var YA=R((su,by)=>{"use strict";g();y();Object.defineProperty(su,"__esModule",{value:!0});su.default=xN;var vN=bN(ve());function bN(e){return e&&e.__esModule?e:{default:e}}var mN={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function xN(e,t){(0,vN.default)(e);var r=mN[[void 0,null].includes(t)?"all":t];return!!r&&r.test(e)}by.exports=su.default;by.exports.default=su.default});var QA=R((cu,my)=>{"use strict";g();y();Object.defineProperty(cu,"__esModule",{value:!0});cu.default=_N;var AN=XA(ve()),wN=XA(ey());function XA(e){return e&&e.__esModule?e:{default:e}}function _N(e){return(0,AN.default)(e),(0,wN.default)(e)&&e.length===24}my.exports=cu.default;my.exports.default=cu.default});var rw=R((uu,xy)=>{"use strict";g();y();Object.defineProperty(uu,"__esModule",{value:!0});uu.default=BN;var CN=tw(ve()),ew=tw(If());function tw(e){return e&&e.__esModule?e:{default:e}}function BN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:String(new Date);(0,CN.default)(e);var r=(0,ew.default)(t),o=(0,ew.default)(e);return!!(o&&r&&o>r)}xy.exports=uu.default;xy.exports.default=uu.default});var aw=R((lu,Ay)=>{"use strict";g();y();Object.defineProperty(lu,"__esModule",{value:!0});lu.default=PN;var EN=nw(ve()),ow=nw(If());function nw(e){return e&&e.__esModule?e:{default:e}}function PN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:String(new Date);(0,EN.default)(e);var r=(0,ow.default)(t),o=(0,ow.default)(e);return!!(o&&r&&o<r)}Ay.exports=lu.default;Ay.exports.default=lu.default});var sw=R((du,wy)=>{"use strict";g();y();Object.defineProperty(du,"__esModule",{value:!0});du.default=ON;var TN=iw(ve()),SN=iw(hg());function iw(e){return e&&e.__esModule?e:{default:e}}function Gf(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gf=function(r){return typeof r}:Gf=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Gf(e)}function ON(e,t){(0,TN.default)(e);var r;if(Object.prototype.toString.call(t)==="[object Array]"){var o=[];for(r in t)({}).hasOwnProperty.call(t,r)&&(o[r]=(0,SN.default)(t[r]));return o.indexOf(e)>=0}else{if(Gf(t)==="object")return t.hasOwnProperty(e);if(t&&typeof t.indexOf=="function")return t.indexOf(e)>=0}return!1}wy.exports=du.default;wy.exports.default=du.default});var cw=R((fu,_y)=>{"use strict";g();y();Object.defineProperty(fu,"__esModule",{value:!0});fu.default=RN;var IN=kN(ve());function kN(e){return e&&e.__esModule?e:{default:e}}var FN=/^(?:4[0-9]{12}(?:[0-9]{3,6})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12,15}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14}|^(81[0-9]{14,17}))$/;function RN(e){(0,IN.default)(e);var t=e.replace(/[- ]+/g,"");if(!FN.test(t))return!1;for(var r=0,o,a,c,s=t.length-1;s>=0;s--)o=t.substring(s,s+1),a=parseInt(o,10),c?(a*=2,a>=10?r+=a%10+1:r+=a):r+=a,c=!c;return!!(r%10===0&&t)}_y.exports=fu.default;_y.exports.default=fu.default});var lw=R((hu,Cy)=>{"use strict";g();y();Object.defineProperty(hu,"__esModule",{value:!0});hu.default=NN;var Hf=uw(ve()),MN=uw(zf());function uw(e){return e&&e.__esModule?e:{default:e}}var pu={PL:function(t){(0,Hf.default)(t);var r={1:1,2:3,3:7,4:9,5:1,6:3,7:7,8:9,9:1,10:3,11:0};if(t!=null&&t.length===11&&(0,MN.default)(t,{allow_leading_zeroes:!0})){var o=t.split("").slice(0,-1),a=o.reduce(function(n,i,u){return n+Number(i)*r[u+1]},0),c=a%10,s=Number(t.charAt(t.length-1));if(c===0&&s===0||s===10-c)return!0}return!1},ES:function(t){(0,Hf.default)(t);var r=/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/,o={X:0,Y:1,Z:2},a=["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"],c=t.trim().toUpperCase();if(!r.test(c))return!1;var s=c.slice(0,-1).replace(/[X,Y,Z]/g,function(n){return o[n]});return c.endsWith(a[s%23])},FI:function(t){if((0,Hf.default)(t),t.length!==11||!t.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/))return!1;var r="0123456789ABCDEFHJKLMNPRSTUVWXY",o=parseInt(t.slice(0,6),10)*1e3+parseInt(t.slice(7,10),10),a=o%31,c=r[a];return c===t.slice(10,11)},IN:function(t){var r=/^[1-9]\d{3}\s?\d{4}\s?\d{4}$/,o=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],a=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],c=t.trim();if(!r.test(c))return!1;var s=0,n=c.replace(/\s/g,"").split("").map(Number).reverse();return n.forEach(function(i,u){s=o[s][a[u%8][i]]}),s===0},IR:function(t){if(!t.match(/^\d{10}$/)||(t="0000".concat(t).substr(t.length-6),parseInt(t.substr(3,6),10)===0))return!1;for(var r=parseInt(t.substr(9,1),10),o=0,a=0;a<9;a++)o+=parseInt(t.substr(a,1),10)*(10-a);return o%=11,o<2&&r===o||o>=2&&r===11-o},IT:function(t){return t.length!==9||t==="CA00000AA"?!1:t.search(/C[A-Z][0-9]{5}[A-Z]{2}/i)>-1},NO:function(t){var r=t.trim();if(isNaN(Number(r))||r.length!==11||r==="00000000000")return!1;var o=r.split("").map(Number),a=(11-(3*o[0]+7*o[1]+6*o[2]+1*o[3]+8*o[4]+9*o[5]+4*o[6]+5*o[7]+2*o[8])%11)%11,c=(11-(5*o[0]+4*o[1]+3*o[2]+2*o[3]+7*o[4]+6*o[5]+5*o[6]+4*o[7]+3*o[8]+2*a)%11)%11;return!(a!==o[9]||c!==o[10])},TH:function(t){if(!t.match(/^[1-8]\d{12}$/))return!1;for(var r=0,o=0;o<12;o++)r+=parseInt(t[o],10)*(13-o);return t[12]===((11-r%11)%10).toString()},LK:function(t){var r=/^[1-9]\d{8}[vx]$/i,o=/^[1-9]\d{11}$/i;return t.length===10&&r.test(t)?!0:!!(t.length===12&&o.test(t))},"he-IL":function(t){var r=/^\d{9}$/,o=t.trim();if(!r.test(o))return!1;for(var a=o,c=0,s,n=0;n<a.length;n++)s=Number(a[n])*(n%2+1),c+=s>9?s-9:s;return c%10===0},"ar-LY":function(t){var r=/^(1|2)\d{11}$/,o=t.trim();return!!r.test(o)},"ar-TN":function(t){var r=/^\d{8}$/,o=t.trim();return!!r.test(o)},"zh-CN":function(t){var r=["11","12","13","14","15","21","22","23","31","32","33","34","35","36","37","41","42","43","44","45","46","50","51","52","53","54","61","62","63","64","65","71","81","82","91"],o=["7","9","10","5","8","4","2","1","6","3","7","9","10","5","8","4","2"],a=["1","0","X","9","8","7","6","5","4","3","2"],c=function(F){return r.includes(F)},s=function(F){var G=parseInt(F.substring(0,4),10),K=parseInt(F.substring(4,6),10),te=parseInt(F.substring(6),10),ae=new Date(G,K-1,te);return ae>new Date?!1:ae.getFullYear()===G&&ae.getMonth()===K-1&&ae.getDate()===te},n=function(F){for(var G=F.substring(0,17),K=0,te=0;te<17;te++)K+=parseInt(G.charAt(te),10)*parseInt(o[te],10);var ae=K%11;return a[ae]},i=function(F){return n(F)===F.charAt(17).toUpperCase()},u=function(F){var G=/^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(F);if(!G)return!1;var K=F.substring(0,2);if(G=c(K),!G)return!1;var te="19".concat(F.substring(6,12));return G=s(te),!!G},l=function(F){var G=/^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(F);if(!G)return!1;var K=F.substring(0,2);if(G=c(K),!G)return!1;var te=F.substring(6,14);return G=s(te),G?i(F):!1},x=function(F){var G=/^\d{15}|(\d{17}(\d|x|X))$/.test(F);return G?F.length===15?u(F):l(F):!1};return x(t)},"zh-TW":function(t){var r={A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:34,J:18,K:19,L:20,M:21,N:22,O:35,P:23,Q:24,R:25,S:26,T:27,U:28,V:29,W:32,X:30,Y:31,Z:33},o=t.trim().toUpperCase();return/^[A-Z][0-9]{9}$/.test(o)?Array.from(o).reduce(function(a,c,s){if(s===0){var n=r[c];return n%10*9+Math.floor(n/10)}return s===9?(10-a%10-Number(c))%10===0:a+Number(c)*(9-s)},0):!1}};function NN(e,t){if((0,Hf.default)(e),t in pu)return pu[t](e);if(t==="any"){for(var r in pu)if(pu.hasOwnProperty(r)){var o=pu[r];if(o(e))return!0}return!1}throw new Error("Invalid locale '".concat(t,"'"))}Cy.exports=hu.default;Cy.exports.default=hu.default});var dw=R((gu,By)=>{"use strict";g();y();Object.defineProperty(gu,"__esModule",{value:!0});gu.default=VN;var DN=WN(ve());function WN(e){return e&&e.__esModule?e:{default:e}}var UN=8,LN=14,jN=/^(\d{8}|\d{13}|\d{14})$/;function zN(e,t){return e===UN||e===LN?t%2===0?3:1:t%2===0?1:3}function qN(e){var t=e.slice(0,-1).split("").map(function(o,a){return Number(o)*zN(e.length,a)}).reduce(function(o,a){return o+a},0),r=10-t%10;return r<10?r:0}function VN(e){(0,DN.default)(e);var t=Number(e.slice(-1));return jN.test(e)&&t===qN(e)}By.exports=gu.default;By.exports.default=gu.default});var fw=R((yu,Ey)=>{"use strict";g();y();Object.defineProperty(yu,"__esModule",{value:!0});yu.default=KN;var GN=HN(ve());function HN(e){return e&&e.__esModule?e:{default:e}}var $N=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;function KN(e){if((0,GN.default)(e),!$N.test(e))return!1;for(var t=!0,r=0,o=e.length-2;o>=0;o--)if(e[o]>="A"&&e[o]<="Z")for(var a=e[o].charCodeAt(0)-55,c=a%10,s=Math.trunc(a/10),n=0,i=[c,s];n<i.length;n++){var u=i[n];t?u>=5?r+=1+(u-5)*2:r+=u*2:r+=u,t=!t}else{var l=e[o].charCodeAt(0)-"0".charCodeAt(0);t?l>=5?r+=1+(l-5)*2:r+=l*2:r+=l,t=!t}var x=Math.trunc((r+9)/10)*10-r;return+e[e.length-1]===x}Ey.exports=yu.default;Ey.exports.default=yu.default});var pw=R((vu,Ty)=>{"use strict";g();y();Object.defineProperty(vu,"__esModule",{value:!0});vu.default=Py;var ZN=JN(ve());function JN(e){return e&&e.__esModule?e:{default:e}}var YN=/^(?:[0-9]{9}X|[0-9]{10})$/,XN=/^(?:[0-9]{13})$/,QN=[1,3];function Py(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if((0,ZN.default)(e),t=String(t),!t)return Py(e,10)||Py(e,13);var r=e.replace(/[\s-]+/g,""),o=0,a;if(t==="10"){if(!YN.test(r))return!1;for(a=0;a<9;a++)o+=(a+1)*r.charAt(a);if(r.charAt(9)==="X"?o+=10*10:o+=10*r.charAt(9),o%11===0)return!!r}else if(t==="13"){if(!XN.test(r))return!1;for(a=0;a<12;a++)o+=QN[a%2]*r.charAt(a);if(r.charAt(12)-(10-o%10)%10===0)return!!r}return!1}Ty.exports=vu.default;Ty.exports.default=vu.default});var hw=R((bu,Sy)=>{"use strict";g();y();Object.defineProperty(bu,"__esModule",{value:!0});bu.default=oD;var eD=tD(ve());function tD(e){return e&&e.__esModule?e:{default:e}}var rD="^\\d{4}-?\\d{3}[\\dX]$";function oD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,eD.default)(e);var r=rD;if(r=t.require_hyphen?r.replace("?",""):r,r=t.case_sensitive?new RegExp(r):new RegExp(r,"i"),!r.test(e))return!1;for(var o=e.replace("-","").toUpperCase(),a=0,c=0;c<o.length;c++){var s=o[c];a+=(s==="X"?10:+s)*(8-c)}return a%11===0}Sy.exports=bu.default;Sy.exports.default=bu.default});var gw=R(wi=>{"use strict";g();y();Object.defineProperty(wi,"__esModule",{value:!0});wi.iso7064Check=nD;wi.luhnCheck=aD;wi.reverseMultiplyAndSum=iD;wi.verhoeffCheck=sD;function nD(e){for(var t=10,r=0;r<e.length-1;r++)t=(parseInt(e[r],10)+t)%10===0?10*2%11:(parseInt(e[r],10)+t)%10*2%11;return t=t===1?0:11-t,t===parseInt(e[10],10)}function aD(e){for(var t=0,r=!1,o=e.length-1;o>=0;o--){if(r){var a=parseInt(e[o],10)*2;a>9?t+=a.toString().split("").map(function(c){return parseInt(c,10)}).reduce(function(c,s){return c+s},0):t+=a}else t+=parseInt(e[o],10);r=!r}return t%10===0}function iD(e,t){for(var r=0,o=0;o<e.length;o++)r+=e[o]*(t-o);return r}function sD(e){for(var t=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],r=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],o=e.split("").reverse().join(""),a=0,c=0;c<o.length;c++)a=t[a][r[c%8][parseInt(o[c],10)]];return a===0}});var xw=R((mu,ky)=>{"use strict";g();y();function $f(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$f=function(r){return typeof r}:$f=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$f(e)}Object.defineProperty(mu,"__esModule",{value:!0});mu.default=VD;var cD=mw(ve()),So=uD(gw()),Ar=mw(Og());function bw(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return bw=function(){return e},e}function uD(e){if(e&&e.__esModule)return e;if(e===null||$f(e)!=="object"&&typeof e!="function")return{default:e};var t=bw();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var c=o?Object.getOwnPropertyDescriptor(e,a):null;c&&(c.get||c.set)?Object.defineProperty(r,a,c):r[a]=e[a]}return r.default=e,t&&t.set(e,r),r}function mw(e){return e&&e.__esModule?e:{default:e}}function lD(e){return hD(e)||pD(e)||fD(e)||dD()}function dD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fD(e,t){if(!!e){if(typeof e=="string")return Iy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Iy(e,t)}}function pD(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function hD(e){if(Array.isArray(e))return Iy(e)}function Iy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function gD(e){var t=e.slice(0,2),r=parseInt(e.slice(2,4),10);r>40?(r-=40,t="20".concat(t)):r>20?(r-=20,t="18".concat(t)):t="19".concat(t),r<10&&(r="0".concat(r));var o="".concat(t,"/").concat(r,"/").concat(e.slice(4,6));if(!(0,Ar.default)(o,"YYYY/MM/DD"))return!1;for(var a=e.split("").map(function(i){return parseInt(i,10)}),c=[2,4,8,5,10,9,7,3,6],s=0,n=0;n<c.length;n++)s+=a[n]*c[n];return s=s%11===10?0:s%11,s===a[9]}function yD(e){e=e.replace(/\W/,"");var t=parseInt(e.slice(0,2),10);if(e.length===10)t<54?t="20".concat(t):t="19".concat(t);else{if(e.slice(6)==="000")return!1;if(t<54)t="19".concat(t);else return!1}t.length===3&&(t=[t.slice(0,2),"0",t.slice(2)].join(""));var r=parseInt(e.slice(2,4),10);if(r>50&&(r-=50),r>20){if(parseInt(t,10)<2004)return!1;r-=20}r<10&&(r="0".concat(r));var o="".concat(t,"/").concat(r,"/").concat(e.slice(4,6));if(!(0,Ar.default)(o,"YYYY/MM/DD"))return!1;if(e.length===10&&parseInt(e,10)%11!==0){var a=parseInt(e.slice(0,9),10)%11;if(parseInt(t,10)<1986&&a===10){if(parseInt(e.slice(9),10)!==0)return!1}else return!1}return!0}function vD(e){return So.luhnCheck(e)}function bD(e){for(var t=e.split("").map(function(i){return parseInt(i,10)}),r=[],o=0;o<t.length-1;o++){r.push("");for(var a=0;a<t.length-1;a++)t[o]===t[a]&&(r[o]+=a)}if(r=r.filter(function(i){return i.length>1}),r.length!==2&&r.length!==3)return!1;if(r[0].length===3){for(var c=r[0].split("").map(function(i){return parseInt(i,10)}),s=0,n=0;n<c.length-1;n++)c[n]+1===c[n+1]&&(s+=1);if(s===2)return!1}return So.iso7064Check(e)}function mD(e){e=e.replace(/\W/,"");var t=parseInt(e.slice(4,6),10),r=e.slice(6,7);switch(r){case"0":case"1":case"2":case"3":t="19".concat(t);break;case"4":case"9":t<37?t="20".concat(t):t="19".concat(t);break;default:if(t<37)t="20".concat(t);else if(t>58)t="18".concat(t);else return!1;break}t.length===3&&(t=[t.slice(0,2),"0",t.slice(2)].join(""));var o="".concat(t,"/").concat(e.slice(2,4),"/").concat(e.slice(0,2));if(!(0,Ar.default)(o,"YYYY/MM/DD"))return!1;for(var a=e.split("").map(function(i){return parseInt(i,10)}),c=0,s=4,n=0;n<9;n++)c+=a[n]*s,s-=1,s===1&&(s=7);return c%=11,c===1?!1:c===0?a[9]===0:a[9]===11-c}function xD(e){for(var t=e.slice(0,8).split("").map(function(c){return parseInt(c,10)}),r=0,o=1;o<t.length;o+=2)r+=t[o];for(var a=0;a<t.length;a+=2)t[a]<2?r+=1-t[a]:(r+=2*(t[a]-2)+5,t[a]>4&&(r+=2));return String.fromCharCode(r%26+65)===e.charAt(8)}function AD(e){for(var t=e.split("").map(function(a){return parseInt(a,10)}),r=0,o=0;o<8;o++)r+=t[o]*Math.pow(2,8-o);return r%11%10===t[8]}function wD(e){var t=So.reverseMultiplyAndSum(e.split("").slice(0,7).map(function(r){return parseInt(r,10)}),8);return e.length===9&&e[8]!=="W"&&(t+=(e[8].charCodeAt(0)-64)*9),t%=23,t===0?e[7].toUpperCase()==="W":e[7].toUpperCase()===String.fromCharCode(64+t)}var Oy={andover:["10","12"],atlanta:["60","67"],austin:["50","53"],brookhaven:["01","02","03","04","05","06","11","13","14","16","21","22","23","25","34","51","52","54","55","56","57","58","59","65"],cincinnati:["30","32","35","36","37","38","61"],fresno:["15","24"],internet:["20","26","27","45","46","47"],kansas:["40","44"],memphis:["94","95"],ogden:["80","90"],philadelphia:["33","39","41","42","43","46","48","62","63","64","66","68","71","72","73","74","75","76","77","81","82","83","84","85","86","87","88","91","92","93","98","99"],sba:["31"]};function _D(){var e=[];for(var t in Oy)Oy.hasOwnProperty(t)&&e.push.apply(e,lD(Oy[t]));return e}function CD(e){return _D().indexOf(e.substr(0,2))!==-1}function BD(e){var t=e.toUpperCase().split("");if(isNaN(parseInt(t[0],10))&&t.length>1){var r=0;switch(t[0]){case"Y":r=1;break;case"Z":r=2;break;default:}t.splice(0,1,r)}else for(;t.length<9;)t.unshift(0);var o=["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"];t=t.join("");var a=parseInt(t.slice(0,8),10)%23;return t[8]===o[a]}function ED(e){var t=e.slice(1,3),r=e.slice(0,1);switch(r){case"1":case"2":t="18".concat(t);break;case"3":case"4":t="19".concat(t);break;default:t="20".concat(t);break}var o="".concat(t,"/").concat(e.slice(3,5),"/").concat(e.slice(5,7));if(!(0,Ar.default)(o,"YYYY/MM/DD"))return!1;for(var a=e.split("").map(function(u){return parseInt(u,10)}),c=0,s=1,n=0;n<10;n++)c+=a[n]*s,s+=1,s===10&&(s=1);if(c%11===10){c=0,s=3;for(var i=0;i<10;i++)c+=a[i]*s,s+=1,s===10&&(s=1);if(c%11===10)return a[10]===0}return c%11===a[10]}function PD(e){var t=e.slice(4,6),r=e.slice(6,7);switch(r){case"+":t="18".concat(t);break;case"-":t="19".concat(t);break;default:t="20".concat(t);break}var o="".concat(t,"/").concat(e.slice(2,4),"/").concat(e.slice(0,2));if(!(0,Ar.default)(o,"YYYY/MM/DD"))return!1;var a=parseInt(e.slice(0,6)+e.slice(7,10),10)%31;if(a<10)return a===parseInt(e.slice(10),10);a-=10;var c=["A","B","C","D","E","F","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y"];return c[a]===e.slice(10)}function TD(e){if(e.slice(2,4)!=="00"||e.slice(4,6)!=="00"){var t="".concat(e.slice(0,2),"/").concat(e.slice(2,4),"/").concat(e.slice(4,6));if(!(0,Ar.default)(t,"YY/MM/DD"))return!1}var r=97-parseInt(e.slice(0,9),10)%97,o=parseInt(e.slice(9,11),10);return!(r!==o&&(r=97-parseInt("2".concat(e.slice(0,9)),10)%97,r!==o))}function SD(e){e=e.replace(/\s/g,"");var t=parseInt(e.slice(0,10),10)%511,r=parseInt(e.slice(10,13),10);return t===r}function OD(e){var t="".concat(e.slice(0,4),"/").concat(e.slice(4,6),"/").concat(e.slice(6,8));return!(0,Ar.default)(t,"YYYY/MM/DD")||!So.luhnCheck(e.slice(0,12))?!1:So.verhoeffCheck("".concat(e.slice(0,11)).concat(e[12]))}function ID(e){return So.iso7064Check(e)}function kD(e){for(var t=e.split("").map(function(a){return parseInt(a,10)}),r=8,o=1;o<9;o++)r+=t[o]*(o+1);return r%11===t[9]}function yw(e){for(var t=!1,r=!1,o=0;o<3;o++)if(!t&&/[AEIOU]/.test(e[o]))t=!0;else if(!r&&t&&e[o]==="X")r=!0;else if(o>0&&(t&&!r&&!/[AEIOU]/.test(e[o])||r&&!/X/.test(e[o])))return!1;return!0}function FD(e){var t=e.toUpperCase().split("");if(!yw(t.slice(0,3))||!yw(t.slice(3,6)))return!1;for(var r=[6,7,9,10,12,13,14],o={L:"0",M:"1",N:"2",P:"3",Q:"4",R:"5",S:"6",T:"7",U:"8",V:"9"},a=0,c=r;a<c.length;a++){var s=c[a];t[s]in o&&t.splice(s,1,o[t[s]])}var n={A:"01",B:"02",C:"03",D:"04",E:"05",H:"06",L:"07",M:"08",P:"09",R:"10",S:"11",T:"12"},i=n[t[8]],u=parseInt(t[9]+t[10],10);u>40&&(u-=40),u<10&&(u="0".concat(u));var l="".concat(t[6]).concat(t[7],"/").concat(i,"/").concat(u);if(!(0,Ar.default)(l,"YY/MM/DD"))return!1;for(var x=0,N=1;N<t.length-1;N+=2){var F=parseInt(t[N],10);isNaN(F)&&(F=t[N].charCodeAt(0)-65),x+=F}for(var G={A:1,B:0,C:5,D:7,E:9,F:13,G:15,H:17,I:19,J:21,K:2,L:4,M:18,N:20,O:11,P:3,Q:6,R:8,S:12,T:14,U:16,V:10,W:22,X:25,Y:24,Z:23,0:1,1:0},K=0;K<t.length-1;K+=2){var te=0;if(t[K]in G)te=G[t[K]];else{var ae=parseInt(t[K],10);te=2*ae+1,ae>4&&(te+=2)}x+=te}return String.fromCharCode(65+x%26)===t[15]}function RD(e){e=e.replace(/\W/,"");var t=e.slice(0,2);if(t!=="32"){var r=e.slice(2,4);if(r!=="00"){var o=e.slice(4,6);switch(e[6]){case"0":o="18".concat(o);break;case"1":o="19".concat(o);break;default:o="20".concat(o);break}var a="".concat(o,"/").concat(e.slice(2,4),"/").concat(t);if(!(0,Ar.default)(a,"YYYY/MM/DD"))return!1}for(var c=1101,s=[1,6,3,7,9,10,5,8,4,2],n=0;n<e.length-1;n++)c-=parseInt(e[n],10)*s[n];return parseInt(e[10],10)===c%11}return!0}function MD(e){if(e.length!==9){for(var t=e.toUpperCase().split("");t.length<8;)t.unshift(0);switch(e[7]){case"A":case"P":if(parseInt(t[6],10)===0)return!1;break;default:{var r=parseInt(t.join("").slice(0,5),10);if(r>32e3)return!1;var o=parseInt(t.join("").slice(5,7),10);if(r===o)return!1}}}return!0}function ND(e){return So.reverseMultiplyAndSum(e.split("").slice(0,8).map(function(t){return parseInt(t,10)}),9)%11===parseInt(e[8],10)}function DD(e){if(e.length===10){for(var t=[6,5,7,2,3,4,5,6,7],r=0,o=0;o<t.length;o++)r+=parseInt(e[o],10)*t[o];return r%=11,r===10?!1:r===parseInt(e[9],10)}var a=e.slice(0,2),c=parseInt(e.slice(2,4),10);c>80?(a="18".concat(a),c-=80):c>60?(a="22".concat(a),c-=60):c>40?(a="21".concat(a),c-=40):c>20?(a="20".concat(a),c-=20):a="19".concat(a),c<10&&(c="0".concat(c));var s="".concat(a,"/").concat(c,"/").concat(e.slice(4,6));if(!(0,Ar.default)(s,"YYYY/MM/DD"))return!1;for(var n=0,i=1,u=0;u<e.length-1;u++)n+=parseInt(e[u],10)*i%10,i+=2,i>10?i=1:i===5&&(i+=2);return n=10-n%10,n===parseInt(e[10],10)}function WD(e){if(e.length===11){var t,r;if(t=0,e==="11111111111"||e==="22222222222"||e==="33333333333"||e==="44444444444"||e==="55555555555"||e==="66666666666"||e==="77777777777"||e==="88888888888"||e==="99999999999"||e==="00000000000")return!1;for(var o=1;o<=9;o++)t+=parseInt(e.substring(o-1,o),10)*(11-o);if(r=t*10%11,r===10&&(r=0),r!==parseInt(e.substring(9,10),10))return!1;t=0;for(var a=1;a<=10;a++)t+=parseInt(e.substring(a-1,a),10)*(12-a);return r=t*10%11,r===10&&(r=0),r===parseInt(e.substring(10,11),10)}if(e==="00000000000000"||e==="11111111111111"||e==="22222222222222"||e==="33333333333333"||e==="44444444444444"||e==="55555555555555"||e==="66666666666666"||e==="77777777777777"||e==="88888888888888"||e==="99999999999999")return!1;for(var c=e.length-2,s=e.substring(0,c),n=e.substring(c),i=0,u=c-7,l=c;l>=1;l--)i+=s.charAt(c-l)*u,u-=1,u<2&&(u=9);var x=i%11<2?0:11-i%11;if(x!==parseInt(n.charAt(0),10))return!1;c+=1,s=e.substring(0,c),i=0,u=c-7;for(var N=c;N>=1;N--)i+=s.charAt(c-N)*u,u-=1,u<2&&(u=9);return x=i%11<2?0:11-i%11,x===parseInt(n.charAt(1),10)}function UD(e){var t=11-So.reverseMultiplyAndSum(e.split("").slice(0,8).map(function(r){return parseInt(r,10)}),9)%11;return t>9?parseInt(e[8],10)===0:t===parseInt(e[8],10)}function LD(e){if(e.slice(0,4)!=="9000"){var t=e.slice(1,3);switch(e[0]){case"1":case"2":t="19".concat(t);break;case"3":case"4":t="18".concat(t);break;case"5":case"6":t="20".concat(t);break;default:}var r="".concat(t,"/").concat(e.slice(3,5),"/").concat(e.slice(5,7));if(r.length===8){if(!(0,Ar.default)(r,"YY/MM/DD"))return!1}else if(!(0,Ar.default)(r,"YYYY/MM/DD"))return!1;for(var o=e.split("").map(function(n){return parseInt(n,10)}),a=[2,7,9,1,4,6,3,5,8,2,7,9],c=0,s=0;s<a.length;s++)c+=o[s]*a[s];return c%11===10?o[12]===1:o[12]===c%11}return!0}function jD(e){if(e.length===9){if(e=e.replace(/\W/,""),e.slice(6)==="000")return!1;var t=parseInt(e.slice(0,2),10);if(t>53)return!1;t<10?t="190".concat(t):t="19".concat(t);var r=parseInt(e.slice(2,4),10);r>50&&(r-=50),r<10&&(r="0".concat(r));var o="".concat(t,"/").concat(r,"/").concat(e.slice(4,6));if(!(0,Ar.default)(o,"YYYY/MM/DD"))return!1}return!0}function zD(e){var t=11-So.reverseMultiplyAndSum(e.split("").slice(0,7).map(function(r){return parseInt(r,10)}),8)%11;return t===10?parseInt(e[7],10)===0:t===parseInt(e[7],10)}function qD(e){var t=e.slice(0);e.length>11&&(t=t.slice(2));var r="",o=t.slice(2,4),a=parseInt(t.slice(4,6),10);if(e.length>11)r=e.slice(0,4);else if(r=e.slice(0,2),e.length===11&&a<60){var c=new Date().getFullYear().toString(),s=parseInt(c.slice(0,2),10);if(c=parseInt(c,10),e[6]==="-")parseInt("".concat(s).concat(r),10)>c?r="".concat(s-1).concat(r):r="".concat(s).concat(r);else if(r="".concat(s-1).concat(r),c-parseInt(r,10)<100)return!1}a>60&&(a-=60),a<10&&(a="0".concat(a));var n="".concat(r,"/").concat(o,"/").concat(a);if(n.length===8){if(!(0,Ar.default)(n,"YY/MM/DD"))return!1}else if(!(0,Ar.default)(n,"YYYY/MM/DD"))return!1;return So.luhnCheck(e.replace(/\W/,""))}var On={"bg-BG":/^\d{10}$/,"cs-CZ":/^\d{6}\/{0,1}\d{3,4}$/,"de-AT":/^\d{9}$/,"de-DE":/^[1-9]\d{10}$/,"dk-DK":/^\d{6}-{0,1}\d{4}$/,"el-CY":/^[09]\d{7}[A-Z]$/,"el-GR":/^([0-4]|[7-9])\d{8}$/,"en-GB":/^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i,"en-IE":/^\d{7}[A-W][A-IW]{0,1}$/i,"en-US":/^\d{2}[- ]{0,1}\d{7}$/,"es-ES":/^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i,"et-EE":/^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/,"fi-FI":/^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i,"fr-BE":/^\d{11}$/,"fr-FR":/^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/,"fr-LU":/^\d{13}$/,"hr-HR":/^\d{11}$/,"hu-HU":/^8\d{9}$/,"it-IT":/^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,"lv-LV":/^\d{6}-{0,1}\d{5}$/,"mt-MT":/^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i,"nl-NL":/^\d{9}$/,"pl-PL":/^\d{10,11}$/,"pt-BR":/(?:^\d{11}$)|(?:^\d{14}$)/,"pt-PT":/^\d{9}$/,"ro-RO":/^\d{13}$/,"sk-SK":/^\d{6}\/{0,1}\d{3,4}$/,"sl-SI":/^[1-9]\d{7}$/,"sv-SE":/^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/};On["lb-LU"]=On["fr-LU"];On["lt-LT"]=On["et-EE"];On["nl-BE"]=On["fr-BE"];var In={"bg-BG":gD,"cs-CZ":yD,"de-AT":vD,"de-DE":bD,"dk-DK":mD,"el-CY":xD,"el-GR":AD,"en-IE":wD,"en-US":CD,"es-ES":BD,"et-EE":ED,"fi-FI":PD,"fr-BE":TD,"fr-FR":SD,"fr-LU":OD,"hr-HR":ID,"hu-HU":kD,"it-IT":FD,"lv-LV":RD,"mt-MT":MD,"nl-NL":ND,"pl-PL":DD,"pt-BR":WD,"pt-PT":UD,"ro-RO":LD,"sk-SK":jD,"sl-SI":zD,"sv-SE":qD};In["lb-LU"]=In["fr-LU"];In["lt-LT"]=In["et-EE"];In["nl-BE"]=In["fr-BE"];var vw=/[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g,Kf={"de-AT":vw,"de-DE":/[\/\\]/g,"fr-BE":vw};Kf["nl-BE"]=Kf["fr-BE"];function VD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US";(0,cD.default)(e);var r=e.slice(0);if(t in On)return t in Kf&&(r=r.replace(Kf[t],"")),On[t].test(r)?t in In?In[t](r):!0:!1;throw new Error("Invalid locale '".concat(t,"'"))}ky.exports=mu.default;ky.exports.default=mu.default});var Aw=R(xu=>{"use strict";g();y();Object.defineProperty(xu,"__esModule",{value:!0});xu.default=$D;xu.locales=void 0;var GD=HD(ve());function HD(e){return e&&e.__esModule?e:{default:e}}var _t={"am-AM":/^(\+?374|0)((10|[9|7][0-9])\d{6}$|[2-4]\d{7}$)/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)[569]\d{7}$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?(9[1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(5[015]|7[07]|99)\d{7}$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)[1|3])([0|5][0-45-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|91|9[3-9])\d{7}$/,"el-GR":/^(\+?30|0)?(69\d{8})$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}))/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4(0|1|2|4|5|6)?|50)\s?(\d\s?){4,8}\d$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(5|79)\d{7}$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"ms-MY":/^(\+?6?01){1}(([0145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[2-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+244)\d{9}$/,"ro-RO":/^(\+?4?0)\s?7\d{2}(\/|\s|\.|\-)?\d{3}(\s|\.|\-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"sq-AL":/^(\+355|0)6[789]\d{6}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38|8)?0\d{9}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/};_t["en-CA"]=_t["en-US"];_t["fr-CA"]=_t["en-CA"];_t["fr-BE"]=_t["nl-BE"];_t["zh-HK"]=_t["en-HK"];_t["zh-MO"]=_t["en-MO"];_t["ga-IE"]=_t["en-IE"];_t["fr-CH"]=_t["de-CH"];_t["it-CH"]=_t["fr-CH"];function $D(e,t,r){if((0,GD.default)(e),r&&r.strictMode&&!e.startsWith("+"))return!1;if(Array.isArray(t))return t.some(function(c){if(_t.hasOwnProperty(c)){var s=_t[c];if(s.test(e))return!0}return!1});if(t in _t)return _t[t].test(e);if(!t||t==="any"){for(var o in _t)if(_t.hasOwnProperty(o)){var a=_t[o];if(a.test(e))return!0}return!1}throw new Error("Invalid locale '".concat(t,"'"))}var KD=Object.keys(_t);xu.locales=KD});var ww=R((Au,Fy)=>{"use strict";g();y();Object.defineProperty(Au,"__esModule",{value:!0});Au.default=XD;var ZD=JD(ve());function JD(e){return e&&e.__esModule?e:{default:e}}var YD=/^(0x)[0-9a-f]{40}$/i;function XD(e){return(0,ZD.default)(e),YD.test(e)}Fy.exports=Au.default;Fy.exports.default=Au.default});var Cw=R((wu,Ry)=>{"use strict";g();y();Object.defineProperty(wu,"__esModule",{value:!0});wu.default=oW;var QD=_w(Ir()),eW=_w(ve());function _w(e){return e&&e.__esModule?e:{default:e}}function tW(e){var t="\\d{".concat(e.digits_after_decimal[0],"}");e.digits_after_decimal.forEach(function(l,x){x!==0&&(t="".concat(t,"|\\d{").concat(l,"}"))});var r="(".concat(e.symbol.replace(/\W/,function(l){return"\\".concat(l)}),")").concat(e.require_symbol?"":"?"),o="-?",a="[1-9]\\d*",c="[1-9]\\d{0,2}(\\".concat(e.thousands_separator,"\\d{3})*"),s=["0",a,c],n="(".concat(s.join("|"),")?"),i="(\\".concat(e.decimal_separator,"(").concat(t,"))").concat(e.require_decimal?"":"?"),u=n+(e.allow_decimal||e.require_decimal?i:"");return e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?u+=o:e.negative_sign_before_digits&&(u=o+u)),e.allow_negative_sign_placeholder?u="( (?!\\-))?".concat(u):e.allow_space_after_symbol?u=" ?".concat(u):e.allow_space_after_digits&&(u+="( (?!$))?"),e.symbol_after_digits?u+=r:u=r+u,e.allow_negatives&&(e.parens_for_negatives?u="(\\(".concat(u,"\\)|").concat(u,")"):e.negative_sign_before_digits||e.negative_sign_after_digits||(u=o+u)),new RegExp("^(?!-? )(?=.*\\d)".concat(u,"$"))}var rW={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_decimal:!0,require_decimal:!1,digits_after_decimal:[2],allow_space_after_digits:!1};function oW(e,t){return(0,eW.default)(e),t=(0,QD.default)(t,rW),tW(t).test(e)}Ry.exports=wu.default;Ry.exports.default=wu.default});var Bw=R((_u,My)=>{"use strict";g();y();Object.defineProperty(_u,"__esModule",{value:!0});_u.default=cW;var nW=aW(ve());function aW(e){return e&&e.__esModule?e:{default:e}}var iW=/^(bc1)[a-z0-9]{25,39}$/,sW=/^(1|3)[A-HJ-NP-Za-km-z1-9]{25,39}$/;function cW(e){return(0,nW.default)(e),e.startsWith("bc1")?iW.test(e):sW.test(e)}My.exports=_u.default;My.exports.default=_u.default});var Ew=R((Cu,Ny)=>{"use strict";g();y();Object.defineProperty(Cu,"__esModule",{value:!0});Cu.default=hW;var uW=lW(ve());function lW(e){return e&&e.__esModule?e:{default:e}}var dW=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,fW=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,pW=function(t){var r=t.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/);if(r){var o=Number(r[1]),a=Number(r[2]);return o%4===0&&o%100!==0||o%400===0?a<=366:a<=365}var c=t.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number),s=c[1],n=c[2],i=c[3],u=n&&"0".concat(n).slice(-2),l=i&&"0".concat(i).slice(-2),x=new Date("".concat(s,"-").concat(u||"01","-").concat(l||"01"));return n&&i?x.getUTCFullYear()===s&&x.getUTCMonth()+1===n&&x.getUTCDate()===i:!0};function hW(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,uW.default)(e);var r=t.strictSeparator?fW.test(e):dW.test(e);return r&&t.strict?pW(e):r}Ny.exports=Cu.default;Ny.exports.default=Cu.default});var Sw=R((Bu,Dy)=>{"use strict";g();y();Object.defineProperty(Bu,"__esModule",{value:!0});Bu.default=TW;var gW=yW(ve());function yW(e){return e&&e.__esModule?e:{default:e}}var vW=/[0-9]{4}/,bW=/(0[1-9]|1[0-2])/,mW=/([12]\d|0[1-9]|3[01])/,Pw=/([01][0-9]|2[0-3])/,Tw=/[0-5][0-9]/,xW=/([0-5][0-9]|60)/,AW=/(\.[0-9]+)?/,wW=new RegExp("[-+]".concat(Pw.source,":").concat(Tw.source)),_W=new RegExp("([zZ]|".concat(wW.source,")")),CW=new RegExp("".concat(Pw.source,":").concat(Tw.source,":").concat(xW.source).concat(AW.source)),BW=new RegExp("".concat(vW.source,"-").concat(bW.source,"-").concat(mW.source)),EW=new RegExp("".concat(CW.source).concat(_W.source)),PW=new RegExp("^".concat(BW.source,"[ tT]").concat(EW.source,"$"));function TW(e){return(0,gW.default)(e),PW.test(e)}Dy.exports=Bu.default;Dy.exports.default=Bu.default});var Ow=R((Eu,Wy)=>{"use strict";g();y();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.default=kW;var SW=OW(ve());function OW(e){return e&&e.__esModule?e:{default:e}}var IW=new Set(["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","VAT","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWZ","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","URY","UZB","VUT","VEN","VNM","VGB","VIR","WLF","ESH","YEM","ZMB","ZWE"]);function kW(e){return(0,SW.default)(e),IW.has(e.toUpperCase())}Wy.exports=Eu.default;Wy.exports.default=Eu.default});var kw=R(Pu=>{"use strict";g();y();Object.defineProperty(Pu,"__esModule",{value:!0});Pu.default=MW;Pu.CurrencyCodes=void 0;var FW=RW(ve());function RW(e){return e&&e.__esModule?e:{default:e}}var Iw=new Set(["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]);function MW(e){return(0,FW.default)(e),Iw.has(e.toUpperCase())}var NW=Iw;Pu.CurrencyCodes=NW});var Fw=R((Tu,Uy)=>{"use strict";g();y();Object.defineProperty(Tu,"__esModule",{value:!0});Tu.default=LW;var DW=WW(ve());function WW(e){return e&&e.__esModule?e:{default:e}}var UW=/^[A-Z2-7]+=*$/;function LW(e){(0,DW.default)(e);var t=e.length;return!!(t%8===0&&UW.test(e))}Uy.exports=Tu.default;Uy.exports.default=Tu.default});var Rw=R((Su,Ly)=>{"use strict";g();y();Object.defineProperty(Su,"__esModule",{value:!0});Su.default=VW;var jW=zW(ve());function zW(e){return e&&e.__esModule?e:{default:e}}var qW=/^[A-HJ-NP-Za-km-z1-9]*$/;function VW(e){return(0,jW.default)(e),!!qW.test(e)}Ly.exports=Su.default;Ly.exports.default=Su.default});var Mw=R((Ou,jy)=>{"use strict";g();y();Object.defineProperty(Ou,"__esModule",{value:!0});Ou.default=JW;var GW=HW(ve());function HW(e){return e&&e.__esModule?e:{default:e}}var $W=/^[a-z]+\/[a-z0-9\-\+]+$/i,KW=/^[a-z\-]+=[a-z0-9\-]+$/i,ZW=/^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i;function JW(e){(0,GW.default)(e);var t=e.split(",");if(t.length<2)return!1;var r=t.shift().trim().split(";"),o=r.shift();if(o.substr(0,5)!=="data:")return!1;var a=o.substr(5);if(a!==""&&!$W.test(a))return!1;for(var c=0;c<r.length;c++)if(!(c===r.length-1&&r[c].toLowerCase()==="base64")&&!KW.test(r[c]))return!1;for(var s=0;s<t.length;s++)if(!ZW.test(t[s]))return!1;return!0}jy.exports=Ou.default;jy.exports.default=Ou.default});var Nw=R((Iu,zy)=>{"use strict";g();y();Object.defineProperty(Iu,"__esModule",{value:!0});Iu.default=eU;var YW=XW(ve());function XW(e){return e&&e.__esModule?e:{default:e}}var QW=/^magnet:\?xt(?:\.1)?=urn:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?($|&)/i;function eU(e){return(0,YW.default)(e),QW.test(e.trim())}zy.exports=Iu.default;zy.exports.default=Iu.default});var Dw=R((ku,qy)=>{"use strict";g();y();Object.defineProperty(ku,"__esModule",{value:!0});ku.default=iU;var tU=rU(ve());function rU(e){return e&&e.__esModule?e:{default:e}}var oU=/^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+]{1,100}$/i,nU=/^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i,aU=/^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i;function iU(e){return(0,tU.default)(e),oU.test(e)||nU.test(e)||aU.test(e)}qy.exports=ku.default;qy.exports.default=ku.default});var Uw=R((Fu,Vy)=>{"use strict";g();y();Object.defineProperty(Fu,"__esModule",{value:!0});Fu.default=hU;var sU=Ww(ve()),cU=Ww(Ir());function Ww(e){return e&&e.__esModule?e:{default:e}}var uU=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,lU=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,dU=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,fU=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,pU={checkDMS:!1};function hU(e,t){if((0,sU.default)(e),t=(0,cU.default)(t,pU),!e.includes(","))return!1;var r=e.split(",");return r[0].startsWith("(")&&!r[1].endsWith(")")||r[1].endsWith(")")&&!r[0].startsWith("(")?!1:t.checkDMS?dU.test(r[0])&&fU.test(r[1]):uU.test(r[0])&&lU.test(r[1])}Vy.exports=Fu.default;Vy.exports.default=Fu.default});var Lw=R(Ru=>{"use strict";g();y();Object.defineProperty(Ru,"__esModule",{value:!0});Ru.default=mU;Ru.locales=void 0;var gU=yU(ve());function yU(e){return e&&e.__esModule?e:{default:e}}var vU=/^\d{3}$/,Dr=/^\d{4}$/,wr=/^\d{5}$/,Gy=/^\d{6}$/,_i={AD:/^AD\d{3}$/,AT:Dr,AU:Dr,AZ:/^AZ\d{4}$/,BE:Dr,BG:Dr,BR:/^\d{5}-\d{3}$/,BY:/2[1-4]{1}\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:Dr,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CZ:/^\d{3}\s?\d{2}$/,DE:wr,DK:Dr,DO:wr,DZ:wr,EE:wr,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:wr,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:Dr,ID:wr,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/\b(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}\b/,IS:vU,IT:wr,JP:/^\d{3}\-\d{4}$/,KE:wr,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:Dr,LV:/^LV\-\d{4}$/,LK:wr,MX:wr,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:wr,NL:/^\d{4}\s?[a-z]{2}$/i,NO:Dr,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:Dr,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:Gy,RU:Gy,SA:wr,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:Gy,SI:Dr,SK:/^\d{3}\s?\d{2}$/,TH:wr,TN:Dr,TW:/^\d{3}(\d{2})?$/,UA:wr,US:/^\d{5}(-\d{4})?$/,ZA:Dr,ZM:wr},bU=Object.keys(_i);Ru.locales=bU;function mU(e,t){if((0,gU.default)(e),t in _i)return _i[t].test(e);if(t==="any"){for(var r in _i)if(_i.hasOwnProperty(r)){var o=_i[r];if(o.test(e))return!0}return!1}throw new Error("Invalid locale '".concat(t,"'"))}});var $y=R((Mu,Hy)=>{"use strict";g();y();Object.defineProperty(Mu,"__esModule",{value:!0});Mu.default=wU;var xU=AU(ve());function AU(e){return e&&e.__esModule?e:{default:e}}function wU(e,t){(0,xU.default)(e);var r=t?new RegExp("^[".concat(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+"),"g"):/^\s+/g;return e.replace(r,"")}Hy.exports=Mu.default;Hy.exports.default=Mu.default});var Zy=R((Nu,Ky)=>{"use strict";g();y();Object.defineProperty(Nu,"__esModule",{value:!0});Nu.default=BU;var _U=CU(ve());function CU(e){return e&&e.__esModule?e:{default:e}}function BU(e,t){if((0,_U.default)(e),t){var r=new RegExp("[".concat(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+$"),"g");return e.replace(r,"")}for(var o=e.length-1;/\s/.test(e.charAt(o));)o-=1;return e.slice(0,o+1)}Ky.exports=Nu.default;Ky.exports.default=Nu.default});var zw=R((Du,Jy)=>{"use strict";g();y();Object.defineProperty(Du,"__esModule",{value:!0});Du.default=TU;var EU=jw(Zy()),PU=jw($y());function jw(e){return e&&e.__esModule?e:{default:e}}function TU(e,t){return(0,EU.default)((0,PU.default)(e,t),t)}Jy.exports=Du.default;Jy.exports.default=Du.default});var qw=R((Wu,Yy)=>{"use strict";g();y();Object.defineProperty(Wu,"__esModule",{value:!0});Wu.default=IU;var SU=OU(ve());function OU(e){return e&&e.__esModule?e:{default:e}}function IU(e){return(0,SU.default)(e),e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\//g,"&#x2F;").replace(/\\/g,"&#x5C;").replace(/`/g,"&#96;")}Yy.exports=Wu.default;Yy.exports.default=Wu.default});var Vw=R((Uu,Xy)=>{"use strict";g();y();Object.defineProperty(Uu,"__esModule",{value:!0});Uu.default=RU;var kU=FU(ve());function FU(e){return e&&e.__esModule?e:{default:e}}function RU(e){return(0,kU.default)(e),e.replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#x2F;/g,"/").replace(/&#x5C;/g,"\\").replace(/&#96;/g,"`").replace(/&amp;/g,"&")}Xy.exports=Uu.default;Xy.exports.default=Uu.default});var ev=R((Lu,Qy)=>{"use strict";g();y();Object.defineProperty(Lu,"__esModule",{value:!0});Lu.default=DU;var MU=NU(ve());function NU(e){return e&&e.__esModule?e:{default:e}}function DU(e,t){return(0,MU.default)(e),e.replace(new RegExp("[".concat(t,"]+"),"g"),"")}Qy.exports=Lu.default;Qy.exports.default=Lu.default});var Hw=R((ju,tv)=>{"use strict";g();y();Object.defineProperty(ju,"__esModule",{value:!0});ju.default=LU;var WU=Gw(ve()),UU=Gw(ev());function Gw(e){return e&&e.__esModule?e:{default:e}}function LU(e,t){(0,WU.default)(e);var r=t?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return(0,UU.default)(e,r)}tv.exports=ju.default;tv.exports.default=ju.default});var $w=R((zu,rv)=>{"use strict";g();y();Object.defineProperty(zu,"__esModule",{value:!0});zu.default=qU;var jU=zU(ve());function zU(e){return e&&e.__esModule?e:{default:e}}function qU(e,t){return(0,jU.default)(e),e.replace(new RegExp("[^".concat(t,"]+"),"g"),"")}rv.exports=zu.default;rv.exports.default=zu.default});var Kw=R((qu,ov)=>{"use strict";g();y();Object.defineProperty(qu,"__esModule",{value:!0});qu.default=HU;var VU=GU(ve());function GU(e){return e&&e.__esModule?e:{default:e}}function HU(e,t){(0,VU.default)(e);for(var r=e.length-1;r>=0;r--)if(t.indexOf(e[r])===-1)return!1;return!0}ov.exports=qu.default;ov.exports.default=qu.default});var Zw=R((Vu,nv)=>{"use strict";g();y();Object.defineProperty(Vu,"__esModule",{value:!0});Vu.default=tL;var $U=KU(Ir());function KU(e){return e&&e.__esModule?e:{default:e}}var ZU={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},JU=["icloud.com","me.com"],YU=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],XU=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],QU=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function eL(e){return e.length>1?e:""}function tL(e,t){t=(0,$U.default)(t,ZU);var r=e.split("@"),o=r.pop(),a=r.join("@"),c=[a,o];if(c[1]=c[1].toLowerCase(),c[1]==="gmail.com"||c[1]==="googlemail.com"){if(t.gmail_remove_subaddress&&(c[0]=c[0].split("+")[0]),t.gmail_remove_dots&&(c[0]=c[0].replace(/\.+/g,eL)),!c[0].length)return!1;(t.all_lowercase||t.gmail_lowercase)&&(c[0]=c[0].toLowerCase()),c[1]=t.gmail_convert_googlemaildotcom?"gmail.com":c[1]}else if(JU.indexOf(c[1])>=0){if(t.icloud_remove_subaddress&&(c[0]=c[0].split("+")[0]),!c[0].length)return!1;(t.all_lowercase||t.icloud_lowercase)&&(c[0]=c[0].toLowerCase())}else if(YU.indexOf(c[1])>=0){if(t.outlookdotcom_remove_subaddress&&(c[0]=c[0].split("+")[0]),!c[0].length)return!1;(t.all_lowercase||t.outlookdotcom_lowercase)&&(c[0]=c[0].toLowerCase())}else if(XU.indexOf(c[1])>=0){if(t.yahoo_remove_subaddress){var s=c[0].split("-");c[0]=s.length>1?s.slice(0,-1).join("-"):s[0]}if(!c[0].length)return!1;(t.all_lowercase||t.yahoo_lowercase)&&(c[0]=c[0].toLowerCase())}else QU.indexOf(c[1])>=0?((t.all_lowercase||t.yandex_lowercase)&&(c[0]=c[0].toLowerCase()),c[1]="yandex.ru"):t.all_lowercase&&(c[0]=c[0].toLowerCase());return c.join("@")}nv.exports=Vu.default;nv.exports.default=Vu.default});var Jw=R((Gu,av)=>{"use strict";g();y();Object.defineProperty(Gu,"__esModule",{value:!0});Gu.default=aL;var rL=oL(ve());function oL(e){return e&&e.__esModule?e:{default:e}}var nL=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;function aL(e){return(0,rL.default)(e),nL.test(e)}av.exports=Gu.default;av.exports.default=Gu.default});var Yw=R((Hu,iv)=>{"use strict";g();y();Object.defineProperty(Hu,"__esModule",{value:!0});Hu.default=cL;var iL=sL(ve());function sL(e){return e&&e.__esModule?e:{default:e}}var Zf={"cs-CZ":function(t){return/^(([ABCDEFHKIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(t)},"de-DE":function(t){return/^((AW|UL|AK|GA|AÖ|LF|AZ|AM|AS|ZE|AN|AB|A|KG|KH|BA|EW|BZ|HY|KM|BT|HP|B|BC|BI|BO|FN|TT|ÜB|BN|AH|BS|FR|HB|ZZ|BB|BK|BÖ|OC|OK|CW|CE|C|CO|LH|CB|KW|LC|LN|DA|DI|DE|DH|SY|NÖ|DO|DD|DU|DN|D|EI|EA|EE|FI|EM|EL|EN|PF|ED|EF|ER|AU|ZP|E|ES|NT|EU|FL|FO|FT|FF|F|FS|FD|FÜ|GE|G|GI|GF|GS|ZR|GG|GP|GR|NY|ZI|GÖ|GZ|GT|HA|HH|HM|HU|WL|HZ|WR|RN|HK|HD|HN|HS|GK|HE|HF|RZ|HI|HG|HO|HX|IK|IL|IN|J|JL|KL|KA|KS|KF|KE|KI|KT|KO|KN|KR|KC|KU|K|LD|LL|LA|L|OP|LM|LI|LB|LU|LÖ|HL|LG|MD|GN|MZ|MA|ML|MR|MY|AT|DM|MC|NZ|RM|RG|MM|ME|MB|MI|FG|DL|HC|MW|RL|MK|MG|MÜ|WS|MH|M|MS|NU|NB|ND|NM|NK|NW|NR|NI|NF|DZ|EB|OZ|TG|TO|N|OA|GM|OB|CA|EH|FW|OF|OL|OE|OG|BH|LR|OS|AA|GD|OH|KY|NP|WK|PB|PA|PE|PI|PS|P|PM|PR|RA|RV|RE|R|H|SB|WN|RS|RD|RT|BM|NE|GV|RP|SU|GL|RO|GÜ|RH|EG|RW|PN|SK|MQ|RU|SZ|RI|SL|SM|SC|HR|FZ|VS|SW|SN|CR|SE|SI|SO|LP|SG|NH|SP|IZ|ST|BF|TE|HV|OD|SR|S|AC|DW|ZW|TF|TS|TR|TÜ|UM|PZ|TP|UE|UN|UH|MN|KK|VB|V|AE|PL|RC|VG|GW|PW|VR|VK|KB|WA|WT|BE|WM|WE|AP|MO|WW|FB|WZ|WI|WB|JE|WF|WO|W|WÜ|BL|Z|GC)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(AIC|FDB|ABG|SLN|SAW|KLZ|BUL|ESB|NAB|SUL|WST|ABI|AZE|BTF|KÖT|DKB|FEU|ROT|ALZ|SMÜ|WER|AUR|NOR|DÜW|BRK|HAB|TÖL|WOR|BAD|BAR|BER|BIW|EBS|KEM|MÜB|PEG|BGL|BGD|REI|WIL|BKS|BIR|WAT|BOR|BOH|BOT|BRB|BLK|HHM|NEB|NMB|WSF|LEO|HDL|WMS|WZL|BÜS|CHA|KÖZ|ROD|WÜM|CLP|NEC|COC|ZEL|COE|CUX|DAH|LDS|DEG|DEL|RSL|DLG|DGF|LAN|HEI|MED|DON|KIB|ROK|JÜL|MON|SLE|EBE|EIC|HIG|WBS|BIT|PRÜ|LIB|EMD|WIT|ERH|HÖS|ERZ|ANA|ASZ|MAB|MEK|STL|SZB|FDS|HCH|HOR|WOL|FRG|GRA|WOS|FRI|FFB|GAP|GER|BRL|CLZ|GTH|NOH|HGW|GRZ|LÖB|NOL|WSW|DUD|HMÜ|OHA|KRU|HAL|HAM|HBS|QLB|HVL|NAU|HAS|EBN|GEO|HOH|HDH|ERK|HER|WAN|HEF|ROF|HBN|ALF|HSK|USI|NAI|REH|SAN|KÜN|ÖHR|HOL|WAR|ARN|BRG|GNT|HOG|WOH|KEH|MAI|PAR|RID|ROL|KLE|GEL|KUS|KYF|ART|SDH|LDK|DIL|MAL|VIB|LER|BNA|GHA|GRM|MTL|WUR|LEV|LIF|STE|WEL|LIP|VAI|LUP|HGN|LBZ|LWL|PCH|STB|DAN|MKK|SLÜ|MSP|TBB|MGH|MTK|BIN|MSH|EIL|HET|SGH|BID|MYK|MSE|MST|MÜR|WRN|MEI|GRH|RIE|MZG|MIL|OBB|BED|FLÖ|MOL|FRW|SEE|SRB|AIB|MOS|BCH|ILL|SOB|NMS|NEA|SEF|UFF|NEW|VOH|NDH|TDO|NWM|GDB|GVM|WIS|NOM|EIN|GAN|LAU|HEB|OHV|OSL|SFB|ERB|LOS|BSK|KEL|BSB|MEL|WTL|OAL|FÜS|MOD|OHZ|OPR|BÜR|PAF|PLÖ|CAS|GLA|REG|VIT|ECK|SIM|GOA|EMS|DIZ|GOH|RÜD|SWA|NES|KÖN|MET|LRO|BÜZ|DBR|ROS|TET|HRO|ROW|BRV|HIP|PAN|GRI|SHK|EIS|SRO|SOK|LBS|SCZ|MER|QFT|SLF|SLS|HOM|SLK|ASL|BBG|SBK|SFT|SHG|MGN|MEG|ZIG|SAD|NEN|OVI|SHA|BLB|SIG|SON|SPN|FOR|GUB|SPB|IGB|WND|STD|STA|SDL|OBG|HST|BOG|SHL|PIR|FTL|SEB|SÖM|SÜW|TIR|SAB|TUT|ANG|SDT|LÜN|LSZ|MHL|VEC|VER|VIE|OVL|ANK|OVP|SBG|UEM|UER|WLG|GMN|NVP|RDG|RÜG|DAU|FKB|WAF|WAK|SLZ|WEN|SOG|APD|WUG|GUN|ESW|WIZ|WES|DIN|BRA|BÜD|WHV|HWI|GHC|WTM|WOB|WUN|MAK|SEL|OCH|HOT|WDA)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(t)},"de-LI":function(t){return/^FL[- ]?\d{1,5}[UZ]?$/.test(t)},"fi-FI":function(t){return/^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(t)},"pt-PT":function(t){return/^([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})$/.test(t)},"sq-AL":function(t){return/^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(t)},"pt-BR":function(t){return/^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(t)}};function cL(e,t){if((0,iL.default)(e),t in Zf)return Zf[t](e);if(t==="any"){for(var r in Zf){var o=Zf[r];if(o(e))return!0}return!1}throw new Error("Invalid locale '".concat(t,"'"))}iv.exports=Hu.default;iv.exports.default=Hu.default});var Qw=R(($u,sv)=>{"use strict";g();y();Object.defineProperty($u,"__esModule",{value:!0});$u.default=mL;var uL=Xw(Ir()),lL=Xw(ve());function Xw(e){return e&&e.__esModule?e:{default:e}}var dL=/^[A-Z]$/,fL=/^[a-z]$/,pL=/^[0-9]$/,hL=/^[-#!$@%^&*()_+|~=`{}\[\]:";'<>?,.\/ ]$/,gL={minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1,returnScore:!1,pointsPerUnique:1,pointsPerRepeat:.5,pointsForContainingLower:10,pointsForContainingUpper:10,pointsForContainingNumber:10,pointsForContainingSymbol:10};function yL(e){var t={};return Array.from(e).forEach(function(r){var o=t[r];o?t[r]+=1:t[r]=1}),t}function vL(e){var t=yL(e),r={length:e.length,uniqueChars:Object.keys(t).length,uppercaseCount:0,lowercaseCount:0,numberCount:0,symbolCount:0};return Object.keys(t).forEach(function(o){dL.test(o)?r.uppercaseCount+=t[o]:fL.test(o)?r.lowercaseCount+=t[o]:pL.test(o)?r.numberCount+=t[o]:hL.test(o)&&(r.symbolCount+=t[o])}),r}function bL(e,t){var r=0;return r+=e.uniqueChars*t.pointsPerUnique,r+=(e.length-e.uniqueChars)*t.pointsPerRepeat,e.lowercaseCount>0&&(r+=t.pointsForContainingLower),e.uppercaseCount>0&&(r+=t.pointsForContainingUpper),e.numberCount>0&&(r+=t.pointsForContainingNumber),e.symbolCount>0&&(r+=t.pointsForContainingSymbol),r}function mL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;(0,lL.default)(e);var r=vL(e);return t=(0,uL.default)(t||{},gL),t.returnScore?bL(r,t):r.length>=t.minLength&&r.lowercaseCount>=t.minLowercase&&r.uppercaseCount>=t.minUppercase&&r.numberCount>=t.minNumbers&&r.symbolCount>=t.minSymbols}sv.exports=$u.default;sv.exports.default=$u.default});var t8=R(Ku=>{"use strict";g();y();Object.defineProperty(Ku,"__esModule",{value:!0});Ku.default=AL;Ku.vatMatchers=void 0;var e8=xL(ve());function xL(e){return e&&e.__esModule?e:{default:e}}var cv={GB:/^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/,IT:/^(IT)?[0-9]{11}$/,NL:/^(NL)?[0-9]{9}B[0-9]{2}$/};Ku.vatMatchers=cv;function AL(e,t){if((0,e8.default)(e),(0,e8.default)(t),t in cv)return cv[t].test(e);throw new Error("Invalid country code: '".concat(t,"'"))}});var u8=R((Bi,uv)=>{"use strict";g();y();function Jf(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Jf=function(r){return typeof r}:Jf=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Jf(e)}Object.defineProperty(Bi,"__esModule",{value:!0});Bi.default=void 0;var wL=xe(If()),_L=xe(ug()),CL=xe(M6()),BL=xe(N6()),EL=xe(D6()),PL=xe(U6()),TL=xe(L6()),SL=xe(V6()),OL=xe(K6()),IL=xe(Z6()),kL=xe(vc()),FL=xe(eA()),RL=xe(Lf()),ML=xe(Og()),NL=xe(iA()),DL=xe(sA()),r8=Ci(cA()),o8=Ci(uA()),WL=xe(lA()),UL=xe(fA()),LL=xe(pA()),jL=xe(hA()),zL=xe(gA()),qL=xe(yA()),VL=xe(vA()),GL=xe(qg()),HL=xe(Vg()),$L=xe(xA()),KL=xe(AA()),ZL=xe(CA()),JL=xe(BA()),YL=xe(zf()),n8=Ci(sg()),XL=xe(TA()),QL=xe(ey()),ej=xe(SA()),tj=xe(IA()),rj=xe(kA()),oj=xe(MA()),nj=xe(NA()),aj=xe(DA()),a8=Ci(WA()),ij=xe(LA()),sj=xe(jA()),cj=xe(zA()),uj=xe(GA()),lj=xe($A()),dj=xe(ZA()),fj=xe(JA()),pj=xe(xg()),hj=xe(YA()),gj=xe(QA()),yj=xe(rw()),vj=xe(aw()),bj=xe(sw()),mj=xe(cw()),xj=xe(lw()),Aj=xe(dw()),wj=xe(fw()),_j=xe(pw()),Cj=xe(hw()),Bj=xe(xw()),i8=Ci(Aw()),Ej=xe(ww()),Pj=xe(Cw()),Tj=xe(Bw()),Sj=xe(Ew()),Oj=xe(Sw()),Ij=xe(cy()),kj=xe(Ow()),Fj=xe(kw()),Rj=xe(Fw()),Mj=xe(Rw()),Nj=xe(py()),Dj=xe(Mw()),Wj=xe(Nw()),Uj=xe(Dw()),Lj=xe(Uw()),s8=Ci(Lw()),jj=xe($y()),zj=xe(Zy()),qj=xe(zw()),Vj=xe(qw()),Gj=xe(Vw()),Hj=xe(Hw()),$j=xe($w()),Kj=xe(ev()),Zj=xe(Kw()),Jj=xe(Zw()),Yj=xe(Jw()),Xj=xe(Yw()),Qj=xe(Qw()),ez=xe(t8());function c8(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return c8=function(){return e},e}function Ci(e){if(e&&e.__esModule)return e;if(e===null||Jf(e)!=="object"&&typeof e!="function")return{default:e};var t=c8();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var c=o?Object.getOwnPropertyDescriptor(e,a):null;c&&(c.get||c.set)?Object.defineProperty(r,a,c):r[a]=e[a]}return r.default=e,t&&t.set(e,r),r}function xe(e){return e&&e.__esModule?e:{default:e}}var tz="13.7.0",rz={version:tz,toDate:wL.default,toFloat:_L.default,toInt:CL.default,toBoolean:BL.default,equals:EL.default,contains:PL.default,matches:TL.default,isEmail:SL.default,isURL:OL.default,isMACAddress:IL.default,isIP:kL.default,isIPRange:FL.default,isFQDN:RL.default,isBoolean:NL.default,isIBAN:a8.default,isBIC:ij.default,isAlpha:r8.default,isAlphaLocales:r8.locales,isAlphanumeric:o8.default,isAlphanumericLocales:o8.locales,isNumeric:WL.default,isPassportNumber:UL.default,isPort:LL.default,isLowercase:jL.default,isUppercase:zL.default,isAscii:VL.default,isFullWidth:GL.default,isHalfWidth:HL.default,isVariableWidth:$L.default,isMultibyte:KL.default,isSemVer:ZL.default,isSurrogatePair:JL.default,isInt:YL.default,isIMEI:qL.default,isFloat:n8.default,isFloatLocales:n8.locales,isDecimal:XL.default,isHexadecimal:QL.default,isOctal:ej.default,isDivisibleBy:tj.default,isHexColor:rj.default,isRgbColor:oj.default,isHSL:nj.default,isISRC:aj.default,isMD5:sj.default,isHash:cj.default,isJWT:uj.default,isJSON:lj.default,isEmpty:dj.default,isLength:fj.default,isLocale:DL.default,isByteLength:pj.default,isUUID:hj.default,isMongoId:gj.default,isAfter:yj.default,isBefore:vj.default,isIn:bj.default,isCreditCard:mj.default,isIdentityCard:xj.default,isEAN:Aj.default,isISIN:wj.default,isISBN:_j.default,isISSN:Cj.default,isMobilePhone:i8.default,isMobilePhoneLocales:i8.locales,isPostalCode:s8.default,isPostalCodeLocales:s8.locales,isEthereumAddress:Ej.default,isCurrency:Pj.default,isBtcAddress:Tj.default,isISO8601:Sj.default,isRFC3339:Oj.default,isISO31661Alpha2:Ij.default,isISO31661Alpha3:kj.default,isISO4217:Fj.default,isBase32:Rj.default,isBase58:Mj.default,isBase64:Nj.default,isDataURI:Dj.default,isMagnetURI:Wj.default,isMimeType:Uj.default,isLatLong:Lj.default,ltrim:jj.default,rtrim:zj.default,trim:qj.default,escape:Vj.default,unescape:Gj.default,stripLow:Hj.default,whitelist:$j.default,blacklist:Kj.default,isWhitelisted:Zj.default,normalizeEmail:Jj.default,toString,isSlug:Yj.default,isStrongPassword:Qj.default,isTaxID:Bj.default,isDate:ML.default,isLicensePlate:Xj.default,isVAT:ez.default,ibanLocales:a8.locales},oz=rz;Bi.default=oz;uv.exports=Bi.default;uv.exports.default=Bi.default});var lv=R((Yte,l8)=>{"use strict";g();y();l8.exports=function(t,r){return function(){return t.apply(r,arguments)}}});var Rt=R((ere,h8)=>{"use strict";g();y();var nz=lv(),pv=Object.prototype.toString,hv=function(e){return function(t){var r=pv.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function kn(e){return e=e.toLowerCase(),function(r){return hv(r)===e}}function Xf(e){return Array.isArray(e)}function dv(e){return typeof e>"u"}function az(e){return e!==null&&!dv(e)&&e.constructor!==null&&!dv(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}var d8=kn("ArrayBuffer");function iz(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&d8(e.buffer),t}function sz(e){return typeof e=="string"}function f8(e){return typeof e=="number"}function p8(e){return e!==null&&typeof e=="object"}function Yf(e){if(hv(e)!=="object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function cz(e){return e&&Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}var uz=kn("Date"),lz=kn("File"),dz=kn("Blob"),fz=kn("FileList");function gv(e){return pv.call(e)==="[object Function]"}function pz(e){return p8(e)&&gv(e.pipe)}function hz(e){var t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||pv.call(e)===t||gv(e.toString)&&e.toString()===t)}var gz=kn("URLSearchParams");function yz(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function vz(){var e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"}function yv(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),Xf(e))for(var r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}function fv(){var e={};function t(a,c){Yf(e[c])&&Yf(a)?e[c]=fv(e[c],a):Yf(a)?e[c]=fv({},a):Xf(a)?e[c]=a.slice():e[c]=a}for(var r=0,o=arguments.length;r<o;r++)yv(arguments[r],t);return e}function bz(e,t,r){return yv(t,function(a,c){r&&typeof a=="function"?e[c]=nz(a,r):e[c]=a}),e}function mz(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function xz(e,t,r,o){e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)}function Az(e,t,r,o){var a,c,s,n={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),c=a.length;c-- >0;)s=a[c],(!o||o(s,e,t))&&!n[s]&&(t[s]=e[s],n[s]=!0);e=r!==!1&&Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t}function wz(e,t,r){e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;var o=e.indexOf(t,r);return o!==-1&&o===r}function _z(e){if(!e)return null;if(Xf(e))return e;var t=e.length;if(!f8(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r}var Cz=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));function Bz(e,t){for(var r=e&&e[Symbol.iterator],o=r.call(e),a;(a=o.next())&&!a.done;){var c=a.value;t.call(e,c[0],c[1])}}function Ez(e,t){for(var r,o=[];(r=e.exec(t))!==null;)o.push(r);return o}var Pz=kn("HTMLFormElement"),Tz=function(t){return function(r,o){return t.call(r,o)}}(Object.prototype.hasOwnProperty);h8.exports={isArray:Xf,isArrayBuffer:d8,isBuffer:az,isFormData:hz,isArrayBufferView:iz,isString:sz,isNumber:f8,isObject:p8,isPlainObject:Yf,isEmptyObject:cz,isUndefined:dv,isDate:uz,isFile:lz,isBlob:dz,isFunction:gv,isStream:pz,isURLSearchParams:gz,isStandardBrowserEnv:vz,forEach:yv,merge:fv,extend:bz,trim:yz,stripBOM:mz,inherits:xz,toFlatObject:Az,kindOf:hv,kindOfTest:kn,endsWith:wz,toArray:_z,isTypedArray:Cz,isFileList:fz,forEachEntry:Bz,matchAll:Ez,isHTMLForm:Pz,hasOwnProperty:Tz}});var Fn=R((ore,b8)=>{"use strict";g();y();var g8=Rt();function Ei(e,t,r,o,a){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),o&&(this.request=o),a&&(this.response=a)}g8.inherits(Ei,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var y8=Ei.prototype,v8={};["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(function(e){v8[e]={value:e}});Object.defineProperties(Ei,v8);Object.defineProperty(y8,"isAxiosError",{value:!0});Ei.from=function(e,t,r,o,a,c){var s=Object.create(y8);return g8.toFlatObject(e,s,function(i){return i!==Error.prototype}),Ei.call(s,e.message,t,r,o,a),s.cause=e,s.name=e.name,c&&Object.assign(s,c),s};b8.exports=Ei});var x8=R((ire,m8)=>{g();y();m8.exports=typeof self=="object"?self.FormData:window.FormData});var w8=R((ure,A8)=>{g();y();A8.exports=x8()});var Zu=R((fre,B8)=>{"use strict";g();y();var mt=Rt(),Sz=Fn(),Oz=w8();function vv(e){return mt.isPlainObject(e)||mt.isArray(e)}function C8(e){return mt.endsWith(e,"[]")?e.slice(0,-2):e}function _8(e,t,r){return e?e.concat(t).map(function(a,c){return a=C8(a),!r&&c?"["+a+"]":a}).join(r?".":""):t}function Iz(e){return mt.isArray(e)&&!e.some(vv)}var kz=mt.toFlatObject(mt,{},null,function(t){return/^is[A-Z]/.test(t)});function Fz(e){return e&&mt.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Rz(e,t,r){if(!mt.isObject(e))throw new TypeError("target must be an object");t=t||new(Oz||FormData),r=mt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(K,te){return!mt.isUndefined(te[K])});var o=r.metaTokens,a=r.visitor||l,c=r.dots,s=r.indexes,n=r.Blob||typeof Blob<"u"&&Blob,i=n&&Fz(t);if(!mt.isFunction(a))throw new TypeError("visitor must be a function");function u(G){if(G===null)return"";if(mt.isDate(G))return G.toISOString();if(!i&&mt.isBlob(G))throw new Sz("Blob is not supported. Use a Buffer instead.");return mt.isArrayBuffer(G)||mt.isTypedArray(G)?i&&typeof Blob=="function"?new Blob([G]):k.Buffer.from(G):G}function l(G,K,te){var ae=G;if(G&&!te&&typeof G=="object"){if(mt.endsWith(K,"{}"))K=o?K:K.slice(0,-2),G=JSON.stringify(G);else if(mt.isArray(G)&&Iz(G)||mt.isFileList(G)||mt.endsWith(K,"[]")&&(ae=mt.toArray(G)))return K=C8(K),ae.forEach(function(Ce,Ne){!(mt.isUndefined(Ce)||Ce===null)&&t.append(s===!0?_8([K],Ne,c):s===null?K:K+"[]",u(Ce))}),!1}return vv(G)?!0:(t.append(_8(te,K,c),u(G)),!1)}var x=[],N=Object.assign(kz,{defaultVisitor:l,convertValue:u,isVisitable:vv});function F(G,K){if(!mt.isUndefined(G)){if(x.indexOf(G)!==-1)throw Error("Circular reference detected in "+K.join("."));x.push(G),mt.forEach(G,function(ae,ge){var Ce=!(mt.isUndefined(ae)||ae===null)&&a.call(t,ae,mt.isString(ge)?ge.trim():ge,K,N);Ce===!0&&F(ae,K?K.concat(ge):[ge])}),x.pop()}}if(!mt.isObject(e))throw new TypeError("data must be an object");return F(e),t}B8.exports=Rz});var bv=R((gre,S8)=>{"use strict";g();y();var Mz=Zu();function E8(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(o){return t[o]})}function P8(e,t){this._pairs=[],e&&Mz(e,this,t)}var T8=P8.prototype;T8.append=function(t,r){this._pairs.push([t,r])};T8.toString=function(t){var r=t?function(o){return t.call(this,o,E8)}:E8;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};S8.exports=P8});var Qf=R((bre,O8)=>{"use strict";g();y();var Nz=Rt(),Dz=bv();function Wz(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}O8.exports=function(t,r,o){if(!r)return t;var a=t.indexOf("#");a!==-1&&(t=t.slice(0,a));var c=o&&o.encode||Wz,s=o&&o.serialize,n;return s?n=s(r,o):n=Nz.isURLSearchParams(r)?r.toString():new Dz(r,o).toString(c),n&&(t+=(t.indexOf("?")===-1?"?":"&")+n),t}});var k8=R((Are,I8)=>{"use strict";g();y();var Uz=Rt();function Ju(){this.handlers=[]}Ju.prototype.use=function(t,r,o){return this.handlers.push({fulfilled:t,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1};Ju.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};Ju.prototype.clear=function(){this.handlers&&(this.handlers=[])};Ju.prototype.forEach=function(t){Uz.forEach(this.handlers,function(o){o!==null&&t(o)})};I8.exports=Ju});var mv=R((Cre,F8)=>{"use strict";g();y();var Lz=Rt();F8.exports=function(t,r){Lz.forEach(t,function(a,c){c!==r&&c.toUpperCase()===r.toUpperCase()&&(t[r]=a,delete t[c])})}});var xv=R((Pre,R8)=>{"use strict";g();y();R8.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});var N8=R((Ore,M8)=>{"use strict";g();y();var jz=bv();M8.exports=typeof URLSearchParams<"u"?URLSearchParams:jz});var W8=R((Fre,D8)=>{"use strict";g();y();D8.exports=FormData});var L8=R((Nre,U8)=>{"use strict";g();y();U8.exports={isBrowser:!0,classes:{URLSearchParams:N8(),FormData:W8(),Blob},protocols:["http","https","file","blob","url","data"]}});var ep=R((Ure,j8)=>{"use strict";g();y();j8.exports=L8()});var V8=R((zre,q8)=>{"use strict";g();y();var zz=Rt(),qz=Zu(),z8=ep();q8.exports=function(t,r){return qz(t,new z8.classes.URLSearchParams,Object.assign({visitor:function(o,a,c,s){return z8.isNode&&zz.isBuffer(o)?(this.append(a,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},r))}});var Av=R((Gre,G8)=>{"use strict";g();y();var Rn=Rt();function Vz(e){return Rn.matchAll(/\w+|\[(\w*)]/g,e).map(function(t){return t[0]==="[]"?"":t[1]||t[0]})}function Gz(e){var t={},r=Object.keys(e),o,a=r.length,c;for(o=0;o<a;o++)c=r[o],t[c]=e[c];return t}function Hz(e){function t(o,a,c,s){var n=o[s++];if(n==="__proto__")return!0;var i=Number.isFinite(+n),u=s>=o.length;if(n=!n&&Rn.isArray(c)?c.length:n,u)return Rn.hasOwnProperty(c,n)?c[n]=[c[n],a]:c[n]=a,!i;(!c[n]||!Rn.isObject(c[n]))&&(c[n]=[]);var l=t(o,a,c[n],s);return l&&Rn.isArray(c[n])&&(c[n]=Gz(c[n])),!i}if(Rn.isFormData(e)&&Rn.isFunction(e.entries)){var r={};return Rn.forEachEntry(e,function(o,a){t(Vz(o),a,r,0)}),r}return null}G8.exports=Hz});var _v=R((Kre,H8)=>{"use strict";g();y();var wv=Fn();H8.exports=function(t,r,o){var a=o.config.validateStatus;!o.status||!a||a(o.status)?t(o):r(new wv("Request failed with status code "+o.status,[wv.ERR_BAD_REQUEST,wv.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}});var K8=R((Yre,$8)=>{"use strict";g();y();var tp=Rt();$8.exports=tp.isStandardBrowserEnv()?function(){return{write:function(r,o,a,c,s,n){var i=[];i.push(r+"="+encodeURIComponent(o)),tp.isNumber(a)&&i.push("expires="+new Date(a).toGMTString()),tp.isString(c)&&i.push("path="+c),tp.isString(s)&&i.push("domain="+s),n===!0&&i.push("secure"),document.cookie=i.join("; ")},read:function(r){var o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var J8=R((eoe,Z8)=>{"use strict";g();y();Z8.exports=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}});var X8=R((ooe,Y8)=>{"use strict";g();y();Y8.exports=function(t,r){return r?t.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):t}});var rp=R((ioe,Q8)=>{"use strict";g();y();var $z=J8(),Kz=X8();Q8.exports=function(t,r,o){var a=!$z(r);return t&&(a||o===!1)?Kz(t,r):r}});var t9=R((uoe,e9)=>{"use strict";g();y();var Cv=Rt(),Zz=["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"];e9.exports=function(t){var r={},o,a,c;return t&&Cv.forEach(t.split(`
`),function(n){if(c=n.indexOf(":"),o=Cv.trim(n.slice(0,c)).toLowerCase(),a=Cv.trim(n.slice(c+1)),o){if(r[o]&&Zz.indexOf(o)>=0)return;o==="set-cookie"?r[o]=(r[o]?r[o]:[]).concat([a]):r[o]=r[o]?r[o]+", "+a:a}}),r}});var n9=R((foe,o9)=>{"use strict";g();y();var r9=Rt();o9.exports=r9.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),o;function a(c){var s=c;return t&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return o=a(window.location.href),function(s){var n=r9.isString(s)?a(s):s;return n.protocol===o.protocol&&n.host===o.host}}():function(){return function(){return!0}}()});var Yu=R((goe,i9)=>{"use strict";g();y();var Bv=Fn(),Jz=Rt();function a9(e,t,r){Bv.call(this,e??"canceled",Bv.ERR_CANCELED,t,r),this.name="CanceledError"}Jz.inherits(a9,Bv,{__CANCEL__:!0});i9.exports=a9});var c9=R((boe,s9)=>{"use strict";g();y();s9.exports=function(t){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return r&&r[1]||""}});var Ev=R((Aoe,u9)=>{"use strict";g();y();var Pi=Rt(),Yz=_v(),Xz=K8(),Qz=Qf(),eq=rp(),tq=t9(),rq=n9(),oq=xv(),Jo=Fn(),nq=Yu(),aq=c9(),iq=ep();u9.exports=function(t){return new Promise(function(o,a){var c=t.data,s=t.headers,n=t.responseType,i=t.withXSRFToken,u;function l(){t.cancelToken&&t.cancelToken.unsubscribe(u),t.signal&&t.signal.removeEventListener("abort",u)}Pi.isFormData(c)&&Pi.isStandardBrowserEnv()&&delete s["Content-Type"];var x=new XMLHttpRequest;if(t.auth){var N=t.auth.username||"",F=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.Authorization="Basic "+btoa(N+":"+F)}var G=eq(t.baseURL,t.url,t.allowAbsoluteUrls);x.open(t.method.toUpperCase(),Qz(G,t.params,t.paramsSerializer),!0),x.timeout=t.timeout;function K(){if(!!x){var ge="getAllResponseHeaders"in x?tq(x.getAllResponseHeaders()):null,Ce=!n||n==="text"||n==="json"?x.responseText:x.response,Ne={data:Ce,status:x.status,statusText:x.statusText,headers:ge,config:t,request:x};Yz(function(Se){o(Se),l()},function(Se){a(Se),l()},Ne),x=null}}if("onloadend"in x?x.onloadend=K:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(K)},x.onabort=function(){!x||(a(new Jo("Request aborted",Jo.ECONNABORTED,t,x)),x=null)},x.onerror=function(){a(new Jo("Network Error",Jo.ERR_NETWORK,t,x)),x=null},x.ontimeout=function(){var Ce=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",Ne=t.transitional||oq;t.timeoutErrorMessage&&(Ce=t.timeoutErrorMessage),a(new Jo(Ce,Ne.clarifyTimeoutError?Jo.ETIMEDOUT:Jo.ECONNABORTED,t,x)),x=null},Pi.isStandardBrowserEnv()&&(i&&Pi.isFunction(i)&&(i=i(t)),i||i!==!1&&rq(G))){var te=t.xsrfHeaderName&&t.xsrfCookieName&&Xz.read(t.xsrfCookieName);te&&(s[t.xsrfHeaderName]=te)}"setRequestHeader"in x&&Pi.forEach(s,function(Ce,Ne){typeof c>"u"&&Ne.toLowerCase()==="content-type"?delete s[Ne]:x.setRequestHeader(Ne,Ce)}),Pi.isUndefined(t.withCredentials)||(x.withCredentials=!!t.withCredentials),n&&n!=="json"&&(x.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&x.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&x.upload&&x.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(u=function(ge){!x||(a(!ge||ge.type?new nq(null,t,x):ge),x.abort(),x=null)},t.cancelToken&&t.cancelToken.subscribe(u),t.signal&&(t.signal.aborted?u():t.signal.addEventListener("abort",u))),!c&&c!==!1&&c!==0&&c!==""&&(c=null);var ae=aq(G);if(ae&&iq.protocols.indexOf(ae)===-1){a(new Jo("Unsupported protocol "+ae+":",Jo.ERR_BAD_REQUEST,t));return}x.send(c)})}});var np=R((Coe,h9)=>{"use strict";g();y();var jt=Rt(),l9=mv(),d9=Fn(),sq=xv(),cq=Zu(),uq=V8(),f9=ep(),lq=Av(),dq={"Content-Type":"application/x-www-form-urlencoded"};function p9(e,t){!jt.isUndefined(e)&&jt.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function fq(){var e;return typeof XMLHttpRequest<"u"?e=Ev():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(e=Ev()),e}function pq(e,t,r){if(jt.isString(e))try{return(t||JSON.parse)(e),jt.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(e)}var op={transitional:sq,adapter:fq(),transformRequest:[function(t,r){l9(r,"Accept"),l9(r,"Content-Type");var o=r&&r["Content-Type"]||"",a=o.indexOf("application/json")>-1,c=jt.isObject(t);c&&jt.isHTMLForm(t)&&(t=new FormData(t));var s=jt.isFormData(t);if(s)return a?JSON.stringify(lq(t)):t;if(jt.isArrayBuffer(t)||jt.isBuffer(t)||jt.isStream(t)||jt.isFile(t)||jt.isBlob(t))return t;if(jt.isArrayBufferView(t))return t.buffer;if(jt.isURLSearchParams(t))return p9(r,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var n;if(c){if(o.indexOf("application/x-www-form-urlencoded")!==-1)return uq(t,this.formSerializer).toString();if((n=jt.isFileList(t))||o.indexOf("multipart/form-data")>-1){var i=this.env&&this.env.FormData;return cq(n?{"files[]":t}:t,i&&new i,this.formSerializer)}}return c||a?(p9(r,"application/json"),pq(t)):t}],transformResponse:[function(t){var r=this.transitional||op.transitional,o=r&&r.forcedJSONParsing,a=this.responseType==="json";if(t&&jt.isString(t)&&(o&&!this.responseType||a)){var c=r&&r.silentJSONParsing,s=!c&&a;try{return JSON.parse(t)}catch(n){if(s)throw n.name==="SyntaxError"?d9.from(n,d9.ERR_BAD_RESPONSE,this,null,this.response):n}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:f9.classes.FormData,Blob:f9.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};jt.forEach(["delete","get","head"],function(t){op.headers[t]={}});jt.forEach(["post","put","patch"],function(t){op.headers[t]=jt.merge(dq)});h9.exports=op});var y9=R((Poe,g9)=>{"use strict";g();y();var hq=Rt(),gq=np();g9.exports=function(t,r,o,a){var c=this||gq;return hq.forEach(a,function(n){t=n.call(c,t,r,o)}),t}});var Pv=R((Ooe,v9)=>{"use strict";g();y();v9.exports=function(t){return!!(t&&t.__CANCEL__)}});var A9=R((Foe,x9)=>{"use strict";g();y();var b9=Rt(),Tv=y9(),yq=Pv(),vq=np(),bq=Yu(),m9=mv();function Sv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new bq}x9.exports=function(t){Sv(t),t.headers=t.headers||{},t.data=Tv.call(t,t.data,t.headers,null,t.transformRequest),m9(t.headers,"Accept"),m9(t.headers,"Content-Type"),t.headers=b9.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),b9.forEach(["delete","get","head","post","put","patch","common"],function(a){delete t.headers[a]});var r=t.adapter||vq.adapter;return r(t).then(function(a){return Sv(t),a.data=Tv.call(t,a.data,a.headers,a.status,t.transformResponse),a},function(a){return yq(a)||(Sv(t),a&&a.response&&(a.response.data=Tv.call(t,a.response.data,a.response.headers,a.response.status,t.transformResponse))),Promise.reject(a)})}});var Ov=R((Noe,w9)=>{"use strict";g();y();var _r=Rt();w9.exports=function(t,r){r=r||{};var o={};function a(l,x){return _r.isPlainObject(l)&&_r.isPlainObject(x)?_r.merge(l,x):_r.isEmptyObject(x)?_r.merge({},l):_r.isPlainObject(x)?_r.merge({},x):_r.isArray(x)?x.slice():x}function c(l){if(_r.isUndefined(r[l])){if(!_r.isUndefined(t[l]))return a(void 0,t[l])}else return a(t[l],r[l])}function s(l){if(!_r.isUndefined(r[l]))return a(void 0,r[l])}function n(l){if(_r.isUndefined(r[l])){if(!_r.isUndefined(t[l]))return a(void 0,t[l])}else return a(void 0,r[l])}function i(l){if(l in r)return a(t[l],r[l]);if(l in t)return a(void 0,t[l])}var u={url:s,method:s,data:s,baseURL:n,transformRequest:n,transformResponse:n,paramsSerializer:n,timeout:n,timeoutMessage:n,withCredentials:n,withXSRFToken:n,adapter:n,responseType:n,xsrfCookieName:n,xsrfHeaderName:n,onUploadProgress:n,onDownloadProgress:n,decompress:n,maxContentLength:n,maxBodyLength:n,beforeRedirect:n,transport:n,httpAgent:n,httpsAgent:n,cancelToken:n,socketPath:n,responseEncoding:n,validateStatus:i};return _r.forEach(Object.keys(t).concat(Object.keys(r)),function(x){var N=u[x]||c,F=N(x);_r.isUndefined(F)&&N!==i||(o[x]=F)}),o}});var Iv=R((Uoe,_9)=>{g();y();_9.exports={version:"0.30.0"}});var E9=R((zoe,B9)=>{"use strict";g();y();var mq=Iv().version,Mn=Fn(),kv={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){kv[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});var C9={};kv.transitional=function(t,r,o){function a(c,s){return"[Axios v"+mq+"] Transitional option '"+c+"'"+s+(o?". "+o:"")}return function(c,s,n){if(t===!1)throw new Mn(a(s," has been removed"+(r?" in "+r:"")),Mn.ERR_DEPRECATED);return r&&!C9[s]&&(C9[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(c,s,n):!0}};function xq(e,t,r){if(typeof e!="object")throw new Mn("options must be an object",Mn.ERR_BAD_OPTION_VALUE);for(var o=Object.keys(e),a=o.length;a-- >0;){var c=o[a],s=t[c];if(s){var n=e[c],i=n===void 0||s(n,c,e);if(i!==!0)throw new Mn("option "+c+" must be "+i,Mn.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Mn("Unknown option "+c,Mn.ERR_BAD_OPTION)}}B9.exports={assertOptions:xq,validators:kv}});var O9=R((Goe,S9)=>{"use strict";g();y();var Rv=Rt(),Aq=Qf(),P9=k8(),T9=A9(),ap=Ov(),wq=rp(),Fv=E9(),Nn=Fv.validators;function Ti(e){this.defaults=e,this.interceptors={request:new P9,response:new P9}}Ti.prototype.request=function(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ap(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var o=r.transitional;o!==void 0&&Fv.assertOptions(o,{silentJSONParsing:Nn.transitional(Nn.boolean),forcedJSONParsing:Nn.transitional(Nn.boolean),clarifyTimeoutError:Nn.transitional(Nn.boolean)},!1);var a=r.paramsSerializer;a!=null&&(Rv.isFunction(a)?r.paramsSerializer={serialize:a}:Fv.assertOptions(a,{encode:Nn.function,serialize:Nn.function},!0));var c=[],s=!0;this.interceptors.request.forEach(function(G){typeof G.runWhen=="function"&&G.runWhen(r)===!1||(s=s&&G.synchronous,c.unshift(G.fulfilled,G.rejected))});var n=[];this.interceptors.response.forEach(function(G){n.push(G.fulfilled,G.rejected)});var i;if(!s){var u=[T9,void 0];for(Array.prototype.unshift.apply(u,c),u=u.concat(n),i=Promise.resolve(r);u.length;)i=i.then(u.shift(),u.shift());return i}for(var l=r;c.length;){var x=c.shift(),N=c.shift();try{l=x(l)}catch(F){N(F);break}}try{i=T9(l)}catch(F){return Promise.reject(F)}for(;n.length;)i=i.then(n.shift(),n.shift());return i};Ti.prototype.getUri=function(t){t=ap(this.defaults,t);var r=wq(t.baseURL,t.url,t.allowAbsoluteUrls);return Aq(r,t.params,t.paramsSerializer)};Rv.forEach(["delete","get","head","options"],function(t){Ti.prototype[t]=function(r,o){return this.request(ap(o||{},{method:t,url:r,data:(o||{}).data}))}});Rv.forEach(["post","put","patch"],function(t){function r(o){return function(c,s,n){return this.request(ap(n||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:c,data:s}))}}Ti.prototype[t]=r(),Ti.prototype[t+"Form"]=r(!0)});S9.exports=Ti});var k9=R((Koe,I9)=>{"use strict";g();y();var _q=Yu();function Si(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(a){t=a});var r=this;this.promise.then(function(o){if(!!r._listeners){for(var a=r._listeners.length;a-- >0;)r._listeners[a](o);r._listeners=null}}),this.promise.then=function(o){var a,c=new Promise(function(s){r.subscribe(s),a=s}).then(o);return c.cancel=function(){r.unsubscribe(a)},c},e(function(a,c,s){r.reason||(r.reason=new _q(a,c,s),t(r.reason))})}Si.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Si.prototype.subscribe=function(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]};Si.prototype.unsubscribe=function(t){if(!!this._listeners){var r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}};Si.source=function(){var t,r=new Si(function(a){t=a});return{token:r,cancel:t}};I9.exports=Si});var R9=R((Yoe,F9)=>{"use strict";g();y();F9.exports=function(t){return function(o){return t.apply(null,o)}}});var N9=R((ene,M9)=>{"use strict";g();y();var Cq=Rt();M9.exports=function(t){return Cq.isObject(t)&&t.isAxiosError===!0}});var W9=R((one,Nv)=>{"use strict";g();y();var Mv=Rt(),Bq=lv(),ip=O9(),Eq=Ov(),Pq=np(),Tq=Av();function D9(e){var t=new ip(e),r=Bq(ip.prototype.request,t);return Mv.extend(r,ip.prototype,t),Mv.extend(r,t),r.create=function(a){return D9(Eq(e,a))},r}var Cr=D9(Pq);Cr.Axios=ip;Cr.CanceledError=Yu();Cr.CancelToken=k9();Cr.isCancel=Pv();Cr.VERSION=Iv().version;Cr.toFormData=Zu();Cr.AxiosError=Fn();Cr.Cancel=Cr.CanceledError;Cr.all=function(t){return Promise.all(t)};Cr.spread=R9();Cr.isAxiosError=N9();Cr.formToJSON=function(e){return Tq(Mv.isHTMLForm(e)?new FormData(e):e)};Nv.exports=Cr;Nv.exports.default=Cr});var L9=R((ine,U9)=>{g();y();U9.exports=W9()});var H9={};D_(H9,{default:()=>V9});async function V9(e){let t=Oq(e),r=[Sq(t,e)];e.timeout&&e.timeout>0&&r.push(new Promise(a=>{setTimeout(()=>{let c=e.timeoutErrorMessage?e.timeoutErrorMessage:"timeout of "+e.timeout+"ms exceeded";a(G9(c,e,"ECONNABORTED",t))},e.timeout)}));let o=await Promise.race(r);return new Promise((a,c)=>{o instanceof Error?c(o):Object.prototype.toString.call(e.settle)==="[object Function]"?e.settle(a,c,o):(0,j9.default)(a,c,o)})}async function Sq(e,t){let r;try{r=await fetch(e)}catch{return G9("Network Error",t,"ERR_NETWORK",e)}let o={ok:r.ok,status:r.status,statusText:r.statusText,headers:new Headers(r.headers),config:t,request:e};if(r.status>=200&&r.status!==204)switch(t.responseType){case"arraybuffer":o.data=await r.arrayBuffer();break;case"blob":o.data=await r.blob();break;case"json":o.data=await r.json();break;case"formData":o.data=await r.formData();break;default:o.data=await r.text();break}return o}function Oq(e){let t=new Headers(e.headers);if(e.auth){let s=e.auth.username||"",n=e.auth.password?decodeURI(encodeURIComponent(e.auth.password)):"";t.set("Authorization",`Basic ${btoa(s+":"+n)}`)}let r=e.method.toUpperCase(),o={headers:t,method:r};r!=="GET"&&r!=="HEAD"&&(o.body=e.data,(0,Oi.isFormData)(o.body)&&(0,Oi.isStandardBrowserEnv)()&&t.delete("Content-Type")),e.mode&&(o.mode=e.mode),e.cache&&(o.cache=e.cache),e.integrity&&(o.integrity=e.integrity),e.redirect&&(o.redirect=e.redirect),e.referrer&&(o.referrer=e.referrer),(0,Oi.isUndefined)(e.withCredentials)||(o.credentials=e.withCredentials?"include":"omit");let a=(0,q9.default)(e.baseURL,e.url),c=(0,z9.default)(a,e.params,e.paramsSerializer);return new Request(c,o)}function G9(e,t,r,o,a){if(Xu.default.AxiosError&&typeof Xu.default.AxiosError=="function")return new Xu.default.AxiosError(e,Xu.default.AxiosError[r],t,o,a);var c=new Error(e);return Iq(c,t,r,o,a)}function Iq(e,t,r,o,a){return e.config=t,r&&(e.code=r),e.request=o,e.response=a,e.isAxiosError=!0,e.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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}var Xu,j9,z9,q9,Oi,$9=N_(()=>{g();y();Xu=Ri(L9()),j9=Ri(_v()),z9=Ri(Qf()),q9=Ri(rp()),Oi=Ri(Rt())});var Z9=R((dne,Dv)=>{"use strict";g();y();var kq=Object.prototype.hasOwnProperty,Br="~";function Qu(){}Object.create&&(Qu.prototype=Object.create(null),new Qu().__proto__||(Br=!1));function Fq(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function K9(e,t,r,o,a){if(typeof r!="function")throw new TypeError("The listener must be a function");var c=new Fq(r,o||e,a),s=Br?Br+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],c]:e._events[s].push(c):(e._events[s]=c,e._eventsCount++),e}function sp(e,t){--e._eventsCount===0?e._events=new Qu:delete e._events[t]}function hr(){this._events=new Qu,this._eventsCount=0}hr.prototype.eventNames=function(){var t=[],r,o;if(this._eventsCount===0)return t;for(o in r=this._events)kq.call(r,o)&&t.push(Br?o.slice(1):o);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};hr.prototype.listeners=function(t){var r=Br?Br+t:t,o=this._events[r];if(!o)return[];if(o.fn)return[o.fn];for(var a=0,c=o.length,s=new Array(c);a<c;a++)s[a]=o[a].fn;return s};hr.prototype.listenerCount=function(t){var r=Br?Br+t:t,o=this._events[r];return o?o.fn?1:o.length:0};hr.prototype.emit=function(t,r,o,a,c,s){var n=Br?Br+t:t;if(!this._events[n])return!1;var i=this._events[n],u=arguments.length,l,x;if(i.fn){switch(i.once&&this.removeListener(t,i.fn,void 0,!0),u){case 1:return i.fn.call(i.context),!0;case 2:return i.fn.call(i.context,r),!0;case 3:return i.fn.call(i.context,r,o),!0;case 4:return i.fn.call(i.context,r,o,a),!0;case 5:return i.fn.call(i.context,r,o,a,c),!0;case 6:return i.fn.call(i.context,r,o,a,c,s),!0}for(x=1,l=new Array(u-1);x<u;x++)l[x-1]=arguments[x];i.fn.apply(i.context,l)}else{var N=i.length,F;for(x=0;x<N;x++)switch(i[x].once&&this.removeListener(t,i[x].fn,void 0,!0),u){case 1:i[x].fn.call(i[x].context);break;case 2:i[x].fn.call(i[x].context,r);break;case 3:i[x].fn.call(i[x].context,r,o);break;case 4:i[x].fn.call(i[x].context,r,o,a);break;default:if(!l)for(F=1,l=new Array(u-1);F<u;F++)l[F-1]=arguments[F];i[x].fn.apply(i[x].context,l)}}return!0};hr.prototype.on=function(t,r,o){return K9(this,t,r,o,!1)};hr.prototype.once=function(t,r,o){return K9(this,t,r,o,!0)};hr.prototype.removeListener=function(t,r,o,a){var c=Br?Br+t:t;if(!this._events[c])return this;if(!r)return sp(this,c),this;var s=this._events[c];if(s.fn)s.fn===r&&(!a||s.once)&&(!o||s.context===o)&&sp(this,c);else{for(var n=0,i=[],u=s.length;n<u;n++)(s[n].fn!==r||a&&!s[n].once||o&&s[n].context!==o)&&i.push(s[n]);i.length?this._events[c]=i.length===1?i[0]:i:sp(this,c)}return this};hr.prototype.removeAllListeners=function(t){var r;return t?(r=Br?Br+t:t,this._events[r]&&sp(this,r)):(this._events=new Qu,this._eventsCount=0),this};hr.prototype.off=hr.prototype.removeListener;hr.prototype.addListener=hr.prototype.on;hr.prefixed=Br;hr.EventEmitter=hr;typeof Dv<"u"&&(Dv.exports=hr)});var J9=R((hne,cp)=>{g();y();var ca=(q_(),Ib(z_));if(ca&&ca.default){cp.exports=ca.default;for(let e in ca)cp.exports[e]=ca[e]}else ca&&(cp.exports=ca)});var Uv=R(Y9=>{g();y();var Wr=eh(),up=Wr,Wv=typeof globalThis<"u"&&globalThis||typeof window<"u"&&window||typeof Wv<"u"&&Wv||typeof self<"u"&&self||function(){return this}.call(null)||Function("return this")();up.exportSymbol("proto.google.protobuf.Any",null,Wv);proto.google.protobuf.Any=function(e){Wr.Message.initialize(this,e,0,-1,null,null)};up.inherits(proto.google.protobuf.Any,Wr.Message);up.DEBUG&&!COMPILED&&(proto.google.protobuf.Any.displayName="proto.google.protobuf.Any");Wr.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Any.prototype.toObject=function(e){return proto.google.protobuf.Any.toObject(e,this)},proto.google.protobuf.Any.toObject=function(e,t){var r,o={typeUrl:Wr.Message.getFieldWithDefault(t,1,""),value:t.getValue_asB64()};return e&&(o.$jspbMessageInstance=t),o});proto.google.protobuf.Any.deserializeBinary=function(e){var t=new Wr.BinaryReader(e),r=new proto.google.protobuf.Any;return proto.google.protobuf.Any.deserializeBinaryFromReader(r,t)};proto.google.protobuf.Any.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){var r=t.getFieldNumber();switch(r){case 1:var o=t.readString();e.setTypeUrl(o);break;case 2:var o=t.readBytes();e.setValue(o);break;default:t.skipField();break}}return e};proto.google.protobuf.Any.prototype.serializeBinary=function(){var e=new Wr.BinaryWriter;return proto.google.protobuf.Any.serializeBinaryToWriter(this,e),e.getResultBuffer()};proto.google.protobuf.Any.serializeBinaryToWriter=function(e,t){var r=void 0;r=e.getTypeUrl(),r.length>0&&t.writeString(1,r),r=e.getValue_asU8(),r.length>0&&t.writeBytes(2,r)};proto.google.protobuf.Any.prototype.getTypeUrl=function(){return Wr.Message.getFieldWithDefault(this,1,"")};proto.google.protobuf.Any.prototype.setTypeUrl=function(e){return Wr.Message.setProto3StringField(this,1,e)};proto.google.protobuf.Any.prototype.getValue=function(){return Wr.Message.getFieldWithDefault(this,2,"")};proto.google.protobuf.Any.prototype.getValue_asB64=function(){return Wr.Message.bytesAsB64(this.getValue())};proto.google.protobuf.Any.prototype.getValue_asU8=function(){return Wr.Message.bytesAsU8(this.getValue())};proto.google.protobuf.Any.prototype.setValue=function(e){return Wr.Message.setProto3BytesField(this,2,e)};up.object.extend(Y9,proto.google.protobuf);proto.google.protobuf.Any.prototype.getTypeName=function(){return this.getTypeUrl().split("/").pop()};proto.google.protobuf.Any.prototype.pack=function(e,t,r){r||(r="type.googleapis.com/"),r.substr(-1)!="/"?this.setTypeUrl(r+"/"+t):this.setTypeUrl(r+t),this.setValue(e)};proto.google.protobuf.Any.prototype.unpack=function(e,t){return this.getTypeName()==t?e(this.getValue_asU8()):null}});var Rq=R((xne,X9)=>{g();y();X9.exports=function(e){var t={};function r(o){if(t[o])return t[o].exports;var a=t[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(o,a,c){r.o(o,a)||Object.defineProperty(o,a,{enumerable:!0,get:c})},r.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},r.t=function(o,a){if(1&a&&(o=r(o)),8&a||4&a&&typeof o=="object"&&o&&o.__esModule)return o;var c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:o}),2&a&&typeof o!="string")for(var s in o)r.d(c,s,function(n){return o[n]}.bind(null,s));return c},r.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(a,"a",a),a},r.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},r.p="",r(r.s=42)}([function(e,t){e.exports=Nb()},function(e,t){e.exports=Wb()},function(e,t){e.exports=Ub()},function(e,t){e.exports=jb()},function(e,t){e.exports=zb()},function(e,t){e.exports=T2()},function(e,t){e.exports=gt()},function(e,t){e.exports=O2()},function(e,t){e.exports=eh()},function(e,t){e.exports=bl()},function(e,t){e.exports=g4()},function(e,t){e.exports=br()},function(e,t){e.exports=m4()},function(e,t){e.exports=jn()},function(e,t){e.exports=j_()},function(e,t){e.exports=oh()},function(e,t){e.exports=yt()},function(e,t){e.exports=N4()},function(e,t){e.exports=A3()},function(e,t){e.exports=w3()},function(e,t,r){var o=r(8),a=o,c=function(){return this||window||c||self||Function("return this")()}.call(null),s=r(33);a.object.extend(proto,s),a.exportSymbol("proto.protocol.Account",null,c),a.exportSymbol("proto.protocol.Account.AccountResource",null,c),a.exportSymbol("proto.protocol.Account.Frozen",null,c),a.exportSymbol("proto.protocol.AccountId",null,c),a.exportSymbol("proto.protocol.AccountType",null,c),a.exportSymbol("proto.protocol.DelegatedResource",null,c),a.exportSymbol("proto.protocol.Exchange",null,c),a.exportSymbol("proto.protocol.Key",null,c),a.exportSymbol("proto.protocol.MarketOrderDetail",null,c),a.exportSymbol("proto.protocol.Permission",null,c),a.exportSymbol("proto.protocol.Permission.PermissionType",null,c),a.exportSymbol("proto.protocol.Proposal",null,c),a.exportSymbol("proto.protocol.Proposal.State",null,c),a.exportSymbol("proto.protocol.Transaction",null,c),a.exportSymbol("proto.protocol.Transaction.Contract",null,c),a.exportSymbol("proto.protocol.Transaction.Contract.ContractType",null,c),a.exportSymbol("proto.protocol.Transaction.Result",null,c),a.exportSymbol("proto.protocol.Transaction.Result.code",null,c),a.exportSymbol("proto.protocol.Transaction.Result.contractResult",null,c),a.exportSymbol("proto.protocol.Transaction.raw",null,c),a.exportSymbol("proto.protocol.Vote",null,c),a.exportSymbol("proto.protocol.Votes",null,c),a.exportSymbol("proto.protocol.Witness",null,c),a.exportSymbol("proto.protocol.authority",null,c),proto.protocol.AccountId=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.AccountId,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.AccountId.displayName="proto.protocol.AccountId"),proto.protocol.Vote=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.Vote,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Vote.displayName="proto.protocol.Vote"),proto.protocol.Proposal=function(n){o.Message.initialize(this,n,0,-1,proto.protocol.Proposal.repeatedFields_,null)},a.inherits(proto.protocol.Proposal,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Proposal.displayName="proto.protocol.Proposal"),proto.protocol.Exchange=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.Exchange,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Exchange.displayName="proto.protocol.Exchange"),proto.protocol.Account=function(n){o.Message.initialize(this,n,0,-1,proto.protocol.Account.repeatedFields_,null)},a.inherits(proto.protocol.Account,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Account.displayName="proto.protocol.Account"),proto.protocol.Account.Frozen=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.Account.Frozen,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Account.Frozen.displayName="proto.protocol.Account.Frozen"),proto.protocol.Account.AccountResource=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.Account.AccountResource,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Account.AccountResource.displayName="proto.protocol.Account.AccountResource"),proto.protocol.Key=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.Key,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Key.displayName="proto.protocol.Key"),proto.protocol.DelegatedResource=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.DelegatedResource,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.DelegatedResource.displayName="proto.protocol.DelegatedResource"),proto.protocol.authority=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.authority,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.authority.displayName="proto.protocol.authority"),proto.protocol.Permission=function(n){o.Message.initialize(this,n,0,-1,proto.protocol.Permission.repeatedFields_,null)},a.inherits(proto.protocol.Permission,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Permission.displayName="proto.protocol.Permission"),proto.protocol.Witness=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.Witness,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Witness.displayName="proto.protocol.Witness"),proto.protocol.Votes=function(n){o.Message.initialize(this,n,0,-1,proto.protocol.Votes.repeatedFields_,null)},a.inherits(proto.protocol.Votes,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Votes.displayName="proto.protocol.Votes"),proto.protocol.MarketOrderDetail=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.MarketOrderDetail,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.MarketOrderDetail.displayName="proto.protocol.MarketOrderDetail"),proto.protocol.Transaction=function(n){o.Message.initialize(this,n,0,-1,proto.protocol.Transaction.repeatedFields_,null)},a.inherits(proto.protocol.Transaction,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Transaction.displayName="proto.protocol.Transaction"),proto.protocol.Transaction.Contract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.Transaction.Contract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Transaction.Contract.displayName="proto.protocol.Transaction.Contract"),proto.protocol.Transaction.Result=function(n){o.Message.initialize(this,n,0,-1,proto.protocol.Transaction.Result.repeatedFields_,null)},a.inherits(proto.protocol.Transaction.Result,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Transaction.Result.displayName="proto.protocol.Transaction.Result"),proto.protocol.Transaction.raw=function(n){o.Message.initialize(this,n,0,-1,proto.protocol.Transaction.raw.repeatedFields_,null)},a.inherits(proto.protocol.Transaction.raw,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.Transaction.raw.displayName="proto.protocol.Transaction.raw"),o.Message.GENERATE_TO_OBJECT&&(proto.protocol.AccountId.prototype.toObject=function(n){return proto.protocol.AccountId.toObject(n,this)},proto.protocol.AccountId.toObject=function(n,i){var u={name:i.getName_asB64(),address:i.getAddress_asB64()};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.AccountId.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.AccountId;return proto.protocol.AccountId.deserializeBinaryFromReader(u,i)},proto.protocol.AccountId.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setName(u);break;case 2:u=i.readBytes(),n.setAddress(u);break;default:i.skipField()}return n},proto.protocol.AccountId.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.AccountId.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.AccountId.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getName_asU8()).length>0&&i.writeBytes(1,u),(u=n.getAddress_asU8()).length>0&&i.writeBytes(2,u)},proto.protocol.AccountId.prototype.getName=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.AccountId.prototype.getName_asB64=function(){return o.Message.bytesAsB64(this.getName())},proto.protocol.AccountId.prototype.getName_asU8=function(){return o.Message.bytesAsU8(this.getName())},proto.protocol.AccountId.prototype.setName=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.AccountId.prototype.getAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.AccountId.prototype.getAddress_asB64=function(){return o.Message.bytesAsB64(this.getAddress())},proto.protocol.AccountId.prototype.getAddress_asU8=function(){return o.Message.bytesAsU8(this.getAddress())},proto.protocol.AccountId.prototype.setAddress=function(n){return o.Message.setProto3BytesField(this,2,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Vote.prototype.toObject=function(n){return proto.protocol.Vote.toObject(n,this)},proto.protocol.Vote.toObject=function(n,i){var u={voteAddress:i.getVoteAddress_asB64(),voteCount:o.Message.getFieldWithDefault(i,2,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.Vote.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Vote;return proto.protocol.Vote.deserializeBinaryFromReader(u,i)},proto.protocol.Vote.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setVoteAddress(u);break;case 2:u=i.readInt64(),n.setVoteCount(u);break;default:i.skipField()}return n},proto.protocol.Vote.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Vote.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Vote.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getVoteAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getVoteCount())!==0&&i.writeInt64(2,u)},proto.protocol.Vote.prototype.getVoteAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.Vote.prototype.getVoteAddress_asB64=function(){return o.Message.bytesAsB64(this.getVoteAddress())},proto.protocol.Vote.prototype.getVoteAddress_asU8=function(){return o.Message.bytesAsU8(this.getVoteAddress())},proto.protocol.Vote.prototype.setVoteAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.Vote.prototype.getVoteCount=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.Vote.prototype.setVoteCount=function(n){return o.Message.setProto3IntField(this,2,n)},proto.protocol.Proposal.repeatedFields_=[6],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Proposal.prototype.toObject=function(n){return proto.protocol.Proposal.toObject(n,this)},proto.protocol.Proposal.toObject=function(n,i){var u,l={proposalId:o.Message.getFieldWithDefault(i,1,0),proposerAddress:i.getProposerAddress_asB64(),parametersMap:(u=i.getParametersMap())?u.toObject(n,void 0):[],expirationTime:o.Message.getFieldWithDefault(i,4,0),createTime:o.Message.getFieldWithDefault(i,5,0),approvalsList:i.getApprovalsList_asB64(),state:o.Message.getFieldWithDefault(i,7,0)};return n&&(l.$jspbMessageInstance=i),l}),proto.protocol.Proposal.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Proposal;return proto.protocol.Proposal.deserializeBinaryFromReader(u,i)},proto.protocol.Proposal.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readInt64();n.setProposalId(u);break;case 2:u=i.readBytes(),n.setProposerAddress(u);break;case 3:u=n.getParametersMap(),i.readMessage(u,function(l,x){o.Map.deserializeBinary(l,x,o.BinaryReader.prototype.readInt64,o.BinaryReader.prototype.readInt64,null,0,0)});break;case 4:u=i.readInt64(),n.setExpirationTime(u);break;case 5:u=i.readInt64(),n.setCreateTime(u);break;case 6:u=i.readBytes(),n.addApprovals(u);break;case 7:u=i.readEnum(),n.setState(u);break;default:i.skipField()}return n},proto.protocol.Proposal.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Proposal.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Proposal.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getProposalId())!==0&&i.writeInt64(1,u),(u=n.getProposerAddress_asU8()).length>0&&i.writeBytes(2,u),(u=n.getParametersMap(!0))&&u.getLength()>0&&u.serializeBinary(3,i,o.BinaryWriter.prototype.writeInt64,o.BinaryWriter.prototype.writeInt64),(u=n.getExpirationTime())!==0&&i.writeInt64(4,u),(u=n.getCreateTime())!==0&&i.writeInt64(5,u),(u=n.getApprovalsList_asU8()).length>0&&i.writeRepeatedBytes(6,u),(u=n.getState())!==0&&i.writeEnum(7,u)},proto.protocol.Proposal.State={PENDING:0,DISAPPROVED:1,APPROVED:2,CANCELED:3},proto.protocol.Proposal.prototype.getProposalId=function(){return o.Message.getFieldWithDefault(this,1,0)},proto.protocol.Proposal.prototype.setProposalId=function(n){return o.Message.setProto3IntField(this,1,n)},proto.protocol.Proposal.prototype.getProposerAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.Proposal.prototype.getProposerAddress_asB64=function(){return o.Message.bytesAsB64(this.getProposerAddress())},proto.protocol.Proposal.prototype.getProposerAddress_asU8=function(){return o.Message.bytesAsU8(this.getProposerAddress())},proto.protocol.Proposal.prototype.setProposerAddress=function(n){return o.Message.setProto3BytesField(this,2,n)},proto.protocol.Proposal.prototype.getParametersMap=function(n){return o.Message.getMapField(this,3,n,null)},proto.protocol.Proposal.prototype.clearParametersMap=function(){return this.getParametersMap().clear(),this},proto.protocol.Proposal.prototype.getExpirationTime=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.Proposal.prototype.setExpirationTime=function(n){return o.Message.setProto3IntField(this,4,n)},proto.protocol.Proposal.prototype.getCreateTime=function(){return o.Message.getFieldWithDefault(this,5,0)},proto.protocol.Proposal.prototype.setCreateTime=function(n){return o.Message.setProto3IntField(this,5,n)},proto.protocol.Proposal.prototype.getApprovalsList=function(){return o.Message.getRepeatedField(this,6)},proto.protocol.Proposal.prototype.getApprovalsList_asB64=function(){return o.Message.bytesListAsB64(this.getApprovalsList())},proto.protocol.Proposal.prototype.getApprovalsList_asU8=function(){return o.Message.bytesListAsU8(this.getApprovalsList())},proto.protocol.Proposal.prototype.setApprovalsList=function(n){return o.Message.setField(this,6,n||[])},proto.protocol.Proposal.prototype.addApprovals=function(n,i){return o.Message.addToRepeatedField(this,6,n,i)},proto.protocol.Proposal.prototype.clearApprovalsList=function(){return this.setApprovalsList([])},proto.protocol.Proposal.prototype.getState=function(){return o.Message.getFieldWithDefault(this,7,0)},proto.protocol.Proposal.prototype.setState=function(n){return o.Message.setProto3EnumField(this,7,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Exchange.prototype.toObject=function(n){return proto.protocol.Exchange.toObject(n,this)},proto.protocol.Exchange.toObject=function(n,i){var u={exchangeId:o.Message.getFieldWithDefault(i,1,0),creatorAddress:i.getCreatorAddress_asB64(),createTime:o.Message.getFieldWithDefault(i,3,0),firstTokenId:i.getFirstTokenId_asB64(),firstTokenBalance:o.Message.getFieldWithDefault(i,7,0),secondTokenId:i.getSecondTokenId_asB64(),secondTokenBalance:o.Message.getFieldWithDefault(i,9,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.Exchange.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Exchange;return proto.protocol.Exchange.deserializeBinaryFromReader(u,i)},proto.protocol.Exchange.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readInt64();n.setExchangeId(u);break;case 2:u=i.readBytes(),n.setCreatorAddress(u);break;case 3:u=i.readInt64(),n.setCreateTime(u);break;case 6:u=i.readBytes(),n.setFirstTokenId(u);break;case 7:u=i.readInt64(),n.setFirstTokenBalance(u);break;case 8:u=i.readBytes(),n.setSecondTokenId(u);break;case 9:u=i.readInt64(),n.setSecondTokenBalance(u);break;default:i.skipField()}return n},proto.protocol.Exchange.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Exchange.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Exchange.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getExchangeId())!==0&&i.writeInt64(1,u),(u=n.getCreatorAddress_asU8()).length>0&&i.writeBytes(2,u),(u=n.getCreateTime())!==0&&i.writeInt64(3,u),(u=n.getFirstTokenId_asU8()).length>0&&i.writeBytes(6,u),(u=n.getFirstTokenBalance())!==0&&i.writeInt64(7,u),(u=n.getSecondTokenId_asU8()).length>0&&i.writeBytes(8,u),(u=n.getSecondTokenBalance())!==0&&i.writeInt64(9,u)},proto.protocol.Exchange.prototype.getExchangeId=function(){return o.Message.getFieldWithDefault(this,1,0)},proto.protocol.Exchange.prototype.setExchangeId=function(n){return o.Message.setProto3IntField(this,1,n)},proto.protocol.Exchange.prototype.getCreatorAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.Exchange.prototype.getCreatorAddress_asB64=function(){return o.Message.bytesAsB64(this.getCreatorAddress())},proto.protocol.Exchange.prototype.getCreatorAddress_asU8=function(){return o.Message.bytesAsU8(this.getCreatorAddress())},proto.protocol.Exchange.prototype.setCreatorAddress=function(n){return o.Message.setProto3BytesField(this,2,n)},proto.protocol.Exchange.prototype.getCreateTime=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.Exchange.prototype.setCreateTime=function(n){return o.Message.setProto3IntField(this,3,n)},proto.protocol.Exchange.prototype.getFirstTokenId=function(){return o.Message.getFieldWithDefault(this,6,"")},proto.protocol.Exchange.prototype.getFirstTokenId_asB64=function(){return o.Message.bytesAsB64(this.getFirstTokenId())},proto.protocol.Exchange.prototype.getFirstTokenId_asU8=function(){return o.Message.bytesAsU8(this.getFirstTokenId())},proto.protocol.Exchange.prototype.setFirstTokenId=function(n){return o.Message.setProto3BytesField(this,6,n)},proto.protocol.Exchange.prototype.getFirstTokenBalance=function(){return o.Message.getFieldWithDefault(this,7,0)},proto.protocol.Exchange.prototype.setFirstTokenBalance=function(n){return o.Message.setProto3IntField(this,7,n)},proto.protocol.Exchange.prototype.getSecondTokenId=function(){return o.Message.getFieldWithDefault(this,8,"")},proto.protocol.Exchange.prototype.getSecondTokenId_asB64=function(){return o.Message.bytesAsB64(this.getSecondTokenId())},proto.protocol.Exchange.prototype.getSecondTokenId_asU8=function(){return o.Message.bytesAsU8(this.getSecondTokenId())},proto.protocol.Exchange.prototype.setSecondTokenId=function(n){return o.Message.setProto3BytesField(this,8,n)},proto.protocol.Exchange.prototype.getSecondTokenBalance=function(){return o.Message.getFieldWithDefault(this,9,0)},proto.protocol.Exchange.prototype.setSecondTokenBalance=function(n){return o.Message.setProto3IntField(this,9,n)},proto.protocol.Account.repeatedFields_=[5,7,16,33],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Account.prototype.toObject=function(n){return proto.protocol.Account.toObject(n,this)},proto.protocol.Account.toObject=function(n,i){var u,l={accountName:i.getAccountName_asB64(),type:o.Message.getFieldWithDefault(i,2,0),address:i.getAddress_asB64(),balance:o.Message.getFieldWithDefault(i,4,0),votesList:o.Message.toObjectList(i.getVotesList(),proto.protocol.Vote.toObject,n),assetMap:(u=i.getAssetMap())?u.toObject(n,void 0):[],assetv2Map:(u=i.getAssetv2Map())?u.toObject(n,void 0):[],frozenList:o.Message.toObjectList(i.getFrozenList(),proto.protocol.Account.Frozen.toObject,n),netUsage:o.Message.getFieldWithDefault(i,8,0),acquiredDelegatedFrozenBalanceForBandwidth:o.Message.getFieldWithDefault(i,41,0),delegatedFrozenBalanceForBandwidth:o.Message.getFieldWithDefault(i,42,0),oldTronPower:o.Message.getFieldWithDefault(i,46,0),tronPower:(u=i.getTronPower())&&proto.protocol.Account.Frozen.toObject(n,u),assetOptimized:o.Message.getBooleanFieldWithDefault(i,60,!1),createTime:o.Message.getFieldWithDefault(i,9,0),latestOprationTime:o.Message.getFieldWithDefault(i,10,0),allowance:o.Message.getFieldWithDefault(i,11,0),latestWithdrawTime:o.Message.getFieldWithDefault(i,12,0),code:i.getCode_asB64(),isWitness:o.Message.getBooleanFieldWithDefault(i,14,!1),isCommittee:o.Message.getBooleanFieldWithDefault(i,15,!1),frozenSupplyList:o.Message.toObjectList(i.getFrozenSupplyList(),proto.protocol.Account.Frozen.toObject,n),assetIssuedName:i.getAssetIssuedName_asB64(),assetIssuedId:i.getAssetIssuedId_asB64(),latestAssetOperationTimeMap:(u=i.getLatestAssetOperationTimeMap())?u.toObject(n,void 0):[],latestAssetOperationTimev2Map:(u=i.getLatestAssetOperationTimev2Map())?u.toObject(n,void 0):[],freeNetUsage:o.Message.getFieldWithDefault(i,19,0),freeAssetNetUsageMap:(u=i.getFreeAssetNetUsageMap())?u.toObject(n,void 0):[],freeAssetNetUsagev2Map:(u=i.getFreeAssetNetUsagev2Map())?u.toObject(n,void 0):[],latestConsumeTime:o.Message.getFieldWithDefault(i,21,0),latestConsumeFreeTime:o.Message.getFieldWithDefault(i,22,0),accountId:i.getAccountId_asB64(),accountResource:(u=i.getAccountResource())&&proto.protocol.Account.AccountResource.toObject(n,u),codehash:i.getCodehash_asB64(),ownerPermission:(u=i.getOwnerPermission())&&proto.protocol.Permission.toObject(n,u),witnessPermission:(u=i.getWitnessPermission())&&proto.protocol.Permission.toObject(n,u),activePermissionList:o.Message.toObjectList(i.getActivePermissionList(),proto.protocol.Permission.toObject,n)};return n&&(l.$jspbMessageInstance=i),l}),proto.protocol.Account.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Account;return proto.protocol.Account.deserializeBinaryFromReader(u,i)},proto.protocol.Account.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setAccountName(u);break;case 2:u=i.readEnum(),n.setType(u);break;case 3:u=i.readBytes(),n.setAddress(u);break;case 4:u=i.readInt64(),n.setBalance(u);break;case 5:u=new proto.protocol.Vote,i.readMessage(u,proto.protocol.Vote.deserializeBinaryFromReader),n.addVotes(u);break;case 6:u=n.getAssetMap(),i.readMessage(u,function(l,x){o.Map.deserializeBinary(l,x,o.BinaryReader.prototype.readString,o.BinaryReader.prototype.readInt64,null,"",0)});break;case 56:u=n.getAssetv2Map(),i.readMessage(u,function(l,x){o.Map.deserializeBinary(l,x,o.BinaryReader.prototype.readString,o.BinaryReader.prototype.readInt64,null,"",0)});break;case 7:u=new proto.protocol.Account.Frozen,i.readMessage(u,proto.protocol.Account.Frozen.deserializeBinaryFromReader),n.addFrozen(u);break;case 8:u=i.readInt64(),n.setNetUsage(u);break;case 41:u=i.readInt64(),n.setAcquiredDelegatedFrozenBalanceForBandwidth(u);break;case 42:u=i.readInt64(),n.setDelegatedFrozenBalanceForBandwidth(u);break;case 46:u=i.readInt64(),n.setOldTronPower(u);break;case 47:u=new proto.protocol.Account.Frozen,i.readMessage(u,proto.protocol.Account.Frozen.deserializeBinaryFromReader),n.setTronPower(u);break;case 60:u=i.readBool(),n.setAssetOptimized(u);break;case 9:u=i.readInt64(),n.setCreateTime(u);break;case 10:u=i.readInt64(),n.setLatestOprationTime(u);break;case 11:u=i.readInt64(),n.setAllowance(u);break;case 12:u=i.readInt64(),n.setLatestWithdrawTime(u);break;case 13:u=i.readBytes(),n.setCode(u);break;case 14:u=i.readBool(),n.setIsWitness(u);break;case 15:u=i.readBool(),n.setIsCommittee(u);break;case 16:u=new proto.protocol.Account.Frozen,i.readMessage(u,proto.protocol.Account.Frozen.deserializeBinaryFromReader),n.addFrozenSupply(u);break;case 17:u=i.readBytes(),n.setAssetIssuedName(u);break;case 57:u=i.readBytes(),n.setAssetIssuedId(u);break;case 18:u=n.getLatestAssetOperationTimeMap(),i.readMessage(u,function(l,x){o.Map.deserializeBinary(l,x,o.BinaryReader.prototype.readString,o.BinaryReader.prototype.readInt64,null,"",0)});break;case 58:u=n.getLatestAssetOperationTimev2Map(),i.readMessage(u,function(l,x){o.Map.deserializeBinary(l,x,o.BinaryReader.prototype.readString,o.BinaryReader.prototype.readInt64,null,"",0)});break;case 19:u=i.readInt64(),n.setFreeNetUsage(u);break;case 20:u=n.getFreeAssetNetUsageMap(),i.readMessage(u,function(l,x){o.Map.deserializeBinary(l,x,o.BinaryReader.prototype.readString,o.BinaryReader.prototype.readInt64,null,"",0)});break;case 59:u=n.getFreeAssetNetUsagev2Map(),i.readMessage(u,function(l,x){o.Map.deserializeBinary(l,x,o.BinaryReader.prototype.readString,o.BinaryReader.prototype.readInt64,null,"",0)});break;case 21:u=i.readInt64(),n.setLatestConsumeTime(u);break;case 22:u=i.readInt64(),n.setLatestConsumeFreeTime(u);break;case 23:u=i.readBytes(),n.setAccountId(u);break;case 26:u=new proto.protocol.Account.AccountResource,i.readMessage(u,proto.protocol.Account.AccountResource.deserializeBinaryFromReader),n.setAccountResource(u);break;case 30:u=i.readBytes(),n.setCodehash(u);break;case 31:u=new proto.protocol.Permission,i.readMessage(u,proto.protocol.Permission.deserializeBinaryFromReader),n.setOwnerPermission(u);break;case 32:u=new proto.protocol.Permission,i.readMessage(u,proto.protocol.Permission.deserializeBinaryFromReader),n.setWitnessPermission(u);break;case 33:u=new proto.protocol.Permission,i.readMessage(u,proto.protocol.Permission.deserializeBinaryFromReader),n.addActivePermission(u);break;default:i.skipField()}return n},proto.protocol.Account.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Account.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Account.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getAccountName_asU8()).length>0&&i.writeBytes(1,u),(u=n.getType())!==0&&i.writeEnum(2,u),(u=n.getAddress_asU8()).length>0&&i.writeBytes(3,u),(u=n.getBalance())!==0&&i.writeInt64(4,u),(u=n.getVotesList()).length>0&&i.writeRepeatedMessage(5,u,proto.protocol.Vote.serializeBinaryToWriter),(u=n.getAssetMap(!0))&&u.getLength()>0&&u.serializeBinary(6,i,o.BinaryWriter.prototype.writeString,o.BinaryWriter.prototype.writeInt64),(u=n.getAssetv2Map(!0))&&u.getLength()>0&&u.serializeBinary(56,i,o.BinaryWriter.prototype.writeString,o.BinaryWriter.prototype.writeInt64),(u=n.getFrozenList()).length>0&&i.writeRepeatedMessage(7,u,proto.protocol.Account.Frozen.serializeBinaryToWriter),(u=n.getNetUsage())!==0&&i.writeInt64(8,u),(u=n.getAcquiredDelegatedFrozenBalanceForBandwidth())!==0&&i.writeInt64(41,u),(u=n.getDelegatedFrozenBalanceForBandwidth())!==0&&i.writeInt64(42,u),(u=n.getOldTronPower())!==0&&i.writeInt64(46,u),(u=n.getTronPower())!=null&&i.writeMessage(47,u,proto.protocol.Account.Frozen.serializeBinaryToWriter),(u=n.getAssetOptimized())&&i.writeBool(60,u),(u=n.getCreateTime())!==0&&i.writeInt64(9,u),(u=n.getLatestOprationTime())!==0&&i.writeInt64(10,u),(u=n.getAllowance())!==0&&i.writeInt64(11,u),(u=n.getLatestWithdrawTime())!==0&&i.writeInt64(12,u),(u=n.getCode_asU8()).length>0&&i.writeBytes(13,u),(u=n.getIsWitness())&&i.writeBool(14,u),(u=n.getIsCommittee())&&i.writeBool(15,u),(u=n.getFrozenSupplyList()).length>0&&i.writeRepeatedMessage(16,u,proto.protocol.Account.Frozen.serializeBinaryToWriter),(u=n.getAssetIssuedName_asU8()).length>0&&i.writeBytes(17,u),(u=n.getAssetIssuedId_asU8()).length>0&&i.writeBytes(57,u),(u=n.getLatestAssetOperationTimeMap(!0))&&u.getLength()>0&&u.serializeBinary(18,i,o.BinaryWriter.prototype.writeString,o.BinaryWriter.prototype.writeInt64),(u=n.getLatestAssetOperationTimev2Map(!0))&&u.getLength()>0&&u.serializeBinary(58,i,o.BinaryWriter.prototype.writeString,o.BinaryWriter.prototype.writeInt64),(u=n.getFreeNetUsage())!==0&&i.writeInt64(19,u),(u=n.getFreeAssetNetUsageMap(!0))&&u.getLength()>0&&u.serializeBinary(20,i,o.BinaryWriter.prototype.writeString,o.BinaryWriter.prototype.writeInt64),(u=n.getFreeAssetNetUsagev2Map(!0))&&u.getLength()>0&&u.serializeBinary(59,i,o.BinaryWriter.prototype.writeString,o.BinaryWriter.prototype.writeInt64),(u=n.getLatestConsumeTime())!==0&&i.writeInt64(21,u),(u=n.getLatestConsumeFreeTime())!==0&&i.writeInt64(22,u),(u=n.getAccountId_asU8()).length>0&&i.writeBytes(23,u),(u=n.getAccountResource())!=null&&i.writeMessage(26,u,proto.protocol.Account.AccountResource.serializeBinaryToWriter),(u=n.getCodehash_asU8()).length>0&&i.writeBytes(30,u),(u=n.getOwnerPermission())!=null&&i.writeMessage(31,u,proto.protocol.Permission.serializeBinaryToWriter),(u=n.getWitnessPermission())!=null&&i.writeMessage(32,u,proto.protocol.Permission.serializeBinaryToWriter),(u=n.getActivePermissionList()).length>0&&i.writeRepeatedMessage(33,u,proto.protocol.Permission.serializeBinaryToWriter)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Account.Frozen.prototype.toObject=function(n){return proto.protocol.Account.Frozen.toObject(n,this)},proto.protocol.Account.Frozen.toObject=function(n,i){var u={frozenBalance:o.Message.getFieldWithDefault(i,1,0),expireTime:o.Message.getFieldWithDefault(i,2,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.Account.Frozen.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Account.Frozen;return proto.protocol.Account.Frozen.deserializeBinaryFromReader(u,i)},proto.protocol.Account.Frozen.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readInt64();n.setFrozenBalance(u);break;case 2:u=i.readInt64(),n.setExpireTime(u);break;default:i.skipField()}return n},proto.protocol.Account.Frozen.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Account.Frozen.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Account.Frozen.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getFrozenBalance())!==0&&i.writeInt64(1,u),(u=n.getExpireTime())!==0&&i.writeInt64(2,u)},proto.protocol.Account.Frozen.prototype.getFrozenBalance=function(){return o.Message.getFieldWithDefault(this,1,0)},proto.protocol.Account.Frozen.prototype.setFrozenBalance=function(n){return o.Message.setProto3IntField(this,1,n)},proto.protocol.Account.Frozen.prototype.getExpireTime=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.Account.Frozen.prototype.setExpireTime=function(n){return o.Message.setProto3IntField(this,2,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Account.AccountResource.prototype.toObject=function(n){return proto.protocol.Account.AccountResource.toObject(n,this)},proto.protocol.Account.AccountResource.toObject=function(n,i){var u,l={energyUsage:o.Message.getFieldWithDefault(i,1,0),frozenBalanceForEnergy:(u=i.getFrozenBalanceForEnergy())&&proto.protocol.Account.Frozen.toObject(n,u),latestConsumeTimeForEnergy:o.Message.getFieldWithDefault(i,3,0),acquiredDelegatedFrozenBalanceForEnergy:o.Message.getFieldWithDefault(i,4,0),delegatedFrozenBalanceForEnergy:o.Message.getFieldWithDefault(i,5,0),storageLimit:o.Message.getFieldWithDefault(i,6,0),storageUsage:o.Message.getFieldWithDefault(i,7,0),latestExchangeStorageTime:o.Message.getFieldWithDefault(i,8,0)};return n&&(l.$jspbMessageInstance=i),l}),proto.protocol.Account.AccountResource.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Account.AccountResource;return proto.protocol.Account.AccountResource.deserializeBinaryFromReader(u,i)},proto.protocol.Account.AccountResource.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readInt64();n.setEnergyUsage(u);break;case 2:u=new proto.protocol.Account.Frozen,i.readMessage(u,proto.protocol.Account.Frozen.deserializeBinaryFromReader),n.setFrozenBalanceForEnergy(u);break;case 3:u=i.readInt64(),n.setLatestConsumeTimeForEnergy(u);break;case 4:u=i.readInt64(),n.setAcquiredDelegatedFrozenBalanceForEnergy(u);break;case 5:u=i.readInt64(),n.setDelegatedFrozenBalanceForEnergy(u);break;case 6:u=i.readInt64(),n.setStorageLimit(u);break;case 7:u=i.readInt64(),n.setStorageUsage(u);break;case 8:u=i.readInt64(),n.setLatestExchangeStorageTime(u);break;default:i.skipField()}return n},proto.protocol.Account.AccountResource.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Account.AccountResource.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Account.AccountResource.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getEnergyUsage())!==0&&i.writeInt64(1,u),(u=n.getFrozenBalanceForEnergy())!=null&&i.writeMessage(2,u,proto.protocol.Account.Frozen.serializeBinaryToWriter),(u=n.getLatestConsumeTimeForEnergy())!==0&&i.writeInt64(3,u),(u=n.getAcquiredDelegatedFrozenBalanceForEnergy())!==0&&i.writeInt64(4,u),(u=n.getDelegatedFrozenBalanceForEnergy())!==0&&i.writeInt64(5,u),(u=n.getStorageLimit())!==0&&i.writeInt64(6,u),(u=n.getStorageUsage())!==0&&i.writeInt64(7,u),(u=n.getLatestExchangeStorageTime())!==0&&i.writeInt64(8,u)},proto.protocol.Account.AccountResource.prototype.getEnergyUsage=function(){return o.Message.getFieldWithDefault(this,1,0)},proto.protocol.Account.AccountResource.prototype.setEnergyUsage=function(n){return o.Message.setProto3IntField(this,1,n)},proto.protocol.Account.AccountResource.prototype.getFrozenBalanceForEnergy=function(){return o.Message.getWrapperField(this,proto.protocol.Account.Frozen,2)},proto.protocol.Account.AccountResource.prototype.setFrozenBalanceForEnergy=function(n){return o.Message.setWrapperField(this,2,n)},proto.protocol.Account.AccountResource.prototype.clearFrozenBalanceForEnergy=function(){return this.setFrozenBalanceForEnergy(void 0)},proto.protocol.Account.AccountResource.prototype.hasFrozenBalanceForEnergy=function(){return o.Message.getField(this,2)!=null},proto.protocol.Account.AccountResource.prototype.getLatestConsumeTimeForEnergy=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy=function(n){return o.Message.setProto3IntField(this,3,n)},proto.protocol.Account.AccountResource.prototype.getAcquiredDelegatedFrozenBalanceForEnergy=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.Account.AccountResource.prototype.setAcquiredDelegatedFrozenBalanceForEnergy=function(n){return o.Message.setProto3IntField(this,4,n)},proto.protocol.Account.AccountResource.prototype.getDelegatedFrozenBalanceForEnergy=function(){return o.Message.getFieldWithDefault(this,5,0)},proto.protocol.Account.AccountResource.prototype.setDelegatedFrozenBalanceForEnergy=function(n){return o.Message.setProto3IntField(this,5,n)},proto.protocol.Account.AccountResource.prototype.getStorageLimit=function(){return o.Message.getFieldWithDefault(this,6,0)},proto.protocol.Account.AccountResource.prototype.setStorageLimit=function(n){return o.Message.setProto3IntField(this,6,n)},proto.protocol.Account.AccountResource.prototype.getStorageUsage=function(){return o.Message.getFieldWithDefault(this,7,0)},proto.protocol.Account.AccountResource.prototype.setStorageUsage=function(n){return o.Message.setProto3IntField(this,7,n)},proto.protocol.Account.AccountResource.prototype.getLatestExchangeStorageTime=function(){return o.Message.getFieldWithDefault(this,8,0)},proto.protocol.Account.AccountResource.prototype.setLatestExchangeStorageTime=function(n){return o.Message.setProto3IntField(this,8,n)},proto.protocol.Account.prototype.getAccountName=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.Account.prototype.getAccountName_asB64=function(){return o.Message.bytesAsB64(this.getAccountName())},proto.protocol.Account.prototype.getAccountName_asU8=function(){return o.Message.bytesAsU8(this.getAccountName())},proto.protocol.Account.prototype.setAccountName=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.Account.prototype.getType=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.Account.prototype.setType=function(n){return o.Message.setProto3EnumField(this,2,n)},proto.protocol.Account.prototype.getAddress=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.Account.prototype.getAddress_asB64=function(){return o.Message.bytesAsB64(this.getAddress())},proto.protocol.Account.prototype.getAddress_asU8=function(){return o.Message.bytesAsU8(this.getAddress())},proto.protocol.Account.prototype.setAddress=function(n){return o.Message.setProto3BytesField(this,3,n)},proto.protocol.Account.prototype.getBalance=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.Account.prototype.setBalance=function(n){return o.Message.setProto3IntField(this,4,n)},proto.protocol.Account.prototype.getVotesList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.Vote,5)},proto.protocol.Account.prototype.setVotesList=function(n){return o.Message.setRepeatedWrapperField(this,5,n)},proto.protocol.Account.prototype.addVotes=function(n,i){return o.Message.addToRepeatedWrapperField(this,5,n,proto.protocol.Vote,i)},proto.protocol.Account.prototype.clearVotesList=function(){return this.setVotesList([])},proto.protocol.Account.prototype.getAssetMap=function(n){return o.Message.getMapField(this,6,n,null)},proto.protocol.Account.prototype.clearAssetMap=function(){return this.getAssetMap().clear(),this},proto.protocol.Account.prototype.getAssetv2Map=function(n){return o.Message.getMapField(this,56,n,null)},proto.protocol.Account.prototype.clearAssetv2Map=function(){return this.getAssetv2Map().clear(),this},proto.protocol.Account.prototype.getFrozenList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.Account.Frozen,7)},proto.protocol.Account.prototype.setFrozenList=function(n){return o.Message.setRepeatedWrapperField(this,7,n)},proto.protocol.Account.prototype.addFrozen=function(n,i){return o.Message.addToRepeatedWrapperField(this,7,n,proto.protocol.Account.Frozen,i)},proto.protocol.Account.prototype.clearFrozenList=function(){return this.setFrozenList([])},proto.protocol.Account.prototype.getNetUsage=function(){return o.Message.getFieldWithDefault(this,8,0)},proto.protocol.Account.prototype.setNetUsage=function(n){return o.Message.setProto3IntField(this,8,n)},proto.protocol.Account.prototype.getAcquiredDelegatedFrozenBalanceForBandwidth=function(){return o.Message.getFieldWithDefault(this,41,0)},proto.protocol.Account.prototype.setAcquiredDelegatedFrozenBalanceForBandwidth=function(n){return o.Message.setProto3IntField(this,41,n)},proto.protocol.Account.prototype.getDelegatedFrozenBalanceForBandwidth=function(){return o.Message.getFieldWithDefault(this,42,0)},proto.protocol.Account.prototype.setDelegatedFrozenBalanceForBandwidth=function(n){return o.Message.setProto3IntField(this,42,n)},proto.protocol.Account.prototype.getOldTronPower=function(){return o.Message.getFieldWithDefault(this,46,0)},proto.protocol.Account.prototype.setOldTronPower=function(n){return o.Message.setProto3IntField(this,46,n)},proto.protocol.Account.prototype.getTronPower=function(){return o.Message.getWrapperField(this,proto.protocol.Account.Frozen,47)},proto.protocol.Account.prototype.setTronPower=function(n){return o.Message.setWrapperField(this,47,n)},proto.protocol.Account.prototype.clearTronPower=function(){return this.setTronPower(void 0)},proto.protocol.Account.prototype.hasTronPower=function(){return o.Message.getField(this,47)!=null},proto.protocol.Account.prototype.getAssetOptimized=function(){return o.Message.getBooleanFieldWithDefault(this,60,!1)},proto.protocol.Account.prototype.setAssetOptimized=function(n){return o.Message.setProto3BooleanField(this,60,n)},proto.protocol.Account.prototype.getCreateTime=function(){return o.Message.getFieldWithDefault(this,9,0)},proto.protocol.Account.prototype.setCreateTime=function(n){return o.Message.setProto3IntField(this,9,n)},proto.protocol.Account.prototype.getLatestOprationTime=function(){return o.Message.getFieldWithDefault(this,10,0)},proto.protocol.Account.prototype.setLatestOprationTime=function(n){return o.Message.setProto3IntField(this,10,n)},proto.protocol.Account.prototype.getAllowance=function(){return o.Message.getFieldWithDefault(this,11,0)},proto.protocol.Account.prototype.setAllowance=function(n){return o.Message.setProto3IntField(this,11,n)},proto.protocol.Account.prototype.getLatestWithdrawTime=function(){return o.Message.getFieldWithDefault(this,12,0)},proto.protocol.Account.prototype.setLatestWithdrawTime=function(n){return o.Message.setProto3IntField(this,12,n)},proto.protocol.Account.prototype.getCode=function(){return o.Message.getFieldWithDefault(this,13,"")},proto.protocol.Account.prototype.getCode_asB64=function(){return o.Message.bytesAsB64(this.getCode())},proto.protocol.Account.prototype.getCode_asU8=function(){return o.Message.bytesAsU8(this.getCode())},proto.protocol.Account.prototype.setCode=function(n){return o.Message.setProto3BytesField(this,13,n)},proto.protocol.Account.prototype.getIsWitness=function(){return o.Message.getBooleanFieldWithDefault(this,14,!1)},proto.protocol.Account.prototype.setIsWitness=function(n){return o.Message.setProto3BooleanField(this,14,n)},proto.protocol.Account.prototype.getIsCommittee=function(){return o.Message.getBooleanFieldWithDefault(this,15,!1)},proto.protocol.Account.prototype.setIsCommittee=function(n){return o.Message.setProto3BooleanField(this,15,n)},proto.protocol.Account.prototype.getFrozenSupplyList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.Account.Frozen,16)},proto.protocol.Account.prototype.setFrozenSupplyList=function(n){return o.Message.setRepeatedWrapperField(this,16,n)},proto.protocol.Account.prototype.addFrozenSupply=function(n,i){return o.Message.addToRepeatedWrapperField(this,16,n,proto.protocol.Account.Frozen,i)},proto.protocol.Account.prototype.clearFrozenSupplyList=function(){return this.setFrozenSupplyList([])},proto.protocol.Account.prototype.getAssetIssuedName=function(){return o.Message.getFieldWithDefault(this,17,"")},proto.protocol.Account.prototype.getAssetIssuedName_asB64=function(){return o.Message.bytesAsB64(this.getAssetIssuedName())},proto.protocol.Account.prototype.getAssetIssuedName_asU8=function(){return o.Message.bytesAsU8(this.getAssetIssuedName())},proto.protocol.Account.prototype.setAssetIssuedName=function(n){return o.Message.setProto3BytesField(this,17,n)},proto.protocol.Account.prototype.getAssetIssuedId=function(){return o.Message.getFieldWithDefault(this,57,"")},proto.protocol.Account.prototype.getAssetIssuedId_asB64=function(){return o.Message.bytesAsB64(this.getAssetIssuedId())},proto.protocol.Account.prototype.getAssetIssuedId_asU8=function(){return o.Message.bytesAsU8(this.getAssetIssuedId())},proto.protocol.Account.prototype.setAssetIssuedId=function(n){return o.Message.setProto3BytesField(this,57,n)},proto.protocol.Account.prototype.getLatestAssetOperationTimeMap=function(n){return o.Message.getMapField(this,18,n,null)},proto.protocol.Account.prototype.clearLatestAssetOperationTimeMap=function(){return this.getLatestAssetOperationTimeMap().clear(),this},proto.protocol.Account.prototype.getLatestAssetOperationTimev2Map=function(n){return o.Message.getMapField(this,58,n,null)},proto.protocol.Account.prototype.clearLatestAssetOperationTimev2Map=function(){return this.getLatestAssetOperationTimev2Map().clear(),this},proto.protocol.Account.prototype.getFreeNetUsage=function(){return o.Message.getFieldWithDefault(this,19,0)},proto.protocol.Account.prototype.setFreeNetUsage=function(n){return o.Message.setProto3IntField(this,19,n)},proto.protocol.Account.prototype.getFreeAssetNetUsageMap=function(n){return o.Message.getMapField(this,20,n,null)},proto.protocol.Account.prototype.clearFreeAssetNetUsageMap=function(){return this.getFreeAssetNetUsageMap().clear(),this},proto.protocol.Account.prototype.getFreeAssetNetUsagev2Map=function(n){return o.Message.getMapField(this,59,n,null)},proto.protocol.Account.prototype.clearFreeAssetNetUsagev2Map=function(){return this.getFreeAssetNetUsagev2Map().clear(),this},proto.protocol.Account.prototype.getLatestConsumeTime=function(){return o.Message.getFieldWithDefault(this,21,0)},proto.protocol.Account.prototype.setLatestConsumeTime=function(n){return o.Message.setProto3IntField(this,21,n)},proto.protocol.Account.prototype.getLatestConsumeFreeTime=function(){return o.Message.getFieldWithDefault(this,22,0)},proto.protocol.Account.prototype.setLatestConsumeFreeTime=function(n){return o.Message.setProto3IntField(this,22,n)},proto.protocol.Account.prototype.getAccountId=function(){return o.Message.getFieldWithDefault(this,23,"")},proto.protocol.Account.prototype.getAccountId_asB64=function(){return o.Message.bytesAsB64(this.getAccountId())},proto.protocol.Account.prototype.getAccountId_asU8=function(){return o.Message.bytesAsU8(this.getAccountId())},proto.protocol.Account.prototype.setAccountId=function(n){return o.Message.setProto3BytesField(this,23,n)},proto.protocol.Account.prototype.getAccountResource=function(){return o.Message.getWrapperField(this,proto.protocol.Account.AccountResource,26)},proto.protocol.Account.prototype.setAccountResource=function(n){return o.Message.setWrapperField(this,26,n)},proto.protocol.Account.prototype.clearAccountResource=function(){return this.setAccountResource(void 0)},proto.protocol.Account.prototype.hasAccountResource=function(){return o.Message.getField(this,26)!=null},proto.protocol.Account.prototype.getCodehash=function(){return o.Message.getFieldWithDefault(this,30,"")},proto.protocol.Account.prototype.getCodehash_asB64=function(){return o.Message.bytesAsB64(this.getCodehash())},proto.protocol.Account.prototype.getCodehash_asU8=function(){return o.Message.bytesAsU8(this.getCodehash())},proto.protocol.Account.prototype.setCodehash=function(n){return o.Message.setProto3BytesField(this,30,n)},proto.protocol.Account.prototype.getOwnerPermission=function(){return o.Message.getWrapperField(this,proto.protocol.Permission,31)},proto.protocol.Account.prototype.setOwnerPermission=function(n){return o.Message.setWrapperField(this,31,n)},proto.protocol.Account.prototype.clearOwnerPermission=function(){return this.setOwnerPermission(void 0)},proto.protocol.Account.prototype.hasOwnerPermission=function(){return o.Message.getField(this,31)!=null},proto.protocol.Account.prototype.getWitnessPermission=function(){return o.Message.getWrapperField(this,proto.protocol.Permission,32)},proto.protocol.Account.prototype.setWitnessPermission=function(n){return o.Message.setWrapperField(this,32,n)},proto.protocol.Account.prototype.clearWitnessPermission=function(){return this.setWitnessPermission(void 0)},proto.protocol.Account.prototype.hasWitnessPermission=function(){return o.Message.getField(this,32)!=null},proto.protocol.Account.prototype.getActivePermissionList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.Permission,33)},proto.protocol.Account.prototype.setActivePermissionList=function(n){return o.Message.setRepeatedWrapperField(this,33,n)},proto.protocol.Account.prototype.addActivePermission=function(n,i){return o.Message.addToRepeatedWrapperField(this,33,n,proto.protocol.Permission,i)},proto.protocol.Account.prototype.clearActivePermissionList=function(){return this.setActivePermissionList([])},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Key.prototype.toObject=function(n){return proto.protocol.Key.toObject(n,this)},proto.protocol.Key.toObject=function(n,i){var u={address:i.getAddress_asB64(),weight:o.Message.getFieldWithDefault(i,2,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.Key.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Key;return proto.protocol.Key.deserializeBinaryFromReader(u,i)},proto.protocol.Key.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setAddress(u);break;case 2:u=i.readInt64(),n.setWeight(u);break;default:i.skipField()}return n},proto.protocol.Key.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Key.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Key.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getWeight())!==0&&i.writeInt64(2,u)},proto.protocol.Key.prototype.getAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.Key.prototype.getAddress_asB64=function(){return o.Message.bytesAsB64(this.getAddress())},proto.protocol.Key.prototype.getAddress_asU8=function(){return o.Message.bytesAsU8(this.getAddress())},proto.protocol.Key.prototype.setAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.Key.prototype.getWeight=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.Key.prototype.setWeight=function(n){return o.Message.setProto3IntField(this,2,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.DelegatedResource.prototype.toObject=function(n){return proto.protocol.DelegatedResource.toObject(n,this)},proto.protocol.DelegatedResource.toObject=function(n,i){var u={from:i.getFrom_asB64(),to:i.getTo_asB64(),frozenBalanceForBandwidth:o.Message.getFieldWithDefault(i,3,0),frozenBalanceForEnergy:o.Message.getFieldWithDefault(i,4,0),expireTimeForBandwidth:o.Message.getFieldWithDefault(i,5,0),expireTimeForEnergy:o.Message.getFieldWithDefault(i,6,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.DelegatedResource.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.DelegatedResource;return proto.protocol.DelegatedResource.deserializeBinaryFromReader(u,i)},proto.protocol.DelegatedResource.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setFrom(u);break;case 2:u=i.readBytes(),n.setTo(u);break;case 3:u=i.readInt64(),n.setFrozenBalanceForBandwidth(u);break;case 4:u=i.readInt64(),n.setFrozenBalanceForEnergy(u);break;case 5:u=i.readInt64(),n.setExpireTimeForBandwidth(u);break;case 6:u=i.readInt64(),n.setExpireTimeForEnergy(u);break;default:i.skipField()}return n},proto.protocol.DelegatedResource.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.DelegatedResource.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.DelegatedResource.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getFrom_asU8()).length>0&&i.writeBytes(1,u),(u=n.getTo_asU8()).length>0&&i.writeBytes(2,u),(u=n.getFrozenBalanceForBandwidth())!==0&&i.writeInt64(3,u),(u=n.getFrozenBalanceForEnergy())!==0&&i.writeInt64(4,u),(u=n.getExpireTimeForBandwidth())!==0&&i.writeInt64(5,u),(u=n.getExpireTimeForEnergy())!==0&&i.writeInt64(6,u)},proto.protocol.DelegatedResource.prototype.getFrom=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.DelegatedResource.prototype.getFrom_asB64=function(){return o.Message.bytesAsB64(this.getFrom())},proto.protocol.DelegatedResource.prototype.getFrom_asU8=function(){return o.Message.bytesAsU8(this.getFrom())},proto.protocol.DelegatedResource.prototype.setFrom=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.DelegatedResource.prototype.getTo=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.DelegatedResource.prototype.getTo_asB64=function(){return o.Message.bytesAsB64(this.getTo())},proto.protocol.DelegatedResource.prototype.getTo_asU8=function(){return o.Message.bytesAsU8(this.getTo())},proto.protocol.DelegatedResource.prototype.setTo=function(n){return o.Message.setProto3BytesField(this,2,n)},proto.protocol.DelegatedResource.prototype.getFrozenBalanceForBandwidth=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.DelegatedResource.prototype.setFrozenBalanceForBandwidth=function(n){return o.Message.setProto3IntField(this,3,n)},proto.protocol.DelegatedResource.prototype.getFrozenBalanceForEnergy=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.DelegatedResource.prototype.setFrozenBalanceForEnergy=function(n){return o.Message.setProto3IntField(this,4,n)},proto.protocol.DelegatedResource.prototype.getExpireTimeForBandwidth=function(){return o.Message.getFieldWithDefault(this,5,0)},proto.protocol.DelegatedResource.prototype.setExpireTimeForBandwidth=function(n){return o.Message.setProto3IntField(this,5,n)},proto.protocol.DelegatedResource.prototype.getExpireTimeForEnergy=function(){return o.Message.getFieldWithDefault(this,6,0)},proto.protocol.DelegatedResource.prototype.setExpireTimeForEnergy=function(n){return o.Message.setProto3IntField(this,6,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.authority.prototype.toObject=function(n){return proto.protocol.authority.toObject(n,this)},proto.protocol.authority.toObject=function(n,i){var u,l={account:(u=i.getAccount())&&proto.protocol.AccountId.toObject(n,u),permissionName:i.getPermissionName_asB64()};return n&&(l.$jspbMessageInstance=i),l}),proto.protocol.authority.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.authority;return proto.protocol.authority.deserializeBinaryFromReader(u,i)},proto.protocol.authority.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=new proto.protocol.AccountId;i.readMessage(u,proto.protocol.AccountId.deserializeBinaryFromReader),n.setAccount(u);break;case 2:u=i.readBytes(),n.setPermissionName(u);break;default:i.skipField()}return n},proto.protocol.authority.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.authority.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.authority.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getAccount())!=null&&i.writeMessage(1,u,proto.protocol.AccountId.serializeBinaryToWriter),(u=n.getPermissionName_asU8()).length>0&&i.writeBytes(2,u)},proto.protocol.authority.prototype.getAccount=function(){return o.Message.getWrapperField(this,proto.protocol.AccountId,1)},proto.protocol.authority.prototype.setAccount=function(n){return o.Message.setWrapperField(this,1,n)},proto.protocol.authority.prototype.clearAccount=function(){return this.setAccount(void 0)},proto.protocol.authority.prototype.hasAccount=function(){return o.Message.getField(this,1)!=null},proto.protocol.authority.prototype.getPermissionName=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.authority.prototype.getPermissionName_asB64=function(){return o.Message.bytesAsB64(this.getPermissionName())},proto.protocol.authority.prototype.getPermissionName_asU8=function(){return o.Message.bytesAsU8(this.getPermissionName())},proto.protocol.authority.prototype.setPermissionName=function(n){return o.Message.setProto3BytesField(this,2,n)},proto.protocol.Permission.repeatedFields_=[7],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Permission.prototype.toObject=function(n){return proto.protocol.Permission.toObject(n,this)},proto.protocol.Permission.toObject=function(n,i){var u={type:o.Message.getFieldWithDefault(i,1,0),id:o.Message.getFieldWithDefault(i,2,0),permissionName:o.Message.getFieldWithDefault(i,3,""),threshold:o.Message.getFieldWithDefault(i,4,0),parentId:o.Message.getFieldWithDefault(i,5,0),operations:i.getOperations_asB64(),keysList:o.Message.toObjectList(i.getKeysList(),proto.protocol.Key.toObject,n)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.Permission.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Permission;return proto.protocol.Permission.deserializeBinaryFromReader(u,i)},proto.protocol.Permission.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readEnum();n.setType(u);break;case 2:u=i.readInt32(),n.setId(u);break;case 3:u=i.readString(),n.setPermissionName(u);break;case 4:u=i.readInt64(),n.setThreshold(u);break;case 5:u=i.readInt32(),n.setParentId(u);break;case 6:u=i.readBytes(),n.setOperations(u);break;case 7:u=new proto.protocol.Key,i.readMessage(u,proto.protocol.Key.deserializeBinaryFromReader),n.addKeys(u);break;default:i.skipField()}return n},proto.protocol.Permission.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Permission.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Permission.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getType())!==0&&i.writeEnum(1,u),(u=n.getId())!==0&&i.writeInt32(2,u),(u=n.getPermissionName()).length>0&&i.writeString(3,u),(u=n.getThreshold())!==0&&i.writeInt64(4,u),(u=n.getParentId())!==0&&i.writeInt32(5,u),(u=n.getOperations_asU8()).length>0&&i.writeBytes(6,u),(u=n.getKeysList()).length>0&&i.writeRepeatedMessage(7,u,proto.protocol.Key.serializeBinaryToWriter)},proto.protocol.Permission.PermissionType={OWNER:0,WITNESS:1,ACTIVE:2},proto.protocol.Permission.prototype.getType=function(){return o.Message.getFieldWithDefault(this,1,0)},proto.protocol.Permission.prototype.setType=function(n){return o.Message.setProto3EnumField(this,1,n)},proto.protocol.Permission.prototype.getId=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.Permission.prototype.setId=function(n){return o.Message.setProto3IntField(this,2,n)},proto.protocol.Permission.prototype.getPermissionName=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.Permission.prototype.setPermissionName=function(n){return o.Message.setProto3StringField(this,3,n)},proto.protocol.Permission.prototype.getThreshold=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.Permission.prototype.setThreshold=function(n){return o.Message.setProto3IntField(this,4,n)},proto.protocol.Permission.prototype.getParentId=function(){return o.Message.getFieldWithDefault(this,5,0)},proto.protocol.Permission.prototype.setParentId=function(n){return o.Message.setProto3IntField(this,5,n)},proto.protocol.Permission.prototype.getOperations=function(){return o.Message.getFieldWithDefault(this,6,"")},proto.protocol.Permission.prototype.getOperations_asB64=function(){return o.Message.bytesAsB64(this.getOperations())},proto.protocol.Permission.prototype.getOperations_asU8=function(){return o.Message.bytesAsU8(this.getOperations())},proto.protocol.Permission.prototype.setOperations=function(n){return o.Message.setProto3BytesField(this,6,n)},proto.protocol.Permission.prototype.getKeysList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.Key,7)},proto.protocol.Permission.prototype.setKeysList=function(n){return o.Message.setRepeatedWrapperField(this,7,n)},proto.protocol.Permission.prototype.addKeys=function(n,i){return o.Message.addToRepeatedWrapperField(this,7,n,proto.protocol.Key,i)},proto.protocol.Permission.prototype.clearKeysList=function(){return this.setKeysList([])},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Witness.prototype.toObject=function(n){return proto.protocol.Witness.toObject(n,this)},proto.protocol.Witness.toObject=function(n,i){var u={address:i.getAddress_asB64(),votecount:o.Message.getFieldWithDefault(i,2,0),pubkey:i.getPubkey_asB64(),url:o.Message.getFieldWithDefault(i,4,""),totalproduced:o.Message.getFieldWithDefault(i,5,0),totalmissed:o.Message.getFieldWithDefault(i,6,0),latestblocknum:o.Message.getFieldWithDefault(i,7,0),latestslotnum:o.Message.getFieldWithDefault(i,8,0),isjobs:o.Message.getBooleanFieldWithDefault(i,9,!1)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.Witness.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Witness;return proto.protocol.Witness.deserializeBinaryFromReader(u,i)},proto.protocol.Witness.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setAddress(u);break;case 2:u=i.readInt64(),n.setVotecount(u);break;case 3:u=i.readBytes(),n.setPubkey(u);break;case 4:u=i.readString(),n.setUrl(u);break;case 5:u=i.readInt64(),n.setTotalproduced(u);break;case 6:u=i.readInt64(),n.setTotalmissed(u);break;case 7:u=i.readInt64(),n.setLatestblocknum(u);break;case 8:u=i.readInt64(),n.setLatestslotnum(u);break;case 9:u=i.readBool(),n.setIsjobs(u);break;default:i.skipField()}return n},proto.protocol.Witness.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Witness.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Witness.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getVotecount())!==0&&i.writeInt64(2,u),(u=n.getPubkey_asU8()).length>0&&i.writeBytes(3,u),(u=n.getUrl()).length>0&&i.writeString(4,u),(u=n.getTotalproduced())!==0&&i.writeInt64(5,u),(u=n.getTotalmissed())!==0&&i.writeInt64(6,u),(u=n.getLatestblocknum())!==0&&i.writeInt64(7,u),(u=n.getLatestslotnum())!==0&&i.writeInt64(8,u),(u=n.getIsjobs())&&i.writeBool(9,u)},proto.protocol.Witness.prototype.getAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.Witness.prototype.getAddress_asB64=function(){return o.Message.bytesAsB64(this.getAddress())},proto.protocol.Witness.prototype.getAddress_asU8=function(){return o.Message.bytesAsU8(this.getAddress())},proto.protocol.Witness.prototype.setAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.Witness.prototype.getVotecount=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.Witness.prototype.setVotecount=function(n){return o.Message.setProto3IntField(this,2,n)},proto.protocol.Witness.prototype.getPubkey=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.Witness.prototype.getPubkey_asB64=function(){return o.Message.bytesAsB64(this.getPubkey())},proto.protocol.Witness.prototype.getPubkey_asU8=function(){return o.Message.bytesAsU8(this.getPubkey())},proto.protocol.Witness.prototype.setPubkey=function(n){return o.Message.setProto3BytesField(this,3,n)},proto.protocol.Witness.prototype.getUrl=function(){return o.Message.getFieldWithDefault(this,4,"")},proto.protocol.Witness.prototype.setUrl=function(n){return o.Message.setProto3StringField(this,4,n)},proto.protocol.Witness.prototype.getTotalproduced=function(){return o.Message.getFieldWithDefault(this,5,0)},proto.protocol.Witness.prototype.setTotalproduced=function(n){return o.Message.setProto3IntField(this,5,n)},proto.protocol.Witness.prototype.getTotalmissed=function(){return o.Message.getFieldWithDefault(this,6,0)},proto.protocol.Witness.prototype.setTotalmissed=function(n){return o.Message.setProto3IntField(this,6,n)},proto.protocol.Witness.prototype.getLatestblocknum=function(){return o.Message.getFieldWithDefault(this,7,0)},proto.protocol.Witness.prototype.setLatestblocknum=function(n){return o.Message.setProto3IntField(this,7,n)},proto.protocol.Witness.prototype.getLatestslotnum=function(){return o.Message.getFieldWithDefault(this,8,0)},proto.protocol.Witness.prototype.setLatestslotnum=function(n){return o.Message.setProto3IntField(this,8,n)},proto.protocol.Witness.prototype.getIsjobs=function(){return o.Message.getBooleanFieldWithDefault(this,9,!1)},proto.protocol.Witness.prototype.setIsjobs=function(n){return o.Message.setProto3BooleanField(this,9,n)},proto.protocol.Votes.repeatedFields_=[2,3],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Votes.prototype.toObject=function(n){return proto.protocol.Votes.toObject(n,this)},proto.protocol.Votes.toObject=function(n,i){var u={address:i.getAddress_asB64(),oldVotesList:o.Message.toObjectList(i.getOldVotesList(),proto.protocol.Vote.toObject,n),newVotesList:o.Message.toObjectList(i.getNewVotesList(),proto.protocol.Vote.toObject,n)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.Votes.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Votes;return proto.protocol.Votes.deserializeBinaryFromReader(u,i)},proto.protocol.Votes.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setAddress(u);break;case 2:u=new proto.protocol.Vote,i.readMessage(u,proto.protocol.Vote.deserializeBinaryFromReader),n.addOldVotes(u);break;case 3:u=new proto.protocol.Vote,i.readMessage(u,proto.protocol.Vote.deserializeBinaryFromReader),n.addNewVotes(u);break;default:i.skipField()}return n},proto.protocol.Votes.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Votes.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Votes.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getOldVotesList()).length>0&&i.writeRepeatedMessage(2,u,proto.protocol.Vote.serializeBinaryToWriter),(u=n.getNewVotesList()).length>0&&i.writeRepeatedMessage(3,u,proto.protocol.Vote.serializeBinaryToWriter)},proto.protocol.Votes.prototype.getAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.Votes.prototype.getAddress_asB64=function(){return o.Message.bytesAsB64(this.getAddress())},proto.protocol.Votes.prototype.getAddress_asU8=function(){return o.Message.bytesAsU8(this.getAddress())},proto.protocol.Votes.prototype.setAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.Votes.prototype.getOldVotesList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.Vote,2)},proto.protocol.Votes.prototype.setOldVotesList=function(n){return o.Message.setRepeatedWrapperField(this,2,n)},proto.protocol.Votes.prototype.addOldVotes=function(n,i){return o.Message.addToRepeatedWrapperField(this,2,n,proto.protocol.Vote,i)},proto.protocol.Votes.prototype.clearOldVotesList=function(){return this.setOldVotesList([])},proto.protocol.Votes.prototype.getNewVotesList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.Vote,3)},proto.protocol.Votes.prototype.setNewVotesList=function(n){return o.Message.setRepeatedWrapperField(this,3,n)},proto.protocol.Votes.prototype.addNewVotes=function(n,i){return o.Message.addToRepeatedWrapperField(this,3,n,proto.protocol.Vote,i)},proto.protocol.Votes.prototype.clearNewVotesList=function(){return this.setNewVotesList([])},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.MarketOrderDetail.prototype.toObject=function(n){return proto.protocol.MarketOrderDetail.toObject(n,this)},proto.protocol.MarketOrderDetail.toObject=function(n,i){var u={makerorderid:i.getMakerorderid_asB64(),takerorderid:i.getTakerorderid_asB64(),fillsellquantity:o.Message.getFieldWithDefault(i,3,0),fillbuyquantity:o.Message.getFieldWithDefault(i,4,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.MarketOrderDetail.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.MarketOrderDetail;return proto.protocol.MarketOrderDetail.deserializeBinaryFromReader(u,i)},proto.protocol.MarketOrderDetail.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setMakerorderid(u);break;case 2:u=i.readBytes(),n.setTakerorderid(u);break;case 3:u=i.readInt64(),n.setFillsellquantity(u);break;case 4:u=i.readInt64(),n.setFillbuyquantity(u);break;default:i.skipField()}return n},proto.protocol.MarketOrderDetail.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.MarketOrderDetail.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.MarketOrderDetail.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getMakerorderid_asU8()).length>0&&i.writeBytes(1,u),(u=n.getTakerorderid_asU8()).length>0&&i.writeBytes(2,u),(u=n.getFillsellquantity())!==0&&i.writeInt64(3,u),(u=n.getFillbuyquantity())!==0&&i.writeInt64(4,u)},proto.protocol.MarketOrderDetail.prototype.getMakerorderid=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.MarketOrderDetail.prototype.getMakerorderid_asB64=function(){return o.Message.bytesAsB64(this.getMakerorderid())},proto.protocol.MarketOrderDetail.prototype.getMakerorderid_asU8=function(){return o.Message.bytesAsU8(this.getMakerorderid())},proto.protocol.MarketOrderDetail.prototype.setMakerorderid=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.MarketOrderDetail.prototype.getTakerorderid=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.MarketOrderDetail.prototype.getTakerorderid_asB64=function(){return o.Message.bytesAsB64(this.getTakerorderid())},proto.protocol.MarketOrderDetail.prototype.getTakerorderid_asU8=function(){return o.Message.bytesAsU8(this.getTakerorderid())},proto.protocol.MarketOrderDetail.prototype.setTakerorderid=function(n){return o.Message.setProto3BytesField(this,2,n)},proto.protocol.MarketOrderDetail.prototype.getFillsellquantity=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.MarketOrderDetail.prototype.setFillsellquantity=function(n){return o.Message.setProto3IntField(this,3,n)},proto.protocol.MarketOrderDetail.prototype.getFillbuyquantity=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.MarketOrderDetail.prototype.setFillbuyquantity=function(n){return o.Message.setProto3IntField(this,4,n)},proto.protocol.Transaction.repeatedFields_=[2,5],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Transaction.prototype.toObject=function(n){return proto.protocol.Transaction.toObject(n,this)},proto.protocol.Transaction.toObject=function(n,i){var u,l={rawData:(u=i.getRawData())&&proto.protocol.Transaction.raw.toObject(n,u),signatureList:i.getSignatureList_asB64(),retList:o.Message.toObjectList(i.getRetList(),proto.protocol.Transaction.Result.toObject,n)};return n&&(l.$jspbMessageInstance=i),l}),proto.protocol.Transaction.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Transaction;return proto.protocol.Transaction.deserializeBinaryFromReader(u,i)},proto.protocol.Transaction.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=new proto.protocol.Transaction.raw;i.readMessage(u,proto.protocol.Transaction.raw.deserializeBinaryFromReader),n.setRawData(u);break;case 2:u=i.readBytes(),n.addSignature(u);break;case 5:u=new proto.protocol.Transaction.Result,i.readMessage(u,proto.protocol.Transaction.Result.deserializeBinaryFromReader),n.addRet(u);break;default:i.skipField()}return n},proto.protocol.Transaction.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Transaction.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Transaction.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getRawData())!=null&&i.writeMessage(1,u,proto.protocol.Transaction.raw.serializeBinaryToWriter),(u=n.getSignatureList_asU8()).length>0&&i.writeRepeatedBytes(2,u),(u=n.getRetList()).length>0&&i.writeRepeatedMessage(5,u,proto.protocol.Transaction.Result.serializeBinaryToWriter)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Transaction.Contract.prototype.toObject=function(n){return proto.protocol.Transaction.Contract.toObject(n,this)},proto.protocol.Transaction.Contract.toObject=function(n,i){var u,l={type:o.Message.getFieldWithDefault(i,1,0),parameter:(u=i.getParameter())&&s.Any.toObject(n,u),provider:i.getProvider_asB64(),contractname:i.getContractname_asB64(),permissionId:o.Message.getFieldWithDefault(i,5,0)};return n&&(l.$jspbMessageInstance=i),l}),proto.protocol.Transaction.Contract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Transaction.Contract;return proto.protocol.Transaction.Contract.deserializeBinaryFromReader(u,i)},proto.protocol.Transaction.Contract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readEnum();n.setType(u);break;case 2:u=new s.Any,i.readMessage(u,s.Any.deserializeBinaryFromReader),n.setParameter(u);break;case 3:u=i.readBytes(),n.setProvider(u);break;case 4:u=i.readBytes(),n.setContractname(u);break;case 5:u=i.readInt32(),n.setPermissionId(u);break;default:i.skipField()}return n},proto.protocol.Transaction.Contract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Transaction.Contract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Transaction.Contract.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getType())!==0&&i.writeEnum(1,u),(u=n.getParameter())!=null&&i.writeMessage(2,u,s.Any.serializeBinaryToWriter),(u=n.getProvider_asU8()).length>0&&i.writeBytes(3,u),(u=n.getContractname_asU8()).length>0&&i.writeBytes(4,u),(u=n.getPermissionId())!==0&&i.writeInt32(5,u)},proto.protocol.Transaction.Contract.ContractType={ACCOUNTCREATECONTRACT:0,TRANSFERCONTRACT:1,TRANSFERASSETCONTRACT:2,VOTEASSETCONTRACT:3,VOTEWITNESSCONTRACT:4,WITNESSCREATECONTRACT:5,ASSETISSUECONTRACT:6,WITNESSUPDATECONTRACT:8,PARTICIPATEASSETISSUECONTRACT:9,ACCOUNTUPDATECONTRACT:10,FREEZEBALANCECONTRACT:11,UNFREEZEBALANCECONTRACT:12,WITHDRAWBALANCECONTRACT:13,UNFREEZEASSETCONTRACT:14,UPDATEASSETCONTRACT:15,PROPOSALCREATECONTRACT:16,PROPOSALAPPROVECONTRACT:17,PROPOSALDELETECONTRACT:18,SETACCOUNTIDCONTRACT:19,CUSTOMCONTRACT:20,CREATESMARTCONTRACT:30,TRIGGERSMARTCONTRACT:31,GETCONTRACT:32,UPDATESETTINGCONTRACT:33,EXCHANGECREATECONTRACT:41,EXCHANGEINJECTCONTRACT:42,EXCHANGEWITHDRAWCONTRACT:43,EXCHANGETRANSACTIONCONTRACT:44,UPDATEENERGYLIMITCONTRACT:45,ACCOUNTPERMISSIONUPDATECONTRACT:46,CLEARABICONTRACT:48,UPDATEBROKERAGECONTRACT:49,SHIELDEDTRANSFERCONTRACT:51,MARKETSELLASSETCONTRACT:52,MARKETCANCELORDERCONTRACT:53,FREEZEBALANCEV2CONTRACT:54,UNFREEZEBALANCEV2CONTRACT:55,WITHDRAWEXPIREUNFREEZECONTRACT:56,DELEGATERESOURCECONTRACT:57,UNDELEGATERESOURCECONTRACT:58},proto.protocol.Transaction.Contract.prototype.getType=function(){return o.Message.getFieldWithDefault(this,1,0)},proto.protocol.Transaction.Contract.prototype.setType=function(n){return o.Message.setProto3EnumField(this,1,n)},proto.protocol.Transaction.Contract.prototype.getParameter=function(){return o.Message.getWrapperField(this,s.Any,2)},proto.protocol.Transaction.Contract.prototype.setParameter=function(n){return o.Message.setWrapperField(this,2,n)},proto.protocol.Transaction.Contract.prototype.clearParameter=function(){return this.setParameter(void 0)},proto.protocol.Transaction.Contract.prototype.hasParameter=function(){return o.Message.getField(this,2)!=null},proto.protocol.Transaction.Contract.prototype.getProvider=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.Transaction.Contract.prototype.getProvider_asB64=function(){return o.Message.bytesAsB64(this.getProvider())},proto.protocol.Transaction.Contract.prototype.getProvider_asU8=function(){return o.Message.bytesAsU8(this.getProvider())},proto.protocol.Transaction.Contract.prototype.setProvider=function(n){return o.Message.setProto3BytesField(this,3,n)},proto.protocol.Transaction.Contract.prototype.getContractname=function(){return o.Message.getFieldWithDefault(this,4,"")},proto.protocol.Transaction.Contract.prototype.getContractname_asB64=function(){return o.Message.bytesAsB64(this.getContractname())},proto.protocol.Transaction.Contract.prototype.getContractname_asU8=function(){return o.Message.bytesAsU8(this.getContractname())},proto.protocol.Transaction.Contract.prototype.setContractname=function(n){return o.Message.setProto3BytesField(this,4,n)},proto.protocol.Transaction.Contract.prototype.getPermissionId=function(){return o.Message.getFieldWithDefault(this,5,0)},proto.protocol.Transaction.Contract.prototype.setPermissionId=function(n){return o.Message.setProto3IntField(this,5,n)},proto.protocol.Transaction.Result.repeatedFields_=[26],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Transaction.Result.prototype.toObject=function(n){return proto.protocol.Transaction.Result.toObject(n,this)},proto.protocol.Transaction.Result.toObject=function(n,i){var u={fee:o.Message.getFieldWithDefault(i,1,0),ret:o.Message.getFieldWithDefault(i,2,0),contractret:o.Message.getFieldWithDefault(i,3,0),assetissueid:o.Message.getFieldWithDefault(i,14,""),withdrawAmount:o.Message.getFieldWithDefault(i,15,0),unfreezeAmount:o.Message.getFieldWithDefault(i,16,0),exchangeReceivedAmount:o.Message.getFieldWithDefault(i,18,0),exchangeInjectAnotherAmount:o.Message.getFieldWithDefault(i,19,0),exchangeWithdrawAnotherAmount:o.Message.getFieldWithDefault(i,20,0),exchangeId:o.Message.getFieldWithDefault(i,21,0),shieldedTransactionFee:o.Message.getFieldWithDefault(i,22,0),orderid:i.getOrderid_asB64(),orderdetailsList:o.Message.toObjectList(i.getOrderdetailsList(),proto.protocol.MarketOrderDetail.toObject,n)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.Transaction.Result.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Transaction.Result;return proto.protocol.Transaction.Result.deserializeBinaryFromReader(u,i)},proto.protocol.Transaction.Result.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readInt64();n.setFee(u);break;case 2:u=i.readEnum(),n.setRet(u);break;case 3:u=i.readEnum(),n.setContractret(u);break;case 14:u=i.readString(),n.setAssetissueid(u);break;case 15:u=i.readInt64(),n.setWithdrawAmount(u);break;case 16:u=i.readInt64(),n.setUnfreezeAmount(u);break;case 18:u=i.readInt64(),n.setExchangeReceivedAmount(u);break;case 19:u=i.readInt64(),n.setExchangeInjectAnotherAmount(u);break;case 20:u=i.readInt64(),n.setExchangeWithdrawAnotherAmount(u);break;case 21:u=i.readInt64(),n.setExchangeId(u);break;case 22:u=i.readInt64(),n.setShieldedTransactionFee(u);break;case 25:u=i.readBytes(),n.setOrderid(u);break;case 26:u=new proto.protocol.MarketOrderDetail,i.readMessage(u,proto.protocol.MarketOrderDetail.deserializeBinaryFromReader),n.addOrderdetails(u);break;default:i.skipField()}return n},proto.protocol.Transaction.Result.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Transaction.Result.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Transaction.Result.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getFee())!==0&&i.writeInt64(1,u),(u=n.getRet())!==0&&i.writeEnum(2,u),(u=n.getContractret())!==0&&i.writeEnum(3,u),(u=n.getAssetissueid()).length>0&&i.writeString(14,u),(u=n.getWithdrawAmount())!==0&&i.writeInt64(15,u),(u=n.getUnfreezeAmount())!==0&&i.writeInt64(16,u),(u=n.getExchangeReceivedAmount())!==0&&i.writeInt64(18,u),(u=n.getExchangeInjectAnotherAmount())!==0&&i.writeInt64(19,u),(u=n.getExchangeWithdrawAnotherAmount())!==0&&i.writeInt64(20,u),(u=n.getExchangeId())!==0&&i.writeInt64(21,u),(u=n.getShieldedTransactionFee())!==0&&i.writeInt64(22,u),(u=n.getOrderid_asU8()).length>0&&i.writeBytes(25,u),(u=n.getOrderdetailsList()).length>0&&i.writeRepeatedMessage(26,u,proto.protocol.MarketOrderDetail.serializeBinaryToWriter)},proto.protocol.Transaction.Result.code={SUCESS:0,FAILED:1},proto.protocol.Transaction.Result.contractResult={DEFAULT:0,SUCCESS:1,REVERT:2,BAD_JUMP_DESTINATION:3,OUT_OF_MEMORY:4,PRECOMPILED_CONTRACT:5,STACK_TOO_SMALL:6,STACK_TOO_LARGE:7,ILLEGAL_OPERATION:8,STACK_OVERFLOW:9,OUT_OF_ENERGY:10,OUT_OF_TIME:11,JVM_STACK_OVER_FLOW:12,UNKNOWN:13,TRANSFER_FAILED:14,INVALID_CODE:15},proto.protocol.Transaction.Result.prototype.getFee=function(){return o.Message.getFieldWithDefault(this,1,0)},proto.protocol.Transaction.Result.prototype.setFee=function(n){return o.Message.setProto3IntField(this,1,n)},proto.protocol.Transaction.Result.prototype.getRet=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.Transaction.Result.prototype.setRet=function(n){return o.Message.setProto3EnumField(this,2,n)},proto.protocol.Transaction.Result.prototype.getContractret=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.Transaction.Result.prototype.setContractret=function(n){return o.Message.setProto3EnumField(this,3,n)},proto.protocol.Transaction.Result.prototype.getAssetissueid=function(){return o.Message.getFieldWithDefault(this,14,"")},proto.protocol.Transaction.Result.prototype.setAssetissueid=function(n){return o.Message.setProto3StringField(this,14,n)},proto.protocol.Transaction.Result.prototype.getWithdrawAmount=function(){return o.Message.getFieldWithDefault(this,15,0)},proto.protocol.Transaction.Result.prototype.setWithdrawAmount=function(n){return o.Message.setProto3IntField(this,15,n)},proto.protocol.Transaction.Result.prototype.getUnfreezeAmount=function(){return o.Message.getFieldWithDefault(this,16,0)},proto.protocol.Transaction.Result.prototype.setUnfreezeAmount=function(n){return o.Message.setProto3IntField(this,16,n)},proto.protocol.Transaction.Result.prototype.getExchangeReceivedAmount=function(){return o.Message.getFieldWithDefault(this,18,0)},proto.protocol.Transaction.Result.prototype.setExchangeReceivedAmount=function(n){return o.Message.setProto3IntField(this,18,n)},proto.protocol.Transaction.Result.prototype.getExchangeInjectAnotherAmount=function(){return o.Message.getFieldWithDefault(this,19,0)},proto.protocol.Transaction.Result.prototype.setExchangeInjectAnotherAmount=function(n){return o.Message.setProto3IntField(this,19,n)},proto.protocol.Transaction.Result.prototype.getExchangeWithdrawAnotherAmount=function(){return o.Message.getFieldWithDefault(this,20,0)},proto.protocol.Transaction.Result.prototype.setExchangeWithdrawAnotherAmount=function(n){return o.Message.setProto3IntField(this,20,n)},proto.protocol.Transaction.Result.prototype.getExchangeId=function(){return o.Message.getFieldWithDefault(this,21,0)},proto.protocol.Transaction.Result.prototype.setExchangeId=function(n){return o.Message.setProto3IntField(this,21,n)},proto.protocol.Transaction.Result.prototype.getShieldedTransactionFee=function(){return o.Message.getFieldWithDefault(this,22,0)},proto.protocol.Transaction.Result.prototype.setShieldedTransactionFee=function(n){return o.Message.setProto3IntField(this,22,n)},proto.protocol.Transaction.Result.prototype.getOrderid=function(){return o.Message.getFieldWithDefault(this,25,"")},proto.protocol.Transaction.Result.prototype.getOrderid_asB64=function(){return o.Message.bytesAsB64(this.getOrderid())},proto.protocol.Transaction.Result.prototype.getOrderid_asU8=function(){return o.Message.bytesAsU8(this.getOrderid())},proto.protocol.Transaction.Result.prototype.setOrderid=function(n){return o.Message.setProto3BytesField(this,25,n)},proto.protocol.Transaction.Result.prototype.getOrderdetailsList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.MarketOrderDetail,26)},proto.protocol.Transaction.Result.prototype.setOrderdetailsList=function(n){return o.Message.setRepeatedWrapperField(this,26,n)},proto.protocol.Transaction.Result.prototype.addOrderdetails=function(n,i){return o.Message.addToRepeatedWrapperField(this,26,n,proto.protocol.MarketOrderDetail,i)},proto.protocol.Transaction.Result.prototype.clearOrderdetailsList=function(){return this.setOrderdetailsList([])},proto.protocol.Transaction.raw.repeatedFields_=[9,11],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.Transaction.raw.prototype.toObject=function(n){return proto.protocol.Transaction.raw.toObject(n,this)},proto.protocol.Transaction.raw.toObject=function(n,i){var u={refBlockBytes:i.getRefBlockBytes_asB64(),refBlockNum:o.Message.getFieldWithDefault(i,3,0),refBlockHash:i.getRefBlockHash_asB64(),expiration:o.Message.getFieldWithDefault(i,8,0),authsList:o.Message.toObjectList(i.getAuthsList(),proto.protocol.authority.toObject,n),data:i.getData_asB64(),contractList:o.Message.toObjectList(i.getContractList(),proto.protocol.Transaction.Contract.toObject,n),scripts:i.getScripts_asB64(),timestamp:o.Message.getFieldWithDefault(i,14,0),feeLimit:o.Message.getFieldWithDefault(i,18,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.Transaction.raw.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.Transaction.raw;return proto.protocol.Transaction.raw.deserializeBinaryFromReader(u,i)},proto.protocol.Transaction.raw.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setRefBlockBytes(u);break;case 3:u=i.readInt64(),n.setRefBlockNum(u);break;case 4:u=i.readBytes(),n.setRefBlockHash(u);break;case 8:u=i.readInt64(),n.setExpiration(u);break;case 9:u=new proto.protocol.authority,i.readMessage(u,proto.protocol.authority.deserializeBinaryFromReader),n.addAuths(u);break;case 10:u=i.readBytes(),n.setData(u);break;case 11:u=new proto.protocol.Transaction.Contract,i.readMessage(u,proto.protocol.Transaction.Contract.deserializeBinaryFromReader),n.addContract(u);break;case 12:u=i.readBytes(),n.setScripts(u);break;case 14:u=i.readInt64(),n.setTimestamp(u);break;case 18:u=i.readInt64(),n.setFeeLimit(u);break;default:i.skipField()}return n},proto.protocol.Transaction.raw.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.Transaction.raw.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.Transaction.raw.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getRefBlockBytes_asU8()).length>0&&i.writeBytes(1,u),(u=n.getRefBlockNum())!==0&&i.writeInt64(3,u),(u=n.getRefBlockHash_asU8()).length>0&&i.writeBytes(4,u),(u=n.getExpiration())!==0&&i.writeInt64(8,u),(u=n.getAuthsList()).length>0&&i.writeRepeatedMessage(9,u,proto.protocol.authority.serializeBinaryToWriter),(u=n.getData_asU8()).length>0&&i.writeBytes(10,u),(u=n.getContractList()).length>0&&i.writeRepeatedMessage(11,u,proto.protocol.Transaction.Contract.serializeBinaryToWriter),(u=n.getScripts_asU8()).length>0&&i.writeBytes(12,u),(u=n.getTimestamp())!==0&&i.writeInt64(14,u),(u=n.getFeeLimit())!==0&&i.writeInt64(18,u)},proto.protocol.Transaction.raw.prototype.getRefBlockBytes=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.Transaction.raw.prototype.getRefBlockBytes_asB64=function(){return o.Message.bytesAsB64(this.getRefBlockBytes())},proto.protocol.Transaction.raw.prototype.getRefBlockBytes_asU8=function(){return o.Message.bytesAsU8(this.getRefBlockBytes())},proto.protocol.Transaction.raw.prototype.setRefBlockBytes=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.Transaction.raw.prototype.getRefBlockNum=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.Transaction.raw.prototype.setRefBlockNum=function(n){return o.Message.setProto3IntField(this,3,n)},proto.protocol.Transaction.raw.prototype.getRefBlockHash=function(){return o.Message.getFieldWithDefault(this,4,"")},proto.protocol.Transaction.raw.prototype.getRefBlockHash_asB64=function(){return o.Message.bytesAsB64(this.getRefBlockHash())},proto.protocol.Transaction.raw.prototype.getRefBlockHash_asU8=function(){return o.Message.bytesAsU8(this.getRefBlockHash())},proto.protocol.Transaction.raw.prototype.setRefBlockHash=function(n){return o.Message.setProto3BytesField(this,4,n)},proto.protocol.Transaction.raw.prototype.getExpiration=function(){return o.Message.getFieldWithDefault(this,8,0)},proto.protocol.Transaction.raw.prototype.setExpiration=function(n){return o.Message.setProto3IntField(this,8,n)},proto.protocol.Transaction.raw.prototype.getAuthsList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.authority,9)},proto.protocol.Transaction.raw.prototype.setAuthsList=function(n){return o.Message.setRepeatedWrapperField(this,9,n)},proto.protocol.Transaction.raw.prototype.addAuths=function(n,i){return o.Message.addToRepeatedWrapperField(this,9,n,proto.protocol.authority,i)},proto.protocol.Transaction.raw.prototype.clearAuthsList=function(){return this.setAuthsList([])},proto.protocol.Transaction.raw.prototype.getData=function(){return o.Message.getFieldWithDefault(this,10,"")},proto.protocol.Transaction.raw.prototype.getData_asB64=function(){return o.Message.bytesAsB64(this.getData())},proto.protocol.Transaction.raw.prototype.getData_asU8=function(){return o.Message.bytesAsU8(this.getData())},proto.protocol.Transaction.raw.prototype.setData=function(n){return o.Message.setProto3BytesField(this,10,n)},proto.protocol.Transaction.raw.prototype.getContractList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.Transaction.Contract,11)},proto.protocol.Transaction.raw.prototype.setContractList=function(n){return o.Message.setRepeatedWrapperField(this,11,n)},proto.protocol.Transaction.raw.prototype.addContract=function(n,i){return o.Message.addToRepeatedWrapperField(this,11,n,proto.protocol.Transaction.Contract,i)},proto.protocol.Transaction.raw.prototype.clearContractList=function(){return this.setContractList([])},proto.protocol.Transaction.raw.prototype.getScripts=function(){return o.Message.getFieldWithDefault(this,12,"")},proto.protocol.Transaction.raw.prototype.getScripts_asB64=function(){return o.Message.bytesAsB64(this.getScripts())},proto.protocol.Transaction.raw.prototype.getScripts_asU8=function(){return o.Message.bytesAsU8(this.getScripts())},proto.protocol.Transaction.raw.prototype.setScripts=function(n){return o.Message.setProto3BytesField(this,12,n)},proto.protocol.Transaction.raw.prototype.getTimestamp=function(){return o.Message.getFieldWithDefault(this,14,0)},proto.protocol.Transaction.raw.prototype.setTimestamp=function(n){return o.Message.setProto3IntField(this,14,n)},proto.protocol.Transaction.raw.prototype.getFeeLimit=function(){return o.Message.getFieldWithDefault(this,18,0)},proto.protocol.Transaction.raw.prototype.setFeeLimit=function(n){return o.Message.setProto3IntField(this,18,n)},proto.protocol.Transaction.prototype.getRawData=function(){return o.Message.getWrapperField(this,proto.protocol.Transaction.raw,1)},proto.protocol.Transaction.prototype.setRawData=function(n){return o.Message.setWrapperField(this,1,n)},proto.protocol.Transaction.prototype.clearRawData=function(){return this.setRawData(void 0)},proto.protocol.Transaction.prototype.hasRawData=function(){return o.Message.getField(this,1)!=null},proto.protocol.Transaction.prototype.getSignatureList=function(){return o.Message.getRepeatedField(this,2)},proto.protocol.Transaction.prototype.getSignatureList_asB64=function(){return o.Message.bytesListAsB64(this.getSignatureList())},proto.protocol.Transaction.prototype.getSignatureList_asU8=function(){return o.Message.bytesListAsU8(this.getSignatureList())},proto.protocol.Transaction.prototype.setSignatureList=function(n){return o.Message.setField(this,2,n||[])},proto.protocol.Transaction.prototype.addSignature=function(n,i){return o.Message.addToRepeatedField(this,2,n,i)},proto.protocol.Transaction.prototype.clearSignatureList=function(){return this.setSignatureList([])},proto.protocol.Transaction.prototype.getRetList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.Transaction.Result,5)},proto.protocol.Transaction.prototype.setRetList=function(n){return o.Message.setRepeatedWrapperField(this,5,n)},proto.protocol.Transaction.prototype.addRet=function(n,i){return o.Message.addToRepeatedWrapperField(this,5,n,proto.protocol.Transaction.Result,i)},proto.protocol.Transaction.prototype.clearRetList=function(){return this.setRetList([])},proto.protocol.AccountType={NORMAL:0,ASSETISSUE:1,CONTRACT:2},a.object.extend(t,proto.protocol)},function(e,t,r){var o=r(8),a=function(){return this||window||a||self||Function("return this")()}.call(null);o.exportSymbol("proto.protocol.ResourceCode",null,a),proto.protocol.ResourceCode={BANDWIDTH:0,ENERGY:1,TRON_POWER:2},o.object.extend(t,proto.protocol)},function(e,t){e.exports=C3()},function(e,t){e.exports=B3()},function(e,t){e.exports=F6()},function(e,t){e.exports=eo()},function(e,t){e.exports=Ze()},function(e,t){e.exports=u8()},function(e,t){e.exports=($9(),Ib(H9))},function(e,t){e.exports=Z9()},function(e){e.exports=JSON.parse('{"a":"5.1.0"}')},function(e,t){e.exports=J9()},function(e,t){e.exports=Uv()},function(e,t){e.exports=Uv()},function(e,t,r){var o=r(8),a=o,c=function(){return this||window||c||self||Function("return this")()}.call(null),s=r(21);a.object.extend(proto,s),a.exportSymbol("proto.protocol.AccountBalanceRequest",null,c),a.exportSymbol("proto.protocol.AccountBalanceResponse",null,c),a.exportSymbol("proto.protocol.AccountIdentifier",null,c),a.exportSymbol("proto.protocol.AccountTrace",null,c),a.exportSymbol("proto.protocol.BlockBalanceTrace",null,c),a.exportSymbol("proto.protocol.BlockBalanceTrace.BlockIdentifier",null,c),a.exportSymbol("proto.protocol.DelegateResourceContract",null,c),a.exportSymbol("proto.protocol.FreezeBalanceContract",null,c),a.exportSymbol("proto.protocol.FreezeBalanceV2Contract",null,c),a.exportSymbol("proto.protocol.TransactionBalanceTrace",null,c),a.exportSymbol("proto.protocol.TransactionBalanceTrace.Operation",null,c),a.exportSymbol("proto.protocol.TransferContract",null,c),a.exportSymbol("proto.protocol.UnDelegateResourceContract",null,c),a.exportSymbol("proto.protocol.UnfreezeBalanceContract",null,c),a.exportSymbol("proto.protocol.UnfreezeBalanceV2Contract",null,c),a.exportSymbol("proto.protocol.WithdrawBalanceContract",null,c),a.exportSymbol("proto.protocol.WithdrawExpireUnfreezeContract",null,c),proto.protocol.FreezeBalanceContract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.FreezeBalanceContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.FreezeBalanceContract.displayName="proto.protocol.FreezeBalanceContract"),proto.protocol.UnfreezeBalanceContract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.UnfreezeBalanceContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.UnfreezeBalanceContract.displayName="proto.protocol.UnfreezeBalanceContract"),proto.protocol.WithdrawBalanceContract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.WithdrawBalanceContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.WithdrawBalanceContract.displayName="proto.protocol.WithdrawBalanceContract"),proto.protocol.TransferContract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.TransferContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.TransferContract.displayName="proto.protocol.TransferContract"),proto.protocol.TransactionBalanceTrace=function(n){o.Message.initialize(this,n,0,-1,proto.protocol.TransactionBalanceTrace.repeatedFields_,null)},a.inherits(proto.protocol.TransactionBalanceTrace,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.TransactionBalanceTrace.displayName="proto.protocol.TransactionBalanceTrace"),proto.protocol.TransactionBalanceTrace.Operation=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.TransactionBalanceTrace.Operation,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.TransactionBalanceTrace.Operation.displayName="proto.protocol.TransactionBalanceTrace.Operation"),proto.protocol.BlockBalanceTrace=function(n){o.Message.initialize(this,n,0,-1,proto.protocol.BlockBalanceTrace.repeatedFields_,null)},a.inherits(proto.protocol.BlockBalanceTrace,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.BlockBalanceTrace.displayName="proto.protocol.BlockBalanceTrace"),proto.protocol.BlockBalanceTrace.BlockIdentifier=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.BlockBalanceTrace.BlockIdentifier,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.BlockBalanceTrace.BlockIdentifier.displayName="proto.protocol.BlockBalanceTrace.BlockIdentifier"),proto.protocol.AccountTrace=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.AccountTrace,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.AccountTrace.displayName="proto.protocol.AccountTrace"),proto.protocol.AccountIdentifier=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.AccountIdentifier,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.AccountIdentifier.displayName="proto.protocol.AccountIdentifier"),proto.protocol.AccountBalanceRequest=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.AccountBalanceRequest,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.AccountBalanceRequest.displayName="proto.protocol.AccountBalanceRequest"),proto.protocol.AccountBalanceResponse=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.AccountBalanceResponse,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.AccountBalanceResponse.displayName="proto.protocol.AccountBalanceResponse"),proto.protocol.FreezeBalanceV2Contract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.FreezeBalanceV2Contract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.FreezeBalanceV2Contract.displayName="proto.protocol.FreezeBalanceV2Contract"),proto.protocol.UnfreezeBalanceV2Contract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.UnfreezeBalanceV2Contract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.UnfreezeBalanceV2Contract.displayName="proto.protocol.UnfreezeBalanceV2Contract"),proto.protocol.WithdrawExpireUnfreezeContract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.WithdrawExpireUnfreezeContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.WithdrawExpireUnfreezeContract.displayName="proto.protocol.WithdrawExpireUnfreezeContract"),proto.protocol.DelegateResourceContract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.DelegateResourceContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.DelegateResourceContract.displayName="proto.protocol.DelegateResourceContract"),proto.protocol.UnDelegateResourceContract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.UnDelegateResourceContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.UnDelegateResourceContract.displayName="proto.protocol.UnDelegateResourceContract"),o.Message.GENERATE_TO_OBJECT&&(proto.protocol.FreezeBalanceContract.prototype.toObject=function(n){return proto.protocol.FreezeBalanceContract.toObject(n,this)},proto.protocol.FreezeBalanceContract.toObject=function(n,i){var u={ownerAddress:i.getOwnerAddress_asB64(),frozenBalance:o.Message.getFieldWithDefault(i,2,0),frozenDuration:o.Message.getFieldWithDefault(i,3,0),resource:o.Message.getFieldWithDefault(i,10,0),receiverAddress:i.getReceiverAddress_asB64()};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.FreezeBalanceContract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.FreezeBalanceContract;return proto.protocol.FreezeBalanceContract.deserializeBinaryFromReader(u,i)},proto.protocol.FreezeBalanceContract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setOwnerAddress(u);break;case 2:u=i.readInt64(),n.setFrozenBalance(u);break;case 3:u=i.readInt64(),n.setFrozenDuration(u);break;case 10:u=i.readEnum(),n.setResource(u);break;case 15:u=i.readBytes(),n.setReceiverAddress(u);break;default:i.skipField()}return n},proto.protocol.FreezeBalanceContract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.FreezeBalanceContract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.FreezeBalanceContract.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getFrozenBalance())!==0&&i.writeInt64(2,u),(u=n.getFrozenDuration())!==0&&i.writeInt64(3,u),(u=n.getResource())!==0&&i.writeEnum(10,u),(u=n.getReceiverAddress_asU8()).length>0&&i.writeBytes(15,u)},proto.protocol.FreezeBalanceContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.FreezeBalanceContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.FreezeBalanceContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.FreezeBalanceContract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.FreezeBalanceContract.prototype.getFrozenBalance=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.FreezeBalanceContract.prototype.setFrozenBalance=function(n){return o.Message.setProto3IntField(this,2,n)},proto.protocol.FreezeBalanceContract.prototype.getFrozenDuration=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.FreezeBalanceContract.prototype.setFrozenDuration=function(n){return o.Message.setProto3IntField(this,3,n)},proto.protocol.FreezeBalanceContract.prototype.getResource=function(){return o.Message.getFieldWithDefault(this,10,0)},proto.protocol.FreezeBalanceContract.prototype.setResource=function(n){return o.Message.setProto3EnumField(this,10,n)},proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress=function(){return o.Message.getFieldWithDefault(this,15,"")},proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress_asB64=function(){return o.Message.bytesAsB64(this.getReceiverAddress())},proto.protocol.FreezeBalanceContract.prototype.getReceiverAddress_asU8=function(){return o.Message.bytesAsU8(this.getReceiverAddress())},proto.protocol.FreezeBalanceContract.prototype.setReceiverAddress=function(n){return o.Message.setProto3BytesField(this,15,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.UnfreezeBalanceContract.prototype.toObject=function(n){return proto.protocol.UnfreezeBalanceContract.toObject(n,this)},proto.protocol.UnfreezeBalanceContract.toObject=function(n,i){var u={ownerAddress:i.getOwnerAddress_asB64(),resource:o.Message.getFieldWithDefault(i,10,0),receiverAddress:i.getReceiverAddress_asB64()};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.UnfreezeBalanceContract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.UnfreezeBalanceContract;return proto.protocol.UnfreezeBalanceContract.deserializeBinaryFromReader(u,i)},proto.protocol.UnfreezeBalanceContract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setOwnerAddress(u);break;case 10:u=i.readEnum(),n.setResource(u);break;case 15:u=i.readBytes(),n.setReceiverAddress(u);break;default:i.skipField()}return n},proto.protocol.UnfreezeBalanceContract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.UnfreezeBalanceContract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.UnfreezeBalanceContract.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getResource())!==0&&i.writeEnum(10,u),(u=n.getReceiverAddress_asU8()).length>0&&i.writeBytes(15,u)},proto.protocol.UnfreezeBalanceContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.UnfreezeBalanceContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.UnfreezeBalanceContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.UnfreezeBalanceContract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.UnfreezeBalanceContract.prototype.getResource=function(){return o.Message.getFieldWithDefault(this,10,0)},proto.protocol.UnfreezeBalanceContract.prototype.setResource=function(n){return o.Message.setProto3EnumField(this,10,n)},proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress=function(){return o.Message.getFieldWithDefault(this,15,"")},proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress_asB64=function(){return o.Message.bytesAsB64(this.getReceiverAddress())},proto.protocol.UnfreezeBalanceContract.prototype.getReceiverAddress_asU8=function(){return o.Message.bytesAsU8(this.getReceiverAddress())},proto.protocol.UnfreezeBalanceContract.prototype.setReceiverAddress=function(n){return o.Message.setProto3BytesField(this,15,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.WithdrawBalanceContract.prototype.toObject=function(n){return proto.protocol.WithdrawBalanceContract.toObject(n,this)},proto.protocol.WithdrawBalanceContract.toObject=function(n,i){var u={ownerAddress:i.getOwnerAddress_asB64()};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.WithdrawBalanceContract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.WithdrawBalanceContract;return proto.protocol.WithdrawBalanceContract.deserializeBinaryFromReader(u,i)},proto.protocol.WithdrawBalanceContract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setOwnerAddress(u);break;default:i.skipField()}return n},proto.protocol.WithdrawBalanceContract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.WithdrawBalanceContract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.WithdrawBalanceContract.serializeBinaryToWriter=function(n,i){var u;(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(1,u)},proto.protocol.WithdrawBalanceContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.WithdrawBalanceContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.WithdrawBalanceContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.WithdrawBalanceContract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.TransferContract.prototype.toObject=function(n){return proto.protocol.TransferContract.toObject(n,this)},proto.protocol.TransferContract.toObject=function(n,i){var u={ownerAddress:i.getOwnerAddress_asB64(),toAddress:i.getToAddress_asB64(),amount:o.Message.getFieldWithDefault(i,3,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.TransferContract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.TransferContract;return proto.protocol.TransferContract.deserializeBinaryFromReader(u,i)},proto.protocol.TransferContract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setOwnerAddress(u);break;case 2:u=i.readBytes(),n.setToAddress(u);break;case 3:u=i.readInt64(),n.setAmount(u);break;default:i.skipField()}return n},proto.protocol.TransferContract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.TransferContract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.TransferContract.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getToAddress_asU8()).length>0&&i.writeBytes(2,u),(u=n.getAmount())!==0&&i.writeInt64(3,u)},proto.protocol.TransferContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.TransferContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.TransferContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.TransferContract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.TransferContract.prototype.getToAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.TransferContract.prototype.getToAddress_asB64=function(){return o.Message.bytesAsB64(this.getToAddress())},proto.protocol.TransferContract.prototype.getToAddress_asU8=function(){return o.Message.bytesAsU8(this.getToAddress())},proto.protocol.TransferContract.prototype.setToAddress=function(n){return o.Message.setProto3BytesField(this,2,n)},proto.protocol.TransferContract.prototype.getAmount=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.TransferContract.prototype.setAmount=function(n){return o.Message.setProto3IntField(this,3,n)},proto.protocol.TransactionBalanceTrace.repeatedFields_=[2],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.TransactionBalanceTrace.prototype.toObject=function(n){return proto.protocol.TransactionBalanceTrace.toObject(n,this)},proto.protocol.TransactionBalanceTrace.toObject=function(n,i){var u={transactionIdentifier:i.getTransactionIdentifier_asB64(),operationList:o.Message.toObjectList(i.getOperationList(),proto.protocol.TransactionBalanceTrace.Operation.toObject,n),type:o.Message.getFieldWithDefault(i,3,""),status:o.Message.getFieldWithDefault(i,4,"")};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.TransactionBalanceTrace.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.TransactionBalanceTrace;return proto.protocol.TransactionBalanceTrace.deserializeBinaryFromReader(u,i)},proto.protocol.TransactionBalanceTrace.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setTransactionIdentifier(u);break;case 2:u=new proto.protocol.TransactionBalanceTrace.Operation,i.readMessage(u,proto.protocol.TransactionBalanceTrace.Operation.deserializeBinaryFromReader),n.addOperation(u);break;case 3:u=i.readString(),n.setType(u);break;case 4:u=i.readString(),n.setStatus(u);break;default:i.skipField()}return n},proto.protocol.TransactionBalanceTrace.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.TransactionBalanceTrace.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.TransactionBalanceTrace.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getTransactionIdentifier_asU8()).length>0&&i.writeBytes(1,u),(u=n.getOperationList()).length>0&&i.writeRepeatedMessage(2,u,proto.protocol.TransactionBalanceTrace.Operation.serializeBinaryToWriter),(u=n.getType()).length>0&&i.writeString(3,u),(u=n.getStatus()).length>0&&i.writeString(4,u)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.TransactionBalanceTrace.Operation.prototype.toObject=function(n){return proto.protocol.TransactionBalanceTrace.Operation.toObject(n,this)},proto.protocol.TransactionBalanceTrace.Operation.toObject=function(n,i){var u={operationIdentifier:o.Message.getFieldWithDefault(i,1,0),address:i.getAddress_asB64(),amount:o.Message.getFieldWithDefault(i,3,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.TransactionBalanceTrace.Operation.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.TransactionBalanceTrace.Operation;return proto.protocol.TransactionBalanceTrace.Operation.deserializeBinaryFromReader(u,i)},proto.protocol.TransactionBalanceTrace.Operation.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readInt64();n.setOperationIdentifier(u);break;case 2:u=i.readBytes(),n.setAddress(u);break;case 3:u=i.readInt64(),n.setAmount(u);break;default:i.skipField()}return n},proto.protocol.TransactionBalanceTrace.Operation.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.TransactionBalanceTrace.Operation.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.TransactionBalanceTrace.Operation.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getOperationIdentifier())!==0&&i.writeInt64(1,u),(u=n.getAddress_asU8()).length>0&&i.writeBytes(2,u),(u=n.getAmount())!==0&&i.writeInt64(3,u)},proto.protocol.TransactionBalanceTrace.Operation.prototype.getOperationIdentifier=function(){return o.Message.getFieldWithDefault(this,1,0)},proto.protocol.TransactionBalanceTrace.Operation.prototype.setOperationIdentifier=function(n){return o.Message.setProto3IntField(this,1,n)},proto.protocol.TransactionBalanceTrace.Operation.prototype.getAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.TransactionBalanceTrace.Operation.prototype.getAddress_asB64=function(){return o.Message.bytesAsB64(this.getAddress())},proto.protocol.TransactionBalanceTrace.Operation.prototype.getAddress_asU8=function(){return o.Message.bytesAsU8(this.getAddress())},proto.protocol.TransactionBalanceTrace.Operation.prototype.setAddress=function(n){return o.Message.setProto3BytesField(this,2,n)},proto.protocol.TransactionBalanceTrace.Operation.prototype.getAmount=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.TransactionBalanceTrace.Operation.prototype.setAmount=function(n){return o.Message.setProto3IntField(this,3,n)},proto.protocol.TransactionBalanceTrace.prototype.getTransactionIdentifier=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.TransactionBalanceTrace.prototype.getTransactionIdentifier_asB64=function(){return o.Message.bytesAsB64(this.getTransactionIdentifier())},proto.protocol.TransactionBalanceTrace.prototype.getTransactionIdentifier_asU8=function(){return o.Message.bytesAsU8(this.getTransactionIdentifier())},proto.protocol.TransactionBalanceTrace.prototype.setTransactionIdentifier=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.TransactionBalanceTrace.prototype.getOperationList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.TransactionBalanceTrace.Operation,2)},proto.protocol.TransactionBalanceTrace.prototype.setOperationList=function(n){return o.Message.setRepeatedWrapperField(this,2,n)},proto.protocol.TransactionBalanceTrace.prototype.addOperation=function(n,i){return o.Message.addToRepeatedWrapperField(this,2,n,proto.protocol.TransactionBalanceTrace.Operation,i)},proto.protocol.TransactionBalanceTrace.prototype.clearOperationList=function(){return this.setOperationList([])},proto.protocol.TransactionBalanceTrace.prototype.getType=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.TransactionBalanceTrace.prototype.setType=function(n){return o.Message.setProto3StringField(this,3,n)},proto.protocol.TransactionBalanceTrace.prototype.getStatus=function(){return o.Message.getFieldWithDefault(this,4,"")},proto.protocol.TransactionBalanceTrace.prototype.setStatus=function(n){return o.Message.setProto3StringField(this,4,n)},proto.protocol.BlockBalanceTrace.repeatedFields_=[3],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.BlockBalanceTrace.prototype.toObject=function(n){return proto.protocol.BlockBalanceTrace.toObject(n,this)},proto.protocol.BlockBalanceTrace.toObject=function(n,i){var u,l={blockIdentifier:(u=i.getBlockIdentifier())&&proto.protocol.BlockBalanceTrace.BlockIdentifier.toObject(n,u),timestamp:o.Message.getFieldWithDefault(i,2,0),transactionBalanceTraceList:o.Message.toObjectList(i.getTransactionBalanceTraceList(),proto.protocol.TransactionBalanceTrace.toObject,n)};return n&&(l.$jspbMessageInstance=i),l}),proto.protocol.BlockBalanceTrace.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.BlockBalanceTrace;return proto.protocol.BlockBalanceTrace.deserializeBinaryFromReader(u,i)},proto.protocol.BlockBalanceTrace.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=new proto.protocol.BlockBalanceTrace.BlockIdentifier;i.readMessage(u,proto.protocol.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),n.setBlockIdentifier(u);break;case 2:u=i.readInt64(),n.setTimestamp(u);break;case 3:u=new proto.protocol.TransactionBalanceTrace,i.readMessage(u,proto.protocol.TransactionBalanceTrace.deserializeBinaryFromReader),n.addTransactionBalanceTrace(u);break;default:i.skipField()}return n},proto.protocol.BlockBalanceTrace.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.BlockBalanceTrace.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.BlockBalanceTrace.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getBlockIdentifier())!=null&&i.writeMessage(1,u,proto.protocol.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter),(u=n.getTimestamp())!==0&&i.writeInt64(2,u),(u=n.getTransactionBalanceTraceList()).length>0&&i.writeRepeatedMessage(3,u,proto.protocol.TransactionBalanceTrace.serializeBinaryToWriter)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.toObject=function(n){return proto.protocol.BlockBalanceTrace.BlockIdentifier.toObject(n,this)},proto.protocol.BlockBalanceTrace.BlockIdentifier.toObject=function(n,i){var u={hash:i.getHash_asB64(),number:o.Message.getFieldWithDefault(i,2,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.BlockBalanceTrace.BlockIdentifier.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.BlockBalanceTrace.BlockIdentifier;return proto.protocol.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader(u,i)},proto.protocol.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setHash(u);break;case 2:u=i.readInt64(),n.setNumber(u);break;default:i.skipField()}return n},proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getHash_asU8()).length>0&&i.writeBytes(1,u),(u=n.getNumber())!==0&&i.writeInt64(2,u)},proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.getHash=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asB64=function(){return o.Message.bytesAsB64(this.getHash())},proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asU8=function(){return o.Message.bytesAsU8(this.getHash())},proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.setHash=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.getNumber=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.BlockBalanceTrace.BlockIdentifier.prototype.setNumber=function(n){return o.Message.setProto3IntField(this,2,n)},proto.protocol.BlockBalanceTrace.prototype.getBlockIdentifier=function(){return o.Message.getWrapperField(this,proto.protocol.BlockBalanceTrace.BlockIdentifier,1)},proto.protocol.BlockBalanceTrace.prototype.setBlockIdentifier=function(n){return o.Message.setWrapperField(this,1,n)},proto.protocol.BlockBalanceTrace.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},proto.protocol.BlockBalanceTrace.prototype.hasBlockIdentifier=function(){return o.Message.getField(this,1)!=null},proto.protocol.BlockBalanceTrace.prototype.getTimestamp=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.BlockBalanceTrace.prototype.setTimestamp=function(n){return o.Message.setProto3IntField(this,2,n)},proto.protocol.BlockBalanceTrace.prototype.getTransactionBalanceTraceList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.TransactionBalanceTrace,3)},proto.protocol.BlockBalanceTrace.prototype.setTransactionBalanceTraceList=function(n){return o.Message.setRepeatedWrapperField(this,3,n)},proto.protocol.BlockBalanceTrace.prototype.addTransactionBalanceTrace=function(n,i){return o.Message.addToRepeatedWrapperField(this,3,n,proto.protocol.TransactionBalanceTrace,i)},proto.protocol.BlockBalanceTrace.prototype.clearTransactionBalanceTraceList=function(){return this.setTransactionBalanceTraceList([])},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.AccountTrace.prototype.toObject=function(n){return proto.protocol.AccountTrace.toObject(n,this)},proto.protocol.AccountTrace.toObject=function(n,i){var u={balance:o.Message.getFieldWithDefault(i,1,0),placeholder:o.Message.getFieldWithDefault(i,99,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.AccountTrace.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.AccountTrace;return proto.protocol.AccountTrace.deserializeBinaryFromReader(u,i)},proto.protocol.AccountTrace.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readInt64();n.setBalance(u);break;case 99:u=i.readInt64(),n.setPlaceholder(u);break;default:i.skipField()}return n},proto.protocol.AccountTrace.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.AccountTrace.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.AccountTrace.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getBalance())!==0&&i.writeInt64(1,u),(u=n.getPlaceholder())!==0&&i.writeInt64(99,u)},proto.protocol.AccountTrace.prototype.getBalance=function(){return o.Message.getFieldWithDefault(this,1,0)},proto.protocol.AccountTrace.prototype.setBalance=function(n){return o.Message.setProto3IntField(this,1,n)},proto.protocol.AccountTrace.prototype.getPlaceholder=function(){return o.Message.getFieldWithDefault(this,99,0)},proto.protocol.AccountTrace.prototype.setPlaceholder=function(n){return o.Message.setProto3IntField(this,99,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.AccountIdentifier.prototype.toObject=function(n){return proto.protocol.AccountIdentifier.toObject(n,this)},proto.protocol.AccountIdentifier.toObject=function(n,i){var u={address:i.getAddress_asB64()};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.AccountIdentifier.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.AccountIdentifier;return proto.protocol.AccountIdentifier.deserializeBinaryFromReader(u,i)},proto.protocol.AccountIdentifier.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setAddress(u);break;default:i.skipField()}return n},proto.protocol.AccountIdentifier.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.AccountIdentifier.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.AccountIdentifier.serializeBinaryToWriter=function(n,i){var u;(u=n.getAddress_asU8()).length>0&&i.writeBytes(1,u)},proto.protocol.AccountIdentifier.prototype.getAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.AccountIdentifier.prototype.getAddress_asB64=function(){return o.Message.bytesAsB64(this.getAddress())},proto.protocol.AccountIdentifier.prototype.getAddress_asU8=function(){return o.Message.bytesAsU8(this.getAddress())},proto.protocol.AccountIdentifier.prototype.setAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.AccountBalanceRequest.prototype.toObject=function(n){return proto.protocol.AccountBalanceRequest.toObject(n,this)},proto.protocol.AccountBalanceRequest.toObject=function(n,i){var u,l={accountIdentifier:(u=i.getAccountIdentifier())&&proto.protocol.AccountIdentifier.toObject(n,u),blockIdentifier:(u=i.getBlockIdentifier())&&proto.protocol.BlockBalanceTrace.BlockIdentifier.toObject(n,u)};return n&&(l.$jspbMessageInstance=i),l}),proto.protocol.AccountBalanceRequest.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.AccountBalanceRequest;return proto.protocol.AccountBalanceRequest.deserializeBinaryFromReader(u,i)},proto.protocol.AccountBalanceRequest.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=new proto.protocol.AccountIdentifier;i.readMessage(u,proto.protocol.AccountIdentifier.deserializeBinaryFromReader),n.setAccountIdentifier(u);break;case 2:u=new proto.protocol.BlockBalanceTrace.BlockIdentifier,i.readMessage(u,proto.protocol.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),n.setBlockIdentifier(u);break;default:i.skipField()}return n},proto.protocol.AccountBalanceRequest.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.AccountBalanceRequest.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.AccountBalanceRequest.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getAccountIdentifier())!=null&&i.writeMessage(1,u,proto.protocol.AccountIdentifier.serializeBinaryToWriter),(u=n.getBlockIdentifier())!=null&&i.writeMessage(2,u,proto.protocol.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter)},proto.protocol.AccountBalanceRequest.prototype.getAccountIdentifier=function(){return o.Message.getWrapperField(this,proto.protocol.AccountIdentifier,1)},proto.protocol.AccountBalanceRequest.prototype.setAccountIdentifier=function(n){return o.Message.setWrapperField(this,1,n)},proto.protocol.AccountBalanceRequest.prototype.clearAccountIdentifier=function(){return this.setAccountIdentifier(void 0)},proto.protocol.AccountBalanceRequest.prototype.hasAccountIdentifier=function(){return o.Message.getField(this,1)!=null},proto.protocol.AccountBalanceRequest.prototype.getBlockIdentifier=function(){return o.Message.getWrapperField(this,proto.protocol.BlockBalanceTrace.BlockIdentifier,2)},proto.protocol.AccountBalanceRequest.prototype.setBlockIdentifier=function(n){return o.Message.setWrapperField(this,2,n)},proto.protocol.AccountBalanceRequest.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},proto.protocol.AccountBalanceRequest.prototype.hasBlockIdentifier=function(){return o.Message.getField(this,2)!=null},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.AccountBalanceResponse.prototype.toObject=function(n){return proto.protocol.AccountBalanceResponse.toObject(n,this)},proto.protocol.AccountBalanceResponse.toObject=function(n,i){var u,l={balance:o.Message.getFieldWithDefault(i,1,0),blockIdentifier:(u=i.getBlockIdentifier())&&proto.protocol.BlockBalanceTrace.BlockIdentifier.toObject(n,u)};return n&&(l.$jspbMessageInstance=i),l}),proto.protocol.AccountBalanceResponse.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.AccountBalanceResponse;return proto.protocol.AccountBalanceResponse.deserializeBinaryFromReader(u,i)},proto.protocol.AccountBalanceResponse.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readInt64();n.setBalance(u);break;case 2:u=new proto.protocol.BlockBalanceTrace.BlockIdentifier,i.readMessage(u,proto.protocol.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),n.setBlockIdentifier(u);break;default:i.skipField()}return n},proto.protocol.AccountBalanceResponse.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.AccountBalanceResponse.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.AccountBalanceResponse.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getBalance())!==0&&i.writeInt64(1,u),(u=n.getBlockIdentifier())!=null&&i.writeMessage(2,u,proto.protocol.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter)},proto.protocol.AccountBalanceResponse.prototype.getBalance=function(){return o.Message.getFieldWithDefault(this,1,0)},proto.protocol.AccountBalanceResponse.prototype.setBalance=function(n){return o.Message.setProto3IntField(this,1,n)},proto.protocol.AccountBalanceResponse.prototype.getBlockIdentifier=function(){return o.Message.getWrapperField(this,proto.protocol.BlockBalanceTrace.BlockIdentifier,2)},proto.protocol.AccountBalanceResponse.prototype.setBlockIdentifier=function(n){return o.Message.setWrapperField(this,2,n)},proto.protocol.AccountBalanceResponse.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},proto.protocol.AccountBalanceResponse.prototype.hasBlockIdentifier=function(){return o.Message.getField(this,2)!=null},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.FreezeBalanceV2Contract.prototype.toObject=function(n){return proto.protocol.FreezeBalanceV2Contract.toObject(n,this)},proto.protocol.FreezeBalanceV2Contract.toObject=function(n,i){var u={ownerAddress:i.getOwnerAddress_asB64(),frozenBalance:o.Message.getFieldWithDefault(i,2,0),resource:o.Message.getFieldWithDefault(i,3,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.FreezeBalanceV2Contract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.FreezeBalanceV2Contract;return proto.protocol.FreezeBalanceV2Contract.deserializeBinaryFromReader(u,i)},proto.protocol.FreezeBalanceV2Contract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setOwnerAddress(u);break;case 2:u=i.readInt64(),n.setFrozenBalance(u);break;case 3:u=i.readEnum(),n.setResource(u);break;default:i.skipField()}return n},proto.protocol.FreezeBalanceV2Contract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.FreezeBalanceV2Contract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.FreezeBalanceV2Contract.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getFrozenBalance())!==0&&i.writeInt64(2,u),(u=n.getResource())!==0&&i.writeEnum(3,u)},proto.protocol.FreezeBalanceV2Contract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.FreezeBalanceV2Contract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.FreezeBalanceV2Contract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.FreezeBalanceV2Contract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.FreezeBalanceV2Contract.prototype.getFrozenBalance=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.FreezeBalanceV2Contract.prototype.setFrozenBalance=function(n){return o.Message.setProto3IntField(this,2,n)},proto.protocol.FreezeBalanceV2Contract.prototype.getResource=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.FreezeBalanceV2Contract.prototype.setResource=function(n){return o.Message.setProto3EnumField(this,3,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.UnfreezeBalanceV2Contract.prototype.toObject=function(n){return proto.protocol.UnfreezeBalanceV2Contract.toObject(n,this)},proto.protocol.UnfreezeBalanceV2Contract.toObject=function(n,i){var u={ownerAddress:i.getOwnerAddress_asB64(),unfreezeBalance:o.Message.getFieldWithDefault(i,2,0),resource:o.Message.getFieldWithDefault(i,3,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.UnfreezeBalanceV2Contract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.UnfreezeBalanceV2Contract;return proto.protocol.UnfreezeBalanceV2Contract.deserializeBinaryFromReader(u,i)},proto.protocol.UnfreezeBalanceV2Contract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setOwnerAddress(u);break;case 2:u=i.readInt64(),n.setUnfreezeBalance(u);break;case 3:u=i.readEnum(),n.setResource(u);break;default:i.skipField()}return n},proto.protocol.UnfreezeBalanceV2Contract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.UnfreezeBalanceV2Contract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.UnfreezeBalanceV2Contract.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getUnfreezeBalance())!==0&&i.writeInt64(2,u),(u=n.getResource())!==0&&i.writeEnum(3,u)},proto.protocol.UnfreezeBalanceV2Contract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.UnfreezeBalanceV2Contract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.UnfreezeBalanceV2Contract.prototype.getUnfreezeBalance=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.UnfreezeBalanceV2Contract.prototype.setUnfreezeBalance=function(n){return o.Message.setProto3IntField(this,2,n)},proto.protocol.UnfreezeBalanceV2Contract.prototype.getResource=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.UnfreezeBalanceV2Contract.prototype.setResource=function(n){return o.Message.setProto3EnumField(this,3,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.WithdrawExpireUnfreezeContract.prototype.toObject=function(n){return proto.protocol.WithdrawExpireUnfreezeContract.toObject(n,this)},proto.protocol.WithdrawExpireUnfreezeContract.toObject=function(n,i){var u={ownerAddress:i.getOwnerAddress_asB64()};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.WithdrawExpireUnfreezeContract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.WithdrawExpireUnfreezeContract;return proto.protocol.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader(u,i)},proto.protocol.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setOwnerAddress(u);break;default:i.skipField()}return n},proto.protocol.WithdrawExpireUnfreezeContract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.WithdrawExpireUnfreezeContract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.WithdrawExpireUnfreezeContract.serializeBinaryToWriter=function(n,i){var u;(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(1,u)},proto.protocol.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.WithdrawExpireUnfreezeContract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.DelegateResourceContract.prototype.toObject=function(n){return proto.protocol.DelegateResourceContract.toObject(n,this)},proto.protocol.DelegateResourceContract.toObject=function(n,i){var u={ownerAddress:i.getOwnerAddress_asB64(),resource:o.Message.getFieldWithDefault(i,2,0),balance:o.Message.getFieldWithDefault(i,3,0),receiverAddress:i.getReceiverAddress_asB64(),lock:o.Message.getBooleanFieldWithDefault(i,5,!1)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.DelegateResourceContract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.DelegateResourceContract;return proto.protocol.DelegateResourceContract.deserializeBinaryFromReader(u,i)},proto.protocol.DelegateResourceContract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setOwnerAddress(u);break;case 2:u=i.readEnum(),n.setResource(u);break;case 3:u=i.readInt64(),n.setBalance(u);break;case 4:u=i.readBytes(),n.setReceiverAddress(u);break;case 5:u=i.readBool(),n.setLock(u);break;default:i.skipField()}return n},proto.protocol.DelegateResourceContract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.DelegateResourceContract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.DelegateResourceContract.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getResource())!==0&&i.writeEnum(2,u),(u=n.getBalance())!==0&&i.writeInt64(3,u),(u=n.getReceiverAddress_asU8()).length>0&&i.writeBytes(4,u),(u=n.getLock())&&i.writeBool(5,u)},proto.protocol.DelegateResourceContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.DelegateResourceContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.DelegateResourceContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.DelegateResourceContract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.DelegateResourceContract.prototype.getResource=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.DelegateResourceContract.prototype.setResource=function(n){return o.Message.setProto3EnumField(this,2,n)},proto.protocol.DelegateResourceContract.prototype.getBalance=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.DelegateResourceContract.prototype.setBalance=function(n){return o.Message.setProto3IntField(this,3,n)},proto.protocol.DelegateResourceContract.prototype.getReceiverAddress=function(){return o.Message.getFieldWithDefault(this,4,"")},proto.protocol.DelegateResourceContract.prototype.getReceiverAddress_asB64=function(){return o.Message.bytesAsB64(this.getReceiverAddress())},proto.protocol.DelegateResourceContract.prototype.getReceiverAddress_asU8=function(){return o.Message.bytesAsU8(this.getReceiverAddress())},proto.protocol.DelegateResourceContract.prototype.setReceiverAddress=function(n){return o.Message.setProto3BytesField(this,4,n)},proto.protocol.DelegateResourceContract.prototype.getLock=function(){return o.Message.getBooleanFieldWithDefault(this,5,!1)},proto.protocol.DelegateResourceContract.prototype.setLock=function(n){return o.Message.setProto3BooleanField(this,5,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.UnDelegateResourceContract.prototype.toObject=function(n){return proto.protocol.UnDelegateResourceContract.toObject(n,this)},proto.protocol.UnDelegateResourceContract.toObject=function(n,i){var u={ownerAddress:i.getOwnerAddress_asB64(),resource:o.Message.getFieldWithDefault(i,2,0),balance:o.Message.getFieldWithDefault(i,3,0),receiverAddress:i.getReceiverAddress_asB64()};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.UnDelegateResourceContract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.UnDelegateResourceContract;return proto.protocol.UnDelegateResourceContract.deserializeBinaryFromReader(u,i)},proto.protocol.UnDelegateResourceContract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setOwnerAddress(u);break;case 2:u=i.readEnum(),n.setResource(u);break;case 3:u=i.readInt64(),n.setBalance(u);break;case 4:u=i.readBytes(),n.setReceiverAddress(u);break;default:i.skipField()}return n},proto.protocol.UnDelegateResourceContract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.UnDelegateResourceContract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.UnDelegateResourceContract.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getResource())!==0&&i.writeEnum(2,u),(u=n.getBalance())!==0&&i.writeInt64(3,u),(u=n.getReceiverAddress_asU8()).length>0&&i.writeBytes(4,u)},proto.protocol.UnDelegateResourceContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.UnDelegateResourceContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.UnDelegateResourceContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.UnDelegateResourceContract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.UnDelegateResourceContract.prototype.getResource=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.UnDelegateResourceContract.prototype.setResource=function(n){return o.Message.setProto3EnumField(this,2,n)},proto.protocol.UnDelegateResourceContract.prototype.getBalance=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.UnDelegateResourceContract.prototype.setBalance=function(n){return o.Message.setProto3IntField(this,3,n)},proto.protocol.UnDelegateResourceContract.prototype.getReceiverAddress=function(){return o.Message.getFieldWithDefault(this,4,"")},proto.protocol.UnDelegateResourceContract.prototype.getReceiverAddress_asB64=function(){return o.Message.bytesAsB64(this.getReceiverAddress())},proto.protocol.UnDelegateResourceContract.prototype.getReceiverAddress_asU8=function(){return o.Message.bytesAsU8(this.getReceiverAddress())},proto.protocol.UnDelegateResourceContract.prototype.setReceiverAddress=function(n){return o.Message.setProto3BytesField(this,4,n)},a.object.extend(t,proto.protocol)},function(e,t,r){var o=r(8),a=o,c=function(){return this||window||c||self||Function("return this")()}.call(null);a.exportSymbol("proto.protocol.AssetIssueContract",null,c),a.exportSymbol("proto.protocol.AssetIssueContract.FrozenSupply",null,c),a.exportSymbol("proto.protocol.ParticipateAssetIssueContract",null,c),a.exportSymbol("proto.protocol.TransferAssetContract",null,c),a.exportSymbol("proto.protocol.UnfreezeAssetContract",null,c),a.exportSymbol("proto.protocol.UpdateAssetContract",null,c),proto.protocol.AssetIssueContract=function(s){o.Message.initialize(this,s,0,-1,proto.protocol.AssetIssueContract.repeatedFields_,null)},a.inherits(proto.protocol.AssetIssueContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.AssetIssueContract.displayName="proto.protocol.AssetIssueContract"),proto.protocol.AssetIssueContract.FrozenSupply=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.AssetIssueContract.FrozenSupply,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.AssetIssueContract.FrozenSupply.displayName="proto.protocol.AssetIssueContract.FrozenSupply"),proto.protocol.TransferAssetContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.TransferAssetContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.TransferAssetContract.displayName="proto.protocol.TransferAssetContract"),proto.protocol.UnfreezeAssetContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.UnfreezeAssetContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.UnfreezeAssetContract.displayName="proto.protocol.UnfreezeAssetContract"),proto.protocol.UpdateAssetContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.UpdateAssetContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.UpdateAssetContract.displayName="proto.protocol.UpdateAssetContract"),proto.protocol.ParticipateAssetIssueContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.ParticipateAssetIssueContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.ParticipateAssetIssueContract.displayName="proto.protocol.ParticipateAssetIssueContract"),proto.protocol.AssetIssueContract.repeatedFields_=[5],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.AssetIssueContract.prototype.toObject=function(s){return proto.protocol.AssetIssueContract.toObject(s,this)},proto.protocol.AssetIssueContract.toObject=function(s,n){var i={id:o.Message.getFieldWithDefault(n,41,""),ownerAddress:n.getOwnerAddress_asB64(),name:n.getName_asB64(),abbr:n.getAbbr_asB64(),totalSupply:o.Message.getFieldWithDefault(n,4,0),frozenSupplyList:o.Message.toObjectList(n.getFrozenSupplyList(),proto.protocol.AssetIssueContract.FrozenSupply.toObject,s),trxNum:o.Message.getFieldWithDefault(n,6,0),precision:o.Message.getFieldWithDefault(n,7,0),num:o.Message.getFieldWithDefault(n,8,0),startTime:o.Message.getFieldWithDefault(n,9,0),endTime:o.Message.getFieldWithDefault(n,10,0),order:o.Message.getFieldWithDefault(n,11,0),voteScore:o.Message.getFieldWithDefault(n,16,0),description:n.getDescription_asB64(),url:n.getUrl_asB64(),freeAssetNetLimit:o.Message.getFieldWithDefault(n,22,0),publicFreeAssetNetLimit:o.Message.getFieldWithDefault(n,23,0),publicFreeAssetNetUsage:o.Message.getFieldWithDefault(n,24,0),publicLatestFreeNetTime:o.Message.getFieldWithDefault(n,25,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.AssetIssueContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.AssetIssueContract;return proto.protocol.AssetIssueContract.deserializeBinaryFromReader(i,n)},proto.protocol.AssetIssueContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 41:var i=n.readString();s.setId(i);break;case 1:i=n.readBytes(),s.setOwnerAddress(i);break;case 2:i=n.readBytes(),s.setName(i);break;case 3:i=n.readBytes(),s.setAbbr(i);break;case 4:i=n.readInt64(),s.setTotalSupply(i);break;case 5:i=new proto.protocol.AssetIssueContract.FrozenSupply,n.readMessage(i,proto.protocol.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader),s.addFrozenSupply(i);break;case 6:i=n.readInt32(),s.setTrxNum(i);break;case 7:i=n.readInt32(),s.setPrecision(i);break;case 8:i=n.readInt32(),s.setNum(i);break;case 9:i=n.readInt64(),s.setStartTime(i);break;case 10:i=n.readInt64(),s.setEndTime(i);break;case 11:i=n.readInt64(),s.setOrder(i);break;case 16:i=n.readInt32(),s.setVoteScore(i);break;case 20:i=n.readBytes(),s.setDescription(i);break;case 21:i=n.readBytes(),s.setUrl(i);break;case 22:i=n.readInt64(),s.setFreeAssetNetLimit(i);break;case 23:i=n.readInt64(),s.setPublicFreeAssetNetLimit(i);break;case 24:i=n.readInt64(),s.setPublicFreeAssetNetUsage(i);break;case 25:i=n.readInt64(),s.setPublicLatestFreeNetTime(i);break;default:n.skipField()}return s},proto.protocol.AssetIssueContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.AssetIssueContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.AssetIssueContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getId()).length>0&&n.writeString(41,i),(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getName_asU8()).length>0&&n.writeBytes(2,i),(i=s.getAbbr_asU8()).length>0&&n.writeBytes(3,i),(i=s.getTotalSupply())!==0&&n.writeInt64(4,i),(i=s.getFrozenSupplyList()).length>0&&n.writeRepeatedMessage(5,i,proto.protocol.AssetIssueContract.FrozenSupply.serializeBinaryToWriter),(i=s.getTrxNum())!==0&&n.writeInt32(6,i),(i=s.getPrecision())!==0&&n.writeInt32(7,i),(i=s.getNum())!==0&&n.writeInt32(8,i),(i=s.getStartTime())!==0&&n.writeInt64(9,i),(i=s.getEndTime())!==0&&n.writeInt64(10,i),(i=s.getOrder())!==0&&n.writeInt64(11,i),(i=s.getVoteScore())!==0&&n.writeInt32(16,i),(i=s.getDescription_asU8()).length>0&&n.writeBytes(20,i),(i=s.getUrl_asU8()).length>0&&n.writeBytes(21,i),(i=s.getFreeAssetNetLimit())!==0&&n.writeInt64(22,i),(i=s.getPublicFreeAssetNetLimit())!==0&&n.writeInt64(23,i),(i=s.getPublicFreeAssetNetUsage())!==0&&n.writeInt64(24,i),(i=s.getPublicLatestFreeNetTime())!==0&&n.writeInt64(25,i)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.AssetIssueContract.FrozenSupply.prototype.toObject=function(s){return proto.protocol.AssetIssueContract.FrozenSupply.toObject(s,this)},proto.protocol.AssetIssueContract.FrozenSupply.toObject=function(s,n){var i={frozenAmount:o.Message.getFieldWithDefault(n,1,0),frozenDays:o.Message.getFieldWithDefault(n,2,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.AssetIssueContract.FrozenSupply.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.AssetIssueContract.FrozenSupply;return proto.protocol.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader(i,n)},proto.protocol.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readInt64();s.setFrozenAmount(i);break;case 2:i=n.readInt64(),s.setFrozenDays(i);break;default:n.skipField()}return s},proto.protocol.AssetIssueContract.FrozenSupply.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.AssetIssueContract.FrozenSupply.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.AssetIssueContract.FrozenSupply.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getFrozenAmount())!==0&&n.writeInt64(1,i),(i=s.getFrozenDays())!==0&&n.writeInt64(2,i)},proto.protocol.AssetIssueContract.FrozenSupply.prototype.getFrozenAmount=function(){return o.Message.getFieldWithDefault(this,1,0)},proto.protocol.AssetIssueContract.FrozenSupply.prototype.setFrozenAmount=function(s){return o.Message.setProto3IntField(this,1,s)},proto.protocol.AssetIssueContract.FrozenSupply.prototype.getFrozenDays=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.AssetIssueContract.FrozenSupply.prototype.setFrozenDays=function(s){return o.Message.setProto3IntField(this,2,s)},proto.protocol.AssetIssueContract.prototype.getId=function(){return o.Message.getFieldWithDefault(this,41,"")},proto.protocol.AssetIssueContract.prototype.setId=function(s){return o.Message.setProto3StringField(this,41,s)},proto.protocol.AssetIssueContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.AssetIssueContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.AssetIssueContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.AssetIssueContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.AssetIssueContract.prototype.getName=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.AssetIssueContract.prototype.getName_asB64=function(){return o.Message.bytesAsB64(this.getName())},proto.protocol.AssetIssueContract.prototype.getName_asU8=function(){return o.Message.bytesAsU8(this.getName())},proto.protocol.AssetIssueContract.prototype.setName=function(s){return o.Message.setProto3BytesField(this,2,s)},proto.protocol.AssetIssueContract.prototype.getAbbr=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.AssetIssueContract.prototype.getAbbr_asB64=function(){return o.Message.bytesAsB64(this.getAbbr())},proto.protocol.AssetIssueContract.prototype.getAbbr_asU8=function(){return o.Message.bytesAsU8(this.getAbbr())},proto.protocol.AssetIssueContract.prototype.setAbbr=function(s){return o.Message.setProto3BytesField(this,3,s)},proto.protocol.AssetIssueContract.prototype.getTotalSupply=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.AssetIssueContract.prototype.setTotalSupply=function(s){return o.Message.setProto3IntField(this,4,s)},proto.protocol.AssetIssueContract.prototype.getFrozenSupplyList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.AssetIssueContract.FrozenSupply,5)},proto.protocol.AssetIssueContract.prototype.setFrozenSupplyList=function(s){return o.Message.setRepeatedWrapperField(this,5,s)},proto.protocol.AssetIssueContract.prototype.addFrozenSupply=function(s,n){return o.Message.addToRepeatedWrapperField(this,5,s,proto.protocol.AssetIssueContract.FrozenSupply,n)},proto.protocol.AssetIssueContract.prototype.clearFrozenSupplyList=function(){return this.setFrozenSupplyList([])},proto.protocol.AssetIssueContract.prototype.getTrxNum=function(){return o.Message.getFieldWithDefault(this,6,0)},proto.protocol.AssetIssueContract.prototype.setTrxNum=function(s){return o.Message.setProto3IntField(this,6,s)},proto.protocol.AssetIssueContract.prototype.getPrecision=function(){return o.Message.getFieldWithDefault(this,7,0)},proto.protocol.AssetIssueContract.prototype.setPrecision=function(s){return o.Message.setProto3IntField(this,7,s)},proto.protocol.AssetIssueContract.prototype.getNum=function(){return o.Message.getFieldWithDefault(this,8,0)},proto.protocol.AssetIssueContract.prototype.setNum=function(s){return o.Message.setProto3IntField(this,8,s)},proto.protocol.AssetIssueContract.prototype.getStartTime=function(){return o.Message.getFieldWithDefault(this,9,0)},proto.protocol.AssetIssueContract.prototype.setStartTime=function(s){return o.Message.setProto3IntField(this,9,s)},proto.protocol.AssetIssueContract.prototype.getEndTime=function(){return o.Message.getFieldWithDefault(this,10,0)},proto.protocol.AssetIssueContract.prototype.setEndTime=function(s){return o.Message.setProto3IntField(this,10,s)},proto.protocol.AssetIssueContract.prototype.getOrder=function(){return o.Message.getFieldWithDefault(this,11,0)},proto.protocol.AssetIssueContract.prototype.setOrder=function(s){return o.Message.setProto3IntField(this,11,s)},proto.protocol.AssetIssueContract.prototype.getVoteScore=function(){return o.Message.getFieldWithDefault(this,16,0)},proto.protocol.AssetIssueContract.prototype.setVoteScore=function(s){return o.Message.setProto3IntField(this,16,s)},proto.protocol.AssetIssueContract.prototype.getDescription=function(){return o.Message.getFieldWithDefault(this,20,"")},proto.protocol.AssetIssueContract.prototype.getDescription_asB64=function(){return o.Message.bytesAsB64(this.getDescription())},proto.protocol.AssetIssueContract.prototype.getDescription_asU8=function(){return o.Message.bytesAsU8(this.getDescription())},proto.protocol.AssetIssueContract.prototype.setDescription=function(s){return o.Message.setProto3BytesField(this,20,s)},proto.protocol.AssetIssueContract.prototype.getUrl=function(){return o.Message.getFieldWithDefault(this,21,"")},proto.protocol.AssetIssueContract.prototype.getUrl_asB64=function(){return o.Message.bytesAsB64(this.getUrl())},proto.protocol.AssetIssueContract.prototype.getUrl_asU8=function(){return o.Message.bytesAsU8(this.getUrl())},proto.protocol.AssetIssueContract.prototype.setUrl=function(s){return o.Message.setProto3BytesField(this,21,s)},proto.protocol.AssetIssueContract.prototype.getFreeAssetNetLimit=function(){return o.Message.getFieldWithDefault(this,22,0)},proto.protocol.AssetIssueContract.prototype.setFreeAssetNetLimit=function(s){return o.Message.setProto3IntField(this,22,s)},proto.protocol.AssetIssueContract.prototype.getPublicFreeAssetNetLimit=function(){return o.Message.getFieldWithDefault(this,23,0)},proto.protocol.AssetIssueContract.prototype.setPublicFreeAssetNetLimit=function(s){return o.Message.setProto3IntField(this,23,s)},proto.protocol.AssetIssueContract.prototype.getPublicFreeAssetNetUsage=function(){return o.Message.getFieldWithDefault(this,24,0)},proto.protocol.AssetIssueContract.prototype.setPublicFreeAssetNetUsage=function(s){return o.Message.setProto3IntField(this,24,s)},proto.protocol.AssetIssueContract.prototype.getPublicLatestFreeNetTime=function(){return o.Message.getFieldWithDefault(this,25,0)},proto.protocol.AssetIssueContract.prototype.setPublicLatestFreeNetTime=function(s){return o.Message.setProto3IntField(this,25,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.TransferAssetContract.prototype.toObject=function(s){return proto.protocol.TransferAssetContract.toObject(s,this)},proto.protocol.TransferAssetContract.toObject=function(s,n){var i={assetName:n.getAssetName_asB64(),ownerAddress:n.getOwnerAddress_asB64(),toAddress:n.getToAddress_asB64(),amount:o.Message.getFieldWithDefault(n,4,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.TransferAssetContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.TransferAssetContract;return proto.protocol.TransferAssetContract.deserializeBinaryFromReader(i,n)},proto.protocol.TransferAssetContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setAssetName(i);break;case 2:i=n.readBytes(),s.setOwnerAddress(i);break;case 3:i=n.readBytes(),s.setToAddress(i);break;case 4:i=n.readInt64(),s.setAmount(i);break;default:n.skipField()}return s},proto.protocol.TransferAssetContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.TransferAssetContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.TransferAssetContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getAssetName_asU8()).length>0&&n.writeBytes(1,i),(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(2,i),(i=s.getToAddress_asU8()).length>0&&n.writeBytes(3,i),(i=s.getAmount())!==0&&n.writeInt64(4,i)},proto.protocol.TransferAssetContract.prototype.getAssetName=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.TransferAssetContract.prototype.getAssetName_asB64=function(){return o.Message.bytesAsB64(this.getAssetName())},proto.protocol.TransferAssetContract.prototype.getAssetName_asU8=function(){return o.Message.bytesAsU8(this.getAssetName())},proto.protocol.TransferAssetContract.prototype.setAssetName=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.TransferAssetContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.TransferAssetContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.TransferAssetContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.TransferAssetContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,2,s)},proto.protocol.TransferAssetContract.prototype.getToAddress=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.TransferAssetContract.prototype.getToAddress_asB64=function(){return o.Message.bytesAsB64(this.getToAddress())},proto.protocol.TransferAssetContract.prototype.getToAddress_asU8=function(){return o.Message.bytesAsU8(this.getToAddress())},proto.protocol.TransferAssetContract.prototype.setToAddress=function(s){return o.Message.setProto3BytesField(this,3,s)},proto.protocol.TransferAssetContract.prototype.getAmount=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.TransferAssetContract.prototype.setAmount=function(s){return o.Message.setProto3IntField(this,4,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.UnfreezeAssetContract.prototype.toObject=function(s){return proto.protocol.UnfreezeAssetContract.toObject(s,this)},proto.protocol.UnfreezeAssetContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64()};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.UnfreezeAssetContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.UnfreezeAssetContract;return proto.protocol.UnfreezeAssetContract.deserializeBinaryFromReader(i,n)},proto.protocol.UnfreezeAssetContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;default:n.skipField()}return s},proto.protocol.UnfreezeAssetContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.UnfreezeAssetContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.UnfreezeAssetContract.serializeBinaryToWriter=function(s,n){var i;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i)},proto.protocol.UnfreezeAssetContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.UnfreezeAssetContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.UnfreezeAssetContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.UnfreezeAssetContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.UpdateAssetContract.prototype.toObject=function(s){return proto.protocol.UpdateAssetContract.toObject(s,this)},proto.protocol.UpdateAssetContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),description:n.getDescription_asB64(),url:n.getUrl_asB64(),newLimit:o.Message.getFieldWithDefault(n,4,0),newPublicLimit:o.Message.getFieldWithDefault(n,5,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.UpdateAssetContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.UpdateAssetContract;return proto.protocol.UpdateAssetContract.deserializeBinaryFromReader(i,n)},proto.protocol.UpdateAssetContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readBytes(),s.setDescription(i);break;case 3:i=n.readBytes(),s.setUrl(i);break;case 4:i=n.readInt64(),s.setNewLimit(i);break;case 5:i=n.readInt64(),s.setNewPublicLimit(i);break;default:n.skipField()}return s},proto.protocol.UpdateAssetContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.UpdateAssetContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.UpdateAssetContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getDescription_asU8()).length>0&&n.writeBytes(2,i),(i=s.getUrl_asU8()).length>0&&n.writeBytes(3,i),(i=s.getNewLimit())!==0&&n.writeInt64(4,i),(i=s.getNewPublicLimit())!==0&&n.writeInt64(5,i)},proto.protocol.UpdateAssetContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.UpdateAssetContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.UpdateAssetContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.UpdateAssetContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.UpdateAssetContract.prototype.getDescription=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.UpdateAssetContract.prototype.getDescription_asB64=function(){return o.Message.bytesAsB64(this.getDescription())},proto.protocol.UpdateAssetContract.prototype.getDescription_asU8=function(){return o.Message.bytesAsU8(this.getDescription())},proto.protocol.UpdateAssetContract.prototype.setDescription=function(s){return o.Message.setProto3BytesField(this,2,s)},proto.protocol.UpdateAssetContract.prototype.getUrl=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.UpdateAssetContract.prototype.getUrl_asB64=function(){return o.Message.bytesAsB64(this.getUrl())},proto.protocol.UpdateAssetContract.prototype.getUrl_asU8=function(){return o.Message.bytesAsU8(this.getUrl())},proto.protocol.UpdateAssetContract.prototype.setUrl=function(s){return o.Message.setProto3BytesField(this,3,s)},proto.protocol.UpdateAssetContract.prototype.getNewLimit=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.UpdateAssetContract.prototype.setNewLimit=function(s){return o.Message.setProto3IntField(this,4,s)},proto.protocol.UpdateAssetContract.prototype.getNewPublicLimit=function(){return o.Message.getFieldWithDefault(this,5,0)},proto.protocol.UpdateAssetContract.prototype.setNewPublicLimit=function(s){return o.Message.setProto3IntField(this,5,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.ParticipateAssetIssueContract.prototype.toObject=function(s){return proto.protocol.ParticipateAssetIssueContract.toObject(s,this)},proto.protocol.ParticipateAssetIssueContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),toAddress:n.getToAddress_asB64(),assetName:n.getAssetName_asB64(),amount:o.Message.getFieldWithDefault(n,4,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.ParticipateAssetIssueContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.ParticipateAssetIssueContract;return proto.protocol.ParticipateAssetIssueContract.deserializeBinaryFromReader(i,n)},proto.protocol.ParticipateAssetIssueContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readBytes(),s.setToAddress(i);break;case 3:i=n.readBytes(),s.setAssetName(i);break;case 4:i=n.readInt64(),s.setAmount(i);break;default:n.skipField()}return s},proto.protocol.ParticipateAssetIssueContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.ParticipateAssetIssueContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.ParticipateAssetIssueContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getToAddress_asU8()).length>0&&n.writeBytes(2,i),(i=s.getAssetName_asU8()).length>0&&n.writeBytes(3,i),(i=s.getAmount())!==0&&n.writeInt64(4,i)},proto.protocol.ParticipateAssetIssueContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.ParticipateAssetIssueContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.ParticipateAssetIssueContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.ParticipateAssetIssueContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.ParticipateAssetIssueContract.prototype.getToAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.ParticipateAssetIssueContract.prototype.getToAddress_asB64=function(){return o.Message.bytesAsB64(this.getToAddress())},proto.protocol.ParticipateAssetIssueContract.prototype.getToAddress_asU8=function(){return o.Message.bytesAsU8(this.getToAddress())},proto.protocol.ParticipateAssetIssueContract.prototype.setToAddress=function(s){return o.Message.setProto3BytesField(this,2,s)},proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName_asB64=function(){return o.Message.bytesAsB64(this.getAssetName())},proto.protocol.ParticipateAssetIssueContract.prototype.getAssetName_asU8=function(){return o.Message.bytesAsU8(this.getAssetName())},proto.protocol.ParticipateAssetIssueContract.prototype.setAssetName=function(s){return o.Message.setProto3BytesField(this,3,s)},proto.protocol.ParticipateAssetIssueContract.prototype.getAmount=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.ParticipateAssetIssueContract.prototype.setAmount=function(s){return o.Message.setProto3IntField(this,4,s)},a.object.extend(t,proto.protocol)},function(e,t,r){var o=r(8),a=o,c=function(){return this||window||c||self||Function("return this")()}.call(null);a.exportSymbol("proto.protocol.ClearABIContract",null,c),a.exportSymbol("proto.protocol.CreateSmartContract",null,c),a.exportSymbol("proto.protocol.SmartContract",null,c),a.exportSymbol("proto.protocol.SmartContract.ABI",null,c),a.exportSymbol("proto.protocol.SmartContract.ABI.Entry",null,c),a.exportSymbol("proto.protocol.SmartContract.ABI.Entry.EntryType",null,c),a.exportSymbol("proto.protocol.SmartContract.ABI.Entry.Param",null,c),a.exportSymbol("proto.protocol.SmartContract.ABI.Entry.StateMutabilityType",null,c),a.exportSymbol("proto.protocol.SmartContractDataWrapper",null,c),a.exportSymbol("proto.protocol.TriggerSmartContract",null,c),a.exportSymbol("proto.protocol.UpdateEnergyLimitContract",null,c),a.exportSymbol("proto.protocol.UpdateSettingContract",null,c),proto.protocol.SmartContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.SmartContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.SmartContract.displayName="proto.protocol.SmartContract"),proto.protocol.SmartContract.ABI=function(s){o.Message.initialize(this,s,0,-1,proto.protocol.SmartContract.ABI.repeatedFields_,null)},a.inherits(proto.protocol.SmartContract.ABI,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.SmartContract.ABI.displayName="proto.protocol.SmartContract.ABI"),proto.protocol.SmartContract.ABI.Entry=function(s){o.Message.initialize(this,s,0,-1,proto.protocol.SmartContract.ABI.Entry.repeatedFields_,null)},a.inherits(proto.protocol.SmartContract.ABI.Entry,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.SmartContract.ABI.Entry.displayName="proto.protocol.SmartContract.ABI.Entry"),proto.protocol.SmartContract.ABI.Entry.Param=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.SmartContract.ABI.Entry.Param,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.SmartContract.ABI.Entry.Param.displayName="proto.protocol.SmartContract.ABI.Entry.Param"),proto.protocol.CreateSmartContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.CreateSmartContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.CreateSmartContract.displayName="proto.protocol.CreateSmartContract"),proto.protocol.TriggerSmartContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.TriggerSmartContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.TriggerSmartContract.displayName="proto.protocol.TriggerSmartContract"),proto.protocol.ClearABIContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.ClearABIContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.ClearABIContract.displayName="proto.protocol.ClearABIContract"),proto.protocol.UpdateSettingContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.UpdateSettingContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.UpdateSettingContract.displayName="proto.protocol.UpdateSettingContract"),proto.protocol.UpdateEnergyLimitContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.UpdateEnergyLimitContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.UpdateEnergyLimitContract.displayName="proto.protocol.UpdateEnergyLimitContract"),proto.protocol.SmartContractDataWrapper=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.SmartContractDataWrapper,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.SmartContractDataWrapper.displayName="proto.protocol.SmartContractDataWrapper"),o.Message.GENERATE_TO_OBJECT&&(proto.protocol.SmartContract.prototype.toObject=function(s){return proto.protocol.SmartContract.toObject(s,this)},proto.protocol.SmartContract.toObject=function(s,n){var i,u={originAddress:n.getOriginAddress_asB64(),contractAddress:n.getContractAddress_asB64(),abi:(i=n.getAbi())&&proto.protocol.SmartContract.ABI.toObject(s,i),bytecode:n.getBytecode_asB64(),callValue:o.Message.getFieldWithDefault(n,5,0),consumeUserResourcePercent:o.Message.getFieldWithDefault(n,6,0),name:o.Message.getFieldWithDefault(n,7,""),originEnergyLimit:o.Message.getFieldWithDefault(n,8,0),codeHash:n.getCodeHash_asB64(),trxHash:n.getTrxHash_asB64()};return s&&(u.$jspbMessageInstance=n),u}),proto.protocol.SmartContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.SmartContract;return proto.protocol.SmartContract.deserializeBinaryFromReader(i,n)},proto.protocol.SmartContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOriginAddress(i);break;case 2:i=n.readBytes(),s.setContractAddress(i);break;case 3:i=new proto.protocol.SmartContract.ABI,n.readMessage(i,proto.protocol.SmartContract.ABI.deserializeBinaryFromReader),s.setAbi(i);break;case 4:i=n.readBytes(),s.setBytecode(i);break;case 5:i=n.readInt64(),s.setCallValue(i);break;case 6:i=n.readInt64(),s.setConsumeUserResourcePercent(i);break;case 7:i=n.readString(),s.setName(i);break;case 8:i=n.readInt64(),s.setOriginEnergyLimit(i);break;case 9:i=n.readBytes(),s.setCodeHash(i);break;case 10:i=n.readBytes(),s.setTrxHash(i);break;default:n.skipField()}return s},proto.protocol.SmartContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.SmartContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.SmartContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOriginAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getContractAddress_asU8()).length>0&&n.writeBytes(2,i),(i=s.getAbi())!=null&&n.writeMessage(3,i,proto.protocol.SmartContract.ABI.serializeBinaryToWriter),(i=s.getBytecode_asU8()).length>0&&n.writeBytes(4,i),(i=s.getCallValue())!==0&&n.writeInt64(5,i),(i=s.getConsumeUserResourcePercent())!==0&&n.writeInt64(6,i),(i=s.getName()).length>0&&n.writeString(7,i),(i=s.getOriginEnergyLimit())!==0&&n.writeInt64(8,i),(i=s.getCodeHash_asU8()).length>0&&n.writeBytes(9,i),(i=s.getTrxHash_asU8()).length>0&&n.writeBytes(10,i)},proto.protocol.SmartContract.ABI.repeatedFields_=[1],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.SmartContract.ABI.prototype.toObject=function(s){return proto.protocol.SmartContract.ABI.toObject(s,this)},proto.protocol.SmartContract.ABI.toObject=function(s,n){var i={entrysList:o.Message.toObjectList(n.getEntrysList(),proto.protocol.SmartContract.ABI.Entry.toObject,s)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.SmartContract.ABI.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.SmartContract.ABI;return proto.protocol.SmartContract.ABI.deserializeBinaryFromReader(i,n)},proto.protocol.SmartContract.ABI.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=new proto.protocol.SmartContract.ABI.Entry;n.readMessage(i,proto.protocol.SmartContract.ABI.Entry.deserializeBinaryFromReader),s.addEntrys(i);break;default:n.skipField()}return s},proto.protocol.SmartContract.ABI.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.SmartContract.ABI.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.SmartContract.ABI.serializeBinaryToWriter=function(s,n){var i;(i=s.getEntrysList()).length>0&&n.writeRepeatedMessage(1,i,proto.protocol.SmartContract.ABI.Entry.serializeBinaryToWriter)},proto.protocol.SmartContract.ABI.Entry.repeatedFields_=[4,5],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.SmartContract.ABI.Entry.prototype.toObject=function(s){return proto.protocol.SmartContract.ABI.Entry.toObject(s,this)},proto.protocol.SmartContract.ABI.Entry.toObject=function(s,n){var i={anonymous:o.Message.getBooleanFieldWithDefault(n,1,!1),constant:o.Message.getBooleanFieldWithDefault(n,2,!1),name:o.Message.getFieldWithDefault(n,3,""),inputsList:o.Message.toObjectList(n.getInputsList(),proto.protocol.SmartContract.ABI.Entry.Param.toObject,s),outputsList:o.Message.toObjectList(n.getOutputsList(),proto.protocol.SmartContract.ABI.Entry.Param.toObject,s),type:o.Message.getFieldWithDefault(n,6,0),payable:o.Message.getBooleanFieldWithDefault(n,7,!1),statemutability:o.Message.getFieldWithDefault(n,8,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.SmartContract.ABI.Entry.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.SmartContract.ABI.Entry;return proto.protocol.SmartContract.ABI.Entry.deserializeBinaryFromReader(i,n)},proto.protocol.SmartContract.ABI.Entry.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBool();s.setAnonymous(i);break;case 2:i=n.readBool(),s.setConstant(i);break;case 3:i=n.readString(),s.setName(i);break;case 4:i=new proto.protocol.SmartContract.ABI.Entry.Param,n.readMessage(i,proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader),s.addInputs(i);break;case 5:i=new proto.protocol.SmartContract.ABI.Entry.Param,n.readMessage(i,proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader),s.addOutputs(i);break;case 6:i=n.readEnum(),s.setType(i);break;case 7:i=n.readBool(),s.setPayable(i);break;case 8:i=n.readEnum(),s.setStatemutability(i);break;default:n.skipField()}return s},proto.protocol.SmartContract.ABI.Entry.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.SmartContract.ABI.Entry.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.SmartContract.ABI.Entry.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getAnonymous())&&n.writeBool(1,i),(i=s.getConstant())&&n.writeBool(2,i),(i=s.getName()).length>0&&n.writeString(3,i),(i=s.getInputsList()).length>0&&n.writeRepeatedMessage(4,i,proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter),(i=s.getOutputsList()).length>0&&n.writeRepeatedMessage(5,i,proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter),(i=s.getType())!==0&&n.writeEnum(6,i),(i=s.getPayable())&&n.writeBool(7,i),(i=s.getStatemutability())!==0&&n.writeEnum(8,i)},proto.protocol.SmartContract.ABI.Entry.EntryType={UNKNOWNENTRYTYPE:0,CONSTRUCTOR:1,FUNCTION:2,EVENT:3,FALLBACK:4,RECEIVE:5,ERROR:6},proto.protocol.SmartContract.ABI.Entry.StateMutabilityType={UNKNOWNMUTABILITYTYPE:0,PURE:1,VIEW:2,NONPAYABLE:3,PAYABLE:4},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.SmartContract.ABI.Entry.Param.prototype.toObject=function(s){return proto.protocol.SmartContract.ABI.Entry.Param.toObject(s,this)},proto.protocol.SmartContract.ABI.Entry.Param.toObject=function(s,n){var i={indexed:o.Message.getBooleanFieldWithDefault(n,1,!1),name:o.Message.getFieldWithDefault(n,2,""),type:o.Message.getFieldWithDefault(n,3,"")};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.SmartContract.ABI.Entry.Param;return proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader(i,n)},proto.protocol.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBool();s.setIndexed(i);break;case 2:i=n.readString(),s.setName(i);break;case 3:i=n.readString(),s.setType(i);break;default:n.skipField()}return s},proto.protocol.SmartContract.ABI.Entry.Param.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.SmartContract.ABI.Entry.Param.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getIndexed())&&n.writeBool(1,i),(i=s.getName()).length>0&&n.writeString(2,i),(i=s.getType()).length>0&&n.writeString(3,i)},proto.protocol.SmartContract.ABI.Entry.Param.prototype.getIndexed=function(){return o.Message.getBooleanFieldWithDefault(this,1,!1)},proto.protocol.SmartContract.ABI.Entry.Param.prototype.setIndexed=function(s){return o.Message.setProto3BooleanField(this,1,s)},proto.protocol.SmartContract.ABI.Entry.Param.prototype.getName=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.SmartContract.ABI.Entry.Param.prototype.setName=function(s){return o.Message.setProto3StringField(this,2,s)},proto.protocol.SmartContract.ABI.Entry.Param.prototype.getType=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.SmartContract.ABI.Entry.Param.prototype.setType=function(s){return o.Message.setProto3StringField(this,3,s)},proto.protocol.SmartContract.ABI.Entry.prototype.getAnonymous=function(){return o.Message.getBooleanFieldWithDefault(this,1,!1)},proto.protocol.SmartContract.ABI.Entry.prototype.setAnonymous=function(s){return o.Message.setProto3BooleanField(this,1,s)},proto.protocol.SmartContract.ABI.Entry.prototype.getConstant=function(){return o.Message.getBooleanFieldWithDefault(this,2,!1)},proto.protocol.SmartContract.ABI.Entry.prototype.setConstant=function(s){return o.Message.setProto3BooleanField(this,2,s)},proto.protocol.SmartContract.ABI.Entry.prototype.getName=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.SmartContract.ABI.Entry.prototype.setName=function(s){return o.Message.setProto3StringField(this,3,s)},proto.protocol.SmartContract.ABI.Entry.prototype.getInputsList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.SmartContract.ABI.Entry.Param,4)},proto.protocol.SmartContract.ABI.Entry.prototype.setInputsList=function(s){return o.Message.setRepeatedWrapperField(this,4,s)},proto.protocol.SmartContract.ABI.Entry.prototype.addInputs=function(s,n){return o.Message.addToRepeatedWrapperField(this,4,s,proto.protocol.SmartContract.ABI.Entry.Param,n)},proto.protocol.SmartContract.ABI.Entry.prototype.clearInputsList=function(){return this.setInputsList([])},proto.protocol.SmartContract.ABI.Entry.prototype.getOutputsList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.SmartContract.ABI.Entry.Param,5)},proto.protocol.SmartContract.ABI.Entry.prototype.setOutputsList=function(s){return o.Message.setRepeatedWrapperField(this,5,s)},proto.protocol.SmartContract.ABI.Entry.prototype.addOutputs=function(s,n){return o.Message.addToRepeatedWrapperField(this,5,s,proto.protocol.SmartContract.ABI.Entry.Param,n)},proto.protocol.SmartContract.ABI.Entry.prototype.clearOutputsList=function(){return this.setOutputsList([])},proto.protocol.SmartContract.ABI.Entry.prototype.getType=function(){return o.Message.getFieldWithDefault(this,6,0)},proto.protocol.SmartContract.ABI.Entry.prototype.setType=function(s){return o.Message.setProto3EnumField(this,6,s)},proto.protocol.SmartContract.ABI.Entry.prototype.getPayable=function(){return o.Message.getBooleanFieldWithDefault(this,7,!1)},proto.protocol.SmartContract.ABI.Entry.prototype.setPayable=function(s){return o.Message.setProto3BooleanField(this,7,s)},proto.protocol.SmartContract.ABI.Entry.prototype.getStatemutability=function(){return o.Message.getFieldWithDefault(this,8,0)},proto.protocol.SmartContract.ABI.Entry.prototype.setStatemutability=function(s){return o.Message.setProto3EnumField(this,8,s)},proto.protocol.SmartContract.ABI.prototype.getEntrysList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.SmartContract.ABI.Entry,1)},proto.protocol.SmartContract.ABI.prototype.setEntrysList=function(s){return o.Message.setRepeatedWrapperField(this,1,s)},proto.protocol.SmartContract.ABI.prototype.addEntrys=function(s,n){return o.Message.addToRepeatedWrapperField(this,1,s,proto.protocol.SmartContract.ABI.Entry,n)},proto.protocol.SmartContract.ABI.prototype.clearEntrysList=function(){return this.setEntrysList([])},proto.protocol.SmartContract.prototype.getOriginAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.SmartContract.prototype.getOriginAddress_asB64=function(){return o.Message.bytesAsB64(this.getOriginAddress())},proto.protocol.SmartContract.prototype.getOriginAddress_asU8=function(){return o.Message.bytesAsU8(this.getOriginAddress())},proto.protocol.SmartContract.prototype.setOriginAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.SmartContract.prototype.getContractAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.SmartContract.prototype.getContractAddress_asB64=function(){return o.Message.bytesAsB64(this.getContractAddress())},proto.protocol.SmartContract.prototype.getContractAddress_asU8=function(){return o.Message.bytesAsU8(this.getContractAddress())},proto.protocol.SmartContract.prototype.setContractAddress=function(s){return o.Message.setProto3BytesField(this,2,s)},proto.protocol.SmartContract.prototype.getAbi=function(){return o.Message.getWrapperField(this,proto.protocol.SmartContract.ABI,3)},proto.protocol.SmartContract.prototype.setAbi=function(s){return o.Message.setWrapperField(this,3,s)},proto.protocol.SmartContract.prototype.clearAbi=function(){return this.setAbi(void 0)},proto.protocol.SmartContract.prototype.hasAbi=function(){return o.Message.getField(this,3)!=null},proto.protocol.SmartContract.prototype.getBytecode=function(){return o.Message.getFieldWithDefault(this,4,"")},proto.protocol.SmartContract.prototype.getBytecode_asB64=function(){return o.Message.bytesAsB64(this.getBytecode())},proto.protocol.SmartContract.prototype.getBytecode_asU8=function(){return o.Message.bytesAsU8(this.getBytecode())},proto.protocol.SmartContract.prototype.setBytecode=function(s){return o.Message.setProto3BytesField(this,4,s)},proto.protocol.SmartContract.prototype.getCallValue=function(){return o.Message.getFieldWithDefault(this,5,0)},proto.protocol.SmartContract.prototype.setCallValue=function(s){return o.Message.setProto3IntField(this,5,s)},proto.protocol.SmartContract.prototype.getConsumeUserResourcePercent=function(){return o.Message.getFieldWithDefault(this,6,0)},proto.protocol.SmartContract.prototype.setConsumeUserResourcePercent=function(s){return o.Message.setProto3IntField(this,6,s)},proto.protocol.SmartContract.prototype.getName=function(){return o.Message.getFieldWithDefault(this,7,"")},proto.protocol.SmartContract.prototype.setName=function(s){return o.Message.setProto3StringField(this,7,s)},proto.protocol.SmartContract.prototype.getOriginEnergyLimit=function(){return o.Message.getFieldWithDefault(this,8,0)},proto.protocol.SmartContract.prototype.setOriginEnergyLimit=function(s){return o.Message.setProto3IntField(this,8,s)},proto.protocol.SmartContract.prototype.getCodeHash=function(){return o.Message.getFieldWithDefault(this,9,"")},proto.protocol.SmartContract.prototype.getCodeHash_asB64=function(){return o.Message.bytesAsB64(this.getCodeHash())},proto.protocol.SmartContract.prototype.getCodeHash_asU8=function(){return o.Message.bytesAsU8(this.getCodeHash())},proto.protocol.SmartContract.prototype.setCodeHash=function(s){return o.Message.setProto3BytesField(this,9,s)},proto.protocol.SmartContract.prototype.getTrxHash=function(){return o.Message.getFieldWithDefault(this,10,"")},proto.protocol.SmartContract.prototype.getTrxHash_asB64=function(){return o.Message.bytesAsB64(this.getTrxHash())},proto.protocol.SmartContract.prototype.getTrxHash_asU8=function(){return o.Message.bytesAsU8(this.getTrxHash())},proto.protocol.SmartContract.prototype.setTrxHash=function(s){return o.Message.setProto3BytesField(this,10,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.CreateSmartContract.prototype.toObject=function(s){return proto.protocol.CreateSmartContract.toObject(s,this)},proto.protocol.CreateSmartContract.toObject=function(s,n){var i,u={ownerAddress:n.getOwnerAddress_asB64(),newContract:(i=n.getNewContract())&&proto.protocol.SmartContract.toObject(s,i),callTokenValue:o.Message.getFieldWithDefault(n,3,0),tokenId:o.Message.getFieldWithDefault(n,4,0)};return s&&(u.$jspbMessageInstance=n),u}),proto.protocol.CreateSmartContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.CreateSmartContract;return proto.protocol.CreateSmartContract.deserializeBinaryFromReader(i,n)},proto.protocol.CreateSmartContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=new proto.protocol.SmartContract,n.readMessage(i,proto.protocol.SmartContract.deserializeBinaryFromReader),s.setNewContract(i);break;case 3:i=n.readInt64(),s.setCallTokenValue(i);break;case 4:i=n.readInt64(),s.setTokenId(i);break;default:n.skipField()}return s},proto.protocol.CreateSmartContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.CreateSmartContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.CreateSmartContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getNewContract())!=null&&n.writeMessage(2,i,proto.protocol.SmartContract.serializeBinaryToWriter),(i=s.getCallTokenValue())!==0&&n.writeInt64(3,i),(i=s.getTokenId())!==0&&n.writeInt64(4,i)},proto.protocol.CreateSmartContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.CreateSmartContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.CreateSmartContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.CreateSmartContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.CreateSmartContract.prototype.getNewContract=function(){return o.Message.getWrapperField(this,proto.protocol.SmartContract,2)},proto.protocol.CreateSmartContract.prototype.setNewContract=function(s){return o.Message.setWrapperField(this,2,s)},proto.protocol.CreateSmartContract.prototype.clearNewContract=function(){return this.setNewContract(void 0)},proto.protocol.CreateSmartContract.prototype.hasNewContract=function(){return o.Message.getField(this,2)!=null},proto.protocol.CreateSmartContract.prototype.getCallTokenValue=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.CreateSmartContract.prototype.setCallTokenValue=function(s){return o.Message.setProto3IntField(this,3,s)},proto.protocol.CreateSmartContract.prototype.getTokenId=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.CreateSmartContract.prototype.setTokenId=function(s){return o.Message.setProto3IntField(this,4,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.TriggerSmartContract.prototype.toObject=function(s){return proto.protocol.TriggerSmartContract.toObject(s,this)},proto.protocol.TriggerSmartContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),contractAddress:n.getContractAddress_asB64(),callValue:o.Message.getFieldWithDefault(n,3,0),data:n.getData_asB64(),callTokenValue:o.Message.getFieldWithDefault(n,5,0),tokenId:o.Message.getFieldWithDefault(n,6,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.TriggerSmartContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.TriggerSmartContract;return proto.protocol.TriggerSmartContract.deserializeBinaryFromReader(i,n)},proto.protocol.TriggerSmartContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readBytes(),s.setContractAddress(i);break;case 3:i=n.readInt64(),s.setCallValue(i);break;case 4:i=n.readBytes(),s.setData(i);break;case 5:i=n.readInt64(),s.setCallTokenValue(i);break;case 6:i=n.readInt64(),s.setTokenId(i);break;default:n.skipField()}return s},proto.protocol.TriggerSmartContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.TriggerSmartContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.TriggerSmartContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getContractAddress_asU8()).length>0&&n.writeBytes(2,i),(i=s.getCallValue())!==0&&n.writeInt64(3,i),(i=s.getData_asU8()).length>0&&n.writeBytes(4,i),(i=s.getCallTokenValue())!==0&&n.writeInt64(5,i),(i=s.getTokenId())!==0&&n.writeInt64(6,i)},proto.protocol.TriggerSmartContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.TriggerSmartContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.TriggerSmartContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.TriggerSmartContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.TriggerSmartContract.prototype.getContractAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.TriggerSmartContract.prototype.getContractAddress_asB64=function(){return o.Message.bytesAsB64(this.getContractAddress())},proto.protocol.TriggerSmartContract.prototype.getContractAddress_asU8=function(){return o.Message.bytesAsU8(this.getContractAddress())},proto.protocol.TriggerSmartContract.prototype.setContractAddress=function(s){return o.Message.setProto3BytesField(this,2,s)},proto.protocol.TriggerSmartContract.prototype.getCallValue=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.TriggerSmartContract.prototype.setCallValue=function(s){return o.Message.setProto3IntField(this,3,s)},proto.protocol.TriggerSmartContract.prototype.getData=function(){return o.Message.getFieldWithDefault(this,4,"")},proto.protocol.TriggerSmartContract.prototype.getData_asB64=function(){return o.Message.bytesAsB64(this.getData())},proto.protocol.TriggerSmartContract.prototype.getData_asU8=function(){return o.Message.bytesAsU8(this.getData())},proto.protocol.TriggerSmartContract.prototype.setData=function(s){return o.Message.setProto3BytesField(this,4,s)},proto.protocol.TriggerSmartContract.prototype.getCallTokenValue=function(){return o.Message.getFieldWithDefault(this,5,0)},proto.protocol.TriggerSmartContract.prototype.setCallTokenValue=function(s){return o.Message.setProto3IntField(this,5,s)},proto.protocol.TriggerSmartContract.prototype.getTokenId=function(){return o.Message.getFieldWithDefault(this,6,0)},proto.protocol.TriggerSmartContract.prototype.setTokenId=function(s){return o.Message.setProto3IntField(this,6,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.ClearABIContract.prototype.toObject=function(s){return proto.protocol.ClearABIContract.toObject(s,this)},proto.protocol.ClearABIContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),contractAddress:n.getContractAddress_asB64()};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.ClearABIContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.ClearABIContract;return proto.protocol.ClearABIContract.deserializeBinaryFromReader(i,n)},proto.protocol.ClearABIContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readBytes(),s.setContractAddress(i);break;default:n.skipField()}return s},proto.protocol.ClearABIContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.ClearABIContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.ClearABIContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getContractAddress_asU8()).length>0&&n.writeBytes(2,i)},proto.protocol.ClearABIContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.ClearABIContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.ClearABIContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.ClearABIContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.ClearABIContract.prototype.getContractAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.ClearABIContract.prototype.getContractAddress_asB64=function(){return o.Message.bytesAsB64(this.getContractAddress())},proto.protocol.ClearABIContract.prototype.getContractAddress_asU8=function(){return o.Message.bytesAsU8(this.getContractAddress())},proto.protocol.ClearABIContract.prototype.setContractAddress=function(s){return o.Message.setProto3BytesField(this,2,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.UpdateSettingContract.prototype.toObject=function(s){return proto.protocol.UpdateSettingContract.toObject(s,this)},proto.protocol.UpdateSettingContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),contractAddress:n.getContractAddress_asB64(),consumeUserResourcePercent:o.Message.getFieldWithDefault(n,3,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.UpdateSettingContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.UpdateSettingContract;return proto.protocol.UpdateSettingContract.deserializeBinaryFromReader(i,n)},proto.protocol.UpdateSettingContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readBytes(),s.setContractAddress(i);break;case 3:i=n.readInt64(),s.setConsumeUserResourcePercent(i);break;default:n.skipField()}return s},proto.protocol.UpdateSettingContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.UpdateSettingContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.UpdateSettingContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getContractAddress_asU8()).length>0&&n.writeBytes(2,i),(i=s.getConsumeUserResourcePercent())!==0&&n.writeInt64(3,i)},proto.protocol.UpdateSettingContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.UpdateSettingContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.UpdateSettingContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.UpdateSettingContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.UpdateSettingContract.prototype.getContractAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.UpdateSettingContract.prototype.getContractAddress_asB64=function(){return o.Message.bytesAsB64(this.getContractAddress())},proto.protocol.UpdateSettingContract.prototype.getContractAddress_asU8=function(){return o.Message.bytesAsU8(this.getContractAddress())},proto.protocol.UpdateSettingContract.prototype.setContractAddress=function(s){return o.Message.setProto3BytesField(this,2,s)},proto.protocol.UpdateSettingContract.prototype.getConsumeUserResourcePercent=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.UpdateSettingContract.prototype.setConsumeUserResourcePercent=function(s){return o.Message.setProto3IntField(this,3,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.UpdateEnergyLimitContract.prototype.toObject=function(s){return proto.protocol.UpdateEnergyLimitContract.toObject(s,this)},proto.protocol.UpdateEnergyLimitContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),contractAddress:n.getContractAddress_asB64(),originEnergyLimit:o.Message.getFieldWithDefault(n,3,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.UpdateEnergyLimitContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.UpdateEnergyLimitContract;return proto.protocol.UpdateEnergyLimitContract.deserializeBinaryFromReader(i,n)},proto.protocol.UpdateEnergyLimitContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readBytes(),s.setContractAddress(i);break;case 3:i=n.readInt64(),s.setOriginEnergyLimit(i);break;default:n.skipField()}return s},proto.protocol.UpdateEnergyLimitContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.UpdateEnergyLimitContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.UpdateEnergyLimitContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getContractAddress_asU8()).length>0&&n.writeBytes(2,i),(i=s.getOriginEnergyLimit())!==0&&n.writeInt64(3,i)},proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.UpdateEnergyLimitContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.UpdateEnergyLimitContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress_asB64=function(){return o.Message.bytesAsB64(this.getContractAddress())},proto.protocol.UpdateEnergyLimitContract.prototype.getContractAddress_asU8=function(){return o.Message.bytesAsU8(this.getContractAddress())},proto.protocol.UpdateEnergyLimitContract.prototype.setContractAddress=function(s){return o.Message.setProto3BytesField(this,2,s)},proto.protocol.UpdateEnergyLimitContract.prototype.getOriginEnergyLimit=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit=function(s){return o.Message.setProto3IntField(this,3,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.SmartContractDataWrapper.prototype.toObject=function(s){return proto.protocol.SmartContractDataWrapper.toObject(s,this)},proto.protocol.SmartContractDataWrapper.toObject=function(s,n){var i,u={smartContract:(i=n.getSmartContract())&&proto.protocol.SmartContract.toObject(s,i),runtimecode:n.getRuntimecode_asB64()};return s&&(u.$jspbMessageInstance=n),u}),proto.protocol.SmartContractDataWrapper.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.SmartContractDataWrapper;return proto.protocol.SmartContractDataWrapper.deserializeBinaryFromReader(i,n)},proto.protocol.SmartContractDataWrapper.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=new proto.protocol.SmartContract;n.readMessage(i,proto.protocol.SmartContract.deserializeBinaryFromReader),s.setSmartContract(i);break;case 2:i=n.readBytes(),s.setRuntimecode(i);break;default:n.skipField()}return s},proto.protocol.SmartContractDataWrapper.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.SmartContractDataWrapper.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.SmartContractDataWrapper.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getSmartContract())!=null&&n.writeMessage(1,i,proto.protocol.SmartContract.serializeBinaryToWriter),(i=s.getRuntimecode_asU8()).length>0&&n.writeBytes(2,i)},proto.protocol.SmartContractDataWrapper.prototype.getSmartContract=function(){return o.Message.getWrapperField(this,proto.protocol.SmartContract,1)},proto.protocol.SmartContractDataWrapper.prototype.setSmartContract=function(s){return o.Message.setWrapperField(this,1,s)},proto.protocol.SmartContractDataWrapper.prototype.clearSmartContract=function(){return this.setSmartContract(void 0)},proto.protocol.SmartContractDataWrapper.prototype.hasSmartContract=function(){return o.Message.getField(this,1)!=null},proto.protocol.SmartContractDataWrapper.prototype.getRuntimecode=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.SmartContractDataWrapper.prototype.getRuntimecode_asB64=function(){return o.Message.bytesAsB64(this.getRuntimecode())},proto.protocol.SmartContractDataWrapper.prototype.getRuntimecode_asU8=function(){return o.Message.bytesAsU8(this.getRuntimecode())},proto.protocol.SmartContractDataWrapper.prototype.setRuntimecode=function(s){return o.Message.setProto3BytesField(this,2,s)},a.object.extend(t,proto.protocol)},function(e,t,r){var o=r(8),a=o,c=function(){return this||window||c||self||Function("return this")()}.call(null);a.exportSymbol("proto.protocol.VoteWitnessContract",null,c),a.exportSymbol("proto.protocol.VoteWitnessContract.Vote",null,c),a.exportSymbol("proto.protocol.WitnessCreateContract",null,c),a.exportSymbol("proto.protocol.WitnessUpdateContract",null,c),proto.protocol.WitnessCreateContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.WitnessCreateContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.WitnessCreateContract.displayName="proto.protocol.WitnessCreateContract"),proto.protocol.WitnessUpdateContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.WitnessUpdateContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.WitnessUpdateContract.displayName="proto.protocol.WitnessUpdateContract"),proto.protocol.VoteWitnessContract=function(s){o.Message.initialize(this,s,0,-1,proto.protocol.VoteWitnessContract.repeatedFields_,null)},a.inherits(proto.protocol.VoteWitnessContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.VoteWitnessContract.displayName="proto.protocol.VoteWitnessContract"),proto.protocol.VoteWitnessContract.Vote=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.VoteWitnessContract.Vote,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.VoteWitnessContract.Vote.displayName="proto.protocol.VoteWitnessContract.Vote"),o.Message.GENERATE_TO_OBJECT&&(proto.protocol.WitnessCreateContract.prototype.toObject=function(s){return proto.protocol.WitnessCreateContract.toObject(s,this)},proto.protocol.WitnessCreateContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),url:n.getUrl_asB64()};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.WitnessCreateContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.WitnessCreateContract;return proto.protocol.WitnessCreateContract.deserializeBinaryFromReader(i,n)},proto.protocol.WitnessCreateContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readBytes(),s.setUrl(i);break;default:n.skipField()}return s},proto.protocol.WitnessCreateContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.WitnessCreateContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.WitnessCreateContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getUrl_asU8()).length>0&&n.writeBytes(2,i)},proto.protocol.WitnessCreateContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.WitnessCreateContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.WitnessCreateContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.WitnessCreateContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.WitnessCreateContract.prototype.getUrl=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.WitnessCreateContract.prototype.getUrl_asB64=function(){return o.Message.bytesAsB64(this.getUrl())},proto.protocol.WitnessCreateContract.prototype.getUrl_asU8=function(){return o.Message.bytesAsU8(this.getUrl())},proto.protocol.WitnessCreateContract.prototype.setUrl=function(s){return o.Message.setProto3BytesField(this,2,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.WitnessUpdateContract.prototype.toObject=function(s){return proto.protocol.WitnessUpdateContract.toObject(s,this)},proto.protocol.WitnessUpdateContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),updateUrl:n.getUpdateUrl_asB64()};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.WitnessUpdateContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.WitnessUpdateContract;return proto.protocol.WitnessUpdateContract.deserializeBinaryFromReader(i,n)},proto.protocol.WitnessUpdateContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 12:i=n.readBytes(),s.setUpdateUrl(i);break;default:n.skipField()}return s},proto.protocol.WitnessUpdateContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.WitnessUpdateContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.WitnessUpdateContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getUpdateUrl_asU8()).length>0&&n.writeBytes(12,i)},proto.protocol.WitnessUpdateContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.WitnessUpdateContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.WitnessUpdateContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.WitnessUpdateContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl=function(){return o.Message.getFieldWithDefault(this,12,"")},proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl_asB64=function(){return o.Message.bytesAsB64(this.getUpdateUrl())},proto.protocol.WitnessUpdateContract.prototype.getUpdateUrl_asU8=function(){return o.Message.bytesAsU8(this.getUpdateUrl())},proto.protocol.WitnessUpdateContract.prototype.setUpdateUrl=function(s){return o.Message.setProto3BytesField(this,12,s)},proto.protocol.VoteWitnessContract.repeatedFields_=[2],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.VoteWitnessContract.prototype.toObject=function(s){return proto.protocol.VoteWitnessContract.toObject(s,this)},proto.protocol.VoteWitnessContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),votesList:o.Message.toObjectList(n.getVotesList(),proto.protocol.VoteWitnessContract.Vote.toObject,s),support:o.Message.getBooleanFieldWithDefault(n,3,!1)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.VoteWitnessContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.VoteWitnessContract;return proto.protocol.VoteWitnessContract.deserializeBinaryFromReader(i,n)},proto.protocol.VoteWitnessContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=new proto.protocol.VoteWitnessContract.Vote,n.readMessage(i,proto.protocol.VoteWitnessContract.Vote.deserializeBinaryFromReader),s.addVotes(i);break;case 3:i=n.readBool(),s.setSupport(i);break;default:n.skipField()}return s},proto.protocol.VoteWitnessContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.VoteWitnessContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.VoteWitnessContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getVotesList()).length>0&&n.writeRepeatedMessage(2,i,proto.protocol.VoteWitnessContract.Vote.serializeBinaryToWriter),(i=s.getSupport())&&n.writeBool(3,i)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.VoteWitnessContract.Vote.prototype.toObject=function(s){return proto.protocol.VoteWitnessContract.Vote.toObject(s,this)},proto.protocol.VoteWitnessContract.Vote.toObject=function(s,n){var i={voteAddress:n.getVoteAddress_asB64(),voteCount:o.Message.getFieldWithDefault(n,2,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.VoteWitnessContract.Vote.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.VoteWitnessContract.Vote;return proto.protocol.VoteWitnessContract.Vote.deserializeBinaryFromReader(i,n)},proto.protocol.VoteWitnessContract.Vote.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setVoteAddress(i);break;case 2:i=n.readInt64(),s.setVoteCount(i);break;default:n.skipField()}return s},proto.protocol.VoteWitnessContract.Vote.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.VoteWitnessContract.Vote.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.VoteWitnessContract.Vote.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getVoteAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getVoteCount())!==0&&n.writeInt64(2,i)},proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress_asB64=function(){return o.Message.bytesAsB64(this.getVoteAddress())},proto.protocol.VoteWitnessContract.Vote.prototype.getVoteAddress_asU8=function(){return o.Message.bytesAsU8(this.getVoteAddress())},proto.protocol.VoteWitnessContract.Vote.prototype.setVoteAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.VoteWitnessContract.Vote.prototype.getVoteCount=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.VoteWitnessContract.Vote.prototype.setVoteCount=function(s){return o.Message.setProto3IntField(this,2,s)},proto.protocol.VoteWitnessContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.VoteWitnessContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.VoteWitnessContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.VoteWitnessContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.VoteWitnessContract.prototype.getVotesList=function(){return o.Message.getRepeatedWrapperField(this,proto.protocol.VoteWitnessContract.Vote,2)},proto.protocol.VoteWitnessContract.prototype.setVotesList=function(s){return o.Message.setRepeatedWrapperField(this,2,s)},proto.protocol.VoteWitnessContract.prototype.addVotes=function(s,n){return o.Message.addToRepeatedWrapperField(this,2,s,proto.protocol.VoteWitnessContract.Vote,n)},proto.protocol.VoteWitnessContract.prototype.clearVotesList=function(){return this.setVotesList([])},proto.protocol.VoteWitnessContract.prototype.getSupport=function(){return o.Message.getBooleanFieldWithDefault(this,3,!1)},proto.protocol.VoteWitnessContract.prototype.setSupport=function(s){return o.Message.setProto3BooleanField(this,3,s)},a.object.extend(t,proto.protocol)},function(e,t,r){var o=r(8),a=o,c=function(){return this||window||c||self||Function("return this")()}.call(null);a.exportSymbol("proto.protocol.BuyStorageBytesContract",null,c),a.exportSymbol("proto.protocol.BuyStorageContract",null,c),a.exportSymbol("proto.protocol.SellStorageContract",null,c),a.exportSymbol("proto.protocol.UpdateBrokerageContract",null,c),proto.protocol.BuyStorageBytesContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.BuyStorageBytesContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.BuyStorageBytesContract.displayName="proto.protocol.BuyStorageBytesContract"),proto.protocol.BuyStorageContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.BuyStorageContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.BuyStorageContract.displayName="proto.protocol.BuyStorageContract"),proto.protocol.SellStorageContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.SellStorageContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.SellStorageContract.displayName="proto.protocol.SellStorageContract"),proto.protocol.UpdateBrokerageContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.UpdateBrokerageContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.UpdateBrokerageContract.displayName="proto.protocol.UpdateBrokerageContract"),o.Message.GENERATE_TO_OBJECT&&(proto.protocol.BuyStorageBytesContract.prototype.toObject=function(s){return proto.protocol.BuyStorageBytesContract.toObject(s,this)},proto.protocol.BuyStorageBytesContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),bytes:o.Message.getFieldWithDefault(n,2,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.BuyStorageBytesContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.BuyStorageBytesContract;return proto.protocol.BuyStorageBytesContract.deserializeBinaryFromReader(i,n)},proto.protocol.BuyStorageBytesContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readInt64(),s.setBytes(i);break;default:n.skipField()}return s},proto.protocol.BuyStorageBytesContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.BuyStorageBytesContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.BuyStorageBytesContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getBytes())!==0&&n.writeInt64(2,i)},proto.protocol.BuyStorageBytesContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.BuyStorageBytesContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.BuyStorageBytesContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.BuyStorageBytesContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.BuyStorageBytesContract.prototype.getBytes=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.BuyStorageBytesContract.prototype.setBytes=function(s){return o.Message.setProto3IntField(this,2,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.BuyStorageContract.prototype.toObject=function(s){return proto.protocol.BuyStorageContract.toObject(s,this)},proto.protocol.BuyStorageContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),quant:o.Message.getFieldWithDefault(n,2,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.BuyStorageContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.BuyStorageContract;return proto.protocol.BuyStorageContract.deserializeBinaryFromReader(i,n)},proto.protocol.BuyStorageContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readInt64(),s.setQuant(i);break;default:n.skipField()}return s},proto.protocol.BuyStorageContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.BuyStorageContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.BuyStorageContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getQuant())!==0&&n.writeInt64(2,i)},proto.protocol.BuyStorageContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.BuyStorageContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.BuyStorageContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.BuyStorageContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.BuyStorageContract.prototype.getQuant=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.BuyStorageContract.prototype.setQuant=function(s){return o.Message.setProto3IntField(this,2,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.SellStorageContract.prototype.toObject=function(s){return proto.protocol.SellStorageContract.toObject(s,this)},proto.protocol.SellStorageContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),storageBytes:o.Message.getFieldWithDefault(n,2,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.SellStorageContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.SellStorageContract;return proto.protocol.SellStorageContract.deserializeBinaryFromReader(i,n)},proto.protocol.SellStorageContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readInt64(),s.setStorageBytes(i);break;default:n.skipField()}return s},proto.protocol.SellStorageContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.SellStorageContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.SellStorageContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getStorageBytes())!==0&&n.writeInt64(2,i)},proto.protocol.SellStorageContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.SellStorageContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.SellStorageContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.SellStorageContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.SellStorageContract.prototype.getStorageBytes=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.SellStorageContract.prototype.setStorageBytes=function(s){return o.Message.setProto3IntField(this,2,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.UpdateBrokerageContract.prototype.toObject=function(s){return proto.protocol.UpdateBrokerageContract.toObject(s,this)},proto.protocol.UpdateBrokerageContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),brokerage:o.Message.getFieldWithDefault(n,2,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.UpdateBrokerageContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.UpdateBrokerageContract;return proto.protocol.UpdateBrokerageContract.deserializeBinaryFromReader(i,n)},proto.protocol.UpdateBrokerageContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readInt32(),s.setBrokerage(i);break;default:n.skipField()}return s},proto.protocol.UpdateBrokerageContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.UpdateBrokerageContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.UpdateBrokerageContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getBrokerage())!==0&&n.writeInt32(2,i)},proto.protocol.UpdateBrokerageContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.UpdateBrokerageContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.UpdateBrokerageContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.UpdateBrokerageContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.UpdateBrokerageContract.prototype.getBrokerage=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.UpdateBrokerageContract.prototype.setBrokerage=function(s){return o.Message.setProto3IntField(this,2,s)},a.object.extend(t,proto.protocol)},function(e,t,r){var o=r(8),a=o,c=function(){return this||window||c||self||Function("return this")()}.call(null),s=r(20);a.object.extend(proto,s),a.exportSymbol("proto.protocol.AccountCreateContract",null,c),a.exportSymbol("proto.protocol.AccountPermissionUpdateContract",null,c),a.exportSymbol("proto.protocol.AccountUpdateContract",null,c),a.exportSymbol("proto.protocol.SetAccountIdContract",null,c),proto.protocol.AccountCreateContract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.AccountCreateContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.AccountCreateContract.displayName="proto.protocol.AccountCreateContract"),proto.protocol.AccountUpdateContract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.AccountUpdateContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.AccountUpdateContract.displayName="proto.protocol.AccountUpdateContract"),proto.protocol.SetAccountIdContract=function(n){o.Message.initialize(this,n,0,-1,null,null)},a.inherits(proto.protocol.SetAccountIdContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.SetAccountIdContract.displayName="proto.protocol.SetAccountIdContract"),proto.protocol.AccountPermissionUpdateContract=function(n){o.Message.initialize(this,n,0,-1,proto.protocol.AccountPermissionUpdateContract.repeatedFields_,null)},a.inherits(proto.protocol.AccountPermissionUpdateContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.AccountPermissionUpdateContract.displayName="proto.protocol.AccountPermissionUpdateContract"),o.Message.GENERATE_TO_OBJECT&&(proto.protocol.AccountCreateContract.prototype.toObject=function(n){return proto.protocol.AccountCreateContract.toObject(n,this)},proto.protocol.AccountCreateContract.toObject=function(n,i){var u={ownerAddress:i.getOwnerAddress_asB64(),accountAddress:i.getAccountAddress_asB64(),type:o.Message.getFieldWithDefault(i,3,0)};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.AccountCreateContract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.AccountCreateContract;return proto.protocol.AccountCreateContract.deserializeBinaryFromReader(u,i)},proto.protocol.AccountCreateContract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setOwnerAddress(u);break;case 2:u=i.readBytes(),n.setAccountAddress(u);break;case 3:u=i.readEnum(),n.setType(u);break;default:i.skipField()}return n},proto.protocol.AccountCreateContract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.AccountCreateContract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.AccountCreateContract.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getAccountAddress_asU8()).length>0&&i.writeBytes(2,u),(u=n.getType())!==0&&i.writeEnum(3,u)},proto.protocol.AccountCreateContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.AccountCreateContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.AccountCreateContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.AccountCreateContract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.AccountCreateContract.prototype.getAccountAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.AccountCreateContract.prototype.getAccountAddress_asB64=function(){return o.Message.bytesAsB64(this.getAccountAddress())},proto.protocol.AccountCreateContract.prototype.getAccountAddress_asU8=function(){return o.Message.bytesAsU8(this.getAccountAddress())},proto.protocol.AccountCreateContract.prototype.setAccountAddress=function(n){return o.Message.setProto3BytesField(this,2,n)},proto.protocol.AccountCreateContract.prototype.getType=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.AccountCreateContract.prototype.setType=function(n){return o.Message.setProto3EnumField(this,3,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.AccountUpdateContract.prototype.toObject=function(n){return proto.protocol.AccountUpdateContract.toObject(n,this)},proto.protocol.AccountUpdateContract.toObject=function(n,i){var u={accountName:i.getAccountName_asB64(),ownerAddress:i.getOwnerAddress_asB64()};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.AccountUpdateContract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.AccountUpdateContract;return proto.protocol.AccountUpdateContract.deserializeBinaryFromReader(u,i)},proto.protocol.AccountUpdateContract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setAccountName(u);break;case 2:u=i.readBytes(),n.setOwnerAddress(u);break;default:i.skipField()}return n},proto.protocol.AccountUpdateContract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.AccountUpdateContract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.AccountUpdateContract.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getAccountName_asU8()).length>0&&i.writeBytes(1,u),(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(2,u)},proto.protocol.AccountUpdateContract.prototype.getAccountName=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.AccountUpdateContract.prototype.getAccountName_asB64=function(){return o.Message.bytesAsB64(this.getAccountName())},proto.protocol.AccountUpdateContract.prototype.getAccountName_asU8=function(){return o.Message.bytesAsU8(this.getAccountName())},proto.protocol.AccountUpdateContract.prototype.setAccountName=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.AccountUpdateContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.AccountUpdateContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.AccountUpdateContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.AccountUpdateContract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,2,n)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.SetAccountIdContract.prototype.toObject=function(n){return proto.protocol.SetAccountIdContract.toObject(n,this)},proto.protocol.SetAccountIdContract.toObject=function(n,i){var u={accountId:i.getAccountId_asB64(),ownerAddress:i.getOwnerAddress_asB64()};return n&&(u.$jspbMessageInstance=i),u}),proto.protocol.SetAccountIdContract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.SetAccountIdContract;return proto.protocol.SetAccountIdContract.deserializeBinaryFromReader(u,i)},proto.protocol.SetAccountIdContract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setAccountId(u);break;case 2:u=i.readBytes(),n.setOwnerAddress(u);break;default:i.skipField()}return n},proto.protocol.SetAccountIdContract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.SetAccountIdContract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.SetAccountIdContract.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getAccountId_asU8()).length>0&&i.writeBytes(1,u),(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(2,u)},proto.protocol.SetAccountIdContract.prototype.getAccountId=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.SetAccountIdContract.prototype.getAccountId_asB64=function(){return o.Message.bytesAsB64(this.getAccountId())},proto.protocol.SetAccountIdContract.prototype.getAccountId_asU8=function(){return o.Message.bytesAsU8(this.getAccountId())},proto.protocol.SetAccountIdContract.prototype.setAccountId=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.SetAccountIdContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.SetAccountIdContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.SetAccountIdContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.SetAccountIdContract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,2,n)},proto.protocol.AccountPermissionUpdateContract.repeatedFields_=[4],o.Message.GENERATE_TO_OBJECT&&(proto.protocol.AccountPermissionUpdateContract.prototype.toObject=function(n){return proto.protocol.AccountPermissionUpdateContract.toObject(n,this)},proto.protocol.AccountPermissionUpdateContract.toObject=function(n,i){var u,l={ownerAddress:i.getOwnerAddress_asB64(),owner:(u=i.getOwner())&&s.Permission.toObject(n,u),witness:(u=i.getWitness())&&s.Permission.toObject(n,u),activesList:o.Message.toObjectList(i.getActivesList(),s.Permission.toObject,n)};return n&&(l.$jspbMessageInstance=i),l}),proto.protocol.AccountPermissionUpdateContract.deserializeBinary=function(n){var i=new o.BinaryReader(n),u=new proto.protocol.AccountPermissionUpdateContract;return proto.protocol.AccountPermissionUpdateContract.deserializeBinaryFromReader(u,i)},proto.protocol.AccountPermissionUpdateContract.deserializeBinaryFromReader=function(n,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var u=i.readBytes();n.setOwnerAddress(u);break;case 2:u=new s.Permission,i.readMessage(u,s.Permission.deserializeBinaryFromReader),n.setOwner(u);break;case 3:u=new s.Permission,i.readMessage(u,s.Permission.deserializeBinaryFromReader),n.setWitness(u);break;case 4:u=new s.Permission,i.readMessage(u,s.Permission.deserializeBinaryFromReader),n.addActives(u);break;default:i.skipField()}return n},proto.protocol.AccountPermissionUpdateContract.prototype.serializeBinary=function(){var n=new o.BinaryWriter;return proto.protocol.AccountPermissionUpdateContract.serializeBinaryToWriter(this,n),n.getResultBuffer()},proto.protocol.AccountPermissionUpdateContract.serializeBinaryToWriter=function(n,i){var u=void 0;(u=n.getOwnerAddress_asU8()).length>0&&i.writeBytes(1,u),(u=n.getOwner())!=null&&i.writeMessage(2,u,s.Permission.serializeBinaryToWriter),(u=n.getWitness())!=null&&i.writeMessage(3,u,s.Permission.serializeBinaryToWriter),(u=n.getActivesList()).length>0&&i.writeRepeatedMessage(4,u,s.Permission.serializeBinaryToWriter)},proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.AccountPermissionUpdateContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.AccountPermissionUpdateContract.prototype.setOwnerAddress=function(n){return o.Message.setProto3BytesField(this,1,n)},proto.protocol.AccountPermissionUpdateContract.prototype.getOwner=function(){return o.Message.getWrapperField(this,s.Permission,2)},proto.protocol.AccountPermissionUpdateContract.prototype.setOwner=function(n){return o.Message.setWrapperField(this,2,n)},proto.protocol.AccountPermissionUpdateContract.prototype.clearOwner=function(){return this.setOwner(void 0)},proto.protocol.AccountPermissionUpdateContract.prototype.hasOwner=function(){return o.Message.getField(this,2)!=null},proto.protocol.AccountPermissionUpdateContract.prototype.getWitness=function(){return o.Message.getWrapperField(this,s.Permission,3)},proto.protocol.AccountPermissionUpdateContract.prototype.setWitness=function(n){return o.Message.setWrapperField(this,3,n)},proto.protocol.AccountPermissionUpdateContract.prototype.clearWitness=function(){return this.setWitness(void 0)},proto.protocol.AccountPermissionUpdateContract.prototype.hasWitness=function(){return o.Message.getField(this,3)!=null},proto.protocol.AccountPermissionUpdateContract.prototype.getActivesList=function(){return o.Message.getRepeatedWrapperField(this,s.Permission,4)},proto.protocol.AccountPermissionUpdateContract.prototype.setActivesList=function(n){return o.Message.setRepeatedWrapperField(this,4,n)},proto.protocol.AccountPermissionUpdateContract.prototype.addActives=function(n,i){return o.Message.addToRepeatedWrapperField(this,4,n,proto.protocol.Permission,i)},proto.protocol.AccountPermissionUpdateContract.prototype.clearActivesList=function(){return this.setActivesList([])},a.object.extend(t,proto.protocol)},function(e,t,r){var o=r(8),a=o,c=function(){return this||window||c||self||Function("return this")()}.call(null);a.exportSymbol("proto.protocol.ProposalApproveContract",null,c),a.exportSymbol("proto.protocol.ProposalCreateContract",null,c),a.exportSymbol("proto.protocol.ProposalDeleteContract",null,c),proto.protocol.ProposalApproveContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.ProposalApproveContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.ProposalApproveContract.displayName="proto.protocol.ProposalApproveContract"),proto.protocol.ProposalCreateContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.ProposalCreateContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.ProposalCreateContract.displayName="proto.protocol.ProposalCreateContract"),proto.protocol.ProposalDeleteContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.ProposalDeleteContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.ProposalDeleteContract.displayName="proto.protocol.ProposalDeleteContract"),o.Message.GENERATE_TO_OBJECT&&(proto.protocol.ProposalApproveContract.prototype.toObject=function(s){return proto.protocol.ProposalApproveContract.toObject(s,this)},proto.protocol.ProposalApproveContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),proposalId:o.Message.getFieldWithDefault(n,2,0),isAddApproval:o.Message.getBooleanFieldWithDefault(n,3,!1)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.ProposalApproveContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.ProposalApproveContract;return proto.protocol.ProposalApproveContract.deserializeBinaryFromReader(i,n)},proto.protocol.ProposalApproveContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readInt64(),s.setProposalId(i);break;case 3:i=n.readBool(),s.setIsAddApproval(i);break;default:n.skipField()}return s},proto.protocol.ProposalApproveContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.ProposalApproveContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.ProposalApproveContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getProposalId())!==0&&n.writeInt64(2,i),(i=s.getIsAddApproval())&&n.writeBool(3,i)},proto.protocol.ProposalApproveContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.ProposalApproveContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.ProposalApproveContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.ProposalApproveContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.ProposalApproveContract.prototype.getProposalId=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.ProposalApproveContract.prototype.setProposalId=function(s){return o.Message.setProto3IntField(this,2,s)},proto.protocol.ProposalApproveContract.prototype.getIsAddApproval=function(){return o.Message.getBooleanFieldWithDefault(this,3,!1)},proto.protocol.ProposalApproveContract.prototype.setIsAddApproval=function(s){return o.Message.setProto3BooleanField(this,3,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.ProposalCreateContract.prototype.toObject=function(s){return proto.protocol.ProposalCreateContract.toObject(s,this)},proto.protocol.ProposalCreateContract.toObject=function(s,n){var i,u={ownerAddress:n.getOwnerAddress_asB64(),parametersMap:(i=n.getParametersMap())?i.toObject(s,void 0):[]};return s&&(u.$jspbMessageInstance=n),u}),proto.protocol.ProposalCreateContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.ProposalCreateContract;return proto.protocol.ProposalCreateContract.deserializeBinaryFromReader(i,n)},proto.protocol.ProposalCreateContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=s.getParametersMap(),n.readMessage(i,function(u,l){o.Map.deserializeBinary(u,l,o.BinaryReader.prototype.readInt64,o.BinaryReader.prototype.readInt64,null,0,0)});break;default:n.skipField()}return s},proto.protocol.ProposalCreateContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.ProposalCreateContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.ProposalCreateContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getParametersMap(!0))&&i.getLength()>0&&i.serializeBinary(2,n,o.BinaryWriter.prototype.writeInt64,o.BinaryWriter.prototype.writeInt64)},proto.protocol.ProposalCreateContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.ProposalCreateContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.ProposalCreateContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.ProposalCreateContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.ProposalCreateContract.prototype.getParametersMap=function(s){return o.Message.getMapField(this,2,s,null)},proto.protocol.ProposalCreateContract.prototype.clearParametersMap=function(){return this.getParametersMap().clear(),this},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.ProposalDeleteContract.prototype.toObject=function(s){return proto.protocol.ProposalDeleteContract.toObject(s,this)},proto.protocol.ProposalDeleteContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),proposalId:o.Message.getFieldWithDefault(n,2,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.ProposalDeleteContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.ProposalDeleteContract;return proto.protocol.ProposalDeleteContract.deserializeBinaryFromReader(i,n)},proto.protocol.ProposalDeleteContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readInt64(),s.setProposalId(i);break;default:n.skipField()}return s},proto.protocol.ProposalDeleteContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.ProposalDeleteContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.ProposalDeleteContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getProposalId())!==0&&n.writeInt64(2,i)},proto.protocol.ProposalDeleteContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.ProposalDeleteContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.ProposalDeleteContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.ProposalDeleteContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.ProposalDeleteContract.prototype.getProposalId=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.ProposalDeleteContract.prototype.setProposalId=function(s){return o.Message.setProto3IntField(this,2,s)},a.object.extend(t,proto.protocol)},function(e,t,r){var o=r(8),a=o,c=function(){return this||window||c||self||Function("return this")()}.call(null);a.exportSymbol("proto.protocol.ExchangeCreateContract",null,c),a.exportSymbol("proto.protocol.ExchangeInjectContract",null,c),a.exportSymbol("proto.protocol.ExchangeTransactionContract",null,c),a.exportSymbol("proto.protocol.ExchangeWithdrawContract",null,c),proto.protocol.ExchangeCreateContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.ExchangeCreateContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.ExchangeCreateContract.displayName="proto.protocol.ExchangeCreateContract"),proto.protocol.ExchangeInjectContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.ExchangeInjectContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.ExchangeInjectContract.displayName="proto.protocol.ExchangeInjectContract"),proto.protocol.ExchangeWithdrawContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.ExchangeWithdrawContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.ExchangeWithdrawContract.displayName="proto.protocol.ExchangeWithdrawContract"),proto.protocol.ExchangeTransactionContract=function(s){o.Message.initialize(this,s,0,-1,null,null)},a.inherits(proto.protocol.ExchangeTransactionContract,o.Message),a.DEBUG&&!COMPILED&&(proto.protocol.ExchangeTransactionContract.displayName="proto.protocol.ExchangeTransactionContract"),o.Message.GENERATE_TO_OBJECT&&(proto.protocol.ExchangeCreateContract.prototype.toObject=function(s){return proto.protocol.ExchangeCreateContract.toObject(s,this)},proto.protocol.ExchangeCreateContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),firstTokenId:n.getFirstTokenId_asB64(),firstTokenBalance:o.Message.getFieldWithDefault(n,3,0),secondTokenId:n.getSecondTokenId_asB64(),secondTokenBalance:o.Message.getFieldWithDefault(n,5,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.ExchangeCreateContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.ExchangeCreateContract;return proto.protocol.ExchangeCreateContract.deserializeBinaryFromReader(i,n)},proto.protocol.ExchangeCreateContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readBytes(),s.setFirstTokenId(i);break;case 3:i=n.readInt64(),s.setFirstTokenBalance(i);break;case 4:i=n.readBytes(),s.setSecondTokenId(i);break;case 5:i=n.readInt64(),s.setSecondTokenBalance(i);break;default:n.skipField()}return s},proto.protocol.ExchangeCreateContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.ExchangeCreateContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.ExchangeCreateContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getFirstTokenId_asU8()).length>0&&n.writeBytes(2,i),(i=s.getFirstTokenBalance())!==0&&n.writeInt64(3,i),(i=s.getSecondTokenId_asU8()).length>0&&n.writeBytes(4,i),(i=s.getSecondTokenBalance())!==0&&n.writeInt64(5,i)},proto.protocol.ExchangeCreateContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.ExchangeCreateContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.ExchangeCreateContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.ExchangeCreateContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.ExchangeCreateContract.prototype.getFirstTokenId=function(){return o.Message.getFieldWithDefault(this,2,"")},proto.protocol.ExchangeCreateContract.prototype.getFirstTokenId_asB64=function(){return o.Message.bytesAsB64(this.getFirstTokenId())},proto.protocol.ExchangeCreateContract.prototype.getFirstTokenId_asU8=function(){return o.Message.bytesAsU8(this.getFirstTokenId())},proto.protocol.ExchangeCreateContract.prototype.setFirstTokenId=function(s){return o.Message.setProto3BytesField(this,2,s)},proto.protocol.ExchangeCreateContract.prototype.getFirstTokenBalance=function(){return o.Message.getFieldWithDefault(this,3,0)},proto.protocol.ExchangeCreateContract.prototype.setFirstTokenBalance=function(s){return o.Message.setProto3IntField(this,3,s)},proto.protocol.ExchangeCreateContract.prototype.getSecondTokenId=function(){return o.Message.getFieldWithDefault(this,4,"")},proto.protocol.ExchangeCreateContract.prototype.getSecondTokenId_asB64=function(){return o.Message.bytesAsB64(this.getSecondTokenId())},proto.protocol.ExchangeCreateContract.prototype.getSecondTokenId_asU8=function(){return o.Message.bytesAsU8(this.getSecondTokenId())},proto.protocol.ExchangeCreateContract.prototype.setSecondTokenId=function(s){return o.Message.setProto3BytesField(this,4,s)},proto.protocol.ExchangeCreateContract.prototype.getSecondTokenBalance=function(){return o.Message.getFieldWithDefault(this,5,0)},proto.protocol.ExchangeCreateContract.prototype.setSecondTokenBalance=function(s){return o.Message.setProto3IntField(this,5,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.ExchangeInjectContract.prototype.toObject=function(s){return proto.protocol.ExchangeInjectContract.toObject(s,this)},proto.protocol.ExchangeInjectContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),exchangeId:o.Message.getFieldWithDefault(n,2,0),tokenId:n.getTokenId_asB64(),quant:o.Message.getFieldWithDefault(n,4,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.ExchangeInjectContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.ExchangeInjectContract;return proto.protocol.ExchangeInjectContract.deserializeBinaryFromReader(i,n)},proto.protocol.ExchangeInjectContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readInt64(),s.setExchangeId(i);break;case 3:i=n.readBytes(),s.setTokenId(i);break;case 4:i=n.readInt64(),s.setQuant(i);break;default:n.skipField()}return s},proto.protocol.ExchangeInjectContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.ExchangeInjectContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.ExchangeInjectContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getExchangeId())!==0&&n.writeInt64(2,i),(i=s.getTokenId_asU8()).length>0&&n.writeBytes(3,i),(i=s.getQuant())!==0&&n.writeInt64(4,i)},proto.protocol.ExchangeInjectContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.ExchangeInjectContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.ExchangeInjectContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.ExchangeInjectContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.ExchangeInjectContract.prototype.getExchangeId=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.ExchangeInjectContract.prototype.setExchangeId=function(s){return o.Message.setProto3IntField(this,2,s)},proto.protocol.ExchangeInjectContract.prototype.getTokenId=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.ExchangeInjectContract.prototype.getTokenId_asB64=function(){return o.Message.bytesAsB64(this.getTokenId())},proto.protocol.ExchangeInjectContract.prototype.getTokenId_asU8=function(){return o.Message.bytesAsU8(this.getTokenId())},proto.protocol.ExchangeInjectContract.prototype.setTokenId=function(s){return o.Message.setProto3BytesField(this,3,s)},proto.protocol.ExchangeInjectContract.prototype.getQuant=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.ExchangeInjectContract.prototype.setQuant=function(s){return o.Message.setProto3IntField(this,4,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.ExchangeWithdrawContract.prototype.toObject=function(s){return proto.protocol.ExchangeWithdrawContract.toObject(s,this)},proto.protocol.ExchangeWithdrawContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),exchangeId:o.Message.getFieldWithDefault(n,2,0),tokenId:n.getTokenId_asB64(),quant:o.Message.getFieldWithDefault(n,4,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.ExchangeWithdrawContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.ExchangeWithdrawContract;return proto.protocol.ExchangeWithdrawContract.deserializeBinaryFromReader(i,n)},proto.protocol.ExchangeWithdrawContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readInt64(),s.setExchangeId(i);break;case 3:i=n.readBytes(),s.setTokenId(i);break;case 4:i=n.readInt64(),s.setQuant(i);break;default:n.skipField()}return s},proto.protocol.ExchangeWithdrawContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.ExchangeWithdrawContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.ExchangeWithdrawContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getExchangeId())!==0&&n.writeInt64(2,i),(i=s.getTokenId_asU8()).length>0&&n.writeBytes(3,i),(i=s.getQuant())!==0&&n.writeInt64(4,i)},proto.protocol.ExchangeWithdrawContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.ExchangeWithdrawContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.ExchangeWithdrawContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.ExchangeWithdrawContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.ExchangeWithdrawContract.prototype.getExchangeId=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.ExchangeWithdrawContract.prototype.setExchangeId=function(s){return o.Message.setProto3IntField(this,2,s)},proto.protocol.ExchangeWithdrawContract.prototype.getTokenId=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.ExchangeWithdrawContract.prototype.getTokenId_asB64=function(){return o.Message.bytesAsB64(this.getTokenId())},proto.protocol.ExchangeWithdrawContract.prototype.getTokenId_asU8=function(){return o.Message.bytesAsU8(this.getTokenId())},proto.protocol.ExchangeWithdrawContract.prototype.setTokenId=function(s){return o.Message.setProto3BytesField(this,3,s)},proto.protocol.ExchangeWithdrawContract.prototype.getQuant=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.ExchangeWithdrawContract.prototype.setQuant=function(s){return o.Message.setProto3IntField(this,4,s)},o.Message.GENERATE_TO_OBJECT&&(proto.protocol.ExchangeTransactionContract.prototype.toObject=function(s){return proto.protocol.ExchangeTransactionContract.toObject(s,this)},proto.protocol.ExchangeTransactionContract.toObject=function(s,n){var i={ownerAddress:n.getOwnerAddress_asB64(),exchangeId:o.Message.getFieldWithDefault(n,2,0),tokenId:n.getTokenId_asB64(),quant:o.Message.getFieldWithDefault(n,4,0),expected:o.Message.getFieldWithDefault(n,5,0)};return s&&(i.$jspbMessageInstance=n),i}),proto.protocol.ExchangeTransactionContract.deserializeBinary=function(s){var n=new o.BinaryReader(s),i=new proto.protocol.ExchangeTransactionContract;return proto.protocol.ExchangeTransactionContract.deserializeBinaryFromReader(i,n)},proto.protocol.ExchangeTransactionContract.deserializeBinaryFromReader=function(s,n){for(;n.nextField()&&!n.isEndGroup();)switch(n.getFieldNumber()){case 1:var i=n.readBytes();s.setOwnerAddress(i);break;case 2:i=n.readInt64(),s.setExchangeId(i);break;case 3:i=n.readBytes(),s.setTokenId(i);break;case 4:i=n.readInt64(),s.setQuant(i);break;case 5:i=n.readInt64(),s.setExpected(i);break;default:n.skipField()}return s},proto.protocol.ExchangeTransactionContract.prototype.serializeBinary=function(){var s=new o.BinaryWriter;return proto.protocol.ExchangeTransactionContract.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.protocol.ExchangeTransactionContract.serializeBinaryToWriter=function(s,n){var i=void 0;(i=s.getOwnerAddress_asU8()).length>0&&n.writeBytes(1,i),(i=s.getExchangeId())!==0&&n.writeInt64(2,i),(i=s.getTokenId_asU8()).length>0&&n.writeBytes(3,i),(i=s.getQuant())!==0&&n.writeInt64(4,i),(i=s.getExpected())!==0&&n.writeInt64(5,i)},proto.protocol.ExchangeTransactionContract.prototype.getOwnerAddress=function(){return o.Message.getFieldWithDefault(this,1,"")},proto.protocol.ExchangeTransactionContract.prototype.getOwnerAddress_asB64=function(){return o.Message.bytesAsB64(this.getOwnerAddress())},proto.protocol.ExchangeTransactionContract.prototype.getOwnerAddress_asU8=function(){return o.Message.bytesAsU8(this.getOwnerAddress())},proto.protocol.ExchangeTransactionContract.prototype.setOwnerAddress=function(s){return o.Message.setProto3BytesField(this,1,s)},proto.protocol.ExchangeTransactionContract.prototype.getExchangeId=function(){return o.Message.getFieldWithDefault(this,2,0)},proto.protocol.ExchangeTransactionContract.prototype.setExchangeId=function(s){return o.Message.setProto3IntField(this,2,s)},proto.protocol.ExchangeTransactionContract.prototype.getTokenId=function(){return o.Message.getFieldWithDefault(this,3,"")},proto.protocol.ExchangeTransactionContract.prototype.getTokenId_asB64=function(){return o.Message.bytesAsB64(this.getTokenId())},proto.protocol.ExchangeTransactionContract.prototype.getTokenId_asU8=function(){return o.Message.bytesAsU8(this.getTokenId())},proto.protocol.ExchangeTransactionContract.prototype.setTokenId=function(s){return o.Message.setProto3BytesField(this,3,s)},proto.protocol.ExchangeTransactionContract.prototype.getQuant=function(){return o.Message.getFieldWithDefault(this,4,0)},proto.protocol.ExchangeTransactionContract.prototype.setQuant=function(s){return o.Message.setProto3IntField(this,4,s)},proto.protocol.ExchangeTransactionContract.prototype.getExpected=function(){return o.Message.getFieldWithDefault(this,5,0)},proto.protocol.ExchangeTransactionContract.prototype.setExpected=function(s){return o.Message.setProto3IntField(this,5,s)},a.object.extend(t,proto.protocol)},function(e,t,r){"use strict";r.r(t),r.d(t,"default",function(){return st});var o={};r.r(o),r.d(o,"byte2hexStr",function(){return Z}),r.d(o,"bytesToString",function(){return re}),r.d(o,"hextoString",function(){return pe}),r.d(o,"byteArray2hexStr",function(){return ue}),r.d(o,"base64DecodeFromString",function(){return se}),r.d(o,"base64EncodeToString",function(){return Ke});var a={};r.r(a),r.d(a,"bin2String",function(){return co}),r.d(a,"arrayEquals",function(){return uo}),r.d(a,"stringToBytes",function(){return Q9}),r.d(a,"byte2hexStr",function(){return Z}),r.d(a,"bytesToString",function(){return re}),r.d(a,"hextoString",function(){return pe}),r.d(a,"byteArray2hexStr",function(){return ue}),r.d(a,"base64DecodeFromString",function(){return se}),r.d(a,"base64EncodeToString",function(){return Ke}),r.d(a,"hexChar2byte",function(){return Lv}),r.d(a,"isHexChar",function(){return lp}),r.d(a,"hexStr2byteArray",function(){return lo}),r.d(a,"strToDate",function(){return e5}),r.d(a,"isNumber",function(){return jv}),r.d(a,"getStringType",function(){return t5});var c={};r.r(c),r.d(c,"encode58",function(){return zv}),r.d(c,"decode58",function(){return tl});var s={};r.r(s),r.d(s,"keccak256",function(){return Dn}),r.d(s,"sha256",function(){return rl}),r.d(s,"toUtf8Bytes",function(){return ua}),r.d(s,"toUtf8String",function(){return r5}),r.d(s,"recoverAddress",function(){return ol}),r.d(s,"SigningKey",function(){return nl}),r.d(s,"AbiCoder",function(){return al}),r.d(s,"Interface",function(){return o5}),r.d(s,"FormatTypes",function(){return n5}),r.d(s,"splitSignature",function(){return i5}),r.d(s,"joinSignature",function(){return qv}),r.d(s,"arrayify",function(){return a5}),r.d(s,"ethersWallet",function(){return qt.Wallet}),r.d(s,"concat",function(){return Vv}),r.d(s,"id",function(){return s5}),r.d(s,"isValidMnemonic",function(){return c5});var n={};r.r(n),r.d(n,"getBase58CheckAddress",function(){return da}),r.d(n,"decodeBase58Address",function(){return g5}),r.d(n,"signTransaction",function(){return y5}),r.d(n,"arrayToBase64String",function(){return v5}),r.d(n,"signBytes",function(){return b5}),r.d(n,"_signTypedData",function(){return m5}),r.d(n,"getRowBytesFromTransactionBase64",function(){return x5}),r.d(n,"genPriKey",function(){return eb}),r.d(n,"computeAddress",function(){return Ii}),r.d(n,"getAddressFromPriKey",function(){return sl}),r.d(n,"decode58Check",function(){return A5}),r.d(n,"isAddressValid",function(){return w5}),r.d(n,"getBase58CheckAddressFromPriKeyBase64String",function(){return _5}),r.d(n,"getHexStrAddressFromPriKeyBase64String",function(){return C5}),r.d(n,"getAddressFromPriKeyBase64String",function(){return B5}),r.d(n,"getPubKeyFromPriKey",function(){return fa}),r.d(n,"ECKeySign",function(){return gp}),r.d(n,"SHA256",function(){return fo}),r.d(n,"passwordToAddress",function(){return E5}),r.d(n,"pkToAddress",function(){return yp});var i={};r.r(i),r.d(i,"generateAccount",function(){return P5}),r.d(i,"generateRandom",function(){return T5}),r.d(i,"generateAccountWithMnemonic",function(){return S5});var u={};r.r(u),r.d(u,"decodeParams",function(){return O5}),r.d(u,"encodeParams",function(){return I5}),r.d(u,"encodeParamsV2ByABI",function(){return ul}),r.d(u,"decodeParamsV2ByABI",function(){return nb});var l={};r.r(l),r.d(l,"TRON_MESSAGE_PREFIX",function(){return ab}),r.d(l,"hashMessage",function(){return vp}),r.d(l,"signMessage",function(){return k5}),r.d(l,"verifyMessage",function(){return F5});var x={};r.r(x),r.d(x,"txJsonToPb",function(){return fb}),r.d(x,"txPbToTxID",function(){return g_}),r.d(x,"txJsonToPbWithArgs",function(){return pb}),r.d(x,"txCheckWithArgs",function(){return Ap}),r.d(x,"txCheck",function(){return xp});var N=r(1),F=r.n(N),G=r(9),K=r.n(G),te=r(2),ae=r.n(te),ge=r(3),Ce=r.n(ge),Ne=r(15),Pe=r.n(Ne),Se=r(22),Ye=r.n(Se),rt=r(23),Ae=r.n(rt),ce=r(19),ie=r.n(ce),_e=r(4),be=r.n(_e),Oe=r(0),X=r.n(Oe),Ue=r(24),Yt=r.n(Ue);function zt(){var v=this;this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",this.encode=function(m){for(var C,A,O,h,d,f,p,b="",B=0;B<m.length;)h=(C=m.charCodeAt(B++))>>2,d=(3&C)<<4|(A=m.charCodeAt(B++))>>4,f=(15&A)<<2|(O=m.charCodeAt(B++))>>6,p=63&O,isNaN(A)?f=p=64:isNaN(O)&&(p=64),b=b+v._keyStr.charAt(h)+v._keyStr.charAt(d)+v._keyStr.charAt(f)+v._keyStr.charAt(p);return b},this.encodeIgnoreUtf8=function(m){for(var C,A,O,h,d,f,p,b="",B=0;B<m.length;)h=(C=m[B++])>>2,d=(3&C)<<4|(A=m[B++])>>4,f=(15&A)<<2|(O=m[B++])>>6,p=63&O,isNaN(A)?f=p=64:isNaN(O)&&(p=64),b=b+v._keyStr.charAt(h)+v._keyStr.charAt(d)+v._keyStr.charAt(f)+v._keyStr.charAt(p);return b},this.decode=function(m){var C,A,O,h,d,f,p="",b=0;for(m=m.replace(/[^A-Za-z0-9\+\/\=]/g,"");b<m.length;)C=v._keyStr.indexOf(m.charAt(b++))<<2|(h=v._keyStr.indexOf(m.charAt(b++)))>>4,A=(15&h)<<4|(d=v._keyStr.indexOf(m.charAt(b++)))>>2,O=(3&d)<<6|(f=v._keyStr.indexOf(m.charAt(b++))),p+=String.fromCharCode(C),d!=64&&(p+=String.fromCharCode(A)),f!=64&&(p+=String.fromCharCode(O));return v._utf8_decode(p)},this.decodeToByteArray=function(m){var C,A,O,h,d,f,p="",b=0;for(m=m.replace(/[^A-Za-z0-9\+\/\=]/g,"");b<m.length;)C=v._keyStr.indexOf(m.charAt(b++))<<2|(h=v._keyStr.indexOf(m.charAt(b++)))>>4,A=(15&h)<<4|(d=v._keyStr.indexOf(m.charAt(b++)))>>2,O=(3&d)<<6|(f=v._keyStr.indexOf(m.charAt(b++))),p+=String.fromCharCode(C),d!=64&&(p+=String.fromCharCode(A)),f!=64&&(p+=String.fromCharCode(O));return v._out2ByteArray(p)},this._out2ByteArray=function(m){for(var C=new Array(m.length),A=0,O=0;A<m.length;)O=m.charCodeAt(A),C[A]=O,A++;return C},this._utf8_encode=function(m){m=m.replace(/\r\n/g,`
`);for(var C="",A=0;A<m.length;A++){var O=m.charCodeAt(A);O<128?C+=String.fromCharCode(O):O>127&&O<2048?(C+=String.fromCharCode(O>>6|192),C+=String.fromCharCode(63&O|128)):(C+=String.fromCharCode(O>>12|224),C+=String.fromCharCode(O>>6&63|128),C+=String.fromCharCode(63&O|128))}return C},this._utf8_decode=function(m){for(var C="",A=0,O=0,h=0,d=0;A<m.length;)(O=m.charCodeAt(A))<128?(C+=String.fromCharCode(O),A++):O>191&&O<224?(h=m.charCodeAt(A+1),C+=String.fromCharCode((31&O)<<6|63&h),A+=2):(h=m.charCodeAt(A+1),d=m.charCodeAt(A+2),C+=String.fromCharCode((15&O)<<12|(63&h)<<6|63&d),A+=3);return C}}function Z(v){if(typeof v!="number")throw new Error("Input must be a number");if(v<0||v>255)throw new Error("Input must be a byte");var m="";return m+="0123456789ABCDEF".charAt(v>>4),m+="0123456789ABCDEF".charAt(15&v)}function re(v){if(typeof v=="string")return v;for(var m="",C=0;C<v.length;C++){var A=v[C].toString(2),O=A.match(/^1+?(?=0)/);if(O&&A.length===8){for(var h=O[0].length,d=v[C].toString(2).slice(7-h),f=1;f<h;f++)d+=v[f+C].toString(2).slice(2);m+=String.fromCharCode(parseInt(d,2)),C+=h-1}else m+=String.fromCharCode(v[C])}return m}function pe(v){for(var m=v.replace(/^0x/,"").split(""),C="",A=0;A<m.length/2;A++){var O="0x".concat(m[2*A]).concat(m[2*A+1]);C+=String.fromCharCode(O)}return C}function ue(v){for(var m="",C=0;C<v.length;C++)m+=Z(v[C]);return m}function se(v){return new zt().decodeToByteArray(v)}function Ke(v){return new zt().encodeIgnoreUtf8(v)}var xt=r(10),At=r.n(xt),Ct=/^(41)/;function co(v){return re(v)}function uo(v,m,C){if(v.length!=m.length)return!1;var A;for(A=0;A<v.length;A++)if(C){if(v[A]!=m[A])return!1}else if(JSON.stringify(v[A])!=JSON.stringify(m[A]))return!1;return!0}function Q9(v){if(typeof v!="string")throw new Error("The passed string is not a string");var m,C,A=new Array;m=v.length;for(var O=0;O<m;O++)(C=v.charCodeAt(O))>=65536&&C<=1114111?(A.push(C>>18&7|240),A.push(C>>12&63|128),A.push(C>>6&63|128),A.push(63&C|128)):C>=2048&&C<=65535?(A.push(C>>12&15|224),A.push(C>>6&63|128),A.push(63&C|128)):C>=128&&C<=2047?(A.push(C>>6&31|192),A.push(63&C|128)):A.push(255&C);return A}function Lv(v){var m;if(v>="A"&&v<="F"?m=v.charCodeAt(0)-"A".charCodeAt(0)+10:v>="a"&&v<="f"?m=v.charCodeAt(0)-"a".charCodeAt(0)+10:v>="0"&&v<="9"&&(m=v.charCodeAt(0)-"0".charCodeAt(0)),typeof m=="number")return m;throw new Error("The passed hex char is not a valid hex char")}function lp(v){return v>="A"&&v<="F"||v>="a"&&v<="f"||v>="0"&&v<="9"?1:0}function lo(v){var m=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof v!="string")throw new Error("The passed string is not a string");var C=v.length;m&&C%2&&(v="0".concat(v),C++);for(var A=Array(),O=0,h=0,d=0,f=0;f<C;f++){var p=v.charAt(f);if(!lp(p))throw new Error("The passed hex char is not a valid hex string");O<<=4,O+=Lv(p),++h%2==0&&(A[d++]=O,O=0)}return A}function e5(v){if(!/^\d{4}-\d{2}-\d{2}( \d{2}-\d{2}-\d{2}|)/.test(v))throw new Error("The passed date string is not valid");var m=v.split(" "),C=m[0].split("-"),A=parseInt(C[0],10),O=parseInt(C[1],10)-1,h=parseInt(C[2],10);if(m.length>1){var d=m[1].split("-"),f=parseInt(d[0],10),p=parseInt(d[1],10),b=parseInt(d[2],10);return new Date(A,O,h,f,p,b)}return new Date(A,O,h)}function jv(v){return v>="0"&&v<="9"?1:0}function t5(v){if(v==null||typeof v!="string"||v.length==0||v=="")return-1;var m=0;if(v.length==40)for(;m<40&&lp(v.charAt(m));m++);if(m==40)return 1;for(m=0;m<v.length&&jv(v.charAt(m));m++);if(m==v.length)return 2;for(m=0;m<v.length;m++)if(v.charAt(m)>" ")return 3;return-1}for(var dp="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",fp={},el=0;el<dp.length;el++)fp[dp.charAt(el)]=el;function zv(v){if(v.length===0)return"";var m,C,A=[0];for(m=0;m<v.length;m++){for(C=0;C<A.length;C++)A[C]<<=8;A[0]+=v[m];var O=0;for(C=0;C<A.length;++C)A[C]+=O,O=A[C]/58|0,A[C]%=58;for(;O;)A.push(O%58),O=O/58|0}for(m=0;v[m]===0&&m<v.length-1;m++)A.push(0);return A.reverse().map(function(h){return dp[h]}).join("")}function tl(v){if(v.length===0)return[];var m,C,A=[0];for(m=0;m<v.length;m++){var O=v[m];if(!(O in fp))throw new Error("Non-base58 character");for(C=0;C<A.length;C++)A[C]*=58;A[0]+=fp[O];var h=0;for(C=0;C<A.length;++C)A[C]+=h,h=A[C]>>8,A[C]&=255;for(;h;)A.push(255&h),h>>=8}for(m=0;v[m]==="1"&&m<v.length-1;m++)A.push(0);return A.reverse()}var pp=r(18),qt=r(5),Dn=qt.utils.keccak256,rl=qt.utils.sha256,ua=qt.utils.toUtf8Bytes,r5=qt.utils.toUtf8String,ol=qt.utils.recoverAddress,nl=qt.utils.SigningKey,al=qt.utils.AbiCoder,o5=qt.utils.Interface,n5=qt.utils.FormatTypes,a5=qt.utils.arrayify,i5=qt.utils.splitSignature,qv=qt.utils.joinSignature,Vv=qt.utils.concat,s5=qt.utils.id,c5=qt.utils.isValidMnemonic,Yo=r(11),gr=r(6),Wn=r(13),la=r(16),u5=r(25),Bt=new(r(26)).Logger("tronweb/hash/5.4.0");function Gv(v){return st.address.toHex(v)}function Hv(v){return Object(Wn.keccak256)(Object(u5.toUtf8Bytes)(v))}var $v=new Uint8Array(32);$v.fill(0);var l5=Yo.BigNumber.from(-1),Kv=Yo.BigNumber.from(0),Zv=Yo.BigNumber.from(1),d5=Yo.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),f5=Object(gr.hexZeroPad)(Zv.toHexString(),32),p5=Object(gr.hexZeroPad)(Kv.toHexString(),32),Jv={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},hp=["name","version","chainId","verifyingContract","salt"];function Yv(v){return function(m){return typeof m!="string"&&Bt.throwArgumentError("invalid domain value for ".concat(JSON.stringify(v)),"domain.".concat(v),m),m}}var h5={name:Yv("name"),version:Yv("version"),chainId:function(v){try{return Yo.BigNumber.from(v).toString()}catch{}return Bt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",v)},verifyingContract:function(v){try{return Gv(v).toLowerCase()}catch{}return Bt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",v)},salt:function(v){try{var m=Object(gr.arrayify)(v);if(m.length!==32)throw new Error("bad length");return Object(gr.hexlify)(m)}catch{}return Bt.throwArgumentError('invalid domain value "salt"',"domain.salt",v)}};function il(v){var m=v.match(/^(u?)int(\d*)$/);if(m){var C=m[1]==="",A=parseInt(m[2]||"256");(A%8!=0||A>256||m[2]&&m[2]!==String(A))&&Bt.throwArgumentError("invalid numeric width","type",v);var O=d5.mask(C?A-1:A),h=C?O.add(Zv).mul(l5):Kv;return function(p){var b=Yo.BigNumber.from(p);return(b.lt(h)||b.gt(O))&&Bt.throwArgumentError("value out-of-bounds for ".concat(v),"value",p),Object(gr.hexZeroPad)(b.toTwos(256).toHexString(),32)}}var d=v.match(/^bytes(\d+)$/);if(d){var f=parseInt(d[1]);return(f===0||f>32||d[1]!==String(f))&&Bt.throwArgumentError("invalid bytes width","type",v),function(p){return Object(gr.arrayify)(p).length!==f&&Bt.throwArgumentError("invalid length for ".concat(v),"value",p),function(b){var B=Object(gr.arrayify)(b),D=B.length%32;return D?Object(gr.hexConcat)([B,$v.slice(D)]):Object(gr.hexlify)(B)}(p)}}switch(v){case"trcToken":return il("uint256");case"address":return function(p){return Object(gr.hexZeroPad)((b=p,st.address.toHex(b).replace(Ct,"0x")),32);var b};case"bool":return function(p){return p?f5:p5};case"bytes":return function(p){return Object(Wn.keccak256)(p)};case"string":return function(p){return Hv(p)}}return null}function Xv(v,m){return"".concat(v,"(").concat(m.map(function(C){var A=C.name;return C.type+" "+A}).join(","),")")}var Qv=function(){function v(m){ae()(this,v),Object(la.defineReadOnly)(this,"types",Object.freeze(Object(la.deepCopy)(m))),Object(la.defineReadOnly)(this,"_encoderCache",{}),Object(la.defineReadOnly)(this,"_types",{});var C={},A={},O={};Object.keys(m).forEach(function(B){C[B]={},A[B]=[],O[B]={}});var h=function(B){var D={};m[B].forEach(function(J){D[J.name]&&Bt.throwArgumentError("duplicate variable name ".concat(JSON.stringify(J.name)," in ").concat(JSON.stringify(B)),"types",m),D[J.name]=!0;var Q=J.type.match(/^([^\x5b]*)(\x5b|$)/)[1];Q===B&&Bt.throwArgumentError("circular type reference to ".concat(JSON.stringify(Q)),"types",m),il(Q)||(A[Q]||Bt.throwArgumentError("unknown type ".concat(JSON.stringify(Q)),"types",m),A[Q].push(B),C[B][Q]=!0)})};for(var d in m)h(d);var f=Object.keys(A).filter(function(B){return A[B].length===0});for(var p in f.length===0?Bt.throwArgumentError("missing primary type","types",m):f.length>1&&Bt.throwArgumentError("ambiguous primary types or unused types: ".concat(f.map(function(B){return JSON.stringify(B)}).join(", ")),"types",m),Object(la.defineReadOnly)(this,"primaryType",f[0]),function B(D,J){J[D]&&Bt.throwArgumentError("circular type reference to ".concat(JSON.stringify(D)),"types",m),J[D]=!0,Object.keys(C[D]).forEach(function(Q){A[Q]&&(B(Q,J),Object.keys(J).forEach(function(ne){O[ne][Q]=!0}))}),delete J[D]}(this.primaryType,{}),O){var b=Object.keys(O[p]);b.sort(),this._types[p]=Xv(p,m[p])+b.map(function(B){return Xv(B,m[B])}).join("")}}return Ce()(v,[{key:"getEncoder",value:function(m){var C=this._encoderCache[m];return C||(C=this._encoderCache[m]=this._getEncoder(m)),C}},{key:"_getEncoder",value:function(m){var C=this,A=il(m);if(A)return A;var O=m.match(/^(.*)(\x5b(\d*)\x5d)$/);if(O){var h=O[1],d=this.getEncoder(h),f=parseInt(O[3]);return function(B){f>=0&&B.length!==f&&Bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",B);var D=B.map(d);return C._types[h]&&(D=D.map(Wn.keccak256)),Object(Wn.keccak256)(Object(gr.hexConcat)(D))}}var p=this.types[m];if(p){var b=Hv(this._types[m]);return function(B){var D=p.map(function(J){var Q=J.name,ne=J.type,he=C.getEncoder(ne)(B[Q]);return C._types[ne]?Object(Wn.keccak256)(he):he});return D.unshift(b),Object(gr.hexConcat)(D)}}return Bt.throwArgumentError("unknown type: ".concat(m),"type",m)}},{key:"encodeType",value:function(m){var C=this._types[m];return C||Bt.throwArgumentError("unknown type: ".concat(JSON.stringify(m)),"name",m),C}},{key:"encodeData",value:function(m,C){return this.getEncoder(m)(C)}},{key:"hashStruct",value:function(m,C){return Object(Wn.keccak256)(this.encodeData(m,C))}},{key:"encode",value:function(m){return this.encodeData(this.primaryType,m)}},{key:"hash",value:function(m){return this.hashStruct(this.primaryType,m)}},{key:"_visit",value:function(m,C,A){var O=this;if(il(m))return A(m,C);var h=m.match(/^(.*)(\x5b(\d*)\x5d)$/);if(h){var d=h[1],f=parseInt(h[3]);return f>=0&&C.length!==f&&Bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",C),C.map(function(b){return O._visit(d,b,A)})}var p=this.types[m];return p?p.reduce(function(b,B){var D=B.name,J=B.type;return b[D]=O._visit(J,C[D],A),b},{}):Bt.throwArgumentError("unknown type: ".concat(m),"type",m)}},{key:"visit",value:function(m,C){return this._visit(this.primaryType,m,C)}}],[{key:"from",value:function(m){return new v(m)}},{key:"getPrimaryType",value:function(m){return v.from(m).primaryType}},{key:"hashStruct",value:function(m,C,A){return v.from(C).hashStruct(m,A)}},{key:"hashDomain",value:function(m){var C=[];for(var A in m){var O=Jv[A];O||Bt.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(A)),"domain",m),C.push({name:A,type:O})}return C.sort(function(h,d){return hp.indexOf(h.name)-hp.indexOf(d.name)}),v.hashStruct("EIP712Domain",{EIP712Domain:C},m)}},{key:"encode",value:function(m,C,A){return Object(gr.hexConcat)(["0x1901",v.hashDomain(m),v.from(C).hash(A)])}},{key:"hash",value:function(m,C,A){return Object(Wn.keccak256)(v.encode(m,C,A))}},{key:"getPayload",value:function(m,C,A){v.hashDomain(m);var O={},h=[];hp.forEach(function(p){var b=m[p];b!=null&&(O[p]=h5[p](b),h.push({name:p,type:Jv[p]}))});var d=v.from(C),f=Object(la.shallowCopy)(C);return f.EIP712Domain?Bt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",C):f.EIP712Domain=h,d.encode(A),{types:f,domain:O,primaryType:d.primaryType,message:d.visit(A,function(p,b){if(p.match(/^bytes(\d*)/))return Object(gr.hexlify)(Object(gr.arrayify)(b));if(p.match(/^u?int/))return Yo.BigNumber.from(b).toString();switch(p){case"trcToken":return Yo.BigNumber.from(b).toString();case"address":return Gv(b).toLowerCase();case"bool":return!!b;case"string":return typeof b!="string"&&Bt.throwArgumentError("invalid string","value",b),b}return Bt.throwArgumentError("unsupported type","type",p)})}}}]),v}();function da(v){var m=fo(v),C=fo(m).slice(0,4);return zv(C=v.concat(C))}function g5(v){if(typeof v!="string"||v.length<=4)return!1;var m=tl(v);if(v.length<=4)return!1;var C=m.length-4,A=m.slice(C),O=fo(m=m.slice(0,C)),h=fo(O).slice(0,4);if(A[0]==h[0]&&A[1]==h[1]&&A[2]==h[2]&&A[3]==h[3])return m;throw new Error("Invalid address provided")}function y5(v,m){typeof v=="string"&&(v=lo(v));var C=gp(lo(m.txID),v);return Array.isArray(m.signature)?m.signature.includes(C)||m.signature.push(C):m.signature=[C],m}function v5(v){return btoa(String.fromCharCode.apply(String,At()(v)))}function b5(v,m){return typeof v=="string"&&(v=lo(v)),gp(fo(m),v)}function m5(v,m,C,A){var O=new nl({toHexString:function(){return"0x"+A},value:A}),h=Qv.hash(v,m,C),d=O.signDigest(h);return["0x",d.r.substring(2),d.s.substring(2),Number(d.v).toString(16)].join("")}function x5(v){var m=se(v);return proto.protocol.Transaction.deserializeBinary(m).getRawData().serializeBinary()}function eb(){for(var v=new pp.ec("secp256k1").genKeyPair().getPrivate().toString("hex");v.length<64;)v="0".concat(v);return lo(v)}function Ii(v){return v.length===65&&(v=v.slice(1)),lo("41"+Dn(v).toString().substring(2).substring(24))}function sl(v){return Ii(fa(v))}function A5(v){var m=tl(v);if(m.length<=4)return!1;var C=m.slice(0,m.length-4),A=fo(C),O=fo(A);return O[0]===m[C.length]&&O[1]===m[C.length+1]&&O[2]===m[C.length+2]&&O[3]===m[C.length+3]&&C}function w5(v){if(typeof v!="string"||v.length!==34)return!1;var m=tl(v);if(m.length!==25||m[0]!==65)return!1;var C=m.slice(21),A=fo(m=m.slice(0,21)),O=fo(A).slice(0,4);return C[0]==O[0]&&C[1]==O[1]&&C[2]==O[2]&&C[3]==O[3]}function _5(v){return da(Ii(fa(se(v))))}function C5(v){return ue(Ii(fa(se(v))))}function B5(v){return Ke(Ii(fa(se(v))))}function fa(v){for(var m=new pp.ec("secp256k1").keyFromPrivate(v,"bytes").getPublic(),C=m.x,A=m.y,O=C.toString("hex");O.length<64;)O="0".concat(O);for(var h=A.toString("hex");h.length<64;)h="0".concat(h);return lo("04".concat(O).concat(h))}function gp(v,m){for(var C=new pp.ec("secp256k1").keyFromPrivate(m,"bytes").sign(v),A=C.r,O=C.s,h=C.recoveryParam,d=A.toString("hex");d.length<64;)d="0".concat(d);for(var f=O.toString("hex");f.length<64;)f="0".concat(f);return d+f+Z(h)}function fo(v){var m=ue(v);return lo(rl("0x"+m).replace(/^0x/,""))}function E5(v){return da(sl(se(v)))}function yp(v){var m=arguments.length>1&&arguments[1]!==void 0&&arguments[1],C=lo(v,m),A=sl(C);return da(A)}function P5(){var v=eb(),m=fa(v),C=sl(v);return{privateKey:ue(v),publicKey:ue(m),address:{base58:da(C),hex:ue(C)}}}function T5(v){if(S.isObject(v)||(v={}),v.path||(v.path="m/44'/195'/0'/0/0"),!String(v.path).match(/^m\/44\'\/195\'/))throw new Error("Invalid tron path provided");var m=qt.Wallet.createRandom(v);return{mnemonic:m.mnemonic,privateKey:m.privateKey,publicKey:m.publicKey,address:yp(m.privateKey.replace(/^0x/,""))}}function S5(v,m){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"en";if(m||(m="m/44'/195'/0'/0/0"),!String(m).match(/^m\/44\'\/195\'/))throw new Error("Invalid tron path provided");var A=qt.Wallet.fromMnemonic(v,m,C),O={mnemonic:A.mnemonic,privateKey:A.privateKey,publicKey:A.publicKey,address:yp(A.privateKey.replace(/^0x/,""))};return O}var cl=new al;function tb(v){return st.address.toHex(v).replace(Ct,"0x")}function rb(v){if(Object.prototype.toString.call(v)!=="[object Object]"&&Object.prototype.toString.call(v)!=="[object Array]")return v;var m,C=(m=v,Array.isArray(m)?[]:{});return Object.keys(v).forEach(function(A){return C[A]=v[A]instanceof Object&&!v[A]._isBigNumber?rb(v[A]):v[A]}),C}function O5(v,m,C,A){if(C&&typeof C!="boolean"||(A=C,C=m,m=v,v=[]),A&&C.replace(/^0x/,"").length%64==8&&(C="0x"+C.replace(/^0x/,"").substring(8)),C.replace(/^0x/,"").length%64)throw new Error("The encoded string is not valid. Its length must be a multiple of 64.");return m=m.map(function(O){return/trcToken/.test(O)&&(O=O.replace(/trcToken/,"uint256")),O}),cl.decode(m,C).reduce(function(O,h,d){return m[d]=="address"&&(h="41"+h.substr(2).toLowerCase()),v.length?O[v[d]]=h:O.push(h),O},v.length?{}:[])}function I5(v,m){for(var C=0;C<v.length;C++)v[C]==="address"&&(m[C]=st.address.toHex(m[C]).replace(Ct,"0x"));return cl.encode(v,m)}function ki(v){var m=v.match(/([a-zA-Z0-9])(\[.*\])/);return m?m[2]:""}function ob(v){return(ki(v).match(/\]\[/g)||[]).length+1}function ul(v,m){var C=[],A=function b(B){if(B&&B.type.indexOf("tuple")===0&&B.components){var D=B.components.map(function(J){return b(J)});return"tuple(".concat(D.join(","),")").concat(ki(B.type))}return/trcToken/.test(B.type)?B.type.replace(/trcToken/,"uint256"):B.type},O=function b(B){return Array.isArray(B)?(B.forEach(function(D,J){B[J]=b(D)}),B):tb(B)},h=function b(B,D,J){J>1?D.length&&D.forEach(function(Q){b(B,Q,J-1)}):D.length&&J&&D.forEach(function(Q){d(B,Q)})},d=function b(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],D=arguments.length>1?arguments[1]:void 0;B.length&&B.forEach(function(J,Q){var ne=J.type;if(D[Q]){if(ne==="address")D[Q]=tb(D[Q]);else if(ne.match(/^([^\x5b]*)(\x5b|$)/)[0]==="address[")O(D[Q]);else if(ne.indexOf("tuple")===0)if(ki(ne)){var he=ob(ne);h(J.components,D[Q],he)}else b(J.components,D[Q])}})};if(v.inputs&&v.inputs.length)for(var f=0;f<v.inputs.length;f++){var p=v.inputs[f].type;p==="bool"&&m[f]==="false"&&(m[f]=!1),C.push(p.indexOf("tuple")===0?A(v.inputs[f]):p),m.length<C.length&&m.push("")}return d(v.inputs,m),function(b){for(var B=0;B<b.length;B++){var D=b[B];/trcToken/.test(D)&&(b[B]=D.replace(/trcToken/,"uint256"))}}(C),cl.encode(C,m)}function nb(v,m){var C=function D(J){return Array.isArray(J)?(J.forEach(function(Q,ne){J[ne]=D(Q)}),J):st.address.toHex(J)},A=function D(J,Q,ne){ne>1?Q.length&&Q.forEach(function(he){D(J,he,ne-1)}):Q.length&&ne&&Q.forEach(function(he){h(J,he)})},O=function D(J){var Q=J.name?" ".concat(J.name):"";if(J&&J.type.indexOf("tuple")===0&&J.components){var ne=J.components.map(function(he){return D(he)});return"tuple(".concat(ne.join(","),")").concat(ki(J.type)).concat(Q)}return/trcToken/.test(J.type)?J.type.replace(/trcToken/,"uint256")+Q:J.type+Q},h=function D(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Q=arguments.length>1?arguments[1]:void 0;J.length&&J.forEach(function(ne,he){var Te=ne.type,ke=ne.name;if(Q[he]){if(Te==="address")Q[he]=st.address.toHex(Q[he]),ke&&(Q[ke]=st.address.toHex(Q[ke]));else if(Te.match(/^([^\x5b]*)(\x5b|$)/)[0]==="address[")C(Q[he]),ke&&C(Q[ke]);else if(Te.indexOf("tuple")===0){if(ki(Te)){var E=ob(Te);A(ne.components,Q[he],E)}else D(ne.components,Q[he]);ke&&(Q[ke]=Q[he])}}})};if(v.outputs&&v.outputs.length>0){for(var d=[],f=0;f<v.outputs.length;f++){var p=v.outputs[f].type,b=v.outputs[f].name?" ".concat(v.outputs[f].name):"";d.push(p.indexOf("tuple")===0?O(v.outputs[f]):p+b)}(function(D){for(var J=0;J<D.length;J++){var Q=D[J];/^trcToken/.test(Q)&&(D[J]=Q.replace(/^trcToken/,"uint256"))}})(d),m&&m.length||(m=new Uint8Array(32*v.outputs.length));var B=rb(cl.decode(d,m));return h(v.outputs,B),B}return[]}var ab=`TRON Signed Message:
`;function vp(v){return typeof v=="string"&&(v=ua(v)),Dn(Vv([ua(ab),ua(String(v.length)),v]))}function k5(v,m){m.match(/^0x/)||(m="0x"+m);var C=new nl(m),A=vp(v),O=C.signDigest(A);return qv(O)}function F5(v,m){return m.match(/^0x/)||(m="0x"+m),da(lo(ol(vp(v),m).replace(/^0x/,"41")))}function ib(v,m){var C=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);m&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),C.push.apply(C,A)}return C}function sb(v){for(var m=1;m<arguments.length;m++){var C=arguments[m]!=null?arguments[m]:{};m%2?ib(Object(C),!0).forEach(function(A){be()(v,A,C[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(C)):ib(Object(C)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(C,A))})}return v}var R5=r(32),bp=r(20),Qe=bp.Transaction,M5=bp.Permission,N5=bp.Key,Oo=r(34),D5=Oo.TransferContract,W5=Oo.FreezeBalanceContract,U5=Oo.UnfreezeBalanceContract,L5=Oo.WithdrawBalanceContract,j5=Oo.FreezeBalanceV2Contract,z5=Oo.UnfreezeBalanceV2Contract,q5=Oo.WithdrawExpireUnfreezeContract,V5=Oo.DelegateResourceContract,G5=Oo.UnDelegateResourceContract,ll=r(35),H5=ll.TransferAssetContract,$5=ll.ParticipateAssetIssueContract,cb=ll.AssetIssueContract,K5=ll.UpdateAssetContract,pa=r(36),Z5=pa.TriggerSmartContract,J5=pa.ClearABIContract,Y5=pa.UpdateEnergyLimitContract,X5=pa.UpdateSettingContract,Q5=pa.CreateSmartContract,ha=pa.SmartContract,ga=r(21).ResourceCode,ub=r(37),e_=ub.WitnessCreateContract,lb=ub.VoteWitnessContract,t_=r(38).UpdateBrokerageContract,dl=r(39),r_=dl.AccountCreateContract,o_=dl.AccountUpdateContract,n_=dl.SetAccountIdContract,a_=dl.AccountPermissionUpdateContract,mp=r(40),i_=mp.ProposalCreateContract,s_=mp.ProposalDeleteContract,c_=mp.ProposalApproveContract,fl=r(41),u_=fl.ExchangeCreateContract,l_=fl.ExchangeInjectContract,d_=fl.ExchangeWithdrawContract,f_=fl.ExchangeTransactionContract,Be=function(v){return v&&v.length!==0?new Uint8Array(st.address.toHex(v).match(/.{1,2}/g).map(function(m){return parseInt(m,16)})):new Uint8Array([])},it=function(v,m,C,A){var O=new R5.Any;O.pack(v.serializeBinary(),"protocol."+C);var h=new Qe.Contract;h.setType(m),h.setParameter(O),A&&h.setPermissionId(A);var d=new Qe.raw;d.addContract(h);var f=new Qe;return f.setRawData(d),f},p_=function(v,m){var C=new Z5,A=v.owner_address,O=v.contract_address,h=v.parameter,d=h===void 0?"":h,f=v.function_selector,p=v.call_value,b=v.call_token_value,B=v.token_id,D=v.data;if(C.setOwnerAddress(Be(A)),C.setContractAddress(Be(O)),C.setCallValue(p),D)C.setData(Be(D));else if(f){var J=function(Q){var ne=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return(ne?"0x":"")+Dn(k.Buffer.from(Q,"utf-8")).toString().substring(2)}(f).substring(2,10)+d;C.setData(Be(J))}return B&&C.setTokenId(B),b&&C.setCallTokenValue(b),it(C,Qe.Contract.ContractType.TRIGGERSMARTCONTRACT,"TriggerSmartContract",m.Permission_id)},h_=function(v,m){var C=new a_,A=v.owner_address,O=v.owner,h=v.witness,d=v.actives;C.setOwnerAddress(Be(A));var f=function(p){var b=new M5,B=p.type,D=p.id,J=p.permission_name,Q=p.threshold,ne=p.parentId,he=p.operations,Te=p.keys;return b.setType(function(ke){return isNaN(ke)?ke==="Active"?2:ke==="Witness"?1:0:ke}(B)),b.setId(D),b.setPermissionName(J),b.setThreshold(Q),ne&&b.setParentId(ne),he&&b.setOperations(Be(he)),Te&&b.setKeysList(Te.map(function(ke){var E=new N5;return E.setAddress(Be(ke.address)),E.setWeight(ke.weight),E})),b};return O&&C.setOwner(f(O)),h&&C.setWitness(f(h)),d&&(Array.isArray(d)?C.setActivesList(d.map(function(p){return f(p)})):C.setActivesList([f(d)])),it(C,Qe.Contract.ContractType.ACCOUNTPERMISSIONUPDATECONTRACT,"AccountPermissionUpdateContract",m.Permission_id)},db=function(v,m,C){switch(v.type){case"TransferContract":return function(A,O){var h=A.to_address,d=A.owner_address,f=A.amount,p=new D5;return p.setToAddress(Be(h)),p.setOwnerAddress(Be(d)),p.setAmount(f),it(p,Qe.Contract.ContractType.TRANSFERCONTRACT,"TransferContract",O.Permission_id)}(m,C);case"TransferAssetContract":return function(A,O){var h=A.to_address,d=A.owner_address,f=A.amount,p=A.asset_name,b=new H5;return b.setToAddress(Be(h)),b.setOwnerAddress(Be(d)),b.setAssetName(Be(p.replace(/^0x/,""))),b.setAmount(f),it(b,Qe.Contract.ContractType.TRANSFERASSETCONTRACT,"TransferAssetContract",O.Permission_id)}(m,C);case"ParticipateAssetIssueContract":return function(A,O){var h=new $5;return h.setToAddress(Be(A.to_address)),h.setOwnerAddress(Be(A.owner_address)),h.setAssetName(Be(A.asset_name.replace(/^0x/,""))),h.setAmount(A.amount),it(h,Qe.Contract.ContractType.PARTICIPATEASSETISSUECONTRACT,"ParticipateAssetIssueContract",O.Permission_id)}(m,C);case"TriggerSmartContract":return p_(m,C);case"FreezeBalanceContract":return function(A,O){var h=new W5,d=A.owner_address,f=A.frozen_balance,p=A.frozen_duration,b=A.resource,B=A.receiver_address;return h.setOwnerAddress(Be(d)),h.setFrozenBalance(f),h.setFrozenDuration(p),b&&h.setResource(ga[b]),B&&h.setReceiverAddress(Be(B)),it(h,Qe.Contract.ContractType.FREEZEBALANCECONTRACT,"FreezeBalanceContract",O.Permission_id)}(m,C);case"UnfreezeBalanceContract":return function(A,O){var h=new U5,d=A.owner_address,f=A.resource,p=A.receiver_address;return h.setOwnerAddress(Be(d)),f&&h.setResource(ga[f]),p&&h.setReceiverAddress(Be(p)),it(h,Qe.Contract.ContractType.UNFREEZEBALANCECONTRACT,"UnfreezeBalanceContract",O.Permission_id)}(m,C);case"WithdrawBalanceContract":return function(A,O){var h=new L5,d=A.owner_address;return h.setOwnerAddress(Be(d)),it(h,Qe.Contract.ContractType.WITHDRAWBALANCECONTRACT,"WithdrawBalanceContract",O.Permission_id)}(m,C);case"FreezeBalanceV2Contract":return function(A,O){var h=new j5,d=A.owner_address,f=A.frozen_balance,p=A.resource;return h.setOwnerAddress(Be(d)),h.setFrozenBalance(f),h.setResource(ga[p]),it(h,Qe.Contract.ContractType.FREEZEBALANCEV2CONTRACT,"FreezeBalanceV2Contract",O.Permission_id)}(m,C);case"UnfreezeBalanceV2Contract":return function(A,O){var h=new z5,d=A.owner_address,f=A.unfreeze_balance,p=A.resource;return h.setOwnerAddress(Be(d)),h.setUnfreezeBalance(f),h.setResource(ga[p]),it(h,Qe.Contract.ContractType.UNFREEZEBALANCEV2CONTRACT,"UnfreezeBalanceV2Contract",O.Permission_id)}(m,C);case"DelegateResourceContract":return function(A,O){var h=new V5,d=A.owner_address,f=A.receiver_address,p=A.balance,b=A.resource,B=A.lock,D=B!==void 0&&B;return h.setOwnerAddress(Be(d)),h.setBalance(p),h.setResource(ga[b]),h.setLock(D),h.setReceiverAddress(Be(f)),it(h,Qe.Contract.ContractType.DELEGATERESOURCECONTRACT,"DelegateResourceContract",O.Permission_id)}(m,C);case"UnDelegateResourceContract":return function(A,O){var h=new G5,d=A.owner_address,f=A.receiver_address,p=A.balance,b=A.resource;return h.setOwnerAddress(Be(d)),h.setBalance(p),h.setResource(ga[b]),h.setReceiverAddress(Be(f)),it(h,Qe.Contract.ContractType.UNDELEGATERESOURCECONTRACT,"UnDelegateResourceContract",O.Permission_id)}(m,C);case"WithdrawExpireUnfreezeContract":return function(A,O){var h=new q5,d=A.owner_address;return h.setOwnerAddress(Be(d)),it(h,Qe.Contract.ContractType.WITHDRAWEXPIREUNFREEZECONTRACT,"WithdrawExpireUnfreezeContract",O.Permission_id)}(m,C);case"WitnessCreateContract":return function(A,O){var h=new e_,d=A.owner_address,f=A.url;return h.setOwnerAddress(Be(d)),h.setUrl(Be(f.replace(/^0x/,""))),it(h,Qe.Contract.ContractType.WITNESSCREATECONTRACT,"WitnessCreateContract",O.Permission_id)}(m,C);case"VoteWitnessContract":return function(A,O){var h=new lb,d=A.owner_address,f=A.votes;return h.setOwnerAddress(Be(d)),f.forEach(function(p){var b=new lb.Vote,B=p.vote_address,D=p.vote_count;b.setVoteAddress(Be(B));var J=parseInt(D);b.setVoteCount(J),h.addVotes(b)}),it(h,Qe.Contract.ContractType.VOTEWITNESSCONTRACT,"VoteWitnessContract",O.Permission_id)}(m,C);case"CreateSmartContract":return function(A,O){var h=A!=null&&A.new_contract?sb(sb({},{owner_address:A.owner_address,call_token_value:A.call_token_value,token_id:A.token_id}),A.new_contract):A,d=h.owner_address,f=h.consume_user_resource_percent,p=h.origin_energy_limit,b=h.abi,B=h.bytecode,D=B===void 0?"":B,J=h.name,Q=h.parameter,ne=Q===void 0?"":Q,he=h.call_value,Te=h.call_token_value,ke=h.token_id,E=h.origin_address,w=new Q5;w.setOwnerAddress(Be(d)),ke&&w.setTokenId(ke),Te&&w.setCallTokenValue(Te);var _=new ha;if(b){var T;T=typeof b=="string"?JSON.parse(b):b?.entrys||[];var P=new ha.ABI,I=function(q){var U=new ha.ABI.Entry.Param,z=q.indexed,$=q.name,j=q.type;return z===!0&&U.setIndexed(!0),U.setName($),U.setType(j),U},L=T.map(function(q){var U=q.anonymous,z=q.constant,$=q.name,j=q.inputs,Y=q.outputs,le=q.type,me=q.payable,ot=q.stateMutability,fe=new ha.ABI.Entry;return fe.setAnonymous(U),fe.setConstant(z),fe.setName($),j&&fe.setInputsList(j.map(function(Er){return I(Er)})),Y&&fe.setOutputsList(Y.map(function(Er){return I(Er)})),le&&fe.setType(ha.ABI.Entry.EntryType[le.toUpperCase()]),fe.setPayable(me),ot&&fe.setStatemutability(ha.ABI.Entry.StateMutabilityType[ot.toUpperCase()]),fe});P.setEntrysList(L),_.setAbi(P)}if(he&&_.setCallValue(he),_.setConsumeUserResourcePercent(f),_.setOriginEnergyLimit(p),E||(E=d),_.setOriginAddress(Be(E)),D){var V=D.replace(/^0x/,"")+ne.replace(/^0x/,"");_.setBytecode(Be(V))}return _.setName(J),w.setNewContract(_),it(w,Qe.Contract.ContractType.CREATESMARTCONTRACT,"CreateSmartContract",O.Permission_id)}(m,C);case"ClearABIContract":return function(A,O){var h=A.contract_address,d=A.owner_address,f=new J5;return f.setOwnerAddress(Be(d)),f.setContractAddress(Be(h)),it(f,Qe.Contract.ContractType.CLEARABICONTRACT,"ClearABIContract")}(m);case"UpdateBrokerageContract":return function(A,O){var h=A.brokerage,d=A.owner_address,f=new t_;return f.setOwnerAddress(Be(d)),f.setBrokerage(h),it(f,Qe.Contract.ContractType.UPDATEBROKERAGECONTRACT,"UpdateBrokerageContract")}(m);case"AssetIssueContract":return function(A,O){var h=A.owner_address,d=A.name,f=A.abbr,p=A.description,b=A.url,B=A.total_supply,D=A.trx_num,J=A.num,Q=A.start_time,ne=A.end_time,he=A.precision,Te=A.free_asset_net_limit,ke=A.public_free_asset_net_limit,E=A.public_free_asset_net_usage,w=E===void 0?0:E,_=A.public_latest_free_net_time,T=_===void 0?0:_,P=A.vote_score,I=P===void 0?0:P,L=A.frozen_supply,V=new cb;if(V.setOwnerAddress(Be(h)),d&&V.setName(Be(d.replace(/^0x/,""))),f&&V.setAbbr(Be(f.replace(/^0x/,""))),V.setTotalSupply(B),V.setNum(J),V.setEndTime(ne),V.setStartTime(Q),V.setTrxNum(D),V.setVoteScore(I),he&&V.setPrecision(he),T&&V.setPublicLatestFreeNetTime(T),p&&V.setDescription(Be(p.replace(/^0x/,""))),b&&V.setUrl(Be(b.replace(/^0x/,""))),V.setPublicFreeAssetNetUsage(w),V.setFreeAssetNetLimit(Te),V.setPublicFreeAssetNetLimit(ke),L){var q=new cb.FrozenSupply;q.setFrozenAmount(L.length?L[0].frozen_amount:L.frozen_amount),q.setFrozenDays(L.length?L[0].frozen_days:L.frozen_days),V.addFrozenSupply(q)}return it(V,Qe.Contract.ContractType.ASSETISSUECONTRACT,"AssetIssueContract",O.Permission_id)}(m,C);case"AccountCreateContract":return function(A,O){var h=new r_,d=A.account_address,f=A.owner_address;return h.setOwnerAddress(Be(f)),h.setAccountAddress(Be(d.replace(/^0x/,""))),it(h,Qe.Contract.ContractType.ACCOUNTCREATECONTRACT,"AccountCreateContract",O.Permission_id)}(m,C);case"AccountUpdateContract":return function(A,O){var h=new o_,d=A.account_name,f=A.owner_address;return h.setOwnerAddress(Be(f)),h.setAccountName(Be(d.replace(/^0x/,""))),it(h,Qe.Contract.ContractType.ACCOUNTUPDATECONTRACT,"AccountUpdateContract",O.Permission_id)}(m,C);case"SetAccountIdContract":return function(A,O){var h=new n_,d=A.account_id,f=A.owner_address;return h.setOwnerAddress(Be(f)),h.setAccountId(Be(d.replace(/^0x/,""))),it(h,Qe.Contract.ContractType.SETACCOUNTIDCONTRACT,"SetAccountIdContract",O.Permission_id)}(m,C);case"ProposalCreateContract":return function(A,O){var h=new i_,d=A.owner_address,f=A.parameters;return h.setOwnerAddress(Be(d)),f.forEach(function(p){h.getParametersMap().set(p.key,p.value)}),it(h,Qe.Contract.ContractType.PROPOSALCREATECONTRACT,"ProposalCreateContract",O.Permission_id)}(m,C);case"ProposalDeleteContract":return function(A,O){var h=new s_,d=A.owner_address,f=A.proposal_id;return h.setOwnerAddress(Be(d)),h.setProposalId(f),it(h,Qe.Contract.ContractType.PROPOSALDELETECONTRACT,"ProposalDeleteContract",O.Permission_id)}(m,C);case"ProposalApproveContract":return function(A,O){var h=new c_,d=A.owner_address,f=A.proposal_id,p=A.is_add_approval;return h.setOwnerAddress(Be(d)),h.setProposalId(f),h.setIsAddApproval(p),it(h,Qe.Contract.ContractType.PROPOSALAPPROVECONTRACT,"ProposalApproveContract",O.Permission_id)}(m,C);case"ExchangeCreateContract":return function(A,O){var h=new u_,d=A.owner_address,f=A.first_token_id,p=A.first_token_balance,b=A.second_token_id,B=A.second_token_balance;return h.setOwnerAddress(Be(d)),h.setFirstTokenId(Be(f.replace(/^0x/,""))),h.setFirstTokenBalance(p),h.setSecondTokenId(Be(b.replace(/^0x/,""))),h.setSecondTokenBalance(B),it(h,Qe.Contract.ContractType.EXCHANGECREATECONTRACT,"ExchangeCreateContract",O.Permission_id)}(m,C);case"ExchangeInjectContract":return function(A,O){var h=new l_,d=A.owner_address,f=A.exchange_id,p=A.token_id,b=A.quant;return h.setOwnerAddress(Be(d)),h.setExchangeId(f),h.setTokenId(Be(p.replace(/^0x/,""))),h.setQuant(b),it(h,Qe.Contract.ContractType.EXCHANGEINJECTCONTRACT,"ExchangeInjectContract",O.Permission_id)}(m,C);case"ExchangeWithdrawContract":return function(A,O){var h=new d_,d=A.owner_address,f=A.exchange_id,p=A.token_id,b=A.quant;return h.setOwnerAddress(Be(d)),h.setExchangeId(f),h.setTokenId(Be(p.replace(/^0x/,""))),h.setQuant(b),it(h,Qe.Contract.ContractType.EXCHANGEWITHDRAWCONTRACT,"ExchangeWithdrawContract",O.Permission_id)}(m,C);case"ExchangeTransactionContract":return function(A,O){var h=new f_,d=A.owner_address,f=A.exchange_id,p=A.token_id,b=A.quant,B=A.expected;return h.setOwnerAddress(Be(d)),h.setExchangeId(f),h.setTokenId(Be(p.replace(/^0x/,""))),h.setQuant(b),h.setExpected(B),it(h,Qe.Contract.ContractType.EXCHANGETRANSACTIONCONTRACT,"ExchangeTransactionContract",O.Permission_id)}(m,C);case"UpdateSettingContract":return function(A,O){var h=new X5,d=A.owner_address,f=A.contract_address,p=A.consume_user_resource_percent;return h.setOwnerAddress(Be(d)),h.setContractAddress(Be(f)),h.setConsumeUserResourcePercent(p),it(h,Qe.Contract.ContractType.UPDATESETTINGCONTRACT,"UpdateSettingContract",O.Permission_id)}(m,C);case"UpdateEnergyLimitContract":return function(A,O){var h=new Y5,d=A.owner_address,f=A.contract_address,p=A.origin_energy_limit;return h.setOwnerAddress(Be(d)),h.setContractAddress(Be(f)),h.setOriginEnergyLimit(p),it(h,Qe.Contract.ContractType.UPDATEENERGYLIMITCONTRACT,"UpdateEnergyLimitContract",O.Permission_id)}(m,C);case"AccountPermissionUpdateContract":return h_(m,C);case"UpdateAssetContract":return function(A,O){var h=new K5,d=A.owner_address,f=A.description,p=A.url,b=A.new_limit,B=A.new_public_limit;return h.setOwnerAddress(Be(d)),f&&h.setDescription(Be(f.replace(/^0x/,""))),p&&h.setUrl(Be(p.replace(/^0x/,""))),b&&h.setNewLimit(b),B&&h.setNewPublicLimit(B),it(h,Qe.Contract.ContractType.UPDATEASSETCONTRACT,"UpdateAssetContract",O.Permission_id)}(m,C)}},fb=function(v){var m=v.raw_data,C=m.contract[0],A=C.parameter.value,O={Permission_id:C.Permission_id},h=db(C,A,O),d=h.getRawData();return d.setRefBlockBytes(Be(m.ref_block_bytes)),d.setRefBlockHash(Be(m.ref_block_hash)),m.data&&d.setData(Be(m.data)),m.fee_limit&&d.setFeeLimit(m.fee_limit),m.expiration&&d.setExpiration(m.expiration),m.timestamp&&d.setTimestamp(m.timestamp),h.setRawData(d),h},pb=function(v){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},A=v.raw_data,O=A.contract[0],h=db(O,m,{Permission_id:m?.Permission_id}),d=h.getRawData();return d.setRefBlockBytes(Be(A.ref_block_bytes)),d.setRefBlockHash(Be(A.ref_block_hash)),C.data&&d.setData(Be(C.data.replace(/^0x/,""))),(C.fee_limit||m.fee_limit)&&d.setFeeLimit(C.fee_limit||m.fee_limit),A.expiration&&d.setExpiration(A.expiration),A.timestamp&&d.setTimestamp(A.timestamp),h.setRawData(d),h},hb=function(v,m){var C=m.getRawData().serializeBinary(),A=ue(C),O=rl(C);return A.toLowerCase()===v.raw_data_hex.toLowerCase()&&O.replace(/^0x/,"").toLowerCase()===v.txID.replace(/^0x/,"").toLowerCase()},xp=function(v){var m=fb(v);return hb(v,m)},Ap=function(v,m,C){var A=pb(v,m,C);return hb(v,A)},g_=function(v){var m=v.getRawData().serializeBinary();return rl(m)},y_=r(27),v_=r.n(y_),b_=r(14),Fi=r.n(b_);function gb(v,m){var C=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);m&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),C.push.apply(C,A)}return C}function yb(v){for(var m=1;m<arguments.length;m++){var C=arguments[m]!=null?arguments[m]:{};m%2?gb(Object(C),!0).forEach(function(A){be()(v,A,C[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(C)):gb(Object(C)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(C,A))})}return v}var S=yb(yb({},{isValidURL:function(v){return typeof v=="string"&&v_.a.isURL(v.toString(),{protocols:["http","https"],require_tld:!1})},isObject:function(v){return v===Object(v)&&Object.prototype.toString.call(v)!=="[object Array]"},isArray:function(v){return Array.isArray(v)},isJson:function(v){try{return!!JSON.parse(v)}catch{return!1}},isBoolean:function(v){return typeof v=="boolean"},isBigNumber:function(v){return v&&(v instanceof Fi.a||v.constructor&&v.constructor.name==="BigNumber")},isString:function(v){return typeof v=="string"||v&&v.constructor&&v.constructor.name==="String"},isFunction:function(v){return typeof v=="function"},isHex:function(v){return typeof v=="string"&&!isNaN(parseInt(v,16))&&/^(0x|)[a-fA-F0-9]+$/.test(v)},isInteger:function(v){return v!==null&&Number.isInteger(Number(v))},hasProperty:function(v,m){return Object.prototype.hasOwnProperty.call(v,m)},hasProperties:function(v){for(var m=this,C=arguments.length,A=new Array(C>1?C-1:0),O=1;O<C;O++)A[O-1]=arguments[O];return A.length&&!A.map(function(h){return m.hasProperty(v,h)}).includes(!1)},mapEvent:function(v){var m={block:v.block_number,timestamp:v.block_timestamp,contract:v.contract_address,name:v.event_name,transaction:v.transaction_id,result:v.result,resourceNode:v.resource_Node||(v._unconfirmed?"fullNode":"solidityNode")};return v._unconfirmed&&(m.unconfirmed=v._unconfirmed),v._fingerprint&&(m.fingerprint=v._fingerprint),m},parseEvent:function(v,m){var C=m.inputs;if(!v.result)return v;if(this.isObject(v.result))for(var A=0;A<C.length;A++){var O=C[A];O.type=="address"&&O.name in v.result&&(v.result[O.name]="41"+v.result[O.name].substr(2).toLowerCase())}else this.isArray(v.result)&&(v.result=v.result.reduce(function(h,d,f){var p=C[f],b=p.name;return p.type=="address"&&(d="41"+d.substr(2).toLowerCase()),h[b]=d,h},{}));return v},padLeft:function(v,m,C){for(var A=v.toString();A.length<C;)A=m+A;return A},isNotNullOrUndefined:function(v){return v!=null},sleep:function(){var v=arguments;return F()(X.a.mark(function m(){var C;return X.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return C=v.length>0&&v[0]!==void 0?v[0]:1e3,A.abrupt("return",new Promise(function(O){return setTimeout(O,C)}));case 2:case"end":return A.stop()}},m)}))()}}),{},{code:a,accounts:i,base58:c,bytes:o,crypto:n,abi:u,message:l,_TypedDataEncoder:Qv,transaction:x,ethersUtils:s}),m_=r(28),x_=r.n(m_),yr={HttpProvider:function(){function v(C){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e4,O=arguments.length>2&&arguments[2]!==void 0&&arguments[2],h=arguments.length>3&&arguments[3]!==void 0&&arguments[3],d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{},f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"/";if(ae()(this,v),!S.isValidURL(C))throw new Error("Invalid URL provided to HttpProvider");if(isNaN(A)||A<0)throw new Error("Invalid timeout duration provided");if(!S.isObject(d))throw new Error("Invalid headers object provided");C=C.replace(/\/+$/,""),this.host=C,this.timeout=A,this.user=O,this.password=h,this.headers=d,this.statusPage=f,this.instance=Yt.a.create({baseURL:C,timeout:A,headers:d,auth:O&&{user:O,password:h},adapter:x_.a})}var m;return Ce()(v,[{key:"setStatusPage",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"/";this.statusPage=C}},{key:"isConnected",value:(m=F()(X.a.mark(function C(){var A,O=arguments;return X.a.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return A=O.length>0&&O[0]!==void 0?O[0]:this.statusPage,h.abrupt("return",this.request(A).then(function(d){return S.hasProperties(d,"blockID","block_header")}).catch(function(){return!1}));case 2:case"end":return h.stop()}},C,this)})),function(){return m.apply(this,arguments)})},{key:"request",value:function(C){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"get";return O=O.toLowerCase(),this.instance.request({data:O=="post"&&Object.keys(A).length?A:null,params:O=="get"&&A,url:C,method:O}).then(function(h){return h.data})}}]),v}()},A_=r(29),w_=r.n(A_),__=r(30),C_=r(17),vb=r.n(C_),B_=r(7),Un=r.n(B_),E_=r(12),pl=r.n(E_);function P_(v,m){var C=typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(!C){if(Array.isArray(v)||(C=function(p,b){if(!!p){if(typeof p=="string")return bb(p,b);var B=Object.prototype.toString.call(p).slice(8,-1);if(B==="Object"&&p.constructor&&(B=p.constructor.name),B==="Map"||B==="Set")return Array.from(p);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return bb(p,b)}}(v))||m&&v&&typeof v.length=="number"){C&&(v=C);var A=0,O=function(){};return{s:O,n:function(){return A>=v.length?{done:!0}:{done:!1,value:v[A++]}},e:function(p){throw p},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h,d=!0,f=!1;return{s:function(){C=C.call(v)},n:function(){var p=C.next();return d=p.done,p},e:function(p){f=!0,h=p},f:function(){try{d||C.return==null||C.return()}finally{if(f)throw h}}}}function bb(v,m){(m==null||m>v.length)&&(m=v.length);for(var C=0,A=new Array(m);C<m;C++)A[C]=v[C];return A}var hl,wp=function(){function v(){var m=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(ae()(this,v),!m||!m instanceof st)throw new Error("Expected instance of TronWeb");this.tronWeb=m}return Ce()(v,[{key:"invalid",value:function(m){return m.msg||"Invalid ".concat(m.name).concat(m.type==="address"?" address":""," provided")}},{key:"notPositive",value:function(m){return"".concat(m.name," must be a positive integer")}},{key:"notEqual",value:function(m){return m.msg||"".concat(m.names[0]," can not be equal to ").concat(m.names[1])}},{key:"notValid",value:function(){var m,C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Function,O={},h=!1,d=P_(C);try{for(d.s();!(m=d.n()).done;){var f=m.value,p=f.name,b=f.names,B=f.value,D=f.type,J=f.gt,Q=f.lt,ne=f.gte,he=f.lte,Te=(f.se,f.optional);if(!Te||S.isNotNullOrUndefined(B)&&(D==="boolean"||B!==!1)){switch(O[f.name]=f.value,D){case"address":this.tronWeb.isAddress(B)?O[p]=this.tronWeb.address.toHex(B):h=!0;break;case"integer":(!S.isInteger(B)||typeof J=="number"&&B<=f.gt||typeof Q=="number"&&B>=f.lt||typeof ne=="number"&&B<f.gte||typeof he=="number"&&B>f.lte)&&(h=!0);break;case"positive-integer":if(!S.isInteger(B)||B<=0)return void A(this.notPositive(f));break;case"tokenId":S.isString(B)&&B.length||(h=!0);break;case"notEmptyObject":S.isObject(B)&&Object.keys(B).length||(h=!0);break;case"notEqual":if(O[b[0]]===O[b[1]])return A(this.notEqual(f)),!0;break;case"resource":["BANDWIDTH","ENERGY"].includes(B)||(h=!0);break;case"url":S.isValidURL(B)||(h=!0);break;case"hex":S.isHex(B)||(h=!0);break;case"array":Array.isArray(B)||(h=!0);break;case"not-empty-string":S.isString(B)&&B.length||(h=!0);break;case"boolean":S.isBoolean(B)||(h=!0);break;case"string":(!S.isString(B)||typeof J=="number"&&B.length<=f.gt||typeof Q=="number"&&B.length>=f.lt||typeof ne=="number"&&B.length<f.gte||typeof he=="number"&&B.length>f.lte)&&(h=!0)}if(h)return A(this.invalid(f)),!0}}}catch(ke){d.e(ke)}finally{d.f()}return!1}}]),v}();function mb(v,m){var C=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);m&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),C.push.apply(C,A)}return C}function xb(v){for(var m=1;m<arguments.length;m++){var C=arguments[m]!=null?arguments[m]:{};m%2?mb(Object(C),!0).forEach(function(A){be()(v,A,C[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(C)):mb(Object(C)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(C,A))})}return v}function _p(v,m){var C=typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(!C){if(Array.isArray(v)||(C=function(p,b){if(!!p){if(typeof p=="string")return Ab(p,b);var B=Object.prototype.toString.call(p).slice(8,-1);if(B==="Object"&&p.constructor&&(B=p.constructor.name),B==="Map"||B==="Set")return Array.from(p);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return Ab(p,b)}}(v))||m&&v&&typeof v.length=="number"){C&&(v=C);var A=0,O=function(){};return{s:O,n:function(){return A>=v.length?{done:!0}:{done:!1,value:v[A++]}},e:function(p){throw p},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h,d=!0,f=!1;return{s:function(){C=C.call(v)},n:function(){var p=C.next();return d=p.done,p},e:function(p){f=!0,h=p},f:function(){try{d||C.return==null||C.return()}finally{if(f)throw h}}}}function Ab(v,m){(m==null||m>v.length)&&(m=v.length);for(var C=0,A=new Array(m);C<m;C++)A[C]=v[C];return A}function Ie(v){return st.address.toHex(v)}function vr(v){return hl.tronWeb.fromUtf8(v)}function nt(v,m,C,A){return typeof C=="function"&&(A=C),typeof m=="function"&&(A=m,m=null),v.Error?A(v.Error):v.result&&v.result.message?A(hl.tronWeb.toUtf8(v.result.message)):Ap(v,m,C)?A(null,v):A("Invalid transaction")}function T_(v,m,C,A){return v.Error?A(v.Error):v.result&&v.result.message?A(hl.tronWeb.toUtf8(v.result.message)):C._isConstant||C.estimateEnergy||Ap(v.transaction,m,C)?A(null,v):A("Invalid transaction")}var wb=function(){function v(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(ae()(this,v),!h||!h instanceof st)throw new Error("Expected instance of TronWeb");hl=this,this.tronWeb=h,this.injectPromise=Un()(this),this.validator=new wp(h)}var m,C,A,O;return Ce()(v,[{key:"sendTrx",value:function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.tronWeb.defaultAddress.hex,p=arguments.length>3?arguments[3]:void 0,b=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(S.isFunction(p)&&(b=p,p={}),S.isFunction(f)?(b=f,f=this.tronWeb.defaultAddress.hex):S.isObject(f)&&(p=f,f=this.tronWeb.defaultAddress.hex),!b)return this.injectPromise(this.sendTrx,h,d,f,p);if(d=parseInt(d),!this.validator.notValid([{name:"recipient",type:"address",value:h},{name:"origin",type:"address",value:f},{names:["recipient","origin"],type:"notEqual",msg:"Cannot transfer TRX to the same account"},{name:"amount",type:"integer",gt:0,value:d}],b)){var B={to_address:Ie(h),owner_address:Ie(f),amount:d};p&&p.permissionId&&(B.Permission_id=p.permissionId),this.tronWeb.fullNode.request("wallet/createtransaction",B,"post").then(function(D){return nt(D,B,b)}).catch(function(D){return b(D)})}}},{key:"sendToken",value:function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,f=arguments.length>2&&arguments[2]!==void 0&&arguments[2],p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.tronWeb.defaultAddress.hex,b=arguments.length>4?arguments[4]:void 0,B=arguments.length>5&&arguments[5]!==void 0&&arguments[5];if(S.isFunction(b)&&(B=b,b={}),S.isFunction(p)?(B=p,p=this.tronWeb.defaultAddress.hex):S.isObject(p)&&(b=p,p=this.tronWeb.defaultAddress.hex),!B)return this.injectPromise(this.sendToken,h,d,f,p,b);if(d=parseInt(d),!this.validator.notValid([{name:"recipient",type:"address",value:h},{name:"origin",type:"address",value:p},{names:["recipient","origin"],type:"notEqual",msg:"Cannot transfer tokens to the same account"},{name:"amount",type:"integer",gt:0,value:d},{name:"token ID",type:"tokenId",value:f}],B)){var D={to_address:Ie(h),owner_address:Ie(p),asset_name:vr(f),amount:parseInt(d)};b&&b.permissionId&&(D.Permission_id=b.permissionId),this.tronWeb.fullNode.request("wallet/transferasset",D,"post").then(function(J){return nt(J,D,b,B)}).catch(function(J){return B(J)})}}},{key:"purchaseToken",value:function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0&&arguments[1],f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.tronWeb.defaultAddress.hex,b=arguments.length>4?arguments[4]:void 0,B=arguments.length>5&&arguments[5]!==void 0&&arguments[5];if(S.isFunction(b)&&(B=b,b={}),S.isFunction(p)?(B=p,p=this.tronWeb.defaultAddress.hex):S.isObject(p)&&(b=p,p=this.tronWeb.defaultAddress.hex),!B)return this.injectPromise(this.purchaseToken,h,d,f,p,b);if(!this.validator.notValid([{name:"buyer",type:"address",value:p},{name:"issuer",type:"address",value:h},{names:["buyer","issuer"],type:"notEqual",msg:"Cannot purchase tokens from same account"},{name:"amount",type:"integer",gt:0,value:f},{name:"token ID",type:"tokenId",value:d}],B)){var D={to_address:Ie(h),owner_address:Ie(p),asset_name:vr(d),amount:parseInt(f)};b&&b.permissionId&&(D.Permission_id=b.permissionId),this.tronWeb.fullNode.request("wallet/participateassetissue",D,"post").then(function(J){return nt(J,D,b,B)}).catch(function(J){return B(J)})}}},{key:"freezeBalance",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"BANDWIDTH",p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.tronWeb.defaultAddress.hex,b=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,B=arguments.length>5?arguments[5]:void 0,D=arguments.length>6&&arguments[6]!==void 0&&arguments[6];if(S.isFunction(B)&&(D=B,B={}),S.isFunction(b)?(D=b,b=void 0):S.isObject(b)&&(B=b,b=void 0),S.isFunction(p)?(D=p,p=this.tronWeb.defaultAddress.hex):S.isObject(p)&&(B=p,p=this.tronWeb.defaultAddress.hex),S.isFunction(d)&&(D=d,d=3),S.isFunction(f)&&(D=f,f="BANDWIDTH"),!D)return this.injectPromise(this.freezeBalance,h,d,f,p,b,B);if(!this.validator.notValid([{name:"origin",type:"address",value:p},{name:"receiver",type:"address",value:b,optional:!0},{name:"amount",type:"integer",gt:0,value:h},{name:"duration",type:"integer",gte:3,value:d},{name:"resource",type:"resource",value:f,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}],D)){var J={owner_address:Ie(p),frozen_balance:parseInt(h),frozen_duration:parseInt(d),resource:f};S.isNotNullOrUndefined(b)&&Ie(b)!==Ie(p)&&(J.receiver_address=Ie(b)),B&&B.permissionId&&(J.Permission_id=B.permissionId),this.tronWeb.fullNode.request("wallet/freezebalance",J,"post").then(function(Q){return nt(Q,J,B,D)}).catch(function(Q){return D(Q)})}}},{key:"unfreezeBalance",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"BANDWIDTH",d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,p=arguments.length>3?arguments[3]:void 0,b=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(S.isFunction(p)&&(b=p,p={}),S.isFunction(f)?(b=f,f=void 0):S.isObject(f)&&(p=f,f=void 0),S.isFunction(d)?(b=d,d=this.tronWeb.defaultAddress.hex):S.isObject(d)&&(p=d,d=this.tronWeb.defaultAddress.hex),S.isFunction(h)&&(b=h,h="BANDWIDTH"),!b)return this.injectPromise(this.unfreezeBalance,h,d,f,p);if(!this.validator.notValid([{name:"origin",type:"address",value:d},{name:"receiver",type:"address",value:f,optional:!0},{name:"resource",type:"resource",value:h,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}],b)){var B={owner_address:Ie(d),resource:h};S.isNotNullOrUndefined(f)&&Ie(f)!==Ie(d)&&(B.receiver_address=Ie(f)),p&&p.permissionId&&(B.Permission_id=p.permissionId),this.tronWeb.fullNode.request("wallet/unfreezebalance",B,"post").then(function(D){return nt(D,B,p,b)}).catch(function(D){return b(D)})}}},{key:"freezeBalanceV2",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"BANDWIDTH",f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.tronWeb.defaultAddress.hex,p=arguments.length>3?arguments[3]:void 0,b=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(S.isFunction(p)&&(b=p,p={}),S.isFunction(f)?(b=f,f=this.tronWeb.defaultAddress.hex):S.isObject(f)&&(p=f,f=this.tronWeb.defaultAddress.hex),S.isFunction(d)?(b=d,d="BANDWIDTH"):S.isObject(d)&&(p=d,d="BANDWIDTH"),!b)return this.injectPromise(this.freezeBalanceV2,h,d,f,p);if(!this.validator.notValid([{name:"origin",type:"address",value:f},{name:"amount",type:"integer",gt:0,value:h},{name:"resource",type:"resource",value:d,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}],b)){var B={owner_address:Ie(f),frozen_balance:parseInt(h),resource:d};p&&p.permissionId&&(B.Permission_id=p.permissionId),this.tronWeb.fullNode.request("wallet/freezebalancev2",B,"post").then(function(D){return nt(D,B,p,b)}).catch(function(D){return b(D)})}}},{key:"unfreezeBalanceV2",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"BANDWIDTH",f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.tronWeb.defaultAddress.hex,p=arguments.length>3?arguments[3]:void 0,b=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(S.isFunction(p)&&(b=p,p={}),S.isFunction(f)?(b=f,f=this.tronWeb.defaultAddress.hex):S.isObject(f)&&(p=f,f=this.tronWeb.defaultAddress.hex),S.isFunction(d)?(b=d,d="BANDWIDTH"):S.isObject(d)&&(p=d,d="BANDWIDTH"),!b)return this.injectPromise(this.unfreezeBalanceV2,h,d,f,p);if(!this.validator.notValid([{name:"origin",type:"address",value:f},{name:"amount",type:"integer",gt:0,value:h},{name:"resource",type:"resource",value:d,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}],b)){var B={owner_address:Ie(f),unfreeze_balance:parseInt(h),resource:d};p&&p.permissionId&&(B.Permission_id=p.permissionId),this.tronWeb.fullNode.request("wallet/unfreezebalancev2",B,"post").then(function(D){return nt(D,B,p,b)}).catch(function(D){return b(D)})}}},{key:"delegateResource",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,d=arguments.length>1?arguments[1]:void 0,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"BANDWIDTH",p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.tronWeb.defaultAddress.hex,b=arguments.length>4&&arguments[4]!==void 0&&arguments[4],B=arguments.length>5?arguments[5]:void 0,D=arguments.length>6&&arguments[6]!==void 0&&arguments[6];if(S.isFunction(B)&&(D=B,B={}),S.isFunction(b)?(D=b,b=!1):S.isObject(b)&&(B=b,b=!1),S.isFunction(p)?(D=p,p=this.tronWeb.defaultAddress.hex):S.isObject(p)&&(B=p,p=this.tronWeb.defaultAddress.hex),S.isFunction(f)?(D=f,f="BANDWIDTH"):S.isObject(f)&&(B=f,f="BANDWIDTH"),!D)return this.injectPromise(this.delegateResource,h,d,f,p,b,B);if(!this.validator.notValid([{name:"amount",type:"integer",gt:0,value:h},{name:"resource",type:"resource",value:f,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'},{name:"receiver",type:"address",value:d},{name:"origin",type:"address",value:p},{name:"lock",type:"boolean",value:b}],D)){if(Ie(d)===Ie(p))return D("Receiver address must not be the same as owner address");var J={owner_address:Ie(p),receiver_address:Ie(d),balance:parseInt(h),resource:f,lock:b};B&&B.permissionId&&(J.Permission_id=B.permissionId),this.tronWeb.fullNode.request("wallet/delegateresource",J,"post").then(function(Q){return nt(Q,J,B,D)}).catch(function(Q){return D(Q)})}}},{key:"undelegateResource",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,d=arguments.length>1?arguments[1]:void 0,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"BANDWIDTH",p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.tronWeb.defaultAddress.hex,b=arguments.length>4?arguments[4]:void 0,B=arguments.length>5&&arguments[5]!==void 0&&arguments[5];if(S.isFunction(b)&&(B=b,b={}),S.isFunction(p)?(B=p,p=this.tronWeb.defaultAddress.hex):S.isObject(p)&&(b=p,p=this.tronWeb.defaultAddress.hex),S.isFunction(f)?(B=f,f="BANDWIDTH"):S.isObject(f)&&(b=f,f="BANDWIDTH"),!B)return this.injectPromise(this.undelegateResource,h,d,f,p,b);if(!this.validator.notValid([{name:"origin",type:"address",value:p},{name:"receiver",type:"address",value:d},{name:"amount",type:"integer",gt:0,value:h},{name:"resource",type:"resource",value:f,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}],B)){if(Ie(d)===Ie(p))return B("Receiver address must not be the same as owner address");var D={owner_address:Ie(p),receiver_address:Ie(d),balance:parseInt(h),resource:f};b&&b.permissionId&&(D.Permission_id=b.permissionId),this.tronWeb.fullNode.request("wallet/undelegateresource",D,"post").then(function(J){return nt(J,D,b,B)}).catch(function(J){return B(J)})}}},{key:"withdrawExpireUnfreeze",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,d=arguments.length>1?arguments[1]:void 0,f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(S.isFunction(d)&&(f=d,d={}),S.isFunction(h)?(f=h,h=this.tronWeb.defaultAddress.hex):S.isObject(h)&&(d=h,h=this.tronWeb.defaultAddress.hex),!f)return this.injectPromise(this.withdrawExpireUnfreeze,h,d);if(!this.validator.notValid([{name:"origin",type:"address",value:h}],f)){var p={owner_address:Ie(h)};d&&d.permissionId&&(p.Permission_id=d.permissionId),this.tronWeb.fullNode.request("wallet/withdrawexpireunfreeze",p,"post").then(function(b){return nt(b,p,d,f)}).catch(function(b){return f(b)})}}},{key:"withdrawBlockRewards",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,d=arguments.length>1?arguments[1]:void 0,f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(S.isFunction(d)&&(f=d,d={}),S.isFunction(h)?(f=h,h=this.tronWeb.defaultAddress.hex):S.isObject(h)&&(d=h,h=this.tronWeb.defaultAddress.hex),!f)return this.injectPromise(this.withdrawBlockRewards,h,d);if(!this.validator.notValid([{name:"origin",type:"address",value:h}],f)){var p={owner_address:Ie(h)};d&&d.permissionId&&(p.Permission_id=d.permissionId),this.tronWeb.fullNode.request("wallet/withdrawbalance",p,"post").then(function(b){return nt(b,p,d,f)}).catch(function(b){return f(b)})}}},{key:"applyForSR",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,d=arguments.length>1&&arguments[1]!==void 0&&arguments[1],f=arguments.length>2?arguments[2]:void 0,p=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(S.isFunction(f)&&(p=f,f={}),S.isObject(d)&&S.isValidURL(h)&&(f=d,d=h,h=this.tronWeb.defaultAddress.hex),!p)return this.injectPromise(this.applyForSR,h,d,f);if(!this.validator.notValid([{name:"origin",type:"address",value:h},{name:"url",type:"url",value:d,msg:"Invalid url provided"}],p)){var b={owner_address:Ie(h),url:vr(d)};f&&f.permissionId&&(b.Permission_id=f.permissionId),this.tronWeb.fullNode.request("wallet/createwitness",b,"post").then(function(B){return nt(B,b,f,p)}).catch(function(B){return p(B)})}}},{key:"vote",value:function(){var h=this,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,p=arguments.length>2?arguments[2]:void 0,b=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(S.isFunction(p)&&(b=p,p={}),S.isFunction(f)?(b=f,f=this.tronWeb.defaultAddress.hex):S.isObject(f)&&(p=f,f=this.tronWeb.defaultAddress.hex),!b)return this.injectPromise(this.vote,d,f,p);if(!this.validator.notValid([{name:"voter",type:"address",value:f},{name:"votes",type:"notEmptyObject",value:d}],b)){var B=!1;if(d=Object.entries(d).map(function(J){var Q=pl()(J,2),ne=Q[0],he=Q[1];if(!B)return h.validator.notValid([{name:"SR",type:"address",value:ne},{name:"vote count",type:"integer",gt:0,value:he,msg:"Invalid vote count provided for SR: "+ne}])?B=!0:{vote_address:Ie(ne),vote_count:parseInt(he)}}),!B){var D={owner_address:Ie(f),votes:d};p&&p.permissionId&&(D.Permission_id=p.permissionId),this.tronWeb.fullNode.request("wallet/votewitnessaccount",D,"post").then(function(J){return nt(J,D,p,b)}).catch(function(J){return b(J)})}}}},{key:"createSmartContract",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(S.isFunction(d)&&(f=d,d=this.tronWeb.defaultAddress.hex),!f)return this.injectPromise(this.createSmartContract,h,d);var p=h.feeLimit||this.tronWeb.feeLimit,b=h.userFeePercentage;typeof b=="number"||b||(b=100);var B=h.originEnergyLimit||1e7,D=h.callValue||0,J=h.tokenValue,Q=h.tokenId||h.token_id,ne=h.abi,he=ne!==void 0&&ne,Te=h.bytecode,ke=Te!==void 0&&Te,E=h.parameters,w=E===void 0?[]:E,_=h.name,T=_===void 0?"":_;if(he&&S.isString(he))try{he=JSON.parse(he)}catch{return f("Invalid options.abi provided")}if(he.entrys&&(he=he.entrys),!S.isArray(he))return f("Invalid options.abi provided");var P=he.some(function(Y){return Y.type==="constructor"&&Y.stateMutability.toLowerCase()==="payable"});if(!this.validator.notValid([{name:"bytecode",type:"hex",value:ke},{name:"feeLimit",type:"integer",value:p,gt:0},{name:"callValue",type:"integer",value:D,gte:0},{name:"userFeePercentage",type:"integer",value:b,gte:0,lte:100},{name:"originEnergyLimit",type:"integer",value:B,gte:0,lte:1e7},{name:"parameters",type:"array",value:w},{name:"issuer",type:"address",value:d},{name:"tokenValue",type:"integer",value:J,gte:0,optional:!0},{name:"tokenId",type:"integer",value:Q,gte:0,optional:!0}],f)){if(P&&D==0&&J==0)return f("When contract is payable, options.callValue or options.tokenValue must be a positive integer");if(!P&&(D>0||J>0))return f("When contract is not payable, options.callValue and options.tokenValue must be 0");if(h.rawParameter&&S.isString(h.rawParameter))w=h.rawParameter.replace(/^(0x)/,"");else if(h.funcABIV2)w=ul(h.funcABIV2,h.parametersV2).replace(/^(0x)/,"");else{var I=he.find(function(Y){return Y.type==="constructor"});if(I!==void 0&&I){var L=new al,V=[],q=[];if(I=I.inputs,w.length!=I.length)return f("constructor needs ".concat(I.length," but ").concat(w.length," provided"));for(var U=0;U<w.length;U++){var z=I[U].type,$=w[U];if(!z||!S.isString(z)||!z.length)return f("Invalid parameter type provided: "+z);z==="address"?$=Ie($).replace(Ct,"0x"):z.match(/^([^\x5b]*)(\x5b|$)/)[0]==="address["?$=$.map(function(Y){return Ie(Y).replace(Ct,"0x")}):/trcToken/.test(z)&&(z=z.replace(/trcToken/,"uint256")),V.push(z),q.push($)}try{w=L.encode(V,q).replace(/^(0x)/,"")}catch(Y){return f(Y)}}else w=""}var j={owner_address:Ie(d),fee_limit:parseInt(p),call_value:parseInt(D),consume_user_resource_percent:b,origin_energy_limit:B,abi:JSON.stringify(he),bytecode:ke,parameter:w,name:T};S.isNotNullOrUndefined(J)&&(j.call_token_value=parseInt(J)),S.isNotNullOrUndefined(Q)&&(j.token_id=parseInt(Q)),h&&h.permissionId&&(j.Permission_id=h.permissionId),this.tronWeb.fullNode.request("wallet/deploycontract",j,"post").then(function(Y){return nt(Y,j,h,f)}).catch(function(Y){return f(Y)})}}},{key:"triggerSmartContract",value:function(){for(var h=arguments.length,d=new Array(h),f=0;f<h;f++)d[f]=arguments[f];return K()(d[2])!=="object"&&(d[2]={feeLimit:d[2],callValue:d[3]},d.splice(3,1)),this._triggerSmartContract.apply(this,d)}},{key:"triggerConstantContract",value:function(){for(var h=arguments.length,d=new Array(h),f=0;f<h;f++)d[f]=arguments[f];return d[2]._isConstant=!0,this.triggerSmartContract.apply(this,d)}},{key:"triggerConfirmedConstantContract",value:function(){for(var h=arguments.length,d=new Array(h),f=0;f<h;f++)d[f]=arguments[f];return d[2]._isConstant=!0,d[2].confirmed=!0,this.triggerSmartContract.apply(this,d)}},{key:"estimateEnergy",value:function(){for(var h=arguments.length,d=new Array(h),f=0;f<h;f++)d[f]=arguments[f];return d[2].estimateEnergy=!0,this.triggerSmartContract.apply(this,d)}},{key:"_triggerSmartContract",value:function(h,d){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],b=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.tronWeb.defaultAddress.hex,B=arguments.length>5&&arguments[5]!==void 0&&arguments[5];if(S.isFunction(b)&&(B=b,b=this.tronWeb.defaultAddress.hex),S.isFunction(p)&&(B=p,p=[]),!B)return this.injectPromise(this._triggerSmartContract,h,d,f,p,b);var D=Object.assign({callValue:0,feeLimit:this.tronWeb.feeLimit},f),J=D.tokenValue,Q=D.tokenId,ne=D.callValue,he=D.feeLimit;if(!this.validator.notValid([{name:"feeLimit",type:"integer",value:he,gt:0},{name:"callValue",type:"integer",value:ne,gte:0},{name:"parameters",type:"array",value:p},{name:"contract",type:"address",value:h},{name:"issuer",type:"address",value:b,optional:!0},{name:"tokenValue",type:"integer",value:J,gte:0,optional:!0},{name:"tokenId",type:"integer",value:Q,gte:0,optional:!0}],B)){var Te={contract_address:Ie(h),owner_address:Ie(b)};if(d&&S.isString(d)){if(d=d.replace("/s*/g",""),p.length){for(var ke=new al,E=[],w=[],_=0;_<p.length;_++){var T=p[_],P=T.type,I=T.value;if(!P||!S.isString(P)||!P.length)return B("Invalid parameter type provided: "+P);P==="address"?I=Ie(I).replace(Ct,"0x"):P.match(/^([^\x5b]*)(\x5b|$)/)[0]==="address["&&(I=I.map(function(V){return Ie(V).replace(Ct,"0x")})),E.push(P),w.push(I)}try{E=E.map(function(V){return/trcToken/.test(V)&&(V=V.replace(/trcToken/,"uint256")),V}),p=ke.encode(E,w).replace(/^(0x)/,"")}catch(V){return B(V)}}else p="";f.funcABIV2&&(p=ul(f.funcABIV2,f.parametersV2).replace(/^(0x)/,"")),f.shieldedParameter&&S.isString(f.shieldedParameter)&&(p=f.shieldedParameter.replace(/^(0x)/,"")),f.rawParameter&&S.isString(f.rawParameter)&&(p=f.rawParameter.replace(/^(0x)/,"")),Te.function_selector=d,Te.parameter=p}Te.call_value=parseInt(ne),S.isNotNullOrUndefined(J)&&(Te.call_token_value=parseInt(J)),S.isNotNullOrUndefined(Q)&&(Te.token_id=parseInt(Q)),f._isConstant||f.estimateEnergy||(Te.fee_limit=parseInt(he)),f.permissionId&&(Te.Permission_id=f.permissionId);var L="triggersmartcontract";f._isConstant?L="triggerconstantcontract":f.estimateEnergy&&(L="estimateenergy"),L="wallet".concat(f.confirmed?"solidity":"","/").concat(L),this.tronWeb[f.confirmed?"solidityNode":"fullNode"].request(L,Te,"post").then(function(V){return T_(V,Te,f,B)}).catch(function(V){return B(V)})}}},{key:"clearABI",value:function(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(!f)return this.injectPromise(this.clearABI,h,d);if(!this.tronWeb.isAddress(h))return f("Invalid contract address provided");if(!this.tronWeb.isAddress(d))return f("Invalid owner address provided");var p={contract_address:Ie(h),owner_address:Ie(d)};this.tronWeb.trx.cache.contracts[h]&&delete this.tronWeb.trx.cache.contracts[h],this.tronWeb.fullNode.request("wallet/clearabi",p,"post").then(function(b){return nt(b,p,{},f)}).catch(function(b){return f(b)})}},{key:"updateBrokerage",value:function(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(!f)return this.injectPromise(this.updateBrokerage,h,d);if(!S.isNotNullOrUndefined(h))return f("Invalid brokerage provided");if(!S.isInteger(h)||h<0||h>100)return f("Brokerage must be an integer between 0 and 100");if(!this.tronWeb.isAddress(d))return f("Invalid owner address provided");var p={brokerage:parseInt(h),owner_address:Ie(d)},b={};this.tronWeb.fullNode.request("wallet/updateBrokerage",p,"post").then(function(B){return nt(B,p,b,f)}).catch(function(B){return f(B)})}},{key:"createToken",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(S.isFunction(d)&&(f=d,d=this.tronWeb.defaultAddress.hex),!f)return this.injectPromise(this.createToken,h,d);var p=h.name,b=p!==void 0&&p,B=h.abbreviation,D=B!==void 0&&B,J=h.description,Q=J!==void 0&&J,ne=h.url,he=ne!==void 0&&ne,Te=h.totalSupply,ke=Te===void 0?0:Te,E=h.trxRatio,w=E===void 0?1:E,_=h.tokenRatio,T=_===void 0?1:_,P=h.saleStart,I=P===void 0?Date.now():P,L=h.saleEnd,V=L!==void 0&&L,q=h.freeBandwidth,U=q===void 0?0:q,z=h.freeBandwidthLimit,$=z===void 0?0:z,j=h.frozenAmount,Y=j===void 0?0:j,le=h.frozenDuration,me=le===void 0?0:le,ot=h.voteScore,fe=h.precision;if(!this.validator.notValid([{name:"Supply amount",type:"positive-integer",value:ke},{name:"TRX ratio",type:"positive-integer",value:w},{name:"Token ratio",type:"positive-integer",value:T},{name:"token abbreviation",type:"not-empty-string",value:D},{name:"token name",type:"not-empty-string",value:b},{name:"token description",type:"not-empty-string",value:Q},{name:"token url",type:"url",value:he},{name:"issuer",type:"address",value:d},{name:"sale start timestamp",type:"integer",value:I,gte:Date.now()},{name:"sale end timestamp",type:"integer",value:V,gt:I},{name:"Free bandwidth amount",type:"integer",value:U,gte:0},{name:"Free bandwidth limit",type:"integer",value:$,gte:0},{name:"Frozen supply",type:"integer",value:Y,gte:0},{name:"Frozen duration",type:"integer",value:me,gte:0}],f)){if(S.isNotNullOrUndefined(ot)&&(!S.isInteger(ot)||ot<=0))return f("voteScore must be a positive integer greater than 0");if(S.isNotNullOrUndefined(fe)&&(!S.isInteger(fe)||fe<0||fe>6))return f("precision must be a positive integer >= 0 and <= 6");var Er={owner_address:Ie(d),name:vr(b),abbr:vr(D),description:vr(Q),url:vr(he),total_supply:parseInt(ke),trx_num:parseInt(w),num:parseInt(T),start_time:parseInt(I),end_time:parseInt(V),free_asset_net_limit:parseInt(U),public_free_asset_net_limit:parseInt($),frozen_supply:{frozen_amount:parseInt(Y),frozen_days:parseInt(me)}};parseInt(Y)>0||delete Er.frozen_supply,fe&&!isNaN(parseInt(fe))&&(Er.precision=parseInt(fe)),ot&&!isNaN(parseInt(ot))&&(Er.vote_score=parseInt(ot)),h&&h.permissionId&&(Er.Permission_id=h.permissionId),this.tronWeb.fullNode.request("wallet/createassetissue",Er,"post").then(function(ya){return nt(ya,Er,f)}).catch(function(ya){return f(ya)})}}},{key:"createAccount",value:function(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,f=arguments.length>2?arguments[2]:void 0,p=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(S.isFunction(f)&&(p=f,f={}),S.isFunction(d)?(p=d,d=this.tronWeb.defaultAddress.hex):S.isObject(d)&&(f=d,d=this.tronWeb.defaultAddress.hex),!p)return this.injectPromise(this.createAccount,h,d,f);if(!this.validator.notValid([{name:"account",type:"address",value:h},{name:"origin",type:"address",value:d}],p)){var b={owner_address:Ie(d),account_address:Ie(h)};f&&f.permissionId&&(b.Permission_id=f.permissionId),this.tronWeb.fullNode.request("wallet/createaccount",b,"post").then(function(B){return nt(B,b,f,p)}).catch(function(B){return p(B)})}}},{key:"updateAccount",value:function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,f=arguments.length>2?arguments[2]:void 0,p=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(S.isFunction(f)&&(p=f,f={}),S.isFunction(d)?(p=d,d=this.tronWeb.defaultAddress.hex):S.isObject(d)&&(f=d,d=this.tronWeb.defaultAddress.hex),!p)return this.injectPromise(this.updateAccount,h,d,f);if(!this.validator.notValid([{name:"Name",type:"not-empty-string",value:h},{name:"origin",type:"address",value:d}],p)){var b={account_name:vr(h),owner_address:Ie(d)};f&&f.permissionId&&(b.Permission_id=f.permissionId),this.tronWeb.fullNode.request("wallet/updateaccount",b,"post").then(function(B){return nt(B,b,f,p)}).catch(function(B){return p(B)})}}},{key:"setAccountId",value:function(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(S.isFunction(d)&&(f=d,d=this.tronWeb.defaultAddress.hex),!f)return this.injectPromise(this.setAccountId,h,d);if(h&&S.isString(h)&&h.startsWith("0x")&&(h=h.slice(2)),!this.validator.notValid([{name:"accountId",type:"hex",value:h},{name:"accountId",type:"string",lte:32,gte:8,value:h},{name:"origin",type:"address",value:d}],f)){var p={account_id:h,owner_address:Ie(d)};this.tronWeb.fullNode.request("wallet/setaccountid",p,"post").then(function(b){return nt(b,p,{},f)}).catch(function(b){return f(b)})}}},{key:"updateToken",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(S.isFunction(d)?(f=d,d=this.tronWeb.defaultAddress.hex):S.isObject(d)&&(h=d,d=this.tronWeb.defaultAddress.hex),!f)return this.injectPromise(this.updateToken,h,d);var p=h,b=p.description,B=b!==void 0&&b,D=p.url,J=D!==void 0&&D,Q=p.freeBandwidth,ne=Q===void 0?0:Q,he=p.freeBandwidthLimit,Te=he===void 0?0:he;if(!this.validator.notValid([{name:"token description",type:"not-empty-string",value:B},{name:"token url",type:"url",value:J},{name:"issuer",type:"address",value:d},{name:"Free bandwidth amount",type:"positive-integer",value:ne},{name:"Free bandwidth limit",type:"positive-integer",value:Te}],f)){var ke={owner_address:Ie(d),description:vr(B),url:vr(J),new_limit:parseInt(ne),new_public_limit:parseInt(Te)};h&&h.permissionId&&(ke.Permission_id=h.permissionId),this.tronWeb.fullNode.request("wallet/updateasset",ke,"post").then(function(E){return nt(E,ke,h,f)}).catch(function(E){return f(E)})}}},{key:"sendAsset",value:function(){return this.sendToken.apply(this,arguments)}},{key:"purchaseAsset",value:function(){return this.purchaseToken.apply(this,arguments)}},{key:"createAsset",value:function(){return this.createToken.apply(this,arguments)}},{key:"updateAsset",value:function(){return this.updateToken.apply(this,arguments)}},{key:"createProposal",value:function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,f=arguments.length>2?arguments[2]:void 0,p=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(S.isFunction(f)&&(p=f,f={}),S.isFunction(d)?(p=d,d=this.tronWeb.defaultAddress.hex):S.isObject(d)&&(f=d,d=this.tronWeb.defaultAddress.hex),!p)return this.injectPromise(this.createProposal,h,d,f);if(!this.validator.notValid([{name:"issuer",type:"address",value:d}],p)){var b="Invalid proposal parameters provided";if(!h)return p(b);S.isArray(h)||(h=[h]);var B,D=_p(h);try{for(D.s();!(B=D.n()).done;){var J=B.value;if(!S.isObject(J))return p(b)}}catch(ne){D.e(ne)}finally{D.f()}var Q={owner_address:Ie(d),parameters:h};f&&f.permissionId&&(Q.Permission_id=f.permissionId),this.tronWeb.fullNode.request("wallet/proposalcreate",Q,"post").then(function(ne){return nt(ne,Q,f,p)}).catch(function(ne){return p(ne)})}}},{key:"deleteProposal",value:function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,f=arguments.length>2?arguments[2]:void 0,p=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(S.isFunction(f)&&(p=f,f={}),S.isFunction(d)?(p=d,d=this.tronWeb.defaultAddress.hex):S.isObject(d)&&(f=d,d=this.tronWeb.defaultAddress.hex),!p)return this.injectPromise(this.deleteProposal,h,d,f);if(!this.validator.notValid([{name:"issuer",type:"address",value:d},{name:"proposalID",type:"integer",value:h,gte:0}],p)){var b={owner_address:Ie(d),proposal_id:parseInt(h)};f&&f.permissionId&&(b.Permission_id=f.permissionId),this.tronWeb.fullNode.request("wallet/proposaldelete",b,"post").then(function(B){return nt(B,b,f,p)}).catch(function(B){return p(B)})}}},{key:"voteProposal",value:function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0&&arguments[1],f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.tronWeb.defaultAddress.hex,p=arguments.length>3?arguments[3]:void 0,b=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(S.isFunction(p)&&(b=p,p={}),S.isFunction(f)?(b=f,f=this.tronWeb.defaultAddress.hex):S.isObject(f)&&(p=f,f=this.tronWeb.defaultAddress.hex),!b)return this.injectPromise(this.voteProposal,h,d,f,p);if(!this.validator.notValid([{name:"voter",type:"address",value:f},{name:"proposalID",type:"integer",value:h,gte:0},{name:"has approval",type:"boolean",value:d}],b)){var B={owner_address:Ie(f),proposal_id:parseInt(h),is_add_approval:d};p&&p.permissionId&&(B.Permission_id=p.permissionId),this.tronWeb.fullNode.request("wallet/proposalapprove",B,"post").then(function(D){return nt(D,B,p,b)}).catch(function(D){return b(D)})}}},{key:"createTRXExchange",value:function(h,d,f){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.tronWeb.defaultAddress.hex,b=arguments.length>4?arguments[4]:void 0,B=arguments.length>5&&arguments[5]!==void 0&&arguments[5];if(S.isFunction(b)&&(B=b,b={}),S.isFunction(p)?(B=p,p=this.tronWeb.defaultAddress.hex):S.isObject(p)&&(b=p,p=this.tronWeb.defaultAddress.hex),!B)return this.injectPromise(this.createTRXExchange,h,d,f,p,b);if(!this.validator.notValid([{name:"owner",type:"address",value:p},{name:"token name",type:"not-empty-string",value:h},{name:"token balance",type:"positive-integer",value:d},{name:"trx balance",type:"positive-integer",value:f}],B)){var D={owner_address:Ie(p),first_token_id:vr(h),first_token_balance:d,second_token_id:"5f",second_token_balance:f};b&&b.permissionId&&(D.Permission_id=b.permissionId),this.tronWeb.fullNode.request("wallet/exchangecreate",D,"post").then(function(J){return nt(J,D,b,B)}).catch(function(J){return B(J)})}}},{key:"createTokenExchange",value:function(h,d,f,p){var b=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.tronWeb.defaultAddress.hex,B=arguments.length>5?arguments[5]:void 0,D=arguments.length>6&&arguments[6]!==void 0&&arguments[6];if(S.isFunction(B)&&(D=B,B={}),S.isFunction(b)?(D=b,b=this.tronWeb.defaultAddress.hex):S.isObject(b)&&(B=b,b=this.tronWeb.defaultAddress.hex),!D)return this.injectPromise(this.createTokenExchange,h,d,f,p,b,B);if(!this.validator.notValid([{name:"owner",type:"address",value:b},{name:"first token name",type:"not-empty-string",value:h},{name:"second token name",type:"not-empty-string",value:f},{name:"first token balance",type:"positive-integer",value:d},{name:"second token balance",type:"positive-integer",value:p}],D)){var J={owner_address:Ie(b),first_token_id:vr(h),first_token_balance:d,second_token_id:vr(f),second_token_balance:p};B&&B.permissionId&&(J.Permission_id=B.permissionId),this.tronWeb.fullNode.request("wallet/exchangecreate",J,"post").then(function(Q){return nt(Q,J,B,D)}).catch(function(Q){return D(Q)})}}},{key:"injectExchangeTokens",value:function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0&&arguments[1],f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.tronWeb.defaultAddress.hex,b=arguments.length>4?arguments[4]:void 0,B=arguments.length>5&&arguments[5]!==void 0&&arguments[5];if(S.isFunction(b)&&(B=b,b={}),S.isFunction(p)?(B=p,p=this.tronWeb.defaultAddress.hex):S.isObject(p)&&(b=p,p=this.tronWeb.defaultAddress.hex),!B)return this.injectPromise(this.injectExchangeTokens,h,d,f,p,b);if(!this.validator.notValid([{name:"owner",type:"address",value:p},{name:"token name",type:"not-empty-string",value:d},{name:"token amount",type:"integer",value:f,gte:1},{name:"exchangeID",type:"integer",value:h,gte:0}],B)){var D={owner_address:Ie(p),exchange_id:parseInt(h),token_id:vr(d),quant:parseInt(f)};b&&b.permissionId&&(D.Permission_id=b.permissionId),this.tronWeb.fullNode.request("wallet/exchangeinject",D,"post").then(function(J){return nt(J,D,b,B)}).catch(function(J){return B(J)})}}},{key:"withdrawExchangeTokens",value:function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0&&arguments[1],f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.tronWeb.defaultAddress.hex,b=arguments.length>4?arguments[4]:void 0,B=arguments.length>5&&arguments[5]!==void 0&&arguments[5];if(S.isFunction(b)&&(B=b,b={}),S.isFunction(p)?(B=p,p=this.tronWeb.defaultAddress.hex):S.isObject(p)&&(b=p,p=this.tronWeb.defaultAddress.hex),!B)return this.injectPromise(this.withdrawExchangeTokens,h,d,f,p,b);if(!this.validator.notValid([{name:"owner",type:"address",value:p},{name:"token name",type:"not-empty-string",value:d},{name:"token amount",type:"integer",value:f,gte:1},{name:"exchangeID",type:"integer",value:h,gte:0}],B)){var D={owner_address:Ie(p),exchange_id:parseInt(h),token_id:vr(d),quant:parseInt(f)};b&&b.permissionId&&(D.Permission_id=b.permissionId),this.tronWeb.fullNode.request("wallet/exchangewithdraw",D,"post").then(function(J){return nt(J,D,b,B)}).catch(function(J){return B(J)})}}},{key:"tradeExchangeTokens",value:function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0&&arguments[1],f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,b=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.tronWeb.defaultAddress.hex,B=arguments.length>5?arguments[5]:void 0,D=arguments.length>6&&arguments[6]!==void 0&&arguments[6];if(S.isFunction(B)&&(D=B,B={}),S.isFunction(b)?(D=b,b=this.tronWeb.defaultAddress.hex):S.isObject(b)&&(B=b,b=this.tronWeb.defaultAddress.hex),!D)return this.injectPromise(this.tradeExchangeTokens,h,d,f,p,b,B);if(!this.validator.notValid([{name:"owner",type:"address",value:b},{name:"token name",type:"not-empty-string",value:d},{name:"tokenAmountSold",type:"integer",value:f,gte:1},{name:"tokenAmountExpected",type:"integer",value:p,gte:1},{name:"exchangeID",type:"integer",value:h,gte:0}],D)){var J={owner_address:Ie(b),exchange_id:parseInt(h),token_id:this.tronWeb.fromAscii(d),quant:parseInt(f),expected:parseInt(p)};B&&B.permissionId&&(J.Permission_id=B.permissionId),this.tronWeb.fullNode.request("wallet/exchangetransaction",J,"post").then(function(Q){return nt(Q,J,B,D)}).catch(function(Q){return D(Q)})}}},{key:"updateSetting",value:function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0&&arguments[1],f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.tronWeb.defaultAddress.hex,p=arguments.length>3?arguments[3]:void 0,b=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(S.isFunction(p)&&(b=p,p={}),S.isFunction(f)?(b=f,f=this.tronWeb.defaultAddress.hex):S.isObject(f)&&(p=f,f=this.tronWeb.defaultAddress.hex),!b)return this.injectPromise(this.updateSetting,h,d,f,p);if(!this.validator.notValid([{name:"owner",type:"address",value:f},{name:"contract",type:"address",value:h},{name:"userFeePercentage",type:"integer",value:d,gte:0,lte:100}],b)){var B={owner_address:Ie(f),contract_address:Ie(h),consume_user_resource_percent:d};p&&p.permissionId&&(B.Permission_id=p.permissionId),this.tronWeb.fullNode.request("wallet/updatesetting",B,"post").then(function(D){return nt(D,B,p,b)}).catch(function(D){return b(D)})}}},{key:"updateEnergyLimit",value:function(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0&&arguments[1],f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.tronWeb.defaultAddress.hex,p=arguments.length>3?arguments[3]:void 0,b=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(S.isFunction(p)&&(b=p,p={}),S.isFunction(f)?(b=f,f=this.tronWeb.defaultAddress.hex):S.isObject(f)&&(p=f,f=this.tronWeb.defaultAddress.hex),!b)return this.injectPromise(this.updateEnergyLimit,h,d,f,p);if(!this.validator.notValid([{name:"owner",type:"address",value:f},{name:"contract",type:"address",value:h},{name:"originEnergyLimit",type:"integer",value:d,gte:0,lte:1e7}],b)){var B={owner_address:Ie(f),contract_address:Ie(h),origin_energy_limit:d};p&&p.permissionId&&(B.Permission_id=p.permissionId),this.tronWeb.fullNode.request("wallet/updateenergylimit",B,"post").then(function(D){return nt(D,B,p,b)}).catch(function(D){return b(D)})}}},{key:"checkPermissions",value:function(h,d){if(h){if(h.type!==d||!h.permission_name||!S.isString(h.permission_name)||!S.isInteger(h.threshold)||h.threshold<1||!h.keys)return!1;var f,p=_p(h.keys);try{for(p.s();!(f=p.n()).done;){var b=f.value;if(!this.tronWeb.isAddress(b.address)||!S.isInteger(b.weight)||b.weight>h.threshold||b.weight<1||d===2&&!h.operations)return!1}}catch(B){p.e(B)}finally{p.f()}}return!0}},{key:"updateAccountPermissions",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,d=arguments.length>1&&arguments[1]!==void 0&&arguments[1],f=arguments.length>2&&arguments[2]!==void 0&&arguments[2],p=arguments.length>3&&arguments[3]!==void 0&&arguments[3],b=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(S.isFunction(p)&&(b=p,p=!1),S.isFunction(f)&&(b=f,f=p=!1),S.isFunction(d)&&(b=d,d=f=p=!1),!b)return this.injectPromise(this.updateAccountPermissions,h,d,f,p);if(!this.tronWeb.isAddress(h))return b("Invalid ownerAddress provided");if(!this.checkPermissions(d,0))return b("Invalid ownerPermissions provided");if(!this.checkPermissions(f,1))return b("Invalid witnessPermissions provided");Array.isArray(p)||(p=[p]);var B,D=_p(p);try{for(D.s();!(B=D.n()).done;){var J=B.value;if(!this.checkPermissions(J,2))return b("Invalid activesPermissions provided")}}catch(ne){D.e(ne)}finally{D.f()}var Q={owner_address:h};d&&(Q.owner=d),f&&(Q.witness=f),p&&(Q.actives=p.length===1?p[0]:p),this.tronWeb.fullNode.request("wallet/accountpermissionupdate",Q,"post").then(function(ne){return nt(ne,Q,{},b)}).catch(function(ne){return b(ne)})}},{key:"newTxID",value:(O=F()(X.a.mark(function h(d,f){return X.a.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(f){p.next=2;break}return p.abrupt("return",this.injectPromise(this.newTxID,d));case 2:this.tronWeb.fullNode.request("wallet/getsignweight",d,"post").then(function(b){return typeof d.visible=="boolean"&&(b.transaction.transaction.visible=d.visible),nt(b.transaction.transaction,xb(xb({},d.raw_data.contract[0].parameter.value),{},{Permission_id:d.raw_data.contract[0].Permission_id}),{data:d.raw_data.data,fee_limit:d.raw_data.fee_limit},f)}).catch(function(b){return f("Error generating a new transaction id.")});case 3:case"end":return p.stop()}},h,this)})),function(h,d){return O.apply(this,arguments)})},{key:"alterTransaction",value:(A=F()(X.a.mark(function h(d){var f,p,b=arguments;return X.a.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(f=b.length>1&&b[1]!==void 0?b[1]:{},p=b.length>2&&b[2]!==void 0&&b[2]){B.next=4;break}return B.abrupt("return",this.injectPromise(this.alterTransaction,d,f));case 4:if(!d.signature){B.next=6;break}return B.abrupt("return",p("You can not extend the expiration of a signed transaction."));case 6:if(!f.data){B.next=12;break}if(f.dataFormat!=="hex"&&(f.data=this.tronWeb.toHex(f.data)),f.data=f.data.replace(/^0x/,""),f.data.length!==0){B.next=11;break}return B.abrupt("return",p("Invalid data provided"));case 11:d.raw_data.data=f.data;case 12:if(!f.extension){B.next=17;break}if(f.extension=parseInt(1e3*f.extension),!(isNaN(f.extension)||d.raw_data.expiration+f.extension<=Date.now()+3e3)){B.next=16;break}return B.abrupt("return",p("Invalid extension provided"));case 16:d.raw_data.expiration+=f.extension;case 17:this.newTxID(d,p);case 18:case"end":return B.stop()}},h,this)})),function(h){return A.apply(this,arguments)})},{key:"extendExpiration",value:(C=F()(X.a.mark(function h(d,f){var p,b=arguments;return X.a.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(p=b.length>2&&b[2]!==void 0&&b[2]){B.next=3;break}return B.abrupt("return",this.injectPromise(this.extendExpiration,d,f));case 3:this.alterTransaction(d,{extension:f},p);case 4:case"end":return B.stop()}},h,this)})),function(h,d){return C.apply(this,arguments)})},{key:"addUpdateData",value:(m=F()(X.a.mark(function h(d,f){var p,b,B=arguments;return X.a.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(p=B.length>2&&B[2]!==void 0?B[2]:"utf8",b=B.length>3&&B[3]!==void 0&&B[3],S.isFunction(p)&&(b=p,p="utf8"),b){D.next=5;break}return D.abrupt("return",this.injectPromise(this.addUpdateData,d,f,p));case 5:this.alterTransaction(d,{data:f,dataFormat:p},b);case 6:case"end":return D.stop()}},h,this)})),function(h,d){return m.apply(this,arguments)})}]),v}();function _b(v,m){var C=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);m&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),C.push.apply(C,A)}return C}function Ln(v){for(var m=1;m<arguments.length;m++){var C=arguments[m]!=null?arguments[m]:{};m%2?_b(Object(C),!0).forEach(function(A){be()(v,A,C[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(C)):_b(Object(C)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(C,A))})}return v}function Xo(v){return st.address.toHex(v)}var Cb=function(){function v(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(ae()(this,v),!E||!E instanceof st)throw new Error("Expected instance of TronWeb");this.tronWeb=E,this.injectPromise=Un()(this),this.cache={contracts:{}},this.validator=new wp(E)}var m,C,A,O,h,d,f,p,b,B,D,J,Q,ne,he,Te,ke;return Ce()(v,[{key:"_parseToken",value:function(E){return Ln(Ln({},E),{},{name:this.tronWeb.toUtf8(E.name),abbr:E.abbr&&this.tronWeb.toUtf8(E.abbr),description:E.description&&this.tronWeb.toUtf8(E.description),url:E.url&&this.tronWeb.toUtf8(E.url)})}},{key:"getCurrentBlock",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!E)return this.injectPromise(this.getCurrentBlock);this.tronWeb.fullNode.request("wallet/getnowblock").then(function(w){E(null,w)}).catch(function(w){return E(w)})}},{key:"getConfirmedCurrentBlock",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!E)return this.injectPromise(this.getConfirmedCurrentBlock);this.tronWeb.solidityNode.request("walletsolidity/getnowblock").then(function(w){E(null,w)}).catch(function(w){return E(w)})}},{key:"getBlock",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultBlock,w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return S.isFunction(E)&&(w=E,E=this.tronWeb.defaultBlock),w?E===!1?w("No block identifier provided"):(E=="earliest"&&(E=0),E=="latest"?this.getCurrentBlock(w):isNaN(E)&&S.isHex(E)?this.getBlockByHash(E,w):void this.getBlockByNumber(E,w)):this.injectPromise(this.getBlock,E)}},{key:"getBlockByHash",value:function(E){var w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!w)return this.injectPromise(this.getBlockByHash,E);this.tronWeb.fullNode.request("wallet/getblockbyid",{value:E},"post").then(function(_){if(!Object.keys(_).length)return w("Block not found");w(null,_)}).catch(function(_){return w(_)})}},{key:"getBlockByNumber",value:function(E){var w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return w?!S.isInteger(E)||E<0?w("Invalid block number provided"):void this.tronWeb.fullNode.request("wallet/getblockbynum",{num:parseInt(E)},"post").then(function(_){if(!Object.keys(_).length)return w("Block not found");w(null,_)}).catch(function(_){return w(_)}):this.injectPromise(this.getBlockByNumber,E)}},{key:"getBlockTransactionCount",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultBlock,w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(S.isFunction(E)&&(w=E,E=this.tronWeb.defaultBlock),!w)return this.injectPromise(this.getBlockTransactionCount,E);this.getBlock(E).then(function(_){var T=_.transactions;w(null,(T===void 0?[]:T).length)}).catch(function(_){return w(_)})}},{key:"getTransactionFromBlock",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultBlock,w=arguments.length>1?arguments[1]:void 0,_=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(S.isFunction(w)&&(_=w,w=0),S.isFunction(E)&&(_=E,E=this.tronWeb.defaultBlock),!_)return this.injectPromise(this.getTransactionFromBlock,E,w);this.getBlock(E).then(function(T){var P=T.transactions,I=P!==void 0&&P;I?typeof w=="number"?w>=0&&w<I.length?_(null,I[w]):_("Invalid transaction index provided"):_(null,I):_("Transaction not found in block")}).catch(function(T){return _(T)})}},{key:"getTransaction",value:function(E){var w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!w)return this.injectPromise(this.getTransaction,E);this.tronWeb.fullNode.request("wallet/gettransactionbyid",{value:E},"post").then(function(_){if(!Object.keys(_).length)return w("Transaction not found");w(null,_)}).catch(function(_){return w(_)})}},{key:"getConfirmedTransaction",value:function(E){var w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!w)return this.injectPromise(this.getConfirmedTransaction,E);this.tronWeb.solidityNode.request("walletsolidity/gettransactionbyid",{value:E},"post").then(function(_){if(!Object.keys(_).length)return w("Transaction not found");w(null,_)}).catch(function(_){return w(_)})}},{key:"getUnconfirmedTransactionInfo",value:function(E){var w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this._getTransactionInfoById(E,{confirmed:!1},w)}},{key:"getTransactionInfo",value:function(E){var w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this._getTransactionInfoById(E,{confirmed:!0},w)}},{key:"_getTransactionInfoById",value:function(E,w){var _=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(!_)return this.injectPromise(this._getTransactionInfoById,E,w);this.tronWeb[w.confirmed?"solidityNode":"fullNode"].request("wallet".concat(w.confirmed?"solidity":"","/gettransactioninfobyid"),{value:E},"post").then(function(T){_(null,T)}).catch(function(T){return _(T)})}},{key:"getTransactionsToAddress",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:30,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,T=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return S.isFunction(_)&&(T=_,_=0),S.isFunction(w)&&(T=w,w=30),T?(E=this.tronWeb.address.toHex(E),this.getTransactionsRelated(E,"to",w,_,T)):this.injectPromise(this.getTransactionsToAddress,E,w,_)}},{key:"getTransactionsFromAddress",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:30,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,T=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return S.isFunction(_)&&(T=_,_=0),S.isFunction(w)&&(T=w,w=30),T?(E=this.tronWeb.address.toHex(E),this.getTransactionsRelated(E,"from",w,_,T)):this.injectPromise(this.getTransactionsFromAddress,E,w,_)}},{key:"getTransactionsRelated",value:(ke=F()(X.a.mark(function E(){var w,_,T,P,I,L,V,q,U,z=arguments;return X.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:if(w=z.length>0&&z[0]!==void 0?z[0]:this.tronWeb.defaultAddress.hex,_=z.length>1&&z[1]!==void 0?z[1]:"all",T=z.length>2&&z[2]!==void 0?z[2]:30,P=z.length>3&&z[3]!==void 0?z[3]:0,I=z.length>4&&z[4]!==void 0&&z[4],S.isFunction(P)&&(I=P,P=0),S.isFunction(T)&&(I=T,T=30),S.isFunction(_)&&(I=_,_="all"),S.isFunction(w)&&(I=w,w=this.tronWeb.defaultAddress.hex),I){$.next=11;break}return $.abrupt("return",this.injectPromise(this.getTransactionsRelated,w,_,T,P));case 11:if(["to","from","all"].includes(_)){$.next=13;break}return $.abrupt("return",I('Invalid direction provided: Expected "to", "from" or "all"'));case 13:if(_!="all"){$.next=27;break}return $.prev=14,$.next=17,Promise.all([this.getTransactionsRelated(w,"from",T,P),this.getTransactionsRelated(w,"to",T,P)]);case 17:return L=$.sent,V=pl()(L,2),q=V[0],U=V[1],$.abrupt("return",I(null,[].concat(At()(q.map(function(j){return j.direction="from",j})),At()(U.map(function(j){return j.direction="to",j}))).sort(function(j,Y){return Y.raw_data.timestamp-j.raw_data.timestamp})));case 24:return $.prev=24,$.t0=$.catch(14),$.abrupt("return",I($.t0));case 27:if(this.tronWeb.isAddress(w)){$.next=29;break}return $.abrupt("return",I("Invalid address provided"));case 29:if(!(!S.isInteger(T)||T<0||P&&T<1)){$.next=31;break}return $.abrupt("return",I("Invalid limit provided"));case 31:if(S.isInteger(P)&&!(P<0)){$.next=33;break}return $.abrupt("return",I("Invalid offset provided"));case 33:w=this.tronWeb.address.toHex(w),this.tronWeb.solidityNode.request("walletextension/gettransactions".concat(_,"this"),{account:{address:w},offset:P,limit:T},"post").then(function(j){var Y=j.transaction;I(null,Y)}).catch(function(j){return I(j)});case 35:case"end":return $.stop()}},E,this,[[14,24]])})),function(){return ke.apply(this,arguments)})},{key:"getAccount",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return S.isFunction(E)&&(w=E,E=this.tronWeb.defaultAddress.hex),w?this.tronWeb.isAddress(E)?(E=this.tronWeb.address.toHex(E),void this.tronWeb.solidityNode.request("walletsolidity/getaccount",{address:E},"post").then(function(_){w(null,_)}).catch(function(_){return w(_)})):w("Invalid address provided"):this.injectPromise(this.getAccount,E)}},{key:"getAccountById",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0],w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!w)return this.injectPromise(this.getAccountById,E);this.getAccountInfoById(E,{confirmed:!0},w)}},{key:"getAccountInfoById",value:function(E,w,_){this.validator.notValid([{name:"accountId",type:"hex",value:E},{name:"accountId",type:"string",lte:32,gte:8,value:E}],_)||(E.startsWith("0x")&&(E=E.slice(2)),this.tronWeb[w.confirmed?"solidityNode":"fullNode"].request("wallet".concat(w.confirmed?"solidity":"","/getaccountbyid"),{account_id:E},"post").then(function(T){_(null,T)}).catch(function(T){return _(T)}))}},{key:"getBalance",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(S.isFunction(E)&&(w=E,E=this.tronWeb.defaultAddress.hex),!w)return this.injectPromise(this.getBalance,E);this.getAccount(E).then(function(_){var T=_.balance;w(null,T===void 0?0:T)}).catch(function(_){return w(_)})}},{key:"getUnconfirmedAccount",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return S.isFunction(E)&&(w=E,E=this.tronWeb.defaultAddress.hex),w?this.tronWeb.isAddress(E)?(E=this.tronWeb.address.toHex(E),void this.tronWeb.fullNode.request("wallet/getaccount",{address:E},"post").then(function(_){w(null,_)}).catch(function(_){return w(_)})):w("Invalid address provided"):this.injectPromise(this.getUnconfirmedAccount,E)}},{key:"getUnconfirmedAccountById",value:function(E){var w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!w)return this.injectPromise(this.getUnconfirmedAccountById,E);this.getAccountInfoById(E,{confirmed:!1},w)}},{key:"getUnconfirmedBalance",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(S.isFunction(E)&&(w=E,E=this.tronWeb.defaultAddress.hex),!w)return this.injectPromise(this.getUnconfirmedBalance,E);this.getUnconfirmedAccount(E).then(function(_){var T=_.balance;w(null,T===void 0?0:T)}).catch(function(_){return w(_)})}},{key:"getBandwidth",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return S.isFunction(E)&&(w=E,E=this.tronWeb.defaultAddress.hex),w?this.tronWeb.isAddress(E)?(E=this.tronWeb.address.toHex(E),void this.tronWeb.fullNode.request("wallet/getaccountnet",{address:E},"post").then(function(_){var T=_.freeNetUsed,P=T===void 0?0:T,I=_.freeNetLimit,L=I===void 0?0:I,V=_.NetUsed,q=V===void 0?0:V,U=_.NetLimit;w(null,L-P+((U===void 0?0:U)-q))}).catch(function(_){return w(_)})):w("Invalid address provided"):this.injectPromise(this.getBandwidth,E)}},{key:"getTokensIssuedByAddress",value:function(){var E=this,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,_=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return S.isFunction(w)&&(_=w,w=this.tronWeb.defaultAddress.hex),_?this.tronWeb.isAddress(w)?(w=this.tronWeb.address.toHex(w),void this.tronWeb.fullNode.request("wallet/getassetissuebyaccount",{address:w},"post").then(function(T){var P=T.assetIssue,I=P!==void 0&&P;if(!I)return _(null,{});var L=I.map(function(V){return E._parseToken(V)}).reduce(function(V,q){return V[q.name]=q,V},{});_(null,L)}).catch(function(T){return _(T)})):_("Invalid address provided"):this.injectPromise(this.getTokensIssuedByAddress,w)}},{key:"getTokenFromID",value:function(){var E=this,w=arguments.length>0&&arguments[0]!==void 0&&arguments[0],_=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return _?(S.isInteger(w)&&(w=w.toString()),S.isString(w)&&w.length?void this.tronWeb.fullNode.request("wallet/getassetissuebyname",{value:this.tronWeb.fromUtf8(w)},"post").then(function(T){if(!T.name)return _("Token does not exist");_(null,E._parseToken(T))}).catch(function(T){return _(T)}):_("Invalid token ID provided")):this.injectPromise(this.getTokenFromID,w)}},{key:"listNodes",value:function(){var E=this,w=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!w)return this.injectPromise(this.listNodes);this.tronWeb.fullNode.request("wallet/listnodes").then(function(_){var T=_.nodes;w(null,(T===void 0?[]:T).map(function(P){var I=P.address,L=I.host,V=I.port;return"".concat(E.tronWeb.toUtf8(L),":").concat(V)}))}).catch(function(_){return w(_)})}},{key:"getBlockRange",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:30,_=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return S.isFunction(w)&&(_=w,w=30),S.isFunction(E)&&(_=E,E=0),_?!S.isInteger(E)||E<0?_("Invalid start of range provided"):!S.isInteger(w)||w<=E?_("Invalid end of range provided"):void this.tronWeb.fullNode.request("wallet/getblockbylimitnext",{startNum:parseInt(E),endNum:parseInt(w)+1},"post").then(function(T){var P=T.block;_(null,P===void 0?[]:P)}).catch(function(T){return _(T)}):this.injectPromise(this.getBlockRange,E,w)}},{key:"listSuperRepresentatives",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!E)return this.injectPromise(this.listSuperRepresentatives);this.tronWeb.fullNode.request("wallet/listwitnesses").then(function(w){var _=w.witnesses;E(null,_===void 0?[]:_)}).catch(function(w){return E(w)})}},{key:"listTokens",value:function(){var E=this,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return S.isFunction(_)&&(T=_,_=0),S.isFunction(w)&&(T=w,w=0),T?!S.isInteger(w)||w<0||_&&w<1?T("Invalid limit provided"):!S.isInteger(_)||_<0?T("Invalid offset provided"):w?void this.tronWeb.fullNode.request("wallet/getpaginatedassetissuelist",{offset:parseInt(_),limit:parseInt(w)},"post").then(function(P){var I=P.assetIssue;T(null,(I===void 0?[]:I).map(function(L){return E._parseToken(L)}))}).catch(function(P){return T(P)}):this.tronWeb.fullNode.request("wallet/getassetissuelist").then(function(P){var I=P.assetIssue;T(null,(I===void 0?[]:I).map(function(L){return E._parseToken(L)}))}).catch(function(P){return T(P)}):this.injectPromise(this.listTokens,w,_)}},{key:"timeUntilNextVoteCycle",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!E)return this.injectPromise(this.timeUntilNextVoteCycle);this.tronWeb.fullNode.request("wallet/getnextmaintenancetime").then(function(w){var _=w.num,T=_===void 0?-1:_;if(T==-1)return E("Failed to get time until next vote cycle");E(null,Math.floor(T/1e3))}).catch(function(w){return E(w)})}},{key:"getContract",value:function(E){var w=this,_=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return _?this.tronWeb.isAddress(E)?void(this.cache.contracts[E]?_(null,this.cache.contracts[E]):(E=this.tronWeb.address.toHex(E),this.tronWeb.fullNode.request("wallet/getcontract",{value:E}).then(function(T){if(T.Error)return _("Contract does not exist");w.cache.contracts[E]=T,_(null,T)}).catch(function(T){return _(T)}))):_("Invalid contract address provided"):this.injectPromise(this.getContract,E)}},{key:"verifyMessage",value:(Te=F()(X.a.mark(function E(){var w,_,T,P,I,L=arguments;return X.a.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(w=L.length>0&&L[0]!==void 0&&L[0],_=L.length>1&&L[1]!==void 0&&L[1],T=L.length>2&&L[2]!==void 0?L[2]:this.tronWeb.defaultAddress.base58,P=!(L.length>3&&L[3]!==void 0)||L[3],I=L.length>4&&L[4]!==void 0&&L[4],S.isFunction(T)&&(I=T,T=this.tronWeb.defaultAddress.base58,P=!0),S.isFunction(P)&&(I=P,P=!0),I){V.next=9;break}return V.abrupt("return",this.injectPromise(this.verifyMessage,w,_,T,P));case 9:if(S.isHex(w)){V.next=11;break}return V.abrupt("return",I("Expected hex message input"));case 11:if(!v.verifySignature(w,T,_,P)){V.next=13;break}return V.abrupt("return",I(null,!0));case 13:I("Signature does not match");case 14:case"end":return V.stop()}},E,this)})),function(){return Te.apply(this,arguments)})},{key:"verifyMessageV2",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0],w=arguments.length>1&&arguments[1]!==void 0&&arguments[1],_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},T=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(S.isFunction(_)&&(T=_,_={}),!T)return this.injectPromise(this.verifyMessageV2,E,w,_);try{var P=v.verifyMessageV2(E,w);T(null,P)}catch(I){T(I)}}},{key:"verifyTypedData",value:function(E,w,_,T){var P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.tronWeb.defaultAddress.base58,I=arguments.length>5&&arguments[5]!==void 0&&arguments[5];return S.isFunction(P)&&(I=P,P=this.tronWeb.defaultAddress.base58),I?v.verifyTypedData(E,w,_,T,P)?I(null,!0):void I("Signature does not match"):this.injectPromise(this.verifyTypedData,E,w,_,T,P)}},{key:"sign",value:(he=F()(X.a.mark(function E(){var w,_,T,P,I,L,V=arguments;return X.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(w=V.length>0&&V[0]!==void 0&&V[0],_=V.length>1&&V[1]!==void 0?V[1]:this.tronWeb.defaultPrivateKey,T=!(V.length>2&&V[2]!==void 0)||V[2],P=V.length>3&&V[3]!==void 0&&V[3],I=V.length>4&&V[4]!==void 0&&V[4],S.isFunction(P)&&(I=P,P=!1),S.isFunction(T)&&(I=T,T=!0,P=!1),S.isFunction(_)&&(I=_,_=this.tronWeb.defaultPrivateKey,T=!0,P=!1),I){q.next=10;break}return q.abrupt("return",this.injectPromise(this.sign,w,_,T,P));case 10:if(!S.isString(w)){q.next=21;break}if(S.isHex(w)){q.next=13;break}return q.abrupt("return",I("Expected hex message input"));case 13:return q.prev=13,L=v.signString(w,_,T),q.abrupt("return",I(null,L));case 18:q.prev=18,q.t0=q.catch(13),I(q.t0);case 21:if(S.isObject(w)){q.next=23;break}return q.abrupt("return",I("Invalid transaction provided"));case 23:if(P||!w.signature){q.next=25;break}return q.abrupt("return",I("Transaction is already signed"));case 25:if(q.prev=25,P){q.next=32;break}if(this.tronWeb.address.toHex(this.tronWeb.address.fromPrivateKey(_)).toLowerCase()===this.tronWeb.address.toHex(w.raw_data.contract[0].parameter.value.owner_address)){q.next=30;break}return q.abrupt("return",I("Private key does not match address in transaction"));case 30:if(xp(w)){q.next=32;break}return q.abrupt("return",I("Invalid transaction"));case 32:return q.abrupt("return",I(null,S.crypto.signTransaction(_,w)));case 35:q.prev=35,q.t1=q.catch(25),I(q.t1);case 38:case"end":return q.stop()}},E,this,[[13,18],[25,35]])})),function(){return he.apply(this,arguments)})},{key:"signMessageV2",value:function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultPrivateKey,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},T=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(S.isFunction(_)&&(T=_,_={}),S.isFunction(w)&&(T=w,w=this.tronWeb.defaultPrivateKey),!T)return this.injectPromise(this.signMessageV2,E,w);try{var P=v.signMessageV2(E,w);return T(null,P)}catch(I){T(I)}}},{key:"_signTypedData",value:function(E,w,_){var T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.tronWeb.defaultPrivateKey,P=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(S.isFunction(T)&&(P=T,T=this.tronWeb.defaultPrivateKey),!P)return this.injectPromise(this._signTypedData,E,w,_,T);try{var I=v._signTypedData(E,w,_,T);return P(null,I)}catch(L){P(L)}}},{key:"multiSign",value:(ne=F()(X.a.mark(function E(){var w,_,T,P,I,L,V,q=arguments;return X.a.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:if(w=q.length>0&&q[0]!==void 0&&q[0],_=q.length>1&&q[1]!==void 0?q[1]:this.tronWeb.defaultPrivateKey,T=q.length>2&&q[2]!==void 0&&q[2],P=q.length>3&&q[3]!==void 0&&q[3],S.isFunction(T)&&(P=T,T=0),S.isFunction(_)&&(P=_,_=this.tronWeb.defaultPrivateKey,T=0),P){U.next=8;break}return U.abrupt("return",this.injectPromise(this.multiSign,w,_,T));case 8:if(S.isObject(w)&&w.raw_data&&w.raw_data.contract){U.next=10;break}return U.abrupt("return",P("Invalid transaction provided"));case 10:if(w.raw_data.contract[0].Permission_id||!(T>0)){U.next=30;break}return w.raw_data.contract[0].Permission_id=T,I=this.tronWeb.address.toHex(this.tronWeb.address.fromPrivateKey(_)).toLowerCase(),U.next=15,this.getSignWeight(w,T);case 15:if((L=U.sent).result.code!=="PERMISSION_ERROR"){U.next=18;break}return U.abrupt("return",P(L.result.message));case 18:if(V=!1,L.permission.keys.map(function(z){z.address===I&&(V=!0)}),V){U.next=22;break}return U.abrupt("return",P(_+" has no permission to sign"));case 22:if(!L.approved_list||L.approved_list.indexOf(I)==-1){U.next=24;break}return U.abrupt("return",P(_+" already sign transaction"));case 24:if(!L.transaction||!L.transaction.transaction){U.next=29;break}w=L.transaction.transaction,T>0&&(w.raw_data.contract[0].Permission_id=T),U.next=30;break;case 29:return U.abrupt("return",P("Invalid transaction provided"));case 30:if(U.prev=30,xp(w)){U.next=33;break}return U.abrupt("return",P("Invalid transaction"));case 33:return U.abrupt("return",P(null,S.crypto.signTransaction(_,w)));case 36:U.prev=36,U.t0=U.catch(30),P(U.t0);case 39:case"end":return U.stop()}},E,this,[[30,36]])})),function(){return ne.apply(this,arguments)})},{key:"getApprovedList",value:(Q=F()(X.a.mark(function E(w){var _,T=arguments;return X.a.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(_=T.length>1&&T[1]!==void 0&&T[1]){P.next=3;break}return P.abrupt("return",this.injectPromise(this.getApprovedList,w));case 3:if(S.isObject(w)){P.next=5;break}return P.abrupt("return",_("Invalid transaction provided"));case 5:this.tronWeb.fullNode.request("wallet/getapprovedlist",w,"post").then(function(I){_(null,I)}).catch(function(I){return _(I)});case 6:case"end":return P.stop()}},E,this)})),function(E){return Q.apply(this,arguments)})},{key:"getSignWeight",value:(J=F()(X.a.mark(function E(w,_){var T,P=arguments;return X.a.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(T=P.length>2&&P[2]!==void 0&&P[2],S.isFunction(_)&&(T=_,_=void 0),T){I.next=4;break}return I.abrupt("return",this.injectPromise(this.getSignWeight,w,_));case 4:if(S.isObject(w)&&w.raw_data&&w.raw_data.contract){I.next=6;break}return I.abrupt("return",T("Invalid transaction provided"));case 6:if(S.isInteger(_)?w.raw_data.contract[0].Permission_id=parseInt(_):typeof w.raw_data.contract[0].Permission_id!="number"&&(w.raw_data.contract[0].Permission_id=0),S.isObject(w)){I.next=9;break}return I.abrupt("return",T("Invalid transaction provided"));case 9:this.tronWeb.fullNode.request("wallet/getsignweight",w,"post").then(function(L){T(null,L)}).catch(function(L){return T(L)});case 10:case"end":return I.stop()}},E,this)})),function(E,w){return J.apply(this,arguments)})},{key:"sendRawTransaction",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0],w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return S.isFunction(w)&&(_=w,w={}),_?S.isObject(E)?S.isObject(w)?E.signature&&S.isArray(E.signature)?void this.tronWeb.fullNode.request("wallet/broadcasttransaction",E,"post").then(function(T){T.result&&(T.transaction=E),_(null,T)}).catch(function(T){return _(T)}):_("Transaction is not signed"):_("Invalid options provided"):_("Invalid transaction provided"):this.injectPromise(this.sendRawTransaction,E,w)}},{key:"sendHexTransaction",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0],w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(S.isFunction(w)&&(_=w,w={}),!_)return this.injectPromise(this.sendHexTransaction,E,w);if(!S.isHex(E))return _("Invalid hex transaction provided");if(!S.isObject(w))return _("Invalid options provided");var T={transaction:E};this.tronWeb.fullNode.request("wallet/broadcasthex",T,"post").then(function(P){P.result&&(P.transaction=JSON.parse(P.transaction),P.hexTransaction=E),_(null,P)}).catch(function(P){return _(P)})}},{key:"sendTransaction",value:(D=F()(X.a.mark(function E(){var w,_,T,P,I,L,V,q,U=arguments;return X.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(w=U.length>0&&U[0]!==void 0&&U[0],_=U.length>1&&U[1]!==void 0&&U[1],T=U.length>2&&U[2]!==void 0?U[2]:{},P=U.length>3&&U[3]!==void 0&&U[3],S.isFunction(T)&&(P=T,T={}),typeof T=="string"&&(T={privateKey:T}),P){z.next=8;break}return z.abrupt("return",this.injectPromise(this.sendTransaction,w,_,T));case 8:if(this.tronWeb.isAddress(w)){z.next=10;break}return z.abrupt("return",P("Invalid recipient provided"));case 10:if(S.isInteger(_)&&!(_<=0)){z.next=12;break}return z.abrupt("return",P("Invalid amount provided"));case 12:if((T=Ln({privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex},T)).privateKey||T.address){z.next=15;break}return z.abrupt("return",P("Function requires either a private key or address to be set"));case 15:return z.prev=15,I=T.privateKey?this.tronWeb.address.fromPrivateKey(T.privateKey):T.address,z.next=19,this.tronWeb.transactionBuilder.sendTrx(w,_,I);case 19:return L=z.sent,z.next=22,this.sign(L,T.privateKey||void 0);case 22:return V=z.sent,z.next=25,this.sendRawTransaction(V);case 25:return q=z.sent,z.abrupt("return",P(null,q));case 29:return z.prev=29,z.t0=z.catch(15),z.abrupt("return",P(z.t0));case 32:case"end":return z.stop()}},E,this,[[15,29]])})),function(){return D.apply(this,arguments)})},{key:"sendToken",value:(B=F()(X.a.mark(function E(){var w,_,T,P,I,L,V,q,U,z=arguments;return X.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:if(w=z.length>0&&z[0]!==void 0&&z[0],_=z.length>1&&z[1]!==void 0&&z[1],T=z.length>2&&z[2]!==void 0&&z[2],P=z.length>3&&z[3]!==void 0?z[3]:{},I=z.length>4&&z[4]!==void 0&&z[4],S.isFunction(P)&&(I=P,P={}),typeof P=="string"&&(P={privateKey:P}),I){$.next=9;break}return $.abrupt("return",this.injectPromise(this.sendToken,w,_,T,P));case 9:if(this.tronWeb.isAddress(w)){$.next=11;break}return $.abrupt("return",I("Invalid recipient provided"));case 11:if(S.isInteger(_)&&!(_<=0)){$.next=13;break}return $.abrupt("return",I("Invalid amount provided"));case 13:if(S.isInteger(T)&&(T=T.toString()),S.isString(T)){$.next=16;break}return $.abrupt("return",I("Invalid token ID provided"));case 16:if((P=Ln({privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex},P)).privateKey||P.address){$.next=19;break}return $.abrupt("return",I("Function requires either a private key or address to be set"));case 19:return $.prev=19,L=P.privateKey?this.tronWeb.address.fromPrivateKey(P.privateKey):P.address,$.next=23,this.tronWeb.transactionBuilder.sendToken(w,_,T,L);case 23:return V=$.sent,$.next=26,this.sign(V,P.privateKey||void 0);case 26:return q=$.sent,$.next=29,this.sendRawTransaction(q);case 29:return U=$.sent,$.abrupt("return",I(null,U));case 33:return $.prev=33,$.t0=$.catch(19),$.abrupt("return",I($.t0));case 36:case"end":return $.stop()}},E,this,[[19,33]])})),function(){return B.apply(this,arguments)})},{key:"freezeBalance",value:(b=F()(X.a.mark(function E(){var w,_,T,P,I,L,V,q,U,z,$=arguments;return X.a.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(w=$.length>0&&$[0]!==void 0?$[0]:0,_=$.length>1&&$[1]!==void 0?$[1]:3,T=$.length>2&&$[2]!==void 0?$[2]:"BANDWIDTH",P=$.length>3&&$[3]!==void 0?$[3]:{},I=$.length>4&&$[4]!==void 0?$[4]:void 0,L=$.length>5&&$[5]!==void 0&&$[5],S.isFunction(I)&&(L=I,I=void 0),S.isFunction(_)&&(L=_,_=3),S.isFunction(T)&&(L=T,T="BANDWIDTH"),S.isFunction(P)&&(L=P,P={}),typeof P=="string"&&(P={privateKey:P}),L){j.next=13;break}return j.abrupt("return",this.injectPromise(this.freezeBalance,w,_,T,P,I));case 13:if(["BANDWIDTH","ENERGY"].includes(T)){j.next=15;break}return j.abrupt("return",L('Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'));case 15:if(S.isInteger(w)&&!(w<=0)){j.next=17;break}return j.abrupt("return",L("Invalid amount provided"));case 17:if(S.isInteger(_)&&!(_<3)){j.next=19;break}return j.abrupt("return",L("Invalid duration provided, minimum of 3 days"));case 19:if((P=Ln({privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex},P)).privateKey||P.address){j.next=22;break}return j.abrupt("return",L("Function requires either a private key or address to be set"));case 22:return j.prev=22,V=P.privateKey?this.tronWeb.address.fromPrivateKey(P.privateKey):P.address,j.next=26,this.tronWeb.transactionBuilder.freezeBalance(w,_,T,V,I);case 26:return q=j.sent,j.next=29,this.sign(q,P.privateKey||void 0);case 29:return U=j.sent,j.next=32,this.sendRawTransaction(U);case 32:return z=j.sent,j.abrupt("return",L(null,z));case 36:return j.prev=36,j.t0=j.catch(22),j.abrupt("return",L(j.t0));case 39:case"end":return j.stop()}},E,this,[[22,36]])})),function(){return b.apply(this,arguments)})},{key:"unfreezeBalance",value:(p=F()(X.a.mark(function E(){var w,_,T,P,I,L,V,q,U=arguments;return X.a.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(w=U.length>0&&U[0]!==void 0?U[0]:"BANDWIDTH",_=U.length>1&&U[1]!==void 0?U[1]:{},T=U.length>2&&U[2]!==void 0?U[2]:void 0,P=U.length>3&&U[3]!==void 0&&U[3],S.isFunction(T)&&(P=T,T=void 0),S.isFunction(w)&&(P=w,w="BANDWIDTH"),S.isFunction(_)&&(P=_,_={}),typeof _=="string"&&(_={privateKey:_}),P){z.next=10;break}return z.abrupt("return",this.injectPromise(this.unfreezeBalance,w,_,T));case 10:if(["BANDWIDTH","ENERGY"].includes(w)){z.next=12;break}return z.abrupt("return",P('Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'));case 12:if((_=Ln({privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex},_)).privateKey||_.address){z.next=15;break}return z.abrupt("return",P("Function requires either a private key or address to be set"));case 15:return z.prev=15,I=_.privateKey?this.tronWeb.address.fromPrivateKey(_.privateKey):_.address,z.next=19,this.tronWeb.transactionBuilder.unfreezeBalance(w,I,T);case 19:return L=z.sent,z.next=22,this.sign(L,_.privateKey||void 0);case 22:return V=z.sent,z.next=25,this.sendRawTransaction(V);case 25:return q=z.sent,z.abrupt("return",P(null,q));case 29:return z.prev=29,z.t0=z.catch(15),z.abrupt("return",P(z.t0));case 32:case"end":return z.stop()}},E,this,[[15,29]])})),function(){return p.apply(this,arguments)})},{key:"updateAccount",value:(f=F()(X.a.mark(function E(){var w,_,T,P,I,L,V,q=arguments;return X.a.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:if(w=q.length>0&&q[0]!==void 0&&q[0],_=q.length>1&&q[1]!==void 0?q[1]:{},T=q.length>2&&q[2]!==void 0&&q[2],S.isFunction(_)&&(T=_,_={}),typeof _=="string"&&(_={privateKey:_}),T){U.next=7;break}return U.abrupt("return",this.injectPromise(this.updateAccount,w,_));case 7:if(S.isString(w)&&w.length){U.next=9;break}return U.abrupt("return",T("Name must be a string"));case 9:if((_=Ln({privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex},_)).privateKey||_.address){U.next=12;break}return U.abrupt("return",T("Function requires either a private key or address to be set"));case 12:return U.prev=12,P=_.privateKey?this.tronWeb.address.fromPrivateKey(_.privateKey):_.address,U.next=16,this.tronWeb.transactionBuilder.updateAccount(w,P);case 16:return I=U.sent,U.next=19,this.sign(I,_.privateKey||void 0);case 19:return L=U.sent,U.next=22,this.sendRawTransaction(L);case 22:return V=U.sent,U.abrupt("return",T(null,V));case 26:return U.prev=26,U.t0=U.catch(12),U.abrupt("return",T(U.t0));case 29:case"end":return U.stop()}},E,this,[[12,26]])})),function(){return f.apply(this,arguments)})},{key:"signMessage",value:function(){return this.sign.apply(this,arguments)}},{key:"sendAsset",value:function(){return this.sendToken.apply(this,arguments)}},{key:"send",value:function(){return this.sendTransaction.apply(this,arguments)}},{key:"sendTrx",value:function(){return this.sendTransaction.apply(this,arguments)}},{key:"broadcast",value:function(){return this.sendRawTransaction.apply(this,arguments)}},{key:"broadcastHex",value:function(){return this.sendHexTransaction.apply(this,arguments)}},{key:"signTransaction",value:function(){return this.sign.apply(this,arguments)}},{key:"getProposal",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0],w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return w?!S.isInteger(E)||E<0?w("Invalid proposalID provided"):void this.tronWeb.fullNode.request("wallet/getproposalbyid",{id:parseInt(E)},"post").then(function(_){w(null,_)}).catch(function(_){return w(_)}):this.injectPromise(this.getProposal,E)}},{key:"listProposals",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!E)return this.injectPromise(this.listProposals);this.tronWeb.fullNode.request("wallet/listproposals",{},"post").then(function(w){var _=w.proposals;E(null,_===void 0?[]:_)}).catch(function(w){return E(w)})}},{key:"getChainParameters",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!E)return this.injectPromise(this.getChainParameters);this.tronWeb.fullNode.request("wallet/getchainparameters",{},"post").then(function(w){var _=w.chainParameter;E(null,_===void 0?[]:_)}).catch(function(w){return E(w)})}},{key:"getAccountResources",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return w?this.tronWeb.isAddress(E)?void this.tronWeb.fullNode.request("wallet/getaccountresource",{address:this.tronWeb.address.toHex(E)},"post").then(function(_){w(null,_)}).catch(function(_){return w(_)}):w("Invalid address provided"):this.injectPromise(this.getAccountResources,E)}},{key:"getDelegatedResourceV2",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.tronWeb.defaultAddress.hex,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{confirmed:!0},T=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return S.isFunction(_)&&(T=_,_={confirmed:!0}),S.isFunction(w)&&(T=w,w=this.tronWeb.defaultAddress.hex),S.isFunction(E)&&(T=E,E=this.tronWeb.defaultAddress.hex,w=this.tronWeb.defaultAddress.hex),T?this.tronWeb.isAddress(E)&&this.tronWeb.isAddress(w)?void this.tronWeb[_.confirmed?"solidityNode":"fullNode"].request("wallet".concat(_.confirmed?"solidity":"","/getdelegatedresourcev2"),{fromAddress:Xo(E),toAddress:Xo(w)},"post").then(function(P){T(null,P)}).catch(function(P){return T(P)}):T("Invalid address provided"):this.injectPromise(this.getDelegatedResourceV2,E,w,_)}},{key:"getDelegatedResourceAccountIndexV2",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{confirmed:!0},_=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return S.isFunction(w)&&(_=w,w={confirmed:!0}),S.isFunction(E)&&(_=E,E=this.tronWeb.defaultAddress.hex),_?this.tronWeb.isAddress(E)?void this.tronWeb[w.confirmed?"solidityNode":"fullNode"].request("wallet".concat(w.confirmed?"solidity":"","/getdelegatedresourceaccountindexv2"),{value:Xo(E)},"post").then(function(T){_(null,T)}).catch(function(T){return _(T)}):_("Invalid address provided"):this.injectPromise(this.getDelegatedResourceAccountIndexV2,E,w)}},{key:"getCanDelegatedMaxSize",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"BANDWIDTH",_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{confirmed:!0},T=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return S.isFunction(_)&&(T=_,_={confirmed:!0}),S.isFunction(w)&&(T=w,w="BANDWIDTH"),S.isFunction(E)&&(T=E,E=this.tronWeb.defaultAddress.hex),T?this.tronWeb.isAddress(E)?void(this.validator.notValid([{name:"resource",type:"resource",value:w,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}],T)||this.tronWeb[_.confirmed?"solidityNode":"fullNode"].request("wallet".concat(_.confirmed?"solidity":"","/getcandelegatedmaxsize"),{owner_address:Xo(E),type:w==="ENERGY"?1:0},"post").then(function(P){T(null,P)}).catch(function(P){return T(P)})):T("Invalid address provided"):this.injectPromise(this.getCanDelegatedMaxSize,E,w,_)}},{key:"getAvailableUnfreezeCount",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{confirmed:!0},_=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return S.isFunction(w)&&(_=w,w={confirmed:!0}),S.isFunction(E)&&(_=E,E=this.tronWeb.defaultAddress.hex),_?this.tronWeb.isAddress(E)?void this.tronWeb[w.confirmed?"solidityNode":"fullNode"].request("wallet".concat(w.confirmed?"solidity":"","/getavailableunfreezecount"),{owner_address:Xo(E)},"post").then(function(T){_(null,T)}).catch(function(T){return _(T)}):_("Invalid address provided"):this.injectPromise(this.getAvailableUnfreezeCount,E,w)}},{key:"getCanWithdrawUnfreezeAmount",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tronWeb.defaultAddress.hex,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Date.now(),_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{confirmed:!0},T=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return S.isFunction(_)&&(T=_,_={confirmed:!0}),S.isFunction(w)&&(T=w,w=Date.now()),S.isFunction(E)&&(T=E,E=this.tronWeb.defaultAddress.hex),T?this.tronWeb.isAddress(E)?!S.isInteger(w)||w<0?T("Invalid timestamp provided"):void this.tronWeb[_.confirmed?"solidityNode":"fullNode"].request("wallet".concat(_.confirmed?"solidity":"","/getcanwithdrawunfreezeamount"),{owner_address:Xo(E),timestamp:w},"post").then(function(P){T(null,P)}).catch(function(P){return T(P)}):T("Invalid address provided"):this.injectPromise(this.getCanWithdrawUnfreezeAmount,E,w,_)}},{key:"getExchangeByID",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0],w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return w?!S.isInteger(E)||E<0?w("Invalid exchangeID provided"):void this.tronWeb.fullNode.request("wallet/getexchangebyid",{id:E},"post").then(function(_){w(null,_)}).catch(function(_){return w(_)}):this.injectPromise(this.getExchangeByID,E)}},{key:"listExchanges",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!E)return this.injectPromise(this.listExchanges);this.tronWeb.fullNode.request("wallet/listexchanges",{},"post").then(function(w){var _=w.exchanges;E(null,_===void 0?[]:_)},"post").catch(function(w){return E(w)})}},{key:"listExchangesPaginated",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(S.isFunction(w)&&(_=w,w=0),S.isFunction(E)&&(_=E,E=10),!_)return this.injectPromise(this.listExchangesPaginated,E,w);this.tronWeb.fullNode.request("wallet/getpaginatedexchangelist",{limit:E,offset:w},"post").then(function(T){var P=T.exchanges;_(null,P===void 0?[]:P)}).catch(function(T){return _(T)})}},{key:"getNodeInfo",value:function(){var E=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!E)return this.injectPromise(this.getNodeInfo);this.tronWeb.fullNode.request("wallet/getnodeinfo",{},"post").then(function(w){E(null,w)},"post").catch(function(w){return E(w)})}},{key:"getTokenListByName",value:function(){var E=this,w=arguments.length>0&&arguments[0]!==void 0&&arguments[0],_=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return _?(S.isInteger(w)&&(w=w.toString()),S.isString(w)&&w.length?void this.tronWeb.fullNode.request("wallet/getassetissuelistbyname",{value:this.tronWeb.fromUtf8(w)},"post").then(function(T){if(Array.isArray(T.assetIssue))_(null,T.assetIssue.map(function(P){return E._parseToken(P)}));else if(!T.name)return _("Token does not exist");_(null,E._parseToken(T))}).catch(function(T){return _(T)}):_("Invalid token ID provided")):this.injectPromise(this.getTokenListByName,w)}},{key:"getTokenByID",value:function(){var E=this,w=arguments.length>0&&arguments[0]!==void 0&&arguments[0],_=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return _?(S.isInteger(w)&&(w=w.toString()),S.isString(w)&&w.length?void this.tronWeb.fullNode.request("wallet/getassetissuebyid",{value:w},"post").then(function(T){if(!T.name)return _("Token does not exist");_(null,E._parseToken(T))}).catch(function(T){return _(T)}):_("Invalid token ID provided")):this.injectPromise(this.getTokenByID,w)}},{key:"getReward",value:(d=F()(X.a.mark(function E(w){var _,T,P=arguments;return X.a.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return _=P.length>1&&P[1]!==void 0?P[1]:{},T=P.length>2&&P[2]!==void 0&&P[2],_.confirmed=!0,I.abrupt("return",this._getReward(w,_,T));case 4:case"end":return I.stop()}},E,this)})),function(E){return d.apply(this,arguments)})},{key:"getUnconfirmedReward",value:(h=F()(X.a.mark(function E(w){var _,T,P=arguments;return X.a.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return _=P.length>1&&P[1]!==void 0?P[1]:{},T=P.length>2&&P[2]!==void 0&&P[2],_.confirmed=!1,I.abrupt("return",this._getReward(w,_,T));case 4:case"end":return I.stop()}},E,this)})),function(E){return h.apply(this,arguments)})},{key:"getBrokerage",value:(O=F()(X.a.mark(function E(w){var _,T,P=arguments;return X.a.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return _=P.length>1&&P[1]!==void 0?P[1]:{},T=P.length>2&&P[2]!==void 0&&P[2],_.confirmed=!0,I.abrupt("return",this._getBrokerage(w,_,T));case 4:case"end":return I.stop()}},E,this)})),function(E){return O.apply(this,arguments)})},{key:"getUnconfirmedBrokerage",value:(A=F()(X.a.mark(function E(w){var _,T,P=arguments;return X.a.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return _=P.length>1&&P[1]!==void 0?P[1]:{},T=P.length>2&&P[2]!==void 0&&P[2],_.confirmed=!1,I.abrupt("return",this._getBrokerage(w,_,T));case 4:case"end":return I.stop()}},E,this)})),function(E){return A.apply(this,arguments)})},{key:"_getReward",value:(C=F()(X.a.mark(function E(){var w,_,T,P,I=arguments;return X.a.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(w=I.length>0&&I[0]!==void 0?I[0]:this.tronWeb.defaultAddress.hex,_=I.length>1?I[1]:void 0,T=I.length>2&&I[2]!==void 0&&I[2],S.isFunction(_)&&(T=_,_={}),S.isFunction(w)?(T=w,w=this.tronWeb.defaultAddress.hex):S.isObject(w)&&(_=w,w=this.tronWeb.defaultAddress.hex),T){L.next=7;break}return L.abrupt("return",this.injectPromise(this._getReward,w,_));case 7:if(!this.validator.notValid([{name:"origin",type:"address",value:w}],T)){L.next=9;break}return L.abrupt("return");case 9:P={address:Xo(w)},this.tronWeb[_.confirmed?"solidityNode":"fullNode"].request("wallet".concat(_.confirmed?"solidity":"","/getReward"),P,"post").then(function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(V.reward===void 0)return T("Not found.");T(null,V.reward)}).catch(function(V){return T(V)});case 11:case"end":return L.stop()}},E,this)})),function(){return C.apply(this,arguments)})},{key:"_getBrokerage",value:(m=F()(X.a.mark(function E(){var w,_,T,P,I=arguments;return X.a.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(w=I.length>0&&I[0]!==void 0?I[0]:this.tronWeb.defaultAddress.hex,_=I.length>1?I[1]:void 0,T=I.length>2&&I[2]!==void 0&&I[2],S.isFunction(_)&&(T=_,_={}),S.isFunction(w)?(T=w,w=this.tronWeb.defaultAddress.hex):S.isObject(w)&&(_=w,w=this.tronWeb.defaultAddress.hex),T){L.next=7;break}return L.abrupt("return",this.injectPromise(this._getBrokerage,w,_));case 7:if(!this.validator.notValid([{name:"origin",type:"address",value:w}],T)){L.next=9;break}return L.abrupt("return");case 9:P={address:Xo(w)},this.tronWeb[_.confirmed?"solidityNode":"fullNode"].request("wallet".concat(_.confirmed?"solidity":"","/getBrokerage"),P,"post").then(function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(V.brokerage===void 0)return T("Not found.");T(null,V.brokerage)}).catch(function(V){return T(V)});case 11:case"end":return L.stop()}},E,this)})),function(){return m.apply(this,arguments)})}],[{key:"verifySignature",value:function(E,w,_){var T=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];E=E.replace(/^0x/,""),_=_.replace(/^0x/,"");var P=[].concat(At()(ua(T?`TRON Signed Message:
32`:`Ethereum Signed Message:
32`)),At()(S.code.hexStr2byteArray(E))),I=Dn(P),L=ol(I,{recoveryParam:_.substring(128,130)=="1c"?1:0,r:"0x"+_.substring(0,64),s:"0x"+_.substring(64,128)}),V="41"+L.substr(2),q=st.address.fromHex(V);return q==st.address.fromHex(w)}},{key:"verifyMessageV2",value:function(E,w){return S.message.verifyMessage(E,w)}},{key:"verifyTypedData",value:function(E,w,_,T,P){T=T.replace(/^0x/,"");var I=S._TypedDataEncoder.hash(E,w,_),L="41"+ol(I,{recoveryParam:T.substring(128,130)=="1c"?1:0,r:"0x"+T.substring(0,64),s:"0x"+T.substring(64,128)}).substr(2);return st.address.fromHex(L)==st.address.fromHex(P)}},{key:"signString",value:function(E,w){var _=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];E=E.replace(/^0x/,"");var T={toHexString:function(){return"0x"+w},value:w},P=new nl(T),I=[].concat(At()(ua(_?`TRON Signed Message:
32`:`Ethereum Signed Message:
32`)),At()(S.code.hexStr2byteArray(E))),L=Dn(I),V=P.signDigest(L),q=["0x",V.r.substring(2),V.s.substring(2),Number(V.v).toString(16)].join("");return q}},{key:"signMessageV2",value:function(E,w){return S.message.signMessage(E,w)}},{key:"_signTypedData",value:function(E,w,_,T){return S.crypto._signTypedData(E,w,_,T)}}]),v}();function Bb(v,m){var C=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);m&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),C.push.apply(C,A)}return C}function Io(v){for(var m=1;m<arguments.length;m++){var C=arguments[m]!=null?arguments[m]:{};m%2?Bb(Object(C),!0).forEach(function(A){be()(v,A,C[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(C)):Bb(Object(C)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(C,A))})}return v}var Cp=function(v,m){return nb(v,m)},S_=function(){function v(O,h){ae()(this,v),this.tronWeb=O.tronWeb,this.contract=O,this.abi=h,this.name=h.name||(h.name=h.type),this.inputs=h.inputs||[],this.outputs=h.outputs||[],this.functionSelector=function(d){if(d.stateMutability=d.stateMutability?d.stateMutability.toLowerCase():"nonpayable",d.type=d.type?d.type.toLowerCase():"",d.type==="fallback"||d.type==="receive")return"0x";var f=new S.ethersUtils.Interface([d]);return d.type==="event"?f.getEvent(d.name).format(S.ethersUtils.FormatTypes.sighash):f.getFunction(d.name).format(S.ethersUtils.FormatTypes.sighash)}(h),this.signature=this.tronWeb.sha3(this.functionSelector,!1).slice(0,8),this.injectPromise=Un()(this),this.defaultOptions={feeLimit:this.tronWeb.feeLimit,callValue:0,userFeePercentage:100,shouldPollResponse:!1}}var m,C,A;return Ce()(v,[{key:"decodeInput",value:function(O){return Cp(this.inputs,"0x"+O)}},{key:"onMethod",value:function(){var O=this,h="";if(this.abi&&!/event/i.test(this.abi.type)){for(var d=arguments.length,f=new Array(d),p=0;p<d;p++)f[p]=arguments[p];h=ul(this.abi,f)}return{call:function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},B=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return S.isFunction(b)&&(B=b,b={}),b=Io(Io({},b),{},{rawParameter:h}),O._call([],[],b,B)},send:function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:O.tronWeb.defaultPrivateKey,D=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return S.isFunction(B)&&(D=B,B=O.tronWeb.defaultPrivateKey),S.isFunction(b)&&(D=b,b={}),b=Io(Io({},b),{},{rawParameter:h}),O._send([],[],b,B,D)},watch:function(){return O._watch.apply(O,arguments)}}}},{key:"_call",value:(A=F()(X.a.mark(function O(h,d){var f,p,b,B,D=this,J=arguments;return X.a.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(f=J.length>2&&J[2]!==void 0?J[2]:{},p=J.length>3&&J[3]!==void 0&&J[3],S.isFunction(f)&&(p=f,f={}),p){Q.next=5;break}return Q.abrupt("return",this.injectPromise(this._call,h,d,f));case 5:if(h.length===d.length){Q.next=7;break}return Q.abrupt("return",p("Invalid argument count provided"));case 7:if(this.contract.address){Q.next=9;break}return Q.abrupt("return",p("Smart contract is missing address"));case 9:if(this.contract.deployed){Q.next=11;break}return Q.abrupt("return",p("Calling smart contracts requires you to load the contract first"));case 11:if(b=this.abi.stateMutability,["pure","view"].includes(b.toLowerCase())){Q.next=14;break}return Q.abrupt("return",p('Methods with state mutability "'.concat(b,'" must use send()')));case 14:f=Io(Io(Io({},this.defaultOptions),{},{from:this.tronWeb.defaultAddress.hex},f),{},{_isConstant:!0}),B=d.map(function(ne,he){return{type:h[he],value:ne}}),this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address,this.functionSelector,f,B,!!f.from&&this.tronWeb.address.toHex(f.from),function(ne,he){if(ne)return p(ne);if(!S.hasProperty(he,"constant_result"))return p("Failed to execute");try{var Te=he.constant_result[0].length;if(Te===0||Te%64==8){var ke="The call has been reverted or has thrown an error.";if(Te!==0){ke+=" Error message: ";for(var E="",w=he.constant_result[0].substring(8),_=0;_<Te-8;_+=64)E+=D.tronWeb.toUtf8(w.substring(_,_+64));ke+=E.replace(/(\u0000|\u000b|\f)+/g," ").replace(/ +/g," ").replace(/\s+$/g,"")}return p(ke)}var T=Cp(D.abi,"0x"+he.constant_result[0]);return T.length===1&&Object.keys(T).length===1&&(T=T[0]),p(null,T)}catch(P){return p(P)}});case 17:case"end":return Q.stop()}},O,this)})),function(O,h){return A.apply(this,arguments)})},{key:"_send",value:(C=F()(X.a.mark(function O(h,d){var f,p,b,B,D,J,Q,ne,he,Te,ke,E=this,w=arguments;return X.a.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(f=w.length>2&&w[2]!==void 0?w[2]:{},p=w.length>3&&w[3]!==void 0?w[3]:this.tronWeb.defaultPrivateKey,b=w.length>4&&w[4]!==void 0&&w[4],S.isFunction(p)&&(b=p,p=this.tronWeb.defaultPrivateKey),S.isFunction(f)&&(b=f,f={}),b){_.next=7;break}return _.abrupt("return",this.injectPromise(this._send,h,d,f,p));case 7:if(h.length===d.length){_.next=9;break}throw new Error("Invalid argument count provided");case 9:if(this.contract.address){_.next=11;break}return _.abrupt("return",b("Smart contract is missing address"));case 11:if(this.contract.deployed){_.next=13;break}return _.abrupt("return",b("Calling smart contracts requires you to load the contract first"));case 13:if(B=this.abi.stateMutability,!["pure","view"].includes(B.toLowerCase())){_.next=16;break}return _.abrupt("return",b('Methods with state mutability "'.concat(B,'" must use call()')));case 16:return["payable"].includes(B.toLowerCase())||(f.callValue=0),f=Io(Io({},this.defaultOptions),{},{from:this.tronWeb.defaultAddress.hex},f),D=d.map(function(T,P){return{type:h[P],value:T}}),_.prev=19,J=p?this.tronWeb.address.fromPrivateKey(p):this.tronWeb.defaultAddress.base58,_.next=23,this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address,this.functionSelector,f,D,this.tronWeb.address.toHex(J));case 23:if((Q=_.sent).result&&Q.result.result){_.next=26;break}return _.abrupt("return",b("Unknown error: "+JSON.stringify(Q,null,2)));case 26:return _.next=28,this.tronWeb.trx.sign(Q.transaction,p);case 28:if((ne=_.sent).signature){_.next=33;break}if(p){_.next=32;break}return _.abrupt("return",b("Transaction was not signed properly"));case 32:return _.abrupt("return",b("Invalid private key provided"));case 33:return _.next=35,this.tronWeb.trx.sendRawTransaction(ne);case 35:if(!(he=_.sent).code){_.next=40;break}return Te={error:he.code,message:he.code},he.message&&(Te.message=this.tronWeb.toUtf8(he.message)),_.abrupt("return",b(Te));case 40:if(f.shouldPollResponse){_.next=42;break}return _.abrupt("return",b(null,ne.txID));case 42:(ke=function(){var T=F()(X.a.mark(function P(){var I,L,V,q=arguments;return X.a.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:if((I=q.length>0&&q[0]!==void 0?q[0]:0)!==20){U.next=3;break}return U.abrupt("return",b({error:"Cannot find result in solidity node",transaction:ne}));case 3:return U.next=5,E.tronWeb.trx.getTransactionInfo(ne.txID);case 5:if(L=U.sent,Object.keys(L).length){U.next=8;break}return U.abrupt("return",setTimeout(function(){ke(I+1)},3e3));case 8:if(!L.result||L.result!=="FAILED"){U.next=10;break}return U.abrupt("return",b({error:E.tronWeb.toUtf8(L.resMessage),transaction:ne,output:L}));case 10:if(S.hasProperty(L,"contractResult")){U.next=12;break}return U.abrupt("return",b({error:"Failed to execute: "+JSON.stringify(L,null,2),transaction:ne,output:L}));case 12:if(!f.rawResponse){U.next=14;break}return U.abrupt("return",b(null,L));case 14:if((V=Cp(E.abi,"0x"+L.contractResult[0])).length===1&&Object.keys(V).length===1&&(V=V[0]),!f.keepTxID){U.next=18;break}return U.abrupt("return",b(null,[ne.txID,V]));case 18:return U.abrupt("return",b(null,V));case 19:case"end":return U.stop()}},P)}));return function(){return T.apply(this,arguments)}}())(),_.next=49;break;case 46:return _.prev=46,_.t0=_.catch(19),_.abrupt("return",b(_.t0));case 49:case"end":return _.stop()}},O,this,[[19,46]])})),function(O,h){return C.apply(this,arguments)})},{key:"_watch",value:(m=F()(X.a.mark(function O(){var h,d,f,p,b,B,D,J=this,Q=arguments;return X.a.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(h=Q.length>0&&Q[0]!==void 0?Q[0]:{},d=Q.length>1&&Q[1]!==void 0&&Q[1],S.isFunction(h)&&(d=h,h={}),S.isFunction(d)){ne.next=5;break}throw new Error("Expected callback to be provided");case 5:if(this.contract.address){ne.next=7;break}return ne.abrupt("return",d("Smart contract is missing address"));case 7:if(this.abi.type&&/event/i.test(this.abi.type)){ne.next=9;break}return ne.abrupt("return",d("Invalid method type for event watching"));case 9:if(this.tronWeb.eventServer){ne.next=11;break}return ne.abrupt("return",d("No event server configured"));case 11:return f=!1,p=!1,b=Date.now()-1e3,B=function(){var he=F()(X.a.mark(function Te(){var ke,E,w,_,T,P;return X.a.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.prev=0,ke={since:b,eventName:J.name,sort:"block_timestamp",blockNumber:"latest",filters:h.filters},h.size&&(ke.size=h.size),h.resourceNode&&(/full/i.test(h.resourceNode)?ke.onlyUnconfirmed=!0:ke.onlyConfirmed=!0),I.next=6,J.tronWeb.event.getEventsByContractAddress(J.contract.address,ke);case 6:return E=I.sent,w=E.sort(function(L,V){return V.block-L.block}),_=pl()(w,1),T=_[0],P=E.filter(function(L,V){return!(h.resourceNode&&L.resourceNode&&h.resourceNode.toLowerCase()!==L.resourceNode.toLowerCase()||E.slice(0,V).some(function(q){return JSON.stringify(q)==JSON.stringify(L)})||p&&!(L.block>p))}),T&&(p=T.block),I.abrupt("return",P);case 13:return I.prev=13,I.t0=I.catch(0),I.abrupt("return",Promise.reject(I.t0));case 16:case"end":return I.stop()}},Te,null,[[0,13]])}));return function(){return he.apply(this,arguments)}}(),D=function(){f&&clearInterval(f),f=setInterval(function(){B().then(function(he){return he.forEach(function(Te){d(null,S.parseEvent(Te,J.abi))})}).catch(function(he){return d(he)})},3e3)},ne.next=18,B();case 18:return D(),ne.abrupt("return",{start:D,stop:function(){f&&(clearInterval(f),f=!1)}});case 20:case"end":return ne.stop()}},O,this)})),function(){return m.apply(this,arguments)})}]),v}(),Eb=function(){function v(){var h=arguments.length>0&&arguments[0]!==void 0&&arguments[0],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(ae()(this,v),!h||!h instanceof st)throw new Error("Expected instance of TronWeb");this.tronWeb=h,this.injectPromise=Un()(this),this.address=f,this.abi=d,this.eventListener=!1,this.bytecode=!1,this.deployed=!1,this.lastBlock=!1,this.methods={},this.methodInstances={},this.props=[],this.tronWeb.isAddress(f)?this.deployed=!0:this.address=!1,this.loadAbi(d)}var m,C,A,O;return Ce()(v,[{key:"_getEvents",value:(O=F()(X.a.mark(function h(){var d,f,p,b,B,D,J=this,Q=arguments;return X.a.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return d=Q.length>0&&Q[0]!==void 0?Q[0]:{},ne.next=3,this.tronWeb.event.getEventsByContractAddress(this.address,d);case 3:return f=ne.sent,p=f.sort(function(he,Te){return Te.block-he.block}),b=pl()(p,1),B=b[0],D=f.filter(function(he,Te){return!(d.resourceNode&&he.resourceNode&&d.resourceNode.toLowerCase()!==he.resourceNode.toLowerCase()||f.slice(0,Te).some(function(ke){return JSON.stringify(ke)==JSON.stringify(he)})||J.lastBlock&&!(he.block>J.lastBlock))}),B&&(this.lastBlock=B.block),ne.abrupt("return",D);case 8:case"end":return ne.stop()}},h,this)})),function(){return O.apply(this,arguments)})},{key:"_startEventListener",value:(A=F()(X.a.mark(function h(){var d,f,p=this,b=arguments;return X.a.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(d=b.length>0&&b[0]!==void 0?b[0]:{},f=b.length>1?b[1]:void 0,S.isFunction(d)&&(f=d,d={}),this.eventListener&&clearInterval(this.eventListener),this.tronWeb.eventServer){B.next=6;break}throw new Error("Event server is not configured");case 6:if(this.address){B.next=8;break}throw new Error("Contract is not configured with an address");case 8:return this.eventCallback=f,B.next=11,this._getEvents(d);case 11:this.eventListener=setInterval(function(){p._getEvents(d).then(function(D){return D.forEach(function(J){p.eventCallback&&p.eventCallback(J)})}).catch(function(D){console.error("Failed to get event list",D)})},3e3);case 12:case"end":return B.stop()}},h,this)})),function(){return A.apply(this,arguments)})},{key:"_stopEventListener",value:function(){this.eventListener&&(clearInterval(this.eventListener),this.eventListener=!1,this.eventCallback=!1)}},{key:"hasProperty",value:function(h){return this.hasOwnProperty(h)||this.__proto__.hasOwnProperty(h)}},{key:"loadAbi",value:function(h){var d=this;this.abi=h,this.methods={},this.props.forEach(function(f){return delete d[f]}),h.forEach(function(f){if(f.type&&!/constructor|error/i.test(f.type)){var p=new S_(d,f),b=p.onMethod.bind(p),B=p.name,D=p.functionSelector,J=p.signature;d.methods[B]=b,d.methods[D]=b,d.methods[J]=b,d.methodInstances[B]=p,d.methodInstances[D]=p,d.methodInstances[J]=p,d.hasProperty(B)||(d[B]=b,d.props.push(B)),d.hasProperty(D)||(d[D]=b,d.props.push(D)),d.hasProperty(J)||(d[J]=b,d.props.push(J))}})}},{key:"decodeInput",value:function(h){var d=h.substring(0,8),f=h.substring(8);if(!this.methodInstances[d])throw new Error("Contract method "+d+" not found");return{name:this.methodInstances[d].name,params:this.methodInstances[d].decodeInput(f)}}},{key:"new",value:(C=F()(X.a.mark(function h(d){var f,p,b,B,D,J,Q=arguments;return X.a.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(f=Q.length>1&&Q[1]!==void 0?Q[1]:this.tronWeb.defaultPrivateKey,p=Q.length>2&&Q[2]!==void 0&&Q[2],S.isFunction(f)&&(p=f,f=this.tronWeb.defaultPrivateKey),p){ne.next=5;break}return ne.abrupt("return",this.injectPromise(this.new,d,f));case 5:return ne.prev=5,b=this.tronWeb.address.fromPrivateKey(f),ne.next=9,this.tronWeb.transactionBuilder.createSmartContract(d,b);case 9:return B=ne.sent,ne.next=12,this.tronWeb.trx.sign(B,f);case 12:return D=ne.sent,ne.next=15,this.tronWeb.trx.sendRawTransaction(D);case 15:if(!(J=ne.sent).code){ne.next=18;break}return ne.abrupt("return",p({error:J.code,message:this.tronWeb.toUtf8(J.message)}));case 18:return ne.next=20,S.sleep(3e3);case 20:return ne.abrupt("return",this.at(D.contract_address,p));case 23:return ne.prev=23,ne.t0=ne.catch(5),ne.abrupt("return",p(ne.t0));case 26:case"end":return ne.stop()}},h,this,[[5,23]])})),function(h){return C.apply(this,arguments)})},{key:"at",value:(m=F()(X.a.mark(function h(d){var f,p,b=arguments;return X.a.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(f=b.length>1&&b[1]!==void 0&&b[1]){B.next=3;break}return B.abrupt("return",this.injectPromise(this.at,d));case 3:return B.prev=3,B.next=6,this.tronWeb.trx.getContract(d);case 6:if((p=B.sent).contract_address){B.next=9;break}return B.abrupt("return",f("Unknown error: "+JSON.stringify(p,null,2)));case 9:return this.address=p.contract_address,this.bytecode=p.bytecode,this.deployed=!0,this.loadAbi(p.abi&&p.abi.entrys?p.abi.entrys:[]),B.abrupt("return",f(null,this));case 16:if(B.prev=16,B.t0=B.catch(3),!B.t0.toString().includes("does not exist")){B.next=20;break}return B.abrupt("return",f("Contract has not been deployed on the network"));case 20:return B.abrupt("return",f(B.t0));case 21:case"end":return B.stop()}},h,this,[[3,16]])})),function(h){return m.apply(this,arguments)})},{key:"events",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(S.isFunction(h)&&(d=h,h={}),!S.isFunction(d))throw new Error("Callback function expected");var f=this;return{start:function(){var p=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return p?(f._startEventListener(h,d).then(function(){p()}).catch(function(b){p(b)}),this):(f._startEventListener(h,d),this)},stop:function(){f._stopEventListener()}}}}]),v}(),Pb=function(){function v(){var m=arguments.length>0&&arguments[0]!==void 0&&arguments[0],C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ae()(this,v),!m||!m instanceof st)throw new Error("Expected instance of TronWeb");this.tronWeb=m,this.pluginNoOverride=["register"],this.disablePlugins=C.disablePlugins}return Ce()(v,[{key:"register",value:function(m,C){var A={requires:"0.0.0",components:{}},O={libs:[],plugged:[],skipped:[]};if(this.disablePlugins)return O.error="This instance of TronWeb has plugins disabled.",O;var h=new m(this.tronWeb);if(S.isFunction(h.pluginInterface)&&(A=h.pluginInterface(C)),!vb.a.satisfies(st.version,A.requires))throw new Error("The plugin is not compatible with this version of TronWeb");if(A.fullClass){var d=h.constructor.name,f=d.substring(0,1).toLowerCase()+d.substring(1);d!==f&&(st[d]=m,this.tronWeb[f]=h,O.libs.push(d))}else for(var p in A.components)if(this.tronWeb.hasOwnProperty(p)){var b=A.components[p],B=this.tronWeb[p].pluginNoOverride||[];for(var D in b)D==="constructor"||this.tronWeb[p][D]&&(B.includes(D)||/^_/.test(D))?O.skipped.push(D):(this.tronWeb[p][D]=b[D].bind(this.tronWeb[p]),O.plugged.push(D))}return O}}]),v}(),O_=r(31),I_=r.n(O_),Tb=function(){function v(){var m=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(ae()(this,v),!(m&&m instanceof st))throw new Error("Expected instance of TronWeb");this.tronWeb=m,this.injectPromise=Un()(this)}return Ce()(v,[{key:"setServer",value:function(){var m=this,C=arguments.length>0&&arguments[0]!==void 0&&arguments[0],A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"healthcheck";if(!C)return this.tronWeb.eventServer=!1;if(S.isString(C)&&(C=new yr.HttpProvider(C)),!this.tronWeb.isValidProvider(C))throw new Error("Invalid event server provided");this.tronWeb.eventServer=C,this.tronWeb.eventServer.isConnected=function(){return m.tronWeb.eventServer.request(A).then(function(){return!0}).catch(function(){return!1})}}},{key:"getEventsByContractAddress",value:function(){var m=arguments.length>0&&arguments[0]!==void 0&&arguments[0],C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=arguments.length>2&&arguments[2]!==void 0&&arguments[2],O=Object.assign({sinceTimestamp:0,eventName:!1,blockNumber:!1,size:20,page:1},C),h=O.sinceTimestamp,d=O.since,f=O.fromTimestamp,p=O.eventName,b=O.blockNumber,B=O.size,D=O.page,J=O.onlyConfirmed,Q=O.onlyUnconfirmed,ne=O.previousLastEventFingerprint,he=O.previousFingerprint,Te=O.fingerprint,ke=O.rawResponse,E=O.sort,w=O.filters;if(!A)return this.injectPromise(this.getEventsByContractAddress,m,C);if(f=f||h||d,!this.tronWeb.eventServer)return A("No event server configured");var _=[];if(!this.tronWeb.isAddress(m))return A("Invalid contract address provided");if(p&&!m)return A("Usage of event name filtering requires a contract address");if(f!==void 0&&!S.isInteger(f))return A("Invalid fromTimestamp provided");if(!S.isInteger(B))return A("Invalid size provided");if(B>200&&(console.warn("Defaulting to maximum accepted size: 200"),B=200),!S.isInteger(D))return A("Invalid page provided");if(b&&!p)return A("Usage of block number filtering requires an event name");m&&_.push(this.tronWeb.address.fromHex(m)),p&&_.push(p),b&&_.push(b);var T={size:B,page:D};return K()(w)==="object"&&Object.keys(w).length>0&&(T.filters=JSON.stringify(w)),f&&(T.fromTimestamp=T.since=f),J&&(T.only_confirmed=J),Q&&!J&&(T.only_unconfirmed=Q),E&&(T.sort=E),(Te=Te||he||ne)&&(T.fingerprint=Te),this.tronWeb.eventServer.request("event/contract/".concat(_.join("/"),"?").concat(I_.a.stringify(T))).then(function(){var P=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return P?S.isArray(P)?A(null,ke===!0?P:P.map(function(I){return S.mapEvent(I)})):A(P):A("Unknown error occurred")}).catch(function(P){return A(P.response&&P.response.data||P)})}},{key:"getEventsByTransactionID",value:function(){var m=arguments.length>0&&arguments[0]!==void 0&&arguments[0],C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return S.isFunction(C)&&(A=C,C={}),A?this.tronWeb.eventServer?this.tronWeb.eventServer.request("event/transaction/".concat(m)).then(function(){var O=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return O?S.isArray(O)?A(null,C.rawResponse===!0?O:O.map(function(h){return S.mapEvent(h)})):A(O):A("Unknown error occurred")}).catch(function(O){return A(O.response&&O.response.data||O)}):A("No event server configured"):this.injectPromise(this.getEventsByTransactionID,m,C)}}]),v}();function Sb(v,m){var C=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);m&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),C.push.apply(C,A)}return C}function Xr(v){for(var m=1;m<arguments.length;m++){var C=arguments[m]!=null?arguments[m]:{};m%2?Sb(Object(C),!0).forEach(function(A){be()(v,A,C[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(C)):Sb(Object(C)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(C,A))})}return v}var k_=function(){function v(P){var I=arguments.length>1&&arguments[1]!==void 0&&arguments[1],L=arguments.length>2&&arguments[2]!==void 0&&arguments[2],V=arguments.length>3&&arguments[3]!==void 0&&arguments[3];ae()(this,v),this.mainchain=L;var q=P.fullHost,U=P.fullNode,z=P.solidityNode,$=P.eventServer,j=P.mainGatewayAddress,Y=P.sideGatewayAddress,le=P.sideChainId;this.sidechain=new I(q||U,q||z,q||$,V),this.isAddress=this.mainchain.isAddress,this.utils=this.mainchain.utils,this.setMainGatewayAddress(j),this.setSideGatewayAddress(Y),this.setChainId(le),this.injectPromise=Un()(this),this.validator=new wp(this.sidechain);var me=this;this.sidechain.trx.sign=function(){return me.sign.apply(me,arguments)},this.sidechain.trx.multiSign=function(){return me.multiSign.apply(me,arguments)}}var m,C,A,O,h,d,f,p,b,B,D,J,Q,ne,he,Te,ke,E,w,_,T;return Ce()(v,[{key:"setMainGatewayAddress",value:function(P){if(!this.isAddress(P))throw new Error("Invalid main gateway address provided");this.mainGatewayAddress=P}},{key:"setSideGatewayAddress",value:function(P){if(!this.isAddress(P))throw new Error("Invalid side gateway address provided");this.sideGatewayAddress=P}},{key:"setChainId",value:function(P){if(!this.utils.isString(P)||!P)throw new Error("Invalid side chainId provided");this.chainId=P}},{key:"signTransaction",value:function(P,I){typeof P=="string"&&(P=this.utils.code.hexStr2byteArray(P));var L=this.utils.code.hexStr2byteArray(this.chainId),V=this.utils.code.hexStr2byteArray(I.txID).concat(L),q=this.sidechain.utils.ethersUtils.sha256(V),U=this.utils.crypto.ECKeySign(this.utils.code.hexStr2byteArray(q.replace(/^0x/,"")),P);return Array.isArray(I.signature)?I.signature.includes(U)||I.signature.push(U):I.signature=[U],I}},{key:"multiSign",value:(T=F()(X.a.mark(function P(){var I,L,V,q,U,z,$,j=arguments;return X.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(I=j.length>0&&j[0]!==void 0&&j[0],L=j.length>1&&j[1]!==void 0?j[1]:this.sidechain.defaultPrivateKey,V=j.length>2&&j[2]!==void 0&&j[2],q=j.length>3&&j[3]!==void 0&&j[3],this.utils.isFunction(V)&&(q=V,V=0),this.utils.isFunction(L)&&(q=L,L=this.mainchain.defaultPrivateKey,V=0),q){Y.next=8;break}return Y.abrupt("return",this.injectPromise(this.multiSign,I,L,V));case 8:if(this.utils.isObject(I)&&I.raw_data&&I.raw_data.contract){Y.next=10;break}return Y.abrupt("return",q("Invalid transaction provided"));case 10:if(I.raw_data.contract[0].Permission_id||!(V>0)){Y.next=30;break}return I.raw_data.contract[0].Permission_id=V,U=this.sidechain.address.toHex(this.sidechain.address.fromPrivateKey(L)).toLowerCase(),Y.next=15,this.sidechain.trx.getSignWeight(I,V);case 15:if((z=Y.sent).result.code!=="PERMISSION_ERROR"){Y.next=18;break}return Y.abrupt("return",q(z.result.message));case 18:if($=!1,z.permission.keys.map(function(le){le.address===U&&($=!0)}),$){Y.next=22;break}return Y.abrupt("return",q(L+" has no permission to sign"));case 22:if(!z.approved_list||z.approved_list.indexOf(U)==-1){Y.next=24;break}return Y.abrupt("return",q(L+" already sign transaction"));case 24:if(!z.transaction||!z.transaction.transaction){Y.next=29;break}(I=z.transaction.transaction).raw_data.contract[0].Permission_id=V,Y.next=30;break;case 29:return Y.abrupt("return",q("Invalid transaction provided"));case 30:return Y.prev=30,Y.abrupt("return",q(null,this.signTransaction(L,I)));case 34:Y.prev=34,Y.t0=Y.catch(30),q(Y.t0);case 37:case"end":return Y.stop()}},P,this,[[30,34]])})),function(){return T.apply(this,arguments)})},{key:"sign",value:(_=F()(X.a.mark(function P(){var I,L,V,q,U,z,$=arguments;return X.a.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(I=$.length>0&&$[0]!==void 0&&$[0],L=$.length>1&&$[1]!==void 0?$[1]:this.sidechain.defaultPrivateKey,V=!($.length>2&&$[2]!==void 0)||$[2],q=$.length>3&&$[3]!==void 0&&$[3],U=$.length>4&&$[4]!==void 0&&$[4],this.utils.isFunction(q)&&(U=q,q=!1),this.utils.isFunction(V)&&(U=V,V=!0,q=!1),this.utils.isFunction(L)&&(U=L,L=this.sidechain.defaultPrivateKey,V=!0,q=!1),U){j.next=10;break}return j.abrupt("return",this.injectPromise(this.sign,I,L,V,q));case 10:if(!this.utils.isString(I)){j.next=21;break}if(this.utils.isHex(I)){j.next=13;break}return j.abrupt("return",U("Expected hex message input"));case 13:return j.prev=13,z=this.sidechain.trx.signString(I,L,V),j.abrupt("return",U(null,z));case 18:j.prev=18,j.t0=j.catch(13),U(j.t0);case 21:if(this.utils.isObject(I)){j.next=23;break}return j.abrupt("return",U("Invalid transaction provided"));case 23:if(q||!I.signature){j.next=25;break}return j.abrupt("return",U("Transaction is already signed"));case 25:if(j.prev=25,q){j.next=30;break}if(this.sidechain.address.toHex(this.sidechain.address.fromPrivateKey(L)).toLowerCase()===this.sidechain.address.toHex(I.raw_data.contract[0].parameter.value.owner_address)){j.next=30;break}return j.abrupt("return",U("Private key does not match address in transaction"));case 30:return j.abrupt("return",U(null,this.signTransaction(L,I)));case 33:j.prev=33,j.t1=j.catch(25),U(j.t1);case 36:case"end":return j.stop()}},P,this,[[13,18],[25,33]])})),function(){return _.apply(this,arguments)})},{key:"depositTrx",value:(w=F()(X.a.mark(function P(I,L,V){var q,U,z,$,j,Y=arguments;return X.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(q=Y.length>3&&Y[3]!==void 0?Y[3]:{},U=Y.length>4&&Y[4]!==void 0?Y[4]:this.mainchain.defaultPrivateKey,z=Y.length>5&&Y[5]!==void 0&&Y[5],this.utils.isFunction(U)&&(z=U,U=this.mainchain.defaultPrivateKey),this.utils.isFunction(q)&&(z=q,q={}),z){le.next=7;break}return le.abrupt("return",this.injectPromise(this.depositTrx,I,L,V,q,U));case 7:if(!this.validator.notValid([{name:"callValue",type:"integer",value:I,gte:0},{name:"depositFee",type:"integer",value:L,gte:0},{name:"feeLimit",type:"integer",value:V,gte:0}],z)){le.next=9;break}return le.abrupt("return");case 9:return q=Xr({callValue:Number(I)+Number(L),feeLimit:V},q),le.prev=10,le.next=13,this.mainchain.contract().at(this.mainGatewayAddress);case 13:return $=le.sent,le.next=16,$.depositTRX().send(q,U);case 16:return j=le.sent,le.abrupt("return",z(null,j));case 20:return le.prev=20,le.t0=le.catch(10),le.abrupt("return",z(le.t0));case 23:case"end":return le.stop()}},P,this,[[10,20]])})),function(P,I,L){return w.apply(this,arguments)})},{key:"depositTrc10",value:(E=F()(X.a.mark(function P(I,L,V,q){var U,z,$,j,Y,le=arguments;return X.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(U=le.length>4&&le[4]!==void 0?le[4]:{},z=le.length>5&&le[5]!==void 0?le[5]:this.mainchain.defaultPrivateKey,$=le.length>6&&le[6]!==void 0&&le[6],this.utils.isFunction(z)&&($=z,z=this.mainchain.defaultPrivateKey),this.utils.isFunction(U)&&($=U,U={}),$){me.next=7;break}return me.abrupt("return",this.injectPromise(this.depositTrc10,I,L,V,q,U,z));case 7:if(!this.validator.notValid([{name:"tokenValue",type:"integer",value:L,gte:0},{name:"depositFee",type:"integer",value:V,gte:0},{name:"feeLimit",type:"integer",value:q,gte:0},{name:"tokenId",type:"integer",value:I,gte:0}],$)){me.next=9;break}return me.abrupt("return");case 9:return U=Xr(Xr({tokenId:I,tokenValue:L,feeLimit:q},U),{},{callValue:V}),me.prev=10,me.next=13,this.mainchain.contract().at(this.mainGatewayAddress);case 13:return j=me.sent,me.next=16,j.depositTRC10(I,L).send(U,z);case 16:Y=me.sent,$(null,Y),me.next=23;break;case 20:return me.prev=20,me.t0=me.catch(10),me.abrupt("return",$(me.t0));case 23:case"end":return me.stop()}},P,this,[[10,20]])})),function(P,I,L,V){return E.apply(this,arguments)})},{key:"depositTrc",value:(ke=F()(X.a.mark(function P(I,L,V,q,U){var z,$,j,Y,le,me,ot=arguments;return X.a.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(z=ot.length>5&&ot[5]!==void 0?ot[5]:{},$=ot.length>6&&ot[6]!==void 0?ot[6]:this.mainchain.defaultPrivateKey,j=ot.length>7&&ot[7]!==void 0&&ot[7],this.utils.isFunction($)&&(j=$,$=this.mainchain.defaultPrivateKey),this.utils.isFunction(z)&&(j=z,z={}),j){fe.next=7;break}return fe.abrupt("return",this.injectPromise(this.depositTrc,I,L,V,q,U,z,$));case 7:if(!this.validator.notValid([{name:"functionSelector",type:"not-empty-string",value:I},{name:"num",type:"integer",value:L,gte:0},{name:"fee",type:"integer",value:V,gte:0},{name:"feeLimit",type:"integer",value:q,gte:0},{name:"contractAddress",type:"address",value:U}],j)){fe.next=9;break}return fe.abrupt("return");case 9:if(z=Xr(Xr({feeLimit:q},z),{},{callValue:V,tokenId:"",tokenValue:0}),fe.prev=10,Y=null,I!=="approve"){fe.next=21;break}return fe.next=15,this.mainchain.contract().at(U);case 15:return le=fe.sent,fe.next=18,le.approve(this.mainGatewayAddress,L).send(z,$);case 18:Y=fe.sent,fe.next=44;break;case 21:return fe.next=23,this.mainchain.contract().at(this.mainGatewayAddress);case 23:me=fe.sent,fe.t0=I,fe.next=fe.t0==="depositTRC20"?27:fe.t0==="depositTRC721"?31:fe.t0==="retryDeposit"?35:fe.t0==="retryMapping"?39:43;break;case 27:return fe.next=29,me.depositTRC20(U,L).send(z,$);case 29:return Y=fe.sent,fe.abrupt("break",44);case 31:return fe.next=33,me.depositTRC721(U,L).send(z,$);case 33:return Y=fe.sent,fe.abrupt("break",44);case 35:return fe.next=37,me.retryDeposit(L).send(z,$);case 37:return Y=fe.sent,fe.abrupt("break",44);case 39:return fe.next=41,me.retryMapping(L).send(z,$);case 41:return Y=fe.sent,fe.abrupt("break",44);case 43:return fe.abrupt("break",44);case 44:j(null,Y),fe.next=50;break;case 47:return fe.prev=47,fe.t1=fe.catch(10),fe.abrupt("return",j(fe.t1));case 50:case"end":return fe.stop()}},P,this,[[10,47]])})),function(P,I,L,V,q){return ke.apply(this,arguments)})},{key:"approveTrc20",value:(Te=F()(X.a.mark(function P(I,L,V){var q,U,z,$,j=arguments;return X.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return q=j.length>3&&j[3]!==void 0?j[3]:{},U=j.length>4&&j[4]!==void 0?j[4]:this.mainchain.defaultPrivateKey,z=j.length>5&&j[5]!==void 0&&j[5],$="approve",Y.abrupt("return",this.depositTrc($,I,0,L,V,q,U,z));case 5:case"end":return Y.stop()}},P,this)})),function(P,I,L){return Te.apply(this,arguments)})},{key:"approveTrc721",value:(he=F()(X.a.mark(function P(I,L,V){var q,U,z,$,j=arguments;return X.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return q=j.length>3&&j[3]!==void 0?j[3]:{},U=j.length>4&&j[4]!==void 0?j[4]:this.mainchain.defaultPrivateKey,z=j.length>5&&j[5]!==void 0&&j[5],$="approve",Y.abrupt("return",this.depositTrc($,I,0,L,V,q,U,z));case 5:case"end":return Y.stop()}},P,this)})),function(P,I,L){return he.apply(this,arguments)})},{key:"depositTrc20",value:(ne=F()(X.a.mark(function P(I,L,V,q){var U,z,$,j,Y=arguments;return X.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return U=Y.length>4&&Y[4]!==void 0?Y[4]:{},z=Y.length>5&&Y[5]!==void 0?Y[5]:this.mainchain.defaultPrivateKey,$=Y.length>6&&Y[6]!==void 0&&Y[6],j="depositTRC20",le.abrupt("return",this.depositTrc(j,I,L,V,q,U,z,$));case 5:case"end":return le.stop()}},P,this)})),function(P,I,L,V){return ne.apply(this,arguments)})},{key:"depositTrc721",value:(Q=F()(X.a.mark(function P(I,L,V,q){var U,z,$,j,Y=arguments;return X.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return U=Y.length>4&&Y[4]!==void 0?Y[4]:{},z=Y.length>5&&Y[5]!==void 0?Y[5]:this.mainchain.defaultPrivateKey,$=Y.length>6&&Y[6]!==void 0&&Y[6],j="depositTRC721",le.abrupt("return",this.depositTrc(j,I,L,V,q,U,z,$));case 5:case"end":return le.stop()}},P,this)})),function(P,I,L,V){return Q.apply(this,arguments)})},{key:"mappingTrc",value:(J=F()(X.a.mark(function P(I,L,V,q){var U,z,$,j,Y,le=arguments;return X.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(U=le.length>4&&le[4]!==void 0?le[4]:{},z=le.length>5&&le[5]!==void 0?le[5]:this.mainchain.defaultPrivateKey,$=le.length>6?le[6]:void 0,this.utils.isFunction(z)&&($=z,z=this.mainchain.defaultPrivateKey),this.utils.isFunction(U)&&($=U,U={}),$){me.next=7;break}return me.abrupt("return",this.injectPromise(this.mappingTrc,I,L,V,q,U,z));case 7:if(!this.validator.notValid([{name:"trxHash",type:"not-empty-string",value:I},{name:"mappingFee",type:"integer",value:L,gte:0},{name:"feeLimit",type:"integer",value:V,gte:0}],$)){me.next=9;break}return me.abrupt("return");case 9:return I=I.startsWith("0x")?I:"0x"+I,U=Xr(Xr({feeLimit:V},U),{},{callValue:L}),me.prev=11,me.next=14,this.mainchain.contract().at(this.mainGatewayAddress);case 14:if(j=me.sent,Y=null,q!=="mappingTRC20"){me.next=22;break}return me.next=19,j.mappingTRC20(I).send(U,z);case 19:Y=me.sent,me.next=29;break;case 22:if(q!=="mappingTRC721"){me.next=28;break}return me.next=25,j.mappingTRC721(I).send(U,z);case 25:Y=me.sent,me.next=29;break;case 28:$(new Error("type must be trc20 or trc721"));case 29:$(null,Y),me.next=35;break;case 32:return me.prev=32,me.t0=me.catch(11),me.abrupt("return",$(me.t0));case 35:case"end":return me.stop()}},P,this,[[11,32]])})),function(P,I,L,V){return J.apply(this,arguments)})},{key:"mappingTrc20",value:(D=F()(X.a.mark(function P(I,L,V){var q,U,z,$,j=arguments;return X.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return q=j.length>3&&j[3]!==void 0?j[3]:{},U=j.length>4&&j[4]!==void 0?j[4]:this.mainchain.defaultPrivateKey,z=j.length>5&&j[5]!==void 0&&j[5],$="mappingTRC20",Y.abrupt("return",this.mappingTrc(I,L,V,$,q,U,z));case 5:case"end":return Y.stop()}},P,this)})),function(P,I,L){return D.apply(this,arguments)})},{key:"mappingTrc721",value:(B=F()(X.a.mark(function P(I,L,V){var q,U,z,$,j=arguments;return X.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return q=j.length>3&&j[3]!==void 0?j[3]:{},U=j.length>4&&j[4]!==void 0?j[4]:this.mainchain.defaultPrivateKey,z=j.length>5&&j[5]!==void 0&&j[5],$="mappingTRC721",Y.abrupt("return",this.mappingTrc(I,L,V,$,q,U,z));case 5:case"end":return Y.stop()}},P,this)})),function(P,I,L){return B.apply(this,arguments)})},{key:"withdrawTrx",value:(b=F()(X.a.mark(function P(I,L,V){var q,U,z,$,j,Y=arguments;return X.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(q=Y.length>3&&Y[3]!==void 0?Y[3]:{},U=Y.length>4&&Y[4]!==void 0?Y[4]:this.mainchain.defaultPrivateKey,z=Y.length>5&&Y[5]!==void 0&&Y[5],this.utils.isFunction(U)&&(z=U,U=this.mainchain.defaultPrivateKey),this.utils.isFunction(q)&&(z=q,q={}),z){le.next=7;break}return le.abrupt("return",this.injectPromise(this.withdrawTrx,I,L,V,q,U));case 7:if(!this.validator.notValid([{name:"callValue",type:"integer",value:I,gte:0},{name:"withdrawFee",type:"integer",value:L,gte:0},{name:"feeLimit",type:"integer",value:V,gte:0}],z)){le.next=9;break}return le.abrupt("return");case 9:return q=Xr({callValue:Number(I)+Number(L),feeLimit:V},q),le.prev=10,le.next=13,this.sidechain.contract().at(this.sideGatewayAddress);case 13:return $=le.sent,le.next=16,$.withdrawTRX().send(q,U);case 16:return j=le.sent,le.abrupt("return",z(null,j));case 20:return le.prev=20,le.t0=le.catch(10),le.abrupt("return",z(le.t0));case 23:case"end":return le.stop()}},P,this,[[10,20]])})),function(P,I,L){return b.apply(this,arguments)})},{key:"withdrawTrc10",value:(p=F()(X.a.mark(function P(I,L,V,q){var U,z,$,j,Y,le=arguments;return X.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(U=le.length>4&&le[4]!==void 0?le[4]:{},z=le.length>5&&le[5]!==void 0?le[5]:this.mainchain.defaultPrivateKey,$=le.length>6&&le[6]!==void 0&&le[6],this.utils.isFunction(z)&&($=z,z=this.mainchain.defaultPrivateKey),this.utils.isFunction(U)&&($=U,U={}),$){me.next=7;break}return me.abrupt("return",this.injectPromise(this.withdrawTrc10,I,L,V,q,U,z));case 7:if(!this.validator.notValid([{name:"tokenId",type:"integer",value:I,gte:0},{name:"tokenValue",type:"integer",value:L,gte:0},{name:"withdrawFee",type:"integer",value:V,gte:0},{name:"feeLimit",type:"integer",value:q,gte:0}],$)){me.next=9;break}return me.abrupt("return");case 9:return U=Xr({tokenValue:L,tokenId:I,callValue:V,feeLimit:q},U),me.prev=10,me.next=13,this.sidechain.contract().at(this.sideGatewayAddress);case 13:return j=me.sent,me.next=16,j.withdrawTRC10(I,L).send(U,z);case 16:return Y=me.sent,me.abrupt("return",$(null,Y));case 20:return me.prev=20,me.t0=me.catch(10),me.abrupt("return",$(me.t0));case 23:case"end":return me.stop()}},P,this,[[10,20]])})),function(P,I,L,V){return p.apply(this,arguments)})},{key:"withdrawTrc",value:(f=F()(X.a.mark(function P(I,L,V,q,U){var z,$,j,Y,le,me,ot,fe,Er,ya,gl=this,ko=arguments;return X.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:if(z=ko.length>5&&ko[5]!==void 0?ko[5]:{},$=ko.length>6&&ko[6]!==void 0?ko[6]:this.mainchain.defaultPrivateKey,j=ko.length>7&&ko[7]!==void 0&&ko[7],this.utils.isFunction($)&&(j=$,$=this.mainchain.defaultPrivateKey),this.utils.isFunction(z)&&(j=z,z={}),j){ut.next=7;break}return ut.abrupt("return",this.injectPromise(this.withdrawTrc,I,L,V,q,U,z,$));case 7:if(!this.validator.notValid([{name:"functionSelector",type:"not-empty-string",value:I},{name:"numOrId",type:"integer",value:L,gte:0},{name:"withdrawFee",type:"integer",value:V,gte:0},{name:"feeLimit",type:"integer",value:q,gte:0},{name:"contractAddress",type:"address",value:U}],j)){ut.next=9;break}return ut.abrupt("return");case 9:return z=Xr(Xr({feeLimit:q},z),{},{callValue:V}),Y=[{type:"uint256",value:L}],ut.prev=11,le=$?this.sidechain.address.fromPrivateKey($):this.sidechain.defaultAddress.base58,ut.next=15,this.sidechain.transactionBuilder.triggerSmartContract(U,I,z,Y,this.sidechain.address.toHex(le));case 15:if((me=ut.sent).result&&me.result.result){ut.next=18;break}return ut.abrupt("return",j("Unknown error: "+JSON.stringify(me.transaction,null,2)));case 18:return ut.next=20,this.sidechain.trx.sign(me.transaction,$);case 20:if((ot=ut.sent).signature){ut.next=25;break}if($){ut.next=24;break}return ut.abrupt("return",j("Transaction was not signed properly"));case 24:return ut.abrupt("return",j("Invalid private key provided"));case 25:return ut.next=27,this.sidechain.trx.sendRawTransaction(ot);case 27:if(!(fe=ut.sent).code){ut.next=32;break}return Er={error:fe.code,message:fe.code},fe.message&&(Er.message=this.sidechain.toUtf8(fe.message)),ut.abrupt("return",j(Er));case 32:if(z.shouldPollResponse){ut.next=34;break}return ut.abrupt("return",j(null,ot.txID));case 34:(ya=function(){var R_=F()(X.a.mark(function M_(){var Ob,Qr,yl,Bp=arguments;return X.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:if((Ob=Bp.length>0&&Bp[0]!==void 0?Bp[0]:0)!=20){ar.next=3;break}return ar.abrupt("return",j({error:"Cannot find result in solidity node",transaction:ot}));case 3:return ar.next=5,gl.sidechain.trx.getTransactionInfo(ot.txID);case 5:if(Qr=ar.sent,Object.keys(Qr).length){ar.next=8;break}return ar.abrupt("return",setTimeout(function(){ya(Ob+1)},3e3));case 8:if(!Qr.result||Qr.result!="FAILED"){ar.next=10;break}return ar.abrupt("return",j({error:gl.sidechain.toUtf8(Qr.resMessage),transaction:ot,output:Qr}));case 10:if(gl.utils.hasProperty(Qr,"contractResult")){ar.next=12;break}return ar.abrupt("return",j({error:"Failed to execute: "+JSON.stringify(Qr,null,2),transaction:ot,output:Qr}));case 12:if(!z.rawResponse){ar.next=14;break}return ar.abrupt("return",j(null,Qr));case 14:return(yl=decodeOutput(gl.outputs,"0x"+Qr.contractResult[0])).length===1&&(yl=yl[0]),ar.abrupt("return",j(null,yl));case 17:case"end":return ar.stop()}},M_)}));return function(){return R_.apply(this,arguments)}}())(),ut.next=41;break;case 38:return ut.prev=38,ut.t0=ut.catch(11),ut.abrupt("return",j(ut.t0));case 41:case"end":return ut.stop()}},P,this,[[11,38]])})),function(P,I,L,V,q){return f.apply(this,arguments)})},{key:"withdrawTrc20",value:(d=F()(X.a.mark(function P(I,L,V,q,U){var z,$,j,Y=arguments;return X.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=Y.length>5&&Y[5]!==void 0?Y[5]:this.mainchain.defaultPrivateKey,$=Y.length>6&&Y[6]!==void 0&&Y[6],j="withdrawal(uint256)",le.abrupt("return",this.withdrawTrc(j,I,L,V,q,U,z,$));case 4:case"end":return le.stop()}},P,this)})),function(P,I,L,V,q){return d.apply(this,arguments)})},{key:"withdrawTrc721",value:(h=F()(X.a.mark(function P(I,L,V,q,U){var z,$,j,Y=arguments;return X.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=Y.length>5&&Y[5]!==void 0?Y[5]:this.mainchain.defaultPrivateKey,$=Y.length>6&&Y[6]!==void 0&&Y[6],j="withdrawal(uint256)",le.abrupt("return",this.withdrawTrc(j,I,L,V,q,U,z,$));case 4:case"end":return le.stop()}},P,this)})),function(P,I,L,V,q){return h.apply(this,arguments)})},{key:"injectFund",value:(O=F()(X.a.mark(function P(I,L,V){var q,U,z,$,j,Y,le,me,ot=arguments;return X.a.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(q=ot.length>3&&ot[3]!==void 0?ot[3]:this.mainchain.defaultPrivateKey,U=ot.length>4&&ot[4]!==void 0&&ot[4],this.utils.isFunction(q)&&(U=q,q=this.mainchain.defaultPrivateKey),this.utils.isFunction(V)&&(U=V,V={}),U){fe.next=6;break}return fe.abrupt("return",this.injectPromise(this.injectFund,I,L,V,q));case 6:if(!this.validator.notValid([{name:"num",type:"integer",value:I,gte:0},{name:"feeLimit",type:"integer",value:L,gte:0}],U)){fe.next=8;break}return fe.abrupt("return");case 8:return fe.prev=8,z=this.sidechain.address.fromPrivateKey(q),$=this.sidechain.address.toHex(z),fe.next=13,this.sidechain.fullNode.request("/wallet/fundinject",{owner_address:$,amount:I},"post");case 13:return j=fe.sent,fe.next=16,this.sidechain.trx.sign(j,q);case 16:if((Y=fe.sent).signature){fe.next=21;break}if(q){fe.next=20;break}return fe.abrupt("return",U("Transaction was not signed properly"));case 20:return fe.abrupt("return",U("Invalid private key provided"));case 21:return fe.next=23,this.sidechain.trx.sendRawTransaction(Y);case 23:if(!(le=fe.sent).code){fe.next=28;break}return me={error:le.code,message:le.code},le.message&&(me.message=this.mainchain.toUtf8(le.message)),fe.abrupt("return",U(me));case 28:return fe.abrupt("return",U(null,Y.txID));case 31:return fe.prev=31,fe.t0=fe.catch(8),fe.abrupt("return",U(fe.t0));case 34:case"end":return fe.stop()}},P,this,[[8,31]])})),function(P,I,L){return O.apply(this,arguments)})},{key:"retryWithdraw",value:(A=F()(X.a.mark(function P(I,L,V){var q,U,z,$,j=arguments;return X.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return q=j.length>3&&j[3]!==void 0?j[3]:{},U=j.length>4&&j[4]!==void 0?j[4]:this.sidechain.defaultPrivateKey,z=j.length>5&&j[5]!==void 0&&j[5],$="retryWithdraw(uint256)",Y.abrupt("return",this.withdrawTrc($,I,L,V,this.sideGatewayAddress,q,U,z));case 5:case"end":return Y.stop()}},P,this)})),function(P,I,L){return A.apply(this,arguments)})},{key:"retryDeposit",value:(C=F()(X.a.mark(function P(I,L,V){var q,U,z,$,j=arguments;return X.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return q=j.length>3&&j[3]!==void 0?j[3]:{},U=j.length>4&&j[4]!==void 0?j[4]:this.mainchain.defaultPrivateKey,z=j.length>5&&j[5]!==void 0&&j[5],$="retryDeposit",Y.abrupt("return",this.depositTrc($,I,L,V,this.mainGatewayAddress,q,U,z));case 5:case"end":return Y.stop()}},P,this)})),function(P,I,L){return C.apply(this,arguments)})},{key:"retryMapping",value:(m=F()(X.a.mark(function P(I,L,V){var q,U,z,$,j=arguments;return X.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return q=j.length>3&&j[3]!==void 0?j[3]:{},U=j.length>4&&j[4]!==void 0?j[4]:this.mainchain.defaultPrivateKey,z=j.length>5&&j[5]!==void 0&&j[5],$="retryMapping",Y.abrupt("return",this.depositTrc($,I,L,V,this.mainGatewayAddress,q,U,z));case 5:case"end":return Y.stop()}},P,this)})),function(P,I,L){return m.apply(this,arguments)})}]),v}();function F_(v){var m=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var C,A=ie()(v);if(m){var O=ie()(this).constructor;C=Reflect.construct(A,arguments,O)}else C=A.apply(this,arguments);return Ae()(this,C)}}var st=function(v){Ye()(h,v);var m,C,A,O=F_(h);function h(){var d,f,p=arguments.length>0&&arguments[0]!==void 0&&arguments[0],b=arguments.length>1&&arguments[1]!==void 0&&arguments[1],B=arguments.length>2&&arguments[2]!==void 0&&arguments[2],D=arguments.length>3&&arguments[3]!==void 0&&arguments[3],J=arguments.length>4&&arguments[4]!==void 0&&arguments[4];ae()(this,h),d=O.call(this);var Q=!1,ne=!1;return K()(p)==="object"&&(p.fullNode||p.fullHost)?(f=p.fullNode||p.fullHost,D=b,b=p.solidityNode||p.fullHost,B=p.eventServer||p.fullHost,Q=p.headers||!1,ne=p.eventHeaders||Q,J=p.privateKey):f=p,S.isString(f)&&(f=new yr.HttpProvider(f)),S.isString(b)&&(b=new yr.HttpProvider(b)),S.isString(B)&&(B=new yr.HttpProvider(B)),d.event=new Tb(Pe()(d)),d.transactionBuilder=new wb(Pe()(d)),d.trx=new Cb(Pe()(d)),d.plugin=new Pb(Pe()(d),p),d.utils=S,d.setFullNode(f),d.setSolidityNode(b),d.setEventServer(B),d.providers=yr,d.BigNumber=Fi.a,d.defaultBlock=!1,d.defaultPrivateKey=!1,d.defaultAddress={hex:!1,base58:!1},["sha3","toHex","toUtf8","fromUtf8","toAscii","fromAscii","toDecimal","fromDecimal","toSun","fromSun","toBigNumber","isAddress","createAccount","address","version","createRandom","fromMnemonic"].forEach(function(he){d[he]=h[he]}),K()(D)==="object"&&(D.fullNode||D.fullHost)?d.sidechain=new k_(D,h,Pe()(d),J):J=J||D,J&&d.setPrivateKey(J),d.fullnodeVersion="3.5.0",d.feeLimit=15e7,d.injectPromise=Un()(Pe()(d)),Q&&d.setFullNodeHeader(Q),ne&&d.setEventHeader(ne),d}return Ce()(h,[{key:"getFullnodeVersion",value:(A=F()(X.a.mark(function d(){var f;return X.a.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.prev=0,p.next=3,this.trx.getNodeInfo();case 3:f=p.sent,this.fullnodeVersion=f.configNodeInfo.codeVersion,this.fullnodeVersion.split(".").length===2&&(this.fullnodeVersion+=".0"),p.next=11;break;case 8:p.prev=8,p.t0=p.catch(0),this.fullnodeVersion="3.5.0";case 11:case"end":return p.stop()}},d,this,[[0,8]])})),function(){return A.apply(this,arguments)})},{key:"setDefaultBlock",value:function(){var d=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if([!1,"latest","earliest",0].includes(d))return this.defaultBlock=d;if(!S.isInteger(d)||!d)throw new Error("Invalid block ID provided");this.defaultBlock=Math.abs(d)}},{key:"setPrivateKey",value:function(d){try{this.setAddress(this.address.fromPrivateKey(d))}catch{throw new Error("Invalid private key provided")}this.defaultPrivateKey=d,this.emit("privateKeyChanged",d)}},{key:"setAddress",value:function(d){if(!this.isAddress(d))throw new Error("Invalid address provided");var f=this.address.toHex(d),p=this.address.fromHex(d);this.defaultPrivateKey&&this.address.fromPrivateKey(this.defaultPrivateKey)!==p&&(this.defaultPrivateKey=!1),this.defaultAddress={hex:f,base58:p},this.emit("addressChanged",{hex:f,base58:p})}},{key:"fullnodeSatisfies",value:function(d){return vb.a.satisfies(this.fullnodeVersion,d)}},{key:"isValidProvider",value:function(d){return Object.values(yr).some(function(f){return d instanceof f})}},{key:"setFullNode",value:function(d){if(S.isString(d)&&(d=new yr.HttpProvider(d)),!this.isValidProvider(d))throw new Error("Invalid full node provided");this.fullNode=d,this.fullNode.setStatusPage("wallet/getnowblock"),this.getFullnodeVersion()}},{key:"setSolidityNode",value:function(d){if(S.isString(d)&&(d=new yr.HttpProvider(d)),!this.isValidProvider(d))throw new Error("Invalid solidity node provided");this.solidityNode=d,this.solidityNode.setStatusPage("walletsolidity/getnowblock")}},{key:"setEventServer",value:function(){var d;(d=this.event).setServer.apply(d,arguments)}},{key:"setHeader",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=new yr.HttpProvider(this.fullNode.host,3e4,!1,!1,d),p=new yr.HttpProvider(this.solidityNode.host,3e4,!1,!1,d),b=new yr.HttpProvider(this.eventServer.host,3e4,!1,!1,d);this.setFullNode(f),this.setSolidityNode(p),this.setEventServer(b)}},{key:"setFullNodeHeader",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=new yr.HttpProvider(this.fullNode.host,3e4,!1,!1,d),p=new yr.HttpProvider(this.solidityNode.host,3e4,!1,!1,d);this.setFullNode(f),this.setSolidityNode(p)}},{key:"setEventHeader",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=new yr.HttpProvider(this.eventServer.host,3e4,!1,!1,d);this.setEventServer(f)}},{key:"currentProviders",value:function(){return{fullNode:this.fullNode,solidityNode:this.solidityNode,eventServer:this.eventServer}}},{key:"currentProvider",value:function(){return this.currentProviders()}},{key:"getEventResult",value:function(){for(var d,f=arguments.length,p=new Array(f),b=0;b<f;b++)p[b]=arguments[b];return K()(p[1])!=="object"&&(p[1]={sinceTimestamp:p[1]||0,eventName:p[2]||!1,blockNumber:p[3]||!1,size:p[4]||20,page:p[5]||1},p.splice(2,4),S.isFunction(p[2])||(S.isFunction(p[1].page)?(p[2]=p[1].page,p[1].page=1):S.isFunction(p[1].size)&&(p[2]=p[1].size,p[1].size=20,p[1].page=1))),(d=this.event).getEventsByContractAddress.apply(d,p)}},{key:"getEventByTransactionID",value:function(){var d;return(d=this.event).getEventsByTransactionID.apply(d,arguments)}},{key:"contract",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return new Eb(this,d,f)}},{key:"isConnected",value:(C=F()(X.a.mark(function d(){var f,p=arguments;return X.a.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(f=p.length>0&&p[0]!==void 0&&p[0]){b.next=3;break}return b.abrupt("return",this.injectPromise(this.isConnected));case 3:return b.t0=f,b.next=6,this.fullNode.isConnected();case 6:return b.t1=b.sent,b.next=9,this.solidityNode.isConnected();case 9:if(b.t2=b.sent,b.t3=this.eventServer,!b.t3){b.next=15;break}return b.next=14,this.eventServer.isConnected();case 14:b.t3=b.sent;case 15:return b.t4=b.t3,b.t5={fullNode:b.t1,solidityNode:b.t2,eventServer:b.t4},b.abrupt("return",(0,b.t0)(null,b.t5));case 18:case"end":return b.stop()}},d,this)})),function(){return C.apply(this,arguments)})}],[{key:"address",get:function(){return{fromHex:function(d){return S.isHex(d)?S.crypto.getBase58CheckAddress(S.code.hexStr2byteArray(d.replace(/^0x/,"41"))):d},toHex:function(d){return S.isHex(d)?d.toLowerCase().replace(/^0x/,"41"):S.code.byteArray2hexStr(S.crypto.decodeBase58Address(d)).toLowerCase()},fromPrivateKey:function(d){var f=arguments.length>1&&arguments[1]!==void 0&&arguments[1];try{return S.crypto.pkToAddress(d,f)}catch{return!1}}}}},{key:"sha3",value:function(d){var f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return(f?"0x":"")+Dn(k.Buffer.from(d,"utf-8")).toString().substring(2)}},{key:"toHex",value:function(d){if(S.isBoolean(d))return h.fromDecimal(+d);if(S.isBigNumber(d))return h.fromDecimal(d);if(K()(d)==="object")return h.fromUtf8(JSON.stringify(d));if(S.isString(d)){if(/^(-|)0x/.test(d))return d;if(!isFinite(d)||/^\s*$/.test(d))return h.fromUtf8(d)}var f=h.fromDecimal(d);if(f==="0xNaN")throw new Error("The passed value is not convertible to a hex string");return f}},{key:"toUtf8",value:function(d){if(S.isHex(d))return d=d.replace(/^0x/,""),k.Buffer.from(d,"hex").toString("utf8");throw new Error("The passed value is not a valid hex string")}},{key:"fromUtf8",value:function(d){if(!S.isString(d))throw new Error("The passed value is not a valid utf-8 string");return"0x"+k.Buffer.from(d,"utf8").toString("hex")}},{key:"toAscii",value:function(d){if(S.isHex(d)){var f="",p=0,b=d.length;for(d.substring(0,2)==="0x"&&(p=2);p<b;p+=2){var B=parseInt(d.substr(p,2),16);f+=String.fromCharCode(B)}return f}throw new Error("The passed value is not a valid hex string")}},{key:"fromAscii",value:function(d,f){if(!S.isString(d))throw new Error("The passed value is not a valid utf-8 string");return"0x"+k.Buffer.from(d,"ascii").toString("hex").padEnd(f,"0")}},{key:"toDecimal",value:function(d){return h.toBigNumber(d).toNumber()}},{key:"fromDecimal",value:function(d){var f=h.toBigNumber(d),p=f.toString(16);return f.isLessThan(0)?"-0x"+p.substr(1):"0x"+p}},{key:"fromSun",value:function(d){var f=h.toBigNumber(d).div(1e6);return S.isBigNumber(d)?f:f.toString(10)}},{key:"toSun",value:function(d){var f=h.toBigNumber(d).times(1e6);return S.isBigNumber(d)?f:f.toString(10)}},{key:"toBigNumber",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return S.isBigNumber(d)?d:S.isString(d)&&/^(-|)0x/.test(d)?new Fi.a(d.replace("0x",""),16):new Fi.a(d.toString(10),10)}},{key:"isAddress",value:function(){var d=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!S.isString(d))return!1;if(d.length===42)try{return h.isAddress(S.crypto.getBase58CheckAddress(S.code.hexStr2byteArray(d)))}catch{return!1}try{return S.crypto.isAddressValid(d)}catch{return!1}}},{key:"createAccount",value:(m=F()(X.a.mark(function d(){var f;return X.a.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return f=S.accounts.generateAccount(),p.abrupt("return",f);case 2:case"end":return p.stop()}},d)})),function(){return m.apply(this,arguments)})},{key:"createRandom",value:function(d){return S.accounts.generateRandom(d)}},{key:"fromMnemonic",value:function(d){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"m/44'/195'/0'/0/0",p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"en",b=S.accounts.generateAccountWithMnemonic(d,f,p);return b}}]),h}(w_.a);be()(st,"providers",yr),be()(st,"BigNumber",Fi.a),be()(st,"TransactionBuilder",wb),be()(st,"Trx",Cb),be()(st,"Contract",Eb),be()(st,"Plugin",Pb),be()(st,"Event",Tb),be()(st,"version",__.a),be()(st,"utils",S)}]).default});export default Rq();
window.inOKXExtension = true;
window.inMiniApp = false;
window.ASSETS_BUILD_TYPE = "publish";
//# sourceMappingURL=TronWeb.node-TKYKKZRR.js.map