{"snapId":"npm:@metamask/tron-wallet-snap","manifest":{"version":"1.25.8","description":"Manage Tron using MetaMask","proposedName":"Tron","repository":{"type":"git","url":"https://github.com/MetaMask/snap-tron-wallet.git"},"source":{"shasum":"qE1Egjs1PmIIjRGvofEj3rZiAa99KMDdTkt8rih2aEw=","location":{"npm":{"filePath":"dist/bundle.js","iconPath":"images/icon.svg","packageName":"@metamask/tron-wallet-snap","registry":"https://registry.npmjs.org/"}},"locales":["locales/en.json"]},"initialConnections":{"https://portfolio.metamask.io":{}},"initialPermissions":{"endowment:keyring":{"allowedOrigins":["https://portfolio.metamask.io"]},"snap_getBip32Entropy":[{"path":["m","44'","195'"],"curve":"secp256k1"}],"endowment:network-access":{},"snap_manageAccounts":{},"snap_manageState":{},"snap_dialog":{},"snap_getPreferences":{},"endowment:cronjob":{"jobs":[{"duration":"PT30S","request":{"method":"onSynchronizeSelectedAccountsCronjob"}}]},"endowment:assets":{"scopes":["tron:728126428"]}},"platformVersion":"10.3.0","manifestVersion":"0.1"},"files":[{"path":"images/icon.svg","value":"<svg width=\"96\" height=\"96\" viewBox=\"0 0 96 96\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"96\" height=\"96\" fill=\"#FF060A\"/><g clip-path=\"url(#clip0_7875_4963)\"><path d=\"M75.7883 36.0541C72.9706 33.4525 69.0729 29.4796 65.8984 26.662L65.7105 26.5305C65.398 26.2795 65.0456 26.0827 64.668 25.9482C57.0134 24.5206 21.3891 17.8616 20.6941 17.9461C20.4993 17.9734 20.3132 18.044 20.1493 18.1527L19.9709 18.2936C19.7512 18.5168 19.5843 18.7864 19.4825 19.0826L19.4355 19.2047V19.8715V19.9748C23.446 31.142 39.2811 67.7243 42.3993 76.3087C42.5871 76.891 42.944 77.9993 43.6109 78.0557H43.7611C44.118 78.0557 45.6396 76.0457 45.6396 76.0457C45.6396 76.0457 72.8391 43.0606 75.591 39.548C75.9472 39.1153 76.2617 38.6499 76.5302 38.1579C76.5988 37.7731 76.5665 37.377 76.4364 37.0083C76.3064 36.6396 76.0831 36.3109 75.7883 36.0541ZM52.6179 39.8955L64.2266 30.2686L71.0358 36.5425L52.6179 39.8955ZM48.1097 39.2662L28.1233 22.8864L60.4603 28.8504L48.1097 39.2662ZM49.913 43.5584L70.369 40.2618L46.9826 68.4381L49.913 43.5584ZM25.4089 24.5206L46.4379 42.3656L43.3948 68.4569L25.4089 24.5206Z\" fill=\"white\"/></g><defs><clipPath id=\"clip0_7875_4963\"><rect width=\"60.1096\" height=\"60.1096\" fill=\"white\" transform=\"translate(17.9453 17.9453)\"/></clipPath></defs></svg>"},{"path":"dist/bundle.js","value":"(()=>{var e={54:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t in i)return i[t](e);if(\"any\"===t){for(var r in i){if(i.hasOwnProperty(r))if((0,i[r])(e))return!0}return!1}throw new Error(\"Invalid locale '\".concat(t,\"'\"))};var n=a(r(8354)),o=a(r(567)),s=a(r(3353));function a(e){return e&&e.__esModule?e:{default:e}}var i={PL:function(e){(0,n.default)(e);var t={1:1,2:3,3:7,4:9,5:1,6:3,7:7,8:9,9:1,10:3,11:0};if(null!=e&&11===e.length&&(0,s.default)(e,{allow_leading_zeroes:!0})){var r=e.split(\"\").slice(0,-1).reduce(function(e,r,n){return e+Number(r)*t[n+1]},0)%10,o=Number(e.charAt(e.length-1));if(0===r&&0===o||o===10-r)return!0}return!1},ES:function(e){(0,n.default)(e);var t={X:0,Y:1,Z:2},r=e.trim().toUpperCase();if(!/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/.test(r))return!1;var o=r.slice(0,-1).replace(/[X,Y,Z]/g,function(e){return t[e]});return r.endsWith([\"T\",\"R\",\"W\",\"A\",\"G\",\"M\",\"Y\",\"F\",\"P\",\"D\",\"X\",\"B\",\"N\",\"J\",\"Z\",\"S\",\"Q\",\"V\",\"H\",\"L\",\"C\",\"K\",\"E\"][o%23])},FI:function(e){if((0,n.default)(e),11!==e.length)return!1;if(!e.match(/^\\d{6}[\\-A\\+]\\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/))return!1;return\"0123456789ABCDEFHJKLMNPRSTUVWXY\"[(1e3*parseInt(e.slice(0,6),10)+parseInt(e.slice(7,10),10))%31]===e.slice(10,11)},IN:function(e){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]],n=e.trim();if(!/^[1-9]\\d{3}\\s?\\d{4}\\s?\\d{4}$/.test(n))return!1;var o=0;return n.replace(/\\s/g,\"\").split(\"\").map(Number).reverse().forEach(function(e,n){o=t[o][r[n%8][e]]}),0===o},IR:function(e){if(!e.match(/^\\d{10}$/))return!1;if(e=\"0000\".concat(e).slice(e.length-6),0===parseInt(e.slice(3,9),10))return!1;for(var t=parseInt(e.slice(9,10),10),r=0,n=0;n<9;n++)r+=parseInt(e.slice(n,n+1),10)*(10-n);return(r%=11)<2&&t===r||r>=2&&t===11-r},IT:function(e){return 9===e.length&&(\"CA00000AA\"!==e&&e.search(/C[A-Z]\\d{5}[A-Z]{2}/i)>-1)},NO:function(e){var t=e.trim();if(isNaN(Number(t)))return!1;if(11!==t.length)return!1;if(\"00000000000\"===t)return!1;var r=t.split(\"\").map(Number),n=(11-(3*r[0]+7*r[1]+6*r[2]+1*r[3]+8*r[4]+9*r[5]+4*r[6]+5*r[7]+2*r[8])%11)%11,o=(11-(5*r[0]+4*r[1]+3*r[2]+2*r[3]+7*r[4]+6*r[5]+5*r[6]+4*r[7]+3*r[8]+2*n)%11)%11;return n===r[9]&&o===r[10]},TH:function(e){if(!e.match(/^[1-8]\\d{12}$/))return!1;for(var t=0,r=0;r<12;r++)t+=parseInt(e[r],10)*(13-r);return e[12]===((11-t%11)%10).toString()},LK:function(e){return!(10!==e.length||!/^[1-9]\\d{8}[vx]$/i.test(e))||!(12!==e.length||!/^[1-9]\\d{11}$/i.test(e))},\"he-IL\":function(e){var t=e.trim();if(!/^\\d{9}$/.test(t))return!1;for(var r,n=t,o=0,s=0;s<n.length;s++)o+=(r=Number(n[s])*(s%2+1))>9?r-9:r;return o%10==0},\"ar-LY\":function(e){var t=e.trim();return!!/^(1|2)\\d{11}$/.test(t)},\"ar-TN\":function(e){var t=e.trim();return!!/^\\d{8}$/.test(t)},\"zh-CN\":function(e){var t,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\"],n=[\"7\",\"9\",\"10\",\"5\",\"8\",\"4\",\"2\",\"1\",\"6\",\"3\",\"7\",\"9\",\"10\",\"5\",\"8\",\"4\",\"2\"],s=[\"1\",\"0\",\"X\",\"9\",\"8\",\"7\",\"6\",\"5\",\"4\",\"3\",\"2\"],a=function(e){return(0,o.default)(r,e)},i=function(e){var t=parseInt(e.substring(0,4),10),r=parseInt(e.substring(4,6),10),n=parseInt(e.substring(6),10),o=new Date(t,r-1,n);return!(o>new Date)&&(o.getFullYear()===t&&o.getMonth()===r-1&&o.getDate()===n)},c=function(e){return function(e){for(var t=e.substring(0,17),r=0,o=0;o<17;o++)r+=parseInt(t.charAt(o),10)*parseInt(n[o],10);return s[r%11]}(e)===e.charAt(17).toUpperCase()};return!!/^\\d{15}|(\\d{17}(\\d|x|X))$/.test(t=e)&&(15===t.length?function(e){var t=/^[1-9]\\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\\d{3}$/.test(e);if(!t)return!1;var r=e.substring(0,2);if(!(t=a(r)))return!1;var n=\"19\".concat(e.substring(6,12));return!!(t=i(n))}(t):function(e){var t=/^[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(e);if(!t)return!1;var r=e.substring(0,2);if(!(t=a(r)))return!1;var n=e.substring(6,14);return!!(t=i(n))&&c(e)}(t))},\"zh-HK\":function(e){var t=/^[0-9]$/;if(e=(e=e.trim()).toUpperCase(),!/^[A-Z]{1,2}[0-9]{6}((\\([0-9A]\\))|(\\[[0-9A]\\])|([0-9A]))$/.test(e))return!1;8===(e=e.replace(/\\[|\\]|\\(|\\)/g,\"\")).length&&(e=\"3\".concat(e));for(var r=0,n=0;n<=7;n++){r+=(t.test(e[n])?e[n]:(e[n].charCodeAt(0)-55)%11)*(9-n)}return(0===(r%=11)?\"0\":1===r?\"A\":String(11-r))===e[e.length-1]},\"zh-TW\":function(e){var t={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},r=e.trim().toUpperCase();return!!/^[A-Z][0-9]{9}$/.test(r)&&Array.from(r).reduce(function(e,r,n){if(0===n){var o=t[r];return o%10*9+Math.floor(o/10)}return 9===n?(10-e%10-Number(r))%10==0:e+Number(r)*(9-n)},0)},PK:function(e){var t=e.trim();return/^[1-7][0-9]{4}-[0-9]{7}-[1-9]$/.test(t)}};e.exports=t.default,e.exports.default=t.default},62:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,n.default)(e),(0,o.default)(e)%parseInt(t,10)===0};var n=s(r(8354)),o=s(r(2177));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},139:(e,t,r)=>{var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();o.exportSymbol(\"TronWebProto.AssetIssueContract\",null,s),o.exportSymbol(\"TronWebProto.AssetIssueContract.FrozenSupply\",null,s),o.exportSymbol(\"TronWebProto.ParticipateAssetIssueContract\",null,s),o.exportSymbol(\"TronWebProto.TransferAssetContract\",null,s),o.exportSymbol(\"TronWebProto.UnfreezeAssetContract\",null,s),o.exportSymbol(\"TronWebProto.UpdateAssetContract\",null,s),TronWebProto.AssetIssueContract=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.AssetIssueContract.repeatedFields_,null)},o.inherits(TronWebProto.AssetIssueContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AssetIssueContract.displayName=\"TronWebProto.AssetIssueContract\"),TronWebProto.AssetIssueContract.FrozenSupply=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AssetIssueContract.FrozenSupply,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AssetIssueContract.FrozenSupply.displayName=\"TronWebProto.AssetIssueContract.FrozenSupply\"),TronWebProto.TransferAssetContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TransferAssetContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransferAssetContract.displayName=\"TronWebProto.TransferAssetContract\"),TronWebProto.UnfreezeAssetContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnfreezeAssetContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeAssetContract.displayName=\"TronWebProto.UnfreezeAssetContract\"),TronWebProto.UpdateAssetContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateAssetContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateAssetContract.displayName=\"TronWebProto.UpdateAssetContract\"),TronWebProto.ParticipateAssetIssueContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ParticipateAssetIssueContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ParticipateAssetIssueContract.displayName=\"TronWebProto.ParticipateAssetIssueContract\"),TronWebProto.AssetIssueContract.repeatedFields_=[5],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AssetIssueContract.prototype.toObject=function(e){return TronWebProto.AssetIssueContract.toObject(e,this)},TronWebProto.AssetIssueContract.toObject=function(e,t){var r={id:n.Message.getFieldWithDefault(t,41,\"\"),ownerAddress:t.getOwnerAddress_asB64(),name:t.getName_asB64(),abbr:t.getAbbr_asB64(),totalSupply:n.Message.getFieldWithDefault(t,4,0),frozenSupplyList:n.Message.toObjectList(t.getFrozenSupplyList(),TronWebProto.AssetIssueContract.FrozenSupply.toObject,e),trxNum:n.Message.getFieldWithDefault(t,6,0),precision:n.Message.getFieldWithDefault(t,7,0),num:n.Message.getFieldWithDefault(t,8,0),startTime:n.Message.getFieldWithDefault(t,9,0),endTime:n.Message.getFieldWithDefault(t,10,0),order:n.Message.getFieldWithDefault(t,11,0),voteScore:n.Message.getFieldWithDefault(t,16,0),description:t.getDescription_asB64(),url:t.getUrl_asB64(),freeAssetNetLimit:n.Message.getFieldWithDefault(t,22,0),publicFreeAssetNetLimit:n.Message.getFieldWithDefault(t,23,0),publicFreeAssetNetUsage:n.Message.getFieldWithDefault(t,24,0),publicLatestFreeNetTime:n.Message.getFieldWithDefault(t,25,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AssetIssueContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AssetIssueContract;return TronWebProto.AssetIssueContract.deserializeBinaryFromReader(r,t)},TronWebProto.AssetIssueContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 41:var r=t.readString();e.setId(r);break;case 1:r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setName(r);break;case 3:r=t.readBytes();e.setAbbr(r);break;case 4:r=t.readInt64();e.setTotalSupply(r);break;case 5:r=new TronWebProto.AssetIssueContract.FrozenSupply;t.readMessage(r,TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader),e.addFrozenSupply(r);break;case 6:r=t.readInt32();e.setTrxNum(r);break;case 7:r=t.readInt32();e.setPrecision(r);break;case 8:r=t.readInt32();e.setNum(r);break;case 9:r=t.readInt64();e.setStartTime(r);break;case 10:r=t.readInt64();e.setEndTime(r);break;case 11:r=t.readInt64();e.setOrder(r);break;case 16:r=t.readInt32();e.setVoteScore(r);break;case 20:r=t.readBytes();e.setDescription(r);break;case 21:r=t.readBytes();e.setUrl(r);break;case 22:r=t.readInt64();e.setFreeAssetNetLimit(r);break;case 23:r=t.readInt64();e.setPublicFreeAssetNetLimit(r);break;case 24:r=t.readInt64();e.setPublicFreeAssetNetUsage(r);break;case 25:r=t.readInt64();e.setPublicLatestFreeNetTime(r);break;default:t.skipField()}}return e},TronWebProto.AssetIssueContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AssetIssueContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AssetIssueContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getId()).length>0&&t.writeString(41,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getName_asU8()).length>0&&t.writeBytes(2,r),(r=e.getAbbr_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getTotalSupply())&&t.writeInt64(4,r),(r=e.getFrozenSupplyList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter),0!==(r=e.getTrxNum())&&t.writeInt32(6,r),0!==(r=e.getPrecision())&&t.writeInt32(7,r),0!==(r=e.getNum())&&t.writeInt32(8,r),0!==(r=e.getStartTime())&&t.writeInt64(9,r),0!==(r=e.getEndTime())&&t.writeInt64(10,r),0!==(r=e.getOrder())&&t.writeInt64(11,r),0!==(r=e.getVoteScore())&&t.writeInt32(16,r),(r=e.getDescription_asU8()).length>0&&t.writeBytes(20,r),(r=e.getUrl_asU8()).length>0&&t.writeBytes(21,r),0!==(r=e.getFreeAssetNetLimit())&&t.writeInt64(22,r),0!==(r=e.getPublicFreeAssetNetLimit())&&t.writeInt64(23,r),0!==(r=e.getPublicFreeAssetNetUsage())&&t.writeInt64(24,r),0!==(r=e.getPublicLatestFreeNetTime())&&t.writeInt64(25,r)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AssetIssueContract.FrozenSupply.prototype.toObject=function(e){return TronWebProto.AssetIssueContract.FrozenSupply.toObject(e,this)},TronWebProto.AssetIssueContract.FrozenSupply.toObject=function(e,t){var r={frozenAmount:n.Message.getFieldWithDefault(t,1,0),frozenDays:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AssetIssueContract.FrozenSupply;return TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader(r,t)},TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setFrozenAmount(r);break;case 2:r=t.readInt64();e.setFrozenDays(r);break;default:t.skipField()}}return e},TronWebProto.AssetIssueContract.FrozenSupply.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getFrozenAmount())&&t.writeInt64(1,r),0!==(r=e.getFrozenDays())&&t.writeInt64(2,r)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.getFrozenAmount=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.setFrozenAmount=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.getFrozenDays=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.setFrozenDays=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.AssetIssueContract.prototype.getId=function(){return n.Message.getFieldWithDefault(this,41,\"\")},TronWebProto.AssetIssueContract.prototype.setId=function(e){return n.Message.setProto3StringField(this,41,e)},TronWebProto.AssetIssueContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.AssetIssueContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AssetIssueContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AssetIssueContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AssetIssueContract.prototype.getName=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.AssetIssueContract.prototype.getName_asB64=function(){return n.Message.bytesAsB64(this.getName())},TronWebProto.AssetIssueContract.prototype.getName_asU8=function(){return n.Message.bytesAsU8(this.getName())},TronWebProto.AssetIssueContract.prototype.setName=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.AssetIssueContract.prototype.getAbbr=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.AssetIssueContract.prototype.getAbbr_asB64=function(){return n.Message.bytesAsB64(this.getAbbr())},TronWebProto.AssetIssueContract.prototype.getAbbr_asU8=function(){return n.Message.bytesAsU8(this.getAbbr())},TronWebProto.AssetIssueContract.prototype.setAbbr=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.AssetIssueContract.prototype.getTotalSupply=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.AssetIssueContract.prototype.setTotalSupply=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.AssetIssueContract.prototype.getFrozenSupplyList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.AssetIssueContract.FrozenSupply,5)},TronWebProto.AssetIssueContract.prototype.setFrozenSupplyList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.AssetIssueContract.prototype.addFrozenSupply=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.AssetIssueContract.FrozenSupply,t)},TronWebProto.AssetIssueContract.prototype.clearFrozenSupplyList=function(){return this.setFrozenSupplyList([])},TronWebProto.AssetIssueContract.prototype.getTrxNum=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.AssetIssueContract.prototype.setTrxNum=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.AssetIssueContract.prototype.getPrecision=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.AssetIssueContract.prototype.setPrecision=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.AssetIssueContract.prototype.getNum=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.AssetIssueContract.prototype.setNum=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.AssetIssueContract.prototype.getStartTime=function(){return n.Message.getFieldWithDefault(this,9,0)},TronWebProto.AssetIssueContract.prototype.setStartTime=function(e){return n.Message.setProto3IntField(this,9,e)},TronWebProto.AssetIssueContract.prototype.getEndTime=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.AssetIssueContract.prototype.setEndTime=function(e){return n.Message.setProto3IntField(this,10,e)},TronWebProto.AssetIssueContract.prototype.getOrder=function(){return n.Message.getFieldWithDefault(this,11,0)},TronWebProto.AssetIssueContract.prototype.setOrder=function(e){return n.Message.setProto3IntField(this,11,e)},TronWebProto.AssetIssueContract.prototype.getVoteScore=function(){return n.Message.getFieldWithDefault(this,16,0)},TronWebProto.AssetIssueContract.prototype.setVoteScore=function(e){return n.Message.setProto3IntField(this,16,e)},TronWebProto.AssetIssueContract.prototype.getDescription=function(){return n.Message.getFieldWithDefault(this,20,\"\")},TronWebProto.AssetIssueContract.prototype.getDescription_asB64=function(){return n.Message.bytesAsB64(this.getDescription())},TronWebProto.AssetIssueContract.prototype.getDescription_asU8=function(){return n.Message.bytesAsU8(this.getDescription())},TronWebProto.AssetIssueContract.prototype.setDescription=function(e){return n.Message.setProto3BytesField(this,20,e)},TronWebProto.AssetIssueContract.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,21,\"\")},TronWebProto.AssetIssueContract.prototype.getUrl_asB64=function(){return n.Message.bytesAsB64(this.getUrl())},TronWebProto.AssetIssueContract.prototype.getUrl_asU8=function(){return n.Message.bytesAsU8(this.getUrl())},TronWebProto.AssetIssueContract.prototype.setUrl=function(e){return n.Message.setProto3BytesField(this,21,e)},TronWebProto.AssetIssueContract.prototype.getFreeAssetNetLimit=function(){return n.Message.getFieldWithDefault(this,22,0)},TronWebProto.AssetIssueContract.prototype.setFreeAssetNetLimit=function(e){return n.Message.setProto3IntField(this,22,e)},TronWebProto.AssetIssueContract.prototype.getPublicFreeAssetNetLimit=function(){return n.Message.getFieldWithDefault(this,23,0)},TronWebProto.AssetIssueContract.prototype.setPublicFreeAssetNetLimit=function(e){return n.Message.setProto3IntField(this,23,e)},TronWebProto.AssetIssueContract.prototype.getPublicFreeAssetNetUsage=function(){return n.Message.getFieldWithDefault(this,24,0)},TronWebProto.AssetIssueContract.prototype.setPublicFreeAssetNetUsage=function(e){return n.Message.setProto3IntField(this,24,e)},TronWebProto.AssetIssueContract.prototype.getPublicLatestFreeNetTime=function(){return n.Message.getFieldWithDefault(this,25,0)},TronWebProto.AssetIssueContract.prototype.setPublicLatestFreeNetTime=function(e){return n.Message.setProto3IntField(this,25,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransferAssetContract.prototype.toObject=function(e){return TronWebProto.TransferAssetContract.toObject(e,this)},TronWebProto.TransferAssetContract.toObject=function(e,t){var r={assetName:t.getAssetName_asB64(),ownerAddress:t.getOwnerAddress_asB64(),toAddress:t.getToAddress_asB64(),amount:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransferAssetContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransferAssetContract;return TronWebProto.TransferAssetContract.deserializeBinaryFromReader(r,t)},TronWebProto.TransferAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAssetName(r);break;case 2:r=t.readBytes();e.setOwnerAddress(r);break;case 3:r=t.readBytes();e.setToAddress(r);break;case 4:r=t.readInt64();e.setAmount(r);break;default:t.skipField()}}return e},TronWebProto.TransferAssetContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransferAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransferAssetContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAssetName_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(2,r),(r=e.getToAddress_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getAmount())&&t.writeInt64(4,r)},TronWebProto.TransferAssetContract.prototype.getAssetName=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.TransferAssetContract.prototype.getAssetName_asB64=function(){return n.Message.bytesAsB64(this.getAssetName())},TronWebProto.TransferAssetContract.prototype.getAssetName_asU8=function(){return n.Message.bytesAsU8(this.getAssetName())},TronWebProto.TransferAssetContract.prototype.setAssetName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TransferAssetContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.TransferAssetContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TransferAssetContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TransferAssetContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TransferAssetContract.prototype.getToAddress=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.TransferAssetContract.prototype.getToAddress_asB64=function(){return n.Message.bytesAsB64(this.getToAddress())},TronWebProto.TransferAssetContract.prototype.getToAddress_asU8=function(){return n.Message.bytesAsU8(this.getToAddress())},TronWebProto.TransferAssetContract.prototype.setToAddress=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.TransferAssetContract.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.TransferAssetContract.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeAssetContract.prototype.toObject=function(e){return TronWebProto.UnfreezeAssetContract.toObject(e,this)},TronWebProto.UnfreezeAssetContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnfreezeAssetContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnfreezeAssetContract;return TronWebProto.UnfreezeAssetContract.deserializeBinaryFromReader(r,t)},TronWebProto.UnfreezeAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField()}return e},TronWebProto.UnfreezeAssetContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnfreezeAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeAssetContract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeAssetContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateAssetContract.prototype.toObject=function(e){return TronWebProto.UpdateAssetContract.toObject(e,this)},TronWebProto.UpdateAssetContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),description:t.getDescription_asB64(),url:t.getUrl_asB64(),newLimit:n.Message.getFieldWithDefault(t,4,0),newPublicLimit:n.Message.getFieldWithDefault(t,5,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateAssetContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateAssetContract;return TronWebProto.UpdateAssetContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setDescription(r);break;case 3:r=t.readBytes();e.setUrl(r);break;case 4:r=t.readInt64();e.setNewLimit(r);break;case 5:r=t.readInt64();e.setNewPublicLimit(r);break;default:t.skipField()}}return e},TronWebProto.UpdateAssetContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateAssetContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getDescription_asU8()).length>0&&t.writeBytes(2,r),(r=e.getUrl_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getNewLimit())&&t.writeInt64(4,r),0!==(r=e.getNewPublicLimit())&&t.writeInt64(5,r)},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateAssetContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateAssetContract.prototype.getDescription=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.UpdateAssetContract.prototype.getDescription_asB64=function(){return n.Message.bytesAsB64(this.getDescription())},TronWebProto.UpdateAssetContract.prototype.getDescription_asU8=function(){return n.Message.bytesAsU8(this.getDescription())},TronWebProto.UpdateAssetContract.prototype.setDescription=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateAssetContract.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.UpdateAssetContract.prototype.getUrl_asB64=function(){return n.Message.bytesAsB64(this.getUrl())},TronWebProto.UpdateAssetContract.prototype.getUrl_asU8=function(){return n.Message.bytesAsU8(this.getUrl())},TronWebProto.UpdateAssetContract.prototype.setUrl=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.UpdateAssetContract.prototype.getNewLimit=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.UpdateAssetContract.prototype.setNewLimit=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.UpdateAssetContract.prototype.getNewPublicLimit=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.UpdateAssetContract.prototype.setNewPublicLimit=function(e){return n.Message.setProto3IntField(this,5,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ParticipateAssetIssueContract.prototype.toObject=function(e){return TronWebProto.ParticipateAssetIssueContract.toObject(e,this)},TronWebProto.ParticipateAssetIssueContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),toAddress:t.getToAddress_asB64(),assetName:t.getAssetName_asB64(),amount:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ParticipateAssetIssueContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ParticipateAssetIssueContract;return TronWebProto.ParticipateAssetIssueContract.deserializeBinaryFromReader(r,t)},TronWebProto.ParticipateAssetIssueContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setToAddress(r);break;case 3:r=t.readBytes();e.setAssetName(r);break;case 4:r=t.readInt64();e.setAmount(r);break;default:t.skipField()}}return e},TronWebProto.ParticipateAssetIssueContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ParticipateAssetIssueContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ParticipateAssetIssueContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getToAddress_asU8()).length>0&&t.writeBytes(2,r),(r=e.getAssetName_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getAmount())&&t.writeInt64(4,r)},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress_asB64=function(){return n.Message.bytesAsB64(this.getToAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress_asU8=function(){return n.Message.bytesAsU8(this.getToAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.setToAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName_asB64=function(){return n.Message.bytesAsB64(this.getAssetName())},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName_asU8=function(){return n.Message.bytesAsU8(this.getAssetName())},TronWebProto.ParticipateAssetIssueContract.prototype.setAssetName=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ParticipateAssetIssueContract.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,4,e)},o.object.extend(t,TronWebProto)},282:e=>{e.exports=a,a.default=a,a.stable=l,a.stableStringify=l;var t=\"[...]\",r=\"[Circular]\",n=[],o=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,t,r,a){var i;void 0===a&&(a=s()),c(e,\"\",0,[],void 0,0,a);try{i=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,f(t),r)}catch(e){return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return i}function i(e,t,r,s){var a=Object.getOwnPropertyDescriptor(s,r);void 0!==a.get?a.configurable?(Object.defineProperty(s,r,{value:e}),n.push([s,r,t,a])):o.push([t,r,e]):(s[r]=e,n.push([s,r,t]))}function c(e,n,o,s,a,u,l){var d;if(u+=1,\"object\"==typeof e&&null!==e){for(d=0;d<s.length;d++)if(s[d]===e)return void i(r,e,n,a);if(void 0!==l.depthLimit&&u>l.depthLimit)return void i(t,e,n,a);if(void 0!==l.edgesLimit&&o+1>l.edgesLimit)return void i(t,e,n,a);if(s.push(e),Array.isArray(e))for(d=0;d<e.length;d++)c(e[d],d,d,s,e,u,l);else{var f=Object.keys(e);for(d=0;d<f.length;d++){var p=f[d];c(e[p],p,d,s,e,u,l)}}s.pop()}}function u(e,t){return e<t?-1:e>t?1:0}function l(e,t,r,a){void 0===a&&(a=s());var i,c=d(e,\"\",0,[],void 0,0,a)||e;try{i=0===o.length?JSON.stringify(c,t,r):JSON.stringify(c,f(t),r)}catch(e){return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return i}function d(e,o,s,a,c,l,f){var p;if(l+=1,\"object\"==typeof e&&null!==e){for(p=0;p<a.length;p++)if(a[p]===e)return void i(r,e,o,c);try{if(\"function\"==typeof e.toJSON)return}catch(e){return}if(void 0!==f.depthLimit&&l>f.depthLimit)return void i(t,e,o,c);if(void 0!==f.edgesLimit&&s+1>f.edgesLimit)return void i(t,e,o,c);if(a.push(e),Array.isArray(e))for(p=0;p<e.length;p++)d(e[p],p,p,a,e,l,f);else{var h={},g=Object.keys(e).sort(u);for(p=0;p<g.length;p++){var y=g[p];d(e[y],y,p,a,e,l,f),h[y]=e[y]}if(void 0===c)return h;n.push([c,o,e]),c[o]=h}a.pop()}}function f(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(o.length>0)for(var n=0;n<o.length;n++){var s=o[n];if(s[1]===t&&s[0]===r){r=s[2],o.splice(n,1);break}}return e.call(this,t,r)}}},329:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if((0,o.default)(e),!s.test(e))return!1;for(var t=!0,r=0,n=e.length-2;n>=0;n--)if(e[n]>=\"A\"&&e[n]<=\"Z\")for(var a=e[n].charCodeAt(0)-55,i=0,c=[a%10,Math.trunc(a/10)];i<c.length;i++){var u=c[i];r+=t?u>=5?1+2*(u-5):2*u:u,t=!t}else{var l=e[n].charCodeAt(0)-\"0\".charCodeAt(0);r+=t?l>=5?1+2*(l-5):2*l:l,t=!t}var d=10*Math.trunc((r+9)/10)-r;return+e[e.length-1]===d};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;e.exports=t.default,e.exports.default=t.default},331:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(e);var r=s;if(r=t.require_hyphen?r.replace(\"?\",\"\"):r,!(r=t.case_sensitive?new RegExp(r):new RegExp(r,\"i\")).test(e))return!1;for(var n=e.replace(\"-\",\"\").toUpperCase(),a=0,i=0;i<n.length;i++){var c=n[i];a+=(\"X\"===c?10:+c)*(8-i)}return a%11==0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=\"^\\\\d{4}-?\\\\d{3}[\\\\dX]$\";e.exports=t.default,e.exports.default=t.default},335:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){if((0,n.default)(e),(r=(0,s.default)(r,i)).ignoreCase)return e.toLowerCase().split((0,o.default)(t).toLowerCase()).length>r.minOccurrences;return e.split((0,o.default)(t)).length>r.minOccurrences};var n=a(r(8354)),o=a(r(1069)),s=a(r(2533));function a(e){return e&&e.__esModule?e:{default:e}}var i={ignoreCase:!1,minOccurrences:1};e.exports=t.default,e.exports.default=t.default},385:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r=(\"object\"===s(t)?t.comparisonDate:t)||Date().toString(),n=(0,o.default)(r),a=(0,o.default)(e);return!!(a&&n&&a<n)};var n,o=(n=r(5071))&&n.__esModule?n:{default:n};function s(e){return s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},427:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return t=(0,o.default)(t,s),\"string\"==typeof e&&a[t.hourFormat][t.mode].test(e)};var n,o=(n=r(2533))&&n.__esModule?n:{default:n};var s={hourFormat:\"hour24\",mode:\"default\"},a={hour24:{default:/^([01]?[0-9]|2[0-3]):([0-5][0-9])$/,withSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/,withOptionalSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9])(?::([0-5][0-9]))?$/},hour12:{default:/^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/,withSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/,withOptionalSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9])(?::([0-5][0-9]))? (A|P)M$/}};e.exports=t.default,e.exports.default=t.default},448:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=t?new RegExp(\"^[\".concat(t.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\"),\"]+\"),\"g\"):/^\\s+/g;return e.replace(r,\"\")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},499:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.iso7064Check=function(e){for(var t=10,r=0;r<e.length-1;r++)t=(parseInt(e[r],10)+t)%10==0?9:(parseInt(e[r],10)+t)%10*2%11;return(t=1===t?0:11-t)===parseInt(e[10],10)},t.luhnCheck=function(e){for(var t=0,r=!1,n=e.length-1;n>=0;n--){if(r){var o=2*parseInt(e[n],10);t+=o>9?o.toString().split(\"\").map(function(e){return parseInt(e,10)}).reduce(function(e,t){return e+t},0):o}else t+=parseInt(e[n],10);r=!r}return t%10==0},t.reverseMultiplyAndSum=function(e,t){for(var r=0,n=0;n<e.length;n++)r+=e[n]*(t-n);return r},t.verhoeffCheck=function(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]],n=e.split(\"\").reverse().join(\"\"),o=0,s=0;s<n.length;s++)o=t[o][r[s%8][parseInt(n[s],10)]];return 0===o}},504:(e,t,r)=>{var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")(),a=r(4856);o.object.extend(proto,a),o.exportSymbol(\"TronWebProto.ClearABIContract\",null,s),o.exportSymbol(\"TronWebProto.ContractState\",null,s),o.exportSymbol(\"TronWebProto.CreateSmartContract\",null,s),o.exportSymbol(\"TronWebProto.SmartContract\",null,s),o.exportSymbol(\"TronWebProto.SmartContract.ABI\",null,s),o.exportSymbol(\"TronWebProto.SmartContract.ABI.Entry\",null,s),o.exportSymbol(\"TronWebProto.SmartContract.ABI.Entry.EntryType\",null,s),o.exportSymbol(\"TronWebProto.SmartContract.ABI.Entry.Param\",null,s),o.exportSymbol(\"TronWebProto.SmartContract.ABI.Entry.StateMutabilityType\",null,s),o.exportSymbol(\"TronWebProto.SmartContractDataWrapper\",null,s),o.exportSymbol(\"TronWebProto.TriggerSmartContract\",null,s),o.exportSymbol(\"TronWebProto.UpdateEnergyLimitContract\",null,s),o.exportSymbol(\"TronWebProto.UpdateSettingContract\",null,s),TronWebProto.SmartContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SmartContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.displayName=\"TronWebProto.SmartContract\"),TronWebProto.SmartContract.ABI=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.SmartContract.ABI.repeatedFields_,null)},o.inherits(TronWebProto.SmartContract.ABI,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.displayName=\"TronWebProto.SmartContract.ABI\"),TronWebProto.SmartContract.ABI.Entry=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.SmartContract.ABI.Entry.repeatedFields_,null)},o.inherits(TronWebProto.SmartContract.ABI.Entry,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.Entry.displayName=\"TronWebProto.SmartContract.ABI.Entry\"),TronWebProto.SmartContract.ABI.Entry.Param=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SmartContract.ABI.Entry.Param,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.Entry.Param.displayName=\"TronWebProto.SmartContract.ABI.Entry.Param\"),TronWebProto.ContractState=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ContractState,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ContractState.displayName=\"TronWebProto.ContractState\"),TronWebProto.CreateSmartContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.CreateSmartContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.CreateSmartContract.displayName=\"TronWebProto.CreateSmartContract\"),TronWebProto.TriggerSmartContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TriggerSmartContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TriggerSmartContract.displayName=\"TronWebProto.TriggerSmartContract\"),TronWebProto.ClearABIContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ClearABIContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ClearABIContract.displayName=\"TronWebProto.ClearABIContract\"),TronWebProto.UpdateSettingContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateSettingContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateSettingContract.displayName=\"TronWebProto.UpdateSettingContract\"),TronWebProto.UpdateEnergyLimitContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateEnergyLimitContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateEnergyLimitContract.displayName=\"TronWebProto.UpdateEnergyLimitContract\"),TronWebProto.SmartContractDataWrapper=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SmartContractDataWrapper,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContractDataWrapper.displayName=\"TronWebProto.SmartContractDataWrapper\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.prototype.toObject=function(e){return TronWebProto.SmartContract.toObject(e,this)},TronWebProto.SmartContract.toObject=function(e,t){var r,o={originAddress:t.getOriginAddress_asB64(),contractAddress:t.getContractAddress_asB64(),abi:(r=t.getAbi())&&TronWebProto.SmartContract.ABI.toObject(e,r),bytecode:t.getBytecode_asB64(),callValue:n.Message.getFieldWithDefault(t,5,0),consumeUserResourcePercent:n.Message.getFieldWithDefault(t,6,0),name:n.Message.getFieldWithDefault(t,7,\"\"),originEnergyLimit:n.Message.getFieldWithDefault(t,8,0),codeHash:t.getCodeHash_asB64(),trxHash:t.getTrxHash_asB64(),version:n.Message.getFieldWithDefault(t,11,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.SmartContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract;return TronWebProto.SmartContract.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOriginAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;case 3:r=new TronWebProto.SmartContract.ABI;t.readMessage(r,TronWebProto.SmartContract.ABI.deserializeBinaryFromReader),e.setAbi(r);break;case 4:r=t.readBytes();e.setBytecode(r);break;case 5:r=t.readInt64();e.setCallValue(r);break;case 6:r=t.readInt64();e.setConsumeUserResourcePercent(r);break;case 7:r=t.readString();e.setName(r);break;case 8:r=t.readInt64();e.setOriginEnergyLimit(r);break;case 9:r=t.readBytes();e.setCodeHash(r);break;case 10:r=t.readBytes();e.setTrxHash(r);break;case 11:r=t.readInt32();e.setVersion(r);break;default:t.skipField()}}return e},TronWebProto.SmartContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOriginAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),null!=(r=e.getAbi())&&t.writeMessage(3,r,TronWebProto.SmartContract.ABI.serializeBinaryToWriter),(r=e.getBytecode_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getCallValue())&&t.writeInt64(5,r),0!==(r=e.getConsumeUserResourcePercent())&&t.writeInt64(6,r),(r=e.getName()).length>0&&t.writeString(7,r),0!==(r=e.getOriginEnergyLimit())&&t.writeInt64(8,r),(r=e.getCodeHash_asU8()).length>0&&t.writeBytes(9,r),(r=e.getTrxHash_asU8()).length>0&&t.writeBytes(10,r),0!==(r=e.getVersion())&&t.writeInt32(11,r)},TronWebProto.SmartContract.ABI.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.toObject(e,this)},TronWebProto.SmartContract.ABI.toObject=function(e,t){var r={entrysList:n.Message.toObjectList(t.getEntrysList(),TronWebProto.SmartContract.ABI.Entry.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContract.ABI.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract.ABI;return TronWebProto.SmartContract.ABI.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.ABI.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=new TronWebProto.SmartContract.ABI.Entry;t.readMessage(r,TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader),e.addEntrys(r)}else t.skipField()}return e},TronWebProto.SmartContract.ABI.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.ABI.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.serializeBinaryToWriter=function(e,t){var r;(r=e.getEntrysList()).length>0&&t.writeRepeatedMessage(1,r,TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter)},TronWebProto.SmartContract.ABI.Entry.repeatedFields_=[4,5],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.Entry.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.Entry.toObject(e,this)},TronWebProto.SmartContract.ABI.Entry.toObject=function(e,t){var r={anonymous:n.Message.getBooleanFieldWithDefault(t,1,!1),constant:n.Message.getBooleanFieldWithDefault(t,2,!1),name:n.Message.getFieldWithDefault(t,3,\"\"),inputsList:n.Message.toObjectList(t.getInputsList(),TronWebProto.SmartContract.ABI.Entry.Param.toObject,e),outputsList:n.Message.toObjectList(t.getOutputsList(),TronWebProto.SmartContract.ABI.Entry.Param.toObject,e),type:n.Message.getFieldWithDefault(t,6,0),payable:n.Message.getBooleanFieldWithDefault(t,7,!1),statemutability:n.Message.getFieldWithDefault(t,8,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContract.ABI.Entry.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract.ABI.Entry;return TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBool();e.setAnonymous(r);break;case 2:r=t.readBool();e.setConstant(r);break;case 3:r=t.readString();e.setName(r);break;case 4:r=new TronWebProto.SmartContract.ABI.Entry.Param;t.readMessage(r,TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader),e.addInputs(r);break;case 5:r=new TronWebProto.SmartContract.ABI.Entry.Param;t.readMessage(r,TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader),e.addOutputs(r);break;case 6:r=t.readEnum();e.setType(r);break;case 7:r=t.readBool();e.setPayable(r);break;case 8:r=t.readEnum();e.setStatemutability(r);break;default:t.skipField()}}return e},TronWebProto.SmartContract.ABI.Entry.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAnonymous())&&t.writeBool(1,r),(r=e.getConstant())&&t.writeBool(2,r),(r=e.getName()).length>0&&t.writeString(3,r),(r=e.getInputsList()).length>0&&t.writeRepeatedMessage(4,r,TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter),(r=e.getOutputsList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter),0!==(r=e.getType())&&t.writeEnum(6,r),(r=e.getPayable())&&t.writeBool(7,r),0!==(r=e.getStatemutability())&&t.writeEnum(8,r)},TronWebProto.SmartContract.ABI.Entry.EntryType={UNKNOWNENTRYTYPE:0,CONSTRUCTOR:1,FUNCTION:2,EVENT:3,FALLBACK:4,RECEIVE:5,ERROR:6},TronWebProto.SmartContract.ABI.Entry.StateMutabilityType={UNKNOWNMUTABILITYTYPE:0,PURE:1,VIEW:2,NONPAYABLE:3,PAYABLE:4},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.Entry.Param.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.Entry.Param.toObject(e,this)},TronWebProto.SmartContract.ABI.Entry.Param.toObject=function(e,t){var r={indexed:n.Message.getBooleanFieldWithDefault(t,1,!1),name:n.Message.getFieldWithDefault(t,2,\"\"),type:n.Message.getFieldWithDefault(t,3,\"\")};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract.ABI.Entry.Param;return TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBool();e.setIndexed(r);break;case 2:r=t.readString();e.setName(r);break;case 3:r=t.readString();e.setType(r);break;default:t.skipField()}}return e},TronWebProto.SmartContract.ABI.Entry.Param.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getIndexed())&&t.writeBool(1,r),(r=e.getName()).length>0&&t.writeString(2,r),(r=e.getType()).length>0&&t.writeString(3,r)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getIndexed=function(){return n.Message.getBooleanFieldWithDefault(this,1,!1)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setIndexed=function(e){return n.Message.setProto3BooleanField(this,1,e)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getName=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setName=function(e){return n.Message.setProto3StringField(this,2,e)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getType=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setType=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getAnonymous=function(){return n.Message.getBooleanFieldWithDefault(this,1,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setAnonymous=function(e){return n.Message.setProto3BooleanField(this,1,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getConstant=function(){return n.Message.getBooleanFieldWithDefault(this,2,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setConstant=function(e){return n.Message.setProto3BooleanField(this,2,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getName=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.SmartContract.ABI.Entry.prototype.setName=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getInputsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry.Param,4)},TronWebProto.SmartContract.ABI.Entry.prototype.setInputsList=function(e){return n.Message.setRepeatedWrapperField(this,4,e)},TronWebProto.SmartContract.ABI.Entry.prototype.addInputs=function(e,t){return n.Message.addToRepeatedWrapperField(this,4,e,TronWebProto.SmartContract.ABI.Entry.Param,t)},TronWebProto.SmartContract.ABI.Entry.prototype.clearInputsList=function(){return this.setInputsList([])},TronWebProto.SmartContract.ABI.Entry.prototype.getOutputsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry.Param,5)},TronWebProto.SmartContract.ABI.Entry.prototype.setOutputsList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.SmartContract.ABI.Entry.prototype.addOutputs=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.SmartContract.ABI.Entry.Param,t)},TronWebProto.SmartContract.ABI.Entry.prototype.clearOutputsList=function(){return this.setOutputsList([])},TronWebProto.SmartContract.ABI.Entry.prototype.getType=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.SmartContract.ABI.Entry.prototype.setType=function(e){return n.Message.setProto3EnumField(this,6,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getPayable=function(){return n.Message.getBooleanFieldWithDefault(this,7,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setPayable=function(e){return n.Message.setProto3BooleanField(this,7,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getStatemutability=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.SmartContract.ABI.Entry.prototype.setStatemutability=function(e){return n.Message.setProto3EnumField(this,8,e)},TronWebProto.SmartContract.ABI.prototype.getEntrysList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry,1)},TronWebProto.SmartContract.ABI.prototype.setEntrysList=function(e){return n.Message.setRepeatedWrapperField(this,1,e)},TronWebProto.SmartContract.ABI.prototype.addEntrys=function(e,t){return n.Message.addToRepeatedWrapperField(this,1,e,TronWebProto.SmartContract.ABI.Entry,t)},TronWebProto.SmartContract.ABI.prototype.clearEntrysList=function(){return this.setEntrysList([])},TronWebProto.SmartContract.prototype.getOriginAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.SmartContract.prototype.getOriginAddress_asB64=function(){return n.Message.bytesAsB64(this.getOriginAddress())},TronWebProto.SmartContract.prototype.getOriginAddress_asU8=function(){return n.Message.bytesAsU8(this.getOriginAddress())},TronWebProto.SmartContract.prototype.setOriginAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.SmartContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.SmartContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.SmartContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.SmartContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.SmartContract.prototype.getAbi=function(){return n.Message.getWrapperField(this,TronWebProto.SmartContract.ABI,3)},TronWebProto.SmartContract.prototype.setAbi=function(e){return n.Message.setWrapperField(this,3,e)},TronWebProto.SmartContract.prototype.clearAbi=function(){return this.setAbi(void 0)},TronWebProto.SmartContract.prototype.hasAbi=function(){return null!=n.Message.getField(this,3)},TronWebProto.SmartContract.prototype.getBytecode=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.SmartContract.prototype.getBytecode_asB64=function(){return n.Message.bytesAsB64(this.getBytecode())},TronWebProto.SmartContract.prototype.getBytecode_asU8=function(){return n.Message.bytesAsU8(this.getBytecode())},TronWebProto.SmartContract.prototype.setBytecode=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.SmartContract.prototype.getCallValue=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.SmartContract.prototype.setCallValue=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.SmartContract.prototype.getConsumeUserResourcePercent=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.SmartContract.prototype.setConsumeUserResourcePercent=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.SmartContract.prototype.getName=function(){return n.Message.getFieldWithDefault(this,7,\"\")},TronWebProto.SmartContract.prototype.setName=function(e){return n.Message.setProto3StringField(this,7,e)},TronWebProto.SmartContract.prototype.getOriginEnergyLimit=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.SmartContract.prototype.setOriginEnergyLimit=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.SmartContract.prototype.getCodeHash=function(){return n.Message.getFieldWithDefault(this,9,\"\")},TronWebProto.SmartContract.prototype.getCodeHash_asB64=function(){return n.Message.bytesAsB64(this.getCodeHash())},TronWebProto.SmartContract.prototype.getCodeHash_asU8=function(){return n.Message.bytesAsU8(this.getCodeHash())},TronWebProto.SmartContract.prototype.setCodeHash=function(e){return n.Message.setProto3BytesField(this,9,e)},TronWebProto.SmartContract.prototype.getTrxHash=function(){return n.Message.getFieldWithDefault(this,10,\"\")},TronWebProto.SmartContract.prototype.getTrxHash_asB64=function(){return n.Message.bytesAsB64(this.getTrxHash())},TronWebProto.SmartContract.prototype.getTrxHash_asU8=function(){return n.Message.bytesAsU8(this.getTrxHash())},TronWebProto.SmartContract.prototype.setTrxHash=function(e){return n.Message.setProto3BytesField(this,10,e)},TronWebProto.SmartContract.prototype.getVersion=function(){return n.Message.getFieldWithDefault(this,11,0)},TronWebProto.SmartContract.prototype.setVersion=function(e){return n.Message.setProto3IntField(this,11,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ContractState.prototype.toObject=function(e){return TronWebProto.ContractState.toObject(e,this)},TronWebProto.ContractState.toObject=function(e,t){var r={energyUsage:n.Message.getFieldWithDefault(t,1,0),energyFactor:n.Message.getFieldWithDefault(t,2,0),updateCycle:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ContractState.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ContractState;return TronWebProto.ContractState.deserializeBinaryFromReader(r,t)},TronWebProto.ContractState.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setEnergyUsage(r);break;case 2:r=t.readInt64();e.setEnergyFactor(r);break;case 3:r=t.readInt64();e.setUpdateCycle(r);break;default:t.skipField()}}return e},TronWebProto.ContractState.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ContractState.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ContractState.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getEnergyUsage())&&t.writeInt64(1,r),0!==(r=e.getEnergyFactor())&&t.writeInt64(2,r),0!==(r=e.getUpdateCycle())&&t.writeInt64(3,r)},TronWebProto.ContractState.prototype.getEnergyUsage=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.ContractState.prototype.setEnergyUsage=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.ContractState.prototype.getEnergyFactor=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ContractState.prototype.setEnergyFactor=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ContractState.prototype.getUpdateCycle=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.ContractState.prototype.setUpdateCycle=function(e){return n.Message.setProto3IntField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.CreateSmartContract.prototype.toObject=function(e){return TronWebProto.CreateSmartContract.toObject(e,this)},TronWebProto.CreateSmartContract.toObject=function(e,t){var r,o={ownerAddress:t.getOwnerAddress_asB64(),newContract:(r=t.getNewContract())&&TronWebProto.SmartContract.toObject(e,r),callTokenValue:n.Message.getFieldWithDefault(t,3,0),tokenId:n.Message.getFieldWithDefault(t,4,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.CreateSmartContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.CreateSmartContract;return TronWebProto.CreateSmartContract.deserializeBinaryFromReader(r,t)},TronWebProto.CreateSmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=new TronWebProto.SmartContract;t.readMessage(r,TronWebProto.SmartContract.deserializeBinaryFromReader),e.setNewContract(r);break;case 3:r=t.readInt64();e.setCallTokenValue(r);break;case 4:r=t.readInt64();e.setTokenId(r);break;default:t.skipField()}}return e},TronWebProto.CreateSmartContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.CreateSmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.CreateSmartContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),null!=(r=e.getNewContract())&&t.writeMessage(2,r,TronWebProto.SmartContract.serializeBinaryToWriter),0!==(r=e.getCallTokenValue())&&t.writeInt64(3,r),0!==(r=e.getTokenId())&&t.writeInt64(4,r)},TronWebProto.CreateSmartContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.CreateSmartContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.CreateSmartContract.prototype.getNewContract=function(){return n.Message.getWrapperField(this,TronWebProto.SmartContract,2)},TronWebProto.CreateSmartContract.prototype.setNewContract=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.CreateSmartContract.prototype.clearNewContract=function(){return this.setNewContract(void 0)},TronWebProto.CreateSmartContract.prototype.hasNewContract=function(){return null!=n.Message.getField(this,2)},TronWebProto.CreateSmartContract.prototype.getCallTokenValue=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.CreateSmartContract.prototype.setCallTokenValue=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.CreateSmartContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.CreateSmartContract.prototype.setTokenId=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TriggerSmartContract.prototype.toObject=function(e){return TronWebProto.TriggerSmartContract.toObject(e,this)},TronWebProto.TriggerSmartContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64(),callValue:n.Message.getFieldWithDefault(t,3,0),data:t.getData_asB64(),callTokenValue:n.Message.getFieldWithDefault(t,5,0),tokenId:n.Message.getFieldWithDefault(t,6,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TriggerSmartContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TriggerSmartContract;return TronWebProto.TriggerSmartContract.deserializeBinaryFromReader(r,t)},TronWebProto.TriggerSmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;case 3:r=t.readInt64();e.setCallValue(r);break;case 4:r=t.readBytes();e.setData(r);break;case 5:r=t.readInt64();e.setCallTokenValue(r);break;case 6:r=t.readInt64();e.setTokenId(r);break;default:t.skipField()}}return e},TronWebProto.TriggerSmartContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TriggerSmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TriggerSmartContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getCallValue())&&t.writeInt64(3,r),(r=e.getData_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getCallTokenValue())&&t.writeInt64(5,r),0!==(r=e.getTokenId())&&t.writeInt64(6,r)},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TriggerSmartContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TriggerSmartContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.TriggerSmartContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.TriggerSmartContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.TriggerSmartContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TriggerSmartContract.prototype.getCallValue=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.TriggerSmartContract.prototype.setCallValue=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.TriggerSmartContract.prototype.getData=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.TriggerSmartContract.prototype.getData_asB64=function(){return n.Message.bytesAsB64(this.getData())},TronWebProto.TriggerSmartContract.prototype.getData_asU8=function(){return n.Message.bytesAsU8(this.getData())},TronWebProto.TriggerSmartContract.prototype.setData=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.TriggerSmartContract.prototype.getCallTokenValue=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.TriggerSmartContract.prototype.setCallTokenValue=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.TriggerSmartContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.TriggerSmartContract.prototype.setTokenId=function(e){return n.Message.setProto3IntField(this,6,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ClearABIContract.prototype.toObject=function(e){return TronWebProto.ClearABIContract.toObject(e,this)},TronWebProto.ClearABIContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ClearABIContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ClearABIContract;return TronWebProto.ClearABIContract.deserializeBinaryFromReader(r,t)},TronWebProto.ClearABIContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;default:t.skipField()}}return e},TronWebProto.ClearABIContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ClearABIContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ClearABIContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.ClearABIContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ClearABIContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ClearABIContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ClearABIContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ClearABIContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.ClearABIContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.ClearABIContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.ClearABIContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateSettingContract.prototype.toObject=function(e){return TronWebProto.UpdateSettingContract.toObject(e,this)},TronWebProto.UpdateSettingContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64(),consumeUserResourcePercent:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateSettingContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateSettingContract;return TronWebProto.UpdateSettingContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateSettingContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;case 3:r=t.readInt64();e.setConsumeUserResourcePercent(r);break;default:t.skipField()}}return e},TronWebProto.UpdateSettingContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateSettingContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateSettingContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getConsumeUserResourcePercent())&&t.writeInt64(3,r)},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateSettingContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateSettingContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.UpdateSettingContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.UpdateSettingContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.UpdateSettingContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateSettingContract.prototype.getConsumeUserResourcePercent=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UpdateSettingContract.prototype.setConsumeUserResourcePercent=function(e){return n.Message.setProto3IntField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateEnergyLimitContract.prototype.toObject=function(e){return TronWebProto.UpdateEnergyLimitContract.toObject(e,this)},TronWebProto.UpdateEnergyLimitContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64(),originEnergyLimit:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateEnergyLimitContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateEnergyLimitContract;return TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;case 3:r=t.readInt64();e.setOriginEnergyLimit(r);break;default:t.skipField()}}return e},TronWebProto.UpdateEnergyLimitContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getOriginEnergyLimit())&&t.writeInt64(3,r)},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateEnergyLimitContract.prototype.getOriginEnergyLimit=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit=function(e){return n.Message.setProto3IntField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContractDataWrapper.prototype.toObject=function(e){return TronWebProto.SmartContractDataWrapper.toObject(e,this)},TronWebProto.SmartContractDataWrapper.toObject=function(e,t){var r,n={smartContract:(r=t.getSmartContract())&&TronWebProto.SmartContract.toObject(e,r),runtimecode:t.getRuntimecode_asB64(),contractState:(r=t.getContractState())&&TronWebProto.ContractState.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.SmartContractDataWrapper.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContractDataWrapper;return TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.SmartContract;t.readMessage(r,TronWebProto.SmartContract.deserializeBinaryFromReader),e.setSmartContract(r);break;case 2:r=t.readBytes();e.setRuntimecode(r);break;case 3:r=new TronWebProto.ContractState;t.readMessage(r,TronWebProto.ContractState.deserializeBinaryFromReader),e.setContractState(r);break;default:t.skipField()}}return e},TronWebProto.SmartContractDataWrapper.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getSmartContract())&&t.writeMessage(1,r,TronWebProto.SmartContract.serializeBinaryToWriter),(r=e.getRuntimecode_asU8()).length>0&&t.writeBytes(2,r),null!=(r=e.getContractState())&&t.writeMessage(3,r,TronWebProto.ContractState.serializeBinaryToWriter)},TronWebProto.SmartContractDataWrapper.prototype.getSmartContract=function(){return n.Message.getWrapperField(this,TronWebProto.SmartContract,1)},TronWebProto.SmartContractDataWrapper.prototype.setSmartContract=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.SmartContractDataWrapper.prototype.clearSmartContract=function(){return this.setSmartContract(void 0)},TronWebProto.SmartContractDataWrapper.prototype.hasSmartContract=function(){return null!=n.Message.getField(this,1)},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asB64=function(){return n.Message.bytesAsB64(this.getRuntimecode())},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asU8=function(){return n.Message.bytesAsU8(this.getRuntimecode())},TronWebProto.SmartContractDataWrapper.prototype.setRuntimecode=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.SmartContractDataWrapper.prototype.getContractState=function(){return n.Message.getWrapperField(this,TronWebProto.ContractState,3)},TronWebProto.SmartContractDataWrapper.prototype.setContractState=function(e){return n.Message.setWrapperField(this,3,e)},TronWebProto.SmartContractDataWrapper.prototype.clearContractState=function(){return this.setContractState(void 0)},TronWebProto.SmartContractDataWrapper.prototype.hasContractState=function(){return null!=n.Message.getField(this,3)},o.object.extend(t,TronWebProto)},532:(e,t,r)=>{const n=r(7784);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},567:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;t.default=function(e,t){return e.some(function(e){return t===e})};e.exports=t.default,e.exports.default=t.default},835:(e,t,r)=>{const n=r(8925),o=r(3579),s=r(5456),a=r(5933),i=r(2615),c=r(2436);e.exports=(e,t,r,u)=>{switch(t){case\"===\":return\"object\"==typeof e&&(e=e.version),\"object\"==typeof r&&(r=r.version),e===r;case\"!==\":return\"object\"==typeof e&&(e=e.version),\"object\"==typeof r&&(r=r.version),e!==r;case\"\":case\"=\":case\"==\":return n(e,r,u);case\"!=\":return o(e,r,u);case\">\":return s(e,r,u);case\">=\":return a(e,r,u);case\"<\":return i(e,r,u);case\"<=\":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},924:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t in u)return u[t].test(e);if(\"any\"===t){for(var r in u){if(u.hasOwnProperty(r))if(u[r].test(e))return!0}return!1}throw new Error(\"Invalid locale '\".concat(t,\"'\"))},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^\\d{3}$/,a=/^\\d{4}$/,i=/^\\d{5}$/,c=/^\\d{6}$/,u={AD:/^AD\\d{3}$/,AT:a,AU:a,AZ:/^AZ\\d{4}$/,BA:/^([7-8]\\d{4}$)/,BD:/^([1-8][0-9]{3}|9[0-4][0-9]{2})$/,BE:a,BG:a,BR:/^\\d{5}-?\\d{3}$/,BY:/^2[1-4]\\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][\\s\\-]?\\d[ABCEGHJ-NPRSTV-Z]\\d$/i,CH:a,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}$/,CO:/^(05|08|11|13|15|17|18|19|20|23|25|27|41|44|47|50|52|54|63|66|68|70|73|76|81|85|86|88|91|94|95|97|99)(\\d{4})$/,CZ:/^\\d{3}\\s?\\d{2}$/,DE:i,DK:a,DO:i,DZ:i,EE:i,ES:/^(5[0-2]{1}|[0-4]{1}\\d{1})\\d{3}$/,FI:i,FR:/^(?:(?:0[1-9]|[1-8]\\d|9[0-5])\\d{3}|97[1-46]\\d{2})$/,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:a,ID:i,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:/^(?!(\\d)\\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:s,IT:i,JP:/^\\d{3}\\-\\d{4}$/,KE:i,KR:/^(\\d{5}|\\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\\-\\d{5}$/,LU:a,LV:/^LV\\-\\d{4}$/,LK:i,MG:s,MX:i,MT:/^[A-Za-z]{3}\\s{0,1}\\d{4}$/,MY:i,NL:/^[1-9]\\d{3}\\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:a,NP:/^(10|21|22|32|33|34|44|45|56|57)\\d{3}$|^(977)$/i,NZ:a,PK:i,PL:/^\\d{2}\\-\\d{3}$/,PR:/^00[679]\\d{2}([ -]\\d{4})?$/,PT:/^\\d{4}\\-\\d{3}?$/,RO:c,RU:c,SA:i,SE:/^[1-9]\\d{2}\\s?\\d{2}$/,SG:c,SI:a,SK:/^\\d{3}\\s?\\d{2}$/,TH:i,TN:a,TW:/^\\d{3}(\\d{2,3})?$/,UA:i,US:/^\\d{5}(-\\d{4})?$/,ZA:a,ZM:i};t.locales=Object.keys(u)},939:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,o.default)(e),e===t};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},946:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=r(4830),a=r(6820),i=(t=e.exports={}).re=[],c=t.safeRe=[],u=t.src=[],l=t.safeSrc=[],d=t.t={};let f=0;const p=\"[a-zA-Z0-9-]\",h=[[\"\\\\s\",1],[\"\\\\d\",s],[p,o]],g=(e,t,r)=>{const n=(e=>{for(const[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=f++;a(e,o,t),d[e]=o,u[o]=t,l[o]=n,i[o]=new RegExp(t,r?\"g\":void 0),c[o]=new RegExp(n,r?\"g\":void 0)};g(\"NUMERICIDENTIFIER\",\"0|[1-9]\\\\d*\"),g(\"NUMERICIDENTIFIERLOOSE\",\"\\\\d+\"),g(\"NONNUMERICIDENTIFIER\",`\\\\d*[a-zA-Z-]${p}*`),g(\"MAINVERSION\",`(${u[d.NUMERICIDENTIFIER]})\\\\.(${u[d.NUMERICIDENTIFIER]})\\\\.(${u[d.NUMERICIDENTIFIER]})`),g(\"MAINVERSIONLOOSE\",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),g(\"PRERELEASEIDENTIFIER\",`(?:${u[d.NUMERICIDENTIFIER]}|${u[d.NONNUMERICIDENTIFIER]})`),g(\"PRERELEASEIDENTIFIERLOOSE\",`(?:${u[d.NUMERICIDENTIFIERLOOSE]}|${u[d.NONNUMERICIDENTIFIER]})`),g(\"PRERELEASE\",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\\\.${u[d.PRERELEASEIDENTIFIER]})*))`),g(\"PRERELEASELOOSE\",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),g(\"BUILDIDENTIFIER\",`${p}+`),g(\"BUILD\",`(?:\\\\+(${u[d.BUILDIDENTIFIER]}(?:\\\\.${u[d.BUILDIDENTIFIER]})*))`),g(\"FULLPLAIN\",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),g(\"FULL\",`^${u[d.FULLPLAIN]}$`),g(\"LOOSEPLAIN\",`[v=\\\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),g(\"LOOSE\",`^${u[d.LOOSEPLAIN]}$`),g(\"GTLT\",\"((?:<|>)?=?)\"),g(\"XRANGEIDENTIFIERLOOSE\",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`),g(\"XRANGEIDENTIFIER\",`${u[d.NUMERICIDENTIFIER]}|x|X|\\\\*`),g(\"XRANGEPLAIN\",`[v=\\\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\\\.(${u[d.XRANGEIDENTIFIER]})(?:\\\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),g(\"XRANGEPLAINLOOSE\",`[v=\\\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),g(\"XRANGE\",`^${u[d.GTLT]}\\\\s*${u[d.XRANGEPLAIN]}$`),g(\"XRANGELOOSE\",`^${u[d.GTLT]}\\\\s*${u[d.XRANGEPLAINLOOSE]}$`),g(\"COERCEPLAIN\",`(^|[^\\\\d])(\\\\d{1,${n}})(?:\\\\.(\\\\d{1,${n}}))?(?:\\\\.(\\\\d{1,${n}}))?`),g(\"COERCE\",`${u[d.COERCEPLAIN]}(?:$|[^\\\\d])`),g(\"COERCEFULL\",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?(?:$|[^\\\\d])`),g(\"COERCERTL\",u[d.COERCE],!0),g(\"COERCERTLFULL\",u[d.COERCEFULL],!0),g(\"LONETILDE\",\"(?:~>?)\"),g(\"TILDETRIM\",`(\\\\s*)${u[d.LONETILDE]}\\\\s+`,!0),t.tildeTrimReplace=\"$1~\",g(\"TILDE\",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),g(\"TILDELOOSE\",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),g(\"LONECARET\",\"(?:\\\\^)\"),g(\"CARETTRIM\",`(\\\\s*)${u[d.LONECARET]}\\\\s+`,!0),t.caretTrimReplace=\"$1^\",g(\"CARET\",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),g(\"CARETLOOSE\",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),g(\"COMPARATORLOOSE\",`^${u[d.GTLT]}\\\\s*(${u[d.LOOSEPLAIN]})$|^$`),g(\"COMPARATOR\",`^${u[d.GTLT]}\\\\s*(${u[d.FULLPLAIN]})$|^$`),g(\"COMPARATORTRIM\",`(\\\\s*)${u[d.GTLT]}\\\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace=\"$1$2$3\",g(\"HYPHENRANGE\",`^\\\\s*(${u[d.XRANGEPLAIN]})\\\\s+-\\\\s+(${u[d.XRANGEPLAIN]})\\\\s*$`),g(\"HYPHENRANGELOOSE\",`^\\\\s*(${u[d.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${u[d.XRANGEPLAINLOOSE]})\\\\s*$`),g(\"STAR\",\"(<|>)?=?\\\\s*\\\\*\"),g(\"GTE0\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\"),g(\"GTE0PRE\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\")},978:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},1048:(e,t,r)=>{\"use strict\";const n=r(7991),o=r(9318),s=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;t.hp=c,t.IS=50;const a=2147483647;function i(e){if(e>a)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if(\"number\"==typeof e){if(\"string\"==typeof t)throw new TypeError('The \"string\" argument must be of type string. Received type number');return d(e)}return u(e,t,r)}function u(e,t,r){if(\"string\"==typeof e)return function(e,t){\"string\"==typeof t&&\"\"!==t||(t=\"utf8\");if(!c.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);const r=0|g(e,t);let n=i(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return p(e,t,r);if(\"undefined\"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return p(e,t,r);if(\"number\"==typeof e)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|h(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return\"number\"!=typeof e.length||J(e.length)?i(0):f(e);if(\"Buffer\"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(o)return o;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive](\"string\"),t,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e)}function l(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be of type number');if(e<0)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}function d(e){return l(e),i(e<0?0:0|h(e))}function f(e){const t=e.length<0?0:0|h(e.length),r=i(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('\"offset\" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function h(e){if(e>=a)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+a.toString(16)+\" bytes\");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if(\"string\"!=typeof e)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return H(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return K(e).length;default:if(o)return n?-1:H(e).length;t=(\"\"+t).toLowerCase(),o=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return _(this,t,r);case\"utf8\":case\"utf-8\":return B(this,t,r);case\"ascii\":return S(this,t,r);case\"latin1\":case\"binary\":return I(this,t,r);case\"base64\":return C(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return R(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if(\"string\"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,o);if(\"number\"==typeof t)return t&=255,\"function\"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,o);throw new TypeError(\"val must be string, number or Buffer\")}function w(e,t,r,n,o){let s,a=1,i=e.length,c=t.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(e.length<2||t.length<2)return-1;a=2,i/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(s=r;s<i;s++)if(u(e,s)===u(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===c)return n*a}else-1!==n&&(s-=s-n),n=-1}else for(r+c>i&&(r=i-c),s=r;s>=0;s--){let r=!0;for(let n=0;n<c;n++)if(u(e,s+n)!==u(t,n)){r=!1;break}if(r)return s}return-1}function T(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const s=t.length;let a;for(n>s/2&&(n=s/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function A(e,t,r,n){return q(H(t,e.length-r),e,r,n)}function v(e,t,r,n){return q(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function P(e,t,r,n){return q(K(t),e,r,n)}function E(e,t,r,n){return q(function(e,t){let r,n,o;const s=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,s.push(o),s.push(n);return s}(t,e.length-r),e,r,n)}function C(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function B(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let s=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,i,c;switch(a){case 1:t<128&&(s=t);break;case 2:r=e[o+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(s=c));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(s=c));break;case 4:r=e[o+1],n=e[o+2],i=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&i)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&i,c>65535&&c<1114112&&(s=c))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),o+=a}return function(e){const t=e.length;if(t<=W)return String.fromCharCode.apply(String,e);let r=\"\",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=W));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||\"undefined\"==typeof console||\"function\"!=typeof console.error||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(c.prototype,\"parent\",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,\"offset\",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?i(e):void 0!==t?\"string\"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,s=Math.min(r,n);o<s;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Z(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('\"list\" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?\"\":0===arguments.length?B(this,0,e):y.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e=\"\";const r=t.IS;return e=this.toString(\"hex\",0,r).replace(/(.{2})/g,\"$1 \").trim(),this.length>r&&(e+=\" ... \"),\"<Buffer \"+e+\">\"},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError(\"out of range index\");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const i=Math.min(s,a),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<i;++e)if(u[e]!==l[e]){s=u[e],a=l[e];break}return s<a?-1:a<s?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n=\"utf8\",r=this.length,t=0;else if(void 0===r&&\"string\"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");let s=!1;for(;;)switch(n){case\"hex\":return T(this,e,t,r);case\"utf8\":case\"utf-8\":return A(this,e,t,r);case\"ascii\":case\"latin1\":case\"binary\":return v(this,e,t,r);case\"base64\":return P(this,e,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return E(this,e,t,r);default:if(s)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const W=4096;function S(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function I(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function _(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o=\"\";for(let n=t;n<r;++n)o+=Y[e[n]];return o}function R(e,t,r){const n=e.slice(t,r);let o=\"\";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function x(e,t,r){if(e%1!=0||e<0)throw new RangeError(\"offset is not uint\");if(e+t>r)throw new RangeError(\"Trying to access beyond buffer length\")}function O(e,t,r,n,o,s){if(!c.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>o||t<s)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\")}function M(e,t,r,n,o){z(t,n,o,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function F(e,t,r,n,o){z(t,n,o,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function k(e,t,r,n,o,s){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function N(e,t,r,n,s){return t=+t,r>>>=0,s||k(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,s){return t=+t,r>>>=0,s||k(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X(function(e){j(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))}),c.prototype.readBigUInt64BE=X(function(e){j(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)}),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);let n=t,o=1,s=this[e+--n];for(;n>0&&(o*=256);)s+=this[e+--n]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X(function(e){j(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),c.prototype.readBigInt64BE=X(function(e){j(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){O(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){O(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X(function(e,t=0){return M(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),c.prototype.writeBigUInt64BE=X(function(e,t=0){return F(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X(function(e,t=0){return M(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))}),c.prototype.writeBigInt64BE=X(function(e,t=0){return F(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))}),c.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError(\"targetStart out of bounds\");if(r<0||r>=this.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if(\"string\"==typeof e){if(\"string\"==typeof t?(n=t,t=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!c.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===e.length){const t=e.charCodeAt(0);(\"utf8\"===n&&t<128||\"latin1\"===n)&&(e=t)}}else\"number\"==typeof e?e&=255:\"boolean\"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError(\"Out of range index\");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),\"number\"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const s=c.isBuffer(e)?e:c.from(e,n),a=s.length;if(0===a)throw new TypeError('The value \"'+e+'\" is invalid for argument \"value\"');for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};const D={};function L(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,\"message\",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function $(e){let t=\"\",r=e.length;const n=\"-\"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,o,s){if(e>r||e<t){const n=\"bigint\"==typeof t?\"n\":\"\";let o;throw o=s>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE(\"value\",o,e)}!function(e,t,r){j(t,\"offset\"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,o,s)}function j(e,t){if(\"number\"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,\"number\",e)}function V(e,t,r){if(Math.floor(e)!==e)throw j(e,r),new D.ERR_OUT_OF_RANGE(r||\"offset\",\"an integer\",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||\"offset\",`>= ${r?1:0} and <= ${t}`,e)}L(\"ERR_BUFFER_OUT_OF_BOUNDS\",function(e){return e?`${e} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"},RangeError),L(\"ERR_INVALID_ARG_TYPE\",function(e,t){return`The \"${e}\" argument must be of type number. Received type ${typeof t}`},TypeError),L(\"ERR_OUT_OF_RANGE\",function(e,t,r){let n=`The value of \"${e}\" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=$(String(r)):\"bigint\"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=$(o)),o+=\"n\"),n+=` It must be ${t}. Received ${o}`,n},RangeError);const G=/[^+/0-9A-Za-z-_]/g;function H(e,t){let r;t=t||1/0;const n=e.length;let o=null;const s=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&s.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function K(e){return n.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(G,\"\")).length<2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function q(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Y=function(){const e=\"0123456789abcdef\",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function X(e){return\"undefined\"==typeof BigInt?Q:e}function Q(){throw new Error(\"BigInt not supported\")}},1049:(e,t,r)=>{const n=r(8346),o=r(532);e.exports=(e,t,r)=>{const s=[];let a=null,i=null;const c=e.sort((e,t)=>o(e,t,r));for(const e of c){n(e,t,r)?(i=e,a||(a=e)):(i&&s.push([a,i]),i=null,a=null)}a&&s.push([a,null]);const u=[];for(const[e,t]of s)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push(\"*\");const l=u.join(\" || \"),d=\"string\"==typeof t.raw?t.raw:String(t);return l.length<d.length?l:t}},1069:(e,t)=>{\"use strict\";function r(e){return r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},r(e)}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){\"object\"===r(e)&&null!==e?e=\"function\"==typeof e.toString?e.toString():\"[object Object]\":(null==e||isNaN(e)&&!e.length)&&(e=\"\");return String(e)},e.exports=t.default,e.exports.default=t.default},1092:(e,t,r)=>{const n=r(1636);e.exports=(e,t)=>{const r=n(e,null,!0),o=n(t,null,!0),s=r.compare(o);if(0===s)return null;const a=s>0,i=a?r:o,c=a?o:r,u=!!i.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return\"major\";if(0===c.compareMain(i))return c.minor&&!c.patch?\"minor\":\"patch\"}const l=u?\"pre\":\"\";return r.major!==o.major?l+\"major\":r.minor!==o.minor?l+\"minor\":r.patch!==o.patch?l+\"patch\":\"prerelease\"}},1282:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,n.default)(e),(t=(0,o.default)(t,c)).crockford)return i.test(e);if(e.length%8==0&&a.test(e))return!0;return!1};var n=s(r(8354)),o=s(r(2533));function s(e){return e&&e.__esModule?e:{default:e}}var a=/^[A-Z2-7]+=*$/,i=/^[A-HJKMNP-TV-Z0-9]+$/,c={crockford:!1};e.exports=t.default,e.exports.default=t.default},1328:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[a-f0-9]{32}$/;e.exports=t.default,e.exports.default=t.default},1406:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>n(t,e,r)},1426:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){t=\"string\"==typeof t?(0,o.default)({format:t},c):(0,o.default)(t,c);if(\"string\"==typeof e&&(w=t.format,/(^(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(w))){if(t.strictMode&&e.length!==t.format.length)return!1;var r,n=t.delimiters.find(function(e){return-1!==t.format.indexOf(e)}),i=t.strictMode?n:t.delimiters.find(function(t){return-1!==e.indexOf(t)}),u=function(e,t){for(var r=[],n=Math.max(e.length,t.length),o=0;o<n;o++)r.push([e[o],t[o]]);return r}(e.split(i),t.format.toLowerCase().split(n)),l={},d=function(e,t){var r=\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&\"number\"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var s,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw s}}}}(u);try{for(d.s();!(r=d.n()).done;){var f=s(r.value,2),p=f[0],h=f[1];if(!p||!h||p.length!==h.length)return!1;l[h.charAt(0)]=p}}catch(e){d.e(e)}finally{d.f()}var g=l.y;if(g.startsWith(\"-\"))return!1;if(2===l.y.length){var y=parseInt(l.y,10);if(isNaN(y))return!1;g=y<(new Date).getFullYear()%100?\"20\".concat(l.y):\"19\".concat(l.y)}var m=l.m;1===l.m.length&&(m=\"0\".concat(l.m));var b=l.d;return 1===l.d.length&&(b=\"0\".concat(l.d)),new Date(\"\".concat(g,\"-\").concat(m,\"-\").concat(b,\"T00:00:00.000Z\")).getUTCDate()===+l.d}var w;if(!t.strictMode)return\"[object Date]\"===Object.prototype.toString.call(e)&&isFinite(e);return!1};var n,o=(n=r(2533))&&n.__esModule?n:{default:n};function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=r){var n,o,s,a,i=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return i}}(e,t)||a(e,t)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function a(e,t){if(e){if(\"string\"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var c={format:\"YYYY/MM/DD\",delimiters:[\"/\",\"-\"],strictMode:!1};e.exports=t.default,e.exports.default=t.default},1624:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"en-US\",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,o.default)(e);var n=e,a=r.ignore;if(a)if(a instanceof RegExp)n=n.replace(a,\"\");else{if(\"string\"!=typeof a)throw new Error(\"ignore should be instance of a String or RegExp\");n=n.replace(new RegExp(\"[\".concat(a.replace(/[-[\\]{}()*+?.,\\\\^$|#\\\\s]/g,\"\\\\$&\"),\"]\"),\"g\"),\"\")}if(t in s.alpha)return s.alpha[t].test(n);throw new Error(\"Invalid locale '\".concat(t,\"'\"))},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(7640);t.locales=Object.keys(s.alpha)},1636:(e,t,r)=>{const n=r(7784);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},1687:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set([\"004\",\"008\",\"010\",\"012\",\"016\",\"020\",\"024\",\"028\",\"031\",\"032\",\"036\",\"040\",\"044\",\"048\",\"050\",\"051\",\"052\",\"056\",\"060\",\"064\",\"068\",\"070\",\"072\",\"074\",\"076\",\"084\",\"086\",\"090\",\"092\",\"096\",\"100\",\"104\",\"108\",\"112\",\"116\",\"120\",\"124\",\"132\",\"136\",\"140\",\"144\",\"148\",\"152\",\"156\",\"158\",\"162\",\"166\",\"170\",\"174\",\"175\",\"178\",\"180\",\"184\",\"188\",\"191\",\"192\",\"196\",\"203\",\"204\",\"208\",\"212\",\"214\",\"218\",\"222\",\"226\",\"231\",\"232\",\"233\",\"234\",\"238\",\"239\",\"242\",\"246\",\"248\",\"250\",\"254\",\"258\",\"260\",\"262\",\"266\",\"268\",\"270\",\"275\",\"276\",\"288\",\"292\",\"296\",\"300\",\"304\",\"308\",\"312\",\"316\",\"320\",\"324\",\"328\",\"332\",\"334\",\"336\",\"340\",\"344\",\"348\",\"352\",\"356\",\"360\",\"364\",\"368\",\"372\",\"376\",\"380\",\"384\",\"388\",\"392\",\"398\",\"400\",\"404\",\"408\",\"410\",\"414\",\"417\",\"418\",\"422\",\"426\",\"428\",\"430\",\"434\",\"438\",\"440\",\"442\",\"446\",\"450\",\"454\",\"458\",\"462\",\"466\",\"470\",\"474\",\"478\",\"480\",\"484\",\"492\",\"496\",\"498\",\"499\",\"500\",\"504\",\"508\",\"512\",\"516\",\"520\",\"524\",\"528\",\"531\",\"533\",\"534\",\"535\",\"540\",\"548\",\"554\",\"558\",\"562\",\"566\",\"570\",\"574\",\"578\",\"580\",\"581\",\"583\",\"584\",\"585\",\"586\",\"591\",\"598\",\"600\",\"604\",\"608\",\"612\",\"616\",\"620\",\"624\",\"626\",\"630\",\"634\",\"638\",\"642\",\"643\",\"646\",\"652\",\"654\",\"659\",\"660\",\"662\",\"663\",\"666\",\"670\",\"674\",\"678\",\"682\",\"686\",\"688\",\"690\",\"694\",\"702\",\"703\",\"704\",\"705\",\"706\",\"710\",\"716\",\"724\",\"728\",\"729\",\"732\",\"740\",\"744\",\"748\",\"752\",\"756\",\"760\",\"762\",\"764\",\"768\",\"772\",\"776\",\"780\",\"784\",\"788\",\"792\",\"795\",\"796\",\"798\",\"800\",\"804\",\"807\",\"818\",\"826\",\"831\",\"832\",\"833\",\"834\",\"840\",\"850\",\"854\",\"858\",\"860\",\"862\",\"876\",\"882\",\"887\",\"894\"]);e.exports=t.default,e.exports.default=t.default},1881:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(e),(t=(0,o.default)(t,a)).allow_trailing_dot&&\".\"===e[e.length-1]&&(e=e.substring(0,e.length-1));!0===t.allow_wildcard&&0===e.indexOf(\"*.\")&&(e=e.substring(2));var r=e.split(\".\"),s=r[r.length-1];if(t.require_tld){if(r.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\\u00A1-\\u00A8\\u00AA-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(s))return!1;if(/\\s/.test(s))return!1}if(!t.allow_numeric_tld&&/^\\d+$/.test(s))return!1;return r.every(function(e){return!(e.length>63&&!t.ignore_max_length)&&(!!/^[a-z_\\u00a1-\\uffff0-9-]+$/i.test(e)&&(!/[\\uff01-\\uff5e]/.test(e)&&(!/^-|-$/.test(e)&&!(!t.allow_underscores&&/_/.test(e)))))})};var n=s(r(8354)),o=s(r(2533));function s(e){return e&&e.__esModule?e:{default:e}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default},1969:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,o.default)(e),function(e){var t=\"\\\\d{\".concat(e.digits_after_decimal[0],\"}\");e.digits_after_decimal.forEach(function(e,r){0!==r&&(t=\"\".concat(t,\"|\\\\d{\").concat(e,\"}\"))});var r=\"(\".concat(e.symbol.replace(/\\W/,function(e){return\"\\\\\".concat(e)}),\")\").concat(e.require_symbol?\"\":\"?\"),n=\"-?\",o=\"[1-9]\\\\d{0,2}(\\\\\".concat(e.thousands_separator,\"\\\\d{3})*\"),s=\"(\".concat([\"0\",\"[1-9]\\\\d*\",o].join(\"|\"),\")?\"),a=\"(\\\\\".concat(e.decimal_separator,\"(\").concat(t,\"))\").concat(e.require_decimal?\"\":\"?\"),i=s+(e.allow_decimal||e.require_decimal?a:\"\");e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?i+=n:e.negative_sign_before_digits&&(i=n+i));e.allow_negative_sign_placeholder?i=\"( (?!\\\\-))?\".concat(i):e.allow_space_after_symbol?i=\" ?\".concat(i):e.allow_space_after_digits&&(i+=\"( (?!$))?\");e.symbol_after_digits?i+=r:i=r+i;e.allow_negatives&&(e.parens_for_negatives?i=\"(\\\\(\".concat(i,\"\\\\)|\").concat(i,\")\"):e.negative_sign_before_digits||e.negative_sign_after_digits||(i=n+i));return new RegExp(\"^(?!-? )(?=.*\\\\d)\".concat(i,\"$\"))}(t=(0,n.default)(t,a)).test(e)};var n=s(r(2533)),o=s(r(8354));function s(e){return e&&e.__esModule?e:{default:e}}var a={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};e.exports=t.default,e.exports.default=t.default},2054:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)||a.test(e)||i.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(application|audio|font|image|message|model|multipart|text|video)\\/[a-zA-Z0-9\\.\\-\\+_]{1,100}$/i,a=/^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,i=/^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;e.exports=t.default,e.exports.default=t.default},2167:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)},t.halfWidth=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=t.halfWidth=/[\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]/},2177:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e)?parseFloat(e):NaN};var n,o=(n=r(9190))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2220:(e,t,r)=>{\"use strict\";function n(e){return n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},n(e)}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var o=Qe(r(5071)),s=Qe(r(2177)),a=Qe(r(3422)),i=Qe(r(3751)),c=Qe(r(939)),u=Qe(r(335)),l=Qe(r(2929)),d=Qe(r(4156)),f=Qe(r(4121)),p=Qe(r(9711)),h=Qe(r(6331)),g=Qe(r(9026)),y=Qe(r(1881)),m=Qe(r(1426)),b=Qe(r(427)),w=Qe(r(4468)),T=Qe(r(4300)),A=Qe(r(7574)),v=Xe(r(1624)),P=Xe(r(8241)),E=Qe(r(4583)),C=Xe(r(4429)),B=Qe(r(6969)),W=Qe(r(3705)),S=Qe(r(9864)),I=Qe(r(9514)),_=Qe(r(6959)),R=Qe(r(3167)),x=Qe(r(2167)),O=Qe(r(8524)),M=Qe(r(8631)),F=Qe(r(5830)),k=Qe(r(6774)),N=Qe(r(3353)),U=Xe(r(9190)),D=Qe(r(8515)),L=Qe(r(3943)),$=Qe(r(5627)),z=Qe(r(62)),j=Qe(r(9974)),V=Qe(r(9664)),G=Qe(r(7303)),H=Qe(r(6237)),K=Xe(r(8198)),q=Qe(r(6198)),Z=Qe(r(1328)),J=Qe(r(5410)),Y=Qe(r(2937)),X=Qe(r(6528)),Q=Qe(r(8689)),ee=Qe(r(6982)),te=Qe(r(7900)),re=Qe(r(978)),ne=Qe(r(9317)),oe=Qe(r(4685)),se=Qe(r(7706)),ae=Qe(r(385)),ie=Qe(r(3673)),ce=Qe(r(8498)),ue=Qe(r(9013)),le=Qe(r(54)),de=Qe(r(3220)),fe=Qe(r(329)),pe=Qe(r(5098)),he=Qe(r(331)),ge=Qe(r(2452)),ye=Xe(r(2334)),me=Qe(r(3911)),be=Qe(r(1969)),we=Qe(r(3511)),Te=r(7616),Ae=Qe(r(4608)),ve=Qe(r(7692)),Pe=Qe(r(6299)),Ee=Qe(r(5318)),Ce=Qe(r(2736)),Be=Qe(r(6887)),We=Qe(r(1687)),Se=Qe(r(4335)),Ie=Qe(r(1282)),_e=Qe(r(4438)),Re=Qe(r(5997)),xe=Qe(r(5030)),Oe=Qe(r(8036)),Me=Qe(r(3880)),Fe=Qe(r(2054)),ke=Qe(r(6343)),Ne=Xe(r(924)),Ue=Qe(r(448)),De=Qe(r(2690)),Le=Qe(r(3146)),$e=Qe(r(8137)),ze=Qe(r(6070)),je=Qe(r(3350)),Ve=Qe(r(3181)),Ge=Qe(r(3099)),He=Qe(r(4144)),Ke=Qe(r(5635)),qe=Qe(r(5977)),Ze=Qe(r(4063)),Je=Qe(r(9300)),Ye=Qe(r(2731));function Xe(e,t){if(\"function\"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return(Xe=function(e,t){if(!t&&e&&e.__esModule)return e;var s,a,i={__proto__:null,default:e};if(null===e||\"object\"!=n(e)&&\"function\"!=typeof e)return i;if(s=t?o:r){if(s.has(e))return s.get(e);s.set(e,i)}for(var c in e)\"default\"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?s(i,c,a):i[c]=e[c]);return i})(e,t)}function Qe(e){return e&&e.__esModule?e:{default:e}}var et={version:\"13.15.20\",toDate:o.default,toFloat:s.default,toInt:a.default,toBoolean:i.default,equals:c.default,contains:u.default,matches:l.default,isEmail:d.default,isURL:f.default,isMACAddress:p.default,isIP:h.default,isIPRange:g.default,isFQDN:y.default,isBoolean:w.default,isIBAN:K.default,isBIC:q.default,isAbaRouting:A.default,isAlpha:v.default,isAlphaLocales:v.locales,isAlphanumeric:P.default,isAlphanumericLocales:P.locales,isNumeric:E.default,isPassportNumber:C.default,passportNumberLocales:C.locales,isPort:B.default,isLowercase:W.default,isUppercase:S.default,isAscii:_.default,isFullWidth:R.default,isHalfWidth:x.default,isVariableWidth:O.default,isMultibyte:M.default,isSemVer:F.default,isSurrogatePair:k.default,isInt:N.default,isIMEI:I.default,isFloat:U.default,isFloatLocales:U.locales,isDecimal:D.default,isHexadecimal:L.default,isOctal:$.default,isDivisibleBy:z.default,isHexColor:j.default,isRgbColor:V.default,isHSL:G.default,isISRC:H.default,isMD5:Z.default,isHash:J.default,isJWT:Y.default,isJSON:X.default,isEmpty:Q.default,isLength:ee.default,isLocale:T.default,isByteLength:te.default,isULID:re.default,isUUID:ne.default,isMongoId:oe.default,isAfter:se.default,isBefore:ae.default,isIn:ie.default,isLuhnNumber:ce.default,isCreditCard:ue.default,isIdentityCard:le.default,isEAN:de.default,isISIN:fe.default,isISBN:pe.default,isISSN:he.default,isMobilePhone:ye.default,isMobilePhoneLocales:ye.locales,isPostalCode:Ne.default,isPostalCodeLocales:Ne.locales,isEthereumAddress:me.default,isCurrency:be.default,isBtcAddress:we.default,isISO6346:Te.isISO6346,isFreightContainerID:Te.isFreightContainerID,isISO6391:Ae.default,isISO8601:ve.default,isISO15924:Ee.default,isRFC3339:Pe.default,isISO31661Alpha2:Ce.default,isISO31661Alpha3:Be.default,isISO31661Numeric:We.default,isISO4217:Se.default,isBase32:Ie.default,isBase58:_e.default,isBase64:Re.default,isDataURI:xe.default,isMagnetURI:Oe.default,isMailtoURI:Me.default,isMimeType:Fe.default,isLatLong:ke.default,ltrim:Ue.default,rtrim:De.default,trim:Le.default,escape:$e.default,unescape:ze.default,stripLow:je.default,whitelist:Ve.default,blacklist:Ge.default,isWhitelisted:He.default,normalizeEmail:Ke.default,toString,isSlug:qe.default,isStrongPassword:Je.default,isTaxID:ge.default,isDate:m.default,isTime:b.default,isLicensePlate:Ze.default,isVAT:Ye.default,ibanLocales:K.locales};t.default=et;e.exports=t.default,e.exports.default=t.default},2334:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){if((0,o.default)(e),r&&r.strictMode&&!e.startsWith(\"+\"))return!1;if(Array.isArray(t))return t.some(function(t){if(s.hasOwnProperty(t)&&s[t].test(e))return!0;return!1});if(t in s)return s[t].test(e);if(!t||\"any\"===t){for(var n in s){if(s.hasOwnProperty(n))if(s[n].test(e))return!0}return!1}throw new Error(\"Invalid locale '\".concat(t,\"'\"))},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={\"am-AM\":/^(\\+?374|0)(33|4[134]|55|77|88|9[13-689])\\d{6}$/,\"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}|41\\d{6})$/,\"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)?([79][1-9])\\d{6}$/,\"ar-PS\":/^(\\+?970|0)5[6|9](\\d{7})$/,\"ar-SA\":/^(!?(\\+?966)|0)?5\\d{8}$/,\"ar-SD\":/^((\\+?249)|0)?(9[012369]|1[012])\\d{7}$/,\"ar-SY\":/^(!?(\\+?963)|0)?9\\d{8}$/,\"ar-TN\":/^(\\+?216)?[2459]\\d{7}$/,\"az-AZ\":/^(\\+994|0)(10|5[015]|7[07]|99)\\d{7}$/,\"ar-QA\":/^(\\+?974|0)?([3567]\\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)(5[0-25-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]|9[1-9])\\d{5}$/,\"el-GR\":/^(\\+?30|0)?6(8[5-9]|9(?![26])[0-9])\\d{7}$/,\"el-CY\":/^(\\+?357?)?(9(9|7|6|5|4)\\d{6})$/,\"en-AI\":/^(\\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\\d{4}$/,\"en-AU\":/^(\\+?61|0)4\\d{8}$/,\"en-AG\":/^(?:\\+1|1)268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}$/,\"en-BM\":/^(\\+?1)?441(((3|7)\\d{6}$)|(5[0-3][0-9]\\d{4}$)|(59\\d{5}$))/,\"en-BS\":/^(\\+?1[-\\s]?|0)?\\(?242\\)?[-\\s]?\\d{3}[-\\s]?\\d{4}$/,\"en-GB\":/^(\\+?44|0)7[1-9]\\d{8}$/,\"en-GG\":/^(\\+?44|0)1481\\d{6}$/,\"en-GH\":/^(\\+233|0)(20|50|24|54|27|57|26|56|23|53|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-JM\":/^(\\+?876)?\\d{7}$/,\"en-KE\":/^(\\+?254|0)(7|1)\\d{8}$/,\"fr-CF\":/^(\\+?236| ?)(70|75|77|72|21|22)\\d{6}$/,\"en-SS\":/^(\\+?211|0)(9[1257])\\d{7}$/,\"en-KI\":/^((\\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,\"en-KN\":/^(?:\\+1|1)869(?:46\\d|48[89]|55[6-8]|66\\d|76[02-7])\\d{4}$/,\"en-LS\":/^(\\+?266)(22|28|57|58|59|27|52)\\d{6}$/,\"en-MT\":/^(\\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,\"en-MU\":/^(\\+?230|0)?\\d{8}$/,\"en-MW\":/^(\\+?265|0)(((77|88|31|99|98|21)\\d{7})|(((111)|1)\\d{6})|(32000\\d{4}))$/,\"en-NA\":/^(\\+?264|0)(6|8)\\d{7}$/,\"en-NG\":/^(\\+?234|0)?[789]\\d{9}$/,\"en-NZ\":/^(\\+?64|0)[28]\\d{7,9}$/,\"en-PG\":/^(\\+?675|0)?(7\\d|8[18])\\d{6}$/,\"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)?0[79][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|3|2]\\d{7}$/,\"es-EC\":/^(\\+?593|0)([2-7]|9[2-9])\\d{7}$/,\"es-ES\":/^(\\+?34)?[6|7]\\d{8}$/,\"es-GT\":/^(\\+?502)?[2|6|7]\\d{7}$/,\"es-PE\":/^(\\+?51)?9\\d{8}$/,\"es-MX\":/^(\\+?52)?(1|01)?\\d{10,11}$/,\"es-NI\":/^(\\+?505)\\d{7,8}$/,\"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-6]|50)\\s?(\\d\\s?){4,8}$/,\"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-BJ\":/^(\\+229)\\d{8}$/,\"fr-CD\":/^(\\+?243|0)?(8|9)\\d{8}$/,\"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}$/,\"fr-WF\":/^(\\+681)?\\d{6}$/,\"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})$/,\"ir-IR\":/^(\\+98|0)?9\\d{9}$/,\"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)?(79\\d{7}|5\\d{8})$/,\"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}$/,\"ky-KG\":/^(\\+996\\s?)?(22[0-9]|50[0-9]|55[0-9]|70[0-9]|75[0-9]|77[0-9]|880|990|995|996|997|998)\\s?\\d{3}\\s?\\d{3}$/,\"lt-LT\":/^(\\+370|8)\\d{8}$/,\"lv-LV\":/^(\\+?371)2\\d{7}$/,\"mg-MG\":/^((\\+?261|0)(2|3)\\d)?\\d{7}$/,\"mn-MN\":/^(\\+|00|011)?976(77|81|88|91|94|95|96|99)\\d{6}$/,\"my-MM\":/^(\\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,\"ms-MY\":/^(\\+?60|0)1(([0145](-|\\s)?\\d{7,8})|([236-9](-|\\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}$/,\"nl-AW\":/^(\\+)?297(56|59|64|73|74|99)\\d{5}$/,\"nn-NO\":/^(\\+?47)?[49]\\d{7}$/,\"pl-PL\":/^(\\+?48)? ?([5-8]\\d|45) ?\\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[1-9]{1}\\d{3}\\-?\\d{4}))$/,\"pt-PT\":/^(\\+?351)?9[1236]\\d{7}$/,\"pt-AO\":/^(\\+?244)?9\\d{8}$/,\"ro-MD\":/^(\\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\\d{6}$/,\"ro-RO\":/^(\\+?40|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}$/,\"so-SO\":/^(\\+?252|0)((6[0-9])\\d{7}|(7[1-9])\\d{7})$/,\"sq-AL\":/^(\\+355|0)6[2-9]\\d{7}$/,\"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)?0(50|6[36-8]|7[357]|9[1-9])\\d{7}$/,\"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}$/,\"ar-YE\":/^(((\\+|00)9677|0?7)[0137]\\d{7}|((\\+|00)967|0)[1-7]\\d{6})$/,\"ar-EH\":/^(\\+?212|0)[\\s\\-]?(5288|5289)[\\s\\-]?\\d{5}$/,\"fa-AF\":/^(\\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\\d{7})$/,\"mk-MK\":/^(\\+?389|0)?((?:2[2-9]\\d{6}|(?:3[1-4]|4[2-8])\\d{6}|500\\d{5}|5[2-9]\\d{6}|7[0-9][2-9]\\d{5}|8[1-9]\\d{6}|800\\d{5}|8009\\d{4}))$/};s[\"en-CA\"]=s[\"en-US\"],s[\"fr-CA\"]=s[\"en-CA\"],s[\"fr-BE\"]=s[\"nl-BE\"],s[\"zh-HK\"]=s[\"en-HK\"],s[\"zh-MO\"]=s[\"en-MO\"],s[\"ga-IE\"]=s[\"en-IE\"],s[\"fr-CH\"]=s[\"de-CH\"],s[\"it-CH\"]=s[\"fr-CH\"];t.locales=Object.keys(s)},2429:(e,t,r)=>{const n=r(1636);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},2436:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>n(e,t,r)<=0},2452:(e,t,r)=>{\"use strict\";function n(e){return n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},n(e)}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"en-US\";(0,o.default)(e);var r=e.slice(0);if(t in f)return t in g&&(r=r.replace(g[t],\"\")),!!f[t].test(r)&&(!(t in p)||p[t](r));throw new Error(\"Invalid locale '\".concat(t,\"'\"))};var o=i(r(8354)),s=function(e,t){if(\"function\"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var s,a,i={__proto__:null,default:e};if(null===e||\"object\"!=n(e)&&\"function\"!=typeof e)return i;if(s=t?o:r){if(s.has(e))return s.get(e);s.set(e,i)}for(var c in e)\"default\"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?s(i,c,a):i[c]=e[c]);return i}(e,t)}(r(499)),a=i(r(1426));function i(e){return e&&e.__esModule?e:{default:e}}function c(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if(\"undefined\"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e[\"@@iterator\"])return Array.from(e)}(e)||function(e,t){if(e){if(\"string\"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var l={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(e){for(var t=!1,r=!1,n=0;n<3;n++)if(!t&&/[AEIOU]/.test(e[n]))t=!0;else if(!r&&t&&\"X\"===e[n])r=!0;else if(n>0){if(t&&!r&&!/[AEIOU]/.test(e[n]))return!1;if(r&&!/X/.test(e[n]))return!1}return!0}var f={\"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-CA\":/^\\d{9}$/,\"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-AR\":/(20|23|24|27|30|33|34)[0-9]{8}[0-9]/,\"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})$/,\"uk-UA\":/^\\d{10}$/};f[\"lb-LU\"]=f[\"fr-LU\"],f[\"lt-LT\"]=f[\"et-EE\"],f[\"nl-BE\"]=f[\"fr-BE\"],f[\"fr-CA\"]=f[\"en-CA\"];var p={\"bg-BG\":function(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 n=\"\".concat(t,\"/\").concat(r,\"/\").concat(e.slice(4,6));if(!(0,a.default)(n,\"YYYY/MM/DD\"))return!1;for(var o=e.split(\"\").map(function(e){return parseInt(e,10)}),s=[2,4,8,5,10,9,7,3,6],i=0,c=0;c<s.length;c++)i+=o[c]*s[c];return(i=i%11==10?0:i%11)===o[9]},\"cs-CZ\":function(e){e=e.replace(/\\W/,\"\");var t=parseInt(e.slice(0,2),10);if(10===e.length)t=t<54?\"20\".concat(t):\"19\".concat(t);else{if(\"000\"===e.slice(6))return!1;if(!(t<54))return!1;t=\"19\".concat(t)}3===t.length&&(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 n=\"\".concat(t,\"/\").concat(r,\"/\").concat(e.slice(4,6));if(!(0,a.default)(n,\"YYYY/MM/DD\"))return!1;if(10===e.length&&parseInt(e,10)%11!=0){var o=parseInt(e.slice(0,9),10)%11;if(!(parseInt(t,10)<1986&&10===o))return!1;if(0!==parseInt(e.slice(9),10))return!1}return!0},\"de-AT\":function(e){return s.luhnCheck(e)},\"de-DE\":function(e){for(var t=e.split(\"\").map(function(e){return parseInt(e,10)}),r=[],n=0;n<t.length-1;n++){r.push(\"\");for(var o=0;o<t.length-1;o++)t[n]===t[o]&&(r[n]+=o)}if(2!==(r=r.filter(function(e){return e.length>1})).length&&3!==r.length)return!1;if(3===r[0].length){for(var a=r[0].split(\"\").map(function(e){return parseInt(e,10)}),i=0,c=0;c<a.length-1;c++)a[c]+1===a[c+1]&&(i+=1);if(2===i)return!1}return s.iso7064Check(e)},\"dk-DK\":function(e){e=e.replace(/\\W/,\"\");var t=parseInt(e.slice(4,6),10);switch(e.slice(6,7)){case\"0\":case\"1\":case\"2\":case\"3\":t=\"19\".concat(t);break;case\"4\":case\"9\":t=t<37?\"20\".concat(t):\"19\".concat(t);break;default:if(t<37)t=\"20\".concat(t);else{if(!(t>58))return!1;t=\"18\".concat(t)}}3===t.length&&(t=[t.slice(0,2),\"0\",t.slice(2)].join(\"\"));var r=\"\".concat(t,\"/\").concat(e.slice(2,4),\"/\").concat(e.slice(0,2));if(!(0,a.default)(r,\"YYYY/MM/DD\"))return!1;for(var n=e.split(\"\").map(function(e){return parseInt(e,10)}),o=0,s=4,i=0;i<9;i++)o+=n[i]*s,1===(s-=1)&&(s=7);return 1!==(o%=11)&&(0===o?0===n[9]:n[9]===11-o)},\"el-CY\":function(e){for(var t=e.slice(0,8).split(\"\").map(function(e){return parseInt(e,10)}),r=0,n=1;n<t.length;n+=2)r+=t[n];for(var o=0;o<t.length;o+=2)t[o]<2?r+=1-t[o]:(r+=2*(t[o]-2)+5,t[o]>4&&(r+=2));return String.fromCharCode(r%26+65)===e.charAt(8)},\"el-GR\":function(e){for(var t=e.split(\"\").map(function(e){return parseInt(e,10)}),r=0,n=0;n<8;n++)r+=t[n]*Math.pow(2,8-n);return r%11%10===t[8]},\"en-CA\":function(e){var t=e.split(\"\"),r=t.filter(function(e,t){return t%2}).map(function(e){return 2*Number(e)}).join(\"\").split(\"\");return t.filter(function(e,t){return!(t%2)}).concat(r).map(function(e){return Number(e)}).reduce(function(e,t){return e+t})%10==0},\"en-IE\":function(e){var t=s.reverseMultiplyAndSum(e.split(\"\").slice(0,7).map(function(e){return parseInt(e,10)}),8);return 9===e.length&&\"W\"!==e[8]&&(t+=9*(e[8].charCodeAt(0)-64)),0===(t%=23)?\"W\"===e[7].toUpperCase():e[7].toUpperCase()===String.fromCharCode(64+t)},\"en-US\":function(e){return-1!==function(){var e=[];for(var t in l)l.hasOwnProperty(t)&&e.push.apply(e,c(l[t]));return e}().indexOf(e.slice(0,2))},\"es-AR\":function(e){for(var t=0,r=e.split(\"\"),n=parseInt(r.pop(),10),o=0;o<r.length;o++)t+=r[9-o]*(2+o%6);var s=11-t%11;return 11===s?s=0:10===s&&(s=9),n===s},\"es-ES\":function(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}t.splice(0,1,r)}else for(;t.length<9;)t.unshift(0);t=t.join(\"\");var n=parseInt(t.slice(0,8),10)%23;return t[8]===[\"T\",\"R\",\"W\",\"A\",\"G\",\"M\",\"Y\",\"F\",\"P\",\"D\",\"X\",\"B\",\"N\",\"J\",\"Z\",\"S\",\"Q\",\"V\",\"H\",\"L\",\"C\",\"K\",\"E\"][n]},\"et-EE\":function(e){var t=e.slice(1,3);switch(e.slice(0,1)){case\"1\":case\"2\":t=\"18\".concat(t);break;case\"3\":case\"4\":t=\"19\".concat(t);break;default:t=\"20\".concat(t)}var r=\"\".concat(t,\"/\").concat(e.slice(3,5),\"/\").concat(e.slice(5,7));if(!(0,a.default)(r,\"YYYY/MM/DD\"))return!1;for(var n=e.split(\"\").map(function(e){return parseInt(e,10)}),o=0,s=1,i=0;i<10;i++)o+=n[i]*s,10===(s+=1)&&(s=1);if(o%11==10){o=0,s=3;for(var c=0;c<10;c++)o+=n[c]*s,10===(s+=1)&&(s=1);if(o%11==10)return 0===n[10]}return o%11===n[10]},\"fi-FI\":function(e){var t=e.slice(4,6);switch(e.slice(6,7)){case\"+\":t=\"18\".concat(t);break;case\"-\":t=\"19\".concat(t);break;default:t=\"20\".concat(t)}var r=\"\".concat(t,\"/\").concat(e.slice(2,4),\"/\").concat(e.slice(0,2));if(!(0,a.default)(r,\"YYYY/MM/DD\"))return!1;var n=parseInt(e.slice(0,6)+e.slice(7,10),10)%31;return n<10?n===parseInt(e.slice(10),10):[\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"H\",\"J\",\"K\",\"L\",\"M\",\"N\",\"P\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\"][n-=10]===e.slice(10)},\"fr-BE\":function(e){if(\"00\"!==e.slice(2,4)||\"00\"!==e.slice(4,6)){var t=\"\".concat(e.slice(0,2),\"/\").concat(e.slice(2,4),\"/\").concat(e.slice(4,6));if(!(0,a.default)(t,\"YY/MM/DD\"))return!1}var r=97-parseInt(e.slice(0,9),10)%97,n=parseInt(e.slice(9,11),10);return r===n||(r=97-parseInt(\"2\".concat(e.slice(0,9)),10)%97)===n},\"fr-FR\":function(e){return e=e.replace(/\\s/g,\"\"),parseInt(e.slice(0,10),10)%511===parseInt(e.slice(10,13),10)},\"fr-LU\":function(e){var t=\"\".concat(e.slice(0,4),\"/\").concat(e.slice(4,6),\"/\").concat(e.slice(6,8));return!!(0,a.default)(t,\"YYYY/MM/DD\")&&(!!s.luhnCheck(e.slice(0,12))&&s.verhoeffCheck(\"\".concat(e.slice(0,11)).concat(e[12])))},\"hr-HR\":function(e){return s.iso7064Check(e)},\"hu-HU\":function(e){for(var t=e.split(\"\").map(function(e){return parseInt(e,10)}),r=8,n=1;n<9;n++)r+=t[n]*(n+1);return r%11===t[9]},\"it-IT\":function(e){var t=e.toUpperCase().split(\"\");if(!d(t.slice(0,3)))return!1;if(!d(t.slice(3,6)))return!1;for(var r={L:\"0\",M:\"1\",N:\"2\",P:\"3\",Q:\"4\",R:\"5\",S:\"6\",T:\"7\",U:\"8\",V:\"9\"},n=0,o=[6,7,9,10,12,13,14];n<o.length;n++){var s=o[n];t[s]in r&&t.splice(s,1,r[t[s]])}var i={A:\"01\",B:\"02\",C:\"03\",D:\"04\",E:\"05\",H:\"06\",L:\"07\",M:\"08\",P:\"09\",R:\"10\",S:\"11\",T:\"12\"}[t[8]],c=parseInt(t[9]+t[10],10);c>40&&(c-=40),c<10&&(c=\"0\".concat(c));var u=\"\".concat(t[6]).concat(t[7],\"/\").concat(i,\"/\").concat(c);if(!(0,a.default)(u,\"YY/MM/DD\"))return!1;for(var l=0,f=1;f<t.length-1;f+=2){var p=parseInt(t[f],10);isNaN(p)&&(p=t[f].charCodeAt(0)-65),l+=p}for(var h={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},g=0;g<t.length-1;g+=2){var y=0;if(t[g]in h)y=h[t[g]];else{var m=parseInt(t[g],10);y=2*m+1,m>4&&(y+=2)}l+=y}return String.fromCharCode(65+l%26)===t[15]},\"lv-LV\":function(e){var t=(e=e.replace(/\\W/,\"\")).slice(0,2);if(\"32\"!==t){if(\"00\"!==e.slice(2,4)){var r=e.slice(4,6);switch(e[6]){case\"0\":r=\"18\".concat(r);break;case\"1\":r=\"19\".concat(r);break;default:r=\"20\".concat(r)}var n=\"\".concat(r,\"/\").concat(e.slice(2,4),\"/\").concat(t);if(!(0,a.default)(n,\"YYYY/MM/DD\"))return!1}for(var o=1101,s=[1,6,3,7,9,10,5,8,4,2],i=0;i<e.length-1;i++)o-=parseInt(e[i],10)*s[i];return parseInt(e[10],10)===o%11}return!0},\"mt-MT\":function(e){if(9!==e.length){for(var t=e.toUpperCase().split(\"\");t.length<8;)t.unshift(0);switch(e[7]){case\"A\":case\"P\":if(0===parseInt(t[6],10))return!1;break;default:var r=parseInt(t.join(\"\").slice(0,5),10);if(r>32e3)return!1;if(r===parseInt(t.join(\"\").slice(5,7),10))return!1}}return!0},\"nl-NL\":function(e){return s.reverseMultiplyAndSum(e.split(\"\").slice(0,8).map(function(e){return parseInt(e,10)}),9)%11===parseInt(e[8],10)},\"pl-PL\":function(e){if(10===e.length){for(var t=[6,5,7,2,3,4,5,6,7],r=0,n=0;n<t.length;n++)r+=parseInt(e[n],10)*t[n];return 10!==(r%=11)&&r===parseInt(e[9],10)}var o=e.slice(0,2),s=parseInt(e.slice(2,4),10);s>80?(o=\"18\".concat(o),s-=80):s>60?(o=\"22\".concat(o),s-=60):s>40?(o=\"21\".concat(o),s-=40):s>20?(o=\"20\".concat(o),s-=20):o=\"19\".concat(o),s<10&&(s=\"0\".concat(s));var i=\"\".concat(o,\"/\").concat(s,\"/\").concat(e.slice(4,6));if(!(0,a.default)(i,\"YYYY/MM/DD\"))return!1;for(var c=0,u=1,l=0;l<e.length-1;l++)c+=parseInt(e[l],10)*u%10,(u+=2)>10?u=1:5===u&&(u+=2);return(c=10-c%10)===parseInt(e[10],10)},\"pt-BR\":function(e){if(11===e.length){var t,r;if(t=0,\"11111111111\"===e||\"22222222222\"===e||\"33333333333\"===e||\"44444444444\"===e||\"55555555555\"===e||\"66666666666\"===e||\"77777777777\"===e||\"88888888888\"===e||\"99999999999\"===e||\"00000000000\"===e)return!1;for(var n=1;n<=9;n++)t+=parseInt(e.substring(n-1,n),10)*(11-n);if(10===(r=10*t%11)&&(r=0),r!==parseInt(e.substring(9,10),10))return!1;t=0;for(var o=1;o<=10;o++)t+=parseInt(e.substring(o-1,o),10)*(12-o);return 10===(r=10*t%11)&&(r=0),r===parseInt(e.substring(10,11),10)}if(\"00000000000000\"===e||\"11111111111111\"===e||\"22222222222222\"===e||\"33333333333333\"===e||\"44444444444444\"===e||\"55555555555555\"===e||\"66666666666666\"===e||\"77777777777777\"===e||\"88888888888888\"===e||\"99999999999999\"===e)return!1;for(var s=e.length-2,a=e.substring(0,s),i=e.substring(s),c=0,u=s-7,l=s;l>=1;l--)c+=a.charAt(s-l)*u,(u-=1)<2&&(u=9);var d=c%11<2?0:11-c%11;if(d!==parseInt(i.charAt(0),10))return!1;s+=1,a=e.substring(0,s),c=0,u=s-7;for(var f=s;f>=1;f--)c+=a.charAt(s-f)*u,(u-=1)<2&&(u=9);return(d=c%11<2?0:11-c%11)===parseInt(i.charAt(1),10)},\"pt-PT\":function(e){var t=11-s.reverseMultiplyAndSum(e.split(\"\").slice(0,8).map(function(e){return parseInt(e,10)}),9)%11;return t>9?0===parseInt(e[8],10):t===parseInt(e[8],10)},\"ro-RO\":function(e){if(\"9000\"!==e.slice(0,4)){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)}var r=\"\".concat(t,\"/\").concat(e.slice(3,5),\"/\").concat(e.slice(5,7));if(8===r.length){if(!(0,a.default)(r,\"YY/MM/DD\"))return!1}else if(!(0,a.default)(r,\"YYYY/MM/DD\"))return!1;for(var n=e.split(\"\").map(function(e){return parseInt(e,10)}),o=[2,7,9,1,4,6,3,5,8,2,7,9],s=0,i=0;i<o.length;i++)s+=n[i]*o[i];return s%11==10?1===n[12]:n[12]===s%11}return!0},\"sk-SK\":function(e){if(9===e.length){if(\"000\"===(e=e.replace(/\\W/,\"\")).slice(6))return!1;var t=parseInt(e.slice(0,2),10);if(t>53)return!1;t=t<10?\"190\".concat(t):\"19\".concat(t);var r=parseInt(e.slice(2,4),10);r>50&&(r-=50),r<10&&(r=\"0\".concat(r));var n=\"\".concat(t,\"/\").concat(r,\"/\").concat(e.slice(4,6));if(!(0,a.default)(n,\"YYYY/MM/DD\"))return!1}return!0},\"sl-SI\":function(e){var t=11-s.reverseMultiplyAndSum(e.split(\"\").slice(0,7).map(function(e){return parseInt(e,10)}),8)%11;return 10===t?0===parseInt(e[7],10):t===parseInt(e[7],10)},\"sv-SE\":function(e){var t=e.slice(0);e.length>11&&(t=t.slice(2));var r=\"\",n=t.slice(2,4),o=parseInt(t.slice(4,6),10);if(e.length>11)r=e.slice(0,4);else if(r=e.slice(0,2),11===e.length&&o<60){var i=(new Date).getFullYear().toString(),c=parseInt(i.slice(0,2),10);if(i=parseInt(i,10),\"-\"===e[6])r=parseInt(\"\".concat(c).concat(r),10)>i?\"\".concat(c-1).concat(r):\"\".concat(c).concat(r);else if(r=\"\".concat(c-1).concat(r),i-parseInt(r,10)<100)return!1}o>60&&(o-=60),o<10&&(o=\"0\".concat(o));var u=\"\".concat(r,\"/\").concat(n,\"/\").concat(o);if(8===u.length){if(!(0,a.default)(u,\"YY/MM/DD\"))return!1}else if(!(0,a.default)(u,\"YYYY/MM/DD\"))return!1;return s.luhnCheck(e.replace(/\\W/,\"\"))},\"uk-UA\":function(e){for(var t=e.split(\"\").map(function(e){return parseInt(e,10)}),r=[-1,5,7,9,4,6,10,5,7],n=0,o=0;o<r.length;o++)n+=t[o]*r[o];return n%11==10?0===t[9]:t[9]===n%11}};p[\"lb-LU\"]=p[\"fr-LU\"],p[\"lt-LT\"]=p[\"et-EE\"],p[\"nl-BE\"]=p[\"fr-BE\"],p[\"fr-CA\"]=p[\"en-CA\"];var h=/[-\\\\\\/!@#$%\\^&\\*\\(\\)\\+\\=\\[\\]]+/g,g={\"de-AT\":h,\"de-DE\":/[\\/\\\\]/g,\"fr-BE\":h};g[\"nl-BE\"]=g[\"fr-BE\"],e.exports=t.default,e.exports.default=t.default},2533:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default},2615:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>n(e,t,r)<0},2619:(e,t,r)=>{const n=r(2859);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(\" \").trim().split(\" \"))},2690:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t){var r=new RegExp(\"[\".concat(t.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\"),\"]+$\"),\"g\");return e.replace(r,\"\")}var n=e.length-1;for(;/\\s/.test(e.charAt(n));)n-=1;return e.slice(0,n+1)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2731:(e,t,r)=>{\"use strict\";function n(e){return n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},n(e)}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,s.default)(e),(0,s.default)(t),t in i)return i[t](e);throw new Error(\"Invalid country code: '\".concat(t,\"'\"))},t.vatMatchers=void 0;var o,s=(o=r(8354))&&o.__esModule?o:{default:o},a=function(e,t){if(\"function\"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var s,a,i={__proto__:null,default:e};if(null===e||\"object\"!=n(e)&&\"function\"!=typeof e)return i;if(s=t?o:r){if(s.has(e))return s.get(e);s.set(e,i)}for(var c in e)\"default\"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?s(i,c,a):i[c]=e[c]);return i}(e,t)}(r(499));var i=t.vatMatchers={AT:function(e){return/^(AT)?U\\d{8}$/.test(e)},BE:function(e){return/^(BE)?\\d{10}$/.test(e)},BG:function(e){return/^(BG)?\\d{9,10}$/.test(e)},HR:function(e){return/^(HR)?\\d{11}$/.test(e)},CY:function(e){return/^(CY)?\\w{9}$/.test(e)},CZ:function(e){return/^(CZ)?\\d{8,10}$/.test(e)},DK:function(e){return/^(DK)?\\d{8}$/.test(e)},EE:function(e){return/^(EE)?\\d{9}$/.test(e)},FI:function(e){return/^(FI)?\\d{8}$/.test(e)},FR:function(e){return/^(FR)([A-Z0-9]{2}\\d{9})$/.test(e)},DE:function(e){return/^(DE)?\\d{9}$/.test(e)},EL:function(e){return/^(EL)?\\d{9}$/.test(e)},HU:function(e){return/^(HU)?\\d{8}$/.test(e)},IE:function(e){return/^(IE)?\\d{7}\\w{1}(W)?$/.test(e)},IT:function(e){return/^(IT)?\\d{11}$/.test(e)},LV:function(e){return/^(LV)?\\d{11}$/.test(e)},LT:function(e){return/^(LT)?\\d{9,12}$/.test(e)},LU:function(e){return/^(LU)?\\d{8}$/.test(e)},MT:function(e){return/^(MT)?\\d{8}$/.test(e)},NL:function(e){return/^(NL)?\\d{9}B\\d{2}$/.test(e)},PL:function(e){return/^(PL)?(\\d{10}|(\\d{3}-\\d{3}-\\d{2}-\\d{2})|(\\d{3}-\\d{2}-\\d{2}-\\d{3}))$/.test(e)},PT:function(e){var t=e.match(/^(PT)?(\\d{9})$/);if(!t)return!1;var r=t[2],n=11-a.reverseMultiplyAndSum(r.split(\"\").slice(0,8).map(function(e){return parseInt(e,10)}),9)%11;return n>9?0===parseInt(r[8],10):n===parseInt(r[8],10)},RO:function(e){return/^(RO)?\\d{2,10}$/.test(e)},SK:function(e){return/^(SK)?\\d{10}$/.test(e)},SI:function(e){return/^(SI)?\\d{8}$/.test(e)},ES:function(e){return/^(ES)?\\w\\d{7}[A-Z]$/.test(e)},SE:function(e){return/^(SE)?\\d{12}$/.test(e)},AL:function(e){return/^(AL)?\\w{9}[A-Z]$/.test(e)},MK:function(e){return/^(MK)?\\d{13}$/.test(e)},AU:function(e){if(!e.match(/^(AU)?(\\d{11})$/))return!1;var t=[10,1,3,5,7,9,11,13,15,17,19];e=e.replace(/^AU/,\"\");for(var r=(parseInt(e.slice(0,1),10)-1).toString()+e.slice(1),n=0,o=0;o<11;o++)n+=t[o]*r.charAt(o);return 0!==n&&n%89==0},BY:function(e){return/^(УНП )?\\d{9}$/.test(e)},CA:function(e){return/^(CA)?\\d{9}$/.test(e)},IS:function(e){return/^(IS)?\\d{5,6}$/.test(e)},IN:function(e){return/^(IN)?\\d{15}$/.test(e)},ID:function(e){return/^(ID)?(\\d{15}|(\\d{2}.\\d{3}.\\d{3}.\\d{1}-\\d{3}.\\d{3}))$/.test(e)},IL:function(e){return/^(IL)?\\d{9}$/.test(e)},KZ:function(e){return/^(KZ)?\\d{12}$/.test(e)},NZ:function(e){return/^(NZ)?\\d{9}$/.test(e)},NG:function(e){return/^(NG)?(\\d{12}|(\\d{8}-\\d{4}))$/.test(e)},NO:function(e){return/^(NO)?\\d{9}MVA$/.test(e)},PH:function(e){return/^(PH)?(\\d{12}|\\d{3} \\d{3} \\d{3} \\d{3})$/.test(e)},RU:function(e){return/^(RU)?(\\d{10}|\\d{12})$/.test(e)},SM:function(e){return/^(SM)?\\d{5}$/.test(e)},SA:function(e){return/^(SA)?\\d{15}$/.test(e)},RS:function(e){return/^(RS)?\\d{9}$/.test(e)},CH:function(e){var t,r,n;return/^(CHE[- ]?)?(\\d{9}|(\\d{3}\\.\\d{3}\\.\\d{3})|(\\d{3} \\d{3} \\d{3})) ?(TVA|MWST|IVA)?$/.test(e)&&(t=e.match(/\\d/g).map(function(e){return+e}),r=t.pop(),n=[5,4,3,2,7,6,5,4],r===(11-t.reduce(function(e,t,r){return e+t*n[r]},0)%11)%11)},TR:function(e){return/^(TR)?\\d{10}$/.test(e)},UA:function(e){return/^(UA)?\\d{12}$/.test(e)},GB:function(e){return/^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}))$/.test(e)},UZ:function(e){return/^(UZ)?\\d{9}$/.test(e)},AR:function(e){return/^(AR)?\\d{11}$/.test(e)},BO:function(e){return/^(BO)?\\d{7}$/.test(e)},BR:function(e){return/^(BR)?((\\d{2}.\\d{3}.\\d{3}\\/\\d{4}-\\d{2})|(\\d{3}.\\d{3}.\\d{3}-\\d{2}))$/.test(e)},CL:function(e){return/^(CL)?\\d{8}-\\d{1}$/.test(e)},CO:function(e){return/^(CO)?\\d{10}$/.test(e)},CR:function(e){return/^(CR)?\\d{9,12}$/.test(e)},EC:function(e){return/^(EC)?\\d{13}$/.test(e)},SV:function(e){return/^(SV)?\\d{4}-\\d{6}-\\d{3}-\\d{1}$/.test(e)},GT:function(e){return/^(GT)?\\d{7}-\\d{1}$/.test(e)},HN:function(e){return/^(HN)?$/.test(e)},MX:function(e){return/^(MX)?\\w{3,4}\\d{6}\\w{3}$/.test(e)},NI:function(e){return/^(NI)?\\d{3}-\\d{6}-\\d{4}\\w{1}$/.test(e)},PA:function(e){return/^(PA)?$/.test(e)},PY:function(e){return/^(PY)?\\d{6,8}-\\d{1}$/.test(e)},PE:function(e){return/^(PE)?\\d{11}$/.test(e)},DO:function(e){return/^(DO)?(\\d{11}|(\\d{3}-\\d{7}-\\d{1})|[1,4,5]{1}\\d{8}|([1,4,5]{1})-\\d{2}-\\d{5}-\\d{1})$/.test(e)},UY:function(e){return/^(UY)?\\d{12}$/.test(e)},VE:function(e){return/^(VE)?[J,G,V,E]{1}-(\\d{9}|(\\d{8}-\\d{1}))$/.test(e)}}},2736:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.CountryCodes=void 0,t.default=function(e){return(0,o.default)(e),s.has(e.toUpperCase())};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=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\"]);t.CountryCodes=s},2767:(e,t,r)=>{const n=r(532);e.exports=(e,t)=>n(e,t,!0)},2859:(e,t,r)=>{const n=/\\s+/g;class o{constructor(e,t){if(t=a(t),e instanceof o)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new o(e.raw,t);if(e instanceof i)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n,\" \"),this.set=this.raw.split(\"||\").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!m(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted=\"\";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=\"||\");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=\" \"),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&g)|(this.options.loose&&y))+\":\"+e,r=s.get(t);if(r)return r;const n=this.options.loose,o=n?l[d.HYPHENRANGELOOSE]:l[d.HYPHENRANGE];e=e.replace(o,_(this.options.includePrerelease)),c(\"hyphen replace\",e),e=e.replace(l[d.COMPARATORTRIM],f),c(\"comparator trim\",e),e=e.replace(l[d.TILDETRIM],p),c(\"tilde trim\",e),e=e.replace(l[d.CARETTRIM],h),c(\"caret trim\",e);let a=e.split(\" \").map(e=>T(e,this.options)).join(\" \").split(/\\s+/).map(e=>I(e,this.options));n&&(a=a.filter(e=>(c(\"loose invalid filter\",e,this.options),!!e.match(l[d.COMPARATORLOOSE])))),c(\"range list\",a);const u=new Map,b=a.map(e=>new i(e,this.options));for(const e of b){if(m(e))return[e];u.set(e.value,e)}u.size>1&&u.has(\"\")&&u.delete(\"\");const w=[...u.values()];return s.set(t,w),w}intersects(e,t){if(!(e instanceof o))throw new TypeError(\"a Range is required\");return this.set.some(r=>w(r,t)&&e.set.some(e=>w(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if(\"string\"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=o;const s=new(r(4390)),a=r(3607),i=r(8308),c=r(6820),u=r(7784),{safeRe:l,t:d,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:h}=r(946),{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:y}=r(4830),m=e=>\"<0.0.0-0\"===e.value,b=e=>\"\"===e.value,w=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},T=(e,t)=>(c(\"comp\",e,t),e=E(e,t),c(\"caret\",e),e=v(e,t),c(\"tildes\",e),e=B(e,t),c(\"xrange\",e),e=S(e,t),c(\"stars\",e),e),A=e=>!e||\"x\"===e.toLowerCase()||\"*\"===e,v=(e,t)=>e.trim().split(/\\s+/).map(e=>P(e,t)).join(\" \"),P=(e,t)=>{const r=t.loose?l[d.TILDELOOSE]:l[d.TILDE];return e.replace(r,(t,r,n,o,s)=>{let a;return c(\"tilde\",e,t,r,n,o,s),A(r)?a=\"\":A(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:A(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(c(\"replaceTilde pr\",s),a=`>=${r}.${n}.${o}-${s} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,c(\"tilde return\",a),a})},E=(e,t)=>e.trim().split(/\\s+/).map(e=>C(e,t)).join(\" \"),C=(e,t)=>{c(\"caret\",e,t);const r=t.loose?l[d.CARETLOOSE]:l[d.CARET],n=t.includePrerelease?\"-0\":\"\";return e.replace(r,(t,r,o,s,a)=>{let i;return c(\"caret\",e,t,r,o,s,a),A(r)?i=\"\":A(o)?i=`>=${r}.0.0${n} <${+r+1}.0.0-0`:A(s)?i=\"0\"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(c(\"replaceCaret pr\",a),i=\"0\"===r?\"0\"===o?`>=${r}.${o}.${s}-${a} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}-${a} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s}-${a} <${+r+1}.0.0-0`):(c(\"no pr\"),i=\"0\"===r?\"0\"===o?`>=${r}.${o}.${s}${n} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s} <${+r+1}.0.0-0`),c(\"caret return\",i),i})},B=(e,t)=>(c(\"replaceXRanges\",e,t),e.split(/\\s+/).map(e=>W(e,t)).join(\" \")),W=(e,t)=>{e=e.trim();const r=t.loose?l[d.XRANGELOOSE]:l[d.XRANGE];return e.replace(r,(r,n,o,s,a,i)=>{c(\"xRange\",e,r,n,o,s,a,i);const u=A(o),l=u||A(s),d=l||A(a),f=d;return\"=\"===n&&f&&(n=\"\"),i=t.includePrerelease?\"-0\":\"\",u?r=\">\"===n||\"<\"===n?\"<0.0.0-0\":\"*\":n&&f?(l&&(s=0),a=0,\">\"===n?(n=\">=\",l?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):\"<=\"===n&&(n=\"<\",l?o=+o+1:s=+s+1),\"<\"===n&&(i=\"-0\"),r=`${n+o}.${s}.${a}${i}`):l?r=`>=${o}.0.0${i} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`),c(\"xRange return\",r),r})},S=(e,t)=>(c(\"replaceStars\",e,t),e.trim().replace(l[d.STAR],\"\")),I=(e,t)=>(c(\"replaceGTE0\",e,t),e.trim().replace(l[t.includePrerelease?d.GTE0PRE:d.GTE0],\"\")),_=e=>(t,r,n,o,s,a,i,c,u,l,d,f)=>`${r=A(n)?\"\":A(o)?`>=${n}.0.0${e?\"-0\":\"\"}`:A(s)?`>=${n}.${o}.0${e?\"-0\":\"\"}`:a?`>=${r}`:`>=${r}${e?\"-0\":\"\"}`} ${c=A(u)?\"\":A(l)?`<${+u+1}.0.0-0`:A(d)?`<${u}.${+l+1}.0-0`:f?`<=${u}.${l}.${d}-${f}`:e?`<${u}.${l}.${+d+1}-0`:`<=${c}`}`.trim(),R=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(c(e[r].semver),e[r].semver!==i.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},2929:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){(0,o.default)(e),\"[object RegExp]\"!==Object.prototype.toString.call(t)&&(t=new RegExp(t,r));return!!e.match(t)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2937:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,n.default)(e);var t=e.split(\".\");if(3!==t.length)return!1;return t.reduce(function(e,t){return e&&(0,o.default)(t,{urlSafe:!0})},!0)};var n=s(r(8354)),o=s(r(5997));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},3099:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,o.default)(e),e.replace(new RegExp(\"[\".concat(t,\"]+\"),\"g\"),\"\")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3146:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,n.default)((0,o.default)(e,t),t)};var n=s(r(2690)),o=s(r(448));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},3167:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)},t.fullWidth=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=t.fullWidth=/[^\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]/},3181:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,o.default)(e),e.replace(new RegExp(\"[^\".concat(t,\"]+\"),\"g\"),\"\")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3220:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,o.default)(e);var t=Number(e.slice(-1));return i.test(e)&&t===(r=e,n=10-r.slice(0,-1).split(\"\").map(function(e,t){return Number(e)*function(e,t){return e===s||e===a?t%2==0?3:1:t%2==0?1:3}(r.length,t)}).reduce(function(e,t){return e+t},0)%10,n<10?n:0);var r,n};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=8,a=14,i=/^(\\d{8}|\\d{13}|\\d{14})$/;e.exports=t.default,e.exports.default=t.default},3224:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return null==e},e.exports=t.default,e.exports.default=t.default},3350:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(e);var r=t?\"\\\\x00-\\\\x09\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F\":\"\\\\x00-\\\\x1F\\\\x7F\";return(0,o.default)(e,r)};var n=s(r(8354)),o=s(r(3099));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},3353:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(e);var r=!1===(t=t||{}).allow_leading_zeroes?a:i,s=!t.hasOwnProperty(\"min\")||(0,o.default)(t.min)||e>=t.min,c=!t.hasOwnProperty(\"max\")||(0,o.default)(t.max)||e<=t.max,u=!t.hasOwnProperty(\"lt\")||(0,o.default)(t.lt)||e<t.lt,l=!t.hasOwnProperty(\"gt\")||(0,o.default)(t.gt)||e>t.gt;return r.test(e)&&s&&c&&u&&l};var n=s(r(8354)),o=s(r(3224));function s(e){return e&&e.__esModule?e:{default:e}}var a=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,i=/^[-+]?[0-9]+$/;e.exports=t.default,e.exports.default=t.default},3382:(e,t,r)=>{const n=r(7784);e.exports=(e,t)=>new n(e,t).major},3422:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,o.default)(e),parseInt(e,t||10)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3511:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)||a.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(bc1|tb1|bc1p|tb1p)[ac-hj-np-z02-9]{39,58}$/,a=/^(1|2|3|m)[A-HJ-NP-Za-km-z1-9]{25,39}$/;e.exports=t.default,e.exports.default=t.default},3579:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>0!==n(e,t,r)},3607:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?\"object\"!=typeof e?t:e:r},3650:(e,t,r)=>{const n=r(7784);e.exports=(e,t)=>new n(e,t).minor},3673:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r;if((0,n.default)(e),\"[object Array]\"===Object.prototype.toString.call(t)){var s=[];for(r in t)({}).hasOwnProperty.call(t,r)&&(s[r]=(0,o.default)(t[r]));return s.indexOf(e)>=0}if(\"object\"===a(t))return t.hasOwnProperty(e);if(t&&\"function\"==typeof t.indexOf)return t.indexOf(e)>=0;return!1};var n=s(r(8354)),o=s(r(1069));function s(e){return e&&e.__esModule?e:{default:e}}function a(e){return a=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},a(e)}e.exports=t.default,e.exports.default=t.default},3705:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),e===e.toLowerCase()};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3720:(e,t,r)=>{const n=r(2859);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},3751:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t)return\"1\"===e||/^true$/i.test(e);return\"0\"!==e&&!/^false$/i.test(e)&&\"\"!==e};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3880:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,s.default)(e),0!==e.indexOf(\"mailto:\"))return!1;var r=i(e.replace(\"mailto:\",\"\").split(\"?\"),2),a=r[0],u=r[1],l=void 0===u?\"\":u;if(!a&&!l)return!0;var d=function(e){var t=new Set([\"subject\",\"body\",\"cc\",\"bcc\"]),r={cc:\"\",bcc:\"\"},n=!1,o=e.split(\"&\");if(o.length>4)return!1;var s,a=function(e,t){var r=\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&\"number\"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var s,a=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw s}}}}(o);try{for(a.s();!(s=a.n()).done;){var u=i(s.value.split(\"=\"),2),l=u[0],d=u[1];if(l&&!t.has(l)){n=!0;break}!d||\"cc\"!==l&&\"bcc\"!==l||(r[l]=d),l&&t.delete(l)}}catch(e){a.e(e)}finally{a.f()}return!n&&r}(l);if(!d)return!1;return\"\".concat(a,\",\").concat(d.cc,\",\").concat(d.bcc).split(\",\").every(function(e){return!(e=(0,n.default)(e,\" \"))||(0,o.default)(e,t)})};var n=a(r(3146)),o=a(r(4156)),s=a(r(8354));function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=r){var n,o,s,a,i=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return i}}(e,t)||c(e,t)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function c(e,t){if(e){if(\"string\"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}e.exports=t.default,e.exports.default=t.default},3889:(e,t,r)=>{const n=r(5441);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},3911:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(0x)[0-9a-f]{40}$/i;e.exports=t.default,e.exports.default=t.default},3943:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(0x|0h)?[0-9A-F]+$/i;e.exports=t.default,e.exports.default=t.default},4063:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t in s)return s[t](e);if(\"any\"===t){for(var r in s){if((0,s[r])(e))return!0}return!1}throw new Error(\"Invalid locale '\".concat(t,\"'\"))};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={\"cs-CZ\":function(e){return/^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(e)},\"de-DE\":function(e){return/^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\\d{1,4})|([A-Z]{2}[- ]?\\d{1,3})))[- ]?(E|H)?$/.test(e)},\"de-LI\":function(e){return/^FL[- ]?\\d{1,5}[UZ]?$/.test(e)},\"en-IN\":function(e){return/^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(e)},\"en-SG\":function(e){return/^[A-Z]{3}[ -]?[\\d]{4}[ -]?[A-Z]{1}$/.test(e)},\"es-AR\":function(e){return/^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(e)},\"fi-FI\":function(e){return/^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(e)},\"hu-HU\":function(e){return/^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\\d{3})|(M\\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \\d{2}-\\d{2})|(CD \\d{3}-\\d{3})|(C-(C|X) \\d{4})|(X-(A|B|C) \\d{4})|(([EPVZ]-\\d{5}))|(S A[A-Z]{2} \\d{2})|(SP \\d{2}-\\d{2}))$/.test(e)},\"pt-BR\":function(e){return/^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(e)},\"pt-PT\":function(e){return/^(([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[A-Z]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2})|([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2}))$/.test(e)},\"sq-AL\":function(e){return/^[A-Z]{2}[- ]?((\\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\\d{3}))$/.test(e)},\"sv-SE\":function(e){return/^[A-HJ-PR-UW-Z]{3} ?[\\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(e.trim())},\"en-PK\":function(e){return/(^[A-Z]{2}((\\s|-){0,1})[0-9]{3,4}((\\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\\s|-){0,1})[0-9]{3,4}((\\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\\s|-){0,1})[0-9]{3,4}((\\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\\s|-){0,1})[0-9]{4}((\\s|-)[0-9]{2}){0,1}$)/.test(e.trim())}};e.exports=t.default,e.exports.default=t.default},4078:(e,t,r)=>{var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();o.exportSymbol(\"TronWebProto.VoteWitnessContract\",null,s),o.exportSymbol(\"TronWebProto.VoteWitnessContract.Vote\",null,s),o.exportSymbol(\"TronWebProto.WitnessCreateContract\",null,s),o.exportSymbol(\"TronWebProto.WitnessUpdateContract\",null,s),TronWebProto.WitnessCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WitnessCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WitnessCreateContract.displayName=\"TronWebProto.WitnessCreateContract\"),TronWebProto.WitnessUpdateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WitnessUpdateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WitnessUpdateContract.displayName=\"TronWebProto.WitnessUpdateContract\"),TronWebProto.VoteWitnessContract=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.VoteWitnessContract.repeatedFields_,null)},o.inherits(TronWebProto.VoteWitnessContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.VoteWitnessContract.displayName=\"TronWebProto.VoteWitnessContract\"),TronWebProto.VoteWitnessContract.Vote=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.VoteWitnessContract.Vote,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.VoteWitnessContract.Vote.displayName=\"TronWebProto.VoteWitnessContract.Vote\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WitnessCreateContract.prototype.toObject=function(e){return TronWebProto.WitnessCreateContract.toObject(e,this)},TronWebProto.WitnessCreateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),url:t.getUrl_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WitnessCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WitnessCreateContract;return TronWebProto.WitnessCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.WitnessCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setUrl(r);break;default:t.skipField()}}return e},TronWebProto.WitnessCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WitnessCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WitnessCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getUrl_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WitnessCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.WitnessCreateContract.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.WitnessCreateContract.prototype.getUrl_asB64=function(){return n.Message.bytesAsB64(this.getUrl())},TronWebProto.WitnessCreateContract.prototype.getUrl_asU8=function(){return n.Message.bytesAsU8(this.getUrl())},TronWebProto.WitnessCreateContract.prototype.setUrl=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WitnessUpdateContract.prototype.toObject=function(e){return TronWebProto.WitnessUpdateContract.toObject(e,this)},TronWebProto.WitnessUpdateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),updateUrl:t.getUpdateUrl_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WitnessUpdateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WitnessUpdateContract;return TronWebProto.WitnessUpdateContract.deserializeBinaryFromReader(r,t)},TronWebProto.WitnessUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 12:r=t.readBytes();e.setUpdateUrl(r);break;default:t.skipField()}}return e},TronWebProto.WitnessUpdateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WitnessUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WitnessUpdateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getUpdateUrl_asU8()).length>0&&t.writeBytes(12,r)},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WitnessUpdateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl=function(){return n.Message.getFieldWithDefault(this,12,\"\")},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl_asB64=function(){return n.Message.bytesAsB64(this.getUpdateUrl())},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl_asU8=function(){return n.Message.bytesAsU8(this.getUpdateUrl())},TronWebProto.WitnessUpdateContract.prototype.setUpdateUrl=function(e){return n.Message.setProto3BytesField(this,12,e)},TronWebProto.VoteWitnessContract.repeatedFields_=[2],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.VoteWitnessContract.prototype.toObject=function(e){return TronWebProto.VoteWitnessContract.toObject(e,this)},TronWebProto.VoteWitnessContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),votesList:n.Message.toObjectList(t.getVotesList(),TronWebProto.VoteWitnessContract.Vote.toObject,e),support:n.Message.getBooleanFieldWithDefault(t,3,!1)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.VoteWitnessContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.VoteWitnessContract;return TronWebProto.VoteWitnessContract.deserializeBinaryFromReader(r,t)},TronWebProto.VoteWitnessContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=new TronWebProto.VoteWitnessContract.Vote;t.readMessage(r,TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader),e.addVotes(r);break;case 3:r=t.readBool();e.setSupport(r);break;default:t.skipField()}}return e},TronWebProto.VoteWitnessContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.VoteWitnessContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.VoteWitnessContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getVotesList()).length>0&&t.writeRepeatedMessage(2,r,TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter),(r=e.getSupport())&&t.writeBool(3,r)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.VoteWitnessContract.Vote.prototype.toObject=function(e){return TronWebProto.VoteWitnessContract.Vote.toObject(e,this)},TronWebProto.VoteWitnessContract.Vote.toObject=function(e,t){var r={voteAddress:t.getVoteAddress_asB64(),voteCount:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.VoteWitnessContract.Vote.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.VoteWitnessContract.Vote;return TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader(r,t)},TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setVoteAddress(r);break;case 2:r=t.readInt64();e.setVoteCount(r);break;default:t.skipField()}}return e},TronWebProto.VoteWitnessContract.Vote.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getVoteAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getVoteCount())&&t.writeInt64(2,r)},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress_asB64=function(){return n.Message.bytesAsB64(this.getVoteAddress())},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress_asU8=function(){return n.Message.bytesAsU8(this.getVoteAddress())},TronWebProto.VoteWitnessContract.Vote.prototype.setVoteAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteCount=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.VoteWitnessContract.Vote.prototype.setVoteCount=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.VoteWitnessContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.VoteWitnessContract.prototype.getVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.VoteWitnessContract.Vote,2)},TronWebProto.VoteWitnessContract.prototype.setVotesList=function(e){return n.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.VoteWitnessContract.prototype.addVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.VoteWitnessContract.Vote,t)},TronWebProto.VoteWitnessContract.prototype.clearVotesList=function(){return this.setVotesList([])},TronWebProto.VoteWitnessContract.prototype.getSupport=function(){return n.Message.getBooleanFieldWithDefault(this,3,!1)},TronWebProto.VoteWitnessContract.prototype.setSupport=function(e){return n.Message.setProto3BooleanField(this,3,e)},o.object.extend(t,TronWebProto)},4121:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,n.default)(e),!e||/[\\s<>]/.test(e))return!1;if(0===e.indexOf(\"mailto:\"))return!1;if((t=(0,c.default)(t,d)).validate_length&&e.length>t.max_allowed_length)return!1;if(!t.allow_fragments&&(0,s.default)(e,\"#\"))return!1;if(!t.allow_query_components&&((0,s.default)(e,\"?\")||(0,s.default)(e,\"&\")))return!1;var r,u,p,h,g,y,m,b;m=e.split(\"#\"),e=m.shift(),m=e.split(\"?\");var w=(e=m.shift()).match(/^([a-z][a-z0-9+\\-.]*):/i),T=!1,A=function(n){return T=!0,r=n.toLowerCase(),(!t.require_valid_protocol||-1!==t.protocols.indexOf(r))&&e.substring(w[0].length)};if(w){var v=w[1],P=e.substring(w[0].length);if(\"//\"===P.slice(0,2)){if(!1===(e=A(v)))return!1}else{var E=P.indexOf(\"/\"),C=-1===E?P:P.substring(0,E),B=C.indexOf(\"@\");if(-1!==B){var W=C.substring(0,B);if(/^[a-zA-Z0-9\\-_.%:]*$/.test(W)){if(t.require_protocol)return!1}else if(!1===(e=A(v)))return!1}else if(!1===(e=A(v)))return!1}}else if(t.require_protocol)return!1;if(\"//\"===e.slice(0,2)){if(!T&&!t.allow_protocol_relative_urls)return!1;e=e.slice(2)}if(\"\"===e)return!1;if(m=e.split(\"/\"),\"\"===(e=m.shift())&&!t.require_host)return!0;if((m=e.split(\"@\")).length>1){if(t.disallow_auth)return!1;if(\"\"===m[0])return!1;if((u=m.shift()).indexOf(\":\")>=0&&u.split(\":\").length>2)return!1;var S=u.split(\":\"),I=(O=2,function(e){if(Array.isArray(e))return e}(x=S)||function(e,t){var r=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=r){var n,o,s,a,i=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return i}}(x,O)||function(e,t){if(e){if(\"string\"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(x,O)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()),_=I[0],R=I[1];if(\"\"===_&&\"\"===R)return!1}var x,O;h=m.join(\"@\"),y=null,b=null;var M=h.match(f);M?(p=\"\",b=M[1],y=M[2]||null):(p=(m=h.split(\":\")).shift(),m.length&&(y=m.join(\":\")));if(null!==y&&y.length>0){if(g=parseInt(y,10),!/^[0-9]+$/.test(y)||g<=0||g>65535)return!1}else if(t.require_port)return!1;if(t.host_whitelist)return(0,o.default)(p,t.host_whitelist);if(\"\"===p&&!t.require_host)return!0;if(!((0,i.default)(p)||(0,a.default)(p,t)||b&&(0,i.default)(b,6)))return!1;if(p=p||b,t.host_blacklist&&(0,o.default)(p,t.host_blacklist))return!1;return!0};var n=u(r(8354)),o=u(r(8755)),s=u(r(4865)),a=u(r(1881)),i=u(r(6331)),c=u(r(2533));function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var d={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,max_allowed_length:2084},f=/^\\[([^\\]]+)\\](?::([0-9]+))?$/;e.exports=t.default,e.exports.default=t.default},4144:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,o.default)(e);for(var r=e.length-1;r>=0;r--)if(-1===t.indexOf(e[r]))return!1;return!0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},4156:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,n.default)(e),(t=(0,c.default)(t,l)).require_display_name||t.allow_display_name){var r=e.match(d);if(r){var u=r[1];if(e=e.replace(u,\"\").replace(/(^<|>$)/g,\"\"),u.endsWith(\" \")&&(u=u.slice(0,-1)),!function(e){var t=e.replace(/^\"(.+)\"$/,\"$1\");if(!t.trim())return!1;if(/[\\.\";<>]/.test(t)){if(t===e)return!1;if(!(t.split('\"').length===t.split('\\\\\"').length))return!1}return!0}(u))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>m)return!1;var b=e.split(\"@\"),w=b.pop(),T=w.toLowerCase();if(t.host_blacklist.length>0&&(0,o.default)(T,t.host_blacklist))return!1;if(t.host_whitelist.length>0&&!(0,o.default)(T,t.host_whitelist))return!1;var A=b.join(\"@\");if(t.domain_specific_validation&&(\"gmail.com\"===T||\"googlemail.com\"===T)){var v=(A=A.toLowerCase()).split(\"+\")[0];if(!(0,s.default)(v.replace(/\\./g,\"\"),{min:6,max:30}))return!1;for(var P=v.split(\".\"),E=0;E<P.length;E++)if(!p.test(P[E]))return!1}if(!(!1!==t.ignore_max_length||(0,s.default)(A,{max:64})&&(0,s.default)(w,{max:254})))return!1;if(!(0,a.default)(w,{require_tld:t.require_tld,ignore_max_length:t.ignore_max_length,allow_underscores:t.allow_underscores})){if(!t.allow_ip_domain)return!1;if(!(0,i.default)(w)){if(!w.startsWith(\"[\")||!w.endsWith(\"]\"))return!1;var C=w.slice(1,-1);if(0===C.length||!(0,i.default)(C))return!1}}if(t.blacklisted_chars&&-1!==A.search(new RegExp(\"[\".concat(t.blacklisted_chars,\"]+\"),\"g\")))return!1;if('\"'===A[0]&&'\"'===A[A.length-1])return A=A.slice(1,A.length-1),t.allow_utf8_local_part?y.test(A):h.test(A);for(var B=t.allow_utf8_local_part?g:f,W=A.split(\".\"),S=0;S<W.length;S++)if(!B.test(W[S]))return!1;return!0};var n=u(r(8354)),o=u(r(8755)),s=u(r(7900)),a=u(r(1881)),i=u(r(6331)),c=u(r(2533));function u(e){return e&&e.__esModule?e:{default:e}}var l={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:\"\",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},d=/^([^\\x00-\\x1F\\x7F-\\x9F\\cX]+)</i,f=/^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]+$/i,p=/^[a-z\\d]+$/,h=/^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]))*$/i,g=/^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\u00A1-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+$/i,y=/^([\\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,m=254;e.exports=t.default,e.exports.default=t.default},4269:(e,t,r)=>{const n=r(1636);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},4300:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),d.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=\"(([a-zA-Z]{2,3}(-\".concat(\"([A-Za-z]{3}(-[A-Za-z]{3}){0,2})\",\")?)|([a-zA-Z]{5,8}))\"),a=\"(\".concat(\"(\\\\d|[A-W]|[Y-Z]|[a-w]|[y-z])\",\"(-[A-Za-z0-9]{2,8})+)\"),i=\"(x(-[A-Za-z0-9]{1,8})+)\",c=\"(\".concat(\"((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))\",\"|\").concat(\"((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))\",\")\"),u=\"(-|_)\",l=\"\".concat(s,\"(\").concat(u).concat(\"([A-Za-z]{4})\",\")?(\").concat(u).concat(\"([A-Za-z]{2}|\\\\d{3})\",\")?(\").concat(u).concat(\"([A-Za-z0-9]{5,8}|(\\\\d[A-Z-a-z0-9]{3}))\",\")*(\").concat(u).concat(a,\")*(\").concat(u).concat(i,\")?\"),d=new RegExp(\"(^\".concat(i,\"$)|(^\").concat(c,\"$)|(^\").concat(l,\"$)\"));e.exports=t.default,e.exports.default=t.default},4335:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.CurrencyCodes=void 0,t.default=function(e){return(0,o.default)(e),s.has(e.toUpperCase())};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=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\",\"CUP\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ERN\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"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\",\"SLE\",\"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\",\"VED\",\"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\"]);t.CurrencyCodes=s},4390:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},4429:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=e.replace(/\\s/g,\"\").toUpperCase();return t.toUpperCase()in s&&s[t].test(r)},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={AM:/^[A-Z]{2}\\d{7}$/,AR:/^[A-Z]{3}\\d{6}$/,AT:/^[A-Z]\\d{7}$/,AU:/^[A-Z]\\d{7}$/,AZ:/^[A-Z]{1}\\d{8}$/,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}$|^[A-Z]\\d{6}[A-Z]{2}$/,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}$/,JM:/^[Aa]\\d{7}$/,JP:/^[A-Z]{2}\\d{7}$/,KR:/^[MS]\\d{8}$/,KZ:/^[a-zA-Z]\\d{7}$/,LI:/^[a-zA-Z]\\d{5}$/,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}$/,MX:/^\\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\\d{6}$/,PH:/^([A-Z](\\d{6}|\\d{7}[A-Z]))|([A-Z]{2}(\\d{6}|\\d{7}))$/,PK:/^[A-Z]{2}\\d{7}$/,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}$/,TH:/^[A-Z]{1,2}\\d{6,7}$/,TR:/^[A-Z]\\d{8}$/,UA:/^[A-Z]{2}\\d{6}$/,US:/^\\d{9}$|^[A-Z]\\d{8}$/,ZA:/^[TAMD]\\d{8}$/};t.locales=Object.keys(s)},4438:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if((0,o.default)(e),s.test(e))return!0;return!1};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[A-HJ-NP-Za-km-z1-9]*$/;e.exports=t.default,e.exports.default=t.default},4468:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,n.default)(e),t.loose)return(0,o.default)(c,e.toLowerCase());return(0,o.default)(i,e)};var n=s(r(8354)),o=s(r(567));function s(e){return e&&e.__esModule?e:{default:e}}var a={loose:!1},i=[\"true\",\"false\",\"1\",\"0\"],c=[].concat(i,[\"yes\",\"no\"]);e.exports=t.default,e.exports.default=t.default},4545:(e,t,r)=>{const n=r(946),o=r(4830),s=r(7784),a=r(5647),i=r(1636),c=r(4269),u=r(5338),l=r(7651),d=r(1092),f=r(3382),p=r(3650),h=r(8993),g=r(2429),y=r(532),m=r(1406),b=r(2767),w=r(5441),T=r(4955),A=r(3889),v=r(5456),P=r(2615),E=r(8925),C=r(3579),B=r(5933),W=r(2436),S=r(835),I=r(5478),_=r(8308),R=r(2859),x=r(8346),O=r(2619),M=r(9760),F=r(5578),k=r(7217),N=r(7814),U=r(8247),D=r(6255),L=r(6298),$=r(3720),z=r(1049),j=r(5716);e.exports={parse:i,valid:c,clean:u,inc:l,diff:d,major:f,minor:p,patch:h,prerelease:g,compare:y,rcompare:m,compareLoose:b,compareBuild:w,sort:T,rsort:A,gt:v,lt:P,eq:E,neq:C,gte:B,lte:W,cmp:S,coerce:I,Comparator:_,Range:R,satisfies:x,toComparators:O,maxSatisfying:M,minSatisfying:F,minVersion:k,validRange:N,outside:U,gtr:D,ltr:L,intersects:$,simplifyRange:z,subset:j,SemVer:s,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},4583:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t&&t.no_symbols)return a.test(e);return new RegExp(\"^[+-]?([0-9]*[\".concat((t||{}).locale?s.decimal[t.locale]:\".\",\"])?[0-9]+$\")).test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(7640);var a=/^[0-9]+$/;e.exports=t.default,e.exports.default=t.default},4608:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set([\"aa\",\"ab\",\"ae\",\"af\",\"ak\",\"am\",\"an\",\"ar\",\"as\",\"av\",\"ay\",\"az\",\"az\",\"ba\",\"be\",\"bg\",\"bh\",\"bi\",\"bm\",\"bn\",\"bo\",\"br\",\"bs\",\"ca\",\"ce\",\"ch\",\"co\",\"cr\",\"cs\",\"cu\",\"cv\",\"cy\",\"da\",\"de\",\"dv\",\"dz\",\"ee\",\"el\",\"en\",\"eo\",\"es\",\"et\",\"eu\",\"fa\",\"ff\",\"fi\",\"fj\",\"fo\",\"fr\",\"fy\",\"ga\",\"gd\",\"gl\",\"gn\",\"gu\",\"gv\",\"ha\",\"he\",\"hi\",\"ho\",\"hr\",\"ht\",\"hu\",\"hy\",\"hz\",\"ia\",\"id\",\"ie\",\"ig\",\"ii\",\"ik\",\"io\",\"is\",\"it\",\"iu\",\"ja\",\"jv\",\"ka\",\"kg\",\"ki\",\"kj\",\"kk\",\"kl\",\"km\",\"kn\",\"ko\",\"kr\",\"ks\",\"ku\",\"kv\",\"kw\",\"ky\",\"la\",\"lb\",\"lg\",\"li\",\"ln\",\"lo\",\"lt\",\"lu\",\"lv\",\"mg\",\"mh\",\"mi\",\"mk\",\"ml\",\"mn\",\"mr\",\"ms\",\"mt\",\"my\",\"na\",\"nb\",\"nd\",\"ne\",\"ng\",\"nl\",\"nn\",\"no\",\"nr\",\"nv\",\"ny\",\"oc\",\"oj\",\"om\",\"or\",\"os\",\"pa\",\"pi\",\"pl\",\"ps\",\"pt\",\"qu\",\"rm\",\"rn\",\"ro\",\"ru\",\"rw\",\"sa\",\"sc\",\"sd\",\"se\",\"sg\",\"si\",\"sk\",\"sl\",\"sm\",\"sn\",\"so\",\"sq\",\"sr\",\"ss\",\"st\",\"su\",\"sv\",\"sw\",\"ta\",\"te\",\"tg\",\"th\",\"ti\",\"tk\",\"tl\",\"tn\",\"to\",\"tr\",\"ts\",\"tt\",\"tw\",\"ty\",\"ug\",\"uk\",\"ur\",\"uz\",\"ve\",\"vi\",\"vo\",\"wa\",\"wo\",\"xh\",\"yi\",\"yo\",\"za\",\"zh\",\"zu\"]);e.exports=t.default,e.exports.default=t.default},4685:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.default)(e),(0,o.default)(e)&&24===e.length};var n=s(r(8354)),o=s(r(3943));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},4781:(e,t,r)=>{var n=r(7186),o=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==o&&o||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();n.exportSymbol(\"TronWebProto.ResourceCode\",null,o),TronWebProto.ResourceCode={BANDWIDTH:0,ENERGY:1,TRON_POWER:2},n.object.extend(t,TronWebProto)},4830:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:[\"major\",\"premajor\",\"minor\",\"preminor\",\"patch\",\"prepatch\",\"prerelease\"],SEMVER_SPEC_VERSION:\"2.0.0\",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},4856:(e,t,r)=>{var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")(),a=r(5358);o.object.extend(proto,a),o.exportSymbol(\"TronWebProto.Account\",null,s),o.exportSymbol(\"TronWebProto.Account.AccountResource\",null,s),o.exportSymbol(\"TronWebProto.Account.Frozen\",null,s),o.exportSymbol(\"TronWebProto.AccountId\",null,s),o.exportSymbol(\"TronWebProto.AccountType\",null,s),o.exportSymbol(\"TronWebProto.DelegatedResource\",null,s),o.exportSymbol(\"TronWebProto.Exchange\",null,s),o.exportSymbol(\"TronWebProto.Key\",null,s),o.exportSymbol(\"TronWebProto.MarketOrderDetail\",null,s),o.exportSymbol(\"TronWebProto.Permission\",null,s),o.exportSymbol(\"TronWebProto.Permission.PermissionType\",null,s),o.exportSymbol(\"TronWebProto.Proposal\",null,s),o.exportSymbol(\"TronWebProto.Proposal.State\",null,s),o.exportSymbol(\"TronWebProto.Transaction\",null,s),o.exportSymbol(\"TronWebProto.Transaction.Contract\",null,s),o.exportSymbol(\"TronWebProto.Transaction.Contract.ContractType\",null,s),o.exportSymbol(\"TronWebProto.Transaction.Result\",null,s),o.exportSymbol(\"TronWebProto.Transaction.Result.code\",null,s),o.exportSymbol(\"TronWebProto.Transaction.Result.contractResult\",null,s),o.exportSymbol(\"TronWebProto.Transaction.raw\",null,s),o.exportSymbol(\"TronWebProto.Vote\",null,s),o.exportSymbol(\"TronWebProto.Votes\",null,s),o.exportSymbol(\"TronWebProto.Witness\",null,s),o.exportSymbol(\"TronWebProto.authority\",null,s),TronWebProto.AccountId=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountId,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountId.displayName=\"TronWebProto.AccountId\"),TronWebProto.Vote=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Vote,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Vote.displayName=\"TronWebProto.Vote\"),TronWebProto.Proposal=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Proposal.repeatedFields_,null)},o.inherits(TronWebProto.Proposal,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Proposal.displayName=\"TronWebProto.Proposal\"),TronWebProto.Exchange=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Exchange,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Exchange.displayName=\"TronWebProto.Exchange\"),TronWebProto.Account=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Account.repeatedFields_,null)},o.inherits(TronWebProto.Account,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Account.displayName=\"TronWebProto.Account\"),TronWebProto.Account.Frozen=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Account.Frozen,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Account.Frozen.displayName=\"TronWebProto.Account.Frozen\"),TronWebProto.Account.AccountResource=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Account.AccountResource,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Account.AccountResource.displayName=\"TronWebProto.Account.AccountResource\"),TronWebProto.Key=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Key,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Key.displayName=\"TronWebProto.Key\"),TronWebProto.DelegatedResource=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.DelegatedResource,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.DelegatedResource.displayName=\"TronWebProto.DelegatedResource\"),TronWebProto.authority=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.authority,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.authority.displayName=\"TronWebProto.authority\"),TronWebProto.Permission=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Permission.repeatedFields_,null)},o.inherits(TronWebProto.Permission,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Permission.displayName=\"TronWebProto.Permission\"),TronWebProto.Witness=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Witness,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Witness.displayName=\"TronWebProto.Witness\"),TronWebProto.Votes=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Votes.repeatedFields_,null)},o.inherits(TronWebProto.Votes,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Votes.displayName=\"TronWebProto.Votes\"),TronWebProto.MarketOrderDetail=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.MarketOrderDetail,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.MarketOrderDetail.displayName=\"TronWebProto.MarketOrderDetail\"),TronWebProto.Transaction=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Transaction.repeatedFields_,null)},o.inherits(TronWebProto.Transaction,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.displayName=\"TronWebProto.Transaction\"),TronWebProto.Transaction.Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Transaction.Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.Contract.displayName=\"TronWebProto.Transaction.Contract\"),TronWebProto.Transaction.Result=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Transaction.Result.repeatedFields_,null)},o.inherits(TronWebProto.Transaction.Result,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.Result.displayName=\"TronWebProto.Transaction.Result\"),TronWebProto.Transaction.raw=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Transaction.raw.repeatedFields_,null)},o.inherits(TronWebProto.Transaction.raw,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.raw.displayName=\"TronWebProto.Transaction.raw\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountId.prototype.toObject=function(e){return TronWebProto.AccountId.toObject(e,this)},TronWebProto.AccountId.toObject=function(e,t){var r={name:t.getName_asB64(),address:t.getAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountId.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountId;return TronWebProto.AccountId.deserializeBinaryFromReader(r,t)},TronWebProto.AccountId.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setName(r);break;case 2:r=t.readBytes();e.setAddress(r);break;default:t.skipField()}}return e},TronWebProto.AccountId.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountId.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountId.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getName_asU8()).length>0&&t.writeBytes(1,r),(r=e.getAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.AccountId.prototype.getName=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.AccountId.prototype.getName_asB64=function(){return n.Message.bytesAsB64(this.getName())},TronWebProto.AccountId.prototype.getName_asU8=function(){return n.Message.bytesAsU8(this.getName())},TronWebProto.AccountId.prototype.setName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountId.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.AccountId.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.AccountId.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.AccountId.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Vote.prototype.toObject=function(e){return TronWebProto.Vote.toObject(e,this)},TronWebProto.Vote.toObject=function(e,t){var r={voteAddress:t.getVoteAddress_asB64(),voteCount:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Vote.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Vote;return TronWebProto.Vote.deserializeBinaryFromReader(r,t)},TronWebProto.Vote.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setVoteAddress(r);break;case 2:r=t.readInt64();e.setVoteCount(r);break;default:t.skipField()}}return e},TronWebProto.Vote.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Vote.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Vote.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getVoteAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getVoteCount())&&t.writeInt64(2,r)},TronWebProto.Vote.prototype.getVoteAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.Vote.prototype.getVoteAddress_asB64=function(){return n.Message.bytesAsB64(this.getVoteAddress())},TronWebProto.Vote.prototype.getVoteAddress_asU8=function(){return n.Message.bytesAsU8(this.getVoteAddress())},TronWebProto.Vote.prototype.setVoteAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Vote.prototype.getVoteCount=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Vote.prototype.setVoteCount=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.Proposal.repeatedFields_=[6],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Proposal.prototype.toObject=function(e){return TronWebProto.Proposal.toObject(e,this)},TronWebProto.Proposal.toObject=function(e,t){var r,o={proposalId:n.Message.getFieldWithDefault(t,1,0),proposerAddress:t.getProposerAddress_asB64(),parametersMap:(r=t.getParametersMap())?r.toObject(e,void 0):[],expirationTime:n.Message.getFieldWithDefault(t,4,0),createTime:n.Message.getFieldWithDefault(t,5,0),approvalsList:t.getApprovalsList_asB64(),state:n.Message.getFieldWithDefault(t,7,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Proposal.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Proposal;return TronWebProto.Proposal.deserializeBinaryFromReader(r,t)},TronWebProto.Proposal.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setProposalId(r);break;case 2:r=t.readBytes();e.setProposerAddress(r);break;case 3:r=e.getParametersMap();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readInt64,n.BinaryReader.prototype.readInt64,null,0,0)});break;case 4:r=t.readInt64();e.setExpirationTime(r);break;case 5:r=t.readInt64();e.setCreateTime(r);break;case 6:r=t.readBytes();e.addApprovals(r);break;case 7:r=t.readEnum();e.setState(r);break;default:t.skipField()}}return e},TronWebProto.Proposal.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Proposal.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Proposal.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getProposalId())&&t.writeInt64(1,r),(r=e.getProposerAddress_asU8()).length>0&&t.writeBytes(2,r),(r=e.getParametersMap(!0))&&r.getLength()>0&&r.serializeBinary(3,t,n.BinaryWriter.prototype.writeInt64,n.BinaryWriter.prototype.writeInt64),0!==(r=e.getExpirationTime())&&t.writeInt64(4,r),0!==(r=e.getCreateTime())&&t.writeInt64(5,r),(r=e.getApprovalsList_asU8()).length>0&&t.writeRepeatedBytes(6,r),0!==(r=e.getState())&&t.writeEnum(7,r)},TronWebProto.Proposal.State={PENDING:0,DISAPPROVED:1,APPROVED:2,CANCELED:3},TronWebProto.Proposal.prototype.getProposalId=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Proposal.prototype.setProposalId=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Proposal.prototype.getProposerAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.Proposal.prototype.getProposerAddress_asB64=function(){return n.Message.bytesAsB64(this.getProposerAddress())},TronWebProto.Proposal.prototype.getProposerAddress_asU8=function(){return n.Message.bytesAsU8(this.getProposerAddress())},TronWebProto.Proposal.prototype.setProposerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.Proposal.prototype.getParametersMap=function(e){return n.Message.getMapField(this,3,e,null)},TronWebProto.Proposal.prototype.clearParametersMap=function(){return this.getParametersMap().clear(),this},TronWebProto.Proposal.prototype.getExpirationTime=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Proposal.prototype.setExpirationTime=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Proposal.prototype.getCreateTime=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Proposal.prototype.setCreateTime=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Proposal.prototype.getApprovalsList=function(){return n.Message.getRepeatedField(this,6)},TronWebProto.Proposal.prototype.getApprovalsList_asB64=function(){return n.Message.bytesListAsB64(this.getApprovalsList())},TronWebProto.Proposal.prototype.getApprovalsList_asU8=function(){return n.Message.bytesListAsU8(this.getApprovalsList())},TronWebProto.Proposal.prototype.setApprovalsList=function(e){return n.Message.setField(this,6,e||[])},TronWebProto.Proposal.prototype.addApprovals=function(e,t){return n.Message.addToRepeatedField(this,6,e,t)},TronWebProto.Proposal.prototype.clearApprovalsList=function(){return this.setApprovalsList([])},TronWebProto.Proposal.prototype.getState=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Proposal.prototype.setState=function(e){return n.Message.setProto3EnumField(this,7,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Exchange.prototype.toObject=function(e){return TronWebProto.Exchange.toObject(e,this)},TronWebProto.Exchange.toObject=function(e,t){var r={exchangeId:n.Message.getFieldWithDefault(t,1,0),creatorAddress:t.getCreatorAddress_asB64(),createTime:n.Message.getFieldWithDefault(t,3,0),firstTokenId:t.getFirstTokenId_asB64(),firstTokenBalance:n.Message.getFieldWithDefault(t,7,0),secondTokenId:t.getSecondTokenId_asB64(),secondTokenBalance:n.Message.getFieldWithDefault(t,9,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Exchange.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Exchange;return TronWebProto.Exchange.deserializeBinaryFromReader(r,t)},TronWebProto.Exchange.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setExchangeId(r);break;case 2:r=t.readBytes();e.setCreatorAddress(r);break;case 3:r=t.readInt64();e.setCreateTime(r);break;case 6:r=t.readBytes();e.setFirstTokenId(r);break;case 7:r=t.readInt64();e.setFirstTokenBalance(r);break;case 8:r=t.readBytes();e.setSecondTokenId(r);break;case 9:r=t.readInt64();e.setSecondTokenBalance(r);break;default:t.skipField()}}return e},TronWebProto.Exchange.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Exchange.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Exchange.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getExchangeId())&&t.writeInt64(1,r),(r=e.getCreatorAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getCreateTime())&&t.writeInt64(3,r),(r=e.getFirstTokenId_asU8()).length>0&&t.writeBytes(6,r),0!==(r=e.getFirstTokenBalance())&&t.writeInt64(7,r),(r=e.getSecondTokenId_asU8()).length>0&&t.writeBytes(8,r),0!==(r=e.getSecondTokenBalance())&&t.writeInt64(9,r)},TronWebProto.Exchange.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Exchange.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Exchange.prototype.getCreatorAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.Exchange.prototype.getCreatorAddress_asB64=function(){return n.Message.bytesAsB64(this.getCreatorAddress())},TronWebProto.Exchange.prototype.getCreatorAddress_asU8=function(){return n.Message.bytesAsU8(this.getCreatorAddress())},TronWebProto.Exchange.prototype.setCreatorAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.Exchange.prototype.getCreateTime=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Exchange.prototype.setCreateTime=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.Exchange.prototype.getFirstTokenId=function(){return n.Message.getFieldWithDefault(this,6,\"\")},TronWebProto.Exchange.prototype.getFirstTokenId_asB64=function(){return n.Message.bytesAsB64(this.getFirstTokenId())},TronWebProto.Exchange.prototype.getFirstTokenId_asU8=function(){return n.Message.bytesAsU8(this.getFirstTokenId())},TronWebProto.Exchange.prototype.setFirstTokenId=function(e){return n.Message.setProto3BytesField(this,6,e)},TronWebProto.Exchange.prototype.getFirstTokenBalance=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Exchange.prototype.setFirstTokenBalance=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.Exchange.prototype.getSecondTokenId=function(){return n.Message.getFieldWithDefault(this,8,\"\")},TronWebProto.Exchange.prototype.getSecondTokenId_asB64=function(){return n.Message.bytesAsB64(this.getSecondTokenId())},TronWebProto.Exchange.prototype.getSecondTokenId_asU8=function(){return n.Message.bytesAsU8(this.getSecondTokenId())},TronWebProto.Exchange.prototype.setSecondTokenId=function(e){return n.Message.setProto3BytesField(this,8,e)},TronWebProto.Exchange.prototype.getSecondTokenBalance=function(){return n.Message.getFieldWithDefault(this,9,0)},TronWebProto.Exchange.prototype.setSecondTokenBalance=function(e){return n.Message.setProto3IntField(this,9,e)},TronWebProto.Account.repeatedFields_=[5,7,16,33],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.prototype.toObject=function(e){return TronWebProto.Account.toObject(e,this)},TronWebProto.Account.toObject=function(e,t){var r,o={accountName:t.getAccountName_asB64(),type:n.Message.getFieldWithDefault(t,2,0),address:t.getAddress_asB64(),balance:n.Message.getFieldWithDefault(t,4,0),votesList:n.Message.toObjectList(t.getVotesList(),TronWebProto.Vote.toObject,e),assetMap:(r=t.getAssetMap())?r.toObject(e,void 0):[],assetv2Map:(r=t.getAssetv2Map())?r.toObject(e,void 0):[],frozenList:n.Message.toObjectList(t.getFrozenList(),TronWebProto.Account.Frozen.toObject,e),netUsage:n.Message.getFieldWithDefault(t,8,0),acquiredDelegatedFrozenBalanceForBandwidth:n.Message.getFieldWithDefault(t,41,0),delegatedFrozenBalanceForBandwidth:n.Message.getFieldWithDefault(t,42,0),oldTronPower:n.Message.getFieldWithDefault(t,46,0),tronPower:(r=t.getTronPower())&&TronWebProto.Account.Frozen.toObject(e,r),assetOptimized:n.Message.getBooleanFieldWithDefault(t,60,!1),createTime:n.Message.getFieldWithDefault(t,9,0),latestOprationTime:n.Message.getFieldWithDefault(t,10,0),allowance:n.Message.getFieldWithDefault(t,11,0),latestWithdrawTime:n.Message.getFieldWithDefault(t,12,0),code:t.getCode_asB64(),isWitness:n.Message.getBooleanFieldWithDefault(t,14,!1),isCommittee:n.Message.getBooleanFieldWithDefault(t,15,!1),frozenSupplyList:n.Message.toObjectList(t.getFrozenSupplyList(),TronWebProto.Account.Frozen.toObject,e),assetIssuedName:t.getAssetIssuedName_asB64(),assetIssuedId:t.getAssetIssuedId_asB64(),latestAssetOperationTimeMap:(r=t.getLatestAssetOperationTimeMap())?r.toObject(e,void 0):[],latestAssetOperationTimev2Map:(r=t.getLatestAssetOperationTimev2Map())?r.toObject(e,void 0):[],freeNetUsage:n.Message.getFieldWithDefault(t,19,0),freeAssetNetUsageMap:(r=t.getFreeAssetNetUsageMap())?r.toObject(e,void 0):[],freeAssetNetUsagev2Map:(r=t.getFreeAssetNetUsagev2Map())?r.toObject(e,void 0):[],latestConsumeTime:n.Message.getFieldWithDefault(t,21,0),latestConsumeFreeTime:n.Message.getFieldWithDefault(t,22,0),accountId:t.getAccountId_asB64(),accountResource:(r=t.getAccountResource())&&TronWebProto.Account.AccountResource.toObject(e,r),codehash:t.getCodehash_asB64(),ownerPermission:(r=t.getOwnerPermission())&&TronWebProto.Permission.toObject(e,r),witnessPermission:(r=t.getWitnessPermission())&&TronWebProto.Permission.toObject(e,r),activePermissionList:n.Message.toObjectList(t.getActivePermissionList(),TronWebProto.Permission.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Account.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Account;return TronWebProto.Account.deserializeBinaryFromReader(r,t)},TronWebProto.Account.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAccountName(r);break;case 2:r=t.readEnum();e.setType(r);break;case 3:r=t.readBytes();e.setAddress(r);break;case 4:r=t.readInt64();e.setBalance(r);break;case 5:r=new TronWebProto.Vote;t.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addVotes(r);break;case 6:r=e.getAssetMap();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,\"\",0)});break;case 56:r=e.getAssetv2Map();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,\"\",0)});break;case 7:r=new TronWebProto.Account.Frozen;t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.addFrozen(r);break;case 8:r=t.readInt64();e.setNetUsage(r);break;case 41:r=t.readInt64();e.setAcquiredDelegatedFrozenBalanceForBandwidth(r);break;case 42:r=t.readInt64();e.setDelegatedFrozenBalanceForBandwidth(r);break;case 46:r=t.readInt64();e.setOldTronPower(r);break;case 47:r=new TronWebProto.Account.Frozen;t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.setTronPower(r);break;case 60:r=t.readBool();e.setAssetOptimized(r);break;case 9:r=t.readInt64();e.setCreateTime(r);break;case 10:r=t.readInt64();e.setLatestOprationTime(r);break;case 11:r=t.readInt64();e.setAllowance(r);break;case 12:r=t.readInt64();e.setLatestWithdrawTime(r);break;case 13:r=t.readBytes();e.setCode(r);break;case 14:r=t.readBool();e.setIsWitness(r);break;case 15:r=t.readBool();e.setIsCommittee(r);break;case 16:r=new TronWebProto.Account.Frozen;t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.addFrozenSupply(r);break;case 17:r=t.readBytes();e.setAssetIssuedName(r);break;case 57:r=t.readBytes();e.setAssetIssuedId(r);break;case 18:r=e.getLatestAssetOperationTimeMap();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,\"\",0)});break;case 58:r=e.getLatestAssetOperationTimev2Map();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,\"\",0)});break;case 19:r=t.readInt64();e.setFreeNetUsage(r);break;case 20:r=e.getFreeAssetNetUsageMap();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,\"\",0)});break;case 59:r=e.getFreeAssetNetUsagev2Map();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,\"\",0)});break;case 21:r=t.readInt64();e.setLatestConsumeTime(r);break;case 22:r=t.readInt64();e.setLatestConsumeFreeTime(r);break;case 23:r=t.readBytes();e.setAccountId(r);break;case 26:r=new TronWebProto.Account.AccountResource;t.readMessage(r,TronWebProto.Account.AccountResource.deserializeBinaryFromReader),e.setAccountResource(r);break;case 30:r=t.readBytes();e.setCodehash(r);break;case 31:r=new TronWebProto.Permission;t.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.setOwnerPermission(r);break;case 32:r=new TronWebProto.Permission;t.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.setWitnessPermission(r);break;case 33:r=new TronWebProto.Permission;t.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.addActivePermission(r);break;default:t.skipField()}}return e},TronWebProto.Account.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Account.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAccountName_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getType())&&t.writeEnum(2,r),(r=e.getAddress_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getBalance())&&t.writeInt64(4,r),(r=e.getVotesList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.Vote.serializeBinaryToWriter),(r=e.getAssetMap(!0))&&r.getLength()>0&&r.serializeBinary(6,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getAssetv2Map(!0))&&r.getLength()>0&&r.serializeBinary(56,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getFrozenList()).length>0&&t.writeRepeatedMessage(7,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),0!==(r=e.getNetUsage())&&t.writeInt64(8,r),0!==(r=e.getAcquiredDelegatedFrozenBalanceForBandwidth())&&t.writeInt64(41,r),0!==(r=e.getDelegatedFrozenBalanceForBandwidth())&&t.writeInt64(42,r),0!==(r=e.getOldTronPower())&&t.writeInt64(46,r),null!=(r=e.getTronPower())&&t.writeMessage(47,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),(r=e.getAssetOptimized())&&t.writeBool(60,r),0!==(r=e.getCreateTime())&&t.writeInt64(9,r),0!==(r=e.getLatestOprationTime())&&t.writeInt64(10,r),0!==(r=e.getAllowance())&&t.writeInt64(11,r),0!==(r=e.getLatestWithdrawTime())&&t.writeInt64(12,r),(r=e.getCode_asU8()).length>0&&t.writeBytes(13,r),(r=e.getIsWitness())&&t.writeBool(14,r),(r=e.getIsCommittee())&&t.writeBool(15,r),(r=e.getFrozenSupplyList()).length>0&&t.writeRepeatedMessage(16,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),(r=e.getAssetIssuedName_asU8()).length>0&&t.writeBytes(17,r),(r=e.getAssetIssuedId_asU8()).length>0&&t.writeBytes(57,r),(r=e.getLatestAssetOperationTimeMap(!0))&&r.getLength()>0&&r.serializeBinary(18,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getLatestAssetOperationTimev2Map(!0))&&r.getLength()>0&&r.serializeBinary(58,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),0!==(r=e.getFreeNetUsage())&&t.writeInt64(19,r),(r=e.getFreeAssetNetUsageMap(!0))&&r.getLength()>0&&r.serializeBinary(20,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getFreeAssetNetUsagev2Map(!0))&&r.getLength()>0&&r.serializeBinary(59,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),0!==(r=e.getLatestConsumeTime())&&t.writeInt64(21,r),0!==(r=e.getLatestConsumeFreeTime())&&t.writeInt64(22,r),(r=e.getAccountId_asU8()).length>0&&t.writeBytes(23,r),null!=(r=e.getAccountResource())&&t.writeMessage(26,r,TronWebProto.Account.AccountResource.serializeBinaryToWriter),(r=e.getCodehash_asU8()).length>0&&t.writeBytes(30,r),null!=(r=e.getOwnerPermission())&&t.writeMessage(31,r,TronWebProto.Permission.serializeBinaryToWriter),null!=(r=e.getWitnessPermission())&&t.writeMessage(32,r,TronWebProto.Permission.serializeBinaryToWriter),(r=e.getActivePermissionList()).length>0&&t.writeRepeatedMessage(33,r,TronWebProto.Permission.serializeBinaryToWriter)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.Frozen.prototype.toObject=function(e){return TronWebProto.Account.Frozen.toObject(e,this)},TronWebProto.Account.Frozen.toObject=function(e,t){var r={frozenBalance:n.Message.getFieldWithDefault(t,1,0),expireTime:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Account.Frozen.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Account.Frozen;return TronWebProto.Account.Frozen.deserializeBinaryFromReader(r,t)},TronWebProto.Account.Frozen.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setFrozenBalance(r);break;case 2:r=t.readInt64();e.setExpireTime(r);break;default:t.skipField()}}return e},TronWebProto.Account.Frozen.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Account.Frozen.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.Frozen.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getFrozenBalance())&&t.writeInt64(1,r),0!==(r=e.getExpireTime())&&t.writeInt64(2,r)},TronWebProto.Account.Frozen.prototype.getFrozenBalance=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Account.Frozen.prototype.setFrozenBalance=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Account.Frozen.prototype.getExpireTime=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Account.Frozen.prototype.setExpireTime=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.AccountResource.prototype.toObject=function(e){return TronWebProto.Account.AccountResource.toObject(e,this)},TronWebProto.Account.AccountResource.toObject=function(e,t){var r,o={energyUsage:n.Message.getFieldWithDefault(t,1,0),frozenBalanceForEnergy:(r=t.getFrozenBalanceForEnergy())&&TronWebProto.Account.Frozen.toObject(e,r),latestConsumeTimeForEnergy:n.Message.getFieldWithDefault(t,3,0),acquiredDelegatedFrozenBalanceForEnergy:n.Message.getFieldWithDefault(t,4,0),delegatedFrozenBalanceForEnergy:n.Message.getFieldWithDefault(t,5,0),storageLimit:n.Message.getFieldWithDefault(t,6,0),storageUsage:n.Message.getFieldWithDefault(t,7,0),latestExchangeStorageTime:n.Message.getFieldWithDefault(t,8,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Account.AccountResource.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Account.AccountResource;return TronWebProto.Account.AccountResource.deserializeBinaryFromReader(r,t)},TronWebProto.Account.AccountResource.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setEnergyUsage(r);break;case 2:r=new TronWebProto.Account.Frozen;t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.setFrozenBalanceForEnergy(r);break;case 3:r=t.readInt64();e.setLatestConsumeTimeForEnergy(r);break;case 4:r=t.readInt64();e.setAcquiredDelegatedFrozenBalanceForEnergy(r);break;case 5:r=t.readInt64();e.setDelegatedFrozenBalanceForEnergy(r);break;case 6:r=t.readInt64();e.setStorageLimit(r);break;case 7:r=t.readInt64();e.setStorageUsage(r);break;case 8:r=t.readInt64();e.setLatestExchangeStorageTime(r);break;default:t.skipField()}}return e},TronWebProto.Account.AccountResource.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Account.AccountResource.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.AccountResource.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getEnergyUsage())&&t.writeInt64(1,r),null!=(r=e.getFrozenBalanceForEnergy())&&t.writeMessage(2,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),0!==(r=e.getLatestConsumeTimeForEnergy())&&t.writeInt64(3,r),0!==(r=e.getAcquiredDelegatedFrozenBalanceForEnergy())&&t.writeInt64(4,r),0!==(r=e.getDelegatedFrozenBalanceForEnergy())&&t.writeInt64(5,r),0!==(r=e.getStorageLimit())&&t.writeInt64(6,r),0!==(r=e.getStorageUsage())&&t.writeInt64(7,r),0!==(r=e.getLatestExchangeStorageTime())&&t.writeInt64(8,r)},TronWebProto.Account.AccountResource.prototype.getEnergyUsage=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Account.AccountResource.prototype.setEnergyUsage=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Account.AccountResource.prototype.getFrozenBalanceForEnergy=function(){return n.Message.getWrapperField(this,TronWebProto.Account.Frozen,2)},TronWebProto.Account.AccountResource.prototype.setFrozenBalanceForEnergy=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.Account.AccountResource.prototype.clearFrozenBalanceForEnergy=function(){return this.setFrozenBalanceForEnergy(void 0)},TronWebProto.Account.AccountResource.prototype.hasFrozenBalanceForEnergy=function(){return null!=n.Message.getField(this,2)},TronWebProto.Account.AccountResource.prototype.getLatestConsumeTimeForEnergy=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.Account.AccountResource.prototype.getAcquiredDelegatedFrozenBalanceForEnergy=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Account.AccountResource.prototype.setAcquiredDelegatedFrozenBalanceForEnergy=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Account.AccountResource.prototype.getDelegatedFrozenBalanceForEnergy=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Account.AccountResource.prototype.setDelegatedFrozenBalanceForEnergy=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Account.AccountResource.prototype.getStorageLimit=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.Account.AccountResource.prototype.setStorageLimit=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.Account.AccountResource.prototype.getStorageUsage=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Account.AccountResource.prototype.setStorageUsage=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.Account.AccountResource.prototype.getLatestExchangeStorageTime=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Account.AccountResource.prototype.setLatestExchangeStorageTime=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Account.prototype.getAccountName=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.Account.prototype.getAccountName_asB64=function(){return n.Message.bytesAsB64(this.getAccountName())},TronWebProto.Account.prototype.getAccountName_asU8=function(){return n.Message.bytesAsU8(this.getAccountName())},TronWebProto.Account.prototype.setAccountName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Account.prototype.getType=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Account.prototype.setType=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.Account.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.Account.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Account.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Account.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.Account.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Account.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Account.prototype.getVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Vote,5)},TronWebProto.Account.prototype.setVotesList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.Account.prototype.addVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.Vote,t)},TronWebProto.Account.prototype.clearVotesList=function(){return this.setVotesList([])},TronWebProto.Account.prototype.getAssetMap=function(e){return n.Message.getMapField(this,6,e,null)},TronWebProto.Account.prototype.clearAssetMap=function(){return this.getAssetMap().clear(),this},TronWebProto.Account.prototype.getAssetv2Map=function(e){return n.Message.getMapField(this,56,e,null)},TronWebProto.Account.prototype.clearAssetv2Map=function(){return this.getAssetv2Map().clear(),this},TronWebProto.Account.prototype.getFrozenList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Account.Frozen,7)},TronWebProto.Account.prototype.setFrozenList=function(e){return n.Message.setRepeatedWrapperField(this,7,e)},TronWebProto.Account.prototype.addFrozen=function(e,t){return n.Message.addToRepeatedWrapperField(this,7,e,TronWebProto.Account.Frozen,t)},TronWebProto.Account.prototype.clearFrozenList=function(){return this.setFrozenList([])},TronWebProto.Account.prototype.getNetUsage=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Account.prototype.setNetUsage=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Account.prototype.getAcquiredDelegatedFrozenBalanceForBandwidth=function(){return n.Message.getFieldWithDefault(this,41,0)},TronWebProto.Account.prototype.setAcquiredDelegatedFrozenBalanceForBandwidth=function(e){return n.Message.setProto3IntField(this,41,e)},TronWebProto.Account.prototype.getDelegatedFrozenBalanceForBandwidth=function(){return n.Message.getFieldWithDefault(this,42,0)},TronWebProto.Account.prototype.setDelegatedFrozenBalanceForBandwidth=function(e){return n.Message.setProto3IntField(this,42,e)},TronWebProto.Account.prototype.getOldTronPower=function(){return n.Message.getFieldWithDefault(this,46,0)},TronWebProto.Account.prototype.setOldTronPower=function(e){return n.Message.setProto3IntField(this,46,e)},TronWebProto.Account.prototype.getTronPower=function(){return n.Message.getWrapperField(this,TronWebProto.Account.Frozen,47)},TronWebProto.Account.prototype.setTronPower=function(e){return n.Message.setWrapperField(this,47,e)},TronWebProto.Account.prototype.clearTronPower=function(){return this.setTronPower(void 0)},TronWebProto.Account.prototype.hasTronPower=function(){return null!=n.Message.getField(this,47)},TronWebProto.Account.prototype.getAssetOptimized=function(){return n.Message.getBooleanFieldWithDefault(this,60,!1)},TronWebProto.Account.prototype.setAssetOptimized=function(e){return n.Message.setProto3BooleanField(this,60,e)},TronWebProto.Account.prototype.getCreateTime=function(){return n.Message.getFieldWithDefault(this,9,0)},TronWebProto.Account.prototype.setCreateTime=function(e){return n.Message.setProto3IntField(this,9,e)},TronWebProto.Account.prototype.getLatestOprationTime=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.Account.prototype.setLatestOprationTime=function(e){return n.Message.setProto3IntField(this,10,e)},TronWebProto.Account.prototype.getAllowance=function(){return n.Message.getFieldWithDefault(this,11,0)},TronWebProto.Account.prototype.setAllowance=function(e){return n.Message.setProto3IntField(this,11,e)},TronWebProto.Account.prototype.getLatestWithdrawTime=function(){return n.Message.getFieldWithDefault(this,12,0)},TronWebProto.Account.prototype.setLatestWithdrawTime=function(e){return n.Message.setProto3IntField(this,12,e)},TronWebProto.Account.prototype.getCode=function(){return n.Message.getFieldWithDefault(this,13,\"\")},TronWebProto.Account.prototype.getCode_asB64=function(){return n.Message.bytesAsB64(this.getCode())},TronWebProto.Account.prototype.getCode_asU8=function(){return n.Message.bytesAsU8(this.getCode())},TronWebProto.Account.prototype.setCode=function(e){return n.Message.setProto3BytesField(this,13,e)},TronWebProto.Account.prototype.getIsWitness=function(){return n.Message.getBooleanFieldWithDefault(this,14,!1)},TronWebProto.Account.prototype.setIsWitness=function(e){return n.Message.setProto3BooleanField(this,14,e)},TronWebProto.Account.prototype.getIsCommittee=function(){return n.Message.getBooleanFieldWithDefault(this,15,!1)},TronWebProto.Account.prototype.setIsCommittee=function(e){return n.Message.setProto3BooleanField(this,15,e)},TronWebProto.Account.prototype.getFrozenSupplyList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Account.Frozen,16)},TronWebProto.Account.prototype.setFrozenSupplyList=function(e){return n.Message.setRepeatedWrapperField(this,16,e)},TronWebProto.Account.prototype.addFrozenSupply=function(e,t){return n.Message.addToRepeatedWrapperField(this,16,e,TronWebProto.Account.Frozen,t)},TronWebProto.Account.prototype.clearFrozenSupplyList=function(){return this.setFrozenSupplyList([])},TronWebProto.Account.prototype.getAssetIssuedName=function(){return n.Message.getFieldWithDefault(this,17,\"\")},TronWebProto.Account.prototype.getAssetIssuedName_asB64=function(){return n.Message.bytesAsB64(this.getAssetIssuedName())},TronWebProto.Account.prototype.getAssetIssuedName_asU8=function(){return n.Message.bytesAsU8(this.getAssetIssuedName())},TronWebProto.Account.prototype.setAssetIssuedName=function(e){return n.Message.setProto3BytesField(this,17,e)},TronWebProto.Account.prototype.getAssetIssuedId=function(){return n.Message.getFieldWithDefault(this,57,\"\")},TronWebProto.Account.prototype.getAssetIssuedId_asB64=function(){return n.Message.bytesAsB64(this.getAssetIssuedId())},TronWebProto.Account.prototype.getAssetIssuedId_asU8=function(){return n.Message.bytesAsU8(this.getAssetIssuedId())},TronWebProto.Account.prototype.setAssetIssuedId=function(e){return n.Message.setProto3BytesField(this,57,e)},TronWebProto.Account.prototype.getLatestAssetOperationTimeMap=function(e){return n.Message.getMapField(this,18,e,null)},TronWebProto.Account.prototype.clearLatestAssetOperationTimeMap=function(){return this.getLatestAssetOperationTimeMap().clear(),this},TronWebProto.Account.prototype.getLatestAssetOperationTimev2Map=function(e){return n.Message.getMapField(this,58,e,null)},TronWebProto.Account.prototype.clearLatestAssetOperationTimev2Map=function(){return this.getLatestAssetOperationTimev2Map().clear(),this},TronWebProto.Account.prototype.getFreeNetUsage=function(){return n.Message.getFieldWithDefault(this,19,0)},TronWebProto.Account.prototype.setFreeNetUsage=function(e){return n.Message.setProto3IntField(this,19,e)},TronWebProto.Account.prototype.getFreeAssetNetUsageMap=function(e){return n.Message.getMapField(this,20,e,null)},TronWebProto.Account.prototype.clearFreeAssetNetUsageMap=function(){return this.getFreeAssetNetUsageMap().clear(),this},TronWebProto.Account.prototype.getFreeAssetNetUsagev2Map=function(e){return n.Message.getMapField(this,59,e,null)},TronWebProto.Account.prototype.clearFreeAssetNetUsagev2Map=function(){return this.getFreeAssetNetUsagev2Map().clear(),this},TronWebProto.Account.prototype.getLatestConsumeTime=function(){return n.Message.getFieldWithDefault(this,21,0)},TronWebProto.Account.prototype.setLatestConsumeTime=function(e){return n.Message.setProto3IntField(this,21,e)},TronWebProto.Account.prototype.getLatestConsumeFreeTime=function(){return n.Message.getFieldWithDefault(this,22,0)},TronWebProto.Account.prototype.setLatestConsumeFreeTime=function(e){return n.Message.setProto3IntField(this,22,e)},TronWebProto.Account.prototype.getAccountId=function(){return n.Message.getFieldWithDefault(this,23,\"\")},TronWebProto.Account.prototype.getAccountId_asB64=function(){return n.Message.bytesAsB64(this.getAccountId())},TronWebProto.Account.prototype.getAccountId_asU8=function(){return n.Message.bytesAsU8(this.getAccountId())},TronWebProto.Account.prototype.setAccountId=function(e){return n.Message.setProto3BytesField(this,23,e)},TronWebProto.Account.prototype.getAccountResource=function(){return n.Message.getWrapperField(this,TronWebProto.Account.AccountResource,26)},TronWebProto.Account.prototype.setAccountResource=function(e){return n.Message.setWrapperField(this,26,e)},TronWebProto.Account.prototype.clearAccountResource=function(){return this.setAccountResource(void 0)},TronWebProto.Account.prototype.hasAccountResource=function(){return null!=n.Message.getField(this,26)},TronWebProto.Account.prototype.getCodehash=function(){return n.Message.getFieldWithDefault(this,30,\"\")},TronWebProto.Account.prototype.getCodehash_asB64=function(){return n.Message.bytesAsB64(this.getCodehash())},TronWebProto.Account.prototype.getCodehash_asU8=function(){return n.Message.bytesAsU8(this.getCodehash())},TronWebProto.Account.prototype.setCodehash=function(e){return n.Message.setProto3BytesField(this,30,e)},TronWebProto.Account.prototype.getOwnerPermission=function(){return n.Message.getWrapperField(this,TronWebProto.Permission,31)},TronWebProto.Account.prototype.setOwnerPermission=function(e){return n.Message.setWrapperField(this,31,e)},TronWebProto.Account.prototype.clearOwnerPermission=function(){return this.setOwnerPermission(void 0)},TronWebProto.Account.prototype.hasOwnerPermission=function(){return null!=n.Message.getField(this,31)},TronWebProto.Account.prototype.getWitnessPermission=function(){return n.Message.getWrapperField(this,TronWebProto.Permission,32)},TronWebProto.Account.prototype.setWitnessPermission=function(e){return n.Message.setWrapperField(this,32,e)},TronWebProto.Account.prototype.clearWitnessPermission=function(){return this.setWitnessPermission(void 0)},TronWebProto.Account.prototype.hasWitnessPermission=function(){return null!=n.Message.getField(this,32)},TronWebProto.Account.prototype.getActivePermissionList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Permission,33)},TronWebProto.Account.prototype.setActivePermissionList=function(e){return n.Message.setRepeatedWrapperField(this,33,e)},TronWebProto.Account.prototype.addActivePermission=function(e,t){return n.Message.addToRepeatedWrapperField(this,33,e,TronWebProto.Permission,t)},TronWebProto.Account.prototype.clearActivePermissionList=function(){return this.setActivePermissionList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Key.prototype.toObject=function(e){return TronWebProto.Key.toObject(e,this)},TronWebProto.Key.toObject=function(e,t){var r={address:t.getAddress_asB64(),weight:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Key.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Key;return TronWebProto.Key.deserializeBinaryFromReader(r,t)},TronWebProto.Key.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAddress(r);break;case 2:r=t.readInt64();e.setWeight(r);break;default:t.skipField()}}return e},TronWebProto.Key.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Key.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Key.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getWeight())&&t.writeInt64(2,r)},TronWebProto.Key.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.Key.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Key.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Key.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Key.prototype.getWeight=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Key.prototype.setWeight=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.DelegatedResource.prototype.toObject=function(e){return TronWebProto.DelegatedResource.toObject(e,this)},TronWebProto.DelegatedResource.toObject=function(e,t){var r={from:t.getFrom_asB64(),to:t.getTo_asB64(),frozenBalanceForBandwidth:n.Message.getFieldWithDefault(t,3,0),frozenBalanceForEnergy:n.Message.getFieldWithDefault(t,4,0),expireTimeForBandwidth:n.Message.getFieldWithDefault(t,5,0),expireTimeForEnergy:n.Message.getFieldWithDefault(t,6,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.DelegatedResource.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.DelegatedResource;return TronWebProto.DelegatedResource.deserializeBinaryFromReader(r,t)},TronWebProto.DelegatedResource.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setFrom(r);break;case 2:r=t.readBytes();e.setTo(r);break;case 3:r=t.readInt64();e.setFrozenBalanceForBandwidth(r);break;case 4:r=t.readInt64();e.setFrozenBalanceForEnergy(r);break;case 5:r=t.readInt64();e.setExpireTimeForBandwidth(r);break;case 6:r=t.readInt64();e.setExpireTimeForEnergy(r);break;default:t.skipField()}}return e},TronWebProto.DelegatedResource.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.DelegatedResource.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.DelegatedResource.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getFrom_asU8()).length>0&&t.writeBytes(1,r),(r=e.getTo_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getFrozenBalanceForBandwidth())&&t.writeInt64(3,r),0!==(r=e.getFrozenBalanceForEnergy())&&t.writeInt64(4,r),0!==(r=e.getExpireTimeForBandwidth())&&t.writeInt64(5,r),0!==(r=e.getExpireTimeForEnergy())&&t.writeInt64(6,r)},TronWebProto.DelegatedResource.prototype.getFrom=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.DelegatedResource.prototype.getFrom_asB64=function(){return n.Message.bytesAsB64(this.getFrom())},TronWebProto.DelegatedResource.prototype.getFrom_asU8=function(){return n.Message.bytesAsU8(this.getFrom())},TronWebProto.DelegatedResource.prototype.setFrom=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.DelegatedResource.prototype.getTo=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.DelegatedResource.prototype.getTo_asB64=function(){return n.Message.bytesAsB64(this.getTo())},TronWebProto.DelegatedResource.prototype.getTo_asU8=function(){return n.Message.bytesAsU8(this.getTo())},TronWebProto.DelegatedResource.prototype.setTo=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.DelegatedResource.prototype.getFrozenBalanceForBandwidth=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.DelegatedResource.prototype.setFrozenBalanceForBandwidth=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.DelegatedResource.prototype.getFrozenBalanceForEnergy=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.DelegatedResource.prototype.setFrozenBalanceForEnergy=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.DelegatedResource.prototype.getExpireTimeForBandwidth=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.DelegatedResource.prototype.setExpireTimeForBandwidth=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.DelegatedResource.prototype.getExpireTimeForEnergy=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.DelegatedResource.prototype.setExpireTimeForEnergy=function(e){return n.Message.setProto3IntField(this,6,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.authority.prototype.toObject=function(e){return TronWebProto.authority.toObject(e,this)},TronWebProto.authority.toObject=function(e,t){var r,n={account:(r=t.getAccount())&&TronWebProto.AccountId.toObject(e,r),permissionName:t.getPermissionName_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.authority.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.authority;return TronWebProto.authority.deserializeBinaryFromReader(r,t)},TronWebProto.authority.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.AccountId;t.readMessage(r,TronWebProto.AccountId.deserializeBinaryFromReader),e.setAccount(r);break;case 2:r=t.readBytes();e.setPermissionName(r);break;default:t.skipField()}}return e},TronWebProto.authority.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.authority.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.authority.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getAccount())&&t.writeMessage(1,r,TronWebProto.AccountId.serializeBinaryToWriter),(r=e.getPermissionName_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.authority.prototype.getAccount=function(){return n.Message.getWrapperField(this,TronWebProto.AccountId,1)},TronWebProto.authority.prototype.setAccount=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.authority.prototype.clearAccount=function(){return this.setAccount(void 0)},TronWebProto.authority.prototype.hasAccount=function(){return null!=n.Message.getField(this,1)},TronWebProto.authority.prototype.getPermissionName=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.authority.prototype.getPermissionName_asB64=function(){return n.Message.bytesAsB64(this.getPermissionName())},TronWebProto.authority.prototype.getPermissionName_asU8=function(){return n.Message.bytesAsU8(this.getPermissionName())},TronWebProto.authority.prototype.setPermissionName=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.Permission.repeatedFields_=[7],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Permission.prototype.toObject=function(e){return TronWebProto.Permission.toObject(e,this)},TronWebProto.Permission.toObject=function(e,t){var r={type:n.Message.getFieldWithDefault(t,1,0),id:n.Message.getFieldWithDefault(t,2,0),permissionName:n.Message.getFieldWithDefault(t,3,\"\"),threshold:n.Message.getFieldWithDefault(t,4,0),parentId:n.Message.getFieldWithDefault(t,5,0),operations:t.getOperations_asB64(),keysList:n.Message.toObjectList(t.getKeysList(),TronWebProto.Key.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Permission.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Permission;return TronWebProto.Permission.deserializeBinaryFromReader(r,t)},TronWebProto.Permission.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readEnum();e.setType(r);break;case 2:r=t.readInt32();e.setId(r);break;case 3:r=t.readString();e.setPermissionName(r);break;case 4:r=t.readInt64();e.setThreshold(r);break;case 5:r=t.readInt32();e.setParentId(r);break;case 6:r=t.readBytes();e.setOperations(r);break;case 7:r=new TronWebProto.Key;t.readMessage(r,TronWebProto.Key.deserializeBinaryFromReader),e.addKeys(r);break;default:t.skipField()}}return e},TronWebProto.Permission.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Permission.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Permission.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getType())&&t.writeEnum(1,r),0!==(r=e.getId())&&t.writeInt32(2,r),(r=e.getPermissionName()).length>0&&t.writeString(3,r),0!==(r=e.getThreshold())&&t.writeInt64(4,r),0!==(r=e.getParentId())&&t.writeInt32(5,r),(r=e.getOperations_asU8()).length>0&&t.writeBytes(6,r),(r=e.getKeysList()).length>0&&t.writeRepeatedMessage(7,r,TronWebProto.Key.serializeBinaryToWriter)},TronWebProto.Permission.PermissionType={OWNER:0,WITNESS:1,ACTIVE:2},TronWebProto.Permission.prototype.getType=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Permission.prototype.setType=function(e){return n.Message.setProto3EnumField(this,1,e)},TronWebProto.Permission.prototype.getId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Permission.prototype.setId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.Permission.prototype.getPermissionName=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.Permission.prototype.setPermissionName=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.Permission.prototype.getThreshold=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Permission.prototype.setThreshold=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Permission.prototype.getParentId=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Permission.prototype.setParentId=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Permission.prototype.getOperations=function(){return n.Message.getFieldWithDefault(this,6,\"\")},TronWebProto.Permission.prototype.getOperations_asB64=function(){return n.Message.bytesAsB64(this.getOperations())},TronWebProto.Permission.prototype.getOperations_asU8=function(){return n.Message.bytesAsU8(this.getOperations())},TronWebProto.Permission.prototype.setOperations=function(e){return n.Message.setProto3BytesField(this,6,e)},TronWebProto.Permission.prototype.getKeysList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Key,7)},TronWebProto.Permission.prototype.setKeysList=function(e){return n.Message.setRepeatedWrapperField(this,7,e)},TronWebProto.Permission.prototype.addKeys=function(e,t){return n.Message.addToRepeatedWrapperField(this,7,e,TronWebProto.Key,t)},TronWebProto.Permission.prototype.clearKeysList=function(){return this.setKeysList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Witness.prototype.toObject=function(e){return TronWebProto.Witness.toObject(e,this)},TronWebProto.Witness.toObject=function(e,t){var r={address:t.getAddress_asB64(),votecount:n.Message.getFieldWithDefault(t,2,0),pubkey:t.getPubkey_asB64(),url:n.Message.getFieldWithDefault(t,4,\"\"),totalproduced:n.Message.getFieldWithDefault(t,5,0),totalmissed:n.Message.getFieldWithDefault(t,6,0),latestblocknum:n.Message.getFieldWithDefault(t,7,0),latestslotnum:n.Message.getFieldWithDefault(t,8,0),isjobs:n.Message.getBooleanFieldWithDefault(t,9,!1)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Witness.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Witness;return TronWebProto.Witness.deserializeBinaryFromReader(r,t)},TronWebProto.Witness.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAddress(r);break;case 2:r=t.readInt64();e.setVotecount(r);break;case 3:r=t.readBytes();e.setPubkey(r);break;case 4:r=t.readString();e.setUrl(r);break;case 5:r=t.readInt64();e.setTotalproduced(r);break;case 6:r=t.readInt64();e.setTotalmissed(r);break;case 7:r=t.readInt64();e.setLatestblocknum(r);break;case 8:r=t.readInt64();e.setLatestslotnum(r);break;case 9:r=t.readBool();e.setIsjobs(r);break;default:t.skipField()}}return e},TronWebProto.Witness.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Witness.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Witness.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getVotecount())&&t.writeInt64(2,r),(r=e.getPubkey_asU8()).length>0&&t.writeBytes(3,r),(r=e.getUrl()).length>0&&t.writeString(4,r),0!==(r=e.getTotalproduced())&&t.writeInt64(5,r),0!==(r=e.getTotalmissed())&&t.writeInt64(6,r),0!==(r=e.getLatestblocknum())&&t.writeInt64(7,r),0!==(r=e.getLatestslotnum())&&t.writeInt64(8,r),(r=e.getIsjobs())&&t.writeBool(9,r)},TronWebProto.Witness.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.Witness.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Witness.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Witness.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Witness.prototype.getVotecount=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Witness.prototype.setVotecount=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.Witness.prototype.getPubkey=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.Witness.prototype.getPubkey_asB64=function(){return n.Message.bytesAsB64(this.getPubkey())},TronWebProto.Witness.prototype.getPubkey_asU8=function(){return n.Message.bytesAsU8(this.getPubkey())},TronWebProto.Witness.prototype.setPubkey=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.Witness.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.Witness.prototype.setUrl=function(e){return n.Message.setProto3StringField(this,4,e)},TronWebProto.Witness.prototype.getTotalproduced=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Witness.prototype.setTotalproduced=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Witness.prototype.getTotalmissed=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.Witness.prototype.setTotalmissed=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.Witness.prototype.getLatestblocknum=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Witness.prototype.setLatestblocknum=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.Witness.prototype.getLatestslotnum=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Witness.prototype.setLatestslotnum=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Witness.prototype.getIsjobs=function(){return n.Message.getBooleanFieldWithDefault(this,9,!1)},TronWebProto.Witness.prototype.setIsjobs=function(e){return n.Message.setProto3BooleanField(this,9,e)},TronWebProto.Votes.repeatedFields_=[2,3],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Votes.prototype.toObject=function(e){return TronWebProto.Votes.toObject(e,this)},TronWebProto.Votes.toObject=function(e,t){var r={address:t.getAddress_asB64(),oldVotesList:n.Message.toObjectList(t.getOldVotesList(),TronWebProto.Vote.toObject,e),newVotesList:n.Message.toObjectList(t.getNewVotesList(),TronWebProto.Vote.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Votes.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Votes;return TronWebProto.Votes.deserializeBinaryFromReader(r,t)},TronWebProto.Votes.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAddress(r);break;case 2:r=new TronWebProto.Vote;t.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addOldVotes(r);break;case 3:r=new TronWebProto.Vote;t.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addNewVotes(r);break;default:t.skipField()}}return e},TronWebProto.Votes.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Votes.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Votes.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOldVotesList()).length>0&&t.writeRepeatedMessage(2,r,TronWebProto.Vote.serializeBinaryToWriter),(r=e.getNewVotesList()).length>0&&t.writeRepeatedMessage(3,r,TronWebProto.Vote.serializeBinaryToWriter)},TronWebProto.Votes.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.Votes.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Votes.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Votes.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Votes.prototype.getOldVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Vote,2)},TronWebProto.Votes.prototype.setOldVotesList=function(e){return n.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.Votes.prototype.addOldVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.Vote,t)},TronWebProto.Votes.prototype.clearOldVotesList=function(){return this.setOldVotesList([])},TronWebProto.Votes.prototype.getNewVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Vote,3)},TronWebProto.Votes.prototype.setNewVotesList=function(e){return n.Message.setRepeatedWrapperField(this,3,e)},TronWebProto.Votes.prototype.addNewVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,3,e,TronWebProto.Vote,t)},TronWebProto.Votes.prototype.clearNewVotesList=function(){return this.setNewVotesList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.MarketOrderDetail.prototype.toObject=function(e){return TronWebProto.MarketOrderDetail.toObject(e,this)},TronWebProto.MarketOrderDetail.toObject=function(e,t){var r={makerorderid:t.getMakerorderid_asB64(),takerorderid:t.getTakerorderid_asB64(),fillsellquantity:n.Message.getFieldWithDefault(t,3,0),fillbuyquantity:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.MarketOrderDetail.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.MarketOrderDetail;return TronWebProto.MarketOrderDetail.deserializeBinaryFromReader(r,t)},TronWebProto.MarketOrderDetail.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setMakerorderid(r);break;case 2:r=t.readBytes();e.setTakerorderid(r);break;case 3:r=t.readInt64();e.setFillsellquantity(r);break;case 4:r=t.readInt64();e.setFillbuyquantity(r);break;default:t.skipField()}}return e},TronWebProto.MarketOrderDetail.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.MarketOrderDetail.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.MarketOrderDetail.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getMakerorderid_asU8()).length>0&&t.writeBytes(1,r),(r=e.getTakerorderid_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getFillsellquantity())&&t.writeInt64(3,r),0!==(r=e.getFillbuyquantity())&&t.writeInt64(4,r)},TronWebProto.MarketOrderDetail.prototype.getMakerorderid=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.MarketOrderDetail.prototype.getMakerorderid_asB64=function(){return n.Message.bytesAsB64(this.getMakerorderid())},TronWebProto.MarketOrderDetail.prototype.getMakerorderid_asU8=function(){return n.Message.bytesAsU8(this.getMakerorderid())},TronWebProto.MarketOrderDetail.prototype.setMakerorderid=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.MarketOrderDetail.prototype.getTakerorderid=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.MarketOrderDetail.prototype.getTakerorderid_asB64=function(){return n.Message.bytesAsB64(this.getTakerorderid())},TronWebProto.MarketOrderDetail.prototype.getTakerorderid_asU8=function(){return n.Message.bytesAsU8(this.getTakerorderid())},TronWebProto.MarketOrderDetail.prototype.setTakerorderid=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.MarketOrderDetail.prototype.getFillsellquantity=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.MarketOrderDetail.prototype.setFillsellquantity=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.MarketOrderDetail.prototype.getFillbuyquantity=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.MarketOrderDetail.prototype.setFillbuyquantity=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Transaction.repeatedFields_=[2,5],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.prototype.toObject=function(e){return TronWebProto.Transaction.toObject(e,this)},TronWebProto.Transaction.toObject=function(e,t){var r,o={rawData:(r=t.getRawData())&&TronWebProto.Transaction.raw.toObject(e,r),signatureList:t.getSignatureList_asB64(),retList:n.Message.toObjectList(t.getRetList(),TronWebProto.Transaction.Result.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Transaction.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction;return TronWebProto.Transaction.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.Transaction.raw;t.readMessage(r,TronWebProto.Transaction.raw.deserializeBinaryFromReader),e.setRawData(r);break;case 2:r=t.readBytes();e.addSignature(r);break;case 5:r=new TronWebProto.Transaction.Result;t.readMessage(r,TronWebProto.Transaction.Result.deserializeBinaryFromReader),e.addRet(r);break;default:t.skipField()}}return e},TronWebProto.Transaction.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getRawData())&&t.writeMessage(1,r,TronWebProto.Transaction.raw.serializeBinaryToWriter),(r=e.getSignatureList_asU8()).length>0&&t.writeRepeatedBytes(2,r),(r=e.getRetList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.Transaction.Result.serializeBinaryToWriter)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.Contract.prototype.toObject=function(e){return TronWebProto.Transaction.Contract.toObject(e,this)},TronWebProto.Transaction.Contract.toObject=function(e,t){var r,o={type:n.Message.getFieldWithDefault(t,1,0),parameter:(r=t.getParameter())&&a.Any.toObject(e,r),provider:t.getProvider_asB64(),contractname:t.getContractname_asB64(),permissionId:n.Message.getFieldWithDefault(t,5,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Transaction.Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction.Contract;return TronWebProto.Transaction.Contract.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readEnum();e.setType(r);break;case 2:r=new a.Any;t.readMessage(r,a.Any.deserializeBinaryFromReader),e.setParameter(r);break;case 3:r=t.readBytes();e.setProvider(r);break;case 4:r=t.readBytes();e.setContractname(r);break;case 5:r=t.readInt32();e.setPermissionId(r);break;default:t.skipField()}}return e},TronWebProto.Transaction.Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.Contract.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getType())&&t.writeEnum(1,r),null!=(r=e.getParameter())&&t.writeMessage(2,r,a.Any.serializeBinaryToWriter),(r=e.getProvider_asU8()).length>0&&t.writeBytes(3,r),(r=e.getContractname_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getPermissionId())&&t.writeInt32(5,r)},TronWebProto.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,CANCELALLUNFREEZEV2CONTRACT:59},TronWebProto.Transaction.Contract.prototype.getType=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Transaction.Contract.prototype.setType=function(e){return n.Message.setProto3EnumField(this,1,e)},TronWebProto.Transaction.Contract.prototype.getParameter=function(){return n.Message.getWrapperField(this,a.Any,2)},TronWebProto.Transaction.Contract.prototype.setParameter=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.Transaction.Contract.prototype.clearParameter=function(){return this.setParameter(void 0)},TronWebProto.Transaction.Contract.prototype.hasParameter=function(){return null!=n.Message.getField(this,2)},TronWebProto.Transaction.Contract.prototype.getProvider=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.Transaction.Contract.prototype.getProvider_asB64=function(){return n.Message.bytesAsB64(this.getProvider())},TronWebProto.Transaction.Contract.prototype.getProvider_asU8=function(){return n.Message.bytesAsU8(this.getProvider())},TronWebProto.Transaction.Contract.prototype.setProvider=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.Transaction.Contract.prototype.getContractname=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.Transaction.Contract.prototype.getContractname_asB64=function(){return n.Message.bytesAsB64(this.getContractname())},TronWebProto.Transaction.Contract.prototype.getContractname_asU8=function(){return n.Message.bytesAsU8(this.getContractname())},TronWebProto.Transaction.Contract.prototype.setContractname=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.Transaction.Contract.prototype.getPermissionId=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Transaction.Contract.prototype.setPermissionId=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Transaction.Result.repeatedFields_=[26],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.Result.prototype.toObject=function(e){return TronWebProto.Transaction.Result.toObject(e,this)},TronWebProto.Transaction.Result.toObject=function(e,t){var r={fee:n.Message.getFieldWithDefault(t,1,0),ret:n.Message.getFieldWithDefault(t,2,0),contractret:n.Message.getFieldWithDefault(t,3,0),assetissueid:n.Message.getFieldWithDefault(t,14,\"\"),withdrawAmount:n.Message.getFieldWithDefault(t,15,0),unfreezeAmount:n.Message.getFieldWithDefault(t,16,0),exchangeReceivedAmount:n.Message.getFieldWithDefault(t,18,0),exchangeInjectAnotherAmount:n.Message.getFieldWithDefault(t,19,0),exchangeWithdrawAnotherAmount:n.Message.getFieldWithDefault(t,20,0),exchangeId:n.Message.getFieldWithDefault(t,21,0),shieldedTransactionFee:n.Message.getFieldWithDefault(t,22,0),orderid:t.getOrderid_asB64(),orderdetailsList:n.Message.toObjectList(t.getOrderdetailsList(),TronWebProto.MarketOrderDetail.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Transaction.Result.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction.Result;return TronWebProto.Transaction.Result.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.Result.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setFee(r);break;case 2:r=t.readEnum();e.setRet(r);break;case 3:r=t.readEnum();e.setContractret(r);break;case 14:r=t.readString();e.setAssetissueid(r);break;case 15:r=t.readInt64();e.setWithdrawAmount(r);break;case 16:r=t.readInt64();e.setUnfreezeAmount(r);break;case 18:r=t.readInt64();e.setExchangeReceivedAmount(r);break;case 19:r=t.readInt64();e.setExchangeInjectAnotherAmount(r);break;case 20:r=t.readInt64();e.setExchangeWithdrawAnotherAmount(r);break;case 21:r=t.readInt64();e.setExchangeId(r);break;case 22:r=t.readInt64();e.setShieldedTransactionFee(r);break;case 25:r=t.readBytes();e.setOrderid(r);break;case 26:r=new TronWebProto.MarketOrderDetail;t.readMessage(r,TronWebProto.MarketOrderDetail.deserializeBinaryFromReader),e.addOrderdetails(r);break;default:t.skipField()}}return e},TronWebProto.Transaction.Result.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.Result.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.Result.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getFee())&&t.writeInt64(1,r),0!==(r=e.getRet())&&t.writeEnum(2,r),0!==(r=e.getContractret())&&t.writeEnum(3,r),(r=e.getAssetissueid()).length>0&&t.writeString(14,r),0!==(r=e.getWithdrawAmount())&&t.writeInt64(15,r),0!==(r=e.getUnfreezeAmount())&&t.writeInt64(16,r),0!==(r=e.getExchangeReceivedAmount())&&t.writeInt64(18,r),0!==(r=e.getExchangeInjectAnotherAmount())&&t.writeInt64(19,r),0!==(r=e.getExchangeWithdrawAnotherAmount())&&t.writeInt64(20,r),0!==(r=e.getExchangeId())&&t.writeInt64(21,r),0!==(r=e.getShieldedTransactionFee())&&t.writeInt64(22,r),(r=e.getOrderid_asU8()).length>0&&t.writeBytes(25,r),(r=e.getOrderdetailsList()).length>0&&t.writeRepeatedMessage(26,r,TronWebProto.MarketOrderDetail.serializeBinaryToWriter)},TronWebProto.Transaction.Result.code={SUCESS:0,FAILED:1},TronWebProto.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},TronWebProto.Transaction.Result.prototype.getFee=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Transaction.Result.prototype.setFee=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Transaction.Result.prototype.getRet=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Transaction.Result.prototype.setRet=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.Transaction.Result.prototype.getContractret=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Transaction.Result.prototype.setContractret=function(e){return n.Message.setProto3EnumField(this,3,e)},TronWebProto.Transaction.Result.prototype.getAssetissueid=function(){return n.Message.getFieldWithDefault(this,14,\"\")},TronWebProto.Transaction.Result.prototype.setAssetissueid=function(e){return n.Message.setProto3StringField(this,14,e)},TronWebProto.Transaction.Result.prototype.getWithdrawAmount=function(){return n.Message.getFieldWithDefault(this,15,0)},TronWebProto.Transaction.Result.prototype.setWithdrawAmount=function(e){return n.Message.setProto3IntField(this,15,e)},TronWebProto.Transaction.Result.prototype.getUnfreezeAmount=function(){return n.Message.getFieldWithDefault(this,16,0)},TronWebProto.Transaction.Result.prototype.setUnfreezeAmount=function(e){return n.Message.setProto3IntField(this,16,e)},TronWebProto.Transaction.Result.prototype.getExchangeReceivedAmount=function(){return n.Message.getFieldWithDefault(this,18,0)},TronWebProto.Transaction.Result.prototype.setExchangeReceivedAmount=function(e){return n.Message.setProto3IntField(this,18,e)},TronWebProto.Transaction.Result.prototype.getExchangeInjectAnotherAmount=function(){return n.Message.getFieldWithDefault(this,19,0)},TronWebProto.Transaction.Result.prototype.setExchangeInjectAnotherAmount=function(e){return n.Message.setProto3IntField(this,19,e)},TronWebProto.Transaction.Result.prototype.getExchangeWithdrawAnotherAmount=function(){return n.Message.getFieldWithDefault(this,20,0)},TronWebProto.Transaction.Result.prototype.setExchangeWithdrawAnotherAmount=function(e){return n.Message.setProto3IntField(this,20,e)},TronWebProto.Transaction.Result.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,21,0)},TronWebProto.Transaction.Result.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,21,e)},TronWebProto.Transaction.Result.prototype.getShieldedTransactionFee=function(){return n.Message.getFieldWithDefault(this,22,0)},TronWebProto.Transaction.Result.prototype.setShieldedTransactionFee=function(e){return n.Message.setProto3IntField(this,22,e)},TronWebProto.Transaction.Result.prototype.getOrderid=function(){return n.Message.getFieldWithDefault(this,25,\"\")},TronWebProto.Transaction.Result.prototype.getOrderid_asB64=function(){return n.Message.bytesAsB64(this.getOrderid())},TronWebProto.Transaction.Result.prototype.getOrderid_asU8=function(){return n.Message.bytesAsU8(this.getOrderid())},TronWebProto.Transaction.Result.prototype.setOrderid=function(e){return n.Message.setProto3BytesField(this,25,e)},TronWebProto.Transaction.Result.prototype.getOrderdetailsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.MarketOrderDetail,26)},TronWebProto.Transaction.Result.prototype.setOrderdetailsList=function(e){return n.Message.setRepeatedWrapperField(this,26,e)},TronWebProto.Transaction.Result.prototype.addOrderdetails=function(e,t){return n.Message.addToRepeatedWrapperField(this,26,e,TronWebProto.MarketOrderDetail,t)},TronWebProto.Transaction.Result.prototype.clearOrderdetailsList=function(){return this.setOrderdetailsList([])},TronWebProto.Transaction.raw.repeatedFields_=[9,11],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.raw.prototype.toObject=function(e){return TronWebProto.Transaction.raw.toObject(e,this)},TronWebProto.Transaction.raw.toObject=function(e,t){var r={refBlockBytes:t.getRefBlockBytes_asB64(),refBlockNum:n.Message.getFieldWithDefault(t,3,0),refBlockHash:t.getRefBlockHash_asB64(),expiration:n.Message.getFieldWithDefault(t,8,0),authsList:n.Message.toObjectList(t.getAuthsList(),TronWebProto.authority.toObject,e),data:t.getData_asB64(),contractList:n.Message.toObjectList(t.getContractList(),TronWebProto.Transaction.Contract.toObject,e),scripts:t.getScripts_asB64(),timestamp:n.Message.getFieldWithDefault(t,14,0),feeLimit:n.Message.getFieldWithDefault(t,18,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Transaction.raw.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction.raw;return TronWebProto.Transaction.raw.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.raw.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setRefBlockBytes(r);break;case 3:r=t.readInt64();e.setRefBlockNum(r);break;case 4:r=t.readBytes();e.setRefBlockHash(r);break;case 8:r=t.readInt64();e.setExpiration(r);break;case 9:r=new TronWebProto.authority;t.readMessage(r,TronWebProto.authority.deserializeBinaryFromReader),e.addAuths(r);break;case 10:r=t.readBytes();e.setData(r);break;case 11:r=new TronWebProto.Transaction.Contract;t.readMessage(r,TronWebProto.Transaction.Contract.deserializeBinaryFromReader),e.addContract(r);break;case 12:r=t.readBytes();e.setScripts(r);break;case 14:r=t.readInt64();e.setTimestamp(r);break;case 18:r=t.readInt64();e.setFeeLimit(r);break;default:t.skipField()}}return e},TronWebProto.Transaction.raw.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.raw.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.raw.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getRefBlockBytes_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getRefBlockNum())&&t.writeInt64(3,r),(r=e.getRefBlockHash_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getExpiration())&&t.writeInt64(8,r),(r=e.getAuthsList()).length>0&&t.writeRepeatedMessage(9,r,TronWebProto.authority.serializeBinaryToWriter),(r=e.getData_asU8()).length>0&&t.writeBytes(10,r),(r=e.getContractList()).length>0&&t.writeRepeatedMessage(11,r,TronWebProto.Transaction.Contract.serializeBinaryToWriter),(r=e.getScripts_asU8()).length>0&&t.writeBytes(12,r),0!==(r=e.getTimestamp())&&t.writeInt64(14,r),0!==(r=e.getFeeLimit())&&t.writeInt64(18,r)},TronWebProto.Transaction.raw.prototype.getRefBlockBytes=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.Transaction.raw.prototype.getRefBlockBytes_asB64=function(){return n.Message.bytesAsB64(this.getRefBlockBytes())},TronWebProto.Transaction.raw.prototype.getRefBlockBytes_asU8=function(){return n.Message.bytesAsU8(this.getRefBlockBytes())},TronWebProto.Transaction.raw.prototype.setRefBlockBytes=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Transaction.raw.prototype.getRefBlockNum=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Transaction.raw.prototype.setRefBlockNum=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.Transaction.raw.prototype.getRefBlockHash=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.Transaction.raw.prototype.getRefBlockHash_asB64=function(){return n.Message.bytesAsB64(this.getRefBlockHash())},TronWebProto.Transaction.raw.prototype.getRefBlockHash_asU8=function(){return n.Message.bytesAsU8(this.getRefBlockHash())},TronWebProto.Transaction.raw.prototype.setRefBlockHash=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.Transaction.raw.prototype.getExpiration=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Transaction.raw.prototype.setExpiration=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Transaction.raw.prototype.getAuthsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.authority,9)},TronWebProto.Transaction.raw.prototype.setAuthsList=function(e){return n.Message.setRepeatedWrapperField(this,9,e)},TronWebProto.Transaction.raw.prototype.addAuths=function(e,t){return n.Message.addToRepeatedWrapperField(this,9,e,TronWebProto.authority,t)},TronWebProto.Transaction.raw.prototype.clearAuthsList=function(){return this.setAuthsList([])},TronWebProto.Transaction.raw.prototype.getData=function(){return n.Message.getFieldWithDefault(this,10,\"\")},TronWebProto.Transaction.raw.prototype.getData_asB64=function(){return n.Message.bytesAsB64(this.getData())},TronWebProto.Transaction.raw.prototype.getData_asU8=function(){return n.Message.bytesAsU8(this.getData())},TronWebProto.Transaction.raw.prototype.setData=function(e){return n.Message.setProto3BytesField(this,10,e)},TronWebProto.Transaction.raw.prototype.getContractList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Transaction.Contract,11)},TronWebProto.Transaction.raw.prototype.setContractList=function(e){return n.Message.setRepeatedWrapperField(this,11,e)},TronWebProto.Transaction.raw.prototype.addContract=function(e,t){return n.Message.addToRepeatedWrapperField(this,11,e,TronWebProto.Transaction.Contract,t)},TronWebProto.Transaction.raw.prototype.clearContractList=function(){return this.setContractList([])},TronWebProto.Transaction.raw.prototype.getScripts=function(){return n.Message.getFieldWithDefault(this,12,\"\")},TronWebProto.Transaction.raw.prototype.getScripts_asB64=function(){return n.Message.bytesAsB64(this.getScripts())},TronWebProto.Transaction.raw.prototype.getScripts_asU8=function(){return n.Message.bytesAsU8(this.getScripts())},TronWebProto.Transaction.raw.prototype.setScripts=function(e){return n.Message.setProto3BytesField(this,12,e)},TronWebProto.Transaction.raw.prototype.getTimestamp=function(){return n.Message.getFieldWithDefault(this,14,0)},TronWebProto.Transaction.raw.prototype.setTimestamp=function(e){return n.Message.setProto3IntField(this,14,e)},TronWebProto.Transaction.raw.prototype.getFeeLimit=function(){return n.Message.getFieldWithDefault(this,18,0)},TronWebProto.Transaction.raw.prototype.setFeeLimit=function(e){return n.Message.setProto3IntField(this,18,e)},TronWebProto.Transaction.prototype.getRawData=function(){return n.Message.getWrapperField(this,TronWebProto.Transaction.raw,1)},TronWebProto.Transaction.prototype.setRawData=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.Transaction.prototype.clearRawData=function(){return this.setRawData(void 0)},TronWebProto.Transaction.prototype.hasRawData=function(){return null!=n.Message.getField(this,1)},TronWebProto.Transaction.prototype.getSignatureList=function(){return n.Message.getRepeatedField(this,2)},TronWebProto.Transaction.prototype.getSignatureList_asB64=function(){return n.Message.bytesListAsB64(this.getSignatureList())},TronWebProto.Transaction.prototype.getSignatureList_asU8=function(){return n.Message.bytesListAsU8(this.getSignatureList())},TronWebProto.Transaction.prototype.setSignatureList=function(e){return n.Message.setField(this,2,e||[])},TronWebProto.Transaction.prototype.addSignature=function(e,t){return n.Message.addToRepeatedField(this,2,e,t)},TronWebProto.Transaction.prototype.clearSignatureList=function(){return this.setSignatureList([])},TronWebProto.Transaction.prototype.getRetList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Transaction.Result,5)},TronWebProto.Transaction.prototype.setRetList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.Transaction.prototype.addRet=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.Transaction.Result,t)},TronWebProto.Transaction.prototype.clearRetList=function(){return this.setRetList([])},TronWebProto.AccountType={NORMAL:0,ASSETISSUE:1,CONTRACT:2},o.object.extend(t,TronWebProto)},4865:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;t.default=function(e,t){return-1!==e.indexOf(t)};e.exports=t.default,e.exports.default=t.default},4955:(e,t,r)=>{const n=r(5441);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},5030:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,o.default)(e);var t=e.split(\",\");if(t.length<2)return!1;var r=t.shift().trim().split(\";\"),n=r.shift();if(\"data:\"!==n.slice(0,5))return!1;var c=n.slice(5);if(\"\"!==c&&!s.test(c))return!1;for(var u=0;u<r.length;u++)if((u!==r.length-1||\"base64\"!==r[u].toLowerCase())&&!a.test(r[u]))return!1;for(var l=0;l<t.length;l++)if(!i.test(t[l]))return!1;return!0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[a-z]+\\/[a-z0-9\\-\\+\\._]+$/i,a=/^[a-z\\-]+=[a-z0-9\\-]+$/i,i=/^[a-z0-9!\\$&'\\(\\)\\*\\+,;=\\-\\._~:@\\/\\?%\\s]*$/i;e.exports=t.default,e.exports.default=t.default},5071:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),e=Date.parse(e),isNaN(e)?null:new Date(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},5098:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function e(t,r){(0,o.default)(t);var n=String((null==r?void 0:r.version)||r);if(!(null!=r&&r.version||r))return e(t,{version:10})||e(t,{version:13});var c=t.replace(/[\\s-]+/g,\"\"),u=0;if(\"10\"===n){if(!s.test(c))return!1;for(var l=0;l<n-1;l++)u+=(l+1)*c.charAt(l);if(\"X\"===c.charAt(9)?u+=100:u+=10*c.charAt(9),u%11==0)return!0}else if(\"13\"===n){if(!a.test(c))return!1;for(var d=0;d<12;d++)u+=i[d%2]*c.charAt(d);if(c.charAt(12)-(10-u%10)%10==0)return!0}return!1};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(?:[0-9]{9}X|[0-9]{10})$/,a=/^(?:[0-9]{13})$/,i=[1,3];e.exports=t.default,e.exports.default=t.default},5226:(e,t,r)=>{var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();o.exportSymbol(\"TronWebProto.ExchangeCreateContract\",null,s),o.exportSymbol(\"TronWebProto.ExchangeInjectContract\",null,s),o.exportSymbol(\"TronWebProto.ExchangeTransactionContract\",null,s),o.exportSymbol(\"TronWebProto.ExchangeWithdrawContract\",null,s),TronWebProto.ExchangeCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeCreateContract.displayName=\"TronWebProto.ExchangeCreateContract\"),TronWebProto.ExchangeInjectContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeInjectContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeInjectContract.displayName=\"TronWebProto.ExchangeInjectContract\"),TronWebProto.ExchangeWithdrawContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeWithdrawContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeWithdrawContract.displayName=\"TronWebProto.ExchangeWithdrawContract\"),TronWebProto.ExchangeTransactionContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeTransactionContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeTransactionContract.displayName=\"TronWebProto.ExchangeTransactionContract\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeCreateContract.prototype.toObject=function(e){return TronWebProto.ExchangeCreateContract.toObject(e,this)},TronWebProto.ExchangeCreateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),firstTokenId:t.getFirstTokenId_asB64(),firstTokenBalance:n.Message.getFieldWithDefault(t,3,0),secondTokenId:t.getSecondTokenId_asB64(),secondTokenBalance:n.Message.getFieldWithDefault(t,5,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeCreateContract;return TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setFirstTokenId(r);break;case 3:r=t.readInt64();e.setFirstTokenBalance(r);break;case 4:r=t.readBytes();e.setSecondTokenId(r);break;case 5:r=t.readInt64();e.setSecondTokenBalance(r);break;default:t.skipField()}}return e},TronWebProto.ExchangeCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getFirstTokenId_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getFirstTokenBalance())&&t.writeInt64(3,r),(r=e.getSecondTokenId_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getSecondTokenBalance())&&t.writeInt64(5,r)},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asB64=function(){return n.Message.bytesAsB64(this.getFirstTokenId())},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asU8=function(){return n.Message.bytesAsU8(this.getFirstTokenId())},TronWebProto.ExchangeCreateContract.prototype.setFirstTokenId=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenBalance=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.ExchangeCreateContract.prototype.setFirstTokenBalance=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asB64=function(){return n.Message.bytesAsB64(this.getSecondTokenId())},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asU8=function(){return n.Message.bytesAsU8(this.getSecondTokenId())},TronWebProto.ExchangeCreateContract.prototype.setSecondTokenId=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenBalance=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.ExchangeCreateContract.prototype.setSecondTokenBalance=function(e){return n.Message.setProto3IntField(this,5,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeInjectContract.prototype.toObject=function(e){return TronWebProto.ExchangeInjectContract.toObject(e,this)},TronWebProto.ExchangeInjectContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),exchangeId:n.Message.getFieldWithDefault(t,2,0),tokenId:t.getTokenId_asB64(),quant:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeInjectContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeInjectContract;return TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setExchangeId(r);break;case 3:r=t.readBytes();e.setTokenId(r);break;case 4:r=t.readInt64();e.setQuant(r);break;default:t.skipField()}}return e},TronWebProto.ExchangeInjectContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeInjectContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeInjectContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getExchangeId())&&t.writeInt64(2,r),(r=e.getTokenId_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getQuant())&&t.writeInt64(4,r)},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeInjectContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeInjectContract.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeInjectContract.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeInjectContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.ExchangeInjectContract.prototype.getTokenId_asB64=function(){return n.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeInjectContract.prototype.getTokenId_asU8=function(){return n.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeInjectContract.prototype.setTokenId=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeInjectContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeInjectContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeWithdrawContract.prototype.toObject=function(e){return TronWebProto.ExchangeWithdrawContract.toObject(e,this)},TronWebProto.ExchangeWithdrawContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),exchangeId:n.Message.getFieldWithDefault(t,2,0),tokenId:t.getTokenId_asB64(),quant:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeWithdrawContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeWithdrawContract;return TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setExchangeId(r);break;case 3:r=t.readBytes();e.setTokenId(r);break;case 4:r=t.readInt64();e.setQuant(r);break;default:t.skipField()}}return e},TronWebProto.ExchangeWithdrawContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getExchangeId())&&t.writeInt64(2,r),(r=e.getTokenId_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getQuant())&&t.writeInt64(4,r)},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeWithdrawContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeWithdrawContract.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeWithdrawContract.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asB64=function(){return n.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asU8=function(){return n.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeWithdrawContract.prototype.setTokenId=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeWithdrawContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeWithdrawContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeTransactionContract.prototype.toObject=function(e){return TronWebProto.ExchangeTransactionContract.toObject(e,this)},TronWebProto.ExchangeTransactionContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),exchangeId:n.Message.getFieldWithDefault(t,2,0),tokenId:t.getTokenId_asB64(),quant:n.Message.getFieldWithDefault(t,4,0),expected:n.Message.getFieldWithDefault(t,5,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeTransactionContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeTransactionContract;return TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setExchangeId(r);break;case 3:r=t.readBytes();e.setTokenId(r);break;case 4:r=t.readInt64();e.setQuant(r);break;case 5:r=t.readInt64();e.setExpected(r);break;default:t.skipField()}}return e},TronWebProto.ExchangeTransactionContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getExchangeId())&&t.writeInt64(2,r),(r=e.getTokenId_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getQuant())&&t.writeInt64(4,r),0!==(r=e.getExpected())&&t.writeInt64(5,r)},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeTransactionContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeTransactionContract.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeTransactionContract.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeTransactionContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asB64=function(){return n.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asU8=function(){return n.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeTransactionContract.prototype.setTokenId=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeTransactionContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeTransactionContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.ExchangeTransactionContract.prototype.getExpected=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.ExchangeTransactionContract.prototype.setExpected=function(e){return n.Message.setProto3IntField(this,5,e)},o.object.extend(t,TronWebProto)},5250:function(e,t,r){var n;e=r.nmd(e),function(){var o,s=\"Expected a function\",a=\"__lodash_hash_undefined__\",i=\"__lodash_placeholder__\",c=16,u=32,l=64,d=128,f=256,p=1/0,h=9007199254740991,g=NaN,y=4294967295,m=[[\"ary\",d],[\"bind\",1],[\"bindKey\",2],[\"curry\",8],[\"curryRight\",c],[\"flip\",512],[\"partial\",u],[\"partialRight\",l],[\"rearg\",f]],b=\"[object Arguments]\",w=\"[object Array]\",T=\"[object Boolean]\",A=\"[object Date]\",v=\"[object Error]\",P=\"[object Function]\",E=\"[object GeneratorFunction]\",C=\"[object Map]\",B=\"[object Number]\",W=\"[object Object]\",S=\"[object Promise]\",I=\"[object RegExp]\",_=\"[object Set]\",R=\"[object String]\",x=\"[object Symbol]\",O=\"[object WeakMap]\",M=\"[object ArrayBuffer]\",F=\"[object DataView]\",k=\"[object Float32Array]\",N=\"[object Float64Array]\",U=\"[object Int8Array]\",D=\"[object Int16Array]\",L=\"[object Int32Array]\",$=\"[object Uint8Array]\",z=\"[object Uint8ClampedArray]\",j=\"[object Uint16Array]\",V=\"[object Uint32Array]\",G=/\\b__p \\+= '';/g,H=/\\b(__p \\+=) '' \\+/g,K=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>\"']/g,J=RegExp(q.source),Y=RegExp(Z.source),X=/<%-([\\s\\S]+?)%>/g,Q=/<%([\\s\\S]+?)%>/g,ee=/<%=([\\s\\S]+?)%>/g,te=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,re=/^\\w*$/,ne=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,oe=/[\\\\^$.*+?()[\\]{}|]/g,se=RegExp(oe.source),ae=/^\\s+/,ie=/\\s/,ce=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,ue=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,le=/,? & /,de=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,fe=/[()=,{}\\[\\]\\/\\s]/,pe=/\\\\(\\\\)?/g,he=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,ge=/\\w*$/,ye=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,be=/^\\[object .+?Constructor\\]$/,we=/^0o[0-7]+$/i,Te=/^(?:0|[1-9]\\d*)$/,Ae=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,ve=/($^)/,Pe=/['\\n\\r\\u2028\\u2029\\\\]/g,Ee=\"\\\\ud800-\\\\udfff\",Ce=\"\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\",Be=\"\\\\u2700-\\\\u27bf\",We=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",Se=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",Ie=\"\\\\ufe0e\\\\ufe0f\",_e=\"\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\",Re=\"['’]\",xe=\"[\"+Ee+\"]\",Oe=\"[\"+_e+\"]\",Me=\"[\"+Ce+\"]\",Fe=\"\\\\d+\",ke=\"[\"+Be+\"]\",Ne=\"[\"+We+\"]\",Ue=\"[^\"+Ee+_e+Fe+Be+We+Se+\"]\",De=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",Le=\"[^\"+Ee+\"]\",$e=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",ze=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",je=\"[\"+Se+\"]\",Ve=\"\\\\u200d\",Ge=\"(?:\"+Ne+\"|\"+Ue+\")\",He=\"(?:\"+je+\"|\"+Ue+\")\",Ke=\"(?:['’](?:d|ll|m|re|s|t|ve))?\",qe=\"(?:['’](?:D|LL|M|RE|S|T|VE))?\",Ze=\"(?:\"+Me+\"|\"+De+\")\"+\"?\",Je=\"[\"+Ie+\"]?\",Ye=Je+Ze+(\"(?:\"+Ve+\"(?:\"+[Le,$e,ze].join(\"|\")+\")\"+Je+Ze+\")*\"),Xe=\"(?:\"+[ke,$e,ze].join(\"|\")+\")\"+Ye,Qe=\"(?:\"+[Le+Me+\"?\",Me,$e,ze,xe].join(\"|\")+\")\",et=RegExp(Re,\"g\"),tt=RegExp(Me,\"g\"),rt=RegExp(De+\"(?=\"+De+\")|\"+Qe+Ye,\"g\"),nt=RegExp([je+\"?\"+Ne+\"+\"+Ke+\"(?=\"+[Oe,je,\"$\"].join(\"|\")+\")\",He+\"+\"+qe+\"(?=\"+[Oe,je+Ge,\"$\"].join(\"|\")+\")\",je+\"?\"+Ge+\"+\"+Ke,je+\"+\"+qe,\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",Fe,Xe].join(\"|\"),\"g\"),ot=RegExp(\"[\"+Ve+Ee+Ce+Ie+\"]\"),st=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=[\"Array\",\"Buffer\",\"DataView\",\"Date\",\"Error\",\"Float32Array\",\"Float64Array\",\"Function\",\"Int8Array\",\"Int16Array\",\"Int32Array\",\"Map\",\"Math\",\"Object\",\"Promise\",\"RegExp\",\"Set\",\"String\",\"Symbol\",\"TypeError\",\"Uint8Array\",\"Uint8ClampedArray\",\"Uint16Array\",\"Uint32Array\",\"WeakMap\",\"_\",\"clearTimeout\",\"isFinite\",\"parseInt\",\"setTimeout\"],it=-1,ct={};ct[k]=ct[N]=ct[U]=ct[D]=ct[L]=ct[$]=ct[z]=ct[j]=ct[V]=!0,ct[b]=ct[w]=ct[M]=ct[T]=ct[F]=ct[A]=ct[v]=ct[P]=ct[C]=ct[B]=ct[W]=ct[I]=ct[_]=ct[R]=ct[O]=!1;var ut={};ut[b]=ut[w]=ut[M]=ut[F]=ut[T]=ut[A]=ut[k]=ut[N]=ut[U]=ut[D]=ut[L]=ut[C]=ut[B]=ut[W]=ut[I]=ut[_]=ut[R]=ut[x]=ut[$]=ut[z]=ut[j]=ut[V]=!0,ut[v]=ut[P]=ut[O]=!1;var lt={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},dt=parseFloat,ft=parseInt,pt=\"object\"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ht=\"object\"==typeof self&&self&&self.Object===Object&&self,gt=pt||ht||Function(\"return this\")(),yt=t&&!t.nodeType&&t,mt=yt&&e&&!e.nodeType&&e,bt=mt&&mt.exports===yt,wt=bt&&pt.process,Tt=function(){try{var e=mt&&mt.require&&mt.require(\"util\").types;return e||wt&&wt.binding&&wt.binding(\"util\")}catch(e){}}(),At=Tt&&Tt.isArrayBuffer,vt=Tt&&Tt.isDate,Pt=Tt&&Tt.isMap,Et=Tt&&Tt.isRegExp,Ct=Tt&&Tt.isSet,Bt=Tt&&Tt.isTypedArray;function Wt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function St(e,t,r,n){for(var o=-1,s=null==e?0:e.length;++o<s;){var a=e[o];t(n,a,r(a),e)}return n}function It(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function _t(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Rt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function xt(e,t){for(var r=-1,n=null==e?0:e.length,o=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s}function Ot(e,t){return!!(null==e?0:e.length)&&jt(e,t,0)>-1}function Mt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function Ft(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function kt(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function Nt(e,t,r,n){var o=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r}function Ut(e,t,r,n){var o=null==e?0:e.length;for(n&&o&&(r=e[--o]);o--;)r=t(r,e[o],o,e);return r}function Dt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Lt=Kt(\"length\");function $t(e,t,r){var n;return r(e,function(e,r,o){if(t(e,r,o))return n=r,!1}),n}function zt(e,t,r,n){for(var o=e.length,s=r+(n?1:-1);n?s--:++s<o;)if(t(e[s],s,e))return s;return-1}function jt(e,t,r){return t==t?function(e,t,r){var n=r-1,o=e.length;for(;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):zt(e,Gt,r)}function Vt(e,t,r,n){for(var o=r-1,s=e.length;++o<s;)if(n(e[o],t))return o;return-1}function Gt(e){return e!=e}function Ht(e,t){var r=null==e?0:e.length;return r?Jt(e,t)/r:g}function Kt(e){return function(t){return null==t?o:t[e]}}function qt(e){return function(t){return null==e?o:e[t]}}function Zt(e,t,r,n,o){return o(e,function(e,o,s){r=n?(n=!1,e):t(r,e,o,s)}),r}function Jt(e,t){for(var r,n=-1,s=e.length;++n<s;){var a=t(e[n]);a!==o&&(r=r===o?a:r+a)}return r}function Yt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Xt(e){return e?e.slice(0,gr(e)+1).replace(ae,\"\"):e}function Qt(e){return function(t){return e(t)}}function er(e,t){return Ft(t,function(t){return e[t]})}function tr(e,t){return e.has(t)}function rr(e,t){for(var r=-1,n=e.length;++r<n&&jt(t,e[r],0)>-1;);return r}function nr(e,t){for(var r=e.length;r--&&jt(t,e[r],0)>-1;);return r}var or=qt({À:\"A\",Á:\"A\",Â:\"A\",Ã:\"A\",Ä:\"A\",Å:\"A\",à:\"a\",á:\"a\",â:\"a\",ã:\"a\",ä:\"a\",å:\"a\",Ç:\"C\",ç:\"c\",Ð:\"D\",ð:\"d\",È:\"E\",É:\"E\",Ê:\"E\",Ë:\"E\",è:\"e\",é:\"e\",ê:\"e\",ë:\"e\",Ì:\"I\",Í:\"I\",Î:\"I\",Ï:\"I\",ì:\"i\",í:\"i\",î:\"i\",ï:\"i\",Ñ:\"N\",ñ:\"n\",Ò:\"O\",Ó:\"O\",Ô:\"O\",Õ:\"O\",Ö:\"O\",Ø:\"O\",ò:\"o\",ó:\"o\",ô:\"o\",õ:\"o\",ö:\"o\",ø:\"o\",Ù:\"U\",Ú:\"U\",Û:\"U\",Ü:\"U\",ù:\"u\",ú:\"u\",û:\"u\",ü:\"u\",Ý:\"Y\",ý:\"y\",ÿ:\"y\",Æ:\"Ae\",æ:\"ae\",Þ:\"Th\",þ:\"th\",ß:\"ss\",Ā:\"A\",Ă:\"A\",Ą:\"A\",ā:\"a\",ă:\"a\",ą:\"a\",Ć:\"C\",Ĉ:\"C\",Ċ:\"C\",Č:\"C\",ć:\"c\",ĉ:\"c\",ċ:\"c\",č:\"c\",Ď:\"D\",Đ:\"D\",ď:\"d\",đ:\"d\",Ē:\"E\",Ĕ:\"E\",Ė:\"E\",Ę:\"E\",Ě:\"E\",ē:\"e\",ĕ:\"e\",ė:\"e\",ę:\"e\",ě:\"e\",Ĝ:\"G\",Ğ:\"G\",Ġ:\"G\",Ģ:\"G\",ĝ:\"g\",ğ:\"g\",ġ:\"g\",ģ:\"g\",Ĥ:\"H\",Ħ:\"H\",ĥ:\"h\",ħ:\"h\",Ĩ:\"I\",Ī:\"I\",Ĭ:\"I\",Į:\"I\",İ:\"I\",ĩ:\"i\",ī:\"i\",ĭ:\"i\",į:\"i\",ı:\"i\",Ĵ:\"J\",ĵ:\"j\",Ķ:\"K\",ķ:\"k\",ĸ:\"k\",Ĺ:\"L\",Ļ:\"L\",Ľ:\"L\",Ŀ:\"L\",Ł:\"L\",ĺ:\"l\",ļ:\"l\",ľ:\"l\",ŀ:\"l\",ł:\"l\",Ń:\"N\",Ņ:\"N\",Ň:\"N\",Ŋ:\"N\",ń:\"n\",ņ:\"n\",ň:\"n\",ŋ:\"n\",Ō:\"O\",Ŏ:\"O\",Ő:\"O\",ō:\"o\",ŏ:\"o\",ő:\"o\",Ŕ:\"R\",Ŗ:\"R\",Ř:\"R\",ŕ:\"r\",ŗ:\"r\",ř:\"r\",Ś:\"S\",Ŝ:\"S\",Ş:\"S\",Š:\"S\",ś:\"s\",ŝ:\"s\",ş:\"s\",š:\"s\",Ţ:\"T\",Ť:\"T\",Ŧ:\"T\",ţ:\"t\",ť:\"t\",ŧ:\"t\",Ũ:\"U\",Ū:\"U\",Ŭ:\"U\",Ů:\"U\",Ű:\"U\",Ų:\"U\",ũ:\"u\",ū:\"u\",ŭ:\"u\",ů:\"u\",ű:\"u\",ų:\"u\",Ŵ:\"W\",ŵ:\"w\",Ŷ:\"Y\",ŷ:\"y\",Ÿ:\"Y\",Ź:\"Z\",Ż:\"Z\",Ž:\"Z\",ź:\"z\",ż:\"z\",ž:\"z\",Ĳ:\"IJ\",ĳ:\"ij\",Œ:\"Oe\",œ:\"oe\",ŉ:\"'n\",ſ:\"s\"}),sr=qt({\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#39;\"});function ar(e){return\"\\\\\"+lt[e]}function ir(e){return ot.test(e)}function cr(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function ur(e,t){return function(r){return e(t(r))}}function lr(e,t){for(var r=-1,n=e.length,o=0,s=[];++r<n;){var a=e[r];a!==t&&a!==i||(e[r]=i,s[o++]=r)}return s}function dr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function fr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=[e,e]}),r}function pr(e){return ir(e)?function(e){var t=rt.lastIndex=0;for(;rt.test(e);)++t;return t}(e):Lt(e)}function hr(e){return ir(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.split(\"\")}(e)}function gr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var yr=qt({\"&amp;\":\"&\",\"&lt;\":\"<\",\"&gt;\":\">\",\"&quot;\":'\"',\"&#39;\":\"'\"});var mr=function e(t){var r,n=(t=null==t?gt:mr.defaults(gt.Object(),t,mr.pick(gt,at))).Array,ie=t.Date,Ee=t.Error,Ce=t.Function,Be=t.Math,We=t.Object,Se=t.RegExp,Ie=t.String,_e=t.TypeError,Re=n.prototype,xe=Ce.prototype,Oe=We.prototype,Me=t[\"__core-js_shared__\"],Fe=xe.toString,ke=Oe.hasOwnProperty,Ne=0,Ue=(r=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+r:\"\",De=Oe.toString,Le=Fe.call(We),$e=gt._,ze=Se(\"^\"+Fe.call(ke).replace(oe,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),je=bt?t.Buffer:o,Ve=t.Symbol,Ge=t.Uint8Array,He=je?je.allocUnsafe:o,Ke=ur(We.getPrototypeOf,We),qe=We.create,Ze=Oe.propertyIsEnumerable,Je=Re.splice,Ye=Ve?Ve.isConcatSpreadable:o,Xe=Ve?Ve.iterator:o,Qe=Ve?Ve.toStringTag:o,rt=function(){try{var e=ps(We,\"defineProperty\");return e({},\"\",{}),e}catch(e){}}(),ot=t.clearTimeout!==gt.clearTimeout&&t.clearTimeout,lt=ie&&ie.now!==gt.Date.now&&ie.now,pt=t.setTimeout!==gt.setTimeout&&t.setTimeout,ht=Be.ceil,yt=Be.floor,mt=We.getOwnPropertySymbols,wt=je?je.isBuffer:o,Tt=t.isFinite,Lt=Re.join,qt=ur(We.keys,We),br=Be.max,wr=Be.min,Tr=ie.now,Ar=t.parseInt,vr=Be.random,Pr=Re.reverse,Er=ps(t,\"DataView\"),Cr=ps(t,\"Map\"),Br=ps(t,\"Promise\"),Wr=ps(t,\"Set\"),Sr=ps(t,\"WeakMap\"),Ir=ps(We,\"create\"),_r=Sr&&new Sr,Rr={},xr=Ds(Er),Or=Ds(Cr),Mr=Ds(Br),Fr=Ds(Wr),kr=Ds(Sr),Nr=Ve?Ve.prototype:o,Ur=Nr?Nr.valueOf:o,Dr=Nr?Nr.toString:o;function Lr(e){if(ri(e)&&!Ga(e)&&!(e instanceof Vr)){if(e instanceof jr)return e;if(ke.call(e,\"__wrapped__\"))return Ls(e)}return new jr(e)}var $r=function(){function e(){}return function(t){if(!ti(t))return{};if(qe)return qe(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function zr(){}function jr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=y,this.__views__=[]}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Kr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function qr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Kr;++t<r;)this.add(e[t])}function Zr(e){var t=this.__data__=new Hr(e);this.size=t.size}function Jr(e,t){var r=Ga(e),n=!r&&Va(e),o=!r&&!n&&Za(e),s=!r&&!n&&!o&&li(e),a=r||n||o||s,i=a?Yt(e.length,Ie):[],c=i.length;for(var u in e)!t&&!ke.call(e,u)||a&&(\"length\"==u||o&&(\"offset\"==u||\"parent\"==u)||s&&(\"buffer\"==u||\"byteLength\"==u||\"byteOffset\"==u)||Ts(u,c))||i.push(u);return i}function Yr(e){var t=e.length;return t?e[Zn(0,t-1)]:o}function Xr(e,t){return ks(Ro(e),cn(t,0,e.length))}function Qr(e){return ks(Ro(e))}function en(e,t,r){(r!==o&&!$a(e[t],r)||r===o&&!(t in e))&&sn(e,t,r)}function tn(e,t,r){var n=e[t];ke.call(e,t)&&$a(n,r)&&(r!==o||t in e)||sn(e,t,r)}function rn(e,t){for(var r=e.length;r--;)if($a(e[r][0],t))return r;return-1}function nn(e,t,r,n){return pn(e,function(e,o,s){t(n,e,r(e),s)}),n}function on(e,t){return e&&xo(t,xi(t),e)}function sn(e,t,r){\"__proto__\"==t&&rt?rt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function an(e,t){for(var r=-1,s=t.length,a=n(s),i=null==e;++r<s;)a[r]=i?o:Wi(e,t[r]);return a}function cn(e,t,r){return e==e&&(r!==o&&(e=e<=r?e:r),t!==o&&(e=e>=t?e:t)),e}function un(e,t,r,n,s,a){var i,c=1&t,u=2&t,l=4&t;if(r&&(i=s?r(e,n,s,a):r(e)),i!==o)return i;if(!ti(e))return e;var d=Ga(e);if(d){if(i=function(e){var t=e.length,r=new e.constructor(t);t&&\"string\"==typeof e[0]&&ke.call(e,\"index\")&&(r.index=e.index,r.input=e.input);return r}(e),!c)return Ro(e,i)}else{var f=ys(e),p=f==P||f==E;if(Za(e))return Co(e,c);if(f==W||f==b||p&&!s){if(i=u||p?{}:bs(e),!c)return u?function(e,t){return xo(e,gs(e),t)}(e,function(e,t){return e&&xo(t,Oi(t),e)}(i,e)):function(e,t){return xo(e,hs(e),t)}(e,on(i,e))}else{if(!ut[f])return s?e:{};i=function(e,t,r){var n=e.constructor;switch(t){case M:return Bo(e);case T:case A:return new n(+e);case F:return function(e,t){var r=t?Bo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case k:case N:case U:case D:case L:case $:case z:case j:case V:return Wo(e,r);case C:return new n;case B:case R:return new n(e);case I:return function(e){var t=new e.constructor(e.source,ge.exec(e));return t.lastIndex=e.lastIndex,t}(e);case _:return new n;case x:return o=e,Ur?We(Ur.call(o)):{}}var o}(e,f,c)}}a||(a=new Zr);var h=a.get(e);if(h)return h;a.set(e,i),ii(e)?e.forEach(function(n){i.add(un(n,t,r,n,e,a))}):ni(e)&&e.forEach(function(n,o){i.set(o,un(n,t,r,o,e,a))});var g=d?o:(l?u?as:ss:u?Oi:xi)(e);return It(g||e,function(n,o){g&&(n=e[o=n]),tn(i,o,un(n,t,r,o,e,a))}),i}function ln(e,t,r){var n=r.length;if(null==e)return!n;for(e=We(e);n--;){var s=r[n],a=t[s],i=e[s];if(i===o&&!(s in e)||!a(i))return!1}return!0}function dn(e,t,r){if(\"function\"!=typeof e)throw new _e(s);return xs(function(){e.apply(o,r)},t)}function fn(e,t,r,n){var o=-1,s=Ot,a=!0,i=e.length,c=[],u=t.length;if(!i)return c;r&&(t=Ft(t,Qt(r))),n?(s=Mt,a=!1):t.length>=200&&(s=tr,a=!1,t=new qr(t));e:for(;++o<i;){var l=e[o],d=null==r?l:r(l);if(l=n||0!==l?l:0,a&&d==d){for(var f=u;f--;)if(t[f]===d)continue e;c.push(l)}else s(t,d,n)||c.push(l)}return c}Lr.templateSettings={escape:X,evaluate:Q,interpolate:ee,variable:\"\",imports:{_:Lr}},Lr.prototype=zr.prototype,Lr.prototype.constructor=Lr,jr.prototype=$r(zr.prototype),jr.prototype.constructor=jr,Vr.prototype=$r(zr.prototype),Vr.prototype.constructor=Vr,Gr.prototype.clear=function(){this.__data__=Ir?Ir(null):{},this.size=0},Gr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Gr.prototype.get=function(e){var t=this.__data__;if(Ir){var r=t[e];return r===a?o:r}return ke.call(t,e)?t[e]:o},Gr.prototype.has=function(e){var t=this.__data__;return Ir?t[e]!==o:ke.call(t,e)},Gr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ir&&t===o?a:t,this},Hr.prototype.clear=function(){this.__data__=[],this.size=0},Hr.prototype.delete=function(e){var t=this.__data__,r=rn(t,e);return!(r<0)&&(r==t.length-1?t.pop():Je.call(t,r,1),--this.size,!0)},Hr.prototype.get=function(e){var t=this.__data__,r=rn(t,e);return r<0?o:t[r][1]},Hr.prototype.has=function(e){return rn(this.__data__,e)>-1},Hr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Kr.prototype.clear=function(){this.size=0,this.__data__={hash:new Gr,map:new(Cr||Hr),string:new Gr}},Kr.prototype.delete=function(e){var t=ds(this,e).delete(e);return this.size-=t?1:0,t},Kr.prototype.get=function(e){return ds(this,e).get(e)},Kr.prototype.has=function(e){return ds(this,e).has(e)},Kr.prototype.set=function(e,t){var r=ds(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},qr.prototype.add=qr.prototype.push=function(e){return this.__data__.set(e,a),this},qr.prototype.has=function(e){return this.__data__.has(e)},Zr.prototype.clear=function(){this.__data__=new Hr,this.size=0},Zr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Zr.prototype.get=function(e){return this.__data__.get(e)},Zr.prototype.has=function(e){return this.__data__.has(e)},Zr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Hr){var n=r.__data__;if(!Cr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Kr(n)}return r.set(e,t),this.size=r.size,this};var pn=Fo(An),hn=Fo(vn,!0);function gn(e,t){var r=!0;return pn(e,function(e,n,o){return r=!!t(e,n,o)}),r}function yn(e,t,r){for(var n=-1,s=e.length;++n<s;){var a=e[n],i=t(a);if(null!=i&&(c===o?i==i&&!ui(i):r(i,c)))var c=i,u=a}return u}function mn(e,t){var r=[];return pn(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function bn(e,t,r,n,o){var s=-1,a=e.length;for(r||(r=ws),o||(o=[]);++s<a;){var i=e[s];t>0&&r(i)?t>1?bn(i,t-1,r,n,o):kt(o,i):n||(o[o.length]=i)}return o}var wn=ko(),Tn=ko(!0);function An(e,t){return e&&wn(e,t,xi)}function vn(e,t){return e&&Tn(e,t,xi)}function Pn(e,t){return xt(t,function(t){return Xa(e[t])})}function En(e,t){for(var r=0,n=(t=Ao(t,e)).length;null!=e&&r<n;)e=e[Us(t[r++])];return r&&r==n?e:o}function Cn(e,t,r){var n=t(e);return Ga(e)?n:kt(n,r(e))}function Bn(e){return null==e?e===o?\"[object Undefined]\":\"[object Null]\":Qe&&Qe in We(e)?function(e){var t=ke.call(e,Qe),r=e[Qe];try{e[Qe]=o;var n=!0}catch(e){}var s=De.call(e);n&&(t?e[Qe]=r:delete e[Qe]);return s}(e):function(e){return De.call(e)}(e)}function Wn(e,t){return e>t}function Sn(e,t){return null!=e&&ke.call(e,t)}function In(e,t){return null!=e&&t in We(e)}function _n(e,t,r){for(var s=r?Mt:Ot,a=e[0].length,i=e.length,c=i,u=n(i),l=1/0,d=[];c--;){var f=e[c];c&&t&&(f=Ft(f,Qt(t))),l=wr(f.length,l),u[c]=!r&&(t||a>=120&&f.length>=120)?new qr(c&&f):o}f=e[0];var p=-1,h=u[0];e:for(;++p<a&&d.length<l;){var g=f[p],y=t?t(g):g;if(g=r||0!==g?g:0,!(h?tr(h,y):s(d,y,r))){for(c=i;--c;){var m=u[c];if(!(m?tr(m,y):s(e[c],y,r)))continue e}h&&h.push(y),d.push(g)}}return d}function Rn(e,t,r){var n=null==(e=Is(e,t=Ao(t,e)))?e:e[Us(Ys(t))];return null==n?o:Wt(n,e,r)}function xn(e){return ri(e)&&Bn(e)==b}function On(e,t,r,n,s){return e===t||(null==e||null==t||!ri(e)&&!ri(t)?e!=e&&t!=t:function(e,t,r,n,s,a){var i=Ga(e),c=Ga(t),u=i?w:ys(e),l=c?w:ys(t),d=(u=u==b?W:u)==W,f=(l=l==b?W:l)==W,p=u==l;if(p&&Za(e)){if(!Za(t))return!1;i=!0,d=!1}if(p&&!d)return a||(a=new Zr),i||li(e)?ns(e,t,r,n,s,a):function(e,t,r,n,o,s,a){switch(r){case F:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!s(new Ge(e),new Ge(t)));case T:case A:case B:return $a(+e,+t);case v:return e.name==t.name&&e.message==t.message;case I:case R:return e==t+\"\";case C:var i=cr;case _:var c=1&n;if(i||(i=dr),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var l=ns(i(e),i(t),n,o,s,a);return a.delete(e),l;case x:if(Ur)return Ur.call(e)==Ur.call(t)}return!1}(e,t,u,r,n,s,a);if(!(1&r)){var h=d&&ke.call(e,\"__wrapped__\"),g=f&&ke.call(t,\"__wrapped__\");if(h||g){var y=h?e.value():e,m=g?t.value():t;return a||(a=new Zr),s(y,m,r,n,a)}}if(!p)return!1;return a||(a=new Zr),function(e,t,r,n,s,a){var i=1&r,c=ss(e),u=c.length,l=ss(t),d=l.length;if(u!=d&&!i)return!1;var f=u;for(;f--;){var p=c[f];if(!(i?p in t:ke.call(t,p)))return!1}var h=a.get(e),g=a.get(t);if(h&&g)return h==t&&g==e;var y=!0;a.set(e,t),a.set(t,e);var m=i;for(;++f<u;){var b=e[p=c[f]],w=t[p];if(n)var T=i?n(w,b,p,t,e,a):n(b,w,p,e,t,a);if(!(T===o?b===w||s(b,w,r,n,a):T)){y=!1;break}m||(m=\"constructor\"==p)}if(y&&!m){var A=e.constructor,v=t.constructor;A==v||!(\"constructor\"in e)||!(\"constructor\"in t)||\"function\"==typeof A&&A instanceof A&&\"function\"==typeof v&&v instanceof v||(y=!1)}return a.delete(e),a.delete(t),y}(e,t,r,n,s,a)}(e,t,r,n,On,s))}function Mn(e,t,r,n){var s=r.length,a=s,i=!n;if(null==e)return!a;for(e=We(e);s--;){var c=r[s];if(i&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<a;){var u=(c=r[s])[0],l=e[u],d=c[1];if(i&&c[2]){if(l===o&&!(u in e))return!1}else{var f=new Zr;if(n)var p=n(l,d,u,e,t,f);if(!(p===o?On(d,l,3,n,f):p))return!1}}return!0}function Fn(e){return!(!ti(e)||(t=e,Ue&&Ue in t))&&(Xa(e)?ze:be).test(Ds(e));var t}function kn(e){return\"function\"==typeof e?e:null==e?oc:\"object\"==typeof e?Ga(e)?zn(e[0],e[1]):$n(e):pc(e)}function Nn(e){if(!Cs(e))return qt(e);var t=[];for(var r in We(e))ke.call(e,r)&&\"constructor\"!=r&&t.push(r);return t}function Un(e){if(!ti(e))return function(e){var t=[];if(null!=e)for(var r in We(e))t.push(r);return t}(e);var t=Cs(e),r=[];for(var n in e)(\"constructor\"!=n||!t&&ke.call(e,n))&&r.push(n);return r}function Dn(e,t){return e<t}function Ln(e,t){var r=-1,o=Ka(e)?n(e.length):[];return pn(e,function(e,n,s){o[++r]=t(e,n,s)}),o}function $n(e){var t=fs(e);return 1==t.length&&t[0][2]?Ws(t[0][0],t[0][1]):function(r){return r===e||Mn(r,e,t)}}function zn(e,t){return vs(e)&&Bs(t)?Ws(Us(e),t):function(r){var n=Wi(r,e);return n===o&&n===t?Si(r,e):On(t,n,3)}}function jn(e,t,r,n,s){e!==t&&wn(t,function(a,i){if(s||(s=new Zr),ti(a))!function(e,t,r,n,s,a,i){var c=_s(e,r),u=_s(t,r),l=i.get(u);if(l)return void en(e,r,l);var d=a?a(c,u,r+\"\",e,t,i):o,f=d===o;if(f){var p=Ga(u),h=!p&&Za(u),g=!p&&!h&&li(u);d=u,p||h||g?Ga(c)?d=c:qa(c)?d=Ro(c):h?(f=!1,d=Co(u,!0)):g?(f=!1,d=Wo(u,!0)):d=[]:si(u)||Va(u)?(d=c,Va(c)?d=bi(c):ti(c)&&!Xa(c)||(d=bs(u))):f=!1}f&&(i.set(u,d),s(d,u,n,a,i),i.delete(u));en(e,r,d)}(e,t,i,r,jn,n,s);else{var c=n?n(_s(e,i),a,i+\"\",e,t,s):o;c===o&&(c=a),en(e,i,c)}},Oi)}function Vn(e,t){var r=e.length;if(r)return Ts(t+=t<0?r:0,r)?e[t]:o}function Gn(e,t,r){t=t.length?Ft(t,function(e){return Ga(e)?function(t){return En(t,1===e.length?e[0]:e)}:e}):[oc];var n=-1;t=Ft(t,Qt(ls()));var o=Ln(e,function(e,r,o){var s=Ft(t,function(t){return t(e)});return{criteria:s,index:++n,value:e}});return function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(o,function(e,t){return function(e,t,r){var n=-1,o=e.criteria,s=t.criteria,a=o.length,i=r.length;for(;++n<a;){var c=So(o[n],s[n]);if(c)return n>=i?c:c*(\"desc\"==r[n]?-1:1)}return e.index-t.index}(e,t,r)})}function Hn(e,t,r){for(var n=-1,o=t.length,s={};++n<o;){var a=t[n],i=En(e,a);r(i,a)&&eo(s,Ao(a,e),i)}return s}function Kn(e,t,r,n){var o=n?Vt:jt,s=-1,a=t.length,i=e;for(e===t&&(t=Ro(t)),r&&(i=Ft(e,Qt(r)));++s<a;)for(var c=0,u=t[s],l=r?r(u):u;(c=o(i,l,c,n))>-1;)i!==e&&Je.call(i,c,1),Je.call(e,c,1);return e}function qn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==s){var s=o;Ts(o)?Je.call(e,o,1):po(e,o)}}return e}function Zn(e,t){return e+yt(vr()*(t-e+1))}function Jn(e,t){var r=\"\";if(!e||t<1||t>h)return r;do{t%2&&(r+=e),(t=yt(t/2))&&(e+=e)}while(t);return r}function Yn(e,t){return Os(Ss(e,t,oc),e+\"\")}function Xn(e){return Yr($i(e))}function Qn(e,t){var r=$i(e);return ks(r,cn(t,0,r.length))}function eo(e,t,r,n){if(!ti(e))return e;for(var s=-1,a=(t=Ao(t,e)).length,i=a-1,c=e;null!=c&&++s<a;){var u=Us(t[s]),l=r;if(\"__proto__\"===u||\"constructor\"===u||\"prototype\"===u)return e;if(s!=i){var d=c[u];(l=n?n(d,u,c):o)===o&&(l=ti(d)?d:Ts(t[s+1])?[]:{})}tn(c,u,l),c=c[u]}return e}var to=_r?function(e,t){return _r.set(e,t),e}:oc,ro=rt?function(e,t){return rt(e,\"toString\",{configurable:!0,enumerable:!1,value:tc(t),writable:!0})}:oc;function no(e){return ks($i(e))}function oo(e,t,r){var o=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(r=r>s?s:r)<0&&(r+=s),s=t>r?0:r-t>>>0,t>>>=0;for(var a=n(s);++o<s;)a[o]=e[o+t];return a}function so(e,t){var r;return pn(e,function(e,n,o){return!(r=t(e,n,o))}),!!r}function ao(e,t,r){var n=0,o=null==e?n:e.length;if(\"number\"==typeof t&&t==t&&o<=2147483647){for(;n<o;){var s=n+o>>>1,a=e[s];null!==a&&!ui(a)&&(r?a<=t:a<t)?n=s+1:o=s}return o}return io(e,t,oc,r)}function io(e,t,r,n){var s=0,a=null==e?0:e.length;if(0===a)return 0;for(var i=(t=r(t))!=t,c=null===t,u=ui(t),l=t===o;s<a;){var d=yt((s+a)/2),f=r(e[d]),p=f!==o,h=null===f,g=f==f,y=ui(f);if(i)var m=n||g;else m=l?g&&(n||p):c?g&&p&&(n||!h):u?g&&p&&!h&&(n||!y):!h&&!y&&(n?f<=t:f<t);m?s=d+1:a=d}return wr(a,4294967294)}function co(e,t){for(var r=-1,n=e.length,o=0,s=[];++r<n;){var a=e[r],i=t?t(a):a;if(!r||!$a(i,c)){var c=i;s[o++]=0===a?0:a}}return s}function uo(e){return\"number\"==typeof e?e:ui(e)?g:+e}function lo(e){if(\"string\"==typeof e)return e;if(Ga(e))return Ft(e,lo)+\"\";if(ui(e))return Dr?Dr.call(e):\"\";var t=e+\"\";return\"0\"==t&&1/e==-1/0?\"-0\":t}function fo(e,t,r){var n=-1,o=Ot,s=e.length,a=!0,i=[],c=i;if(r)a=!1,o=Mt;else if(s>=200){var u=t?null:Yo(e);if(u)return dr(u);a=!1,o=tr,c=new qr}else c=t?[]:i;e:for(;++n<s;){var l=e[n],d=t?t(l):l;if(l=r||0!==l?l:0,a&&d==d){for(var f=c.length;f--;)if(c[f]===d)continue e;t&&c.push(d),i.push(l)}else o(c,d,r)||(c!==i&&c.push(d),i.push(l))}return i}function po(e,t){return null==(e=Is(e,t=Ao(t,e)))||delete e[Us(Ys(t))]}function ho(e,t,r,n){return eo(e,t,r(En(e,t)),n)}function go(e,t,r,n){for(var o=e.length,s=n?o:-1;(n?s--:++s<o)&&t(e[s],s,e););return r?oo(e,n?0:s,n?s+1:o):oo(e,n?s+1:0,n?o:s)}function yo(e,t){var r=e;return r instanceof Vr&&(r=r.value()),Nt(t,function(e,t){return t.func.apply(t.thisArg,kt([e],t.args))},r)}function mo(e,t,r){var o=e.length;if(o<2)return o?fo(e[0]):[];for(var s=-1,a=n(o);++s<o;)for(var i=e[s],c=-1;++c<o;)c!=s&&(a[s]=fn(a[s]||i,e[c],t,r));return fo(bn(a,1),t,r)}function bo(e,t,r){for(var n=-1,s=e.length,a=t.length,i={};++n<s;){var c=n<a?t[n]:o;r(i,e[n],c)}return i}function wo(e){return qa(e)?e:[]}function To(e){return\"function\"==typeof e?e:oc}function Ao(e,t){return Ga(e)?e:vs(e,t)?[e]:Ns(wi(e))}var vo=Yn;function Po(e,t,r){var n=e.length;return r=r===o?n:r,!t&&r>=n?e:oo(e,t,r)}var Eo=ot||function(e){return gt.clearTimeout(e)};function Co(e,t){if(t)return e.slice();var r=e.length,n=He?He(r):new e.constructor(r);return e.copy(n),n}function Bo(e){var t=new e.constructor(e.byteLength);return new Ge(t).set(new Ge(e)),t}function Wo(e,t){var r=t?Bo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function So(e,t){if(e!==t){var r=e!==o,n=null===e,s=e==e,a=ui(e),i=t!==o,c=null===t,u=t==t,l=ui(t);if(!c&&!l&&!a&&e>t||a&&i&&u&&!c&&!l||n&&i&&u||!r&&u||!s)return 1;if(!n&&!a&&!l&&e<t||l&&r&&s&&!n&&!a||c&&r&&s||!i&&s||!u)return-1}return 0}function Io(e,t,r,o){for(var s=-1,a=e.length,i=r.length,c=-1,u=t.length,l=br(a-i,0),d=n(u+l),f=!o;++c<u;)d[c]=t[c];for(;++s<i;)(f||s<a)&&(d[r[s]]=e[s]);for(;l--;)d[c++]=e[s++];return d}function _o(e,t,r,o){for(var s=-1,a=e.length,i=-1,c=r.length,u=-1,l=t.length,d=br(a-c,0),f=n(d+l),p=!o;++s<d;)f[s]=e[s];for(var h=s;++u<l;)f[h+u]=t[u];for(;++i<c;)(p||s<a)&&(f[h+r[i]]=e[s++]);return f}function Ro(e,t){var r=-1,o=e.length;for(t||(t=n(o));++r<o;)t[r]=e[r];return t}function xo(e,t,r,n){var s=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var c=t[a],u=n?n(r[c],e[c],c,r,e):o;u===o&&(u=e[c]),s?sn(r,c,u):tn(r,c,u)}return r}function Oo(e,t){return function(r,n){var o=Ga(r)?St:nn,s=t?t():{};return o(r,e,ls(n,2),s)}}function Mo(e){return Yn(function(t,r){var n=-1,s=r.length,a=s>1?r[s-1]:o,i=s>2?r[2]:o;for(a=e.length>3&&\"function\"==typeof a?(s--,a):o,i&&As(r[0],r[1],i)&&(a=s<3?o:a,s=1),t=We(t);++n<s;){var c=r[n];c&&e(t,c,n,a)}return t})}function Fo(e,t){return function(r,n){if(null==r)return r;if(!Ka(r))return e(r,n);for(var o=r.length,s=t?o:-1,a=We(r);(t?s--:++s<o)&&!1!==n(a[s],s,a););return r}}function ko(e){return function(t,r,n){for(var o=-1,s=We(t),a=n(t),i=a.length;i--;){var c=a[e?i:++o];if(!1===r(s[c],c,s))break}return t}}function No(e){return function(t){var r=ir(t=wi(t))?hr(t):o,n=r?r[0]:t.charAt(0),s=r?Po(r,1).join(\"\"):t.slice(1);return n[e]()+s}}function Uo(e){return function(t){return Nt(Xi(Vi(t).replace(et,\"\")),e,\"\")}}function Do(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=$r(e.prototype),n=e.apply(r,t);return ti(n)?n:r}}function Lo(e){return function(t,r,n){var s=We(t);if(!Ka(t)){var a=ls(r,3);t=xi(t),r=function(e){return a(s[e],e,s)}}var i=e(t,r,n);return i>-1?s[a?t[i]:i]:o}}function $o(e){return os(function(t){var r=t.length,n=r,a=jr.prototype.thru;for(e&&t.reverse();n--;){var i=t[n];if(\"function\"!=typeof i)throw new _e(s);if(a&&!c&&\"wrapper\"==cs(i))var c=new jr([],!0)}for(n=c?n:r;++n<r;){var u=cs(i=t[n]),l=\"wrapper\"==u?is(i):o;c=l&&Ps(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[cs(l[0])].apply(c,l[3]):1==i.length&&Ps(i)?c[u]():c.thru(i)}return function(){var e=arguments,n=e[0];if(c&&1==e.length&&Ga(n))return c.plant(n).value();for(var o=0,s=r?t[o].apply(this,e):n;++o<r;)s=t[o].call(this,s);return s}})}function zo(e,t,r,s,a,i,c,u,l,f){var p=t&d,h=1&t,g=2&t,y=24&t,m=512&t,b=g?o:Do(e);return function d(){for(var w=arguments.length,T=n(w),A=w;A--;)T[A]=arguments[A];if(y)var v=us(d),P=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(T,v);if(s&&(T=Io(T,s,a,y)),i&&(T=_o(T,i,c,y)),w-=P,y&&w<f){var E=lr(T,v);return Zo(e,t,zo,d.placeholder,r,T,E,u,l,f-w)}var C=h?r:this,B=g?C[e]:e;return w=T.length,u?T=function(e,t){var r=e.length,n=wr(t.length,r),s=Ro(e);for(;n--;){var a=t[n];e[n]=Ts(a,r)?s[a]:o}return e}(T,u):m&&w>1&&T.reverse(),p&&l<w&&(T.length=l),this&&this!==gt&&this instanceof d&&(B=b||Do(B)),B.apply(C,T)}}function jo(e,t){return function(r,n){return function(e,t,r,n){return An(e,function(e,o,s){t(n,r(e),o,s)}),n}(r,e,t(n),{})}}function Vo(e,t){return function(r,n){var s;if(r===o&&n===o)return t;if(r!==o&&(s=r),n!==o){if(s===o)return n;\"string\"==typeof r||\"string\"==typeof n?(r=lo(r),n=lo(n)):(r=uo(r),n=uo(n)),s=e(r,n)}return s}}function Go(e){return os(function(t){return t=Ft(t,Qt(ls())),Yn(function(r){var n=this;return e(t,function(e){return Wt(e,n,r)})})})}function Ho(e,t){var r=(t=t===o?\" \":lo(t)).length;if(r<2)return r?Jn(t,e):t;var n=Jn(t,ht(e/pr(t)));return ir(t)?Po(hr(n),0,e).join(\"\"):n.slice(0,e)}function Ko(e){return function(t,r,s){return s&&\"number\"!=typeof s&&As(t,r,s)&&(r=s=o),t=hi(t),r===o?(r=t,t=0):r=hi(r),function(e,t,r,o){for(var s=-1,a=br(ht((t-e)/(r||1)),0),i=n(a);a--;)i[o?a:++s]=e,e+=r;return i}(t,r,s=s===o?t<r?1:-1:hi(s),e)}}function qo(e){return function(t,r){return\"string\"==typeof t&&\"string\"==typeof r||(t=mi(t),r=mi(r)),e(t,r)}}function Zo(e,t,r,n,s,a,i,c,d,f){var p=8&t;t|=p?u:l,4&(t&=~(p?l:u))||(t&=-4);var h=[e,t,s,p?a:o,p?i:o,p?o:a,p?o:i,c,d,f],g=r.apply(o,h);return Ps(e)&&Rs(g,h),g.placeholder=n,Ms(g,e,t)}function Jo(e){var t=Be[e];return function(e,r){if(e=mi(e),(r=null==r?0:wr(gi(r),292))&&Tt(e)){var n=(wi(e)+\"e\").split(\"e\");return+((n=(wi(t(n[0]+\"e\"+(+n[1]+r)))+\"e\").split(\"e\"))[0]+\"e\"+(+n[1]-r))}return t(e)}}var Yo=Wr&&1/dr(new Wr([,-0]))[1]==p?function(e){return new Wr(e)}:uc;function Xo(e){return function(t){var r=ys(t);return r==C?cr(t):r==_?fr(t):function(e,t){return Ft(t,function(t){return[t,e[t]]})}(t,e(t))}}function Qo(e,t,r,a,p,h,g,y){var m=2&t;if(!m&&\"function\"!=typeof e)throw new _e(s);var b=a?a.length:0;if(b||(t&=-97,a=p=o),g=g===o?g:br(gi(g),0),y=y===o?y:gi(y),b-=p?p.length:0,t&l){var w=a,T=p;a=p=o}var A=m?o:is(e),v=[e,t,r,a,p,w,T,h,g,y];if(A&&function(e,t){var r=e[1],n=t[1],o=r|n,s=o<131,a=n==d&&8==r||n==d&&r==f&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!s&&!a)return e;1&n&&(e[2]=t[2],o|=1&r?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?Io(u,c,t[4]):c,e[4]=u?lr(e[3],i):t[4]}(c=t[5])&&(u=e[5],e[5]=u?_o(u,c,t[6]):c,e[6]=u?lr(e[5],i):t[6]);(c=t[7])&&(e[7]=c);n&d&&(e[8]=null==e[8]?t[8]:wr(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(v,A),e=v[0],t=v[1],r=v[2],a=v[3],p=v[4],!(y=v[9]=v[9]===o?m?0:e.length:br(v[9]-b,0))&&24&t&&(t&=-25),t&&1!=t)P=8==t||t==c?function(e,t,r){var s=Do(e);return function a(){for(var i=arguments.length,c=n(i),u=i,l=us(a);u--;)c[u]=arguments[u];var d=i<3&&c[0]!==l&&c[i-1]!==l?[]:lr(c,l);return(i-=d.length)<r?Zo(e,t,zo,a.placeholder,o,c,d,o,o,r-i):Wt(this&&this!==gt&&this instanceof a?s:e,this,c)}}(e,t,y):t!=u&&33!=t||p.length?zo.apply(o,v):function(e,t,r,o){var s=1&t,a=Do(e);return function t(){for(var i=-1,c=arguments.length,u=-1,l=o.length,d=n(l+c),f=this&&this!==gt&&this instanceof t?a:e;++u<l;)d[u]=o[u];for(;c--;)d[u++]=arguments[++i];return Wt(f,s?r:this,d)}}(e,t,r,a);else var P=function(e,t,r){var n=1&t,o=Do(e);return function t(){return(this&&this!==gt&&this instanceof t?o:e).apply(n?r:this,arguments)}}(e,t,r);return Ms((A?to:Rs)(P,v),e,t)}function es(e,t,r,n){return e===o||$a(e,Oe[r])&&!ke.call(n,r)?t:e}function ts(e,t,r,n,s,a){return ti(e)&&ti(t)&&(a.set(t,e),jn(e,t,o,ts,a),a.delete(t)),e}function rs(e){return si(e)?o:e}function ns(e,t,r,n,s,a){var i=1&r,c=e.length,u=t.length;if(c!=u&&!(i&&u>c))return!1;var l=a.get(e),d=a.get(t);if(l&&d)return l==t&&d==e;var f=-1,p=!0,h=2&r?new qr:o;for(a.set(e,t),a.set(t,e);++f<c;){var g=e[f],y=t[f];if(n)var m=i?n(y,g,f,t,e,a):n(g,y,f,e,t,a);if(m!==o){if(m)continue;p=!1;break}if(h){if(!Dt(t,function(e,t){if(!tr(h,t)&&(g===e||s(g,e,r,n,a)))return h.push(t)})){p=!1;break}}else if(g!==y&&!s(g,y,r,n,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function os(e){return Os(Ss(e,o,Hs),e+\"\")}function ss(e){return Cn(e,xi,hs)}function as(e){return Cn(e,Oi,gs)}var is=_r?function(e){return _r.get(e)}:uc;function cs(e){for(var t=e.name+\"\",r=Rr[t],n=ke.call(Rr,t)?r.length:0;n--;){var o=r[n],s=o.func;if(null==s||s==e)return o.name}return t}function us(e){return(ke.call(Lr,\"placeholder\")?Lr:e).placeholder}function ls(){var e=Lr.iteratee||sc;return e=e===sc?kn:e,arguments.length?e(arguments[0],arguments[1]):e}function ds(e,t){var r=e.__data__;return function(e){var t=typeof e;return\"string\"==t||\"number\"==t||\"symbol\"==t||\"boolean\"==t?\"__proto__\"!==e:null===e}(t)?r[\"string\"==typeof t?\"string\":\"hash\"]:r.map}function fs(e){for(var t=xi(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Bs(o)]}return t}function ps(e,t){var r=function(e,t){return null==e?o:e[t]}(e,t);return Fn(r)?r:o}var hs=mt?function(e){return null==e?[]:(e=We(e),xt(mt(e),function(t){return Ze.call(e,t)}))}:yc,gs=mt?function(e){for(var t=[];e;)kt(t,hs(e)),e=Ke(e);return t}:yc,ys=Bn;function ms(e,t,r){for(var n=-1,o=(t=Ao(t,e)).length,s=!1;++n<o;){var a=Us(t[n]);if(!(s=null!=e&&r(e,a)))break;e=e[a]}return s||++n!=o?s:!!(o=null==e?0:e.length)&&ei(o)&&Ts(a,o)&&(Ga(e)||Va(e))}function bs(e){return\"function\"!=typeof e.constructor||Cs(e)?{}:$r(Ke(e))}function ws(e){return Ga(e)||Va(e)||!!(Ye&&e&&e[Ye])}function Ts(e,t){var r=typeof e;return!!(t=null==t?h:t)&&(\"number\"==r||\"symbol\"!=r&&Te.test(e))&&e>-1&&e%1==0&&e<t}function As(e,t,r){if(!ti(r))return!1;var n=typeof t;return!!(\"number\"==n?Ka(r)&&Ts(t,r.length):\"string\"==n&&t in r)&&$a(r[t],e)}function vs(e,t){if(Ga(e))return!1;var r=typeof e;return!(\"number\"!=r&&\"symbol\"!=r&&\"boolean\"!=r&&null!=e&&!ui(e))||(re.test(e)||!te.test(e)||null!=t&&e in We(t))}function Ps(e){var t=cs(e),r=Lr[t];if(\"function\"!=typeof r||!(t in Vr.prototype))return!1;if(e===r)return!0;var n=is(r);return!!n&&e===n[0]}(Er&&ys(new Er(new ArrayBuffer(1)))!=F||Cr&&ys(new Cr)!=C||Br&&ys(Br.resolve())!=S||Wr&&ys(new Wr)!=_||Sr&&ys(new Sr)!=O)&&(ys=function(e){var t=Bn(e),r=t==W?e.constructor:o,n=r?Ds(r):\"\";if(n)switch(n){case xr:return F;case Or:return C;case Mr:return S;case Fr:return _;case kr:return O}return t});var Es=Me?Xa:mc;function Cs(e){var t=e&&e.constructor;return e===(\"function\"==typeof t&&t.prototype||Oe)}function Bs(e){return e==e&&!ti(e)}function Ws(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==o||e in We(r)))}}function Ss(e,t,r){return t=br(t===o?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=br(o.length-t,0),i=n(a);++s<a;)i[s]=o[t+s];s=-1;for(var c=n(t+1);++s<t;)c[s]=o[s];return c[t]=r(i),Wt(e,this,c)}}function Is(e,t){return t.length<2?e:En(e,oo(t,0,-1))}function _s(e,t){if((\"constructor\"!==t||\"function\"!=typeof e[t])&&\"__proto__\"!=t)return e[t]}var Rs=Fs(to),xs=pt||function(e,t){return gt.setTimeout(e,t)},Os=Fs(ro);function Ms(e,t,r){var n=t+\"\";return Os(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?\"& \":\"\")+t[n],t=t.join(r>2?\", \":\" \"),e.replace(ce,\"{\\n/* [wrapped with \"+t+\"] */\\n\")}(n,function(e,t){return It(m,function(r){var n=\"_.\"+r[0];t&r[1]&&!Ot(e,n)&&e.push(n)}),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(le):[]}(n),r)))}function Fs(e){var t=0,r=0;return function(){var n=Tr(),s=16-(n-r);if(r=n,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function ks(e,t){var r=-1,n=e.length,s=n-1;for(t=t===o?n:t;++r<t;){var a=Zn(r,s),i=e[a];e[a]=e[r],e[r]=i}return e.length=t,e}var Ns=function(e){var t=Fa(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(\"\"),e.replace(ne,function(e,r,n,o){t.push(n?o.replace(pe,\"$1\"):r||e)}),t});function Us(e){if(\"string\"==typeof e||ui(e))return e;var t=e+\"\";return\"0\"==t&&1/e==-1/0?\"-0\":t}function Ds(e){if(null!=e){try{return Fe.call(e)}catch(e){}try{return e+\"\"}catch(e){}}return\"\"}function Ls(e){if(e instanceof Vr)return e.clone();var t=new jr(e.__wrapped__,e.__chain__);return t.__actions__=Ro(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $s=Yn(function(e,t){return qa(e)?fn(e,bn(t,1,qa,!0)):[]}),zs=Yn(function(e,t){var r=Ys(t);return qa(r)&&(r=o),qa(e)?fn(e,bn(t,1,qa,!0),ls(r,2)):[]}),js=Yn(function(e,t){var r=Ys(t);return qa(r)&&(r=o),qa(e)?fn(e,bn(t,1,qa,!0),o,r):[]});function Vs(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:gi(r);return o<0&&(o=br(n+o,0)),zt(e,ls(t,3),o)}function Gs(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=n-1;return r!==o&&(s=gi(r),s=r<0?br(n+s,0):wr(s,n-1)),zt(e,ls(t,3),s,!0)}function Hs(e){return(null==e?0:e.length)?bn(e,1):[]}function Ks(e){return e&&e.length?e[0]:o}var qs=Yn(function(e){var t=Ft(e,wo);return t.length&&t[0]===e[0]?_n(t):[]}),Zs=Yn(function(e){var t=Ys(e),r=Ft(e,wo);return t===Ys(r)?t=o:r.pop(),r.length&&r[0]===e[0]?_n(r,ls(t,2)):[]}),Js=Yn(function(e){var t=Ys(e),r=Ft(e,wo);return(t=\"function\"==typeof t?t:o)&&r.pop(),r.length&&r[0]===e[0]?_n(r,o,t):[]});function Ys(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Xs=Yn(Qs);function Qs(e,t){return e&&e.length&&t&&t.length?Kn(e,t):e}var ea=os(function(e,t){var r=null==e?0:e.length,n=an(e,t);return qn(e,Ft(t,function(e){return Ts(e,r)?+e:e}).sort(So)),n});function ta(e){return null==e?e:Pr.call(e)}var ra=Yn(function(e){return fo(bn(e,1,qa,!0))}),na=Yn(function(e){var t=Ys(e);return qa(t)&&(t=o),fo(bn(e,1,qa,!0),ls(t,2))}),oa=Yn(function(e){var t=Ys(e);return t=\"function\"==typeof t?t:o,fo(bn(e,1,qa,!0),o,t)});function sa(e){if(!e||!e.length)return[];var t=0;return e=xt(e,function(e){if(qa(e))return t=br(e.length,t),!0}),Yt(t,function(t){return Ft(e,Kt(t))})}function aa(e,t){if(!e||!e.length)return[];var r=sa(e);return null==t?r:Ft(r,function(e){return Wt(t,o,e)})}var ia=Yn(function(e,t){return qa(e)?fn(e,t):[]}),ca=Yn(function(e){return mo(xt(e,qa))}),ua=Yn(function(e){var t=Ys(e);return qa(t)&&(t=o),mo(xt(e,qa),ls(t,2))}),la=Yn(function(e){var t=Ys(e);return t=\"function\"==typeof t?t:o,mo(xt(e,qa),o,t)}),da=Yn(sa);var fa=Yn(function(e){var t=e.length,r=t>1?e[t-1]:o;return r=\"function\"==typeof r?(e.pop(),r):o,aa(e,r)});function pa(e){var t=Lr(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var ga=os(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,s=function(t){return an(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Vr&&Ts(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[s],thisArg:o}),new jr(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(s)});var ya=Oo(function(e,t,r){ke.call(e,r)?++e[r]:sn(e,r,1)});var ma=Lo(Vs),ba=Lo(Gs);function wa(e,t){return(Ga(e)?It:pn)(e,ls(t,3))}function Ta(e,t){return(Ga(e)?_t:hn)(e,ls(t,3))}var Aa=Oo(function(e,t,r){ke.call(e,r)?e[r].push(t):sn(e,r,[t])});var va=Yn(function(e,t,r){var o=-1,s=\"function\"==typeof t,a=Ka(e)?n(e.length):[];return pn(e,function(e){a[++o]=s?Wt(t,e,r):Rn(e,t,r)}),a}),Pa=Oo(function(e,t,r){sn(e,r,t)});function Ea(e,t){return(Ga(e)?Ft:Ln)(e,ls(t,3))}var Ca=Oo(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});var Ba=Yn(function(e,t){if(null==e)return[];var r=t.length;return r>1&&As(e,t[0],t[1])?t=[]:r>2&&As(t[0],t[1],t[2])&&(t=[t[0]]),Gn(e,bn(t,1),[])}),Wa=lt||function(){return gt.Date.now()};function Sa(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,Qo(e,d,o,o,o,o,t)}function Ia(e,t){var r;if(\"function\"!=typeof t)throw new _e(s);return e=gi(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var _a=Yn(function(e,t,r){var n=1;if(r.length){var o=lr(r,us(_a));n|=u}return Qo(e,n,t,r,o)}),Ra=Yn(function(e,t,r){var n=3;if(r.length){var o=lr(r,us(Ra));n|=u}return Qo(t,n,e,r,o)});function xa(e,t,r){var n,a,i,c,u,l,d=0,f=!1,p=!1,h=!0;if(\"function\"!=typeof e)throw new _e(s);function g(t){var r=n,s=a;return n=a=o,d=t,c=e.apply(s,r)}function y(e){var r=e-l;return l===o||r>=t||r<0||p&&e-d>=i}function m(){var e=Wa();if(y(e))return b(e);u=xs(m,function(e){var r=t-(e-l);return p?wr(r,i-(e-d)):r}(e))}function b(e){return u=o,h&&n?g(e):(n=a=o,c)}function w(){var e=Wa(),r=y(e);if(n=arguments,a=this,l=e,r){if(u===o)return function(e){return d=e,u=xs(m,t),f?g(e):c}(l);if(p)return Eo(u),u=xs(m,t),g(l)}return u===o&&(u=xs(m,t)),c}return t=mi(t)||0,ti(r)&&(f=!!r.leading,i=(p=\"maxWait\"in r)?br(mi(r.maxWait)||0,t):i,h=\"trailing\"in r?!!r.trailing:h),w.cancel=function(){u!==o&&Eo(u),d=0,n=l=a=u=o},w.flush=function(){return u===o?c:b(Wa())},w}var Oa=Yn(function(e,t){return dn(e,1,t)}),Ma=Yn(function(e,t,r){return dn(e,mi(t)||0,r)});function Fa(e,t){if(\"function\"!=typeof e||null!=t&&\"function\"!=typeof t)throw new _e(s);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var a=e.apply(this,n);return r.cache=s.set(o,a)||s,a};return r.cache=new(Fa.Cache||Kr),r}function ka(e){if(\"function\"!=typeof e)throw new _e(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fa.Cache=Kr;var Na=vo(function(e,t){var r=(t=1==t.length&&Ga(t[0])?Ft(t[0],Qt(ls())):Ft(bn(t,1),Qt(ls()))).length;return Yn(function(n){for(var o=-1,s=wr(n.length,r);++o<s;)n[o]=t[o].call(this,n[o]);return Wt(e,this,n)})}),Ua=Yn(function(e,t){var r=lr(t,us(Ua));return Qo(e,u,o,t,r)}),Da=Yn(function(e,t){var r=lr(t,us(Da));return Qo(e,l,o,t,r)}),La=os(function(e,t){return Qo(e,f,o,o,o,t)});function $a(e,t){return e===t||e!=e&&t!=t}var za=qo(Wn),ja=qo(function(e,t){return e>=t}),Va=xn(function(){return arguments}())?xn:function(e){return ri(e)&&ke.call(e,\"callee\")&&!Ze.call(e,\"callee\")},Ga=n.isArray,Ha=At?Qt(At):function(e){return ri(e)&&Bn(e)==M};function Ka(e){return null!=e&&ei(e.length)&&!Xa(e)}function qa(e){return ri(e)&&Ka(e)}var Za=wt||mc,Ja=vt?Qt(vt):function(e){return ri(e)&&Bn(e)==A};function Ya(e){if(!ri(e))return!1;var t=Bn(e);return t==v||\"[object DOMException]\"==t||\"string\"==typeof e.message&&\"string\"==typeof e.name&&!si(e)}function Xa(e){if(!ti(e))return!1;var t=Bn(e);return t==P||t==E||\"[object AsyncFunction]\"==t||\"[object Proxy]\"==t}function Qa(e){return\"number\"==typeof e&&e==gi(e)}function ei(e){return\"number\"==typeof e&&e>-1&&e%1==0&&e<=h}function ti(e){var t=typeof e;return null!=e&&(\"object\"==t||\"function\"==t)}function ri(e){return null!=e&&\"object\"==typeof e}var ni=Pt?Qt(Pt):function(e){return ri(e)&&ys(e)==C};function oi(e){return\"number\"==typeof e||ri(e)&&Bn(e)==B}function si(e){if(!ri(e)||Bn(e)!=W)return!1;var t=Ke(e);if(null===t)return!0;var r=ke.call(t,\"constructor\")&&t.constructor;return\"function\"==typeof r&&r instanceof r&&Fe.call(r)==Le}var ai=Et?Qt(Et):function(e){return ri(e)&&Bn(e)==I};var ii=Ct?Qt(Ct):function(e){return ri(e)&&ys(e)==_};function ci(e){return\"string\"==typeof e||!Ga(e)&&ri(e)&&Bn(e)==R}function ui(e){return\"symbol\"==typeof e||ri(e)&&Bn(e)==x}var li=Bt?Qt(Bt):function(e){return ri(e)&&ei(e.length)&&!!ct[Bn(e)]};var di=qo(Dn),fi=qo(function(e,t){return e<=t});function pi(e){if(!e)return[];if(Ka(e))return ci(e)?hr(e):Ro(e);if(Xe&&e[Xe])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Xe]());var t=ys(e);return(t==C?cr:t==_?dr:$i)(e)}function hi(e){return e?(e=mi(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function gi(e){var t=hi(e),r=t%1;return t==t?r?t-r:t:0}function yi(e){return e?cn(gi(e),0,y):0}function mi(e){if(\"number\"==typeof e)return e;if(ui(e))return g;if(ti(e)){var t=\"function\"==typeof e.valueOf?e.valueOf():e;e=ti(t)?t+\"\":t}if(\"string\"!=typeof e)return 0===e?e:+e;e=Xt(e);var r=me.test(e);return r||we.test(e)?ft(e.slice(2),r?2:8):ye.test(e)?g:+e}function bi(e){return xo(e,Oi(e))}function wi(e){return null==e?\"\":lo(e)}var Ti=Mo(function(e,t){if(Cs(t)||Ka(t))xo(t,xi(t),e);else for(var r in t)ke.call(t,r)&&tn(e,r,t[r])}),Ai=Mo(function(e,t){xo(t,Oi(t),e)}),vi=Mo(function(e,t,r,n){xo(t,Oi(t),e,n)}),Pi=Mo(function(e,t,r,n){xo(t,xi(t),e,n)}),Ei=os(an);var Ci=Yn(function(e,t){e=We(e);var r=-1,n=t.length,s=n>2?t[2]:o;for(s&&As(t[0],t[1],s)&&(n=1);++r<n;)for(var a=t[r],i=Oi(a),c=-1,u=i.length;++c<u;){var l=i[c],d=e[l];(d===o||$a(d,Oe[l])&&!ke.call(e,l))&&(e[l]=a[l])}return e}),Bi=Yn(function(e){return e.push(o,ts),Wt(Fi,o,e)});function Wi(e,t,r){var n=null==e?o:En(e,t);return n===o?r:n}function Si(e,t){return null!=e&&ms(e,t,In)}var Ii=jo(function(e,t,r){null!=t&&\"function\"!=typeof t.toString&&(t=De.call(t)),e[t]=r},tc(oc)),_i=jo(function(e,t,r){null!=t&&\"function\"!=typeof t.toString&&(t=De.call(t)),ke.call(e,t)?e[t].push(r):e[t]=[r]},ls),Ri=Yn(Rn);function xi(e){return Ka(e)?Jr(e):Nn(e)}function Oi(e){return Ka(e)?Jr(e,!0):Un(e)}var Mi=Mo(function(e,t,r){jn(e,t,r)}),Fi=Mo(function(e,t,r,n){jn(e,t,r,n)}),ki=os(function(e,t){var r={};if(null==e)return r;var n=!1;t=Ft(t,function(t){return t=Ao(t,e),n||(n=t.length>1),t}),xo(e,as(e),r),n&&(r=un(r,7,rs));for(var o=t.length;o--;)po(r,t[o]);return r});var Ni=os(function(e,t){return null==e?{}:function(e,t){return Hn(e,t,function(t,r){return Si(e,r)})}(e,t)});function Ui(e,t){if(null==e)return{};var r=Ft(as(e),function(e){return[e]});return t=ls(t),Hn(e,r,function(e,r){return t(e,r[0])})}var Di=Xo(xi),Li=Xo(Oi);function $i(e){return null==e?[]:er(e,xi(e))}var zi=Uo(function(e,t,r){return t=t.toLowerCase(),e+(r?ji(t):t)});function ji(e){return Yi(wi(e).toLowerCase())}function Vi(e){return(e=wi(e))&&e.replace(Ae,or).replace(tt,\"\")}var Gi=Uo(function(e,t,r){return e+(r?\"-\":\"\")+t.toLowerCase()}),Hi=Uo(function(e,t,r){return e+(r?\" \":\"\")+t.toLowerCase()}),Ki=No(\"toLowerCase\");var qi=Uo(function(e,t,r){return e+(r?\"_\":\"\")+t.toLowerCase()});var Zi=Uo(function(e,t,r){return e+(r?\" \":\"\")+Yi(t)});var Ji=Uo(function(e,t,r){return e+(r?\" \":\"\")+t.toUpperCase()}),Yi=No(\"toUpperCase\");function Xi(e,t,r){return e=wi(e),(t=r?o:t)===o?function(e){return st.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Qi=Yn(function(e,t){try{return Wt(e,o,t)}catch(e){return Ya(e)?e:new Ee(e)}}),ec=os(function(e,t){return It(t,function(t){t=Us(t),sn(e,t,_a(e[t],e))}),e});function tc(e){return function(){return e}}var rc=$o(),nc=$o(!0);function oc(e){return e}function sc(e){return kn(\"function\"==typeof e?e:un(e,1))}var ac=Yn(function(e,t){return function(r){return Rn(r,e,t)}}),ic=Yn(function(e,t){return function(r){return Rn(e,r,t)}});function cc(e,t,r){var n=xi(t),o=Pn(t,n);null!=r||ti(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=Pn(t,xi(t)));var s=!(ti(r)&&\"chain\"in r&&!r.chain),a=Xa(e);return It(o,function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(s||t){var r=e(this.__wrapped__);return(r.__actions__=Ro(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,kt([this.value()],arguments))})}),e}function uc(){}var lc=Go(Ft),dc=Go(Rt),fc=Go(Dt);function pc(e){return vs(e)?Kt(Us(e)):function(e){return function(t){return En(t,e)}}(e)}var hc=Ko(),gc=Ko(!0);function yc(){return[]}function mc(){return!1}var bc=Vo(function(e,t){return e+t},0),wc=Jo(\"ceil\"),Tc=Vo(function(e,t){return e/t},1),Ac=Jo(\"floor\");var vc,Pc=Vo(function(e,t){return e*t},1),Ec=Jo(\"round\"),Cc=Vo(function(e,t){return e-t},0);return Lr.after=function(e,t){if(\"function\"!=typeof t)throw new _e(s);return e=gi(e),function(){if(--e<1)return t.apply(this,arguments)}},Lr.ary=Sa,Lr.assign=Ti,Lr.assignIn=Ai,Lr.assignInWith=vi,Lr.assignWith=Pi,Lr.at=Ei,Lr.before=Ia,Lr.bind=_a,Lr.bindAll=ec,Lr.bindKey=Ra,Lr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ga(e)?e:[e]},Lr.chain=pa,Lr.chunk=function(e,t,r){t=(r?As(e,t,r):t===o)?1:br(gi(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var a=0,i=0,c=n(ht(s/t));a<s;)c[i++]=oo(e,a,a+=t);return c},Lr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,o=[];++t<r;){var s=e[t];s&&(o[n++]=s)}return o},Lr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],o=e;o--;)t[o-1]=arguments[o];return kt(Ga(r)?Ro(r):[r],bn(t,1))},Lr.cond=function(e){var t=null==e?0:e.length,r=ls();return e=t?Ft(e,function(e){if(\"function\"!=typeof e[1])throw new _e(s);return[r(e[0]),e[1]]}):[],Yn(function(r){for(var n=-1;++n<t;){var o=e[n];if(Wt(o[0],this,r))return Wt(o[1],this,r)}})},Lr.conforms=function(e){return function(e){var t=xi(e);return function(r){return ln(r,e,t)}}(un(e,1))},Lr.constant=tc,Lr.countBy=ya,Lr.create=function(e,t){var r=$r(e);return null==t?r:on(r,t)},Lr.curry=function e(t,r,n){var s=Qo(t,8,o,o,o,o,o,r=n?o:r);return s.placeholder=e.placeholder,s},Lr.curryRight=function e(t,r,n){var s=Qo(t,c,o,o,o,o,o,r=n?o:r);return s.placeholder=e.placeholder,s},Lr.debounce=xa,Lr.defaults=Ci,Lr.defaultsDeep=Bi,Lr.defer=Oa,Lr.delay=Ma,Lr.difference=$s,Lr.differenceBy=zs,Lr.differenceWith=js,Lr.drop=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,(t=r||t===o?1:gi(t))<0?0:t,n):[]},Lr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,0,(t=n-(t=r||t===o?1:gi(t)))<0?0:t):[]},Lr.dropRightWhile=function(e,t){return e&&e.length?go(e,ls(t,3),!0,!0):[]},Lr.dropWhile=function(e,t){return e&&e.length?go(e,ls(t,3),!0):[]},Lr.fill=function(e,t,r,n){var s=null==e?0:e.length;return s?(r&&\"number\"!=typeof r&&As(e,t,r)&&(r=0,n=s),function(e,t,r,n){var s=e.length;for((r=gi(r))<0&&(r=-r>s?0:s+r),(n=n===o||n>s?s:gi(n))<0&&(n+=s),n=r>n?0:yi(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Lr.filter=function(e,t){return(Ga(e)?xt:mn)(e,ls(t,3))},Lr.flatMap=function(e,t){return bn(Ea(e,t),1)},Lr.flatMapDeep=function(e,t){return bn(Ea(e,t),p)},Lr.flatMapDepth=function(e,t,r){return r=r===o?1:gi(r),bn(Ea(e,t),r)},Lr.flatten=Hs,Lr.flattenDeep=function(e){return(null==e?0:e.length)?bn(e,p):[]},Lr.flattenDepth=function(e,t){return(null==e?0:e.length)?bn(e,t=t===o?1:gi(t)):[]},Lr.flip=function(e){return Qo(e,512)},Lr.flow=rc,Lr.flowRight=nc,Lr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n},Lr.functions=function(e){return null==e?[]:Pn(e,xi(e))},Lr.functionsIn=function(e){return null==e?[]:Pn(e,Oi(e))},Lr.groupBy=Aa,Lr.initial=function(e){return(null==e?0:e.length)?oo(e,0,-1):[]},Lr.intersection=qs,Lr.intersectionBy=Zs,Lr.intersectionWith=Js,Lr.invert=Ii,Lr.invertBy=_i,Lr.invokeMap=va,Lr.iteratee=sc,Lr.keyBy=Pa,Lr.keys=xi,Lr.keysIn=Oi,Lr.map=Ea,Lr.mapKeys=function(e,t){var r={};return t=ls(t,3),An(e,function(e,n,o){sn(r,t(e,n,o),e)}),r},Lr.mapValues=function(e,t){var r={};return t=ls(t,3),An(e,function(e,n,o){sn(r,n,t(e,n,o))}),r},Lr.matches=function(e){return $n(un(e,1))},Lr.matchesProperty=function(e,t){return zn(e,un(t,1))},Lr.memoize=Fa,Lr.merge=Mi,Lr.mergeWith=Fi,Lr.method=ac,Lr.methodOf=ic,Lr.mixin=cc,Lr.negate=ka,Lr.nthArg=function(e){return e=gi(e),Yn(function(t){return Vn(t,e)})},Lr.omit=ki,Lr.omitBy=function(e,t){return Ui(e,ka(ls(t)))},Lr.once=function(e){return Ia(2,e)},Lr.orderBy=function(e,t,r,n){return null==e?[]:(Ga(t)||(t=null==t?[]:[t]),Ga(r=n?o:r)||(r=null==r?[]:[r]),Gn(e,t,r))},Lr.over=lc,Lr.overArgs=Na,Lr.overEvery=dc,Lr.overSome=fc,Lr.partial=Ua,Lr.partialRight=Da,Lr.partition=Ca,Lr.pick=Ni,Lr.pickBy=Ui,Lr.property=pc,Lr.propertyOf=function(e){return function(t){return null==e?o:En(e,t)}},Lr.pull=Xs,Lr.pullAll=Qs,Lr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Kn(e,t,ls(r,2)):e},Lr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Kn(e,t,o,r):e},Lr.pullAt=ea,Lr.range=hc,Lr.rangeRight=gc,Lr.rearg=La,Lr.reject=function(e,t){return(Ga(e)?xt:mn)(e,ka(ls(t,3)))},Lr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],s=e.length;for(t=ls(t,3);++n<s;){var a=e[n];t(a,n,e)&&(r.push(a),o.push(n))}return qn(e,o),r},Lr.rest=function(e,t){if(\"function\"!=typeof e)throw new _e(s);return Yn(e,t=t===o?t:gi(t))},Lr.reverse=ta,Lr.sampleSize=function(e,t,r){return t=(r?As(e,t,r):t===o)?1:gi(t),(Ga(e)?Xr:Qn)(e,t)},Lr.set=function(e,t,r){return null==e?e:eo(e,t,r)},Lr.setWith=function(e,t,r,n){return n=\"function\"==typeof n?n:o,null==e?e:eo(e,t,r,n)},Lr.shuffle=function(e){return(Ga(e)?Qr:no)(e)},Lr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&\"number\"!=typeof r&&As(e,t,r)?(t=0,r=n):(t=null==t?0:gi(t),r=r===o?n:gi(r)),oo(e,t,r)):[]},Lr.sortBy=Ba,Lr.sortedUniq=function(e){return e&&e.length?co(e):[]},Lr.sortedUniqBy=function(e,t){return e&&e.length?co(e,ls(t,2)):[]},Lr.split=function(e,t,r){return r&&\"number\"!=typeof r&&As(e,t,r)&&(t=r=o),(r=r===o?y:r>>>0)?(e=wi(e))&&(\"string\"==typeof t||null!=t&&!ai(t))&&!(t=lo(t))&&ir(e)?Po(hr(e),0,r):e.split(t,r):[]},Lr.spread=function(e,t){if(\"function\"!=typeof e)throw new _e(s);return t=null==t?0:br(gi(t),0),Yn(function(r){var n=r[t],o=Po(r,0,t);return n&&kt(o,n),Wt(e,this,o)})},Lr.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Lr.take=function(e,t,r){return e&&e.length?oo(e,0,(t=r||t===o?1:gi(t))<0?0:t):[]},Lr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,(t=n-(t=r||t===o?1:gi(t)))<0?0:t,n):[]},Lr.takeRightWhile=function(e,t){return e&&e.length?go(e,ls(t,3),!1,!0):[]},Lr.takeWhile=function(e,t){return e&&e.length?go(e,ls(t,3)):[]},Lr.tap=function(e,t){return t(e),e},Lr.throttle=function(e,t,r){var n=!0,o=!0;if(\"function\"!=typeof e)throw new _e(s);return ti(r)&&(n=\"leading\"in r?!!r.leading:n,o=\"trailing\"in r?!!r.trailing:o),xa(e,t,{leading:n,maxWait:t,trailing:o})},Lr.thru=ha,Lr.toArray=pi,Lr.toPairs=Di,Lr.toPairsIn=Li,Lr.toPath=function(e){return Ga(e)?Ft(e,Us):ui(e)?[e]:Ro(Ns(wi(e)))},Lr.toPlainObject=bi,Lr.transform=function(e,t,r){var n=Ga(e),o=n||Za(e)||li(e);if(t=ls(t,4),null==r){var s=e&&e.constructor;r=o?n?new s:[]:ti(e)&&Xa(s)?$r(Ke(e)):{}}return(o?It:An)(e,function(e,n,o){return t(r,e,n,o)}),r},Lr.unary=function(e){return Sa(e,1)},Lr.union=ra,Lr.unionBy=na,Lr.unionWith=oa,Lr.uniq=function(e){return e&&e.length?fo(e):[]},Lr.uniqBy=function(e,t){return e&&e.length?fo(e,ls(t,2)):[]},Lr.uniqWith=function(e,t){return t=\"function\"==typeof t?t:o,e&&e.length?fo(e,o,t):[]},Lr.unset=function(e,t){return null==e||po(e,t)},Lr.unzip=sa,Lr.unzipWith=aa,Lr.update=function(e,t,r){return null==e?e:ho(e,t,To(r))},Lr.updateWith=function(e,t,r,n){return n=\"function\"==typeof n?n:o,null==e?e:ho(e,t,To(r),n)},Lr.values=$i,Lr.valuesIn=function(e){return null==e?[]:er(e,Oi(e))},Lr.without=ia,Lr.words=Xi,Lr.wrap=function(e,t){return Ua(To(t),e)},Lr.xor=ca,Lr.xorBy=ua,Lr.xorWith=la,Lr.zip=da,Lr.zipObject=function(e,t){return bo(e||[],t||[],tn)},Lr.zipObjectDeep=function(e,t){return bo(e||[],t||[],eo)},Lr.zipWith=fa,Lr.entries=Di,Lr.entriesIn=Li,Lr.extend=Ai,Lr.extendWith=vi,cc(Lr,Lr),Lr.add=bc,Lr.attempt=Qi,Lr.camelCase=zi,Lr.capitalize=ji,Lr.ceil=wc,Lr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=mi(r))==r?r:0),t!==o&&(t=(t=mi(t))==t?t:0),cn(mi(e),t,r)},Lr.clone=function(e){return un(e,4)},Lr.cloneDeep=function(e){return un(e,5)},Lr.cloneDeepWith=function(e,t){return un(e,5,t=\"function\"==typeof t?t:o)},Lr.cloneWith=function(e,t){return un(e,4,t=\"function\"==typeof t?t:o)},Lr.conformsTo=function(e,t){return null==t||ln(e,t,xi(t))},Lr.deburr=Vi,Lr.defaultTo=function(e,t){return null==e||e!=e?t:e},Lr.divide=Tc,Lr.endsWith=function(e,t,r){e=wi(e),t=lo(t);var n=e.length,s=r=r===o?n:cn(gi(r),0,n);return(r-=t.length)>=0&&e.slice(r,s)==t},Lr.eq=$a,Lr.escape=function(e){return(e=wi(e))&&Y.test(e)?e.replace(Z,sr):e},Lr.escapeRegExp=function(e){return(e=wi(e))&&se.test(e)?e.replace(oe,\"\\\\$&\"):e},Lr.every=function(e,t,r){var n=Ga(e)?Rt:gn;return r&&As(e,t,r)&&(t=o),n(e,ls(t,3))},Lr.find=ma,Lr.findIndex=Vs,Lr.findKey=function(e,t){return $t(e,ls(t,3),An)},Lr.findLast=ba,Lr.findLastIndex=Gs,Lr.findLastKey=function(e,t){return $t(e,ls(t,3),vn)},Lr.floor=Ac,Lr.forEach=wa,Lr.forEachRight=Ta,Lr.forIn=function(e,t){return null==e?e:wn(e,ls(t,3),Oi)},Lr.forInRight=function(e,t){return null==e?e:Tn(e,ls(t,3),Oi)},Lr.forOwn=function(e,t){return e&&An(e,ls(t,3))},Lr.forOwnRight=function(e,t){return e&&vn(e,ls(t,3))},Lr.get=Wi,Lr.gt=za,Lr.gte=ja,Lr.has=function(e,t){return null!=e&&ms(e,t,Sn)},Lr.hasIn=Si,Lr.head=Ks,Lr.identity=oc,Lr.includes=function(e,t,r,n){e=Ka(e)?e:$i(e),r=r&&!n?gi(r):0;var o=e.length;return r<0&&(r=br(o+r,0)),ci(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&jt(e,t,r)>-1},Lr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:gi(r);return o<0&&(o=br(n+o,0)),jt(e,t,o)},Lr.inRange=function(e,t,r){return t=hi(t),r===o?(r=t,t=0):r=hi(r),function(e,t,r){return e>=wr(t,r)&&e<br(t,r)}(e=mi(e),t,r)},Lr.invoke=Ri,Lr.isArguments=Va,Lr.isArray=Ga,Lr.isArrayBuffer=Ha,Lr.isArrayLike=Ka,Lr.isArrayLikeObject=qa,Lr.isBoolean=function(e){return!0===e||!1===e||ri(e)&&Bn(e)==T},Lr.isBuffer=Za,Lr.isDate=Ja,Lr.isElement=function(e){return ri(e)&&1===e.nodeType&&!si(e)},Lr.isEmpty=function(e){if(null==e)return!0;if(Ka(e)&&(Ga(e)||\"string\"==typeof e||\"function\"==typeof e.splice||Za(e)||li(e)||Va(e)))return!e.length;var t=ys(e);if(t==C||t==_)return!e.size;if(Cs(e))return!Nn(e).length;for(var r in e)if(ke.call(e,r))return!1;return!0},Lr.isEqual=function(e,t){return On(e,t)},Lr.isEqualWith=function(e,t,r){var n=(r=\"function\"==typeof r?r:o)?r(e,t):o;return n===o?On(e,t,o,r):!!n},Lr.isError=Ya,Lr.isFinite=function(e){return\"number\"==typeof e&&Tt(e)},Lr.isFunction=Xa,Lr.isInteger=Qa,Lr.isLength=ei,Lr.isMap=ni,Lr.isMatch=function(e,t){return e===t||Mn(e,t,fs(t))},Lr.isMatchWith=function(e,t,r){return r=\"function\"==typeof r?r:o,Mn(e,t,fs(t),r)},Lr.isNaN=function(e){return oi(e)&&e!=+e},Lr.isNative=function(e){if(Es(e))throw new Ee(\"Unsupported core-js use. Try https://npms.io/search?q=ponyfill.\");return Fn(e)},Lr.isNil=function(e){return null==e},Lr.isNull=function(e){return null===e},Lr.isNumber=oi,Lr.isObject=ti,Lr.isObjectLike=ri,Lr.isPlainObject=si,Lr.isRegExp=ai,Lr.isSafeInteger=function(e){return Qa(e)&&e>=-9007199254740991&&e<=h},Lr.isSet=ii,Lr.isString=ci,Lr.isSymbol=ui,Lr.isTypedArray=li,Lr.isUndefined=function(e){return e===o},Lr.isWeakMap=function(e){return ri(e)&&ys(e)==O},Lr.isWeakSet=function(e){return ri(e)&&\"[object WeakSet]\"==Bn(e)},Lr.join=function(e,t){return null==e?\"\":Lt.call(e,t)},Lr.kebabCase=Gi,Lr.last=Ys,Lr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=n;return r!==o&&(s=(s=gi(r))<0?br(n+s,0):wr(s,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,s):zt(e,Gt,s,!0)},Lr.lowerCase=Hi,Lr.lowerFirst=Ki,Lr.lt=di,Lr.lte=fi,Lr.max=function(e){return e&&e.length?yn(e,oc,Wn):o},Lr.maxBy=function(e,t){return e&&e.length?yn(e,ls(t,2),Wn):o},Lr.mean=function(e){return Ht(e,oc)},Lr.meanBy=function(e,t){return Ht(e,ls(t,2))},Lr.min=function(e){return e&&e.length?yn(e,oc,Dn):o},Lr.minBy=function(e,t){return e&&e.length?yn(e,ls(t,2),Dn):o},Lr.stubArray=yc,Lr.stubFalse=mc,Lr.stubObject=function(){return{}},Lr.stubString=function(){return\"\"},Lr.stubTrue=function(){return!0},Lr.multiply=Pc,Lr.nth=function(e,t){return e&&e.length?Vn(e,gi(t)):o},Lr.noConflict=function(){return gt._===this&&(gt._=$e),this},Lr.noop=uc,Lr.now=Wa,Lr.pad=function(e,t,r){e=wi(e);var n=(t=gi(t))?pr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Ho(yt(o),r)+e+Ho(ht(o),r)},Lr.padEnd=function(e,t,r){e=wi(e);var n=(t=gi(t))?pr(e):0;return t&&n<t?e+Ho(t-n,r):e},Lr.padStart=function(e,t,r){e=wi(e);var n=(t=gi(t))?pr(e):0;return t&&n<t?Ho(t-n,r)+e:e},Lr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),Ar(wi(e).replace(ae,\"\"),t||0)},Lr.random=function(e,t,r){if(r&&\"boolean\"!=typeof r&&As(e,t,r)&&(t=r=o),r===o&&(\"boolean\"==typeof t?(r=t,t=o):\"boolean\"==typeof e&&(r=e,e=o)),e===o&&t===o?(e=0,t=1):(e=hi(e),t===o?(t=e,e=0):t=hi(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var s=vr();return wr(e+s*(t-e+dt(\"1e-\"+((s+\"\").length-1))),t)}return Zn(e,t)},Lr.reduce=function(e,t,r){var n=Ga(e)?Nt:Zt,o=arguments.length<3;return n(e,ls(t,4),r,o,pn)},Lr.reduceRight=function(e,t,r){var n=Ga(e)?Ut:Zt,o=arguments.length<3;return n(e,ls(t,4),r,o,hn)},Lr.repeat=function(e,t,r){return t=(r?As(e,t,r):t===o)?1:gi(t),Jn(wi(e),t)},Lr.replace=function(){var e=arguments,t=wi(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Lr.result=function(e,t,r){var n=-1,s=(t=Ao(t,e)).length;for(s||(s=1,e=o);++n<s;){var a=null==e?o:e[Us(t[n])];a===o&&(n=s,a=r),e=Xa(a)?a.call(e):a}return e},Lr.round=Ec,Lr.runInContext=e,Lr.sample=function(e){return(Ga(e)?Yr:Xn)(e)},Lr.size=function(e){if(null==e)return 0;if(Ka(e))return ci(e)?pr(e):e.length;var t=ys(e);return t==C||t==_?e.size:Nn(e).length},Lr.snakeCase=qi,Lr.some=function(e,t,r){var n=Ga(e)?Dt:so;return r&&As(e,t,r)&&(t=o),n(e,ls(t,3))},Lr.sortedIndex=function(e,t){return ao(e,t)},Lr.sortedIndexBy=function(e,t,r){return io(e,t,ls(r,2))},Lr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ao(e,t);if(n<r&&$a(e[n],t))return n}return-1},Lr.sortedLastIndex=function(e,t){return ao(e,t,!0)},Lr.sortedLastIndexBy=function(e,t,r){return io(e,t,ls(r,2),!0)},Lr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=ao(e,t,!0)-1;if($a(e[r],t))return r}return-1},Lr.startCase=Zi,Lr.startsWith=function(e,t,r){return e=wi(e),r=null==r?0:cn(gi(r),0,e.length),t=lo(t),e.slice(r,r+t.length)==t},Lr.subtract=Cc,Lr.sum=function(e){return e&&e.length?Jt(e,oc):0},Lr.sumBy=function(e,t){return e&&e.length?Jt(e,ls(t,2)):0},Lr.template=function(e,t,r){var n=Lr.templateSettings;r&&As(e,t,r)&&(t=o),e=wi(e),t=vi({},t,n,es);var s,a,i=vi({},t.imports,n.imports,es),c=xi(i),u=er(i,c),l=0,d=t.interpolate||ve,f=\"__p += '\",p=Se((t.escape||ve).source+\"|\"+d.source+\"|\"+(d===ee?he:ve).source+\"|\"+(t.evaluate||ve).source+\"|$\",\"g\"),h=\"//# sourceURL=\"+(ke.call(t,\"sourceURL\")?(t.sourceURL+\"\").replace(/\\s/g,\" \"):\"lodash.templateSources[\"+ ++it+\"]\")+\"\\n\";e.replace(p,function(t,r,n,o,i,c){return n||(n=o),f+=e.slice(l,c).replace(Pe,ar),r&&(s=!0,f+=\"' +\\n__e(\"+r+\") +\\n'\"),i&&(a=!0,f+=\"';\\n\"+i+\";\\n__p += '\"),n&&(f+=\"' +\\n((__t = (\"+n+\")) == null ? '' : __t) +\\n'\"),l=c+t.length,t}),f+=\"';\\n\";var g=ke.call(t,\"variable\")&&t.variable;if(g){if(fe.test(g))throw new Ee(\"Invalid `variable` option passed into `_.template`\")}else f=\"with (obj) {\\n\"+f+\"\\n}\\n\";f=(a?f.replace(G,\"\"):f).replace(H,\"$1\").replace(K,\"$1;\"),f=\"function(\"+(g||\"obj\")+\") {\\n\"+(g?\"\":\"obj || (obj = {});\\n\")+\"var __t, __p = ''\"+(s?\", __e = _.escape\":\"\")+(a?\", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, '') }\\n\":\";\\n\")+f+\"return __p\\n}\";var y=Qi(function(){return Ce(c,h+\"return \"+f).apply(o,u)});if(y.source=f,Ya(y))throw y;return y},Lr.times=function(e,t){if((e=gi(e))<1||e>h)return[];var r=y,n=wr(e,y);t=ls(t),e-=y;for(var o=Yt(n,t);++r<e;)t(r);return o},Lr.toFinite=hi,Lr.toInteger=gi,Lr.toLength=yi,Lr.toLower=function(e){return wi(e).toLowerCase()},Lr.toNumber=mi,Lr.toSafeInteger=function(e){return e?cn(gi(e),-9007199254740991,h):0===e?e:0},Lr.toString=wi,Lr.toUpper=function(e){return wi(e).toUpperCase()},Lr.trim=function(e,t,r){if((e=wi(e))&&(r||t===o))return Xt(e);if(!e||!(t=lo(t)))return e;var n=hr(e),s=hr(t);return Po(n,rr(n,s),nr(n,s)+1).join(\"\")},Lr.trimEnd=function(e,t,r){if((e=wi(e))&&(r||t===o))return e.slice(0,gr(e)+1);if(!e||!(t=lo(t)))return e;var n=hr(e);return Po(n,0,nr(n,hr(t))+1).join(\"\")},Lr.trimStart=function(e,t,r){if((e=wi(e))&&(r||t===o))return e.replace(ae,\"\");if(!e||!(t=lo(t)))return e;var n=hr(e);return Po(n,rr(n,hr(t))).join(\"\")},Lr.truncate=function(e,t){var r=30,n=\"...\";if(ti(t)){var s=\"separator\"in t?t.separator:s;r=\"length\"in t?gi(t.length):r,n=\"omission\"in t?lo(t.omission):n}var a=(e=wi(e)).length;if(ir(e)){var i=hr(e);a=i.length}if(r>=a)return e;var c=r-pr(n);if(c<1)return n;var u=i?Po(i,0,c).join(\"\"):e.slice(0,c);if(s===o)return u+n;if(i&&(c+=u.length-c),ai(s)){if(e.slice(c).search(s)){var l,d=u;for(s.global||(s=Se(s.source,wi(ge.exec(s))+\"g\")),s.lastIndex=0;l=s.exec(d);)var f=l.index;u=u.slice(0,f===o?c:f)}}else if(e.indexOf(lo(s),c)!=c){var p=u.lastIndexOf(s);p>-1&&(u=u.slice(0,p))}return u+n},Lr.unescape=function(e){return(e=wi(e))&&J.test(e)?e.replace(q,yr):e},Lr.uniqueId=function(e){var t=++Ne;return wi(e)+t},Lr.upperCase=Ji,Lr.upperFirst=Yi,Lr.each=wa,Lr.eachRight=Ta,Lr.first=Ks,cc(Lr,(vc={},An(Lr,function(e,t){ke.call(Lr.prototype,t)||(vc[t]=e)}),vc),{chain:!1}),Lr.VERSION=\"4.17.21\",It([\"bind\",\"bindKey\",\"curry\",\"curryRight\",\"partial\",\"partialRight\"],function(e){Lr[e].placeholder=Lr}),It([\"drop\",\"take\"],function(e,t){Vr.prototype[e]=function(r){r=r===o?1:br(gi(r),0);var n=this.__filtered__&&!t?new Vr(this):this.clone();return n.__filtered__?n.__takeCount__=wr(r,n.__takeCount__):n.__views__.push({size:wr(r,y),type:e+(n.__dir__<0?\"Right\":\"\")}),n},Vr.prototype[e+\"Right\"]=function(t){return this.reverse()[e](t).reverse()}}),It([\"filter\",\"map\",\"takeWhile\"],function(e,t){var r=t+1,n=1==r||3==r;Vr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ls(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),It([\"head\",\"last\"],function(e,t){var r=\"take\"+(t?\"Right\":\"\");Vr.prototype[e]=function(){return this[r](1).value()[0]}}),It([\"initial\",\"tail\"],function(e,t){var r=\"drop\"+(t?\"\":\"Right\");Vr.prototype[e]=function(){return this.__filtered__?new Vr(this):this[r](1)}}),Vr.prototype.compact=function(){return this.filter(oc)},Vr.prototype.find=function(e){return this.filter(e).head()},Vr.prototype.findLast=function(e){return this.reverse().find(e)},Vr.prototype.invokeMap=Yn(function(e,t){return\"function\"==typeof e?new Vr(this):this.map(function(r){return Rn(r,e,t)})}),Vr.prototype.reject=function(e){return this.filter(ka(ls(e)))},Vr.prototype.slice=function(e,t){e=gi(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Vr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=gi(t))<0?r.dropRight(-t):r.take(t-e)),r)},Vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vr.prototype.toArray=function(){return this.take(y)},An(Vr.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),s=Lr[n?\"take\"+(\"last\"==t?\"Right\":\"\"):t],a=n||/^find/.test(t);s&&(Lr.prototype[t]=function(){var t=this.__wrapped__,i=n?[1]:arguments,c=t instanceof Vr,u=i[0],l=c||Ga(t),d=function(e){var t=s.apply(Lr,kt([e],i));return n&&f?t[0]:t};l&&r&&\"function\"==typeof u&&1!=u.length&&(c=l=!1);var f=this.__chain__,p=!!this.__actions__.length,h=a&&!f,g=c&&!p;if(!a&&l){t=g?t:new Vr(this);var y=e.apply(t,i);return y.__actions__.push({func:ha,args:[d],thisArg:o}),new jr(y,f)}return h&&g?e.apply(this,i):(y=this.thru(d),h?n?y.value()[0]:y.value():y)})}),It([\"pop\",\"push\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(e){var t=Re[e],r=/^(?:push|sort|unshift)$/.test(e)?\"tap\":\"thru\",n=/^(?:pop|shift)$/.test(e);Lr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Ga(o)?o:[],e)}return this[r](function(r){return t.apply(Ga(r)?r:[],e)})}}),An(Vr.prototype,function(e,t){var r=Lr[t];if(r){var n=r.name+\"\";ke.call(Rr,n)||(Rr[n]=[]),Rr[n].push({name:t,func:r})}}),Rr[zo(o,2).name]=[{name:\"wrapper\",func:o}],Vr.prototype.clone=function(){var e=new Vr(this.__wrapped__);return e.__actions__=Ro(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ro(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ro(this.__views__),e},Vr.prototype.reverse=function(){if(this.__filtered__){var e=new Vr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ga(e),n=t<0,o=r?e.length:0,s=function(e,t,r){var n=-1,o=r.length;for(;++n<o;){var s=r[n],a=s.size;switch(s.type){case\"drop\":e+=a;break;case\"dropRight\":t-=a;break;case\"take\":t=wr(t,e+a);break;case\"takeRight\":e=br(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=s.start,i=s.end,c=i-a,u=n?i:a-1,l=this.__iteratees__,d=l.length,f=0,p=wr(c,this.__takeCount__);if(!r||!n&&o==c&&p==c)return yo(e,this.__actions__);var h=[];e:for(;c--&&f<p;){for(var g=-1,y=e[u+=t];++g<d;){var m=l[g],b=m.iteratee,w=m.type,T=b(y);if(2==w)y=T;else if(!T){if(1==w)continue e;break e}}h[f++]=y}return h},Lr.prototype.at=ga,Lr.prototype.chain=function(){return pa(this)},Lr.prototype.commit=function(){return new jr(this.value(),this.__chain__)},Lr.prototype.next=function(){this.__values__===o&&(this.__values__=pi(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Lr.prototype.plant=function(e){for(var t,r=this;r instanceof zr;){var n=Ls(r);n.__index__=0,n.__values__=o,t?s.__wrapped__=n:t=n;var s=n;r=r.__wrapped__}return s.__wrapped__=e,t},Lr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vr){var t=e;return this.__actions__.length&&(t=new Vr(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:o}),new jr(t,this.__chain__)}return this.thru(ta)},Lr.prototype.toJSON=Lr.prototype.valueOf=Lr.prototype.value=function(){return yo(this.__wrapped__,this.__actions__)},Lr.prototype.first=Lr.prototype.head,Xe&&(Lr.prototype[Xe]=function(){return this}),Lr}();gt._=mr,(n=function(){return mr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},5318:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.ScriptCodes=void 0,t.default=function(e){return(0,o.default)(e),s.has(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set([\"Adlm\",\"Afak\",\"Aghb\",\"Ahom\",\"Arab\",\"Aran\",\"Armi\",\"Armn\",\"Avst\",\"Bali\",\"Bamu\",\"Bass\",\"Batk\",\"Beng\",\"Bhks\",\"Blis\",\"Bopo\",\"Brah\",\"Brai\",\"Bugi\",\"Buhd\",\"Cakm\",\"Cans\",\"Cari\",\"Cham\",\"Cher\",\"Chis\",\"Chrs\",\"Cirt\",\"Copt\",\"Cpmn\",\"Cprt\",\"Cyrl\",\"Cyrs\",\"Deva\",\"Diak\",\"Dogr\",\"Dsrt\",\"Dupl\",\"Egyd\",\"Egyh\",\"Egyp\",\"Elba\",\"Elym\",\"Ethi\",\"Gara\",\"Geok\",\"Geor\",\"Glag\",\"Gong\",\"Gonm\",\"Goth\",\"Gran\",\"Grek\",\"Gujr\",\"Gukh\",\"Guru\",\"Hanb\",\"Hang\",\"Hani\",\"Hano\",\"Hans\",\"Hant\",\"Hatr\",\"Hebr\",\"Hira\",\"Hluw\",\"Hmng\",\"Hmnp\",\"Hrkt\",\"Hung\",\"Inds\",\"Ital\",\"Jamo\",\"Java\",\"Jpan\",\"Jurc\",\"Kali\",\"Kana\",\"Kawi\",\"Khar\",\"Khmr\",\"Khoj\",\"Kitl\",\"Kits\",\"Knda\",\"Kore\",\"Kpel\",\"Krai\",\"Kthi\",\"Lana\",\"Laoo\",\"Latf\",\"Latg\",\"Latn\",\"Leke\",\"Lepc\",\"Limb\",\"Lina\",\"Linb\",\"Lisu\",\"Loma\",\"Lyci\",\"Lydi\",\"Mahj\",\"Maka\",\"Mand\",\"Mani\",\"Marc\",\"Maya\",\"Medf\",\"Mend\",\"Merc\",\"Mero\",\"Mlym\",\"Modi\",\"Mong\",\"Moon\",\"Mroo\",\"Mtei\",\"Mult\",\"Mymr\",\"Nagm\",\"Nand\",\"Narb\",\"Nbat\",\"Newa\",\"Nkdb\",\"Nkgb\",\"Nkoo\",\"Nshu\",\"Ogam\",\"Olck\",\"Onao\",\"Orkh\",\"Orya\",\"Osge\",\"Osma\",\"Ougr\",\"Palm\",\"Pauc\",\"Pcun\",\"Pelm\",\"Perm\",\"Phag\",\"Phli\",\"Phlp\",\"Phlv\",\"Phnx\",\"Plrd\",\"Piqd\",\"Prti\",\"Psin\",\"Qaaa\",\"Qaab\",\"Qaac\",\"Qaad\",\"Qaae\",\"Qaaf\",\"Qaag\",\"Qaah\",\"Qaai\",\"Qaaj\",\"Qaak\",\"Qaal\",\"Qaam\",\"Qaan\",\"Qaao\",\"Qaap\",\"Qaaq\",\"Qaar\",\"Qaas\",\"Qaat\",\"Qaau\",\"Qaav\",\"Qaaw\",\"Qaax\",\"Qaay\",\"Qaaz\",\"Qaba\",\"Qabb\",\"Qabc\",\"Qabd\",\"Qabe\",\"Qabf\",\"Qabg\",\"Qabh\",\"Qabi\",\"Qabj\",\"Qabk\",\"Qabl\",\"Qabm\",\"Qabn\",\"Qabo\",\"Qabp\",\"Qabq\",\"Qabr\",\"Qabs\",\"Qabt\",\"Qabu\",\"Qabv\",\"Qabw\",\"Qabx\",\"Ranj\",\"Rjng\",\"Rohg\",\"Roro\",\"Runr\",\"Samr\",\"Sara\",\"Sarb\",\"Saur\",\"Sgnw\",\"Shaw\",\"Shrd\",\"Shui\",\"Sidd\",\"Sidt\",\"Sind\",\"Sinh\",\"Sogd\",\"Sogo\",\"Sora\",\"Soyo\",\"Sund\",\"Sunu\",\"Sylo\",\"Syrc\",\"Syre\",\"Syrj\",\"Syrn\",\"Tagb\",\"Takr\",\"Tale\",\"Talu\",\"Taml\",\"Tang\",\"Tavt\",\"Tayo\",\"Telu\",\"Teng\",\"Tfng\",\"Tglg\",\"Thaa\",\"Thai\",\"Tibt\",\"Tirh\",\"Tnsa\",\"Todr\",\"Tols\",\"Toto\",\"Tutg\",\"Ugar\",\"Vaii\",\"Visp\",\"Vith\",\"Wara\",\"Wcho\",\"Wole\",\"Xpeo\",\"Xsux\",\"Yezi\",\"Yiii\",\"Zanb\",\"Zinh\",\"Zmth\",\"Zsye\",\"Zsym\",\"Zxxx\",\"Zyyy\",\"Zzzz\"]);t.ScriptCodes=s},5338:(e,t,r)=>{const n=r(1636);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,\"\"),t);return r?r.version:null}},5358:(e,t,r)=>{var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();o.exportSymbol(\"proto.google.protobuf.Any\",null,s),proto.google.protobuf.Any=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.Any,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.Any.displayName=\"proto.google.protobuf.Any\"),n.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={typeUrl:n.Message.getFieldWithDefault(t,1,\"\"),value:t.getValue_asB64()};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.Any.deserializeBinary=function(e){var t=new n.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();){switch(t.getFieldNumber()){case 1:var r=t.readString();e.setTypeUrl(r);break;case 2:r=t.readBytes();e.setValue(r);break;default:t.skipField()}}return e},proto.google.protobuf.Any.prototype.serializeBinary=function(){var e=new n.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()).length>0&&t.writeString(1,r),(r=e.getValue_asU8()).length>0&&t.writeBytes(2,r)},proto.google.protobuf.Any.prototype.getTypeUrl=function(){return n.Message.getFieldWithDefault(this,1,\"\")},proto.google.protobuf.Any.prototype.setTypeUrl=function(e){return n.Message.setProto3StringField(this,1,e)},proto.google.protobuf.Any.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,2,\"\")},proto.google.protobuf.Any.prototype.getValue_asB64=function(){return n.Message.bytesAsB64(this.getValue())},proto.google.protobuf.Any.prototype.getValue_asU8=function(){return n.Message.bytesAsU8(this.getValue())},proto.google.protobuf.Any.prototype.setValue=function(e){return n.Message.setProto3BytesField(this,2,e)},o.object.extend(t,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}},5410:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,o.default)(e),new RegExp(\"^[a-fA-F0-9]{\".concat(s[t],\"}$\")).test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={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};e.exports=t.default,e.exports.default=t.default},5441:(e,t,r)=>{const n=r(7784);e.exports=(e,t,r)=>{const o=new n(e,r),s=new n(t,r);return o.compare(s)||o.compareBuild(s)}},5456:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>n(e,t,r)>0},5478:(e,t,r)=>{const n=r(7784),o=r(1636),{safeRe:s,t:a}=r(946);e.exports=(e,t)=>{if(e instanceof n)return e;if(\"number\"==typeof e&&(e=String(e)),\"string\"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?s[a.COERCERTLFULL]:s[a.COERCERTL];let o;for(;(o=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&o.index+o[0].length===r.index+r[0].length||(r=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?s[a.COERCEFULL]:s[a.COERCE]);if(null===r)return null;const i=r[2],c=r[3]||\"0\",u=r[4]||\"0\",l=t.includePrerelease&&r[5]?`-${r[5]}`:\"\",d=t.includePrerelease&&r[6]?`+${r[6]}`:\"\";return o(`${i}.${c}.${u}${l}${d}`,t)}},5578:(e,t,r)=>{const n=r(7784),o=r(2859);e.exports=(e,t,r)=>{let s=null,a=null,i=null;try{i=new o(t,r)}catch(e){return null}return e.forEach(e=>{i.test(e)&&(s&&1!==a.compare(e)||(s=e,a=new n(s,r)))}),s}},5627:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(0o)?[0-7]+$/i;e.exports=t.default,e.exports.default=t.default},5635:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){t=(0,o.default)(t,s);var r=e.split(\"@\"),n=r.pop(),d=[r.join(\"@\"),n];if(d[1]=d[1].toLowerCase(),\"gmail.com\"===d[1]||\"googlemail.com\"===d[1]){if(t.gmail_remove_subaddress&&(d[0]=d[0].split(\"+\")[0]),t.gmail_remove_dots&&(d[0]=d[0].replace(/\\.+/g,l)),!d[0].length)return!1;(t.all_lowercase||t.gmail_lowercase)&&(d[0]=d[0].toLowerCase()),d[1]=t.gmail_convert_googlemaildotcom?\"gmail.com\":d[1]}else if(a.indexOf(d[1])>=0){if(t.icloud_remove_subaddress&&(d[0]=d[0].split(\"+\")[0]),!d[0].length)return!1;(t.all_lowercase||t.icloud_lowercase)&&(d[0]=d[0].toLowerCase())}else if(i.indexOf(d[1])>=0){if(t.outlookdotcom_remove_subaddress&&(d[0]=d[0].split(\"+\")[0]),!d[0].length)return!1;(t.all_lowercase||t.outlookdotcom_lowercase)&&(d[0]=d[0].toLowerCase())}else if(c.indexOf(d[1])>=0){if(t.yahoo_remove_subaddress){var f=d[0].split(\"-\");d[0]=f.length>1?f.slice(0,-1).join(\"-\"):f[0]}if(!d[0].length)return!1;(t.all_lowercase||t.yahoo_lowercase)&&(d[0]=d[0].toLowerCase())}else u.indexOf(d[1])>=0?((t.all_lowercase||t.yandex_lowercase)&&(d[0]=d[0].toLowerCase()),d[1]=t.yandex_convert_yandexru?\"yandex.ru\":d[1]):t.all_lowercase&&(d[0]=d[0].toLowerCase());return d.join(\"@\")};var n,o=(n=r(2533))&&n.__esModule?n:{default:n};var s={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,yandex_convert_yandexru:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},a=[\"icloud.com\",\"me.com\"],i=[\"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\"],c=[\"rocketmail.com\",\"yahoo.ca\",\"yahoo.co.uk\",\"yahoo.com\",\"yahoo.de\",\"yahoo.fr\",\"yahoo.in\",\"yahoo.it\",\"ymail.com\"],u=[\"yandex.ru\",\"yandex.ua\",\"yandex.kz\",\"yandex.com\",\"yandex.by\",\"ya.ru\"];function l(e){return e.length>1?e:\"\"}e.exports=t.default,e.exports.default=t.default},5647:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},5716:(e,t,r)=>{const n=r(2859),o=r(8308),{ANY:s}=o,a=r(8346),i=r(532),c=[new o(\">=0.0.0-0\")],u=[new o(\">=0.0.0\")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=r.includePrerelease?c:u}if(1===t.length&&t[0].semver===s){if(r.includePrerelease)return!0;t=u}const n=new Set;let o,l,p,h,g,y,m;for(const t of e)\">\"===t.operator||\">=\"===t.operator?o=d(o,t,r):\"<\"===t.operator||\"<=\"===t.operator?l=f(l,t,r):n.add(t.semver);if(n.size>1)return null;if(o&&l){if(p=i(o.semver,l.semver,r),p>0)return null;if(0===p&&(\">=\"!==o.operator||\"<=\"!==l.operator))return null}for(const e of n){if(o&&!a(e,String(o),r))return null;if(l&&!a(e,String(l),r))return null;for(const n of t)if(!a(e,String(n),r))return!1;return!0}let b=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,w=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;b&&1===b.prerelease.length&&\"<\"===l.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(m=m||\">\"===e.operator||\">=\"===e.operator,y=y||\"<\"===e.operator||\"<=\"===e.operator,o)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),\">\"===e.operator||\">=\"===e.operator){if(h=d(o,e,r),h===e&&h!==o)return!1}else if(\">=\"===o.operator&&!a(o.semver,String(e),r))return!1;if(l)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),\"<\"===e.operator||\"<=\"===e.operator){if(g=f(l,e,r),g===e&&g!==l)return!1}else if(\"<=\"===l.operator&&!a(l.semver,String(e),r))return!1;if(!e.operator&&(l||o)&&0!==p)return!1}return!(o&&y&&!l&&0!==p)&&(!(l&&m&&!o&&0!==p)&&(!w&&!b))},d=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n>0?e:n<0||\">\"===t.operator&&\">=\"===e.operator?t:e},f=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n<0?e:n>0||\"<\"===t.operator&&\"<=\"===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},5830:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.default)(e),s.test(e)};var n=o(r(8354));function o(e){return e&&e.__esModule?e:{default:e}}var s=(0,o(r(9043)).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\");e.exports=t.default,e.exports.default=t.default},5933:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>n(e,t,r)>=0},5977:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[^\\s-_](?!.*?[-_]{2,})[a-z0-9-\\\\][^\\s]*[^-_\\s]$/;e.exports=t.default,e.exports.default=t.default},5997:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r,s;if((0,n.default)(e),t=(0,o.default)(t,{urlSafe:!1,padding:!(null!==(r=t)&&void 0!==r&&r.urlSafe)}),\"\"===e)return!0;if(t.padding&&e.length%4!=0)return!1;s=t.urlSafe?t.padding?c:u:t.padding?a:i;return(!t.padding||e.length%4==0)&&s.test(e)};var n=s(r(8354)),o=s(r(2533));function s(e){return e&&e.__esModule?e:{default:e}}var a=/^[A-Za-z0-9+/]+={0,2}$/,i=/^[A-Za-z0-9+/]+$/,c=/^[A-Za-z0-9_-]+={0,2}$/,u=/^[A-Za-z0-9_-]+$/;e.exports=t.default,e.exports.default=t.default},6070:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.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,\"&\")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},6198:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,o.default)(e);var t=e.slice(4,6).toUpperCase();if(!s.CountryCodes.has(t)&&\"XK\"!==t)return!1;return a.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(2736);var a=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;e.exports=t.default,e.exports.default=t.default},6237:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[A-Z]{2}[0-9A-Z]{3}\\d{2}\\d{5}$/;e.exports=t.default,e.exports.default=t.default},6255:(e,t,r)=>{const n=r(8247);e.exports=(e,t,r)=>n(e,t,\">\",r)},6298:(e,t,r)=>{const n=r(8247);e.exports=(e,t,r)=>n(e,t,\"<\",r)},6299:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),f.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/([01][0-9]|2[0-3])/,a=/[0-5][0-9]/,i=new RegExp(\"[-+]\".concat(s.source,\":\").concat(a.source)),c=new RegExp(\"([zZ]|\".concat(i.source,\")\")),u=new RegExp(\"\".concat(s.source,\":\").concat(a.source,\":\").concat(/([0-5][0-9]|60)/.source).concat(/(\\.[0-9]+)?/.source)),l=new RegExp(\"\".concat(/[0-9]{4}/.source,\"-\").concat(/(0[1-9]|1[0-2])/.source,\"-\").concat(/([12]\\d|0[1-9]|3[01])/.source)),d=new RegExp(\"\".concat(u.source).concat(c.source)),f=new RegExp(\"^\".concat(l.source,\"[ tT]\").concat(d.source,\"$\"));e.exports=t.default,e.exports.default=t.default},6331:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(t);var n=(\"object\"===s(r)?r.version:arguments[1])||\"\";if(!n)return e(t,{version:4})||e(t,{version:6});if(\"4\"===n.toString())return c.test(t);if(\"6\"===n.toString())return l.test(t);return!1};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};function s(e){return s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s(e)}var a=\"(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\",i=\"(\".concat(a,\"[.]){3}\").concat(a),c=new RegExp(\"^\".concat(i,\"$\")),u=\"(?:[0-9a-fA-F]{1,4})\",l=new RegExp(\"^(\"+\"(?:\".concat(u,\":){7}(?:\").concat(u,\"|:)|\")+\"(?:\".concat(u,\":){6}(?:\").concat(i,\"|:\").concat(u,\"|:)|\")+\"(?:\".concat(u,\":){5}(?::\").concat(i,\"|(:\").concat(u,\"){1,2}|:)|\")+\"(?:\".concat(u,\":){4}(?:(:\").concat(u,\"){0,1}:\").concat(i,\"|(:\").concat(u,\"){1,3}|:)|\")+\"(?:\".concat(u,\":){3}(?:(:\").concat(u,\"){0,2}:\").concat(i,\"|(:\").concat(u,\"){1,4}|:)|\")+\"(?:\".concat(u,\":){2}(?:(:\").concat(u,\"){0,3}:\").concat(i,\"|(:\").concat(u,\"){1,5}|:)|\")+\"(?:\".concat(u,\":){1}(?:(:\").concat(u,\"){0,4}:\").concat(i,\"|(:\").concat(u,\"){1,6}|:)|\")+\"(?::((?::\".concat(u,\"){0,5}:\").concat(i,\"|(?::\").concat(u,\"){1,7}|:))\")+\")(%[0-9a-zA-Z.]{1,})?$\");e.exports=t.default,e.exports.default=t.default},6343:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t=(0,o.default)(t,d),!(0,s.default)(e,\",\"))return!1;var r=e.split(\",\");if(r[0].startsWith(\"(\")&&!r[1].endsWith(\")\")||r[1].endsWith(\")\")&&!r[0].startsWith(\"(\"))return!1;if(t.checkDMS)return u.test(r[0])&&l.test(r[1]);return i.test(r[0])&&c.test(r[1])};var n=a(r(8354)),o=a(r(2533)),s=a(r(4865));function a(e){return e&&e.__esModule?e:{default:e}}var i=/^\\(?[+-]?(90(\\.0+)?|[1-8]?\\d(\\.\\d+)?)$/,c=/^\\s?[+-]?(180(\\.0+)?|1[0-7]\\d(\\.\\d+)?|\\d{1,2}(\\.\\d+)?)\\)?$/,u=/^(([1-8]?\\d)\\D+([1-5]?\\d|60)\\D+([1-5]?\\d|60)(\\.\\d+)?|90\\D+0\\D+0)\\D+[NSns]?$/i,l=/^\\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,d={checkDMS:!1};e.exports=t.default,e.exports.default=t.default},6528:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(e);try{t=(0,s.default)(t,c);var r=[];t.allow_primitives&&(r=[null,!1,!0]);var a=JSON.parse(e);return(0,o.default)(r,a)||!!a&&\"object\"===i(a)}catch(e){}return!1};var n=a(r(8354)),o=a(r(567)),s=a(r(2533));function a(e){return e&&e.__esModule?e:{default:e}}function i(e){return i=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},i(e)}var c={allow_primitives:!1};e.exports=t.default,e.exports.default=t.default},6774:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/;e.exports=t.default,e.exports.default=t.default},6820:e=>{const t=\"object\"==typeof process&&process.env&&/\\bsemver\\b/i.test(\"false\")?(...e)=>console.error(\"SEMVER\",...e):()=>{};e.exports=t},6887:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e.toUpperCase())};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=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\"]);e.exports=t.default,e.exports.default=t.default},6919:(e,t,r)=>{var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")(),a=r(4781);o.object.extend(proto,a),o.exportSymbol(\"TronWebProto.AccountBalanceRequest\",null,s),o.exportSymbol(\"TronWebProto.AccountBalanceResponse\",null,s),o.exportSymbol(\"TronWebProto.AccountIdentifier\",null,s),o.exportSymbol(\"TronWebProto.AccountTrace\",null,s),o.exportSymbol(\"TronWebProto.BlockBalanceTrace\",null,s),o.exportSymbol(\"TronWebProto.BlockBalanceTrace.BlockIdentifier\",null,s),o.exportSymbol(\"TronWebProto.CancelAllUnfreezeV2Contract\",null,s),o.exportSymbol(\"TronWebProto.DelegateResourceContract\",null,s),o.exportSymbol(\"TronWebProto.FreezeBalanceContract\",null,s),o.exportSymbol(\"TronWebProto.FreezeBalanceV2Contract\",null,s),o.exportSymbol(\"TronWebProto.TransactionBalanceTrace\",null,s),o.exportSymbol(\"TronWebProto.TransactionBalanceTrace.Operation\",null,s),o.exportSymbol(\"TronWebProto.TransferContract\",null,s),o.exportSymbol(\"TronWebProto.UnDelegateResourceContract\",null,s),o.exportSymbol(\"TronWebProto.UnfreezeBalanceContract\",null,s),o.exportSymbol(\"TronWebProto.UnfreezeBalanceV2Contract\",null,s),o.exportSymbol(\"TronWebProto.WithdrawBalanceContract\",null,s),o.exportSymbol(\"TronWebProto.WithdrawExpireUnfreezeContract\",null,s),TronWebProto.FreezeBalanceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.FreezeBalanceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.FreezeBalanceContract.displayName=\"TronWebProto.FreezeBalanceContract\"),TronWebProto.UnfreezeBalanceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnfreezeBalanceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeBalanceContract.displayName=\"TronWebProto.UnfreezeBalanceContract\"),TronWebProto.WithdrawBalanceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WithdrawBalanceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WithdrawBalanceContract.displayName=\"TronWebProto.WithdrawBalanceContract\"),TronWebProto.TransferContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TransferContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransferContract.displayName=\"TronWebProto.TransferContract\"),TronWebProto.TransactionBalanceTrace=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.TransactionBalanceTrace.repeatedFields_,null)},o.inherits(TronWebProto.TransactionBalanceTrace,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransactionBalanceTrace.displayName=\"TronWebProto.TransactionBalanceTrace\"),TronWebProto.TransactionBalanceTrace.Operation=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TransactionBalanceTrace.Operation,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransactionBalanceTrace.Operation.displayName=\"TronWebProto.TransactionBalanceTrace.Operation\"),TronWebProto.BlockBalanceTrace=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.BlockBalanceTrace.repeatedFields_,null)},o.inherits(TronWebProto.BlockBalanceTrace,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BlockBalanceTrace.displayName=\"TronWebProto.BlockBalanceTrace\"),TronWebProto.BlockBalanceTrace.BlockIdentifier=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.BlockBalanceTrace.BlockIdentifier,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BlockBalanceTrace.BlockIdentifier.displayName=\"TronWebProto.BlockBalanceTrace.BlockIdentifier\"),TronWebProto.AccountTrace=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountTrace,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountTrace.displayName=\"TronWebProto.AccountTrace\"),TronWebProto.AccountIdentifier=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountIdentifier,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountIdentifier.displayName=\"TronWebProto.AccountIdentifier\"),TronWebProto.AccountBalanceRequest=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountBalanceRequest,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountBalanceRequest.displayName=\"TronWebProto.AccountBalanceRequest\"),TronWebProto.AccountBalanceResponse=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountBalanceResponse,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountBalanceResponse.displayName=\"TronWebProto.AccountBalanceResponse\"),TronWebProto.FreezeBalanceV2Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.FreezeBalanceV2Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.FreezeBalanceV2Contract.displayName=\"TronWebProto.FreezeBalanceV2Contract\"),TronWebProto.UnfreezeBalanceV2Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnfreezeBalanceV2Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeBalanceV2Contract.displayName=\"TronWebProto.UnfreezeBalanceV2Contract\"),TronWebProto.WithdrawExpireUnfreezeContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WithdrawExpireUnfreezeContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WithdrawExpireUnfreezeContract.displayName=\"TronWebProto.WithdrawExpireUnfreezeContract\"),TronWebProto.DelegateResourceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.DelegateResourceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.DelegateResourceContract.displayName=\"TronWebProto.DelegateResourceContract\"),TronWebProto.UnDelegateResourceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnDelegateResourceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnDelegateResourceContract.displayName=\"TronWebProto.UnDelegateResourceContract\"),TronWebProto.CancelAllUnfreezeV2Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.CancelAllUnfreezeV2Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.CancelAllUnfreezeV2Contract.displayName=\"TronWebProto.CancelAllUnfreezeV2Contract\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.FreezeBalanceContract.prototype.toObject=function(e){return TronWebProto.FreezeBalanceContract.toObject(e,this)},TronWebProto.FreezeBalanceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),frozenBalance:n.Message.getFieldWithDefault(t,2,0),frozenDuration:n.Message.getFieldWithDefault(t,3,0),resource:n.Message.getFieldWithDefault(t,10,0),receiverAddress:t.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.FreezeBalanceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.FreezeBalanceContract;return TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader(r,t)},TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setFrozenBalance(r);break;case 3:r=t.readInt64();e.setFrozenDuration(r);break;case 10:r=t.readEnum();e.setResource(r);break;case 15:r=t.readBytes();e.setReceiverAddress(r);break;default:t.skipField()}}return e},TronWebProto.FreezeBalanceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.FreezeBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.FreezeBalanceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getFrozenBalance())&&t.writeInt64(2,r),0!==(r=e.getFrozenDuration())&&t.writeInt64(3,r),0!==(r=e.getResource())&&t.writeEnum(10,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(15,r)},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.FreezeBalanceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.FreezeBalanceContract.prototype.getFrozenBalance=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.FreezeBalanceContract.prototype.setFrozenBalance=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.FreezeBalanceContract.prototype.getFrozenDuration=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.FreezeBalanceContract.prototype.setFrozenDuration=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.FreezeBalanceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.FreezeBalanceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,10,e)},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,15,\"\")},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.FreezeBalanceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,15,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeBalanceContract.prototype.toObject=function(e){return TronWebProto.UnfreezeBalanceContract.toObject(e,this)},TronWebProto.UnfreezeBalanceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),resource:n.Message.getFieldWithDefault(t,10,0),receiverAddress:t.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnfreezeBalanceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnfreezeBalanceContract;return TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader(r,t)},TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 10:r=t.readEnum();e.setResource(r);break;case 15:r=t.readBytes();e.setReceiverAddress(r);break;default:t.skipField()}}return e},TronWebProto.UnfreezeBalanceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getResource())&&t.writeEnum(10,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(15,r)},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UnfreezeBalanceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.UnfreezeBalanceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,10,e)},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,15,\"\")},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.UnfreezeBalanceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,15,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WithdrawBalanceContract.prototype.toObject=function(e){return TronWebProto.WithdrawBalanceContract.toObject(e,this)},TronWebProto.WithdrawBalanceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WithdrawBalanceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WithdrawBalanceContract;return TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader(r,t)},TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField()}return e},TronWebProto.WithdrawBalanceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WithdrawBalanceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransferContract.prototype.toObject=function(e){return TronWebProto.TransferContract.toObject(e,this)},TronWebProto.TransferContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),toAddress:t.getToAddress_asB64(),amount:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransferContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransferContract;return TronWebProto.TransferContract.deserializeBinaryFromReader(r,t)},TronWebProto.TransferContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setToAddress(r);break;case 3:r=t.readInt64();e.setAmount(r);break;default:t.skipField()}}return e},TronWebProto.TransferContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransferContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransferContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getToAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getAmount())&&t.writeInt64(3,r)},TronWebProto.TransferContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.TransferContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TransferContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TransferContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TransferContract.prototype.getToAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.TransferContract.prototype.getToAddress_asB64=function(){return n.Message.bytesAsB64(this.getToAddress())},TronWebProto.TransferContract.prototype.getToAddress_asU8=function(){return n.Message.bytesAsU8(this.getToAddress())},TronWebProto.TransferContract.prototype.setToAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TransferContract.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.TransferContract.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.TransactionBalanceTrace.repeatedFields_=[2],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransactionBalanceTrace.prototype.toObject=function(e){return TronWebProto.TransactionBalanceTrace.toObject(e,this)},TronWebProto.TransactionBalanceTrace.toObject=function(e,t){var r={transactionIdentifier:t.getTransactionIdentifier_asB64(),operationList:n.Message.toObjectList(t.getOperationList(),TronWebProto.TransactionBalanceTrace.Operation.toObject,e),type:n.Message.getFieldWithDefault(t,3,\"\"),status:n.Message.getFieldWithDefault(t,4,\"\")};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransactionBalanceTrace.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransactionBalanceTrace;return TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader(r,t)},TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setTransactionIdentifier(r);break;case 2:r=new TronWebProto.TransactionBalanceTrace.Operation;t.readMessage(r,TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader),e.addOperation(r);break;case 3:r=t.readString();e.setType(r);break;case 4:r=t.readString();e.setStatus(r);break;default:t.skipField()}}return e},TronWebProto.TransactionBalanceTrace.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getTransactionIdentifier_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOperationList()).length>0&&t.writeRepeatedMessage(2,r,TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter),(r=e.getType()).length>0&&t.writeString(3,r),(r=e.getStatus()).length>0&&t.writeString(4,r)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransactionBalanceTrace.Operation.prototype.toObject=function(e){return TronWebProto.TransactionBalanceTrace.Operation.toObject(e,this)},TronWebProto.TransactionBalanceTrace.Operation.toObject=function(e,t){var r={operationIdentifier:n.Message.getFieldWithDefault(t,1,0),address:t.getAddress_asB64(),amount:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransactionBalanceTrace.Operation.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransactionBalanceTrace.Operation;return TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader(r,t)},TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setOperationIdentifier(r);break;case 2:r=t.readBytes();e.setAddress(r);break;case 3:r=t.readInt64();e.setAmount(r);break;default:t.skipField()}}return e},TronWebProto.TransactionBalanceTrace.Operation.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getOperationIdentifier())&&t.writeInt64(1,r),(r=e.getAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getAmount())&&t.writeInt64(3,r)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getOperationIdentifier=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.TransactionBalanceTrace.Operation.prototype.setOperationIdentifier=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.TransactionBalanceTrace.Operation.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.TransactionBalanceTrace.Operation.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier_asB64=function(){return n.Message.bytesAsB64(this.getTransactionIdentifier())},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier_asU8=function(){return n.Message.bytesAsU8(this.getTransactionIdentifier())},TronWebProto.TransactionBalanceTrace.prototype.setTransactionIdentifier=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TransactionBalanceTrace.prototype.getOperationList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.TransactionBalanceTrace.Operation,2)},TronWebProto.TransactionBalanceTrace.prototype.setOperationList=function(e){return n.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.TransactionBalanceTrace.prototype.addOperation=function(e,t){return n.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.TransactionBalanceTrace.Operation,t)},TronWebProto.TransactionBalanceTrace.prototype.clearOperationList=function(){return this.setOperationList([])},TronWebProto.TransactionBalanceTrace.prototype.getType=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.TransactionBalanceTrace.prototype.setType=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.TransactionBalanceTrace.prototype.getStatus=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.TransactionBalanceTrace.prototype.setStatus=function(e){return n.Message.setProto3StringField(this,4,e)},TronWebProto.BlockBalanceTrace.repeatedFields_=[3],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BlockBalanceTrace.prototype.toObject=function(e){return TronWebProto.BlockBalanceTrace.toObject(e,this)},TronWebProto.BlockBalanceTrace.toObject=function(e,t){var r,o={blockIdentifier:(r=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r),timestamp:n.Message.getFieldWithDefault(t,2,0),transactionBalanceTraceList:n.Message.toObjectList(t.getTransactionBalanceTraceList(),TronWebProto.TransactionBalanceTrace.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.BlockBalanceTrace.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BlockBalanceTrace;return TronWebProto.BlockBalanceTrace.deserializeBinaryFromReader(r,t)},TronWebProto.BlockBalanceTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(r,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(r);break;case 2:r=t.readInt64();e.setTimestamp(r);break;case 3:r=new TronWebProto.TransactionBalanceTrace;t.readMessage(r,TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader),e.addTransactionBalanceTrace(r);break;default:t.skipField()}}return e},TronWebProto.BlockBalanceTrace.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BlockBalanceTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BlockBalanceTrace.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getBlockIdentifier())&&t.writeMessage(1,r,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter),0!==(r=e.getTimestamp())&&t.writeInt64(2,r),(r=e.getTransactionBalanceTraceList()).length>0&&t.writeRepeatedMessage(3,r,TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.toObject=function(e){return TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,this)},TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject=function(e,t){var r={hash:t.getHash_asB64(),number:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;return TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader(r,t)},TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setHash(r);break;case 2:r=t.readInt64();e.setNumber(r);break;default:t.skipField()}}return e},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getHash_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getNumber())&&t.writeInt64(2,r)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asB64=function(){return n.Message.bytesAsB64(this.getHash())},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asU8=function(){return n.Message.bytesAsU8(this.getHash())},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.setHash=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getNumber=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.setNumber=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.BlockBalanceTrace.prototype.getBlockIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,1)},TronWebProto.BlockBalanceTrace.prototype.setBlockIdentifier=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.BlockBalanceTrace.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.BlockBalanceTrace.prototype.hasBlockIdentifier=function(){return null!=n.Message.getField(this,1)},TronWebProto.BlockBalanceTrace.prototype.getTimestamp=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BlockBalanceTrace.prototype.setTimestamp=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.BlockBalanceTrace.prototype.getTransactionBalanceTraceList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.TransactionBalanceTrace,3)},TronWebProto.BlockBalanceTrace.prototype.setTransactionBalanceTraceList=function(e){return n.Message.setRepeatedWrapperField(this,3,e)},TronWebProto.BlockBalanceTrace.prototype.addTransactionBalanceTrace=function(e,t){return n.Message.addToRepeatedWrapperField(this,3,e,TronWebProto.TransactionBalanceTrace,t)},TronWebProto.BlockBalanceTrace.prototype.clearTransactionBalanceTraceList=function(){return this.setTransactionBalanceTraceList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountTrace.prototype.toObject=function(e){return TronWebProto.AccountTrace.toObject(e,this)},TronWebProto.AccountTrace.toObject=function(e,t){var r={balance:n.Message.getFieldWithDefault(t,1,0),placeholder:n.Message.getFieldWithDefault(t,99,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountTrace.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountTrace;return TronWebProto.AccountTrace.deserializeBinaryFromReader(r,t)},TronWebProto.AccountTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setBalance(r);break;case 99:r=t.readInt64();e.setPlaceholder(r);break;default:t.skipField()}}return e},TronWebProto.AccountTrace.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountTrace.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getBalance())&&t.writeInt64(1,r),0!==(r=e.getPlaceholder())&&t.writeInt64(99,r)},TronWebProto.AccountTrace.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.AccountTrace.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.AccountTrace.prototype.getPlaceholder=function(){return n.Message.getFieldWithDefault(this,99,0)},TronWebProto.AccountTrace.prototype.setPlaceholder=function(e){return n.Message.setProto3IntField(this,99,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountIdentifier.prototype.toObject=function(e){return TronWebProto.AccountIdentifier.toObject(e,this)},TronWebProto.AccountIdentifier.toObject=function(e,t){var r={address:t.getAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountIdentifier.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountIdentifier;return TronWebProto.AccountIdentifier.deserializeBinaryFromReader(r,t)},TronWebProto.AccountIdentifier.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setAddress(r)}else t.skipField()}return e},TronWebProto.AccountIdentifier.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountIdentifier.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountIdentifier.serializeBinaryToWriter=function(e,t){var r;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.AccountIdentifier.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.AccountIdentifier.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.AccountIdentifier.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.AccountIdentifier.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountBalanceRequest.prototype.toObject=function(e){return TronWebProto.AccountBalanceRequest.toObject(e,this)},TronWebProto.AccountBalanceRequest.toObject=function(e,t){var r,n={accountIdentifier:(r=t.getAccountIdentifier())&&TronWebProto.AccountIdentifier.toObject(e,r),blockIdentifier:(r=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.AccountBalanceRequest.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountBalanceRequest;return TronWebProto.AccountBalanceRequest.deserializeBinaryFromReader(r,t)},TronWebProto.AccountBalanceRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.AccountIdentifier;t.readMessage(r,TronWebProto.AccountIdentifier.deserializeBinaryFromReader),e.setAccountIdentifier(r);break;case 2:r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(r,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(r);break;default:t.skipField()}}return e},TronWebProto.AccountBalanceRequest.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountBalanceRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountBalanceRequest.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getAccountIdentifier())&&t.writeMessage(1,r,TronWebProto.AccountIdentifier.serializeBinaryToWriter),null!=(r=e.getBlockIdentifier())&&t.writeMessage(2,r,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter)},TronWebProto.AccountBalanceRequest.prototype.getAccountIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.AccountIdentifier,1)},TronWebProto.AccountBalanceRequest.prototype.setAccountIdentifier=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.AccountBalanceRequest.prototype.clearAccountIdentifier=function(){return this.setAccountIdentifier(void 0)},TronWebProto.AccountBalanceRequest.prototype.hasAccountIdentifier=function(){return null!=n.Message.getField(this,1)},TronWebProto.AccountBalanceRequest.prototype.getBlockIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,2)},TronWebProto.AccountBalanceRequest.prototype.setBlockIdentifier=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.AccountBalanceRequest.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.AccountBalanceRequest.prototype.hasBlockIdentifier=function(){return null!=n.Message.getField(this,2)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountBalanceResponse.prototype.toObject=function(e){return TronWebProto.AccountBalanceResponse.toObject(e,this)},TronWebProto.AccountBalanceResponse.toObject=function(e,t){var r,o={balance:n.Message.getFieldWithDefault(t,1,0),blockIdentifier:(r=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.AccountBalanceResponse.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountBalanceResponse;return TronWebProto.AccountBalanceResponse.deserializeBinaryFromReader(r,t)},TronWebProto.AccountBalanceResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setBalance(r);break;case 2:r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(r,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(r);break;default:t.skipField()}}return e},TronWebProto.AccountBalanceResponse.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountBalanceResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountBalanceResponse.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getBalance())&&t.writeInt64(1,r),null!=(r=e.getBlockIdentifier())&&t.writeMessage(2,r,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter)},TronWebProto.AccountBalanceResponse.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.AccountBalanceResponse.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.AccountBalanceResponse.prototype.getBlockIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,2)},TronWebProto.AccountBalanceResponse.prototype.setBlockIdentifier=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.AccountBalanceResponse.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.AccountBalanceResponse.prototype.hasBlockIdentifier=function(){return null!=n.Message.getField(this,2)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.FreezeBalanceV2Contract.prototype.toObject=function(e){return TronWebProto.FreezeBalanceV2Contract.toObject(e,this)},TronWebProto.FreezeBalanceV2Contract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),frozenBalance:n.Message.getFieldWithDefault(t,2,0),resource:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.FreezeBalanceV2Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.FreezeBalanceV2Contract;return TronWebProto.FreezeBalanceV2Contract.deserializeBinaryFromReader(r,t)},TronWebProto.FreezeBalanceV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setFrozenBalance(r);break;case 3:r=t.readEnum();e.setResource(r);break;default:t.skipField()}}return e},TronWebProto.FreezeBalanceV2Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.FreezeBalanceV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.FreezeBalanceV2Contract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getFrozenBalance())&&t.writeInt64(2,r),0!==(r=e.getResource())&&t.writeEnum(3,r)},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.FreezeBalanceV2Contract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.FreezeBalanceV2Contract.prototype.getFrozenBalance=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.FreezeBalanceV2Contract.prototype.setFrozenBalance=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.FreezeBalanceV2Contract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.FreezeBalanceV2Contract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeBalanceV2Contract.prototype.toObject=function(e){return TronWebProto.UnfreezeBalanceV2Contract.toObject(e,this)},TronWebProto.UnfreezeBalanceV2Contract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),unfreezeBalance:n.Message.getFieldWithDefault(t,2,0),resource:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnfreezeBalanceV2Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnfreezeBalanceV2Contract;return TronWebProto.UnfreezeBalanceV2Contract.deserializeBinaryFromReader(r,t)},TronWebProto.UnfreezeBalanceV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setUnfreezeBalance(r);break;case 3:r=t.readEnum();e.setResource(r);break;default:t.skipField()}}return e},TronWebProto.UnfreezeBalanceV2Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnfreezeBalanceV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeBalanceV2Contract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getUnfreezeBalance())&&t.writeInt64(2,r),0!==(r=e.getResource())&&t.writeEnum(3,r)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceV2Contract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getUnfreezeBalance=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.UnfreezeBalanceV2Contract.prototype.setUnfreezeBalance=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UnfreezeBalanceV2Contract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WithdrawExpireUnfreezeContract.prototype.toObject=function(e){return TronWebProto.WithdrawExpireUnfreezeContract.toObject(e,this)},TronWebProto.WithdrawExpireUnfreezeContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WithdrawExpireUnfreezeContract;return TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader(r,t)},TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField()}return e},TronWebProto.WithdrawExpireUnfreezeContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WithdrawExpireUnfreezeContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WithdrawExpireUnfreezeContract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WithdrawExpireUnfreezeContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.DelegateResourceContract.prototype.toObject=function(e){return TronWebProto.DelegateResourceContract.toObject(e,this)},TronWebProto.DelegateResourceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),resource:n.Message.getFieldWithDefault(t,2,0),balance:n.Message.getFieldWithDefault(t,3,0),receiverAddress:t.getReceiverAddress_asB64(),lock:n.Message.getBooleanFieldWithDefault(t,5,!1),lockPeriod:n.Message.getFieldWithDefault(t,6,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.DelegateResourceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.DelegateResourceContract;return TronWebProto.DelegateResourceContract.deserializeBinaryFromReader(r,t)},TronWebProto.DelegateResourceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readEnum();e.setResource(r);break;case 3:r=t.readInt64();e.setBalance(r);break;case 4:r=t.readBytes();e.setReceiverAddress(r);break;case 5:r=t.readBool();e.setLock(r);break;case 6:r=t.readInt64();e.setLockPeriod(r);break;default:t.skipField()}}return e},TronWebProto.DelegateResourceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.DelegateResourceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.DelegateResourceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getResource())&&t.writeEnum(2,r),0!==(r=e.getBalance())&&t.writeInt64(3,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(4,r),(r=e.getLock())&&t.writeBool(5,r),0!==(r=e.getLockPeriod())&&t.writeInt64(6,r)},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.DelegateResourceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.DelegateResourceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.DelegateResourceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.DelegateResourceContract.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.DelegateResourceContract.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.DelegateResourceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.DelegateResourceContract.prototype.getLock=function(){return n.Message.getBooleanFieldWithDefault(this,5,!1)},TronWebProto.DelegateResourceContract.prototype.setLock=function(e){return n.Message.setProto3BooleanField(this,5,e)},TronWebProto.DelegateResourceContract.prototype.getLockPeriod=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.DelegateResourceContract.prototype.setLockPeriod=function(e){return n.Message.setProto3IntField(this,6,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnDelegateResourceContract.prototype.toObject=function(e){return TronWebProto.UnDelegateResourceContract.toObject(e,this)},TronWebProto.UnDelegateResourceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),resource:n.Message.getFieldWithDefault(t,2,0),balance:n.Message.getFieldWithDefault(t,3,0),receiverAddress:t.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnDelegateResourceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnDelegateResourceContract;return TronWebProto.UnDelegateResourceContract.deserializeBinaryFromReader(r,t)},TronWebProto.UnDelegateResourceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readEnum();e.setResource(r);break;case 3:r=t.readInt64();e.setBalance(r);break;case 4:r=t.readBytes();e.setReceiverAddress(r);break;default:t.skipField()}}return e},TronWebProto.UnDelegateResourceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnDelegateResourceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnDelegateResourceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getResource())&&t.writeEnum(2,r),0!==(r=e.getBalance())&&t.writeInt64(3,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(4,r)},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnDelegateResourceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UnDelegateResourceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.UnDelegateResourceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.UnDelegateResourceContract.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UnDelegateResourceContract.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.UnDelegateResourceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.CancelAllUnfreezeV2Contract.prototype.toObject=function(e){return TronWebProto.CancelAllUnfreezeV2Contract.toObject(e,this)},TronWebProto.CancelAllUnfreezeV2Contract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.CancelAllUnfreezeV2Contract;return TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinaryFromReader(r,t)},TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField()}return e},TronWebProto.CancelAllUnfreezeV2Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.CancelAllUnfreezeV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.CancelAllUnfreezeV2Contract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.CancelAllUnfreezeV2Contract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},o.object.extend(t,TronWebProto)},6959:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[\\x00-\\x7F]+$/;e.exports=t.default,e.exports.default=t.default},6969:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e,{allow_leading_zeroes:!1,min:0,max:65535})};var n,o=(n=r(3353))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},6982:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r,n;(0,o.default)(e),\"object\"===s(t)?(r=t.min||0,n=t.max):(r=arguments[1]||0,n=arguments[2]);var a=e.match(/(\\uFE0F|\\uFE0E)/g)||[],i=e.match(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g)||[],c=e.length-a.length-i.length,u=c>=r&&(void 0===n||c<=n);if(u&&Array.isArray(null==t?void 0:t.discreteLengths))return t.discreteLengths.some(function(e){return e===c});return u};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};function s(e){return s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},7186:function(e,t,r){var n=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(e,t,r){e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value)},o=\"undefined\"!=typeof window&&window===this?this:void 0!==r.g&&null!=r.g?r.g:this;function s(){s=function(){},o.Symbol||(o.Symbol=c)}function a(e,t){this.a=e,n(this,\"description\",{configurable:!0,writable:!0,value:t})}a.prototype.toString=function(){return this.a};var i,c=(i=0,function e(t){if(this instanceof e)throw new TypeError(\"Symbol is not a constructor\");return new a(\"jscomp_symbol_\"+(t||\"\")+\"_\"+i++,t)});function u(){s();var e=o.Symbol.iterator;e||(e=o.Symbol.iterator=o.Symbol(\"Symbol.iterator\")),\"function\"!=typeof Array.prototype[e]&&n(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return function(e){return u(),e={next:e},e[o.Symbol.iterator]=function(){return this},e}(function(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}(this))}}),u=function(){}}!function(e,t){if(t){var r=o;e=e.split(\".\");for(var s=0;s<e.length-1;s++){var a=e[s];a in r||(r[a]={}),r=r[a]}(t=t(s=r[e=e[e.length-1]]))!=s&&null!=t&&n(r,e,{configurable:!0,writable:!0,value:t})}}(\"Array.prototype.entries\",function(e){return e||function(){return function(e,t){u(),e instanceof String&&(e+=\"\");var r=0,n={next:function(){if(r<e.length){var o=r++;return{value:t(o,e[o]),done:!1}}return n.next=function(){return{done:!0,value:void 0}},n.next()}};return n[Symbol.iterator]=function(){return n},n}(this,function(e,t){return[e,t]})}});var l=this||self;function d(e,t,r){e=e.split(\".\"),r=r||l,e[0]in r||void 0===r.execScript||r.execScript(\"var \"+e[0]);for(var n;e.length&&(n=e.shift());)e.length||void 0===t?r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}:r[n]=t}function f(e){var t=typeof e;if(\"object\"==t){if(!e)return\"null\";if(e instanceof Array)return\"array\";if(e instanceof Object)return t;var r=Object.prototype.toString.call(e);if(\"[object Window]\"==r)return\"object\";if(\"[object Array]\"==r||\"number\"==typeof e.length&&void 0!==e.splice&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable(\"splice\"))return\"array\";if(\"[object Function]\"==r||void 0!==e.call&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable(\"call\"))return\"function\"}else if(\"function\"==t&&void 0===e.call)return\"object\";return t}function p(e){var t=typeof e;return\"object\"==t&&null!=e||\"function\"==t}var h=\"constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf\".split(\" \");var g=Array.prototype.forEach?function(e,t){Array.prototype.forEach.call(e,t,void 0)}:function(e,t){for(var r=e.length,n=\"string\"==typeof e?e.split(\"\"):e,o=0;o<r;o++)o in n&&t.call(void 0,n[o],o,e)},y=Array.prototype.map?function(e,t){return Array.prototype.map.call(e,t,void 0)}:function(e,t){for(var r=e.length,n=Array(r),o=\"string\"==typeof e?e.split(\"\"):e,s=0;s<r;s++)s in o&&(n[s]=t.call(void 0,o[s],s,e));return n};function m(e,t,r){return 2>=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,r)}function b(e,t,r,n){var o=\"Assertion failed\";if(r){o+=\": \"+r;var s=n}else e&&(o+=\": \"+e,s=t);throw Error(o,s||[])}function w(e,t,r){for(var n=[],o=2;o<arguments.length;++o)n[o-2]=arguments[o];return e||b(\"\",null,t,n),e}function T(e,t){for(var r=[],n=1;n<arguments.length;++n)r[n-1]=arguments[n];throw Error(\"Failure\"+(e?\": \"+e:\"\"),r)}function A(e,t,r,n){for(var o=[],s=3;s<arguments.length;++s)o[s-3]=arguments[s];e instanceof t||b(\"Expected instanceof %s but got %s.\",[v(t),v(e)],r,o)}function v(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):null===e?\"null\":typeof e}function P(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++){var r=(t=this.c[e])[0];this.a[r.toString()]=new W(r,t[1])}this.arrClean=!0}}function E(e){this.a=0,this.b=e}function C(e,t){return e.b?(t.a||(t.a=new e.b(t.value)),t.a):t.value}function B(e){e=e.a;var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.push(t);return r}function W(e,t){this.key=e,this.value=t,this.a=void 0}function S(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,m(e,r,r+8192));return t}d(\"jspb.Map\",P,void 0),P.prototype.g=function(){if(this.arrClean){if(this.b){var e,t=this.a;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=t[e].a;r&&r.g()}}}else{for(this.c.length=0,(t=B(this)).sort(),e=0;e<t.length;e++){var n=this.a[t[e]];(r=n.a)&&r.g(),this.c.push([n.key,n.value])}this.arrClean=!0}return this.c},P.prototype.toArray=P.prototype.g,P.prototype.Mc=function(e,t){for(var r=this.g(),n=[],o=0;o<r.length;o++){var s=this.a[r[o][0].toString()];C(this,s);var a=s.a;a?(w(t),n.push([s.key,t(e,a)])):n.push([s.key,s.value])}return n},P.prototype.toObject=P.prototype.Mc,P.fromObject=function(e,t,r){t=new P([],t);for(var n=0;n<e.length;n++){var o=e[n][0],s=r(e[n][1]);t.set(o,s)}return t},E.prototype.next=function(){return this.a<this.b.length?{done:!1,value:this.b[this.a++]}:{done:!0,value:void 0}},\"undefined\"!=typeof Symbol&&(E.prototype[Symbol.iterator]=function(){return this}),P.prototype.Jb=function(){return B(this).length},P.prototype.getLength=P.prototype.Jb,P.prototype.clear=function(){this.a={},this.arrClean=!1},P.prototype.clear=P.prototype.clear,P.prototype.Cb=function(e){e=e.toString();var t=this.a.hasOwnProperty(e);return delete this.a[e],this.arrClean=!1,t},P.prototype.del=P.prototype.Cb,P.prototype.Eb=function(){var e=[],t=B(this);t.sort();for(var r=0;r<t.length;r++){var n=this.a[t[r]];e.push([n.key,n.value])}return e},P.prototype.getEntryList=P.prototype.Eb,P.prototype.entries=function(){var e=[],t=B(this);t.sort();for(var r=0;r<t.length;r++){var n=this.a[t[r]];e.push([n.key,C(this,n)])}return new E(e)},P.prototype.entries=P.prototype.entries,P.prototype.keys=function(){var e=[],t=B(this);t.sort();for(var r=0;r<t.length;r++)e.push(this.a[t[r]].key);return new E(e)},P.prototype.keys=P.prototype.keys,P.prototype.values=function(){var e=[],t=B(this);t.sort();for(var r=0;r<t.length;r++)e.push(C(this,this.a[t[r]]));return new E(e)},P.prototype.values=P.prototype.values,P.prototype.forEach=function(e,t){var r=B(this);r.sort();for(var n=0;n<r.length;n++){var o=this.a[r[n]];e.call(t,C(this,o),o.key,this)}},P.prototype.forEach=P.prototype.forEach,P.prototype.set=function(e,t){var r=new W(e);return this.b?(r.a=t,r.value=t.g()):r.value=t,this.a[e.toString()]=r,this.arrClean=!1,this},P.prototype.set=P.prototype.set,P.prototype.get=function(e){if(e=this.a[e.toString()])return C(this,e)},P.prototype.get=P.prototype.get,P.prototype.has=function(e){return e.toString()in this.a},P.prototype.has=P.prototype.has,P.prototype.Jc=function(e,t,r,n,o){var s=B(this);s.sort();for(var a=0;a<s.length;a++){var i=this.a[s[a]];t.Va(e),r.call(t,1,i.key),this.b?n.call(t,2,C(this,i),o):n.call(t,2,i.value),t.Ya()}},P.prototype.serializeBinary=P.prototype.Jc,P.deserializeBinary=function(e,t,r,n,o,s,a){for(;t.oa()&&!t.bb();){var i=t.c;1==i?s=r.call(t):2==i&&(e.b?(w(o),a||(a=new e.b),n.call(t,a,o)):a=n.call(t))}w(null!=s),w(null!=a),e.set(s,a)};var I={\"\\0\":\"\\\\0\",\"\\b\":\"\\\\b\",\"\\f\":\"\\\\f\",\"\\n\":\"\\\\n\",\"\\r\":\"\\\\r\",\"\\t\":\"\\\\t\",\"\\v\":\"\\\\x0B\",'\"':'\\\\\"',\"\\\\\":\"\\\\\\\\\",\"<\":\"\\\\u003C\"},_={\"'\":\"\\\\'\"},R={},x=null;function O(e,t){void 0===t&&(t=0),F(),t=R[t];for(var r=[],n=0;n<e.length;n+=3){var o=e[n],s=n+1<e.length,a=s?e[n+1]:0,i=n+2<e.length,c=i?e[n+2]:0,u=o>>2;o=(3&o)<<4|a>>4,a=(15&a)<<2|c>>6,c&=63,i||(c=64,s||(a=64)),r.push(t[u],t[o],t[a]||\"\",t[c]||\"\")}return r.join(\"\")}function M(e){var t=e.length,r=3*t/4;r%3?r=Math.floor(r):-1!=\"=.\".indexOf(e[t-1])&&(r=-1!=\"=.\".indexOf(e[t-2])?r-2:r-1);var n=new Uint8Array(r),o=0;return function(e,t){function r(t){for(;n<e.length;){var r=e.charAt(n++),o=x[r];if(null!=o)return o;if(!/^[\\s\\xa0]*$/.test(r))throw Error(\"Unknown base64 encoding at char: \"+r)}return t}F();for(var n=0;;){var o=r(-1),s=r(0),a=r(64),i=r(64);if(64===i&&-1===o)break;t(o<<2|s>>4),64!=a&&(t(s<<4&240|a>>2),64!=i&&t(a<<6&192|i))}}(e,function(e){n[o++]=e}),n.subarray(0,o)}function F(){if(!x){x={};for(var e=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\".split(\"\"),t=[\"+/=\",\"+/\",\"-_=\",\"-_.\",\"-_\"],r=0;5>r;r++){var n=e.concat(t[r].split(\"\"));R[r]=n;for(var o=0;o<n.length;o++){var s=n[o];void 0===x[s]&&(x[s]=o)}}}}d(\"jspb.ConstBinaryMessage\",function(){},void 0),d(\"jspb.BinaryMessage\",function(){},void 0),d(\"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),d(\"jspb.BinaryConstants.WireType\",{yb:-1,ue:0,xb:1,de:2,qe:3,fe:4,wb:5},void 0),d(\"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),d(\"jspb.BinaryConstants.INVALID_FIELD_NUMBER\",-1,void 0),d(\"jspb.BinaryConstants.FLOAT32_EPS\",1401298464324817e-60,void 0),d(\"jspb.BinaryConstants.FLOAT32_MIN\",11754943508222875e-54,void 0),d(\"jspb.BinaryConstants.FLOAT32_MAX\",34028234663852886e22,void 0),d(\"jspb.BinaryConstants.FLOAT64_EPS\",5e-324,void 0),d(\"jspb.BinaryConstants.FLOAT64_MIN\",22250738585072014e-324,void 0),d(\"jspb.BinaryConstants.FLOAT64_MAX\",17976931348623157e292,void 0),d(\"jspb.BinaryConstants.TWO_TO_20\",1048576,void 0),d(\"jspb.BinaryConstants.TWO_TO_23\",8388608,void 0),d(\"jspb.BinaryConstants.TWO_TO_31\",2147483648,void 0),d(\"jspb.BinaryConstants.TWO_TO_32\",4294967296,void 0),d(\"jspb.BinaryConstants.TWO_TO_52\",4503599627370496,void 0),d(\"jspb.BinaryConstants.TWO_TO_63\",0x8000000000000000,void 0),d(\"jspb.BinaryConstants.TWO_TO_64\",0x10000000000000000,void 0),d(\"jspb.BinaryConstants.ZERO_HASH\",\"\\0\\0\\0\\0\\0\\0\\0\\0\",void 0);var k=0,N=0;function U(e){var t=e>>>0;e=Math.floor((e-t)/4294967296)>>>0,k=t,N=e}function D(e){var t=0>e,r=(e=Math.abs(e))>>>0;e=Math.floor((e-r)/4294967296),e>>>=0,t&&(e=~e>>>0,4294967295<(r=(~r>>>0)+1)&&(r=0,4294967295<++e&&(e=0))),k=r,N=e}function L(e){var t=0>e;U(e=2*Math.abs(e)),e=k;var r=N;t&&(0==e?0==r?r=e=4294967295:(r--,e=4294967295):e--),k=e,N=r}function $(e){var t=0>e?1:0;if(0===(e=t?-e:e))0<1/e?k=N=0:(N=0,k=2147483648);else if(isNaN(e))N=0,k=2147483647;else if(34028234663852886e22<e)N=0,k=(t<<31|2139095040)>>>0;else if(11754943508222875e-54>e)e=Math.round(e/Math.pow(2,-149)),N=0,k=(t<<31|e)>>>0;else{var r=Math.floor(Math.log(e)/Math.LN2);e*=Math.pow(2,-r),16777216<=(e=Math.round(8388608*e))&&++r,N=0,k=(t<<31|r+127<<23|8388607&e)>>>0}}function z(e){var t=0>e?1:0;if(0===(e=t?-e:e))N=0<1/e?0:2147483648,k=0;else if(isNaN(e))N=2147483647,k=4294967295;else if(17976931348623157e292<e)N=(t<<31|2146435072)>>>0,k=0;else if(22250738585072014e-324>e)e/=Math.pow(2,-1074),N=(t<<31|e/4294967296)>>>0,k=e>>>0;else{var r=e,n=0;if(2<=r)for(;2<=r&&1023>n;)n++,r/=2;else for(;1>r&&-1022<n;)r*=2,n--;e*=Math.pow(2,-n),N=(t<<31|n+1023<<20|1048576*e&1048575)>>>0,k=4503599627370496*e>>>0}}function j(e){var t=e.charCodeAt(4),r=e.charCodeAt(5),n=e.charCodeAt(6),o=e.charCodeAt(7);k=e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)>>>0,N=t+(r<<8)+(n<<16)+(o<<24)>>>0}function V(e,t){return 4294967296*t+(e>>>0)}function G(e,t){var r=2147483648&t;return r&&(t=~t>>>0,0==(e=1+~e>>>0)&&(t=t+1>>>0)),e=V(e,t),r?-e:e}function H(e,t,r){var n=t>>31;return r(e<<1^n,(t<<1|e>>>31)^n)}function K(e,t){return q(e,t,G)}function q(e,t,r){var n=-(1&e);return r((e>>>1|t<<31)^n,t>>>1^n)}function Z(e){var t=2*(e>>31)+1,r=e>>>23&255;return e&=8388607,255==r?e?NaN:1/0*t:0==r?t*Math.pow(2,-149)*e:t*Math.pow(2,r-150)*(e+Math.pow(2,23))}function J(e,t){var r=2*(t>>31)+1,n=t>>>20&2047;return e=4294967296*(1048575&t)+e,2047==n?e?NaN:1/0*r:0==n?r*Math.pow(2,-1074)*e:r*Math.pow(2,n-1075)*(e+4503599627370496)}function Y(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)}function X(e,t){function r(e,t){return e=e?String(e):\"\",t?\"0000000\".slice(e.length)+e:e}if(2097151>=t)return\"\"+V(e,t);var n=(e>>>24|t<<8)>>>0&16777215;return e=(16777215&e)+6777216*n+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,1e7<=e&&(n+=Math.floor(e/1e7),e%=1e7),1e7<=n&&(t+=Math.floor(n/1e7),n%=1e7),r(t,0)+r(n,t)+r(e,1)}function Q(e,t){var r=2147483648&t;return r&&(t=~t+(0==(e=1+~e>>>0)?1:0)>>>0),e=X(e,t),r?\"-\"+e:e}function ee(e,t){j(e),e=k;var r=N;return t?Q(e,r):X(e,r)}function te(e){function t(e,t){for(var r=0;8>r&&(1!==e||0<t);r++)t=e*n[r]+t,n[r]=255&t,t>>>=8}w(0<e.length);var r=!1;\"-\"===e[0]&&(r=!0,e=e.slice(1));for(var n=[0,0,0,0,0,0,0,0],o=0;o<e.length;o++)t(10,e.charCodeAt(o)-48);return r&&(function(){for(var e=0;8>e;e++)n[e]=255&~n[e]}(),t(1,1)),S(n)}function re(e){return String.fromCharCode(10>e?48+e:87+e)}function ne(e){return 97<=e?e-97+10:e-48}function oe(e,t,r,n,o){var s=0;if(128>n)for(;t<r&&e[t++]==n;)s++,t+=o;else for(;t<r;){for(var a=n;128<a;){if(e[t++]!=(127&a|128))return s;a>>=7}if(e[t++]!=a)break;s++,t+=o}return s}function se(e){return e.constructor===Uint8Array?e:e.constructor===ArrayBuffer||e.constructor===Array?new Uint8Array(e):e.constructor===String?M(e):e instanceof Uint8Array?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):(T(\"Type not convertible to Uint8Array.\"),new Uint8Array(0))}function ae(e,t,r){this.b=null,this.a=this.c=this.h=0,this.v=!1,e&&this.H(e,t,r)}d(\"jspb.utils.getSplit64Low\",function(){return k},void 0),d(\"jspb.utils.getSplit64High\",function(){return N},void 0),d(\"jspb.utils.splitUint64\",U,void 0),d(\"jspb.utils.splitInt64\",D,void 0),d(\"jspb.utils.splitZigzag64\",L,void 0),d(\"jspb.utils.splitFloat32\",$,void 0),d(\"jspb.utils.splitFloat64\",z,void 0),d(\"jspb.utils.splitHash64\",j,void 0),d(\"jspb.utils.joinUint64\",V,void 0),d(\"jspb.utils.joinInt64\",G,void 0),d(\"jspb.utils.toZigzag64\",H,void 0),d(\"jspb.utils.joinZigzag64\",K,void 0),d(\"jspb.utils.fromZigzag64\",q,void 0),d(\"jspb.utils.joinFloat32\",Z,void 0),d(\"jspb.utils.joinFloat64\",J,void 0),d(\"jspb.utils.joinHash64\",Y,void 0),d(\"jspb.utils.DIGITS\",\"0123456789abcdef\".split(\"\"),void 0),d(\"jspb.utils.joinUnsignedDecimalString\",X,void 0),d(\"jspb.utils.joinSignedDecimalString\",Q,void 0),d(\"jspb.utils.hash64ToDecimalString\",ee,void 0),d(\"jspb.utils.hash64ArrayToDecimalStrings\",function(e,t){for(var r=Array(e.length),n=0;n<e.length;n++)r[n]=ee(e[n],t);return r},void 0),d(\"jspb.utils.decimalStringToHash64\",te,void 0),d(\"jspb.utils.splitDecimalString\",function(e){j(te(e))},void 0),d(\"jspb.utils.hash64ToHexString\",function(e){var t=Array(18);t[0]=\"0\",t[1]=\"x\";for(var r=0;8>r;r++){var n=e.charCodeAt(7-r);t[2*r+2]=re(n>>4),t[2*r+3]=re(15&n)}return t.join(\"\")},void 0),d(\"jspb.utils.hexStringToHash64\",function(e){w(18==(e=e.toLowerCase()).length),w(\"0\"==e[0]),w(\"x\"==e[1]);for(var t=\"\",r=0;8>r;r++)t=String.fromCharCode(16*ne(e.charCodeAt(2*r+2))+ne(e.charCodeAt(2*r+3)))+t;return t},void 0),d(\"jspb.utils.hash64ToNumber\",function(e,t){j(e),e=k;var r=N;return t?G(e,r):V(e,r)},void 0),d(\"jspb.utils.numberToHash64\",function(e){return D(e),Y(k,N)},void 0),d(\"jspb.utils.countVarints\",function(e,t,r){for(var n=0,o=t;o<r;o++)n+=e[o]>>7;return r-t-n},void 0),d(\"jspb.utils.countVarintFields\",function(e,t,r,n){var o=0;if(128>(n*=8))for(;t<r&&e[t++]==n;)for(o++;;){var s=e[t++];if(!(128&s))break}else for(;t<r;){for(s=n;128<s;){if(e[t]!=(127&s|128))return o;t++,s>>=7}if(e[t++]!=s)break;for(o++;128&(s=e[t++]););}return o},void 0),d(\"jspb.utils.countFixed32Fields\",function(e,t,r,n){return oe(e,t,r,8*n+5,4)},void 0),d(\"jspb.utils.countFixed64Fields\",function(e,t,r,n){return oe(e,t,r,8*n+1,8)},void 0),d(\"jspb.utils.countDelimitedFields\",function(e,t,r,n){var o=0;for(n=8*n+2;t<r;){for(var s=n;128<s;){if(e[t++]!=(127&s|128))return o;s>>=7}if(e[t++]!=s)break;o++;for(var a=0,i=1;a+=(127&(s=e[t++]))*i,i*=128,128&s;);t+=a}return o},void 0),d(\"jspb.utils.debugBytesToTextFormat\",function(e){var t='\"';if(e){e=se(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),d(\"jspb.utils.debugScalarToTextFormat\",function(e){if(\"string\"==typeof e){e=String(e);for(var t=['\"'],r=0;r<e.length;r++){var n,o=e.charAt(r),s=o.charCodeAt(0),a=r+1;(n=I[o])||(31<s&&127>s||((s=o)in _?o=_[s]:s in I?o=_[s]=I[s]:(31<(n=s.charCodeAt(0))&&127>n?o=s:(256>n?(o=\"\\\\x\",(16>n||256<n)&&(o+=\"0\")):(o=\"\\\\u\",4096>n&&(o+=\"0\")),o+=n.toString(16).toUpperCase()),o=_[s]=o)),n=o),t[a]=n}t.push('\"'),e=t.join(\"\")}else e=e.toString();return e},void 0),d(\"jspb.utils.stringToByteArray\",function(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++){var n=e.charCodeAt(r);if(255<n)throw Error(\"Conversion error: string contains codepoint outside of byte range\");t[r]=n}return t},void 0),d(\"jspb.utils.byteSourceToUint8Array\",se,void 0),d(\"jspb.BinaryDecoder\",ae,void 0);var ie=[];function ce(e,t,r){if(ie.length){var n=ie.pop();return e&&n.H(e,t,r),n}return new ae(e,t,r)}function ue(e,t,r){this.a=ce(e,t,r),this.O=this.a.B(),this.b=this.c=-1,this.h=!1,this.v=null}ae.getInstanceCacheLength=function(){return ie.length},ae.alloc=ce,ae.prototype.Ca=function(){this.clear(),100>ie.length&&ie.push(this)},ae.prototype.free=ae.prototype.Ca,ae.prototype.clone=function(){return ce(this.b,this.h,this.c-this.h)},ae.prototype.clone=ae.prototype.clone,ae.prototype.clear=function(){this.b=null,this.a=this.c=this.h=0,this.v=!1},ae.prototype.clear=ae.prototype.clear,ae.prototype.Y=function(){return this.b},ae.prototype.getBuffer=ae.prototype.Y,ae.prototype.H=function(e,t,r){this.b=se(e),this.h=void 0!==t?t:0,this.c=void 0!==r?this.h+r:this.b.length,this.a=this.h},ae.prototype.setBlock=ae.prototype.H,ae.prototype.Db=function(){return this.c},ae.prototype.getEnd=ae.prototype.Db,ae.prototype.setEnd=function(e){this.c=e},ae.prototype.setEnd=ae.prototype.setEnd,ae.prototype.reset=function(){this.a=this.h},ae.prototype.reset=ae.prototype.reset,ae.prototype.B=function(){return this.a},ae.prototype.getCursor=ae.prototype.B,ae.prototype.Ma=function(e){this.a=e},ae.prototype.setCursor=ae.prototype.Ma,ae.prototype.advance=function(e){this.a+=e,w(this.a<=this.c)},ae.prototype.advance=ae.prototype.advance,ae.prototype.ya=function(){return this.a==this.c},ae.prototype.atEnd=ae.prototype.ya,ae.prototype.Qb=function(){return this.a>this.c},ae.prototype.pastEnd=ae.prototype.Qb,ae.prototype.getError=function(){return this.v||0>this.a||this.a>this.c},ae.prototype.getError=ae.prototype.getError,ae.prototype.w=function(e){for(var t=128,r=0,n=0,o=0;4>o&&128<=t;o++)r|=(127&(t=this.b[this.a++]))<<7*o;if(128<=t&&(r|=(127&(t=this.b[this.a++]))<<28,n|=(127&t)>>4),128<=t)for(o=0;5>o&&128<=t;o++)n|=(127&(t=this.b[this.a++]))<<7*o+3;if(128>t)return e(r>>>0,n>>>0);T(\"Failed to read varint, encoding is invalid.\"),this.v=!0},ae.prototype.readSplitVarint64=ae.prototype.w,ae.prototype.ea=function(e){return this.w(function(t,r){return q(t,r,e)})},ae.prototype.readSplitZigzagVarint64=ae.prototype.ea,ae.prototype.ta=function(e){var t=this.b,r=this.a;this.a+=8;for(var n=0,o=0,s=r+7;s>=r;s--)n=n<<8|t[s],o=o<<8|t[s+4];return e(n,o)},ae.prototype.readSplitFixed64=ae.prototype.ta,ae.prototype.kb=function(){for(;128&this.b[this.a];)this.a++;this.a++},ae.prototype.skipVarint=ae.prototype.kb,ae.prototype.mb=function(e){for(;128<e;)this.a--,e>>>=7;this.a--},ae.prototype.unskipVarint=ae.prototype.mb,ae.prototype.o=function(){var e=this.b,t=e[this.a],r=127&t;return 128>t?(this.a+=1,w(this.a<=this.c),r):(r|=(127&(t=e[this.a+1]))<<7,128>t?(this.a+=2,w(this.a<=this.c),r):(r|=(127&(t=e[this.a+2]))<<14,128>t?(this.a+=3,w(this.a<=this.c),r):(r|=(127&(t=e[this.a+3]))<<21,128>t?(this.a+=4,w(this.a<=this.c),r):(r|=(15&(t=e[this.a+4]))<<28,128>t?(this.a+=5,w(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++]&&w(!1),w(this.a<=this.c),r)))))},ae.prototype.readUnsignedVarint32=ae.prototype.o,ae.prototype.da=function(){return~~this.o()},ae.prototype.readSignedVarint32=ae.prototype.da,ae.prototype.O=function(){return this.o().toString()},ae.prototype.Ea=function(){return this.da().toString()},ae.prototype.readSignedVarint32String=ae.prototype.Ea,ae.prototype.Ia=function(){var e=this.o();return e>>>1^-(1&e)},ae.prototype.readZigzagVarint32=ae.prototype.Ia,ae.prototype.Ga=function(){return this.w(V)},ae.prototype.readUnsignedVarint64=ae.prototype.Ga,ae.prototype.Ha=function(){return this.w(X)},ae.prototype.readUnsignedVarint64String=ae.prototype.Ha,ae.prototype.sa=function(){return this.w(G)},ae.prototype.readSignedVarint64=ae.prototype.sa,ae.prototype.Fa=function(){return this.w(Q)},ae.prototype.readSignedVarint64String=ae.prototype.Fa,ae.prototype.Ja=function(){return this.w(K)},ae.prototype.readZigzagVarint64=ae.prototype.Ja,ae.prototype.fb=function(){return this.ea(Y)},ae.prototype.readZigzagVarintHash64=ae.prototype.fb,ae.prototype.Ka=function(){return this.ea(Q)},ae.prototype.readZigzagVarint64String=ae.prototype.Ka,ae.prototype.Gc=function(){var e=this.b[this.a];return this.a+=1,w(this.a<=this.c),e},ae.prototype.readUint8=ae.prototype.Gc,ae.prototype.Ec=function(){var e=this.b[this.a],t=this.b[this.a+1];return this.a+=2,w(this.a<=this.c),e|t<<8},ae.prototype.readUint16=ae.prototype.Ec,ae.prototype.m=function(){var e=this.b[this.a],t=this.b[this.a+1],r=this.b[this.a+2],n=this.b[this.a+3];return this.a+=4,w(this.a<=this.c),(e|t<<8|r<<16|n<<24)>>>0},ae.prototype.readUint32=ae.prototype.m,ae.prototype.ga=function(){return V(this.m(),this.m())},ae.prototype.readUint64=ae.prototype.ga,ae.prototype.ha=function(){return X(this.m(),this.m())},ae.prototype.readUint64String=ae.prototype.ha,ae.prototype.Xb=function(){var e=this.b[this.a];return this.a+=1,w(this.a<=this.c),e<<24>>24},ae.prototype.readInt8=ae.prototype.Xb,ae.prototype.Vb=function(){var e=this.b[this.a],t=this.b[this.a+1];return this.a+=2,w(this.a<=this.c),(e|t<<8)<<16>>16},ae.prototype.readInt16=ae.prototype.Vb,ae.prototype.P=function(){var e=this.b[this.a],t=this.b[this.a+1],r=this.b[this.a+2],n=this.b[this.a+3];return this.a+=4,w(this.a<=this.c),e|t<<8|r<<16|n<<24},ae.prototype.readInt32=ae.prototype.P,ae.prototype.ba=function(){return G(this.m(),this.m())},ae.prototype.readInt64=ae.prototype.ba,ae.prototype.ca=function(){return Q(this.m(),this.m())},ae.prototype.readInt64String=ae.prototype.ca,ae.prototype.aa=function(){return Z(this.m())},ae.prototype.readFloat=ae.prototype.aa,ae.prototype.Z=function(){return J(this.m(),this.m())},ae.prototype.readDouble=ae.prototype.Z,ae.prototype.pa=function(){return!!this.b[this.a++]},ae.prototype.readBool=ae.prototype.pa,ae.prototype.ra=function(){return this.da()},ae.prototype.readEnum=ae.prototype.ra,ae.prototype.fa=function(e){var t=this.b,r=this.a;e=r+e;for(var n=[],o=\"\";r<e;){var s=t[r++];if(128>s)n.push(s);else{if(192>s)continue;if(224>s){var a=t[r++];n.push((31&s)<<6|63&a)}else if(240>s){a=t[r++];var i=t[r++];n.push((15&s)<<12|(63&a)<<6|63&i)}else if(248>s){s=(7&s)<<18|(63&(a=t[r++]))<<12|(63&(i=t[r++]))<<6|63&t[r++],s-=65536,n.push(55296+(s>>10&1023),56320+(1023&s))}}8192<=n.length&&(o+=String.fromCharCode.apply(null,n),n.length=0)}return o+=S(n),this.a=r,o},ae.prototype.readString=ae.prototype.fa,ae.prototype.Dc=function(){var e=this.o();return this.fa(e)},ae.prototype.readStringWithLength=ae.prototype.Dc,ae.prototype.qa=function(e){if(0>e||this.a+e>this.b.length)return this.v=!0,T(\"Invalid byte length!\"),new Uint8Array(0);var t=this.b.subarray(this.a,this.a+e);return this.a+=e,w(this.a<=this.c),t},ae.prototype.readBytes=ae.prototype.qa,ae.prototype.ia=function(){return this.w(Y)},ae.prototype.readVarintHash64=ae.prototype.ia,ae.prototype.$=function(){var e=this.b,t=this.a,r=e[t],n=e[t+1],o=e[t+2],s=e[t+3],a=e[t+4],i=e[t+5],c=e[t+6];return e=e[t+7],this.a+=8,String.fromCharCode(r,n,o,s,a,i,c,e)},ae.prototype.readFixedHash64=ae.prototype.$,d(\"jspb.BinaryReader\",ue,void 0);var le=[];function de(e,t,r){if(le.length){var n=le.pop();return e&&n.a.H(e,t,r),n}return new ue(e,t,r)}function fe(e,t){w(2==e.b);var r=e.a.o();r=e.a.B()+r;for(var n=[];e.a.B()<r;)n.push(t.call(e.a));return n}function pe(e,t,r,n,o){this.ma=e,this.Ba=t,this.la=r,this.Na=n,this.na=o}function he(e,t,r,n,o,s){this.Za=e,this.za=t,this.Aa=r,this.Wa=n,this.Ab=o,this.Nb=s}function ge(){}ue.clearInstanceCache=function(){le=[]},ue.getInstanceCacheLength=function(){return le.length},ue.alloc=de,ue.prototype.zb=de,ue.prototype.alloc=ue.prototype.zb,ue.prototype.Ca=function(){this.a.clear(),this.b=this.c=-1,this.h=!1,this.v=null,100>le.length&&le.push(this)},ue.prototype.free=ue.prototype.Ca,ue.prototype.Fb=function(){return this.O},ue.prototype.getFieldCursor=ue.prototype.Fb,ue.prototype.B=function(){return this.a.B()},ue.prototype.getCursor=ue.prototype.B,ue.prototype.Y=function(){return this.a.Y()},ue.prototype.getBuffer=ue.prototype.Y,ue.prototype.Hb=function(){return this.c},ue.prototype.getFieldNumber=ue.prototype.Hb,ue.prototype.Lb=function(){return this.b},ue.prototype.getWireType=ue.prototype.Lb,ue.prototype.Mb=function(){return 2==this.b},ue.prototype.isDelimited=ue.prototype.Mb,ue.prototype.bb=function(){return 4==this.b},ue.prototype.isEndGroup=ue.prototype.bb,ue.prototype.getError=function(){return this.h||this.a.getError()},ue.prototype.getError=ue.prototype.getError,ue.prototype.H=function(e,t,r){this.a.H(e,t,r),this.b=this.c=-1},ue.prototype.setBlock=ue.prototype.H,ue.prototype.reset=function(){this.a.reset(),this.b=this.c=-1},ue.prototype.reset=ue.prototype.reset,ue.prototype.advance=function(e){this.a.advance(e)},ue.prototype.advance=ue.prototype.advance,ue.prototype.oa=function(){if(this.a.ya())return!1;if(this.getError())return T(\"Decoder hit an error\"),!1;this.O=this.a.B();var e=this.a.o(),t=e>>>3;return 0!=(e&=7)&&5!=e&&1!=e&&2!=e&&3!=e&&4!=e?(T(\"Invalid wire type: %s (at position %s)\",e,this.O),this.h=!0,!1):(this.c=t,this.b=e,!0)},ue.prototype.nextField=ue.prototype.oa,ue.prototype.Oa=function(){this.a.mb(this.c<<3|this.b)},ue.prototype.unskipHeader=ue.prototype.Oa,ue.prototype.Lc=function(){var e=this.c;for(this.Oa();this.oa()&&this.c==e;)this.C();this.a.ya()||this.Oa()},ue.prototype.skipMatchingFields=ue.prototype.Lc,ue.prototype.lb=function(){0!=this.b?(T(\"Invalid wire type for skipVarintField\"),this.C()):this.a.kb()},ue.prototype.skipVarintField=ue.prototype.lb,ue.prototype.gb=function(){if(2!=this.b)T(\"Invalid wire type for skipDelimitedField\"),this.C();else{var e=this.a.o();this.a.advance(e)}},ue.prototype.skipDelimitedField=ue.prototype.gb,ue.prototype.hb=function(){5!=this.b?(T(\"Invalid wire type for skipFixed32Field\"),this.C()):this.a.advance(4)},ue.prototype.skipFixed32Field=ue.prototype.hb,ue.prototype.ib=function(){1!=this.b?(T(\"Invalid wire type for skipFixed64Field\"),this.C()):this.a.advance(8)},ue.prototype.skipFixed64Field=ue.prototype.ib,ue.prototype.jb=function(){for(var e=this.c;;){if(!this.oa()){T(\"Unmatched start-group tag: stream EOF\"),this.h=!0;break}if(4==this.b){this.c!=e&&(T(\"Unmatched end-group tag\"),this.h=!0);break}this.C()}},ue.prototype.skipGroup=ue.prototype.jb,ue.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:T(\"Invalid wire encoding for field.\")}},ue.prototype.skipField=ue.prototype.C,ue.prototype.Hc=function(e,t){null===this.v&&(this.v={}),w(!this.v[e]),this.v[e]=t},ue.prototype.registerReadCallback=ue.prototype.Hc,ue.prototype.Ic=function(e){return w(null!==this.v),w(e=this.v[e]),e(this)},ue.prototype.runReadCallback=ue.prototype.Ic,ue.prototype.Yb=function(e,t){w(2==this.b);var r=this.a.c,n=this.a.o();n=this.a.B()+n,this.a.setEnd(n),t(e,this),this.a.Ma(n),this.a.setEnd(r)},ue.prototype.readMessage=ue.prototype.Yb,ue.prototype.Ub=function(e,t,r){w(3==this.b),w(this.c==e),r(t,this),this.h||4==this.b||(T(\"Group submessage did not end with an END_GROUP tag\"),this.h=!0)},ue.prototype.readGroup=ue.prototype.Ub,ue.prototype.Gb=function(){w(2==this.b);var e=this.a.o(),t=this.a.B(),r=t+e;return e=ce(this.a.Y(),t,e),this.a.Ma(r),e},ue.prototype.getFieldDecoder=ue.prototype.Gb,ue.prototype.P=function(){return w(0==this.b),this.a.da()},ue.prototype.readInt32=ue.prototype.P,ue.prototype.Wb=function(){return w(0==this.b),this.a.Ea()},ue.prototype.readInt32String=ue.prototype.Wb,ue.prototype.ba=function(){return w(0==this.b),this.a.sa()},ue.prototype.readInt64=ue.prototype.ba,ue.prototype.ca=function(){return w(0==this.b),this.a.Fa()},ue.prototype.readInt64String=ue.prototype.ca,ue.prototype.m=function(){return w(0==this.b),this.a.o()},ue.prototype.readUint32=ue.prototype.m,ue.prototype.Fc=function(){return w(0==this.b),this.a.O()},ue.prototype.readUint32String=ue.prototype.Fc,ue.prototype.ga=function(){return w(0==this.b),this.a.Ga()},ue.prototype.readUint64=ue.prototype.ga,ue.prototype.ha=function(){return w(0==this.b),this.a.Ha()},ue.prototype.readUint64String=ue.prototype.ha,ue.prototype.zc=function(){return w(0==this.b),this.a.Ia()},ue.prototype.readSint32=ue.prototype.zc,ue.prototype.Ac=function(){return w(0==this.b),this.a.Ja()},ue.prototype.readSint64=ue.prototype.Ac,ue.prototype.Bc=function(){return w(0==this.b),this.a.Ka()},ue.prototype.readSint64String=ue.prototype.Bc,ue.prototype.Rb=function(){return w(5==this.b),this.a.m()},ue.prototype.readFixed32=ue.prototype.Rb,ue.prototype.Sb=function(){return w(1==this.b),this.a.ga()},ue.prototype.readFixed64=ue.prototype.Sb,ue.prototype.Tb=function(){return w(1==this.b),this.a.ha()},ue.prototype.readFixed64String=ue.prototype.Tb,ue.prototype.vc=function(){return w(5==this.b),this.a.P()},ue.prototype.readSfixed32=ue.prototype.vc,ue.prototype.wc=function(){return w(5==this.b),this.a.P().toString()},ue.prototype.readSfixed32String=ue.prototype.wc,ue.prototype.xc=function(){return w(1==this.b),this.a.ba()},ue.prototype.readSfixed64=ue.prototype.xc,ue.prototype.yc=function(){return w(1==this.b),this.a.ca()},ue.prototype.readSfixed64String=ue.prototype.yc,ue.prototype.aa=function(){return w(5==this.b),this.a.aa()},ue.prototype.readFloat=ue.prototype.aa,ue.prototype.Z=function(){return w(1==this.b),this.a.Z()},ue.prototype.readDouble=ue.prototype.Z,ue.prototype.pa=function(){return w(0==this.b),!!this.a.o()},ue.prototype.readBool=ue.prototype.pa,ue.prototype.ra=function(){return w(0==this.b),this.a.sa()},ue.prototype.readEnum=ue.prototype.ra,ue.prototype.fa=function(){w(2==this.b);var e=this.a.o();return this.a.fa(e)},ue.prototype.readString=ue.prototype.fa,ue.prototype.qa=function(){w(2==this.b);var e=this.a.o();return this.a.qa(e)},ue.prototype.readBytes=ue.prototype.qa,ue.prototype.ia=function(){return w(0==this.b),this.a.ia()},ue.prototype.readVarintHash64=ue.prototype.ia,ue.prototype.Cc=function(){return w(0==this.b),this.a.fb()},ue.prototype.readSintHash64=ue.prototype.Cc,ue.prototype.w=function(e){return w(0==this.b),this.a.w(e)},ue.prototype.readSplitVarint64=ue.prototype.w,ue.prototype.ea=function(e){return w(0==this.b),this.a.w(function(t,r){return q(t,r,e)})},ue.prototype.readSplitZigzagVarint64=ue.prototype.ea,ue.prototype.$=function(){return w(1==this.b),this.a.$()},ue.prototype.readFixedHash64=ue.prototype.$,ue.prototype.ta=function(e){return w(1==this.b),this.a.ta(e)},ue.prototype.readSplitFixed64=ue.prototype.ta,ue.prototype.gc=function(){return fe(this,this.a.da)},ue.prototype.readPackedInt32=ue.prototype.gc,ue.prototype.hc=function(){return fe(this,this.a.Ea)},ue.prototype.readPackedInt32String=ue.prototype.hc,ue.prototype.ic=function(){return fe(this,this.a.sa)},ue.prototype.readPackedInt64=ue.prototype.ic,ue.prototype.jc=function(){return fe(this,this.a.Fa)},ue.prototype.readPackedInt64String=ue.prototype.jc,ue.prototype.qc=function(){return fe(this,this.a.o)},ue.prototype.readPackedUint32=ue.prototype.qc,ue.prototype.rc=function(){return fe(this,this.a.O)},ue.prototype.readPackedUint32String=ue.prototype.rc,ue.prototype.sc=function(){return fe(this,this.a.Ga)},ue.prototype.readPackedUint64=ue.prototype.sc,ue.prototype.tc=function(){return fe(this,this.a.Ha)},ue.prototype.readPackedUint64String=ue.prototype.tc,ue.prototype.nc=function(){return fe(this,this.a.Ia)},ue.prototype.readPackedSint32=ue.prototype.nc,ue.prototype.oc=function(){return fe(this,this.a.Ja)},ue.prototype.readPackedSint64=ue.prototype.oc,ue.prototype.pc=function(){return fe(this,this.a.Ka)},ue.prototype.readPackedSint64String=ue.prototype.pc,ue.prototype.bc=function(){return fe(this,this.a.m)},ue.prototype.readPackedFixed32=ue.prototype.bc,ue.prototype.cc=function(){return fe(this,this.a.ga)},ue.prototype.readPackedFixed64=ue.prototype.cc,ue.prototype.dc=function(){return fe(this,this.a.ha)},ue.prototype.readPackedFixed64String=ue.prototype.dc,ue.prototype.kc=function(){return fe(this,this.a.P)},ue.prototype.readPackedSfixed32=ue.prototype.kc,ue.prototype.lc=function(){return fe(this,this.a.ba)},ue.prototype.readPackedSfixed64=ue.prototype.lc,ue.prototype.mc=function(){return fe(this,this.a.ca)},ue.prototype.readPackedSfixed64String=ue.prototype.mc,ue.prototype.fc=function(){return fe(this,this.a.aa)},ue.prototype.readPackedFloat=ue.prototype.fc,ue.prototype.$b=function(){return fe(this,this.a.Z)},ue.prototype.readPackedDouble=ue.prototype.$b,ue.prototype.Zb=function(){return fe(this,this.a.pa)},ue.prototype.readPackedBool=ue.prototype.Zb,ue.prototype.ac=function(){return fe(this,this.a.ra)},ue.prototype.readPackedEnum=ue.prototype.ac,ue.prototype.uc=function(){return fe(this,this.a.ia)},ue.prototype.readPackedVarintHash64=ue.prototype.uc,ue.prototype.ec=function(){return fe(this,this.a.$)},ue.prototype.readPackedFixedHash64=ue.prototype.ec,d(\"jspb.ExtensionFieldInfo\",pe,void 0),d(\"jspb.ExtensionFieldBinaryInfo\",he,void 0),pe.prototype.F=function(){return!!this.la},pe.prototype.isMessageType=pe.prototype.F,d(\"jspb.Message\",ge,void 0),ge.GENERATE_TO_OBJECT=!0,ge.GENERATE_FROM_OBJECT=!0;var ye=\"function\"==typeof Uint8Array;ge.prototype.Ib=function(){return this.b},ge.prototype.getJsPbMessageId=ge.prototype.Ib,ge.initialize=function(e,t,r,n,o,s){if(e.f=null,t||(t=r?[r]:[]),e.b=r?String(r):void 0,e.D=0===r?-1:0,e.u=t,t=-1,!(r=e.u.length)||(t=r-1,null===(r=e.u[t])||\"object\"!=typeof r||Array.isArray(r)||ye&&r instanceof Uint8Array)?-1<n?(e.G=Math.max(n,t+1-e.D),e.i=null):e.G=Number.MAX_VALUE:(e.G=t-e.D,e.i=r),e.a={},o)for(n=0;n<o.length;n++)(t=o[n])<e.G?(t+=e.D,e.u[t]=e.u[t]||me):(be(e),e.i[t]=e.i[t]||me);if(s&&s.length)for(n=0;n<s.length;n++)_e(e,s[n])};var me=Object.freeze?Object.freeze([]):[];function be(e){var t=e.G+e.D;e.u[t]||(e.i=e.u[t]={})}function we(e,t,r){for(var n=[],o=0;o<e.length;o++)n[o]=t.call(e[o],r,e[o]);return n}function Te(e,t){if(t<e.G){t+=e.D;var r=e.u[t];return r===me?e.u[t]=[]:r}if(e.i)return(r=e.i[t])===me?e.i[t]=[]:r}function Ae(e,t){return null==(e=Te(e,t))?e:+e}function ve(e,t){return null==(e=Te(e,t))?e:!!e}function Pe(e){return null==e||\"string\"==typeof e?e:ye&&e instanceof Uint8Array?O(e):(T(\"Cannot coerce to b64 string: \"+f(e)),null)}function Ee(e){return null==e||e instanceof Uint8Array?e:\"string\"==typeof e?M(e):(T(\"Cannot coerce to Uint8Array: \"+f(e)),null)}function Ce(e){if(e&&1<e.length){var t=f(e[0]);g(e,function(e){f(e)!=t&&T(\"Inconsistent type in JSPB repeated field array. Got \"+f(e)+\" expected \"+t)})}}function Be(e,t,r){return null==(e=Te(e,t))?r:e}function We(e,t,r){return A(e,ge),t<e.G?e.u[t+e.D]=r:(be(e),e.i[t]=r),e}function Se(e,t,r,n){return A(e,ge),r!==n?We(e,t,r):t<e.G?e.u[t+e.D]=null:(be(e),delete e.i[t]),e}function Ie(e,t,r,n){return A(e,ge),(r=_e(e,r))&&r!==t&&void 0!==n&&(e.f&&r in e.f&&(e.f[r]=void 0),We(e,r,void 0)),We(e,t,n)}function _e(e,t){for(var r,n,o=0;o<t.length;o++){var s=t[o],a=Te(e,s);null!=a&&(r=s,n=a,We(e,s,void 0))}return r?(We(e,r,n),r):0}function Re(e,t,r){if(e.f||(e.f={}),!e.f[r]){for(var n=Te(e,r),o=[],s=0;s<n.length;s++)o[s]=new t(n[s]);e.f[r]=o}}function xe(e){if(e.f)for(var t in e.f){var r=e.f[t];if(Array.isArray(r))for(var n=0;n<r.length;n++)r[n]&&r[n].g();else r&&r.g()}}function Oe(e,t){e=e||{},t=t||{};var r,n={};for(r in e)n[r]=0;for(r in t)n[r]=0;for(r in n)if(!Me(e[r],t[r]))return!1;return!0}function Me(e,t){if(e==t)return!0;if(!p(e)||!p(t))return!!(\"number\"==typeof e&&isNaN(e)||\"number\"==typeof t&&isNaN(t))&&String(e)==String(t);if(e.constructor!=t.constructor)return!1;if(ye&&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 n=void 0,o=void 0,s=Math.max(e.length,t.length);for(r=0;r<s;r++){var a=e[r],i=t[r];if(a&&a.constructor==Object&&(w(void 0===n),w(r===e.length-1),n=a,a=void 0),i&&i.constructor==Object&&(w(void 0===o),w(r===t.length-1),o=i,i=void 0),!Me(a,i))return!1}return!n&&!o||Oe(n=n||{},o=o||{})}if(e.constructor===Object)return Oe(e,t);throw Error(\"Invalid type in JSPB array\")}function Fe(e){return new e.constructor(ke(e.g()))}function ke(e){if(Array.isArray(e)){for(var t=Array(e.length),r=0;r<e.length;r++){var n=e[r];null!=n&&(t[r]=\"object\"==typeof n?ke(w(n)):n)}return t}if(ye&&e instanceof Uint8Array)return new Uint8Array(e);for(r in t={},e)null!=(n=e[r])&&(t[r]=\"object\"==typeof n?ke(w(n)):n);return t}ge.toObjectList=we,ge.toObjectExtension=function(e,t,r,n,o){for(var s in r){var a=r[s],i=n.call(e,a);if(null!=i){for(var c in a.Ba)if(a.Ba.hasOwnProperty(c))break;t[c]=a.Na?a.na?we(i,a.Na,o):a.Na(o,i):i}}},ge.serializeBinaryExtensions=function(e,t,r,n){for(var o in r){var s=r[o],a=s.Za;if(!s.Aa)throw Error(\"Message extension present that was generated without binary serialization support\");var i=n.call(e,a);if(null!=i)if(a.F()){if(!s.Wa)throw Error(\"Message extension present holding submessage without binary support enabled, and message is being serialized to binary format\");s.Aa.call(t,a.ma,i,s.Wa)}else s.Aa.call(t,a.ma,i)}},ge.readBinaryExtension=function(e,t,r,n,o){var s=r[t.c];if(s){if(r=s.Za,!s.za)throw Error(\"Deserializing extension whose generated code does not support binary format\");if(r.F()){var a=new r.la;s.za.call(t,a,s.Ab)}else a=s.za.call(t);r.na&&!s.Nb?(t=n.call(e,r))?t.push(a):o.call(e,r,[a]):o.call(e,r,a)}else t.C()},ge.getField=Te,ge.getRepeatedField=function(e,t){return Te(e,t)},ge.getOptionalFloatingPointField=Ae,ge.getBooleanField=ve,ge.getRepeatedFloatingPointField=function(e,t){var r=Te(e,t);if(e.a||(e.a={}),!e.a[t]){for(var n=0;n<r.length;n++)r[n]=+r[n];e.a[t]=!0}return r},ge.getRepeatedBooleanField=function(e,t){var r=Te(e,t);if(e.a||(e.a={}),!e.a[t]){for(var n=0;n<r.length;n++)r[n]=!!r[n];e.a[t]=!0}return r},ge.bytesAsB64=Pe,ge.bytesAsU8=Ee,ge.bytesListAsB64=function(e){return Ce(e),e.length&&\"string\"!=typeof e[0]?y(e,Pe):e},ge.bytesListAsU8=function(e){return Ce(e),!e.length||e[0]instanceof Uint8Array?e:y(e,Ee)},ge.getFieldWithDefault=Be,ge.getBooleanFieldWithDefault=function(e,t,r){return null==(e=ve(e,t))?r:e},ge.getFloatingPointFieldWithDefault=function(e,t,r){return null==(e=Ae(e,t))?r:e},ge.getFieldProto3=Be,ge.getMapField=function(e,t,r,n){if(e.f||(e.f={}),t in e.f)return e.f[t];var o=Te(e,t);if(!o){if(r)return;We(e,t,o=[])}return e.f[t]=new P(o,n)},ge.setField=We,ge.setProto3IntField=function(e,t,r){return Se(e,t,r,0)},ge.setProto3FloatField=function(e,t,r){return Se(e,t,r,0)},ge.setProto3BooleanField=function(e,t,r){return Se(e,t,r,!1)},ge.setProto3StringField=function(e,t,r){return Se(e,t,r,\"\")},ge.setProto3BytesField=function(e,t,r){return Se(e,t,r,\"\")},ge.setProto3EnumField=function(e,t,r){return Se(e,t,r,0)},ge.setProto3StringIntField=function(e,t,r){return Se(e,t,r,\"0\")},ge.addToRepeatedField=function(e,t,r,n){return A(e,ge),t=Te(e,t),null!=n?t.splice(n,0,r):t.push(r),e},ge.setOneofField=Ie,ge.computeOneofCase=_e,ge.getWrapperField=function(e,t,r,n){if(e.f||(e.f={}),!e.f[r]){var o=Te(e,r);(n||o)&&(e.f[r]=new t(o))}return e.f[r]},ge.getRepeatedWrapperField=function(e,t,r){return Re(e,t,r),(t=e.f[r])==me&&(t=e.f[r]=[]),t},ge.setWrapperField=function(e,t,r){A(e,ge),e.f||(e.f={});var n=r?r.g():r;return e.f[t]=r,We(e,t,n)},ge.setOneofWrapperField=function(e,t,r,n){A(e,ge),e.f||(e.f={});var o=n?n.g():n;return e.f[t]=n,Ie(e,t,r,o)},ge.setRepeatedWrapperField=function(e,t,r){A(e,ge),e.f||(e.f={}),r=r||[];for(var n=[],o=0;o<r.length;o++)n[o]=r[o].g();return e.f[t]=r,We(e,t,n)},ge.addToRepeatedWrapperField=function(e,t,r,n,o){Re(e,n,t);var s=e.f[t];return s||(s=e.f[t]=[]),r=r||new n,e=Te(e,t),null!=o?(s.splice(o,0,r),e.splice(o,0,r.g())):(s.push(r),e.push(r.g())),r},ge.toMap=function(e,t,r,n){for(var o={},s=0;s<e.length;s++)o[t.call(e[s])]=r?r.call(e[s],n,e[s]):e[s];return o},ge.prototype.g=function(){return xe(this),this.u},ge.prototype.toArray=ge.prototype.g,ge.prototype.toString=function(){return xe(this),this.u.toString()},ge.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]=y(this.i[t]||[],function(t){return new e.la(t)})),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]}},ge.prototype.getExtension=ge.prototype.getExtension,ge.prototype.Kc=function(e,t){this.f||(this.f={}),be(this);var r=e.ma;return e.na?(t=t||[],e.F()?(this.f[r]=t,this.i[r]=y(t,function(e){return e.g()})):this.i[r]=t):e.F()?(this.f[r]=t,this.i[r]=t?t.g():t):this.i[r]=t,this},ge.prototype.setExtension=ge.prototype.Kc,ge.difference=function(e,t){if(!(e instanceof t.constructor))throw Error(\"Messages have different types.\");var r=e.g();t=t.g();var n=[],o=0,s=r.length>t.length?r.length:t.length;for(e.b&&(n[0]=e.b,o=1);o<s;o++)Me(r[o],t[o])||(n[o]=t[o]);return new e.constructor(n)},ge.equals=function(e,t){return e==t||!(!e||!t)&&e instanceof t.constructor&&Me(e.g(),t.g())},ge.compareExtensions=Oe,ge.compareFields=Me,ge.prototype.Bb=function(){return Fe(this)},ge.prototype.cloneMessage=ge.prototype.Bb,ge.prototype.clone=function(){return Fe(this)},ge.prototype.clone=ge.prototype.clone,ge.clone=function(e){return Fe(e)},ge.copyInto=function(e,t){A(e,ge),A(t,ge),w(e.constructor==t.constructor,\"Copy source and target message should have the same type.\"),e=Fe(e);for(var r=t.g(),n=e.g(),o=r.length=0;o<n.length;o++)r[o]=n[o];t.f=e.f,t.i=e.i},ge.registerMessageType=function(e,t){t.we=e};var Ne={dump:function(e){return A(e,ge,\"jspb.Message instance expected\"),w(e.getExtension,\"Only unobfuscated and unoptimized compilation modes supported.\"),Ne.X(e)}};function Ue(){this.a=[]}function De(e,t){this.lo=e,this.hi=t}function Le(e,t){var r=65535&e,n=65535&t,o=t>>>16;for(t=r*n+65536*(r*o&65535)+65536*((e>>>=16)*n&65535),r=e*o+(r*o>>>16)+(e*n>>>16);4294967296<=t;)t-=4294967296,r+=1;return new De(t>>>0,r>>>0)}function $e(e){for(var t=new De(0,0),r=new De(0,0),n=0;n<e.length;n++){if(\"0\">e[n]||\"9\"<e[n])return null;r.lo=parseInt(e[n],10),t=t.eb(10).add(r)}return t}function ze(e,t){this.lo=e,this.hi=t}function je(e){var t=0<e.length&&\"-\"==e[0];return t&&(e=e.substring(1)),null===(e=$e(e))?null:(t&&(e=new De(0,0).sub(e)),new ze(e.lo,e.hi))}function Ve(){this.c=[],this.b=0,this.a=new Ue,this.h=[]}function Ge(e,t){var r=e.a.end();e.c.push(r),e.c.push(t),e.b+=r.length+t.length}function He(e,t){return qe(e,t,2),t=e.a.end(),e.c.push(t),e.b+=t.length,t.push(e.b),t}function Ke(e,t){var r=t.pop();for(w(0<=(r=e.b+e.a.length()-r));127<r;)t.push(127&r|128),r>>>=7,e.b++;t.push(r),e.b++}function qe(e,t,r){w(1<=t&&t==Math.floor(t)),e.a.j(8*t+r)}function Ze(e,t,r){null!=r&&(qe(e,t,0),e.a.j(r))}function Je(e,t,r){null!=r&&(qe(e,t,0),e.a.M(r))}d(\"jspb.debug.dump\",Ne.dump,void 0),Ne.X=function(e){var t=f(e);if(\"number\"==t||\"string\"==t||\"boolean\"==t||\"null\"==t||\"undefined\"==t||\"undefined\"!=typeof Uint8Array&&e instanceof Uint8Array)return e;if(\"array\"==t)return function(e,t,r){for(var n=[],o=2;o<arguments.length;++o)n[o-2]=arguments[o];Array.isArray(e)||b(\"Expected array but got %s: %s.\",[f(e),e],t,n)}(e),y(e,Ne.X);if(e instanceof P){for(var r={},n=(e=e.entries()).next();!n.done;n=e.next())r[n.value[0]]=Ne.X(n.value[1]);return r}A(e,ge,\"Only messages expected: \"+e);var o={$name:(t=e.constructor).name||t.displayName};for(i in t.prototype){var s=/^get([A-Z]\\w*)/.exec(i);if(s&&\"getExtension\"!=i&&\"getJsPbMessageId\"!=i){var a=\"has\"+s[1];e[a]&&!e[a]()||(a=e[i](),o[Ne.$a(s[1])]=Ne.X(a))}}if(e.extensionObject_)return o.$extensions=\"Recursive dumping of extensions not supported in compiled code. Switch to uncompiled or dump extension object directly\",o;for(n in t.extensions)if(/^\\d+$/.test(n)){a=t.extensions[n];var i=e.getExtension(a);s=void 0,a=a.Ba;var c=[],u=0;for(s in a)c[u++]=s;s=c[0],null!=i&&(r||(r=o.$extensions={}),r[Ne.$a(s)]=Ne.X(i))}return o},Ne.$a=function(e){return e.replace(/^[A-Z]/,function(e){return e.toLowerCase()})},d(\"jspb.BinaryEncoder\",Ue,void 0),Ue.prototype.length=function(){return this.a.length},Ue.prototype.length=Ue.prototype.length,Ue.prototype.end=function(){var e=this.a;return this.a=[],e},Ue.prototype.end=Ue.prototype.end,Ue.prototype.l=function(e,t){for(w(e==Math.floor(e)),w(t==Math.floor(t)),w(0<=e&&4294967296>e),w(0<=t&&4294967296>t);0<t||127<e;)this.a.push(127&e|128),e=(e>>>7|t<<25)>>>0,t>>>=7;this.a.push(e)},Ue.prototype.writeSplitVarint64=Ue.prototype.l,Ue.prototype.A=function(e,t){w(e==Math.floor(e)),w(t==Math.floor(t)),w(0<=e&&4294967296>e),w(0<=t&&4294967296>t),this.s(e),this.s(t)},Ue.prototype.writeSplitFixed64=Ue.prototype.A,Ue.prototype.j=function(e){for(w(e==Math.floor(e)),w(0<=e&&4294967296>e);127<e;)this.a.push(127&e|128),e>>>=7;this.a.push(e)},Ue.prototype.writeUnsignedVarint32=Ue.prototype.j,Ue.prototype.M=function(e){if(w(e==Math.floor(e)),w(-2147483648<=e&&2147483648>e),0<=e)this.j(e);else{for(var t=0;9>t;t++)this.a.push(127&e|128),e>>=7;this.a.push(1)}},Ue.prototype.writeSignedVarint32=Ue.prototype.M,Ue.prototype.va=function(e){w(e==Math.floor(e)),w(0<=e&&0x10000000000000000>e),D(e),this.l(k,N)},Ue.prototype.writeUnsignedVarint64=Ue.prototype.va,Ue.prototype.ua=function(e){w(e==Math.floor(e)),w(-0x8000000000000000<=e&&0x8000000000000000>e),D(e),this.l(k,N)},Ue.prototype.writeSignedVarint64=Ue.prototype.ua,Ue.prototype.wa=function(e){w(e==Math.floor(e)),w(-2147483648<=e&&2147483648>e),this.j((e<<1^e>>31)>>>0)},Ue.prototype.writeZigzagVarint32=Ue.prototype.wa,Ue.prototype.xa=function(e){w(e==Math.floor(e)),w(-0x8000000000000000<=e&&0x8000000000000000>e),L(e),this.l(k,N)},Ue.prototype.writeZigzagVarint64=Ue.prototype.xa,Ue.prototype.Ta=function(e){this.W(te(e))},Ue.prototype.writeZigzagVarint64String=Ue.prototype.Ta,Ue.prototype.W=function(e){var t=this;j(e),H(k,N,function(e,r){t.l(e>>>0,r>>>0)})},Ue.prototype.writeZigzagVarintHash64=Ue.prototype.W,Ue.prototype.be=function(e){w(e==Math.floor(e)),w(0<=e&&256>e),this.a.push(e>>>0&255)},Ue.prototype.writeUint8=Ue.prototype.be,Ue.prototype.ae=function(e){w(e==Math.floor(e)),w(0<=e&&65536>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255)},Ue.prototype.writeUint16=Ue.prototype.ae,Ue.prototype.s=function(e){w(e==Math.floor(e)),w(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)},Ue.prototype.writeUint32=Ue.prototype.s,Ue.prototype.V=function(e){w(e==Math.floor(e)),w(0<=e&&0x10000000000000000>e),U(e),this.s(k),this.s(N)},Ue.prototype.writeUint64=Ue.prototype.V,Ue.prototype.Qc=function(e){w(e==Math.floor(e)),w(-128<=e&&128>e),this.a.push(e>>>0&255)},Ue.prototype.writeInt8=Ue.prototype.Qc,Ue.prototype.Pc=function(e){w(e==Math.floor(e)),w(-32768<=e&&32768>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255)},Ue.prototype.writeInt16=Ue.prototype.Pc,Ue.prototype.S=function(e){w(e==Math.floor(e)),w(-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)},Ue.prototype.writeInt32=Ue.prototype.S,Ue.prototype.T=function(e){w(e==Math.floor(e)),w(-0x8000000000000000<=e&&0x8000000000000000>e),D(e),this.A(k,N)},Ue.prototype.writeInt64=Ue.prototype.T,Ue.prototype.ka=function(e){w(e==Math.floor(e)),w(-0x8000000000000000<=+e&&0x8000000000000000>+e),j(te(e)),this.A(k,N)},Ue.prototype.writeInt64String=Ue.prototype.ka,Ue.prototype.L=function(e){w(1/0===e||-1/0===e||isNaN(e)||-34028234663852886e22<=e&&34028234663852886e22>=e),$(e),this.s(k)},Ue.prototype.writeFloat=Ue.prototype.L,Ue.prototype.J=function(e){w(1/0===e||-1/0===e||isNaN(e)||-17976931348623157e292<=e&&17976931348623157e292>=e),z(e),this.s(k),this.s(N)},Ue.prototype.writeDouble=Ue.prototype.J,Ue.prototype.I=function(e){w(\"boolean\"==typeof e||\"number\"==typeof e),this.a.push(e?1:0)},Ue.prototype.writeBool=Ue.prototype.I,Ue.prototype.R=function(e){w(e==Math.floor(e)),w(-2147483648<=e&&2147483648>e),this.M(e)},Ue.prototype.writeEnum=Ue.prototype.R,Ue.prototype.ja=function(e){this.a.push.apply(this.a,e)},Ue.prototype.writeBytes=Ue.prototype.ja,Ue.prototype.N=function(e){j(e),this.l(k,N)},Ue.prototype.writeVarintHash64=Ue.prototype.N,Ue.prototype.K=function(e){j(e),this.s(k),this.s(N)},Ue.prototype.writeFixedHash64=Ue.prototype.K,Ue.prototype.U=function(e){var t=this.a.length;!function(e,t,r){for(var n=[],o=2;o<arguments.length;++o)n[o-2]=arguments[o];\"string\"!=typeof e&&b(\"Expected string but got %s: %s.\",[f(e),e],t,n)}(e);for(var r=0;r<e.length;r++){var n=e.charCodeAt(r);if(128>n)this.a.push(n);else if(2048>n)this.a.push(n>>6|192),this.a.push(63&n|128);else if(65536>n)if(55296<=n&&56319>=n&&r+1<e.length){var o=e.charCodeAt(r+1);56320<=o&&57343>=o&&(n=1024*(n-55296)+o-56320+65536,this.a.push(n>>18|240),this.a.push(n>>12&63|128),this.a.push(n>>6&63|128),this.a.push(63&n|128),r++)}else this.a.push(n>>12|224),this.a.push(n>>6&63|128),this.a.push(63&n|128)}return this.a.length-t},Ue.prototype.writeString=Ue.prototype.U,d(\"jspb.arith.UInt64\",De,void 0),De.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},De.prototype.cmp=De.prototype.cmp,De.prototype.La=function(){return new De((this.lo>>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},De.prototype.rightShift=De.prototype.La,De.prototype.Da=function(){return new De(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},De.prototype.leftShift=De.prototype.Da,De.prototype.cb=function(){return!!(2147483648&this.hi)},De.prototype.msb=De.prototype.cb,De.prototype.Ob=function(){return!!(1&this.lo)},De.prototype.lsb=De.prototype.Ob,De.prototype.Ua=function(){return 0==this.lo&&0==this.hi},De.prototype.zero=De.prototype.Ua,De.prototype.add=function(e){return new De((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},De.prototype.add=De.prototype.add,De.prototype.sub=function(e){return new De((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},De.prototype.sub=De.prototype.sub,De.mul32x32=Le,De.prototype.eb=function(e){var t=Le(this.lo,e);return(e=Le(this.hi,e)).hi=e.lo,e.lo=0,t.add(e)},De.prototype.mul=De.prototype.eb,De.prototype.Xa=function(e){if(0==e)return[];var t=new De(0,0),r=new De(this.lo,this.hi);e=new De(e,0);for(var n=new De(1,0);!e.cb();)e=e.Da(),n=n.Da();for(;!n.Ua();)0>=e.cmp(r)&&(t=t.add(n),r=r.sub(e)),e=e.La(),n=n.La();return[t,r]},De.prototype.div=De.prototype.Xa,De.prototype.toString=function(){for(var e=\"\",t=this;!t.Ua();){var r=(t=t.Xa(10))[0];e=t[1].lo+e,t=r}return\"\"==e&&(e=\"0\"),e},De.prototype.toString=De.prototype.toString,De.fromString=$e,De.prototype.clone=function(){return new De(this.lo,this.hi)},De.prototype.clone=De.prototype.clone,d(\"jspb.arith.Int64\",ze,void 0),ze.prototype.add=function(e){return new ze((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},ze.prototype.add=ze.prototype.add,ze.prototype.sub=function(e){return new ze((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},ze.prototype.sub=ze.prototype.sub,ze.prototype.clone=function(){return new ze(this.lo,this.hi)},ze.prototype.clone=ze.prototype.clone,ze.prototype.toString=function(){var e=!!(2147483648&this.hi),t=new De(this.lo,this.hi);return e&&(t=new De(0,0).sub(t)),(e?\"-\":\"\")+t.toString()},ze.prototype.toString=ze.prototype.toString,ze.fromString=je,d(\"jspb.BinaryWriter\",Ve,void 0),Ve.prototype.pb=function(e,t,r){Ge(this,e.subarray(t,r))},Ve.prototype.writeSerializedMessage=Ve.prototype.pb,Ve.prototype.Pb=function(e,t,r){null!=e&&null!=t&&null!=r&&this.pb(e,t,r)},Ve.prototype.maybeWriteSerializedMessage=Ve.prototype.Pb,Ve.prototype.reset=function(){this.c=[],this.a.end(),this.b=0,this.h=[]},Ve.prototype.reset=Ve.prototype.reset,Ve.prototype.ab=function(){w(0==this.h.length);for(var e=new Uint8Array(this.b+this.a.length()),t=this.c,r=t.length,n=0,o=0;o<r;o++){var s=t[o];e.set(s,n),n+=s.length}return t=this.a.end(),e.set(t,n),w((n+=t.length)==e.length),this.c=[e],e},Ve.prototype.getResultBuffer=Ve.prototype.ab,Ve.prototype.Kb=function(e){return O(this.ab(),e)},Ve.prototype.getResultBase64String=Ve.prototype.Kb,Ve.prototype.Va=function(e){this.h.push(He(this,e))},Ve.prototype.beginSubMessage=Ve.prototype.Va,Ve.prototype.Ya=function(){w(0<=this.h.length),Ke(this,this.h.pop())},Ve.prototype.endSubMessage=Ve.prototype.Ya,Ve.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:T(\"Group field type not supported in writeAny()\");break;case 11:T(\"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:T(\"Invalid field type in writeAny()\")}},Ve.prototype.writeAny=Ve.prototype.Nc,Ve.prototype.S=function(e,t){null!=t&&(w(-2147483648<=t&&2147483648>t),Je(this,e,t))},Ve.prototype.writeInt32=Ve.prototype.S,Ve.prototype.ob=function(e,t){null!=t&&(w(-2147483648<=(t=parseInt(t,10))&&2147483648>t),Je(this,e,t))},Ve.prototype.writeInt32String=Ve.prototype.ob,Ve.prototype.T=function(e,t){null!=t&&(w(-0x8000000000000000<=t&&0x8000000000000000>t),null!=t&&(qe(this,e,0),this.a.ua(t)))},Ve.prototype.writeInt64=Ve.prototype.T,Ve.prototype.ka=function(e,t){null!=t&&(t=je(t),qe(this,e,0),this.a.l(t.lo,t.hi))},Ve.prototype.writeInt64String=Ve.prototype.ka,Ve.prototype.s=function(e,t){null!=t&&(w(0<=t&&4294967296>t),Ze(this,e,t))},Ve.prototype.writeUint32=Ve.prototype.s,Ve.prototype.ub=function(e,t){null!=t&&(w(0<=(t=parseInt(t,10))&&4294967296>t),Ze(this,e,t))},Ve.prototype.writeUint32String=Ve.prototype.ub,Ve.prototype.V=function(e,t){null!=t&&(w(0<=t&&0x10000000000000000>t),null!=t&&(qe(this,e,0),this.a.va(t)))},Ve.prototype.writeUint64=Ve.prototype.V,Ve.prototype.vb=function(e,t){null!=t&&(t=$e(t),qe(this,e,0),this.a.l(t.lo,t.hi))},Ve.prototype.writeUint64String=Ve.prototype.vb,Ve.prototype.rb=function(e,t){null!=t&&(w(-2147483648<=t&&2147483648>t),null!=t&&(qe(this,e,0),this.a.wa(t)))},Ve.prototype.writeSint32=Ve.prototype.rb,Ve.prototype.sb=function(e,t){null!=t&&(w(-0x8000000000000000<=t&&0x8000000000000000>t),null!=t&&(qe(this,e,0),this.a.xa(t)))},Ve.prototype.writeSint64=Ve.prototype.sb,Ve.prototype.$d=function(e,t){null!=t&&null!=t&&(qe(this,e,0),this.a.W(t))},Ve.prototype.writeSintHash64=Ve.prototype.$d,Ve.prototype.Zd=function(e,t){null!=t&&null!=t&&(qe(this,e,0),this.a.Ta(t))},Ve.prototype.writeSint64String=Ve.prototype.Zd,Ve.prototype.Pa=function(e,t){null!=t&&(w(0<=t&&4294967296>t),qe(this,e,5),this.a.s(t))},Ve.prototype.writeFixed32=Ve.prototype.Pa,Ve.prototype.Qa=function(e,t){null!=t&&(w(0<=t&&0x10000000000000000>t),qe(this,e,1),this.a.V(t))},Ve.prototype.writeFixed64=Ve.prototype.Qa,Ve.prototype.nb=function(e,t){null!=t&&(t=$e(t),qe(this,e,1),this.a.A(t.lo,t.hi))},Ve.prototype.writeFixed64String=Ve.prototype.nb,Ve.prototype.Ra=function(e,t){null!=t&&(w(-2147483648<=t&&2147483648>t),qe(this,e,5),this.a.S(t))},Ve.prototype.writeSfixed32=Ve.prototype.Ra,Ve.prototype.Sa=function(e,t){null!=t&&(w(-0x8000000000000000<=t&&0x8000000000000000>t),qe(this,e,1),this.a.T(t))},Ve.prototype.writeSfixed64=Ve.prototype.Sa,Ve.prototype.qb=function(e,t){null!=t&&(t=je(t),qe(this,e,1),this.a.A(t.lo,t.hi))},Ve.prototype.writeSfixed64String=Ve.prototype.qb,Ve.prototype.L=function(e,t){null!=t&&(qe(this,e,5),this.a.L(t))},Ve.prototype.writeFloat=Ve.prototype.L,Ve.prototype.J=function(e,t){null!=t&&(qe(this,e,1),this.a.J(t))},Ve.prototype.writeDouble=Ve.prototype.J,Ve.prototype.I=function(e,t){null!=t&&(w(\"boolean\"==typeof t||\"number\"==typeof t),qe(this,e,0),this.a.I(t))},Ve.prototype.writeBool=Ve.prototype.I,Ve.prototype.R=function(e,t){null!=t&&(w(-2147483648<=t&&2147483648>t),qe(this,e,0),this.a.M(t))},Ve.prototype.writeEnum=Ve.prototype.R,Ve.prototype.U=function(e,t){null!=t&&(e=He(this,e),this.a.U(t),Ke(this,e))},Ve.prototype.writeString=Ve.prototype.U,Ve.prototype.ja=function(e,t){null!=t&&(t=se(t),qe(this,e,2),this.a.j(t.length),Ge(this,t))},Ve.prototype.writeBytes=Ve.prototype.ja,Ve.prototype.Rc=function(e,t,r){null!=t&&(e=He(this,e),r(t,this),Ke(this,e))},Ve.prototype.writeMessage=Ve.prototype.Rc,Ve.prototype.Sc=function(e,t,r){null!=t&&(qe(this,1,3),qe(this,2,0),this.a.M(e),e=He(this,3),r(t,this),Ke(this,e),qe(this,1,4))},Ve.prototype.writeMessageSet=Ve.prototype.Sc,Ve.prototype.Oc=function(e,t,r){null!=t&&(qe(this,e,3),r(t,this),qe(this,e,4))},Ve.prototype.writeGroup=Ve.prototype.Oc,Ve.prototype.K=function(e,t){null!=t&&(w(8==t.length),qe(this,e,1),this.a.K(t))},Ve.prototype.writeFixedHash64=Ve.prototype.K,Ve.prototype.N=function(e,t){null!=t&&(w(8==t.length),qe(this,e,0),this.a.N(t))},Ve.prototype.writeVarintHash64=Ve.prototype.N,Ve.prototype.A=function(e,t,r){qe(this,e,1),this.a.A(t,r)},Ve.prototype.writeSplitFixed64=Ve.prototype.A,Ve.prototype.l=function(e,t,r){qe(this,e,0),this.a.l(t,r)},Ve.prototype.writeSplitVarint64=Ve.prototype.l,Ve.prototype.tb=function(e,t,r){qe(this,e,0);var n=this.a;H(t,r,function(e,t){n.l(e>>>0,t>>>0)})},Ve.prototype.writeSplitZigzagVarint64=Ve.prototype.tb,Ve.prototype.Ed=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)Je(this,e,t[r])},Ve.prototype.writeRepeatedInt32=Ve.prototype.Ed,Ve.prototype.Fd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.ob(e,t[r])},Ve.prototype.writeRepeatedInt32String=Ve.prototype.Fd,Ve.prototype.Gd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(qe(this,e,0),this.a.ua(n))}},Ve.prototype.writeRepeatedInt64=Ve.prototype.Gd,Ve.prototype.Qd=function(e,t,r,n){if(null!=t)for(var o=0;o<t.length;o++)this.A(e,r(t[o]),n(t[o]))},Ve.prototype.writeRepeatedSplitFixed64=Ve.prototype.Qd,Ve.prototype.Rd=function(e,t,r,n){if(null!=t)for(var o=0;o<t.length;o++)this.l(e,r(t[o]),n(t[o]))},Ve.prototype.writeRepeatedSplitVarint64=Ve.prototype.Rd,Ve.prototype.Sd=function(e,t,r,n){if(null!=t)for(var o=0;o<t.length;o++)this.tb(e,r(t[o]),n(t[o]))},Ve.prototype.writeRepeatedSplitZigzagVarint64=Ve.prototype.Sd,Ve.prototype.Hd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.ka(e,t[r])},Ve.prototype.writeRepeatedInt64String=Ve.prototype.Hd,Ve.prototype.Ud=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)Ze(this,e,t[r])},Ve.prototype.writeRepeatedUint32=Ve.prototype.Ud,Ve.prototype.Vd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.ub(e,t[r])},Ve.prototype.writeRepeatedUint32String=Ve.prototype.Vd,Ve.prototype.Wd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(qe(this,e,0),this.a.va(n))}},Ve.prototype.writeRepeatedUint64=Ve.prototype.Wd,Ve.prototype.Xd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.vb(e,t[r])},Ve.prototype.writeRepeatedUint64String=Ve.prototype.Xd,Ve.prototype.Md=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(qe(this,e,0),this.a.wa(n))}},Ve.prototype.writeRepeatedSint32=Ve.prototype.Md,Ve.prototype.Nd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(qe(this,e,0),this.a.xa(n))}},Ve.prototype.writeRepeatedSint64=Ve.prototype.Nd,Ve.prototype.Od=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(qe(this,e,0),this.a.Ta(n))}},Ve.prototype.writeRepeatedSint64String=Ve.prototype.Od,Ve.prototype.Pd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(qe(this,e,0),this.a.W(n))}},Ve.prototype.writeRepeatedSintHash64=Ve.prototype.Pd,Ve.prototype.yd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.Pa(e,t[r])},Ve.prototype.writeRepeatedFixed32=Ve.prototype.yd,Ve.prototype.zd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.Qa(e,t[r])},Ve.prototype.writeRepeatedFixed64=Ve.prototype.zd,Ve.prototype.Ad=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.nb(e,t[r])},Ve.prototype.writeRepeatedFixed64String=Ve.prototype.Ad,Ve.prototype.Jd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.Ra(e,t[r])},Ve.prototype.writeRepeatedSfixed32=Ve.prototype.Jd,Ve.prototype.Kd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.Sa(e,t[r])},Ve.prototype.writeRepeatedSfixed64=Ve.prototype.Kd,Ve.prototype.Ld=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.qb(e,t[r])},Ve.prototype.writeRepeatedSfixed64String=Ve.prototype.Ld,Ve.prototype.Cd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.L(e,t[r])},Ve.prototype.writeRepeatedFloat=Ve.prototype.Cd,Ve.prototype.wd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.J(e,t[r])},Ve.prototype.writeRepeatedDouble=Ve.prototype.wd,Ve.prototype.ud=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.I(e,t[r])},Ve.prototype.writeRepeatedBool=Ve.prototype.ud,Ve.prototype.xd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.R(e,t[r])},Ve.prototype.writeRepeatedEnum=Ve.prototype.xd,Ve.prototype.Td=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.U(e,t[r])},Ve.prototype.writeRepeatedString=Ve.prototype.Td,Ve.prototype.vd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.ja(e,t[r])},Ve.prototype.writeRepeatedBytes=Ve.prototype.vd,Ve.prototype.Id=function(e,t,r){if(null!=t)for(var n=0;n<t.length;n++){var o=He(this,e);r(t[n],this),Ke(this,o)}},Ve.prototype.writeRepeatedMessage=Ve.prototype.Id,Ve.prototype.Dd=function(e,t,r){if(null!=t)for(var n=0;n<t.length;n++)qe(this,e,3),r(t[n],this),qe(this,e,4)},Ve.prototype.writeRepeatedGroup=Ve.prototype.Dd,Ve.prototype.Bd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.K(e,t[r])},Ve.prototype.writeRepeatedFixedHash64=Ve.prototype.Bd,Ve.prototype.Yd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.N(e,t[r])},Ve.prototype.writeRepeatedVarintHash64=Ve.prototype.Yd,Ve.prototype.ad=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.M(t[r]);Ke(this,e)}},Ve.prototype.writePackedInt32=Ve.prototype.ad,Ve.prototype.bd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.M(parseInt(t[r],10));Ke(this,e)}},Ve.prototype.writePackedInt32String=Ve.prototype.bd,Ve.prototype.cd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.ua(t[r]);Ke(this,e)}},Ve.prototype.writePackedInt64=Ve.prototype.cd,Ve.prototype.md=function(e,t,r,n){if(null!=t){e=He(this,e);for(var o=0;o<t.length;o++)this.a.A(r(t[o]),n(t[o]));Ke(this,e)}},Ve.prototype.writePackedSplitFixed64=Ve.prototype.md,Ve.prototype.nd=function(e,t,r,n){if(null!=t){e=He(this,e);for(var o=0;o<t.length;o++)this.a.l(r(t[o]),n(t[o]));Ke(this,e)}},Ve.prototype.writePackedSplitVarint64=Ve.prototype.nd,Ve.prototype.od=function(e,t,r,n){if(null!=t){e=He(this,e);for(var o=this.a,s=0;s<t.length;s++)H(r(t[s]),n(t[s]),function(e,t){o.l(e>>>0,t>>>0)});Ke(this,e)}},Ve.prototype.writePackedSplitZigzagVarint64=Ve.prototype.od,Ve.prototype.dd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++){var n=je(t[r]);this.a.l(n.lo,n.hi)}Ke(this,e)}},Ve.prototype.writePackedInt64String=Ve.prototype.dd,Ve.prototype.pd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.j(t[r]);Ke(this,e)}},Ve.prototype.writePackedUint32=Ve.prototype.pd,Ve.prototype.qd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.j(parseInt(t[r],10));Ke(this,e)}},Ve.prototype.writePackedUint32String=Ve.prototype.qd,Ve.prototype.rd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.va(t[r]);Ke(this,e)}},Ve.prototype.writePackedUint64=Ve.prototype.rd,Ve.prototype.sd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++){var n=$e(t[r]);this.a.l(n.lo,n.hi)}Ke(this,e)}},Ve.prototype.writePackedUint64String=Ve.prototype.sd,Ve.prototype.hd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.wa(t[r]);Ke(this,e)}},Ve.prototype.writePackedSint32=Ve.prototype.hd,Ve.prototype.jd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.xa(t[r]);Ke(this,e)}},Ve.prototype.writePackedSint64=Ve.prototype.jd,Ve.prototype.kd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.W(te(t[r]));Ke(this,e)}},Ve.prototype.writePackedSint64String=Ve.prototype.kd,Ve.prototype.ld=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.W(t[r]);Ke(this,e)}},Ve.prototype.writePackedSintHash64=Ve.prototype.ld,Ve.prototype.Wc=function(e,t){if(null!=t&&t.length)for(qe(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.s(t[e])},Ve.prototype.writePackedFixed32=Ve.prototype.Wc,Ve.prototype.Xc=function(e,t){if(null!=t&&t.length)for(qe(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.V(t[e])},Ve.prototype.writePackedFixed64=Ve.prototype.Xc,Ve.prototype.Yc=function(e,t){if(null!=t&&t.length)for(qe(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++){var r=$e(t[e]);this.a.A(r.lo,r.hi)}},Ve.prototype.writePackedFixed64String=Ve.prototype.Yc,Ve.prototype.ed=function(e,t){if(null!=t&&t.length)for(qe(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.S(t[e])},Ve.prototype.writePackedSfixed32=Ve.prototype.ed,Ve.prototype.fd=function(e,t){if(null!=t&&t.length)for(qe(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.T(t[e])},Ve.prototype.writePackedSfixed64=Ve.prototype.fd,Ve.prototype.gd=function(e,t){if(null!=t&&t.length)for(qe(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.ka(t[e])},Ve.prototype.writePackedSfixed64String=Ve.prototype.gd,Ve.prototype.$c=function(e,t){if(null!=t&&t.length)for(qe(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.L(t[e])},Ve.prototype.writePackedFloat=Ve.prototype.$c,Ve.prototype.Uc=function(e,t){if(null!=t&&t.length)for(qe(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.J(t[e])},Ve.prototype.writePackedDouble=Ve.prototype.Uc,Ve.prototype.Tc=function(e,t){if(null!=t&&t.length)for(qe(this,e,2),this.a.j(t.length),e=0;e<t.length;e++)this.a.I(t[e])},Ve.prototype.writePackedBool=Ve.prototype.Tc,Ve.prototype.Vc=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.R(t[r]);Ke(this,e)}},Ve.prototype.writePackedEnum=Ve.prototype.Vc,Ve.prototype.Zc=function(e,t){if(null!=t&&t.length)for(qe(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.K(t[e])},Ve.prototype.writePackedFixedHash64=Ve.prototype.Zc,Ve.prototype.td=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.N(t[r]);Ke(this,e)}},Ve.prototype.writePackedVarintHash64=Ve.prototype.td,t.debug=Ne,t.Map=P,t.Message=ge,t.BinaryReader=ue,t.BinaryWriter=Ve,t.ExtensionFieldInfo=pe,t.ExtensionFieldBinaryInfo=he,t.exportSymbol=function(e,t,r){d(e,t,r)},t.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e},t.object={extend:function(e,t){for(var r,n,o=1;o<arguments.length;o++){for(r in n=arguments[o])e[r]=n[r];for(var s=0;s<h.length;s++)r=h[s],Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}}},t.typeOf=f},7217:(e,t,r)=>{const n=r(7784),o=r(2859),s=r(5456);e.exports=(e,t)=>{e=new o(e,t);let r=new n(\"0.0.0\");if(e.test(r))return r;if(r=new n(\"0.0.0-0\"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let a=null;o.forEach(e=>{const t=new n(e.semver.version);switch(e.operator){case\">\":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case\"\":case\">=\":a&&!s(t,a)||(a=t);break;case\"<\":case\"<=\":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}),!a||r&&!s(r,a)||(r=a)}return r&&e.test(r)?r:null}},7303:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,o.default)(e);var t=e.replace(/\\s+/g,\" \").replace(/\\s?(hsla?\\(|\\)|,)\\s?/gi,\"$1\");if(-1!==t.indexOf(\",\"))return s.test(t);return a.test(t)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^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,a=/^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;e.exports=t.default,e.exports.default=t.default},7574:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if((0,o.default)(e),!s.test(e))return!1;for(var t=0,r=0;r<e.length;r++)t+=r%3==0?3*e[r]:r%3==1?7*e[r]:1*e[r];return t%10==0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/;e.exports=t.default,e.exports.default=t.default},7616:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.isFreightContainerID=void 0,t.isISO6346=i;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/,a=/^[0-9]$/;function i(e){if((0,o.default)(e),e=e.toUpperCase(),!s.test(e))return!1;if(11===e.length){for(var t=0,r=0;r<e.length-1;r++)if(a.test(e[r]))t+=e[r]*Math.pow(2,r);else{var n=e.charCodeAt(r)-55;t+=(n<11?n:n>=11&&n<=20?12+n%11:n>=21&&n<=30?23+n%21:34+n%31)*Math.pow(2,r)}var i=t%11;return 10===i&&(i=0),Number(e[e.length-1])===i}return!0}t.isFreightContainerID=i},7640:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.farsiLocales=t.englishLocales=t.dotDecimal=t.decimal=t.commaDecimal=t.bengaliLocales=t.arabicLocales=t.alphanumeric=t.alpha=void 0;for(var r,n=t.alpha={\"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,\"ja-JP\":/^[ぁ-んァ-ヶｦ-ﾟ一-龠ー・。、]+$/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,\"kk-KZ\":/^[А-ЯЁ\\u04D8\\u04B0\\u0406\\u04A2\\u0492\\u04AE\\u049A\\u04E8\\u04BA]+$/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,\"ko-KR\":/^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,\"ku-IQ\":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,\"hi-IN\":/^[\\u0900-\\u0961]+[\\u0972-\\u097F]*$/i,\"si-LK\":/^[\\u0D80-\\u0DFF]+$/,\"ta-IN\":/^[\\u0B80-\\u0BFF]+$/i,\"te-IN\":/^[\\u0C00-\\u0C7F]+$/i,\"kn-IN\":/^[\\u0C80-\\u0CFF]+$/i,\"ml-IN\":/^[\\u0D00-\\u0D7F]+$/i,\"gu-IN\":/^[\\u0A80-\\u0AFF]+$/i,\"pa-IN\":/^[\\u0A00-\\u0A7F]+$/i,\"or-IN\":/^[\\u0B00-\\u0B7F]+$/i},o=t.alphanumeric={\"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,\"ja-JP\":/^[0-9０-９ぁ-んァ-ヶｦ-ﾟ一-龠ー・。、]+$/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,\"kk-KZ\":/^[0-9А-ЯЁ\\u04D8\\u04B0\\u0406\\u04A2\\u0492\\u04AE\\u049A\\u04E8\\u04BA]+$/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,\"ko-KR\":/^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,\"ku-IQ\":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,\"vi-VN\":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,\"hi-IN\":/^[\\u0900-\\u0963]+[\\u0966-\\u097F]*$/i,\"si-LK\":/^[0-9\\u0D80-\\u0DFF]+$/,\"ta-IN\":/^[0-9\\u0B80-\\u0BFF.]+$/i,\"te-IN\":/^[0-9\\u0C00-\\u0C7F.]+$/i,\"kn-IN\":/^[0-9\\u0C80-\\u0CFF.]+$/i,\"ml-IN\":/^[0-9\\u0D00-\\u0D7F.]+$/i,\"gu-IN\":/^[0-9\\u0A80-\\u0AFF.]+$/i,\"pa-IN\":/^[0-9\\u0A00-\\u0A7F.]+$/i,\"or-IN\":/^[0-9\\u0B00-\\u0B7F.]+$/i},s=t.decimal={\"en-US\":\".\",ar:\"٫\"},a=t.englishLocales=[\"AU\",\"GB\",\"HK\",\"IN\",\"NZ\",\"ZA\",\"ZM\"],i=0;i<a.length;i++)n[r=\"en-\".concat(a[i])]=n[\"en-US\"],o[r]=o[\"en-US\"],s[r]=s[\"en-US\"];for(var c,u=t.arabicLocales=[\"AE\",\"BH\",\"DZ\",\"EG\",\"IQ\",\"JO\",\"KW\",\"LB\",\"LY\",\"MA\",\"QM\",\"QA\",\"SA\",\"SD\",\"SY\",\"TN\",\"YE\"],l=0;l<u.length;l++)n[c=\"ar-\".concat(u[l])]=n.ar,o[c]=o.ar,s[c]=s.ar;for(var d,f=t.farsiLocales=[\"IR\",\"AF\"],p=0;p<f.length;p++)o[d=\"fa-\".concat(f[p])]=o.fa,s[d]=s.ar;for(var h,g=t.bengaliLocales=[\"BD\",\"IN\"],y=0;y<g.length;y++)n[h=\"bn-\".concat(g[y])]=n.bn,o[h]=o.bn,s[h]=s[\"en-US\"];for(var m=t.dotDecimal=[\"ar-EG\",\"ar-LB\",\"ar-LY\"],b=t.commaDecimal=[\"bg-BG\",\"cs-CZ\",\"da-DK\",\"de-DE\",\"el-GR\",\"en-ZM\",\"eo\",\"es-ES\",\"fr-CA\",\"fr-FR\",\"gu-IN\",\"hi-IN\",\"hu-HU\",\"id-ID\",\"it-IT\",\"kk-KZ\",\"kn-IN\",\"ku-IQ\",\"ml-IN\",\"nb-NO\",\"nl-NL\",\"nn-NO\",\"or-IN\",\"pa-IN\",\"pl-PL\",\"pt-PT\",\"ru-RU\",\"si-LK\",\"sl-SI\",\"sr-RS\",\"sr-RS@latin\",\"sv-SE\",\"ta-IN\",\"te-IN\",\"tr-TR\",\"uk-UA\",\"vi-VN\"],w=0;w<m.length;w++)s[m[w]]=s[\"en-US\"];for(var T=0;T<b.length;T++)s[b[T]]=\",\";n[\"fr-CA\"]=n[\"fr-FR\"],o[\"fr-CA\"]=o[\"fr-FR\"],n[\"pt-BR\"]=n[\"pt-PT\"],o[\"pt-BR\"]=o[\"pt-PT\"],s[\"pt-BR\"]=s[\"pt-PT\"],n[\"pl-Pl\"]=n[\"pl-PL\"],o[\"pl-Pl\"]=o[\"pl-PL\"],s[\"pl-Pl\"]=s[\"pl-PL\"],n[\"fa-AF\"]=n.fa},7651:(e,t,r)=>{const n=r(7784);e.exports=(e,t,r,o,s)=>{\"string\"==typeof r&&(s=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,s).version}catch(e){return null}}},7692:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(e);var r=t.strictSeparator?a.test(e):s.test(e);return r&&t.strict?i(e):r};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^([\\+-]?\\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)?)?)?)?$/,a=/^([\\+-]?\\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)?)?)?)?$/,i=function(e){var t=e.match(/^(\\d{4})-?(\\d{3})([ T]{1}\\.*|$)/);if(t){var r=Number(t[1]),n=Number(t[2]);return r%4==0&&r%100!=0||r%400==0?n<=366:n<=365}var o=e.match(/(\\d{4})-?(\\d{0,2})-?(\\d*)/).map(Number),s=o[1],a=o[2],i=o[3],c=a?\"0\".concat(a).slice(-2):a,u=i?\"0\".concat(i).slice(-2):i,l=new Date(\"\".concat(s,\"-\").concat(c||\"01\",\"-\").concat(u||\"01\"));return!a||!i||l.getUTCFullYear()===s&&l.getUTCMonth()+1===a&&l.getUTCDate()===i};e.exports=t.default,e.exports.default=t.default},7706:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r=(\"object\"===s(t)?t.comparisonDate:t)||Date().toString(),n=(0,o.default)(r),a=(0,o.default)(e);return!!(a&&n&&a>n)};var n,o=(n=r(5071))&&n.__esModule?n:{default:n};function s(e){return s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},7724:(e,t,r)=>{var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();o.exportSymbol(\"TronWebProto.BuyStorageBytesContract\",null,s),o.exportSymbol(\"TronWebProto.BuyStorageContract\",null,s),o.exportSymbol(\"TronWebProto.SellStorageContract\",null,s),o.exportSymbol(\"TronWebProto.UpdateBrokerageContract\",null,s),TronWebProto.BuyStorageBytesContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.BuyStorageBytesContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BuyStorageBytesContract.displayName=\"TronWebProto.BuyStorageBytesContract\"),TronWebProto.BuyStorageContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.BuyStorageContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BuyStorageContract.displayName=\"TronWebProto.BuyStorageContract\"),TronWebProto.SellStorageContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SellStorageContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SellStorageContract.displayName=\"TronWebProto.SellStorageContract\"),TronWebProto.UpdateBrokerageContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateBrokerageContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateBrokerageContract.displayName=\"TronWebProto.UpdateBrokerageContract\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BuyStorageBytesContract.prototype.toObject=function(e){return TronWebProto.BuyStorageBytesContract.toObject(e,this)},TronWebProto.BuyStorageBytesContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),bytes:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.BuyStorageBytesContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BuyStorageBytesContract;return TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader(r,t)},TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setBytes(r);break;default:t.skipField()}}return e},TronWebProto.BuyStorageBytesContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getBytes())&&t.writeInt64(2,r)},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.BuyStorageBytesContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.BuyStorageBytesContract.prototype.getBytes=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BuyStorageBytesContract.prototype.setBytes=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BuyStorageContract.prototype.toObject=function(e){return TronWebProto.BuyStorageContract.toObject(e,this)},TronWebProto.BuyStorageContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),quant:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.BuyStorageContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BuyStorageContract;return TronWebProto.BuyStorageContract.deserializeBinaryFromReader(r,t)},TronWebProto.BuyStorageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setQuant(r);break;default:t.skipField()}}return e},TronWebProto.BuyStorageContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BuyStorageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BuyStorageContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getQuant())&&t.writeInt64(2,r)},TronWebProto.BuyStorageContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.BuyStorageContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.BuyStorageContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BuyStorageContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SellStorageContract.prototype.toObject=function(e){return TronWebProto.SellStorageContract.toObject(e,this)},TronWebProto.SellStorageContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),storageBytes:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SellStorageContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SellStorageContract;return TronWebProto.SellStorageContract.deserializeBinaryFromReader(r,t)},TronWebProto.SellStorageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setStorageBytes(r);break;default:t.skipField()}}return e},TronWebProto.SellStorageContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SellStorageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SellStorageContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getStorageBytes())&&t.writeInt64(2,r)},TronWebProto.SellStorageContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.SellStorageContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.SellStorageContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.SellStorageContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.SellStorageContract.prototype.getStorageBytes=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.SellStorageContract.prototype.setStorageBytes=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateBrokerageContract.prototype.toObject=function(e){return TronWebProto.UpdateBrokerageContract.toObject(e,this)},TronWebProto.UpdateBrokerageContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),brokerage:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateBrokerageContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateBrokerageContract;return TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt32();e.setBrokerage(r);break;default:t.skipField()}}return e},TronWebProto.UpdateBrokerageContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getBrokerage())&&t.writeInt32(2,r)},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateBrokerageContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateBrokerageContract.prototype.getBrokerage=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.UpdateBrokerageContract.prototype.setBrokerage=function(e){return n.Message.setProto3IntField(this,2,e)},o.object.extend(t,TronWebProto)},7784:(e,t,r)=>{const n=r(6820),{MAX_LENGTH:o,MAX_SAFE_INTEGER:s}=r(4830),{safeRe:a,safeSrc:i,t:c}=r(946),u=r(3607),{compareIdentifiers:l}=r(5647);class d{constructor(e,t){if(t=u(t),e instanceof d){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(\"string\"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof e}\".`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n(\"SemVer\",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[c.LOOSE]:a[c.FULL]);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>s||this.major<0)throw new TypeError(\"Invalid major version\");if(this.minor>s||this.minor<0)throw new TypeError(\"Invalid minor version\");if(this.patch>s||this.patch<0)throw new TypeError(\"Invalid patch version\");r[4]?this.prerelease=r[4].split(\".\").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split(\".\"):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(\".\")}`),this.version}toString(){return this.version}compare(e){if(n(\"SemVer.compare\",this.version,this.options,e),!(e instanceof d)){if(\"string\"==typeof e&&e===this.version)return 0;e=new d(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof d||(e=new d(e,this.options)),l(this.major,e.major)||l(this.minor,e.minor)||l(this.patch,e.patch)}comparePre(e){if(e instanceof d||(e=new d(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;let t=0;do{const r=this.prerelease[t],o=e.prerelease[t];if(n(\"prerelease compare\",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return l(r,o)}while(++t)}compareBuild(e){e instanceof d||(e=new d(e,this.options));let t=0;do{const r=this.build[t],o=e.build[t];if(n(\"build compare\",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return l(r,o)}while(++t)}inc(e,t,r){if(e.startsWith(\"pre\")){if(!t&&!1===r)throw new Error(\"invalid increment argument: identifier is empty\");if(t){const e=new RegExp(`^${this.options.loose?i[c.PRERELEASELOOSE]:i[c.PRERELEASE]}$`),r=`-${t}`.match(e);if(!r||r[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case\"premajor\":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(\"pre\",t,r);break;case\"preminor\":this.prerelease.length=0,this.patch=0,this.minor++,this.inc(\"pre\",t,r);break;case\"prepatch\":this.prerelease.length=0,this.inc(\"patch\",t,r),this.inc(\"pre\",t,r);break;case\"prerelease\":0===this.prerelease.length&&this.inc(\"patch\",t,r),this.inc(\"pre\",t,r);break;case\"release\":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case\"major\":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case\"minor\":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case\"patch\":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case\"pre\":{const e=Number(r)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)\"number\"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(\".\")&&!1===r)throw new Error(\"invalid increment argument: identifier already exists\");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(\".\")}`),this}}e.exports=d},7814:(e,t,r)=>{const n=r(2859);e.exports=(e,t)=>{try{return new n(e,t).range||\"*\"}catch(e){return null}}},7900:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r,n;(0,o.default)(e),\"object\"===s(t)?(r=t.min||0,n=t.max):(r=arguments[1],n=arguments[2]);var a=encodeURI(e).split(/%..|./).length-1;return a>=r&&(void 0===n||a<=n)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};function s(e){return s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},7991:(e,t)=>{\"use strict\";t.byteLength=function(e){var t=i(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,s=i(e),a=s[0],c=s[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,c)),l=0,d=c>0?a-4:a;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,s=[],a=16383,i=0,c=n-o;i<c;i+=a)s.push(u(e,i,i+a>c?c:i+a));1===o?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+\"==\")):2===o&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+\"=\"));return s.join(\"\")};for(var r=[],n=[],o=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,s=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",a=0;a<64;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function i(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=e.indexOf(\"=\");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function u(e,t,r){for(var n,o=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(c(n));return o.join(\"\")}n[\"-\".charCodeAt(0)]=62,n[\"_\".charCodeAt(0)]=63},8036:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if((0,o.default)(e),0!==e.indexOf(\"magnet:?\"))return!1;return s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/(?:^magnet:\\?|[^?&]&)xt(?:\\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;e.exports=t.default,e.exports.default=t.default},8099:(e,t,r)=>{var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();o.exportSymbol(\"TronWebProto.ProposalApproveContract\",null,s),o.exportSymbol(\"TronWebProto.ProposalCreateContract\",null,s),o.exportSymbol(\"TronWebProto.ProposalDeleteContract\",null,s),TronWebProto.ProposalApproveContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ProposalApproveContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ProposalApproveContract.displayName=\"TronWebProto.ProposalApproveContract\"),TronWebProto.ProposalCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ProposalCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ProposalCreateContract.displayName=\"TronWebProto.ProposalCreateContract\"),TronWebProto.ProposalDeleteContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ProposalDeleteContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ProposalDeleteContract.displayName=\"TronWebProto.ProposalDeleteContract\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalApproveContract.prototype.toObject=function(e){return TronWebProto.ProposalApproveContract.toObject(e,this)},TronWebProto.ProposalApproveContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),proposalId:n.Message.getFieldWithDefault(t,2,0),isAddApproval:n.Message.getBooleanFieldWithDefault(t,3,!1)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ProposalApproveContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ProposalApproveContract;return TronWebProto.ProposalApproveContract.deserializeBinaryFromReader(r,t)},TronWebProto.ProposalApproveContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setProposalId(r);break;case 3:r=t.readBool();e.setIsAddApproval(r);break;default:t.skipField()}}return e},TronWebProto.ProposalApproveContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ProposalApproveContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalApproveContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getProposalId())&&t.writeInt64(2,r),(r=e.getIsAddApproval())&&t.writeBool(3,r)},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalApproveContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalApproveContract.prototype.getProposalId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ProposalApproveContract.prototype.setProposalId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ProposalApproveContract.prototype.getIsAddApproval=function(){return n.Message.getBooleanFieldWithDefault(this,3,!1)},TronWebProto.ProposalApproveContract.prototype.setIsAddApproval=function(e){return n.Message.setProto3BooleanField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalCreateContract.prototype.toObject=function(e){return TronWebProto.ProposalCreateContract.toObject(e,this)},TronWebProto.ProposalCreateContract.toObject=function(e,t){var r,n={ownerAddress:t.getOwnerAddress_asB64(),parametersMap:(r=t.getParametersMap())?r.toObject(e,void 0):[]};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.ProposalCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ProposalCreateContract;return TronWebProto.ProposalCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.ProposalCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=e.getParametersMap();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readInt64,n.BinaryReader.prototype.readInt64,null,0,0)});break;default:t.skipField()}}return e},TronWebProto.ProposalCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ProposalCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getParametersMap(!0))&&r.getLength()>0&&r.serializeBinary(2,t,n.BinaryWriter.prototype.writeInt64,n.BinaryWriter.prototype.writeInt64)},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalCreateContract.prototype.getParametersMap=function(e){return n.Message.getMapField(this,2,e,null)},TronWebProto.ProposalCreateContract.prototype.clearParametersMap=function(){return this.getParametersMap().clear(),this},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalDeleteContract.prototype.toObject=function(e){return TronWebProto.ProposalDeleteContract.toObject(e,this)},TronWebProto.ProposalDeleteContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),proposalId:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ProposalDeleteContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ProposalDeleteContract;return TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader(r,t)},TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setProposalId(r);break;default:t.skipField()}}return e},TronWebProto.ProposalDeleteContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ProposalDeleteContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalDeleteContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getProposalId())&&t.writeInt64(2,r)},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalDeleteContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalDeleteContract.prototype.getProposalId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ProposalDeleteContract.prototype.setProposalId=function(e){return n.Message.setProto3IntField(this,2,e)},o.object.extend(t,TronWebProto)},8137:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.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;\")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},8198:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.default)(e),function(e,t){var r=e.replace(/[\\s\\-]+/gi,\"\").toUpperCase(),n=r.slice(0,2).toUpperCase(),s=n in a;if(t.whitelist){if(!function(e){if(e.filter(function(e){return!(e in a)}).length>0)return!1;return!0}(t.whitelist))return!1;if(!(0,o.default)(t.whitelist,n))return!1}if(t.blacklist){if((0,o.default)(t.blacklist,n))return!1}return s&&a[n].test(r)}(e,t)&&function(e){var t=e.replace(/[^A-Z0-9]+/gi,\"\").toUpperCase();return 1===(t.slice(4)+t.slice(0,4)).replace(/[A-Z]/g,function(e){return e.charCodeAt(0)-55}).match(/\\d{1,7}/g).reduce(function(e,t){return Number(e+t)%97},\"\")}(e)},t.locales=void 0;var n=s(r(8354)),o=s(r(567));function s(e){return e&&e.__esModule?e:{default:e}}var a={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}$/,DZ:/^(DZ\\d{24})$/,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-Z]{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}$/,MA:/^(MA[0-9]{26})$/,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-Z]{4}[A-Z0-9]{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-Z]{4}\\d{16}$/,XK:/^(XK[0-9]{2})\\d{16}$/};t.locales=Object.keys(a)},8241:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"en-US\",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,o.default)(e);var n=e,a=r.ignore;if(a)if(a instanceof RegExp)n=n.replace(a,\"\");else{if(\"string\"!=typeof a)throw new Error(\"ignore should be instance of a String or RegExp\");n=n.replace(new RegExp(\"[\".concat(a.replace(/[-[\\]{}()*+?.,\\\\^$|#\\\\s]/g,\"\\\\$&\"),\"]\"),\"g\"),\"\")}if(t in s.alphanumeric)return s.alphanumeric[t].test(n);throw new Error(\"Invalid locale '\".concat(t,\"'\"))},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(7640);t.locales=Object.keys(s.alphanumeric)},8247:(e,t,r)=>{const n=r(7784),o=r(8308),{ANY:s}=o,a=r(2859),i=r(8346),c=r(5456),u=r(2615),l=r(2436),d=r(5933);e.exports=(e,t,r,f)=>{let p,h,g,y,m;switch(e=new n(e,f),t=new a(t,f),r){case\">\":p=c,h=l,g=u,y=\">\",m=\">=\";break;case\"<\":p=u,h=d,g=c,y=\"<\",m=\"<=\";break;default:throw new TypeError('Must provide a hilo val of \"<\" or \">\"')}if(i(e,t,f))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let a=null,i=null;if(n.forEach(e=>{e.semver===s&&(e=new o(\">=0.0.0\")),a=a||e,i=i||e,p(e.semver,a.semver,f)?a=e:g(e.semver,i.semver,f)&&(i=e)}),a.operator===y||a.operator===m)return!1;if((!i.operator||i.operator===y)&&h(e,i.semver))return!1;if(i.operator===m&&g(e,i.semver))return!1}return!0}},8308:(e,t,r)=>{const n=Symbol(\"SemVer ANY\");class o{static get ANY(){return n}constructor(e,t){if(t=s(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\\s+/).join(\" \"),u(\"comparator\",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value=\"\":this.value=this.operator+this.semver.version,u(\"comp\",this)}parse(e){const t=this.options.loose?a[i.COMPARATORLOOSE]:a[i.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:\"\",\"=\"===this.operator&&(this.operator=\"\"),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u(\"Comparator.test\",e,this.options.loose),this.semver===n||e===n)return!0;if(\"string\"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError(\"a Comparator is required\");return\"\"===this.operator?\"\"===this.value||new d(e.value,t).test(this.value):\"\"===e.operator?\"\"===e.value||new d(this.value,t).test(e.semver):(!(t=s(t)).includePrerelease||\"<0.0.0-0\"!==this.value&&\"<0.0.0-0\"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith(\"<0.0.0\")||e.value.startsWith(\"<0.0.0\")))&&(!(!this.operator.startsWith(\">\")||!e.operator.startsWith(\">\"))||(!(!this.operator.startsWith(\"<\")||!e.operator.startsWith(\"<\"))||(!(this.semver.version!==e.semver.version||!this.operator.includes(\"=\")||!e.operator.includes(\"=\"))||(!!(c(this.semver,\"<\",e.semver,t)&&this.operator.startsWith(\">\")&&e.operator.startsWith(\"<\"))||!!(c(this.semver,\">\",e.semver,t)&&this.operator.startsWith(\"<\")&&e.operator.startsWith(\">\")))))))}}e.exports=o;const s=r(3607),{safeRe:a,t:i}=r(946),c=r(835),u=r(6820),l=r(7784),d=r(2859)},8346:(e,t,r)=>{const n=r(2859);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},8354:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if(null==e)throw new TypeError(\"Expected a string but received a \".concat(e));if(\"String\"!==e.constructor.name)throw new TypeError(\"Expected a string but received a \".concat(e.constructor.name))},e.exports=t.default,e.exports.default=t.default},8462:(e,t,r)=>{var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")(),a=r(4856);o.object.extend(proto,a),o.exportSymbol(\"TronWebProto.AccountCreateContract\",null,s),o.exportSymbol(\"TronWebProto.AccountPermissionUpdateContract\",null,s),o.exportSymbol(\"TronWebProto.AccountUpdateContract\",null,s),o.exportSymbol(\"TronWebProto.SetAccountIdContract\",null,s),TronWebProto.AccountCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountCreateContract.displayName=\"TronWebProto.AccountCreateContract\"),TronWebProto.AccountUpdateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountUpdateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountUpdateContract.displayName=\"TronWebProto.AccountUpdateContract\"),TronWebProto.SetAccountIdContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SetAccountIdContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SetAccountIdContract.displayName=\"TronWebProto.SetAccountIdContract\"),TronWebProto.AccountPermissionUpdateContract=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.AccountPermissionUpdateContract.repeatedFields_,null)},o.inherits(TronWebProto.AccountPermissionUpdateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountPermissionUpdateContract.displayName=\"TronWebProto.AccountPermissionUpdateContract\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountCreateContract.prototype.toObject=function(e){return TronWebProto.AccountCreateContract.toObject(e,this)},TronWebProto.AccountCreateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),accountAddress:t.getAccountAddress_asB64(),type:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountCreateContract;return TronWebProto.AccountCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.AccountCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setAccountAddress(r);break;case 3:r=t.readEnum();e.setType(r);break;default:t.skipField()}}return e},TronWebProto.AccountCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getAccountAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getType())&&t.writeEnum(3,r)},TronWebProto.AccountCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.AccountCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountCreateContract.prototype.getAccountAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.AccountCreateContract.prototype.getAccountAddress_asB64=function(){return n.Message.bytesAsB64(this.getAccountAddress())},TronWebProto.AccountCreateContract.prototype.getAccountAddress_asU8=function(){return n.Message.bytesAsU8(this.getAccountAddress())},TronWebProto.AccountCreateContract.prototype.setAccountAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.AccountCreateContract.prototype.getType=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.AccountCreateContract.prototype.setType=function(e){return n.Message.setProto3EnumField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountUpdateContract.prototype.toObject=function(e){return TronWebProto.AccountUpdateContract.toObject(e,this)},TronWebProto.AccountUpdateContract.toObject=function(e,t){var r={accountName:t.getAccountName_asB64(),ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountUpdateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountUpdateContract;return TronWebProto.AccountUpdateContract.deserializeBinaryFromReader(r,t)},TronWebProto.AccountUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAccountName(r);break;case 2:r=t.readBytes();e.setOwnerAddress(r);break;default:t.skipField()}}return e},TronWebProto.AccountUpdateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountUpdateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAccountName_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.AccountUpdateContract.prototype.getAccountName=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.AccountUpdateContract.prototype.getAccountName_asB64=function(){return n.Message.bytesAsB64(this.getAccountName())},TronWebProto.AccountUpdateContract.prototype.getAccountName_asU8=function(){return n.Message.bytesAsU8(this.getAccountName())},TronWebProto.AccountUpdateContract.prototype.setAccountName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountUpdateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SetAccountIdContract.prototype.toObject=function(e){return TronWebProto.SetAccountIdContract.toObject(e,this)},TronWebProto.SetAccountIdContract.toObject=function(e,t){var r={accountId:t.getAccountId_asB64(),ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SetAccountIdContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SetAccountIdContract;return TronWebProto.SetAccountIdContract.deserializeBinaryFromReader(r,t)},TronWebProto.SetAccountIdContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAccountId(r);break;case 2:r=t.readBytes();e.setOwnerAddress(r);break;default:t.skipField()}}return e},TronWebProto.SetAccountIdContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SetAccountIdContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SetAccountIdContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAccountId_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.SetAccountIdContract.prototype.getAccountId=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.SetAccountIdContract.prototype.getAccountId_asB64=function(){return n.Message.bytesAsB64(this.getAccountId())},TronWebProto.SetAccountIdContract.prototype.getAccountId_asU8=function(){return n.Message.bytesAsU8(this.getAccountId())},TronWebProto.SetAccountIdContract.prototype.setAccountId=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.SetAccountIdContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.AccountPermissionUpdateContract.repeatedFields_=[4],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountPermissionUpdateContract.prototype.toObject=function(e){return TronWebProto.AccountPermissionUpdateContract.toObject(e,this)},TronWebProto.AccountPermissionUpdateContract.toObject=function(e,t){var r,o={ownerAddress:t.getOwnerAddress_asB64(),owner:(r=t.getOwner())&&a.Permission.toObject(e,r),witness:(r=t.getWitness())&&a.Permission.toObject(e,r),activesList:n.Message.toObjectList(t.getActivesList(),a.Permission.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.AccountPermissionUpdateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountPermissionUpdateContract;return TronWebProto.AccountPermissionUpdateContract.deserializeBinaryFromReader(r,t)},TronWebProto.AccountPermissionUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=new a.Permission;t.readMessage(r,a.Permission.deserializeBinaryFromReader),e.setOwner(r);break;case 3:r=new a.Permission;t.readMessage(r,a.Permission.deserializeBinaryFromReader),e.setWitness(r);break;case 4:r=new a.Permission;t.readMessage(r,a.Permission.deserializeBinaryFromReader),e.addActives(r);break;default:t.skipField()}}return e},TronWebProto.AccountPermissionUpdateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountPermissionUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountPermissionUpdateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),null!=(r=e.getOwner())&&t.writeMessage(2,r,a.Permission.serializeBinaryToWriter),null!=(r=e.getWitness())&&t.writeMessage(3,r,a.Permission.serializeBinaryToWriter),(r=e.getActivesList()).length>0&&t.writeRepeatedMessage(4,r,a.Permission.serializeBinaryToWriter)},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountPermissionUpdateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountPermissionUpdateContract.prototype.getOwner=function(){return n.Message.getWrapperField(this,a.Permission,2)},TronWebProto.AccountPermissionUpdateContract.prototype.setOwner=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.AccountPermissionUpdateContract.prototype.clearOwner=function(){return this.setOwner(void 0)},TronWebProto.AccountPermissionUpdateContract.prototype.hasOwner=function(){return null!=n.Message.getField(this,2)},TronWebProto.AccountPermissionUpdateContract.prototype.getWitness=function(){return n.Message.getWrapperField(this,a.Permission,3)},TronWebProto.AccountPermissionUpdateContract.prototype.setWitness=function(e){return n.Message.setWrapperField(this,3,e)},TronWebProto.AccountPermissionUpdateContract.prototype.clearWitness=function(){return this.setWitness(void 0)},TronWebProto.AccountPermissionUpdateContract.prototype.hasWitness=function(){return null!=n.Message.getField(this,3)},TronWebProto.AccountPermissionUpdateContract.prototype.getActivesList=function(){return n.Message.getRepeatedWrapperField(this,a.Permission,4)},TronWebProto.AccountPermissionUpdateContract.prototype.setActivesList=function(e){return n.Message.setRepeatedWrapperField(this,4,e)},TronWebProto.AccountPermissionUpdateContract.prototype.addActives=function(e,t){return n.Message.addToRepeatedWrapperField(this,4,e,TronWebProto.Permission,t)},TronWebProto.AccountPermissionUpdateContract.prototype.clearActivesList=function(){return this.setActivesList([])},o.object.extend(t,TronWebProto)},8498:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,o.default)(e);for(var t,r,n,s=e.replace(/[- ]+/g,\"\"),a=0,i=s.length-1;i>=0;i--)t=s.substring(i,i+1),r=parseInt(t,10),a+=n&&(r*=2)>=10?r%10+1:r,n=!n;return!(a%10!=0||!s)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},8515:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,o.default)(e),(t=(0,n.default)(t,c)).locale in a.decimal)return!(0,s.default)(u,e.replace(/ /g,\"\"))&&function(e){var t=new RegExp(\"^[-+]?([0-9]+)?(\\\\\".concat(a.decimal[e.locale],\"[0-9]{\").concat(e.decimal_digits,\"})\").concat(e.force_decimal?\"\":\"?\",\"$\"));return t}(t).test(e);throw new Error(\"Invalid locale '\".concat(t.locale,\"'\"))};var n=i(r(2533)),o=i(r(8354)),s=i(r(567)),a=r(7640);function i(e){return e&&e.__esModule?e:{default:e}}var c={force_decimal:!1,decimal_digits:\"1,\",locale:\"en-US\"},u=[\"\",\"-\",\"+\"];e.exports=t.default,e.exports.default=t.default},8524:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.fullWidth.test(e)&&a.halfWidth.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(3167),a=r(2167);e.exports=t.default,e.exports.default=t.default},8631:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/[^\\x00-\\x7F]/;e.exports=t.default,e.exports.default=t.default},8689:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,n.default)(e),0===((t=(0,o.default)(t,a)).ignore_whitespace?e.trim().length:e.length)};var n=s(r(8354)),o=s(r(2533));function s(e){return e&&e.__esModule?e:{default:e}}var a={ignore_whitespace:!1};e.exports=t.default,e.exports.default=t.default},8755:(e,t)=>{\"use strict\";function r(e){return\"[object RegExp]\"===Object.prototype.toString.call(e)}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){for(var n=0;n<t.length;n++){var o=t[n];if(e===o||r(o)&&o.test(e))return!0}return!1},e.exports=t.default,e.exports.default=t.default},8925:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>0===n(e,t,r)},8985:e=>{\"use strict\";var t=Object.prototype.hasOwnProperty,r=\"~\";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function s(e,t,n,s,a){if(\"function\"!=typeof n)throw new TypeError(\"The listener must be a function\");var i=new o(n,s||e,a),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],i]:e._events[c].push(i):(e._events[c]=i,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function i(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),i.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},i.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,s=n.length,a=new Array(s);o<s;o++)a[o]=n[o].fn;return a},i.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},i.prototype.emit=function(e,t,n,o,s,a){var i=r?r+e:e;if(!this._events[i])return!1;var c,u,l=this._events[i],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,o),!0;case 5:return l.fn.call(l.context,t,n,o,s),!0;case 6:return l.fn.call(l.context,t,n,o,s,a),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var f,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,o);break;default:if(!c)for(f=1,c=new Array(d-1);f<d;f++)c[f-1]=arguments[f];l[u].fn.apply(l[u].context,c)}}return!0},i.prototype.on=function(e,t,r){return s(this,e,t,r,!1)},i.prototype.once=function(e,t,r){return s(this,e,t,r,!0)},i.prototype.removeListener=function(e,t,n,o){var s=r?r+e:e;if(!this._events[s])return this;if(!t)return a(this,s),this;var i=this._events[s];if(i.fn)i.fn!==t||o&&!i.once||n&&i.context!==n||a(this,s);else{for(var c=0,u=[],l=i.length;c<l;c++)(i[c].fn!==t||o&&!i[c].once||n&&i[c].context!==n)&&u.push(i[c]);u.length?this._events[s]=1===u.length?u[0]:u:a(this,s)}return this},i.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=r,i.EventEmitter=i,e.exports=i},8993:(e,t,r)=>{const n=r(7784);e.exports=(e,t)=>new n(e,t).patch},9013:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.default)(e);var r=t.provider,s=e.replace(/[- ]+/g,\"\");if(r&&r.toLowerCase()in a){if(!a[r.toLowerCase()].test(s))return!1}else{if(r&&!(r.toLowerCase()in a))throw new Error(\"\".concat(r,\" is not a valid credit card provider.\"));if(!i.some(function(e){return e.test(s)}))return!1}return(0,o.default)(e)};var n=s(r(8354)),o=s(r(8498));function s(e){return e&&e.__esModule?e:{default:e}}var a={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\\d{3})\\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},i=function(){var e=[];for(var t in a)a.hasOwnProperty(t)&&e.push(a[t]);return e}();e.exports=t.default,e.exports.default=t.default},9026:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\";(0,n.default)(e);var r=e.split(\"/\");if(2!==r.length)return!1;if(!a.test(r[1]))return!1;if(r[1].length>1&&r[1].startsWith(\"0\"))return!1;if(!(0,o.default)(r[0],t))return!1;var s=null;switch(String(t)){case\"4\":s=i;break;case\"6\":s=c;break;default:s=(0,o.default)(r[0],\"6\")?c:i}return r[1]<=s&&r[1]>=0};var n=s(r(8354)),o=s(r(6331));function s(e){return e&&e.__esModule?e:{default:e}}var a=/^\\d{1,3}$/,i=32,c=128;e.exports=t.default,e.exports.default=t.default},9043:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r=e.join(\"\");return new RegExp(r,t)},e.exports=t.default,e.exports.default=t.default},9190:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(e),t=t||{};var r=new RegExp(\"^(?:[-+])?(?:[0-9]+)?(?:\\\\\".concat(t.locale?s.decimal[t.locale]:\".\",\"[0-9]*)?(?:[eE][\\\\+\\\\-]?(?:[0-9]+))?$\"));if(\"\"===e||\".\"===e||\",\"===e||\"-\"===e||\"+\"===e)return!1;var a=parseFloat(e.replace(\",\",\".\"));return r.test(e)&&(!t.hasOwnProperty(\"min\")||(0,o.default)(t.min)||a>=t.min)&&(!t.hasOwnProperty(\"max\")||(0,o.default)(t.max)||a<=t.max)&&(!t.hasOwnProperty(\"lt\")||(0,o.default)(t.lt)||a<t.lt)&&(!t.hasOwnProperty(\"gt\")||(0,o.default)(t.gt)||a>t.gt)},t.locales=void 0;var n=a(r(8354)),o=a(r(3224)),s=r(7640);function a(e){return e&&e.__esModule?e:{default:e}}t.locales=Object.keys(s.decimal)},9300:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,o.default)(e);var r=function(e){var t=function(e){var t={};return Array.from(e).forEach(function(e){t[e]?t[e]+=1:t[e]=1}),t}(e),r={length:e.length,uniqueChars:Object.keys(t).length,uppercaseCount:0,lowercaseCount:0,numberCount:0,symbolCount:0};return Object.keys(t).forEach(function(e){a.test(e)?r.uppercaseCount+=t[e]:i.test(e)?r.lowercaseCount+=t[e]:c.test(e)?r.numberCount+=t[e]:u.test(e)&&(r.symbolCount+=t[e])}),r}(e);if((t=(0,n.default)(t||{},l)).returnScore)return function(e,t){var r=0;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);return r}(r,t);return r.length>=t.minLength&&r.lowercaseCount>=t.minLowercase&&r.uppercaseCount>=t.minUppercase&&r.numberCount>=t.minNumbers&&r.symbolCount>=t.minSymbols};var n=s(r(2533)),o=s(r(8354));function s(e){return e&&e.__esModule?e:{default:e}}var a=/^[A-Z]$/,i=/^[a-z]$/,c=/^[0-9]$/,u=/^[-#!$@£%^&*()_+|~=`{}\\[\\]:\";'<>?,.\\/\\\\ ]$/,l={minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1,returnScore:!1,pointsPerUnique:1,pointsPerRepeat:.5,pointsForContainingLower:10,pointsForContainingUpper:10,pointsForContainingNumber:10,pointsForContainingSymbol:10};e.exports=t.default,e.exports.default=t.default},9317:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,o.default)(e),null==t&&(t=\"all\");return t in s&&s[t].test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[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,6:/^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,8:/^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,nil:/^00000000-0000-0000-0000-000000000000$/i,max:/^ffffffff-ffff-ffff-ffff-ffffffffffff$/i,loose:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,all:/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i};e.exports=t.default,e.exports.default=t.default},9318:(e,t)=>{t.read=function(e,t,r,n,o){var s,a,i=8*o-n-1,c=(1<<i)-1,u=c>>1,l=-7,d=r?o-1:0,f=r?-1:1,p=e[t+d];for(d+=f,s=p&(1<<-l)-1,p>>=-l,l+=i;l>0;s=256*s+e[t+d],d+=f,l-=8);for(a=s&(1<<-l)-1,s>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=f,l-=8);if(0===s)s=1-u;else{if(s===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),s-=u}return(p?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,o,s){var a,i,c,u=8*s-o-1,l=(1<<u)-1,d=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,h=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(i=0,a=l):a+d>=1?(i=(t*c-1)*Math.pow(2,o),a+=d):(i=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[r+p]=255&i,p+=h,i/=256,o-=8);for(a=a<<o|i,u+=o;u>0;e[r+p]=255&a,p+=h,a/=256,u-=8);e[r+p-h]|=128*g}},9514:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=s;(t=t||{}).allow_hyphens&&(r=a);if(!r.test(e))return!1;e=e.replace(/-/g,\"\");for(var n=0,i=2,c=0;c<14;c++){var u=e.substring(14-c-1,14-c),l=parseInt(u,10)*i;n+=l>=10?l%10+1:l,1===i?i+=1:i-=1}if((10-n%10)%10!==parseInt(e.substring(14,15),10))return!1;return!0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[0-9]{15}$/,a=/^\\d{2}-\\d{6}-\\d{6}-\\d{1}$/;e.exports=t.default,e.exports.default=t.default},9664:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=!1,n=!0;\"object\"!==s(t)?arguments.length>=2&&(n=arguments[1]):(r=void 0!==t.allowSpaces?t.allowSpaces:r,n=void 0!==t.includePercentValues?t.includePercentValues:n);if(r){if(!l.test(e))return!1;e=e.replace(/\\s/g,\"\")}if(!n)return a.test(e)||i.test(e);return a.test(e)||i.test(e)||c.test(e)||u.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};function s(e){return s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s(e)}var a=/^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])\\)$/,i=/^rgba\\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\\.\\d\\d?|1(\\.0)?|0(\\.0)?)\\)$/,c=/^rgb\\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\\)$/,u=/^rgba\\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\\.\\d\\d?|1(\\.0)?|0(\\.0)?)\\)$/,l=/^rgba?/;e.exports=t.default,e.exports.default=t.default},9711:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function e(t,r){(0,o.default)(t),null!=r&&r.eui&&(r.eui=String(r.eui));if(null!=r&&r.no_colons||null!=r&&r.no_separators)return\"48\"===r.eui?a.test(t):\"64\"===r.eui?u.test(t):a.test(t)||u.test(t);if(\"48\"===(null==r?void 0:r.eui))return s.test(t)||i.test(t);if(\"64\"===(null==r?void 0:r.eui))return c.test(t)||l.test(t);return e(t,{eui:\"48\"})||e(t,{eui:\"64\"})};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(?:[0-9a-fA-F]{2}([-:\\s]))([0-9a-fA-F]{2}\\1){4}([0-9a-fA-F]{2})$/,a=/^([0-9a-fA-F]){12}$/,i=/^([0-9a-fA-F]{4}\\.){2}([0-9a-fA-F]{4})$/,c=/^(?:[0-9a-fA-F]{2}([-:\\s]))([0-9a-fA-F]{2}\\1){6}([0-9a-fA-F]{2})$/,u=/^([0-9a-fA-F]){16}$/,l=/^([0-9a-fA-F]{4}\\.){3}([0-9a-fA-F]{4})$/;e.exports=t.default,e.exports.default=t.default},9760:(e,t,r)=>{const n=r(7784),o=r(2859);e.exports=(e,t,r)=>{let s=null,a=null,i=null;try{i=new o(t,r)}catch(e){return null}return e.forEach(e=>{i.test(e)&&(s&&-1!==a.compare(e)||(s=e,a=new n(s,r)))}),s}},9864:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),e===e.toUpperCase()};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},9974:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;e.exports=t.default,e.exports.default=t.default}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.loaded=!0,s.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{\"use strict\";r.r(n),r.d(n,{onAssetHistoricalPrice:()=>oR,onAssetsConversion:()=>sR,onAssetsLookup:()=>aR,onAssetsMarketData:()=>iR,onClientRequest:()=>cR,onCronjob:()=>uR,onKeyringRequest:()=>lR,onRpcRequest:()=>dR,onUserInput:()=>fR});var e={};r.r(e),r.d(e,{base64DecodeFromString:()=>uo,base64EncodeToString:()=>lo,byte2hexStr:()=>so,byteArray2hexStr:()=>co,bytesToString:()=>ao,hextoString:()=>io});var t={};r.r(t),r.d(t,{ADDRESS_PREFIX:()=>po,ADDRESS_PREFIX_BYTE:()=>ho,ADDRESS_PREFIX_REGEX:()=>go,ADDRESS_SIZE:()=>fo,TRON_BIP39_PATH_INDEX_0:()=>mo,TRON_BIP39_PATH_PREFIX:()=>yo});var o={};r.r(o),r.d(o,{arrayEquals:()=>wo,base64DecodeFromString:()=>uo,base64EncodeToString:()=>lo,bin2String:()=>bo,byte2hexStr:()=>so,byteArray2hexStr:()=>co,bytesToString:()=>ao,getStringType:()=>Bo,hexChar2byte:()=>Ao,hexStr2byteArray:()=>Po,hextoString:()=>io,isHexChar:()=>vo,isNumber:()=>Co,strToDate:()=>Eo,stringToBytes:()=>To});var s={};r.r(s),r.d(s,{decode58:()=>Ro,encode58:()=>_o});var a={};r.r(a),r.d(a,{OG:()=>Gi,My:()=>ki,Ph:()=>Di,lX:()=>Li,Id:()=>Vi,fg:()=>qi,qj:()=>ji,aT:()=>Ui,lq:()=>$i,z:()=>zi,Q5:()=>Ji});var i={};r.r(i),r.d(i,{AbiCoder:()=>Vu,FormatTypes:()=>_p,Interface:()=>Cp,Mnemonic:()=>wi,Signature:()=>Cs,SigningKey:()=>Oc,Wordlist:()=>li,arrayify:()=>Ip,concat:()=>Qo,ethersHDNodeWallet:()=>Cf,id:()=>si,isValidMnemonic:()=>Rp,joinSignature:()=>Sp,keccak256:()=>oi,pbkdf2:()=>Oa,recoverAddress:()=>Fc,sha256:()=>Sa,sha512:()=>Ia,splitSignature:()=>Wp,toUtf8Bytes:()=>Na,toUtf8String:()=>Ua,wordlists:()=>Wf});var c={};r.r(c),r.d(c,{DO:()=>rh,OG:()=>gh,My:()=>oh,Ph:()=>uh,lX:()=>lh,Id:()=>hh,fg:()=>bh,qj:()=>ph,aT:()=>ch,aY:()=>th,lq:()=>dh,z:()=>fh,Q5:()=>Th});var u={};r.r(u),r.d(u,{ECKeySign:()=>Tg,SHA256:()=>Ag,arrayToBase64String:()=>cg,computeAddress:()=>fg,decode58Check:()=>hg,decodeBase58Address:()=>sg,ecRecover:()=>ig,genPriKey:()=>dg,getAddressFromPriKey:()=>pg,getAddressFromPriKeyBase64String:()=>bg,getBase58CheckAddress:()=>og,getBase58CheckAddressFromPriKeyBase64String:()=>yg,getHexStrAddressFromPriKeyBase64String:()=>mg,getPubKeyFromPriKey:()=>wg,getRowBytesFromTransactionBase64:()=>lg,isAddressValid:()=>gg,passwordToAddress:()=>vg,pkToAddress:()=>Pg,sha3:()=>Eg,signBytes:()=>ug,signTransaction:()=>ag});var l={};r.r(l),r.d(l,{generateAccount:()=>Bg,generateAccountWithMnemonic:()=>Sg,generateRandom:()=>Wg});var d={};r.r(d),r.d(d,{hasProperties:()=>ay,hasProperty:()=>sy,isArray:()=>Yg,isBigNumber:()=>ey,isBoolean:()=>Qg,isFunction:()=>ry,isHex:()=>ny,isInteger:()=>oy,isJson:()=>Xg,isNotNullOrUndefined:()=>ly,isObject:()=>Jg,isString:()=>ty,isValidURL:()=>Zg,mapEvent:()=>iy,padLeft:()=>uy,parseEvent:()=>cy,sleep:()=>dy});var f={};r.r(f),r.d(f,{fromHex:()=>fy,fromPrivateKey:()=>yy,isAddress:()=>my,isChecksumAddress:()=>gy,toChecksumAddress:()=>hy,toHex:()=>py});var p={};r.r(p),r.d(p,{decodeParams:()=>Ty,decodeParamsV2ByABI:()=>Cy,encodeParams:()=>Ay,encodeParamsV2ByABI:()=>Ey});var h={};r.r(h),r.d(h,{TRON_MESSAGE_PREFIX:()=>By,hashMessage:()=>Wy,signMessage:()=>Sy,verifyMessage:()=>Iy});var g={};r.r(g),r.d(g,{TypedDataEncoder:()=>jy,signTypedData:()=>Vy,verifyTypedData:()=>Gy});var y={};r.r(y),r.d(y,{hasBrowserEnv:()=>nb,hasStandardBrowserEnv:()=>sb,hasStandardBrowserWebWorkerEnv:()=>ab,navigator:()=>ob,origin:()=>ib});var m={};r.r(m),r.d(m,{txCheck:()=>UT,txCheckWithArgs:()=>DT,txJsonToPb:()=>MT,txJsonToPbWithArgs:()=>FT,txPbToRawDataHex:()=>NT,txPbToTxID:()=>LT});var b={};r.r(b),r.d(b,{deserializeTransaction:()=>rA});var w={};r.r(w),r.d(w,{AccountType:()=>bw,ContractType:()=>yw,Permission_PermissionType:()=>mw,ResourceCode:()=>oA});var T={};function A(e,t){return r=e,Boolean(\"string\"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}r.r(T),r.d(T,{OG:()=>US,My:()=>IS,Ph:()=>xS,lX:()=>OS,Id:()=>NS,fg:()=>$S,qj:()=>kS,aT:()=>RS,lq:()=>MS,z:()=>FS,Q5:()=>jS});class v extends Error{constructor(e){super(e.message),this.code=\"ERR_ASSERTION\"}}function P(e,t=\"Assertion failed.\",r=v){if(!e){if(t instanceof Error)throw t;throw A(r,t)}}class E extends TypeError{constructor(e,t){let r;const{message:n,explanation:o,...s}=e,{path:a}=e,i=0===a.length?n:`At path: ${a.join(\".\")} -- ${n}`;super(o??i),null!=o&&(this.cause=i),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function C(e){return\"object\"==typeof e&&null!==e}function B(e){return\"symbol\"==typeof e?e.toString():\"string\"==typeof e?JSON.stringify(e):`${e}`}function W(e,t,r,n){if(!0===e)return;!1===e?e={}:\"string\"==typeof e&&(e={message:e});const{path:o,branch:s}=t,{type:a}=r,{refinement:i,message:c=`Expected a value of type \\`${a}\\`${i?` with refinement \\`${i}\\``:\"\"}, but received: \\`${B(n)}\\``}=e;return{value:n,type:a,refinement:i,key:o[o.length-1],path:o,branch:s,...e,message:c}}function*S(e,t,r,n){(function(e){return C(e)&&\"function\"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const o of e){const e=W(o,t,r,n);e&&(yield e)}}function*I(e,t,r={}){const{path:n=[],branch:o=[e],coerce:s=!1,mask:a=!1}=r,i={path:n,branch:o};if(s&&(e=t.coercer(e,i),a&&\"type\"!==t.type&&C(t.schema)&&C(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let c=\"valid\";for(const n of t.validator(e,i))n.explanation=r.message,c=\"not_valid\",yield[n,void 0];for(let[u,l,d]of t.entries(e,i)){const t=I(l,d,{path:void 0===u?n:[...n,u],branch:void 0===u?o:[...o,l],coerce:s,mask:a,message:r.message});for(const r of t)r[0]?(c=null===r[0].refinement||void 0===r[0].refinement?\"not_valid\":\"not_refined\",yield[r[0],void 0]):s&&(l=r[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):C(e)&&(void 0!==l||u in e)&&(e[u]=l))}if(\"not_valid\"!==c)for(const n of t.refiner(e,i))n.explanation=r.message,c=\"not_refined\",yield[n,void 0];\"valid\"===c&&(yield[void 0,e])}class _{constructor(e){const{type:t,schema:r,validator:n,refiner:o,coercer:s=e=>e,entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=s,this.validator=n?(e,t)=>S(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>S(o(e,t),t,this,e):()=>[]}assert(e,t){return O(e,this,t)}create(e,t){return M(e,this,t)}is(e){return F(e,this)}mask(e,t){return function(e,t,r){const n=k(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}(e,this,t)}validate(e,t={}){return k(e,this,t)}}const R=\"EXACT_OPTIONAL\";class x extends _{constructor(e){super({...e,type:`exact optional ${e.type}`}),this.brand=R}static isExactOptional(e){return C(e)&&\"brand\"in e&&e.brand===R}}function O(e,t,r){const n=k(e,t,{message:r});if(n[0])throw n[0]}function M(e,t,r){const n=k(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function F(e,t){return!k(e,t)[0]}function k(e,t,r={}){const n=I(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);if(o[0]){return[new E(o[0],function*(){for(const e of n)e[0]&&(yield e[0])}),void 0]}return[void 0,o[1]]}function N(e,t){return new _({type:e,schema:null,validator:t})}function U(){return N(\"any\",()=>!0)}function D(e){return new _({type:\"array\",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${B(e)}`})}function L(){return N(\"boolean\",e=>\"boolean\"==typeof e)}function $(e){const t={},r=e.map(e=>B(e)).join();for(const r of e)t[r]=r;return new _({type:\"enums\",schema:t,validator:t=>e.includes(t)||`Expected one of \\`${r}\\`, but received: ${B(t)}`})}function z(){return N(\"integer\",e=>\"number\"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${B(e)}`)}function j(e){const t=B(e),r=typeof e;return new _({type:\"literal\",schema:\"string\"===r||\"number\"===r||\"boolean\"===r?e:null,validator:r=>r===e||`Expected the literal \\`${t}\\`, but received: ${B(r)}`})}function V(){return N(\"never\",()=>!1)}function G(e){return new _({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function H(){return N(\"number\",e=>\"number\"==typeof e&&!isNaN(e)||`Expected a number, but received: ${B(e)}`)}function K(e){const t=e?Object.keys(e):[],r=V();return new _({type:\"object\",schema:e??null,*entries(n){if(e&&C(n)){const o=new Set(Object.keys(n));for(const r of t){o.delete(r);const t=e[r];x.isExactOptional(t)&&!Object.prototype.hasOwnProperty.call(n,r)||(yield[r,n[r],e[r]])}for(const e of o)yield[e,n[e],r]}},validator:e=>C(e)||`Expected an object, but received: ${B(e)}`,coercer:e=>C(e)?{...e}:e})}function q(e){return new _({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function Z(e){return new x(e)}function J(e,t){return new _({type:\"record\",schema:null,*entries(r){if(C(r))for(const n in r){const o=r[n];yield[n,n,e],yield[n,o,t]}},validator:e=>C(e)||`Expected an object, but received: ${B(e)}`})}function Y(){return N(\"string\",e=>\"string\"==typeof e||`Expected a string, but received: ${B(e)}`)}function X(e){const t=V();return new _({type:\"tuple\",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let o=0;o<n;o++)yield[o,r[o],e[o]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${B(e)}`})}function Q(e){const t=Object.keys(e);return new _({type:\"type\",schema:e,*entries(r){if(C(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>C(e)||`Expected an object, but received: ${B(e)}`,coercer:e=>C(e)?{...e}:e})}function ee(e){const t=e.map(e=>e.type).join(\" | \");return new _({type:\"union\",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const o=[];for(const t of e){const[...e]=I(r,t,n),[s]=e;if(!s?.[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \\`${t}\\`, but received: ${B(r)}`,...o]}})}function te(){return N(\"unknown\",()=>!0)}function re(e,t){return N(e,e=>\"string\"==typeof e&&t.test(e))}const ne=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,oe=/^[-a-z0-9]{3,8}$/u,se=/^[-_a-zA-Z0-9]{1,32}$/u,ae=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,ie=/^[-.%a-zA-Z0-9]{1,128}$/u,ce=/^[-a-z0-9]{3,8}$/u,ue=/^[-.%a-zA-Z0-9]{1,128}$/u,le=/^[-.%a-zA-Z0-9]{1,78}$/u,de=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u,fe=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u,pe=re(\"CaipChainId\",ne),he=(re(\"CaipNamespace\",oe),re(\"CaipReference\",se),re(\"CaipAccountId\",ae)),ge=(re(\"CaipAccountAddress\",ie),re(\"CaipAssetNamespace\",ce),re(\"CaipAssetReference\",ue),re(\"CaipTokenId\",le),re(\"CaipAssetType\",de)),ye=re(\"CaipAssetId\",fe),me=re(\"CaipAssetTypeOrId\",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})(\\/(?<tokenId>[-.%a-zA-Z0-9]{1,78}))?$/u);var be;function we(e){const t=de.exec(e);if(!t?.groups)throw new Error(\"Invalid CAIP asset type.\");return{assetNamespace:t.groups.assetNamespace,assetReference:t.groups.assetReference,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}!function(e){e.Bip122=\"bip122\",e.Solana=\"solana\",e.Tron=\"tron\",e.Eip155=\"eip155\",e.Wallet=\"wallet\"}(be=be||(be={}));var Te=r(5250);function Ae(e){return e instanceof Map||e instanceof Set?e.size:e.length}function ve(e,t,r={}){const{exclusive:n}=r;return Ce(e,\"min\",r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?\"\":\"or equal to \"}${t} but received \\`${r}\\``)}function Pe(e){return Ce(e,\"nonempty\",t=>Ae(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function Ee(e,t){return Ce(e,\"pattern\",r=>t.test(r)||`Expected a ${e.type} matching \\`/${t.source}/\\` but received \"${r}\"`)}function Ce(e,t,r){return new _({...e,*refiner(n,o){yield*e.refiner(n,o);const s=S(r(n,o),o,e,n);for(const e of s)yield{...e,refinement:t}}})}const Be=ee([$([\"btc\",\"eth\",\"ltc\",\"bch\",\"bnb\",\"eos\",\"xrp\",\"xlm\",\"link\",\"dot\",\"yfi\",\"bits\",\"sats\",\"sol\",\"sei\",\"sonic\"]),$([\"usd\",\"aed\",\"amd\",\"ars\",\"aud\",\"bam\",\"bdt\",\"bhd\",\"bmd\",\"brl\",\"cad\",\"chf\",\"clp\",\"cny\",\"cop\",\"crc\",\"czk\",\"dkk\",\"dop\",\"eur\",\"gbp\",\"gel\",\"gtq\",\"hkd\",\"hnl\",\"huf\",\"idr\",\"ils\",\"inr\",\"jpy\",\"kes\",\"krw\",\"kwd\",\"lbp\",\"lkr\",\"mmk\",\"mxn\",\"myr\",\"ngn\",\"nok\",\"nzd\",\"pen\",\"php\",\"pkr\",\"pln\",\"ron\",\"rub\",\"sar\",\"sek\",\"sgd\",\"svc\",\"thb\",\"try\",\"twd\",\"uah\",\"vef\",\"vnd\",\"xdr\",\"zar\",\"zmw\"]),$([\"xag\",\"xau\"])]),We=J(Be,K({name:Y(),ticker:Be,value:ve(H(),0),currencyType:$([\"fiat\",\"crypto\",\"commodity\"])})),Se=K({id:Y(),price:ve(H(),0),marketCap:q(G(ve(H(),0))),allTimeHigh:q(G(ve(H(),0))),allTimeLow:q(G(ve(H(),0))),totalVolume:q(G(ve(H(),0))),high1d:q(G(ve(H(),0))),low1d:q(G(ve(H(),0))),circulatingSupply:q(G(ve(H(),0))),dilutedMarketCap:q(G(ve(H(),0))),marketCapPercentChange1d:q(G(H())),priceChange1d:q(G(H())),pricePercentChange1h:q(G(H())),pricePercentChange1d:q(G(H())),pricePercentChange7d:q(G(H())),pricePercentChange14d:q(G(H())),pricePercentChange30d:q(G(H())),pricePercentChange200d:q(G(H())),pricePercentChange1y:q(G(H())),bondingCurveProgressPercent:q(G(H())),liquidity:q(G(H())),totalSupply:q(G(H())),holderCount:q(G(H())),isMutable:q(G(L()))}),Ie=J(ge,G(Se)),_e=Be,Re=K({assetType:ge,timePeriod:q(Ee(Y(),/^[1-9][0-9]*[dmy]$/u)),from:q(ve(H(),0)),to:q(ve(H(),0)),vsCurrency:q(_e)}),xe=K({prices:D(X([H(),H()])),marketCaps:D(X([H(),H()])),totalVolumes:D(X([H(),H()]))}),Oe={prices:[],marketCaps:[],totalVolumes:[]},Me={log:(console.log,(...e)=>{}),info:(console.info,(...e)=>{}),warn:(console.warn,(...e)=>{}),debug:(console.debug,(...e)=>{}),error:(console.error,(...e)=>{})};const Fe={log:()=>{},info:()=>{},warn:()=>{},debug:()=>{},error:()=>{}},ke=(e,t)=>new Proxy(e,{get(e,r){const n=e[r];return\"function\"==typeof n?(r,...o)=>n.call(e,t,r,...o):n}}),Ne=Me,Ue=(e,t)=>`${e}:${t.map(e=>JSON.stringify(e)).join(\":\")}`;var De=function(){return De=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},De.apply(this,arguments)},Le=\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";(()=>{const e=Array(256).fill(-1);for(let t=0;t<58;++t)e[Le.charCodeAt(t)]=t})();var $e,ze,je,Ve=e=>{if(!e||\"string\"!=typeof e)throw new Error(`Expected base58 string but got “${e}”`);if(e.match(/[IOl0]/gmu))throw new Error(`Invalid base58 character “${e.match(/[IOl0]/gmu)}”`);const t=e.match(/^1+/gmu),r=t?t[0].length:0,n=(e.length-r)*(Math.log(58)/Math.log(256))+1>>>0;return new Uint8Array([...new Uint8Array(r),...e.match(/.{1}/gmu).map(e=>Le.indexOf(e)).reduce((e,t)=>e.map(e=>{const r=58*e+t;return t=r>>8,r}),new Uint8Array(n)).reverse().filter((o=!1,e=>o=o||e))]);var o},Ge=($e=function(e,t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.bech32m=t.bech32=void 0;const r=\"qpzry9x8gf2tvdw0s3jn54khce6mua7l\",n={};for(let e=0;e<32;e++){const t=r.charAt(e);n[t]=e}function o(e){const t=e>>25;return(33554431&e)<<5^996825010&-(1&t)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function s(e){let t=1;for(let r=0;r<e.length;++r){const n=e.charCodeAt(r);if(n<33||n>126)return\"Invalid prefix (\"+e+\")\";t=o(t)^n>>5}t=o(t);for(let r=0;r<e.length;++r){const n=e.charCodeAt(r);t=o(t)^31&n}return t}function a(e,t,r,n){let o=0,s=0;const a=(1<<r)-1,i=[];for(let n=0;n<e.length;++n)for(o=o<<t|e[n],s+=t;s>=r;)s-=r,i.push(o>>s&a);if(n)s>0&&i.push(o<<r-s&a);else{if(s>=t)return\"Excess padding\";if(o<<r-s&a)return\"Non-zero padding\"}return i}function i(e){return a(e,8,5,!0)}function c(e){const t=a(e,5,8,!1);if(Array.isArray(t))return t}function u(e){const t=a(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function l(e){let t;function a(e,r){if(r=r||90,e.length<8)return e+\" too short\";if(e.length>r)return\"Exceeds length limit\";const a=e.toLowerCase(),i=e.toUpperCase();if(e!==a&&e!==i)return\"Mixed-case string \"+e;const c=(e=a).lastIndexOf(\"1\");if(-1===c)return\"No separator character for \"+e;if(0===c)return\"Missing prefix for \"+e;const u=e.slice(0,c),l=e.slice(c+1);if(l.length<6)return\"Data too short\";let d=s(u);if(\"string\"==typeof d)return d;const f=[];for(let e=0;e<l.length;++e){const t=l.charAt(e),r=n[t];if(void 0===r)return\"Unknown character \"+t;d=o(d)^r,e+6>=l.length||f.push(r)}return d!==t?\"Invalid checksum for \"+e:{prefix:u,words:f}}return t=\"bech32\"===e?1:734539939,{decodeUnsafe:function(e,t){const r=a(e,t);if(\"object\"==typeof r)return r},decode:function(e,t){const r=a(e,t);if(\"object\"==typeof r)return r;throw new Error(r)},encode:function(e,n,a){if(a=a||90,e.length+7+n.length>a)throw new TypeError(\"Exceeds length limit\");let i=s(e=e.toLowerCase());if(\"string\"==typeof i)throw new Error(i);let c=e+\"1\";for(let e=0;e<n.length;++e){const t=n[e];if(t>>5)throw new Error(\"Non 5-bit word\");i=o(i)^t,c+=r.charAt(t)}for(let e=0;e<6;++e)i=o(i);i^=t;for(let e=0;e<6;++e)c+=r.charAt(i>>5*(5-e)&31);return c},toWords:i,fromWordsUnsafe:c,fromWords:u}}t.bech32=l(\"bech32\"),t.bech32m=l(\"bech32m\")},$e(ze={exports:{}},ze.exports),ze.exports);(je=Ge)&&je.__esModule&&Object.prototype.hasOwnProperty.call(je,\"default\")&&je.default;var He=Ge.bech32m,Ke=Ge.bech32;const qe=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];class Ze{constructor(){this.A=1779033703,this.B=-1150833019,this.C=1013904242,this.D=-1521486534,this.E=1359893119,this.F=-1694144372,this.G=528734635,this.H=1541459225,this._size=0,this._sp=0,(!Ye||Xe>=8e3)&&(Ye=new ArrayBuffer(8e3),Xe=0),this._byte=new Uint8Array(Ye,Xe,80),this._word=new Int32Array(Ye,Xe,20),Xe+=80}update(e){if(\"string\"==typeof e)return this._utf8(e);if(null==e)throw new TypeError(\"Invalid type: \"+typeof e);const t=e.byteOffset,r=e.byteLength;let n=r/64|0,o=0;if(n&&!(3&t)&&!(this._size%64)){const r=new Int32Array(e.buffer,t,16*n);for(;n--;)this._int32(r,o>>2),o+=64;this._size+=o}if(1!==e.BYTES_PER_ELEMENT&&e.buffer){const n=new Uint8Array(e.buffer,t+o,r-o);return this._uint8(n)}return o===r?this:this._uint8(e,o)}_uint8(e,t){const{_byte:r,_word:n}=this,o=e.length;for(t|=0;t<o;){const s=this._size%64;let a=s;for(;t<o&&a<64;)r[a++]=e[t++];a>=64&&this._int32(n),this._size+=a-s}return this}_utf8(e){const{_byte:t,_word:r}=this,n=e.length;let o=this._sp;for(let s=0;s<n;){const a=this._size%64;let i=a;for(;s<n&&i<64;){let r=0|e.charCodeAt(s++);r<128?t[i++]=r:r<2048?(t[i++]=192|r>>>6,t[i++]=128|63&r):r<55296||r>57343?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):o?(r=((1023&o)<<10)+(1023&r)+65536,t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r,o=0):o=r}i>=64&&(this._int32(r),r[0]=r[16]),this._size+=i-a}return this._sp=o,this}_int32(e,t){let{A:r,B:n,C:o,D:s,E:a,F:i,G:c,H:u}=this,l=0;for(t|=0;l<16;)Je[l++]=et(e[t++]);for(l=16;l<64;l++)Je[l]=at(Je[l-2])+Je[l-7]+st(Je[l-15])+Je[l-16]|0;for(l=0;l<64;l++){const e=u+ot(a)+tt(a,i,c)+qe[l]+Je[l]|0,t=nt(r)+rt(r,n,o)|0;u=c,c=i,i=a,a=s+e|0,s=o,o=n,n=r,r=e+t|0}this.A=r+this.A|0,this.B=n+this.B|0,this.C=o+this.C|0,this.D=s+this.D|0,this.E=a+this.E|0,this.F=i+this.F|0,this.G=c+this.G|0,this.H=u+this.H|0}digest(e){const{_byte:t,_word:r}=this;let n=this._size%64|0;for(t[n++]=128;3&n;)t[n++]=0;if(n>>=2,n>14){for(;n<16;)r[n++]=0;n=0,this._int32(r)}for(;n<16;)r[n++]=0;const o=8*this._size,s=(4294967295&o)>>>0,a=(o-s)/4294967296;return a&&(r[14]=et(a)),s&&(r[15]=et(s)),this._int32(r),\"hex\"===e?this._hex():this._bin()}_hex(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:a,H:i}=this;return Qe(e)+Qe(t)+Qe(r)+Qe(n)+Qe(o)+Qe(s)+Qe(a)+Qe(i)}_bin(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:a,H:i,_byte:c,_word:u}=this;return u[0]=et(e),u[1]=et(t),u[2]=et(r),u[3]=et(n),u[4]=et(o),u[5]=et(s),u[6]=et(a),u[7]=et(i),c.slice(0,32)}}const Je=new Int32Array(64);let Ye,Xe=0;const Qe=e=>(e+4294967296).toString(16).substr(-8),et=254===new Uint8Array(new Uint16Array([65279]).buffer)[0]?e=>e:e=>e<<24&4278190080|e<<8&16711680|e>>8&65280|e>>24&255,tt=(e,t,r)=>r^e&(t^r),rt=(e,t,r)=>e&t|r&(e|t),nt=e=>(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),ot=e=>(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7),st=e=>(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3,at=e=>(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10;var it,ct,ut=function(e){return(new Ze).update(e).digest()};!function(e){e.mainnet=\"mainnet\",e.testnet=\"testnet\",e.regtest=\"regtest\"}(it||(it={})),function(e){e.p2pkh=\"p2pkh\",e.p2sh=\"p2sh\",e.p2wpkh=\"p2wpkh\",e.p2wsh=\"p2wsh\",e.p2tr=\"p2tr\"}(ct||(ct={}));var lt={0:{type:ct.p2pkh,network:it.mainnet},111:{type:ct.p2pkh,network:it.testnet},5:{type:ct.p2sh,network:it.mainnet},196:{type:ct.p2sh,network:it.testnet}},dt=function(e){var t,r=e.substr(0,2).toLowerCase();if(\"bc\"===r||\"tb\"===r)return function(e){var t;try{t=e.startsWith(\"bc1p\")||e.startsWith(\"tb1p\")||e.startsWith(\"bcrt1p\")?He.decode(e):Ke.decode(e)}catch(e){throw new Error(\"Invalid address\")}var r={bc:it.mainnet,tb:it.testnet,bcrt:it.regtest}[t.prefix];if(void 0===r)throw new Error(\"Invalid address\");var n=t.words[0];if(n<0||n>16)throw new Error(\"Invalid address\");return{bech32:!0,network:r,address:e,type:20===Ke.fromWords(t.words.slice(1)).length?ct.p2wpkh:1===n?ct.p2tr:ct.p2wsh}}(e);try{t=Ve(e)}catch(e){throw new Error(\"Invalid address\")}var n=t.length;if(25!==n)throw new Error(\"Invalid address\");var o=t[0],s=t.slice(n-4,n),a=t.slice(0,n-4),i=ut(ut(a)).slice(0,4);if(s.some(function(e,t){return e!==i[t]}))throw new Error(\"Invalid address\");if(!Object.keys(lt).map(Number).includes(o))throw new Error(\"Invalid address\");return De(De({},lt[o]),{address:e,bech32:!1})};const ft=re(\"UuidV4\",/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu),pt=ft,ht=N(\"Url\",e=>{try{const t=new URL(e);return\"http:\"===t.protocol||\"https:\"===t.protocol}catch{return!1}}),gt=re(\"StringNumber\",/^\\d+(\\.\\d+)?$/u);function yt(e){return K(e)}function mt(e){return e.path[e.path.length-1]in e.branch[e.branch.length-2]}function bt(e){return new _({...e,validator:(t,r)=>!mt(r)||e.validator(t,r),refiner:(t,r)=>!mt(r)||e.refiner(t,r)})}function wt(e){return new _({type:\"union\",schema:null,*entries(t,r){yield*e(t).entries(t,r)},*refiner(t,r){yield*e(t).refiner(t,r)},coercer:(t,r)=>e(t).coercer(t,r),validator:(t,r)=>e(t).validator(t,r)})}function Tt(e,t,r){return new _({...e,coercer:(n,o)=>F(n,t)?e.coercer(r(n,o),o):e.coercer(n,o)})}function At(e){return Boolean(e)&&\"object\"==typeof e&&!Array.isArray(e)}const vt=(e,t)=>Object.hasOwnProperty.call(e,t);var Pt;!function(e){e[e.Null=4]=\"Null\",e[e.Comma=1]=\"Comma\",e[e.Wrapper=1]=\"Wrapper\",e[e.True=4]=\"True\",e[e.False=5]=\"False\",e[e.Quote=1]=\"Quote\",e[e.Colon=1]=\"Colon\",e[e.Date=24]=\"Date\"}(Pt=Pt||(Pt={}));function Et(e){if(\"object\"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}const Ct=e=>K(e);function Bt({path:e,branch:t}){const r=e[e.length-1];return vt(t[t.length-2],r)}function Wt(e){return new _({...e,type:`optional ${e.type}`,validator:(t,r)=>!Bt(r)||e.validator(t,r),refiner:(t,r)=>!Bt(r)||e.refiner(t,r)})}function St(e){if(null===e||\"boolean\"==typeof e||\"string\"==typeof e)return!0;if(\"number\"==typeof e&&Number.isFinite(e))return!0;if(\"object\"==typeof e){let t=!0;if(Array.isArray(e)){for(let r=0;r<e.length;r++)if(!St(e[r])){t=!1;break}return t}const r=Object.entries(e);for(let e=0;e<r.length;e++)if(\"string\"!=typeof r[e][0]||!St(r[e][1])){t=!1;break}return t}return!1}const It=N(\"JSON\",e=>St(e)),_t=Tt(It,Ce(U(),\"JSON\",e=>F(e,It)),e=>JSON.parse(JSON.stringify(e,(e,t)=>{if(\"__proto__\"!==e&&\"constructor\"!==e)return t})));function Rt(e){try{return function(e){M(e,_t)}(e),!0}catch{return!1}}const xt=j(\"2.0\"),Ot=G(ee([H(),Y()])),Mt=Ct({code:z(),message:Y(),data:Wt(_t),stack:Wt(Y())}),Ft=ee([J(Y(),_t),D(_t)]);Ct({id:Ot,jsonrpc:xt,method:Y(),params:Wt(Ft)}),Ct({jsonrpc:xt,method:Y(),params:Wt(Ft)});K({id:Ot,jsonrpc:xt,result:q(te()),error:q(Mt)});const kt=Ct({id:Ot,jsonrpc:xt,result:_t}),Nt=Ct({id:Ot,jsonrpc:xt,error:Mt});ee([kt,Nt]);const Ut=yt({jsonrpc:j(\"2.0\"),id:ee([Y(),H(),j(null)]),method:Y(),params:bt(ee([D(_t),J(Y(),_t)]))});var Dt;!function(e){e.Mnemonic=\"mnemonic\",e.PrivateKey=\"private-key\"}(Dt||(Dt={}));const Lt=K({type:j(`${Dt.Mnemonic}`),id:Y(),derivationPath:Y(),groupIndex:H()}),$t=K({type:j(`${Dt.PrivateKey}`)}),zt=wt(e=>Et(e)&&e.type===Dt.PrivateKey?$t:Lt),jt=(Vt=[J(Y(),_t),(Gt={entropy:bt(zt),exportable:bt(L())},Q(Gt))],new _({type:\"intersection\",schema:null,*entries(e,t){for(const{entries:r}of Vt)yield*r(e,t)},*validator(e,t){for(const{validator:r}of Vt)yield*r(e,t)},*refiner(e,t){for(const{refiner:r}of Vt)yield*r(e,t)}}));var Vt,Gt,Ht,Kt,qt,Zt,Jt;!function(e){e.Eoa=\"eip155:eoa\",e.Erc4337=\"eip155:erc4337\"}(Ht||(Ht={})),function(e){e.P2pkh=\"bip122:p2pkh\",e.P2sh=\"bip122:p2sh\",e.P2wpkh=\"bip122:p2wpkh\",e.P2tr=\"bip122:p2tr\"}(Kt||(Kt={})),function(e){e.DataAccount=\"solana:data-account\"}(qt||(qt={})),function(e){e.Eoa=\"tron:eoa\"}(Zt||(Zt={})),function(e){e.Account=\"any:account\"}(Jt||(Jt={}));const Yt=$([`${Ht.Eoa}`,`${Ht.Erc4337}`,`${Kt.P2pkh}`,`${Kt.P2sh}`,`${Kt.P2wpkh}`,`${Kt.P2tr}`,`${qt.DataAccount}`,`${Zt.Eoa}`,`${Jt.Account}`]),Xt=yt({id:pt,type:$([`${Ht.Eoa}`,`${Ht.Erc4337}`,`${Kt.P2pkh}`,`${Kt.P2sh}`,`${Kt.P2wpkh}`,`${Kt.P2tr}`,`${qt.DataAccount}`,`${Zt.Eoa}`,`${Jt.Account}`]),address:Y(),scopes:Pe(D(pe)),options:jt,methods:D(Y())}),Qt=(K({address:he}),yt({unit:Y(),amount:gt})),er=yt({fungible:j(!0),type:ge,...Qt.schema}),tr=yt({fungible:j(!1),id:ye}),rr=wt(e=>Et(e)&&!e.fungible?tr:er),nr=yt({amount:gt,unit:Y()}),or=re(\"DerivationPath\",/^m(?:\\/\\d+'?)+$/u);var sr;!function(e){e.Bip44=\"bip44\"}(sr||(sr={}));const ar=K({type:j(`${sr.Bip44}`),scopes:D(pe),derivationPath:or}),ir=(J(Y(),_t),yt({id:ft,scope:Y(),account:ft,origin:Y(),request:yt({method:Y(),params:bt(ee([D(_t),J(Y(),_t)]))})})),cr=(ee([yt({pending:j(!0),redirect:bt(yt({message:bt(Y()),url:bt(Y())}))}),yt({pending:j(!1),result:_t})]),yt({address:Y(),asset:G(rr)}));var ur;!function(e){e.Base=\"base\",e.Priority=\"priority\"}(ur||(ur={}));const lr=yt({type:$([`${ur.Base}`,`${ur.Priority}`]),asset:rr});var dr,fr;!function(e){e.Submitted=\"submitted\",e.Unconfirmed=\"unconfirmed\",e.Confirmed=\"confirmed\",e.Failed=\"failed\"}(dr||(dr={})),function(e){e.Send=\"send\",e.Receive=\"receive\",e.Swap=\"swap\",e.BridgeSend=\"bridge:send\",e.BridgeReceive=\"bridge:receive\",e.StakeDeposit=\"stake:deposit\",e.StakeWithdraw=\"stake:withdraw\",e.Unknown=\"unknown\"}(fr||(fr={}));const pr=yt({status:$([`${dr.Submitted}`,`${dr.Unconfirmed}`,`${dr.Confirmed}`,`${dr.Failed}`]),timestamp:G(H())}),hr=yt({id:Y(),chain:pe,account:ft,status:$([`${dr.Submitted}`,`${dr.Unconfirmed}`,`${dr.Confirmed}`,`${dr.Failed}`]),timestamp:G(H()),type:$([`${fr.Send}`,`${fr.Receive}`,`${fr.Swap}`,`${fr.BridgeSend}`,`${fr.BridgeReceive}`,`${fr.StakeDeposit}`,`${fr.StakeWithdraw}`,`${fr.Unknown}`]),from:D(cr),to:D(cr),fees:D(lr),events:D(pr)}),gr=(yt({data:D(hr),next:G(Y())}),yt({limit:H(),next:bt(G(Y()))})),yr=yt({metamask:bt(yt({correlationId:ft}))});var mr;!function(e){e.Hexadecimal=\"hexadecimal\",e.Base58=\"base58\"}(mr||(mr={}));const br=$([`${mr.Hexadecimal}`,`${mr.Base58}`]),wr=K({encoding:br,type:Z(Yt)}),Tr=K({encoding:br});K({scopes:Pe(D(pe)),bip44:Z(K({derivePath:L(),deriveIndex:L(),discover:L()})),privateKey:Z(K({importFormats:Z(D(wr)),exportFormats:Z(D(Tr))}))});var Ar;!function(e){e.Hd=\"hd\",e.PrivateKey=\"private-key\",e.Qr=\"qr\",e.Snap=\"snap\",e.Ledger=\"ledger\",e.Lattice=\"lattice\",e.Trezor=\"trezor\",e.OneKey=\"onekey\"}(Ar||(Ar={}));const vr=K({type:j(\"bip44:derive-path\"),entropySource:Y(),derivationPath:or}),Pr=K({type:j(\"bip44:derive-index\"),entropySource:Y(),groupIndex:H()}),Er=K({type:j(\"bip44:discover\"),entropySource:Y(),groupIndex:H()}),Cr=K({type:j(\"private-key:import\"),privateKey:Y(),encoding:br,accountType:Z(Yt)});var Br;!function(e){e.Bip44DerivePath=\"bip44:derive-path\",e.Bip44DeriveIndex=\"bip44:derive-index\",e.Bip44Discover=\"bip44:discover\",e.PrivateKeyImport=\"private-key:import\"}(Br||(Br={}));wt(e=>{const t=e?.type;switch(t){case Br.Bip44DerivePath:return vr;case Br.Bip44DeriveIndex:return Pr;case Br.Bip44Discover:return Er;case Br.PrivateKeyImport:return Cr;default:return vr}}),K({type:j(\"private-key\"),privateKey:Y(),encoding:br}),K({type:j(\"private-key\"),encoding:br});var Wr;!function(e){e.PrivateKey=\"private-key\"}(Wr||(Wr={}));var Sr;!function(e){e.Mainnet=\"bip122:000000000019d6689c085ae165831e93\",e.Testnet=\"bip122:000000000933ea01ad0ee984209779ba\",e.Testnet4=\"bip122:00000000da84f2bafbbc53dee25a72ae\",e.Signet=\"bip122:00000008819873e925422c1ff0f99f7c\",e.Regtest=\"bip122:regtest\"}(Sr||(Sr={}));const Ir=(e,t)=>{try{return dt(e).type===t||new Error(`Invalid ${t} address`)}catch(e){return new Error(`Failed to decode ${t} address: ${e.message}`)}},_r=Ce(Y(),\"BtcP2pkhAddressStruct\",e=>Ir(e,ct.p2pkh)),Rr=Ce(Y(),\"BtcP2shAddressStruct\",e=>Ir(e,ct.p2sh)),xr=Ce(Y(),\"BtcP2wpkhAddressStruct\",e=>Ir(e,ct.p2wpkh)),Or=Ce(Y(),\"BtcP2trAddressStruct\",e=>Ir(e,ct.p2tr));var Mr;!function(e){e.SignPsbt=\"signPsbt\",e.ComputeFee=\"computeFee\",e.FillPsbt=\"fillPsbt\",e.BroadcastPsbt=\"broadcastPsbt\",e.SendTransfer=\"sendTransfer\",e.GetUtxo=\"getUtxo\",e.ListUtxos=\"listUtxos\",e.PublicDescriptor=\"publicDescriptor\",e.SignMessage=\"signMessage\"}(Mr||(Mr={}));const Fr=yt({...Xt.schema,scopes:Pe(D(pe)),methods:D($(Object.values(Mr)))});yt({...Fr.schema,address:_r,type:j(`${Kt.P2pkh}`)}),yt({...Fr.schema,address:Rr,type:j(`${Kt.P2sh}`)}),yt({...Fr.schema,address:xr,type:j(`${Kt.P2wpkh}`)}),yt({...Fr.schema,address:Or,type:j(`${Kt.P2tr}`)});var kr;!function(e){e.Devnet=\"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1\",e.Mainnet=\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",e.Testnet=\"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z\"}(kr||(kr={}));const Nr=re(\"SolAddress\",/^[1-9A-HJ-NP-Za-km-z]{32,44}$/iu);var Ur;!function(e){e.SendAndConfirmTransaction=\"sendAndConfirmTransaction\",e.SignAndSendTransaction=\"signAndSendTransaction\",e.SignTransaction=\"signTransaction\",e.SignMessage=\"signMessage\",e.SignIn=\"signIn\"}(Ur||(Ur={}));yt({...Xt.schema,address:Nr,type:j(`${qt.DataAccount}`),scopes:Pe(D(pe)),methods:D($(Object.values(Ur)))});var Dr;!function(e){e.Eoa=\"eip155:0\",e.Mainnet=\"eip155:1\",e.Testnet=\"eip155:11155111\"}(Dr||(Dr={}));const Lr=re(\"EthBytes\",/^0x[0-9a-f]*$/iu),$r=re(\"EthAddress\",/^0x[0-9a-f]{40}$/iu),zr=re(\"EthUint256\",/^0x([1-9a-f][0-9a-f]*|0)$/iu);var jr;!function(e){e.PersonalSign=\"personal_sign\",e.Sign=\"eth_sign\",e.SignTransaction=\"eth_signTransaction\",e.SignTypedDataV1=\"eth_signTypedData_v1\",e.SignTypedDataV3=\"eth_signTypedData_v3\",e.SignTypedDataV4=\"eth_signTypedData_v4\",e.PrepareUserOperation=\"eth_prepareUserOperation\",e.PatchUserOperation=\"eth_patchUserOperation\",e.SignUserOperation=\"eth_signUserOperation\"}(jr||(jr={}));yt({...Xt.schema,address:$r,type:j(`${Ht.Eoa}`),scopes:Pe(D(j(Dr.Eoa))),methods:D($([`${jr.PersonalSign}`,`${jr.Sign}`,`${jr.SignTransaction}`,`${jr.SignTypedDataV1}`,`${jr.SignTypedDataV3}`,`${jr.SignTypedDataV4}`]))}),yt({...Xt.schema,address:$r,type:j(`${Ht.Erc4337}`),scopes:Pe(D(pe)),methods:D($([`${jr.PersonalSign}`,`${jr.Sign}`,`${jr.SignTypedDataV1}`,`${jr.SignTypedDataV3}`,`${jr.SignTypedDataV4}`,`${jr.PrepareUserOperation}`,`${jr.PatchUserOperation}`,`${jr.SignUserOperation}`]))}),yt({sender:$r,nonce:zr,initCode:Lr,callData:Lr,callGasLimit:zr,verificationGasLimit:zr,preVerificationGas:zr,maxFeePerGas:zr,maxPriorityFeePerGas:zr,paymasterAndData:Lr,signature:Lr}),yt({to:$r,value:zr,data:Lr}),yt({nonce:zr,initCode:Lr,callData:Lr,gasLimits:bt(yt({callGasLimit:zr,verificationGasLimit:zr,preVerificationGas:zr})),dummyPaymasterAndData:Lr,dummySignature:Lr,bundlerUrl:ht}),yt({paymasterAndData:Lr,callGasLimit:bt(zr),verificationGasLimit:bt(zr),preVerificationGas:bt(zr)});var Vr;!function(e){e.Mainnet=\"tron:728126428\",e.Nile=\"tron:3448148188\",e.Shasta=\"tron:2494104990\"}(Vr||(Vr={}));const Gr=re(\"TrxAddress\",/^T[1-9A-HJ-NP-Za-km-z]{33}$/iu);var Hr;!function(e){e.SignMessage=\"signMessage\",e.SignTransaction=\"signTransaction\",e.SignMessageV2=\"signMessageV2\",e.VerifyMessageV2=\"verifyMessageV2\"}(Hr||(Hr={}));yt({...Xt.schema,address:Gr,type:j(`${Zt.Eoa}`),scopes:Pe(D(pe)),methods:D($(Object.values(Hr)))});var Kr;!function(e){e.ListAccounts=\"keyring_listAccounts\",e.GetAccount=\"keyring_getAccount\",e.CreateAccount=\"keyring_createAccount\",e.DiscoverAccounts=\"keyring_discoverAccounts\",e.ListAccountAssets=\"keyring_listAccountAssets\",e.ListAccountTransactions=\"keyring_listAccountTransactions\",e.GetAccountBalances=\"keyring_getAccountBalances\",e.ResolveAccountAddress=\"keyring_resolveAccountAddress\",e.FilterAccountChains=\"keyring_filterAccountChains\",e.UpdateAccount=\"keyring_updateAccount\",e.DeleteAccount=\"keyring_deleteAccount\",e.ExportAccount=\"keyring_exportAccount\",e.ListRequests=\"keyring_listRequests\",e.GetRequest=\"keyring_getRequest\",e.SubmitRequest=\"keyring_submitRequest\",e.ApproveRequest=\"keyring_approveRequest\",e.RejectRequest=\"keyring_rejectRequest\",e.SetSelectedAccounts=\"keyring_setSelectedAccounts\"}(Kr||(Kr={}));const qr={jsonrpc:j(\"2.0\"),id:ee([Y(),H(),j(null)])},Zr=yt({...qr,method:j(\"keyring_listAccounts\")}),Jr=(D(Xt),yt({...qr,method:j(\"keyring_getAccount\"),params:yt({id:ft})})),Yr=yt({...qr,method:j(\"keyring_createAccount\"),params:yt({options:J(Y(),_t)})}),Xr=yt({...qr,method:j(\"keyring_setSelectedAccounts\"),params:yt({accounts:D(Y())})}),Qr=(j(null),yt({...qr,method:j(\"keyring_discoverAccounts\"),params:yt({scopes:D(pe),entropySource:Y(),groupIndex:H()})})),en=(D(ar),yt({...qr,method:j(\"keyring_listAccountTransactions\"),params:yt({id:ft,pagination:gr})})),tn=yt({...qr,method:j(\"keyring_listAccountAssets\"),params:yt({id:ft})}),rn=D(me),nn=yt({...qr,method:j(`${Kr.GetAccountBalances}`),params:yt({id:ft,assets:D(ge)})}),on=(J(ge,nr),yt({...qr,method:j(\"keyring_resolveAccountAddress\"),params:yt({scope:pe,request:Ut})})),sn=(G(yt({address:he})),yt({...qr,method:j(\"keyring_filterAccountChains\"),params:yt({id:ft,chains:D(Y())})})),an=(D(Y()),yt({...qr,method:j(\"keyring_updateAccount\"),params:yt({account:Xt})})),cn=(j(null),yt({...qr,method:j(\"keyring_deleteAccount\"),params:yt({id:ft})})),un=(j(null),yt({...qr,method:j(\"keyring_exportAccount\"),params:yt({id:ft})})),ln=yt({...qr,method:j(\"keyring_listRequests\")}),dn=(D(ir),yt({...qr,method:j(\"keyring_getRequest\"),params:yt({id:ft})})),fn=yt({...qr,method:j(\"keyring_submitRequest\"),params:ir}),pn=yt({...qr,method:j(\"keyring_approveRequest\"),params:yt({id:ft,data:J(Y(),_t)})}),hn=(j(null),yt({...qr,method:j(\"keyring_rejectRequest\"),params:yt({id:ft})}));j(null);var gn;!function(e){e.AccountCreated=\"notify:accountCreated\",e.AccountUpdated=\"notify:accountUpdated\",e.AccountDeleted=\"notify:accountDeleted\",e.RequestApproved=\"notify:requestApproved\",e.RequestRejected=\"notify:requestRejected\",e.AccountBalancesUpdated=\"notify:accountBalancesUpdated\",e.AccountAssetListUpdated=\"notify:accountAssetListUpdated\",e.AccountTransactionsUpdated=\"notify:accountTransactionsUpdated\"}(gn||(gn={}));yt({method:j(`${gn.AccountCreated}`),params:yt({account:Xt,accountNameSuggestion:bt(Y()),displayConfirmation:bt(L()),displayAccountNameSuggestion:bt(L()),...yr.schema})}),yt({method:j(`${gn.AccountUpdated}`),params:yt({account:Xt})}),yt({method:j(`${gn.AccountDeleted}`),params:yt({id:ft})}),yt({method:j(`${gn.RequestApproved}`),params:yt({id:ft,result:_t})}),yt({method:j(`${gn.RequestRejected}`),params:yt({id:ft})}),yt({method:j(`${gn.AccountBalancesUpdated}`),params:yt({balances:J(pt,J(ge,Qt))})}),yt({method:j(`${gn.AccountTransactionsUpdated}`),params:yt({transactions:J(pt,D(hr))})}),yt({method:j(`${gn.AccountAssetListUpdated}`),params:yt({assets:J(pt,yt({added:D(me),removed:D(me)}))})});var yn=/^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,mn=Math.ceil,bn=Math.floor,wn=\"[BigNumber Error] \",Tn=wn+\"Number primitive has more than 15 significant digits: \",An=1e14,vn=14,Pn=9007199254740991,En=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Cn=1e7,Bn=1e9;function Wn(e){var t=0|e;return e>0||e===t?t:t-1}function Sn(e){for(var t,r,n=1,o=e.length,s=e[0]+\"\";n<o;){for(t=e[n++]+\"\",r=vn-t.length;r--;t=\"0\"+t);s+=t}for(o=s.length;48===s.charCodeAt(--o););return s.slice(0,o+1||1)}function In(e,t){var r,n,o=e.c,s=t.c,a=e.s,i=t.s,c=e.e,u=t.e;if(!a||!i)return null;if(r=o&&!o[0],n=s&&!s[0],r||n)return r?n?0:-i:a;if(a!=i)return a;if(r=a<0,n=c==u,!o||!s)return n?0:!o^r?1:-1;if(!n)return c>u^r?1:-1;for(i=(c=o.length)<(u=s.length)?c:u,a=0;a<i;a++)if(o[a]!=s[a])return o[a]>s[a]^r?1:-1;return c==u?0:c>u^r?1:-1}function _n(e,t,r,n){if(e<t||e>r||e!==bn(e))throw Error(wn+(n||\"Argument\")+(\"number\"==typeof e?e<t||e>r?\" out of range: \":\" not an integer: \":\" not a primitive number: \")+String(e))}function Rn(e){var t=e.c.length-1;return Wn(e.e/vn)==t&&e.c[t]%2!=0}function xn(e,t){return(e.length>1?e.charAt(0)+\".\"+e.slice(1):e)+(t<0?\"e\":\"e+\")+t}function On(e,t,r){var n,o;if(t<0){for(o=r+\".\";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+\".\"+e.slice(t));return e}var Mn=function e(t){var r,n,o,s,a,i,c,u,l,d,f=B.prototype={constructor:B,toString:null,valueOf:null},p=new B(1),h=20,g=4,y=-7,m=21,b=-1e7,w=1e7,T=!1,A=1,v=0,P={prefix:\"\",groupSize:3,secondaryGroupSize:0,groupSeparator:\",\",decimalSeparator:\".\",fractionGroupSize:0,fractionGroupSeparator:\" \",suffix:\"\"},E=\"0123456789abcdefghijklmnopqrstuvwxyz\",C=!0;function B(e,t){var r,s,a,i,c,u,l,d,f=this;if(!(f instanceof B))return new B(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>w?f.c=f.e=null:e.e<b?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((u=\"number\"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,c=e;c>=10;c/=10,i++);return void(i>w?f.c=f.e=null:(f.e=i,f.c=[e]))}d=String(e)}else{if(!yn.test(d=String(e)))return o(f,d,u);f.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(i=d.indexOf(\".\"))>-1&&(d=d.replace(\".\",\"\")),(c=d.search(/e/i))>0?(i<0&&(i=c),i+=+d.slice(c+1),d=d.substring(0,c)):i<0&&(i=d.length)}else{if(_n(t,2,E.length,\"Base\"),10==t&&C)return _(f=new B(e),h+f.e+1,g);if(d=String(e),u=\"number\"==typeof e){if(0*e!=0)return o(f,d,u,t);if(f.s=1/e<0?(d=d.slice(1),-1):1,B.DEBUG&&d.replace(/^0\\.0*|\\./,\"\").length>15)throw Error(Tn+e)}else f.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=E.slice(0,t),i=c=0,l=d.length;c<l;c++)if(r.indexOf(s=d.charAt(c))<0){if(\".\"==s){if(c>i){i=l;continue}}else if(!a&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){a=!0,c=-1,i=0;continue}return o(f,String(e),u,t)}u=!1,(i=(d=n(d,t,10,f.s)).indexOf(\".\"))>-1?d=d.replace(\".\",\"\"):i=d.length}for(c=0;48===d.charCodeAt(c);c++);for(l=d.length;48===d.charCodeAt(--l););if(d=d.slice(c,++l)){if(l-=c,u&&B.DEBUG&&l>15&&(e>Pn||e!==bn(e)))throw Error(Tn+f.s*e);if((i=i-c-1)>w)f.c=f.e=null;else if(i<b)f.c=[f.e=0];else{if(f.e=i,f.c=[],c=(i+1)%vn,i<0&&(c+=vn),c<l){for(c&&f.c.push(+d.slice(0,c)),l-=vn;c<l;)f.c.push(+d.slice(c,c+=vn));c=vn-(d=d.slice(c)).length}else c-=l;for(;c--;d+=\"0\");f.c.push(+d)}}else f.c=[f.e=0]}function W(e,t,r,n){var o,s,a,i,c;if(null==r?r=g:_n(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=Sn(e.c),c=1==n||2==n&&(a<=y||a>=m)?xn(c,a):On(c,a,\"0\");else if(s=(e=_(new B(e),t,r)).e,i=(c=Sn(e.c)).length,1==n||2==n&&(t<=s||s<=y)){for(;i<t;c+=\"0\",i++);c=xn(c,s)}else if(t-=a+(2===n&&s>a),c=On(c,s,\"0\"),s+1>i){if(--t>0)for(c+=\".\";t--;c+=\"0\");}else if((t+=s-i)>0)for(s+1==i&&(c+=\".\");t--;c+=\"0\");return e.s<0&&o?\"-\"+c:c}function S(e,t){for(var r,n,o=1,s=new B(e[0]);o<e.length;o++)(!(n=new B(e[o])).s||(r=In(s,n))===t||0===r&&s.s===t)&&(s=n);return s}function I(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*vn-1)>w?e.c=e.e=null:r<b?e.c=[e.e=0]:(e.e=r,e.c=t),e}function _(e,t,r,n){var o,s,a,i,c,u,l,d=e.c,f=En;if(d){e:{for(o=1,i=d[0];i>=10;i/=10,o++);if((s=t-o)<0)s+=vn,a=t,c=d[u=0],l=bn(c/f[o-a-1]%10);else if((u=mn((s+1)/vn))>=d.length){if(!n)break e;for(;d.length<=u;d.push(0));c=l=0,o=1,a=(s%=vn)-vn+1}else{for(c=i=d[u],o=1;i>=10;i/=10,o++);l=(a=(s%=vn)-vn+o)<0?0:bn(c/f[o-a-1]%10)}if(n=n||t<0||null!=d[u+1]||(a<0?c:c%f[o-a-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(s>0?a>0?c/f[o-a]:0:d[u-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,n?(t-=e.e+1,d[0]=f[(vn-t%vn)%vn],e.e=-t||0):d[0]=e.e=0,e;if(0==s?(d.length=u,i=1,u--):(d.length=u+1,i=f[vn-s],d[u]=a>0?bn(c/f[o-a]%f[a])*i:0),n)for(;;){if(0==u){for(s=1,a=d[0];a>=10;a/=10,s++);for(a=d[0]+=i,i=1;a>=10;a/=10,i++);s!=i&&(e.e++,d[0]==An&&(d[0]=1));break}if(d[u]+=i,d[u]!=An)break;d[u--]=0,i=1}for(s=d.length;0===d[--s];d.pop());}e.e>w?e.c=e.e=null:e.e<b&&(e.c=[e.e=0])}return e}function R(e){var t,r=e.e;return null===r?e.toString():(t=Sn(e.c),t=r<=y||r>=m?xn(t,r):On(t,r,\"0\"),e.s<0?\"-\"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,r;if(null!=e){if(\"object\"!=typeof e)throw Error(wn+\"Object expected: \"+e);if(e.hasOwnProperty(t=\"DECIMAL_PLACES\")&&(_n(r=e[t],0,Bn,t),h=r),e.hasOwnProperty(t=\"ROUNDING_MODE\")&&(_n(r=e[t],0,8,t),g=r),e.hasOwnProperty(t=\"EXPONENTIAL_AT\")&&((r=e[t])&&r.pop?(_n(r[0],-Bn,0,t),_n(r[1],0,Bn,t),y=r[0],m=r[1]):(_n(r,-Bn,Bn,t),y=-(m=r<0?-r:r))),e.hasOwnProperty(t=\"RANGE\"))if((r=e[t])&&r.pop)_n(r[0],-Bn,-1,t),_n(r[1],1,Bn,t),b=r[0],w=r[1];else{if(_n(r,-Bn,Bn,t),!r)throw Error(wn+t+\" cannot be zero: \"+r);b=-(w=r<0?-r:r)}if(e.hasOwnProperty(t=\"CRYPTO\")){if((r=e[t])!==!!r)throw Error(wn+t+\" not true or false: \"+r);if(r){if(\"undefined\"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw T=!r,Error(wn+\"crypto unavailable\");T=r}else T=r}if(e.hasOwnProperty(t=\"MODULO_MODE\")&&(_n(r=e[t],0,9,t),A=r),e.hasOwnProperty(t=\"POW_PRECISION\")&&(_n(r=e[t],0,Bn,t),v=r),e.hasOwnProperty(t=\"FORMAT\")){if(\"object\"!=typeof(r=e[t]))throw Error(wn+t+\" not an object: \"+r);P=r}if(e.hasOwnProperty(t=\"ALPHABET\")){if(\"string\"!=typeof(r=e[t])||/^.?$|[+\\-.\\s]|(.).*\\1/.test(r))throw Error(wn+t+\" invalid: \"+r);C=\"0123456789\"==r.slice(0,10),E=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:g,EXPONENTIAL_AT:[y,m],RANGE:[b,w],CRYPTO:T,MODULO_MODE:A,POW_PRECISION:v,FORMAT:P,ALPHABET:E}},B.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!B.DEBUG)return!0;var t,r,n=e.c,o=e.e,s=e.s;e:if(\"[object Array]\"=={}.toString.call(n)){if((1===s||-1===s)&&o>=-Bn&&o<=Bn&&o===bn(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%vn)<1&&(t+=vn),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=An||r!==bn(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===s||1===s||-1===s))return!0;throw Error(wn+\"Invalid BigNumber: \"+e)},B.maximum=B.max=function(){return S(arguments,-1)},B.minimum=B.min=function(){return S(arguments,1)},B.random=(s=9007199254740992,a=Math.random()*s&2097151?function(){return bn(Math.random()*s)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,s,i=0,c=[],u=new B(p);if(null==e?e=h:_n(e,0,Bn),o=mn(e/vn),T)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));i<o;)(s=131072*t[i]+(t[i+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[i]=r[0],t[i+1]=r[1]):(c.push(s%1e14),i+=2);i=o/2}else{if(!crypto.randomBytes)throw T=!1,Error(wn+\"crypto unavailable\");for(t=crypto.randomBytes(o*=7);i<o;)(s=281474976710656*(31&t[i])+1099511627776*t[i+1]+4294967296*t[i+2]+16777216*t[i+3]+(t[i+4]<<16)+(t[i+5]<<8)+t[i+6])>=9e15?crypto.randomBytes(7).copy(t,i):(c.push(s%1e14),i+=7);i=o/7}if(!T)for(;i<o;)(s=a())<9e15&&(c[i++]=s%1e14);for(o=c[--i],e%=vn,o&&e&&(s=En[vn-e],c[i]=bn(o/s)*s);0===c[i];c.pop(),i--);if(i<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=vn);for(i=1,s=c[0];s>=10;s/=10,i++);i<vn&&(n-=vn-i)}return u.e=n,u.c=c,u}),B.sum=function(){for(var e=1,t=arguments,r=new B(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e=\"0123456789\";function t(e,t,r,n){for(var o,s,a=[0],i=0,c=e.length;i<c;){for(s=a.length;s--;a[s]*=t);for(a[0]+=n.indexOf(e.charAt(i++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,s,a,i){var c,u,l,d,f,p,y,m,b=n.indexOf(\".\"),w=h,T=g;for(b>=0&&(d=v,v=0,n=n.replace(\".\",\"\"),p=(m=new B(o)).pow(n.length-b),v=d,m.c=t(On(Sn(p.c),p.e,\"0\"),10,s,e),m.e=m.c.length),l=d=(y=t(n,o,s,i?(c=E,e):(c=e,E))).length;0==y[--d];y.pop());if(!y[0])return c.charAt(0);if(b<0?--l:(p.c=y,p.e=l,p.s=a,y=(p=r(p,m,w,T,s)).c,f=p.r,l=p.e),b=y[u=l+w+1],d=s/2,f=f||u<0||null!=y[u+1],f=T<4?(null!=b||f)&&(0==T||T==(p.s<0?3:2)):b>d||b==d&&(4==T||f||6==T&&1&y[u-1]||T==(p.s<0?8:7)),u<1||!y[0])n=f?On(c.charAt(1),-w,c.charAt(0)):c.charAt(0);else{if(y.length=u,f)for(--s;++y[--u]>s;)y[u]=0,u||(++l,y=[1].concat(y));for(d=y.length;!y[--d];);for(b=0,n=\"\";b<=d;n+=c.charAt(y[b++]));n=On(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,s,a,i=0,c=e.length,u=t%Cn,l=t/Cn|0;for(e=e.slice();c--;)i=((o=u*(s=e[c]%Cn)+(n=l*s+(a=e[c]/Cn|0)*u)%Cn*Cn+i)/r|0)+(n/Cn|0)+l*a,e[c]=o%r;return i&&(e=[i].concat(e)),e}function t(e,t,r,n){var o,s;if(r!=n)s=r>n?1:-1;else for(o=s=0;o<r;o++)if(e[o]!=t[o]){s=e[o]>t[o]?1:-1;break}return s}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,s,a,i){var c,u,l,d,f,p,h,g,y,m,b,w,T,A,v,P,E,C=n.s==o.s?1:-1,W=n.c,S=o.c;if(!(W&&W[0]&&S&&S[0]))return new B(n.s&&o.s&&(W?!S||W[0]!=S[0]:S)?W&&0==W[0]||!S?0*C:C/0:NaN);for(y=(g=new B(C)).c=[],C=s+(u=n.e-o.e)+1,i||(i=An,u=Wn(n.e/vn)-Wn(o.e/vn),C=C/vn|0),l=0;S[l]==(W[l]||0);l++);if(S[l]>(W[l]||0)&&u--,C<0)y.push(1),d=!0;else{for(A=W.length,P=S.length,l=0,C+=2,(f=bn(i/(S[0]+1)))>1&&(S=e(S,f,i),W=e(W,f,i),P=S.length,A=W.length),T=P,b=(m=W.slice(0,P)).length;b<P;m[b++]=0);E=S.slice(),E=[0].concat(E),v=S[0],S[1]>=i/2&&v++;do{if(f=0,(c=t(S,m,P,b))<0){if(w=m[0],P!=b&&(w=w*i+(m[1]||0)),(f=bn(w/v))>1)for(f>=i&&(f=i-1),h=(p=e(S,f,i)).length,b=m.length;1==t(p,m,h,b);)f--,r(p,P<h?E:S,h,i),h=p.length,c=1;else 0==f&&(c=f=1),h=(p=S.slice()).length;if(h<b&&(p=[0].concat(p)),r(m,p,b,i),b=m.length,-1==c)for(;t(S,m,P,b)<1;)f++,r(m,P<b?E:S,b,i),b=m.length}else 0===c&&(f++,m=[0]);y[l++]=f,m[0]?m[b++]=W[T]||0:(m=[W[T]],b=1)}while((T++<A||null!=m[0])&&C--);d=null!=m[0],y[0]||y.splice(0,1)}if(i==An){for(l=1,C=y[0];C>=10;C/=10,l++);_(g,s+(g.e=l+u*vn-1)+1,a,d)}else g.e=u,g.r=+d;return g}}(),i=/^(-?)0([xbo])(?=\\w[\\w.]*$)/i,c=/^([^.]+)\\.$/,u=/^\\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,d=/^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g,o=function(e,t,r,n){var o,s=r?t:t.replace(d,\"\");if(l.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(i,function(e,t,r){return o=\"x\"==(r=r.toLowerCase())?16:\"b\"==r?2:8,n&&n!=o?e:t}),n&&(o=n,s=s.replace(c,\"$1\").replace(u,\"0.$1\")),t!=s))return new B(s,o);if(B.DEBUG)throw Error(wn+\"Not a\"+(n?\" base \"+n:\"\")+\" number: \"+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return In(this,new B(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o,s=this;if(null!=e)return _n(e,0,Bn),null==t?t=g:_n(t,0,8),_(new B(s),e+s.e+1,t);if(!(r=s.c))return null;if(n=((o=r.length-1)-Wn(this.e/vn))*vn,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,t){return r(this,new B(e,t),h,g)},f.dividedToIntegerBy=f.idiv=function(e,t){return r(this,new B(e,t),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,s,a,i,c,u,l=this;if((e=new B(e)).c&&!e.isInteger())throw Error(wn+\"Exponent not an integer: \"+R(e));if(null!=t&&(t=new B(t)),a=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new B(Math.pow(+R(l),a?e.s*(2-Rn(e)):+R(e))),t?u.mod(t):u;if(i=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(n=!i&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||a&&l.c[1]>=24e7:l.c[0]<8e13||a&&l.c[0]<=9999975e7)))return s=l.s<0&&Rn(e)?-0:0,l.e>-1&&(s=1/s),new B(i?1/s:s);v&&(s=mn(v/vn+2))}for(a?(r=new B(.5),i&&(e.s=1),c=Rn(e)):c=(o=Math.abs(+R(e)))%2,u=new B(p);;){if(c){if(!(u=u.times(l)).c)break;s?u.c.length>s&&(u.c.length=s):n&&(u=u.mod(t))}if(o){if(0===(o=bn(o/2)))break;c=o%2}else if(_(e=e.times(r),e.e+1,1),e.e>14)c=Rn(e);else{if(0===(o=+R(e)))break;c=o%2}l=l.times(l),s?l.c&&l.c.length>s&&(l.c.length=s):n&&(l=l.mod(t))}return n?u:(i&&(u=p.div(u)),t?u.mod(t):s?_(u,v,g,undefined):u)},f.integerValue=function(e){var t=new B(this);return null==e?e=g:_n(e,0,8),_(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===In(this,new B(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return In(this,new B(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=In(this,new B(e,t)))||0===t},f.isInteger=function(){return!!this.c&&Wn(this.e/vn)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return In(this,new B(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=In(this,new B(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,s,a=this,i=a.s;if(t=(e=new B(e,t)).s,!i||!t)return new B(NaN);if(i!=t)return e.s=-t,a.plus(e);var c=a.e/vn,u=e.e/vn,l=a.c,d=e.c;if(!c||!u){if(!l||!d)return l?(e.s=-t,e):new B(d?a:NaN);if(!l[0]||!d[0])return d[0]?(e.s=-t,e):new B(l[0]?a:3==g?-0:0)}if(c=Wn(c),u=Wn(u),l=l.slice(),i=c-u){for((s=i<0)?(i=-i,o=l):(u=c,o=d),o.reverse(),t=i;t--;o.push(0));o.reverse()}else for(n=(s=(i=l.length)<(t=d.length))?i:t,i=t=0;t<n;t++)if(l[t]!=d[t]){s=l[t]<d[t];break}if(s&&(o=l,l=d,d=o,e.s=-e.s),(t=(n=d.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=An-1;n>i;){if(l[--n]<d[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=An}l[n]-=d[n]}for(;0==l[0];l.splice(0,1),--u);return l[0]?I(e,l,u):(e.s=3==g?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,t){var n,o,s=this;return e=new B(e,t),!s.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||s.c&&!s.c[0]?new B(s):(9==A?(o=e.s,e.s=1,n=r(s,e,0,3),e.s=o,n.s*=o):n=r(s,e,0,A),(e=s.minus(n.times(e))).c[0]||1!=A||(e.s=s.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,o,s,a,i,c,u,l,d,f,p,h,g,y,m=this,b=m.c,w=(e=new B(e,t)).c;if(!(b&&w&&b[0]&&w[0]))return!m.s||!e.s||b&&!b[0]&&!w||w&&!w[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=Wn(m.e/vn)+Wn(e.e/vn),e.s*=m.s,(c=b.length)<(d=w.length)&&(h=b,b=w,w=h,o=c,c=d,d=o),o=c+d,h=[];o--;h.push(0));for(g=An,y=Cn,o=d;--o>=0;){for(r=0,f=w[o]%y,p=w[o]/y|0,s=o+(a=c);s>o;)r=((u=f*(u=b[--a]%y)+(i=p*u+(l=b[a]/y|0)*f)%y*y+h[s]+r)/g|0)+(i/y|0)+p*l,h[s--]=u%g;h[s]=r}return r?++n:h.splice(0,1),I(e,h,n)},f.negated=function(){var e=new B(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new B(e,t)).s,!o||!t)return new B(NaN);if(o!=t)return e.s=-t,n.minus(e);var s=n.e/vn,a=e.e/vn,i=n.c,c=e.c;if(!s||!a){if(!i||!c)return new B(o/0);if(!i[0]||!c[0])return c[0]?e:new B(i[0]?n:0*o)}if(s=Wn(s),a=Wn(a),i=i.slice(),o=s-a){for(o>0?(a=s,r=c):(o=-o,r=i),r.reverse();o--;r.push(0));r.reverse()}for((o=i.length)-(t=c.length)<0&&(r=c,c=i,i=r,t=o),o=0;t;)o=(i[--t]=i[t]+c[t]+o)/An|0,i[t]=An===i[t]?0:i[t]%An;return o&&(i=[o].concat(i),++a),I(e,i,a)},f.precision=f.sd=function(e,t){var r,n,o,s=this;if(null!=e&&e!==!!e)return _n(e,1,Bn),null==t?t=g:_n(t,0,8),_(new B(s),e,t);if(!(r=s.c))return null;if(n=(o=r.length-1)*vn+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&s.e+1>n&&(n=s.e+1),n},f.shiftedBy=function(e){return _n(e,-9007199254740991,Pn),this.times(\"1e\"+e)},f.squareRoot=f.sqrt=function(){var e,t,n,o,s,a=this,i=a.c,c=a.s,u=a.e,l=h+4,d=new B(\"0.5\");if(1!==c||!i||!i[0])return new B(!c||c<0&&(!i||i[0])?NaN:i?a:1/0);if(0==(c=Math.sqrt(+R(a)))||c==1/0?(((t=Sn(i)).length+u)%2==0&&(t+=\"0\"),c=Math.sqrt(+t),u=Wn((u+1)/2)-(u<0||u%2),n=new B(t=c==1/0?\"5e\"+u:(t=c.toExponential()).slice(0,t.indexOf(\"e\")+1)+u)):n=new B(c+\"\"),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(s=n,n=d.times(s.plus(r(a,s,l,1))),Sn(s.c).slice(0,c)===(t=Sn(n.c)).slice(0,c)){if(n.e<u&&--c,\"9999\"!=(t=t.slice(c-3,c+1))&&(o||\"4999\"!=t)){+t&&(+t.slice(1)||\"5\"!=t.charAt(0))||(_(n,n.e+h+2,1),e=!n.times(n).eq(a));break}if(!o&&(_(s,s.e+h+2,0),s.times(s).eq(a))){n=s;break}l+=4,c+=4,o=1}return _(n,n.e+h+1,g,e)},f.toExponential=function(e,t){return null!=e&&(_n(e,0,Bn),e++),W(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(_n(e,0,Bn),e=e+this.e+1),W(this,e,t)},f.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&\"object\"==typeof t?(r=t,t=null):e&&\"object\"==typeof e?(r=e,e=t=null):r=P;else if(\"object\"!=typeof r)throw Error(wn+\"Argument not an object: \"+r);if(n=o.toFixed(e,t),o.c){var s,a=n.split(\".\"),i=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||\"\",l=a[0],d=a[1],f=o.s<0,p=f?l.slice(1):l,h=p.length;if(c&&(s=i,i=c,c=s,h-=s),i>0&&h>0){for(s=h%i||i,l=p.substr(0,s);s<h;s+=i)l+=u+p.substr(s,i);c>0&&(l+=u+p.slice(s)),f&&(l=\"-\"+l)}n=d?l+(r.decimalSeparator||\"\")+((c=+r.fractionGroupSize)?d.replace(new RegExp(\"\\\\d{\"+c+\"}\\\\B\",\"g\"),\"$&\"+(r.fractionGroupSeparator||\"\")):d):l}return(r.prefix||\"\")+n+(r.suffix||\"\")},f.toFraction=function(e){var t,n,o,s,a,i,c,u,l,d,f,h,y=this,m=y.c;if(null!=e&&(!(c=new B(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(wn+\"Argument \"+(c.isInteger()?\"out of range: \":\"not an integer: \")+R(c));if(!m)return new B(y);for(t=new B(p),l=n=new B(p),o=u=new B(p),h=Sn(m),a=t.e=h.length-y.e-1,t.c[0]=En[(i=a%vn)<0?vn+i:i],e=!e||c.comparedTo(t)>0?a>0?t:l:c,i=w,w=1/0,c=new B(h),u.c[0]=0;d=r(c,t,0,1),1!=(s=n.plus(d.times(o))).comparedTo(e);)n=o,o=s,l=u.plus(d.times(s=l)),u=s,t=c.minus(d.times(s=t)),c=s;return s=r(e.minus(n),o,0,1),u=u.plus(s.times(l)),n=n.plus(s.times(o)),u.s=l.s=y.s,f=r(l,o,a*=2,g).minus(y).abs().comparedTo(r(u,n,a,g).minus(y).abs())<1?[l,o]:[u,n],w=i,f},f.toNumber=function(){return+R(this)},f.toPrecision=function(e,t){return null!=e&&_n(e,1,Bn),W(this,e,t,2)},f.toString=function(e){var t,r=this,o=r.s,s=r.e;return null===s?o?(t=\"Infinity\",o<0&&(t=\"-\"+t)):t=\"NaN\":(null==e?t=s<=y||s>=m?xn(Sn(r.c),s):On(Sn(r.c),s,\"0\"):10===e&&C?t=On(Sn((r=_(new B(r),h+s+1,g)).c),r.e,\"0\"):(_n(e,2,E.length,\"Base\"),t=n(On(Sn(r.c),s,\"0\"),10,e,o,!0)),o<0&&r.c[0]&&(t=\"-\"+t)),t},f.valueOf=f.toJSON=function(){return R(this)},f._isBigNumber=!0,f[Symbol.toStringTag]=\"BigNumber\",f[Symbol.for(\"nodejs.util.inspect.custom\")]=f.valueOf,null!=t&&B.set(t),B}();const Fn=Mn(0),kn=Mn(1),Nn=Mn(1),Un=1e6,Dn=1e8;var Ln=function(e){return e[e.Mainnet=Vr.Mainnet]=\"Mainnet\",e[e.Nile=Vr.Nile]=\"Nile\",e[e.Shasta=Vr.Shasta]=\"Shasta\",e}({}),$n=function(e){return e[e.TrxMainnet=`${Ln.Mainnet}/slip44:195`]=\"TrxMainnet\",e[e.TrxNile=`${Ln.Nile}/slip44:195`]=\"TrxNile\",e[e.TrxShasta=`${Ln.Shasta}/slip44:195`]=\"TrxShasta\",e[e.UsdtMainnet=`${Ln.Mainnet}/trc20:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t`]=\"UsdtMainnet\",e[e.TrxStakedForBandwidthMainnet=`${Ln.Mainnet}/slip44:195-staked-for-bandwidth`]=\"TrxStakedForBandwidthMainnet\",e[e.TrxStakedForBandwidthNile=`${Ln.Nile}/slip44:195-staked-for-bandwidth`]=\"TrxStakedForBandwidthNile\",e[e.TrxStakedForBandwidthShasta=`${Ln.Shasta}/slip44:195-staked-for-bandwidth`]=\"TrxStakedForBandwidthShasta\",e[e.TrxStakedForEnergyMainnet=`${Ln.Mainnet}/slip44:195-staked-for-energy`]=\"TrxStakedForEnergyMainnet\",e[e.TrxStakedForEnergyNile=`${Ln.Nile}/slip44:195-staked-for-energy`]=\"TrxStakedForEnergyNile\",e[e.TrxStakedForEnergyShasta=`${Ln.Shasta}/slip44:195-staked-for-energy`]=\"TrxStakedForEnergyShasta\",e[e.TrxReadyForWithdrawalMainnet=`${Ln.Mainnet}/slip44:195-ready-for-withdrawal`]=\"TrxReadyForWithdrawalMainnet\",e[e.TrxReadyForWithdrawalNile=`${Ln.Nile}/slip44:195-ready-for-withdrawal`]=\"TrxReadyForWithdrawalNile\",e[e.TrxReadyForWithdrawalShasta=`${Ln.Shasta}/slip44:195-ready-for-withdrawal`]=\"TrxReadyForWithdrawalShasta\",e[e.TrxStakingRewardsMainnet=`${Ln.Mainnet}/slip44:195-staking-rewards`]=\"TrxStakingRewardsMainnet\",e[e.TrxStakingRewardsNile=`${Ln.Nile}/slip44:195-staking-rewards`]=\"TrxStakingRewardsNile\",e[e.TrxStakingRewardsShasta=`${Ln.Shasta}/slip44:195-staking-rewards`]=\"TrxStakingRewardsShasta\",e[e.TrxInLockPeriodMainnet=`${Ln.Mainnet}/slip44:195-in-lock-period`]=\"TrxInLockPeriodMainnet\",e[e.TrxInLockPeriodNile=`${Ln.Nile}/slip44:195-in-lock-period`]=\"TrxInLockPeriodNile\",e[e.TrxInLockPeriodShasta=`${Ln.Shasta}/slip44:195-in-lock-period`]=\"TrxInLockPeriodShasta\",e[e.EnergyMainnet=`${Ln.Mainnet}/slip44:energy`]=\"EnergyMainnet\",e[e.EnergyNile=`${Ln.Nile}/slip44:energy`]=\"EnergyNile\",e[e.EnergyShasta=`${Ln.Shasta}/slip44:energy`]=\"EnergyShasta\",e[e.MaximumEnergyMainnet=`${Ln.Mainnet}/slip44:maximum-energy`]=\"MaximumEnergyMainnet\",e[e.MaximumEnergyNile=`${Ln.Nile}/slip44:maximum-energy`]=\"MaximumEnergyNile\",e[e.MaximumEnergyShasta=`${Ln.Shasta}/slip44:maximum-energy`]=\"MaximumEnergyShasta\",e[e.BandwidthMainnet=`${Ln.Mainnet}/slip44:bandwidth`]=\"BandwidthMainnet\",e[e.BandwidthNile=`${Ln.Nile}/slip44:bandwidth`]=\"BandwidthNile\",e[e.BandwidthShasta=`${Ln.Shasta}/slip44:bandwidth`]=\"BandwidthShasta\",e[e.MaximumBandwidthMainnet=`${Ln.Mainnet}/slip44:maximum-bandwidth`]=\"MaximumBandwidthMainnet\",e[e.MaximumBandwidthNile=`${Ln.Nile}/slip44:maximum-bandwidth`]=\"MaximumBandwidthNile\",e[e.MaximumBandwidthShasta=`${Ln.Shasta}/slip44:maximum-bandwidth`]=\"MaximumBandwidthShasta\",e}({});const zn={fungible:!0,name:\"Tron\",symbol:\"TRX\",decimals:6,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},jn={name:\"Staked for Bandwidth\",symbol:\"sTRX-BANDWIDTH\",fungible:!0,decimals:6,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Vn={name:\"Staked for Energy\",symbol:\"sTRX-ENERGY\",fungible:!0,decimals:6,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Gn={name:\"Ready for Withdrawal\",symbol:\"trx-ready-for-withdrawal\",fungible:!0,decimals:6,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Hn={name:\"Staking Rewards\",symbol:\"trx-staking-rewards\",fungible:!0,decimals:6,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Kn={name:\"In Lock Period\",symbol:\"trx-in-lock-period\",fungible:!0,decimals:6,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},qn={name:\"Bandwidth\",symbol:\"BANDWIDTH\",fungible:!0,decimals:0,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Zn={name:\"Max Bandwidth\",symbol:\"MAX-BANDWIDTH\",fungible:!0,decimals:0,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Jn={name:\"Energy\",symbol:\"ENERGY\",fungible:!0,decimals:0,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Yn={name:\"Max Energy\",symbol:\"MAX-ENERGY\",fungible:!0,decimals:0,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Xn={[$n.TrxMainnet]:{id:$n.TrxMainnet,...zn},[$n.TrxNile]:{id:$n.TrxNile,...zn},[$n.TrxShasta]:{id:$n.TrxShasta,...zn},[$n.TrxStakedForBandwidthMainnet]:{id:$n.TrxStakedForBandwidthMainnet,...jn},[$n.TrxStakedForBandwidthNile]:{id:$n.TrxStakedForBandwidthNile,...jn},[$n.TrxStakedForBandwidthShasta]:{id:$n.TrxStakedForBandwidthShasta,...jn},[$n.TrxStakedForEnergyMainnet]:{id:$n.TrxStakedForEnergyMainnet,...Vn},[$n.TrxStakedForEnergyNile]:{id:$n.TrxStakedForEnergyNile,...Vn},[$n.TrxStakedForEnergyShasta]:{id:$n.TrxStakedForEnergyShasta,...Vn},[$n.TrxReadyForWithdrawalMainnet]:{id:$n.TrxReadyForWithdrawalMainnet,...Gn},[$n.TrxReadyForWithdrawalNile]:{id:$n.TrxReadyForWithdrawalNile,...Gn},[$n.TrxReadyForWithdrawalShasta]:{id:$n.TrxReadyForWithdrawalShasta,...Gn},[$n.TrxStakingRewardsMainnet]:{id:$n.TrxStakingRewardsMainnet,...Hn},[$n.TrxStakingRewardsNile]:{id:$n.TrxStakingRewardsNile,...Hn},[$n.TrxStakingRewardsShasta]:{id:$n.TrxStakingRewardsShasta,...Hn},[$n.TrxInLockPeriodMainnet]:{id:$n.TrxInLockPeriodMainnet,...Kn},[$n.TrxInLockPeriodNile]:{id:$n.TrxInLockPeriodNile,...Kn},[$n.TrxInLockPeriodShasta]:{id:$n.TrxInLockPeriodShasta,...Kn},[$n.BandwidthMainnet]:{id:$n.BandwidthMainnet,...qn},[$n.BandwidthNile]:{id:$n.BandwidthNile,...qn},[$n.BandwidthShasta]:{id:$n.BandwidthShasta,...qn},[$n.MaximumBandwidthMainnet]:{id:$n.MaximumBandwidthMainnet,...Zn},[$n.MaximumBandwidthNile]:{id:$n.MaximumBandwidthNile,...Zn},[$n.MaximumBandwidthShasta]:{id:$n.MaximumBandwidthShasta,...Zn},[$n.EnergyMainnet]:{id:$n.EnergyMainnet,...Jn},[$n.EnergyNile]:{id:$n.EnergyNile,...Jn},[$n.EnergyShasta]:{id:$n.EnergyShasta,...Jn},[$n.MaximumEnergyMainnet]:{id:$n.MaximumEnergyMainnet,...Yn},[$n.MaximumEnergyNile]:{id:$n.MaximumEnergyNile,...Yn},[$n.MaximumEnergyShasta]:{id:$n.MaximumEnergyShasta,...Yn}},Qn={[Ln.Mainnet]:{caip2Id:Ln.Mainnet,cluster:\"mainnet\",name:\"Tron Mainnet\",nativeToken:Xn[$n.TrxMainnet],stakedForBandwidth:Xn[$n.TrxStakedForBandwidthMainnet],stakedForEnergy:Xn[$n.TrxStakedForEnergyMainnet],readyForWithdrawal:Xn[$n.TrxReadyForWithdrawalMainnet],stakingRewards:Xn[$n.TrxStakingRewardsMainnet],inLockPeriod:Xn[$n.TrxInLockPeriodMainnet],bandwidth:Xn[$n.BandwidthMainnet],maximumBandwidth:Xn[$n.MaximumBandwidthMainnet],energy:Xn[$n.EnergyMainnet],maximumEnergy:Xn[$n.MaximumEnergyMainnet]},[Ln.Nile]:{caip2Id:Ln.Nile,cluster:\"devnet\",name:\"Tron Nile\",nativeToken:Xn[$n.TrxNile],stakedForBandwidth:Xn[$n.TrxStakedForBandwidthNile],stakedForEnergy:Xn[$n.TrxStakedForEnergyNile],readyForWithdrawal:Xn[$n.TrxReadyForWithdrawalNile],stakingRewards:Xn[$n.TrxStakingRewardsNile],inLockPeriod:Xn[$n.TrxInLockPeriodNile],bandwidth:Xn[$n.BandwidthNile],maximumBandwidth:Xn[$n.MaximumBandwidthNile],energy:Xn[$n.EnergyNile],maximumEnergy:Xn[$n.MaximumEnergyNile]},[Ln.Shasta]:{caip2Id:Ln.Shasta,cluster:\"testnet\",name:\"Tron Shasta\",nativeToken:Xn[$n.TrxShasta],stakedForBandwidth:Xn[$n.TrxStakedForBandwidthShasta],stakedForEnergy:Xn[$n.TrxStakedForEnergyShasta],readyForWithdrawal:Xn[$n.TrxReadyForWithdrawalShasta],stakingRewards:Xn[$n.TrxStakingRewardsShasta],inLockPeriod:Xn[$n.TrxInLockPeriodShasta],bandwidth:Xn[$n.BandwidthShasta],maximumBandwidth:Xn[$n.MaximumBandwidthShasta],energy:Xn[$n.EnergyShasta],maximumEnergy:Xn[$n.MaximumEnergyShasta]}},eo=[$n.TrxStakedForBandwidthMainnet,$n.TrxStakedForBandwidthNile,$n.TrxStakedForBandwidthShasta,$n.TrxStakedForEnergyMainnet,$n.TrxStakedForEnergyNile,$n.TrxStakedForEnergyShasta,$n.TrxReadyForWithdrawalMainnet,$n.TrxReadyForWithdrawalNile,$n.TrxReadyForWithdrawalShasta,$n.TrxStakingRewardsMainnet,$n.TrxStakingRewardsNile,$n.TrxStakingRewardsShasta,$n.TrxInLockPeriodMainnet,$n.TrxInLockPeriodNile,$n.TrxInLockPeriodShasta,$n.BandwidthMainnet,$n.BandwidthNile,$n.BandwidthShasta,$n.MaximumBandwidthMainnet,$n.MaximumBandwidthNile,$n.MaximumBandwidthShasta,$n.EnergyMainnet,$n.EnergyNile,$n.EnergyShasta,$n.MaximumEnergyMainnet,$n.MaximumEnergyNile,$n.MaximumEnergyShasta],to=[$n.TrxMainnet,$n.TrxNile,$n.TrxShasta,...eo];function ro(e){return e&&\"string\"==typeof e?e.replace(/[\\u0000-\\u0008\\u000A-\\u001F\\u007F]/gu,\"\"):\"\"}const no=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";class oo{encode(e){let t,r,n,o,s,a,i,c=\"\",u=0;for(;u<e.length;)t=e.charCodeAt(u++),r=e.charCodeAt(u++),n=e.charCodeAt(u++),o=t>>2,s=(3&t)<<4|r>>4,a=(15&r)<<2|n>>6,i=63&n,isNaN(r)?a=i=64:isNaN(n)&&(i=64),c=c+no.charAt(o)+no.charAt(s)+no.charAt(a)+no.charAt(i);return c}encodeIgnoreUtf8(e){let t,r,n,o,s,a,i,c=\"\",u=0;for(;u<e.length;)t=e[u++],r=e[u++],n=e[u++],o=t>>2,s=(3&t)<<4|r>>4,a=(15&r)<<2|n>>6,i=63&n,isNaN(r)?a=i=64:isNaN(n)&&(i=64),c=c+no.charAt(o)+no.charAt(s)+no.charAt(a)+no.charAt(i);return c}decode(e){let t,r,n,o,s,a,i,c=\"\",u=0;for(e=e.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");u<e.length;)o=no.indexOf(e.charAt(u++)),s=no.indexOf(e.charAt(u++)),a=no.indexOf(e.charAt(u++)),i=no.indexOf(e.charAt(u++)),t=o<<2|s>>4,r=(15&s)<<4|a>>2,n=(3&a)<<6|i,c+=String.fromCharCode(t),64!=a&&(c+=String.fromCharCode(r)),64!=i&&(c+=String.fromCharCode(n));return this._utf8_decode(c)}decodeToByteArray(e){let t,r,n,o,s,a,i,c=\"\",u=0;for(e=e.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");u<e.length;)o=no.indexOf(e.charAt(u++)),s=no.indexOf(e.charAt(u++)),a=no.indexOf(e.charAt(u++)),i=no.indexOf(e.charAt(u++)),t=o<<2|s>>4,r=(15&s)<<4|a>>2,n=(3&a)<<6|i,c+=String.fromCharCode(t),64!=a&&(c+=String.fromCharCode(r)),64!=i&&(c+=String.fromCharCode(n));return this._out2ByteArray(c)}_out2ByteArray(e){const t=new Array(e.length);let r=0,n=0;for(;r<e.length;)n=e.charCodeAt(r),t[r]=n,r++;return t}_utf8_encode(e){e=e.replace(/\\r\\n/g,\"\\n\");let t=\"\";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}_utf8_decode(e){let t=\"\",r=0,n=0,o=0,s=0;for(;r<e.length;)n=e.charCodeAt(r),n<128?(t+=String.fromCharCode(n),r++):n>191&&n<224?(o=e.charCodeAt(r+1),t+=String.fromCharCode((31&n)<<6|63&o),r+=2):(o=e.charCodeAt(r+1),s=e.charCodeAt(r+2),t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&s),r+=3);return t}}function so(e){if(e<0||e>255)throw new Error(\"Input must be a byte\");const t=\"0123456789ABCDEF\";let r=\"\";return r+=t.charAt(e>>4),r+=t.charAt(15&e),r}function ao(e){let t=\"\";for(let r=0;r<e.length;r++){const n=e[r].toString(2),o=n.match(/^1+?(?=0)/);if(o&&8===n.length){const n=o[0].length;let s=e[r].toString(2).slice(7-n);for(let t=1;t<n;t++)s+=e[t+r].toString(2).slice(2);t+=String.fromCharCode(parseInt(s,2)),r+=n-1}else t+=String.fromCharCode(e[r])}return t}function io(e){const t=e.replace(/^0x/,\"\").split(\"\");let r=\"\";for(let e=0;e<t.length/2;e++){const n=`0x${t[2*e]}${t[2*e+1]}`;r+=String.fromCharCode(parseInt(n))}return r}function co(e){let t=\"\";for(let r=0;r<e.length;r++)t+=so(e[r]);return t}function uo(e){return(new oo).decodeToByteArray(e)}function lo(e){return(new oo).encodeIgnoreUtf8(e)}const fo=34,po=\"41\",ho=65,go=/^(41)/,yo=\"m/44'/195'\",mo=yo+\"/0'/0/0\";function bo(e){return ao(e)}function wo(e,t,r=!1){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(r){if(e[n]!=t[n])return!1}else if(JSON.stringify(e[n])!=JSON.stringify(t[n]))return!1;return!0}function To(e){const t=[],r=e.length;let n;for(let o=0;o<r;o++)n=e.charCodeAt(o),n>=65536&&n<=1114111?(t.push(n>>18&7|240),t.push(n>>12&63|128),t.push(n>>6&63|128),t.push(63&n|128)):n>=2048&&n<=65535?(t.push(n>>12&15|224),t.push(n>>6&63|128),t.push(63&n|128)):n>=128&&n<=2047?(t.push(n>>6&31|192),t.push(63&n|128)):t.push(255&n);return t}function Ao(e){let t;if(e>=\"A\"&&e<=\"F\"?t=e.charCodeAt(0)-\"A\".charCodeAt(0)+10:e>=\"a\"&&e<=\"f\"?t=e.charCodeAt(0)-\"a\".charCodeAt(0)+10:e>=\"0\"&&e<=\"9\"&&(t=e.charCodeAt(0)-\"0\".charCodeAt(0)),\"number\"==typeof t)return t;throw new Error(\"The passed hex char is not a valid hex char\")}function vo(e){return e>=\"A\"&&e<=\"F\"||e>=\"a\"&&e<=\"f\"||e>=\"0\"&&e<=\"9\"?1:0}function Po(e,t=!1){let r=e.length;t&&r%2&&(e=`0${e}`,r++);const n=[];let o=0,s=0,a=0;for(let t=0;t<r;t++){const r=e.charAt(t);if(!vo(r))throw new Error(\"The passed hex char is not a valid hex string\");o<<=4,o+=Ao(r),s++,0==s%2&&(n[a++]=o,o=0)}return n}function Eo(e){if(!/^\\d{4}-\\d{2}-\\d{2}( \\d{2}-\\d{2}-\\d{2}|)/.test(e))throw new Error(\"The passed date string is not valid\");const t=e.split(\" \"),r=t[0].split(\"-\"),n=parseInt(r[0],10),o=parseInt(r[1],10)-1,s=parseInt(r[2],10);if(t.length>1){const e=t[1].split(\"-\"),r=parseInt(e[0],10),a=parseInt(e[1],10),i=parseInt(e[2],10);return new Date(n,o,s,r,a,i)}return new Date(n,o,s)}function Co(e){return e>=\"0\"&&e<=\"9\"?1:0}function Bo(e){if(null==e)return-1;if(0==e.length||\"\"==e)return-1;let t=0;if(40==e.length)for(;t<40;t++){if(!vo(e.charAt(t)))break}if(40==t)return 1;for(t=0;t<e.length;t++){if(!Co(e.charAt(t)))break}if(t==e.length)return 2;for(t=0;t<e.length;t++){if(e.charAt(t)>\" \")return 3}return-1}const Wo=\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\",So={};for(let e=0;e<Wo.length;e++)So[Wo.charAt(e)]=e;const Io=58;function _o(e){if(0===e.length)return\"\";let t,r;const n=[0];for(t=0;t<e.length;t++){for(r=0;r<n.length;r++)n[r]<<=8;n[0]+=e[t];let o=0;for(r=0;r<n.length;++r)n[r]+=o,o=n[r]/Io|0,n[r]%=Io;for(;o;)n.push(o%Io),o=o/Io|0}for(t=0;0===e[t]&&t<e.length-1;t++)n.push(0);return n.reverse().map(e=>Wo[e]).join(\"\")}function Ro(e){if(0===e.length)return[];let t,r;const n=[0];for(t=0;t<e.length;t++){const o=e[t];if(!(o in So))throw new Error(\"Non-base58 character\");for(r=0;r<n.length;r++)n[r]*=Io;n[0]+=So[o];let s=0;for(r=0;r<n.length;++r)n[r]+=s,s=n[r]>>8,n[r]&=255;for(;s;)n.push(255&s),s>>=8}for(t=0;\"1\"===e[t]&&t<e.length-1;t++)n.push(0);return n.reverse()}const xo=\"0x0000000000000000000000000000000000000000000000000000000000000000\",Oo=\"6.13.5\";function Mo(e,t,r){const n=t.split(\"|\").map(e=>e.trim());for(let r=0;r<n.length;r++)switch(t){case\"any\":return;case\"bigint\":case\"boolean\":case\"number\":case\"string\":if(typeof e===t)return}const o=new Error(`invalid value for type ${t}`);throw o.code=\"INVALID_ARGUMENT\",o.argument=`value.${r}`,o.value=e,o}async function Fo(e){const t=Object.keys(e),r=await Promise.all(t.map(t=>Promise.resolve(e[t])));return r.reduce((e,r,n)=>(e[t[n]]=r,e),{})}function ko(e,t,r){for(let n in t){let o=t[n];const s=r?r[n]:null;s&&Mo(o,s,n),Object.defineProperty(e,n,{enumerable:!0,value:o,writable:!1})}}function No(e){if(null==e)return\"null\";if(Array.isArray(e))return\"[ \"+e.map(No).join(\", \")+\" ]\";if(e instanceof Uint8Array){const t=\"0123456789abcdef\";let r=\"0x\";for(let n=0;n<e.length;n++)r+=t[e[n]>>4],r+=t[15&e[n]];return r}if(\"object\"==typeof e&&\"function\"==typeof e.toJSON)return No(e.toJSON());switch(typeof e){case\"boolean\":case\"symbol\":case\"number\":return e.toString();case\"bigint\":return BigInt(e).toString();case\"string\":return JSON.stringify(e);case\"object\":{const t=Object.keys(e);return t.sort(),\"{ \"+t.map(t=>`${No(t)}: ${No(e[t])}`).join(\", \")+\" }\"}}return\"[ COULD NOT SERIALIZE ]\"}function Uo(e,t){return e&&e.code===t}function Do(e,t,r){let n,o=e;{const n=[];if(r){if(\"message\"in r||\"code\"in r||\"name\"in r)throw new Error(`value will overwrite populated values: ${No(r)}`);for(const e in r){if(\"shortMessage\"===e)continue;const t=r[e];n.push(e+\"=\"+No(t))}}n.push(`code=${t}`),n.push(`version=${Oo}`),n.length&&(e+=\" (\"+n.join(\", \")+\")\")}switch(t){case\"INVALID_ARGUMENT\":n=new TypeError(e);break;case\"NUMERIC_FAULT\":case\"BUFFER_OVERRUN\":n=new RangeError(e);break;default:n=new Error(e)}return ko(n,{code:t}),r&&Object.assign(n,r),null==n.shortMessage&&ko(n,{shortMessage:o}),n}function Lo(e,t,r,n){if(!e)throw Do(t,r,n)}function $o(e,t,r,n){Lo(e,t,\"INVALID_ARGUMENT\",{argument:r,value:n})}function zo(e,t,r){null==r&&(r=\"\"),r&&(r=\": \"+r),Lo(e>=t,\"missing argument\"+r,\"MISSING_ARGUMENT\",{count:e,expectedCount:t}),Lo(e<=t,\"too many arguments\"+r,\"UNEXPECTED_ARGUMENT\",{count:e,expectedCount:t})}const jo=[\"NFD\",\"NFC\",\"NFKD\",\"NFKC\"].reduce((e,t)=>{try{if(\"test\"!==\"test\".normalize(t))throw new Error(\"bad\");if(\"NFD\"===t){const e=String.fromCharCode(233).normalize(\"NFD\");if(e!==String.fromCharCode(101,769))throw new Error(\"broken\")}e.push(t)}catch(e){}return e},[]);function Vo(e){Lo(jo.indexOf(e)>=0,\"platform missing String.prototype.normalize\",\"UNSUPPORTED_OPERATION\",{operation:\"String.prototype.normalize\",info:{form:e}})}function Go(e,t,r){if(null==r&&(r=\"\"),e!==t){let e=r,t=\"new\";r&&(e+=\".\",t+=\" \"+r),Lo(!1,`private constructor; use ${e}from* methods`,\"UNSUPPORTED_OPERATION\",{operation:t})}}function Ho(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if(\"string\"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n<t.length;n++)t[n]=parseInt(e.substring(r,r+2),16),r+=2;return t}$o(!1,\"invalid BytesLike value\",t||\"value\",e)}function Ko(e,t){return Ho(e,t,!1)}function qo(e,t){return Ho(e,t,!0)}function Zo(e,t){return!(\"string\"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&((\"number\"!=typeof t||e.length===2+2*t)&&(!0!==t||e.length%2==0))}function Jo(e){return Zo(e,!0)||e instanceof Uint8Array}const Yo=\"0123456789abcdef\";function Xo(e){const t=Ko(e);let r=\"0x\";for(let e=0;e<t.length;e++){const n=t[e];r+=Yo[(240&n)>>4]+Yo[15&n]}return r}function Qo(e){return\"0x\"+e.map(e=>Xo(e).substring(2)).join(\"\")}function es(e){return Zo(e,!0)?(e.length-2)/2:Ko(e).length}function ts(e,t,r){const n=Ko(e);return null!=r&&r>n.length&&Lo(!1,\"cannot slice beyond data bounds\",\"BUFFER_OVERRUN\",{buffer:n,length:n.length,offset:r}),Xo(n.slice(null==t?0:t,null==r?n.length:r))}function rs(e,t,r){const n=Ko(e);Lo(t>=n.length,\"padding exceeds data length\",\"BUFFER_OVERRUN\",{buffer:new Uint8Array(n),length:t,offset:t+1});const o=new Uint8Array(t);return o.fill(0),r?o.set(n,t-n.length):o.set(n,0),Xo(o)}function ns(e,t){return rs(e,t,!0)}const os=BigInt(0),ss=BigInt(1),as=9007199254740991;function is(e,t){let r=us(e,\"value\");const n=BigInt(ps(t,\"width\")),o=ss<<n-ss;if(r<os){r=-r,Lo(r<=o,\"too low\",\"NUMERIC_FAULT\",{operation:\"toTwos\",fault:\"overflow\",value:e});return(~r&(ss<<n)-ss)+ss}return Lo(r<o,\"too high\",\"NUMERIC_FAULT\",{operation:\"toTwos\",fault:\"overflow\",value:e}),r}function cs(e,t){const r=ls(e,\"value\"),n=BigInt(ps(t,\"bits\"));return r&(ss<<n)-ss}function us(e,t){switch(typeof e){case\"bigint\":return e;case\"number\":return $o(Number.isInteger(e),\"underflow\",t||\"value\",e),$o(e>=-as&&e<=as,\"overflow\",t||\"value\",e),BigInt(e);case\"string\":try{if(\"\"===e)throw new Error(\"empty string\");return\"-\"===e[0]&&\"-\"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){$o(!1,`invalid BigNumberish string: ${r.message}`,t||\"value\",e)}}$o(!1,\"invalid BigNumberish value\",t||\"value\",e)}function ls(e,t){const r=us(e,t);return Lo(r>=os,\"unsigned value cannot be negative\",\"NUMERIC_FAULT\",{fault:\"overflow\",operation:\"getUint\",value:e}),r}const ds=\"0123456789abcdef\";function fs(e){if(e instanceof Uint8Array){let t=\"0x0\";for(const r of e)t+=ds[r>>4],t+=ds[15&r];return BigInt(t)}return us(e)}function ps(e,t){switch(typeof e){case\"bigint\":return $o(e>=-as&&e<=as,\"overflow\",t||\"value\",e),Number(e);case\"number\":return $o(Number.isInteger(e),\"underflow\",t||\"value\",e),$o(e>=-as&&e<=as,\"overflow\",t||\"value\",e),e;case\"string\":try{if(\"\"===e)throw new Error(\"empty string\");return ps(BigInt(e),t)}catch(r){$o(!1,`invalid numeric string: ${r.message}`,t||\"value\",e)}}$o(!1,\"invalid numeric value\",t||\"value\",e)}function hs(e,t){let r=ls(e,\"value\").toString(16);if(null==t)r.length%2&&(r=\"0\"+r);else{const n=ps(t,\"width\");for(Lo(2*n>=r.length,`value exceeds width (${n} bytes)`,\"NUMERIC_FAULT\",{operation:\"toBeHex\",fault:\"overflow\",value:e});r.length<2*n;)r=\"0\"+r}return\"0x\"+r}function gs(e){const t=ls(e,\"value\");if(t===os)return new Uint8Array([]);let r=t.toString(16);r.length%2&&(r=\"0\"+r);const n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=2*e;n[e]=parseInt(r.substring(t,t+2),16)}return n}function ys(e){let t=Xo(Jo(e)?e:gs(e)).substring(2);for(;t.startsWith(\"0\");)t=t.substring(1);return\"\"===t&&(t=\"0\"),\"0x\"+t}const ms=BigInt(0),bs=BigInt(1),ws=BigInt(2),Ts=BigInt(27),As=BigInt(28),vs=BigInt(35),Ps={};function Es(e){return ns(gs(e),32)}class Cs{#e;#t;#r;#n;get r(){return this.#e}set r(e){$o(32===es(e),\"invalid r\",\"value\",e),this.#e=Xo(e)}get s(){return this.#t}set s(e){$o(32===es(e),\"invalid s\",\"value\",e);const t=Xo(e);$o(parseInt(t.substring(0,3))<8,\"non-canonical s\",\"value\",t),this.#t=t}get v(){return this.#r}set v(e){const t=ps(e,\"value\");$o(27===t||28===t,\"invalid v\",\"v\",e),this.#r=t}get networkV(){return this.#n}get legacyChainId(){const e=this.networkV;return null==e?null:Cs.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=Ko(this.s);return this.yParity&&(e[0]|=128),Xo(e)}get compactSerialized(){return Qo([this.r,this.yParityAndS])}get serialized(){return Qo([this.r,this.s,this.yParity?\"0x1c\":\"0x1b\"])}constructor(e,t,r,n){Go(e,Ps,\"Signature\"),this.#e=t,this.#t=r,this.#r=n,this.#n=null}[Symbol.for(\"nodejs.util.inspect.custom\")](){return`Signature { r: \"${this.r}\", s: \"${this.s}\", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new Cs(Ps,this.r,this.s,this.v);return this.networkV&&(e.#n=this.networkV),e}toJSON(){const e=this.networkV;return{_type:\"signature\",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=us(e,\"v\");return t==Ts||t==As?ms:($o(t>=vs,\"invalid EIP-155 v\",\"v\",e),(t-vs)/ws)}static getChainIdV(e,t){return us(e)*ws+BigInt(35+t-27)}static getNormalizedV(e){const t=us(e);return t===ms||t===Ts?27:t===bs||t===As?28:($o(t>=vs,\"invalid v\",\"v\",e),t&bs?27:28)}static from(e){function t(t,r){$o(t,r,\"signature\",e)}if(null==e)return new Cs(Ps,xo,xo,27);if(\"string\"==typeof e){const r=Ko(e,\"signature\");if(64===r.length){const e=Xo(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new Cs(Ps,e,Xo(t),n)}if(65===r.length){const e=Xo(r.slice(0,32)),n=r.slice(32,64);t(!(128&n[0]),\"non-canonical s\");const o=Cs.getNormalizedV(r[64]);return new Cs(Ps,e,Xo(n),o)}t(!1,\"invalid raw signature length\")}if(e instanceof Cs)return e.clone();const r=e.r;t(null!=r,\"missing r\");const n=Es(r),o=function(e,r){if(null!=e)return Es(e);if(null!=r){t(Zo(r,32),\"invalid yParityAndS\");const e=Ko(r);return e[0]&=127,Xo(e)}t(!1,\"missing s\")}(e.s,e.yParityAndS);t(!(128&Ko(o)[0]),\"non-canonical s\");const{networkV:s,v:a}=function(e,r,n){if(null!=e){const t=us(e);return{networkV:t>=vs?t:void 0,v:Cs.getNormalizedV(t)}}if(null!=r)return t(Zo(r,32),\"invalid yParityAndS\"),{v:128&Ko(r)[0]?28:27};if(null!=n){switch(ps(n,\"sig.yParity\")){case 0:return{v:27};case 1:return{v:28}}t(!1,\"invalid yParity\")}t(!1,\"missing v\")}(e.v,e.yParityAndS,e.yParity),i=new Cs(Ps,n,o,a);return s&&(i.#n=s),t(null==e.yParity||ps(e.yParity,\"sig.yParity\")===i.yParity,\"yParity mismatch\"),t(null==e.yParityAndS||e.yParityAndS===i.yParityAndS,\"yParityAndS mismatch\"),i}}function Bs(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function Ws(e,...t){if(!(e instanceof Uint8Array))throw new Error(\"Expected Uint8Array\");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Ss(e){if(\"function\"!=typeof e||\"function\"!=typeof e.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");Bs(e.outputLen),Bs(e.blockLen)}function Is(e,t=!0){if(e.destroyed)throw new Error(\"Hash instance has been destroyed\");if(t&&e.finished)throw new Error(\"Hash#digest() has already been called\")}function _s(e,t){Ws(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const Rs=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0,xs=e=>e instanceof Uint8Array,Os=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),Ms=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Fs=(e,t)=>e<<32-t|e>>>t;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error(\"Non little-endian hardware is not supported\");Array.from({length:256},(e,t)=>t.toString(16).padStart(2,\"0\"));const ks=async()=>{};async function Ns(e,t,r){let n=Date.now();for(let o=0;o<e;o++){r(o);const e=Date.now()-n;e>=0&&e<t||(await ks(),n+=e)}}function Us(e){if(\"string\"==typeof e&&(e=function(e){if(\"string\"!=typeof e)throw new Error(\"utf8ToBytes expected string, got \"+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!xs(e))throw new Error(\"expected Uint8Array, got \"+typeof e);return e}class Ds{clone(){return this._cloneInto()}}const Ls={}.toString;function $s(e,t){if(void 0!==t&&\"[object Object]\"!==Ls.call(t))throw new Error(\"Options should be object or undefined\");return Object.assign(e,t)}function zs(e){const t=t=>e().update(Us(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function js(e=32){if(Rs&&\"function\"==typeof Rs.getRandomValues)return Rs.getRandomValues(new Uint8Array(e));throw new Error(\"crypto.getRandomValues must be defined\")}class Vs extends Ds{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Ss(e);const r=Us(t);if(this.iHash=e.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return Is(this),this.iHash.update(e),this}digestInto(e){Is(this),Ws(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:a}=this;return e.finished=n,e.destroyed=o,e.blockLen=s,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Gs=(e,t,r)=>new Vs(e,t).update(r).digest();function Hs(e,t,r,n){Ss(e);const o=$s({dkLen:32,asyncTick:10},n),{c:s,dkLen:a,asyncTick:i}=o;if(Bs(s),Bs(a),Bs(i),s<1)throw new Error(\"PBKDF2: iterations (c) should be >= 1\");const c=Us(t),u=Us(r),l=new Uint8Array(a),d=Gs.create(e,c),f=d._cloneInto().update(u);return{c:s,dkLen:a,asyncTick:i,DK:l,PRF:d,PRFSalt:f}}function Ks(e,t,r,n,o){return e.destroy(),t.destroy(),n&&n.destroy(),o.fill(0),r}function qs(e,t,r,n){const{c:o,dkLen:s,DK:a,PRF:i,PRFSalt:c}=Hs(e,t,r,n);let u;const l=new Uint8Array(4),d=Ms(l),f=new Uint8Array(i.outputLen);for(let e=1,t=0;t<s;e++,t+=i.outputLen){const r=a.subarray(t,t+i.outputLen);d.setInt32(0,e,!1),(u=c._cloneInto(u)).update(l).digestInto(f),r.set(f.subarray(0,r.length));for(let e=1;e<o;e++){i._cloneInto(u).update(f).digestInto(f);for(let e=0;e<r.length;e++)r[e]^=f[e]}}return Ks(i,c,a,u,f)}Gs.create=(e,t)=>new Vs(e,t);class Zs extends Ds{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Ms(this.buffer)}update(e){Is(this);const{view:t,buffer:r,blockLen:n}=this,o=(e=Us(e)).length;for(let s=0;s<o;){const a=Math.min(n-this.pos,o-s);if(a===n){const t=Ms(e);for(;n<=o-s;s+=n)this.process(t,s);continue}r.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Is(this),_s(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e<n;e++)t[e]=0;!function(e,t,r,n){if(\"function\"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),a=Number(r>>o&s),i=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,i,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const a=Ms(e),i=this.outputLen;if(i%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=i/4,u=this.get();if(c>u.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let e=0;e<c;e++)a.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:a}=this;return e.length=n,e.pos=a,e.finished=o,e.destroyed=s,n%t&&e.buffer.set(r),e}}const Js=(e,t,r)=>e&t^~e&r,Ys=(e,t,r)=>e&t^e&r^t&r,Xs=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Qs=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ea=new Uint32Array(64);class ta extends Zs{constructor(){super(64,32,8,!1),this.A=0|Qs[0],this.B=0|Qs[1],this.C=0|Qs[2],this.D=0|Qs[3],this.E=0|Qs[4],this.F=0|Qs[5],this.G=0|Qs[6],this.H=0|Qs[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:a,H:i}=this;return[e,t,r,n,o,s,a,i]}set(e,t,r,n,o,s,a,i){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|a,this.H=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)ea[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=ea[e-15],r=ea[e-2],n=Fs(t,7)^Fs(t,18)^t>>>3,o=Fs(r,17)^Fs(r,19)^r>>>10;ea[e]=o+ea[e-7]+n+ea[e-16]|0}let{A:r,B:n,C:o,D:s,E:a,F:i,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(Fs(a,6)^Fs(a,11)^Fs(a,25))+Js(a,i,c)+Xs[e]+ea[e]|0,l=(Fs(r,2)^Fs(r,13)^Fs(r,22))+Ys(r,n,o)|0;u=c,c=i,i=a,a=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,i=i+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,s,a,i,c,u)}roundClean(){ea.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const ra=zs(()=>new ta),na=BigInt(2**32-1),oa=BigInt(32);function sa(e,t=!1){return t?{h:Number(e&na),l:Number(e>>oa&na)}:{h:0|Number(e>>oa&na),l:0|Number(e&na)}}function aa(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=sa(e[o],t);[r[o],n[o]]=[s,a]}return[r,n]}const ia=(e,t,r)=>e<<r|t>>>32-r,ca=(e,t,r)=>t<<r|e>>>32-r,ua=(e,t,r)=>t<<r-32|e>>>64-r,la=(e,t,r)=>e<<r-32|t>>>64-r;const da={fromBig:sa,split:aa,toBig:(e,t)=>BigInt(e>>>0)<<oa|BigInt(t>>>0),shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:ia,rotlSL:ca,rotlBH:ua,rotlBL:la,add:function(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:0|o}},add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/2**32|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0,add5H:(e,t,r,n,o,s)=>t+r+n+o+s+(e/2**32|0)|0,add5L:(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0)},fa=da,[pa,ha]=fa.split([\"0x428a2f98d728ae22\",\"0x7137449123ef65cd\",\"0xb5c0fbcfec4d3b2f\",\"0xe9b5dba58189dbbc\",\"0x3956c25bf348b538\",\"0x59f111f1b605d019\",\"0x923f82a4af194f9b\",\"0xab1c5ed5da6d8118\",\"0xd807aa98a3030242\",\"0x12835b0145706fbe\",\"0x243185be4ee4b28c\",\"0x550c7dc3d5ffb4e2\",\"0x72be5d74f27b896f\",\"0x80deb1fe3b1696b1\",\"0x9bdc06a725c71235\",\"0xc19bf174cf692694\",\"0xe49b69c19ef14ad2\",\"0xefbe4786384f25e3\",\"0x0fc19dc68b8cd5b5\",\"0x240ca1cc77ac9c65\",\"0x2de92c6f592b0275\",\"0x4a7484aa6ea6e483\",\"0x5cb0a9dcbd41fbd4\",\"0x76f988da831153b5\",\"0x983e5152ee66dfab\",\"0xa831c66d2db43210\",\"0xb00327c898fb213f\",\"0xbf597fc7beef0ee4\",\"0xc6e00bf33da88fc2\",\"0xd5a79147930aa725\",\"0x06ca6351e003826f\",\"0x142929670a0e6e70\",\"0x27b70a8546d22ffc\",\"0x2e1b21385c26c926\",\"0x4d2c6dfc5ac42aed\",\"0x53380d139d95b3df\",\"0x650a73548baf63de\",\"0x766a0abb3c77b2a8\",\"0x81c2c92e47edaee6\",\"0x92722c851482353b\",\"0xa2bfe8a14cf10364\",\"0xa81a664bbc423001\",\"0xc24b8b70d0f89791\",\"0xc76c51a30654be30\",\"0xd192e819d6ef5218\",\"0xd69906245565a910\",\"0xf40e35855771202a\",\"0x106aa07032bbd1b8\",\"0x19a4c116b8d2d0c8\",\"0x1e376c085141ab53\",\"0x2748774cdf8eeb99\",\"0x34b0bcb5e19b48a8\",\"0x391c0cb3c5c95a63\",\"0x4ed8aa4ae3418acb\",\"0x5b9cca4f7763e373\",\"0x682e6ff3d6b2b8a3\",\"0x748f82ee5defb2fc\",\"0x78a5636f43172f60\",\"0x84c87814a1f0ab72\",\"0x8cc702081a6439ec\",\"0x90befffa23631e28\",\"0xa4506cebde82bde9\",\"0xbef9a3f7b2c67915\",\"0xc67178f2e372532b\",\"0xca273eceea26619c\",\"0xd186b8c721c0c207\",\"0xeada7dd6cde0eb1e\",\"0xf57d4f7fee6ed178\",\"0x06f067aa72176fba\",\"0x0a637dc5a2c898a6\",\"0x113f9804bef90dae\",\"0x1b710b35131c471b\",\"0x28db77f523047d84\",\"0x32caab7b40c72493\",\"0x3c9ebe0a15c9bebc\",\"0x431d67c49c100d4c\",\"0x4cc5d4becb3e42b6\",\"0x597f299cfc657e2a\",\"0x5fcb6fab3ad6faec\",\"0x6c44198c4a475817\"].map(e=>BigInt(e))),ga=new Uint32Array(80),ya=new Uint32Array(80);class ma extends Zs{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:o,Cl:s,Dh:a,Dl:i,Eh:c,El:u,Fh:l,Fl:d,Gh:f,Gl:p,Hh:h,Hl:g}=this;return[e,t,r,n,o,s,a,i,c,u,l,d,f,p,h,g]}set(e,t,r,n,o,s,a,i,c,u,l,d,f,p,h,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|o,this.Cl=0|s,this.Dh=0|a,this.Dl=0|i,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|p,this.Hh=0|h,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)ga[r]=e.getUint32(t),ya[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|ga[e-15],r=0|ya[e-15],n=fa.rotrSH(t,r,1)^fa.rotrSH(t,r,8)^fa.shrSH(t,r,7),o=fa.rotrSL(t,r,1)^fa.rotrSL(t,r,8)^fa.shrSL(t,r,7),s=0|ga[e-2],a=0|ya[e-2],i=fa.rotrSH(s,a,19)^fa.rotrBH(s,a,61)^fa.shrSH(s,a,6),c=fa.rotrSL(s,a,19)^fa.rotrBL(s,a,61)^fa.shrSL(s,a,6),u=fa.add4L(o,c,ya[e-7],ya[e-16]),l=fa.add4H(u,n,i,ga[e-7],ga[e-16]);ga[e]=0|l,ya[e]=0|u}let{Ah:r,Al:n,Bh:o,Bl:s,Ch:a,Cl:i,Dh:c,Dl:u,Eh:l,El:d,Fh:f,Fl:p,Gh:h,Gl:g,Hh:y,Hl:m}=this;for(let e=0;e<80;e++){const t=fa.rotrSH(l,d,14)^fa.rotrSH(l,d,18)^fa.rotrBH(l,d,41),b=fa.rotrSL(l,d,14)^fa.rotrSL(l,d,18)^fa.rotrBL(l,d,41),w=l&f^~l&h,T=d&p^~d&g,A=fa.add5L(m,b,T,ha[e],ya[e]),v=fa.add5H(A,y,t,w,pa[e],ga[e]),P=0|A,E=fa.rotrSH(r,n,28)^fa.rotrBH(r,n,34)^fa.rotrBH(r,n,39),C=fa.rotrSL(r,n,28)^fa.rotrBL(r,n,34)^fa.rotrBL(r,n,39),B=r&o^r&a^o&a,W=n&s^n&i^s&i;y=0|h,m=0|g,h=0|f,g=0|p,f=0|l,p=0|d,({h:l,l:d}=fa.add(0|c,0|u,0|v,0|P)),c=0|a,u=0|i,a=0|o,i=0|s,o=0|r,s=0|n;const S=fa.add3L(P,C,W);r=fa.add3H(S,v,E,B),n=0|S}({h:r,l:n}=fa.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:s}=fa.add(0|this.Bh,0|this.Bl,0|o,0|s)),({h:a,l:i}=fa.add(0|this.Ch,0|this.Cl,0|a,0|i)),({h:c,l:u}=fa.add(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:d}=fa.add(0|this.Eh,0|this.El,0|l,0|d)),({h:f,l:p}=fa.add(0|this.Fh,0|this.Fl,0|f,0|p)),({h,l:g}=fa.add(0|this.Gh,0|this.Gl,0|h,0|g)),({h:y,l:m}=fa.add(0|this.Hh,0|this.Hl,0|y,0|m)),this.set(r,n,o,s,a,i,c,u,l,d,f,p,h,g,y,m)}roundClean(){ga.fill(0),ya.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const ba=zs(()=>new ma);const wa=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof global)return global;throw new Error(\"unable to locate global object\")}(),Ta=wa.crypto||wa.msCrypto;function Aa(e){switch(e){case\"sha256\":return ra.create();case\"sha512\":return ba.create()}$o(!1,\"invalid hashing algorithm name\",\"algorithm\",e)}const va=function(e){return Aa(\"sha256\").update(e).digest()},Pa=function(e){return Aa(\"sha512\").update(e).digest()};let Ea=va,Ca=Pa,Ba=!1,Wa=!1;function Sa(e){const t=Ko(e,\"data\");return Xo(Ea(t))}function Ia(e){const t=Ko(e,\"data\");return Xo(Ca(t))}Sa._=va,Sa.lock=function(){Ba=!0},Sa.register=function(e){if(Ba)throw new Error(\"sha256 is locked\");Ea=e},Object.freeze(Sa),Ia._=Pa,Ia.lock=function(){Wa=!0},Ia.register=function(e){if(Wa)throw new Error(\"sha512 is locked\");Ca=e},Object.freeze(Sa);let _a=!1;const Ra=function(e,t,r,n,o){return function(e,t,r,n,o){const s={sha256:ra,sha512:ba}[o];return $o(null!=s,\"invalid pbkdf2 algorithm\",\"algorithm\",o),qs(s,e,t,{c:r,dkLen:n})}(e,t,r,n,o)};let xa=Ra;function Oa(e,t,r,n,o){const s=Ko(e,\"password\"),a=Ko(t,\"salt\");return Xo(xa(s,a,r,n,o))}function Ma(e,t,r,n,o){if(\"BAD_PREFIX\"===e||\"UNEXPECTED_CONTINUE\"===e){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return\"OVERRUN\"===e?r.length-t-1:0}Oa._=Ra,Oa.lock=function(){_a=!0},Oa.register=function(e){if(_a)throw new Error(\"pbkdf2 is locked\");xa=e},Object.freeze(Oa);const Fa=Object.freeze({error:function(e,t,r,n,o){$o(!1,`invalid codepoint at offset ${t}; ${e}`,\"bytes\",r)},ignore:Ma,replace:function(e,t,r,n,o){return\"OVERLONG\"===e?($o(\"number\"==typeof o,\"invalid bad code point for replacement\",\"badCodepoint\",o),n.push(o),0):(n.push(65533),Ma(e,t,r))}});function ka(e,t){null==t&&(t=Fa.error);const r=Ko(e,\"bytes\"),n=[];let o=0;for(;o<r.length;){const e=r[o++];if(!(e>>7)){n.push(e);continue}let s=null,a=null;if(192==(224&e))s=1,a=127;else if(224==(240&e))s=2,a=2047;else{if(240!=(248&e)){o+=t(128==(192&e)?\"UNEXPECTED_CONTINUE\":\"BAD_PREFIX\",o-1,r,n);continue}s=3,a=65535}if(o-1+s>=r.length){o+=t(\"OVERRUN\",o-1,r,n);continue}let i=e&(1<<8-s-1)-1;for(let e=0;e<s;e++){let e=r[o];if(128!=(192&e)){o+=t(\"MISSING_CONTINUE\",o,r,n),i=null;break}i=i<<6|63&e,o++}null!==i&&(i>1114111?o+=t(\"OUT_OF_RANGE\",o-1-s,r,n,i):i>=55296&&i<=57343?o+=t(\"UTF16_SURROGATE\",o-1-s,r,n,i):i<=a?o+=t(\"OVERLONG\",o-1-s,r,n,i):n.push(i))}return n}function Na(e,t){$o(\"string\"==typeof e,\"invalid string value\",\"str\",e),null!=t&&(Vo(t),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);$o(t<e.length&&56320==(64512&o),\"invalid surrogate pair\",\"str\",e);const s=65536+((1023&n)<<10)+(1023&o);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return new Uint8Array(r)}function Ua(e,t){return ka(e,t).map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))).join(\"\")}const[Da,La,$a]=[[],[],[]],za=BigInt(0),ja=BigInt(1),Va=BigInt(2),Ga=BigInt(7),Ha=BigInt(256),Ka=BigInt(113);for(let e=0,t=ja,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],Da.push(2*(5*n+r)),La.push((e+1)*(e+2)/2%64);let o=za;for(let e=0;e<7;e++)t=(t<<ja^(t>>Ga)*Ka)%Ha,t&Va&&(o^=ja<<(ja<<BigInt(e))-ja);$a.push(o)}const[qa,Za]=aa($a,!0),Ja=(e,t,r)=>r>32?ua(e,t,r):ia(e,t,r),Ya=(e,t,r)=>r>32?la(e,t,r):ca(e,t,r);class Xa extends Ds{constructor(e,t,r,n=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Bs(r),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");this.state=new Uint8Array(200),this.state32=Os(this.state)}keccak(){!function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,s=r[o],a=r[o+1],i=Ja(s,a,1)^r[n],c=Ya(s,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=i,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=La[r],s=Ja(t,o,n),a=Ya(t,o,n),i=Da[r];t=e[i],o=e[i+1],e[i]=s,e[i+1]=a}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=qa[n],e[1]^=Za[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Is(this);const{blockLen:t,state:r}=this,n=(e=Us(e)).length;for(let o=0;o<n;){const s=Math.min(t-this.pos,n-o);for(let t=0;t<s;t++)r[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){Is(this,!1),Ws(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(e)}xof(e){return Bs(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(_s(e,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:s}=this;return e||(e=new Xa(t,r,n,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}const Qa=(e,t,r)=>zs(()=>new Xa(t,e,r)),ei=Qa(1,136,32);let ti=!1;const ri=function(e){return ei(e)};let ni=ri;function oi(e){const t=Ko(e,\"data\");return Xo(ni(t))}function si(e){return oi(Na(e))}oi._=ri,oi.lock=function(){ti=!0},oi.register=function(e){if(ti)throw new TypeError(\"keccak256 is locked\");ni=e},Object.freeze(oi);const ai=\" !#$%&'()*+,-./<=>?@[]^_`{|}~\",ii=/^[a-z]*$/i;function ci(e,t){let r=97;return e.reduce((e,n)=>(n===t?r++:n.match(ii)?e.push(String.fromCharCode(r)+n):(r=97,e.push(n)),e),[])}function ui(e){return $o(\"0\"===e[0],\"unsupported auwl data\",\"data\",e),function(e,t){for(let r=28;r>=0;r--)e=e.split(ai[r]).join(t.substring(2*r,2*r+2));const r=[],n=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(e,t,n,o)=>{if(n)for(let e=parseInt(n);e>=0;e--)r.push(\";\");else r.push(t.toLowerCase());return\"\"});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return ci(ci(r,\";\"),\":\")}(e.substring(59),e.substring(1,59))}class li{locale;constructor(e){ko(this,{locale:e})}split(e){return e.toLowerCase().split(/\\s+/g)}join(e){return e.join(\" \")}}class di extends li{#o;#s;constructor(e,t,r){super(e),this.#o=t,this.#s=r,this.#a=null}get _data(){return this.#o}_decodeWords(){return ui(this.#o)}#a;#i(){if(null==this.#a){const e=this._decodeWords();if(si(e.join(\"\\n\")+\"\\n\")!==this.#s)throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#a=e}return this.#a}getWord(e){const t=this.#i();return $o(e>=0&&e<t.length,`invalid word index: ${e}`,\"index\",e),t[e]}getWordIndex(e){return this.#i().indexOf(e)}}let fi=null;class pi extends di{constructor(){super(\"en\",\"0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp Rfe@Rm.Rs#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO\",\"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\")}static wordlist(){return null==fi&&(fi=new pi),fi}}function hi(e){return(1<<e)-1<<8-e&255}function gi(e){return(1<<e)-1&255}function yi(e,t){Vo(\"NFKD\"),null==t&&(t=pi.wordlist());const r=t.split(e);$o(r.length%3==0&&r.length>=12&&r.length<=24,\"invalid mnemonic length\",\"mnemonic\",\"[ REDACTED ]\");const n=new Uint8Array(Math.ceil(11*r.length/8));let o=0;for(let e=0;e<r.length;e++){let s=t.getWordIndex(r[e].normalize(\"NFKD\"));$o(s>=0,`invalid mnemonic word at index ${e}`,\"mnemonic\",\"[ REDACTED ]\");for(let e=0;e<11;e++)s&1<<10-e&&(n[o>>3]|=1<<7-o%8),o++}const s=32*r.length/3,a=hi(r.length/3);return $o((Ko(Sa(n.slice(0,s/8)))[0]&a)===(n[n.length-1]&a),\"invalid mnemonic checksum\",\"mnemonic\",\"[ REDACTED ]\"),Xo(n.slice(0,s/8))}function mi(e,t){$o(e.length%4==0&&e.length>=16&&e.length<=32,\"invalid entropy size\",\"entropy\",\"[ REDACTED ]\"),null==t&&(t=pi.wordlist());const r=[0];let n=11;for(let t=0;t<e.length;t++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&gi(8-n)),n+=3);const o=e.length/4,s=parseInt(Sa(e).substring(2,4),16)&hi(o);return r[r.length-1]<<=o,r[r.length-1]|=s>>8-o,t.join(r.map(e=>t.getWord(e)))}const bi={};class wi{phrase;password;wordlist;entropy;constructor(e,t,r,n,o){null==n&&(n=\"\"),null==o&&(o=pi.wordlist()),Go(e,bi,\"Mnemonic\"),ko(this,{phrase:r,password:n,wordlist:o,entropy:t})}computeSeed(){const e=Na(\"mnemonic\"+this.password,\"NFKD\");return Oa(Na(this.phrase,\"NFKD\"),e,2048,64,\"sha512\")}static fromPhrase(e,t,r){const n=yi(e,r);return e=mi(Ko(n),r),new wi(bi,n,e,t,r)}static fromEntropy(e,t,r){const n=Ko(e,\"entropy\"),o=mi(n,r);return new wi(bi,Xo(n),o,t,r)}static entropyToPhrase(e,t){return mi(Ko(e,\"entropy\"),t)}static phraseToEntropy(e,t){return yi(e,t)}static isValidMnemonic(e,t){try{return yi(e,t),!0}catch(e){}return!1}}let Ti=!1;const Ai=function(e,t,r){return function(e,t){const r={sha256:ra,sha512:ba}[e];return $o(null!=r,\"invalid hmac algorithm\",\"algorithm\",e),Gs.create(r,t)}(e,t).update(r).digest()};let vi=Ai;function Pi(e,t,r){const n=Ko(t,\"key\"),o=Ko(r,\"data\");return Xo(vi(e,n,o))}Pi._=Ai,Pi.lock=function(){Ti=!0},Pi.register=function(e){if(Ti)throw new Error(\"computeHmac is locked\");vi=e},Object.freeze(Pi);const Ei=BigInt(0),Ci=BigInt(36);function Bi(e){const t=(e=e.toLowerCase()).substring(2).split(\"\"),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=Ko(oi(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return\"0x\"+t.join(\"\")}const Wi={};for(let e=0;e<10;e++)Wi[String(e)]=String(e);for(let e=0;e<26;e++)Wi[String.fromCharCode(65+e)]=String(10+e);const Si=15;function Ii(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+\"00\").split(\"\").map(e=>Wi[e]).join(\"\");for(;t.length>=Si;){let e=t.substring(0,Si);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r=\"0\"+r;return r}const _i=function(){const e={};for(let t=0;t<36;t++){e[\"0123456789abcdefghijklmnopqrstuvwxyz\"[t]]=BigInt(t)}return e}();function Ri(e){if($o(\"string\"==typeof e,\"invalid address\",\"address\",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith(\"0x\")||(e=\"0x\"+e);const t=Bi(e);return $o(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,\"bad address checksum\",\"address\",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){$o(e.substring(2,4)===Ii(e),\"bad icap checksum\",\"address\",e);let t=function(e){e=e.toLowerCase();let t=Ei;for(let r=0;r<e.length;r++)t=t*Ci+_i[e[r]];return t}(e.substring(4)).toString(16);for(;t.length<40;)t=\"0\"+t;return Bi(\"0x\"+t)}$o(!1,\"invalid address\",\"address\",e)}BigInt(0);const xi=BigInt(1),Oi=BigInt(2),Mi=e=>e instanceof Uint8Array,Fi=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,\"0\"));function ki(e){if(!Mi(e))throw new Error(\"Uint8Array expected\");let t=\"\";for(let r=0;r<e.length;r++)t+=Fi[e[r]];return t}function Ni(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);return BigInt(\"\"===e?\"0\":`0x${e}`)}function Ui(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);const t=e.length;if(t%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,o=e.slice(n,n+2),s=Number.parseInt(o,16);if(Number.isNaN(s)||s<0)throw new Error(\"Invalid byte sequence\");r[t]=s}return r}function Di(e){return Ni(ki(e))}function Li(e){if(!Mi(e))throw new Error(\"Uint8Array expected\");return Ni(ki(Uint8Array.from(e).reverse()))}function $i(e,t){return Ui(e.toString(16).padStart(2*t,\"0\"))}function zi(e,t){return $i(e,t).reverse()}function ji(e,t,r){let n;if(\"string\"==typeof t)try{n=Ui(t)}catch(r){throw new Error(`${e} must be valid hex string, got \"${t}\". Cause: ${r}`)}else{if(!Mi(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const o=n.length;if(\"number\"==typeof r&&o!==r)throw new Error(`${e} expected ${r} bytes, got ${o}`);return n}function Vi(...e){const t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));let r=0;return e.forEach(e=>{if(!Mi(e))throw new Error(\"Uint8Array expected\");t.set(e,r),r+=e.length}),t}const Gi=e=>(Oi<<BigInt(e-1))-xi,Hi=e=>new Uint8Array(e),Ki=e=>Uint8Array.from(e);function qi(e,t,r){if(\"number\"!=typeof e||e<2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof t||t<2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof r)throw new Error(\"hmacFn must be a function\");let n=Hi(e),o=Hi(e),s=0;const a=()=>{n.fill(1),o.fill(0),s=0},i=(...e)=>r(o,n,...e),c=(e=Hi())=>{o=i(Ki([0]),e),n=i(),0!==e.length&&(o=i(Ki([1]),e),n=i())},u=()=>{if(s++>=1e3)throw new Error(\"drbg: tried 1000 values\");let e=0;const r=[];for(;e<t;){n=i();const t=n.slice();r.push(t),e+=n.length}return Vi(...r)};return(e,t)=>{let r;for(a(),c(e);!(r=t(u()));)c();return a(),r}}const Zi={bigint:e=>\"bigint\"==typeof e,function:e=>\"function\"==typeof e,boolean:e=>\"boolean\"==typeof e,string:e=>\"string\"==typeof e,stringOrUint8Array:e=>\"string\"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>\"function\"==typeof e&&Number.isSafeInteger(e.outputLen)};function Ji(e,t,r={}){const n=(t,r,n)=>{const o=Zi[r];if(\"function\"!=typeof o)throw new Error(`Invalid validator \"${r}\", expected function`);const s=e[t];if(!(n&&void 0===s||o(s,e)))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}const Yi=BigInt(0),Xi=BigInt(1),Qi=BigInt(2),ec=BigInt(3),tc=BigInt(4),rc=BigInt(5),nc=BigInt(8);BigInt(9),BigInt(16);function oc(e,t){const r=e%t;return r>=Yi?r:t+r}function sc(e,t,r){if(r<=Yi||t<Yi)throw new Error(\"Expected power/modulo > 0\");if(r===Xi)return Yi;let n=Xi;for(;t>Yi;)t&Xi&&(n=n*e%r),e=e*e%r,t>>=Xi;return n}function ac(e,t,r){let n=e;for(;t-- >Yi;)n*=n,n%=r;return n}function ic(e,t){if(e===Yi||t<=Yi)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=oc(e,t),n=t,o=Yi,s=Xi,a=Xi,i=Yi;for(;r!==Yi;){const e=n/r,t=n%r,c=o-a*e,u=s-i*e;n=r,r=t,o=a,s=i,a=c,i=u}if(n!==Xi)throw new Error(\"invert: does not exist\");return oc(o,t)}function cc(e){if(e%tc===ec){const t=(e+Xi)/tc;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}if(e%nc===rc){const t=(e-rc)/nc;return function(e,r){const n=e.mul(r,Qi),o=e.pow(n,t),s=e.mul(r,o),a=e.mul(e.mul(s,Qi),o),i=e.mul(s,e.sub(a,e.ONE));if(!e.eql(e.sqr(i),r))throw new Error(\"Cannot find square root\");return i}}return function(e){const t=(e-Xi)/Qi;let r,n,o;for(r=e-Xi,n=0;r%Qi===Yi;r/=Qi,n++);for(o=Qi;o<e&&sc(o,t,e)!==e-Xi;o++);if(1===n){const t=(e+Xi)/tc;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}const s=(r+Xi)/Qi;return function(e,a){if(e.pow(a,t)===e.neg(e.ONE))throw new Error(\"Cannot find square root\");let i=n,c=e.pow(e.mul(e.ONE,o),r),u=e.pow(a,s),l=e.pow(a,r);for(;!e.eql(l,e.ONE);){if(e.eql(l,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(l);t<i&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,Xi<<BigInt(i-t-1));c=e.sqr(r),u=e.mul(u,r),l=e.mul(l,c),i=t}return u}}(e)}const uc=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function lc(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function dc(e){if(\"bigint\"!=typeof e)throw new Error(\"field order must be bigint\");const t=e.toString(2).length;return Math.ceil(t/8)}function fc(e){const t=dc(e);return t+Math.ceil(t/2)}const pc=BigInt(0),hc=BigInt(1);function gc(e){return function(e){const t=uc.reduce((e,t)=>(e[t]=\"function\",e),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"isSafeInteger\",BITS:\"isSafeInteger\"});Ji(e,t)}(e.Fp),Ji(e,{n:\"bigint\",h:\"bigint\",Gx:\"field\",Gy:\"field\"},{nBitLength:\"isSafeInteger\",nByteLength:\"isSafeInteger\"}),Object.freeze({...lc(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:yc,aT:mc}=a,bc={Err:class extends Error{constructor(e=\"\"){super(e)}},_parseInt(e){const{Err:t}=bc;if(e.length<2||2!==e[0])throw new t(\"Invalid signature integer tag\");const r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t(\"Invalid signature integer: wrong length\");if(128&n[0])throw new t(\"Invalid signature integer: negative\");if(0===n[0]&&!(128&n[1]))throw new t(\"Invalid signature integer: unnecessary leading zero\");return{d:yc(n),l:e.subarray(r+2)}},toSig(e){const{Err:t}=bc,r=\"string\"==typeof e?mc(e):e;if(!(r instanceof Uint8Array))throw new Error(\"ui8a expected\");let n=r.length;if(n<2||48!=r[0])throw new t(\"Invalid signature tag\");if(r[1]!==n-2)throw new t(\"Invalid signature: incorrect length\");const{d:o,l:s}=bc._parseInt(r.subarray(2)),{d:a,l:i}=bc._parseInt(s);if(i.length)throw new t(\"Invalid signature: left bytes after parsing\");return{r:o,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?\"00\"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),s=n.length/2,a=o.length/2,i=r(s),c=r(a);return`30${r(a+s+4)}02${c}${o}02${i}${n}`}},wc=BigInt(0),Tc=BigInt(1),Ac=(BigInt(2),BigInt(3));BigInt(4);function vc(e){const t=function(e){const t=gc(e);Ji(t,{a:\"field\",b:\"field\"},{allowedPrivateKeyLengths:\"array\",wrapPrivateKey:\"boolean\",isTorsionFree:\"function\",clearCofactor:\"function\",allowInfinityPoint:\"boolean\",fromBytes:\"function\",toBytes:\"function\"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");if(\"object\"!=typeof r||\"bigint\"!=typeof r.beta||\"function\"!=typeof r.splitScalar)throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{const o=t.toAffine();return Vi(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),o=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function s(e){const{a:n,b:o}=t,s=r.sqr(e),a=r.mul(s,e);return r.add(r.add(a,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw new Error(\"bad generator point: equation left != right\");function a(e){return\"bigint\"==typeof e&&wc<e&&e<t.n}function i(e){if(!a(e))throw new Error(\"Expected valid bigint: 0 < bigint < curve.n\")}function c(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:o,n:s}=t;if(r&&\"bigint\"!=typeof e){if(e instanceof Uint8Array&&(e=ki(e)),\"string\"!=typeof e||!r.includes(e.length))throw new Error(\"Invalid key\");e=e.padStart(2*n,\"0\")}let a;try{a=\"bigint\"==typeof e?e:Di(ji(\"private key\",e,n))}catch(t){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`)}return o&&(a=oc(a,s)),i(a),a}const u=new Map;function l(e){if(!(e instanceof d))throw new Error(\"ProjectivePoint expected\")}class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error(\"x required\");if(null==t||!r.isValid(t))throw new Error(\"y required\");if(null==n||!r.isValid(n))throw new Error(\"z required\")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error(\"invalid affine point\");if(e instanceof d)throw new Error(\"projective point not allowed\");const o=e=>r.eql(e,r.ZERO);return o(t)&&o(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(o(ji(\"pointHex\",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error(\"bad point: ZERO\")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error(\"bad point: x or y not FE\");const o=r.sqr(n),a=s(e);if(!r.eql(o,a))throw new Error(\"bad point: equation left != right\");if(!this.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error(\"Field doesn't support isOdd\")}equals(e){l(e);const{px:t,py:n,pz:o}=this,{px:s,py:a,pz:i}=e,c=r.eql(r.mul(t,i),r.mul(s,o)),u=r.eql(r.mul(n,i),r.mul(a,o));return c&&u}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,Ac),{px:s,py:a,pz:i}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(s,s),p=r.mul(a,a),h=r.mul(i,i),g=r.mul(s,a);return g=r.add(g,g),l=r.mul(s,i),l=r.add(l,l),c=r.mul(e,l),u=r.mul(o,h),u=r.add(c,u),c=r.sub(p,u),u=r.add(p,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(o,l),h=r.mul(e,h),g=r.sub(f,h),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,h),f=r.mul(f,g),u=r.add(u,f),h=r.mul(a,i),h=r.add(h,h),f=r.mul(h,g),c=r.sub(c,f),l=r.mul(h,p),l=r.add(l,l),l=r.add(l,l),new d(c,u,l)}add(e){l(e);const{px:n,py:o,pz:s}=this,{px:a,py:i,pz:c}=e;let u=r.ZERO,f=r.ZERO,p=r.ZERO;const h=t.a,g=r.mul(t.b,Ac);let y=r.mul(n,a),m=r.mul(o,i),b=r.mul(s,c),w=r.add(n,o),T=r.add(a,i);w=r.mul(w,T),T=r.add(y,m),w=r.sub(w,T),T=r.add(n,s);let A=r.add(a,c);return T=r.mul(T,A),A=r.add(y,b),T=r.sub(T,A),A=r.add(o,s),u=r.add(i,c),A=r.mul(A,u),u=r.add(m,b),A=r.sub(A,u),p=r.mul(h,T),u=r.mul(g,b),p=r.add(u,p),u=r.sub(m,p),p=r.add(m,p),f=r.mul(u,p),m=r.add(y,y),m=r.add(m,y),b=r.mul(h,b),T=r.mul(g,T),m=r.add(m,b),b=r.sub(y,b),b=r.mul(h,b),T=r.add(T,b),y=r.mul(m,T),f=r.add(f,y),y=r.mul(A,T),u=r.mul(w,u),u=r.sub(u,y),y=r.mul(w,m),p=r.mul(A,p),p=r.add(p,y),new d(u,f,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,u,e,e=>{const t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)})}multiplyUnsafe(e){const n=d.ZERO;if(e===wc)return n;if(i(e),e===Tc)return this;const{endo:o}=t;if(!o)return p.unsafeLadder(this,e);let{k1neg:s,k1:a,k2neg:c,k2:u}=o.splitScalar(e),l=n,f=n,h=this;for(;a>wc||u>wc;)a&Tc&&(l=l.add(h)),u&Tc&&(f=f.add(h)),h=h.double(),a>>=Tc,u>>=Tc;return s&&(l=l.negate()),c&&(f=f.negate()),f=new d(r.mul(f.px,o.beta),f.py,f.pz),l.add(f)}multiply(e){i(e);let n,o,s=e;const{endo:a}=t;if(a){const{k1neg:e,k1:t,k2neg:i,k2:c}=a.splitScalar(s);let{p:u,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(c);u=p.constTimeNegate(e,u),f=p.constTimeNegate(i,f),f=new d(r.mul(f.px,a.beta),f.py,f.pz),n=u.add(f),o=l.add(h)}else{const{p:e,f:t}=this.wNAF(s);n=e,o=t}return d.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=d.BASE,o=(e,t)=>t!==wc&&t!==Tc&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=o(this,t).add(o(e,r));return s.is0()?void 0:s}toAffine(e){const{px:t,py:n,pz:o}=this,s=this.is0();null==e&&(e=s?r.ONE:r.inv(o));const a=r.mul(t,e),i=r.mul(n,e),c=r.mul(o,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error(\"invZ was invalid\");return{x:a,y:i}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===Tc)return!0;if(r)return r(d,this);throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===Tc?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return ki(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const f=t.nBitLength,p=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>pc;)r&hc&&(n=n.add(o)),o=o.double(),r>>=hc;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),s=[];let a=e,i=a;for(let e=0;e<r;e++){i=a,s.push(i);for(let e=1;e<o;e++)i=i.add(a),s.push(i);a=i.double()}return s},wNAF(t,o,s){const{windows:a,windowSize:i}=n(t);let c=e.ZERO,u=e.BASE;const l=BigInt(2**t-1),d=2**t,f=BigInt(t);for(let e=0;e<a;e++){const t=e*i;let n=Number(s&l);s>>=f,n>i&&(n-=d,s+=hc);const a=t,p=t+Math.abs(n)-1,h=e%2!=0,g=n<0;0===n?u=u.add(r(h,o[a])):c=c.add(r(g,o[p]))}return{p:c,f:u}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,o),1!==o&&t.set(e,n(s))),this.wNAF(o,s,r)}}}(d,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:a}}function Pc(e){const t=function(e){const t=gc(e);return Ji(t,{hash:\"hash\",hmac:\"function\",randomBytes:\"function\"},{bits2int:\"function\",bits2int_modN:\"function\",lowS:\"boolean\"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n}=t,o=r.BYTES+1,s=2*r.BYTES+1;function a(e){return oc(e,n)}function i(e){return ic(e,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:l,isWithinCurveOrder:d}=vc({...t,toBytes(e,t,n){const o=t.toAffine(),s=r.toBytes(o.x),a=Vi;return n?a(Uint8Array.from([t.hasEvenY()?2:3]),s):a(Uint8Array.from([4]),s,r.toBytes(o.y))},fromBytes(e){const t=e.length,n=e[0],a=e.subarray(1);if(t!==o||2!==n&&3!==n){if(t===s&&4===n){return{x:r.fromBytes(a.subarray(0,r.BYTES)),y:r.fromBytes(a.subarray(r.BYTES,2*r.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`)}{const e=Di(a);if(!(wc<(i=e)&&i<r.ORDER))throw new Error(\"Point is not on curve\");const t=l(e);let o=r.sqrt(t);return!(1&~n)!==((o&Tc)===Tc)&&(o=r.neg(o)),{x:e,y:o}}var i}}),f=e=>ki($i(e,t.nByteLength));function p(e){return e>n>>Tc}const h=(e,t,r)=>Di(e.slice(t,r));class g{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=ji(\"compactSignature\",e,2*r),new g(h(e,0,r),h(e,r,2*r))}static fromDER(e){const{r:t,s:r}=bc.toSig(ji(\"DER\",e));return new g(t,r)}assertValidity(){if(!d(this.r))throw new Error(\"r must be 0 < r < CURVE.n\");if(!d(this.s))throw new Error(\"s must be 0 < s < CURVE.n\")}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:o,recovery:s}=this,u=w(ji(\"msgHash\",e));if(null==s||![0,1,2,3].includes(s))throw new Error(\"recovery id invalid\");const l=2===s||3===s?n+t.n:n;if(l>=r.ORDER)throw new Error(\"recovery id 2 or 3 invalid\");const d=1&s?\"03\":\"02\",p=c.fromHex(d+f(l)),h=i(l),g=a(-u*h),y=a(o*h),m=c.BASE.multiplyAndAddUnsafe(p,g,y);if(!m)throw new Error(\"point at infinify\");return m.assertValidity(),m}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Ui(this.toDERHex())}toDERHex(){return bc.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Ui(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const y={isValidPrivateKey(e){try{return u(e),!0}catch(e){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const e=fc(t.n);return function(e,t,r=!1){const n=e.length,o=dc(t),s=fc(t);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const a=oc(r?Di(e):Li(e),t-Xi)+Xi;return r?zi(a,o):$i(a,o)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function m(e){const t=e instanceof Uint8Array,r=\"string\"==typeof e,n=(t||r)&&e.length;return t?n===o||n===s:r?n===2*o||n===2*s:e instanceof c}const b=t.bits2int||function(e){const r=Di(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},w=t.bits2int_modN||function(e){return a(b(e))},T=Gi(t.nBitLength);function A(e){if(\"bigint\"!=typeof e)throw new Error(\"bigint expected\");if(!(wc<=e&&e<T))throw new Error(`bigint expected < 2^${t.nBitLength}`);return $i(e,t.nByteLength)}function v(e,n,o=P){if([\"recovered\",\"canonical\"].some(e=>e in o))throw new Error(\"sign() legacy options not supported\");const{hash:s,randomBytes:l}=t;let{lowS:f,prehash:h,extraEntropy:y}=o;null==f&&(f=!0),e=ji(\"msgHash\",e),h&&(e=ji(\"prehashed msgHash\",s(e)));const m=w(e),T=u(n),v=[A(T),A(m)];if(null!=y){const e=!0===y?l(r.BYTES):y;v.push(ji(\"extraEntropy\",e))}const E=Vi(...v),C=m;return{seed:E,k2sig:function(e){const t=b(e);if(!d(t))return;const r=i(t),n=c.BASE.multiply(t).toAffine(),o=a(n.x);if(o===wc)return;const s=a(r*a(C+o*T));if(s===wc)return;let u=(n.x===o?0:2)|Number(n.y&Tc),l=s;return f&&p(s)&&(l=function(e){return p(e)?a(-e):e}(s),u^=1),new g(o,l,u)}}}const P={lowS:t.lowS,prehash:!1},E={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(m(e))throw new Error(\"first arg must be private key\");if(!m(t))throw new Error(\"second arg must be public key\");return c.fromHex(t).multiply(u(e)).toRawBytes(r)},sign:function(e,r,n=P){const{seed:o,k2sig:s}=v(e,r,n),a=t;return qi(a.hash.outputLen,a.nByteLength,a.hmac)(o,s)},verify:function(e,r,n,o=E){const s=e;if(r=ji(\"msgHash\",r),n=ji(\"publicKey\",n),\"strict\"in o)throw new Error(\"options.strict was renamed to lowS\");const{lowS:u,prehash:l}=o;let d,f;try{if(\"string\"==typeof s||s instanceof Uint8Array)try{d=g.fromDER(s)}catch(e){if(!(e instanceof bc.Err))throw e;d=g.fromCompact(s)}else{if(\"object\"!=typeof s||\"bigint\"!=typeof s.r||\"bigint\"!=typeof s.s)throw new Error(\"PARSE\");{const{r:e,s:t}=s;d=new g(e,t)}}f=c.fromHex(n)}catch(e){if(\"PARSE\"===e.message)throw new Error(\"signature must be Signature instance, Uint8Array or hex string\");return!1}if(u&&d.hasHighS())return!1;l&&(r=t.hash(r));const{r:p,s:h}=d,y=w(r),m=i(h),b=a(y*m),T=a(p*m),A=c.BASE.multiplyAndAddUnsafe(f,b,T)?.toAffine();return!!A&&a(A.x)===p},ProjectivePoint:c,Signature:g,utils:y}}function Ec(e){return{hash:e,hmac:(t,...r)=>Gs(e,t,function(...e){const t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));let r=0;return e.forEach(e=>{if(!xs(e))throw new Error(\"Uint8Array expected\");t.set(e,r),r+=e.length}),t}(...r)),randomBytes:js}}const Cc=BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),Bc=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),Wc=BigInt(1),Sc=BigInt(2),Ic=(e,t)=>(e+t/Sc)/t;function _c(e){const t=Cc,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),a=BigInt(23),i=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=ac(l,r,t)*l%t,f=ac(d,r,t)*l%t,p=ac(f,Sc,t)*u%t,h=ac(p,o,t)*p%t,g=ac(h,s,t)*h%t,y=ac(g,i,t)*g%t,m=ac(y,c,t)*y%t,b=ac(m,i,t)*g%t,w=ac(b,r,t)*l%t,T=ac(w,a,t)*h%t,A=ac(T,n,t)*u%t,v=ac(A,Sc,t);if(!Rc.eql(Rc.sqr(v),e))throw new Error(\"Cannot find square root\");return v}const Rc=function(e,t,r=!1,n={}){if(e<=Yi)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:o,nByteLength:s}=lc(e,t);if(s>2048)throw new Error(\"Field lengths over 2048 bytes are not supported\");const a=cc(e),i=Object.freeze({ORDER:e,BITS:o,BYTES:s,MASK:Gi(o),ZERO:Yi,ONE:Xi,create:t=>oc(t,e),isValid:t=>{if(\"bigint\"!=typeof t)throw new Error(\"Invalid field element: expected bigint, got \"+typeof t);return Yi<=t&&t<e},is0:e=>e===Yi,isOdd:e=>(e&Xi)===Xi,neg:t=>oc(-t,e),eql:(e,t)=>e===t,sqr:t=>oc(t*t,e),add:(t,r)=>oc(t+r,e),sub:(t,r)=>oc(t-r,e),mul:(t,r)=>oc(t*r,e),pow:(e,t)=>function(e,t,r){if(r<Yi)throw new Error(\"Expected power > 0\");if(r===Yi)return e.ONE;if(r===Xi)return t;let n=e.ONE,o=t;for(;r>Yi;)r&Xi&&(n=e.mul(n,o)),o=e.sqr(o),r>>=Xi;return n}(i,e,t),div:(t,r)=>oc(t*ic(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>ic(t,e),sqrt:n.sqrt||(e=>a(i,e)),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n)),e.ONE),o=e.inv(n);return t.reduceRight((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n)),o),r}(i,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?zi(e,s):$i(e,s),fromBytes:e=>{if(e.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`);return r?Li(e):Di(e)}});return Object.freeze(i)}(Cc,void 0,void 0,{sqrt:_c}),xc=function(e,t){const r=t=>Pc({...e,...Ec(t)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:Rc,n:Bc,Gx:BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),Gy:BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),splitScalar:e=>{const t=Bc,r=BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),n=-Wc*BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\"),o=BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),s=r,a=BigInt(\"0x100000000000000000000000000000000\"),i=Ic(s*e,t),c=Ic(-n*e,t);let u=oc(e-i*r-c*o,t),l=oc(-i*n-c*s,t);const d=u>a,f=l>a;if(d&&(u=t-u),f&&(l=t-l),u>a||l>a)throw new Error(\"splitScalar: Endomorphism failed, k=\"+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}}},ra);BigInt(0);xc.ProjectivePoint;class Oc{#c;constructor(e){$o(32===es(e),\"invalid private key\",\"privateKey\",\"[REDACTED]\"),this.#c=Xo(e)}get privateKey(){return this.#c}get publicKey(){return Oc.computePublicKey(this.#c)}get compressedPublicKey(){return Oc.computePublicKey(this.#c,!0)}sign(e){$o(32===es(e),\"invalid digest length\",\"digest\",e);const t=xc.sign(qo(e),qo(this.#c),{lowS:!0});return Cs.from({r:hs(t.r,32),s:hs(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=Oc.computePublicKey(e);return Xo(xc.getSharedSecret(qo(this.#c),Ko(t),!1))}static computePublicKey(e,t){let r=Ko(e,\"key\");if(32===r.length){return Xo(xc.getPublicKey(r,!!t))}if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}return Xo(xc.ProjectivePoint.fromHex(r).toRawBytes(t))}static recoverPublicKey(e,t){$o(32===es(e),\"invalid digest length\",\"digest\",e);const r=Cs.from(t);let n=xc.Signature.fromCompact(qo(Qo([r.r,r.s])));n=n.addRecoveryBit(r.yParity);const o=n.recoverPublicKey(qo(e));return $o(null!=o,\"invalid signautre for digest\",\"signature\",t),\"0x\"+o.toHex(!1)}static addPoints(e,t,r){const n=xc.ProjectivePoint.fromHex(Oc.computePublicKey(e).substring(2)),o=xc.ProjectivePoint.fromHex(Oc.computePublicKey(t).substring(2));return\"0x\"+n.add(o).toHex(!!r)}}function Mc(e){let t;return t=\"string\"==typeof e?Oc.computePublicKey(e,!1):e.publicKey,Ri(oi(\"0x\"+t.substring(4)).substring(26))}function Fc(e,t){return Mc(Oc.recoverPublicKey(e,t))}const kc=32,Nc=new Uint8Array(kc),Uc=[\"then\"],Dc={},Lc=new WeakMap;function $c(e){return Lc.get(e)}function zc(e,t){Lc.set(e,t)}function jc(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw r.error=t,r}function Vc(e,t,r){return e.indexOf(null)>=0?t.map((e,t)=>e instanceof Gc?Vc($c(e),e,r):e):e.reduce((e,n,o)=>{let s=t.getValue(n);return n in e||(r&&s instanceof Gc&&(s=Vc($c(s),s,r)),e[n]=s),e},{})}class Gc extends Array{#u;constructor(...e){const t=e[0];let r=e[1],n=(e[2]||[]).slice(),o=!0;t!==Dc&&(r=e,n=[],o=!1),super(r.length),r.forEach((e,t)=>{this[t]=e});const s=n.reduce((e,t)=>(\"string\"==typeof t&&e.set(t,(e.get(t)||0)+1),e),new Map);if(zc(this,Object.freeze(r.map((e,t)=>{const r=n[t];return null!=r&&1===s.get(r)?r:null}))),this.#u=[],null==this.#u&&this.#u,!o)return;Object.freeze(this);const a=new Proxy(this,{get:(e,t,r)=>{if(\"string\"==typeof t){if(t.match(/^[0-9]+$/)){const r=ps(t,\"%index\");if(r<0||r>=this.length)throw new RangeError(\"out of result range\");const n=e[r];return n instanceof Error&&jc(`index ${r}`,n),n}if(Uc.indexOf(t)>=0)return Reflect.get(e,t,r);const n=e[t];if(n instanceof Function)return function(...t){return n.apply(this===r?e:this,t)};if(!(t in e))return e.getValue.apply(this===r?e:this,[t])}return Reflect.get(e,t,r)}});return zc(a,$c(this)),a}toArray(e){const t=[];return this.forEach((r,n)=>{r instanceof Error&&jc(`index ${n}`,r),e&&r instanceof Gc&&(r=r.toArray(e)),t.push(r)}),t}toObject(e){const t=$c(this);return t.reduce((r,n,o)=>(Lo(null!=n,`value at index ${o} unnamed`,\"UNSUPPORTED_OPERATION\",{operation:\"toObject()\"}),Vc(t,this,e)),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const r=$c(this),n=[],o=[];for(let s=e;s<t;s++)n.push(this[s]),o.push(r[s]);return new Gc(Dc,n,o)}filter(e,t){const r=$c(this),n=[],o=[];for(let s=0;s<this.length;s++){const a=this[s];a instanceof Error&&jc(`index ${s}`,a),e.call(t,a,s,this)&&(n.push(a),o.push(r[s]))}return new Gc(Dc,n,o)}map(e,t){const r=[];for(let n=0;n<this.length;n++){const o=this[n];o instanceof Error&&jc(`index ${n}`,o),r.push(e.call(t,o,n,this))}return r}getValue(e){const t=$c(this).indexOf(e);if(-1===t)return;const r=this[t];return r instanceof Error&&jc(`property ${JSON.stringify(e)}`,r.error),r}static fromItems(e,t){return new Gc(Dc,e,t)}}function Hc(e){let t=gs(e);return Lo(t.length<=kc,\"value out-of-bounds\",\"BUFFER_OVERRUN\",{buffer:t,length:kc,offset:t.length}),t.length!==kc&&(t=qo(Qo([Nc.slice(t.length%kc),t]))),t}class Kc{name;type;localName;dynamic;constructor(e,t,r,n){ko(this,{name:e,type:t,localName:r,dynamic:n},{name:\"string\",type:\"string\",localName:\"string\",dynamic:\"boolean\"})}_throwError(e,t){$o(!1,e,this.localName,t)}}class qc{#o;#l;constructor(){this.#o=[],this.#l=0}get data(){return Qo(this.#o)}get length(){return this.#l}#d(e){return this.#o.push(e),this.#l+=e.length,e.length}appendWriter(e){return this.#d(qo(e.data))}writeBytes(e){let t=qo(e);const r=t.length%kc;return r&&(t=qo(Qo([t,Nc.slice(r)]))),this.#d(t)}writeValue(e){return this.#d(Hc(e))}writeUpdatableValue(){const e=this.#o.length;return this.#o.push(Nc),this.#l+=kc,t=>{this.#o[e]=Hc(t)}}}class Zc{allowLoose;#o;#f;#p;#h;#g;constructor(e,t,r){ko(this,{allowLoose:!!t}),this.#o=qo(e),this.#p=0,this.#h=null,this.#g=null!=r?r:1024,this.#f=0}get data(){return Xo(this.#o)}get dataLength(){return this.#o.length}get consumed(){return this.#f}get bytes(){return new Uint8Array(this.#o)}#y(e){if(this.#h)return this.#h.#y(e);this.#p+=e,Lo(this.#g<1||this.#p<=this.#g*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#g} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,\"BUFFER_OVERRUN\",{buffer:qo(this.#o),offset:this.#f,length:e,info:{bytesRead:this.#p,dataLength:this.dataLength}})}#m(e,t,r){let n=Math.ceil(t/kc)*kc;return this.#f+n>this.#o.length&&(this.allowLoose&&r&&this.#f+t<=this.#o.length?n=t:Lo(!1,\"data out-of-bounds\",\"BUFFER_OVERRUN\",{buffer:qo(this.#o),length:this.#o.length,offset:this.#f+n})),this.#o.slice(this.#f,this.#f+n)}subReader(e){const t=new Zc(this.#o.slice(this.#f+e),this.allowLoose,this.#g);return t.#h=this,t}readBytes(e,t){let r=this.#m(0,e,!!t);return this.#y(e),this.#f+=r.length,r.slice(0,e)}readValue(){return fs(this.readBytes(kc))}readIndex(){return ps(fs(this.readBytes(kc)))}}const Jc={};function Yc(e,t){let r=!1;return t<0&&(r=!0,t*=-1),new eu(Jc,`${r?\"\":\"u\"}int${t}`,e,{signed:r,width:t})}function Xc(e,t){return new eu(Jc,`bytes${t||\"\"}`,e,{size:t})}const Qc=Symbol.for(\"_ethers_typed\");class eu{type;value;#b;_typedSymbol;constructor(e,t,r,n){null==n&&(n=null),Go(Jc,e,\"Typed\"),ko(this,{_typedSymbol:Qc,type:t,value:r}),this.#b=n,this.format()}format(){if(\"array\"===this.type)throw new Error(\"\");if(\"dynamicArray\"===this.type)throw new Error(\"\");return\"tuple\"===this.type?`tuple(${this.value.map(e=>e.format()).join(\",\")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith(\"bytes\")}isString(){return\"string\"===this.type}get tupleName(){if(\"tuple\"!==this.type)throw TypeError(\"not a tuple\");return this.#b}get arrayLength(){if(\"array\"!==this.type)throw TypeError(\"not an array\");return!0===this.#b?-1:!1===this.#b?this.value.length:null}static from(e,t){return new eu(Jc,e,t)}static uint8(e){return Yc(e,8)}static uint16(e){return Yc(e,16)}static uint24(e){return Yc(e,24)}static uint32(e){return Yc(e,32)}static uint40(e){return Yc(e,40)}static uint48(e){return Yc(e,48)}static uint56(e){return Yc(e,56)}static uint64(e){return Yc(e,64)}static uint72(e){return Yc(e,72)}static uint80(e){return Yc(e,80)}static uint88(e){return Yc(e,88)}static uint96(e){return Yc(e,96)}static uint104(e){return Yc(e,104)}static uint112(e){return Yc(e,112)}static uint120(e){return Yc(e,120)}static uint128(e){return Yc(e,128)}static uint136(e){return Yc(e,136)}static uint144(e){return Yc(e,144)}static uint152(e){return Yc(e,152)}static uint160(e){return Yc(e,160)}static uint168(e){return Yc(e,168)}static uint176(e){return Yc(e,176)}static uint184(e){return Yc(e,184)}static uint192(e){return Yc(e,192)}static uint200(e){return Yc(e,200)}static uint208(e){return Yc(e,208)}static uint216(e){return Yc(e,216)}static uint224(e){return Yc(e,224)}static uint232(e){return Yc(e,232)}static uint240(e){return Yc(e,240)}static uint248(e){return Yc(e,248)}static uint256(e){return Yc(e,256)}static uint(e){return Yc(e,256)}static int8(e){return Yc(e,-8)}static int16(e){return Yc(e,-16)}static int24(e){return Yc(e,-24)}static int32(e){return Yc(e,-32)}static int40(e){return Yc(e,-40)}static int48(e){return Yc(e,-48)}static int56(e){return Yc(e,-56)}static int64(e){return Yc(e,-64)}static int72(e){return Yc(e,-72)}static int80(e){return Yc(e,-80)}static int88(e){return Yc(e,-88)}static int96(e){return Yc(e,-96)}static int104(e){return Yc(e,-104)}static int112(e){return Yc(e,-112)}static int120(e){return Yc(e,-120)}static int128(e){return Yc(e,-128)}static int136(e){return Yc(e,-136)}static int144(e){return Yc(e,-144)}static int152(e){return Yc(e,-152)}static int160(e){return Yc(e,-160)}static int168(e){return Yc(e,-168)}static int176(e){return Yc(e,-176)}static int184(e){return Yc(e,-184)}static int192(e){return Yc(e,-192)}static int200(e){return Yc(e,-200)}static int208(e){return Yc(e,-208)}static int216(e){return Yc(e,-216)}static int224(e){return Yc(e,-224)}static int232(e){return Yc(e,-232)}static int240(e){return Yc(e,-240)}static int248(e){return Yc(e,-248)}static int256(e){return Yc(e,-256)}static int(e){return Yc(e,-256)}static bytes1(e){return Xc(e,1)}static bytes2(e){return Xc(e,2)}static bytes3(e){return Xc(e,3)}static bytes4(e){return Xc(e,4)}static bytes5(e){return Xc(e,5)}static bytes6(e){return Xc(e,6)}static bytes7(e){return Xc(e,7)}static bytes8(e){return Xc(e,8)}static bytes9(e){return Xc(e,9)}static bytes10(e){return Xc(e,10)}static bytes11(e){return Xc(e,11)}static bytes12(e){return Xc(e,12)}static bytes13(e){return Xc(e,13)}static bytes14(e){return Xc(e,14)}static bytes15(e){return Xc(e,15)}static bytes16(e){return Xc(e,16)}static bytes17(e){return Xc(e,17)}static bytes18(e){return Xc(e,18)}static bytes19(e){return Xc(e,19)}static bytes20(e){return Xc(e,20)}static bytes21(e){return Xc(e,21)}static bytes22(e){return Xc(e,22)}static bytes23(e){return Xc(e,23)}static bytes24(e){return Xc(e,24)}static bytes25(e){return Xc(e,25)}static bytes26(e){return Xc(e,26)}static bytes27(e){return Xc(e,27)}static bytes28(e){return Xc(e,28)}static bytes29(e){return Xc(e,29)}static bytes30(e){return Xc(e,30)}static bytes31(e){return Xc(e,31)}static bytes32(e){return Xc(e,32)}static address(e){return new eu(Jc,\"address\",e)}static bool(e){return new eu(Jc,\"bool\",!!e)}static bytes(e){return new eu(Jc,\"bytes\",e)}static string(e){return new eu(Jc,\"string\",e)}static array(e,t){throw new Error(\"not implemented yet\")}static tuple(e,t){throw new Error(\"not implemented yet\")}static overrides(e){return new eu(Jc,\"overrides\",Object.assign({},e))}static isTyped(e){return e&&\"object\"==typeof e&&\"_typedSymbol\"in e&&e._typedSymbol===Qc}static dereference(e,t){if(eu.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}class tu extends Kc{constructor(e){super(\"address\",\"address\",e,!1)}defaultValue(){return\"0x0000000000000000000000000000000000000000\"}encode(e,t){let r=eu.dereference(t,\"string\");try{r=Ri(r)}catch(e){return this._throwError(e.message,t)}return e.writeValue(r)}decode(e){return Ri(hs(e.readValue(),20))}}class ru extends Kc{coder;constructor(e){super(e.name,e.type,\"_\",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}function nu(e,t,r){let n=[];if(Array.isArray(r))n=r;else if(r&&\"object\"==typeof r){let e={};n=t.map(t=>{const n=t.localName;return Lo(n,\"cannot encode object for signature with missing names\",\"INVALID_ARGUMENT\",{argument:\"values\",info:{coder:t},value:r}),Lo(!e[n],\"cannot encode object for signature with duplicate names\",\"INVALID_ARGUMENT\",{argument:\"values\",info:{coder:t},value:r}),e[n]=!0,r[n]})}else $o(!1,\"invalid tuple value\",\"tuple\",r);$o(t.length===n.length,\"types/value length mismatch\",\"tuple\",r);let o=new qc,s=new qc,a=[];t.forEach((e,t)=>{let r=n[t];if(e.dynamic){let t=s.length;e.encode(s,r);let n=o.writeUpdatableValue();a.push(e=>{n(e+t)})}else e.encode(o,r)}),a.forEach(e=>{e(o.length)});let i=e.appendWriter(o);return i+=e.appendWriter(s),i}function ou(e,t){let r=[],n=[],o=e.subReader(0);return t.forEach(t=>{let s=null;if(t.dynamic){let r=e.readIndex(),n=o.subReader(r);try{s=t.decode(n)}catch(e){if(Uo(e,\"BUFFER_OVERRUN\"))throw e;s=e,s.baseType=t.name,s.name=t.localName,s.type=t.type}}else try{s=t.decode(e)}catch(e){if(Uo(e,\"BUFFER_OVERRUN\"))throw e;s=e,s.baseType=t.name,s.name=t.localName,s.type=t.type}if(null==s)throw new Error(\"investigate\");r.push(s),n.push(t.localName||null)}),Gc.fromItems(r,n)}class su extends Kc{coder;length;constructor(e,t,r){super(\"array\",e.type+\"[\"+(t>=0?t:\"\")+\"]\",r,-1===t||e.dynamic),ko(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){const r=eu.dereference(t,\"array\");Array.isArray(r)||this._throwError(\"expected array value\",r);let n=this.length;-1===n&&(n=r.length,e.writeValue(r.length)),zo(r.length,n,\"coder array\"+(this.localName?\" \"+this.localName:\"\"));let o=[];for(let e=0;e<r.length;e++)o.push(this.coder);return nu(e,o,r)}decode(e){let t=this.length;-1===t&&(t=e.readIndex(),Lo(t*kc<=e.dataLength,\"insufficient data length\",\"BUFFER_OVERRUN\",{buffer:e.bytes,offset:t*kc,length:e.dataLength}));let r=[];for(let e=0;e<t;e++)r.push(new ru(this.coder));return ou(e,r)}}class au extends Kc{constructor(e){super(\"bool\",\"bool\",e,!1)}defaultValue(){return!1}encode(e,t){const r=eu.dereference(t,\"bool\");return e.writeValue(r?1:0)}decode(e){return!!e.readValue()}}class iu extends Kc{constructor(e,t){super(e,e,t,!0)}defaultValue(){return\"0x\"}encode(e,t){t=qo(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readIndex(),!0)}}class cu extends iu{constructor(e){super(\"bytes\",e)}decode(e){return Xo(super.decode(e))}}class uu extends Kc{size;constructor(e,t){let r=\"bytes\"+String(e);super(r,r,t,!1),ko(this,{size:e},{size:\"number\"})}defaultValue(){return\"0x0000000000000000000000000000000000000000000000000000000000000000\".substring(0,2+2*this.size)}encode(e,t){let r=qo(eu.dereference(t,this.type));return r.length!==this.size&&this._throwError(\"incorrect data length\",t),e.writeBytes(r)}decode(e){return Xo(e.readBytes(this.size))}}const lu=new Uint8Array([]);class du extends Kc{constructor(e){super(\"null\",\"\",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError(\"not null\",t),e.writeBytes(lu)}decode(e){return e.readBytes(0),null}}const fu=BigInt(0),pu=BigInt(1),hu=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");class gu extends Kc{size;signed;constructor(e,t,r){const n=(t?\"int\":\"uint\")+8*e;super(n,n,r,!1),ko(this,{size:e,signed:t},{size:\"number\",signed:\"boolean\"})}defaultValue(){return 0}encode(e,t){let r=us(eu.dereference(t,this.type)),n=cs(hu,256);if(this.signed){let e=cs(n,8*this.size-1);(r>e||r<-(e+pu))&&this._throwError(\"value out-of-bounds\",t),r=is(r,256)}else(r<fu||r>cs(n,8*this.size))&&this._throwError(\"value out-of-bounds\",t);return e.writeValue(r)}decode(e){let t=cs(e.readValue(),8*this.size);return this.signed&&(t=function(e,t){const r=ls(e,\"value\"),n=BigInt(ps(t,\"width\"));if(Lo(r>>n===os,\"overflow\",\"NUMERIC_FAULT\",{operation:\"fromTwos\",fault:\"overflow\",value:e}),r>>n-ss)return-((~r&(ss<<n)-ss)+ss);return r}(t,8*this.size)),t}}class yu extends iu{constructor(e){super(\"string\",e)}defaultValue(){return\"\"}encode(e,t){return super.encode(e,Na(eu.dereference(t,\"string\")))}decode(e){return Ua(super.decode(e))}}class mu extends Kc{coders;constructor(e,t){let r=!1;const n=[];e.forEach(e=>{e.dynamic&&(r=!0),n.push(e.type)});super(\"tuple\",\"tuple(\"+n.join(\",\")+\")\",t,r),ko(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach(t=>{e.push(t.defaultValue())});const t=this.coders.reduce((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e},{});return this.coders.forEach((r,n)=>{let o=r.localName;o&&1===t[o]&&(\"length\"===o&&(o=\"_length\"),null==e[o]&&(e[o]=e[n]))}),Object.freeze(e)}encode(e,t){const r=eu.dereference(t,\"tuple\");return nu(e,this.coders,r)}decode(e){return ou(e,this.coders)}}function bu(e){const t=new Set;return e.forEach(e=>t.add(e)),Object.freeze(t)}bu(\"external public payable override\".split(\" \"));const wu=\"constant external internal payable private public pure view override\",Tu=(bu(wu.split(\" \")),\"constructor error event fallback function receive struct\"),Au=(bu(Tu.split(\" \")),\"calldata memory storage payable indexed\"),vu=bu(Au.split(\" \")),Pu=bu([Tu,Au,\"tuple returns\",wu].join(\" \").split(\" \")),Eu={\"(\":\"OPEN_PAREN\",\")\":\"CLOSE_PAREN\",\"[\":\"OPEN_BRACKET\",\"]\":\"CLOSE_BRACKET\",\",\":\"COMMA\",\"@\":\"AT\"},Cu=new RegExp(\"^(\\\\s*)\"),Bu=new RegExp(\"^([0-9]+)\"),Wu=new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)\"),Su=new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)$\"),Iu=new RegExp(\"^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$\");class _u{#f;#w;get offset(){return this.#f}get length(){return this.#w.length-this.#f}constructor(e){this.#f=0,this.#w=e.slice()}clone(){return new _u(this.#w)}reset(){this.#f=0}#T(e=0,t=0){return new _u(this.#w.slice(e,t).map(t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e}))))}popKeyword(e){const t=this.peek();if(\"KEYWORD\"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(\"OPEN_PAREN\"!==e.type)throw new Error(\"bad start\");const t=this.#T(this.#f+1,e.match+1);return this.#f=e.match+1,t}popParams(){const e=this.peek();if(\"OPEN_PAREN\"!==e.type)throw new Error(\"bad start\");const t=[];for(;this.#f<e.match-1;){const e=this.peek().linkNext;t.push(this.#T(this.#f+1,e)),this.#f=e}return this.#f=e.match+1,t}peek(){if(this.#f>=this.#w.length)throw new Error(\"out-of-bounds\");return this.#w[this.#f]}peekKeyword(e){const t=this.peekType(\"KEYWORD\");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#f++,e}toString(){const e=[];for(let t=this.#f;t<this.#w.length;t++){const r=this.#w[t];e.push(`${r.type}:${r.text}`)}return`<TokenString ${e.join(\" \")}>`}}function Ru(e){const t=[],r=t=>{const r=s<e.length?JSON.stringify(e[s]):\"$EOI\";throw new Error(`invalid token ${r} at ${s}: ${t}`)};let n=[],o=[],s=0;for(;s<e.length;){let a=e.substring(s),i=a.match(Cu);i&&(s+=i[1].length,a=e.substring(s));const c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:\"\",text:\"\",offset:s,value:-1};t.push(c);let u=Eu[a[0]]||\"\";if(u){if(c.type=u,c.text=a[0],s++,\"OPEN_PAREN\"===u)n.push(t.length-1),o.push(t.length-1);else if(\"CLOSE_PAREN\"==u)0===n.length&&r(\"no matching open bracket\"),c.match=n.pop(),t[c.match].match=t.length-1,c.depth--,c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1;else if(\"COMMA\"===u)c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1,o.push(t.length-1);else if(\"OPEN_BRACKET\"===u)c.type=\"BRACKET\";else if(\"CLOSE_BRACKET\"===u){let e=t.pop().text;if(t.length>0&&\"NUMBER\"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=ps(r)}if(0===t.length||\"BRACKET\"!==t[t.length-1].type)throw new Error(\"missing opening bracket\");t[t.length-1].text+=e}}else if(i=a.match(Wu),i){if(c.text=i[1],s+=c.text.length,Pu.has(c.text)){c.type=\"KEYWORD\";continue}if(c.text.match(Iu)){c.type=\"TYPE\";continue}c.type=\"ID\"}else{if(i=a.match(Bu),!i)throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${s}`);c.text=i[1],c.type=\"NUMBER\",s+=c.text.length}}return new _u(t.map(e=>Object.freeze(e)))}function xu(e,t){const r=new Set;for(;;){const n=e.peekType(\"KEYWORD\");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}const Ou=new RegExp(/^(.*)\\[([0-9]*)\\]$/);function Mu(e){const t=e.match(Iu);if($o(t,\"invalid type\",\"type\",e),\"uint\"===e)return\"uint256\";if(\"int\"===e)return\"int256\";if(t[2]){const r=parseInt(t[2]);$o(0!==r&&r<=32,\"invalid bytes length\",\"type\",e)}else if(t[3]){const r=parseInt(t[3]);$o(0!==r&&r<=256&&r%8==0,\"invalid numeric width\",\"type\",e)}return e}const Fu={},ku=Symbol.for(\"_ethers_internal\"),Nu=\"_ParamTypeInternal\";class Uu{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,n,o,s,a,i){if(Go(e,Fu,\"ParamType\"),Object.defineProperty(this,ku,{value:Nu}),s&&(s=Object.freeze(s.slice())),\"array\"===n){if(null==a||null==i)throw new Error(\"\")}else if(null!=a||null!=i)throw new Error(\"\");if(\"tuple\"===n){if(null==s)throw new Error(\"\")}else if(null!=s)throw new Error(\"\");ko(this,{name:t,type:r,baseType:n,indexed:o,components:s,arrayLength:a,arrayChildren:i})}format(e){if(null==e&&(e=\"sighash\"),\"json\"===e){const t=this.name||\"\";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format(\"json\"));return e.name=t,e.type+=`[${this.arrayLength<0?\"\":String(this.arrayLength)}]`,JSON.stringify(e)}const r={type:\"tuple\"===this.baseType?\"tuple\":this.type,name:t};return\"boolean\"==typeof this.indexed&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(r)}let t=\"\";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?\"\":String(this.arrayLength)}]`):this.isTuple()?t+=\"(\"+this.components.map(t=>t.format(e)).join(\"full\"===e?\", \":\",\")+\")\":t+=this.type,\"sighash\"!==e&&(!0===this.indexed&&(t+=\" indexed\"),\"full\"===e&&this.name&&(t+=\" \"+this.name)),t}isArray(){return\"array\"===this.baseType}isTuple(){return\"tuple\"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error(\"invalid array value\");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error(\"array is wrong length\");const r=this;return e.map(e=>r.arrayChildren.walk(e,t))}if(this.isTuple()){if(!Array.isArray(e))throw new Error(\"invalid tuple value\");if(e.length!==this.components.length)throw new Error(\"array is wrong length\");const r=this;return e.map((e,n)=>r.components[n].walk(e,t))}return t(this.type,e)}#A(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error(\"invalid array value\");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error(\"array is wrong length\");const o=this.arrayChildren,s=t.slice();return s.forEach((t,n)=>{o.#A(e,t,r,e=>{s[n]=e})}),void n(s)}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(t))s=t.slice();else{if(null==t||\"object\"!=typeof t)throw new Error(\"invalid tuple value\");s=o.map(e=>{if(!e.name)throw new Error(\"cannot use object value with unnamed components\");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]})}if(s.length!==this.components.length)throw new Error(\"array is wrong length\");return s.forEach((t,n)=>{o[n].#A(e,t,r,e=>{s[n]=e})}),void n(s)}const o=r(this.type,t);o.then?e.push(async function(){n(await o)}()):n(o)}async walkAsync(e,t){const r=[],n=[e];return this.#A(r,e,t,e=>{n[0]=e}),r.length&&await Promise.all(r),n[0]}static from(e,t){if(Uu.isParamType(e))return e;if(\"string\"==typeof e)try{return Uu.from(Ru(e),t)}catch(t){$o(!1,\"invalid param type\",\"obj\",e)}else if(e instanceof _u){let r=\"\",n=\"\",o=null;xu(e,bu([\"tuple\"])).has(\"tuple\")||e.peekType(\"OPEN_PAREN\")?(n=\"tuple\",o=e.popParams().map(e=>Uu.from(e)),r=`tuple(${o.map(e=>e.format()).join(\",\")})`):(r=Mu(e.popType(\"TYPE\")),n=r);let s=null,a=null;for(;e.length&&e.peekType(\"BRACKET\");){const t=e.pop();s=new Uu(Fu,\"\",r,n,null,o,a,s),a=t.value,r+=t.text,n=\"array\",o=null}let i=null;if(xu(e,vu).has(\"indexed\")){if(!t)throw new Error(\"\");i=!0}const c=e.peekType(\"ID\")?e.pop().text:\"\";if(e.length)throw new Error(\"leftover tokens\");return new Uu(Fu,c,r,n,i,o,a,s)}const r=e.name;$o(!r||\"string\"==typeof r&&r.match(Su),\"invalid name\",\"obj.name\",r);let n=e.indexed;null!=n&&($o(t,\"parameter cannot be indexed\",\"obj.indexed\",e.indexed),n=!!n);let o=e.type,s=o.match(Ou);if(s){const t=parseInt(s[2]||\"-1\"),a=Uu.from({type:s[1],components:e.components});return new Uu(Fu,r||\"\",o,\"array\",n,null,t,a)}if(\"tuple\"===o||o.startsWith(\"tuple(\")||o.startsWith(\"(\")){const t=null!=e.components?e.components.map(e=>Uu.from(e)):null;return new Uu(Fu,r||\"\",o,\"tuple\",n,t,null,null)}return o=Mu(e.type),new Uu(Fu,r||\"\",o,o,n,null,null,null)}static isParamType(e){return e&&e[ku]===Nu}}const Du=new Map;Du.set(0,\"GENERIC_PANIC\"),Du.set(1,\"ASSERT_FALSE\"),Du.set(17,\"OVERFLOW\"),Du.set(18,\"DIVIDE_BY_ZERO\"),Du.set(33,\"ENUM_RANGE_ERROR\"),Du.set(34,\"BAD_STORAGE_DATA\"),Du.set(49,\"STACK_UNDERFLOW\"),Du.set(50,\"ARRAY_RANGE_ERROR\"),Du.set(65,\"OUT_OF_MEMORY\"),Du.set(81,\"UNINITIALIZED_FUNCTION_CALL\");const Lu=new RegExp(/^bytes([0-9]*)$/),$u=new RegExp(/^(u?int)([0-9]*)$/);let zu=null,ju=1024;class Vu{#v(e){if(e.isArray())return new su(this.#v(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new mu(e.components.map(e=>this.#v(e)),e.name);switch(e.baseType){case\"address\":return new tu(e.name);case\"bool\":return new au(e.name);case\"string\":return new yu(e.name);case\"bytes\":return new cu(e.name);case\"\":return new du(e.name)}let t=e.type.match($u);if(t){let r=parseInt(t[2]||\"256\");return $o(0!==r&&r<=256&&r%8==0,\"invalid \"+t[1]+\" bit length\",\"param\",e),new gu(r/8,\"int\"===t[1],e.name)}if(t=e.type.match(Lu),t){let r=parseInt(t[1]);return $o(0!==r&&r<=32,\"invalid bytes length\",\"param\",e),new uu(r,e.name)}$o(!1,\"invalid type\",\"type\",e.type)}getDefaultValue(e){const t=e.map(e=>this.#v(Uu.from(e)));return new mu(t,\"_\").defaultValue()}encode(e,t){zo(t.length,e.length,\"types/values length mismatch\");const r=e.map(e=>this.#v(Uu.from(e))),n=new mu(r,\"_\"),o=new qc;return n.encode(o,t),o.data}decode(e,t,r){const n=e.map(e=>this.#v(Uu.from(e)));return new mu(n,\"_\").decode(new Zc(t,r,ju))}static _setDefaultMaxInflation(e){$o(\"number\"==typeof e&&Number.isInteger(e),\"invalid defaultMaxInflation factor\",\"value\",e),ju=e}static defaultAbiCoder(){return null==zu&&(zu=new Vu),zu}static getBuiltinCallException(e,t,r){return function(e,t,r,n){let o=\"missing revert data\",s=null,a=null;if(r){o=\"execution reverted\";const e=Ko(r);if(r=Xo(r),0===e.length)o+=\" (no data present; likely require(false) occurred\",s=\"require(false)\";else if(e.length%32!=4)o+=\" (could not decode reason; invalid data length)\";else if(\"0x08c379a0\"===Xo(e.slice(0,4)))try{s=n.decode([\"string\"],e.slice(4))[0],a={signature:\"Error(string)\",name:\"Error\",args:[s]},o+=`: ${JSON.stringify(s)}`}catch(e){o+=\" (could not decode reason; invalid string data)\"}else if(\"0x4e487b71\"===Xo(e.slice(0,4)))try{const t=Number(n.decode([\"uint256\"],e.slice(4))[0]);a={signature:\"Panic(uint256)\",name:\"Panic\",args:[t]},s=`Panic due to ${Du.get(t)||\"UNKNOWN\"}(${t})`,o+=`: ${s}`}catch(e){o+=\" (could not decode panic code)\"}else o+=\" (unknown custom error)\"}const i={to:t.to?Ri(t.to):null,data:t.data||\"0x\"};return t.from&&(i.from=Ri(t.from)),Do(o,\"CALL_EXCEPTION\",{action:e,data:r,reason:s,transaction:i,invocation:null,revert:a})}(e,t,r,Vu.defaultAbiCoder())}}const Gu=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Hu=Uint8Array.from({length:16},(e,t)=>t),Ku=Hu.map(e=>(9*e+5)%16);let qu=[Hu],Zu=[Ku];for(let e=0;e<4;e++)for(let t of[qu,Zu])t.push(t[e].map(e=>Gu[e]));const Ju=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),Yu=qu.map((e,t)=>e.map(e=>Ju[t][e])),Xu=Zu.map((e,t)=>e.map(e=>Ju[t][e])),Qu=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),el=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),tl=(e,t)=>e<<t|e>>>32-t;function rl(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}const nl=new Uint32Array(16);class ol extends Zs{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:r,h3:n,h4:o}=this;return[e,t,r,n,o]}set(e,t,r,n,o){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)nl[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,o=0|this.h1,s=o,a=0|this.h2,i=a,c=0|this.h3,u=c,l=0|this.h4,d=l;for(let e=0;e<5;e++){const t=4-e,f=Qu[e],p=el[e],h=qu[e],g=Zu[e],y=Yu[e],m=Xu[e];for(let t=0;t<16;t++){const n=tl(r+rl(e,o,a,c)+nl[h[t]]+f,y[t])+l|0;r=l,l=c,c=0|tl(a,10),a=o,o=n}for(let e=0;e<16;e++){const r=tl(n+rl(t,s,i,u)+nl[g[e]]+p,m[e])+d|0;n=d,d=u,u=0|tl(i,10),i=s,s=r}}this.set(this.h1+a+u|0,this.h2+c+d|0,this.h3+l+n|0,this.h4+r+s|0,this.h0+o+i|0)}roundClean(){nl.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const sl=zs(()=>new ol);let al=!1;const il=function(e){return sl(e)};let cl=il;function ul(e){const t=Ko(e,\"data\");return Xo(cl(t))}ul._=il,ul.lock=function(){al=!0},ul.register=function(e){if(al)throw new TypeError(\"ripemd160 is locked\");cl=e},Object.freeze(ul);let ll=!1;const dl=function(e){return new Uint8Array(function(e){Lo(null!=Ta,\"platform does not support secure random numbers\",\"UNSUPPORTED_OPERATION\",{operation:\"randomBytes\"}),$o(Number.isInteger(e)&&e>0&&e<=1024,\"invalid length\",\"length\",e);const t=new Uint8Array(e);return Ta.getRandomValues(t),t}(e))};let fl=dl;function pl(e){return fl(e)}async function hl(e,t){const r=await t;return null!=r&&\"0x0000000000000000000000000000000000000000\"!==r||(Lo(\"string\"!=typeof e,\"unconfigured name\",\"UNCONFIGURED_NAME\",{value:e}),$o(!1,\"invalid AddressLike value; did not resolve to a value address\",\"target\",e)),Ri(r)}function gl(e,t){return\"string\"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?Ri(e):(Lo(null!=t,\"ENS resolution requires a provider\",\"UNSUPPORTED_OPERATION\",{operation:\"resolveName\"}),hl(e,t.resolveName(e))):(r=e)&&\"function\"==typeof r.getAddress?hl(e,e.getAddress()):e&&\"function\"==typeof e.then?hl(e,e):void $o(!1,\"unsupported addressable value\",\"target\",e);var r}pl._=dl,pl.lock=function(){ll=!0},pl.register=function(e){if(ll)throw new Error(\"randomBytes is locked\");fl=e},Object.freeze(pl);const yl=\"0x0000000000000000000000000000000000000000\";function ml(e){let t=e.toString(16);for(;t.length<2;)t=\"0\"+t;return\"0x\"+t}function bl(e,t,r){let n=0;for(let o=0;o<r;o++)n=256*n+e[t+o];return n}function wl(e,t,r,n){const o=[];for(;r<t+1+n;){const s=Tl(e,r);o.push(s.result),Lo((r+=s.consumed)<=t+1+n,\"child data too short\",\"BUFFER_OVERRUN\",{buffer:e,length:n,offset:t})}return{consumed:1+n,result:o}}function Tl(e,t){Lo(0!==e.length,\"data too short\",\"BUFFER_OVERRUN\",{buffer:e,length:0,offset:1});const r=t=>{Lo(t<=e.length,\"data short segment too short\",\"BUFFER_OVERRUN\",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){const n=e[t]-247;r(t+1+n);const o=bl(e,t+1,n);return r(t+1+n+o),wl(e,t,t+1+n,n+o)}if(e[t]>=192){const n=e[t]-192;return r(t+1+n),wl(e,t,t+1,n)}if(e[t]>=184){const n=e[t]-183;r(t+1+n);const o=bl(e,t+1,n);r(t+1+n+o);return{consumed:1+n+o,result:Xo(e.slice(t+1+n,t+1+n+o))}}if(e[t]>=128){const n=e[t]-128;r(t+1+n);return{consumed:1+n,result:Xo(e.slice(t+1,t+1+n))}}return{consumed:1,result:ml(e[t])}}function Al(e){const t=Ko(e,\"data\"),r=Tl(t,0);return $o(r.consumed===t.length,\"unexpected junk after rlp payload\",\"data\",e),r.result}function vl(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function Pl(e){if(Array.isArray(e)){let t=[];if(e.forEach(function(e){t=t.concat(Pl(e))}),t.length<=55)return t.unshift(192+t.length),t;const r=vl(t.length);return r.unshift(247+r.length),r.concat(t)}const t=Array.prototype.slice.call(Ko(e,\"object\"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=vl(t.length);return r.unshift(183+r.length),r.concat(t)}const El=\"0123456789abcdef\";function Cl(e){let t=\"0x\";for(const r of Pl(e))t+=El[r>>4],t+=El[15&r];return t}function Bl(e,t){return{address:Ri(e),storageKeys:t.map((e,t)=>($o(Zo(e,32),\"invalid slot\",`storageKeys[${t}]`,e),e.toLowerCase()))}}function Wl(e){if(Array.isArray(e))return e.map((t,r)=>Array.isArray(t)?($o(2===t.length,\"invalid slot set\",`value[${r}]`,t),Bl(t[0],t[1])):($o(null!=t&&\"object\"==typeof t,\"invalid address-slot set\",\"value\",e),Bl(t.address,t.storageKeys)));$o(null!=e&&\"object\"==typeof e,\"invalid access list\",\"value\",e);const t=Object.keys(e).map(t=>{const r=e[t].reduce((e,t)=>(e[t]=!0,e),{});return Bl(t,Object.keys(r).sort())});return t.sort((e,t)=>e.address.localeCompare(t.address)),t}const Sl=BigInt(0),Il=BigInt(2),_l=BigInt(27),Rl=BigInt(28),xl=BigInt(35),Ol=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),Ml=131072;function Fl(e,t){let r=e.toString(16);for(;r.length<2;)r=\"0\"+r;return r+=Sa(t).substring(4),\"0x\"+r}function kl(e){return\"0x\"===e?null:Ri(e)}function Nl(e,t){try{return Wl(e)}catch(r){$o(!1,r.message,t,e)}}function Ul(e,t){return\"0x\"===e?0:ps(e,t)}function Dl(e,t){if(\"0x\"===e)return Sl;const r=us(e,t);return $o(r<=Ol,\"value exceeds uint size\",t,r),r}function Ll(e,t){const r=us(e,\"value\"),n=gs(r);return $o(n.length<=32,\"value too large\",`tx.${t}`,r),n}function $l(e){return Wl(e).map(e=>[e.address,e.storageKeys])}function zl(e,t){$o(Array.isArray(e),`invalid ${t}`,\"value\",e);for(let t=0;t<e.length;t++)$o(Zo(e[t],32),\"invalid ${ param } hash\",`value[${t}]`,e[t]);return e}function jl(e,t){let r;try{if(r=Ul(t[0],\"yParity\"),0!==r&&1!==r)throw new Error(\"bad yParity\")}catch(e){$o(!1,\"invalid yParity\",\"yParity\",t[0])}const n=ns(t[1],32),o=ns(t[2],32),s=Cs.from({r:n,s:o,yParity:r});e.signature=s}class Vl{#P;#E;#o;#C;#B;#W;#S;#I;#_;#R;#x;#O;#M;#F;#k;#N;get type(){return this.#P}set type(e){switch(e){case null:this.#P=null;break;case 0:case\"legacy\":this.#P=0;break;case 1:case\"berlin\":case\"eip-2930\":this.#P=1;break;case 2:case\"london\":case\"eip-1559\":this.#P=2;break;case 3:case\"cancun\":case\"eip-4844\":this.#P=3;break;default:$o(!1,\"unsupported transaction type\",\"type\",e)}}get typeName(){switch(this.type){case 0:return\"legacy\";case 1:return\"eip-2930\";case 2:return\"eip-1559\";case 3:return\"eip-4844\"}return null}get to(){const e=this.#E;return null==e&&3===this.type?yl:e}set to(e){this.#E=null==e?null:Ri(e)}get nonce(){return this.#C}set nonce(e){this.#C=ps(e,\"value\")}get gasLimit(){return this.#B}set gasLimit(e){this.#B=us(e)}get gasPrice(){const e=this.#W;return null!=e||0!==this.type&&1!==this.type?e:Sl}set gasPrice(e){this.#W=null==e?null:us(e,\"gasPrice\")}get maxPriorityFeePerGas(){const e=this.#S;return null==e?2===this.type||3===this.type?Sl:null:e}set maxPriorityFeePerGas(e){this.#S=null==e?null:us(e,\"maxPriorityFeePerGas\")}get maxFeePerGas(){const e=this.#I;return null==e?2===this.type||3===this.type?Sl:null:e}set maxFeePerGas(e){this.#I=null==e?null:us(e,\"maxFeePerGas\")}get data(){return this.#o}set data(e){this.#o=Xo(e)}get value(){return this.#_}set value(e){this.#_=us(e,\"value\")}get chainId(){return this.#R}set chainId(e){this.#R=us(e)}get signature(){return this.#x||null}set signature(e){this.#x=null==e?null:Cs.from(e)}get accessList(){const e=this.#O||null;return null==e?1===this.type||2===this.type||3===this.type?[]:null:e}set accessList(e){this.#O=null==e?null:Wl(e)}get maxFeePerBlobGas(){const e=this.#M;return null==e&&3===this.type?Sl:e}set maxFeePerBlobGas(e){this.#M=null==e?null:us(e,\"maxFeePerBlobGas\")}get blobVersionedHashes(){let e=this.#F;return null==e&&3===this.type?[]:e}set blobVersionedHashes(e){if(null!=e){$o(Array.isArray(e),\"blobVersionedHashes must be an Array\",\"value\",e),e=e.slice();for(let t=0;t<e.length;t++)$o(Zo(e[t],32),\"invalid blobVersionedHash\",`value[${t}]`,e[t])}this.#F=e}get blobs(){return null==this.#N?null:this.#N.map(e=>Object.assign({},e))}set blobs(e){if(null==e)return void(this.#N=null);const t=[],r=[];for(let n=0;n<e.length;n++){const o=e[n];if(Jo(o)){Lo(this.#k,\"adding a raw blob requires a KZG library\",\"UNSUPPORTED_OPERATION\",{operation:\"set blobs()\"});let e=Ko(o);if($o(e.length<=Ml,\"blob is too large\",`blobs[${n}]`,o),e.length!==Ml){const t=new Uint8Array(Ml);t.set(e),e=t}const s=this.#k.blobToKzgCommitment(e),a=Xo(this.#k.computeBlobKzgProof(e,s));t.push({data:Xo(e),commitment:Xo(s),proof:a}),r.push(Fl(1,s))}else{const e=Xo(o.commitment);t.push({data:Xo(o.data),commitment:e,proof:Xo(o.proof)}),r.push(Fl(1,e))}}this.#N=t,this.#F=r}get kzg(){return this.#k}set kzg(e){this.#k=e}constructor(){this.#P=null,this.#E=null,this.#C=0,this.#B=Sl,this.#W=null,this.#S=null,this.#I=null,this.#o=\"0x\",this.#_=Sl,this.#R=Sl,this.#x=null,this.#O=null,this.#M=null,this.#F=null,this.#N=null,this.#k=null}get hash(){return null==this.signature?null:oi(this.#U(!0,!1))}get unsignedHash(){return oi(this.unsignedSerialized)}get from(){return null==this.signature?null:Fc(this.unsignedHash,this.signature)}get fromPublicKey(){return null==this.signature?null:Oc.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return null!=this.signature}#U(e,t){Lo(!e||null!=this.signature,\"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized\",\"UNSUPPORTED_OPERATION\",{operation:\".serialized\"});const r=e?this.signature:null;switch(this.inferType()){case 0:return function(e,t){const r=[Ll(e.nonce,\"nonce\"),Ll(e.gasPrice||0,\"gasPrice\"),Ll(e.gasLimit,\"gasLimit\"),e.to||\"0x\",Ll(e.value,\"value\"),e.data];let n=Sl;if(e.chainId!=Sl)n=us(e.chainId,\"tx.chainId\"),$o(!t||null==t.networkV||t.legacyChainId===n,\"tx.chainId/sig.v mismatch\",\"sig\",t);else if(e.signature){const t=e.signature.legacyChainId;null!=t&&(n=t)}if(!t)return n!==Sl&&(r.push(gs(n)),r.push(\"0x\"),r.push(\"0x\")),Cl(r);let o=BigInt(27+t.yParity);return n!==Sl?o=Cs.getChainIdV(n,t.v):BigInt(t.v)!==o&&$o(!1,\"tx.chainId/sig.v mismatch\",\"sig\",t),r.push(gs(o)),r.push(gs(t.r)),r.push(gs(t.s)),Cl(r)}(this,r);case 1:return function(e,t){const r=[Ll(e.chainId,\"chainId\"),Ll(e.nonce,\"nonce\"),Ll(e.gasPrice||0,\"gasPrice\"),Ll(e.gasLimit,\"gasLimit\"),e.to||\"0x\",Ll(e.value,\"value\"),e.data,$l(e.accessList||[])];return t&&(r.push(Ll(t.yParity,\"recoveryParam\")),r.push(gs(t.r)),r.push(gs(t.s))),Qo([\"0x01\",Cl(r)])}(this,r);case 2:return function(e,t){const r=[Ll(e.chainId,\"chainId\"),Ll(e.nonce,\"nonce\"),Ll(e.maxPriorityFeePerGas||0,\"maxPriorityFeePerGas\"),Ll(e.maxFeePerGas||0,\"maxFeePerGas\"),Ll(e.gasLimit,\"gasLimit\"),e.to||\"0x\",Ll(e.value,\"value\"),e.data,$l(e.accessList||[])];return t&&(r.push(Ll(t.yParity,\"yParity\")),r.push(gs(t.r)),r.push(gs(t.s))),Qo([\"0x02\",Cl(r)])}(this,r);case 3:return function(e,t,r){const n=[Ll(e.chainId,\"chainId\"),Ll(e.nonce,\"nonce\"),Ll(e.maxPriorityFeePerGas||0,\"maxPriorityFeePerGas\"),Ll(e.maxFeePerGas||0,\"maxFeePerGas\"),Ll(e.gasLimit,\"gasLimit\"),e.to||yl,Ll(e.value,\"value\"),e.data,$l(e.accessList||[]),Ll(e.maxFeePerBlobGas||0,\"maxFeePerBlobGas\"),zl(e.blobVersionedHashes||[],\"blobVersionedHashes\")];return t&&(n.push(Ll(t.yParity,\"yParity\")),n.push(gs(t.r)),n.push(gs(t.s)),r)?Qo([\"0x03\",Cl([n,r.map(e=>e.data),r.map(e=>e.commitment),r.map(e=>e.proof)])]):Qo([\"0x03\",Cl(n)])}(this,r,t?this.blobs:null)}Lo(!1,\"unsupported transaction type\",\"UNSUPPORTED_OPERATION\",{operation:\".serialized\"})}get serialized(){return this.#U(!0,!0)}get unsignedSerialized(){return this.#U(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,r=null!=this.accessList,n=null!=this.#M||this.#F;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&Lo(this.maxFeePerGas>=this.maxPriorityFeePerGas,\"priorityFee cannot be more than maxFee\",\"BAD_DATA\",{value:this}),Lo(!t||0!==this.type&&1!==this.type,\"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas\",\"BAD_DATA\",{value:this}),Lo(0!==this.type||!r,\"legacy transaction cannot have accessList\",\"BAD_DATA\",{value:this});const o=[];return null!=this.type?o.push(this.type):t?o.push(2):e?(o.push(1),r||o.push(0)):r?(o.push(1),o.push(2)):(n&&this.to||(o.push(0),o.push(1),o.push(2)),o.push(3)),o.sort(),o}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return Vl.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new Vl;if(\"string\"==typeof e){const t=Ko(e);if(t[0]>=127)return Vl.from(function(e){const t=Al(e);$o(Array.isArray(t)&&(9===t.length||6===t.length),\"invalid field count for legacy transaction\",\"data\",e);const r={type:0,nonce:Ul(t[0],\"nonce\"),gasPrice:Dl(t[1],\"gasPrice\"),gasLimit:Dl(t[2],\"gasLimit\"),to:kl(t[3]),value:Dl(t[4],\"value\"),data:Xo(t[5]),chainId:Sl};if(6===t.length)return r;const n=Dl(t[6],\"v\"),o=Dl(t[7],\"r\"),s=Dl(t[8],\"s\");if(o===Sl&&s===Sl)r.chainId=n;else{let e=(n-xl)/Il;e<Sl&&(e=Sl),r.chainId=e,$o(e!==Sl||n===_l||n===Rl,\"non-canonical legacy v\",\"v\",t[6]),r.signature=Cs.from({r:ns(t[7],32),s:ns(t[8],32),v:n})}return r}(t));switch(t[0]){case 1:return Vl.from(function(e){const t=Al(Ko(e).slice(1));$o(Array.isArray(t)&&(8===t.length||11===t.length),\"invalid field count for transaction type: 1\",\"data\",Xo(e));const r={type:1,chainId:Dl(t[0],\"chainId\"),nonce:Ul(t[1],\"nonce\"),gasPrice:Dl(t[2],\"gasPrice\"),gasLimit:Dl(t[3],\"gasLimit\"),to:kl(t[4]),value:Dl(t[5],\"value\"),data:Xo(t[6]),accessList:Nl(t[7],\"accessList\")};return 8===t.length||jl(r,t.slice(8)),r}(t));case 2:return Vl.from(function(e){const t=Al(Ko(e).slice(1));$o(Array.isArray(t)&&(9===t.length||12===t.length),\"invalid field count for transaction type: 2\",\"data\",Xo(e));const r={type:2,chainId:Dl(t[0],\"chainId\"),nonce:Ul(t[1],\"nonce\"),maxPriorityFeePerGas:Dl(t[2],\"maxPriorityFeePerGas\"),maxFeePerGas:Dl(t[3],\"maxFeePerGas\"),gasPrice:null,gasLimit:Dl(t[4],\"gasLimit\"),to:kl(t[5]),value:Dl(t[6],\"value\"),data:Xo(t[7]),accessList:Nl(t[8],\"accessList\")};return 9===t.length||jl(r,t.slice(9)),r}(t));case 3:return Vl.from(function(e){let t=Al(Ko(e).slice(1)),r=\"3\",n=null;if(4===t.length&&Array.isArray(t[0])){r=\"3 (network format)\";const e=t[1],o=t[2],s=t[3];$o(Array.isArray(e),\"invalid network format: blobs not an array\",\"fields[1]\",e),$o(Array.isArray(o),\"invalid network format: commitments not an array\",\"fields[2]\",o),$o(Array.isArray(s),\"invalid network format: proofs not an array\",\"fields[3]\",s),$o(e.length===o.length,\"invalid network format: blobs/commitments length mismatch\",\"fields\",t),$o(e.length===s.length,\"invalid network format: blobs/proofs length mismatch\",\"fields\",t),n=[];for(let r=0;r<t[1].length;r++)n.push({data:e[r],commitment:o[r],proof:s[r]});t=t[0]}$o(Array.isArray(t)&&(11===t.length||14===t.length),`invalid field count for transaction type: ${r}`,\"data\",Xo(e));const o={type:3,chainId:Dl(t[0],\"chainId\"),nonce:Ul(t[1],\"nonce\"),maxPriorityFeePerGas:Dl(t[2],\"maxPriorityFeePerGas\"),maxFeePerGas:Dl(t[3],\"maxFeePerGas\"),gasPrice:null,gasLimit:Dl(t[4],\"gasLimit\"),to:kl(t[5]),value:Dl(t[6],\"value\"),data:Xo(t[7]),accessList:Nl(t[8],\"accessList\"),maxFeePerBlobGas:Dl(t[9],\"maxFeePerBlobGas\"),blobVersionedHashes:t[10]};n&&(o.blobs=n),$o(null!=o.to,`invalid address for transaction type: ${r}`,\"data\",e),$o(Array.isArray(o.blobVersionedHashes),\"invalid blobVersionedHashes: must be an array\",\"data\",e);for(let t=0;t<o.blobVersionedHashes.length;t++)$o(Zo(o.blobVersionedHashes[t],32),`invalid blobVersionedHash at index ${t}: must be length 32`,\"data\",e);return 11===t.length||jl(o,t.slice(11)),o}(t))}Lo(!1,\"unsupported transaction type\",\"UNSUPPORTED_OPERATION\",{operation:\"from\"})}const t=new Vl;return null!=e.type&&(t.type=e.type),null!=e.to&&(t.to=e.to),null!=e.nonce&&(t.nonce=e.nonce),null!=e.gasLimit&&(t.gasLimit=e.gasLimit),null!=e.gasPrice&&(t.gasPrice=e.gasPrice),null!=e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),null!=e.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null!=e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),null!=e.data&&(t.data=e.data),null!=e.value&&(t.value=e.value),null!=e.chainId&&(t.chainId=e.chainId),null!=e.signature&&(t.signature=Cs.from(e.signature)),null!=e.accessList&&(t.accessList=e.accessList),null!=e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),null!=e.kzg&&(t.kzg=e.kzg),null!=e.blobs&&(t.blobs=e.blobs),null!=e.hash&&($o(t.isSigned(),\"unsigned transaction cannot define '.hash'\",\"tx\",e),$o(t.hash===e.hash,\"hash mismatch\",\"tx\",e)),null!=e.from&&($o(t.isSigned(),\"unsigned transaction cannot define '.from'\",\"tx\",e),$o(t.from.toLowerCase()===(e.from||\"\").toLowerCase(),\"from mismatch\",\"tx\",e)),t}}BigInt(0);function Gl(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=Xo(e.data));const r=\"chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value\".split(/,/);for(const n of r)n in e&&null!=e[n]&&(t[n]=us(e[n],`request.${n}`));const n=\"type,nonce\".split(/,/);for(const r of n)r in e&&null!=e[r]&&(t[r]=ps(e[r],`request.${r}`));return e.accessList&&(t.accessList=Wl(e.accessList)),\"blockTag\"in e&&(t.blockTag=e.blockTag),\"enableCcipRead\"in e&&(t.enableCcipRead=!!e.enableCcipRead),\"customData\"in e&&(t.customData=e.customData),\"blobVersionedHashes\"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),\"kzg\"in e&&(t.kzg=e.kzg),\"blobs\"in e&&e.blobs&&(t.blobs=e.blobs.map(e=>Jo(e)?Xo(e):Object.assign({},e))),t}Symbol.iterator;Symbol.iterator;function Hl(e,t){if(e.provider)return e.provider;Lo(!1,\"missing provider\",\"UNSUPPORTED_OPERATION\",{operation:t})}async function Kl(e,t){let r=Gl(t);if(null!=r.to&&(r.to=gl(r.to,e)),null!=r.from){const t=r.from;r.from=Promise.all([e.getAddress(),gl(t,e)]).then(([e,t])=>($o(e.toLowerCase()===t.toLowerCase(),\"transaction from mismatch\",\"tx.from\",t),e))}else r.from=e.getAddress();return await Fo(r)}class ql{provider;constructor(e){ko(this,{provider:e||null})}async getNonce(e){return Hl(this,\"getTransactionCount\").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await Kl(this,e)}async populateTransaction(e){const t=Hl(this,\"populateTransaction\"),r=await Kl(this,e);null==r.nonce&&(r.nonce=await this.getNonce(\"pending\")),null==r.gasLimit&&(r.gasLimit=await this.estimateGas(r));const n=await this.provider.getNetwork();if(null!=r.chainId){$o(us(r.chainId)===n.chainId,\"transaction chainId mismatch\",\"tx.chainId\",e.chainId)}else r.chainId=n.chainId;const o=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas;if(null==r.gasPrice||2!==r.type&&!o?0!==r.type&&1!==r.type||!o||$o(!1,\"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\",\"tx\",e):$o(!1,\"eip-1559 transaction do not support gasPrice\",\"tx\",e),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas)if(0===r.type||1===r.type){const e=await t.getFeeData();Lo(null!=e.gasPrice,\"network does not support gasPrice\",\"UNSUPPORTED_OPERATION\",{operation:\"getGasPrice\"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice)}else{const e=await t.getFeeData();if(null==r.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(r.type=2,null!=r.gasPrice){const e=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=e,r.maxPriorityFeePerGas=e}else null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(Lo(!o,\"network does not support EIP-1559\",\"UNSUPPORTED_OPERATION\",{operation:\"populateTransaction\"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice),r.type=0):Lo(!1,\"failed to get consistent fee data\",\"UNSUPPORTED_OPERATION\",{operation:\"signer.getFeeData\"});else 2!==r.type&&3!==r.type||(null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else r.type=2;return await Fo(r)}async estimateGas(e){return Hl(this,\"estimateGas\").estimateGas(await this.populateCall(e))}async call(e){return Hl(this,\"call\").call(await this.populateCall(e))}async resolveName(e){const t=Hl(this,\"resolveName\");return await t.resolveName(e)}async sendTransaction(e){const t=Hl(this,\"sendTransaction\"),r=await this.populateTransaction(e);delete r.from;const n=Vl.from(r);return await t.broadcastTransaction(await this.signTransaction(n))}}class Zl extends ql{address;constructor(e,t){super(t),ko(this,{address:e})}async getAddress(){return this.address}connect(e){return new Zl(this.address,e)}#D(e,t){Lo(!1,`VoidSigner cannot sign ${e}`,\"UNSUPPORTED_OPERATION\",{operation:t})}async signTransaction(e){this.#D(\"transactions\",\"signTransaction\")}async signMessage(e){this.#D(\"messages\",\"signMessage\")}async signTypedData(e,t,r){this.#D(\"typed-data\",\"signTypedData\")}}const Jl=\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";let Yl=null;function Xl(e){if(null==Yl){Yl={};for(let e=0;e<58;e++)Yl[Jl[e]]=BigInt(e)}const t=Yl[e];return $o(null!=t,\"invalid base58 value\",\"letter\",e),t}const Ql=BigInt(0),ed=BigInt(58);function td(e){return\"string\"==typeof e&&(e=Na(e)),oi(Qo([Na(\"\u0019Ethereum Signed Message:\\n\"),Na(String(e.length)),e]))}const rd=new Uint8Array(32);rd.fill(0);const nd=BigInt(-1),od=BigInt(0),sd=BigInt(1),ad=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");const id=hs(sd,32),cd=hs(od,32),ud={name:\"string\",version:\"string\",chainId:\"uint256\",verifyingContract:\"address\",salt:\"bytes32\"},ld=[\"name\",\"version\",\"chainId\",\"verifyingContract\",\"salt\"];function dd(e){return function(t){return $o(\"string\"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const fd={name:dd(\"name\"),version:dd(\"version\"),chainId:function(e){const t=us(e,\"domain.chainId\");return $o(t>=0,\"invalid chain ID\",\"domain.chainId\",e),Number.isSafeInteger(t)?Number(t):ys(t)},verifyingContract:function(e){try{return Ri(e).toLowerCase()}catch(e){}$o(!1,'invalid domain value \"verifyingContract\"',\"domain.verifyingContract\",e)},salt:function(e){const t=Ko(e,\"domain.salt\");return $o(32===t.length,'invalid domain value \"salt\"',\"domain.salt\",e),Xo(t)}};function pd(e){{const t=e.match(/^(u?)int(\\d+)$/);if(t){const r=\"\"===t[1],n=parseInt(t[2]);$o(n%8==0&&0!==n&&n<=256&&t[2]===String(n),\"invalid numeric width\",\"type\",e);const o=cs(ad,r?n-1:n),s=r?(o+sd)*nd:od;return function(t){const n=us(t,\"value\");return $o(n>=s&&n<=o,`value out-of-bounds for ${e}`,\"value\",n),hs(r?is(n,256):n,32)}}}{const t=e.match(/^bytes(\\d+)$/);if(t){const r=parseInt(t[1]);return $o(0!==r&&r<=32&&t[1]===String(r),\"invalid bytes width\",\"type\",e),function(t){return $o(Ko(t).length===r,`invalid length for ${e}`,\"value\",t),function(e){const t=Ko(e),r=t.length%32;return r?Qo([t,rd.slice(r)]):Xo(t)}(t)}}}switch(e){case\"address\":return function(e){return ns(Ri(e),32)};case\"bool\":return function(e){return e?id:cd};case\"bytes\":return function(e){return oi(e)};case\"string\":return function(e){return si(e)}}return null}function hd(e,t){return`${e}(${t.map(({name:e,type:t})=>t+\" \"+e).join(\",\")})`}function gd(e){const t=e.match(/^([^\\x5b]*)((\\x5b\\d*\\x5d)*)(\\x5b(\\d*)\\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class yd{primaryType;#L;get types(){return JSON.parse(this.#L)}#$;#z;constructor(e){this.#$=new Map,this.#z=new Map;const t=new Map,r=new Map,n=new Map,o={};Object.keys(e).forEach(s=>{o[s]=e[s].map(({name:t,type:r})=>{let{base:n,index:o}=gd(r);return\"int\"!==n||e.int||(n=\"int256\"),\"uint\"!==n||e.uint||(n=\"uint256\"),{name:t,type:n+(o||\"\")}}),t.set(s,new Set),r.set(s,[]),n.set(s,new Set)}),this.#L=JSON.stringify(o);for(const n in o){const s=new Set;for(const a of o[n]){$o(!s.has(a.name),`duplicate variable name ${JSON.stringify(a.name)} in ${JSON.stringify(n)}`,\"types\",e),s.add(a.name);const o=gd(a.type).base;$o(o!==n,`circular type reference to ${JSON.stringify(o)}`,\"types\",e);pd(o)||($o(r.has(o),`unknown type ${JSON.stringify(o)}`,\"types\",e),r.get(o).push(n),t.get(n).add(o))}}const s=Array.from(r.keys()).filter(e=>0===r.get(e).length);$o(0!==s.length,\"missing primary type\",\"types\",e),$o(1===s.length,`ambiguous primary types or unused types: ${s.map(e=>JSON.stringify(e)).join(\", \")}`,\"types\",e),ko(this,{primaryType:s[0]}),function o(s,a){$o(!a.has(s),`circular type reference to ${JSON.stringify(s)}`,\"types\",e),a.add(s);for(const e of t.get(s))if(r.has(e)){o(e,a);for(const t of a)n.get(t).add(e)}a.delete(s)}(this.primaryType,new Set);for(const[e,t]of n){const r=Array.from(t);r.sort(),this.#$.set(e,hd(e,o[e])+r.map(e=>hd(e,o[e])).join(\"\"))}}getEncoder(e){let t=this.#z.get(e);return t||(t=this.#j(e),this.#z.set(e,t)),t}#j(e){{const t=pd(e);if(t)return t}const t=gd(e).array;if(t){const e=t.prefix,r=this.getEncoder(e);return n=>{$o(-1===t.count||t.count===n.length,`array length mismatch; expected length ${t.count}`,\"value\",n);let o=n.map(r);return this.#$.has(e)&&(o=o.map(oi)),oi(Qo(o))}}const r=this.types[e];if(r){const t=si(this.#$.get(e));return e=>{const n=r.map(({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this.#$.has(r)?oi(n):n});return n.unshift(t),Qo(n)}}$o(!1,`unknown type: ${e}`,\"type\",e)}encodeType(e){const t=this.#$.get(e);return $o(t,`unknown type: ${JSON.stringify(e)}`,\"name\",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return oi(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(pd(e))return r(e,t);const n=gd(e).array;if(n)return $o(-1===n.count||n.count===t.length,`array length mismatch; expected length ${n.count}`,\"value\",t),t.map(e=>this._visit(n.prefix,e,r));const o=this.types[e];if(o)return o.reduce((e,{name:n,type:o})=>(e[n]=this._visit(o,t[n],r),e),{});$o(!1,`unknown type: ${e}`,\"type\",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new yd(e)}static getPrimaryType(e){return yd.from(e).primaryType}static hashStruct(e,t,r){return yd.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=ud[r];$o(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,\"domain\",e),t.push({name:r,type:n})}return t.sort((e,t)=>ld.indexOf(e.name)-ld.indexOf(t.name)),yd.hashStruct(\"EIP712Domain\",{EIP712Domain:t},e)}static encode(e,t,r){return Qo([\"0x1901\",yd.hashDomain(e),yd.from(t).hash(r)])}static hash(e,t,r){return oi(yd.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const o={};e.verifyingContract&&!Zo(e.verifyingContract,20)&&(o[e.verifyingContract]=\"0x\");const s=yd.from(t);s.visit(r,(e,t)=>(\"address\"!==e||Zo(t,20)||(o[t]=\"0x\"),t));for(const e in o)o[e]=await n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),{domain:e,value:r=s.visit(r,(e,t)=>\"address\"===e&&o[t]?o[t]:t)}}static getPayload(e,t,r){yd.hashDomain(e);const n={},o=[];ld.forEach(t=>{const r=e[t];null!=r&&(n[t]=fd[t](r),o.push({name:t,type:ud[t]}))});const s=yd.from(t);t=s.types;const a=Object.assign({},t);return $o(null==a.EIP712Domain,\"types must not contain EIP712Domain type\",\"types.EIP712Domain\",t),a.EIP712Domain=o,s.encode(r),{types:a,domain:n,primaryType:s.primaryType,message:s.visit(r,(e,t)=>{if(e.match(/^bytes(\\d*)/))return Xo(Ko(t));if(e.match(/^u?int/))return us(t).toString();switch(e){case\"address\":return t.toLowerCase();case\"bool\":return!!t;case\"string\":return $o(\"string\"==typeof t,\"invalid string\",\"value\",t),t}$o(!1,\"unsupported type\",\"type\",e)})}}}class md extends ql{address;#V;constructor(e,t){super(t),$o(e&&\"function\"==typeof e.sign,\"invalid private key\",\"privateKey\",\"[ REDACTED ]\"),this.#V=e;ko(this,{address:Mc(this.signingKey.publicKey)})}get signingKey(){return this.#V}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new md(this.#V,e)}async signTransaction(e){e=Gl(e);const{to:t,from:r}=await Fo({to:e.to?gl(e.to,this.provider):void 0,from:e.from?gl(e.from,this.provider):void 0});null!=t&&(e.to=t),null!=r&&(e.from=r),null!=e.from&&($o(Ri(e.from)===this.address,\"transaction from address mismatch\",\"tx.from\",e.from),delete e.from);const n=Vl.from(e);return n.signature=this.signingKey.sign(n.unsignedHash),n.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign(td(e)).serialized}async signTypedData(e,t,r){const n=await yd.resolveNames(e,t,r,async e=>{Lo(null!=this.provider,\"cannot resolve ENS names without a provider\",\"UNSUPPORTED_OPERATION\",{operation:\"resolveName\",info:{name:e}});const t=await this.provider.resolveName(e);return Lo(null!=t,\"unconfigured ENS name\",\"UNCONFIGURED_NAME\",{value:e}),t});return this.signingKey.sign(yd.hash(n.domain,t,n.value)).serialized}}var bd,wd,Td,Ad=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)},vd=function(e,t,r,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!o:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(e,r):o?o.value=r:t.set(e,r),r};const Pd={16:10,24:12,32:14},Ed=[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],Cd=[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],Bd=[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],Wd=[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],Sd=[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],Id=[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],_d=[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],Rd=[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],xd=[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],Od=[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],Md=[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],Fd=[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],kd=[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],Nd=[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],Ud=[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 Dd(e){const t=[];for(let r=0;r<e.length;r+=4)t.push(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]);return t}class Ld{get key(){return Ad(this,bd,\"f\").slice()}constructor(e){if(bd.set(this,void 0),wd.set(this,void 0),Td.set(this,void 0),!(this instanceof Ld))throw Error(\"AES must be instanitated with `new`\");vd(this,bd,new Uint8Array(e),\"f\");const t=Pd[this.key.length];if(null==t)throw new TypeError(\"invalid key size (must be 16, 24 or 32 bytes)\");vd(this,Td,[],\"f\"),vd(this,wd,[],\"f\");for(let e=0;e<=t;e++)Ad(this,Td,\"f\").push([0,0,0,0]),Ad(this,wd,\"f\").push([0,0,0,0]);const r=4*(t+1),n=this.key.length/4,o=Dd(this.key);let s;for(let e=0;e<n;e++)s=e>>2,Ad(this,Td,\"f\")[s][e%4]=o[e],Ad(this,wd,\"f\")[t-s][e%4]=o[e];let a,i=0,c=n;for(;c<r;){if(a=o[n-1],o[0]^=Cd[a>>16&255]<<24^Cd[a>>8&255]<<16^Cd[255&a]<<8^Cd[a>>24&255]^Ed[i]<<24,i+=1,8!=n)for(let e=1;e<n;e++)o[e]^=o[e-1];else{for(let e=1;e<n/2;e++)o[e]^=o[e-1];a=o[n/2-1],o[n/2]^=Cd[255&a]^Cd[a>>8&255]<<8^Cd[a>>16&255]<<16^Cd[a>>24&255]<<24;for(let e=n/2+1;e<n;e++)o[e]^=o[e-1]}let e,s,u=0;for(;u<n&&c<r;)e=c>>2,s=c%4,Ad(this,Td,\"f\")[e][s]=o[u],Ad(this,wd,\"f\")[t-e][s]=o[u++],c++}for(let e=1;e<t;e++)for(let t=0;t<4;t++)a=Ad(this,wd,\"f\")[e][t],Ad(this,wd,\"f\")[e][t]=Fd[a>>24&255]^kd[a>>16&255]^Nd[a>>8&255]^Ud[255&a]}encrypt(e){if(16!=e.length)throw new TypeError(\"invalid plaintext size (must be 16 bytes)\");const t=Ad(this,Td,\"f\").length-1,r=[0,0,0,0];let n=Dd(e);for(let e=0;e<4;e++)n[e]^=Ad(this,Td,\"f\")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=Wd[n[t]>>24&255]^Sd[n[(t+1)%4]>>16&255]^Id[n[(t+2)%4]>>8&255]^_d[255&n[(t+3)%4]]^Ad(this,Td,\"f\")[e][t];n=r.slice()}const o=new Uint8Array(16);let s=0;for(let e=0;e<4;e++)s=Ad(this,Td,\"f\")[t][e],o[4*e]=255&(Cd[n[e]>>24&255]^s>>24),o[4*e+1]=255&(Cd[n[(e+1)%4]>>16&255]^s>>16),o[4*e+2]=255&(Cd[n[(e+2)%4]>>8&255]^s>>8),o[4*e+3]=255&(Cd[255&n[(e+3)%4]]^s);return o}decrypt(e){if(16!=e.length)throw new TypeError(\"invalid ciphertext size (must be 16 bytes)\");const t=Ad(this,wd,\"f\").length-1,r=[0,0,0,0];let n=Dd(e);for(let e=0;e<4;e++)n[e]^=Ad(this,wd,\"f\")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=Rd[n[t]>>24&255]^xd[n[(t+3)%4]>>16&255]^Od[n[(t+2)%4]>>8&255]^Md[255&n[(t+1)%4]]^Ad(this,wd,\"f\")[e][t];n=r.slice()}const o=new Uint8Array(16);let s=0;for(let e=0;e<4;e++)s=Ad(this,wd,\"f\")[t][e],o[4*e]=255&(Bd[n[e]>>24&255]^s>>24),o[4*e+1]=255&(Bd[n[(e+3)%4]>>16&255]^s>>16),o[4*e+2]=255&(Bd[n[(e+2)%4]>>8&255]^s>>8),o[4*e+3]=255&(Bd[255&n[(e+1)%4]]^s);return o}}bd=new WeakMap,wd=new WeakMap,Td=new WeakMap;class $d{constructor(e,t,r){if(r&&!(this instanceof r))throw new Error(`${e} must be instantiated with \"new\"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new Ld(t)},name:{enumerable:!0,value:e}})}}new WeakMap,new WeakMap;var zd,jd=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};new WeakMap,zd=new WeakMap,new WeakSet;var Vd,Gd,Hd,Kd=function(e,t,r,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!o:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},qd=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};class Zd extends $d{constructor(e,t){super(\"CTR\",e,Zd),Vd.set(this,void 0),Gd.set(this,void 0),Hd.set(this,void 0),Kd(this,Hd,new Uint8Array(16),\"f\"),qd(this,Hd,\"f\").fill(0),Kd(this,Vd,qd(this,Hd,\"f\"),\"f\"),Kd(this,Gd,16,\"f\"),null==t&&(t=1),\"number\"==typeof t?this.setCounterValue(t):this.setCounterBytes(t)}get counter(){return new Uint8Array(qd(this,Hd,\"f\"))}setCounterValue(e){if(!Number.isInteger(e)||e<0||e>Number.MAX_SAFE_INTEGER)throw new TypeError(\"invalid counter initial integer value\");for(let t=15;t>=0;--t)qd(this,Hd,\"f\")[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(16!==e.length)throw new TypeError(\"invalid counter initial Uint8Array value length\");qd(this,Hd,\"f\").set(e)}increment(){for(let e=15;e>=0;e--){if(255!==qd(this,Hd,\"f\")[e]){qd(this,Hd,\"f\")[e]++;break}qd(this,Hd,\"f\")[e]=0}}encrypt(e){var t,r;const n=new Uint8Array(e);for(let e=0;e<n.length;e++)16===qd(this,Gd,\"f\")&&(Kd(this,Vd,this.aes.encrypt(qd(this,Hd,\"f\")),\"f\"),Kd(this,Gd,0,\"f\"),this.increment()),n[e]^=qd(this,Vd,\"f\")[(Kd(this,Gd,(r=qd(this,Gd,\"f\"),t=r++,r),\"f\"),t)];return n}decrypt(e){return this.encrypt(e)}}Vd=new WeakMap,Gd=new WeakMap,Hd=new WeakMap;new WeakMap,new WeakMap,new WeakMap;const Jd=(e,t)=>e<<t|e>>>32-t;function Yd(e,t,r,n,o,s){let a=e[t++]^r[n++],i=e[t++]^r[n++],c=e[t++]^r[n++],u=e[t++]^r[n++],l=e[t++]^r[n++],d=e[t++]^r[n++],f=e[t++]^r[n++],p=e[t++]^r[n++],h=e[t++]^r[n++],g=e[t++]^r[n++],y=e[t++]^r[n++],m=e[t++]^r[n++],b=e[t++]^r[n++],w=e[t++]^r[n++],T=e[t++]^r[n++],A=e[t++]^r[n++],v=a,P=i,E=c,C=u,B=l,W=d,S=f,I=p,_=h,R=g,x=y,O=m,M=b,F=w,k=T,N=A;for(let e=0;e<8;e+=2)B^=Jd(v+M|0,7),_^=Jd(B+v|0,9),M^=Jd(_+B|0,13),v^=Jd(M+_|0,18),R^=Jd(W+P|0,7),F^=Jd(R+W|0,9),P^=Jd(F+R|0,13),W^=Jd(P+F|0,18),k^=Jd(x+S|0,7),E^=Jd(k+x|0,9),S^=Jd(E+k|0,13),x^=Jd(S+E|0,18),C^=Jd(N+O|0,7),I^=Jd(C+N|0,9),O^=Jd(I+C|0,13),N^=Jd(O+I|0,18),P^=Jd(v+C|0,7),E^=Jd(P+v|0,9),C^=Jd(E+P|0,13),v^=Jd(C+E|0,18),S^=Jd(W+B|0,7),I^=Jd(S+W|0,9),B^=Jd(I+S|0,13),W^=Jd(B+I|0,18),O^=Jd(x+R|0,7),_^=Jd(O+x|0,9),R^=Jd(_+O|0,13),x^=Jd(R+_|0,18),M^=Jd(N+k|0,7),F^=Jd(M+N|0,9),k^=Jd(F+M|0,13),N^=Jd(k+F|0,18);o[s++]=a+v|0,o[s++]=i+P|0,o[s++]=c+E|0,o[s++]=u+C|0,o[s++]=l+B|0,o[s++]=d+W|0,o[s++]=f+S|0,o[s++]=p+I|0,o[s++]=h+_|0,o[s++]=g+R|0,o[s++]=y+x|0,o[s++]=m+O|0,o[s++]=b+M|0,o[s++]=w+F|0,o[s++]=T+k|0,o[s++]=A+N|0}function Xd(e,t,r,n,o){let s=n+0,a=n+16*o;for(let n=0;n<16;n++)r[a+n]=e[t+16*(2*o-1)+n];for(let n=0;n<o;n++,s+=16,t+=16)Yd(r,a,e,t,r,s),n>0&&(a+=16),Yd(r,s,e,t+=16,r,a)}function Qd(e,t,r){const n=$s({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:o,r:s,p:a,dkLen:i,asyncTick:c,maxmem:u,onProgress:l}=n;if(Bs(o),Bs(s),Bs(a),Bs(i),Bs(c),Bs(u),void 0!==l&&\"function\"!=typeof l)throw new Error(\"progressCb should be function\");const d=128*s,f=d/4;if(o<=1||o&o-1||o>=2**(d/8)||o>2**32)throw new Error(\"Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32\");if(a<0||a>137438953440/d)throw new Error(\"Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)\");if(i<0||i>137438953440)throw new Error(\"Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32\");const p=d*(o+a);if(p>u)throw new Error(`Scrypt: parameters too large, ${p} (128 * r * (N + p)) > ${u} (maxmem)`);const h=qs(ra,e,t,{c:1,dkLen:d*a}),g=Os(h),y=Os(new Uint8Array(d*o)),m=Os(new Uint8Array(d));let b=()=>{};if(l){const e=2*o*a,t=Math.max(Math.floor(e/1e4),1);let r=0;b=()=>{r++,!l||r%t&&r!==e||l(r/e)}}return{N:o,r:s,p:a,dkLen:i,blockSize32:f,V:y,B32:g,B:h,tmp:m,blockMixCb:b,asyncTick:c}}function ef(e,t,r,n,o){const s=qs(ra,e,r,{c:1,dkLen:t});return r.fill(0),n.fill(0),o.fill(0),s}let tf=!1,rf=!1;const nf=async function(e,t,r,n,o,s,a){return await async function(e,t,r){const{N:n,r:o,p:s,dkLen:a,blockSize32:i,V:c,B32:u,B:l,tmp:d,blockMixCb:f,asyncTick:p}=Qd(e,t,r);for(let e=0;e<s;e++){const t=i*e;for(let e=0;e<i;e++)c[e]=u[t+e];let r=0;await Ns(n-1,p,()=>{Xd(c,r,c,r+=i,o),f()}),Xd(c,(n-1)*i,u,t,o),f(),await Ns(n,p,()=>{const e=u[t+i-16]%n;for(let r=0;r<i;r++)d[r]=u[t+r]^c[e*i+r];Xd(d,0,u,t,o),f()})}return ef(e,a,l,c,d)}(e,t,{N:r,r:n,p:o,dkLen:s,onProgress:a})},of=function(e,t,r,n,o,s){return function(e,t,r){const{N:n,r:o,p:s,dkLen:a,blockSize32:i,V:c,B32:u,B:l,tmp:d,blockMixCb:f}=Qd(e,t,r);for(let e=0;e<s;e++){const t=i*e;for(let e=0;e<i;e++)c[e]=u[t+e];for(let e=0,t=0;e<n-1;e++)Xd(c,t,c,t+=i,o),f();Xd(c,(n-1)*i,u,t,o),f();for(let e=0;e<n;e++){const e=u[t+i-16]%n;for(let r=0;r<i;r++)d[r]=u[t+r]^c[e*i+r];Xd(d,0,u,t,o),f()}}return ef(e,a,l,c,d)}(e,t,{N:r,r:n,p:o,dkLen:s})};let sf=nf,af=of;async function cf(e,t,r,n,o,s,a){const i=Ko(e,\"passwd\"),c=Ko(t,\"salt\");return Xo(await sf(i,c,r,n,o,s,a))}function uf(e,t,r,n,o,s){const a=Ko(e,\"passwd\"),i=Ko(t,\"salt\");return Xo(af(a,i,r,n,o,s))}function lf(e){const t=Ko(e,\"randomBytes\");t[6]=15&t[6]|64,t[8]=63&t[8]|128;const r=Xo(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join(\"-\")}function df(e,t){for(e=String(e);e.length<t;)e=\"0\"+e;return e}function ff(e){return\"string\"==typeof e?Na(e,\"NFKC\"):qo(e)}cf._=nf,cf.lock=function(){rf=!0},cf.register=function(e){if(rf)throw new Error(\"scrypt is locked\");sf=e},Object.freeze(cf),uf._=of,uf.lock=function(){tf=!0},uf.register=function(e){if(tf)throw new Error(\"scryptSync is locked\");af=e},Object.freeze(uf);const pf=\"m/44'/60'/0'/0/0\";function hf(e){const t=null!=e.salt?Ko(e.salt,\"options.salt\"):pl(32);let r=1<<17,n=8,o=1;return e.scrypt&&(e.scrypt.N&&(r=e.scrypt.N),e.scrypt.r&&(n=e.scrypt.r),e.scrypt.p&&(o=e.scrypt.p)),$o(\"number\"==typeof r&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),\"invalid scrypt N parameter\",\"options.N\",r),$o(\"number\"==typeof n&&n>0&&Number.isSafeInteger(n),\"invalid scrypt r parameter\",\"options.r\",n),$o(\"number\"==typeof o&&o>0&&Number.isSafeInteger(o),\"invalid scrypt p parameter\",\"options.p\",o),{name:\"scrypt\",dkLen:32,salt:t,N:r,r:n,p:o}}function gf(e,t,r,n){const o=Ko(r.privateKey,\"privateKey\"),s=null!=n.iv?Ko(n.iv,\"options.iv\"):pl(16);$o(16===s.length,\"invalid options.iv length\",\"options.iv\",n.iv);const a=null!=n.uuid?Ko(n.uuid,\"options.uuid\"):pl(16);$o(16===a.length,\"invalid options.uuid length\",\"options.uuid\",n.iv);const i=e.slice(0,16),c=e.slice(16,32),u=Ko(new Zd(i,s).encrypt(o)),l=oi(Qo([c,u])),d={address:r.address.substring(2).toLowerCase(),id:lf(a),version:3,Crypto:{cipher:\"aes-128-ctr\",cipherparams:{iv:Xo(s).substring(2)},ciphertext:Xo(u).substring(2),kdf:\"scrypt\",kdfparams:{salt:Xo(t.salt).substring(2),n:t.N,dklen:32,p:t.p,r:t.r},mac:l.substring(2)}};if(r.mnemonic){const t=null!=n.client?n.client:`ethers/${Oo}`,o=r.mnemonic.path||pf,s=r.mnemonic.locale||\"en\",a=e.slice(32,64),i=Ko(r.mnemonic.entropy,\"account.mnemonic.entropy\"),c=pl(16),u=Ko(new Zd(a,c).encrypt(i)),l=new Date,f=\"UTC--\"+(l.getUTCFullYear()+\"-\"+df(l.getUTCMonth()+1,2)+\"-\"+df(l.getUTCDate(),2)+\"T\"+df(l.getUTCHours(),2)+\"-\"+df(l.getUTCMinutes(),2)+\"-\"+df(l.getUTCSeconds(),2)+\".0Z\")+\"--\"+d.address;d[\"x-ethers\"]={client:t,gethFilename:f,path:o,locale:s,mnemonicCounter:Xo(c).substring(2),mnemonicCiphertext:Xo(u).substring(2),version:\"0.1\"}}return JSON.stringify(d)}const yf=\"m/44'/60'/0'/0/0\",mf=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),bf=2147483648,wf=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");function Tf(e,t){let r=\"\";for(;e;)r=\"0123456789abcdef\"[e%16]+r,e=Math.trunc(e/16);for(;r.length<2*t;)r=\"0\"+r;return\"0x\"+r}function Af(e){const t=Ko(e);return function(e){const t=Ko(e);let r=fs(t),n=\"\";for(;r;)n=Jl[Number(r%ed)]+n,r/=ed;for(let e=0;e<t.length&&!t[e];e++)n=Jl[0]+n;return n}(Qo([t,ts(Sa(Sa(t)),0,4)]))}const vf={};function Pf(e,t,r,n){const o=new Uint8Array(37);e&bf?(Lo(null!=n,\"cannot derive child of neutered node\",\"UNSUPPORTED_OPERATION\",{operation:\"deriveChild\"}),o.set(Ko(n),1)):o.set(Ko(r));for(let t=24;t>=0;t-=8)o[33+(t>>3)]=e>>24-t&255;const s=Ko(Pi(\"sha512\",t,o));return{IL:s.slice(0,32),IR:s.slice(32)}}function Ef(e,t){const r=t.split(\"/\");$o(r.length>0,\"invalid path\",\"path\",t),\"m\"===r[0]&&($o(0===e.depth,`cannot derive root path (i.e. path starting with \"m/\") for a node at non-zero depth ${e.depth}`,\"path\",t),r.shift());let n=e;for(let e=0;e<r.length;e++){const t=r[e];if(t.match(/^[0-9]+'$/)){const r=parseInt(t.substring(0,t.length-1));$o(r<bf,\"invalid path index\",`path[${e}]`,t),n=n.deriveChild(bf+r)}else if(t.match(/^[0-9]+$/)){const r=parseInt(t);$o(r<bf,\"invalid path index\",`path[${e}]`,t),n=n.deriveChild(r)}else $o(!1,\"invalid path component\",`path[${e}]`,t)}return n}class Cf extends md{publicKey;fingerprint;parentFingerprint;mnemonic;chainCode;path;index;depth;constructor(e,t,r,n,o,s,a,i,c){super(t,c),Go(e,vf,\"HDNodeWallet\"),ko(this,{publicKey:t.compressedPublicKey});ko(this,{parentFingerprint:r,fingerprint:ts(ul(Sa(this.publicKey)),0,4),chainCode:n,path:o,index:s,depth:a}),ko(this,{mnemonic:i})}connect(e){return new Cf(vf,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,e)}#G(){const e={address:this.address,privateKey:this.privateKey},t=this.mnemonic;return this.path&&t&&\"en\"===t.wordlist.locale&&\"\"===t.password&&(e.mnemonic={path:this.path,locale:\"en\",entropy:t.entropy}),e}async encrypt(e,t){return await async function(e,t,r){null==r&&(r={});const n=ff(t),o=hf(r);return gf(Ko(await cf(n,o.salt,o.N,o.r,o.p,64,r.progressCallback)),o,e,r)}(this.#G(),e,{progressCallback:t})}encryptSync(e){return function(e,t,r){null==r&&(r={});const n=ff(t),o=hf(r);return gf(Ko(uf(n,o.salt,o.N,o.r,o.p,64)),o,e,r)}(this.#G(),e)}get extendedKey(){return Lo(this.depth<256,\"Depth too deep\",\"UNSUPPORTED_OPERATION\",{operation:\"extendedKey\"}),Af(Qo([\"0x0488ADE4\",Tf(this.depth,1),this.parentFingerprint,Tf(this.index,4),this.chainCode,Qo([\"0x00\",this.privateKey])]))}hasPath(){return null!=this.path}neuter(){return new Bf(vf,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider)}deriveChild(e){const t=ps(e,\"index\");$o(t<=4294967295,\"invalid index\",\"index\",t);let r=this.path;r&&(r+=\"/\"+(2147483647&t),t&bf&&(r+=\"'\"));const{IR:n,IL:o}=Pf(t,this.chainCode,this.publicKey,this.privateKey),s=new Oc(hs((fs(o)+BigInt(this.privateKey))%wf,32));return new Cf(vf,s,this.fingerprint,Xo(n),r,t,this.depth+1,this.mnemonic,this.provider)}derivePath(e){return Ef(this,e)}static#H(e,t){$o(Jo(e),\"invalid seed\",\"seed\",\"[REDACTED]\");const r=Ko(e,\"seed\");$o(r.length>=16&&r.length<=64,\"invalid seed\",\"seed\",\"[REDACTED]\");const n=Ko(Pi(\"sha512\",mf,r)),o=new Oc(Xo(n.slice(0,32)));return new Cf(vf,o,\"0x00000000\",Xo(n.slice(32)),\"m\",0,0,t,null)}static fromExtendedKey(e){const t=gs(function(e){let t=Ql;for(let r=0;r<e.length;r++)t*=ed,t+=Xl(e[r]);return t}(e));$o(82===t.length||Af(t.slice(0,78))===e,\"invalid extended key\",\"extendedKey\",\"[ REDACTED ]\");const r=t[4],n=Xo(t.slice(5,9)),o=parseInt(Xo(t.slice(9,13)).substring(2),16),s=Xo(t.slice(13,45)),a=t.slice(45,78);switch(Xo(t.slice(0,4))){case\"0x0488b21e\":case\"0x043587cf\":{const e=Xo(a);return new Bf(vf,Mc(e),e,n,s,null,o,r,null)}case\"0x0488ade4\":case\"0x04358394 \":if(0!==a[0])break;return new Cf(vf,new Oc(a.slice(1)),n,s,null,o,r,null,null)}$o(!1,\"invalid extended key prefix\",\"extendedKey\",\"[ REDACTED ]\")}static createRandom(e,t,r){null==e&&(e=\"\"),null==t&&(t=yf),null==r&&(r=pi.wordlist());const n=wi.fromEntropy(pl(16),e,r);return Cf.#H(n.computeSeed(),n).derivePath(t)}static fromMnemonic(e,t){return t||(t=yf),Cf.#H(e.computeSeed(),e).derivePath(t)}static fromPhrase(e,t,r,n){null==t&&(t=\"\"),null==r&&(r=yf),null==n&&(n=pi.wordlist());const o=wi.fromPhrase(e,t,n);return Cf.#H(o.computeSeed(),o).derivePath(r)}static fromSeed(e){return Cf.#H(e,null)}}class Bf extends Zl{publicKey;fingerprint;parentFingerprint;chainCode;path;index;depth;constructor(e,t,r,n,o,s,a,i,c){super(t,c),Go(e,vf,\"HDNodeVoidWallet\"),ko(this,{publicKey:r});ko(this,{publicKey:r,fingerprint:ts(ul(Sa(r)),0,4),parentFingerprint:n,chainCode:o,path:s,index:a,depth:i})}connect(e){return new Bf(vf,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,e)}get extendedKey(){return Lo(this.depth<256,\"Depth too deep\",\"UNSUPPORTED_OPERATION\",{operation:\"extendedKey\"}),Af(Qo([\"0x0488B21E\",Tf(this.depth,1),this.parentFingerprint,Tf(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return null!=this.path}deriveChild(e){const t=ps(e,\"index\");$o(t<=4294967295,\"invalid index\",\"index\",t);let r=this.path;r&&(r+=\"/\"+(2147483647&t),t&bf&&(r+=\"'\"));const{IR:n,IL:o}=Pf(t,this.chainCode,this.publicKey,null),s=Oc.addPoints(o,this.publicKey,!0),a=Mc(s);return new Bf(vf,a,s,this.fingerprint,Xo(n),r,t,this.depth+1,this.provider)}derivePath(e){return Ef(this,e)}}const Wf={en:pi.wordlist()};var Sf;function If(e){const t=new Set;return e.forEach(e=>t.add(e)),Object.freeze(t)}const _f=\"constant external internal payable private public pure view\",Rf=If(_f.split(\" \")),xf=\"constructor error event fallback function receive struct\",Of=If(xf.split(\" \")),Mf=\"calldata memory storage payable indexed\",Ff=If(Mf.split(\" \")),kf=If([xf,Mf,\"tuple returns\",_f].join(\" \").split(\" \")),Nf={\"(\":\"OPEN_PAREN\",\")\":\"CLOSE_PAREN\",\"[\":\"OPEN_BRACKET\",\"]\":\"CLOSE_BRACKET\",\",\":\"COMMA\",\"@\":\"AT\"},Uf=new RegExp(\"^(\\\\s*)\"),Df=new RegExp(\"^([0-9]+)\"),Lf=new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)\"),$f=new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)$\"),zf=new RegExp(\"^(trcToken|address|bool|bytes([0-9]*)|string|u?int([0-9]*))$\");class jf{#f;#w;get offset(){return this.#f}get length(){return this.#w.length-this.#f}constructor(e){this.#f=0,this.#w=e.slice()}clone(){return new Sf(this.#w)}reset(){this.#f=0}#T(e=0,t=0){return new Sf(this.#w.slice(e,t).map(t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e}))))}popKeyword(e){const t=this.peek();if(\"KEYWORD\"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e)throw new Error(`expected ${e}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const e=this.peek();if(\"OPEN_PAREN\"!==e.type)throw new Error(\"bad start\");const t=this.#T(this.#f+1,e.match+1);return this.#f=e.match+1,t}popParams(){const e=this.peek();if(\"OPEN_PAREN\"!==e.type)throw new Error(\"bad start\");const t=[];for(;this.#f<e.match-1;){const e=this.peek().linkNext;t.push(this.#T(this.#f+1,e)),this.#f=e}return this.#f=e.match+1,t}peek(){if(this.#f>=this.#w.length)throw new Error(\"out-of-bounds\");return this.#w[this.#f]}peekKeyword(e){const t=this.peekType(\"KEYWORD\");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#f++,e}toString(){const e=[];for(let t=this.#f;t<this.#w.length;t++){const r=this.#w[t];e.push(`${r.type}:${r.text}`)}return`<TokenString ${e.join(\" \")}>`}}function Vf(e){const t=[],r=t=>{const r=s<e.length?JSON.stringify(e[s]):\"$EOI\";throw new Error(`invalid token ${r} at ${s}: ${t}`)},n=[],o=[];let s=0;for(;s<e.length;){let a=e.substring(s),i=a.match(Uf);i&&(s+=i[1].length,a=e.substring(s));const c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:\"\",text:\"\",offset:s,value:-1};t.push(c);const u=Nf[a[0]]||\"\";if(u){if(c.type=u,c.text=a[0],s++,\"OPEN_PAREN\"===u)n.push(t.length-1),o.push(t.length-1);else if(\"CLOSE_PAREN\"==u)0===n.length&&r(\"no matching open bracket\"),c.match=n.pop(),t[c.match].match=t.length-1,c.depth--,c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1;else if(\"COMMA\"===u)c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1,o.push(t.length-1);else if(\"OPEN_BRACKET\"===u)c.type=\"BRACKET\";else if(\"CLOSE_BRACKET\"===u){let e=t.pop().text;if(t.length>0&&\"NUMBER\"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=ps(r)}if(0===t.length||\"BRACKET\"!==t[t.length-1].type)throw new Error(\"missing opening bracket\");t[t.length-1].text+=e}}else if(i=a.match(Lf),i){if(c.text=i[1],s+=c.text.length,kf.has(c.text)){c.type=\"KEYWORD\";continue}if(c.text.match(zf)){c.type=\"TYPE\";continue}c.type=\"ID\"}else{if(i=a.match(Df),!i)throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${s}`);c.text=i[1],c.type=\"NUMBER\",s+=c.text.length}}return new jf(t.map(e=>Object.freeze(e)))}function Gf(e,t){const r=[];for(const n in t.keys())e.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(\", \")}`)}function Hf(e,t){if(t.peekKeyword(Of)){const r=t.pop().text;if(r!==e)throw new Error(`expected ${e}, got ${r}`)}return t.popType(\"ID\")}function Kf(e,t){const r=new Set;for(;;){const n=e.peekType(\"KEYWORD\");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function qf(e){const t=Kf(e,Rf);return Gf(t,If(\"constant payable nonpayable\".split(\" \"))),Gf(t,If(\"pure view payable nonpayable\".split(\" \"))),t.has(\"view\")?\"view\":t.has(\"pure\")?\"pure\":t.has(\"payable\")?\"payable\":t.has(\"nonpayable\")?\"nonpayable\":t.has(\"constant\")?\"view\":\"nonpayable\"}function Zf(e,t){return e.popParams().map(e=>up.from(e,t))}function Jf(e){if(e.peekType(\"AT\")){if(e.pop(),e.peekType(\"NUMBER\"))return us(e.pop().text);throw new Error(\"invalid gas\")}return null}function Yf(e){if(e.length)throw new Error(`unexpected tokens: ${e.toString()}`)}Sf=jf;const Xf=new RegExp(/^(.*)\\[([0-9]*)\\]$/);function Qf(e){const t=e.match(zf);if($o(t,\"invalid type\",\"type\",e),\"uint\"===e)return\"uint256\";if(\"int\"===e)return\"int256\";if(t[2]){const r=parseInt(t[2]);$o(0!==r&&r<=32,\"invalid bytes length\",\"type\",e)}else if(t[3]){const r=parseInt(t[3]);$o(0!==r&&r<=256&&r%8==0,\"invalid numeric width\",\"type\",e)}return e}const ep={},tp=Symbol.for(\"_ethers_internal\"),rp=\"_ParamTypeInternal\",np=\"_ErrorInternal\",op=\"_EventInternal\",sp=\"_ConstructorInternal\",ap=\"_FallbackInternal\",ip=\"_FunctionInternal\",cp=\"_StructInternal\";class up{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,n,o,s,a,i){if(Go(e,ep,\"ParamType\"),Object.defineProperty(this,tp,{value:rp}),s&&(s=Object.freeze(s.slice())),\"array\"===n){if(null==a||null==i)throw new Error(\"\")}else if(null!=a||null!=i)throw new Error(\"\");if(\"tuple\"===n){if(null==s)throw new Error(\"\")}else if(null!=s)throw new Error(\"\");ko(this,{name:t,type:r,baseType:n,indexed:o,components:s,arrayLength:a,arrayChildren:i})}format(e){if(null==e&&(e=\"sighash\"),\"json\"===e){const t={type:\"tuple\"===this.baseType?\"tuple\":this.type,name:this.name||void 0};return\"boolean\"==typeof this.indexed&&(t.indexed=this.indexed),this.isTuple()&&(t.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(t)}let t=\"\";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?\"\":String(this.arrayLength)}]`):this.isTuple()?(\"sighash\"!==e&&(t+=this.type),t+=\"(\"+this.components.map(t=>t.format(e)).join(\"full\"===e?\", \":\",\")+\")\"):t+=this.type,\"sighash\"!==e&&(!0===this.indexed&&(t+=\" indexed\"),\"full\"===e&&this.name&&(t+=\" \"+this.name)),t}isArray(){return\"array\"===this.baseType}isTuple(){return\"tuple\"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error(\"invalid array value\");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error(\"array is wrong length\");return e.map(e=>this.arrayChildren?.walk(e,t))}if(this.isTuple()){if(!Array.isArray(e))throw new Error(\"invalid tuple value\");if(e.length!==this.components.length)throw new Error(\"array is wrong length\");return e.map((e,r)=>this.components?.[r].walk(e,t))}return t(this.type,e)}#A(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error(\"invalid array value\");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error(\"array is wrong length\");const o=this.arrayChildren,s=t.slice();return s.forEach((t,n)=>{o.#A(e,t,r,e=>{s[n]=e})}),void n(s)}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(t))s=t.slice();else{if(null==t||\"object\"!=typeof t)throw new Error(\"invalid tuple value\");s=o.map(e=>{if(!e.name)throw new Error(\"cannot use object value with unnamed components\");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]})}if(s.length!==this.components.length)throw new Error(\"array is wrong length\");return s.forEach((t,n)=>{o[n].#A(e,t,r,e=>{s[n]=e})}),void n(s)}const o=r(this.type,t);o.then?e.push(async function(){n(await o)}()):n(o)}async walkAsync(e,t){const r=[],n=[e];return this.#A(r,e,t,e=>{n[0]=e}),r.length&&await Promise.all(r),n[0]}static from(e,t){if(up.isParamType(e))return e;if(\"string\"==typeof e)return up.from(Vf(e),t);if(e instanceof jf){let r=\"\",n=\"\",o=null;Kf(e,If([\"tuple\"])).has(\"tuple\")||e.peekType(\"OPEN_PAREN\")?(n=\"tuple\",o=e.popParams().map(e=>up.from(e)),r=`tuple(${o.map(e=>e.format()).join(\",\")})`):(r=Qf(e.popType(\"TYPE\")),n=r);let s=null,a=null;for(;e.length&&e.peekType(\"BRACKET\");){const t=e.pop();s=new up(ep,\"\",r,n,null,o,a,s),a=t.value,r+=t.text,n=\"array\",o=null}let i=null;if(Kf(e,Ff).has(\"indexed\")){if(!t)throw new Error(\"\");i=!0}const c=e.peekType(\"ID\")?e.pop().text:\"\";if(e.length)throw new Error(\"leftover tokens\");return new up(ep,c,r,n,i,o,a,s)}const r=e.name;$o(!r||\"string\"==typeof r&&r.match($f),\"invalid name\",\"obj.name\",r);let n=e.indexed;null!=n&&($o(t,\"parameter cannot be indexed\",\"obj.indexed\",e.indexed),n=!!n);let o=e.type;const s=o.match(Xf);if(s){const t=parseInt(s[2]||\"-1\"),a=up.from({type:s[1],components:e.components});return new up(ep,r||\"\",o,\"array\",n,null,t,a)}if(\"tuple\"===o||o.startsWith(\"tuple(\")||o.startsWith(\"(\")){const t=null!=e.components?e.components.map(e=>up.from(e)):null;return new up(ep,r||\"\",o,\"tuple\",n,t,null,null)}return o=Qf(e.type),new up(ep,r||\"\",o,o,n,null,null,null)}static isParamType(e){return e&&e[tp]===rp}}class lp{type;inputs;constructor(e,t,r){Go(e,ep,\"Fragment\"),ko(this,{type:t,inputs:r=Object.freeze(r.slice())})}static from(e){if(\"string\"==typeof e){try{lp.from(JSON.parse(e))}catch(e){}return lp.from(Vf(e))}if(e instanceof jf){switch(e.peekKeyword(Of)){case\"constructor\":return gp.from(e);case\"error\":return pp.from(e);case\"event\":return hp.from(e);case\"fallback\":case\"receive\":return yp.from(e);case\"function\":return mp.from(e);case\"struct\":return bp.from(e)}}else if(\"object\"==typeof e){switch(e.type){case\"constructor\":return gp.from(e);case\"error\":return pp.from(e);case\"event\":return hp.from(e);case\"fallback\":case\"receive\":return yp.from(e);case\"function\":return mp.from(e);case\"struct\":return bp.from(e)}Lo(!1,`unsupported type: ${e.type}`,\"UNSUPPORTED_OPERATION\",{operation:\"Fragment.from\"})}$o(!1,\"unsupported frgament object\",\"obj\",e)}static isConstructor(e){return gp.isFragment(e)}static isError(e){return pp.isFragment(e)}static isEvent(e){return hp.isFragment(e)}static isFunction(e){return mp.isFragment(e)}static isStruct(e){return bp.isFragment(e)}}class dp extends lp{name;constructor(e,t,r,n){super(e,t,n),$o(\"string\"==typeof r&&r.match($f),\"invalid identifier\",\"name\",r),n=Object.freeze(n.slice()),ko(this,{name:r})}}function fp(e,t){return\"(\"+t.map(t=>t.format(e)).join(\"full\"===e?\", \":\",\")+\")\"}class pp extends dp{constructor(e,t,r){super(e,\"error\",t,r),Object.defineProperty(this,tp,{value:np})}get selector(){return si(this.format(\"sighash\")).substring(0,10)}format(e){if(null==e&&(e=\"sighash\"),\"json\"===e)return JSON.stringify({type:\"error\",name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});const t=[];return\"sighash\"!==e&&t.push(\"error\"),t.push(this.name+fp(e,this.inputs)),t.join(\" \")}static from(e){if(pp.isFragment(e))return e;if(\"string\"==typeof e)return pp.from(Vf(e));if(e instanceof jf){const t=Hf(\"error\",e),r=Zf(e);return Yf(e),new pp(ep,t,r)}return new pp(ep,e.name,e.inputs?e.inputs.map(up.from):[])}static isFragment(e){return e&&e[tp]===np}}class hp extends dp{anonymous;constructor(e,t,r,n){super(e,\"event\",t,r),Object.defineProperty(this,tp,{value:op}),ko(this,{anonymous:n})}get topicHash(){return si(this.format(\"sighash\"))}format(e){if(null==e&&(e=\"sighash\"),\"json\"===e)return JSON.stringify({type:\"event\",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});const t=[];return\"sighash\"!==e&&t.push(\"event\"),t.push(this.name+fp(e,this.inputs)),\"sighash\"!==e&&this.anonymous&&t.push(\"anonymous\"),t.join(\" \")}static getTopicHash(e,t){t=(t||[]).map(e=>up.from(e));return new hp(ep,e,t,!1).topicHash}static from(e){if(hp.isFragment(e))return e;if(\"string\"==typeof e)return hp.from(Vf(e));if(e instanceof jf){const t=Hf(\"event\",e),r=Zf(e,!0),n=!!Kf(e,If([\"anonymous\"])).has(\"anonymous\");return Yf(e),new hp(ep,t,r,n)}return new hp(ep,e.name,e.inputs?e.inputs.map(e=>up.from(e,!0)):[],!!e.anonymous)}static isFragment(e){return e&&e[tp]===op}}class gp extends lp{payable;gas;constructor(e,t,r,n,o){super(e,t,r),Object.defineProperty(this,tp,{value:sp}),ko(this,{payable:n,gas:o})}format(e){if(Lo(null!=e&&\"sighash\"!==e,\"cannot format a constructor for sighash\",\"UNSUPPORTED_OPERATION\",{operation:\"format(sighash)\"}),\"json\"===e)return JSON.stringify({type:\"constructor\",stateMutability:this.payable?\"payable\":\"undefined\",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});const t=[`constructor${fp(e,this.inputs)}`];return t.push(this.payable?\"payable\":\"nonpayable\"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(\" \")}static from(e){if(gp.isFragment(e))return e;if(\"string\"==typeof e)return gp.from(Vf(e));if(e instanceof jf){Kf(e,If([\"constructor\"]));const t=Zf(e),r=!!Kf(e,If([\"payable\"])).has(\"payable\"),n=Jf(e);return Yf(e),new gp(ep,\"constructor\",t,r,n)}return new gp(ep,\"constructor\",e.inputs?e.inputs.map(up.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[tp]===sp}}class yp extends lp{payable;constructor(e,t,r){super(e,\"fallback\",t),Object.defineProperty(this,tp,{value:ap}),ko(this,{payable:r})}format(e){const t=0===this.inputs.length?\"receive\":\"fallback\";if(\"json\"===e){const e=this.payable?\"payable\":\"nonpayable\";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?\" payable\":\"\"}`}static from(e){if(yp.isFragment(e))return e;if(\"string\"==typeof e)return yp.from(Vf(e));if(e instanceof jf){const t=e.toString();$o(e.peekKeyword(If([\"fallback\",\"receive\"])),\"type must be fallback or receive\",\"obj\",t);if(\"receive\"===e.popKeyword(If([\"fallback\",\"receive\"]))){const t=Zf(e);return $o(0===t.length,\"receive cannot have arguments\",\"obj.inputs\",t),Kf(e,If([\"payable\"])),Yf(e),new yp(ep,[],!0)}let r=Zf(e);r.length?$o(1===r.length&&\"bytes\"===r[0].type,\"invalid fallback inputs\",\"obj.inputs\",r.map(e=>e.format(\"minimal\")).join(\", \")):r=[up.from(\"bytes\")];const n=qf(e);if($o(\"nonpayable\"===n||\"payable\"===n,\"fallback cannot be constants\",\"obj.stateMutability\",n),Kf(e,If([\"returns\"])).has(\"returns\")){const t=Zf(e);$o(1===t.length&&\"bytes\"===t[0].type,\"invalid fallback outputs\",\"obj.outputs\",t.map(e=>e.format(\"minimal\")).join(\", \"))}return Yf(e),new yp(ep,r,\"payable\"===n)}if(\"receive\"===e.type)return new yp(ep,[],!0);if(\"fallback\"===e.type){const t=[up.from(\"bytes\")],r=\"payable\"===e.stateMutability;return new yp(ep,t,r)}$o(!1,\"invalid fallback description\",\"obj\",e)}static isFragment(e){return e&&e[tp]===ap}}class mp extends dp{constant;outputs;stateMutability;payable;gas;constructor(e,t,r,n,o,s){super(e,\"function\",t,n),Object.defineProperty(this,tp,{value:ip});ko(this,{constant:\"view\"===r||\"pure\"===r,gas:s,outputs:o=Object.freeze(o.slice()),payable:\"payable\"===r,stateMutability:r})}get selector(){return si(this.format(\"sighash\")).substring(0,10)}format(e){if(null==e&&(e=\"sighash\"),\"json\"===e)return JSON.stringify({type:\"function\",name:this.name,constant:this.constant,stateMutability:\"nonpayable\"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map(t=>JSON.parse(t.format(e))),outputs:this.outputs.map(t=>JSON.parse(t.format(e)))});const t=[];return\"sighash\"!==e&&t.push(\"function\"),t.push(this.name+fp(e,this.inputs)),\"sighash\"!==e&&(\"nonpayable\"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push(\"returns\"),t.push(fp(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(\" \")}static getSelector(e,t){t=(t||[]).map(e=>up.from(e));return new mp(ep,e,\"view\",t,[],null).selector}static from(e){if(mp.isFragment(e))return e;if(\"string\"==typeof e)return mp.from(Vf(e));if(e instanceof jf){const t=Hf(\"function\",e),r=Zf(e),n=qf(e);let o=[];Kf(e,If([\"returns\"])).has(\"returns\")&&(o=Zf(e));const s=Jf(e);return Yf(e),new mp(ep,t,n,r,o,s)}let t=e.stateMutability;return null==t&&(t=\"payable\",\"boolean\"==typeof e.constant?(t=\"view\",e.constant||(t=\"payable\",\"boolean\"!=typeof e.payable||e.payable||(t=\"nonpayable\"))):\"boolean\"!=typeof e.payable||e.payable||(t=\"nonpayable\")),new mp(ep,e.name,t,e.inputs?e.inputs.map(up.from):[],e.outputs?e.outputs.map(up.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[tp]===ip}}class bp extends dp{constructor(e,t,r){super(e,\"struct\",t,r),Object.defineProperty(this,tp,{value:cp})}format(){throw new Error(\"@TODO\")}static from(e){if(\"string\"==typeof e)return bp.from(Vf(e));if(e instanceof jf){const t=Hf(\"struct\",e),r=Zf(e);return Yf(e),new bp(ep,t,r)}return new bp(ep,e.name,e.inputs?e.inputs.map(up.from):[])}static isFragment(e){return e&&e[tp]===cp}}class wp{fragment;name;signature;topic;args;constructor(e,t,r){const n=e.name,o=e.format();ko(this,{fragment:e,name:n,signature:o,topic:t,args:r})}}class Tp{fragment;name;args;signature;selector;value;constructor(e,t,r,n){const o=e.name,s=e.format();ko(this,{fragment:e,name:o,args:r,signature:s,selector:t,value:n})}}class Ap{fragment;name;args;signature;selector;constructor(e,t,r){const n=e.name,o=e.format();ko(this,{fragment:e,name:n,args:r,signature:o,selector:t})}}class vp{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){ko(this,{hash:e,_isIndexed:!0})}}const Pp={0:\"generic panic\",1:\"assert(false)\",17:\"arithmetic overflow\",18:\"division or modulo by zero\",33:\"enum overflow\",34:\"invalid encoded storage byte array accessed\",49:\"out-of-bounds array access; popping on an empty array\",50:\"out-of-bounds access of an array or bytesN\",65:\"out of memory\",81:\"uninitialized function\"},Ep={\"0x08c379a0\":{signature:\"Error(string)\",name:\"Error\",inputs:[\"string\"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},\"0x4e487b71\":{signature:\"Panic(uint256)\",name:\"Panic\",inputs:[\"uint256\"],reason:e=>{let t=\"unknown panic code\";return e>=0&&e<=255&&Pp[e.toString()]&&(t=Pp[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class Cp{fragments;deploy;fallback;receive;#K;#q;#Z;#J;constructor(e){let t=[];t=\"string\"==typeof e?JSON.parse(e):e,this.#Z=new Map,this.#K=new Map,this.#q=new Map;const r=[];for(const e of t)try{r.push(lp.from(e))}catch(e){console.log(\"EE\",e)}ko(this,{fragments:Object.freeze(r)});let n=null,o=!1;this.#J=this.getAbiCoder(),this.fragments.forEach((e,t)=>{let r;switch(e.type){case\"constructor\":return this.deploy?void console.log(\"duplicate definition - constructor\"):void ko(this,{deploy:e});case\"fallback\":return void(0===e.inputs.length?o=!0:($o(!n||e.payable!==n.payable,\"conflicting fallback fragments\",`fragments[${t}]`,e),n=e,o=n.payable));case\"function\":r=this.#Z;break;case\"event\":r=this.#q;break;case\"error\":r=this.#K;break;default:return}const s=e.format();r.has(s)||r.set(s,e)}),this.deploy||ko(this,{deploy:gp.from(\"constructor()\")}),ko(this,{fallback:n,receive:o})}format(e){const t=e?\"minimal\":\"full\",r=this.fragments.map(e=>e.format(t));return r}formatJson(){const e=this.fragments.map(e=>e.format(\"json\"));return JSON.stringify(e.map(e=>JSON.parse(e)))}getAbiCoder(){return Vu.defaultAbiCoder()}#Y(e,t,r){if(Zo(e)){const t=e.toLowerCase();for(const e of this.#Z.values())if(t===e.selector)return e;return null}if(-1===e.indexOf(\"(\")){const n=[];for(const[t,r]of this.#Z)t.split(\"(\")[0]===e&&n.push(r);if(t){const e=t.length>0?t[t.length-1]:null;let r=t.length,o=!0;eu.isTyped(e)&&\"overrides\"===e.type&&(o=!1,r--);for(let e=n.length-1;e>=0;e--){const t=n[e].inputs.length;t===r||o&&t===r-1||n.splice(e,1)}for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let o=0;o<t.length;o++)if(eu.isTyped(t[o])){if(o>=r.length){if(\"overrides\"===t[o].type)continue;n.splice(e,1);break}if(t[o].type!==r[o].baseType){n.splice(e,1);break}}}}if(1===n.length&&t&&t.length!==n[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||\"object\"!=typeof e)&&n.splice(0,1)}if(0===n.length)return null;if(n.length>1&&r){const t=n.map(e=>JSON.stringify(e.format())).join(\", \");$o(!1,`ambiguous function description (i.e. matches ${t})`,\"key\",e)}return n[0]}const n=this.#Z.get(mp.from(e).format());return n||null}getFunctionName(e){const t=this.#Y(e,null,!1);return $o(t,\"no matching function\",\"key\",e),t.name}hasFunction(e){return!!this.#Y(e,null,!1)}getFunction(e,t){return this.#Y(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#Z.keys());t.sort((e,t)=>e.localeCompare(t));for(let r=0;r<t.length;r++){const n=t[r];e(this.#Z.get(n),r)}}#X(e,t,r){if(Zo(e)){const t=e.toLowerCase();for(const e of this.#q.values())if(t===e.topicHash)return e;return null}if(-1===e.indexOf(\"(\")){const n=[];for(const[t,r]of this.#q)t.split(\"(\")[0]===e&&n.push(r);if(t){for(let e=n.length-1;e>=0;e--)n[e].inputs.length<t.length&&n.splice(e,1);for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let o=0;o<t.length;o++)if(eu.isTyped(t[o])&&t[o].type!==r[o].baseType){n.splice(e,1);break}}}if(0===n.length)return null;if(n.length>1&&r){const t=n.map(e=>JSON.stringify(e.format())).join(\", \");$o(!1,`ambiguous event description (i.e. matches ${t})`,\"key\",e)}return n[0]}const n=this.#q.get(hp.from(e).format());return n||null}getEventName(e){const t=this.#X(e,null,!1);return $o(t,\"no matching event\",\"key\",e),t.name}hasEvent(e){return!!this.#X(e,null,!1)}getEvent(e,t){return this.#X(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#q.keys());t.sort((e,t)=>e.localeCompare(t));for(let r=0;r<t.length;r++){const n=t[r];e(this.#q.get(n),r)}}getError(e,t){if(Zo(e)){const t=e.toLowerCase();if(Ep[t])return pp.from(Ep[t].signature);for(const e of this.#K.values())if(t===e.selector)return e;return null}if(-1===e.indexOf(\"(\")){const t=[];for(const[r,n]of this.#K)r.split(\"(\")[0]===e&&t.push(n);if(0===t.length)return\"Error\"===e?pp.from(\"error Error(string)\"):\"Panic\"===e?pp.from(\"error Panic(uint256)\"):null;if(t.length>1){const r=t.map(e=>JSON.stringify(e.format())).join(\", \");$o(!1,`ambiguous error description (i.e. ${r})`,\"name\",e)}return t[0]}if(\"Error(string)\"===(e=pp.from(e).format()))return pp.from(\"error Error(string)\");if(\"Panic(uint256)\"===e)return pp.from(\"error Panic(uint256)\");const r=this.#K.get(e);return r||null}forEachError(e){const t=Array.from(this.#K.keys());t.sort((e,t)=>e.localeCompare(t));for(let r=0;r<t.length;r++){const n=t[r];e(this.#K.get(n),r)}}_decodeParams(e,t){return this.#J.decode(e,t)}_encodeParams(e,t){return this.#J.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){if(\"string\"==typeof e){const t=this.getError(e);$o(t,\"unknown error\",\"fragment\",e),e=t}return $o(ts(t,0,4)===e.selector,`data signature does not match error ${e.name}.`,\"data\",t),this._decodeParams(e.inputs,ts(t,4))}encodeErrorResult(e,t){if(\"string\"==typeof e){const t=this.getError(e);$o(t,\"unknown error\",\"fragment\",e),e=t}return Qo([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionData(e,t){if(\"string\"==typeof e){const t=this.getFunction(e);$o(t,\"unknown function\",\"fragment\",e),e=t}return $o(ts(t,0,4)===e.selector,`data signature does not match function ${e.name}.`,\"data\",t),this._decodeParams(e.inputs,ts(t,4))}encodeFunctionData(e,t){if(\"string\"==typeof e){const t=this.getFunction(e);$o(t,\"unknown function\",\"fragment\",e),e=t}return Qo([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionResult(e,t){if(\"string\"==typeof e){const t=this.getFunction(e);$o(t,\"unknown function\",\"fragment\",e),e=t}let r=\"invalid length for result data\";const n=qo(t);if(n.length%32==0)try{return this.#J.decode(e.outputs,n)}catch(e){r=\"could not decode result data\"}Lo(!1,r,\"BAD_DATA\",{value:Xo(n),info:{method:e.name,signature:e.format()}})}makeError(e,t){const r=Ko(e,\"data\"),n=Vu.getBuiltinCallException(\"call\",t,r);if(n.message.startsWith(\"execution reverted (unknown custom error)\")){const e=Xo(r.slice(0,4)),t=this.getError(e);if(t)try{const e=this.#J.decode(t.inputs,r.slice(4));n.revert={name:t.name,signature:t.format(),args:e},n.reason=n.revert.signature,n.message=`execution reverted: ${n.reason}`}catch(e){n.message=\"execution reverted (coult not decode custom error)\"}}const o=this.parseTransaction(t);return o&&(n.invocation={method:o.name,signature:o.signature,args:o.args}),n}encodeFunctionResult(e,t){if(\"string\"==typeof e){const t=this.getFunction(e);$o(t,\"unknown function\",\"fragment\",e),e=t}return Xo(this.#J.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){if(\"string\"==typeof e){const t=this.getEvent(e);$o(t,\"unknown event\",\"eventFragment\",e),e=t}Lo(t.length<=e.inputs.length,`too many arguments for ${e.format()}`,\"UNEXPECTED_ARGUMENT\",{count:t.length,expectedCount:e.inputs.length});const r=[];e.anonymous||r.push(e.topicHash);const n=(e,t)=>\"string\"===e.type?si(t):\"bytes\"===e.type?oi(Xo(t)):(\"bool\"===e.type&&\"boolean\"==typeof t&&(t=t?\"0x01\":\"0x00\"),e.type.match(/^u?int/)&&(t=hs(t)),\"address\"===e.type&&this.#J.encode([\"address\"],[t]),ns(Xo(t),32));for(t.forEach((t,o)=>{const s=e.inputs[o];s.indexed?null==t?r.push(null):\"array\"===s.baseType||\"tuple\"===s.baseType?$o(!1,\"filtering with tuples or arrays not supported\",\"contract.\"+s.name,t):Array.isArray(t)?r.push(t.map(e=>n(s,e))):r.push(n(s,t)):$o(null==t,\"cannot filter non-indexed parameters; must be null\",\"contract.\"+s.name,t)});r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){if(\"string\"==typeof e){const t=this.getEvent(e);$o(t,\"unknown event\",\"eventFragment\",e),e=t}const r=[],n=[],o=[];return e.anonymous||r.push(e.topicHash),$o(t.length===e.inputs.length,\"event arguments/values mismatch\",\"values\",t),e.inputs.forEach((e,s)=>{const a=t[s];if(e.indexed)if(\"string\"===e.type)r.push(si(a));else if(\"bytes\"===e.type)r.push(oi(a));else{if(\"tuple\"===e.baseType||\"array\"===e.baseType)throw new Error(\"not implemented\");r.push(this.#J.encode([e.type],[a]))}else n.push(e),o.push(a)}),{data:this.#J.encode(n,o),topics:r}}decodeEventLog(e,t,r){if(\"string\"==typeof e){const t=this.getEvent(e);$o(t,\"unknown event\",\"eventFragment\",e),e=t}if(null!=r&&!e.anonymous){const t=e.topicHash;$o(Zo(r[0],32)&&r[0].toLowerCase()===t,\"fragment/topic mismatch\",\"topics[0]\",r[0]),r=r.slice(1)}const n=[],o=[],s=[];e.inputs.forEach((e,t)=>{e.indexed?\"string\"===e.type||\"bytes\"===e.type||\"tuple\"===e.baseType||\"array\"===e.baseType?(n.push(up.from({type:\"bytes32\",name:e.name})),s.push(!0)):(n.push(e),s.push(!1)):(o.push(e),s.push(!1))});const a=null!=r?this.#J.decode(n,Qo(r)):null,i=this.#J.decode(o,t,!0),c=[],u=[];let l=0,d=0;return e.inputs.forEach((e,t)=>{let r=null;if(e.indexed)if(null==a)r=new vp(null);else if(s[t])r=new vp(a[d++]);else try{r=a[d++]}catch(e){r=e}else try{r=i[l++]}catch(e){r=e}c.push(r),u.push(e.name||null)}),Gc.fromItems(c,u)}parseTransaction(e){const t=Ko(e.data,\"tx.data\"),r=us(null!=e.value?e.value:0,\"tx.value\"),n=this.getFunction(Xo(t.slice(0,4)));if(!n)return null;const o=this.#J.decode(n.inputs,t.slice(4));return new Tp(n,n.selector,o,r)}parseCallResult(e){throw new Error(\"@TODO\")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new wp(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=Xo(e),r=this.getError(ts(t,0,4));if(!r)return null;const n=this.#J.decode(r.inputs,ts(t,4));return new Ap(r,r.selector,n)}static from(e){return e instanceof Cp?e:\"string\"==typeof e?new Cp(JSON.parse(e)):\"function\"==typeof e.format?new Cp(e.format(\"json\")):new Cp(e)}}var Bp=r(1048).hp;const Wp=e=>Cs.from(e),Sp=e=>Cs.from(e).serialized,Ip=e=>Ko(e),_p={sighash:\"sighash\",minimal:\"minimal\",full:\"full\",json:\"json\"},Rp=wi.isValidMnemonic;function xp(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function Op(e,...t){if(!function(e){return e instanceof Uint8Array||null!=e&&\"object\"==typeof e&&\"Uint8Array\"===e.constructor.name}(e))throw new Error(\"Uint8Array expected\");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function Mp(e){if(\"function\"!=typeof e||\"function\"!=typeof e.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");xp(e.outputLen),xp(e.blockLen)}function Fp(e,t=!0){if(e.destroyed)throw new Error(\"Hash instance has been destroyed\");if(t&&e.finished)throw new Error(\"Hash#digest() has already been called\")}function kp(e,t){Op(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Pi.register((e,t,r)=>Pi._(e,Bp.from(t),Bp.from(r)));const Np=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0;const Up=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Dp=(e,t)=>e<<32-t|e>>>t;new Uint8Array(new Uint32Array([287454020]).buffer)[0];Array.from({length:256},(e,t)=>t.toString(16).padStart(2,\"0\"));function Lp(e){return\"string\"==typeof e&&(e=function(e){if(\"string\"!=typeof e)throw new Error(\"utf8ToBytes expected string, got \"+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),Op(e),e}class $p{clone(){return this._cloneInto()}}function zp(e=32){if(Np&&\"function\"==typeof Np.getRandomValues)return Np.getRandomValues(new Uint8Array(e));throw new Error(\"crypto.getRandomValues must be defined\")}const jp=(e,t,r)=>e&t^~e&r,Vp=(e,t,r)=>e&t^e&r^t&r;class Gp extends $p{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Up(this.buffer)}update(e){Fp(this);const{view:t,buffer:r,blockLen:n}=this,o=(e=Lp(e)).length;for(let s=0;s<o;){const a=Math.min(n-this.pos,o-s);if(a===n){const t=Up(e);for(;n<=o-s;s+=n)this.process(t,s);continue}r.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Fp(this),kp(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e<n;e++)t[e]=0;!function(e,t,r,n){if(\"function\"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),a=Number(r>>o&s),i=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,i,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const a=Up(e),i=this.outputLen;if(i%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=i/4,u=this.get();if(c>u.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let e=0;e<c;e++)a.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:a}=this;return e.length=n,e.pos=a,e.finished=o,e.destroyed=s,n%t&&e.buffer.set(r),e}}const Hp=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Kp=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),qp=new Uint32Array(64);class Zp extends Gp{constructor(){super(64,32,8,!1),this.A=0|Kp[0],this.B=0|Kp[1],this.C=0|Kp[2],this.D=0|Kp[3],this.E=0|Kp[4],this.F=0|Kp[5],this.G=0|Kp[6],this.H=0|Kp[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:a,H:i}=this;return[e,t,r,n,o,s,a,i]}set(e,t,r,n,o,s,a,i){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|a,this.H=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)qp[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=qp[e-15],r=qp[e-2],n=Dp(t,7)^Dp(t,18)^t>>>3,o=Dp(r,17)^Dp(r,19)^r>>>10;qp[e]=o+qp[e-7]+n+qp[e-16]|0}let{A:r,B:n,C:o,D:s,E:a,F:i,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(Dp(a,6)^Dp(a,11)^Dp(a,25))+jp(a,i,c)+Hp[e]+qp[e]|0,l=(Dp(r,2)^Dp(r,13)^Dp(r,22))+Vp(r,n,o)|0;u=c,c=i,i=a,a=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,i=i+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,s,a,i,c,u)}roundClean(){qp.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Jp=function(e){const t=t=>e().update(Lp(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}(()=>new Zp);class Yp extends $p{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Mp(e);const r=Lp(t);if(this.iHash=e.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return Fp(this),this.iHash.update(e),this}digestInto(e){Fp(this),Op(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:a}=this;return e.finished=n,e.destroyed=o,e.blockLen=s,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Xp=(e,t,r)=>new Yp(e,t).update(r).digest();Xp.create=(e,t)=>new Yp(e,t);const Qp=BigInt(1),eh=BigInt(2);function th(e){return e instanceof Uint8Array||null!=e&&\"object\"==typeof e&&\"Uint8Array\"===e.constructor.name}function rh(e){if(!th(e))throw new Error(\"Uint8Array expected\")}const nh=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,\"0\"));function oh(e){rh(e);let t=\"\";for(let r=0;r<e.length;r++)t+=nh[e[r]];return t}function sh(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);return BigInt(\"\"===e?\"0\":`0x${e}`)}const ah={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function ih(e){return e>=ah._0&&e<=ah._9?e-ah._0:e>=ah._A&&e<=ah._F?e-(ah._A-10):e>=ah._a&&e<=ah._f?e-(ah._a-10):void 0}function ch(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+t);const n=new Uint8Array(r);for(let t=0,o=0;t<r;t++,o+=2){const r=ih(e.charCodeAt(o)),s=ih(e.charCodeAt(o+1));if(void 0===r||void 0===s){const t=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character \"'+t+'\" at index '+o)}n[t]=16*r+s}return n}function uh(e){return sh(oh(e))}function lh(e){return rh(e),sh(oh(Uint8Array.from(e).reverse()))}function dh(e,t){return ch(e.toString(16).padStart(2*t,\"0\"))}function fh(e,t){return dh(e,t).reverse()}function ph(e,t,r){let n;if(\"string\"==typeof t)try{n=ch(t)}catch(r){throw new Error(`${e} must be valid hex string, got \"${t}\". Cause: ${r}`)}else{if(!th(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const o=n.length;if(\"number\"==typeof r&&o!==r)throw new Error(`${e} expected ${r} bytes, got ${o}`);return n}function hh(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];rh(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r}const gh=e=>(eh<<BigInt(e-1))-Qp,yh=e=>new Uint8Array(e),mh=e=>Uint8Array.from(e);function bh(e,t,r){if(\"number\"!=typeof e||e<2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof t||t<2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof r)throw new Error(\"hmacFn must be a function\");let n=yh(e),o=yh(e),s=0;const a=()=>{n.fill(1),o.fill(0),s=0},i=(...e)=>r(o,n,...e),c=(e=yh())=>{o=i(mh([0]),e),n=i(),0!==e.length&&(o=i(mh([1]),e),n=i())},u=()=>{if(s++>=1e3)throw new Error(\"drbg: tried 1000 values\");let e=0;const r=[];for(;e<t;){n=i();const t=n.slice();r.push(t),e+=n.length}return hh(...r)};return(e,t)=>{let r;for(a(),c(e);!(r=t(u()));)c();return a(),r}}const wh={bigint:e=>\"bigint\"==typeof e,function:e=>\"function\"==typeof e,boolean:e=>\"boolean\"==typeof e,string:e=>\"string\"==typeof e,stringOrUint8Array:e=>\"string\"==typeof e||th(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>\"function\"==typeof e&&Number.isSafeInteger(e.outputLen)};function Th(e,t,r={}){const n=(t,r,n)=>{const o=wh[r];if(\"function\"!=typeof o)throw new Error(`Invalid validator \"${r}\", expected function`);const s=e[t];if(!(n&&void 0===s||o(s,e)))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}const Ah=BigInt(0),vh=BigInt(1),Ph=BigInt(2),Eh=BigInt(3),Ch=BigInt(4),Bh=BigInt(5),Wh=BigInt(8);BigInt(9),BigInt(16);function Sh(e,t){const r=e%t;return r>=Ah?r:t+r}function Ih(e,t,r){if(r<=Ah||t<Ah)throw new Error(\"Expected power/modulo > 0\");if(r===vh)return Ah;let n=vh;for(;t>Ah;)t&vh&&(n=n*e%r),e=e*e%r,t>>=vh;return n}function _h(e,t,r){let n=e;for(;t-- >Ah;)n*=n,n%=r;return n}function Rh(e,t){if(e===Ah||t<=Ah)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=Sh(e,t),n=t,o=Ah,s=vh,a=vh,i=Ah;for(;r!==Ah;){const e=n/r,t=n%r,c=o-a*e,u=s-i*e;n=r,r=t,o=a,s=i,a=c,i=u}if(n!==vh)throw new Error(\"invert: does not exist\");return Sh(o,t)}function xh(e){if(e%Ch===Eh){const t=(e+vh)/Ch;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}if(e%Wh===Bh){const t=(e-Bh)/Wh;return function(e,r){const n=e.mul(r,Ph),o=e.pow(n,t),s=e.mul(r,o),a=e.mul(e.mul(s,Ph),o),i=e.mul(s,e.sub(a,e.ONE));if(!e.eql(e.sqr(i),r))throw new Error(\"Cannot find square root\");return i}}return function(e){const t=(e-vh)/Ph;let r,n,o;for(r=e-vh,n=0;r%Ph===Ah;r/=Ph,n++);for(o=Ph;o<e&&Ih(o,t,e)!==e-vh;o++);if(1===n){const t=(e+vh)/Ch;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}const s=(r+vh)/Ph;return function(e,a){if(e.pow(a,t)===e.neg(e.ONE))throw new Error(\"Cannot find square root\");let i=n,c=e.pow(e.mul(e.ONE,o),r),u=e.pow(a,s),l=e.pow(a,r);for(;!e.eql(l,e.ONE);){if(e.eql(l,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(l);t<i&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,vh<<BigInt(i-t-1));c=e.sqr(r),u=e.mul(u,r),l=e.mul(l,c),i=t}return u}}(e)}const Oh=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function Mh(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function Fh(e){if(\"bigint\"!=typeof e)throw new Error(\"field order must be bigint\");const t=e.toString(2).length;return Math.ceil(t/8)}function kh(e){const t=Fh(e);return t+Math.ceil(t/2)}const Nh=BigInt(0),Uh=BigInt(1);function Dh(e){return function(e){const t=Oh.reduce((e,t)=>(e[t]=\"function\",e),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"isSafeInteger\",BITS:\"isSafeInteger\"});Th(e,t)}(e.Fp),Th(e,{n:\"bigint\",h:\"bigint\",Gx:\"field\",Gy:\"field\"},{nBitLength:\"isSafeInteger\",nByteLength:\"isSafeInteger\"}),Object.freeze({...Mh(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:Lh,aT:$h}=c,zh={Err:class extends Error{constructor(e=\"\"){super(e)}},_parseInt(e){const{Err:t}=zh;if(e.length<2||2!==e[0])throw new t(\"Invalid signature integer tag\");const r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t(\"Invalid signature integer: wrong length\");if(128&n[0])throw new t(\"Invalid signature integer: negative\");if(0===n[0]&&!(128&n[1]))throw new t(\"Invalid signature integer: unnecessary leading zero\");return{d:Lh(n),l:e.subarray(r+2)}},toSig(e){const{Err:t}=zh,r=\"string\"==typeof e?$h(e):e;rh(r);let n=r.length;if(n<2||48!=r[0])throw new t(\"Invalid signature tag\");if(r[1]!==n-2)throw new t(\"Invalid signature: incorrect length\");const{d:o,l:s}=zh._parseInt(r.subarray(2)),{d:a,l:i}=zh._parseInt(s);if(i.length)throw new t(\"Invalid signature: left bytes after parsing\");return{r:o,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?\"00\"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),s=n.length/2,a=o.length/2,i=r(s),c=r(a);return`30${r(a+s+4)}02${c}${o}02${i}${n}`}},jh=BigInt(0),Vh=BigInt(1),Gh=(BigInt(2),BigInt(3));BigInt(4);function Hh(e){const t=function(e){const t=Dh(e);Th(t,{a:\"field\",b:\"field\"},{allowedPrivateKeyLengths:\"array\",wrapPrivateKey:\"boolean\",isTorsionFree:\"function\",clearCofactor:\"function\",allowInfinityPoint:\"boolean\",fromBytes:\"function\",toBytes:\"function\"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");if(\"object\"!=typeof r||\"bigint\"!=typeof r.beta||\"function\"!=typeof r.splitScalar)throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{const o=t.toAffine();return hh(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),o=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function s(e){const{a:n,b:o}=t,s=r.sqr(e),a=r.mul(s,e);return r.add(r.add(a,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw new Error(\"bad generator point: equation left != right\");function a(e){return\"bigint\"==typeof e&&jh<e&&e<t.n}function i(e){if(!a(e))throw new Error(\"Expected valid bigint: 0 < bigint < curve.n\")}function c(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:o,n:s}=t;if(r&&\"bigint\"!=typeof e){if(th(e)&&(e=oh(e)),\"string\"!=typeof e||!r.includes(e.length))throw new Error(\"Invalid key\");e=e.padStart(2*n,\"0\")}let a;try{a=\"bigint\"==typeof e?e:uh(ph(\"private key\",e,n))}catch(t){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`)}return o&&(a=Sh(a,s)),i(a),a}const u=new Map;function l(e){if(!(e instanceof d))throw new Error(\"ProjectivePoint expected\")}class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error(\"x required\");if(null==t||!r.isValid(t))throw new Error(\"y required\");if(null==n||!r.isValid(n))throw new Error(\"z required\")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error(\"invalid affine point\");if(e instanceof d)throw new Error(\"projective point not allowed\");const o=e=>r.eql(e,r.ZERO);return o(t)&&o(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(o(ph(\"pointHex\",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error(\"bad point: ZERO\")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error(\"bad point: x or y not FE\");const o=r.sqr(n),a=s(e);if(!r.eql(o,a))throw new Error(\"bad point: equation left != right\");if(!this.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error(\"Field doesn't support isOdd\")}equals(e){l(e);const{px:t,py:n,pz:o}=this,{px:s,py:a,pz:i}=e,c=r.eql(r.mul(t,i),r.mul(s,o)),u=r.eql(r.mul(n,i),r.mul(a,o));return c&&u}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,Gh),{px:s,py:a,pz:i}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(s,s),p=r.mul(a,a),h=r.mul(i,i),g=r.mul(s,a);return g=r.add(g,g),l=r.mul(s,i),l=r.add(l,l),c=r.mul(e,l),u=r.mul(o,h),u=r.add(c,u),c=r.sub(p,u),u=r.add(p,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(o,l),h=r.mul(e,h),g=r.sub(f,h),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,h),f=r.mul(f,g),u=r.add(u,f),h=r.mul(a,i),h=r.add(h,h),f=r.mul(h,g),c=r.sub(c,f),l=r.mul(h,p),l=r.add(l,l),l=r.add(l,l),new d(c,u,l)}add(e){l(e);const{px:n,py:o,pz:s}=this,{px:a,py:i,pz:c}=e;let u=r.ZERO,f=r.ZERO,p=r.ZERO;const h=t.a,g=r.mul(t.b,Gh);let y=r.mul(n,a),m=r.mul(o,i),b=r.mul(s,c),w=r.add(n,o),T=r.add(a,i);w=r.mul(w,T),T=r.add(y,m),w=r.sub(w,T),T=r.add(n,s);let A=r.add(a,c);return T=r.mul(T,A),A=r.add(y,b),T=r.sub(T,A),A=r.add(o,s),u=r.add(i,c),A=r.mul(A,u),u=r.add(m,b),A=r.sub(A,u),p=r.mul(h,T),u=r.mul(g,b),p=r.add(u,p),u=r.sub(m,p),p=r.add(m,p),f=r.mul(u,p),m=r.add(y,y),m=r.add(m,y),b=r.mul(h,b),T=r.mul(g,T),m=r.add(m,b),b=r.sub(y,b),b=r.mul(h,b),T=r.add(T,b),y=r.mul(m,T),f=r.add(f,y),y=r.mul(A,T),u=r.mul(w,u),u=r.sub(u,y),y=r.mul(w,m),p=r.mul(A,p),p=r.add(p,y),new d(u,f,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,u,e,e=>{const t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)})}multiplyUnsafe(e){const n=d.ZERO;if(e===jh)return n;if(i(e),e===Vh)return this;const{endo:o}=t;if(!o)return p.unsafeLadder(this,e);let{k1neg:s,k1:a,k2neg:c,k2:u}=o.splitScalar(e),l=n,f=n,h=this;for(;a>jh||u>jh;)a&Vh&&(l=l.add(h)),u&Vh&&(f=f.add(h)),h=h.double(),a>>=Vh,u>>=Vh;return s&&(l=l.negate()),c&&(f=f.negate()),f=new d(r.mul(f.px,o.beta),f.py,f.pz),l.add(f)}multiply(e){i(e);let n,o,s=e;const{endo:a}=t;if(a){const{k1neg:e,k1:t,k2neg:i,k2:c}=a.splitScalar(s);let{p:u,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(c);u=p.constTimeNegate(e,u),f=p.constTimeNegate(i,f),f=new d(r.mul(f.px,a.beta),f.py,f.pz),n=u.add(f),o=l.add(h)}else{const{p:e,f:t}=this.wNAF(s);n=e,o=t}return d.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=d.BASE,o=(e,t)=>t!==jh&&t!==Vh&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=o(this,t).add(o(e,r));return s.is0()?void 0:s}toAffine(e){const{px:t,py:n,pz:o}=this,s=this.is0();null==e&&(e=s?r.ONE:r.inv(o));const a=r.mul(t,e),i=r.mul(n,e),c=r.mul(o,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error(\"invZ was invalid\");return{x:a,y:i}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===Vh)return!0;if(r)return r(d,this);throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===Vh?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return oh(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const f=t.nBitLength,p=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>Nh;)r&Uh&&(n=n.add(o)),o=o.double(),r>>=Uh;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),s=[];let a=e,i=a;for(let e=0;e<r;e++){i=a,s.push(i);for(let e=1;e<o;e++)i=i.add(a),s.push(i);a=i.double()}return s},wNAF(t,o,s){const{windows:a,windowSize:i}=n(t);let c=e.ZERO,u=e.BASE;const l=BigInt(2**t-1),d=2**t,f=BigInt(t);for(let e=0;e<a;e++){const t=e*i;let n=Number(s&l);s>>=f,n>i&&(n-=d,s+=Uh);const a=t,p=t+Math.abs(n)-1,h=e%2!=0,g=n<0;0===n?u=u.add(r(h,o[a])):c=c.add(r(g,o[p]))}return{p:c,f:u}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,o),1!==o&&t.set(e,n(s))),this.wNAF(o,s,r)}}}(d,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:a}}function Kh(e){const t=function(e){const t=Dh(e);return Th(t,{hash:\"hash\",hmac:\"function\",randomBytes:\"function\"},{bits2int:\"function\",bits2int_modN:\"function\",lowS:\"boolean\"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n}=t,o=r.BYTES+1,s=2*r.BYTES+1;function a(e){return Sh(e,n)}function i(e){return Rh(e,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:l,isWithinCurveOrder:d}=Hh({...t,toBytes(e,t,n){const o=t.toAffine(),s=r.toBytes(o.x),a=hh;return n?a(Uint8Array.from([t.hasEvenY()?2:3]),s):a(Uint8Array.from([4]),s,r.toBytes(o.y))},fromBytes(e){const t=e.length,n=e[0],a=e.subarray(1);if(t!==o||2!==n&&3!==n){if(t===s&&4===n){return{x:r.fromBytes(a.subarray(0,r.BYTES)),y:r.fromBytes(a.subarray(r.BYTES,2*r.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`)}{const e=uh(a);if(!(jh<(i=e)&&i<r.ORDER))throw new Error(\"Point is not on curve\");const t=l(e);let o;try{o=r.sqrt(t)}catch(e){const t=e instanceof Error?\": \"+e.message:\"\";throw new Error(\"Point is not on curve\"+t)}return!(1&~n)!==((o&Vh)===Vh)&&(o=r.neg(o)),{x:e,y:o}}var i}}),f=e=>oh(dh(e,t.nByteLength));function p(e){return e>n>>Vh}const h=(e,t,r)=>uh(e.slice(t,r));class g{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=ph(\"compactSignature\",e,2*r),new g(h(e,0,r),h(e,r,2*r))}static fromDER(e){const{r:t,s:r}=zh.toSig(ph(\"DER\",e));return new g(t,r)}assertValidity(){if(!d(this.r))throw new Error(\"r must be 0 < r < CURVE.n\");if(!d(this.s))throw new Error(\"s must be 0 < s < CURVE.n\")}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:o,recovery:s}=this,u=w(ph(\"msgHash\",e));if(null==s||![0,1,2,3].includes(s))throw new Error(\"recovery id invalid\");const l=2===s||3===s?n+t.n:n;if(l>=r.ORDER)throw new Error(\"recovery id 2 or 3 invalid\");const d=1&s?\"03\":\"02\",p=c.fromHex(d+f(l)),h=i(l),g=a(-u*h),y=a(o*h),m=c.BASE.multiplyAndAddUnsafe(p,g,y);if(!m)throw new Error(\"point at infinify\");return m.assertValidity(),m}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return ch(this.toDERHex())}toDERHex(){return zh.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return ch(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const y={isValidPrivateKey(e){try{return u(e),!0}catch(e){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const e=kh(t.n);return function(e,t,r=!1){const n=e.length,o=Fh(t),s=kh(t);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const a=Sh(r?uh(e):lh(e),t-vh)+vh;return r?fh(a,o):dh(a,o)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function m(e){const t=th(e),r=\"string\"==typeof e,n=(t||r)&&e.length;return t?n===o||n===s:r?n===2*o||n===2*s:e instanceof c}const b=t.bits2int||function(e){const r=uh(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},w=t.bits2int_modN||function(e){return a(b(e))},T=gh(t.nBitLength);function A(e){if(\"bigint\"!=typeof e)throw new Error(\"bigint expected\");if(!(jh<=e&&e<T))throw new Error(`bigint expected < 2^${t.nBitLength}`);return dh(e,t.nByteLength)}function v(e,n,o=P){if([\"recovered\",\"canonical\"].some(e=>e in o))throw new Error(\"sign() legacy options not supported\");const{hash:s,randomBytes:l}=t;let{lowS:f,prehash:h,extraEntropy:y}=o;null==f&&(f=!0),e=ph(\"msgHash\",e),h&&(e=ph(\"prehashed msgHash\",s(e)));const m=w(e),T=u(n),v=[A(T),A(m)];if(null!=y&&!1!==y){const e=!0===y?l(r.BYTES):y;v.push(ph(\"extraEntropy\",e))}const E=hh(...v),C=m;return{seed:E,k2sig:function(e){const t=b(e);if(!d(t))return;const r=i(t),n=c.BASE.multiply(t).toAffine(),o=a(n.x);if(o===jh)return;const s=a(r*a(C+o*T));if(s===jh)return;let u=(n.x===o?0:2)|Number(n.y&Vh),l=s;return f&&p(s)&&(l=function(e){return p(e)?a(-e):e}(s),u^=1),new g(o,l,u)}}}const P={lowS:t.lowS,prehash:!1},E={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(m(e))throw new Error(\"first arg must be private key\");if(!m(t))throw new Error(\"second arg must be public key\");return c.fromHex(t).multiply(u(e)).toRawBytes(r)},sign:function(e,r,n=P){const{seed:o,k2sig:s}=v(e,r,n),a=t;return bh(a.hash.outputLen,a.nByteLength,a.hmac)(o,s)},verify:function(e,r,n,o=E){const s=e;if(r=ph(\"msgHash\",r),n=ph(\"publicKey\",n),\"strict\"in o)throw new Error(\"options.strict was renamed to lowS\");const{lowS:u,prehash:l}=o;let d,f;try{if(\"string\"==typeof s||th(s))try{d=g.fromDER(s)}catch(e){if(!(e instanceof zh.Err))throw e;d=g.fromCompact(s)}else{if(\"object\"!=typeof s||\"bigint\"!=typeof s.r||\"bigint\"!=typeof s.s)throw new Error(\"PARSE\");{const{r:e,s:t}=s;d=new g(e,t)}}f=c.fromHex(n)}catch(e){if(\"PARSE\"===e.message)throw new Error(\"signature must be Signature instance, Uint8Array or hex string\");return!1}if(u&&d.hasHighS())return!1;l&&(r=t.hash(r));const{r:p,s:h}=d,y=w(r),m=i(h),b=a(y*m),T=a(p*m),A=c.BASE.multiplyAndAddUnsafe(f,b,T)?.toAffine();return!!A&&a(A.x)===p},ProjectivePoint:c,Signature:g,utils:y}}function qh(e){return{hash:e,hmac:(t,...r)=>Xp(e,t,function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];Op(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r}(...r)),randomBytes:zp}}const Zh=BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),Jh=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),Yh=BigInt(1),Xh=BigInt(2),Qh=(e,t)=>(e+t/Xh)/t;function eg(e){const t=Zh,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),a=BigInt(23),i=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=_h(l,r,t)*l%t,f=_h(d,r,t)*l%t,p=_h(f,Xh,t)*u%t,h=_h(p,o,t)*p%t,g=_h(h,s,t)*h%t,y=_h(g,i,t)*g%t,m=_h(y,c,t)*y%t,b=_h(m,i,t)*g%t,w=_h(b,r,t)*l%t,T=_h(w,a,t)*h%t,A=_h(T,n,t)*u%t,v=_h(A,Xh,t);if(!tg.eql(tg.sqr(v),e))throw new Error(\"Cannot find square root\");return v}const tg=function(e,t,r=!1,n={}){if(e<=Ah)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:o,nByteLength:s}=Mh(e,t);if(s>2048)throw new Error(\"Field lengths over 2048 bytes are not supported\");const a=xh(e),i=Object.freeze({ORDER:e,BITS:o,BYTES:s,MASK:gh(o),ZERO:Ah,ONE:vh,create:t=>Sh(t,e),isValid:t=>{if(\"bigint\"!=typeof t)throw new Error(\"Invalid field element: expected bigint, got \"+typeof t);return Ah<=t&&t<e},is0:e=>e===Ah,isOdd:e=>(e&vh)===vh,neg:t=>Sh(-t,e),eql:(e,t)=>e===t,sqr:t=>Sh(t*t,e),add:(t,r)=>Sh(t+r,e),sub:(t,r)=>Sh(t-r,e),mul:(t,r)=>Sh(t*r,e),pow:(e,t)=>function(e,t,r){if(r<Ah)throw new Error(\"Expected power > 0\");if(r===Ah)return e.ONE;if(r===vh)return t;let n=e.ONE,o=t;for(;r>Ah;)r&vh&&(n=e.mul(n,o)),o=e.sqr(o),r>>=vh;return n}(i,e,t),div:(t,r)=>Sh(t*Rh(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>Rh(t,e),sqrt:n.sqrt||(e=>a(i,e)),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n)),e.ONE),o=e.inv(n);return t.reduceRight((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n)),o),r}(i,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?fh(e,s):dh(e,s),fromBytes:e=>{if(e.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`);return r?lh(e):uh(e)}});return Object.freeze(i)}(Zh,void 0,void 0,{sqrt:eg}),rg=function(e,t){const r=t=>Kh({...e,...qh(t)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:tg,n:Jh,Gx:BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),Gy:BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),splitScalar:e=>{const t=Jh,r=BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),n=-Yh*BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\"),o=BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),s=r,a=BigInt(\"0x100000000000000000000000000000000\"),i=Qh(s*e,t),c=Qh(-n*e,t);let u=Sh(e-i*r-c*o,t),l=Sh(-i*n-c*s,t);const d=u>a,f=l>a;if(d&&(u=t-u),f&&(l=t-l),u>a||l>a)throw new Error(\"splitScalar: Endomorphism failed, k=\"+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}}},Jp);BigInt(0);rg.ProjectivePoint;var ng=r(1048).hp;function og(e){const t=Ag(e);let r=Ag(t).slice(0,4);return r=e.concat(r),_o(r)}function sg(e){if(\"string\"!=typeof e)return!1;if(e.length<=4)return!1;let t=Ro(e);if(e.length<=4)return!1;const r=t.length-4,n=t.slice(r);t=t.slice(0,r);const o=Ag(t),s=Ag(o).slice(0,4);if(n[0]==s[0]&&n[1]==s[1]&&n[2]==s[2]&&n[3]==s[3])return t;throw new Error(\"Invalid address provided\")}function ag(e,t){\"string\"==typeof e&&(e=Po(e));const r=Tg(Po(t.txID),e);return Array.isArray(t.signature)?t.signature.includes(r)||t.signature.push(r):t.signature=[r],t}function ig(e,t){e=\"0x\"+e.replace(/^0x/,\"\"),t=\"0x\"+t.replace(/^0x/,\"\");const r=Fc(Ip(e),Cs.from(t));return po+r.substring(2)}function cg(e){return btoa(String.fromCharCode(...e))}function ug(e,t){\"string\"==typeof e&&(e=Po(e));return Tg(Ag(t),e)}function lg(e){const t=uo(e);return globalThis.proto.protocol.Transaction.deserializeBinary(t).getRawData().serializeBinary()}function dg(){let e=co(rg.utils.randomPrivateKey());return e=e.padStart(64,\"0\"),Po(e)}function fg(e){65===e.length&&(e=e.slice(1));const t=oi(new Uint8Array(e)).toString().substring(2);return Po(po+t.substring(24))}function pg(e){return fg(wg(e))}function hg(e){const t=Ro(e);if(t.length<=4)return!1;const r=t.slice(0,t.length-4),n=Ag(r),o=Ag(n);return o[0]===t[r.length]&&o[1]===t[r.length+1]&&o[2]===t[r.length+2]&&o[3]===t[r.length+3]&&r}function gg(e){if(\"string\"!=typeof e)return!1;if(e.length!==fo)return!1;let t=Ro(e);if(25!==t.length)return!1;if(t[0]!==ho)return!1;const r=t.slice(21);t=t.slice(0,21);const n=Ag(t),o=Ag(n).slice(0,4);return r[0]==o[0]&&r[1]==o[1]&&r[2]==o[2]&&r[3]==o[3]}function yg(e){return og(fg(wg(uo(e))))}function mg(e){return co(fg(wg(uo(e))))}function bg(e){return lo(fg(wg(uo(e))))}function wg(e){const t=rg.ProjectivePoint.fromPrivateKey(new Uint8Array(function(e){return Po(co(e).padStart(64,\"0\"))}(e))),r=t.x,n=t.y;return Po(`04${r.toString(16).padStart(64,\"0\")}${n.toString(16).padStart(64,\"0\")}`)}function Tg(e,t){const r=rg.sign(co(e),co(t)),n=r.r.toString(16),o=r.s.toString(16),s=r.recovery+27;return n.padStart(64,\"0\")+o.padStart(64,\"0\")+so(s)}function Ag(e){return Po(Sa(\"0x\"+co(e)).replace(/^0x/,\"\"))}function vg(e){return og(pg(uo(e)))}function Pg(e,t=!1){return og(pg(Po(e,t)))}function Eg(e,t=!0){return(t?\"0x\":\"\")+oi(ng.from(e,\"utf-8\")).toString().substring(2)}const Cg=\"Invalid tron path provided\";function Bg(){const e=dg(),t=wg(e),r=pg(e);return{privateKey:co(e),publicKey:co(t),address:{base58:og(r),hex:co(r)}}}function Wg(e=\"\",t=mo,r){const n=Cf.createRandom(e,t,r);return{mnemonic:n.mnemonic,privateKey:n.privateKey,publicKey:n.signingKey.publicKey,address:Pg(n.privateKey.replace(/^0x/,\"\")),path:n.path}}function Sg(e,t=mo,r=\"\",n=null){if(!String(t).match(/^m\\/44\\'\\/195\\'/))throw new Error(Cg);const o=Cf.fromMnemonic(wi.fromPhrase(e,r,n),t);return{mnemonic:o.mnemonic,privateKey:o.privateKey,publicKey:o.signingKey.publicKey,address:Pg(o.privateKey.replace(/^0x/,\"\"))}}var Ig=/^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,_g=Math.ceil,Rg=Math.floor,xg=\"[BigNumber Error] \",Og=xg+\"Number primitive has more than 15 significant digits: \",Mg=1e14,Fg=14,kg=9007199254740991,Ng=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Ug=1e7,Dg=1e9;function Lg(e){var t=0|e;return e>0||e===t?t:t-1}function $g(e){for(var t,r,n=1,o=e.length,s=e[0]+\"\";n<o;){for(t=e[n++]+\"\",r=Fg-t.length;r--;t=\"0\"+t);s+=t}for(o=s.length;48===s.charCodeAt(--o););return s.slice(0,o+1||1)}function zg(e,t){var r,n,o=e.c,s=t.c,a=e.s,i=t.s,c=e.e,u=t.e;if(!a||!i)return null;if(r=o&&!o[0],n=s&&!s[0],r||n)return r?n?0:-i:a;if(a!=i)return a;if(r=a<0,n=c==u,!o||!s)return n?0:!o^r?1:-1;if(!n)return c>u^r?1:-1;for(i=(c=o.length)<(u=s.length)?c:u,a=0;a<i;a++)if(o[a]!=s[a])return o[a]>s[a]^r?1:-1;return c==u?0:c>u^r?1:-1}function jg(e,t,r,n){if(e<t||e>r||e!==Rg(e))throw Error(xg+(n||\"Argument\")+(\"number\"==typeof e?e<t||e>r?\" out of range: \":\" not an integer: \":\" not a primitive number: \")+String(e))}function Vg(e){var t=e.c.length-1;return Lg(e.e/Fg)==t&&e.c[t]%2!=0}function Gg(e,t){return(e.length>1?e.charAt(0)+\".\"+e.slice(1):e)+(t<0?\"e\":\"e+\")+t}function Hg(e,t,r){var n,o;if(t<0){for(o=r+\".\";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+\".\"+e.slice(t));return e}var Kg=function e(t){var r,n,o,s,a,i,c,u,l,d,f=B.prototype={constructor:B,toString:null,valueOf:null},p=new B(1),h=20,g=4,y=-7,m=21,b=-1e7,w=1e7,T=!1,A=1,v=0,P={prefix:\"\",groupSize:3,secondaryGroupSize:0,groupSeparator:\",\",decimalSeparator:\".\",fractionGroupSize:0,fractionGroupSeparator:\" \",suffix:\"\"},E=\"0123456789abcdefghijklmnopqrstuvwxyz\",C=!0;function B(e,t){var r,s,a,i,c,u,l,d,f=this;if(!(f instanceof B))return new B(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>w?f.c=f.e=null:e.e<b?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((u=\"number\"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,c=e;c>=10;c/=10,i++);return void(i>w?f.c=f.e=null:(f.e=i,f.c=[e]))}d=String(e)}else{if(!Ig.test(d=String(e)))return o(f,d,u);f.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(i=d.indexOf(\".\"))>-1&&(d=d.replace(\".\",\"\")),(c=d.search(/e/i))>0?(i<0&&(i=c),i+=+d.slice(c+1),d=d.substring(0,c)):i<0&&(i=d.length)}else{if(jg(t,2,E.length,\"Base\"),10==t&&C)return _(f=new B(e),h+f.e+1,g);if(d=String(e),u=\"number\"==typeof e){if(0*e!=0)return o(f,d,u,t);if(f.s=1/e<0?(d=d.slice(1),-1):1,B.DEBUG&&d.replace(/^0\\.0*|\\./,\"\").length>15)throw Error(Og+e)}else f.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=E.slice(0,t),i=c=0,l=d.length;c<l;c++)if(r.indexOf(s=d.charAt(c))<0){if(\".\"==s){if(c>i){i=l;continue}}else if(!a&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){a=!0,c=-1,i=0;continue}return o(f,String(e),u,t)}u=!1,(i=(d=n(d,t,10,f.s)).indexOf(\".\"))>-1?d=d.replace(\".\",\"\"):i=d.length}for(c=0;48===d.charCodeAt(c);c++);for(l=d.length;48===d.charCodeAt(--l););if(d=d.slice(c,++l)){if(l-=c,u&&B.DEBUG&&l>15&&(e>kg||e!==Rg(e)))throw Error(Og+f.s*e);if((i=i-c-1)>w)f.c=f.e=null;else if(i<b)f.c=[f.e=0];else{if(f.e=i,f.c=[],c=(i+1)%Fg,i<0&&(c+=Fg),c<l){for(c&&f.c.push(+d.slice(0,c)),l-=Fg;c<l;)f.c.push(+d.slice(c,c+=Fg));c=Fg-(d=d.slice(c)).length}else c-=l;for(;c--;d+=\"0\");f.c.push(+d)}}else f.c=[f.e=0]}function W(e,t,r,n){var o,s,a,i,c;if(null==r?r=g:jg(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=$g(e.c),c=1==n||2==n&&(a<=y||a>=m)?Gg(c,a):Hg(c,a,\"0\");else if(s=(e=_(new B(e),t,r)).e,i=(c=$g(e.c)).length,1==n||2==n&&(t<=s||s<=y)){for(;i<t;c+=\"0\",i++);c=Gg(c,s)}else if(t-=a,c=Hg(c,s,\"0\"),s+1>i){if(--t>0)for(c+=\".\";t--;c+=\"0\");}else if((t+=s-i)>0)for(s+1==i&&(c+=\".\");t--;c+=\"0\");return e.s<0&&o?\"-\"+c:c}function S(e,t){for(var r,n,o=1,s=new B(e[0]);o<e.length;o++)(!(n=new B(e[o])).s||(r=zg(s,n))===t||0===r&&s.s===t)&&(s=n);return s}function I(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*Fg-1)>w?e.c=e.e=null:r<b?e.c=[e.e=0]:(e.e=r,e.c=t),e}function _(e,t,r,n){var o,s,a,i,c,u,l,d=e.c,f=Ng;if(d){e:{for(o=1,i=d[0];i>=10;i/=10,o++);if((s=t-o)<0)s+=Fg,a=t,c=d[u=0],l=Rg(c/f[o-a-1]%10);else if((u=_g((s+1)/Fg))>=d.length){if(!n)break e;for(;d.length<=u;d.push(0));c=l=0,o=1,a=(s%=Fg)-Fg+1}else{for(c=i=d[u],o=1;i>=10;i/=10,o++);l=(a=(s%=Fg)-Fg+o)<0?0:Rg(c/f[o-a-1]%10)}if(n=n||t<0||null!=d[u+1]||(a<0?c:c%f[o-a-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(s>0?a>0?c/f[o-a]:0:d[u-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,n?(t-=e.e+1,d[0]=f[(Fg-t%Fg)%Fg],e.e=-t||0):d[0]=e.e=0,e;if(0==s?(d.length=u,i=1,u--):(d.length=u+1,i=f[Fg-s],d[u]=a>0?Rg(c/f[o-a]%f[a])*i:0),n)for(;;){if(0==u){for(s=1,a=d[0];a>=10;a/=10,s++);for(a=d[0]+=i,i=1;a>=10;a/=10,i++);s!=i&&(e.e++,d[0]==Mg&&(d[0]=1));break}if(d[u]+=i,d[u]!=Mg)break;d[u--]=0,i=1}for(s=d.length;0===d[--s];d.pop());}e.e>w?e.c=e.e=null:e.e<b&&(e.c=[e.e=0])}return e}function R(e){var t,r=e.e;return null===r?e.toString():(t=$g(e.c),t=r<=y||r>=m?Gg(t,r):Hg(t,r,\"0\"),e.s<0?\"-\"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,r;if(null!=e){if(\"object\"!=typeof e)throw Error(xg+\"Object expected: \"+e);if(e.hasOwnProperty(t=\"DECIMAL_PLACES\")&&(jg(r=e[t],0,Dg,t),h=r),e.hasOwnProperty(t=\"ROUNDING_MODE\")&&(jg(r=e[t],0,8,t),g=r),e.hasOwnProperty(t=\"EXPONENTIAL_AT\")&&((r=e[t])&&r.pop?(jg(r[0],-1e9,0,t),jg(r[1],0,Dg,t),y=r[0],m=r[1]):(jg(r,-1e9,Dg,t),y=-(m=r<0?-r:r))),e.hasOwnProperty(t=\"RANGE\"))if((r=e[t])&&r.pop)jg(r[0],-1e9,-1,t),jg(r[1],1,Dg,t),b=r[0],w=r[1];else{if(jg(r,-1e9,Dg,t),!r)throw Error(xg+t+\" cannot be zero: \"+r);b=-(w=r<0?-r:r)}if(e.hasOwnProperty(t=\"CRYPTO\")){if((r=e[t])!==!!r)throw Error(xg+t+\" not true or false: \"+r);if(r){if(\"undefined\"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw T=!r,Error(xg+\"crypto unavailable\");T=r}else T=r}if(e.hasOwnProperty(t=\"MODULO_MODE\")&&(jg(r=e[t],0,9,t),A=r),e.hasOwnProperty(t=\"POW_PRECISION\")&&(jg(r=e[t],0,Dg,t),v=r),e.hasOwnProperty(t=\"FORMAT\")){if(\"object\"!=typeof(r=e[t]))throw Error(xg+t+\" not an object: \"+r);P=r}if(e.hasOwnProperty(t=\"ALPHABET\")){if(\"string\"!=typeof(r=e[t])||/^.?$|[+\\-.\\s]|(.).*\\1/.test(r))throw Error(xg+t+\" invalid: \"+r);C=\"0123456789\"==r.slice(0,10),E=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:g,EXPONENTIAL_AT:[y,m],RANGE:[b,w],CRYPTO:T,MODULO_MODE:A,POW_PRECISION:v,FORMAT:P,ALPHABET:E}},B.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!B.DEBUG)return!0;var t,r,n=e.c,o=e.e,s=e.s;e:if(\"[object Array]\"=={}.toString.call(n)){if((1===s||-1===s)&&o>=-1e9&&o<=Dg&&o===Rg(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%Fg)<1&&(t+=Fg),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=Mg||r!==Rg(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===s||1===s||-1===s))return!0;throw Error(xg+\"Invalid BigNumber: \"+e)},B.maximum=B.max=function(){return S(arguments,-1)},B.minimum=B.min=function(){return S(arguments,1)},B.random=(s=9007199254740992,a=Math.random()*s&2097151?function(){return Rg(Math.random()*s)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,s,i=0,c=[],u=new B(p);if(null==e?e=h:jg(e,0,Dg),o=_g(e/Fg),T)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));i<o;)(s=131072*t[i]+(t[i+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[i]=r[0],t[i+1]=r[1]):(c.push(s%1e14),i+=2);i=o/2}else{if(!crypto.randomBytes)throw T=!1,Error(xg+\"crypto unavailable\");for(t=crypto.randomBytes(o*=7);i<o;)(s=281474976710656*(31&t[i])+1099511627776*t[i+1]+4294967296*t[i+2]+16777216*t[i+3]+(t[i+4]<<16)+(t[i+5]<<8)+t[i+6])>=9e15?crypto.randomBytes(7).copy(t,i):(c.push(s%1e14),i+=7);i=o/7}if(!T)for(;i<o;)(s=a())<9e15&&(c[i++]=s%1e14);for(o=c[--i],e%=Fg,o&&e&&(s=Ng[Fg-e],c[i]=Rg(o/s)*s);0===c[i];c.pop(),i--);if(i<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=Fg);for(i=1,s=c[0];s>=10;s/=10,i++);i<Fg&&(n-=Fg-i)}return u.e=n,u.c=c,u}),B.sum=function(){for(var e=1,t=arguments,r=new B(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e=\"0123456789\";function t(e,t,r,n){for(var o,s,a=[0],i=0,c=e.length;i<c;){for(s=a.length;s--;a[s]*=t);for(a[0]+=n.indexOf(e.charAt(i++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,s,a,i){var c,u,l,d,f,p,y,m,b=n.indexOf(\".\"),w=h,T=g;for(b>=0&&(d=v,v=0,n=n.replace(\".\",\"\"),p=(m=new B(o)).pow(n.length-b),v=d,m.c=t(Hg($g(p.c),p.e,\"0\"),10,s,e),m.e=m.c.length),l=d=(y=t(n,o,s,i?(c=E,e):(c=e,E))).length;0==y[--d];y.pop());if(!y[0])return c.charAt(0);if(b<0?--l:(p.c=y,p.e=l,p.s=a,y=(p=r(p,m,w,T,s)).c,f=p.r,l=p.e),b=y[u=l+w+1],d=s/2,f=f||u<0||null!=y[u+1],f=T<4?(null!=b||f)&&(0==T||T==(p.s<0?3:2)):b>d||b==d&&(4==T||f||6==T&&1&y[u-1]||T==(p.s<0?8:7)),u<1||!y[0])n=f?Hg(c.charAt(1),-w,c.charAt(0)):c.charAt(0);else{if(y.length=u,f)for(--s;++y[--u]>s;)y[u]=0,u||(++l,y=[1].concat(y));for(d=y.length;!y[--d];);for(b=0,n=\"\";b<=d;n+=c.charAt(y[b++]));n=Hg(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,s,a,i=0,c=e.length,u=t%Ug,l=t/Ug|0;for(e=e.slice();c--;)i=((o=u*(s=e[c]%Ug)+(n=l*s+(a=e[c]/Ug|0)*u)%Ug*Ug+i)/r|0)+(n/Ug|0)+l*a,e[c]=o%r;return i&&(e=[i].concat(e)),e}function t(e,t,r,n){var o,s;if(r!=n)s=r>n?1:-1;else for(o=s=0;o<r;o++)if(e[o]!=t[o]){s=e[o]>t[o]?1:-1;break}return s}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,s,a,i){var c,u,l,d,f,p,h,g,y,m,b,w,T,A,v,P,E,C=n.s==o.s?1:-1,W=n.c,S=o.c;if(!(W&&W[0]&&S&&S[0]))return new B(n.s&&o.s&&(W?!S||W[0]!=S[0]:S)?W&&0==W[0]||!S?0*C:C/0:NaN);for(y=(g=new B(C)).c=[],C=s+(u=n.e-o.e)+1,i||(i=Mg,u=Lg(n.e/Fg)-Lg(o.e/Fg),C=C/Fg|0),l=0;S[l]==(W[l]||0);l++);if(S[l]>(W[l]||0)&&u--,C<0)y.push(1),d=!0;else{for(A=W.length,P=S.length,l=0,C+=2,(f=Rg(i/(S[0]+1)))>1&&(S=e(S,f,i),W=e(W,f,i),P=S.length,A=W.length),T=P,b=(m=W.slice(0,P)).length;b<P;m[b++]=0);E=S.slice(),E=[0].concat(E),v=S[0],S[1]>=i/2&&v++;do{if(f=0,(c=t(S,m,P,b))<0){if(w=m[0],P!=b&&(w=w*i+(m[1]||0)),(f=Rg(w/v))>1)for(f>=i&&(f=i-1),h=(p=e(S,f,i)).length,b=m.length;1==t(p,m,h,b);)f--,r(p,P<h?E:S,h,i),h=p.length,c=1;else 0==f&&(c=f=1),h=(p=S.slice()).length;if(h<b&&(p=[0].concat(p)),r(m,p,b,i),b=m.length,-1==c)for(;t(S,m,P,b)<1;)f++,r(m,P<b?E:S,b,i),b=m.length}else 0===c&&(f++,m=[0]);y[l++]=f,m[0]?m[b++]=W[T]||0:(m=[W[T]],b=1)}while((T++<A||null!=m[0])&&C--);d=null!=m[0],y[0]||y.splice(0,1)}if(i==Mg){for(l=1,C=y[0];C>=10;C/=10,l++);_(g,s+(g.e=l+u*Fg-1)+1,a,d)}else g.e=u,g.r=+d;return g}}(),i=/^(-?)0([xbo])(?=\\w[\\w.]*$)/i,c=/^([^.]+)\\.$/,u=/^\\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,d=/^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g,o=function(e,t,r,n){var o,s=r?t:t.replace(d,\"\");if(l.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(i,function(e,t,r){return o=\"x\"==(r=r.toLowerCase())?16:\"b\"==r?2:8,n&&n!=o?e:t}),n&&(o=n,s=s.replace(c,\"$1\").replace(u,\"0.$1\")),t!=s))return new B(s,o);if(B.DEBUG)throw Error(xg+\"Not a\"+(n?\" base \"+n:\"\")+\" number: \"+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return zg(this,new B(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o,s=this;if(null!=e)return jg(e,0,Dg),null==t?t=g:jg(t,0,8),_(new B(s),e+s.e+1,t);if(!(r=s.c))return null;if(n=((o=r.length-1)-Lg(this.e/Fg))*Fg,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,t){return r(this,new B(e,t),h,g)},f.dividedToIntegerBy=f.idiv=function(e,t){return r(this,new B(e,t),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,s,a,i,c,u,l=this;if((e=new B(e)).c&&!e.isInteger())throw Error(xg+\"Exponent not an integer: \"+R(e));if(null!=t&&(t=new B(t)),a=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new B(Math.pow(+R(l),a?e.s*(2-Vg(e)):+R(e))),t?u.mod(t):u;if(i=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(n=!i&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||a&&l.c[1]>=24e7:l.c[0]<8e13||a&&l.c[0]<=9999975e7)))return s=l.s<0&&Vg(e)?-0:0,l.e>-1&&(s=1/s),new B(i?1/s:s);v&&(s=_g(v/Fg+2))}for(a?(r=new B(.5),i&&(e.s=1),c=Vg(e)):c=(o=Math.abs(+R(e)))%2,u=new B(p);;){if(c){if(!(u=u.times(l)).c)break;s?u.c.length>s&&(u.c.length=s):n&&(u=u.mod(t))}if(o){if(0===(o=Rg(o/2)))break;c=o%2}else if(_(e=e.times(r),e.e+1,1),e.e>14)c=Vg(e);else{if(0===(o=+R(e)))break;c=o%2}l=l.times(l),s?l.c&&l.c.length>s&&(l.c.length=s):n&&(l=l.mod(t))}return n?u:(i&&(u=p.div(u)),t?u.mod(t):s?_(u,v,g,undefined):u)},f.integerValue=function(e){var t=new B(this);return null==e?e=g:jg(e,0,8),_(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===zg(this,new B(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return zg(this,new B(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=zg(this,new B(e,t)))||0===t},f.isInteger=function(){return!!this.c&&Lg(this.e/Fg)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return zg(this,new B(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=zg(this,new B(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,s,a=this,i=a.s;if(t=(e=new B(e,t)).s,!i||!t)return new B(NaN);if(i!=t)return e.s=-t,a.plus(e);var c=a.e/Fg,u=e.e/Fg,l=a.c,d=e.c;if(!c||!u){if(!l||!d)return l?(e.s=-t,e):new B(d?a:NaN);if(!l[0]||!d[0])return d[0]?(e.s=-t,e):new B(l[0]?a:3==g?-0:0)}if(c=Lg(c),u=Lg(u),l=l.slice(),i=c-u){for((s=i<0)?(i=-i,o=l):(u=c,o=d),o.reverse(),t=i;t--;o.push(0));o.reverse()}else for(n=(s=(i=l.length)<(t=d.length))?i:t,i=t=0;t<n;t++)if(l[t]!=d[t]){s=l[t]<d[t];break}if(s&&(o=l,l=d,d=o,e.s=-e.s),(t=(n=d.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=99999999999999;n>i;){if(l[--n]<d[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=Mg}l[n]-=d[n]}for(;0==l[0];l.splice(0,1),--u);return l[0]?I(e,l,u):(e.s=3==g?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,t){var n,o,s=this;return e=new B(e,t),!s.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||s.c&&!s.c[0]?new B(s):(9==A?(o=e.s,e.s=1,n=r(s,e,0,3),e.s=o,n.s*=o):n=r(s,e,0,A),(e=s.minus(n.times(e))).c[0]||1!=A||(e.s=s.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,o,s,a,i,c,u,l,d,f,p,h,g,y,m=this,b=m.c,w=(e=new B(e,t)).c;if(!(b&&w&&b[0]&&w[0]))return!m.s||!e.s||b&&!b[0]&&!w||w&&!w[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=Lg(m.e/Fg)+Lg(e.e/Fg),e.s*=m.s,(c=b.length)<(d=w.length)&&(h=b,b=w,w=h,o=c,c=d,d=o),o=c+d,h=[];o--;h.push(0));for(g=Mg,y=Ug,o=d;--o>=0;){for(r=0,f=w[o]%y,p=w[o]/y|0,s=o+(a=c);s>o;)r=((u=f*(u=b[--a]%y)+(i=p*u+(l=b[a]/y|0)*f)%y*y+h[s]+r)/g|0)+(i/y|0)+p*l,h[s--]=u%g;h[s]=r}return r?++n:h.splice(0,1),I(e,h,n)},f.negated=function(){var e=new B(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new B(e,t)).s,!o||!t)return new B(NaN);if(o!=t)return e.s=-t,n.minus(e);var s=n.e/Fg,a=e.e/Fg,i=n.c,c=e.c;if(!s||!a){if(!i||!c)return new B(o/0);if(!i[0]||!c[0])return c[0]?e:new B(i[0]?n:0*o)}if(s=Lg(s),a=Lg(a),i=i.slice(),o=s-a){for(o>0?(a=s,r=c):(o=-o,r=i),r.reverse();o--;r.push(0));r.reverse()}for((o=i.length)-(t=c.length)<0&&(r=c,c=i,i=r,t=o),o=0;t;)o=(i[--t]=i[t]+c[t]+o)/Mg|0,i[t]=Mg===i[t]?0:i[t]%Mg;return o&&(i=[o].concat(i),++a),I(e,i,a)},f.precision=f.sd=function(e,t){var r,n,o,s=this;if(null!=e&&e!==!!e)return jg(e,1,Dg),null==t?t=g:jg(t,0,8),_(new B(s),e,t);if(!(r=s.c))return null;if(n=(o=r.length-1)*Fg+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&s.e+1>n&&(n=s.e+1),n},f.shiftedBy=function(e){return jg(e,-9007199254740991,kg),this.times(\"1e\"+e)},f.squareRoot=f.sqrt=function(){var e,t,n,o,s,a=this,i=a.c,c=a.s,u=a.e,l=h+4,d=new B(\"0.5\");if(1!==c||!i||!i[0])return new B(!c||c<0&&(!i||i[0])?NaN:i?a:1/0);if(0==(c=Math.sqrt(+R(a)))||c==1/0?(((t=$g(i)).length+u)%2==0&&(t+=\"0\"),c=Math.sqrt(+t),u=Lg((u+1)/2)-(u<0||u%2),n=new B(t=c==1/0?\"5e\"+u:(t=c.toExponential()).slice(0,t.indexOf(\"e\")+1)+u)):n=new B(c+\"\"),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(s=n,n=d.times(s.plus(r(a,s,l,1))),$g(s.c).slice(0,c)===(t=$g(n.c)).slice(0,c)){if(n.e<u&&--c,\"9999\"!=(t=t.slice(c-3,c+1))&&(o||\"4999\"!=t)){+t&&(+t.slice(1)||\"5\"!=t.charAt(0))||(_(n,n.e+h+2,1),e=!n.times(n).eq(a));break}if(!o&&(_(s,s.e+h+2,0),s.times(s).eq(a))){n=s;break}l+=4,c+=4,o=1}return _(n,n.e+h+1,g,e)},f.toExponential=function(e,t){return null!=e&&(jg(e,0,Dg),e++),W(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(jg(e,0,Dg),e=e+this.e+1),W(this,e,t)},f.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&\"object\"==typeof t?(r=t,t=null):e&&\"object\"==typeof e?(r=e,e=t=null):r=P;else if(\"object\"!=typeof r)throw Error(xg+\"Argument not an object: \"+r);if(n=o.toFixed(e,t),o.c){var s,a=n.split(\".\"),i=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||\"\",l=a[0],d=a[1],f=o.s<0,p=f?l.slice(1):l,h=p.length;if(c&&(s=i,i=c,c=s,h-=s),i>0&&h>0){for(s=h%i||i,l=p.substr(0,s);s<h;s+=i)l+=u+p.substr(s,i);c>0&&(l+=u+p.slice(s)),f&&(l=\"-\"+l)}n=d?l+(r.decimalSeparator||\"\")+((c=+r.fractionGroupSize)?d.replace(new RegExp(\"\\\\d{\"+c+\"}\\\\B\",\"g\"),\"$&\"+(r.fractionGroupSeparator||\"\")):d):l}return(r.prefix||\"\")+n+(r.suffix||\"\")},f.toFraction=function(e){var t,n,o,s,a,i,c,u,l,d,f,h,y=this,m=y.c;if(null!=e&&(!(c=new B(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(xg+\"Argument \"+(c.isInteger()?\"out of range: \":\"not an integer: \")+R(c));if(!m)return new B(y);for(t=new B(p),l=n=new B(p),o=u=new B(p),h=$g(m),a=t.e=h.length-y.e-1,t.c[0]=Ng[(i=a%Fg)<0?Fg+i:i],e=!e||c.comparedTo(t)>0?a>0?t:l:c,i=w,w=1/0,c=new B(h),u.c[0]=0;d=r(c,t,0,1),1!=(s=n.plus(d.times(o))).comparedTo(e);)n=o,o=s,l=u.plus(d.times(s=l)),u=s,t=c.minus(d.times(s=t)),c=s;return s=r(e.minus(n),o,0,1),u=u.plus(s.times(l)),n=n.plus(s.times(o)),u.s=l.s=y.s,f=r(l,o,a*=2,g).minus(y).abs().comparedTo(r(u,n,a,g).minus(y).abs())<1?[l,o]:[u,n],w=i,f},f.toNumber=function(){return+R(this)},f.toPrecision=function(e,t){return null!=e&&jg(e,1,Dg),W(this,e,t,2)},f.toString=function(e){var t,r=this,o=r.s,s=r.e;return null===s?o?(t=\"Infinity\",o<0&&(t=\"-\"+t)):t=\"NaN\":(null==e?t=s<=y||s>=m?Gg($g(r.c),s):Hg($g(r.c),s,\"0\"):10===e&&C?t=Hg($g((r=_(new B(r),h+s+1,g)).c),r.e,\"0\"):(jg(e,2,E.length,\"Base\"),t=n(Hg($g(r.c),s,\"0\"),10,e,o,!0)),o<0&&r.c[0]&&(t=\"-\"+t)),t},f.valueOf=f.toJSON=function(){return R(this)},f._isBigNumber=!0,f[Symbol.toStringTag]=\"BigNumber\",f[Symbol.for(\"nodejs.util.inspect.custom\")]=f.valueOf,null!=t&&B.set(t),B}();var qg=r(2220);function Zg(e){return\"string\"==typeof e&&qg.isURL(e.toString(),{protocols:[\"http\",\"https\"],require_tld:!1})}function Jg(e){return e===Object(e)&&\"[object Array]\"!==Object.prototype.toString.call(e)}function Yg(e){return Array.isArray(e)}function Xg(e){try{return!!JSON.parse(e)}catch(e){return!1}}function Qg(e){return\"boolean\"==typeof e}function ey(e){return!!e&&(e instanceof Kg||e.constructor&&\"BigNumber\"===e.constructor.name)}function ty(e){return\"string\"==typeof e||!!e&&e.constructor&&\"String\"===e.constructor.name}function ry(e){return\"function\"==typeof e}function ny(e){return\"string\"==typeof e&&!isNaN(parseInt(e,16))&&/^(0x|)[a-fA-F0-9]+$/.test(e)}function oy(e){return null!==e&&Number.isInteger(Number(e))}function sy(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ay(e,...t){return t.length&&!t.map(t=>sy(e,t)).includes(!1)}function iy(e){const t={block:e.block_number,timestamp:e.block_timestamp,contract:e.contract_address,name:e.event_name,transaction:e.transaction_id,result:e.result,resourceNode:e.resource_Node||(e._unconfirmed?\"fullNode\":\"solidityNode\")};return e._unconfirmed&&(t.unconfirmed=e._unconfirmed),e._fingerprint&&(t.fingerprint=e._fingerprint),t}function cy(e,{inputs:t}){if(!e.result)return e;if(Jg(e.result))for(let r=0;r<t.length;r++){const n=t[r];\"address\"==n.type&&n.name in e.result&&(e.result[n.name]=po+e.result[n.name].substr(2).toLowerCase())}else Yg(e.result)&&(e.result=e.result.reduce((e,r,n)=>{const{name:o,type:s}=t[n];return\"address\"==s&&(r=po+r.substr(2).toLowerCase()),e[o]=r,e},{}));return e}function uy(e,t,r){let n=e.toString();for(;n.length<r;)n=t+n;return n}function ly(e){return null!=e}async function dy(e=1e3){return new Promise(t=>setTimeout(t,e))}function fy(e){return ny(e)?og(Po(e.replace(/^0x/,po))):e}function py(e){return ny(e)?e.toLowerCase().replace(/^0x/,po):co(sg(e)).toLowerCase()}function hy(e){if(!my(e))throw new Error(`'${e}' is not a valid address string`);return function(e){const t=(e=e.toLowerCase()).substring(2).split(\"\"),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=Po(oi(r).slice(2));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return po+t.join(\"\")}(py(e))}function gy(e){if(!ny(e)||42!==e.length)return!1;try{return hy(e)===e}catch{return!1}}function yy(e,t=!1){try{return Pg(e,t)}catch{return!1}}function my(e){if(!e||!ty(e))return!1;if(42===e.length)try{return my(og(Po(e)))}catch(e){return!1}try{return gg(e)}catch(e){return!1}}const by=new Vu;function wy(e){return py(e).replace(go,\"0x\")}function Ty(e,t,r,n=!1){if(n&&r.replace(/^0x/,\"\").length%64==8&&(r=\"0x\"+r.replace(/^0x/,\"\").substring(8)),r.replace(/^0x/,\"\").length%64)throw new Error(\"The encoded string is not valid. Its length must be a multiple of 64.\");return t=t.map(e=>(/trcToken/.test(e)&&(e=e.replace(/trcToken/,\"uint256\")),e)),by.decode(t,r).reduce((r,n,o)=>(\"address\"==t[o]&&(n=po+n.substr(2).toLowerCase()),e.length?r[e[o]]=n:r.push(n),r),e.length?{}:[])}function Ay(e,t){for(let r=0;r<e.length;r++)\"address\"===e[r]&&(t[r]=wy(t[r]));return by.encode(e,t)}function vy(e){const t=e.match(/([a-zA-Z0-9])(\\[.*\\])/);return t?t[2]:\"\"}function Py(e){return(vy(e).match(/\\]\\[/g)||[]).length+1}function Ey(e,t){const r=[],n=e=>{if(e&&0===e.type.indexOf(\"tuple\")&&e.components){return`tuple(${e.components.map(e=>n(e)).join(\",\")})${vy(e.type)}`}return/trcToken/.test(e.type)?e.type.replace(/trcToken/,\"uint256\"):e.type},o=e=>Array.isArray(e)?(e.forEach((t,r)=>{e[r]=o(t)}),e):wy(e),s=(e,t,r)=>{r>1?t.length&&t.forEach(t=>{s(e,t,r-1)}):t.length&&r&&t.forEach(t=>{a(e,t)})},a=(e=[],t)=>{e.length&&e.forEach((e,r)=>{const n=e.type;if(t[r])if(\"address\"===n)t[r]=wy(t[r]);else if(\"address[\"===n.match(/^([^\\x5b]*)(\\x5b|$)/)[0])o(t[r]);else if(0===n.indexOf(\"tuple\"))if(vy(n)){const o=Py(n);s(e.components,t[r],o)}else a(e.components,t[r])})};if(e.inputs&&e.inputs.length)for(let o=0;o<e.inputs.length;o++){const s=e.inputs[o].type;\"bool\"===s&&\"false\"===t[o]&&(t[o]=!1),r.push(0===s.indexOf(\"tuple\")?n(e.inputs[o]):s),t.length<r.length&&t.push(\"\")}return a(e.inputs,t),(e=>{for(let t=0;t<e.length;t++){const r=e[t];/trcToken/.test(r)&&(e[t]=r.replace(/trcToken/,\"uint256\"))}})(r),by.encode(r,t)}function Cy(e,t){const r=e=>Array.isArray(e)?(e.forEach((t,n)=>{e[n]=r(t)}),e):py(e),n=(e,t,r)=>{r>1?t.length&&t.forEach(t=>{n(e,t,r-1)}):t.length&&r&&t.forEach(t=>{a(e,t)})},o=e=>{const t=e.name?` ${e.name}`:\"\";if(e&&0===e.type.indexOf(\"tuple\")&&e.components){return`tuple(${e.components.map(e=>o(e)).join(\",\")})${vy(e.type)}${t}`}return/trcToken/.test(e.type)?e.type.replace(/trcToken/,\"uint256\")+t:e.type+t},s=(e,t,r)=>{t&&![\"length\"].includes(t)&&(e[t]=r)},a=(e,t)=>{e.length&&e.forEach((e,o)=>{const{type:i,name:c}=e;if(t[o])if(\"address\"===i)t[o]=py(t[o]),s(t,c,py(t[o]));else if(\"address[\"===i.match(/^([^\\x5b]*)(\\x5b|$)/)[0])r(t[o]),s(t,c,r(t[o]));else if(0===i.indexOf(\"tuple\")){if(vy(i)){const r=Py(i);n(e.components,t[o],r)}else a(e.components,t[o]);s(t,c,t[o])}else s(t,c,t[o]);else s(t,c,t[o])})};if(\"outputs\"in e&&e.outputs&&e.outputs.length>0){const r=[];for(let t=0;t<e.outputs.length;t++){const n=e.outputs[t].type,s=e.outputs[t].name?` ${e.outputs[t].name}`:\"\";r.push(0===n.indexOf(\"tuple\")?o(e.outputs[t]):n+s)}(e=>{for(let t=0;t<e.length;t++){const r=e[t];/^trcToken/.test(r)&&(e[t]=r.replace(/^trcToken/,\"uint256\"))}})(r),t&&t.length||(t=new Uint8Array(32*e.outputs.length));const n=by.decode(r,t).toArray(!0);return a(e.outputs,n),n}return[]}const By=\"\u0019TRON Signed Message:\\n\";function Wy(e){return\"string\"==typeof e?e=Na(e):Array.isArray(e)&&(e=new Uint8Array(e)),oi(Qo([Na(By),Na(String(e.length)),e]))}function Sy(e,t){t.match(/^0x/)||(t=\"0x\"+t);const r=new Oc(t),n=Wy(e),o=r.sign(n);return Sp(o)}function Iy(e,t){t.match(/^0x/)||(t=\"0x\"+t);return og(Po(Fc(Wy(e),t).replace(/^0x/,po)))}const _y=new Uint8Array(32);_y.fill(0);const Ry=BigInt(-1),xy=BigInt(0),Oy=BigInt(1),My=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");const Fy=hs(Oy,32),ky=hs(xy,32),Ny={name:\"string\",version:\"string\",chainId:\"uint256\",verifyingContract:\"address\",salt:\"bytes32\"},Uy=[\"name\",\"version\",\"chainId\",\"verifyingContract\",\"salt\"];function Dy(e){return function(t){return $o(\"string\"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const Ly={name:Dy(\"name\"),version:Dy(\"version\"),chainId:function(e){const t=us(e,\"domain.chainId\");return $o(t>=0,\"invalid chain ID\",\"domain.chainId\",e),Number.isSafeInteger(t)?Number(t):ys(t)},verifyingContract:function(e){try{return(t=e,py(t)).toLowerCase()}catch(e){}var t;$o(!1,'invalid domain value \"verifyingContract\"',\"domain.verifyingContract\",e)},salt:function(e){const t=Ko(e,\"domain.salt\");return $o(32===t.length,'invalid domain value \"salt\"',\"domain.salt\",e),Xo(t)}};function $y(e){{const t=e.match(/^(u?)int(\\d*)$/);if(t){const r=\"\"===t[1],n=parseInt(t[2]||\"256\");$o(n%8==0&&0!==n&&n<=256&&(null==t[2]||t[2]===String(n)),\"invalid numeric width\",\"type\",e);const o=cs(My,r?n-1:n),s=r?(o+Oy)*Ry:xy;return function(t){const n=us(t,\"value\");return $o(n>=s&&n<=o,`value out-of-bounds for ${e}`,\"value\",n),hs(r?is(n,256):n,32)}}}{const t=e.match(/^bytes(\\d+)$/);if(t){const r=parseInt(t[1]);return $o(0!==r&&r<=32&&t[1]===String(r),\"invalid bytes width\",\"type\",e),function(t){return $o(Ko(t).length===r,`invalid length for ${e}`,\"value\",t),function(e){const t=Ko(e),r=t.length%32;return r?Qo([t,_y.slice(r)]):Xo(t)}(t)}}}switch(e){case\"trcToken\":return $y(\"uint256\");case\"address\":return function(e){return ns(py(e).replace(go,\"0x\"),32)};case\"bool\":return function(e){return e?Fy:ky};case\"bytes\":return function(e){return oi(e)};case\"string\":return function(e){return si(e)}}return null}function zy(e,t){return`${e}(${t.map(({name:e,type:t})=>t+\" \"+e).join(\",\")})`}class jy{primaryType;#L;get types(){return JSON.parse(this.#L)}#$;#z;constructor(e){this.#L=JSON.stringify(e),this.#$=new Map,this.#z=new Map;const t=new Map,r=new Map,n=new Map;Object.keys(e).forEach(e=>{t.set(e,new Set),r.set(e,[]),n.set(e,new Set)});for(const n in e){const o=new Set;for(const s of e[n]){$o(!o.has(s.name),`duplicate variable name ${JSON.stringify(s.name)} in ${JSON.stringify(n)}`,\"types\",e),o.add(s.name);const a=s.type.match(/^([^\\x5b]*)(\\x5b|$)/)[1]||null;$o(a!==n,`circular type reference to ${JSON.stringify(a)}`,\"types\",e);$y(a)||($o(r.has(a),`unknown type ${JSON.stringify(a)}`,\"types\",e),r.get(a).push(n),t.get(n).add(a))}}const o=Array.from(r.keys()).filter(e=>0===r.get(e).length);$o(0!==o.length,\"missing primary type\",\"types\",e),$o(1===o.length,`ambiguous primary types or unused types: ${o.map(e=>JSON.stringify(e)).join(\", \")}`,\"types\",e),ko(this,{primaryType:o[0]}),function o(s,a){$o(!a.has(s),`circular type reference to ${JSON.stringify(s)}`,\"types\",e),a.add(s);for(const e of t.get(s))if(r.has(e)){o(e,a);for(const t of a)n.get(t).add(e)}a.delete(s)}(this.primaryType,new Set);for(const[t,r]of n){const n=Array.from(r);n.sort(),this.#$.set(t,zy(t,e[t])+n.map(t=>zy(t,e[t])).join(\"\"))}}getEncoder(e){let t=this.#z.get(e);return t||(t=this.#j(e),this.#z.set(e,t)),t}#j(e){{const t=$y(e);if(t)return t}const t=e.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e);return n=>{$o(!t[3]||parseInt(t[3])===n.length,`array length mismatch; expected length ${parseInt(t[3])}`,\"value\",n);let o=n.map(r);return this.#$.has(e)&&(o=o.map(oi)),oi(Qo(o))}}const r=this.types[e];if(r){const t=si(this.#$.get(e));return e=>{const n=r.map(({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this.#$.has(r)?oi(n):n});return n.unshift(t),Qo(n)}}$o(!1,`unknown type: ${e}`,\"type\",e)}encodeType(e){const t=this.#$.get(e);return $o(t,`unknown type: ${JSON.stringify(e)}`,\"name\",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return oi(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if($y(e))return r(e,t);const n=e.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);if(n)return $o(!n[3]||parseInt(n[3])===t.length,`array length mismatch; expected length ${parseInt(n[3])}`,\"value\",t),t.map(e=>this._visit(n[1],e,r));const o=this.types[e];if(o)return o.reduce((e,{name:n,type:o})=>(e[n]=this._visit(o,t[n],r),e),{});$o(!1,`unknown type: ${e}`,\"type\",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new jy(e)}static getPrimaryType(e){return jy.from(e).primaryType}static hashStruct(e,t,r){return jy.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=Ny[r];$o(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,\"domain\",e),t.push({name:r,type:n})}return t.sort((e,t)=>Uy.indexOf(e.name)-Uy.indexOf(t.name)),jy.hashStruct(\"EIP712Domain\",{EIP712Domain:t},e)}static encode(e,t,r){return Qo([\"0x1901\",jy.hashDomain(e),jy.from(t).hash(r)])}static hash(e,t,r){return oi(jy.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const o={};e.verifyingContract&&!Zo(e.verifyingContract,20)&&(o[e.verifyingContract]=\"0x\");const s=jy.from(t);s.visit(r,(e,t)=>(\"address\"!==e||Zo(t,20)||(o[t]=\"0x\"),t));for(const e in o)o[e]=await n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),{domain:e,value:r=s.visit(r,(e,t)=>\"address\"===e&&o[t]?o[t]:t)}}static getPayload(e,t,r){jy.hashDomain(e);const n={},o=[];Uy.forEach(t=>{const r=e[t];null!=r&&(n[t]=Ly[t](r),o.push({name:t,type:Ny[t]}))});const s=jy.from(t),a=Object.assign({},t);return $o(null==a.EIP712Domain,\"types must not contain EIP712Domain type\",\"types.EIP712Domain\",t),a.EIP712Domain=o,s.encode(r),{types:a,domain:n,primaryType:s.primaryType,message:s.visit(r,(e,t)=>{if(e.match(/^bytes(\\d*)/))return Xo(Ko(t));if(e.match(/^u?int/))return us(t).toString();switch(e){case\"trcToken\":return us(t).toString();case\"address\":return t.toLowerCase();case\"bool\":return!!t;case\"string\":return $o(\"string\"==typeof t,\"invalid string\",\"value\",t),t}$o(!1,\"unsupported type\",\"type\",e)})}}}function Vy(e,t,r,n){const o=`0x${n.replace(/^0x/,\"\")}`,s=new Oc(o),a=jy.hash(e,t,r),i=s.sign(a);return[\"0x\",i.r.substring(2),i.s.substring(2),Number(i.v).toString(16)].join(\"\")}function Gy(e,t,r,n){return Fc(jy.hash(e,t,r),n)}var Hy=r(5358);r(4856),r(6919),r(139),r(504),r(4781),r(4078),r(7724),r(8462),r(8099),r(5226);function Ky(e,t){return function(){return e.apply(t,arguments)}}const{toString:qy}=Object.prototype,{getPrototypeOf:Zy}=Object,{iterator:Jy,toStringTag:Yy}=Symbol,Xy=(Qy=Object.create(null),e=>{const t=qy.call(e);return Qy[t]||(Qy[t]=t.slice(8,-1).toLowerCase())});var Qy;const em=e=>(e=e.toLowerCase(),t=>Xy(t)===e),tm=e=>t=>typeof t===e,{isArray:rm}=Array,nm=tm(\"undefined\");function om(e){return null!==e&&!nm(e)&&null!==e.constructor&&!nm(e.constructor)&&im(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const sm=em(\"ArrayBuffer\");const am=tm(\"string\"),im=tm(\"function\"),cm=tm(\"number\"),um=e=>null!==e&&\"object\"==typeof e,lm=e=>{if(\"object\"!==Xy(e))return!1;const t=Zy(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Yy in e||Jy in e)},dm=em(\"Date\"),fm=em(\"File\"),pm=em(\"Blob\"),hm=em(\"FileList\"),gm=em(\"URLSearchParams\"),[ym,mm,bm,wm]=[\"ReadableStream\",\"Request\",\"Response\",\"Headers\"].map(em);function Tm(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if(\"object\"!=typeof e&&(e=[e]),rm(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(om(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(n=0;n<s;n++)a=o[n],t.call(null,e[a],a,e)}}function Am(e,t){if(om(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const vm=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:global,Pm=e=>!nm(e)&&e!==vm;const Em=(Cm=\"undefined\"!=typeof Uint8Array&&Zy(Uint8Array),e=>Cm&&e instanceof Cm);var Cm;const Bm=em(\"HTMLFormElement\"),Wm=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Sm=em(\"RegExp\"),Im=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Tm(r,(r,o)=>{let s;!1!==(s=t(r,o,e))&&(n[o]=s||r)}),Object.defineProperties(e,n)};const _m=em(\"AsyncFunction\"),Rm=(xm=\"function\"==typeof setImmediate,Om=im(vm.postMessage),xm?setImmediate:Om?(Mm=`axios@${Math.random()}`,Fm=[],vm.addEventListener(\"message\",({source:e,data:t})=>{e===vm&&t===Mm&&Fm.length&&Fm.shift()()},!1),e=>{Fm.push(e),vm.postMessage(Mm,\"*\")}):e=>setTimeout(e));var xm,Om,Mm,Fm;const km=\"undefined\"!=typeof queueMicrotask?queueMicrotask.bind(vm):\"undefined\"!=typeof process&&process.nextTick||Rm,Nm={isArray:rm,isArrayBuffer:sm,isBuffer:om,isFormData:e=>{let t;return e&&(\"function\"==typeof FormData&&e instanceof FormData||im(e.append)&&(\"formdata\"===(t=Xy(e))||\"object\"===t&&im(e.toString)&&\"[object FormData]\"===e.toString()))},isArrayBufferView:function(e){let t;return t=\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&sm(e.buffer),t},isString:am,isNumber:cm,isBoolean:e=>!0===e||!1===e,isObject:um,isPlainObject:lm,isEmptyObject:e=>{if(!um(e)||om(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:ym,isRequest:mm,isResponse:bm,isHeaders:wm,isUndefined:nm,isDate:dm,isFile:fm,isBlob:pm,isRegExp:Sm,isFunction:im,isStream:e=>um(e)&&im(e.pipe),isURLSearchParams:gm,isTypedArray:Em,isFileList:hm,forEach:Tm,merge:function e(){const{caseless:t,skipUndefined:r}=Pm(this)&&this||{},n={},o=(o,s)=>{const a=t&&Am(n,s)||s;lm(n[a])&&lm(o)?n[a]=e(n[a],o):lm(o)?n[a]=e({},o):rm(o)?n[a]=o.slice():r&&nm(o)||(n[a]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Tm(arguments[e],o);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(Tm(t,(t,n)=>{r&&im(t)?e[n]=Ky(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\"\"),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,\"super\",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,s,a;const i={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],n&&!n(a,e,t)||i[a]||(t[a]=e[a],i[a]=!0);e=!1!==r&&Zy(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Xy,kindOfTest:em,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(rm(e))return e;let t=e.length;if(!cm(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Jy]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:Bm,hasOwnProperty:Wm,hasOwnProp:Wm,reduceDescriptors:Im,freezeMethods:e=>{Im(e,(t,r)=>{if(im(e)&&-1!==[\"arguments\",\"caller\",\"callee\"].indexOf(r))return!1;const n=e[r];im(n)&&(t.enumerable=!1,\"writable\"in t?t.writable=!1:t.set||(t.set=()=>{throw Error(\"Can not rewrite read-only method '\"+r+\"'\")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return rm(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Am,global:vm,isContextDefined:Pm,isSpecCompliantForm:function(e){return!!(e&&im(e.append)&&\"FormData\"===e[Yy]&&e[Jy])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(um(e)){if(t.indexOf(e)>=0)return;if(om(e))return e;if(!(\"toJSON\"in e)){t[n]=e;const o=rm(e)?[]:{};return Tm(e,(e,t)=>{const s=r(e,n+1);!nm(s)&&(o[t]=s)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:_m,isThenable:e=>e&&(um(e)||im(e))&&im(e.then)&&im(e.catch),setImmediate:Rm,asap:km,isIterable:e=>null!=e&&im(e[Jy])};function Um(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name=\"AxiosError\",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}Nm.inherits(Um,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:Nm.toJSONObject(this.config),code:this.code,status:this.status}}});const Dm=Um.prototype,Lm={};[\"ERR_BAD_OPTION_VALUE\",\"ERR_BAD_OPTION\",\"ECONNABORTED\",\"ETIMEDOUT\",\"ERR_NETWORK\",\"ERR_FR_TOO_MANY_REDIRECTS\",\"ERR_DEPRECATED\",\"ERR_BAD_RESPONSE\",\"ERR_BAD_REQUEST\",\"ERR_CANCELED\",\"ERR_NOT_SUPPORT\",\"ERR_INVALID_URL\"].forEach(e=>{Lm[e]={value:e}}),Object.defineProperties(Um,Lm),Object.defineProperty(Dm,\"isAxiosError\",{value:!0}),Um.from=(e,t,r,n,o,s)=>{const a=Object.create(Dm);Nm.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>\"isAxiosError\"!==e);const i=e&&e.message?e.message:\"Error\",c=null==t&&e?e.code:t;return Um.call(a,i,c,r,n,o),e&&null==a.cause&&Object.defineProperty(a,\"cause\",{value:e,configurable:!0}),a.name=e&&e.name||\"Error\",s&&Object.assign(a,s),a};const $m=Um;var zm=r(1048).hp;function jm(e){return Nm.isPlainObject(e)||Nm.isArray(e)}function Vm(e){return Nm.endsWith(e,\"[]\")?e.slice(0,-2):e}function Gm(e,t,r){return e?e.concat(t).map(function(e,t){return e=Vm(e),!r&&t?\"[\"+e+\"]\":e}).join(r?\".\":\"\"):t}const Hm=Nm.toFlatObject(Nm,{},null,function(e){return/^is[A-Z]/.test(e)});const Km=function(e,t,r){if(!Nm.isObject(e))throw new TypeError(\"target must be an object\");t=t||new FormData;const n=(r=Nm.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Nm.isUndefined(t[e])})).metaTokens,o=r.visitor||u,s=r.dots,a=r.indexes,i=(r.Blob||\"undefined\"!=typeof Blob&&Blob)&&Nm.isSpecCompliantForm(t);if(!Nm.isFunction(o))throw new TypeError(\"visitor must be a function\");function c(e){if(null===e)return\"\";if(Nm.isDate(e))return e.toISOString();if(Nm.isBoolean(e))return e.toString();if(!i&&Nm.isBlob(e))throw new $m(\"Blob is not supported. Use a Buffer instead.\");return Nm.isArrayBuffer(e)||Nm.isTypedArray(e)?i&&\"function\"==typeof Blob?new Blob([e]):zm.from(e):e}function u(e,r,o){let i=e;if(e&&!o&&\"object\"==typeof e)if(Nm.endsWith(r,\"{}\"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Nm.isArray(e)&&function(e){return Nm.isArray(e)&&!e.some(jm)}(e)||(Nm.isFileList(e)||Nm.endsWith(r,\"[]\"))&&(i=Nm.toArray(e)))return r=Vm(r),i.forEach(function(e,n){!Nm.isUndefined(e)&&null!==e&&t.append(!0===a?Gm([r],n,s):null===a?r:r+\"[]\",c(e))}),!1;return!!jm(e)||(t.append(Gm(o,r,s),c(e)),!1)}const l=[],d=Object.assign(Hm,{defaultVisitor:u,convertValue:c,isVisitable:jm});if(!Nm.isObject(e))throw new TypeError(\"data must be an object\");return function e(r,n){if(!Nm.isUndefined(r)){if(-1!==l.indexOf(r))throw Error(\"Circular reference detected in \"+n.join(\".\"));l.push(r),Nm.forEach(r,function(r,s){!0===(!(Nm.isUndefined(r)||null===r)&&o.call(t,r,Nm.isString(s)?s.trim():s,n,d))&&e(r,n?n.concat(s):[s])}),l.pop()}}(e),t};function qm(e){const t={\"!\":\"%21\",\"'\":\"%27\",\"(\":\"%28\",\")\":\"%29\",\"~\":\"%7E\",\"%20\":\"+\",\"%00\":\"\\0\"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Zm(e,t){this._pairs=[],e&&Km(e,this,t)}const Jm=Zm.prototype;Jm.append=function(e,t){this._pairs.push([e,t])},Jm.toString=function(e){const t=e?function(t){return e.call(this,t,qm)}:qm;return this._pairs.map(function(e){return t(e[0])+\"=\"+t(e[1])},\"\").join(\"&\")};const Ym=Zm;function Xm(e){return encodeURIComponent(e).replace(/%3A/gi,\":\").replace(/%24/g,\"$\").replace(/%2C/gi,\",\").replace(/%20/g,\"+\")}function Qm(e,t,r){if(!t)return e;const n=r&&r.encode||Xm;Nm.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(s=o?o(t,r):Nm.isURLSearchParams(t)?t.toString():new Ym(t,r).toString(n),s){const t=e.indexOf(\"#\");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf(\"?\")?\"?\":\"&\")+s}return e}const eb=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Nm.forEach(this.handlers,function(t){null!==t&&e(t)})}},tb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},rb={isBrowser:!0,classes:{URLSearchParams:\"undefined\"!=typeof URLSearchParams?URLSearchParams:Ym,FormData:\"undefined\"!=typeof FormData?FormData:null,Blob:\"undefined\"!=typeof Blob?Blob:null},protocols:[\"http\",\"https\",\"file\",\"blob\",\"url\",\"data\"]},nb=\"undefined\"!=typeof window&&\"undefined\"!=typeof document,ob=\"object\"==typeof navigator&&navigator||void 0,sb=nb&&(!ob||[\"ReactNative\",\"NativeScript\",\"NS\"].indexOf(ob.product)<0),ab=\"undefined\"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&\"function\"==typeof self.importScripts,ib=nb&&window.location.href||\"http://localhost\",cb={...y,...rb};const ub=function(e){function t(e,r,n,o){let s=e[o++];if(\"__proto__\"===s)return!0;const a=Number.isFinite(+s),i=o>=e.length;if(s=!s&&Nm.isArray(n)?n.length:s,i)return Nm.hasOwnProp(n,s)?n[s]=[n[s],r]:n[s]=r,!a;n[s]&&Nm.isObject(n[s])||(n[s]=[]);return t(e,r,n[s],o)&&Nm.isArray(n[s])&&(n[s]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}(n[s])),!a}if(Nm.isFormData(e)&&Nm.isFunction(e.entries)){const r={};return Nm.forEachEntry(e,(e,n)=>{t(function(e){return Nm.matchAll(/\\w+|\\[(\\w*)]/g,e).map(e=>\"[]\"===e[0]?\"\":e[1]||e[0])}(e),n,r,0)}),r}return null};const lb={transitional:tb,adapter:[\"xhr\",\"http\",\"fetch\"],transformRequest:[function(e,t){const r=t.getContentType()||\"\",n=r.indexOf(\"application/json\")>-1,o=Nm.isObject(e);o&&Nm.isHTMLForm(e)&&(e=new FormData(e));if(Nm.isFormData(e))return n?JSON.stringify(ub(e)):e;if(Nm.isArrayBuffer(e)||Nm.isBuffer(e)||Nm.isStream(e)||Nm.isFile(e)||Nm.isBlob(e)||Nm.isReadableStream(e))return e;if(Nm.isArrayBufferView(e))return e.buffer;if(Nm.isURLSearchParams(e))return t.setContentType(\"application/x-www-form-urlencoded;charset=utf-8\",!1),e.toString();let s;if(o){if(r.indexOf(\"application/x-www-form-urlencoded\")>-1)return function(e,t){return Km(e,new cb.classes.URLSearchParams,{visitor:function(e,t,r,n){return cb.isNode&&Nm.isBuffer(e)?(this.append(t,e.toString(\"base64\")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((s=Nm.isFileList(e))||r.indexOf(\"multipart/form-data\")>-1){const t=this.env&&this.env.FormData;return Km(s?{\"files[]\":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType(\"application/json\",!1),function(e,t,r){if(Nm.isString(e))try{return(t||JSON.parse)(e),Nm.trim(e)}catch(e){if(\"SyntaxError\"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||lb.transitional,r=t&&t.forcedJSONParsing,n=\"json\"===this.responseType;if(Nm.isResponse(e)||Nm.isReadableStream(e))return e;if(e&&Nm.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if(\"SyntaxError\"===e.name)throw $m.from(e,$m.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:\"XSRF-TOKEN\",xsrfHeaderName:\"X-XSRF-TOKEN\",maxContentLength:-1,maxBodyLength:-1,env:{FormData:cb.classes.FormData,Blob:cb.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:\"application/json, text/plain, */*\",\"Content-Type\":void 0}}};Nm.forEach([\"delete\",\"get\",\"head\",\"post\",\"put\",\"patch\"],e=>{lb.headers[e]={}});const db=lb,fb=Nm.toObjectSet([\"age\",\"authorization\",\"content-length\",\"content-type\",\"etag\",\"expires\",\"from\",\"host\",\"if-modified-since\",\"if-unmodified-since\",\"last-modified\",\"location\",\"max-forwards\",\"proxy-authorization\",\"referer\",\"retry-after\",\"user-agent\"]),pb=Symbol(\"internals\");function hb(e){return e&&String(e).trim().toLowerCase()}function gb(e){return!1===e||null==e?e:Nm.isArray(e)?e.map(gb):String(e)}function yb(e,t,r,n,o){return Nm.isFunction(n)?n.call(this,t,r):(o&&(t=r),Nm.isString(t)?Nm.isString(n)?-1!==t.indexOf(n):Nm.isRegExp(n)?n.test(t):void 0:void 0)}class mb{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=hb(t);if(!o)throw new Error(\"header name must be a non-empty string\");const s=Nm.findKey(n,o);(!s||void 0===n[s]||!0===r||void 0===r&&!1!==n[s])&&(n[s||t]=gb(e))}const s=(e,t)=>Nm.forEach(e,(e,r)=>o(e,r,t));if(Nm.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(Nm.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let r,n,o;return e&&e.split(\"\\n\").forEach(function(e){o=e.indexOf(\":\"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&fb[r]||(\"set-cookie\"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+\", \"+n:n)}),t})(e),t);else if(Nm.isObject(e)&&Nm.isIterable(e)){let r,n,o={};for(const t of e){if(!Nm.isArray(t))throw TypeError(\"Object iterator must return a key-value pair\");o[n=t[0]]=(r=o[n])?Nm.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}s(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=hb(e)){const r=Nm.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Nm.isFunction(t))return t.call(this,e,r);if(Nm.isRegExp(t))return t.exec(e);throw new TypeError(\"parser must be boolean|regexp|function\")}}}has(e,t){if(e=hb(e)){const r=Nm.findKey(this,e);return!(!r||void 0===this[r]||t&&!yb(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=hb(e)){const o=Nm.findKey(r,e);!o||t&&!yb(0,r[o],o,t)||(delete r[o],n=!0)}}return Nm.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!yb(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Nm.forEach(this,(n,o)=>{const s=Nm.findKey(r,o);if(s)return t[s]=gb(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\\d])(\\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();a!==o&&delete t[o],t[a]=gb(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Nm.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Nm.isArray(r)?r.join(\", \"):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+\": \"+t).join(\"\\n\")}getSetCookie(){return this.get(\"set-cookie\")||[]}get[Symbol.toStringTag](){return\"AxiosHeaders\"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[pb]=this[pb]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=hb(e);t[n]||(!function(e,t){const r=Nm.toCamelCase(\" \"+t);[\"get\",\"set\",\"has\"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return Nm.isArray(e)?e.forEach(n):n(e),this}}mb.accessor([\"Content-Type\",\"Content-Length\",\"Accept\",\"Accept-Encoding\",\"User-Agent\",\"Authorization\"]),Nm.reduceDescriptors(mb.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Nm.freezeMethods(mb);const bb=mb;function wb(e,t){const r=this||db,n=t||r,o=bb.from(n.headers);let s=n.data;return Nm.forEach(e,function(e){s=e.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Tb(e){return!(!e||!e.__CANCEL__)}function Ab(e,t,r){$m.call(this,null==e?\"canceled\":e,$m.ERR_CANCELED,t,r),this.name=\"CanceledError\"}Nm.inherits(Ab,$m,{__CANCEL__:!0});const vb=Ab;function Pb(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new $m(\"Request failed with status code \"+r.status,[$m.ERR_BAD_REQUEST,$m.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const Eb=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,s=0,a=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),u=n[a];o||(o=c),r[s]=i,n[s]=c;let l=a,d=0;for(;l!==s;)d+=r[l++],l%=e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(1e3*d/f):void 0}};const Cb=function(e,t){let r,n,o=0,s=1e3/t;const a=(t,s=Date.now())=>{o=s,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),i=t-o;i>=s?a(e,t):(r=e,n||(n=setTimeout(()=>{n=null,a(r)},s-i)))},()=>r&&a(r)]},Bb=(e,t,r=3)=>{let n=0;const o=Eb(50,250);return Cb(r=>{const s=r.loaded,a=r.lengthComputable?r.total:void 0,i=s-n,c=o(i);n=s;e({loaded:s,total:a,progress:a?s/a:void 0,bytes:i,rate:c||void 0,estimated:c&&a&&s<=a?(a-s)/c:void 0,event:r,lengthComputable:null!=a,[t?\"download\":\"upload\"]:!0})},r)},Wb=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Sb=e=>(...t)=>Nm.asap(()=>e(...t)),Ib=cb.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,cb.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(cb.origin),cb.navigator&&/(msie|trident)/i.test(cb.navigator.userAgent)):()=>!0,_b=cb.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const a=[e+\"=\"+encodeURIComponent(t)];Nm.isNumber(r)&&a.push(\"expires=\"+new Date(r).toGMTString()),Nm.isString(n)&&a.push(\"path=\"+n),Nm.isString(o)&&a.push(\"domain=\"+o),!0===s&&a.push(\"secure\"),document.cookie=a.join(\"; \")},read(e){const t=document.cookie.match(new RegExp(\"(^|;\\\\s*)(\"+e+\")=([^;]*)\"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,\"\",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Rb(e,t,r){let n=!/^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\\/?\\/$/,\"\")+\"/\"+t.replace(/^\\/+/,\"\"):e}(e,t):t}const xb=e=>e instanceof bb?{...e}:e;function Ob(e,t){t=t||{};const r={};function n(e,t,r,n){return Nm.isPlainObject(e)&&Nm.isPlainObject(t)?Nm.merge.call({caseless:n},e,t):Nm.isPlainObject(t)?Nm.merge({},t):Nm.isArray(t)?t.slice():t}function o(e,t,r,o){return Nm.isUndefined(t)?Nm.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function s(e,t){if(!Nm.isUndefined(t))return n(void 0,t)}function a(e,t){return Nm.isUndefined(t)?Nm.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function i(r,o,s){return s in t?n(r,o):s in e?n(void 0,r):void 0}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(e,t,r)=>o(xb(e),xb(t),0,!0)};return Nm.forEach(Object.keys({...e,...t}),function(n){const s=c[n]||o,a=s(e[n],t[n],n);Nm.isUndefined(a)&&s!==i||(r[n]=a)}),r}const Mb=e=>{const t=Ob({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;if(t.headers=a=bb.from(a),t.url=Qm(Rb(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&a.set(\"Authorization\",\"Basic \"+btoa((i.username||\"\")+\":\"+(i.password?unescape(encodeURIComponent(i.password)):\"\"))),Nm.isFormData(r))if(cb.hasStandardBrowserEnv||cb.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(Nm.isFunction(r.getHeaders)){const e=r.getHeaders(),t=[\"content-type\",\"content-length\"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&a.set(e,r)})}if(cb.hasStandardBrowserEnv&&(n&&Nm.isFunction(n)&&(n=n(t)),n||!1!==n&&Ib(t.url))){const e=o&&s&&_b.read(s);e&&a.set(o,e)}return t},Fb=\"undefined\"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Mb(e);let o=n.data;const s=bb.from(n.headers).normalize();let a,i,c,u,l,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=n;function h(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener(\"abort\",a)}let g=new XMLHttpRequest;function y(){if(!g)return;const n=bb.from(\"getAllResponseHeaders\"in g&&g.getAllResponseHeaders());Pb(function(e){t(e),h()},function(e){r(e),h()},{data:d&&\"text\"!==d&&\"json\"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,\"onloadend\"in g?g.onloadend=y:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf(\"file:\"))&&setTimeout(y)},g.onabort=function(){g&&(r(new $m(\"Request aborted\",$m.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const n=t&&t.message?t.message:\"Network Error\",o=new $m(n,$m.ERR_NETWORK,e,g);o.event=t||null,r(o),g=null},g.ontimeout=function(){let t=n.timeout?\"timeout of \"+n.timeout+\"ms exceeded\":\"timeout exceeded\";const o=n.transitional||tb;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new $m(t,o.clarifyTimeoutError?$m.ETIMEDOUT:$m.ECONNABORTED,e,g)),g=null},void 0===o&&s.setContentType(null),\"setRequestHeader\"in g&&Nm.forEach(s.toJSON(),function(e,t){g.setRequestHeader(t,e)}),Nm.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),d&&\"json\"!==d&&(g.responseType=n.responseType),p&&([c,l]=Bb(p,!0),g.addEventListener(\"progress\",c)),f&&g.upload&&([i,u]=Bb(f),g.upload.addEventListener(\"progress\",i),g.upload.addEventListener(\"loadend\",u)),(n.cancelToken||n.signal)&&(a=t=>{g&&(r(!t||t.type?new vb(null,e,g):t),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener(\"abort\",a)));const m=function(e){const t=/^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(e);return t&&t[1]||\"\"}(n.url);m&&-1===cb.protocols.indexOf(m)?r(new $m(\"Unsupported protocol \"+m+\":\",$m.ERR_BAD_REQUEST,e)):g.send(o||null)})},kb=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof $m?t:new vb(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new $m(`timeout ${t} of ms exceeded`,$m.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener(\"abort\",o)}),e=null)};e.forEach(e=>e.addEventListener(\"abort\",o));const{signal:i}=n;return i.unsubscribe=()=>Nm.asap(a),i}},Nb=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},Ub=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Db=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of Ub(e))yield*Nb(r,t)}(e,t);let s,a=0,i=e=>{s||(s=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return i(),void e.close();let s=n.byteLength;if(r){let e=a+=s;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw i(e),e}},cancel:e=>(i(e),o.return())},{highWaterMark:2})},{isFunction:Lb}=Nm,$b=(({Request:e,Response:t})=>({Request:e,Response:t}))(Nm.global),{ReadableStream:zb,TextEncoder:jb}=Nm.global,Vb=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Gb=e=>{e=Nm.merge.call({skipUndefined:!0},$b,e);const{fetch:t,Request:r,Response:n}=e,o=t?Lb(t):\"function\"==typeof fetch,s=Lb(r),a=Lb(n);if(!o)return!1;const i=o&&Lb(zb),c=o&&(\"function\"==typeof jb?(u=new jb,e=>u.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var u;const l=s&&i&&Vb(()=>{let e=!1;const t=new r(cb.origin,{body:new zb,method:\"POST\",get duplex(){return e=!0,\"half\"}}).headers.has(\"Content-Type\");return e&&!t}),d=a&&i&&Vb(()=>Nm.isReadableStream(new n(\"\").body)),f={stream:d&&(e=>e.body)};o&&[\"text\",\"arrayBuffer\",\"blob\",\"formData\",\"stream\"].forEach(e=>{!f[e]&&(f[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new $m(`Response type '${e}' is not supported`,$m.ERR_NOT_SUPPORT,r)})});const p=async(e,t)=>{const n=Nm.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Nm.isBlob(e))return e.size;if(Nm.isSpecCompliantForm(e)){const t=new r(cb.origin,{method:\"POST\",body:e});return(await t.arrayBuffer()).byteLength}return Nm.isArrayBufferView(e)||Nm.isArrayBuffer(e)?e.byteLength:(Nm.isURLSearchParams(e)&&(e+=\"\"),Nm.isString(e)?(await c(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:a,data:i,signal:c,cancelToken:u,timeout:h,onDownloadProgress:g,onUploadProgress:y,responseType:m,headers:b,withCredentials:w=\"same-origin\",fetchOptions:T}=Mb(e),A=t||fetch;m=m?(m+\"\").toLowerCase():\"text\";let v=kb([c,u&&u.toAbortSignal()],h),P=null;const E=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let C;try{if(y&&l&&\"get\"!==a&&\"head\"!==a&&0!==(C=await p(b,i))){let e,t=new r(o,{method:\"POST\",body:i,duplex:\"half\"});if(Nm.isFormData(i)&&(e=t.headers.get(\"content-type\"))&&b.setContentType(e),t.body){const[e,r]=Wb(C,Bb(Sb(y)));i=Db(t.body,65536,e,r)}}Nm.isString(w)||(w=w?\"include\":\"omit\");const t=s&&\"credentials\"in r.prototype,c={...T,signal:v,method:a.toUpperCase(),headers:b.normalize().toJSON(),body:i,duplex:\"half\",credentials:t?w:void 0};P=s&&new r(o,c);let u=await(s?A(P,T):A(o,c));const h=d&&(\"stream\"===m||\"response\"===m);if(d&&(g||h&&E)){const e={};[\"status\",\"statusText\",\"headers\"].forEach(t=>{e[t]=u[t]});const t=Nm.toFiniteNumber(u.headers.get(\"content-length\")),[r,o]=g&&Wb(t,Bb(Sb(g),!0))||[];u=new n(Db(u.body,65536,r,()=>{o&&o(),E&&E()}),e)}m=m||\"text\";let B=await f[Nm.findKey(f,m)||\"text\"](u,e);return!h&&E&&E(),await new Promise((t,r)=>{Pb(t,r,{data:B,headers:bb.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:P})})}catch(t){if(E&&E(),t&&\"TypeError\"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new $m(\"Network Error\",$m.ERR_NETWORK,e,P),{cause:t.cause||t});throw $m.from(t,t&&t.code,e,P)}}},Hb=new Map,Kb=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:o}=t,s=[n,o,r];let a,i,c=s.length,u=Hb;for(;c--;)a=s[c],i=u.get(a),void 0===i&&u.set(a,i=c?new Map:Gb(t)),u=i;return i},qb=(Kb(),{http:null,xhr:Fb,fetch:{get:Kb}});Nm.forEach(qb,(e,t)=>{if(e){try{Object.defineProperty(e,\"name\",{value:t})}catch(e){}Object.defineProperty(e,\"adapterName\",{value:t})}});const Zb=e=>`- ${e}`,Jb=e=>Nm.isFunction(e)||null===e||!1===e,Yb=(e,t)=>{e=Nm.isArray(e)?e:[e];const{length:r}=e;let n,o;const s={};for(let a=0;a<r;a++){let r;if(n=e[a],o=n,!Jb(n)&&(o=qb[(r=String(n)).toLowerCase()],void 0===o))throw new $m(`Unknown adapter '${r}'`);if(o&&(Nm.isFunction(o)||(o=o.get(t))))break;s[r||\"#\"+a]=o}if(!o){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?\"is not supported by the environment\":\"is not available in the build\"));let t=r?e.length>1?\"since :\\n\"+e.map(Zb).join(\"\\n\"):\" \"+Zb(e[0]):\"as no adapter specified\";throw new $m(\"There is no suitable adapter to dispatch the request \"+t,\"ERR_NOT_SUPPORT\")}return o};function Xb(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new vb(null,e)}function Qb(e){Xb(e),e.headers=bb.from(e.headers),e.data=wb.call(e,e.transformRequest),-1!==[\"post\",\"put\",\"patch\"].indexOf(e.method)&&e.headers.setContentType(\"application/x-www-form-urlencoded\",!1);return Yb(e.adapter||db.adapter,e)(e).then(function(t){return Xb(e),t.data=wb.call(e,e.transformResponse,t),t.headers=bb.from(t.headers),t},function(t){return Tb(t)||(Xb(e),t&&t.response&&(t.response.data=wb.call(e,e.transformResponse,t.response),t.response.headers=bb.from(t.response.headers))),Promise.reject(t)})}const ew=\"1.12.2\",tw={};[\"object\",\"boolean\",\"number\",\"function\",\"string\",\"symbol\"].forEach((e,t)=>{tw[e]=function(r){return typeof r===e||\"a\"+(t<1?\"n \":\" \")+e}});const rw={};tw.transitional=function(e,t,r){function n(e,t){return\"[Axios v\"+ew+\"] Transitional option '\"+e+\"'\"+t+(r?\". \"+r:\"\")}return(r,o,s)=>{if(!1===e)throw new $m(n(o,\" has been removed\"+(t?\" in \"+t:\"\")),$m.ERR_DEPRECATED);return t&&!rw[o]&&(rw[o]=!0,console.warn(n(o,\" has been deprecated since v\"+t+\" and will be removed in the near future\"))),!e||e(r,o,s)}},tw.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const nw={assertOptions:function(e,t,r){if(\"object\"!=typeof e)throw new $m(\"options must be an object\",$m.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],a=t[s];if(a){const t=e[s],r=void 0===t||a(t,s,e);if(!0!==r)throw new $m(\"option \"+s+\" must be \"+r,$m.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new $m(\"Unknown option \"+s,$m.ERR_BAD_OPTION)}},validators:tw},ow=nw.validators;class sw{constructor(e){this.defaults=e||{},this.interceptors={request:new eb,response:new eb}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\\n/,\"\"):\"\";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\\n.+\\n/,\"\"))&&(e.stack+=\"\\n\"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){\"string\"==typeof e?(t=t||{}).url=e:t=e||{},t=Ob(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&nw.assertOptions(r,{silentJSONParsing:ow.transitional(ow.boolean),forcedJSONParsing:ow.transitional(ow.boolean),clarifyTimeoutError:ow.transitional(ow.boolean)},!1),null!=n&&(Nm.isFunction(n)?t.paramsSerializer={serialize:n}:nw.assertOptions(n,{encode:ow.function,serialize:ow.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),nw.assertOptions(t,{baseUrl:ow.spelling(\"baseURL\"),withXsrfToken:ow.spelling(\"withXSRFToken\")},!0),t.method=(t.method||this.defaults.method||\"get\").toLowerCase();let s=o&&Nm.merge(o.common,o[t.method]);o&&Nm.forEach([\"delete\",\"get\",\"head\",\"post\",\"put\",\"patch\",\"common\"],e=>{delete o[e]}),t.headers=bb.concat(s,o);const a=[];let i=!0;this.interceptors.request.forEach(function(e){\"function\"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,d=0;if(!i){const e=[Qb.bind(this),void 0];for(e.unshift(...a),e.push(...c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=a.length;let f=t;for(;d<l;){const e=a[d++],t=a[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=Qb.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return Qm(Rb((e=Ob(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Nm.forEach([\"delete\",\"get\",\"head\",\"options\"],function(e){sw.prototype[e]=function(t,r){return this.request(Ob(r||{},{method:e,url:t,data:(r||{}).data}))}}),Nm.forEach([\"post\",\"put\",\"patch\"],function(e){function t(t){return function(r,n,o){return this.request(Ob(o||{},{method:e,headers:t?{\"Content-Type\":\"multipart/form-data\"}:{},url:r,data:n}))}}sw.prototype[e]=t(),sw.prototype[e+\"Form\"]=t(!0)});const aw=sw;class iw{constructor(e){if(\"function\"!=typeof e)throw new TypeError(\"executor must be a function.\");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new vb(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;const t=new iw(function(t){e=t});return{token:t,cancel:e}}}const cw=iw;const uw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uw).forEach(([e,t])=>{uw[t]=e});const lw=uw;const dw=function e(t){const r=new aw(t),n=Ky(aw.prototype.request,r);return Nm.extend(n,aw.prototype,r,{allOwnKeys:!0}),Nm.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Ob(t,r))},n}(db);dw.Axios=aw,dw.CanceledError=vb,dw.CancelToken=cw,dw.isCancel=Tb,dw.VERSION=ew,dw.toFormData=Km,dw.AxiosError=$m,dw.Cancel=dw.CanceledError,dw.all=function(e){return Promise.all(e)},dw.spread=function(e){return function(t){return e.apply(null,t)}},dw.isAxiosError=function(e){return Nm.isObject(e)&&!0===e.isAxiosError},dw.mergeConfig=Ob,dw.AxiosHeaders=bb,dw.formToJSON=e=>ub(Nm.isHTMLForm(e)?new FormData(e):e),dw.getAdapter=Yb,dw.HttpStatusCode=lw,dw.default=dw;const fw=dw;class pw{host;timeout;user;password;headers;statusPage;instance;constructor(e,t=3e4,r=\"\",n=\"\",o={},s=\"/\"){if(!Zg(e))throw new Error(\"Invalid URL provided to HttpProvider\");if(isNaN(t)||t<0)throw new Error(\"Invalid timeout duration provided\");if(!Jg(o))throw new Error(\"Invalid headers object provided\");this.host=e,this.timeout=t,this.user=r,this.password=n,this.headers=o,this.statusPage=s,this.instance=fw.create({baseURL:e,timeout:t,headers:o,auth:r?{username:r,password:n}:void 0})}setStatusPage(e=\"/\"){this.statusPage=e}async isConnected(e=this.statusPage){return this.request(e).then(e=>ay(e,\"blockID\",\"block_header\")).catch(()=>!1)}request(e,t={},r=\"get\"){return r=r.toLowerCase(),this.instance.request({data:\"post\"==r&&Object.keys(t).length?t:null,params:\"get\"==r&&t,url:e,method:r}).then(({data:e})=>e)}}const hw={HttpProvider:pw};const gw=r(8985);var yw,mw,bw,ww=r(4545);class Tw{invalid(e){return e.msg||`Invalid ${e.name}${\"address\"===e.type?\" address\":\"\"} provided`}notPositive(e){return`${e.name} must be a positive integer`}notEqual(e){return e.msg||`${e.names?.[0]} can not be equal to ${e.names?.[1]}`}notValid(e){const t={};let r=!1;for(const n of e){const{name:e,names:o,value:s,type:a,gt:i,lt:c,gte:u,lte:l,optional:d}=n;if(!d||ly(s)&&(\"boolean\"===a||!1!==s)){switch(t[e]=n.value,a){case\"address\":my(s)?t[e]=py(s):r=!0;break;case\"integer\":(!oy(s)||\"number\"==typeof i&&s<=i||\"number\"==typeof c&&s>=c||\"number\"==typeof u&&s<u||\"number\"==typeof l&&s>l)&&(r=!0);break;case\"positive-integer\":if(!oy(s)||s<=0)throw new Error(this.notPositive(n));break;case\"tokenId\":case\"not-empty-string\":ty(s)&&s.length||(r=!0);break;case\"notEmptyObject\":Jg(s)&&Object.keys(s).length||(r=!0);break;case\"notEqual\":if(o&&t[o[0]]===t[o[1]])throw new Error(this.notEqual(n));break;case\"resource\":[\"BANDWIDTH\",\"ENERGY\"].includes(s)||(r=!0);break;case\"url\":Zg(s)||(r=!0);break;case\"hex\":ny(s)||(r=!0);break;case\"array\":Array.isArray(s)||(r=!0);break;case\"boolean\":Qg(s)||(r=!0);break;case\"string\":(!ty(s)||\"number\"==typeof i&&s.length<=i||\"number\"==typeof c&&s.length>=c||\"number\"==typeof u&&s.length<u||\"number\"==typeof l&&s.length>l)&&(r=!0)}if(r)throw new Error(this.invalid(n))}}return!1}}!function(e){e.AccountCreateContract=\"AccountCreateContract\",e.TransferContract=\"TransferContract\",e.TransferAssetContract=\"TransferAssetContract\",e.VoteAssetContract=\"VoteAssetContract\",e.VoteWitnessContract=\"VoteWitnessContract\",e.WitnessCreateContract=\"WitnessCreateContract\",e.AssetIssueContract=\"AssetIssueContract\",e.WitnessUpdateContract=\"WitnessUpdateContract\",e.ParticipateAssetIssueContract=\"ParticipateAssetIssueContract\",e.AccountUpdateContract=\"AccountUpdateContract\",e.FreezeBalanceContract=\"FreezeBalanceContract\",e.UnfreezeBalanceContract=\"UnfreezeBalanceContract\",e.CancelAllUnfreezeV2Contract=\"CancelAllUnfreezeV2Contract\",e.WithdrawBalanceContract=\"WithdrawBalanceContract\",e.UnfreezeAssetContract=\"UnfreezeAssetContract\",e.UpdateAssetContract=\"UpdateAssetContract\",e.ProposalCreateContract=\"ProposalCreateContract\",e.ProposalApproveContract=\"ProposalApproveContract\",e.ProposalDeleteContract=\"ProposalDeleteContract\",e.SetAccountIdContract=\"SetAccountIdContract\",e.CustomContract=\"CustomContract\",e.CreateSmartContract=\"CreateSmartContract\",e.TriggerSmartContract=\"TriggerSmartContract\",e.GetContract=\"GetContract\",e.UpdateSettingContract=\"UpdateSettingContract\",e.ExchangeCreateContract=\"ExchangeCreateContract\",e.ExchangeInjectContract=\"ExchangeInjectContract\",e.ExchangeWithdrawContract=\"ExchangeWithdrawContract\",e.ExchangeTransactionContract=\"ExchangeTransactionContract\",e.UpdateEnergyLimitContract=\"UpdateEnergyLimitContract\",e.AccountPermissionUpdateContract=\"AccountPermissionUpdateContract\",e.ClearABIContract=\"ClearABIContract\",e.UpdateBrokerageContract=\"UpdateBrokerageContract\",e.ShieldedTransferContract=\"ShieldedTransferContract\",e.MarketSellAssetContract=\"MarketSellAssetContract\",e.MarketCancelOrderContract=\"MarketCancelOrderContract\",e.FreezeBalanceV2Contract=\"FreezeBalanceV2Contract\",e.UnfreezeBalanceV2Contract=\"UnfreezeBalanceV2Contract\",e.WithdrawExpireUnfreezeContract=\"WithdrawExpireUnfreezeContract\",e.DelegateResourceContract=\"DelegateResourceContract\",e.UnDelegateResourceContract=\"UnDelegateResourceContract\",e.UNRECOGNIZED=\"UNRECOGNIZED\"}(yw||(yw={})),function(e){e[e.Owner=0]=\"Owner\",e[e.Witness=1]=\"Witness\",e[e.Active=2]=\"Active\",e[e.UNRECOGNIZED=-1]=\"UNRECOGNIZED\"}(mw||(mw={})),function(e){e[e.Normal=0]=\"Normal\",e[e.AssetIssue=1]=\"AssetIssue\",e[e.Contract=2]=\"Contract\",e[e.UNRECOGNIZED=-1]=\"UNRECOGNIZED\"}(bw||(bw={}));var Aw=r(1048).hp;function vw(e){return Lw.fromUtf8(e).replace(/^0x/,\"\")}function Pw(e){return JSON.parse(JSON.stringify(e))}function Ew(e={}){if(void 0===e.ref_block_bytes&&void 0===e.ref_block_hash&&void 0===e.expiration&&void 0===e.timestamp)return!1;if(\"string\"!=typeof e.ref_block_bytes)throw new Error(\"Invalid ref_block_bytes provided.\");if(\"string\"!=typeof e.ref_block_hash)throw new Error(\"Invalid ref_block_hash provided.\");if(\"number\"!=typeof e.expiration)throw new Error(\"Invalid expiration provided.\");if(\"number\"!=typeof e.timestamp)throw new Error(\"Invalid timestamp provided.\");return!0}async function Cw(e,t,r,n,o={}){const s={visible:!1,txID:\"\",raw_data_hex:\"\",raw_data:{contract:[{parameter:{value:r,type_url:`type.googleapis.com/protocol.${t}`},type:t}],...Ew(o)?{}:await e.trx.getCurrentRefBlockParams(),...o}};n&&(s.raw_data.contract[0].Permission_id=n);const a=MT(s);return s.txID=LT(a).replace(/^0x/,\"\"),s.raw_data_hex=NT(a).toLowerCase(),s}function Bw(e={}){const t={};return Ew(e.blockHeader)&&(t.ref_block_bytes=e.blockHeader.ref_block_bytes,t.ref_block_hash=e.blockHeader.ref_block_hash,t.expiration=e.blockHeader.expiration,t.timestamp=e.blockHeader.timestamp),t}var Ww=r(1048).hp;class Sw{tronWeb;validator;constructor(e){if(!(e&&e instanceof Lw))throw new Error(\"Expected instance of TronWeb\");this.tronWeb=e,this.validator=new Tw}async sendTrx(e,t=0,r=this.tronWeb.defaultAddress.hex,n={}){t=parseInt(t),this.validator.notValid([{name:\"recipient\",type:\"address\",value:e},{name:\"origin\",type:\"address\",value:r},{names:[\"recipient\",\"origin\"],type:\"notEqual\",msg:\"Cannot transfer TRX to the same account\"},{name:\"amount\",type:\"integer\",gt:0,value:t}]);const o={to_address:py(e),owner_address:py(r),amount:t},s=Bw(n);return Cw(this.tronWeb,yw.TransferContract,o,n?.permissionId,s)}async sendToken(e,t=0,r,n=this.tronWeb.defaultAddress.hex,o={}){t=parseInt(t),this.validator.notValid([{name:\"recipient\",type:\"address\",value:e},{name:\"origin\",type:\"address\",value:n},{names:[\"recipient\",\"origin\"],type:\"notEqual\",msg:\"Cannot transfer tokens to the same account\"},{name:\"amount\",type:\"integer\",gt:0,value:t},{name:\"token ID\",type:\"tokenId\",value:r}]);const s={to_address:py(e),owner_address:py(n),asset_name:vw(r),amount:t},a=Bw(o);return Cw(this.tronWeb,yw.TransferAssetContract,s,o?.permissionId,a)}async purchaseToken(e,t,r=0,n=this.tronWeb.defaultAddress.hex,o={}){this.validator.notValid([{name:\"buyer\",type:\"address\",value:n},{name:\"issuer\",type:\"address\",value:e},{names:[\"buyer\",\"issuer\"],type:\"notEqual\",msg:\"Cannot purchase tokens from same account\"},{name:\"amount\",type:\"integer\",gt:0,value:r},{name:\"token ID\",type:\"tokenId\",value:t}]);const s={to_address:py(e),owner_address:py(n),asset_name:vw(t),amount:parseInt(r)},a=Bw(o);return Cw(this.tronWeb,yw.ParticipateAssetIssueContract,s,o?.permissionId,a)}async freezeBalance(e=0,t=3,r=\"BANDWIDTH\",n=this.tronWeb.defaultAddress.hex,o,s={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:n},{name:\"receiver\",type:\"address\",value:o,optional:!0},{name:\"amount\",type:\"integer\",gt:0,value:e},{name:\"duration\",type:\"integer\",gte:3,value:t},{name:\"resource\",type:\"resource\",value:r,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'}]);const a={owner_address:py(n),frozen_balance:parseInt(e),frozen_duration:parseInt(String(t))};\"BANDWIDTH\"!==r&&(a.resource=r),ly(o)&&py(o)!==py(n)&&(a.receiver_address=py(o));const i=Bw(s);return Cw(this.tronWeb,yw.FreezeBalanceContract,a,s?.permissionId,i)}async unfreezeBalance(e=\"BANDWIDTH\",t=this.tronWeb.defaultAddress.hex,r,n={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:t},{name:\"receiver\",type:\"address\",value:r,optional:!0},{name:\"resource\",type:\"resource\",value:e,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'}]);const o={owner_address:py(t)};\"BANDWIDTH\"!==e&&(o.resource=e),ly(r)&&py(r)!==py(t)&&(o.receiver_address=py(r));const s=Bw(n);return Cw(this.tronWeb,yw.UnfreezeBalanceContract,o,n?.permissionId,s)}async freezeBalanceV2(e=0,t=\"BANDWIDTH\",r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:r},{name:\"amount\",type:\"integer\",gt:0,value:e},{name:\"resource\",type:\"resource\",value:t,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'}]);const o={owner_address:py(r),frozen_balance:parseInt(e)};\"BANDWIDTH\"!==t&&(o.resource=t);const s=Bw(n);return Cw(this.tronWeb,yw.FreezeBalanceV2Contract,o,n?.permissionId,s)}async unfreezeBalanceV2(e=0,t=\"BANDWIDTH\",r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:r},{name:\"amount\",type:\"integer\",gt:0,value:e},{name:\"resource\",type:\"resource\",value:t,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'}]);const o={owner_address:py(r),unfreeze_balance:parseInt(e)};\"BANDWIDTH\"!==t&&(o.resource=t);const s=Bw(n);return Cw(this.tronWeb,yw.UnfreezeBalanceV2Contract,o,n?.permissionId,s)}async cancelUnfreezeBalanceV2(e=this.tronWeb.defaultAddress.hex,t={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:e}]);const r={owner_address:py(e)},n=Bw(t);return Cw(this.tronWeb,yw.CancelAllUnfreezeV2Contract,r,t?.permissionId,n)}async delegateResource(e=0,t,r=\"BANDWIDTH\",n=this.tronWeb.defaultAddress.hex,o=!1,s,a={}){if(this.validator.notValid([{name:\"amount\",type:\"integer\",gt:0,value:e},{name:\"resource\",type:\"resource\",value:r,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'},{name:\"receiver\",type:\"address\",value:t},{name:\"origin\",type:\"address\",value:n},{name:\"lock\",type:\"boolean\",value:o},{name:\"lock period\",type:\"integer\",gte:0,value:s,optional:!0}]),py(t)===py(n))throw new Error(\"Receiver address must not be the same as owner address\");const i={owner_address:py(n),receiver_address:py(t),balance:parseInt(e)};\"BANDWIDTH\"!==r&&(i.resource=r),o&&(i.lock=o,ly(s)&&(i.lock_period=s));const c=Bw(a);return Cw(this.tronWeb,yw.DelegateResourceContract,i,a?.permissionId,c)}async undelegateResource(e=0,t,r=\"BANDWIDTH\",n=this.tronWeb.defaultAddress.hex,o={}){if(this.validator.notValid([{name:\"origin\",type:\"address\",value:n},{name:\"receiver\",type:\"address\",value:t},{name:\"amount\",type:\"integer\",gt:0,value:e},{name:\"resource\",type:\"resource\",value:r,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'}]),py(t)===py(n))throw new Error(\"Receiver address must not be the same as owner address\");const s={owner_address:py(n),receiver_address:py(t),balance:parseInt(e)};\"BANDWIDTH\"!==r&&(s.resource=r);const a=Bw(o);return Cw(this.tronWeb,yw.UnDelegateResourceContract,s,o?.permissionId,a)}async withdrawExpireUnfreeze(e=this.tronWeb.defaultAddress.hex,t={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:e}]);const r={owner_address:py(e)},n=Bw(t);return Cw(this.tronWeb,yw.WithdrawExpireUnfreezeContract,r,t?.permissionId,n)}async withdrawBlockRewards(e=this.tronWeb.defaultAddress.hex,t={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:e}]);const r={owner_address:py(e)},n=Bw(t);return Cw(this.tronWeb,yw.WithdrawBalanceContract,r,t?.permissionId,n)}async applyForSR(e=this.tronWeb.defaultAddress.hex,t=\"\",r={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:e},{name:\"url\",type:\"url\",value:t,msg:\"Invalid url provided\"},{name:\"url\",type:\"string\",value:t,lte:256,msg:\"Invalid url provided\"}]);const n={owner_address:py(e),url:vw(t)},o=Bw(r);return Cw(this.tronWeb,yw.WitnessCreateContract,n,r?.permissionId,o)}async vote(e={},t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:\"voter\",type:\"address\",value:t},{name:\"votes\",type:\"notEmptyObject\",value:e}]);const n=Object.entries(e);for(const[e,t]of n)this.validator.notValid([{name:\"SR\",type:\"address\",value:e},{name:\"vote count\",type:\"integer\",gt:0,value:t,msg:\"Invalid vote count provided for SR: \"+e}]);const o=n.map(([e,t])=>({vote_address:py(e),vote_count:parseInt(t)})),s={owner_address:py(t),votes:o},a=Bw(r);return Cw(this.tronWeb,yw.VoteWitnessContract,s,r?.permissionId,a)}async createSmartContract(e={},t=this.tronWeb.defaultAddress.hex){const r=e.feeLimit||this.tronWeb.feeLimit;let n=e.userFeePercentage;\"number\"==typeof n||n||(n=100);const o=e.originEnergyLimit||1e7,s=e.callValue||0,a=e.tokenValue,i=e.tokenId||e.token_id;let{abi:c}=e;const{parameters:u=[]}=e;let l=\"\";const{bytecode:d=!1,name:f=\"\"}=e;if(c&&ty(c))try{c=JSON.parse(c)}catch{throw new Error(\"Invalid options.abi provided\")}const p=c;let h=p;if(p.entrys&&(h=p.entrys),!Yg(h))throw new Error(\"Invalid options.abi provided\");const g=h.some(e=>\"constructor\"===e.type&&\"payable\"===e.stateMutability.toLowerCase());if(this.validator.notValid([{name:\"bytecode\",type:\"hex\",value:d},{name:\"feeLimit\",type:\"integer\",value:r,gt:0},{name:\"callValue\",type:\"integer\",value:s,gte:0},{name:\"userFeePercentage\",type:\"integer\",value:n,gte:0,lte:100},{name:\"originEnergyLimit\",type:\"integer\",value:o,gte:0,lte:1e7},{name:\"parameters\",type:\"array\",value:u},{name:\"issuer\",type:\"address\",value:t},{name:\"tokenValue\",type:\"integer\",value:a,gte:0,optional:!0},{name:\"tokenId\",type:\"integer\",value:i,gte:0,optional:!0}]),!g&&(s>0||a>0))throw new Error(\"When contract is not payable, options.callValue and options.tokenValue must be 0\");const{rawParameter:y,funcABIV2:m,parametersV2:b}=e;if(y&&ty(y))l=y.replace(/^(0x)/,\"\");else if(m)l=Ey(m,b).replace(/^(0x)/,\"\");else{let e=h.find(e=>\"constructor\"===e.type);if(void 0!==e&&e){const t=new Vu,r=[],n=[];if(e=e.inputs,u.length!=e.length)throw new Error(`constructor needs ${e.length} but ${u.length} provided`);for(let t=0;t<u.length;t++){let o=e[t].type,s=u[t];if(!o||!ty(o)||!o.length)throw new Error(\"Invalid parameter type provided: \"+o);const a=e=>Yg(e)?e.map(e=>a(e)):py(e).replace(go,\"0x\");\"address\"===o||\"address[\"===o.match(/^([^\\x5b]*)(\\x5b|$)/)?.[0]?s=a(s):/trcToken/.test(o)&&(o=o.replace(/trcToken/,\"uint256\")),r.push(o),n.push(s)}try{l=t.encode(r,n).replace(/^(0x)/,\"\")}catch(e){throw new Error(e)}}else l=\"\"}const w={owner_address:py(t),fee_limit:parseInt(r),call_value:parseInt(s),consume_user_resource_percent:n,origin_energy_limit:o,abi:JSON.stringify(h),bytecode:d,parameter:l,name:f};ly(a)&&(w.call_token_value=parseInt(a)),ly(i)&&(w.token_id=parseInt(i));const T={};T.owner_address=w.owner_address,ly(w.call_token_value)&&(T.call_token_value=w.call_token_value),ly(w.token_id)&&(T.token_id=w.token_id);const A=T.new_contract={};w.abi?A.abi={entrys:JSON.parse(w.abi)}:A.abi={},w.call_value&&(A.call_value=w.call_value),A.consume_user_resource_percent=w.consume_user_resource_percent,A.origin_energy_limit=w.origin_energy_limit,A.origin_address=w.origin_address??w.owner_address,w.bytecode+w.parameter&&(A.bytecode=(w.bytecode+w.parameter).replace(/^0x/,\"\")),ly(w.name)&&(A.name=w.name);const v=Bw(e),P=await Cw(this.tronWeb,yw.CreateSmartContract,T,e?.permissionId,{...v,fee_limit:w.fee_limit});var E,C;return P.contract_address=(E=w.owner_address,C=P.txID,\"41\"+oi(Aw.from(C+E,\"hex\")).toString().substring(2).slice(24)),P}async triggerSmartContract(e,t,r,n,o){const s=[e,t,r,n,o];return\"object\"!=typeof s[2]&&(s[2]={feeLimit:s[2],callValue:s[3]},s.splice(3,1)),s[2]?.txLocal?this._triggerSmartContractLocal(...s):this._triggerSmartContract(...s)}async triggerConstantContract(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){return r._isConstant=!0,this._triggerSmartContract(e,t,r,n,o)}async triggerConfirmedConstantContract(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){return r._isConstant=!0,r.confirmed=!0,this._triggerSmartContract(e,t,r,n,o)}async estimateEnergy(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){r.estimateEnergy=!0;return await this._triggerSmartContract(e,t,r,n,o)}async deployConstantContract(e={input:\"\",ownerAddress:\"\"}){const{input:t,ownerAddress:r,tokenId:n,tokenValue:o,callValue:s=0}=e;this.validator.notValid([{name:\"input\",type:\"not-empty-string\",value:t},{name:\"callValue\",type:\"integer\",value:s,gte:0},{name:\"owner\",type:\"address\",value:r},{name:\"tokenValue\",type:\"integer\",value:o,gte:0,optional:!0},{name:\"tokenId\",type:\"integer\",value:n,gte:0,optional:!0}]);const a={data:t,owner_address:py(r),call_value:s};n&&(a.token_id=n),o&&(a.call_token_value=o);const i=`wallet${e.confirmed?\"solidity\":\"\"}/estimateenergy`,c=await this.tronWeb[e.confirmed?\"solidityNode\":\"fullNode\"].request(i,a,\"post\");if(c.Error)throw new Error(c.Error);if(c.result&&c.result.message)throw new Error(this.tronWeb.toUtf8(c.result.message));return c}_getTriggerSmartContractArgs(e,t,r,n,o,s,a,i,c){const u={contract_address:py(e),owner_address:py(o)};if(t&&ty(t)){let e;if(t=t.replace(/\\s*/g,\"\"),n.length){const t=new Vu;let r=[];const o=[];for(let e=0;e<n.length;e++){let{value:t}=n[e];const{type:s}=n[e];if(!s||!ty(s)||!s.length)throw new Error(\"Invalid parameter type provided: \"+s);const a=e=>Yg(e)?e.map(e=>a(e)):py(e).replace(go,\"0x\");(\"address\"===s||\"address[\"===s.match(/^([^\\x5b]*)(\\x5b|$)/)?.[0])&&(t=a(t)),r.push(s),o.push(t)}try{r=r.map(e=>(/trcToken/.test(e)&&(e=e.replace(/trcToken/,\"uint256\")),e)),e=t.encode(r,o).replace(/^(0x)/,\"\")}catch(e){throw new Error(e)}}else e=\"\";r.funcABIV2&&(e=Ey(r.funcABIV2,r.parametersV2).replace(/^(0x)/,\"\")),r.shieldedParameter&&ty(r.shieldedParameter)&&(e=r.shieldedParameter.replace(/^(0x)/,\"\")),r.rawParameter&&ty(r.rawParameter)&&(e=r.rawParameter.replace(/^(0x)/,\"\")),u.function_selector=t,u.parameter=e}else r.input&&(u.data=r.input);return u.call_value=parseInt(i),ly(s)&&(u.call_token_value=parseInt(s)),ly(a)&&(u.token_id=parseInt(a)),r._isConstant||r.estimateEnergy||(u.fee_limit=parseInt(c)),r.permissionId&&(u.Permission_id=r.permissionId),u}async _triggerSmartContractLocal(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){const{tokenValue:s,tokenId:a,callValue:i,feeLimit:c}=Object.assign({callValue:0,feeLimit:this.tronWeb.feeLimit},r);this.validator.notValid([{name:\"feeLimit\",type:\"integer\",value:c,gt:0},{name:\"callValue\",type:\"integer\",value:i,gte:0},{name:\"parameters\",type:\"array\",value:n},{name:\"contract\",type:\"address\",value:e},{name:\"issuer\",type:\"address\",value:o,optional:!0},{name:\"tokenValue\",type:\"integer\",value:s,gte:0,optional:!0},{name:\"tokenId\",type:\"integer\",value:a,gte:0,optional:!0}]);const u=this._getTriggerSmartContractArgs(e,t,r,n,o,s,a,i,c);u.function_selector&&(u.data=oi(Ww.from(u.function_selector,\"utf-8\")).toString().substring(2,10)+u.parameter);const l={data:u.data,owner_address:u.owner_address,contract_address:u.contract_address};u.call_value&&(l.call_value=u.call_value),u.call_token_value&&(l.call_token_value=u.call_token_value),u.token_id&&(l.token_id=u.token_id);const d=Bw(r);return{result:{result:!0},transaction:await Cw(this.tronWeb,yw.TriggerSmartContract,l,r.permissionId,{...d,fee_limit:u.fee_limit})}}async _triggerSmartContract(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){const{tokenValue:s,tokenId:a,callValue:i,feeLimit:c}=Object.assign({callValue:0,feeLimit:this.tronWeb.feeLimit},r);this.validator.notValid([{name:\"feeLimit\",type:\"integer\",value:c,gt:0},{name:\"callValue\",type:\"integer\",value:i,gte:0},{name:\"parameters\",type:\"array\",value:n},{name:\"contract\",type:\"address\",value:e},{name:\"issuer\",type:\"address\",value:o,optional:!0},{name:\"tokenValue\",type:\"integer\",value:s,gte:0,optional:!0},{name:\"tokenId\",type:\"integer\",value:a,gte:0,optional:!0}]);const u=this._getTriggerSmartContractArgs(e,t,r,n,o,s,a,i,c);let l=\"triggersmartcontract\";r._isConstant?l=\"triggerconstantcontract\":r.estimateEnergy&&(l=\"estimateenergy\"),l=`wallet${r.confirmed?\"solidity\":\"\"}/${l}`;return function(e,t,r){if(e.Error)throw new Error(e.Error);if(e.result&&e.result.message)throw new Error(Lw.toUtf8(e.result.message));if(!r._isConstant&&!r.estimateEnergy){if(DT(e.transaction,t,r))return e;throw new Error(\"Invalid transaction\")}return e}(await this.tronWeb[r.confirmed?\"solidityNode\":\"fullNode\"].request(l,u,\"post\"),u,r)}async clearABI(e,t=this.tronWeb.defaultAddress.hex,r={}){if(!Lw.isAddress(e))throw new Error(\"Invalid contract address provided\");if(!Lw.isAddress(t))throw new Error(\"Invalid owner address provided\");const n={contract_address:py(e),owner_address:py(t)};this.tronWeb.trx.cache.contracts[e]&&delete this.tronWeb.trx.cache.contracts[e];const o=Bw(r);return Cw(this.tronWeb,yw.ClearABIContract,n,r?.permissionId,o)}async updateBrokerage(e,t=this.tronWeb.defaultAddress.hex,r={}){if(!ly(e))throw new Error(\"Invalid brokerage provided\");if(!oy(e)||e<0||e>100)throw new Error(\"Brokerage must be an integer between 0 and 100\");if(!Lw.isAddress(t))throw new Error(\"Invalid owner address provided\");const n={brokerage:parseInt(e),owner_address:py(t)},o=Bw(r);return Cw(this.tronWeb,yw.UpdateBrokerageContract,n,r?.permissionId,o)}async createToken(e={},t=this.tronWeb.defaultAddress.hex){const{name:r=!1,abbreviation:n=!1,description:o=\"\",url:s=!1,totalSupply:a=0,trxRatio:i=1,tokenRatio:c=1,saleStart:u=Date.now(),saleEnd:l=!1,freeBandwidth:d=0,freeBandwidthLimit:f=0,frozenAmount:p=0,frozenDuration:h=0,voteScore:g,precision:y}=e;if(this.validator.notValid([{name:\"Supply amount\",type:\"positive-integer\",value:a},{name:\"TRX ratio\",type:\"positive-integer\",value:i},{name:\"Token ratio\",type:\"positive-integer\",value:c},{name:\"token abbreviation\",type:\"string\",value:n,lte:32,gt:0},{name:\"token name\",type:\"not-empty-string\",value:r},{name:\"token description\",type:\"string\",value:o,lte:200},{name:\"token url\",type:\"url\",value:s},{name:\"token url\",type:\"string\",value:s,lte:256},{name:\"issuer\",type:\"address\",value:t},{name:\"sale start timestamp\",type:\"integer\",value:u,gte:Date.now()},{name:\"sale end timestamp\",type:\"integer\",value:l,gt:u},{name:\"Frozen supply\",type:\"integer\",value:p,gte:0},{name:\"Frozen duration\",type:\"integer\",value:h,gte:0}]),ly(g)&&(!oy(g)||g<=0))throw new Error(\"voteScore must be a positive integer greater than 0\");if(ly(y)&&(!oy(y)||y<0||y>6))throw new Error(\"precision must be a positive integer >= 0 and <= 6\");const m={owner_address:py(t),name:vw(r),abbr:vw(n),description:vw(o),url:vw(s),total_supply:parseInt(a),trx_num:parseInt(i),num:parseInt(c),start_time:parseInt(u),end_time:parseInt(l),frozen_supply:[{frozen_amount:parseInt(p),frozen_days:parseInt(h)}]};[\"name\",\"abbr\",\"description\",\"url\"].forEach(e=>{m[e]||delete m[e]}),parseInt(p)>0||delete m.frozen_supply,d&&!isNaN(parseInt(d))&&parseInt(d)>=0&&(m.free_asset_net_limit=parseInt(d)),f&&!isNaN(parseInt(f))&&parseInt(f)>=0&&(m.public_free_asset_net_limit=parseInt(f)),y&&!isNaN(parseInt(y))&&(m.precision=parseInt(y)),g&&!isNaN(parseInt(g))&&(m.vote_score=parseInt(g));const b=Bw(e);return Cw(this.tronWeb,yw.AssetIssueContract,m,e?.permissionId,b)}async createAccount(e,t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:\"account\",type:\"address\",value:e},{name:\"origin\",type:\"address\",value:t}]);const n={owner_address:py(t),account_address:py(e)},o=Bw(r);return Cw(this.tronWeb,yw.AccountCreateContract,n,r?.permissionId,o)}async updateAccount(e,t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:\"Name\",type:\"string\",lte:200,gt:0,value:e,msg:\"Invalid accountName\"},{name:\"origin\",type:\"address\",value:t}]);const n={account_name:vw(e),owner_address:py(t)},o=Bw(r);return Cw(this.tronWeb,yw.AccountUpdateContract,n,r?.permissionId,o)}async setAccountId(e,t=this.tronWeb.defaultAddress.hex,r={}){e&&ty(e)&&e.startsWith(\"0x\")&&(e=e.slice(2)),this.validator.notValid([{name:\"accountId\",type:\"hex\",value:e},{name:\"accountId\",type:\"string\",lte:32,gte:8,value:e},{name:\"origin\",type:\"address\",value:t}]);const n={account_id:e,owner_address:py(t)},o=Bw(r);return Cw(this.tronWeb,yw.SetAccountIdContract,n,r?.permissionId,o)}async updateToken(e={},t=this.tronWeb.defaultAddress.hex){const{description:r=\"\",url:n=!1,freeBandwidth:o=0,freeBandwidthLimit:s=0}=e;this.validator.notValid([{name:\"token description\",type:\"string\",value:r,lte:200},{name:\"token url\",type:\"url\",value:n},{name:\"token url\",type:\"string\",value:n,lte:256},{name:\"issuer\",type:\"address\",value:t}]);const a={owner_address:py(t),description:vw(r),url:vw(n)};o&&!isNaN(parseInt(o))&&parseInt(o)>=0&&(a.new_limit=parseInt(o)),s&&!isNaN(parseInt(s))&&parseInt(s)>=0&&(a.new_public_limit=parseInt(s));const i=Bw(e);return Cw(this.tronWeb,yw.UpdateAssetContract,a,e?.permissionId,i)}async sendAsset(e,t=0,r,n=this.tronWeb.defaultAddress.hex,o={}){return this.sendToken(e,t,r,n,o)}async purchaseAsset(e,t,r=0,n=this.tronWeb.defaultAddress.hex,o={}){return this.purchaseToken(e,t,r,n,o)}async createAsset(e,t){return this.createToken(e,t)}async updateAsset(e={},t=this.tronWeb.defaultAddress.hex){return this.updateToken(e,t)}async createProposal(e,t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:\"issuer\",type:\"address\",value:t}]);const n=\"Invalid proposal parameters provided\";if(!e)throw new Error(n);const o=Yg(e)?e:[e];for(const e of o)if(!Jg(e))throw new Error(n);const s={owner_address:py(t),parameters:o},a=Bw(r);return Cw(this.tronWeb,yw.ProposalCreateContract,s,r?.permissionId,a)}async deleteProposal(e,t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:\"issuer\",type:\"address\",value:t},{name:\"proposalID\",type:\"integer\",value:e,gte:0}]);const n={owner_address:py(t),proposal_id:parseInt(e)},o=Bw(r);return Cw(this.tronWeb,yw.ProposalDeleteContract,n,r?.permissionId,o)}async voteProposal(e,t=!1,r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:\"voter\",type:\"address\",value:r},{name:\"proposalID\",type:\"integer\",value:e,gte:0},{name:\"has approval\",type:\"boolean\",value:t}]);const o={owner_address:py(r),proposal_id:parseInt(e),is_add_approval:t},s=Bw(n);return Cw(this.tronWeb,yw.ProposalApproveContract,o,n?.permissionId,s)}async createTRXExchange(e,t,r,n=this.tronWeb.defaultAddress.hex,o={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:n},{name:\"token name\",type:\"not-empty-string\",value:e},{name:\"token balance\",type:\"positive-integer\",value:t},{name:\"trx balance\",type:\"positive-integer\",value:r}]);const s={owner_address:py(n),first_token_id:vw(e),first_token_balance:t,second_token_id:\"5f\",second_token_balance:r},a=Bw(o);return Cw(this.tronWeb,yw.ExchangeCreateContract,s,o?.permissionId,a)}async createTokenExchange(e,t,r,n,o=this.tronWeb.defaultAddress.hex,s={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:o},{name:\"first token name\",type:\"not-empty-string\",value:e},{name:\"second token name\",type:\"not-empty-string\",value:r},{name:\"first token balance\",type:\"positive-integer\",value:t},{name:\"second token balance\",type:\"positive-integer\",value:n}]);const a={owner_address:py(o),first_token_id:vw(e),first_token_balance:t,second_token_id:vw(r),second_token_balance:n},i=Bw(s);return Cw(this.tronWeb,yw.ExchangeCreateContract,a,s?.permissionId,i)}async injectExchangeTokens(e,t,r,n=this.tronWeb.defaultAddress.hex,o={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:n},{name:\"token name\",type:\"not-empty-string\",value:t},{name:\"token amount\",type:\"integer\",value:r,gte:1},{name:\"exchangeID\",type:\"integer\",value:e,gte:0}]);const s={owner_address:py(n),exchange_id:parseInt(e),token_id:vw(t),quant:parseInt(r)},a=Bw(o);return Cw(this.tronWeb,yw.ExchangeInjectContract,s,o?.permissionId,a)}async withdrawExchangeTokens(e,t,r,n=this.tronWeb.defaultAddress.hex,o={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:n},{name:\"token name\",type:\"not-empty-string\",value:t},{name:\"token amount\",type:\"integer\",value:r,gte:1},{name:\"exchangeID\",type:\"integer\",value:e,gte:0}]);const s={owner_address:py(n),exchange_id:parseInt(e),token_id:vw(t),quant:parseInt(r)},a=Bw(o);return Cw(this.tronWeb,yw.ExchangeWithdrawContract,s,o?.permissionId,a)}async tradeExchangeTokens(e,t,r,n,o=this.tronWeb.defaultAddress.hex,s={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:o},{name:\"token name\",type:\"not-empty-string\",value:t},{name:\"tokenAmountSold\",type:\"integer\",value:r,gte:1},{name:\"tokenAmountExpected\",type:\"integer\",value:n,gte:1},{name:\"exchangeID\",type:\"integer\",value:e,gte:0}]);const a={owner_address:py(o),exchange_id:parseInt(e),token_id:Lw.fromAscii(t).replace(/^0x/,\"\"),quant:parseInt(r),expected:parseInt(n)},i=Bw(s);return Cw(this.tronWeb,yw.ExchangeTransactionContract,a,s?.permissionId,i)}async updateSetting(e,t,r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:r},{name:\"contract\",type:\"address\",value:e},{name:\"userFeePercentage\",type:\"integer\",value:t,gte:0,lte:100}]);const o={owner_address:py(r),contract_address:py(e),consume_user_resource_percent:t},s=Bw(n);return Cw(this.tronWeb,yw.UpdateSettingContract,o,n?.permissionId,s)}async updateEnergyLimit(e,t=0,r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:r},{name:\"contract\",type:\"address\",value:e},{name:\"originEnergyLimit\",type:\"integer\",value:t,gte:0,lte:1e7}]);const o={owner_address:py(r),contract_address:py(e),origin_energy_limit:t},s=Bw(n);return Cw(this.tronWeb,yw.UpdateEnergyLimitContract,o,n?.permissionId,s)}checkPermissions(e,t){if(e){if(e.type!==t||!e.permission_name||!ty(e.permission_name)||!oy(e.threshold)||e.threshold<1||!e.keys)return!1;for(const r of e.keys)if(!Lw.isAddress(r.address)||!oy(r.weight)||r.weight>e.threshold||r.weight<1||2===t&&!e.operations)return!1}return!0}async updateAccountPermissions(e=this.tronWeb.defaultAddress.hex,t,r,n,o={}){if(!Lw.isAddress(e))throw new Error(\"Invalid ownerAddress provided\");if(!this.checkPermissions(t,0))throw new Error(\"Invalid ownerPermissions provided\");if(!this.checkPermissions(r,1))throw new Error(\"Invalid witnessPermissions provided\");Array.isArray(n)||(n=[n]);for(const e of n)if(!this.checkPermissions(e,2))throw new Error(\"Invalid activesPermissions provided\");const s={owner_address:py(e)};if(t){const e=Pw(t);\"type\"in e&&delete e.type,e.keys=e.keys?.map(({address:e,weight:t})=>({address:py(e),weight:t})),s.owner=e}if(r){const e=Pw(r);e.type=\"Witness\",e.keys=e.keys.map(({address:e,weight:t})=>({address:py(e),weight:t})),s.witness=e}if(n){const e=Pw(n);e.forEach(e=>{e.type=\"Active\"}),e.forEach(e=>{e.keys=e.keys.map(({address:e,weight:t})=>({address:py(e),weight:t}))}),s.actives=e}const a=Bw(o);return Cw(this.tronWeb,yw.AccountPermissionUpdateContract,s,o?.permissionId,a)}async newTxID(e,t={}){if(t?.txLocal){const t=e.raw_data.contract[0];try{const r=await Cw(this.tronWeb,t.type,t.parameter.value,t.Permission_id,{fee_limit:e.raw_data.fee_limit,data:e.raw_data.data,ref_block_bytes:e.raw_data.ref_block_bytes,ref_block_hash:e.raw_data.ref_block_hash,expiration:e.raw_data.expiration,timestamp:e.raw_data.timestamp});return r.signature=e.signature,r.visible=e.visible,r}catch(e){throw new Error(\"Error generating a new transaction id.\")}}try{const t=await this.tronWeb.fullNode.request(\"wallet/getsignweight\",e,\"post\");return\"boolean\"==typeof e.visible&&(t.transaction.transaction.visible=e.visible),function(e,t,r){if(e.Error)throw new Error(e.Error);if(e.result&&e.result.message)throw new Error(Lw.toUtf8(e.result.message));if(DT(e,t,r))return e;throw new Error(\"Invalid transaction\")}(t.transaction.transaction,{...e.raw_data.contract[0].parameter.value,Permission_id:e.raw_data.contract[0].Permission_id},{data:e.raw_data.data,fee_limit:e.raw_data.fee_limit})}catch(e){throw new Error(\"Error generating a new transaction id.\")}}async alterTransaction(e,t={}){if(Reflect.has(e,\"signature\"))throw new Error(\"You can not extend the expiration of a signed transaction.\");if(t.data){if(\"hex\"===t.dataFormat||/^0x/.test(t.data)||(t.data=Lw.fromUtf8(t.data)),!ny(t.data))throw new Error(\"Invalid data provided\");if(t.data=t.data.replace(/^0x/,\"\"),t.data=t.data.padStart(2*Math.ceil(t.data.length/2),\"0\"),0===t.data.length)throw new Error(\"Invalid data provided\");e.raw_data.data=t.data}if(t.extension){if(t.extension=parseInt(1e3*t.extension),isNaN(t.extension)||e.raw_data.expiration+t.extension<=Date.now()+3e3)throw new Error(\"Invalid extension provided\");e.raw_data.expiration+=t.extension}return await this.newTxID(e,{txLocal:t.txLocal})}async extendExpiration(e,t,r={}){return await this.alterTransaction(e,{extension:t,txLocal:r?.txLocal})}async addUpdateData(e,t,r=\"utf8\",n={}){return this.alterTransaction(e,{data:t,dataFormat:r,txLocal:n?.txLocal})}}const Iw=\"\u0019TRON Signed Message:\\n32\",_w=\"\u0019Ethereum Signed Message:\\n32\";class Rw{tronWeb;cache;validator;signMessage;sendAsset;send;sendTrx;broadcast;broadcastHex;signTransaction;constructor(e){this.tronWeb=e,this.cache={contracts:{}},this.validator=new Tw,this.signMessage=this.sign,this.sendAsset=this.sendToken,this.send=this.sendTransaction,this.sendTrx=this.sendTransaction,this.broadcast=this.sendRawTransaction,this.broadcastHex=this.sendHexTransaction,this.signTransaction=this.sign}_parseToken(e){return{...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)}}getCurrentBlock(){return this.tronWeb.fullNode.request(\"wallet/getnowblock\")}getConfirmedCurrentBlock(){return this.tronWeb.solidityNode.request(\"walletsolidity/getnowblock\")}async getBlock(e=this.tronWeb.defaultBlock){if(!1===e)throw new Error(\"No block identifier provided\");return\"earliest\"==e&&(e=0),\"latest\"==e?this.getCurrentBlock():isNaN(+e)&&nA.isHex(e.toString())?this.getBlockByHash(e):this.getBlockByNumber(e)}async getBlockByHash(e){const t=await this.tronWeb.fullNode.request(\"wallet/getblockbyid\",{value:e},\"post\");if(!Object.keys(t).length)throw new Error(\"Block not found\");return t}async getBlockByNumber(e){if(!nA.isInteger(e)||e<0)throw new Error(\"Invalid block number provided\");return this.tronWeb.fullNode.request(\"wallet/getblockbynum\",{num:parseInt(e)},\"post\").then(e=>{if(!Object.keys(e).length)throw new Error(\"Block not found\");return e})}async getBlockTransactionCount(e=this.tronWeb.defaultBlock){const{transactions:t=[]}=await this.getBlock(e);return t.length}async getTransactionFromBlock(e=this.tronWeb.defaultBlock,t){const{transactions:r}=await this.getBlock(e);if(!r)throw new Error(\"Transaction not found in block\");if(t>=0&&t<r.length)return r[t];throw new Error(\"Invalid transaction index provided\")}async getTransactionsFromBlock(e=this.tronWeb.defaultBlock){const{transactions:t}=await this.getBlock(e);if(!t)throw new Error(\"Transaction not found in block\");return t}async getTransaction(e){const t=await this.tronWeb.fullNode.request(\"wallet/gettransactionbyid\",{value:e},\"post\");if(!Object.keys(t).length)throw new Error(\"Transaction not found\");return t}async getConfirmedTransaction(e){const t=await this.tronWeb.solidityNode.request(\"walletsolidity/gettransactionbyid\",{value:e},\"post\");if(!Object.keys(t).length)throw new Error(\"Transaction not found\");return t}getUnconfirmedTransactionInfo(e){return this.tronWeb.fullNode.request(\"wallet/gettransactioninfobyid\",{value:e},\"post\")}getTransactionInfo(e){return this.tronWeb.solidityNode.request(\"walletsolidity/gettransactioninfobyid\",{value:e},\"post\")}getTransactionsToAddress(e=this.tronWeb.defaultAddress.hex,t=30,r=0){return this.getTransactionsRelated(py(e),\"to\",t,r)}getTransactionsFromAddress(e=this.tronWeb.defaultAddress.hex,t=30,r=0){return this.getTransactionsRelated(py(e),\"from\",t,r)}async getTransactionsRelated(e=this.tronWeb.defaultAddress.hex,t=\"all\",r=30,n=0){if(this.tronWeb.fullnodeSatisfies(\">=4.1.1\"))throw new Error(\"This api is not supported any more\");if(![\"to\",\"from\",\"all\"].includes(t))throw new Error('Invalid direction provided: Expected \"to\", \"from\" or \"all\"');if(\"all\"==t){const[t,o]=await Promise.all([this.getTransactionsRelated(e,\"from\",r,n),this.getTransactionsRelated(e,\"to\",r,n)]);return[...t.map(e=>(e.direction=\"from\",e)),...o.map(e=>(e.direction=\"to\",e))].sort((e,t)=>t.raw_data.timestamp-e.raw_data.timestamp)}if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");if(!nA.isInteger(r)||r<0||n&&r<1)throw new Error(\"Invalid limit provided\");if(!nA.isInteger(n)||n<0)throw new Error(\"Invalid offset provided\");return e=py(e),this.tronWeb.solidityNode.request(`walletextension/gettransactions${t}this`,{account:{address:e},offset:n,limit:r},\"post\").then(({transaction:e})=>e)}async getAccount(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return e=py(e),this.tronWeb.solidityNode.request(\"walletsolidity/getaccount\",{address:e},\"post\")}getAccountById(e){return this.getAccountInfoById(e,{confirmed:!0})}async getAccountInfoById(e,t){return 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[t.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${t.confirmed?\"solidity\":\"\"}/getaccountbyid`,{account_id:e},\"post\")}async getBalance(e=this.tronWeb.defaultAddress.hex){const{balance:t=0}=await this.getAccount(e);return t}async getUnconfirmedAccount(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return e=py(e),this.tronWeb.fullNode.request(\"wallet/getaccount\",{address:e},\"post\")}getUnconfirmedAccountById(e){return this.getAccountInfoById(e,{confirmed:!1})}async getUnconfirmedBalance(e=this.tronWeb.defaultAddress.hex){const{balance:t=0}=await this.getUnconfirmedAccount(e);return t}async getBandwidth(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return e=py(e),this.tronWeb.fullNode.request(\"wallet/getaccountnet\",{address:e},\"post\").then(({freeNetUsed:e=0,freeNetLimit:t=0,NetUsed:r=0,NetLimit:n=0})=>t-e+(n-r))}async getTokensIssuedByAddress(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return e=py(e),this.tronWeb.fullNode.request(\"wallet/getassetissuebyaccount\",{address:e},\"post\").then(({assetIssue:e})=>{if(!e)return{};const t=e.map(e=>this._parseToken(e)).reduce((e,t)=>(e[t.name]=t,e),{});return t})}async getTokenFromID(e){if(nA.isInteger(e)&&(e=e.toString()),!nA.isString(e)||!e.length)throw new Error(\"Invalid token ID provided\");return this.tronWeb.fullNode.request(\"wallet/getassetissuebyname\",{value:this.tronWeb.fromUtf8(e)},\"post\").then(e=>{if(!e.name)throw new Error(\"Token does not exist\");return this._parseToken(e)})}async listNodes(){const{nodes:e=[]}=await this.tronWeb.fullNode.request(\"wallet/listnodes\");return e.map(({address:{host:e,port:t}})=>`${this.tronWeb.toUtf8(e)}:${t}`)}async getBlockRange(e=0,t=30){if(!nA.isInteger(e)||e<0)throw new Error(\"Invalid start of range provided\");if(!nA.isInteger(t)||t<e)throw new Error(\"Invalid end of range provided\");if(t+1-e>100)throw new Error(\"Invalid range size, which should be no more than 100.\");return this.tronWeb.fullNode.request(\"wallet/getblockbylimitnext\",{startNum:parseInt(e),endNum:parseInt(t)+1},\"post\").then(({block:e=[]})=>e)}async listSuperRepresentatives(){const{witnesses:e=[]}=await this.tronWeb.fullNode.request(\"wallet/listwitnesses\");return e}async listTokens(e=0,t=0){if(!nA.isInteger(e)||e<0||t&&e<1)throw new Error(\"Invalid limit provided\");if(!nA.isInteger(t)||t<0)throw new Error(\"Invalid offset provided\");return e?this.tronWeb.fullNode.request(\"wallet/getpaginatedassetissuelist\",{offset:parseInt(t),limit:parseInt(e)},\"post\").then(({assetIssue:e=[]})=>e.map(e=>this._parseToken(e))):this.tronWeb.fullNode.request(\"wallet/getassetissuelist\").then(({assetIssue:e=[]})=>e.map(e=>this._parseToken(e)))}async timeUntilNextVoteCycle(){const{num:e=-1}=await this.tronWeb.fullNode.request(\"wallet/getnextmaintenancetime\");if(-1==e)throw new Error(\"Failed to get time until next vote cycle\");return Math.floor(e/1e3)}async getContract(e){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid contract address provided\");if(this.cache.contracts[e])return this.cache.contracts[e];e=py(e);const t=await this.tronWeb.fullNode.request(\"wallet/getcontract\",{value:e});if(t.Error)throw new Error(\"Contract does not exist\");return this.cache.contracts[e]=t,t}ecRecover(e){return Rw.ecRecover(e)}static ecRecover(e){if(!UT(e))throw new Error(\"Invalid transaction\");if(!e.signature?.length)throw new Error(\"Transaction is not signed\");if(1===e.signature.length){const t=ig(e.txID,e.signature[0]);return Lw.address.fromHex(t)}return e.signature.map(t=>{const r=ig(e.txID,t);return Lw.address.fromHex(r)})}async verifyMessage(e,t,r=this.tronWeb.defaultAddress.base58,n=!0){if(!nA.isHex(e))throw new Error(\"Expected hex message input\");if(Rw.verifySignature(e,r,t,n))return!0;throw new Error(\"Signature does not match\")}static verifySignature(e,t,r,n=!0){e=e.replace(/^0x/,\"\");const o=[...Na(n?Iw:_w),...nA.code.hexStr2byteArray(e)],s=Fc(oi(new Uint8Array(o)),Cs.from(`0x${r.replace(/^0x/,\"\")}`)),a=po+s.substr(2);return Lw.address.fromHex(a)==Lw.address.fromHex(t)}async verifyMessageV2(e,t){return Rw.verifyMessageV2(e,t)}static verifyMessageV2(e,t){return nA.message.verifyMessage(e,t)}verifyTypedData(e,t,r,n,o=this.tronWeb.defaultAddress.base58){if(Rw.verifyTypedData(e,t,r,n,o))return!0;throw new Error(\"Signature does not match\")}static verifyTypedData(e,t,r,n,o){const s=Fc(nA.typedData.TypedDataEncoder.hash(e,t,r),Cs.from(`0x${n.replace(/^0x/,\"\")}`)),a=po+s.substr(2);return Lw.address.fromHex(a)==Lw.address.fromHex(o)}async sign(e,t=this.tronWeb.defaultPrivateKey,r=!0,n=!1){if(nA.isString(e)){if(!nA.isHex(e))throw new Error(\"Expected hex message input\");return Rw.signString(e,t,r)}if(!nA.isObject(e))throw new Error(\"Invalid transaction provided\");if(!n&&e.signature)throw new Error(\"Transaction is already signed\");if(!n){if(py(this.tronWeb.address.fromPrivateKey(t)).toLowerCase()!==py(e.raw_data.contract[0].parameter.value.owner_address))throw new Error(\"Private key does not match address in transaction\");if(!UT(e))throw new Error(\"Invalid transaction\")}return nA.crypto.signTransaction(t,e)}static signString(e,t,r=!0){e=e.replace(/^0x/,\"\");const n=`0x${t.replace(/^0x/,\"\")}`,o=new Oc(n),s=[...Na(r?Iw:_w),...nA.code.hexStr2byteArray(e)],a=oi(new Uint8Array(s)),i=o.sign(a);return[\"0x\",i.r.substring(2),i.s.substring(2),Number(i.v).toString(16)].join(\"\")}signMessageV2(e,t=this.tronWeb.defaultPrivateKey){return Rw.signMessageV2(e,t)}static signMessageV2(e,t){return nA.message.signMessage(e,t)}_signTypedData(e,t,r,n=this.tronWeb.defaultPrivateKey){return Rw._signTypedData(e,t,r,n)}static _signTypedData(e,t,r,n){return nA.typedData.signTypedData(e,t,r,n)}signTypedData(e,t,r,n=this.tronWeb.defaultPrivateKey){return Rw.signTypedData(e,t,r,n)}static signTypedData(e,t,r,n){return nA.typedData.signTypedData(e,t,r,n)}async multiSign(e,t=this.tronWeb.defaultPrivateKey,r=0){if(!nA.isObject(e)||!e.raw_data||!e.raw_data.contract)throw new Error(\"Invalid transaction provided\");if(!e.raw_data.contract[0].Permission_id&&r>0){e.raw_data.contract[0].Permission_id=r;const n=py(this.tronWeb.address.fromPrivateKey(t)).toLowerCase(),o=await this.getSignWeight(e,r);if(\"PERMISSION_ERROR\"===o.result.code)throw new Error(o.result.message);let s=!1;if(o.permission.keys.map(e=>{e.address===n&&(s=!0)}),!s)throw new Error(t+\" has no permission to sign\");if(o.approved_list&&-1!=o.approved_list.indexOf(n))throw new Error(t+\" already sign transaction\");if(!o.transaction||!o.transaction.transaction)throw new Error(\"Invalid transaction provided\");e=o.transaction.transaction,r>0&&(e.raw_data.contract[0].Permission_id=r)}if(!UT(e))throw new Error(\"Invalid transaction\");return nA.crypto.signTransaction(t,e)}async getApprovedList(e){if(!nA.isObject(e))throw new Error(\"Invalid transaction provided\");return this.tronWeb.fullNode.request(\"wallet/getapprovedlist\",e,\"post\")}async getSignWeight(e,t){if(!nA.isObject(e)||!e.raw_data||!e.raw_data.contract)throw new Error(\"Invalid transaction provided\");return nA.isInteger(t)?e.raw_data.contract[0].Permission_id=parseInt(t):\"number\"!=typeof e.raw_data.contract[0].Permission_id&&(e.raw_data.contract[0].Permission_id=0),this.tronWeb.fullNode.request(\"wallet/getsignweight\",e,\"post\")}async sendRawTransaction(e){if(!nA.isObject(e))throw new Error(\"Invalid transaction provided\");if(!e.signature||!nA.isArray(e.signature))throw new Error(\"Transaction is not signed\");return{...await this.tronWeb.fullNode.request(\"wallet/broadcasttransaction\",e,\"post\"),transaction:e}}async sendHexTransaction(e){if(!nA.isHex(e))throw new Error(\"Invalid hex transaction provided\");const t={transaction:e},r=await this.tronWeb.fullNode.request(\"wallet/broadcasthex\",t,\"post\");return r.result?{...r,transaction:JSON.parse(r.transaction),hexTransaction:e}:r}async sendTransaction(e,t,r={}){if(\"string\"==typeof r&&(r={privateKey:r}),!this.tronWeb.isAddress(e))throw new Error(\"Invalid recipient provided\");if(!nA.isInteger(t)||t<=0)throw new Error(\"Invalid amount provided\");if(!(r={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...r}).privateKey&&!r.address)throw new Error(\"Function requires either a private key or address to be set\");const n=r.privateKey?this.tronWeb.address.fromPrivateKey(r.privateKey):r.address,o=await this.tronWeb.transactionBuilder.sendTrx(e,t,n),s=await this.sign(o,r.privateKey);return await this.sendRawTransaction(s)}async sendToken(e,t,r,n={}){if(\"string\"==typeof n&&(n={privateKey:n}),!this.tronWeb.isAddress(e))throw new Error(\"Invalid recipient provided\");if(!nA.isInteger(t)||t<=0)throw new Error(\"Invalid amount provided\");if(nA.isInteger(r)&&(r=r.toString()),!nA.isString(r))throw new Error(\"Invalid token ID provided\");if(!(n={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...n}).privateKey&&!n.address)throw new Error(\"Function requires either a private key or address to be set\");const o=n.privateKey?this.tronWeb.address.fromPrivateKey(n.privateKey):n.address,s=await this.tronWeb.transactionBuilder.sendToken(e,t,r,o),a=await this.sign(s,n.privateKey);return await this.sendRawTransaction(a)}async freezeBalance(e=0,t=3,r=\"BANDWIDTH\",n={},o){if(\"string\"==typeof n&&(n={privateKey:n}),![\"BANDWIDTH\",\"ENERGY\"].includes(r))throw new Error('Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"');if(!nA.isInteger(e)||e<=0)throw new Error(\"Invalid amount provided\");if(!nA.isInteger(t)||t<3)throw new Error(\"Invalid duration provided, minimum of 3 days\");if(!(n={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...n}).privateKey&&!n.address)throw new Error(\"Function requires either a private key or address to be set\");const s=n.privateKey?this.tronWeb.address.fromPrivateKey(n.privateKey):n.address,a=await this.tronWeb.transactionBuilder.freezeBalance(e,t,r,s,o),i=await this.sign(a,n.privateKey);return await this.sendRawTransaction(i)}async unfreezeBalance(e=\"BANDWIDTH\",t={},r){if(\"string\"==typeof t&&(t={privateKey:t}),![\"BANDWIDTH\",\"ENERGY\"].includes(e))throw new Error('Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"');if(!(t={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...t}).privateKey&&!t.address)throw new Error(\"Function requires either a private key or address to be set\");const n=t.privateKey?this.tronWeb.address.fromPrivateKey(t.privateKey):t.address,o=await this.tronWeb.transactionBuilder.unfreezeBalance(e,n,r),s=await this.sign(o,t.privateKey);return await this.sendRawTransaction(s)}async updateAccount(e,t={}){if(\"string\"==typeof t&&(t={privateKey:t}),!nA.isString(e)||!e.length)throw new Error(\"Name must be a string\");if(!(t={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...t}).privateKey&&!t.address)throw Error(\"Function requires either a private key or address to be set\");const r=t.privateKey?this.tronWeb.address.fromPrivateKey(t.privateKey):t.address,n=await this.tronWeb.transactionBuilder.updateAccount(e,r),o=await this.sign(n,t.privateKey);return await this.sendRawTransaction(o)}async getProposal(e){if(!nA.isInteger(e)||e<0)throw new Error(\"Invalid proposalID provided\");return this.tronWeb.fullNode.request(\"wallet/getproposalbyid\",{id:parseInt(e)},\"post\")}async listProposals(){const{proposals:e=[]}=await this.tronWeb.fullNode.request(\"wallet/listproposals\",{},\"post\");return e}async getChainParameters(){const{chainParameter:e=[]}=await this.tronWeb.fullNode.request(\"wallet/getchainparameters\",{},\"post\");return e}async getAccountResources(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return this.tronWeb.fullNode.request(\"wallet/getaccountresource\",{address:py(e)},\"post\")}async getDelegatedResourceV2(e=this.tronWeb.defaultAddress.hex,t=this.tronWeb.defaultAddress.hex,r={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");if(!this.tronWeb.isAddress(t))throw new Error(\"Invalid address provided\");return this.tronWeb[r.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${r.confirmed?\"solidity\":\"\"}/getdelegatedresourcev2`,{fromAddress:py(e),toAddress:py(t)},\"post\")}async getDelegatedResourceAccountIndexV2(e=this.tronWeb.defaultAddress.hex,t={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return this.tronWeb[t.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${t.confirmed?\"solidity\":\"\"}/getdelegatedresourceaccountindexv2`,{value:py(e)},\"post\")}async getCanDelegatedMaxSize(e=this.tronWeb.defaultAddress.hex,t=\"BANDWIDTH\",r={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return this.validator.notValid([{name:\"resource\",type:\"resource\",value:t,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'}]),this.tronWeb[r.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${r.confirmed?\"solidity\":\"\"}/getcandelegatedmaxsize`,{owner_address:py(e),type:\"ENERGY\"===t?1:0},\"post\")}async getAvailableUnfreezeCount(e=this.tronWeb.defaultAddress.hex,t={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return this.tronWeb[t.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${t.confirmed?\"solidity\":\"\"}/getavailableunfreezecount`,{owner_address:py(e)},\"post\")}async getCanWithdrawUnfreezeAmount(e=this.tronWeb.defaultAddress.hex,t=Date.now(),r={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");if(!nA.isInteger(t)||t<0)throw new Error(\"Invalid timestamp provided\");return this.tronWeb[r.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${r.confirmed?\"solidity\":\"\"}/getcanwithdrawunfreezeamount`,{owner_address:py(e),timestamp:t},\"post\")}async getExchangeByID(e){if(!nA.isInteger(e)||e<0)throw new Error(\"Invalid exchangeID provided\");return this.tronWeb.fullNode.request(\"wallet/getexchangebyid\",{id:e},\"post\")}async listExchanges(){return this.tronWeb.fullNode.request(\"wallet/listexchanges\",{},\"post\").then(({exchanges:e=[]})=>e)}async listExchangesPaginated(e=10,t=0){return this.tronWeb.fullNode.request(\"wallet/getpaginatedexchangelist\",{limit:e,offset:t},\"post\").then(({exchanges:e=[]})=>e)}async getNodeInfo(){return this.tronWeb.fullNode.request(\"wallet/getnodeinfo\",{},\"post\")}async getTokenListByName(e){if(nA.isInteger(e)&&(e=e.toString()),!nA.isString(e)||!e.length)throw new Error(\"Invalid token ID provided\");return this.tronWeb.fullNode.request(\"wallet/getassetissuelistbyname\",{value:this.tronWeb.fromUtf8(e)},\"post\").then(e=>{if(Array.isArray(e.assetIssue))return e.assetIssue.map(e=>this._parseToken(e));if(!e.name)throw new Error(\"Token does not exist\");return this._parseToken(e)})}getTokenByID(e){if(nA.isInteger(e)&&(e=e.toString()),!nA.isString(e)||!e.length)throw new Error(\"Invalid token ID provided\");return this.tronWeb.fullNode.request(\"wallet/getassetissuebyid\",{value:e},\"post\").then(e=>{if(!e.name)throw new Error(\"Token does not exist\");return this._parseToken(e)})}async getReward(e,t={}){return t.confirmed=!0,this._getReward(e,t)}async getUnconfirmedReward(e,t={}){return t.confirmed=!1,this._getReward(e,t)}async getBrokerage(e,t={}){return t.confirmed=!0,this._getBrokerage(e,t)}async getUnconfirmedBrokerage(e,t={}){return t.confirmed=!1,this._getBrokerage(e,t)}async _getReward(e=this.tronWeb.defaultAddress.hex,t){this.validator.notValid([{name:\"origin\",type:\"address\",value:e}]);const r={address:py(e)};return this.tronWeb[t.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${t.confirmed?\"solidity\":\"\"}/getReward`,r,\"post\").then((e={reward:void 0})=>{if(void 0===e.reward)throw new Error(\"Not found.\");return e.reward})}async _getBrokerage(e=this.tronWeb.defaultAddress.hex,t){this.validator.notValid([{name:\"origin\",type:\"address\",value:e}]);const r={address:py(e)};return this.tronWeb[t.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${t.confirmed?\"solidity\":\"\"}/getBrokerage`,r,\"post\").then((e={})=>{if(void 0===e.brokerage)throw new Error(\"Not found.\");return e.brokerage})}async getBandwidthPrices(){return this.tronWeb.fullNode.request(\"wallet/getbandwidthprices\",{},\"post\").then((e={})=>{if(void 0===e.prices)throw new Error(\"Not found.\");return e.prices})}async getEnergyPrices(){return this.tronWeb.fullNode.request(\"wallet/getenergyprices\",{},\"post\").then((e={})=>{if(void 0===e.prices)throw new Error(\"Not found.\");return e.prices})}async getCurrentRefBlockParams(){try{const{block_header:e,blockID:t}=await this.tronWeb.fullNode.request(\"wallet/getblock\",{detail:!1},\"post\"),{number:r,timestamp:n}=e.raw_data;return{ref_block_bytes:r.toString(16).slice(-4).padStart(4,\"0\"),ref_block_hash:t.slice(16,32),expiration:n+6e4,timestamp:n}}catch(e){throw new Error(`Unable to get params: ${e.message||e}`)}}}const xw=(e,t)=>Cy(e,t);class Ow{tronWeb;contract;abi;name;inputs;outputs;functionSelector;signature;defaultOptions;constructor(e,t){this.tronWeb=e.tronWeb,this.contract=e,this.abi=t,this.name=t.name||t.type,this.inputs=t.inputs||[],this.outputs=[],\"outputs\"in t&&t.outputs&&(this.outputs=t.outputs),this.functionSelector=(e=>{if(\"stateMutability\"in e&&(e.stateMutability=e.stateMutability?e.stateMutability.toLowerCase():\"nonpayable\"),e.type=e.type?e.type.toLowerCase():\"\",\"fallback\"===e.type||\"receive\"===e.type)return\"0x\";const t=new nA.ethersUtils.Interface([e]);let r;if(r=\"event\"===e.type?t.getEvent(e.name):t.getFunction(e.name),r)return r.format(\"sighash\");throw new Error(\"unknown function\")})(t),this.signature=Eg(this.functionSelector,!1).slice(0,8),this.defaultOptions={feeLimit:this.tronWeb.feeLimit,callValue:0,shouldPollResponse:!1}}decodeInput(e){const t=JSON.parse(JSON.stringify(this.abi));return t.outputs=t.inputs,xw(t,\"0x\"+e)}onMethod(...e){let t=\"\";return this.abi&&!/event/i.test(this.abi.type)&&(t=Ey(this.abi,e)),{call:async(e={})=>(e={...e,rawParameter:t},await this._call([],[],e)),send:async(e={},r=this.tronWeb.defaultPrivateKey)=>(e={...e,rawParameter:t},await this._send([],[],e,r))}}async _call(e,t,r={}){if(e.length!==t.length)throw new Error(\"Invalid argument count provided\");if(!this.contract.address)throw new Error(\"Smart contract is missing address\");if(!this.contract.deployed)throw new Error(\"Calling smart contracts requires you to load the contract first\");if(\"stateMutability\"in this.abi){const{stateMutability:e}=this.abi;if(e&&![\"pure\",\"view\"].includes(e.toLowerCase()))throw new Error(`Methods with state mutability \"${e}\" must use send()`)}r={...this.defaultOptions,from:this.tronWeb.defaultAddress.hex,...r,_isConstant:!0};const n=t.map((t,r)=>({type:e[r],value:t})),o=await this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address,this.functionSelector,r,n,r.from?this.tronWeb.address.toHex(r.from):void 0);if(!nA.hasProperty(o,\"constant_result\"))throw new Error(\"Failed to execute\");const s=o.constant_result[0].length;if(0===s||s%64==8){let e=\"The call has been reverted or has thrown an error.\";if(0!==s){e+=\" Error message: \";let t=\"\";const r=o.constant_result[0].substring(8);for(let e=0;e<s-8;e+=64)t+=this.tronWeb.toUtf8(r.substring(e,e+64));e+=t.replace(/(\\u0000|\\u000b|\\f)+/g,\" \").replace(/ +/g,\" \").replace(/\\s+$/g,\"\")}throw new Error(e)}const a=xw(this.abi,\"0x\"+o.constant_result[0]);return 1===a.length&&1===Object.keys(a).length?a[0]:a}async _send(e,t,r={},n=this.tronWeb.defaultPrivateKey){if(e.length!==t.length)throw new Error(\"Invalid argument count provided\");if(!this.contract.address)throw new Error(\"Smart contract is missing address\");if(!this.contract.deployed)throw new Error(\"Calling smart contracts requires you to load the contract first\");const{stateMutability:o}=this.abi;if([\"pure\",\"view\"].includes(o.toLowerCase()))throw new Error(`Methods with state mutability \"${o}\" must use call()`);[\"payable\"].includes(o.toLowerCase())||(r.callValue=0),r={...this.defaultOptions,from:this.tronWeb.defaultAddress.hex,...r};const s=t.map((t,r)=>({type:e[r],value:t})),a=n?this.tronWeb.address.fromPrivateKey(n):this.tronWeb.defaultAddress.base58,i=await this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address,this.functionSelector,r,s,this.tronWeb.address.toHex(a));if(!i.result||!i.result.result)throw new Error(\"Unknown error: \"+JSON.stringify(i,null,2));const c=await this.tronWeb.trx.sign(i.transaction,n);if(!c.signature){if(!n)throw new Error(\"Transaction was not signed properly\");throw new Error(\"Invalid private key provided\")}const u=await this.tronWeb.trx.sendRawTransaction(c);if(u.code){const e={error:u.code,message:u.code};u.message&&(e.message=this.tronWeb.toUtf8(u.message));const t=new Error(e.message);throw t.error=u.code,t}if(!r.shouldPollResponse)return c.txID;const l=async e=>{if(e===(r.pollTimes||20)){const e=new Error(\"Cannot find result in solidity node\");throw e.error=\"Cannot find result in solidity node\",e.transaction=c,e}const t=await this.tronWeb.trx.getTransactionInfo(c.txID);if(!Object.keys(t).length)return await new Promise(e=>setTimeout(e,3e3)),l(e+1);if(t.result&&\"FAILED\"===t.result){const e=new Error(this.tronWeb.toUtf8(t.resMessage));throw e.error=this.tronWeb.toUtf8(t.resMessage),e.transaction=c,e.output=t,e}if(!nA.hasProperty(t,\"contractResult\")){const e=new Error(\"Failed to execute: \"+JSON.stringify(t,null,2));throw e.error=\"Failed to execute: \"+JSON.stringify(t,null,2),e.transaction=c,e.output=t,e}if(r.rawResponse)return t;let n=xw(this.abi,\"0x\"+t.contractResult[0]);return 1===n.length&&1===Object.keys(n).length?(n=n[0],r.keepTxID?[c.txID,n]:n):r.keepTxID?[c.txID,n]:n};return l(0)}}class Mw{tronWeb;abi;address;eventListener;bytecode;deployed;lastBlock;methods;methodInstances;props;constructor(e,t=[],r){if(!(e&&e instanceof Lw))throw new Error(\"Expected instance of TronWeb\");this.tronWeb=e,this.address=r,this.abi=t,this.eventListener=!1,this.bytecode=!1,this.deployed=!1,this.lastBlock=!1,this.methods={},this.methodInstances={},this.props=[],nA.address.isAddress(r)?this.deployed=!0:this.address=!1,this.loadAbi(t)}hasProperty(e){return this.hasOwnProperty(e)||this.__proto__.hasOwnProperty(e)}loadAbi(e){this.abi=e,this.methods={},this.props.forEach(e=>delete this[e]),e.forEach(e=>{if(!e.type||[\"constructor\",\"error\"].includes(e.type.toLowerCase()))return;const t=new Ow(this,e),r=t.onMethod.bind(t),{name:n,functionSelector:o,signature:s}=t,a=n,i=o,c=s;this.methods[n]=r,this.methods[o]=r,this.methods[s]=r,this.methodInstances[a]=t,this.methodInstances[i]=t,this.methodInstances[c]=t,this.hasProperty(n)||(this[n]=r,this.props.push(n)),this.hasProperty(o)||(this[o]=r,this.props.push(o)),this.hasProperty(s)||(this[s]=r,this.props.push(s))})}decodeInput(e){const t=e.substring(0,8),r=e.substring(8);if(!this.methodInstances[t])throw new Error(\"Contract method \"+t+\" not found\");return{name:this.methodInstances[t].name,params:this.methodInstances[t].decodeInput(r)}}async new(e,t=this.tronWeb.defaultPrivateKey){const r=this.tronWeb.address.fromPrivateKey(t),n=await this.tronWeb.transactionBuilder.createSmartContract(e,r),o=await this.tronWeb.trx.sign(n,t),s=await this.tronWeb.trx.sendRawTransaction(o);if(s.code)throw{error:s.code,message:this.tronWeb.toUtf8(s.message)};await nA.sleep(3e3);const a=o.raw_data.contract[0].parameter.value.new_contract.abi.entrys||[];return this.tronWeb.contract(a,o.contract_address)}async at(e){try{const t=await this.tronWeb.trx.getContract(e);if(!t.contract_address)throw new Error(\"Unknown error: \"+JSON.stringify(t,null,2));return this.address=t.contract_address,this.bytecode=t.bytecode,this.deployed=!0,this.loadAbi(t.abi&&t.abi.entrys?t.abi.entrys:[]),this}catch(e){if(e.toString().includes(\"does not exist\"))throw new Error(\"Contract has not been deployed on the network\");throw new Error(e)}}}class Fw{tronWeb;pluginNoOverride;disablePlugins;constructor(e,t={}){if(!(e&&e instanceof Lw))throw new Error(\"Expected instance of TronWeb\");this.tronWeb=e,this.pluginNoOverride=[\"register\"],this.disablePlugins=!!t.disablePlugins}register(e,t){let r={requires:\"0.0.0\",components:{}};const n={libs:[],plugged:[],skipped:[],error:void 0};if(this.disablePlugins)return n.error=\"This instance of TronWeb has plugins disabled.\",n;const o=new e(this.tronWeb);if(nA.isFunction(o.pluginInterface)&&(r=o.pluginInterface(t)),!ww.satisfies(Lw.version,r.requires))throw new Error(\"The plugin is not compatible with this version of TronWeb\");if(r.fullClass){const t=o.constructor.name,r=t.substring(0,1).toLowerCase()+t.substring(1);t!==r&&(Object.assign(Lw,{[t]:e}),Object.assign(this.tronWeb,{[r]:o}),n.libs.push(t))}else for(const e in r.components){if(!this.tronWeb.hasOwnProperty(e))continue;const t=r.components[e],o=this.tronWeb[e].pluginNoOverride||[];for(const r in t)\"constructor\"===r||this.tronWeb[e][r]&&(o.includes(r)||/^_/.test(r))?n.skipped.push(r):(this.tronWeb[e][r]=t[r].bind(this.tronWeb[e]),n.plugged.push(r))}return n}}class kw{tronWeb;constructor(e){if(!(e&&e instanceof Lw))throw new Error(\"Expected instance of TronWeb\");this.tronWeb=e}setServer(e,t=\"healthcheck\"){if(!e)return this.tronWeb.eventServer=void 0;if(nA.isString(e)&&(e=new pw(e)),!this.tronWeb.isValidProvider(e))throw new Error(\"Invalid event server provided\");this.tronWeb.eventServer=e,this.tronWeb.eventServer.isConnected=()=>this.tronWeb.eventServer.request(t).then(()=>!0).catch(()=>!1)}async getEventsByContractAddress(e,t={}){const r=Object.assign({limit:20},t),{eventName:n,blockNumber:o,onlyUnconfirmed:s,onlyConfirmed:a,minBlockTimestamp:i,maxBlockTimestamp:c,orderBy:u,fingerprint:l}=r;let{limit:d}=r;if(!this.tronWeb.eventServer)throw new Error(\"No event server configured\");if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid contract address provided\");if(void 0!==i&&!nA.isInteger(i))throw new Error(\"Invalid minBlockTimestamp provided\");if(void 0!==c&&!nA.isInteger(c))throw new Error(\"Invalid maxBlockTimestamp provided\");nA.isInteger(d)&&d>200&&(console.warn(\"Defaulting to maximum accepted limit: 200\"),d=200);const f={};n&&(f.event_name=n),o&&(f.block_number=o),\"boolean\"==typeof s&&(f.only_unconfirmed=s),\"boolean\"==typeof a&&(f.only_confirmed=a),i&&(f.min_block_timestamp=i),c&&(f.max_block_timestamp=c),u&&(f.order_by=u),l&&(f.fingerprint=l),nA.isInteger(d)&&(f.limit=d);const p=await this.tronWeb.eventServer.request(`v1/contracts/${this.tronWeb.address.fromHex(e)}/events?${new URLSearchParams(f).toString()}`);if(p.success)return p;throw new Error(p.error)}async getEventsByTransactionID(e,t={}){if(!this.tronWeb.eventServer)throw new Error(\"No event server configured\");const r={};return\"boolean\"==typeof t.only_unconfirmed&&(r.only_unconfirmed=t.only_unconfirmed),\"boolean\"==typeof t.only_confirmed&&(r.only_confirmed=t.only_confirmed),this.tronWeb.eventServer.request(`v1/transactions/${e}/events?${new URLSearchParams(r).toString()}`).then(e=>{if(e.success)return e;throw new Error(JSON.parse(e.error).message)})}async getEventsByBlockNumber(e,t={}){if(!this.tronWeb.eventServer)throw new Error(\"No event server configured\");const r={};return\"boolean\"==typeof t.only_confirmed&&(r.only_confirmed=t.only_confirmed),t.limit&&(r.limit=t.limit),t.fingerprint&&(r.fingerprint=t.fingerprint),this.tronWeb.eventServer.request(`v1/blocks/${e}/events?${new URLSearchParams(r).toString()}`).then(e=>{if(e.success)return e;throw new Error(e.error)})}async getEventsOfLatestBlock(e={}){if(!this.tronWeb.eventServer)throw new Error(\"No event server configured\");const t={};return\"boolean\"==typeof e.only_confirmed&&(t.only_confirmed=e.only_confirmed),this.tronWeb.eventServer.request(`v1/blocks/latest/events?${new URLSearchParams(t).toString()}`).then(e=>{if(e.success)return e;throw new Error(e.error)})}}var Nw=r(1048).hp;const Uw=\"4.7.1\";function Dw(e){return!(!e||\"object\"!=typeof e||!e.fullNode&&!e.fullHost)}class Lw extends gw{providers;BigNumber;transactionBuilder;trx;plugin;event;version;static version=\"6.1.0\";utils;defaultBlock;defaultPrivateKey;defaultAddress;fullnodeVersion;feeLimit;fullNode;solidityNode;eventServer;constructor(e,t=\"\",r,n=\"\"){let o;super();let s=!1,a=!1;Dw(e)?(o=e.fullNode||e.fullHost,t=e.solidityNode||e.fullHost,r=e.eventServer||e.fullHost,s=e.headers||!1,a=e.eventHeaders||s,n=e.privateKey):o=e,nA.isString(o)&&(o=new hw.HttpProvider(o)),nA.isString(t)&&(t=new hw.HttpProvider(t)),nA.isString(r)&&(r=new hw.HttpProvider(r)),this.event=new kw(this),this.transactionBuilder=new Sw(this),this.trx=new Rw(this),this.plugin=new Fw(this,{disablePlugins:!!Dw(e)&&e.disablePlugins}),this.utils=nA,this.setFullNode(o),this.setSolidityNode(t),this.setEventServer(r),this.providers=hw,this.BigNumber=Kg,this.defaultBlock=!1,this.defaultPrivateKey=!1,this.defaultAddress={hex:!1,base58:!1},this.version=Lw.version,this.sha3=Lw.sha3,this.fromUtf8=Lw.fromUtf8,this.address=Lw.address,this.toAscii=Lw.toAscii,this.toUtf8=Lw.toUtf8,this.isAddress=Lw.isAddress,this.fromAscii=Lw.fromAscii,this.toHex=Lw.toHex,this.toBigNumber=Lw.toBigNumber,this.toDecimal=Lw.toDecimal,this.fromDecimal=Lw.fromDecimal,this.toSun=Lw.toSun,this.fromSun=Lw.fromSun,this.createAccount=Lw.createAccount,this.createRandom=Lw.createRandom,this.fromMnemonic=Lw.fromMnemonic,n&&this.setPrivateKey(n),this.fullnodeVersion=Uw,this.feeLimit=15e7,s&&this.setFullNodeHeader(s),a&&this.setEventHeader(a)}async getFullnodeVersion(){try{const e=await this.trx.getNodeInfo();this.fullnodeVersion=e.configNodeInfo.codeVersion,2===this.fullnodeVersion.split(\".\").length&&(this.fullnodeVersion+=\".0\")}catch(e){this.fullnodeVersion=Uw}}setDefaultBlock(e=!1){if([!1,\"latest\",\"earliest\",0].includes(e))return this.defaultBlock=e;if(!nA.isInteger(e)||!e)throw new Error(\"Invalid block ID provided\");return this.defaultBlock=Math.abs(e)}setPrivateKey(e){try{this.setAddress(Lw.address.fromPrivateKey(e))}catch{throw new Error(\"Invalid private key provided\")}this.defaultPrivateKey=e,this.emit(\"privateKeyChanged\",e)}setAddress(e){if(!Lw.isAddress(e))throw new Error(\"Invalid address provided\");const t=Lw.address.toHex(e),r=Lw.address.fromHex(e);this.defaultPrivateKey&&Lw.address.fromPrivateKey(this.defaultPrivateKey)!==r&&(this.defaultPrivateKey=!1),this.defaultAddress={hex:t,base58:r},this.emit(\"addressChanged\",{hex:t,base58:r})}fullnodeSatisfies(e){return ww.satisfies(this.fullnodeVersion,e)}isValidProvider(e){return Object.values(hw).some(t=>e instanceof t)}setFullNode(e){if(ty(e)&&(e=new hw.HttpProvider(e)),!this.isValidProvider(e))throw new Error(\"Invalid full node provided\");this.fullNode=e,this.fullNode.setStatusPage(\"wallet/getnowblock\")}setSolidityNode(e){if(nA.isString(e)&&(e=new hw.HttpProvider(e)),!this.isValidProvider(e))throw new Error(\"Invalid solidity node provided\");this.solidityNode=e,this.solidityNode.setStatusPage(\"walletsolidity/getnowblock\")}setEventServer(e,t){this.event.setServer(e,t)}setHeader(e={}){const t=new hw.HttpProvider(this.fullNode.host,3e4,\"\",\"\",e),r=new hw.HttpProvider(this.solidityNode.host,3e4,\"\",\"\",e),n=new hw.HttpProvider(this.eventServer.host,3e4,\"\",\"\",e);this.setFullNode(t),this.setSolidityNode(r),this.setEventServer(n)}setFullNodeHeader(e={}){const t=new hw.HttpProvider(this.fullNode.host,3e4,\"\",\"\",e),r=new hw.HttpProvider(this.solidityNode.host,3e4,\"\",\"\",e);this.setFullNode(t),this.setSolidityNode(r)}setEventHeader(e={}){const t=new hw.HttpProvider(this.eventServer.host,3e4,\"\",\"\",e);this.setEventServer(t)}currentProviders(){return{fullNode:this.fullNode,solidityNode:this.solidityNode,eventServer:this.eventServer}}currentProvider(){return this.currentProviders()}getEventResult(...e){return this.event.getEventsByContractAddress(...e)}getEventByTransactionID(...e){return this.event.getEventsByTransactionID(...e)}contract(e=[],t){return new Mw(this,e,t)}address;static get address(){return{fromHex:e=>fy(e),toHex:e=>py(e),toChecksumAddress:e=>hy(e),isChecksumAddress:e=>gy(e),fromPrivateKey:(e,t=!1)=>yy(e,t)}}sha3;static sha3(e,t=!0){return(t?\"0x\":\"\")+oi(Nw.from(e,\"utf-8\")).toString().substring(2)}toHex;static toHex(e){if(nA.isBoolean(e))return Lw.fromDecimal(+e);if(nA.isBigNumber(e))return Lw.fromDecimal(e);if(\"object\"==typeof e)return Lw.fromUtf8(JSON.stringify(e));if(nA.isString(e)){if(/^(-|)0x/.test(e))return e;if(!isFinite(e)||/^\\s*$/.test(e))return Lw.fromUtf8(e)}const t=Lw.fromDecimal(e);if(\"0xNaN\"===t)throw new Error(\"The passed value is not convertible to a hex string\");return t}toUtf8;static toUtf8(e){if(nA.isHex(e))return e=e.replace(/^0x/,\"\"),Nw.from(e,\"hex\").toString(\"utf8\");throw new Error(\"The passed value is not a valid hex string\")}fromUtf8;static fromUtf8(e){if(!nA.isString(e))throw new Error(\"The passed value is not a valid utf-8 string\");return\"0x\"+Nw.from(e,\"utf8\").toString(\"hex\")}toAscii;static toAscii(e){if(nA.isHex(e)){let t=\"\",r=0;const n=e.length;for(\"0x\"===e.substring(0,2)&&(r=2);r<n;r+=2){const n=parseInt(e.substr(r,2),16);t+=String.fromCharCode(n)}return t}throw new Error(\"The passed value is not a valid hex string\")}fromAscii;static fromAscii(e,t){if(!nA.isString(e))throw new Error(\"The passed value is not a valid utf-8 string\");return\"0x\"+Nw.from(e,\"ascii\").toString(\"hex\").padEnd(t,\"0\")}toDecimal;static toDecimal(e){return Lw.toBigNumber(e).toNumber()}fromDecimal;static fromDecimal(e){const t=Lw.toBigNumber(e),r=t.toString(16);return t.isLessThan(0)?\"-0x\"+r.substr(1):\"0x\"+r}fromSun;static fromSun(e){const t=Lw.toBigNumber(e).div(1e6);return nA.isBigNumber(e)?t:t.toString(10)}toSun;static toSun(e){const t=Lw.toBigNumber(e).times(1e6);return nA.isBigNumber(e)?t:t.toString(10)}toBigNumber;static toBigNumber(e=0){return nA.isBigNumber(e)?e:nA.isString(e)&&/^(-|)0x/.test(e)?new Kg(e.replace(\"0x\",\"\"),16):new Kg(e.toString(10),10)}isAddress;static isAddress(e=\"\"){return my(e)}createAccount;static async createAccount(){return nA.accounts.generateAccount()}createRandom;static createRandom(...e){return nA.accounts.generateRandom(...e)}fromMnemonic;static fromMnemonic(...e){return nA.accounts.generateAccountWithMnemonic(...e)}async isConnected(){return{fullNode:await this.fullNode.isConnected(),solidityNode:await this.solidityNode.isConnected(),eventServer:this.eventServer&&await this.eventServer.isConnected()}}}const $w=Lw;var zw=r(1048).hp;const{Transaction:jw,Permission:Vw,Key:Gw}=globalThis.TronWebProto,{TransferContract:Hw,FreezeBalanceContract:Kw,UnfreezeBalanceContract:qw,WithdrawBalanceContract:Zw,FreezeBalanceV2Contract:Jw,UnfreezeBalanceV2Contract:Yw,CancelAllUnfreezeV2Contract:Xw,WithdrawExpireUnfreezeContract:Qw,DelegateResourceContract:eT,UnDelegateResourceContract:tT}=globalThis.TronWebProto,{TransferAssetContract:rT,ParticipateAssetIssueContract:nT,AssetIssueContract:oT,UpdateAssetContract:sT}=globalThis.TronWebProto,{TriggerSmartContract:aT,ClearABIContract:iT,UpdateEnergyLimitContract:cT,UpdateSettingContract:uT,CreateSmartContract:lT,SmartContract:dT}=globalThis.TronWebProto,{ResourceCode:fT}=globalThis.TronWebProto,{WitnessCreateContract:pT,VoteWitnessContract:hT}=globalThis.TronWebProto,{UpdateBrokerageContract:gT}=globalThis.TronWebProto,{AccountCreateContract:yT,AccountUpdateContract:mT,SetAccountIdContract:bT,AccountPermissionUpdateContract:wT}=globalThis.TronWebProto,{ProposalCreateContract:TT,ProposalDeleteContract:AT,ProposalApproveContract:vT}=globalThis.TronWebProto,{ExchangeCreateContract:PT,ExchangeInjectContract:ET,ExchangeWithdrawContract:CT,ExchangeTransactionContract:BT}=globalThis.TronWebProto,WT=e=>e&&0!==e.length?new Uint8Array($w.address.toHex(e).match(/.{1,2}/g).map(e=>parseInt(e,16))):new Uint8Array([]),ST=e=>e&&0!==e.length?new Uint8Array((ny(e)?e:$w.toHex(e)).replace(/^0x/,\"\").match(/.{1,2}/g).map(e=>parseInt(e,16))):new Uint8Array([]),IT=(e,t)=>ST(t?$w.fromUtf8(e).replace(/^0x/,\"\"):e.replace(/^0x/,\"\")),_T=(e,t,r,n)=>{const o=new Hy.Any;o.pack(e.serializeBinary(),\"protocol.\"+r);const s=new jw.Contract;s.setType(t),s.setParameter(o),n&&s.setPermissionId(n);const a=new jw.raw;a.addContract(s);const i=new jw;return i.setRawData(a),i},RT=(e,t)=>{const r=new aT,{owner_address:n,contract_address:o,parameter:s=\"\",function_selector:a,call_value:i,call_token_value:c,token_id:u,data:l}=e;if(r.setOwnerAddress(WT(n)),r.setContractAddress(WT(o)),r.setCallValue(i),l)r.setData(ST(l));else if(a){const e=((e,t=!0)=>(t?\"0x\":\"\")+oi(zw.from(e,\"utf-8\")).toString().substring(2))(a).substring(2,10)+s;r.setData(ST(e))}return u&&r.setTokenId(u),c&&r.setCallTokenValue(c),_T(r,jw.Contract.ContractType.TRIGGERSMARTCONTRACT,\"TriggerSmartContract\",t.Permission_id)},xT=(e,t)=>{const r=new wT,{owner_address:n,owner:o,witness:s,actives:a}=e;r.setOwnerAddress(WT(n));const i=e=>{const t=new Vw,{type:r,id:n,permission_name:o,threshold:s,parentId:a,operations:i,keys:c}=e;return t.setType((e=>isNaN(e)?\"Active\"===e?2:\"Witness\"===e?1:0:e)(r)),t.setId(n),t.setPermissionName(o),t.setThreshold(s),a&&t.setParentId(a),i&&t.setOperations(ST(i)),c&&t.setKeysList(c.map(e=>{const t=new Gw;return t.setAddress(WT(e.address)),t.setWeight(e.weight),t})),t};return o&&r.setOwner(i(o)),s&&r.setWitness(i(s)),a&&(Array.isArray(a)?r.setActivesList(a.map(e=>i(e))):r.setActivesList([i(a)])),_T(r,jw.Contract.ContractType.ACCOUNTPERMISSIONUPDATECONTRACT,\"AccountPermissionUpdateContract\",t.Permission_id)},OT=(e,t,r)=>{switch(e.type){case\"TransferContract\":return((e,t)=>{const{to_address:r,owner_address:n,amount:o}=e,s=new Hw;return s.setToAddress(WT(r)),s.setOwnerAddress(WT(n)),s.setAmount(o),_T(s,jw.Contract.ContractType.TRANSFERCONTRACT,\"TransferContract\",t.Permission_id)})(t,r);case\"TransferAssetContract\":return((e,t)=>{const{to_address:r,owner_address:n,amount:o,asset_name:s}=e,a=new rT;return a.setToAddress(WT(r)),a.setOwnerAddress(WT(n)),a.setAssetName(IT(s,t.visible)),a.setAmount(o),_T(a,jw.Contract.ContractType.TRANSFERASSETCONTRACT,\"TransferAssetContract\",t.Permission_id)})(t,r);case\"ParticipateAssetIssueContract\":return((e,t)=>{const r=new nT;return r.setToAddress(WT(e.to_address)),r.setOwnerAddress(WT(e.owner_address)),r.setAssetName(IT(e.asset_name,t.visible)),r.setAmount(e.amount),_T(r,jw.Contract.ContractType.PARTICIPATEASSETISSUECONTRACT,\"ParticipateAssetIssueContract\",t.Permission_id)})(t,r);case\"TriggerSmartContract\":return RT(t,r);case\"FreezeBalanceContract\":return((e,t)=>{const r=new Kw,{owner_address:n,frozen_balance:o,frozen_duration:s,resource:a,receiver_address:i}=e;return r.setOwnerAddress(WT(n)),r.setFrozenBalance(o),r.setFrozenDuration(s),a&&r.setResource(fT[a]),i&&r.setReceiverAddress(WT(i)),_T(r,jw.Contract.ContractType.FREEZEBALANCECONTRACT,\"FreezeBalanceContract\",t.Permission_id)})(t,r);case\"UnfreezeBalanceContract\":return((e,t)=>{const r=new qw,{owner_address:n,resource:o,receiver_address:s}=e;return r.setOwnerAddress(WT(n)),o&&r.setResource(fT[o]),s&&r.setReceiverAddress(WT(s)),_T(r,jw.Contract.ContractType.UNFREEZEBALANCECONTRACT,\"UnfreezeBalanceContract\",t.Permission_id)})(t,r);case\"WithdrawBalanceContract\":return((e,t)=>{const r=new Zw,{owner_address:n}=e;return r.setOwnerAddress(WT(n)),_T(r,jw.Contract.ContractType.WITHDRAWBALANCECONTRACT,\"WithdrawBalanceContract\",t.Permission_id)})(t,r);case\"FreezeBalanceV2Contract\":return((e,t)=>{const r=new Jw,{owner_address:n,frozen_balance:o,resource:s}=e;return r.setOwnerAddress(WT(n)),r.setFrozenBalance(o),r.setResource(fT[s]),_T(r,jw.Contract.ContractType.FREEZEBALANCEV2CONTRACT,\"FreezeBalanceV2Contract\",t.Permission_id)})(t,r);case\"CancelAllUnfreezeV2Contract\":return((e,t)=>{const r=new Xw,{owner_address:n}=e;return r.setOwnerAddress(WT(n)),_T(r,jw.Contract.ContractType.CANCELALLUNFREEZEV2CONTRACT,\"CancelAllUnfreezeV2Contract\",t.Permission_id)})(t,r);case\"UnfreezeBalanceV2Contract\":return((e,t)=>{const r=new Yw,{owner_address:n,unfreeze_balance:o,resource:s}=e;return r.setOwnerAddress(WT(n)),r.setUnfreezeBalance(o),r.setResource(fT[s]),_T(r,jw.Contract.ContractType.UNFREEZEBALANCEV2CONTRACT,\"UnfreezeBalanceV2Contract\",t.Permission_id)})(t,r);case\"DelegateResourceContract\":return((e,t)=>{const r=new eT,{owner_address:n,receiver_address:o,balance:s,resource:a,lock:i=!1,lock_period:c}=e;return r.setOwnerAddress(WT(n)),r.setBalance(s),r.setResource(fT[a]),r.setLock(i),r.setLockPeriod(c),r.setReceiverAddress(WT(o)),_T(r,jw.Contract.ContractType.DELEGATERESOURCECONTRACT,\"DelegateResourceContract\",t.Permission_id)})(t,r);case\"UnDelegateResourceContract\":return((e,t)=>{const r=new tT,{owner_address:n,receiver_address:o,balance:s,resource:a}=e;return r.setOwnerAddress(WT(n)),r.setBalance(s),r.setResource(fT[a]),r.setReceiverAddress(WT(o)),_T(r,jw.Contract.ContractType.UNDELEGATERESOURCECONTRACT,\"UnDelegateResourceContract\",t.Permission_id)})(t,r);case\"WithdrawExpireUnfreezeContract\":return((e,t)=>{const r=new Qw,{owner_address:n}=e;return r.setOwnerAddress(WT(n)),_T(r,jw.Contract.ContractType.WITHDRAWEXPIREUNFREEZECONTRACT,\"WithdrawExpireUnfreezeContract\",t.Permission_id)})(t,r);case\"WitnessCreateContract\":return((e,t)=>{const r=new pT,{owner_address:n,url:o}=e;return r.setOwnerAddress(WT(n)),r.setUrl(ST(o.replace(/^0x/,\"\"))),_T(r,jw.Contract.ContractType.WITNESSCREATECONTRACT,\"WitnessCreateContract\",t.Permission_id)})(t,r);case\"VoteWitnessContract\":return((e,t)=>{const r=new hT,{owner_address:n,votes:o}=e;return r.setOwnerAddress(WT(n)),o.forEach(e=>{const t=new hT.Vote,{vote_address:n,vote_count:o}=e;t.setVoteAddress(WT(n));const s=parseInt(o);t.setVoteCount(s),r.addVotes(t)}),_T(r,jw.Contract.ContractType.VOTEWITNESSCONTRACT,\"VoteWitnessContract\",t.Permission_id)})(t,r);case\"CreateSmartContract\":return((e,t)=>{const r=e?.new_contract?{owner_address:e.owner_address,call_token_value:e.call_token_value,token_id:e.token_id,...e.new_contract}:e,{owner_address:n,consume_user_resource_percent:o,origin_energy_limit:s,abi:a,bytecode:i=\"\",parameter:c=\"\",call_value:u,call_token_value:l,token_id:d,name:f}=r;let{origin_address:p}=r;const h=new lT;h.setOwnerAddress(WT(n)),d&&h.setTokenId(d),l&&h.setCallTokenValue(l);const g=new dT;if(a){let e;e=\"string\"==typeof a?JSON.parse(a):a?.entrys||[];const t=new dT.ABI,r=e=>{const t=new dT.ABI.Entry.Param,{indexed:r,name:n,type:o}=e;return!0===r&&t.setIndexed(!0),t.setName(n),t.setType(o),t},n=e.map(e=>{const{anonymous:t,constant:n,name:o,inputs:s,outputs:a,type:i,payable:c,stateMutability:u}=e,l=new dT.ABI.Entry;return l.setAnonymous(t),l.setConstant(n),l.setName(o),s&&l.setInputsList(s.map(e=>r(e))),a&&l.setOutputsList(a.map(e=>r(e))),i&&l.setType(dT.ABI.Entry.EntryType[i.toUpperCase()]),l.setPayable(c),u&&l.setStatemutability(dT.ABI.Entry.StateMutabilityType[u.toUpperCase()]),l});t.setEntrysList(n),g.setAbi(t)}if(u&&g.setCallValue(u),g.setConsumeUserResourcePercent(o),g.setOriginEnergyLimit(s),p||(p=n),g.setOriginAddress(WT(p)),i){const e=i.replace(/^0x/,\"\")+c.replace(/^0x/,\"\");g.setBytecode(ST(e))}return g.setName(f),h.setNewContract(g),_T(h,jw.Contract.ContractType.CREATESMARTCONTRACT,\"CreateSmartContract\",t.Permission_id)})(t,r);case\"ClearABIContract\":return((e,t)=>{const{contract_address:r,owner_address:n}=e,o=new iT;return o.setOwnerAddress(WT(n)),o.setContractAddress(WT(r)),_T(o,jw.Contract.ContractType.CLEARABICONTRACT,\"ClearABIContract\",t.Permission_id)})(t,r);case\"UpdateBrokerageContract\":return((e,t)=>{const{brokerage:r,owner_address:n}=e,o=new gT;return o.setOwnerAddress(WT(n)),o.setBrokerage(r),_T(o,jw.Contract.ContractType.UPDATEBROKERAGECONTRACT,\"UpdateBrokerageContract\",t.Permission_id)})(t,r);case\"AssetIssueContract\":return((e,t)=>{const{owner_address:r,name:n,abbr:o,description:s,url:a,total_supply:i,trx_num:c,num:u,start_time:l,end_time:d,precision:f,free_asset_net_limit:p,public_free_asset_net_limit:h,public_free_asset_net_usage:g=0,public_latest_free_net_time:y=0,vote_score:m=0,frozen_supply:b}=e,w=new oT;if(w.setOwnerAddress(WT(r)),n&&w.setName(ST(n.replace(/^0x/,\"\"))),o&&w.setAbbr(ST(o.replace(/^0x/,\"\"))),w.setTotalSupply(i),w.setNum(u),w.setEndTime(d),w.setStartTime(l),w.setTrxNum(c),w.setVoteScore(m),f&&w.setPrecision(f),y&&w.setPublicLatestFreeNetTime(y),s&&w.setDescription(ST(s.replace(/^0x/,\"\"))),a&&w.setUrl(ST(a.replace(/^0x/,\"\"))),w.setPublicFreeAssetNetUsage(g),w.setFreeAssetNetLimit(p),w.setPublicFreeAssetNetLimit(h),b){const e=new oT.FrozenSupply;e.setFrozenAmount(b.length?b[0].frozen_amount:b.frozen_amount),e.setFrozenDays(b.length?b[0].frozen_days:b.frozen_days),w.addFrozenSupply(e)}return _T(w,jw.Contract.ContractType.ASSETISSUECONTRACT,\"AssetIssueContract\",t.Permission_id)})(t,r);case\"AccountCreateContract\":return((e,t)=>{const r=new yT,{account_address:n,owner_address:o}=e;return r.setOwnerAddress(WT(o)),r.setAccountAddress(WT(n.replace(/^0x/,\"\"))),_T(r,jw.Contract.ContractType.ACCOUNTCREATECONTRACT,\"AccountCreateContract\",t.Permission_id)})(t,r);case\"AccountUpdateContract\":return((e,t)=>{const r=new mT,{account_name:n,owner_address:o}=e;return r.setOwnerAddress(WT(o)),r.setAccountName(ST(n.replace(/^0x/,\"\"))),_T(r,jw.Contract.ContractType.ACCOUNTUPDATECONTRACT,\"AccountUpdateContract\",t.Permission_id)})(t,r);case\"SetAccountIdContract\":return((e,t)=>{const r=new bT,{account_id:n,owner_address:o}=e;return r.setOwnerAddress(WT(o)),r.setAccountId(ST(n.replace(/^0x/,\"\"))),_T(r,jw.Contract.ContractType.SETACCOUNTIDCONTRACT,\"SetAccountIdContract\",t.Permission_id)})(t,r);case\"ProposalCreateContract\":return((e,t)=>{const r=new TT,{owner_address:n,parameters:o}=e;return r.setOwnerAddress(WT(n)),o.forEach(e=>{r.getParametersMap().set(e.key,e.value)}),_T(r,jw.Contract.ContractType.PROPOSALCREATECONTRACT,\"ProposalCreateContract\",t.Permission_id)})(t,r);case\"ProposalDeleteContract\":return((e,t)=>{const r=new AT,{owner_address:n,proposal_id:o}=e;return r.setOwnerAddress(WT(n)),r.setProposalId(o),_T(r,jw.Contract.ContractType.PROPOSALDELETECONTRACT,\"ProposalDeleteContract\",t.Permission_id)})(t,r);case\"ProposalApproveContract\":return((e,t)=>{const r=new vT,{owner_address:n,proposal_id:o,is_add_approval:s}=e;return r.setOwnerAddress(WT(n)),r.setProposalId(o),r.setIsAddApproval(s),_T(r,jw.Contract.ContractType.PROPOSALAPPROVECONTRACT,\"ProposalApproveContract\",t.Permission_id)})(t,r);case\"ExchangeCreateContract\":return((e,t)=>{const r=new PT,{owner_address:n,first_token_id:o,first_token_balance:s,second_token_id:a,second_token_balance:i}=e;return r.setOwnerAddress(WT(n)),r.setFirstTokenId(IT(o,t.visible)),r.setFirstTokenBalance(s),r.setSecondTokenId(IT(a,t.visible)),r.setSecondTokenBalance(i),_T(r,jw.Contract.ContractType.EXCHANGECREATECONTRACT,\"ExchangeCreateContract\",t.Permission_id)})(t,r);case\"ExchangeInjectContract\":return((e,t)=>{const r=new ET,{owner_address:n,exchange_id:o,token_id:s,quant:a}=e;return r.setOwnerAddress(WT(n)),r.setExchangeId(o),r.setTokenId(IT(s,t.visible)),r.setQuant(a),_T(r,jw.Contract.ContractType.EXCHANGEINJECTCONTRACT,\"ExchangeInjectContract\",t.Permission_id)})(t,r);case\"ExchangeWithdrawContract\":return((e,t)=>{const r=new CT,{owner_address:n,exchange_id:o,token_id:s,quant:a}=e;return r.setOwnerAddress(WT(n)),r.setExchangeId(o),r.setTokenId(IT(s,t.visible)),r.setQuant(a),_T(r,jw.Contract.ContractType.EXCHANGEWITHDRAWCONTRACT,\"ExchangeWithdrawContract\",t.Permission_id)})(t,r);case\"ExchangeTransactionContract\":return((e,t)=>{const r=new BT,{owner_address:n,exchange_id:o,token_id:s,quant:a,expected:i}=e;return r.setOwnerAddress(WT(n)),r.setExchangeId(o),r.setTokenId(IT(s,t.visible)),r.setQuant(a),r.setExpected(i),_T(r,jw.Contract.ContractType.EXCHANGETRANSACTIONCONTRACT,\"ExchangeTransactionContract\",t.Permission_id)})(t,r);case\"UpdateSettingContract\":return((e,t)=>{const r=new uT,{owner_address:n,contract_address:o,consume_user_resource_percent:s}=e;return r.setOwnerAddress(WT(n)),r.setContractAddress(WT(o)),r.setConsumeUserResourcePercent(s),_T(r,jw.Contract.ContractType.UPDATESETTINGCONTRACT,\"UpdateSettingContract\",t.Permission_id)})(t,r);case\"UpdateEnergyLimitContract\":return((e,t)=>{const r=new cT,{owner_address:n,contract_address:o,origin_energy_limit:s}=e;return r.setOwnerAddress(WT(n)),r.setContractAddress(WT(o)),r.setOriginEnergyLimit(s),_T(r,jw.Contract.ContractType.UPDATEENERGYLIMITCONTRACT,\"UpdateEnergyLimitContract\",t.Permission_id)})(t,r);case\"AccountPermissionUpdateContract\":return xT(t,r);case\"UpdateAssetContract\":return((e,t)=>{const r=new sT,{owner_address:n,description:o,url:s,new_limit:a,new_public_limit:i}=e;return r.setOwnerAddress(WT(n)),o&&r.setDescription(ST(o.replace(/^0x/,\"\"))),s&&r.setUrl(ST(s.replace(/^0x/,\"\"))),a&&r.setNewLimit(a),i&&r.setNewPublicLimit(i),_T(r,jw.Contract.ContractType.UPDATEASSETCONTRACT,\"UpdateAssetContract\",t.Permission_id)})(t,r)}},MT=e=>{const t=e.raw_data,r=t.contract[0],n=r.parameter.value,o={Permission_id:r.Permission_id,visible:e.visible},s=OT(r,n,o),a=s.getRawData();return a.setRefBlockBytes(ST(t.ref_block_bytes)),a.setRefBlockHash(ST(t.ref_block_hash)),t.data&&a.setData(ST(t.data)),t.fee_limit&&a.setFeeLimit(t.fee_limit),t.expiration&&a.setExpiration(t.expiration),t.timestamp&&a.setTimestamp(t.timestamp),s.setRawData(a),s},FT=(e,t={},r={})=>{const n=e.raw_data,o=n.contract[0],s=OT(o,t,{Permission_id:t?.Permission_id}),a=s.getRawData();return a.setRefBlockBytes(ST(n.ref_block_bytes)),a.setRefBlockHash(ST(n.ref_block_hash)),r.data&&a.setData(ST(r.data.replace(/^0x/,\"\"))),(r.fee_limit||t.fee_limit)&&a.setFeeLimit(r.fee_limit||t.fee_limit),n.expiration&&a.setExpiration(n.expiration),n.timestamp&&a.setTimestamp(n.timestamp),s.setRawData(a),s},kT=(e,t)=>{const r=t.getRawData().serializeBinary(),n=co(r),o=Sa(r);return n.toLowerCase()===e.raw_data_hex.toLowerCase()&&o.replace(/^0x/,\"\").toLowerCase()===e.txID.replace(/^0x/,\"\").toLowerCase()},NT=e=>co(e.getRawData().serializeBinary()),UT=e=>{const t=MT(e);return kT(e,t)},DT=(e,t,r)=>{const n=FT(e,t,r);return kT(e,n)},LT=e=>Sa(e.getRawData().serializeBinary()),{Transaction:$T}=globalThis.TronWebProto,{TransferContract:zT,WithdrawBalanceContract:jT,WitnessCreateContract:VT,FreezeBalanceV2Contract:GT,UnfreezeBalanceV2Contract:HT,CancelAllUnfreezeV2Contract:KT,WithdrawExpireUnfreezeContract:qT,DelegateResourceContract:ZT,UnDelegateResourceContract:JT}=globalThis.TronWebProto,{TriggerSmartContract:YT}=globalThis.TronWebProto,XT={0:\"AccountCreateContract\",1:\"TransferContract\",2:\"TransferAssetContract\",4:\"VoteWitnessContract\",5:\"WitnessCreateContract\",6:\"AssetIssueContract\",9:\"ParticipateAssetIssueContract\",10:\"AccountUpdateContract\",11:\"FreezeBalanceContract\",12:\"UnfreezeBalanceContract\",13:\"WithdrawBalanceContract\",15:\"UpdateAssetContract\",16:\"ProposalCreateContract\",17:\"ProposalApproveContract\",18:\"ProposalDeleteContract\",19:\"SetAccountIdContract\",30:\"CreateSmartContract\",31:\"TriggerSmartContract\",33:\"UpdateSettingContract\",41:\"ExchangeCreateContract\",42:\"ExchangeInjectContract\",43:\"ExchangeWithdrawContract\",44:\"ExchangeTransactionContract\",45:\"UpdateEnergyLimitContract\",46:\"AccountPermissionUpdateContract\",48:\"ClearABIContract\",49:\"UpdateBrokerageContract\",54:\"FreezeBalanceV2Contract\",55:\"UnfreezeBalanceV2Contract\",56:\"WithdrawExpireUnfreezeContract\",57:\"DelegateResourceContract\",58:\"UnDelegateResourceContract\",59:\"CancelAllUnfreezeV2Contract\"},QT=e=>e.getAuthsList().map(e=>{const t=co(e.getPermissionName_asU8()),r=e.getAccount();return{permission_name:t,account:{name:co(r.getName_asU8()),address:co(r.getAddress_asU8())}}}),eA=(e,t)=>{const r=$T.raw.deserializeBinary(Po(t)),n=r.getContractList()[0],o=n.getParameter().getValue(),s=XT[n.getType()];if(e!==s)throw new Error(`type ${e} dismatches with rawDataHex type ${s}`);return[{contract:[{parameter:{value:{},type_url:n.getParameter().getTypeUrl()},type:e,Permission_id:n.getPermissionId()}],data:co(r.getData()),fee_limit:r.getFeeLimit(),ref_block_bytes:co(r.getRefBlockBytes_asU8()),ref_block_hash:co(r.getRefBlockHash_asU8()),expiration:r.getExpiration(),timestamp:r.getTimestamp(),scripts:co(r.getScripts_asU8()),auths:QT(r)},o]},tA=e=>{switch(e){case 0:default:return\"BANDWIDTH\";case 1:return\"ENERGY\"}},rA=(e,t)=>{if(!t)throw new Error(\"rawDataHex cannot be empty\");if(!ny(t))throw new Error(\"rawDataHex is not a valid hex string\");switch(e){case\"TriggerSmartContract\":return((e,t)=>{const[r,n]=eA(e,t),o=YT.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:co(o.getOwnerAddress_asU8()),contract_address:co(o.getContractAddress_asU8()),call_value:o.getCallValue(),data:co(o.getData_asU8()),call_token_value:o.getCallTokenValue(),token_id:o.getTokenId()},r})(e,t);case\"FreezeBalanceV2Contract\":return((e,t)=>{const[r,n]=eA(e,t),o=GT.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:co(o.getOwnerAddress_asU8()),frozen_balance:o.getFrozenBalance(),resource:tA(o.getResource())},r})(e,t);case\"UnfreezeBalanceV2Contract\":return((e,t)=>{const[r,n]=eA(e,t),o=HT.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:co(o.getOwnerAddress_asU8()),unfreeze_balance:o.getUnfreezeBalance(),resource:tA(o.getResource())},r})(e,t);case\"CancelAllUnfreezeV2Contract\":return((e,t)=>{const[r,n]=eA(e,t),o=KT.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:co(o.getOwnerAddress_asU8())},r})(e,t);case\"DelegateResourceContract\":return((e,t)=>{const[r,n]=eA(e,t),o=ZT.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:co(o.getOwnerAddress_asU8()),balance:o.getBalance(),lock:o.getLock(),lock_period:o.getLockPeriod(),receiver_address:co(o.getReceiverAddress_asU8()),resource:tA(o.getResource())},r})(e,t);case\"UnDelegateResourceContract\":return((e,t)=>{const[r,n]=eA(e,t),o=JT.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:co(o.getOwnerAddress_asU8()),balance:o.getBalance(),receiver_address:co(o.getReceiverAddress_asU8()),resource:tA(o.getResource())},r})(e,t);case\"WithdrawExpireUnfreezeContract\":return((e,t)=>{const[r,n]=eA(e,t),o=qT.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:co(o.getOwnerAddress_asU8())},r})(e,t);case\"TransferContract\":return((e,t)=>{const[r,n]=eA(e,t),o=zT.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:co(o.getOwnerAddress_asU8()),to_address:co(o.getToAddress_asU8()),amount:o.getAmount()},r})(e,t);case\"WithdrawBalanceContract\":return((e,t)=>{const[r,n]=eA(e,t),o=jT.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:co(o.getOwnerAddress_asU8())},r})(e,t);case\"WitnessCreateContract\":return((e,t)=>{const[r,n]=eA(e,t),o=VT.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:co(o.getOwnerAddress_asU8()),url:String.fromCharCode(...o.getUrl_asU8())},r})(e,t);default:throw new Error(`trasaction ${e} not supported`)}},nA={...d,constants:t,address:f,code:o,accounts:l,base58:s,bytes:e,crypto:u,abi:p,message:h,_TypedDataEncoder:jy,typedData:g,transaction:m,ethersUtils:i,deserializeTx:b};var oA,sA,aA,iA;!function(e){e[e.BANDWIDTH=0]=\"BANDWIDTH\",e[e.ENERGY=1]=\"ENERGY\",e[e.TRON_POWER=2]=\"TRON_POWER\"}(oA||(oA={})),function(e){e.ENOUGH_PERMISSION=\"ENOUGH_PERMISSION\",e.NOT_ENOUGH_PERMISSION=\"NOT_ENOUGH_PERMISSION\",e.SIGNATURE_FORMAT_ERROR=\"SIGNATURE_FORMAT_ERROR\",e.COMPUTE_ADDRESS_ERROR=\"COMPUTE_ADDRESS_ERROR\",e.PERMISSION_ERROR=\"PERMISSION_ERROR\",e.OTHER_ERROR=\"OTHER_ERROR\"}(sA||(sA={})),function(e){e[e.SUCCESS=0]=\"SUCCESS\",e[e.SIGERROR=1]=\"SIGERROR\",e[e.CONTRACT_VALIDATE_ERROR=2]=\"CONTRACT_VALIDATE_ERROR\",e[e.CONTRACT_EXE_ERROR=3]=\"CONTRACT_EXE_ERROR\",e[e.BANDWITH_ERROR=4]=\"BANDWITH_ERROR\",e[e.DUP_TRANSACTION_ERROR=5]=\"DUP_TRANSACTION_ERROR\",e[e.TAPOS_ERROR=6]=\"TAPOS_ERROR\",e[e.TOO_BIG_TRANSACTION_ERROR=7]=\"TOO_BIG_TRANSACTION_ERROR\",e[e.TRANSACTION_EXPIRATION_ERROR=8]=\"TRANSACTION_EXPIRATION_ERROR\",e[e.SERVER_BUSY=9]=\"SERVER_BUSY\",e[e.NO_CONNECTION=10]=\"NO_CONNECTION\",e[e.NOT_ENOUGH_EFFECTIVE_CONNECTION=11]=\"NOT_ENOUGH_EFFECTIVE_CONNECTION\",e[e.OTHER_ERROR=20]=\"OTHER_ERROR\"}(aA||(aA={})),function(e){e[e.PENDING=0]=\"PENDING\",e[e.DISAPPROVED=1]=\"DISAPPROVED\",e[e.APPROVED=2]=\"APPROVED\",e[e.CANCELED=3]=\"CANCELED\"}(iA||(iA={}));var cA=function(e){return e.SignMessage=\"signMessage\",e.SignTransaction=\"signTransaction\",e}({});const uA={code:4001,message:\"Invalid method parameters\"},lA={code:4002,message:\"Invalid transaction format\"},dA={code:4100,message:\"User rejected the request\"},fA={code:5e3,message:\"Unknown error with request\"},pA=Ee(ge,/^tron:(728126428|3448148188|2494104990)\\/slip44:195$/u),hA=Ee(ge,/^tron:(728126428|3448148188|2494104990)\\/slip44:195-staked-for-(energy|bandwidth)$/u),gA=(Ee(ge,/^tron:(728126428|3448148188|2494104990)\\/slip44:195-ready-for-withdrawal$/u),Ee(ge,/^tron:(728126428|3448148188|2494104990)\\/slip44:195-staking-rewards$/u),Ee(ge,/^tron:(728126428|3448148188|2494104990)\\/slip44:195-in-lock-period$/u),Ee(ge,/^tron:(728126428|3448148188|2494104990)\\/slip44:(energy|bandwidth)$/u)),yA=Ee(ge,/^tron:(728126428|3448148188|2494104990)\\/slip44:maximum-(energy|bandwidth)$/u),mA=Ee(ge,/^tron:(728126428|3448148188|2494104990)\\/(trc10|trc20):[a-zA-Z0-9]+$/u),bA=Ee(ge,/^tron:(728126428|3448148188|2494104990)\\/trc721:[a-zA-Z0-9]+$/u),wA=Ee(Y(),/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u),TA=Ee(Y(),/^(?!0\\d)(\\d+(\\.\\d+)?)$/u),AA=Ce(Y(),\"safe-url\",e=>{try{const t=new URL(e),r=[\"http:\",\"https:\",\"wss:\"];if(!r.includes(t.protocol))return`URL must use one of the following protocols: ${r.join(\", \")}`;if(!e.match(/^(https?|wss):\\/\\/[^/]+\\/?/u))return\"Malformed URL - incorrect protocol format\";const n=t.hostname.toLowerCase();if(!(\"localhost\"===n||n.includes(\".\")&&/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/u.test(n)))return\"Invalid hostname format\";const o=decodeURIComponent(e.toLowerCase());if(e.includes(\"\\\\\")||e.includes(\"@\")||o.includes(\"\\\\\")||o.includes(\"@\")||e.toLowerCase().includes(\"%2f@\")||e.toLowerCase().includes(\"%5c@\"))return\"URL contains protocol pollution attempts\";const s=decodeURIComponent(n);if(n.includes(\"\\\\\")||n.includes(\"@\")||s.includes(\"/\")||n.toLowerCase().includes(\"%2f\"))return\"Invalid hostname characters detected\";if(e.includes(\"../\")||e.includes(\"..%2f\")||e.includes(\"..%2F\"))return\"Directory traversal attempts are not allowed\";const a=[/<[^>]*>/u,/javascript:/u,/data:/u,/\\\\[@\\\\]/u,/%2f@/u,/[^\\x20-\\x7E]/u,/\\$\\{.*?\\}/u,/#\\{.*?\\}/u,/[|;]/u,/%0[acd]|%0[acd]/u,/\\/\\/\\w+@/u,/(?:[^a-z]|^)(?:union\\s+(?:all\\s+)?select|select\\s+(?:.*\\s+)?from|insert\\s+into|update\\s+.*\\s+set|delete\\s+from|drop\\s+table|alter\\s+table|create\\s+table|exec(?:ute)?|union|where\\s+[\\d\\w]\\s*=\\s*[\\d\\w]|\\bor\\b\\s*[\\d\\w]\\s*=\\s*[\\d\\w])/iu,/'.*?(?:OR|UNION|SELECT|FROM|WHERE).*?'/iu,/%27.*?(?:OR|UNION|SELECT|FROM|WHERE).*?(?:%27|')/iu,/%20(?:OR|UNION|SELECT|FROM|WHERE)%20/iu,/[?&](?:url|redirect|next|return_to|return_url|goto|destination|continue|redirect_uri)=(?:[^&]*\\/\\/|https?:)/iu,/[?&](?:url|redirect|next|return_to|return_url|goto|destination|continue|redirect_uri)=%(?:[^&]*\\/\\/|https?:)/iu];for(const e of a)if(e.test(o))return\"URL contains potentially malicious patterns\";return!(t.port&&!/^\\d+$/u.test(t.port))||\"Invalid port number\"}catch(e){return\"Invalid URL format\"}}),vA=K({accountId:wA}),PA=K({accountId:wA}),EA=K({accountId:wA}),CA=K({accountId:wA,assets:D(ge)}),BA=K({accountId:wA,pagination:K({limit:z(),next:q(G(Y()))})}),WA=$(Object.values(Ln)),SA=q(K({entropySource:q(Y()),index:q(z()),addressType:q($([Zt.Eoa])),scope:q(WA),metamask:q(K({correlationId:q(Y())}))})),IA=K({scopes:Pe(D(WA)),entropySource:Y(),groupIndex:ve(H(),0)}),_A=J(ge,K({amount:TA,unit:Y()})),RA=(D(ge),$(Object.values(Ur)),$([\"btc\",\"eth\",\"ltc\",\"bch\",\"bnb\",\"eos\",\"xrp\",\"xlm\",\"link\",\"dot\",\"yfi\",\"usd\",\"aed\",\"ars\",\"aud\",\"bdt\",\"bhd\",\"bmd\",\"brl\",\"cad\",\"chf\",\"clp\",\"cny\",\"czk\",\"dkk\",\"eur\",\"gbp\",\"gel\",\"hkd\",\"huf\",\"idr\",\"ils\",\"inr\",\"jpy\",\"krw\",\"kwd\",\"lkr\",\"mmk\",\"mxn\",\"myr\",\"ngn\",\"nok\",\"nzd\",\"php\",\"pkr\",\"pln\",\"rub\",\"sar\",\"sek\",\"sgd\",\"thb\",\"try\",\"twd\",\"uah\",\"vef\",\"vnd\",\"zar\",\"xdr\",\"xag\",\"xau\",\"bits\",\"sats\"]),K({transaction:Y(),scope:$(Object.values(Ln))}),K({value:G(TA)}),N(\"Base58\",e=>\"string\"!=typeof e?\"Expected a string, but received: \"+typeof e:!!/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$/u.test(e)||\"Expected a Base58 encoded string, but received a string with invalid characters\"),Ee(Y(),/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)$/u)),xA=$(Object.values(Ln)),OA=Ee(Y(),/^m\\/44'\\/195'/u),MA=(Ee(Y(),/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$/u),N(\"TronAddress\",e=>{if(\"string\"!=typeof e)return\"Expected a string, but received: \"+typeof e;return!!Lw.isAddress(e)||\"Invalid Tron address format\"})),FA=(ee([pA,hA,mA,bA,gA,yA]),K({address:MA,message:RA})),kA=K({signature:Y()}),NA=K({address:MA,transaction:K({rawDataHex:Y(),type:Y()})}),UA=K({method:j(cA.SignMessage),params:FA}),DA=K({method:j(cA.SignTransaction),params:NA}),LA=K({...ir.schema,scope:xA,request:ee([UA,DA])}),$A=Q({method:$(Object.values(cA)),params:J(Y(),te())}),zA=Ee(Y(),/^[a-zA-Z0-9]+:[a-zA-Z0-9]+:[a-zA-Z0-9]+$/u);function jA(e){const{baseUrl:t,path:r,pathParams:n,queryParams:o,encodePathParams:s=!0}=e,a=function(e){if(!e||\"string\"!=typeof e)return\"\";const t=ro(e);try{const e=new URL(t);return[\"http:\",\"https:\",\"wss:\"].includes(e.protocol)?t.length>2048?\"\":t:\"\"}catch{return\"\"}}(t);if(\"\"===a)throw new Error(\"Invalid URL format\");O(a,AA);const i=r.replace(/\\{(\\w+)\\}/gu,(e,t)=>{const r=n?.[t];if(void 0===r)throw new Error(`Path parameter ${t} is undefined`);const o=ro(r);return s?encodeURIComponent(o):o}).replace(/^\\/+/u,\"\").replace(/\\/+/gu,\"/\").replace(/\\/+$/u,\"\"),c=a.endsWith(\"/\")?a:`${a}/`,u=new URL(i,c);Object.entries(o??{}).filter(([e,t])=>void 0!==t).filter(([e,t])=>null!==t).forEach(([e,t])=>{if(t){const r=ro(t);u.searchParams.append(e,r)}});const l=u.toString();return O(l,AA),l}const VA=ee([Q({usd_price:q(Y()),summary:q(Y()),value:q(Y()),raw_value:Y()}),Q({summary:q(Y()),token_id:Y(),arbitrary_collection_token:L(),logo_url:q(G(Y())),usd_price:q(Y())}),Q({summary:q(Y()),token_id:Y(),value:Y(),arbitrary_collection_token:L(),logo_url:q(G(Y())),usd_price:q(Y())})]),GA=Q({type:Y(),symbol:q(Y()),name:q(Y()),logo_url:q(G(Y())),address:q(Y()),decimals:q(H())}),HA=Q({asset_type:Y(),asset:GA,in:D(VA),out:D(VA)}),KA=Q({assets_diffs:D(HA)}),qA=Q({code:Y(),category:Y()}),ZA=Q({type:Y(),message:Y(),transaction_index:H()}),JA=Q({status:$([\"Success\",\"Error\"]),error:q(Y()),error_details:q(ee([qA,ZA])),account_summary:q(KA)}),YA=Q({status:$([\"Success\",\"Error\"]),result_type:$([\"Benign\",\"Warning\",\"Malicious\",\"Error\"]),error:q(Y()),description:q(Y()),reason:q(Y()),classification:q(Y()),features:q(D(U()))}),XA=Q({validation:YA,simulation:JA}),QA=BigInt(2**32-1),ev=BigInt(32);function tv(e,t=!1){return t?{h:Number(e&QA),l:Number(e>>ev&QA)}:{h:0|Number(e>>ev&QA),l:0|Number(e&QA)}}function rv(e,t=!1){const r=e.length;let n=new Uint32Array(r),o=new Uint32Array(r);for(let s=0;s<r;s++){const{h:r,l:a}=tv(e[s],t);[n[s],o[s]]=[r,a]}return[n,o]}const nv=(e,t,r)=>e<<r|t>>>32-r,ov=(e,t,r)=>t<<r|e>>>32-r,sv=(e,t,r)=>t<<r-32|e>>>64-r,av=(e,t,r)=>e<<r-32|t>>>64-r;function iv(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(\"positive integer expected, got \"+e)}function cv(e,...t){if(!function(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&\"Uint8Array\"===e.constructor.name}(e))throw new Error(\"Uint8Array expected\");if(t.length>0&&!t.includes(e.length))throw new Error(\"Uint8Array expected of length \"+t+\", got length=\"+e.length)}function uv(e,t=!0){if(e.destroyed)throw new Error(\"Hash instance has been destroyed\");if(t&&e.finished)throw new Error(\"Hash#digest() has already been called\")}function lv(e,t){cv(e);const r=t.outputLen;if(e.length<r)throw new Error(\"digestInto() expects output buffer of length at least \"+r)}function dv(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function fv(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function pv(e,t){return e<<32-t|e>>>t}const hv=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];function gv(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const yv=hv?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=gv(e[t]);return e};Array.from({length:256},(e,t)=>t.toString(16).padStart(2,\"0\"));function mv(e){if(\"string\"!=typeof e)throw new Error(\"string expected\");return new Uint8Array((new TextEncoder).encode(e))}function bv(e){return\"string\"==typeof e&&(e=mv(e)),cv(e),e}class wv{}function Tv(e){const t=t=>e().update(bv(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}const Av=BigInt(0),vv=BigInt(1),Pv=BigInt(2),Ev=BigInt(7),Cv=BigInt(256),Bv=BigInt(113),Wv=[],Sv=[],Iv=[];for(let e=0,t=vv,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],Wv.push(2*(5*n+r)),Sv.push((e+1)*(e+2)/2%64);let o=Av;for(let e=0;e<7;e++)t=(t<<vv^(t>>Ev)*Bv)%Cv,t&Pv&&(o^=vv<<(vv<<BigInt(e))-vv);Iv.push(o)}const _v=rv(Iv,!0),Rv=_v[0],xv=_v[1],Ov=(e,t,r)=>r>32?sv(e,t,r):nv(e,t,r),Mv=(e,t,r)=>r>32?av(e,t,r):ov(e,t,r);class Fv extends wv{constructor(e,t,r,n=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,iv(r),!(0<e&&e<200))throw new Error(\"only keccak-f1600 function is supported\");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}clone(){return this._cloneInto()}keccak(){yv(this.state32),function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,s=r[o],a=r[o+1],i=Ov(s,a,1)^r[n],c=Mv(s,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=i,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=Sv[r],s=Ov(t,o,n),a=Mv(t,o,n),i=Wv[r];t=e[i],o=e[i+1],e[i]=s,e[i+1]=a}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=Rv[n],e[1]^=xv[n]}dv(r)}(this.state32,this.rounds),yv(this.state32),this.posOut=0,this.pos=0}update(e){uv(this),cv(e=bv(e));const{blockLen:t,state:r}=this,n=e.length;for(let o=0;o<n;){const s=Math.min(t-this.pos,n-o);for(let t=0;t<s;t++)r[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){uv(this,!1),cv(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(e)}xof(e){return iv(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(lv(e,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,dv(this.state)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:s}=this;return e||(e=new Fv(t,r,n,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}const kv=(e,t,r)=>Tv(()=>new Fv(t,e,r)),Nv=kv(1,136,32),{memoize:Uv}=Te,Dv=/^(?:0x)?[0-9a-f]+$/iu,Lv=/^0x[0-9a-f]+$/iu,$v=/^0x[0-9a-f]{40}$/u,zv=/^0x[0-9a-fA-F]{40}$/u,jv=(Ee(Y(),Dv),Ee(Y(),Lv),Ee(Y(),$v),Ee(Y(),zv),e=>\"string\"==typeof e);function Vv(e){return jv(e)&&zv.test(e)}function Gv(e){P(function(e){return jv(e)&&Dv.test(e)}(e),\"Value must be a hexadecimal string.\")}const Hv=Uv(function(e){P(Vv(e),\"Invalid hex address.\");const t=Zv(e).toLowerCase(),r=Nv(t),{length:n}=t,o=new Array(n);for(let e=0;e<n;e++){const n=1&e,s=r[e>>1],a=0===n?s>>4:15&s;o[e]=a>=8?t[e].toUpperCase():t[e]}return`0x${o.join(\"\")}`});const Kv=Uv(function(e){return!!Vv(e)&&Hv(e)===e});Uv(function(e){return jv(t=e)&&$v.test(t)||Kv(e);var t});function qv(e){return e.startsWith(\"0x\")?e:e.startsWith(\"0X\")?`0x${e.substring(2)}`:`0x${e}`}function Zv(e){return e.startsWith(\"0x\")||e.startsWith(\"0X\")?e.substring(2):e}var Jv=r(282);const Yv={invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},Xv={userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901},Qv={\"-32700\":{standard:\"JSON RPC 2.0\",message:\"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\"},\"-32600\":{standard:\"JSON RPC 2.0\",message:\"The JSON sent is not a valid Request object.\"},\"-32601\":{standard:\"JSON RPC 2.0\",message:\"The method does not exist / is not available.\"},\"-32602\":{standard:\"JSON RPC 2.0\",message:\"Invalid method parameter(s).\"},\"-32603\":{standard:\"JSON RPC 2.0\",message:\"Internal JSON-RPC error.\"},\"-32000\":{standard:\"EIP-1474\",message:\"Invalid input.\"},\"-32001\":{standard:\"EIP-1474\",message:\"Resource not found.\"},\"-32002\":{standard:\"EIP-1474\",message:\"Resource unavailable.\"},\"-32003\":{standard:\"EIP-1474\",message:\"Transaction rejected.\"},\"-32004\":{standard:\"EIP-1474\",message:\"Method not supported.\"},\"-32005\":{standard:\"EIP-1474\",message:\"Request limit exceeded.\"},4001:{standard:\"EIP-1193\",message:\"User rejected the request.\"},4100:{standard:\"EIP-1193\",message:\"The requested account and/or method has not been authorized by the user.\"},4200:{standard:\"EIP-1193\",message:\"The requested method is not supported by this Ethereum provider.\"},4900:{standard:\"EIP-1193\",message:\"The provider is disconnected from all chains.\"},4901:{standard:\"EIP-1193\",message:\"The provider is disconnected from the specified chain.\"}},eP=Yv.internal,tP=(rP(eP),\"Unspecified server error.\");function rP(e,t=\"Unspecified error message. This is a bug, please report it.\"){if(function(e){return Number.isInteger(e)}(e)){const t=e.toString();if(vt(Qv,t))return Qv[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return tP}return t}function nP(e){return Array.isArray(e)?e.map(e=>Rt(e)?e:At(e)?oP(e):null):At(e)?oP(e):Rt(e)?e:null}function oP(e){return Object.getOwnPropertyNames(e).reduce((t,r)=>{const n=e[r];return Rt(n)&&(t[r]=n),t},{})}const sP=function(e){return e?.__esModule?e.default:e}(Jv);class aP extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('\"code\" must be an integer.');if(!t||\"string\"!=typeof t)throw new Error('\"message\" must be a non-empty string.');!function(e){return At(e)&&vt(e,\"cause\")&&At(e.cause)}(r)?super(t):(super(t,{cause:r.cause}),vt(this,\"cause\")||Object.assign(this,{cause:r.cause})),void 0!==r&&(this.data=r),this.code=e}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,Et(this.data)&&(e.data.cause=nP(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return sP(this.serialize(),cP,2)}}class iP extends aP{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('\"code\" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}function cP(e,t){if(\"[Circular]\"!==t)return t}const uP=e=>CP(Yv.parse,e),lP=e=>CP(Yv.invalidRequest,e),dP=e=>CP(Yv.invalidParams,e),fP=e=>CP(Yv.methodNotFound,e),pP=e=>CP(Yv.internal,e),hP=e=>CP(Yv.invalidInput,e),gP=e=>CP(Yv.resourceNotFound,e),yP=e=>CP(Yv.resourceUnavailable,e),mP=e=>CP(Yv.transactionRejected,e),bP=e=>CP(Yv.methodNotSupported,e),wP=e=>CP(Yv.limitExceeded,e),TP=e=>BP(Xv.userRejectedRequest,e),AP=e=>BP(Xv.unauthorized,e),vP=e=>BP(Xv.unsupportedMethod,e),PP=e=>BP(Xv.disconnected,e),EP=e=>BP(Xv.chainDisconnected,e);function CP(e,t){const[r,n]=WP(t);return new aP(e,r??rP(e),n)}function BP(e,t){const[r,n]=WP(t);return new iP(e,r??rP(e),n)}function WP(e){if(e){if(\"string\"==typeof e)return[e];if(\"object\"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&\"string\"!=typeof t)throw new Error(\"Must specify string message.\");return[t??void 0,r]}}return[]}function SP(e,t,r=null){return At(e)&&vt(e,t)?e[t]:r}function IP(e,t,r=String(e)){const n=SP(e,t);return\"string\"==typeof n?n:r}function _P(e){return IP(e,\"message\")}function RP(e){return IP(e,\"stack\",null)}function xP(e){return IP(e,\"name\",e instanceof Error?e.name:\"Error\")}function OP(e){const t=SP(e,\"data\");return null!==t&&Rt(t)&&!Array.isArray(t)?t:{}}class MP extends Error{#Q;#ee;#o;#te;constructor(e,t={}){const r=_P(e);super(r),this.#ee=r,this.#Q=function(e){const t=SP(e,\"code\");return\"number\"==typeof t&&Number.isInteger(t)?t:-32603}(e);const n={...OP(e),...t};Object.keys(n).length>0&&(this.#o=n),this.#te=super.stack}get name(){return\"SnapError\"}get code(){return this.#Q}get message(){return this.#ee}get data(){return this.#o}get stack(){return this.#te}toJSON(){return{code:-31002,message:\"Snap Error\",data:{cause:{code:this.code,message:this.message,stack:this.stack,...this.data?{data:this.data}:{}}}}}serialize(){return this.toJSON()}}function FP(e){if(\"string\"==typeof e)return{name:\"Error\",message:e,stack:null,cause:null};if(F(e,Mt))return{name:\"JsonRpcError\",message:_P(e),stack:RP(e)??RP(e.data)??null,cause:null};const t=function(e){return SP(e,\"cause\")}(e);return{name:xP(e),message:_P(e),stack:RP(e)??null,cause:null===t?null:FP(t)}}function kP(e){return class extends MP{constructor(t,r){if(\"object\"==typeof t){const r=e();return void super({code:r.code,message:r.message,data:t})}const n=e(t);super({code:n.code,message:n.message,data:r})}}}const NP=kP(pP),UP=kP(hP),DP=kP(dP),LP=kP(lP),$P=kP(wP),zP=kP(fP),jP=kP(bP),VP=kP(uP),GP=kP(gP),HP=kP(yP),KP=kP(mP),qP=kP(EP),ZP=kP(PP),JP=kP(AP),YP=kP(vP),XP=kP(TP),QP=N(\"TransactionRawData\",e=>{const t=e;if(!t?.contract||1!==t.contract.length)return\"must contain exactly one contract\";const[r]=t.contract;return!!r?.parameter?.value||\"contract must have a non-empty parameter value\"});function eE(e){return F(e,QP)}function tE(e){try{O(e,QP)}catch(e){const t=e instanceof Error?e.message:\"Unknown validation error\";throw new DP(`Malformed transaction: ${t}`)}}function rE(e,t){const r=function(e){const t=e.contract[0],r=t?.parameter?.value?.owner_address;if(!r)return null;try{return Lw.address.fromHex(r)}catch{return null}}(e);if(!r)throw new DP(\"'Transaction is missing owner_address - cannot verify sender\");if(r!==t)throw new DP(`Transaction owner_address (${r}) does not match derived signer address (${t})`)}class nE{static SUPPORTED_CONTRACT_TYPES=[yw.TransferContract,yw.CreateSmartContract,yw.TriggerSmartContract];static isContractTypeSupported(e){const[t]=e.contract;return!!t&&nE.SUPPORTED_CONTRACT_TYPES.includes(t.type)}#re;#ne;#oe;constructor(e,t){this.#re=fetch,this.#ne=ke(t,\"[🔒 SecurityAlertsApiClient]\"),this.#oe=e.get().securityAlertsApi.baseUrl}async scanTransaction({accountAddress:e,transactionRawData:t,origin:r,options:n=[\"simulation\",\"validation\"]}){if(this.#ne.info(\"Scanning Tron transaction with Security Alerts API\"),!eE(t)||!nE.isContractTypeSupported(t))throw new Error(\"Transaction is not supported for scanning.\");const o=function(e){const t=e.contract[0]?.parameter.value;if(!t)return null;const r=Lw.address.fromHex(t.owner_address);let n=\"\";\"contract_address\"in t&&t.contract_address?n=Lw.address.fromHex(t.contract_address):\"to_address\"in t&&t.to_address&&(n=Lw.address.fromHex(t.to_address));let o=0;\"call_value\"in t&&t.call_value?o=t.call_value:\"amount\"in t&&t.amount&&(o=t.amount);let s=null;return\"data\"in t&&t.data&&(s=qv(t.data)),{from:r,to:n,data:s,value:o}}(t);if(!o)throw new Error(\"Could not extract scan parameters from transaction.\");const s=await this.#re(`${this.#oe}/tron/transaction/scan`,{headers:{\"Content-Type\":\"application/json\",accept:\"application/json\"},method:\"POST\",body:JSON.stringify({account_address:e,metadata:{domain:r},data:o,options:n})});if(!s.ok){const e=await s.text();throw this.#ne.error(`Security Alerts API error: ${s.status} - ${e}`),new Error(`Security Alerts API error: ${s.status} - ${e}`)}const a=await s.json();return O(a,XA),a}}var oE=function(e){return e.TransactionAdded=\"Transaction Added\",e.TransactionRejected=\"Transaction Rejected\",e.TransactionApproved=\"Transaction Approved\",e.TransactionSubmitted=\"Transaction Submitted\",e.TransactionFinalized=\"Transaction Finalized\",e}({}),sE=function(e){return e.SecurityAlertDetected=\"Security Alert Detected\",e.SecurityScanCompleted=\"Security Scan Completed\",e}({});const aE=D(K({decimals:z(),assetId:mA,name:q(Y()),symbol:q(Y()),iconUrl:q(AA)})),iE={name:\"UNKNOWN\",symbol:\"UNKNOWN\",fungible:!0,iconUrl:\"\",units:[{name:\"UNKNOWN\",symbol:\"UNKNOWN\",decimals:9}]};class cE{#re;#ne;#oe;#se;#ae;static supportedNetworks=[Ln.Mainnet,Ln.Nile,Ln.Shasta];constructor(e,t=globalThis.fetch,r=Ne){this.#re=t,this.#ne=r;const{tokenApi:n,staticApi:o}=e.get(),{baseUrl:s,chunkSize:a}=n;O(s,AA),this.#oe=s,this.#se=a,this.#ae=o.baseUrl}async#ie(e){O(e,D(mA));const t=jA({baseUrl:this.#oe,path:\"/v3/assets\",queryParams:{assetIds:e.join(\",\")}}),r=await this.#re(t);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const n=await r.json();return O(n,aE),n}async getTokensMetadata(e){try{O(e,D(ge));const t=e.filter(e=>{if(eo.includes(e))return!1;const{chainId:t}=we(e);return cE.supportedNetworks.includes(t)});t.length!==e.length&&this.#ne.warn(`[TokenApiClient] Received some asset types that are either not supported by the Token API or are excluded resource/staked tokens. They will be ignored. Supported networks: ${cE.supportedNetworks.join(\", \")}`);const r=[];for(let e=0;e<t.length;e+=this.#se)r.push(t.slice(e,e+this.#se));const n=(await Promise.all(r.map(async e=>this.#ie(e)))).flat(),o=new Map;return e.forEach(e=>{const t=n.find(t=>t.assetId===e);if(!t)return this.#ne.warn(`No metadata for ${e}. Returning default values.`),void o.set(e,iE);const r=t.name??iE.name,s=t.symbol??iE.symbol,a=t.decimals??9,i={name:r,symbol:s,fungible:!0,iconUrl:t.iconUrl??jA({baseUrl:this.#ae,path:\"/api/v2/tokenIcons/assets/{assetType}.png\",pathParams:{assetType:e.replace(/:/gu,\"/\")},encodePathParams:!1}),units:[{name:r,symbol:s,decimals:a}]};o.set(e,i)}),Object.fromEntries(o)}catch(e){throw this.#ne.error(e,\"Error fetching token metadata\"),e}}}const uE=Q({id:Y(),owner_address:Y(),name:Y(),abbr:Y(),total_supply:ve(H(),0),trx_num:ve(H(),0),num:ve(H(),0),precision:ve(H(),0),start_time:ve(H(),0),end_time:ve(H(),0),description:Y(),url:Y()}),lE=Q({freeNetUsed:q(ve(H(),0)),freeNetLimit:q(ve(H(),0)),NetUsed:q(ve(H(),0)),NetLimit:q(ve(H(),0)),TotalNetLimit:q(ve(H(),0)),TotalNetWeight:q(ve(H(),0)),tronPowerUsed:q(ve(H(),0)),tronPowerLimit:q(ve(H(),0)),EnergyUsed:q(ve(H(),0)),EnergyLimit:q(ve(H(),0)),TotalEnergyLimit:q(ve(H(),0)),TotalEnergyWeight:q(ve(H(),0))}),dE=Q({energy_usage:q(ve(H(),0)),energy_fee:q(ve(H(),0)),origin_energy_usage:q(ve(H(),0)),energy_usage_total:q(ve(H(),0)),net_usage:q(ve(H(),0)),net_fee:q(ve(H(),0)),result:q(Y()),energy_penalty_total:q(ve(H(),0))}),fE=Q({address:Y(),topics:D(Y()),data:Y()}),pE=Q({hash:q(Y()),caller_address:q(Y()),transferTo_address:q(Y()),callValueInfo:q(D(Q({callValue:q(ve(H(),0)),tokenId:q(Y())}))),note:q(Y()),rejected:q(L())}),hE=Q({id:q(Y()),fee:q(ve(H(),0)),blockNumber:q(ve(H(),0)),blockTimeStamp:q(ve(H(),0)),contractResult:q(D(Y())),contract_address:q(Y()),receipt:q(dE),log:q(D(fE)),result:q(Y()),resMessage:q(Y()),withdraw_amount:q(ve(H(),0)),unfreeze_amount:q(ve(H(),0)),internal_transactions:q(D(pE)),withdraw_expire_amount:q(ve(H(),0)),cancel_unfreezeV2_amount:q(J(Y(),H()))}),gE=Q({num:ve(H(),0)}),yE=Q({key:Y(),value:q(H())}),mE=Q({chainParameter:D(yE)}),bE=Q({result:L(),message:q(Y())}),wE=Q({contract:D(Q({parameter:Q({value:Q({data:Y(),owner_address:Y(),contract_address:Y()}),type_url:Y()}),type:Y()})),ref_block_bytes:Y(),ref_block_hash:Y(),expiration:ve(H(),0),timestamp:ve(H(),0)}),TE=Q({ret:D(Q({ret:q(Y())})),visible:L(),txID:Y(),raw_data:wE,raw_data_hex:Y()}),AE=Q({result:bE,energy_used:ve(H(),0),constant_result:D(Y()),energy_penalty:q(ve(H(),0)),transaction:TE}),vE=Q({origin_address:q(Y()),consume_user_resource_percent:q(ve(H(),0)),origin_energy_limit:q(ve(H(),0))}),PE=Q({reward:q(ve(H(),0))});function EE(e){const t=e.startsWith(\"0x\")?e.slice(2):e;if(0===t.length)return\"\";if(t.length%2!=0)throw new Error(\"Invalid hex string: odd length\");const r=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2){const n=parseInt(t.slice(e,e+2),16);if(Number.isNaN(n))throw new Error(\"Invalid hex string: contains non-hex characters\");r[e/2]=n}return(new TextDecoder).decode(r)}const CE=Q({address:Y(),weight:H()}),BE=Q({keys:D(CE),threshold:H(),permission_name:Y(),operations:q(Y()),id:q(H()),type:q(Y())}),WE=Q({energy_window_optimized:q(L()),energy_window_size:q(H()),delegated_frozenV2_balance_for_energy:q(ve(H(),0)),delegated_frozenV2_balance_for_bandwidth:q(ve(H(),0))}),SE=Q({amount:q(ve(H(),0)),type:q(Y())}),IE=Q({unfreeze_amount:ve(H(),0),unfreeze_expire_time:ve(H(),0),type:q(Y())}),_E=Q({vote_address:Y(),vote_count:ve(H(),0)}),RE=Q({key:Y(),value:H()}),xE=Q({owner_permission:q(BE),account_resource:q(WE),active_permission:q(D(BE)),address:MA,create_time:q(ve(H(),0)),latest_opration_time:q(ve(H(),0)),frozenV2:q(D(SE)),unfrozenV2:q(D(IE)),balance:q(ve(H(),0)),assetV2:q(D(RE)),trc20:q(D(J(Y(),Y()))),latest_consume_free_time:q(ve(H(),0)),votes:q(D(_E)),latest_withdraw_time:q(ve(H(),0)),net_window_size:q(ve(H(),0)),net_window_optimized:q(L())}),OE=Q({contractRet:q(Y()),fee:q(ve(H(),0))}),ME=Q({vote_address:Y(),vote_count:ve(H(),0)}),FE=Q({owner_address:q(Y()),to_address:q(Y()),unfreeze_balance:q(ve(H(),0)),votes:q(D(ME)),frozen_balance:q(ve(H(),0)),data:q(Y()),contract_address:q(Y()),call_value:q(ve(H(),0)),amount:q(ve(H(),0)),asset_name:q(Y())}),kE=Q({value:FE,type_url:Y()}),NE=Q({parameter:kE,type:Y()}),UE=Q({_:q(H()),callValue:q(ve(H(),0)),tokenId:q(Y())}),DE=Q({note:q(Y()),rejected:q(L()),call_value:q(UE)}),LE=Q({internal_tx_id:q(Y()),data:q(DE),to_address:q(Y()),from_address:q(Y())}),$E=Q({contract:D(NE),ref_block_bytes:Y(),ref_block_hash:Y(),expiration:ve(H(),0),timestamp:q(ve(H(),0)),fee_limit:q(ve(H(),0))}),zE=Q({ret:q(D(OE)),signature:q(D(Y())),txID:Y(),net_usage:q(ve(H(),0)),raw_data_hex:q(Y()),net_fee:q(ve(H(),0)),energy_usage:q(ve(H(),0)),blockNumber:q(ve(H(),0)),block_timestamp:q(ve(H(),0)),energy_fee:q(ve(H(),0)),energy_usage_total:q(ve(H(),0)),raw_data:$E,internal_transactions:q(D(LE))}),jE=Q({symbol:Y(),address:Y(),decimals:ve(H(),0),name:Y()}),VE=Q({transaction_id:Y(),token_info:jE,block_timestamp:ve(H(),0),from:Y(),to:Y(),type:Y(),value:Y()}),GE=Q({at:ve(H(),0),page_size:ve(H(),0)}),HE=(Q({data:D(xE),success:L(),meta:GE}),Q({data:D(zE),success:L(),meta:GE}),Q({data:D(VE),success:L(),meta:GE}),J(Y(),Y())),KE=(Q({data:D(HE),success:L(),meta:GE}),(e,t)=>`${e}:${t.map(e=>JSON.stringify(e)).join(\":\")}`);r(1048).hp;const qE=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,\"0\"));return e}}();function ZE(e){return e instanceof Uint8Array}function JE(e){P(ZE(e),\"Value must be a Uint8Array.\")}function YE(e){if(JE(e),0===e.length)return\"0x\";const t=qE(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return qv(r.join(\"\"))}function XE(e){if(\"0x\"===e?.toLowerCase?.())return new Uint8Array;Gv(e);const t=Zv(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),o=r.charCodeAt(2*e+1),s=t-(t<58?48:87),a=o-(o<58?48:87);n[e]=16*s+a}return n}function QE(e,t,r){return e&t^~e&r}function eC(e,t,r){return e&t^e&r^t&r}class tC extends wv{constructor(e,t,r,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=fv(this.buffer)}update(e){uv(this),cv(e=bv(e));const{view:t,buffer:r,blockLen:n}=this,o=e.length;for(let s=0;s<o;){const a=Math.min(n-this.pos,o-s);if(a===n){const t=fv(e);for(;n<=o-s;s+=n)this.process(t,s);continue}r.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){uv(this),lv(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:s}=this;t[s++]=128,dv(this.buffer.subarray(s)),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e<n;e++)t[e]=0;!function(e,t,r,n){if(\"function\"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),a=Number(r>>o&s),i=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,i,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const a=fv(e),i=this.outputLen;if(i%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=i/4,u=this.get();if(c>u.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let e=0;e<c;e++)a.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:a}=this;return e.destroyed=s,e.finished=o,e.length=n,e.pos=a,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const rC=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),nC=(Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298])),oC=new Uint32Array(64);class sC extends tC{constructor(e=32){super(64,e,8,!1),this.A=0|rC[0],this.B=0|rC[1],this.C=0|rC[2],this.D=0|rC[3],this.E=0|rC[4],this.F=0|rC[5],this.G=0|rC[6],this.H=0|rC[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:a,H:i}=this;return[e,t,r,n,o,s,a,i]}set(e,t,r,n,o,s,a,i){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|a,this.H=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)oC[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=oC[e-15],r=oC[e-2],n=pv(t,7)^pv(t,18)^t>>>3,o=pv(r,17)^pv(r,19)^r>>>10;oC[e]=o+oC[e-7]+n+oC[e-16]|0}let{A:r,B:n,C:o,D:s,E:a,F:i,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(pv(a,6)^pv(a,11)^pv(a,25))+QE(a,i,c)+nC[e]+oC[e]|0,l=(pv(r,2)^pv(r,13)^pv(r,22))+eC(r,n,o)|0;u=c,c=i,i=a,a=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,i=i+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,s,a,i,c,u)}roundClean(){dv(oC)}destroy(){this.set(0,0,0,0,0,0,0,0),dv(this.buffer)}}const aC=rv([\"0x428a2f98d728ae22\",\"0x7137449123ef65cd\",\"0xb5c0fbcfec4d3b2f\",\"0xe9b5dba58189dbbc\",\"0x3956c25bf348b538\",\"0x59f111f1b605d019\",\"0x923f82a4af194f9b\",\"0xab1c5ed5da6d8118\",\"0xd807aa98a3030242\",\"0x12835b0145706fbe\",\"0x243185be4ee4b28c\",\"0x550c7dc3d5ffb4e2\",\"0x72be5d74f27b896f\",\"0x80deb1fe3b1696b1\",\"0x9bdc06a725c71235\",\"0xc19bf174cf692694\",\"0xe49b69c19ef14ad2\",\"0xefbe4786384f25e3\",\"0x0fc19dc68b8cd5b5\",\"0x240ca1cc77ac9c65\",\"0x2de92c6f592b0275\",\"0x4a7484aa6ea6e483\",\"0x5cb0a9dcbd41fbd4\",\"0x76f988da831153b5\",\"0x983e5152ee66dfab\",\"0xa831c66d2db43210\",\"0xb00327c898fb213f\",\"0xbf597fc7beef0ee4\",\"0xc6e00bf33da88fc2\",\"0xd5a79147930aa725\",\"0x06ca6351e003826f\",\"0x142929670a0e6e70\",\"0x27b70a8546d22ffc\",\"0x2e1b21385c26c926\",\"0x4d2c6dfc5ac42aed\",\"0x53380d139d95b3df\",\"0x650a73548baf63de\",\"0x766a0abb3c77b2a8\",\"0x81c2c92e47edaee6\",\"0x92722c851482353b\",\"0xa2bfe8a14cf10364\",\"0xa81a664bbc423001\",\"0xc24b8b70d0f89791\",\"0xc76c51a30654be30\",\"0xd192e819d6ef5218\",\"0xd69906245565a910\",\"0xf40e35855771202a\",\"0x106aa07032bbd1b8\",\"0x19a4c116b8d2d0c8\",\"0x1e376c085141ab53\",\"0x2748774cdf8eeb99\",\"0x34b0bcb5e19b48a8\",\"0x391c0cb3c5c95a63\",\"0x4ed8aa4ae3418acb\",\"0x5b9cca4f7763e373\",\"0x682e6ff3d6b2b8a3\",\"0x748f82ee5defb2fc\",\"0x78a5636f43172f60\",\"0x84c87814a1f0ab72\",\"0x8cc702081a6439ec\",\"0x90befffa23631e28\",\"0xa4506cebde82bde9\",\"0xbef9a3f7b2c67915\",\"0xc67178f2e372532b\",\"0xca273eceea26619c\",\"0xd186b8c721c0c207\",\"0xeada7dd6cde0eb1e\",\"0xf57d4f7fee6ed178\",\"0x06f067aa72176fba\",\"0x0a637dc5a2c898a6\",\"0x113f9804bef90dae\",\"0x1b710b35131c471b\",\"0x28db77f523047d84\",\"0x32caab7b40c72493\",\"0x3c9ebe0a15c9bebc\",\"0x431d67c49c100d4c\",\"0x4cc5d4becb3e42b6\",\"0x597f299cfc657e2a\",\"0x5fcb6fab3ad6faec\",\"0x6c44198c4a475817\"].map(e=>BigInt(e)));aC[0],aC[1],new Uint32Array(80),new Uint32Array(80);Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);const iC=Tv(()=>new sC);async function cC(e){return\"crypto\"in globalThis&&\"object\"==typeof globalThis.crypto&&globalThis.crypto.subtle?.digest?new Uint8Array(await globalThis.crypto.subtle.digest(\"SHA-256\",e)):iC(e)}var uC=function(e){return e.SignAndSendTransaction=\"signAndSendTransaction\",e.ConfirmSend=\"confirmSend\",e.ComputeFee=\"computeFee\",e.OnAddressInput=\"onAddressInput\",e.OnAmountInput=\"onAmountInput\",e.ComputeStakeFee=\"computeStakeFee\",e.OnStakeAmountInput=\"onStakeAmountInput\",e.ConfirmStake=\"confirmStake\",e.OnUnstakeAmountInput=\"onUnstakeAmountInput\",e.ConfirmUnstake=\"confirmUnstake\",e.ClaimUnstakedTrx=\"claimUnstakedTrx\",e.ClaimTrxStakingRewards=\"claimTrxStakingRewards\",e.SignRewardsMessage=\"signRewardsMessage\",e}({}),lC=function(e){return e.Required=\"Required\",e.Invalid=\"Invalid\",e.InsufficientBalance=\"InsufficientBalance\",e.InsufficientBalanceToCoverFee=\"InsufficientBalanceToCoverFee\",e}({});function dC(e){return N(JSON.stringify(e),j(e).validator)}var fC=r(1048).hp;const pC=K({transaction:RA,accountId:wA,scope:xA,options:K({visible:q(L()),type:Y()})}),hC=K({jsonrpc:xt,id:Ot,method:dC(uC.SignAndSendTransaction),params:pC}),gC=K({fromAccountId:wA,toAddress:MA,amount:TA,assetId:ge}),yC=K({jsonrpc:xt,id:Ot,method:dC(uC.ConfirmSend),params:gC}),mC=K({value:MA}),bC=K({jsonrpc:xt,id:Ot,method:dC(uC.OnAddressInput),params:mC}),wC=K({accountId:wA,assetId:ge,value:TA,toAddress:q(Y())}),TC=K({jsonrpc:xt,id:Ot,method:dC(uC.OnAmountInput),params:wC}),AC=(K({valid:L(),errors:D(K({code:$(Object.values(lC))}))}),K({transaction:RA,accountId:wA,scope:xA,options:K({visible:q(L()),type:Y(),feeLimit:q(H())})})),vC=K({accountId:wA,assetId:pA,value:TA}),PC=K({jsonrpc:xt,id:Ot,method:dC(uC.OnStakeAmountInput),params:vC}),EC=K({fromAccountId:wA,assetId:pA,value:TA,options:K({purpose:$([\"ENERGY\",\"BANDWIDTH\"]),srNodeAddress:q(MA)})}),CC=K({jsonrpc:xt,id:Ot,method:dC(uC.ConfirmStake),params:EC}),BC=K({jsonrpc:xt,id:Ot,method:dC(uC.ComputeFee),params:AC}),WC=D(K({type:$(Object.values(ur)),asset:rr})),SC=K({fromAccountId:wA,value:TA,options:K({purpose:$([\"ENERGY\",\"BANDWIDTH\"])})}),IC=K({jsonrpc:xt,id:Ot,method:dC(uC.ComputeStakeFee),params:SC}),_C=K({accountId:wA,assetId:pA,options:K({purpose:$([\"ENERGY\",\"BANDWIDTH\"])}),value:TA}),RC=K({jsonrpc:xt,id:Ot,method:dC(uC.OnUnstakeAmountInput),params:_C}),xC=K({accountId:wA,assetId:pA,options:K({purpose:$([\"ENERGY\",\"BANDWIDTH\"])}),value:TA}),OC=K({jsonrpc:xt,id:Ot,method:dC(uC.ConfirmUnstake),params:xC}),MC=K({fromAccountId:wA,assetId:pA}),FC=K({jsonrpc:xt,id:Ot,method:dC(uC.ClaimUnstakedTrx),params:MC}),kC=K({fromAccountId:wA,assetId:pA}),NC=K({jsonrpc:xt,id:Ot,method:dC(uC.ClaimTrxStakingRewards),params:kC});function UC(e){const t=fC.from(e,\"base64\").toString(\"utf8\");if(!t.startsWith(\"rewards,\"))throw new Error('Message must start with \"rewards,\"');const r=t.split(\",\");if(3!==r.length)throw new Error(\"Message must have exactly 3 parts: rewards,{address},{timestamp}\");const[n,o,s]=r;if(\"rewards\"!==n)throw new Error('Message must start with \"rewards\"');if(!F(o,MA))throw new Error(\"Invalid Tron address\");if(!F(s,TA))throw new Error(\"Invalid timestamp format\");if(s.includes(\".\"))throw new Error(\"Invalid timestamp\");const a=parseInt(s,10);if(a<=0)throw new Error(\"Invalid timestamp\");return{address:o,timestamp:a}}const DC=Ce(RA,\"RewardsMessage\",e=>{try{return UC(e),!0}catch(e){return e instanceof Error?e.message:\"Invalid rewards message\"}}),LC=K({accountId:wA,message:DC}),$C=K({jsonrpc:xt,id:Ot,method:dC(uC.SignRewardsMessage),params:LC}),zC=e=>Mn(e.toString()).multipliedBy(Un).integerValue(Mn.ROUND_DOWN).toFixed(0),jC=e=>Mn(e.toString()).dividedBy(Un),VC=(e,t)=>Mn(e.toString()).multipliedBy(Mn(10).pow(t)).integerValue(Mn.ROUND_DOWN).toFixed(0),GC=(e,t)=>Mn(e.toString()).dividedBy(Mn(10).pow(t));class HC{static createPendingTransaction({txId:e,account:t,scope:r}){const n=Math.floor(Date.now()/1e3);return{type:fr.Unknown,id:e,from:[{address:t.address,asset:{unit:\"TRX\",type:`${r}/slip44:195`,amount:\"0\",fungible:!0}}],to:[{address:t.address,asset:{unit:\"TRX\",type:`${r}/slip44:195`,amount:\"0\",fungible:!0}}],events:[{status:dr.Unconfirmed,timestamp:n}],chain:r,status:dr.Unconfirmed,account:t.id,timestamp:n,fees:[]}}static createPendingSendTransaction({txId:e,account:t,scope:r,toAddress:n,amount:o,assetType:s,assetSymbol:a}){const i=Math.floor(Date.now()/1e3);return{type:fr.Send,id:e,from:[{address:t.address,asset:{unit:a,type:s,amount:o,fungible:!0}}],to:[{address:n,asset:{unit:a,type:s,amount:o,fungible:!0}}],events:[{status:dr.Unconfirmed,timestamp:i}],chain:r,status:dr.Unconfirmed,account:t.id,timestamp:i,fees:[]}}static#ce(e,t){const r=[],{nativeToken:n,bandwidth:o,energy:s}=Qn[e],a=t.ret.reduce((e,t)=>e+(t.fee||0),0),i=(e,t)=>{e>0&&r.push({type:\"base\",asset:{type:t.id,unit:t.symbol,amount:e.toString(),fungible:!0}})};return i(jC(a).toNumber(),n),i(t.net_usage,o),i(t.energy_usage,s),r}static#ue(e){const t=!e.blockNumber,r=e.ret?.[0]?.contractRet,n=r&&\"SUCCESS\"!==r;return t?dr.Unconfirmed:n?dr.Failed:dr.Confirmed}static#le({accountAddress:e,from:t,to:r,trc20Type:n}){return\"Approval\"===n?fr.Unknown:t===e&&r===e?fr.Swap:t===e?fr.Send:r===e?fr.Receive:fr.Unknown}static#de(e){return Lw.address.fromHex(e)}static#fe(e,t){const r=e.internal_transactions;if(!r||0===r.length)return!1;const n=Lw.address.toHex(t).toLowerCase();return r.some(e=>{const t=e.caller_address?.toLowerCase(),r=e.transferTo_address?.toLowerCase(),o=e.callValueInfo?.some(e=>(e.callValue??0)>0);return o&&(t===n||r===n)})}static#pe({scope:e,account:t,trongridTransaction:r}){const n=r.raw_data.contract[0].parameter.value,o=this.#de(n.owner_address),s=this.#de(n.to_address),a=this.#ue(r),i=a===dr.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(r.block_timestamp/1e3),c=n.amount,u=jC(c).toString(),l=HC.#ce(e,r),d=this.#le({accountAddress:t.address,from:o,to:s}),f=Qn[e].nativeToken;return{type:d,id:r.txID,from:[{address:o,asset:{unit:f.symbol,type:f.id,amount:u,fungible:!0}}],to:[{address:s,asset:{unit:f.symbol,type:f.id,amount:u,fungible:!0}}],events:[{status:a,timestamp:i}],chain:e,status:a,account:t.id,timestamp:i,fees:l}}static#he({scope:e,account:t,trongridTransaction:r,trc10TokenMetadata:n}){const o=r.raw_data.contract[0].parameter.value,s=this.#de(o.owner_address),a=this.#de(o.to_address),i=this.#ue(r),c=i===dr.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(r.block_timestamp/1e3),u=o.asset_name,l=n?.get(u),d=l?.decimals??6,f=l?.symbol??\"UNKNOWN\",p=o.amount,h=GC(p,d).toFixed(),g=HC.#ce(e,r);return{type:this.#le({accountAddress:t.address,from:s,to:a}),id:r.txID,from:[{address:s,asset:{unit:f,type:`${e}/trc10:${u}`,amount:h,fungible:!0}}],to:[{address:a,asset:{unit:f,type:`${e}/trc10:${u}`,amount:h,fungible:!0}}],events:[{status:i,timestamp:c}],chain:e,status:i,account:t.id,timestamp:c,fees:g}}static#ge({scope:e,account:t,trc20Transfer:r}){const{from:n,to:o,value:s,token_info:a,block_timestamp:i,transaction_id:c}=r,u=GC(s,a.decimals).toFixed(),l=this.#le({accountAddress:t.address,from:n,to:o,trc20Type:r.type}),d=dr.Confirmed;return{type:l,id:c,from:[{address:n,asset:{unit:a.symbol,type:`${e}/trc20:${a.address}`,amount:u,fungible:!0}}],to:[{address:o,asset:{unit:a.symbol,type:`${e}/trc20:${a.address}`,amount:u,fungible:!0}}],events:[{status:d,timestamp:Math.floor(i/1e3)}],chain:e,status:d,account:t.id,timestamp:Math.floor(i/1e3),fees:[]}}static#ye({scope:e,account:t,trongridTransaction:r,sentTransfer:n,receivedTransfer:o}){const s=this.#ue(r),a=s===dr.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(r.block_timestamp/1e3),i=GC(n.value,n.token_info.decimals).toFixed(),c=GC(o.value,o.token_info.decimals).toFixed(),u=HC.#ce(e,r);return{type:fr.Swap,id:r.txID,from:[{address:n.from,asset:{unit:n.token_info.symbol,type:`${e}/trc20:${n.token_info.address}`,amount:i,fungible:!0}}],to:[{address:o.to,asset:{unit:o.token_info.symbol,type:`${e}/trc20:${o.token_info.address}`,amount:c,fungible:!0}}],events:[{status:s,timestamp:a}],chain:e,status:s,account:t.id,timestamp:a,fees:u}}static#me({scope:e,account:t,trongridTransaction:r,trc20Transfer:n}){const o=this.#ue(r),s=o===dr.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(r.block_timestamp/1e3),a=GC(n.value,n.token_info.decimals).toFixed(),i=r.raw_data.contract?.[0],c=i?.parameter?.value?.call_value;let u=\"0\";if(c&&c>0)u=jC(c).toString();else{const e=r.internal_transactions??[],n=Lw.address.toHex(t.address).toLowerCase();for(const t of e){const e=t.caller_address?.toLowerCase();if(e===n){const e=t.callValueInfo?.find(e=>e.callValue)?.callValue??0;if(e>0){u=jC(e).toString();break}}}if(\"0\"===u&&e.length>0){let t=0;for(const r of e){t+=r.callValueInfo?.find(e=>e.callValue)?.callValue??0}t>0&&(u=jC(t).toString())}}const l=Qn[e].nativeToken,d=HC.#ce(e,r);return{type:fr.Swap,id:r.txID,from:[{address:t.address,asset:{unit:l.symbol,type:l.id,amount:u,fungible:!0}}],to:[{address:t.address,asset:{unit:n.token_info.symbol,type:`${e}/trc20:${n.token_info.address}`,amount:a,fungible:!0}}],events:[{status:o,timestamp:s}],chain:e,status:o,account:t.id,timestamp:s,fees:d}}static#be({scope:e,account:t,trongridTransaction:r,trc20Transfers:n=[]}){const o=this.#ue(r),s=r.raw_data.contract?.[0],a=s?.parameter?.value?.owner_address,i=s?.parameter?.value?.contract_address,c=s?.parameter?.value?.call_value;if(o===dr.Failed){if(!a)return null;const n=Math.floor(r.block_timestamp/1e3),s=HC.#ce(e,r);return{type:fr.Unknown,id:r.txID,from:[],to:[],events:[{status:o,timestamp:n}],chain:e,status:o,account:t.id,timestamp:n,fees:s}}if(0===n.length&&c&&c>0){if(!a||!i)return null;const n=Math.floor(r.block_timestamp/1e3),s=jC(c).toString(),u=HC.#ce(e,r),l=Qn[e].nativeToken;return{type:fr.Send,id:r.txID,from:[{address:this.#de(a),asset:{unit:l.symbol,type:l.id,amount:s,fungible:!0}}],to:[{address:this.#de(i),asset:{unit:l.symbol,type:l.id,amount:s,fungible:!0}}],events:[{status:o,timestamp:n}],chain:e,status:o,account:t.id,timestamp:n,fees:u}}if(0===n.length&&(!c||0===c))return null;const u=n.find(e=>e.from===t.address),l=n.find(e=>e.to===t.address),d=u&&l&&u.token_info.address!==l.token_info.address;if(u&&l&&n.length>=2&&d)return this.#ye({scope:e,account:t,trongridTransaction:r,sentTransfer:u,receivedTransfer:l});const f=this.#fe(r,t.address),p=c&&c>0,h=r.internal_transactions&&r.internal_transactions.length>0&&r.internal_transactions.some(e=>e.callValueInfo?.some(e=>(e.callValue??0)>0));if(l&&!u&&(f||p||h))return this.#me({scope:e,account:t,trongridTransaction:r,trc20Transfer:l});const g=n[0];if(!g)return null;const{from:y,to:m}=g,b=g.value,{decimals:w,address:T,symbol:A}=g.token_info,v=o===dr.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(g.block_timestamp/1e3),P=GC(b,w).toFixed(),E=this.#le({accountAddress:t.address,from:y,to:m,trc20Type:g.type}),C=HC.#ce(e,r);return{type:E,id:g.transaction_id,from:[{address:y,asset:{unit:A,type:`${e}/trc20:${T}`,amount:P,fungible:!0}}],to:[{address:m,asset:{unit:A,type:`${e}/trc20:${T}`,amount:P,fungible:!0}}],events:[{status:o,timestamp:v}],chain:e,status:o,account:t.id,timestamp:v,fees:C}}static#we({scope:e,account:t,trongridTransaction:r}){const n=r.raw_data.contract[0],o=n?.parameter?.value;if(!o)return null;const s=o.owner_address;if(!s)return null;const a=Lw.address.fromHex(s),i=Math.floor(r.block_timestamp/1e3),c=Number(o.frozen_balance??o.frozen_balance_v2)||0,u=jC(c).toString(),{resource:l}=o,d=\"ENERGY\"===l;if(!d&&!(\"BANDWIDTH\"===l))return null;const f=Qn[e].nativeToken,p=d?Qn[e].stakedForEnergy:Qn[e].stakedForBandwidth,h=HC.#ce(e,r);return{type:fr.StakeDeposit,id:r.txID,from:[{address:a,asset:{unit:f.symbol,type:f.id,amount:u,fungible:!0}}],to:[{address:a,asset:{unit:p.symbol,type:p.id,amount:u,fungible:!0}}],events:[{status:dr.Confirmed,timestamp:i}],chain:e,status:dr.Confirmed,account:t.id,timestamp:i,fees:h}}static#Te({scope:e,account:t,trongridTransaction:r}){const n=r.raw_data.contract[0],o=n?.parameter?.value;if(!o)return null;const s=o.owner_address;if(!s)return null;const a=Lw.address.fromHex(s),i=Math.floor(r.block_timestamp/1e3),c=Number(o.unfreeze_balance)||0,u=jC(c).toString(),{resource:l}=o,d=\"ENERGY\"===l;if(!d&&!(\"BANDWIDTH\"===l))return null;const f=Qn[e].nativeToken,p=d?Qn[e].stakedForEnergy:Qn[e].stakedForBandwidth,h=HC.#ce(e,r);return{type:fr.StakeWithdraw,id:r.txID,from:[{address:a,asset:{unit:p.symbol,type:p.id,amount:u,fungible:!0}}],to:[{address:a,asset:{unit:f.symbol,type:f.id,amount:u,fungible:!0}}],events:[{status:dr.Confirmed,timestamp:i}],chain:e,status:dr.Confirmed,account:t.id,timestamp:i,fees:h}}static mapTransaction({scope:e,account:t,trongridTransaction:r,trc20Transfers:n=[],trc10TokenMetadata:o}){const s=r.raw_data.contract?.[0],a=s?.type;if(!s||!a)return null;switch(a){case\"TransferContract\":return this.#pe({scope:e,account:t,trongridTransaction:r});case\"TransferAssetContract\":return this.#he({scope:e,account:t,trongridTransaction:r,trc10TokenMetadata:o});case\"FreezeBalanceV2Contract\":case\"FreezeBalanceContract\":return this.#we({scope:e,account:t,trongridTransaction:r});case\"UnfreezeBalanceV2Contract\":case\"UnfreezeBalanceContract\":return this.#Te({scope:e,account:t,trongridTransaction:r});case\"TriggerSmartContract\":return this.#be({scope:e,account:t,trongridTransaction:r,trc20Transfers:n});default:return null}}static mapTransactions({scope:e,account:t,rawTransactions:r,trc20Transactions:n,trc10TokenMetadata:o}){const s=[],a=new Set,i=new Map;for(const e of n){const t=i.get(e.transaction_id)??[];t.push(e),i.set(e.transaction_id,t)}for(const n of r){const r=i.get(n.txID)??[],c=this.mapTransaction({scope:e,account:t,trongridTransaction:n,trc20Transfers:r,trc10TokenMetadata:o});c&&(s.push(c),a.add(n.txID))}for(const r of n)if(!a.has(r.transaction_id)){const n=this.#ge({scope:e,account:t,trc20Transfer:r});n&&(s.push(n),a.add(r.transaction_id))}return s}}function KC(e,t,r){try{O(e,t)}catch(e){throw r.cause=e,r}}function qC(e,t,r){if(\"string\"==typeof e)throw new Error(`An HTML element (\"${String(e)}\") was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.`);if(!e)throw new Error(\"A JSX fragment was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.\");return e({...t,key:r})}function ZC(e,t,r){return qC(e,t,r)}var JC=function(e){return e.Initial=\"initial\",e.Loading=\"loading\",e.Fetching=\"fetching\",e.Fetched=\"fetched\",e.Error=\"error\",e}({});function YC(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}function XC(e){return t=>{const{key:r=null,...n}=t;return{type:e,props:YC(n),key:r}}}const QC=XC(\"Section\"),eB=XC(\"Box\"),tB=XC(\"Text\"),rB=XC(\"Tooltip\");var nB;!function(e){e.Accessibility=\"accessibility\",e.Activity=\"activity\",e.AddCard=\"add-card\",e.AddCircle=\"add-circle\",e.AddSquare=\"add-square\",e.Add=\"add\",e.Ai=\"ai\",e.AlternateEmail=\"alternate-email\",e.Apple=\"apple\",e.Apps=\"apps\",e.Arrow2Down=\"arrow-2-down\",e.Arrow2Left=\"arrow-2-left\",e.Arrow2Right=\"arrow-2-right\",e.Arrow2UpRight=\"arrow-2-up-right\",e.Arrow2Up=\"arrow-2-up\",e.ArrowCircleDown=\"arrow-circle-down\",e.ArrowCircleUp=\"arrow-circle-up\",e.ArrowDoubleLeft=\"arrow-double-left\",e.ArrowDoubleRight=\"arrow-double-right\",e.ArrowDown=\"arrow-down\",e.ArrowDropDownCircle=\"arrow-drop-down-circle\",e.ArrowLeft=\"arrow-left\",e.ArrowRight=\"arrow-right\",e.ArrowUp=\"arrow-up\",e.Attachment=\"attachment\",e.Ban=\"ban\",e.BankAssured=\"bank-assured\",e.Bank=\"bank\",e.Bold=\"bold\",e.Book=\"book\",e.Bookmark=\"bookmark\",e.Bridge=\"bridge\",e.Briefcase=\"briefcase\",e.Bulb=\"bulb\",e.BuySell=\"buy-sell\",e.Cake=\"cake\",e.Calculator=\"calculator\",e.Calendar=\"calendar\",e.Call=\"call\",e.Camera=\"camera\",e.Campaign=\"campaign\",e.CardPos=\"card-pos\",e.Card=\"card\",e.Cash=\"cash\",e.Category=\"category\",e.Chart=\"chart\",e.CheckBold=\"check-bold\",e.Check=\"check\",e.CircleX=\"circle-x\",e.ClockFilled=\"clock-filled\",e.Clock=\"clock\",e.Close=\"close\",e.CloudDownload=\"cloud-download\",e.CloudUpload=\"cloud-upload\",e.Cloud=\"cloud\",e.CodeCircle=\"code-circle\",e.Code=\"code\",e.Coin=\"coin\",e.Collapse=\"collapse\",e.Confirmation=\"confirmation\",e.Connect=\"connect\",e.CopySuccess=\"copy-success\",e.Copy=\"copy\",e.CreditCheck=\"credit-check\",e.CurrencyFranc=\"currency-franc\",e.CurrencyLira=\"currency-lira\",e.CurrencyPound=\"currency-pound\",e.CurrencyYuan=\"currency-yuan\",e.Customize=\"customize\",e.Danger=\"danger\",e.DarkFilled=\"dark-filled\",e.Dark=\"dark\",e.Data=\"data\",e.Description=\"description\",e.Details=\"details\",e.Diagram=\"diagram\",e.DocumentCode=\"document-code\",e.Download=\"download\",e.Draft=\"draft\",e.EcoLeaf=\"eco-leaf\",e.EditSquare=\"edit-square\",e.Edit=\"edit\",e.EncryptedAdd=\"encrypted-add\",e.Eraser=\"eraser\",e.Error=\"error\",e.Ethereum=\"ethereum\",e.Exchange=\"exchange\",e.ExpandVertical=\"expand-vertical\",e.Expand=\"expand\",e.ExploreFilled=\"explore-filled\",e.Explore=\"explore\",e.Export=\"export\",e.Extension=\"extension\",e.EyeSlash=\"eye-slash\",e.Eye=\"eye\",e.FaceId=\"face-id\",e.Feedback=\"feedback\",e.File=\"file\",e.Filter=\"filter\",e.Fingerprint=\"fingerprint\",e.Fire=\"fire\",e.FirstPage=\"first-page\",e.Flag=\"flag\",e.FlashSlash=\"flash-slash\",e.Flash=\"flash\",e.Flask=\"flask\",e.Flower=\"flower\",e.Folder=\"folder\",e.Forest=\"forest\",e.FullCircle=\"full-circle\",e.Gas=\"gas\",e.Gift=\"gift\",e.GlobalSearch=\"global-search\",e.Global=\"global\",e.Graph=\"graph\",e.Hardware=\"hardware\",e.HashTag=\"hash-tag\",e.HeartFilled=\"heart-filled\",e.Heart=\"heart\",e.Hierarchy=\"hierarchy\",e.HomeFilled=\"home-filled\",e.Home=\"home\",e.Image=\"image\",e.Info=\"info\",e.Inventory=\"inventory\",e.Joystick=\"joystick\",e.KeepFilled=\"keep-filled\",e.Keep=\"keep\",e.Key=\"key\",e.LastPage=\"last-page\",e.LightFilled=\"light-filled\",e.Light=\"light\",e.Link=\"link\",e.Loading=\"loading\",e.Location=\"location\",e.LockSlash=\"lock-slash\",e.Lock=\"lock\",e.LockedFilled=\"locked-filled\",e.Login=\"login\",e.Logout=\"logout\",e.Mail=\"mail\",e.Map=\"map\",e.Menu=\"menu\",e.MessageQuestion=\"message-question\",e.Messages=\"messages\",e.Mic=\"mic\",e.MinusBold=\"minus-bold\",e.MinusSquare=\"minus-square\",e.Minus=\"minus\",e.Mobile=\"mobile\",e.MoneyBag=\"money-bag\",e.Money=\"money\",e.Monitor=\"monitor\",e.MoreHorizontal=\"more-horizontal\",e.MoreVertical=\"more-vertical\",e.MountainFlag=\"mountain-flag\",e.MusicNote=\"music-note\",e.Notification=\"notification\",e.PageInfo=\"page-info\",e.Palette=\"palette\",e.PasswordCheck=\"password-check\",e.Pending=\"pending\",e.People=\"people\",e.PersonCancel=\"person-cancel\",e.Pin=\"pin\",e.Plant=\"plant\",e.Plug=\"plug\",e.PlusAndMinus=\"plus-and-minus\",e.PolicyAlert=\"policy-alert\",e.Print=\"print\",e.PriorityHigh=\"priority-high\",e.PrivacyTip=\"privacy-tip\",e.ProgrammingArrows=\"programming-arrows\",e.Publish=\"publish\",e.QrCode=\"qr-code\",e.Question=\"question\",e.Receive=\"receive\",e.Received=\"received\",e.Refresh=\"refresh\",e.RemoveMinus=\"remove-minus\",e.Report=\"report\",e.Rocket=\"rocket\",e.SaveFilled=\"save-filled\",e.Save=\"save\",e.Saving=\"saving\",e.ScanBarcode=\"scan-barcode\",e.ScanFocus=\"scan-focus\",e.Scan=\"scan\",e.Search=\"search\",e.SecurityAlert=\"security-alert\",e.SecurityCross=\"security-cross\",e.SecurityKey=\"security-key\",e.SecuritySearch=\"security-search\",e.SecuritySlash=\"security-slash\",e.SecurityTick=\"security-tick\",e.SecurityTime=\"security-time\",e.SecurityUser=\"security-user\",e.Security=\"security\",e.Send=\"send\",e.SentimentDissatisfied=\"sentiment-dissatisfied\",e.SentimentNeutral=\"sentiment-neutral\",e.SentimentSatisfied=\"sentiment-satisfied\",e.SentimentVerySatisfied=\"sentiment-very-satisfied\",e.SettingFilled=\"setting-filled\",e.Setting=\"setting\",e.Share=\"share\",e.ShieldLock=\"shield-lock\",e.ShoppingBag=\"shopping-bag\",e.ShoppingCart=\"shopping-cart\",e.SignalCellular=\"signal-cellular\",e.Slash=\"slash\",e.Sms=\"sms\",e.SnapsMobile=\"snaps-mobile\",e.SnapsPlus=\"snaps-plus\",e.SnapsRound=\"snaps-round\",e.Snaps=\"snaps\",e.SortByAlpha=\"sort-by-alpha\",e.Sort=\"sort\",e.Sparkle=\"sparkle\",e.Speed=\"speed\",e.Speedometer=\"speedometer\",e.Square=\"square\",e.Stake=\"stake\",e.StarFilled=\"star-filled\",e.Star=\"star\",e.Start=\"start\",e.Storefront=\"storefront\",e.Student=\"student\",e.SwapHorizontal=\"swap-horizontal\",e.SwapVertical=\"swap-vertical\",e.TabClose=\"tab-close\",e.TableRow=\"table-row\",e.Tablet=\"tablet\",e.Tag=\"tag\",e.ThumbDownFilled=\"thumb-down-filled\",e.ThumbDown=\"thumb-down\",e.ThumbUpFilled=\"thumb-up-filled\",e.ThumbUp=\"thumb-up\",e.Tint=\"tint\",e.Tooltip=\"tooltip\",e.Translate=\"translate\",e.Trash=\"trash\",e.TrendDown=\"trend-down\",e.TrendUp=\"trend-up\",e.TriangleUp=\"triangle-up\",e.TriangleDown=\"triangle-down\",e.Undo=\"undo\",e.Unfold=\"unfold\",e.UnlockedFilled=\"unlocked-filled\",e.Unpin=\"unpin\",e.UploadFile=\"upload-file\",e.Upload=\"upload\",e.Usb=\"usb\",e.UserCheck=\"user-check\",e.UserCircleAdd=\"user-circle-add\",e.UserCircleRemove=\"user-circle-remove\",e.UserCircle=\"user-circle\",e.User=\"user\",e.VerifiedFilled=\"verified-filled\",e.Verified=\"verified\",e.Videocam=\"videocam\",e.ViewColumn=\"view-column\",e.ViewInAr=\"view-in-ar\",e.VolumeOff=\"volume-off\",e.VolumeUp=\"volume-up\",e.WalletFilled=\"wallet-filled\",e.Wallet=\"wallet\",e.Warning=\"warning\",e.WebTraffic=\"web-traffic\",e.Widgets=\"widgets\",e.WifiOff=\"wifi-off\",e.Wifi=\"wifi\",e.X=\"x\"}(nB||(nB={}));const oB=XC(\"Icon\"),sB=XC(\"Container\"),aB=XC(\"Heading\"),iB=XC(\"Address\"),cB=XC(\"Image\"),uB=XC(\"Footer\"),lB=XC(\"Button\");var dB=function(e){return e.Cancel=\"confirm-sign-transaction-cancel\",e.Confirm=\"confirm-sign-transaction-confirm\",e}({});function fB(e){return{\"confirm-sign-transaction-cancel\":async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!1)}(e,t),\"confirm-sign-transaction-confirm\":async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!0)}(e,t)}}var pB=function(e){return e.Completed=\"COMPLETED\",e.Skipped=\"SKIPPED\",e.Failed=\"FAILED\",e}({}),hB=function(e){return e.Benign=\"Benign\",e.Warning=\"Warning\",e.Malicious=\"Malicious\",e}({}),gB=function(e){return e.SUCCESS=\"SUCCESS\",e.ERROR=\"ERROR\",e}({});const yB='<svg width=\"16\" height=\"16\" viewBox=\"0 0 96 96\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"96\" height=\"96\" fill=\"#FF060A\"/><g clip-path=\"url(#clip0_7875_4963)\"><path d=\"M75.7883 36.0541C72.9706 33.4525 69.0729 29.4796 65.8984 26.662L65.7105 26.5305C65.398 26.2795 65.0456 26.0827 64.668 25.9482C57.0134 24.5206 21.3891 17.8616 20.6941 17.9461C20.4993 17.9734 20.3132 18.044 20.1493 18.1527L19.9709 18.2936C19.7512 18.5168 19.5843 18.7864 19.4825 19.0826L19.4355 19.2047V19.8715V19.9748C23.446 31.142 39.2811 67.7243 42.3993 76.3087C42.5871 76.891 42.944 77.9993 43.6109 78.0557H43.7611C44.118 78.0557 45.6396 76.0457 45.6396 76.0457C45.6396 76.0457 72.8391 43.0606 75.591 39.548C75.9472 39.1153 76.2617 38.6499 76.5302 38.1579C76.5988 37.7731 76.5665 37.377 76.4364 37.0083C76.3064 36.6396 76.0831 36.3109 75.7883 36.0541ZM52.6179 39.8955L64.2266 30.2686L71.0358 36.5425L52.6179 39.8955ZM48.1097 39.2662L28.1233 22.8864L60.4603 28.8504L48.1097 39.2662ZM49.913 43.5584L70.369 40.2618L46.9826 68.4381L49.913 43.5584ZM25.4089 24.5206L46.4379 42.3656L43.3948 68.4569L25.4089 24.5206Z\" fill=\"white\"/></g><defs><clipPath id=\"clip0_7875_4963\"><rect width=\"60.1096\" height=\"60.1096\" fill=\"white\" transform=\"translate(17.9453 17.9453)\"/></clipPath></defs></svg>';function mB(e){if(!e)return\"Unknown\";if(\"metamask\"===e.toLowerCase())return\"MetaMask\";try{return new URL(e).hostname}catch{return e}}const bB=JSON.parse('{\"D\":{\"confirmation.transaction.title\":{\"message\":\"Transaction request\"},\"confirmation.estimatedChanges.title\":{\"message\":\"Estimated changes\"},\"confirmation.estimatedChanges.tooltip\":{\"message\":\"Estimated changes are what might happen if you go through with this transaction. This is just a prediction, not a guarantee.\"},\"confirmation.estimatedChanges.send\":{\"message\":\"You send\"},\"confirmation.bandwidthConsumed\":{\"message\":\"Bandwidth consumed\"},\"confirmation.estimatedChanges.receive\":{\"message\":\"You receive\"},\"confirmation.origin\":{\"message\":\"Request from\"},\"confirmation.origin.tooltip\":{\"message\":\"This is the site asking for your confirmation.\"},\"confirmation.from\":{\"message\":\"From\"},\"confirmation.to\":{\"message\":\"To\"},\"confirmation.network\":{\"message\":\"Network\"},\"confirmation.transactionFee\":{\"message\":\"Network fee\"},\"confirmation.confirmButton\":{\"message\":\"Confirm\"},\"confirmation.cancelButton\":{\"message\":\"Cancel\"},\"confirmation.signMessage.title\":{\"message\":\"Sign message\"},\"confirmation.signMessage.message\":{\"message\":\"Message\"},\"confirmation.account\":{\"message\":\"Account\"},\"confirmation.signTransaction.title\":{\"message\":\"Sign transaction\"},\"confirmation.estimatedChanges.notAvailable\":{\"message\":\"Estimated changes are not available\"},\"confirmation.estimatedChanges.noChanges\":{\"message\":\"No estimated changes\"},\"confirmation.estimatedChanges.unsupportedContract\":{\"message\":\"Unsupported contract for simulation\"},\"confirmation.simulationTitleAPIError\":{\"message\":\"Because of an error, we couldn\\'t check for security alerts.\"},\"confirmation.simulationMessageAPIError\":{\"message\":\"Only continue if you trust every address involved.\"},\"confirmation.simulationErrorTitle\":{\"message\":\"This transaction was reverted during simulation.\"},\"confirmation.simulationErrorSubtitle\":{\"message\":\"{reason}\"},\"confirmation.validationErrorTitle\":{\"message\":\"This is a deceptive request\"},\"confirmation.validationErrorSubtitle\":{\"message\":\"If you approve this request, a third party known for scams will take all your assets.\"},\"confirmation.validationErrorLearnMore\":{\"message\":\"Learn more\"},\"confirmation.validationErrorSecurityAdviced\":{\"message\":\"Security advice by\"},\"transactionScan.errors.unknownError\":{\"message\":\"An unknown error occurred\"},\"transactionScan.errors.insufficientBalance\":{\"message\":\"Insufficient balance\"},\"transactionScan.errors.invalidTransaction\":{\"message\":\"Invalid transaction\"},\"transactionScan.errors.insufficientFunds\":{\"message\":\"Insufficient funds\"},\"transactionScan.errors.invalidAddress\":{\"message\":\"Invalid address\"},\"transactionScan.errors.unsupportedEIP712Message\":{\"message\":\"Unsupported method\"}}}'),wB=JSON.parse('{\"D\":{\"confirmation.transaction.title\":{\"message\":\"Solicitud de transacción\"},\"confirmation.estimatedChanges.title\":{\"message\":\"Cambios estimados\"},\"confirmation.estimatedChanges.tooltip\":{\"message\":\"Los cambios estimados son los que podrían producirse si sigue adelante con esta transacción. Esto es solo una predicción, no una garantía.\"},\"confirmation.estimatedChanges.send\":{\"message\":\"Usted envía\"},\"confirmation.bandwidthConsumed\":{\"message\":\"Ancho de banda consumido\"},\"confirmation.estimatedChanges.receive\":{\"message\":\"Usted recibe\"},\"confirmation.origin\":{\"message\":\"Solicitud de\"},\"confirmation.origin.tooltip\":{\"message\":\"Este es el sitio que solicita su confirmación.\"},\"confirmation.from\":{\"message\":\"De\"},\"confirmation.to\":{\"message\":\"A\"},\"confirmation.network\":{\"message\":\"Red\"},\"confirmation.transactionFee\":{\"message\":\"Tarifa de red\"},\"confirmation.confirmButton\":{\"message\":\"Confirmar\"},\"confirmation.cancelButton\":{\"message\":\"Cancelar\"},\"confirmation.signMessage.title\":{\"message\":\"Firmar mensaje\"},\"confirmation.signMessage.message\":{\"message\":\"Mensaje\"},\"confirmation.account\":{\"message\":\"Cuenta\"},\"confirmation.signTransaction.title\":{\"message\":\"Firmar transacción\"},\"confirmation.estimatedChanges.notAvailable\":{\"message\":\"Los cambios estimados no están disponibles\"},\"confirmation.estimatedChanges.noChanges\":{\"message\":\"Sin cambios estimados\"},\"confirmation.estimatedChanges.unsupportedContract\":{\"message\":\"Contrato no compatible con simulación\"},\"confirmation.simulationTitleAPIError\":{\"message\":\"Debido a un error, no pudimos verificar alertas de seguridad.\"},\"confirmation.simulationMessageAPIError\":{\"message\":\"Solo continúe si confía en cada dirección involucrada.\"},\"confirmation.simulationErrorTitle\":{\"message\":\"Esta transacción se revirtió durante la simulación.\"},\"confirmation.simulationErrorSubtitle\":{\"message\":\"{reason}\"},\"confirmation.validationErrorTitle\":{\"message\":\"Esta es una solicitud engañosa\"},\"confirmation.validationErrorSubtitle\":{\"message\":\"Si aprueba esta solicitud, un tercero conocido por estafas tomará todos sus activos.\"},\"confirmation.validationErrorLearnMore\":{\"message\":\"Más información\"},\"confirmation.validationErrorSecurityAdviced\":{\"message\":\"Asesoramiento de seguridad por\"},\"transactionScan.errors.unknownError\":{\"message\":\"Ocurrió un error desconocido\"},\"transactionScan.errors.insufficientBalance\":{\"message\":\"Saldo insuficiente\"},\"transactionScan.errors.invalidTransaction\":{\"message\":\"Transacción inválida\"},\"transactionScan.errors.insufficientFunds\":{\"message\":\"Fondos insuficientes\"},\"transactionScan.errors.invalidAddress\":{\"message\":\"Dirección inválida\"},\"transactionScan.errors.unsupportedEIP712Message\":{\"message\":\"Método no compatible\"}}}'),TB={en:bB.D,es:wB.D};function AB(e){const t=TB[e]??TB.en;return(e,r)=>{let n=t?.[e]?.message??e;return r&&n&&Object.keys(r).forEach(e=>{const t=new RegExp(`\\\\{${e}\\\\}`,\"gu\");n=n.replace(t,r[e]??\"\")}),n}}const vB=XC(\"Skeleton\");function PB(e){return e===JC.Loading||e===JC.Fetching}const EB=({preferences:e})=>{const t=AB(e.locale);return ZC(QC,{direction:\"vertical\",children:[ZC(eB,{direction:\"horizontal\",alignment:\"start\",children:[qC(tB,{fontWeight:\"medium\",children:t(\"confirmation.estimatedChanges.title\")}),qC(rB,{content:t(\"confirmation.estimatedChanges.tooltip\"),children:qC(oB,{name:\"info\"})})]}),ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[qC(vB,{width:60}),qC(vB,{width:100})]})]})},CB=({preferences:e})=>{const t=AB(e.locale);return ZC(eB,{direction:\"horizontal\",alignment:\"start\",children:[qC(tB,{fontWeight:\"medium\",children:t(\"confirmation.estimatedChanges.title\")}),qC(rB,{content:t(\"confirmation.estimatedChanges.tooltip\"),children:qC(oB,{name:\"info\"})})]})},BB=({asset:e})=>{const t=function(e){const t=new Mn(e);return t.isFinite()?t.toFormat({groupSize:3,groupSeparator:\",\",decimalSeparator:\".\"}):\"0\"}(e.value),r=\"out\"===e.type;return ZC(eB,{direction:\"horizontal\",alignment:\"end\",children:[e.logo?qC(eB,{alignment:\"center\",center:!0,children:qC(cB,{src:e.logo,borderRadius:\"full\",height:16,width:16})}):null,ZC(tB,{color:r?\"error\":\"success\",children:[r?\"-\":\"+\",t,\" \",e.symbol]})]})},WB=({changes:e,preferences:t,scanFetchStatus:r})=>{const n=AB(t.locale),o=PB(r),s=r===JC.Fetched,a=r===JC.Error;if(o)return qC(EB,{preferences:t});if(a)return ZC(QC,{direction:\"vertical\",children:[qC(CB,{preferences:t}),qC(tB,{color:\"alternative\",children:n(\"confirmation.estimatedChanges.notAvailable\")})]});const i=e?.assets.filter(e=>\"out\"===e.type)??[],c=e?.assets.filter(e=>\"in\"===e.type)??[],u=i.length>0||c.length>0;return ZC(QC,s&&!u?{direction:\"vertical\",children:[qC(CB,{preferences:t}),qC(tB,{color:\"alternative\",children:n(\"confirmation.estimatedChanges.noChanges\")})]}:{children:[qC(CB,{preferences:t}),i?.length>0?ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:n(\"confirmation.estimatedChanges.send\")}),qC(eB,{children:i?.map(e=>qC(BB,{asset:e}))})]}):null,c?.length>0?ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:n(\"confirmation.estimatedChanges.receive\")}),qC(eB,{children:c?.map(e=>qC(BB,{asset:e}))})]}):null]})};const SB=e=>{const{caipId:t,symbol:r,amount:n,iconUrl:o,price:s,preferences:a,priceLoading:i}=e,c=a&&s?function(e,t,r){const n=new Mn(e).toNumber(),[o]=r.split(\"_\");return n.toLocaleString(o,{style:\"currency\",currency:t,maximumFractionDigits:2,minimumFractionDigits:2})}((u=s,new Mn(n).multipliedBy(u).toString()),a.currency,a.locale):\"\";var u;const l=void 0!==a,d=l&&i,f=l&&!i&&c,p=t===$n.BandwidthMainnet||t===$n.BandwidthNile||t===$n.BandwidthShasta,h=t===$n.EnergyMainnet||t===$n.EnergyNile||t===$n.EnergyShasta,g=!p&&!h,y=o??'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\" width=\"16\" height=\"16\">\\n  <path fill=\"#999999\" d=\"M42.75 24c0 10.59375-8.53125 19.21875-19.125 19.21875-10.6875 0-19.21875-8.625-19.21875-19.21875 0-10.59375 8.53125-19.21875 19.21875-19.21875 10.59375 0 19.125 8.625 19.125 19.21875zM23.625 14.0625c-3.09375 0-5.90625 2.25-5.90625 5.4375 0 0.84375 0.75 1.59375 1.59375 1.59375 0.84375 0 1.59375-0.75 1.59375-1.59375 0-1.125 1.03125-2.25 2.71875-2.25 1.59375 0 2.625 1.125 2.625 2.25 0 0.5625-0.375 1.03125-1.3125 1.59375l0 0c-1.125 0.75-3 1.96875-3 4.5l0 0.46875c0 0.84375 0.75 1.59375 1.6875 1.59375 0.84375 0 1.59375-0.75 1.59375-1.59375l0-0.46875c0-0.65625 0.28125-1.125 1.40625-1.78125 1.03125-0.65625 2.8125-1.875 2.8125-4.3125 0-3.1875-2.8125-5.4375-5.8125-5.4375zM23.53125 31.875c-0.84375 0-1.59375 0.65625-1.59375 1.59375 0 0.84375 0.75 1.59375 1.59375 1.59375l0.09375 0c0.84375 0 1.59375-0.75 1.59375-1.59375 0-0.9375-0.75-1.59375-1.59375-1.59375z\"/>\\n</svg>';return ZC(eB,{direction:\"horizontal\",alignment:\"center\",children:[d?qC(vB,{width:80}):null,f?qC(tB,{color:\"muted\",children:c}):null,ZC(eB,{alignment:\"center\",center:!0,children:[p?qC(oB,{name:\"connect\",size:\"md\"}):null,h?qC(oB,{name:\"flash\",size:\"md\"}):null,g?qC(cB,{borderRadius:\"full\",src:y,height:16,width:16}):null]}),qC(tB,{children:`${n} ${r}`})]})},IB=({fees:e,preferences:t,tokenPrices:r={},tokenPricesFetchStatus:n=JC.Initial})=>{const o=AB(t.locale),s=PB(n),a=[...e].sort((e,t)=>{const r=\"TRX\"===e.asset.unit,n=\"TRX\"===t.asset.unit;return r&&!n?-1:!r&&n?1:0});return qC(eB,{children:a.map((e,n)=>{const a=r[e.asset.type]?.price??null;return ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[0===n?qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:o(\"confirmation.transactionFee\")}):qC(eB,{children:null}),qC(SB,{caipId:e.asset.type,amount:e.asset.amount,symbol:e.asset.unit,iconUrl:e.asset.iconUrl,price:a,preferences:t,priceLoading:s})]},`${e.asset.type}-${e.asset.unit}-${n}`)})})},_B=XC(\"Banner\"),RB=XC(\"Link\"),xB={GENERAL_INSUFFICIENT_FUNDS:\"transactionScan.errors.insufficientFunds\",GENERAL_INVALID_ADDRESS:\"transactionScan.errors.invalidAddress\",UNSUPPORTED_EIP712_MESSAGE:\"transactionScan.errors.unsupportedEIP712Message\"};function OB(e,t){const r=AB(t.locale),{code:n,type:o,message:s}=e,a=(n&&xB[n])??\"transactionScan.errors.unknownError\";if(s&&\"transactionScan.errors.unknownError\"===a)return s;try{return r(a)}catch{return o??n??\"Unknown error\"}}const MB={Malicious:\"danger\",Warning:\"warning\"},FB=({preferences:e,validation:t,error:r,scanFetchStatus:n})=>{const o=AB(e.locale);if(PB(n))return qC(eB,{children:qC(vB,{height:\"40px\"})});if(n===JC.Error)return qC(_B,{title:o(\"confirmation.simulationTitleAPIError\"),severity:\"danger\",children:qC(tB,{children:o(\"confirmation.simulationMessageAPIError\")})});if(!r&&!t)return qC(eB,{children:null});if(r)return qC(_B,{title:o(\"confirmation.simulationErrorTitle\"),severity:\"warning\",children:qC(tB,{children:o(\"confirmation.simulationErrorSubtitle\",{reason:OB(r,e)})})});if(!t)return qC(eB,{children:null});const s=t?.type?MB[t.type]:void 0;return s?ZC(_B,{title:o(\"confirmation.validationErrorTitle\"),severity:s,children:[qC(tB,{children:o(\"confirmation.validationErrorSubtitle\")}),qC(tB,{size:\"sm\",children:qC(RB,{href:\"https://support.metamask.io/configure/wallet/how-to-turn-on-security-alerts/\",children:o(\"confirmation.validationErrorLearnMore\")})}),ZC(tB,{size:\"sm\",children:[qC(oB,{color:\"primary\",name:\"security-tick\"}),\" \",o(\"confirmation.validationErrorSecurityAdviced\"),\" \",qC(RB,{href:\"https://www.blockaid.io\",children:\"Blockaid\"})]})]}):qC(eB,{children:null})},kB=({context:e})=>{const t=AB(e.preferences.locale),{account:r,scope:n,origin:o,networkImage:s,preferences:a,scan:i,scanFetchStatus:c,fees:u,tokenPrices:l,tokenPricesFetchStatus:d}=e,f=c===JC.Loading||i?.simulationStatus===pB.Failed,p=r?`${n}:${r.address}`:null;let h=null;return a.simulateOnChainActions&&(h=i?.simulationStatus===pB.Skipped?ZC(QC,{direction:\"vertical\",children:[ZC(eB,{direction:\"horizontal\",alignment:\"start\",children:[qC(tB,{fontWeight:\"medium\",children:t(\"confirmation.estimatedChanges.title\")}),qC(rB,{content:t(\"confirmation.estimatedChanges.tooltip\"),children:qC(oB,{name:\"info\"})})]}),qC(tB,{color:\"alternative\",children:t(\"confirmation.estimatedChanges.unsupportedContract\")})]}):qC(WB,{scanFetchStatus:c,changes:i?.estimatedChanges??null,preferences:a})),ZC(sB,{children:[ZC(eB,{children:[a.useSecurityAlerts?qC(FB,{scanFetchStatus:c,validation:i?.validation??null,error:i?.error??null,preferences:a}):null,ZC(eB,{alignment:\"center\",center:!0,children:[qC(eB,{children:null}),qC(aB,{size:\"lg\",children:t(\"confirmation.signTransaction.title\")}),qC(eB,{children:null})]}),h,ZC(QC,{children:[o?ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[ZC(eB,{direction:\"horizontal\",alignment:\"start\",children:[qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:t(\"confirmation.origin\")}),qC(rB,{content:t(\"confirmation.origin.tooltip\"),children:qC(oB,{name:\"question\",color:\"muted\"})})]}),qC(tB,{children:mB(o)})]}):null,ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:t(\"confirmation.account\")}),p?qC(iB,{address:p,truncate:!0,displayName:!0,avatar:!0}):null]}),ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:t(\"confirmation.network\")}),ZC(eB,{direction:\"horizontal\",alignment:\"end\",children:[qC(cB,{borderRadius:\"medium\",src:s??yB,height:16,width:16}),qC(tB,{children:Qn[n].name})]})]}),qC(eB,{children:null}),qC(IB,{fees:u,preferences:a,tokenPrices:l,tokenPricesFetchStatus:d})]})]}),ZC(uB,{children:[qC(lB,{name:dB.Cancel,children:t(\"confirmation.cancelButton\")}),qC(lB,{name:dB.Confirm,disabled:f,children:t(\"confirmation.confirmButton\")})]})]})},NB=\"confirmSignTransaction\";var UB=function(e){return e.Cancel=\"confirm-sign-and-send-transaction-cancel\",e.Confirm=\"confirm-sign-and-send-transaction-confirm\",e}({});function DB(e){return{\"confirm-sign-and-send-transaction-cancel\":async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!1)}(e,t),\"confirm-sign-and-send-transaction-confirm\":async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!0)}(e,t)}}function LB(e,t,r){return jA({baseUrl:{[Ln.Mainnet]:\"https://tronscan.org\",[Ln.Nile]:\"https://nile.tronscan.org\",[Ln.Shasta]:\"https://shasta.tronscan.org\"}[e],path:`/#/${t}/${r}`})}const $B=({context:{origin:e,scope:t,fromAddress:r,toAddress:n,fees:o,preferences:s,networkImage:a,tokenPrices:i,tokenPricesFetchStatus:c,scan:u,scanFetchStatus:l}})=>{const d=AB(s.locale),f=l===JC.Loading||u?.simulationStatus===pB.Failed;let p=null;return s.simulateOnChainActions&&(p=u?.simulationStatus===pB.Skipped?ZC(QC,{direction:\"vertical\",children:[ZC(eB,{direction:\"horizontal\",alignment:\"start\",children:[qC(tB,{fontWeight:\"medium\",children:d(\"confirmation.estimatedChanges.title\")}),qC(rB,{content:d(\"confirmation.estimatedChanges.tooltip\"),children:qC(oB,{name:\"info\"})})]}),qC(tB,{color:\"alternative\",children:d(\"confirmation.estimatedChanges.unsupportedContract\")})]}):qC(WB,{scanFetchStatus:l,changes:u?.estimatedChanges??null,preferences:s})),ZC(sB,{children:[ZC(eB,{children:[s.useSecurityAlerts?qC(FB,{scanFetchStatus:l,validation:u?.validation??null,error:u?.error??null,preferences:s}):null,ZC(eB,{alignment:\"center\",center:!0,children:[qC(eB,{children:null}),qC(aB,{size:\"lg\",children:d(\"confirmation.transaction.title\")}),qC(eB,{children:null})]}),p,ZC(QC,{children:[ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",center:!0,children:[qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:d(\"confirmation.origin\")}),qC(rB,{content:d(\"confirmation.origin.tooltip\"),children:qC(oB,{name:\"question\",color:\"muted\"})})]}),qC(tB,{children:e})]}),qC(eB,{children:null}),ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:d(\"confirmation.from\")}),qC(RB,{href:LB(t,\"address\",r??\"\"),children:qC(iB,{address:`${t}:${r}`,truncate:!0,displayName:!0,avatar:!0})})]}),qC(eB,{children:null}),n&&ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:d(\"confirmation.to\")}),qC(RB,{href:LB(t,\"address\",n??\"\"),children:qC(iB,{address:`${t}:${n}`,truncate:!0,displayName:!0,avatar:!0})})]}),qC(eB,{children:null}),ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:d(\"confirmation.network\")}),ZC(eB,{direction:\"horizontal\",alignment:\"center\",children:[qC(eB,{alignment:\"center\",center:!0,children:qC(cB,{borderRadius:\"medium\",src:a??yB,height:16,width:16})}),qC(tB,{children:Qn[t].name})]})]}),qC(eB,{children:null}),qC(IB,{fees:o,preferences:s,tokenPrices:i,tokenPricesFetchStatus:c})]})]}),ZC(uB,{children:[qC(lB,{name:UB.Cancel,children:d(\"confirmation.cancelButton\")}),qC(lB,{name:UB.Confirm,disabled:f,children:d(\"confirmation.confirmButton\")})]})]})},zB=\"confirmTransaction\";!function(e){e.ContinuouslySynchronizeSelectedAccounts=\"onSynchronizeSelectedAccountsCronjob\"}({});var jB=function(e){return e.SynchronizeSelectedAccounts=\"onSynchronizeSelectedAccounts\",e.SynchronizeAccounts=\"onSynchronizeAccounts\",e.SynchronizeAccount=\"onSynchronizeAccount\",e.SynchronizeAccountTransactions=\"onSynchronizeAccountTransactions\",e.RefreshConfirmationPrices=\"refreshConfirmationPrices\",e.RefreshConfirmationSend=\"refreshConfirmationSend\",e.RefreshSignTransaction=\"refreshSignTransaction\",e.TrackTransaction=\"onTrackTransaction\",e}({});var VB,GB=r(1048).hp;class HB extends Error{constructor(e){super(`Method not supported: ${e}`)}}async function KB(e,t){try{return await async function(e,t){switch(O(t,Ut),t.method){case`${Kr.ListAccounts}`:return O(t,Zr),e.listAccounts();case`${Kr.GetAccount}`:return O(t,Jr),e.getAccount(t.params.id);case`${Kr.CreateAccount}`:return O(t,Yr),e.createAccount(t.params.options);case`${Kr.DiscoverAccounts}`:if(void 0===e.discoverAccounts)throw new HB(t.method);return O(t,Qr),e.discoverAccounts(t.params.scopes,t.params.entropySource,t.params.groupIndex);case`${Kr.ListAccountTransactions}`:if(void 0===e.listAccountTransactions)throw new HB(t.method);return O(t,en),e.listAccountTransactions(t.params.id,t.params.pagination);case`${Kr.ListAccountAssets}`:if(void 0===e.listAccountAssets)throw new HB(t.method);return O(t,tn),e.listAccountAssets(t.params.id);case`${Kr.GetAccountBalances}`:if(void 0===e.getAccountBalances)throw new HB(t.method);return O(t,nn),e.getAccountBalances(t.params.id,t.params.assets);case`${Kr.ResolveAccountAddress}`:if(void 0===e.resolveAccountAddress)throw new HB(t.method);return O(t,on),e.resolveAccountAddress(t.params.scope,t.params.request);case`${Kr.SetSelectedAccounts}`:if(void 0===e.setSelectedAccounts)throw new HB(t.method);return O(t,Xr),e.setSelectedAccounts(t.params.accounts);case`${Kr.FilterAccountChains}`:return O(t,sn),e.filterAccountChains(t.params.id,t.params.chains);case`${Kr.UpdateAccount}`:return O(t,an),e.updateAccount(t.params.account);case`${Kr.DeleteAccount}`:return O(t,cn),e.deleteAccount(t.params.id);case`${Kr.ExportAccount}`:if(void 0===e.exportAccount)throw new HB(t.method);return O(t,un),e.exportAccount(t.params.id);case`${Kr.ListRequests}`:if(void 0===e.listRequests)throw new HB(t.method);return O(t,ln),e.listRequests();case`${Kr.GetRequest}`:if(void 0===e.getRequest)throw new HB(t.method);return O(t,dn),e.getRequest(t.params.id);case`${Kr.SubmitRequest}`:return O(t,fn),e.submitRequest(t.params);case`${Kr.ApproveRequest}`:if(void 0===e.approveRequest)throw new HB(t.method);return O(t,pn),e.approveRequest(t.params.id,t.params.data);case`${Kr.RejectRequest}`:if(void 0===e.rejectRequest)throw new HB(t.method);return O(t,hn),e.rejectRequest(t.params.id);default:throw new HB(t.method)}}(e,t)}catch(e){const t=e instanceof Error&&\"string\"==typeof e.message?e.message:\"An unknown error occurred while handling the keyring request\";throw new Error(t)}}!function(e){e.GetSelectedAccounts=\"getSelectedAccounts\"}(VB||(VB={}));K({method:j(VB.GetSelectedAccounts)});const qB=D(Y());async function ZB(e,t,r){await e.request({method:\"snap_manageAccounts\",params:{method:t,params:{...r}}})}async function JB(e){const t=await e.request({method:\"snap_manageAccounts\",params:{method:VB.GetSelectedAccounts}});return O(t,qB),t}function YB(e){const{id:t,address:r,type:n,options:o,methods:s,scopes:a}=e;return{id:t,address:r,type:n,options:o,methods:s,scopes:a}}function XB(e){return[MP,zP,XP,jP,zP,VP,GP,HP,KP,qP,ZP,JP,YP,NP,UP,DP,LP,$P].some(t=>e instanceof t)}const QB=async e=>{try{return await e()}catch(e){const t=XB(e)?e:new MP(e);throw Ne.error({error:t},`[SnapError] ${JSON.stringify(t.toJSON(),null,2)}`),t}};(function(e){e.OnStart=\"onStart\",e.OnInstall=\"onInstall\",e.OnUpdate=\"onUpdate\"})({}),function(e){e.ComputeFee=\"computeFee\"}({});const eW=[\"https://portfolio.metamask.io\"],tW=new Set([]),rW=new Set([Kr.ListAccounts,Kr.GetAccount,Kr.CreateAccount,Kr.DeleteAccount,Kr.DiscoverAccounts,Kr.GetAccountBalances,Kr.SubmitRequest,Kr.ListAccountTransactions,Kr.ListAccountAssets,Kr.ResolveAccountAddress,Kr.SetSelectedAccounts]),nW=new Map([]);for(const e of eW)nW.set(e,tW);nW.set(\"metamask\",rW);const oW=(e,t)=>{if(!e)throw new JP(\"Origin not found\");if(!nW.get(e)?.has(t))throw new JP(\"Permission denied\")};function sW(e,t){try{O(e,t)}catch(e){throw new DP(e.message)}}function aW(e,t){try{O(e,t)}catch{throw new MP(\"Invalid Response\")}}var iW=function(e){return e.Cancel=\"confirm-sign-message-cancel\",e.Confirm=\"confirm-sign-message-confirm\",e}({});function cW(e){return{\"confirm-sign-message-cancel\":async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!1)}(e,t),\"confirm-sign-message-confirm\":async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!0)}(e,t)}}function uW(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function lW(e,...t){if(!(e instanceof Uint8Array))throw new Error(\"Expected Uint8Array\");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function dW(e){if(\"function\"!=typeof e||\"function\"!=typeof e.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");uW(e.outputLen),uW(e.blockLen)}function fW(e,t=!0){if(e.destroyed)throw new Error(\"Hash instance has been destroyed\");if(t&&e.finished)throw new Error(\"Hash#digest() has already been called\")}function pW(e,t){lW(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const hW=BigInt(2**32-1),gW=BigInt(32);function yW(e,t=!1){return t?{h:Number(e&hW),l:Number(e>>gW&hW)}:{h:0|Number(e>>gW&hW),l:0|Number(e&hW)}}function mW(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=yW(e[o],t);[r[o],n[o]]=[s,a]}return[r,n]}const bW=(e,t,r)=>e<<r|t>>>32-r,wW=(e,t,r)=>t<<r|e>>>32-r,TW=(e,t,r)=>t<<r-32|e>>>64-r,AW=(e,t,r)=>e<<r-32|t>>>64-r;const vW=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0,PW=e=>e instanceof Uint8Array,EW=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),CW=(e,t)=>e<<32-t|e>>>t;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error(\"Non little-endian hardware is not supported\");Array.from({length:256},(e,t)=>t.toString(16).padStart(2,\"0\"));function BW(e){if(\"string\"==typeof e&&(e=function(e){if(\"string\"!=typeof e)throw new Error(\"utf8ToBytes expected string, got \"+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!PW(e))throw new Error(\"expected Uint8Array, got \"+typeof e);return e}class WW{clone(){return this._cloneInto()}}function SW(e){const t=t=>e().update(BW(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function IW(e=32){if(vW&&\"function\"==typeof vW.getRandomValues)return vW.getRandomValues(new Uint8Array(e));throw new Error(\"crypto.getRandomValues must be defined\")}const[_W,RW,xW]=[[],[],[]],OW=BigInt(0),MW=BigInt(1),FW=BigInt(2),kW=BigInt(7),NW=BigInt(256),UW=BigInt(113);for(let e=0,t=MW,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],_W.push(2*(5*n+r)),RW.push((e+1)*(e+2)/2%64);let o=OW;for(let e=0;e<7;e++)t=(t<<MW^(t>>kW)*UW)%NW,t&FW&&(o^=MW<<(MW<<BigInt(e))-MW);xW.push(o)}const[DW,LW]=mW(xW,!0),$W=(e,t,r)=>r>32?TW(e,t,r):bW(e,t,r),zW=(e,t,r)=>r>32?AW(e,t,r):wW(e,t,r);class jW extends WW{constructor(e,t,r,n=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,uW(r),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}keccak(){!function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,s=r[o],a=r[o+1],i=$W(s,a,1)^r[n],c=zW(s,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=i,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=RW[r],s=$W(t,o,n),a=zW(t,o,n),i=_W[r];t=e[i],o=e[i+1],e[i]=s,e[i+1]=a}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=DW[n],e[1]^=LW[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){fW(this);const{blockLen:t,state:r}=this,n=(e=BW(e)).length;for(let o=0;o<n;){const s=Math.min(t-this.pos,n-o);for(let t=0;t<s;t++)r[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){fW(this,!1),lW(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(e)}xof(e){return uW(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(pW(e,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:s}=this;return e||(e=new jW(t,r,n,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}const VW=(e,t,r)=>SW(()=>new jW(t,e,r)),GW=VW(1,136,32);function HW(e,t,r){const n=t.split(\"|\").map(e=>e.trim());for(let r=0;r<n.length;r++)switch(t){case\"any\":return;case\"bigint\":case\"boolean\":case\"number\":case\"string\":if(typeof e===t)return}const o=new Error(`invalid value for type ${t}`);throw o.code=\"INVALID_ARGUMENT\",o.argument=`value.${r}`,o.value=e,o}function KW(e,t,r){for(let n in t){let o=t[n];const s=r?r[n]:null;s&&HW(o,s,n),Object.defineProperty(e,n,{enumerable:!0,value:o,writable:!1})}}function qW(e,t){if(null==e)return\"null\";if(null==t&&(t=new Set),\"object\"==typeof e){if(t.has(e))return\"[Circular]\";t.add(e)}if(Array.isArray(e))return\"[ \"+e.map(e=>qW(e,t)).join(\", \")+\" ]\";if(e instanceof Uint8Array){const t=\"0123456789abcdef\";let r=\"0x\";for(let n=0;n<e.length;n++)r+=t[e[n]>>4],r+=t[15&e[n]];return r}if(\"object\"==typeof e&&\"function\"==typeof e.toJSON)return qW(e.toJSON(),t);switch(typeof e){case\"boolean\":case\"number\":case\"symbol\":return e.toString();case\"bigint\":return BigInt(e).toString();case\"string\":return JSON.stringify(e);case\"object\":{const r=Object.keys(e);return r.sort(),\"{ \"+r.map(r=>`${qW(r,t)}: ${qW(e[r],t)}`).join(\", \")+\" }\"}}return\"[ COULD NOT SERIALIZE ]\"}function ZW(e,t,r,n){if(!e)throw function(e,t,r){let n,o=e;{const n=[];if(r){if(\"message\"in r||\"code\"in r||\"name\"in r)throw new Error(`value will overwrite populated values: ${qW(r)}`);for(const e in r){if(\"shortMessage\"===e)continue;const t=r[e];n.push(e+\"=\"+qW(t))}}n.push(`code=${t}`),n.push(\"version=6.16.0\"),n.length&&(e+=\" (\"+n.join(\", \")+\")\")}switch(t){case\"INVALID_ARGUMENT\":n=new TypeError(e);break;case\"NUMERIC_FAULT\":case\"BUFFER_OVERRUN\":n=new RangeError(e);break;default:n=new Error(e)}return KW(n,{code:t}),r&&Object.assign(n,r),null==n.shortMessage&&KW(n,{shortMessage:o}),n}(t,r,n)}function JW(e,t,r,n){ZW(e,t,\"INVALID_ARGUMENT\",{argument:r,value:n})}[\"NFD\",\"NFC\",\"NFKD\",\"NFKC\"].reduce((e,t)=>{try{if(\"test\"!==\"test\".normalize(t))throw new Error(\"bad\");if(\"NFD\"===t){const e=String.fromCharCode(233).normalize(\"NFD\");if(e!==String.fromCharCode(101,769))throw new Error(\"broken\")}e.push(t)}catch(e){}return e},[]);function YW(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if(\"string\"==typeof e&&e.length%2==0&&e.match(/^0x[0-9a-f]*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n<t.length;n++)t[n]=parseInt(e.substring(r,r+2),16),r+=2;return t}JW(!1,\"invalid BytesLike value\",t||\"value\",e)}function XW(e,t){return YW(e,t,!1)}function QW(e,t){return YW(e,t,!0)}function eS(e,t){return!(\"string\"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&((\"number\"!=typeof t||e.length===2+2*t)&&(!0!==t||e.length%2==0))}const tS=\"0123456789abcdef\";function rS(e){const t=XW(e);let r=\"0x\";for(let e=0;e<t.length;e++){const n=t[e];r+=tS[(240&n)>>4]+tS[15&n]}return r}function nS(e){return\"0x\"+e.map(e=>rS(e).substring(2)).join(\"\")}function oS(e){return eS(e,!0)?(e.length-2)/2:XW(e).length}function sS(e,t,r){const n=XW(e);ZW(t>=n.length,\"padding exceeds data length\",\"BUFFER_OVERRUN\",{buffer:new Uint8Array(n),length:t,offset:t+1});const o=new Uint8Array(t);return o.fill(0),r?o.set(n,t-n.length):o.set(n,0),rS(o)}let aS=!1;const iS=function(e){return GW(e)};let cS=iS;function uS(e){const t=XW(e,\"data\");return rS(cS(t))}uS._=iS,uS.lock=function(){aS=!0},uS.register=function(e){if(aS)throw new TypeError(\"keccak256 is locked\");cS=e},Object.freeze(uS);const lS=BigInt(0),dS=BigInt(36);function fS(e){const t=(e=e.toLowerCase()).substring(2).split(\"\"),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=XW(uS(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return\"0x\"+t.join(\"\")}const pS={};for(let e=0;e<10;e++)pS[String(e)]=String(e);for(let e=0;e<26;e++)pS[String.fromCharCode(65+e)]=String(10+e);function hS(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+\"00\").split(\"\").map(e=>pS[e]).join(\"\");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r=\"0\"+r;return r}const gS=function(){const e={};for(let t=0;t<36;t++){e[\"0123456789abcdefghijklmnopqrstuvwxyz\"[t]]=BigInt(t)}return e}();function yS(e){if(JW(\"string\"==typeof e,\"invalid address\",\"address\",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith(\"0x\")||(e=\"0x\"+e);const t=fS(e);return JW(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,\"bad address checksum\",\"address\",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){JW(e.substring(2,4)===hS(e),\"bad icap checksum\",\"address\",e);let t=function(e){e=e.toLowerCase();let t=lS;for(let r=0;r<e.length;r++)t=t*dS+gS[e[r]];return t}(e.substring(4)).toString(16);for(;t.length<40;)t=\"0\"+t;return fS(\"0x\"+t)}JW(!1,\"invalid address\",\"address\",e)}class mS extends WW{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=EW(this.buffer)}update(e){fW(this);const{view:t,buffer:r,blockLen:n}=this,o=(e=BW(e)).length;for(let s=0;s<o;){const a=Math.min(n-this.pos,o-s);if(a===n){const t=EW(e);for(;n<=o-s;s+=n)this.process(t,s);continue}r.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){fW(this),pW(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e<n;e++)t[e]=0;!function(e,t,r,n){if(\"function\"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),a=Number(r>>o&s),i=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,i,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const a=EW(e),i=this.outputLen;if(i%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=i/4,u=this.get();if(c>u.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let e=0;e<c;e++)a.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:a}=this;return e.length=n,e.pos=a,e.finished=o,e.destroyed=s,n%t&&e.buffer.set(r),e}}const bS=(e,t,r)=>e&t^~e&r,wS=(e,t,r)=>e&t^e&r^t&r,TS=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),AS=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),vS=new Uint32Array(64);class PS extends mS{constructor(){super(64,32,8,!1),this.A=0|AS[0],this.B=0|AS[1],this.C=0|AS[2],this.D=0|AS[3],this.E=0|AS[4],this.F=0|AS[5],this.G=0|AS[6],this.H=0|AS[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:a,H:i}=this;return[e,t,r,n,o,s,a,i]}set(e,t,r,n,o,s,a,i){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|a,this.H=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)vS[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=vS[e-15],r=vS[e-2],n=CW(t,7)^CW(t,18)^t>>>3,o=CW(r,17)^CW(r,19)^r>>>10;vS[e]=o+vS[e-7]+n+vS[e-16]|0}let{A:r,B:n,C:o,D:s,E:a,F:i,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(CW(a,6)^CW(a,11)^CW(a,25))+bS(a,i,c)+TS[e]+vS[e]|0,l=(CW(r,2)^CW(r,13)^CW(r,22))+wS(r,n,o)|0;u=c,c=i,i=a,a=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,i=i+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,s,a,i,c,u)}roundClean(){vS.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const ES=SW(()=>new PS),CS=(BigInt(0),BigInt(1)),BS=BigInt(2),WS=e=>e instanceof Uint8Array,SS=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,\"0\"));function IS(e){if(!WS(e))throw new Error(\"Uint8Array expected\");let t=\"\";for(let r=0;r<e.length;r++)t+=SS[e[r]];return t}function _S(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);return BigInt(\"\"===e?\"0\":`0x${e}`)}function RS(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);const t=e.length;if(t%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,o=e.slice(n,n+2),s=Number.parseInt(o,16);if(Number.isNaN(s)||s<0)throw new Error(\"Invalid byte sequence\");r[t]=s}return r}function xS(e){return _S(IS(e))}function OS(e){if(!WS(e))throw new Error(\"Uint8Array expected\");return _S(IS(Uint8Array.from(e).reverse()))}function MS(e,t){return RS(e.toString(16).padStart(2*t,\"0\"))}function FS(e,t){return MS(e,t).reverse()}function kS(e,t,r){let n;if(\"string\"==typeof t)try{n=RS(t)}catch(r){throw new Error(`${e} must be valid hex string, got \"${t}\". Cause: ${r}`)}else{if(!WS(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const o=n.length;if(\"number\"==typeof r&&o!==r)throw new Error(`${e} expected ${r} bytes, got ${o}`);return n}function NS(...e){const t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));let r=0;return e.forEach(e=>{if(!WS(e))throw new Error(\"Uint8Array expected\");t.set(e,r),r+=e.length}),t}const US=e=>(BS<<BigInt(e-1))-CS,DS=e=>new Uint8Array(e),LS=e=>Uint8Array.from(e);function $S(e,t,r){if(\"number\"!=typeof e||e<2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof t||t<2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof r)throw new Error(\"hmacFn must be a function\");let n=DS(e),o=DS(e),s=0;const a=()=>{n.fill(1),o.fill(0),s=0},i=(...e)=>r(o,n,...e),c=(e=DS())=>{o=i(LS([0]),e),n=i(),0!==e.length&&(o=i(LS([1]),e),n=i())},u=()=>{if(s++>=1e3)throw new Error(\"drbg: tried 1000 values\");let e=0;const r=[];for(;e<t;){n=i();const t=n.slice();r.push(t),e+=n.length}return NS(...r)};return(e,t)=>{let r;for(a(),c(e);!(r=t(u()));)c();return a(),r}}const zS={bigint:e=>\"bigint\"==typeof e,function:e=>\"function\"==typeof e,boolean:e=>\"boolean\"==typeof e,string:e=>\"string\"==typeof e,stringOrUint8Array:e=>\"string\"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>\"function\"==typeof e&&Number.isSafeInteger(e.outputLen)};function jS(e,t,r={}){const n=(t,r,n)=>{const o=zS[r];if(\"function\"!=typeof o)throw new Error(`Invalid validator \"${r}\", expected function`);const s=e[t];if(!(n&&void 0===s||o(s,e)))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}const VS=BigInt(0),GS=BigInt(1),HS=BigInt(2),KS=BigInt(3),qS=BigInt(4),ZS=BigInt(5),JS=BigInt(8);BigInt(9),BigInt(16);function YS(e,t){const r=e%t;return r>=VS?r:t+r}function XS(e,t,r){if(r<=VS||t<VS)throw new Error(\"Expected power/modulo > 0\");if(r===GS)return VS;let n=GS;for(;t>VS;)t&GS&&(n=n*e%r),e=e*e%r,t>>=GS;return n}function QS(e,t,r){let n=e;for(;t-- >VS;)n*=n,n%=r;return n}function eI(e,t){if(e===VS||t<=VS)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=YS(e,t),n=t,o=VS,s=GS,a=GS,i=VS;for(;r!==VS;){const e=n/r,t=n%r,c=o-a*e,u=s-i*e;n=r,r=t,o=a,s=i,a=c,i=u}if(n!==GS)throw new Error(\"invert: does not exist\");return YS(o,t)}function tI(e){if(e%qS===KS){const t=(e+GS)/qS;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}if(e%JS===ZS){const t=(e-ZS)/JS;return function(e,r){const n=e.mul(r,HS),o=e.pow(n,t),s=e.mul(r,o),a=e.mul(e.mul(s,HS),o),i=e.mul(s,e.sub(a,e.ONE));if(!e.eql(e.sqr(i),r))throw new Error(\"Cannot find square root\");return i}}return function(e){const t=(e-GS)/HS;let r,n,o;for(r=e-GS,n=0;r%HS===VS;r/=HS,n++);for(o=HS;o<e&&XS(o,t,e)!==e-GS;o++);if(1===n){const t=(e+GS)/qS;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}const s=(r+GS)/HS;return function(e,a){if(e.pow(a,t)===e.neg(e.ONE))throw new Error(\"Cannot find square root\");let i=n,c=e.pow(e.mul(e.ONE,o),r),u=e.pow(a,s),l=e.pow(a,r);for(;!e.eql(l,e.ONE);){if(e.eql(l,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(l);t<i&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,GS<<BigInt(i-t-1));c=e.sqr(r),u=e.mul(u,r),l=e.mul(l,c),i=t}return u}}(e)}const rI=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function nI(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function oI(e){if(\"bigint\"!=typeof e)throw new Error(\"field order must be bigint\");const t=e.toString(2).length;return Math.ceil(t/8)}function sI(e){const t=oI(e);return t+Math.ceil(t/2)}class aI extends WW{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,dW(e);const r=BW(t);if(this.iHash=e.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return fW(this),this.iHash.update(e),this}digestInto(e){fW(this),lW(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:a}=this;return e.finished=n,e.destroyed=o,e.blockLen=s,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const iI=(e,t,r)=>new aI(e,t).update(r).digest();iI.create=(e,t)=>new aI(e,t);const cI=BigInt(0),uI=BigInt(1);function lI(e){return function(e){const t=rI.reduce((e,t)=>(e[t]=\"function\",e),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"isSafeInteger\",BITS:\"isSafeInteger\"});jS(e,t)}(e.Fp),jS(e,{n:\"bigint\",h:\"bigint\",Gx:\"field\",Gy:\"field\"},{nBitLength:\"isSafeInteger\",nByteLength:\"isSafeInteger\"}),Object.freeze({...nI(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:dI,aT:fI}=T,pI={Err:class extends Error{constructor(e=\"\"){super(e)}},_parseInt(e){const{Err:t}=pI;if(e.length<2||2!==e[0])throw new t(\"Invalid signature integer tag\");const r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t(\"Invalid signature integer: wrong length\");if(128&n[0])throw new t(\"Invalid signature integer: negative\");if(0===n[0]&&!(128&n[1]))throw new t(\"Invalid signature integer: unnecessary leading zero\");return{d:dI(n),l:e.subarray(r+2)}},toSig(e){const{Err:t}=pI,r=\"string\"==typeof e?fI(e):e;if(!(r instanceof Uint8Array))throw new Error(\"ui8a expected\");let n=r.length;if(n<2||48!=r[0])throw new t(\"Invalid signature tag\");if(r[1]!==n-2)throw new t(\"Invalid signature: incorrect length\");const{d:o,l:s}=pI._parseInt(r.subarray(2)),{d:a,l:i}=pI._parseInt(s);if(i.length)throw new t(\"Invalid signature: left bytes after parsing\");return{r:o,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?\"00\"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),s=n.length/2,a=o.length/2,i=r(s),c=r(a);return`30${r(a+s+4)}02${c}${o}02${i}${n}`}},hI=BigInt(0),gI=BigInt(1),yI=(BigInt(2),BigInt(3));BigInt(4);function mI(e){const t=function(e){const t=lI(e);jS(t,{a:\"field\",b:\"field\"},{allowedPrivateKeyLengths:\"array\",wrapPrivateKey:\"boolean\",isTorsionFree:\"function\",clearCofactor:\"function\",allowInfinityPoint:\"boolean\",fromBytes:\"function\",toBytes:\"function\"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");if(\"object\"!=typeof r||\"bigint\"!=typeof r.beta||\"function\"!=typeof r.splitScalar)throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{const o=t.toAffine();return NS(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),o=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function s(e){const{a:n,b:o}=t,s=r.sqr(e),a=r.mul(s,e);return r.add(r.add(a,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw new Error(\"bad generator point: equation left != right\");function a(e){return\"bigint\"==typeof e&&hI<e&&e<t.n}function i(e){if(!a(e))throw new Error(\"Expected valid bigint: 0 < bigint < curve.n\")}function c(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:o,n:s}=t;if(r&&\"bigint\"!=typeof e){if(e instanceof Uint8Array&&(e=IS(e)),\"string\"!=typeof e||!r.includes(e.length))throw new Error(\"Invalid key\");e=e.padStart(2*n,\"0\")}let a;try{a=\"bigint\"==typeof e?e:xS(kS(\"private key\",e,n))}catch(t){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`)}return o&&(a=YS(a,s)),i(a),a}const u=new Map;function l(e){if(!(e instanceof d))throw new Error(\"ProjectivePoint expected\")}class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error(\"x required\");if(null==t||!r.isValid(t))throw new Error(\"y required\");if(null==n||!r.isValid(n))throw new Error(\"z required\")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error(\"invalid affine point\");if(e instanceof d)throw new Error(\"projective point not allowed\");const o=e=>r.eql(e,r.ZERO);return o(t)&&o(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(o(kS(\"pointHex\",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error(\"bad point: ZERO\")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error(\"bad point: x or y not FE\");const o=r.sqr(n),a=s(e);if(!r.eql(o,a))throw new Error(\"bad point: equation left != right\");if(!this.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error(\"Field doesn't support isOdd\")}equals(e){l(e);const{px:t,py:n,pz:o}=this,{px:s,py:a,pz:i}=e,c=r.eql(r.mul(t,i),r.mul(s,o)),u=r.eql(r.mul(n,i),r.mul(a,o));return c&&u}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,yI),{px:s,py:a,pz:i}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(s,s),p=r.mul(a,a),h=r.mul(i,i),g=r.mul(s,a);return g=r.add(g,g),l=r.mul(s,i),l=r.add(l,l),c=r.mul(e,l),u=r.mul(o,h),u=r.add(c,u),c=r.sub(p,u),u=r.add(p,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(o,l),h=r.mul(e,h),g=r.sub(f,h),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,h),f=r.mul(f,g),u=r.add(u,f),h=r.mul(a,i),h=r.add(h,h),f=r.mul(h,g),c=r.sub(c,f),l=r.mul(h,p),l=r.add(l,l),l=r.add(l,l),new d(c,u,l)}add(e){l(e);const{px:n,py:o,pz:s}=this,{px:a,py:i,pz:c}=e;let u=r.ZERO,f=r.ZERO,p=r.ZERO;const h=t.a,g=r.mul(t.b,yI);let y=r.mul(n,a),m=r.mul(o,i),b=r.mul(s,c),w=r.add(n,o),T=r.add(a,i);w=r.mul(w,T),T=r.add(y,m),w=r.sub(w,T),T=r.add(n,s);let A=r.add(a,c);return T=r.mul(T,A),A=r.add(y,b),T=r.sub(T,A),A=r.add(o,s),u=r.add(i,c),A=r.mul(A,u),u=r.add(m,b),A=r.sub(A,u),p=r.mul(h,T),u=r.mul(g,b),p=r.add(u,p),u=r.sub(m,p),p=r.add(m,p),f=r.mul(u,p),m=r.add(y,y),m=r.add(m,y),b=r.mul(h,b),T=r.mul(g,T),m=r.add(m,b),b=r.sub(y,b),b=r.mul(h,b),T=r.add(T,b),y=r.mul(m,T),f=r.add(f,y),y=r.mul(A,T),u=r.mul(w,u),u=r.sub(u,y),y=r.mul(w,m),p=r.mul(A,p),p=r.add(p,y),new d(u,f,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,u,e,e=>{const t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)})}multiplyUnsafe(e){const n=d.ZERO;if(e===hI)return n;if(i(e),e===gI)return this;const{endo:o}=t;if(!o)return p.unsafeLadder(this,e);let{k1neg:s,k1:a,k2neg:c,k2:u}=o.splitScalar(e),l=n,f=n,h=this;for(;a>hI||u>hI;)a&gI&&(l=l.add(h)),u&gI&&(f=f.add(h)),h=h.double(),a>>=gI,u>>=gI;return s&&(l=l.negate()),c&&(f=f.negate()),f=new d(r.mul(f.px,o.beta),f.py,f.pz),l.add(f)}multiply(e){i(e);let n,o,s=e;const{endo:a}=t;if(a){const{k1neg:e,k1:t,k2neg:i,k2:c}=a.splitScalar(s);let{p:u,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(c);u=p.constTimeNegate(e,u),f=p.constTimeNegate(i,f),f=new d(r.mul(f.px,a.beta),f.py,f.pz),n=u.add(f),o=l.add(h)}else{const{p:e,f:t}=this.wNAF(s);n=e,o=t}return d.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=d.BASE,o=(e,t)=>t!==hI&&t!==gI&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=o(this,t).add(o(e,r));return s.is0()?void 0:s}toAffine(e){const{px:t,py:n,pz:o}=this,s=this.is0();null==e&&(e=s?r.ONE:r.inv(o));const a=r.mul(t,e),i=r.mul(n,e),c=r.mul(o,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error(\"invZ was invalid\");return{x:a,y:i}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===gI)return!0;if(r)return r(d,this);throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===gI?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return IS(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const f=t.nBitLength,p=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>cI;)r&uI&&(n=n.add(o)),o=o.double(),r>>=uI;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),s=[];let a=e,i=a;for(let e=0;e<r;e++){i=a,s.push(i);for(let e=1;e<o;e++)i=i.add(a),s.push(i);a=i.double()}return s},wNAF(t,o,s){const{windows:a,windowSize:i}=n(t);let c=e.ZERO,u=e.BASE;const l=BigInt(2**t-1),d=2**t,f=BigInt(t);for(let e=0;e<a;e++){const t=e*i;let n=Number(s&l);s>>=f,n>i&&(n-=d,s+=uI);const a=t,p=t+Math.abs(n)-1,h=e%2!=0,g=n<0;0===n?u=u.add(r(h,o[a])):c=c.add(r(g,o[p]))}return{p:c,f:u}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,o),1!==o&&t.set(e,n(s))),this.wNAF(o,s,r)}}}(d,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:a}}function bI(e){const t=function(e){const t=lI(e);return jS(t,{hash:\"hash\",hmac:\"function\",randomBytes:\"function\"},{bits2int:\"function\",bits2int_modN:\"function\",lowS:\"boolean\"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n}=t,o=r.BYTES+1,s=2*r.BYTES+1;function a(e){return YS(e,n)}function i(e){return eI(e,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:l,isWithinCurveOrder:d}=mI({...t,toBytes(e,t,n){const o=t.toAffine(),s=r.toBytes(o.x),a=NS;return n?a(Uint8Array.from([t.hasEvenY()?2:3]),s):a(Uint8Array.from([4]),s,r.toBytes(o.y))},fromBytes(e){const t=e.length,n=e[0],a=e.subarray(1);if(t!==o||2!==n&&3!==n){if(t===s&&4===n){return{x:r.fromBytes(a.subarray(0,r.BYTES)),y:r.fromBytes(a.subarray(r.BYTES,2*r.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`)}{const e=xS(a);if(!(hI<(i=e)&&i<r.ORDER))throw new Error(\"Point is not on curve\");const t=l(e);let o=r.sqrt(t);return!(1&~n)!==((o&gI)===gI)&&(o=r.neg(o)),{x:e,y:o}}var i}}),f=e=>IS(MS(e,t.nByteLength));function p(e){return e>n>>gI}const h=(e,t,r)=>xS(e.slice(t,r));class g{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=kS(\"compactSignature\",e,2*r),new g(h(e,0,r),h(e,r,2*r))}static fromDER(e){const{r:t,s:r}=pI.toSig(kS(\"DER\",e));return new g(t,r)}assertValidity(){if(!d(this.r))throw new Error(\"r must be 0 < r < CURVE.n\");if(!d(this.s))throw new Error(\"s must be 0 < s < CURVE.n\")}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:o,recovery:s}=this,u=w(kS(\"msgHash\",e));if(null==s||![0,1,2,3].includes(s))throw new Error(\"recovery id invalid\");const l=2===s||3===s?n+t.n:n;if(l>=r.ORDER)throw new Error(\"recovery id 2 or 3 invalid\");const d=1&s?\"03\":\"02\",p=c.fromHex(d+f(l)),h=i(l),g=a(-u*h),y=a(o*h),m=c.BASE.multiplyAndAddUnsafe(p,g,y);if(!m)throw new Error(\"point at infinify\");return m.assertValidity(),m}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return RS(this.toDERHex())}toDERHex(){return pI.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return RS(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const y={isValidPrivateKey(e){try{return u(e),!0}catch(e){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const e=sI(t.n);return function(e,t,r=!1){const n=e.length,o=oI(t),s=sI(t);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const a=YS(r?xS(e):OS(e),t-GS)+GS;return r?FS(a,o):MS(a,o)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function m(e){const t=e instanceof Uint8Array,r=\"string\"==typeof e,n=(t||r)&&e.length;return t?n===o||n===s:r?n===2*o||n===2*s:e instanceof c}const b=t.bits2int||function(e){const r=xS(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},w=t.bits2int_modN||function(e){return a(b(e))},T=US(t.nBitLength);function A(e){if(\"bigint\"!=typeof e)throw new Error(\"bigint expected\");if(!(hI<=e&&e<T))throw new Error(`bigint expected < 2^${t.nBitLength}`);return MS(e,t.nByteLength)}function v(e,n,o=P){if([\"recovered\",\"canonical\"].some(e=>e in o))throw new Error(\"sign() legacy options not supported\");const{hash:s,randomBytes:l}=t;let{lowS:f,prehash:h,extraEntropy:y}=o;null==f&&(f=!0),e=kS(\"msgHash\",e),h&&(e=kS(\"prehashed msgHash\",s(e)));const m=w(e),T=u(n),v=[A(T),A(m)];if(null!=y){const e=!0===y?l(r.BYTES):y;v.push(kS(\"extraEntropy\",e))}const E=NS(...v),C=m;return{seed:E,k2sig:function(e){const t=b(e);if(!d(t))return;const r=i(t),n=c.BASE.multiply(t).toAffine(),o=a(n.x);if(o===hI)return;const s=a(r*a(C+o*T));if(s===hI)return;let u=(n.x===o?0:2)|Number(n.y&gI),l=s;return f&&p(s)&&(l=function(e){return p(e)?a(-e):e}(s),u^=1),new g(o,l,u)}}}const P={lowS:t.lowS,prehash:!1},E={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(m(e))throw new Error(\"first arg must be private key\");if(!m(t))throw new Error(\"second arg must be public key\");return c.fromHex(t).multiply(u(e)).toRawBytes(r)},sign:function(e,r,n=P){const{seed:o,k2sig:s}=v(e,r,n),a=t;return $S(a.hash.outputLen,a.nByteLength,a.hmac)(o,s)},verify:function(e,r,n,o=E){const s=e;if(r=kS(\"msgHash\",r),n=kS(\"publicKey\",n),\"strict\"in o)throw new Error(\"options.strict was renamed to lowS\");const{lowS:u,prehash:l}=o;let d,f;try{if(\"string\"==typeof s||s instanceof Uint8Array)try{d=g.fromDER(s)}catch(e){if(!(e instanceof pI.Err))throw e;d=g.fromCompact(s)}else{if(\"object\"!=typeof s||\"bigint\"!=typeof s.r||\"bigint\"!=typeof s.s)throw new Error(\"PARSE\");{const{r:e,s:t}=s;d=new g(e,t)}}f=c.fromHex(n)}catch(e){if(\"PARSE\"===e.message)throw new Error(\"signature must be Signature instance, Uint8Array or hex string\");return!1}if(u&&d.hasHighS())return!1;l&&(r=t.hash(r));const{r:p,s:h}=d,y=w(r),m=i(h),b=a(y*m),T=a(p*m),A=c.BASE.multiplyAndAddUnsafe(f,b,T)?.toAffine();return!!A&&a(A.x)===p},ProjectivePoint:c,Signature:g,utils:y}}function wI(e){return{hash:e,hmac:(t,...r)=>iI(e,t,function(...e){const t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));let r=0;return e.forEach(e=>{if(!PW(e))throw new Error(\"Uint8Array expected\");t.set(e,r),r+=e.length}),t}(...r)),randomBytes:IW}}const TI=BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),AI=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),vI=BigInt(1),PI=BigInt(2),EI=(e,t)=>(e+t/PI)/t;function CI(e){const t=TI,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),a=BigInt(23),i=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=QS(l,r,t)*l%t,f=QS(d,r,t)*l%t,p=QS(f,PI,t)*u%t,h=QS(p,o,t)*p%t,g=QS(h,s,t)*h%t,y=QS(g,i,t)*g%t,m=QS(y,c,t)*y%t,b=QS(m,i,t)*g%t,w=QS(b,r,t)*l%t,T=QS(w,a,t)*h%t,A=QS(T,n,t)*u%t,v=QS(A,PI,t);if(!BI.eql(BI.sqr(v),e))throw new Error(\"Cannot find square root\");return v}const BI=function(e,t,r=!1,n={}){if(e<=VS)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:o,nByteLength:s}=nI(e,t);if(s>2048)throw new Error(\"Field lengths over 2048 bytes are not supported\");const a=tI(e),i=Object.freeze({ORDER:e,BITS:o,BYTES:s,MASK:US(o),ZERO:VS,ONE:GS,create:t=>YS(t,e),isValid:t=>{if(\"bigint\"!=typeof t)throw new Error(\"Invalid field element: expected bigint, got \"+typeof t);return VS<=t&&t<e},is0:e=>e===VS,isOdd:e=>(e&GS)===GS,neg:t=>YS(-t,e),eql:(e,t)=>e===t,sqr:t=>YS(t*t,e),add:(t,r)=>YS(t+r,e),sub:(t,r)=>YS(t-r,e),mul:(t,r)=>YS(t*r,e),pow:(e,t)=>function(e,t,r){if(r<VS)throw new Error(\"Expected power > 0\");if(r===VS)return e.ONE;if(r===GS)return t;let n=e.ONE,o=t;for(;r>VS;)r&GS&&(n=e.mul(n,o)),o=e.sqr(o),r>>=GS;return n}(i,e,t),div:(t,r)=>YS(t*eI(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>eI(t,e),sqrt:n.sqrt||(e=>a(i,e)),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n)),e.ONE),o=e.inv(n);return t.reduceRight((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n)),o),r}(i,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?FS(e,s):MS(e,s),fromBytes:e=>{if(e.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`);return r?OS(e):xS(e)}});return Object.freeze(i)}(TI,void 0,void 0,{sqrt:CI}),WI=function(e,t){const r=t=>bI({...e,...wI(t)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:BI,n:AI,Gx:BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),Gy:BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),splitScalar:e=>{const t=AI,r=BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),n=-vI*BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\"),o=BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),s=r,a=BigInt(\"0x100000000000000000000000000000000\"),i=EI(s*e,t),c=EI(-n*e,t);let u=YS(e-i*r-c*o,t),l=YS(-i*n-c*s,t);const d=u>a,f=l>a;if(d&&(u=t-u),f&&(l=t-l),u>a||l>a)throw new Error(\"splitScalar: Endomorphism failed, k=\"+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}}},ES);BigInt(0);WI.ProjectivePoint;const SI=BigInt(0),II=(BigInt(1),9007199254740991);function _I(e,t){switch(typeof e){case\"bigint\":return e;case\"number\":return JW(Number.isInteger(e),\"underflow\",t||\"value\",e),JW(e>=-II&&e<=II,\"overflow\",t||\"value\",e),BigInt(e);case\"string\":try{if(\"\"===e)throw new Error(\"empty string\");return\"-\"===e[0]&&\"-\"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){JW(!1,`invalid BigNumberish string: ${r.message}`,t||\"value\",e)}}JW(!1,\"invalid BigNumberish value\",t||\"value\",e)}function RI(e,t){const r=_I(e,t);return ZW(r>=SI,\"unsigned value cannot be negative\",\"NUMERIC_FAULT\",{fault:\"overflow\",operation:\"getUint\",value:e}),r}function xI(e,t){switch(typeof e){case\"bigint\":return JW(e>=-II&&e<=II,\"overflow\",t||\"value\",e),Number(e);case\"number\":return JW(Number.isInteger(e),\"underflow\",t||\"value\",e),JW(e>=-II&&e<=II,\"overflow\",t||\"value\",e),e;case\"string\":try{if(\"\"===e)throw new Error(\"empty string\");return xI(BigInt(e),t)}catch(r){JW(!1,`invalid numeric string: ${r.message}`,t||\"value\",e)}}JW(!1,\"invalid numeric value\",t||\"value\",e)}function OI(e,t){const r=RI(e,\"value\");let n=r.toString(16);if(null==t)n.length%2&&(n=\"0\"+n);else{const o=xI(t,\"width\");if(0===o&&r===SI)return\"0x\";for(ZW(2*o>=n.length,`value exceeds width (${o} bytes)`,\"NUMERIC_FAULT\",{operation:\"toBeHex\",fault:\"overflow\",value:e});n.length<2*o;)n=\"0\"+n}return\"0x\"+n}function MI(e,t){const r=RI(e,\"value\");if(r===SI){const e=null!=t?xI(t,\"width\"):0;return new Uint8Array(e)}let n=r.toString(16);if(n.length%2&&(n=\"0\"+n),null!=t){const r=xI(t,\"width\");for(;n.length<2*r;)n=\"00\"+n;ZW(2*r===n.length,`value exceeds width (${r} bytes)`,\"NUMERIC_FAULT\",{operation:\"toBeArray\",fault:\"overflow\",value:e})}const o=new Uint8Array(n.length/2);for(let e=0;e<o.length;e++){const t=2*e;o[e]=parseInt(n.substring(t,t+2),16)}return o}const FI=\"0x0000000000000000000000000000000000000000000000000000000000000000\",kI=BigInt(0),NI=BigInt(1),UI=BigInt(2),DI=BigInt(27),LI=BigInt(28),$I=BigInt(35),zI=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),jI=zI/UI,VI=Symbol.for(\"nodejs.util.inspect.custom\"),GI={};function HI(e){return sS(MI(e),32,!0)}class KI{#e;#t;#r;#n;get r(){return this.#e}set r(e){JW(32===oS(e),\"invalid r\",\"value\",e),this.#e=rS(e)}get s(){return JW(parseInt(this.#t.substring(0,3))<8,\"non-canonical s; use ._s\",\"s\",this.#t),this.#t}set s(e){JW(32===oS(e),\"invalid s\",\"value\",e),this.#t=rS(e)}get _s(){return this.#t}isValid(){return BigInt(this.#t)<=jI}get v(){return this.#r}set v(e){const t=xI(e,\"value\");JW(27===t||28===t,\"invalid v\",\"v\",e),this.#r=t}get networkV(){return this.#n}get legacyChainId(){const e=this.networkV;return null==e?null:KI.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=XW(this.s);return this.yParity&&(e[0]|=128),rS(e)}get compactSerialized(){return nS([this.r,this.yParityAndS])}get serialized(){return nS([this.r,this.s,this.yParity?\"0x1c\":\"0x1b\"])}constructor(e,t,r,n){!function(e,t,r){if(null==r&&(r=\"\"),e!==t){let e=r,t=\"new\";r&&(e+=\".\",t+=\" \"+r),ZW(!1,`private constructor; use ${e}from* methods`,\"UNSUPPORTED_OPERATION\",{operation:t})}}(e,GI,\"Signature\"),this.#e=t,this.#t=r,this.#r=n,this.#n=null}getCanonical(){if(this.isValid())return this;const e=zI-BigInt(this._s),t=55-this.v,r=new KI(GI,this.r,HI(e),t);return this.networkV&&(r.#n=this.networkV),r}clone(){const e=new KI(GI,this.r,this._s,this.v);return this.networkV&&(e.#n=this.networkV),e}toJSON(){const e=this.networkV;return{_type:\"signature\",networkV:null!=e?e.toString():null,r:this.r,s:this._s,v:this.v}}[VI](){return this.toString()}toString(){return this.isValid()?`Signature { r: ${this.r}, s: ${this._s}, v: ${this.v} }`:`Signature { r: ${this.r}, s: ${this._s}, v: ${this.v}, valid: false }`}static getChainId(e){const t=_I(e,\"v\");return t==DI||t==LI?kI:(JW(t>=$I,\"invalid EIP-155 v\",\"v\",e),(t-$I)/UI)}static getChainIdV(e,t){return _I(e)*UI+BigInt(35+t-27)}static getNormalizedV(e){const t=_I(e);return t===kI||t===DI?27:t===NI||t===LI?28:(JW(t>=$I,\"invalid v\",\"v\",e),t&NI?27:28)}static from(e){function t(t,r){JW(t,r,\"signature\",e)}if(null==e)return new KI(GI,FI,FI,27);if(\"string\"==typeof e){const r=XW(e,\"signature\");if(64===r.length){const e=rS(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new KI(GI,e,rS(t),n)}if(65===r.length){const e=rS(r.slice(0,32)),t=rS(r.slice(32,64)),n=KI.getNormalizedV(r[64]);return new KI(GI,e,t,n)}t(!1,\"invalid raw signature length\")}if(e instanceof KI)return e.clone();const r=e.r;t(null!=r,\"missing r\");const n=HI(r),o=function(e,r){if(null!=e)return HI(e);if(null!=r){t(eS(r,32),\"invalid yParityAndS\");const e=XW(r);return e[0]&=127,rS(e)}t(!1,\"missing s\")}(e.s,e.yParityAndS),{networkV:s,v:a}=function(e,r,n){if(null!=e){const t=_I(e);return{networkV:t>=$I?t:void 0,v:KI.getNormalizedV(t)}}if(null!=r)return t(eS(r,32),\"invalid yParityAndS\"),{v:128&XW(r)[0]?28:27};if(null!=n){switch(xI(n,\"sig.yParity\")){case 0:return{v:27};case 1:return{v:28}}t(!1,\"invalid yParity\")}t(!1,\"missing v\")}(e.v,e.yParityAndS,e.yParity),i=new KI(GI,n,o,a);return s&&(i.#n=s),t(null==e.yParity||xI(e.yParity,\"sig.yParity\")===i.yParity,\"yParity mismatch\"),t(null==e.yParityAndS||e.yParityAndS===i.yParityAndS,\"yParityAndS mismatch\"),i}}class qI{#c;constructor(e){JW(32===oS(e),\"invalid private key\",\"privateKey\",\"[REDACTED]\"),this.#c=rS(e)}get privateKey(){return this.#c}get publicKey(){return qI.computePublicKey(this.#c)}get compressedPublicKey(){return qI.computePublicKey(this.#c,!0)}sign(e){JW(32===oS(e),\"invalid digest length\",\"digest\",e);const t=WI.sign(QW(e),QW(this.#c),{lowS:!0});return KI.from({r:OI(t.r,32),s:OI(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=qI.computePublicKey(e);return rS(WI.getSharedSecret(QW(this.#c),XW(t),!1))}static computePublicKey(e,t){let r=XW(e,\"key\");if(32===r.length){return rS(WI.getPublicKey(r,!!t))}if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}return rS(WI.ProjectivePoint.fromHex(r).toRawBytes(t))}static recoverPublicKey(e,t){JW(32===oS(e),\"invalid digest length\",\"digest\",e);const r=KI.from(t);let n=WI.Signature.fromCompact(QW(nS([r.r,r.s])));n=n.addRecoveryBit(r.yParity);const o=n.recoverPublicKey(QW(e));return JW(null!=o,\"invalid signature for digest\",\"signature\",t),\"0x\"+o.toHex(!1)}static addPoints(e,t,r){const n=WI.ProjectivePoint.fromHex(qI.computePublicKey(e).substring(2)),o=WI.ProjectivePoint.fromHex(qI.computePublicKey(t).substring(2));return\"0x\"+n.add(o).toHex(!!r)}}function ZI(e){let t;return t=\"string\"==typeof e?qI.computePublicKey(e,!1):e.publicKey,yS(uS(\"0x\"+t.substring(4)).substring(26))}class JI{#Ae;#ve;#ne;#Pe;#Ee;#Ce;constructor({accountsRepository:e,configProvider:t,logger:r,assetsService:n,snapClient:o,transactionsService:s}){this.#ne=ke(r,\"[🔑 AccountsService]\"),this.#ve=t,this.#Ae=e,this.#Pe=n,this.#Ee=s,this.#Ce=o}async deriveTronKeypair({entropySource:e,derivationPath:t}){try{this.#ne.log({derivationPath:t},\"Generating TRON wallet\"),O(t,OA);const r=t.split(\"/\"),n=await this.#Ce.getBip32Entropy({entropySource:e,path:r,curve:\"secp256k1\"});if(!n.privateKey||!n.publicKey)throw new Error(\"Unable to derive private key\");const o=XE(n.privateKey),s=XE(n.publicKey),a=n.privateKey.slice(2),i=ZI(n.publicKey),c=Lw.address.fromHex(i);if(!c)throw new Error(\"Unable to derive address\");return{privateKeyBytes:o,publicKeyBytes:s,privateKeyHex:a,address:c}}catch(e){throw function(e){const t=e?.message?.toLowerCase()??\"\",r=e?.stack?.toLowerCase()??\"\";if([\"private\",\"key\",\"entropy\",\"mnemonic\",\"seed\",\"derivation\",\"bip32\",\"bip44\",\"secret\"].some(e=>t.includes(e)||r.includes(e))){const t=new Error(\"Key derivation failed. Please check your connection and try again.\");return XB(e)&&e.constructor?new e.constructor:t}return e}(e)}}async deriveAccount({entropySource:e,index:t}){const r=JI.getDefaultDerivationPath(t),{address:n}=await this.deriveTronKeypair({entropySource:e,derivationPath:r});return{id:globalThis.crypto.randomUUID(),entropySource:e,derivationPath:r,index:t,type:Zt.Eoa,address:n,scopes:[Vr.Mainnet,Vr.Nile,Vr.Shasta],options:{entropy:{type:\"mnemonic\",id:e,derivationPath:r,groupIndex:t},exportable:!0},methods:[\"signMessage\",\"signTransaction\"]}}async create(e){const t=await this.#Ae.getAll(),r=e?.entropySource??await this.#Be(),n=e?.index??this.#We(t,r),o=t.find(e=>e.index===n&&e.entropySource===r);if(o)return this.#ne.warn(\"[🔑 Keyring] An account already exists with the same derivation path and entropy source. Skipping account creation.\"),YB(o);const s=await this.deriveAccount({entropySource:r,index:n}),{metamask:a,...i}=e??{},c={...s,options:{...s.options,...Object.fromEntries(Object.entries(i).filter(([,e])=>void 0!==e)),groupIndex:n}};await this.#Ae.create(c);try{const e=YB(c);return await ZB(snap,gn.AccountCreated,{account:e,displayConfirmation:!1,...a?{metamask:a}:{}}),e}catch(e){try{await this.#Ae.delete(c.id)}catch(e){this.#ne.error({deleteError:e,accountId:c.id},\"Failed to rollback account creation\")}throw e}}async getAll(){return this.#Ae.getAll()}async getAllSelected(){const[e,t]=await Promise.all([this.#Ae.getAll(),JB(snap)]);return e.filter(e=>t.includes(e.id))}async findById(e){return this.#Ae.findById(e)}async findByIdOrThrow(e){const t=await this.#Ae.findById(e);if(!t)throw new Error(`Account with ID ${e} not found`);return t}async findByIds(e){const t=await this.#Ae.findByIds(e);return e.length!==t.length&&this.#ne.error(\"[findByIds] Some accounts not found\"),t}async findByAddress(e){return this.#Ae.findByAddress(e)}async delete(e){return this.#Ae.delete(e)}async synchronizeAssets(e){const t=this.#ve.get().activeNetworks,r=e.flatMap(e=>t.map(t=>({account:e,scope:t}))),n=(await Promise.allSettled(r.map(async({account:e,scope:t})=>this.#Pe.fetchAssetsAndBalancesForAccount(t,e)))).flatMap(e=>\"fulfilled\"===e.status?e.value:[]);await this.#Pe.saveMany(n)}async synchronizeTransactions(e){const t=this.#ve.get().activeNetworks,r=e.flatMap(e=>t.map(t=>({account:e,scope:t}))),n=(await Promise.allSettled(r.map(async({account:e,scope:t})=>this.#Ee.fetchNewTransactionsForAccount(t,e)))).flatMap(e=>\"fulfilled\"===e.status?e.value:[]);await this.#Ee.saveMany(n)}async synchronize(e){await Promise.allSettled([this.synchronizeAssets(e),this.synchronizeTransactions(e)])}#We(e,t){return function(e){if(0===e.length)return 0;const t=e.map(e=>e.index).sort((e,t)=>e-t);let r=0;for(const e of t){if(e!==r)break;r+=1}return r}(e.filter(e=>e.entropySource===t))}static getDefaultDerivationPath(e){return`m/44'/195'/0'/0/${e}`}async#Be(){const e=(await this.#Ce.listEntropySources()).find(({primary:e})=>e);if(!e)throw new Error(\"No default entropy source found - this can never happen\");return e.id}}class YI{#ne;#Se;#Ie;#_e;#Re;#xe;#Oe;cacheTtlsMilliseconds;constructor({logger:e,assetsRepository:t,state:r,trongridApiClient:n,tronHttpClient:o,priceApiClient:s,tokenApiClient:a}){this.#ne=ke(e,\"[🪙 AssetsService]\"),this.#Se=t,this.#Ie=r,this.#_e=n,this.#Re=o,this.#xe=s,this.#Oe=a;const{cacheTtlsMilliseconds:i}=W_.get().priceApi;this.cacheTtlsMilliseconds=i}static isFiat(e){return e.includes(\"swift:0/iso4217:\")}async getAllAssetsByAccountId(e){return this.#Se.getByAccountId(e)}async getAssetsByAccountId(e,t){return this.#Se.getByAccountIdAndAssetTypes(e,t)}async getAssetByAccountId(e,t){return this.#Se.getByAccountIdAndAssetType(e,t)}async fetchAssetsAndBalancesForAccount(e,t){this.#ne.info(\"Fetching assets and balances by account\",{account:t,scope:e});const[r,n,o]=await Promise.allSettled([this.#_e.getAccountInfoByAddress(e,t.address),this.#Re.getAccountResources(e,t.address),this.#Re.getReward(e,t.address)]),s=\"rejected\"===r.status;s&&this.#ne.info(\"Account info request failed, treating as inactive account\",{account:t,scope:e});const a=s?await this.#_e.getTrc20BalancesByAddress(e,t.address).catch(r=>(this.#ne.warn(\"Failed to fetch TRC20 balances for inactive account\",{error:r,account:t,scope:e}),[])):[],i=this.#Me({tronAccountInfoRequest:r,tronAccountResourcesRequest:n,trc20BalancesFallback:a,stakingRewardsRequest:o}),c=this.#Fe(t,e,i),u=c.map(e=>e.assetType),l=this.#ke(c),[d,f]=await Promise.all([this.getAssetsMetadata(u),this.#xe.getMultipleSpotPrices(l,\"usd\").catch(()=>({}))]),p=this.#Ne(c,d);return this.#Ue(p,f)}#Ue(e,t){return e.filter(e=>{if(to.includes(e.assetType))return!0;const r=t[e.assetType];return\"number\"==typeof r?.price})}#Me({tronAccountInfoRequest:e,tronAccountResourcesRequest:t,trc20BalancesFallback:r,stakingRewardsRequest:n}){const o=\"rejected\"===e.status,s=\"fulfilled\"===t.status?t.value:{},a=\"fulfilled\"===n.status?Math.max(0,n.value):0;if(o)return{nativeBalance:0,trc10Balances:[],trc20Balances:r,stakedData:{frozenV2:[],unfrozenV2:[],accountResource:void 0},resources:s,stakingRewards:a};const i=e.value;return{nativeBalance:i.balance??0,trc10Balances:i.assetV2??[],trc20Balances:i.trc20??[],stakedData:{frozenV2:i.frozenV2??[],unfrozenV2:i.unfrozenV2??[],accountResource:i.account_resource},resources:s,stakingRewards:a}}#Fe(e,t,r){return[this.#De(e,t,r.nativeBalance),...this.#Le(e,t,r.stakedData),this.#$e(e,t,r.stakedData),this.#ze(e,t,r.stakedData),this.#je(e,t,r.stakingRewards),...this.#Ve(e,t,r.trc10Balances),...this.#Ge(e,t,r.trc20Balances),...this.#He({account:e,scope:t,tronAccountResources:r.resources}),...this.#Ke({account:e,scope:t,tronAccountResources:r.resources})]}#ke(e){return e.filter(e=>e.assetType.includes(\"/slip44:\")||e.assetType.includes(\"/trc10:\")||e.assetType.includes(\"/trc20:\")).map(e=>e.assetType)}#Ne(e,t){return e.map(e=>{const r=t[e.assetType],{symbol:n,decimals:o=0,iconUrl:s}=e;let a=n,i=o,c=s;if(r?.fungible){const e=r.units?.[0];e?(a=e.symbol??r.symbol??a,i=e.decimals??i):a=r?.symbol??a,c=r.iconUrl??c}const u=GC(e.rawAmount,i).toString();return{...e,symbol:a,decimals:i,uiAmount:u,iconUrl:c}})}#De(e,t,r){return{assetType:Qn[t].nativeToken.id,keyringAccountId:e.id,network:t,symbol:Qn[t].nativeToken.symbol,decimals:Qn[t].nativeToken.decimals,rawAmount:r.toString(),uiAmount:GC(r,Qn[t].nativeToken.decimals).toString(),iconUrl:Qn[t].nativeToken.iconUrl}}#Le(e,t,r){const n=[];let o=0,s=0;r.frozenV2?.forEach(e=>{const t=e.amount??0;\"ENERGY\"===e.type?s+=t:e.type||(o+=t)});const a=r.accountResource?.delegated_frozenV2_balance_for_bandwidth??0,i=r.accountResource?.delegated_frozenV2_balance_for_energy??0;return o+=a,s+=i,n.push({assetType:Qn[t].stakedForBandwidth.id,keyringAccountId:e.id,network:t,symbol:Qn[t].stakedForBandwidth.symbol,decimals:Qn[t].stakedForBandwidth.decimals,rawAmount:o.toString(),uiAmount:GC(o,Qn[t].stakedForBandwidth.decimals).toString(),iconUrl:Qn[t].stakedForBandwidth.iconUrl}),n.push({assetType:Qn[t].stakedForEnergy.id,keyringAccountId:e.id,network:t,symbol:Qn[t].stakedForEnergy.symbol,decimals:Qn[t].stakedForEnergy.decimals,rawAmount:s.toString(),uiAmount:GC(s,Qn[t].stakedForEnergy.decimals).toString(),iconUrl:Qn[t].stakedForEnergy.iconUrl}),n}#$e(e,t,r){const n=Date.now();let o=0;r.unfrozenV2?.forEach(e=>{const t=e.unfreeze_expire_time??0,r=e.unfreeze_amount??0;t<=n&&r>0&&(o+=r)});const{id:s,symbol:a,decimals:i,iconUrl:c}=Qn[t].readyForWithdrawal;return{assetType:s,keyringAccountId:e.id,network:t,symbol:a,decimals:i,rawAmount:o.toString(),uiAmount:GC(o,i).toString(),iconUrl:c}}#je(e,t,r){return{assetType:Qn[t].stakingRewards.id,keyringAccountId:e.id,network:t,symbol:Qn[t].stakingRewards.symbol,decimals:Qn[t].stakingRewards.decimals,rawAmount:r.toString(),uiAmount:GC(r,Qn[t].stakingRewards.decimals).toString(),iconUrl:Qn[t].stakingRewards.iconUrl}}#ze(e,t,r){const n=Date.now();let o=0;r.unfrozenV2?.forEach(e=>{const t=e.unfreeze_expire_time??0,r=e.unfreeze_amount??0;t>n&&r>0&&(o+=r)});const{id:s,symbol:a,decimals:i,iconUrl:c}=Qn[t].inLockPeriod;return{assetType:s,keyringAccountId:e.id,network:t,symbol:a,decimals:i,rawAmount:o.toString(),uiAmount:GC(o,i).toString(),iconUrl:c}}#He({account:e,scope:t,tronAccountResources:r}){const n=(r?.freeNetLimit??0)+(r?.NetLimit??0),o=(r?.freeNetUsed??0)+(r?.NetUsed??0),s=Math.max(0,n-o);return[{assetType:Qn[t].bandwidth.id,keyringAccountId:e.id,network:t,symbol:Qn[t].bandwidth.symbol,decimals:Qn[t].bandwidth.decimals,rawAmount:s.toString(),uiAmount:s.toString(),iconUrl:Qn[t].bandwidth.iconUrl},{assetType:Qn[t].maximumBandwidth.id,keyringAccountId:e.id,network:t,symbol:Qn[t].maximumBandwidth.symbol,decimals:Qn[t].maximumBandwidth.decimals,rawAmount:n.toString(),uiAmount:n.toString(),iconUrl:Qn[t].maximumBandwidth.iconUrl}]}#Ke({account:e,scope:t,tronAccountResources:r}){const n=r?.EnergyLimit??0,o=r?.EnergyUsed??0,s=Math.max(0,n-o);return[{assetType:Qn[t].energy.id,keyringAccountId:e.id,network:t,symbol:Qn[t].energy.symbol,decimals:Qn[t].energy.decimals,rawAmount:s.toString(),uiAmount:s.toString(),iconUrl:Qn[t].energy.iconUrl},{assetType:Qn[t].maximumEnergy.id,keyringAccountId:e.id,network:t,symbol:Qn[t].maximumEnergy.symbol,decimals:Qn[t].maximumEnergy.decimals,rawAmount:n.toString(),uiAmount:n.toString(),iconUrl:Qn[t].maximumEnergy.iconUrl}]}#Ve(e,t,r){return r?.flatMap(r=>({assetType:`${t}/trc10:${r.key}`,keyringAccountId:e.id,network:t,symbol:\"\",decimals:0,rawAmount:r.value?.toString()??\"0\",uiAmount:\"0\",iconUrl:\"\"}))??[]}#Ge(e,t,r){return r.flatMap(r=>Object.entries(r).map(([r,n])=>({assetType:`${t}/trc20:${r}`,keyringAccountId:e.id,network:t,symbol:\"\",decimals:0,rawAmount:n,uiAmount:\"0\",iconUrl:\"\"})))}async getAssetsMetadata(e){this.#ne.info(\"Fetching metadata for assets\",e);const{nativeAssetTypes:t,stakedNativeAssetTypes:r,readyForWithdrawalAssetTypes:n,inLockPeriodAssetTypes:o,stakingRewardsAssetTypes:s,energyAssetTypes:a,maximunEnergyAssetTypes:i,bandwidthAssetTypes:c,maximunBandwidthAssetTypes:u,tokenTrc10AssetTypes:l,tokenTrc20AssetTypes:d}=this.#qe(e),f={...this.#Ze(t),...this.#Je(r),...this.#Ye(n),...this.#Xe(o),...this.#Qe(s),...this.#et(a),...this.#tt(i),...this.#rt(c),...this.#nt(u),...await this.#ot([...l,...d])};return this.#ne.info(\"Resolved assets metadata\",{assetTypes:e,result:f}),f}#qe(e){return{nativeAssetTypes:e.filter(e=>e.endsWith(\"/slip44:195\")),stakedNativeAssetTypes:e.filter(e=>e.includes(\"/slip44:195-staked-for-\")),readyForWithdrawalAssetTypes:e.filter(e=>e.endsWith(\"/slip44:195-ready-for-withdrawal\")),inLockPeriodAssetTypes:e.filter(e=>e.endsWith(\"/slip44:195-in-lock-period\")),stakingRewardsAssetTypes:e.filter(e=>e.endsWith(\"/slip44:195-staking-rewards\")),energyAssetTypes:e.filter(e=>e.endsWith(\"/slip44:energy\")),maximunEnergyAssetTypes:e.filter(e=>e.endsWith(\"/slip44:maximum-energy\")),bandwidthAssetTypes:e.filter(e=>e.endsWith(\"/slip44:bandwidth\")),maximunBandwidthAssetTypes:e.filter(e=>e.endsWith(\"/slip44:maximum-bandwidth\")),tokenTrc10AssetTypes:e.filter(e=>e.includes(\"/trc10:\")),tokenTrc20AssetTypes:e.filter(e=>e.includes(\"/trc20:\")),nftAssetTypes:e.filter(e=>e.includes(\"/trc721:\"))}}#Ze(e){const t={};for(const r of e)t[r]={fungible:zn.fungible,name:zn.name,symbol:zn.symbol,iconUrl:zn.iconUrl,units:[{decimals:zn.decimals,symbol:zn.symbol,name:zn.name}]};return t}#Je(e){const t={};for(const r of e){r.endsWith(\"staked-for-bandwidth\")&&(t[r]={fungible:jn.fungible,name:jn.name,symbol:jn.symbol,iconUrl:jn.iconUrl,units:[{decimals:jn.decimals,symbol:jn.symbol,name:jn.name}]});r.endsWith(\"staked-for-energy\")&&(t[r]={fungible:Vn.fungible,name:Vn.name,symbol:Vn.symbol,iconUrl:Vn.iconUrl,units:[{decimals:Vn.decimals,symbol:Vn.symbol,name:Vn.name}]})}return t}#Ye(e){const t={};for(const r of e)t[r]={fungible:Gn.fungible,name:Gn.name,symbol:Gn.symbol,iconUrl:Gn.iconUrl,units:[{decimals:Gn.decimals,symbol:Gn.symbol,name:Gn.name}]};return t}#Qe(e){const t={};for(const r of e)t[r]={fungible:Hn.fungible,name:Hn.name,symbol:Hn.symbol,iconUrl:Hn.iconUrl,units:[{decimals:Hn.decimals,symbol:Hn.symbol,name:Hn.name}]};return t}#Xe(e){const t={};for(const r of e)t[r]={fungible:Kn.fungible,name:Kn.name,symbol:Kn.symbol,iconUrl:Kn.iconUrl,units:[{decimals:Kn.decimals,symbol:Kn.symbol,name:Kn.name}]};return t}#rt(e){const t={};for(const r of e)t[r]={fungible:qn.fungible,name:qn.name,symbol:qn.symbol,iconUrl:qn.iconUrl,units:[{decimals:qn.decimals,symbol:qn.symbol,name:qn.name}]};return t}#nt(e){const t={};for(const r of e)t[r]={fungible:Zn.fungible,name:Zn.name,symbol:Zn.symbol,iconUrl:Zn.iconUrl,units:[{decimals:Zn.decimals,symbol:Zn.symbol,name:Zn.name}]};return t}#et(e){const t={};for(const r of e)t[r]={fungible:Jn.fungible,name:Jn.name,symbol:Jn.symbol,iconUrl:Jn.iconUrl,units:[{decimals:Jn.decimals,symbol:Jn.symbol,name:Jn.name}]};return t}#tt(e){const t={};for(const r of e)t[r]={fungible:Yn.fungible,name:Yn.name,symbol:Yn.symbol,iconUrl:Yn.iconUrl,units:[{decimals:Yn.decimals,symbol:Yn.symbol,name:Yn.name}]};return t}async#ot(e){return this.#Oe.getTokensMetadata(e)}static hasChanged(e,t){const r=t.find(t=>t.keyringAccountId===e.keyringAccountId&&t.assetType===e.assetType);return!r||r.rawAmount!==e.rawAmount}async saveMany(e){this.#ne.info(\"Saving assets\",e);const t=e=>\"0\"===e.rawAmount||\"0\"===e.uiAmount,r=await this.getAll(),n=e=>to.includes(e.assetType),o=e.reduce((e,t)=>(e[t.keyringAccountId]??=new Set,e[t.keyringAccountId]?.add(t.network),e),{}),s=new Set(e.map(e=>`${e.keyringAccountId}:${e.assetType}`)),a=r.filter(e=>{const t=o[e.keyringAccountId];return!(!t?.has(e.network)||n(e))&&!s.has(`${e.keyringAccountId}:${e.assetType}`)}),i=e=>t(e)&&!n(e),c=e=>!i(e)&&!0,u=a.reduce((e,t)=>({...e,[t.keyringAccountId]:{added:[...e[t.keyringAccountId]?.added??[]],removed:[...e[t.keyringAccountId]?.removed??[],t.assetType]}}),{});for(const t of e)u[t.keyringAccountId]={added:[...u[t.keyringAccountId]?.added??[],...c(t)?[t.assetType]:[]],removed:[...u[t.keyringAccountId]?.removed??[],...i(t)?[t.assetType]:[]]};Object.values(u).map(e=>e.added.length+e.removed.length).every(e=>0===e)||await ZB(snap,gn.AccountAssetListUpdated,{assets:u});const l=a.map(e=>({...e,rawAmount:\"0\",uiAmount:\"0\"})),d=[...e,...l].filter(e=>!0);await this.#Se.saveMany(d);const f=d.reduce((e,t)=>({...e,[t.keyringAccountId]:{...e[t.keyringAccountId]??{},[t.assetType]:{unit:t.symbol,amount:t.uiAmount}}}),{});Object.values(f).map(e=>Object.keys(e).length).some(e=>e>0)&&await ZB(snap,gn.AccountBalancesUpdated,{balances:f})}async getAll(){const e=await this.#Ie.getKey(\"assets\")??{};return Object.values(e).flat()}#st(e,t){const r=Xn[e],{chainId:n}=we(e);return{assetType:r.id,keyringAccountId:t,network:n,symbol:r.symbol,decimals:r.decimals,rawAmount:\"0\",uiAmount:\"0\"}}async getByKeyringAccountId(e){const t=await this.#Se.getByAccountId(e),r=[];for(const n of to){if(!t.find(e=>e.assetType===n)){const t=this.#st(n,e);r.push(t)}}return[...t,...r]}#at(e){if(!YI.isFiat(e))throw new Error(\"Passed caipAssetType is not a fiat asset\");return we(e).assetReference.toLowerCase()}async#it(e){const t=e.filter(e=>!YI.isFiat(e)),[r,n]=await Promise.all([this.#xe.getFiatExchangeRates(),this.#xe.getMultipleSpotPrices(t,\"usd\")]);return{fiatExchangeRates:r,cryptoPrices:n}}async getMultipleTokenConversions(e){if(0===e.length)return{};const t=e.flatMap(e=>[e.from,e.to]),{fiatExchangeRates:r,cryptoPrices:n}=await this.#it(t),o={};return e.forEach(e=>{const{from:t,to:s}=e;let a,i;if(o[t]??={},YI.isFiat(t)){const e=r[this.#at(t)]?.value;if(!e)return void(o[t][s]=null);a=new Mn(1).dividedBy(e)}else a=new Mn(n[t]?.price??0);if(YI.isFiat(s)){const e=r[this.#at(s)]?.value;if(!e)return void(o[t][s]=null);i=new Mn(1).dividedBy(e)}else i=new Mn(n[s]?.price??0);if(a.isZero()||i.isZero())return void(o[t][s]=null);const c=a.dividedBy(i).toString(),u=Date.now();o[t][s]={rate:c,conversionTime:u,expirationTime:u+this.cacheTtlsMilliseconds.historicalPrices}}),o}#ct(e,t){const r=(0,Te.pick)(e,[\"marketCap\",\"totalVolume\",\"circulatingSupply\",\"allTimeHigh\",\"allTimeLow\",\"pricePercentChange1h\",\"pricePercentChange1d\",\"pricePercentChange7d\",\"pricePercentChange14d\",\"pricePercentChange30d\",\"pricePercentChange200d\",\"pricePercentChange1y\"]),n=e=>null==e?\"\":new Mn(e).dividedBy(t).toString(),o=(e,t)=>null==t?{}:{[e]:t},s={...o(\"PT1H\",r.pricePercentChange1h),...o(\"P1D\",r.pricePercentChange1d),...o(\"P7D\",r.pricePercentChange7d),...o(\"P14D\",r.pricePercentChange14d),...o(\"P30D\",r.pricePercentChange30d),...o(\"P200D\",r.pricePercentChange200d),...o(\"P1Y\",r.pricePercentChange1y)};return{fungible:!0,marketCap:n(r.marketCap),totalVolume:n(r.totalVolume),circulatingSupply:(r.circulatingSupply??0).toString(),allTimeHigh:n(r.allTimeHigh),allTimeLow:n(r.allTimeLow),...Object.keys(s).length>0?{pricePercentChange:s}:{}}}async getMultipleTokensMarketData(e){if(0===e.length)return{};const t=e.flatMap(e=>[e.asset,e.unit]),{fiatExchangeRates:r,cryptoPrices:n}=await this.#it(t),o={};return e.forEach(e=>{const{asset:t,unit:s}=e;if(!n[t])return;let a;if(YI.isFiat(s)){const e=r[this.#at(s)]?.value;if(!e)return;a=new Mn(1).dividedBy(e)}else a=new Mn(n[s]?.price??0);a.isZero()||(o[t]??={},o[t][s]=this.#ct(n[t],a))}),o}async getHistoricalPrice(e,t){O(e,ge),O(t,ge);const r=we(t).assetReference.toLowerCase();O(r,_e);const n=[\"1d\",\"7d\",\"1m\",\"3m\",\"1y\",\"1000y\"].map(async n=>this.#xe.getHistoricalPrices({assetType:e,timePeriod:n,vsCurrency:r}).then(e=>({timePeriod:n,response:e})).catch(r=>(this.#ne.warn(`Error fetching historical prices for ${e} to ${t} with time period ${n}. Returning null object.`,r),{timePeriod:n,response:Oe}))),o=(await Promise.all(n)).reduce((e,{timePeriod:t,response:r})=>(e[`P${t.toUpperCase()}`]=r.prices.map(e=>[e[0],e[1].toString()]),e),{}),s=Date.now();return{intervals:o,updateTime:s,expirationTime:s+this.cacheTtlsMilliseconds.historicalPrices}}}var XI;!function(e){e[e.Millisecond=1]=\"Millisecond\",e[e.Second=1e3]=\"Second\",e[e.Minute=6e4]=\"Minute\",e[e.Hour=36e5]=\"Hour\",e[e.Day=864e5]=\"Day\",e[e.Week=6048e5]=\"Week\",e[e.Year=31536e6]=\"Year\"}(XI=XI||(XI={}));const QI={production:[Ln.Mainnet],local:[Ln.Mainnet],test:[Ln.Mainnet]},e_=Tt(D(AA),Y(),e=>e.split(\",\")),t_=K({ENVIRONMENT:$([\"local\",\"test\",\"production\"]),RPC_URL_LIST_MAINNET:e_,RPC_URL_LIST_NILE_TESTNET:e_,RPC_URL_LIST_SHASTA_TESTNET:e_,EXPLORER_MAINNET_BASE_URL:AA,EXPLORER_NILE_BASE_URL:AA,EXPLORER_SHASTA_BASE_URL:AA,PRICE_API_BASE_URL:AA,TOKEN_API_BASE_URL:AA,STATIC_API_BASE_URL:AA,SECURITY_ALERTS_API_BASE_URL:AA,NFT_API_BASE_URL:AA,LOCAL_API_BASE_URL:Y(),TRONGRID_BASE_URL_MAINNET:AA,TRONGRID_BASE_URL_NILE:AA,TRONGRID_BASE_URL_SHASTA:AA,TRON_HTTP_BASE_URL_MAINNET:AA,TRON_HTTP_BASE_URL_NILE:AA,TRON_HTTP_BASE_URL_SHASTA:AA});const r_=e=>{if(e in Xn)return Xn[e].iconUrl},n_=({message:e,account:t,scope:r,locale:n,networkImage:o,origin:s})=>{const a=AB(n),{address:i}=t,c=`${r}:${i}`;return ZC(sB,{children:[ZC(eB,{children:[ZC(eB,{alignment:\"center\",center:!0,children:[qC(eB,{children:null}),qC(aB,{size:\"lg\",children:a(\"confirmation.signMessage.title\")}),qC(eB,{children:null})]}),ZC(QC,{children:[qC(tB,{fontWeight:\"medium\",children:a(\"confirmation.signMessage.message\")}),qC(tB,{children:e})]}),ZC(QC,{children:[s?ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[ZC(eB,{direction:\"horizontal\",alignment:\"start\",children:[qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:a(\"confirmation.origin\")}),qC(rB,{content:a(\"confirmation.origin.tooltip\"),children:qC(oB,{name:\"question\",color:\"muted\"})})]}),qC(tB,{children:s})]}):null,ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:a(\"confirmation.account\")}),qC(iB,{address:c,truncate:!0,displayName:!0,avatar:!0})]}),ZC(eB,{alignment:\"space-between\",direction:\"horizontal\",children:[qC(tB,{fontWeight:\"medium\",color:\"alternative\",children:a(\"confirmation.network\")}),ZC(eB,{direction:\"horizontal\",alignment:\"end\",children:[qC(cB,{borderRadius:\"medium\",src:o??yB,height:16,width:16}),qC(tB,{children:Qn[r].name})]})]})]})]}),ZC(uB,{children:[qC(lB,{name:iW.Cancel,children:a(\"confirmation.cancelButton\")}),qC(lB,{name:iW.Confirm,children:a(\"confirmation.confirmButton\")})]})]})};var o_=r(1048).hp;const s_={scope:Ln.Mainnet,account:null,transaction:{rawDataHex:\"\",type:\"\"},origin:\"\",networkImage:yB,scan:null,scanFetchStatus:JC.Initial,tokenPrices:{},tokenPricesFetchStatus:JC.Initial,fees:[],feesFetchStatus:JC.Initial,preferences:{locale:\"en\",currency:\"usd\",hideBalances:!1,useSecurityAlerts:!0,useExternalPricingData:!0,simulateOnChainActions:!0,useTokenDetection:!0,batchCheckBalances:!0,displayNftMedia:!1,useNftDetection:!1}};const a_={scope:Ln.Mainnet,fromAddress:null,toAddress:null,amount:null,fees:[],asset:{assetType:`${Ln.Mainnet}/slip44:195`,keyringAccountId:\"\",network:Ln.Mainnet,symbol:\"TRX\",decimals:6,rawAmount:\"0\",uiAmount:\"0\",iconUrl:\"\"},origin:\"MetaMask\",networkImage:yB,tokenPrices:{},tokenPricesFetchStatus:JC.Initial,scan:null,scanFetchStatus:JC.Initial,transactionRawData:null,accountType:\"\",preferences:{locale:\"en\",currency:\"usd\",hideBalances:!1,useSecurityAlerts:!0,useExternalPricingData:!0,simulateOnChainActions:!0,useTokenDetection:!0,batchCheckBalances:!0,displayNftMedia:!1,useNftDetection:!1}};var i_=r(1048).hp;const c_=new Set([\"FreezeBalanceContract\",\"FreezeBalanceV2Contract\",\"UnfreezeBalanceContract\",\"UnfreezeBalanceV2Contract\",\"WithdrawExpireUnfreezeContract\",\"CancelAllUnfreezeV2Contract\",\"DelegateResourceContract\",\"UnDelegateResourceContract\",\"VoteWitnessContract\",\"AccountCreateContract\",\"AccountUpdateContract\",\"AccountPermissionUpdateContract\",\"SetAccountIdContract\",\"WitnessCreateContract\",\"WitnessUpdateContract\",\"UpdateBrokerageContract\",\"AssetIssueContract\",\"ParticipateAssetIssueContract\",\"UnfreezeAssetContract\",\"UpdateAssetContract\",\"ProposalCreateContract\",\"ProposalApproveContract\",\"ProposalDeleteContract\",\"ExchangeCreateContract\",\"ExchangeInjectContract\",\"ExchangeWithdrawContract\",\"ExchangeTransactionContract\",\"ClearABIContract\",\"UpdateSettingContract\",\"UpdateEnergyLimitContract\",\"WithdrawBalanceContract\",\"ShieldedTransferContract\"]);async function u_({accountsService:e,tronWebFactory:t,snapClient:r,account:n,scope:o,buildTransactions:s}){const{privateKeyHex:a}=await e.deriveTronKeypair({entropySource:n.entropySource,derivationPath:n.derivationPath}),i=t.createClient(o,a),c=await s(i);for(const e of c){const t=await i.trx.sign(e);await i.trx.sendRawTransaction(t)}await r.scheduleBackgroundEvent({method:jB.SynchronizeAccount,params:{accountId:n.id},duration:\"PT5S\"})}new Error(\"timeout while waiting for mutex to become available\"),new Error(\"mutex already locked\");const l_=new Error(\"request for lock canceled\");var d_=function(e,t,r,n){return new(r||(r=Promise))(function(o,s){function a(e){try{c(n.next(e))}catch(e){s(e)}}function i(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,i)}c((n=n.apply(e,t||[])).next())})};class f_{constructor(e,t=l_){this._value=e,this._cancelError=t,this._queue=[],this._weightedWaiters=[]}acquire(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((r,n)=>{const o={resolve:r,reject:n,weight:e,priority:t},s=p_(this._queue,e=>t<=e.priority);-1===s&&e<=this._value?this._dispatchItem(o):this._queue.splice(s+1,0,o)})}runExclusive(e){return d_(this,arguments,void 0,function*(e,t=1,r=0){const[n,o]=yield this.acquire(t,r);try{return yield e(n)}finally{o()}})}waitForUnlock(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,t)?Promise.resolve():new Promise(r=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),function(e,t){const r=p_(e,e=>t.priority<=e.priority);e.splice(r+1,0,t)}(this._weightedWaiters[e-1],{resolve:r,priority:t})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const t=this._value;this._value-=e.weight,e.resolve([t,this._newReleaser(e.weight)])}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let e=this._value;e>0;e--){const t=this._weightedWaiters[e-1];t&&(t.forEach(e=>e.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let t=this._value;t>0;t--){const r=this._weightedWaiters[t-1];if(!r)continue;const n=r.findIndex(t=>t.priority<=e);(-1===n?r:r.splice(0,n)).forEach(e=>e.resolve())}}}_couldLockImmediately(e,t){return(0===this._queue.length||this._queue[0].priority<t)&&e<=this._value}}function p_(e,t){for(let r=e.length-1;r>=0;r--)if(t(e[r]))return r;return-1}var h_=function(e,t,r,n){return new(r||(r=Promise))(function(o,s){function a(e){try{c(n.next(e))}catch(e){s(e)}}function i(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,i)}c((n=n.apply(e,t||[])).next())})};class g_{constructor(e){this._semaphore=new f_(1,e)}acquire(){return h_(this,arguments,void 0,function*(e=0){const[,t]=yield this._semaphore.acquire(1,e);return t})}runExclusive(e,t=0){return this._semaphore.runExclusive(()=>e(),1,t)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}const y_=e=>JSON.parse(JSON.stringify(e),(e,t)=>{if(!t)return t;if(\"undefined\"!==t.__type){if(\"BigNumber\"===t.__type)return new Mn(t.value);if(\"bigint\"===t.__type)return BigInt(t.value);if(\"Uint8Array\"===t.__type){const e=atob(t.value),r=new Uint8Array(e.length);for(let t=0;t<e.length;t++)r[t]=e.charCodeAt(t);return r}return t}}),m_=e=>(0,Te.cloneDeepWith)(e,e=>{if(void 0===e)return{__type:\"undefined\"};if(e instanceof Mn)return{__type:\"BigNumber\",value:e.toString()};if(\"bigint\"==typeof e)return{__type:\"bigint\",value:e.toString()};if(e instanceof Uint8Array){let t=\"\";for(const r of e)t+=String.fromCharCode(r);return{__type:\"Uint8Array\",value:btoa(t)}}});class b_{#ut=new g_;#lt=new g_;#dt=0;#ft=null;async#pt(){this.#lt.isLocked()||(this.#ft=await this.#lt.acquire())}async wrapRegularStateOperation(e){await Promise.all([this.#ut.waitForUnlock(),this.#pt()]);try{return this.#dt+=1,await e()}finally{this.#dt-=1,0===this.#dt&&this.#ft&&this.#ft()}}async wrapManageStateOperation(e){return await this.#lt.waitForUnlock(),await this.#ut.runExclusive(e)}}const w_=\"Unable to refresh transaction metadata before signing. Please rebuild the transaction and try again.\",T_=65536,A_=864e5;function v_(e,t){const{number:r,timestamp:n}=t.block_header.raw_data;return{...e,ref_block_bytes:P_(r),ref_block_hash:E_(t),expiration:n+6e4,timestamp:n}}function P_(e){return e.toString(16).slice(-4).padStart(4,\"0\")}function E_(e){return e.blockID.slice(16,32).toLowerCase()}const C_=(e,t)=>{const{to:r,type:n}=e,{address:o}=t;if(!(n===fr.Receive))return!1;const{hasReceivedTRX:s,receivedTRXAmount:a}=r.reduce((e,t)=>t.address!==o||!t.asset?.fungible||t.asset.type!==String($n.TrxMainnet)&&t.asset.type!==String($n.TrxNile)&&t.asset.type!==String($n.TrxShasta)?e:{hasReceivedTRX:!0,receivedTRXAmount:e.receivedTRXAmount.plus(t.asset.amount)},{hasReceivedTRX:!1,receivedTRXAmount:new Mn(0)});return s&&a.isLessThan(.001)};var B_=r(1048).hp;const W_=new class{#ht;constructor(){const e=this.#gt();this.#ht=this.#yt(e)}#gt(){return M({ENVIRONMENT:\"production\",RPC_URL_LIST_MAINNET:\"https://tron-mainnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d\",RPC_URL_LIST_NILE_TESTNET:\"https://nile.trongrid.io\",RPC_URL_LIST_SHASTA_TESTNET:\"https://api.shasta.trongrid.io/jsonrpc\",EXPLORER_MAINNET_BASE_URL:\"https://tronscan.org\",EXPLORER_NILE_BASE_URL:\"https://nile.tronscan.org\",EXPLORER_SHASTA_BASE_URL:\"https://shasta.tronscan.org\",PRICE_API_BASE_URL:\"https://price.api.cx.metamask.io\",TOKEN_API_BASE_URL:\"https://tokens.api.cx.metamask.io\",STATIC_API_BASE_URL:\"https://static.cx.metamask.io\",SECURITY_ALERTS_API_BASE_URL:\"https://security-alerts.api.cx.metamask.io\",NFT_API_BASE_URL:\"https://nft.api.cx.metamask.io\",LOCAL_API_BASE_URL:\"http://localhost:8899\",TRONGRID_BASE_URL_MAINNET:\"https://tron-mainnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d\",TRONGRID_BASE_URL_NILE:\"https://nile.api.trongrid.io\",TRONGRID_BASE_URL_SHASTA:\"https://shasta.api.trongrid.io\",TRON_HTTP_BASE_URL_MAINNET:\"https://tron-mainnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d\",TRON_HTTP_BASE_URL_NILE:\"https://nile.trongrid.io\",TRON_HTTP_BASE_URL_SHASTA:\"https://shasta.trongrid.io\"},t_)}#yt(e){return{environment:e.ENVIRONMENT,networks:[{...Qn[Ln.Mainnet],rpcUrls:e.RPC_URL_LIST_MAINNET,explorerBaseUrl:e.EXPLORER_MAINNET_BASE_URL},{...Qn[Ln.Nile],rpcUrls:e.RPC_URL_LIST_NILE_TESTNET,explorerBaseUrl:e.EXPLORER_NILE_BASE_URL},{...Qn[Ln.Shasta],rpcUrls:e.RPC_URL_LIST_SHASTA_TESTNET,explorerBaseUrl:e.EXPLORER_SHASTA_BASE_URL}],activeNetworks:QI[e.ENVIRONMENT],priceApi:{baseUrl:\"test\"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.PRICE_API_BASE_URL,chunkSize:50,cacheTtlsMilliseconds:{fiatExchangeRates:XI.Minute,spotPrices:XI.Minute,historicalPrices:XI.Minute}},tokenApi:{baseUrl:\"test\"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.TOKEN_API_BASE_URL,chunkSize:50},staticApi:{baseUrl:e.STATIC_API_BASE_URL},transactions:{storageLimit:10},securityAlertsApi:{baseUrl:\"test\"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.SECURITY_ALERTS_API_BASE_URL},nftApi:{baseUrl:\"test\"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.NFT_API_BASE_URL,cacheTtlsMilliseconds:{listAddressSolanaNfts:XI.Minute,getNftMetadata:XI.Minute}},trongridApi:{baseUrls:{[Ln.Mainnet]:e.TRONGRID_BASE_URL_MAINNET,[Ln.Nile]:e.TRONGRID_BASE_URL_NILE,[Ln.Shasta]:e.TRONGRID_BASE_URL_SHASTA}},tronHttpApi:{baseUrls:{[Ln.Mainnet]:e.TRON_HTTP_BASE_URL_MAINNET,[Ln.Nile]:e.TRON_HTTP_BASE_URL_NILE,[Ln.Shasta]:e.TRON_HTTP_BASE_URL_SHASTA}}}}get(){return this.#ht}getNetworkBy(e,t){const r=this.get().networks.find(r=>r[e]===t);if(!r)throw new Error(`Network ${e} not found`);return r}},S_=new class{#mt=new b_;#ht;constructor(e){this.#ht=e}async#bt(){const e=await snap.request({method:\"snap_getState\",params:{encrypted:this.#ht.encrypted}}),t=y_(e??{});var r,n;return r=this.#ht.defaultState,n=t,{...r,...Object.fromEntries(Object.entries(n).filter(([e,t])=>null!=t&&(!t||\"object\"!=typeof t||Object.keys(t).length>0)))}}async get(){return this.#mt.wrapRegularStateOperation(async()=>this.#bt())}async getKey(e){return this.#mt.wrapRegularStateOperation(async()=>{const t=await snap.request({method:\"snap_getState\",params:{key:e,encrypted:this.#ht.encrypted}});if(null!==t)return y_(t)})}async setKey(e,t){await this.#mt.wrapRegularStateOperation(async()=>{await snap.request({method:\"snap_setState\",params:{key:e,value:m_(t),encrypted:this.#ht.encrypted}})})}async update(e){return await this.#mt.wrapManageStateOperation(async()=>{const t=await this.#bt(),r=e(t);return await snap.request({method:\"snap_manageState\",params:{operation:\"update\",newState:m_(r),encrypted:this.#ht.encrypted}}),r})}async deleteKey(e){await this.update(t=>((0,Te.unset)(t,e),t))}async deleteKeys(e){await this.update(t=>(e.forEach(e=>{(0,Te.unset)(t,e)}),t))}}({encrypted:!1,defaultState:{keyringAccounts:{},assets:{},tokenPrices:{},transactions:{},mapInterfaceNameToId:{}}}),I_=new class{#ne;constructor({logger:e}){this.#ne=ke(e,\"[📡 SnapClient]\")}async getBip32Entropy({entropySource:e,path:t,curve:r}){return snap.request({method:\"snap_getBip32Entropy\",params:{path:t,curve:r,...e?{source:e}:{}}})}async createInterface(e,t){return snap.request({method:\"snap_createInterface\",params:{ui:e,context:t}})}async updateInterface(e,t,r){return snap.request({method:\"snap_updateInterface\",params:{id:e,ui:t,context:r}})}async getInterfaceContext(e){const t=await snap.request({method:\"snap_getInterfaceContext\",params:{id:e}});return t||null}async resolveInterface(e,t){return snap.request({method:\"snap_resolveInterface\",params:{id:e,value:t}})}async showDialog(e){return snap.request({method:\"snap_dialog\",params:{id:e}})}async getPreferences(){return snap.request({method:\"snap_getPreferences\"})}async getClientStatus(){return snap.request({method:\"snap_getClientStatus\"})}async scheduleBackgroundEvent({method:e,params:t={},duration:r}){return snap.request({method:\"snap_scheduleBackgroundEvent\",params:{duration:r,request:{method:e,params:t}}})}async listEntropySources(){return snap.request({method:\"snap_listEntropySources\"})}async trackEvent(e,t){try{await snap.request({method:\"snap_trackEvent\",params:{event:{event:e,properties:t}}})}catch{}}async trackError(e){try{return await snap.request({method:\"snap_trackError\",params:{error:FP(e)}})}catch(e){return void this.#ne.warn({rpcError:e},\"Failed to track error via snap_trackError\")}}async trackTransactionAdded(e){await this.trackEvent(oE.TransactionAdded,{message:\"Snap transaction added\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackTransactionRejected(e){await this.trackEvent(oE.TransactionRejected,{message:\"Snap transaction rejected\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackTransactionSubmitted(e){await this.trackEvent(oE.TransactionSubmitted,{message:\"Snap transaction submitted\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackTransactionApproved(e){await this.trackEvent(oE.TransactionApproved,{message:\"Snap transaction approved\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackTransactionFinalized(e){await this.trackEvent(oE.TransactionFinalized,{message:\"Snap transaction finalized\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackSecurityAlertDetected(e){await this.trackEvent(sE.SecurityAlertDetected,{message:\"Snap security alert detected\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip,security_alert_response:e.securityAlertResponse,security_alert_reason:e.securityAlertReason,security_alert_description:e.securityAlertDescription})}async trackSecurityScanCompleted(e){await this.trackEvent(sE.SecurityScanCompleted,{message:\"Snap security scan completed\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip,scan_status:e.scanStatus,has_security_alerts:e.hasSecurityAlerts})}}({logger:Ne}),__=new class{#wt=\"keyringAccounts\";#Ie;constructor(e){this.#Ie=e}async getAll(){const e=await this.#Ie.getKey(this.#wt);return Object.values(e??{})}async findById(e){return(await this.getAll()).find(t=>t.id===e)??null}async findByIds(e){return(await this.getAll()).filter(t=>e.includes(t.id))}async findByAddress(e){return(await this.getAll()).find(t=>t.address===e)??null}async create(e){return await this.#Ie.setKey(`${this.#wt}.${e.id}`,e),e}async delete(e){await Promise.all([this.#Ie.deleteKey(`${this.#wt}.${e}`),this.#Ie.deleteKey(`assets.${e}`),this.#Ie.deleteKey(`transactions.${e}`)])}}(S_),R_=new class{#Ie;constructor(e){this.#Ie=e}async getByAccountId(e){return await this.#Ie.getKey(`assets.${e}`)??[]}async getByAccountIdAndAssetType(e,t){return(await this.getByAccountId(e)).find(e=>e.assetType===t)??null}async getByAccountIdAndAssetTypes(e,t){const r=await this.getByAccountId(e),n=[];for(const e of t){const t=r.find(t=>t.assetType===e);n.push(t??null)}return n}async getAll(){const e=await this.#Ie.getKey(\"assets\")??{};return Object.values(e).flat()}async saveMany(e){await this.#Ie.update(t=>{const r=(0,Te.cloneDeep)(t);for(const t of e){const{keyringAccountId:e}=t,n=(0,Te.cloneDeep)(r.assets[e]??[]),o=n.findIndex(e=>e.assetType===t.assetType&&e.keyringAccountId===t.keyringAccountId);-1===o?n.push(t):n[o]=t,r.assets[e]=n}return r})}}(S_),x_=new class{#Ie;#Tt=\"transactions\";constructor(e){this.#Ie=e}async getAll(){const e=await this.#Ie.getKey(this.#Tt);return Object.values(e??{}).flat()}async findByAccountId(e){return await this.#Ie.getKey(`${this.#Tt}.${e}`)??[]}async getTransactionIdsByAccountId(e){const t=await this.#Ie.getKey(`${this.#Tt}.${e}`);return new Set((t??[]).map(e=>e.id))}async getConfirmedTransactionIds(e){const t=await this.#Ie.getKey(`${this.#Tt}.${e}`);return new Set((t??[]).filter(e=>e.status!==dr.Unconfirmed).map(e=>e.id))}async save(e){await this.saveMany([e])}async saveMany(e){await this.#Ie.update(t=>{const r=t[this.#Tt];return e.forEach(e=>{const n=e.id,o=e.account,s=r[o]??[],a=s.findIndex(e=>e.id===n);-1!==a&&(s[a]=e);const i=(0,Te.chain)([...s,e]).uniqBy(\"id\").sortBy(e=>-(e.timestamp??0)).value();t[this.#Tt][o]=i}),t})}}(S_),O_=new class{#At=new Map;constructor({configProvider:e}){const{baseUrls:t}=e.get().tronHttpApi;Object.entries(t).forEach(([e,t])=>{this.#At.set(e,{baseUrl:t,headers:{\"Content-Type\":\"application/json\",\"Access-Control-Allow-Headers\":\"*\",\"Access-Control-Allow-Origin\":\"*\"}})})}async getTRC10TokenById(e,t){const r=this.#At.get(t);if(!r)throw new Error(`No client configured for network: ${t}`);const{baseUrl:n,headers:o}=r,s=jA({baseUrl:n,path:\"/wallet/getassetissuebyid\"}),a=JSON.stringify({value:e}),i=await fetch(s,{method:\"POST\",headers:o,body:a});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const c=await i.json();return O(c,uE),c}async getTRC10TokenMetadata(e,t){const r=await this.getTRC10TokenById(e,t);return{name:EE(r.name),symbol:EE(r.abbr),decimals:r.precision}}async getAccountResources(e,t){const r=this.#At.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=jA({baseUrl:n,path:\"/wallet/getaccountresource\"}),a=JSON.stringify({address:t,visible:!0}),i=await fetch(s,{method:\"POST\",headers:o,body:a});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const c=await i.json();return O(c,lE),c}async getTransactionInfoById(e,t){const r=this.#At.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=jA({baseUrl:n,path:\"/wallet/gettransactioninfobyid\"}),a=JSON.stringify({value:t}),i=await fetch(s,{method:\"POST\",headers:o,body:a});if(!i.ok){if(404===i.status)return null;throw new Error(`HTTP error! status: ${i.status}`)}const c=await i.json();return c?.id&&c?.blockNumber?(O(c,hE),c):null}async getNextMaintenanceTime(e){const t=this.#At.get(e);if(!t)throw new Error(`No client configured for network: ${e}`);const{baseUrl:r,headers:n}=t,o=jA({baseUrl:r,path:\"/wallet/getnextmaintenancetime\"}),s=await fetch(o,{method:\"POST\",headers:n});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const a=await s.json();return O(a,gE),a.num}async getChainParameters(e){const t=this.#At.get(e);if(!t)throw new Error(`No client configured for network: ${e}`);const{baseUrl:r,headers:n}=t,o=jA({baseUrl:r,path:\"/wallet/getchainparameters\"}),s=await fetch(o,{headers:n});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const a=await s.json();if(O(a,mE),!a.chainParameter)throw new Error(\"No chain parameters found\");for(const e of a.chainParameter)O(e,yE);return a.chainParameter}async triggerConstantContract(e,t){const r=this.#At.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=jA({baseUrl:n,path:\"/wallet/triggerconstantcontract\"}),a=await fetch(s,{method:\"POST\",headers:o,body:JSON.stringify(Object.fromEntries(Object.entries(t).filter(([e,t])=>null!=t)))});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const i=await a.json();return O(i,AE),i}async getContract(e,t){const r=this.#At.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=jA({baseUrl:n,path:\"/wallet/getcontract\"}),a=JSON.stringify({value:t,visible:!1}),i=await fetch(s,{method:\"POST\",headers:o,body:a});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const c=await i.json();return c&&0!==Object.keys(c).length?(O(c,vE),c):null}async getReward(e,t){const r=this.#At.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=jA({baseUrl:n,path:\"/wallet/getReward\"}),a=JSON.stringify({address:t,visible:!0}),i=await fetch(s,{method:\"POST\",headers:o,body:a});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const c=await i.json();return O(c,PE),c.reward??0}}({configProvider:W_}),M_=new class{#Ie;prefix;logger;constructor(e,t=console,r=\"__cache__default\"){this.#Ie=e,this.logger=t,this.prefix=r}async get(e){return(await this.mget([e]))[e]}async set(e,t,r=Number.MAX_SAFE_INTEGER){this.#vt(r),await this.#Ie.setKey(`${this.prefix}.${e}`,{value:t,expiresAt:Math.min(Date.now()+(r??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})}#vt(e){if(void 0!==e){if(\"number\"!=typeof e)throw new Error(\"TTL must be a number\");if(e<0)throw new Error(\"TTL must be positive\");if(e>Number.MAX_SAFE_INTEGER)throw new Error(\"TTL must be less than 2^53 - 1\")}}async delete(e){return(await this.mdelete([e]))[e]??!1}async clear(){await this.#Ie.setKey(this.prefix,{})}async has(e){return void 0!==await this.get(e)}async keys(){const e=await this.#Ie.getKey(this.prefix);return Object.keys(e??{})}async size(){const e=await this.#Ie.getKey(this.prefix);return Object.keys(e??{}).length}async peek(e){const t=await this.#Ie.getKey(this.prefix),r=t?.[e];return r?.value}async mget(e){const t=await this.#Ie.getKey(this.prefix);if(!t)return{};const r=Object.entries(t).filter(([t])=>e.includes(t)),n=r.filter(([e,t])=>t&&t.expiresAt<Date.now());await this.mdelete(n.map(([e])=>e));const o={};return r.forEach(([e,t])=>{if(void 0===t)return this.logger.info(`[StateCache] ❌ Cache miss for key \"${e}\"`),void(o[e]=void 0);t.expiresAt<Date.now()?(this.logger.info(`[StateCache] ⌛ Cache expired for key \"${e}\"`),o[e]=void 0):(this.logger.info(`[StateCache] 🎉 Cache hit for key \"${e}\"`),o[e]=t.value)}),e.forEach(e=>{e in o||(this.logger.info(`[StateCache] ❌ Cache miss for key \"${e}\"`),o[e]=void 0)}),o}async mset(e){if(0!==e.length){if(1===e.length){P(e[0]);const{key:t,value:r,ttlMilliseconds:n}=e[0];return void await this.set(t,r,n)}e.forEach(({ttlMilliseconds:e})=>{this.#vt(e)}),await this.#Ie.update(t=>{const r=t[this.prefix]??{};return e.forEach(({key:e,value:t,ttlMilliseconds:n})=>{void 0!==t&&(r[e]={value:t,expiresAt:Math.min(Date.now()+(n??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})}),t[this.prefix]=r,t})}}async mdelete(e){const t={};return await this.#Ie.update(r=>{const n=r[this.prefix]??{};return e.forEach(e=>{void 0===n[e]?t[e]=!1:(delete n[e],t[e]=!0)}),r[this.prefix]=n,r}),t}}(S_,Fe,\"__cache__trongrid\"),F_=new class{#At=new Map;#Re;#Pt;#Et;constructor({configProvider:e,tronHttpClient:t,cache:r}){const{baseUrls:n}=e.get().trongridApi;Object.entries(n).forEach(([e,t])=>{this.#At.set(e,{baseUrl:t,headers:{\"Content-Type\":\"application/json\",\"Access-Control-Allow-Headers\":\"*\",\"Access-Control-Allow-Origin\":\"*\"}})}),this.#Re=t,this.#Pt=r,this.#Et=((e,t,{functionName:r,generateCacheKey:n})=>{const o=n??KE,s=r??e.name??\"anonymousFunction\",a=new Map;return async(...r)=>{const n=o(s,r),i=Date.now(),c=a.get(n);if(void 0!==c&&i<c)try{const e=await t.get(n);if(void 0!==e)return e}catch(e){Ne.error(`Cache get error for key \"${n}\":`,e)}const{result:u,expiresAt:l}=await e(...r),d=Math.max(0,l-i);return await t.set(n,u,d).catch(e=>{Ne.error(`Cache set error for key \"${n}\":`,e)}),a.set(n,l),u}})(this.#Ct.bind(this),this.#Pt,{functionName:\"TrongridApiClient:getChainParameters\"})}async getAccountInfoByAddress(e,t){const r=this.#At.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=jA({baseUrl:n,path:\"/v1/accounts/{address}\",pathParams:{address:t}}),a=await fetch(s,{headers:o});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const i=await a.json();if(\"boolean\"!=typeof i.success||!i.success)throw new Error(\"API request failed\");if(O(i.meta,GE),!i.data||0===i.data.length)throw new Error(\"Account not found or no data returned\");const c=i.data[0];if(!c)throw new Error(\"No data\");return O(c,xE),c}async getTransactionInfoByAddress(e,t,r){const n=this.#At.get(e);if(!n)throw new Error(`No client configured for network: ${e}`);const{baseUrl:o,headers:s}=n,a=void 0===r?.limit?void 0:{limit:String(r.limit)},i=jA({baseUrl:o,path:\"/v1/accounts/{address}/transactions\",pathParams:{address:t},...a?{queryParams:a}:{}}),c=await fetch(i,{headers:s});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);const u=await c.json();if(\"boolean\"!=typeof u.success||!u.success)throw new Error(\"API request failed\");if(O(u.meta,GE),!u.data)throw new Error(\"API request failed\");for(const e of u.data)O(e,zE);return u.data}async getContractTransactionInfoByAddress(e,t){const r=this.#At.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=jA({baseUrl:n,path:\"/v1/accounts/{address}/transactions/trc20\",pathParams:{address:t}}),a=await fetch(s,{headers:o});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const i=await a.json();if(\"boolean\"!=typeof i.success||!i.success)throw new Error(\"API request failed\");if(O(i.meta,GE),!i.data)throw new Error(\"API request failed\");for(const e of i.data)O(e,VE);return i.data}async getTrc20BalancesByAddress(e,t){const r=this.#At.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=jA({baseUrl:n,path:\"/v1/accounts/{address}/trc20/balance\",pathParams:{address:t}}),a=await fetch(s,{headers:o});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const i=await a.json();if(\"boolean\"!=typeof i.success||!i.success)throw new Error(\"API request failed\");if(O(i.meta,GE),!i.data)return[];for(const e of i.data)O(e,HE);return i.data}async getChainParameters(e){return this.#Et(e)}async#Ct(e){const[t,r]=await Promise.all([this.#Re.getChainParameters(e),this.#Re.getNextMaintenanceTime(e)]);return{result:t,expiresAt:r}}}({configProvider:W_,tronHttpClient:O_,cache:M_}),k_=new class{#ve;constructor({configProvider:e}){this.#ve=e}createClient(e,t){const r=this.#ve.get(),{baseUrls:n}=r.trongridApi,o=n[e];if(!o)throw new Error(`No configuration found for network: ${e}`);const s={fullHost:o,...t&&{privateKey:t}};return new Lw(s)}}({configProvider:W_}),N_=new class{#Pt=new Map;logger;constructor(e){this.logger=e}#vt(e){if(void 0!==e){if(\"number\"!=typeof e)throw new Error(\"TTL must be a number\");if(e<0)throw new Error(\"TTL must be positive\");if(e>Number.MAX_SAFE_INTEGER)throw new Error(\"TTL must be less than 2^53 - 1\")}}#Bt(e){return e.expiresAt<Date.now()}async#Wt(){const e=[];for(const[t,r]of this.#Pt.entries())this.#Bt(r)&&e.push(t);await this.mdelete(e)}async get(e){return(await this.mget([e]))[e]}async set(e,t,r=Number.MAX_SAFE_INTEGER){this.#vt(r),this.#Pt.set(e,{value:t,expiresAt:Math.min(Date.now()+(r??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})}async delete(e){return(await this.mdelete([e]))[e]??!1}async clear(){this.#Pt.clear()}async has(e){const t=this.#Pt.get(e);return!!t&&(!this.#Bt(t)||(this.#Pt.delete(e),!1))}async keys(){return await this.#Wt(),Array.from(this.#Pt.keys())}async size(){return await this.#Wt(),this.#Pt.size}async peek(e){const t=this.#Pt.get(e);if(t){if(!this.#Bt(t))return t.value;this.#Pt.delete(e)}}async mget(e){await this.#Wt();const t={};for(const r of e){const e=this.#Pt.get(r);e?(this.logger.info(`[InMemoryCache] 🎉 Cache hit for key \"${r}\"`),t[r]=e.value):(this.logger.info(`[InMemoryCache] ❌ Cache miss for key \"${r}\"`),t[r]=void 0)}return t}async mset(e){if(0!==e.length){if(1===e.length){P(e[0]);const{key:t,value:r,ttlMilliseconds:n}=e[0];return void await this.set(t,r,n)}e.forEach(({ttlMilliseconds:e})=>{this.#vt(e)}),e.forEach(({key:e,value:t,ttlMilliseconds:r})=>{void 0!==t&&this.#Pt.set(e,{value:t,expiresAt:Math.min(Date.now()+(r??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})})}}async mdelete(e){return Object.fromEntries(e.map(e=>[e,this.#Pt.delete(e)]))}}(Fe),U_=new class{#re;#ne;#oe;#se;#Pt;cacheTtlsMilliseconds;constructor(e,t,r=globalThis.fetch,n=Ne){const{baseUrl:o,chunkSize:s,cacheTtlsMilliseconds:a}=e.get().priceApi;O(o,AA),this.#re=r,this.#ne=n,this.#oe=o,this.#se=s,this.cacheTtlsMilliseconds=a,this.#Pt=t}async getFiatExchangeRates(){try{const e=jA({baseUrl:this.#oe,path:\"/v1/exchange-rates/fiat\"}),t=await this.#re(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const r=await t.json();return O(r,We),r}catch(e){throw this.#ne.error(e,\"Error fetching fiat exchange rates\"),e}}async#St(e,t=\"usd\"){try{if(0===e.length)return{};const r=[...new Set(e)],n=[];for(let e=0;e<r.length;e+=this.#se)n.push(r.slice(e,e+this.#se));const o=await Promise.all(n.map(async e=>{const r=jA({baseUrl:this.#oe,path:\"/v3/spot-prices\",queryParams:{vsCurrency:t,assetIds:e.join(\",\"),includeMarketData:\"true\"}}),n=await this.#re(r);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const o=await n.json();return O(o,Ie),o})),s=o.reduce((e,t)=>({...e,...t}),{});return await this.#Pt.mset(e.map(e=>({key:`PriceApiClient:getMultipleSpotPrices:${e}:${t}`,value:s[e],ttlMilliseconds:this.cacheTtlsMilliseconds.spotPrices}))),s}catch(e){throw this.#ne.error(e,\"Error fetching spot prices\"),e}}async#It(e,t=\"usd\"){const r=[...new Set(e)],n=\"PriceApiClient:getMultipleSpotPrices\",o=e=>`${n}:${e}:${t}`,s=await this.#Pt.mget(r.map(o)),a=(0,Te.mapKeys)(s,(e,t)=>(e=>{const t=new RegExp(`^${n}:(.+):(.+)$`,\"u\"),r=e.match(t);if(!r)throw new Error(\"Invalid cache key\");return r})(t)[1]),i=r.filter(e=>void 0===a[e]);if(0===i.length)return a;const c=await this.#St(i,t);return await this.#Pt.mset(Object.entries(c).map(([e,t])=>({key:o(e),value:t,ttlMilliseconds:this.cacheTtlsMilliseconds.spotPrices}))),{...a,...c}}async getMultipleSpotPrices(e,t=\"usd\"){O(e,D(ge)),O(t,_e);const r=e.filter(e=>!eo.includes(e));return this.#It(r,t)}async#_t(e){const t=jA({baseUrl:this.#oe,path:\"/v3/historical-prices/{assetType}\",pathParams:{assetType:e.assetType},queryParams:{...e.timePeriod&&{timePeriod:e.timePeriod},...e.from&&{from:e.from.toString()},...e.to&&{to:e.to.toString()},...e.vsCurrency&&{vsCurrency:e.vsCurrency}},encodePathParams:!1}),r=await this.#re(t),n=await r.json();return O(n,xe),n}async getHistoricalPrices(e){return O(e,Re),((e,t,{ttlMilliseconds:r,functionName:n,generateCacheKey:o})=>{const s=o??Ue,a=n??e.name??\"anonymousFunction\";return async(...n)=>{const o=s(a,n);try{const e=await t.get(o);if(void 0!==e)return e}catch(e){Ne.error(`Cache get error for key \"${o}\":`,e)}const i=await e(...n);return t.set(o,i,r).catch(e=>{Ne.error(`Cache set error for key \"${o}\":`,e)}),i}})(this.#_t.bind(this),this.#Pt,{functionName:\"PriceApiClient:getHistoricalPrices\",ttlMilliseconds:this.cacheTtlsMilliseconds.historicalPrices})(e)}}(W_,N_),D_=new cE(W_),L_=new nE(W_,Ne),$_=new YI({logger:Ne,state:S_,assetsRepository:R_,trongridApiClient:F_,tronHttpClient:O_,priceApiClient:U_,tokenApiClient:D_}),z_=new class{#ne;#Rt;#_e;#Re;constructor({logger:e,transactionsRepository:t,trongridApiClient:r,tronHttpClient:n}){this.#ne=ke(e,\"[🧾 TransactionsService]\"),this.#Rt=t,this.#_e=r,this.#Re=n}async#xt(e,t){const r=t.map(async t=>{const r=\"TriggerSmartContract\"===t.raw_data.contract?.[0]?.type,n=!t.internal_transactions||0===t.internal_transactions.length,o=t.raw_data.contract?.[0]?.parameter?.value?.call_value>0;if(r&&n&&o){this.#ne.debug(`Attempting to enrich transaction ${t.txID} with full details for swap detection.`);try{const r=await this.#Re.getTransactionInfoById(e,t.txID);if(r)return{...t,internal_transactions:r.internal_transactions??[]}}catch(e){this.#ne.warn({txId:t.txID,error:e},`Failed to enrich transaction ${t.txID}`)}}return t});return(await Promise.allSettled(r)).map(e=>\"fulfilled\"===e.status?e.value:null).filter(Boolean)}async#Ot(e,t){const r=new Map,n=new Set;for(const e of t){const t=e.raw_data.contract?.[0];if(\"TransferAssetContract\"===t?.type){const e=t.parameter.value.asset_name;n.add(e)}}if(0===n.size)return r;this.#ne.debug(`Fetching metadata for ${n.size} TRC10 tokens...`);const o=Array.from(n).map(async t=>{try{return{tokenId:t,metadata:await this.#Re.getTRC10TokenMetadata(t,e)}}catch(e){return this.#ne.warn({tokenId:t,error:e},`Failed to fetch TRC10 token metadata for ${t}, will use default decimals`),null}}),s=await Promise.allSettled(o);for(const e of s)\"fulfilled\"===e.status&&e.value&&r.set(e.value.tokenId,e.value.metadata);return this.#ne.debug(`Successfully fetched metadata for ${r.size}/${n.size} TRC10 tokens.`),r}async fetchNewTransactionsForAccount(e,t){this.#ne.info(`Fetching new transactions for account ${t.address} on network ${e}...`);const r=await this.#Rt.getConfirmedTransactionIds(t.id);this.#ne.debug(`Found ${r.size} confirmed transactions in state for account ${t.id}.`);const{rawTransactions:n,trc20Transactions:o}=await this.#Mt(e,t.address);this.#ne.info(`Fetched ${n.length} raw transactions and ${o.length} TRC20 assistance data for account ${t.address} on network ${e}.`);const s=n.filter(e=>!r.has(e.txID));if(this.#ne.info(`Found ${s.length} transactions to process (${n.length-s.length} already confirmed in state).`),0===s.length)return this.#ne.info(\"No transactions to process.\"),[];const{enrichedRawTransactions:a,trc10TokenMetadata:i}=await this.#Ft(e,s);this.#ne.info(`Enriched ${a.length} transactions, fetched metadata for ${i.size} TRC10 tokens.`);const c=new Set(s.map(e=>e.txID)),u=o.filter(e=>c.has(e.transaction_id)),l=HC.mapTransactions({scope:e,account:t,rawTransactions:a,trc20Transactions:u,trc10TokenMetadata:i}).filter(e=>!function(e,t){return[C_].some(r=>r(e,t))}(e,t));return this.#ne.info(`Returning ${l.length} transactions for account ${t.address} on network ${e}.`),l}async checkAddressActivity(e,t){return(await this.#_e.getTransactionInfoByAddress(e,t,{limit:1})).length>0}async#Mt(e,t){const[r,n]=await Promise.allSettled([this.#_e.getTransactionInfoByAddress(e,t),this.#_e.getContractTransactionInfoByAddress(e,t)]);let o=[],s=[];return\"rejected\"===r.status?this.#ne.error(`Failed to fetch raw transactions for address ${t} on network ${e}`):o=r.value,\"rejected\"===n.status?this.#ne.error(`Failed to fetch TRC20 transactions for address ${t} on network ${e}`):s=n.value,{rawTransactions:o,trc20Transactions:s}}async#Ft(e,t){const[r,n]=await Promise.all([this.#xt(e,t),this.#Ot(e,t)]);return{enrichedRawTransactions:r,trc10TokenMetadata:n}}async findByAccounts(e){return(await Promise.all(e.map(async e=>this.#Rt.findByAccountId(e.id)))).flat()}async save(e){await this.saveMany([e])}async saveMany(e){await this.#Rt.saveMany(e);const t=(0,Te.groupBy)(e,\"account\");await ZB(snap,gn.AccountTransactionsUpdated,{transactions:t})}}({logger:Ne,transactionsRepository:x_,trongridApiClient:F_,tronHttpClient:O_}),j_=new JI({logger:Ne,snapClient:I_,accountsRepository:__,configProvider:W_,assetsService:$_,transactionsService:z_}),V_=new class{#ne;#_e;#Re;constructor({logger:e,trongridApiClient:t,tronHttpClient:r}){this.#ne=ke(e,\"[💸 FeeCalculatorService]\"),this.#_e=t,this.#Re=r}#kt(e){const t=i_.from(e.raw_data_hex,\"hex\").byteLength,r=e;if(r.signature&&Array.isArray(r.signature)){const e=r.signature.reduce((e,t)=>e+t.length/2,0);return Mn(t+e+64+5)}return Mn(t+134)}async#Nt(e,t,r){const n=t.raw_data.contract;if(!n||0===n.length)return this.#ne.log(\"No contracts found in transaction, assuming zero energy usage\"),Fn;let o=Fn;for(const t of n){const n=t.type;let s;this.#ne.log(`Calculating energy for contract type: ${n}`),\"TransferContract\"===n||\"TransferAssetContract\"===n?s=Fn:\"TriggerSmartContract\"===n?s=Mn(await this.#Ut(e,t,r)):c_.has(n)?(this.#ne.log(`System contract ${n} detected, zero energy consumption`),s=Fn):(this.#ne.warn(`Unknown contract type: ${n}, using conservative estimate`),s=Mn(13e4)),this.#ne.log(`Contract ${n} energy: ${s.toString()}`),o=o.plus(s)}return this.#ne.log(`Total energy for transaction: ${o.toString()}`),o}async#Dt(e,t){try{return await this.#_e.getAccountInfoByAddress(e,t),!0}catch{return this.#ne.log(`Account ${t} is not activated on ${e}`),!1}}async#Lt(e,t){const r=await this.#_e.getChainParameters(e),n=r.find(e=>\"getEnergyFee\"===e.key)?.value??420,o=Math.floor(t/n);return this.#ne.log({feeLimit:t,energyPrice:n,maxEnergyFromFeeLimit:o},\"Calculated fallback energy from fee limit\"),o}async#$t(e,t){return void 0!==t&&t>0?this.#Lt(e,t):13e4}#zt(e,t,r){if(!t)return{userEnergy:e};const n=t.consume_user_resource_percent??100,o=t.origin_energy_limit??0;if(n>=100||o<=0)return{userEnergy:e};const s=Math.ceil(e*(n/100)),a=e-s;let i=Math.min(a,o);i=null===r?0:Math.min(i,r);const c=e-i;return this.#ne.log({totalEnergy:e,userPercent:n,maxDeployerSubsidy:o,deployerAvailableEnergy:r,userTheoretical:s,deployerTheoretical:a,deployerActual:i,userActual:c},\"Energy sharing calculation\"),{userEnergy:c}}async#jt(e,t){if(!t)return null;try{const r=await this.#Re.getAccountResources(e,t),n=r.EnergyLimit??0,o=r.EnergyUsed??0,s=Math.max(0,n-o);return this.#ne.log({deployerAddress:t,energyLimit:n,energyUsed:o,availableEnergy:s},\"Fetched deployer available energy\"),s}catch(e){return this.#ne.warn({error:e,deployerAddress:t},\"Failed to fetch deployer energy\"),null}}async#Ut(e,t,r){try{const{data:n,owner_address:o,contract_address:s,call_value:a,token_id:i,call_token_id:c,call_token_value:u}=t.parameter.value;if(!n)throw this.#ne.warn(\"No data field found in contract, using fallback\"),new Error(\"No data field found in contract\");this.#ne.log({contractAddress:s,ownerAddress:o,callValue:a,tokenId:i,callTokenId:c,callTokenValue:u},\"Estimating energy\");const[l,d]=await Promise.all([this.#Re.triggerConstantContract(e,{owner_address:o,contract_address:s,data:n,call_value:a,token_id:i,call_token_id:c,call_token_value:u}),this.#Re.getContract(e,s).catch(()=>(this.#ne.warn(\"Failed to fetch contract info for energy sharing, assuming user pays all\"),null))]);if(\"FAILED\"===l.transaction.ret[0]?.ret)throw new Error(\"Simulation yields failed result\");if(\"energy_used\"in l){const t=l.energy_used,r=await this.#jt(e,d?.origin_address),{userEnergy:o}=this.#zt(t,d,r);return this.#ne.log({data:n.slice(0,8),totalEnergy:t,userEnergy:o,energyPenalty:l.energy_penalty,hasEnergySharing:null!==d,deployerAvailableEnergy:r},`Energy estimate for ${n.slice(0,8)}: user pays ${o} of ${t} units`),o}return this.#ne.warn(\"No energy_used in result, using fallback\"),this.#$t(e,r)}catch(t){return this.#ne.error({error:t},\"Failed to estimate smart contract energy, using fallback\"),this.#$t(e,r)}}async#Vt({scope:e,transaction:t}){const r=t.raw_data.contract;if(!r||0===r.length)return Fn;const n=[];for(const e of r)if(\"TransferContract\"===e.type){const{amount:t,to_address:r}=e.parameter.value;t>0&&r&&n.push(r)}if(0===n.length)return Fn;const o=(await Promise.all(n.map(async t=>({address:t,isActivated:await this.#Dt(e,t)})))).filter(({address:e,isActivated:t})=>!t&&(this.#ne.log(`Account ${e} is not activated, activation fee required`),!0)).length;return kn.multipliedBy(o)}#Gt(e){const t=e.raw_data.data;return t&&t.length>0?(this.#ne.log(\"Transaction contains memo, adding 1 TRX memo fee\"),Nn):Fn}async computeFee({scope:e,transaction:t,availableEnergy:r,availableBandwidth:n,feeLimit:o}){this.#ne.log(\"Calculating fee for transaction \",JSON.stringify(t));const s=this.#kt(t),a=await this.#Nt(e,t,o),i=n.isGreaterThanOrEqualTo(s),c=i?s:Fn,u=i?Fn:s,l=Mn.min(a,r),d=Mn.max(a.minus(r),Fn);let f=Fn;if(u.isGreaterThan(0)||d.isGreaterThan(0)){const t=await this.#_e.getChainParameters(e),r=t.find(e=>\"getTransactionFee\"===e.key)?.value??1e3,n=t.find(e=>\"getEnergyFee\"===e.key)?.value??100,o=u.multipliedBy(r).div(Un),s=d.multipliedBy(n).div(Un);f=f.plus(o).plus(s)}const p=await this.#Vt({scope:e,transaction:t});p.isGreaterThan(0)&&(f=f.plus(p));const h=this.#Gt(t);h.isGreaterThan(0)&&(f=f.plus(h));const g=[{type:ur.Base,asset:{unit:Qn[e].nativeToken.symbol,type:Qn[e].nativeToken.id,amount:Number(f.toFixed(6)).toString(),fungible:!0}}];return l.isGreaterThan(0)&&g.push({type:ur.Base,asset:{unit:Qn[e].energy.symbol,type:Qn[e].energy.id,amount:l.toString(),fungible:!0}}),c.isGreaterThan(0)&&g.push({type:ur.Base,asset:{unit:Qn[e].bandwidth.symbol,type:Qn[e].bandwidth.id,amount:c.toString(),fungible:!0}}),g}}({logger:Ne,trongridApiClient:F_,tronHttpClient:O_}),G_=new class{#Ht;constructor({tronWebFactory:e}){this.#Ht=e}async ensureFreshSerializedTransaction({scope:e,type:t,rawDataHex:r}){try{const n=this.#Ht.createClient(e),o=n.utils.deserializeTx.deserializeTransaction(t,r),s={txID:YE(await cC(XE(r))).slice(2),raw_data:o,raw_data_hex:r},a=await this.#Kt(n,o);return a===o?s:this.#qt(n,s,a)}catch{throw new Error(w_)}}async ensureFreshMetadata({scope:e,transaction:t}){try{const r=this.#Ht.createClient(e),n=await this.#Kt(r,t.raw_data);return n===t.raw_data?t:this.#qt(r,t,n)}catch{throw new Error(w_)}}async ensureFreshRawData({scope:e,rawData:t}){try{return await this.#Kt(this.#Ht.createClient(e),t)}catch{throw new Error(w_)}}async#Kt(e,t){try{const n=Date.now(),o=await e.trx.getCurrentBlock(),s={currentBlock:o,now:n,rawData:t};if(!(function(e){return\"string\"==typeof e.ref_block_bytes&&\"string\"==typeof e.ref_block_hash&&\"number\"==typeof e.expiration}((r=s).rawData)&&function({currentBlock:e,now:t,rawData:r}){const n=e.block_header.raw_data.timestamp;return r.expiration>Math.max(t,n)+9e3}({currentBlock:r.currentBlock,now:r.now,rawData:r.rawData})&&function({currentBlock:e,rawData:t}){const r=e.block_header.raw_data.timestamp;return t.expiration<r+A_}({currentBlock:r.currentBlock,rawData:r.rawData})))return v_(t,o);const a=function({currentBlockNumber:e,refBlockBytes:t}){const r=Number.parseInt(t,16),n=Math.floor(e/T_)*T_+r;return n>e?n-T_:n}({currentBlockNumber:o.block_header.raw_data.number,refBlockBytes:s.rawData.ref_block_bytes});if(!function({currentBlock:e,referenceBlockNumber:t}){const r=e.block_header.raw_data.number;return Number.isFinite(t)&&t>=0&&t<=r&&r-t<T_}({currentBlock:o,referenceBlockNumber:a}))return v_(t,o);const i=await this.#Zt({tronWeb:e,currentBlock:o,referenceBlockNumber:a});return function({rawData:e,referencedBlock:t}){if(!t)return!1;return P_(t.block_header.raw_data.number)===e.ref_block_bytes.toLowerCase()&&E_(t)===e.ref_block_hash.toLowerCase()}({rawData:s.rawData,referencedBlock:i})?t:v_(t,o)}catch{throw new Error(w_)}var r}async#Zt({tronWeb:e,currentBlock:t,referenceBlockNumber:r}){if(r===t.block_header.raw_data.number)return t;try{return await e.trx.getBlockByNumber(r)}catch{return}}#qt(e,t,r){const n={...t,raw_data:r},o=e.utils.transaction.txJsonToPb(n);return{...n,raw_data_hex:e.utils.transaction.txPbToRawDataHex(o),txID:e.utils.transaction.txPbToTxID(o).replace(/^0x/u,\"\")}}}({tronWebFactory:k_}),H_=new class{#Jt;#Pe;#Ht;#Yt;#ne;#Ce;#Xt;constructor({accountsService:e,assetsService:t,tronWebFactory:r,feeCalculatorService:n,logger:o,snapClient:s,transactionExpirationRefresherService:a}){this.#Jt=e,this.#Pe=t,this.#Ht=r,this.#Yt=n,this.#ne=ke(o,\"[💸 SendService]\"),this.#Ce=s,this.#Xt=a}async validateSend({scope:e,fromAccountId:t,toAddress:r,asset:n,amount:o,feeLimit:s}){this.#ne.log(\"Validating send\",{scope:e,fromAccountId:t,toAddress:r,assetType:n.assetType,amount:o.toString()});const a=Qn[e].nativeToken.id,i=n.assetType===a,[c,u,l,d]=await this.#Pe.getAssetsByAccountId(t,[n.assetType,a,Qn[e].bandwidth.id,Qn[e].energy.id]),f=c?new Mn(c.uiAmount):Fn,p=u?new Mn(u.uiAmount):Fn,h=l?new Mn(l.rawAmount):Fn,g=d?new Mn(d.rawAmount):Fn;if(o.isGreaterThan(f))return this.#ne.log(\"Insufficient balance for asset being sent\",{amount:o.toString(),assetBalance:f.toString()}),{valid:!1,errorCode:lC.InsufficientBalance};const y=await this.buildTransaction({fromAccountId:t,toAddress:r,asset:n,amount:o,feeLimit:s}),m=await this.#Yt.computeFee({scope:e,transaction:y,availableEnergy:g,availableBandwidth:h,feeLimit:s}),b=new Mn(m.find(e=>e.asset.type===a)?.asset.amount??\"0\"),w=i?o.plus(b):b;return this.#ne.log(\"Validation calculation\",{isNativeToken:i,amount:o.toString(),trxFee:b.toString(),totalTrxNeeded:w.toString(),nativeTokenBalance:p.toString()}),w.isGreaterThan(p)?(this.#ne.log(\"Insufficient TRX balance to cover fees\",{totalTrxNeeded:w.toString(),nativeTokenBalance:p.toString()}),{valid:!1,errorCode:lC.InsufficientBalanceToCoverFee}):{valid:!0}}async buildTransaction({fromAccountId:e,toAddress:t,asset:r,amount:n,feeLimit:o}){const{chainId:s,assetNamespace:a,assetReference:i}=we(r.assetType);try{switch(a){case\"slip44\":return this.#ne.log(\"Sending TRX transaction\"),this.buildSendTrxTransaction({scope:s,fromAccountId:e,toAddress:t,amount:n,feeLimit:o});case\"trc10\":return this.#ne.log(`Sending TRC10 token: ${i}`),this.buildSendTrc10Transaction({scope:s,fromAccountId:e,toAddress:t,amount:n,tokenId:i,decimals:r.decimals,feeLimit:o});case\"trc20\":return this.#ne.log(`Sending TRC20 token: ${i}`),this.buildSendTrc20Transaction({scope:s,fromAccountId:e,toAddress:t,contractAddress:i,amount:n,decimals:r.decimals,feeLimit:o});default:throw new Error(`Unsupported asset namespace: ${a}`)}}catch(e){throw this.#ne.error({error:e},\"Failed to send asset\"),new Error(`Failed to send asset: ${e instanceof Error?e.message:\"Unknown error\"}`)}}async buildSendTrxTransaction({scope:e,fromAccountId:t,toAddress:r,amount:n,feeLimit:o}){const s=await this.#Jt.findByIdOrThrow(t),a=this.#Ht.createClient(e),i=Number(zC(n)),c=await a.transactionBuilder.sendTrx(r,i,s.address);return this.#Qt(a,c,o),c}async buildSendTrc10Transaction({scope:e,fromAccountId:t,toAddress:r,amount:n,tokenId:o,decimals:s,feeLimit:a}){const i=await this.#Jt.findByIdOrThrow(t),c=this.#Ht.createClient(e),u=Number(VC(n,s)),l=await c.transactionBuilder.sendToken(r,u,o,i.address);return this.#Qt(c,l,a),l}async buildSendTrc20Transaction({scope:e,fromAccountId:t,toAddress:r,contractAddress:n,amount:o,decimals:s,feeLimit:a}){const i=await this.#Jt.findByIdOrThrow(t),c=this.#Ht.createClient(e),u=[{type:\"address\",value:r},{type:\"uint256\",value:VC(o,s)}];return(await c.transactionBuilder.triggerSmartContract(n,\"transfer(address,uint256)\",a?{feeLimit:a}:{},u,i.address)).transaction}async signAndSendTransaction({scope:e,fromAccountId:t,transaction:r,origin:n=\"MetaMask\"}){const o=await this.#Jt.findByIdOrThrow(t),{privateKeyHex:s,address:a}=await this.#Jt.deriveTronKeypair({entropySource:o.entropySource,derivationPath:o.derivationPath});rE(r.raw_data,a);const i=this.#Ht.createClient(e,s),c=await this.#Xt.ensureFreshMetadata({scope:e,transaction:r}),u=await i.trx.sign(c),l=await i.trx.sendRawTransaction(u);if(!l.result)throw new Error(`Failed to send transaction: ${l.message}`);return await this.#Ce.trackTransactionSubmitted({origin:n,accountType:o.type,chainIdCaip:e}),await this.#Ce.scheduleBackgroundEvent({method:jB.TrackTransaction,params:{txId:l.txid,scope:e,accountIds:[t],attempt:0},duration:\"PT1S\"}),l}#Qt(e,t,r){if(void 0!==r){t.raw_data.fee_limit=r;const n=e.utils.transaction.txJsonToPb(t);t.raw_data_hex=e.utils.transaction.txPbToRawDataHex(n),t.txID=e.utils.transaction.txPbToTxID(n).slice(2)}}}({logger:Ne,snapClient:I_,accountsService:j_,assetsService:$_,tronWebFactory:k_,feeCalculatorService:V_,transactionExpirationRefresherService:G_}),K_=new class{#ne;#Jt;#Ht;#Ce;constructor({logger:e,accountsService:t,tronWebFactory:r,snapClient:n}){this.#ne=ke(e,\"[💸 StakingService]\"),this.#Jt=t,this.#Ht=r,this.#Ce=n}async stake({account:e,assetId:t,amount:r,purpose:n,srNodeAddress:o}){const{chainId:s}=we(t),a=Number(zC(r)),i=r.integerValue(Mn.ROUND_DOWN).toNumber(),c=o??\"TVMwGfdDz58VvM7yTzGMWWSHsmofSxa9jH\";this.#ne.info(`Staking ${r.toString()} ${t} for ${n} for ${e.address} on ${s}...`),await u_({accountsService:this.#Jt,tronWebFactory:this.#Ht,snapClient:this.#Ce,account:e,scope:s,buildTransactions:async t=>[await t.transactionBuilder.freezeBalanceV2(a,n,e.address),await t.transactionBuilder.vote({[c]:i},e.address)]})}async unstake({account:e,assetId:t,amount:r}){const{chainId:n}=we(t);let o;if([$n.TrxStakedForBandwidthMainnet,$n.TrxStakedForBandwidthNile,$n.TrxStakedForBandwidthShasta].includes(t)&&(o=\"BANDWIDTH\"),[$n.TrxStakedForEnergyMainnet,$n.TrxStakedForEnergyNile,$n.TrxStakedForEnergyShasta].includes(t)&&(o=\"ENERGY\"),!o)throw new Error(\"Invalid asset ID\");const s=Number(zC(r));this.#ne.info(`Unstaking ${r.toString()} ${t} for ${e.address} on ${n}...`),await u_({accountsService:this.#Jt,tronWebFactory:this.#Ht,snapClient:this.#Ce,account:e,scope:n,buildTransactions:async t=>[await t.transactionBuilder.unfreezeBalanceV2(s,o,e.address)]})}async claimUnstakedTrx({account:e,scope:t}){this.#ne.info(`Claiming unstaked TRX for ${e.address} on ${t}...`),await u_({accountsService:this.#Jt,tronWebFactory:this.#Ht,snapClient:this.#Ce,account:e,scope:t,buildTransactions:async t=>[await t.transactionBuilder.withdrawExpireUnfreeze(e.address)]})}async claimTrxStakingRewards({account:e,scope:t}){this.#ne.info(`Claiming staking rewards for ${e.address} on ${t}...`),await u_({accountsService:this.#Jt,tronWebFactory:this.#Ht,snapClient:this.#Ce,account:e,scope:t,buildTransactions:async t=>[await t.transactionBuilder.withdrawBlockRewards(e.address)]})}}({logger:Ne,snapClient:I_,accountsService:j_,tronWebFactory:k_}),q_=new class{#ne;#Jt;#Ht;#Xt;constructor({logger:e,accountsService:t,tronWebFactory:r,transactionExpirationRefresherService:n}){this.#ne=ke(e,\"[💼 WalletService]\"),this.#Jt=t,this.#Ht=r,this.#Xt=n}async handleKeyringRequest({account:e,scope:t,method:r,params:n}){this.#ne.log(\"Handling wallet request\",{method:r,accountId:e.id,scope:t,params:n});try{switch(r){case cA.SignMessage:return await this.signMessage({account:e,scope:t,params:n});case cA.SignTransaction:return await this.signTransaction({account:e,scope:t,params:n});default:throw new MP(\"Unsupported wallet method\",uA)}}catch(e){if(this.#ne.error({error:e},\"Error handling wallet request\"),4100===e.code||e.message?.includes(\"rejected\"))throw new MP(dA.message,dA);if(4001===e.code||e.message?.includes(\"Invalid\"))throw new MP(e.message??uA.message,uA);throw new MP(e.message??fA.message,fA)}}async signMessage({account:e,scope:t,params:r}){try{sW(r,FA);const{address:n,message:o}=r,{privateKeyHex:s}=await this.#Jt.deriveTronKeypair({entropySource:e.entropySource,derivationPath:e.derivationPath}),a=this.#Ht.createClient(t,s),i=B_.from(o,\"base64\").toString(\"utf8\"),c={signature:a.trx.signMessageV2(i,s)};return aW(c,kA),this.#ne.log(\"Message signed successfully\",{address:n}),c}catch(e){throw this.#ne.error({error:e},\"Error signing message\"),e}}async signTransaction({account:e,scope:t,params:r}){try{sW(r,NA);const{address:n,transaction:{rawDataHex:o,type:s}}=r,{privateKeyHex:a,address:i}=await this.#Jt.deriveTronKeypair({entropySource:e.entropySource,derivationPath:e.derivationPath}),c=this.#Ht.createClient(t,a),u=c.utils.deserializeTx.deserializeTransaction(s,o);tE(u),rE(u,i);const l={visible:!1,txID:YE(await cC(XE(o))).slice(2),raw_data:u,raw_data_hex:o},d=await this.#Xt.ensureFreshMetadata({scope:t,transaction:l}),f=(await c.trx.sign(d,a)).signature,p={signature:`0x${f?.[0]??\"\"}`};return this.#ne.log(\"Transaction signed successfully\",{address:n,scope:t}),p}catch(e){if(this.#ne.error({error:e},\"Error signing transaction\"),e.message?.includes(\"deserialize\")||e.message?.includes(\"parse\")||e.message?.includes(\"invalid\"))throw new MP(`Invalid transaction format: ${e.message}`,lA);throw e}}async resolveAccountAddress(e,t,r){this.#ne.log(\"Resolving account address\",{accountCount:e.length,scope:t,request:r});const n=e.filter(e=>e.scopes.includes(t));if(0===n.length)throw new Error(`No accounts with scope: ${t}`);sW(r,$A);const{params:o}=r,{address:s}=o;if(!s||\"string\"!=typeof s)throw new Error(\"Address parameter is required and must be a string\");const a=s;if(!this.#Ht.createClient(t).isAddress(a))throw new Error(`Invalid Tron address: ${a}`);const i=n.find(e=>e.address===a);if(!i)throw new Error(`Account not found in keyring for address: ${a}`);const c=`${t}:${a}`;return aW(c,zA),this.#ne.log(\"Address resolved successfully\",{address:a,caip10Address:c,accountId:i.id}),{address:c}}}({logger:Ne,accountsService:j_,tronWebFactory:k_,transactionExpirationRefresherService:G_}),Z_=new class{#er;#Ce;#ne;constructor(e,t,r){this.#er=e,this.#Ce=t,this.#ne=r}async scanTransaction({accountAddress:e,transactionRawData:t,origin:r,scope:n,options:o=[\"simulation\",\"validation\"],account:s}){if(!eE(t))return this.#ne.warn(\"Malformed transaction: Tron transactions must contain exactly one contract\"),{status:\"ERROR\",estimatedChanges:{assets:[]},validation:{type:null,reason:null},error:{type:\"MALFORMED_TRANSACTION\",code:null,message:\"Tron transactions must contain exactly one contract entry.\"},simulationStatus:pB.Failed};if(!nE.isContractTypeSupported(t))return this.#ne.info(\"Transaction contract type is not supported for simulation, skipping scan\"),{status:\"SUCCESS\",estimatedChanges:{assets:[]},validation:{type:null,reason:null},error:null,simulationStatus:pB.Skipped};try{const a=await this.#er.scanTransaction({accountAddress:e,transactionRawData:t,origin:\"metamask\"===r?\"https://metamask.io\":r,options:o}),i=this.#tr(a);if(!i?.status)return this.#ne.warn(\"Invalid scan result received from security alerts API\"),s&&await this.#Ce.trackSecurityScanCompleted({origin:r,accountType:s.type,chainIdCaip:n,scanStatus:gB.ERROR,hasSecurityAlerts:!1}),null;if(s){const e=Object.values(gB).includes(i.status)?i.status:gB.ERROR,t=Boolean(i.validation?.type&&i.validation.type!==hB.Benign);if(await this.#Ce.trackSecurityScanCompleted({origin:r,accountType:s.type,chainIdCaip:n,scanStatus:e,hasSecurityAlerts:t}),t){const e=Object.values(hB).includes(i.validation.type)?i.validation.type:hB.Warning;await this.#Ce.trackSecurityAlertDetected({origin:r,accountType:s.type,chainIdCaip:n,securityAlertResponse:e,securityAlertReason:i.validation.reason??null,securityAlertDescription:this.getSecurityAlertDescription(i.validation)})}}return i}catch(e){return await this.#Ce.trackError(e),this.#ne.error(e),s&&await this.#Ce.trackSecurityScanCompleted({origin:r,accountType:s.type,chainIdCaip:n,scanStatus:gB.ERROR,hasSecurityAlerts:!1}),null}}getSecurityAlertDescription(e){if(!e?.reason)return\"Security alert: Unknown reason\";return{unfair_trade:\"Unfair trade of assets, without adequate compensation to the owner's account\",transfer_farming:\"Substantial transfer of the account's assets to untrusted entities\",known_attacker:\"A known attacker's account is involved in the transaction\",other:\"The transaction was marked as malicious for other reason, further details would be described in features field\"}[e.reason]??`Security alert: ${e.reason}`}#tr(e){if(!e)return null;const t=this.#rr(e);return{status:t,estimatedChanges:{assets:this.#nr(e.simulation?.account_summary?.assets_diffs)},validation:{type:e.validation?.result_type??null,reason:e.validation?.reason??null},error:this.#or(e.simulation),simulationStatus:\"ERROR\"===t?pB.Failed:pB.Completed}}#rr(e){return\"Error\"===e.simulation?.status||\"Error\"===e.validation?.status?\"ERROR\":\"SUCCESS\"}#nr(e){return e?e.filter(e=>this.#sr(e)).map(e=>this.#ar(e)):[]}#sr(e){const t=e.in?.[0]??e.out?.[0];return!!t&&(\"token_id\"in t||void 0!==t?.value)}#ar(e){const t=e.in?.[0],r=e.out?.[0],n=t??r;return{type:t?\"in\":\"out\",symbol:e.asset.symbol??e.asset_type,name:e.asset.name??e.asset_type,logo:e.asset.logo_url??null,value:this.#ir(n,e.asset.decimals),price:n?.usd_price??null,assetType:e.asset_type}}#ir(e,t){return e?\"token_id\"in e?\"value\"in e&&\"string\"==typeof e.value?e.value:\"1\":e.raw_value&&void 0!==t?new Mn(e.raw_value).dividedBy(new Mn(10).pow(t)).toFixed():\"0\":\"0\"}#or(e){return e?.error||e?.error_details?{type:e.error_details&&\"type\"in e.error_details?e.error_details.type:null,code:e.error_details&&\"code\"in e.error_details?e.error_details.code:null,message:e.error??null}:null}}(L_,I_,Ne),J_=new class{#ne;#Ce;#Ie;#Ht;#Pe;#Yt;constructor({snapClient:e,state:t,tronWebFactory:r,assetsService:n,feeCalculatorService:o}){this.#ne=ke(Ne,\"[🔑 ConfirmationHandler]\"),this.#Ce=e,this.#Ie=t,this.#Ht=r,this.#Pe=n,this.#Yt=o}async#cr(e){try{await this.#Ie.setKey(`mapInterfaceNameToId.${e}`,null)}catch(e){this.#ne.error({error:e},\"Failed to clear interface ID\")}}async handleKeyringRequest({request:e,account:t}){this.#ne.info(\"Handling keyring request\",{request:e,account:t});const{method:r}=e.request;switch(r){case cA.SignMessage:return this.#ur(e,t);case cA.SignTransaction:return this.#lr(e,t);default:throw this.#ne.warn(\"Unhandled keyring request method\",{method:r}),new Error(`Unhandled keyring request method: ${r}`)}}async#ur(e,t){const r=await async function(e,t){O(e.request.params,FA);const{request:{params:{message:r}},scope:n,origin:o}=e,s=o_.from(r,\"base64\").toString(\"utf8\"),a=await nR.snapClient.getPreferences().then(e=>e.locale).catch(()=>\"en\"),i=await nR.snapClient.createInterface(qC(n_,{message:s,account:t,scope:n,locale:a,networkImage:yB,origin:mB(o)}),{});return nR.snapClient.showDialog(i)}(e,t);return!0===r}async#lr(e,t){O(e.request.params,NA);const{scope:r,request:{params:{transaction:{rawDataHex:n,type:o}}}}=e,s=this.#Ht.createClient(r).utils.deserializeTx.deserializeTransaction(o,n);tE(s);const a=await async function(e,t,r){const{snapClient:n,transactionScanService:o}=nR;O(e.request.params,NA);const{request:{params:{transaction:s}},scope:a,origin:i}=e,c={...s_,scope:a,account:t,transaction:s,origin:i??\"Unknown\",scanFetchStatus:JC.Loading,tokenPricesFetchStatus:JC.Initial,feesFetchStatus:JC.Initial},{assetsService:u,feeCalculatorService:l,priceApiClient:d}=nR,[f,p]=await Promise.all([n.getPreferences().catch(()=>s_.preferences),u.getAssetsByAccountId(t.id,[Qn[a].bandwidth.id,Qn[a].energy.id])]);c.preferences=f;const{useSecurityAlerts:h,simulateOnChainActions:g,useExternalPricingData:y}=c.preferences;try{const[e,t]=p,n=t?new Mn(t.rawAmount):Fn,o=e?new Mn(e.rawAmount):Fn,i={visible:!0,txID:YE(await cC(XE(s.rawDataHex))).slice(2),raw_data:r,raw_data_hex:s.rawDataHex},u=await l.computeFee({scope:a,transaction:i,availableEnergy:n,availableBandwidth:o});u.forEach(e=>{e.asset.iconUrl=r_(e.asset.type)});const f=y?await d.getMultipleSpotPrices([`${a}/slip44:195`],c.preferences.currency).catch(()=>({})):{};c.fees=u,c.feesFetchStatus=JC.Fetched,c.tokenPrices=f,c.tokenPricesFetchStatus=JC.Fetched}catch{c.fees=[],c.feesFetchStatus=JC.Error,c.tokenPrices={},c.tokenPricesFetchStatus=JC.Error}const m=await n.createInterface(qC(kB,{context:c}),c),b=n.showDialog(m),w=nR.state.setKey(`mapInterfaceNameToId.${NB}`,m);if(o&&(h||g)){const e=[];g&&e.push(\"simulation\"),h&&e.push(\"validation\");try{const n=await o.scanTransaction({accountAddress:t.address,transactionRawData:r,origin:i,scope:a,options:e});c.scan=n,c.scanFetchStatus=n?JC.Fetched:JC.Error}catch{c.scan=null,c.scanFetchStatus=JC.Error}await w,await n.updateInterface(m,qC(kB,{context:c}),c),await n.scheduleBackgroundEvent({method:jB.RefreshSignTransaction,duration:\"PT20S\"})}else c.scanFetchStatus=JC.Fetched,await w,await n.updateInterface(m,qC(kB,{context:c}),c);return b}(e,t,s);return await this.#cr(NB),!0===a}async confirmTransactionRequest({scope:e,fromAddress:t,toAddress:r,amount:n,fees:o,asset:s,accountType:a,origin:i,transactionRawData:c}){await this.#Ce.trackTransactionAdded({origin:i,accountType:a,chainIdCaip:e});const u=await async function(e,t,r){const{transactionScanService:n}=nR,{transactionRawData:o}=r,s={...a_,...r,transactionRawData:o,tokenPricesFetchStatus:JC.Loading,scanFetchStatus:JC.Loading};try{s.preferences=await e.getPreferences()}catch{}const{useSecurityAlerts:a}=s.preferences;s.fees.forEach(e=>{e.asset.iconUrl=r_(e.asset.type)});const i=await e.createInterface(qC($B,{context:s}),s),c=e.showDialog(i),u=t.setKey(`mapInterfaceNameToId.${zB}`,i);if(n){const e=[\"simulation\"];a&&e.push(\"validation\");const t={type:r.accountType,address:r.fromAddress};try{const a=await n.scanTransaction({accountAddress:r.fromAddress,transactionRawData:o,origin:r.origin,scope:r.scope,options:e,account:t});s.scan=a,s.scanFetchStatus=a?JC.Fetched:JC.Error}catch{s.scan=null,s.scanFetchStatus=JC.Error}}else s.scanFetchStatus=JC.Fetched;return await u,s.preferences.useExternalPricingData||(s.tokenPricesFetchStatus=JC.Fetched),await e.updateInterface(i,qC($B,{context:s}),s),s.preferences.useExternalPricingData&&await e.scheduleBackgroundEvent({method:jB.RefreshConfirmationPrices,duration:\"PT1S\"}),n&&await e.scheduleBackgroundEvent({method:jB.RefreshConfirmationSend,duration:\"PT20S\"}),c}(this.#Ce,this.#Ie,{scope:e,fromAddress:t,toAddress:r,amount:n,fees:o,asset:s,origin:mB(i),accountType:a,transactionRawData:c});return await this.#cr(zB),!0===u?await this.#Ce.trackTransactionApproved({origin:i,accountType:a,chainIdCaip:e}):await this.#Ce.trackTransactionRejected({origin:i,accountType:a,chainIdCaip:e}),!0===u}async confirmClaimUnstakedTrx({account:e,scope:t}){const r=this.#Ht.createClient(t),n=await r.transactionBuilder.withdrawExpireUnfreeze(e.address),[o,s]=await this.#Pe.getAssetsByAccountId(e.id,[Qn[t].bandwidth.id,Qn[t].energy.id]),a=s?new Mn(s.rawAmount):Fn,i=o?new Mn(o.rawAmount):Fn,c=await this.#Yt.computeFee({scope:t,transaction:n,availableEnergy:a,availableBandwidth:i});let u;c.forEach(e=>{e.asset.iconUrl=r_(e.asset.type)});try{u=await this.#Ce.getPreferences()}catch{throw new NP(\"Failed to retrieve Snap preferences.\")}const l={scope:t,account:e,transaction:{rawDataHex:\"\",type:\"\"},origin:\"MetaMask\",preferences:u,networkImage:yB,scan:null,scanFetchStatus:JC.Fetched,tokenPrices:{},tokenPricesFetchStatus:JC.Fetched,fees:c,feesFetchStatus:JC.Fetched},d=kB({context:l}),f=await this.#Ce.createInterface(d,l);return!0===await this.#Ce.showDialog(f)}}({snapClient:I_,state:S_,tronWebFactory:k_,assetsService:$_,feeCalculatorService:V_}),Y_=new class{#ne;#Pe;constructor({logger:e,assetsService:t}){this.#ne=ke(e,\"[🪙 AssetsHandler]\"),this.#Pe=t}async onAssetHistoricalPrice(e){this.#ne.log(\"[📈 onAssetHistoricalPrice]\",e);const{from:t,to:r}=e;return{historicalPrice:await this.#Pe.getHistoricalPrice(t,r)}}async onAssetsConversion(e){this.#ne.log(\"[💱 onAssetsConversion]\");const{conversions:t}=e;return{conversionRates:await this.#Pe.getMultipleTokenConversions(t)}}async onAssetsLookup(e){return{assets:await this.#Pe.getAssetsMetadata(e.assets)}}async onAssetsMarketData(e){return{marketData:await this.#Pe.getMultipleTokensMarketData(e.assets)}}}({logger:Ne,assetsService:$_}),X_=new class{#ne;#Jt;#Pe;#dr;#Ht;#Yt;#Ce;#fr;#pr;#Ee;#Xt;constructor({logger:e,accountsService:t,assetsService:r,sendService:n,feeCalculatorService:o,tronWebFactory:s,snapClient:a,stakingService:i,confirmationHandler:c,transactionsService:u,transactionExpirationRefresherService:l}){this.#ne=ke(e,\"[👋 ClientRequestHandler]\"),this.#Jt=t,this.#Pe=r,this.#dr=n,this.#Yt=o,this.#Ht=s,this.#Ce=a,this.#fr=i,this.#pr=c,this.#Ee=u,this.#Xt=l}async handle(e){this.#ne.log(\"Handling client request\",e);const{method:t}=e;switch(t){case uC.SignAndSendTransaction:return this.#hr(e);case uC.OnAddressInput:return this.#gr(e);case uC.OnAmountInput:return this.#yr(e);case uC.ConfirmSend:return this.#mr(e);case uC.ComputeFee:return this.#br(e);case uC.ComputeStakeFee:return this.#wr(e);case uC.OnStakeAmountInput:return this.#Tr(e);case uC.ConfirmStake:return this.#Ar(e);case uC.OnUnstakeAmountInput:return this.#vr(e);case uC.ConfirmUnstake:return this.#Pr(e);case uC.ClaimUnstakedTrx:return this.#Er(e);case uC.ClaimTrxStakingRewards:return this.#Cr(e);case uC.SignRewardsMessage:return this.#Br(e);default:throw new zP}}async#hr(e){KC(e,hC,new DP);const{transaction:t,accountId:r,scope:n,options:{type:o}}=e.params,s=await this.#Jt.findByIdOrThrow(r),{privateKeyHex:a,address:i}=await this.#Jt.deriveTronKeypair({entropySource:s.entropySource,derivationPath:s.derivationPath}),c=this.#Ht.createClient(n,a);let u=GB.from(t,\"base64\").toString(\"hex\");const l=c.utils.deserializeTx.deserializeTransaction(o,u);u=this.#Wr(c,l),tE(l),rE(l,i);const d={visible:!1,txID:YE(await cC(XE(u))).slice(2),raw_data:l,raw_data_hex:u},f=await this.#Xt.ensureFreshMetadata({scope:n,transaction:d}),p=await c.trx.sign(f),h=await c.trx.sendRawTransaction(p);if(!h.result)throw new Error(`Failed to send transaction: ${h.message}`);const g=HC.createPendingTransaction({txId:h.txid,account:s,scope:n});return await this.#Ee.save(g),await this.#Ce.scheduleBackgroundEvent({method:jB.TrackTransaction,params:{txId:h.txid,scope:n,accountIds:[r],attempt:0},duration:\"PT1S\"}),{transactionId:h.txid}}async#gr(e){try{return O(e,bC),{valid:!0,errors:[]}}catch(e){return await this.#Ce.trackError(e),{valid:!1,errors:[{code:lC.Invalid}]}}}async#yr(e){try{O(e,TC);const{accountId:t,assetId:r,value:n,toAddress:o}=e.params;if(!await this.#Jt.findById(t))return{valid:!1,errors:[{code:lC.Required}]};const{chainId:s}=we(r),a=s,[i,c,u,l]=await this.#Pe.getAssetsByAccountId(t,[r,Qn[a].nativeToken.id,Qn[a].bandwidth.id,Qn[a].energy.id]),d=new Mn(n),f=i?new Mn(i.uiAmount):Fn,p=c?new Mn(c.uiAmount):Fn,h=u?new Mn(u.uiAmount):Fn,g=l?new Mn(l.uiAmount):Fn;if(!i||d.isGreaterThan(f))return{valid:!1,errors:[{code:lC.InsufficientBalance}]};if(!o)return{valid:!0,errors:[]};const y=await this.#dr.buildTransaction({fromAccountId:t,toAddress:o,asset:i,amount:d,feeLimit:Dn}),m=await this.#Yt.computeFee({scope:a,transaction:y,availableEnergy:g,availableBandwidth:h,feeLimit:Dn}),b=Qn[a].nativeToken.id,w=new Mn(m.find(e=>e.asset.type===b)?.asset.amount??\"0\");return(r===b?d.plus(w):w).isGreaterThan(p)?{valid:!1,errors:[{code:lC.InsufficientBalanceToCoverFee}]}:{valid:!0,errors:[]}}catch(e){return await this.#Ce.trackError(e),this.#ne.error(\"Error in #handleOnAmountInput:\",e),{valid:!1,errors:[{code:lC.Invalid}]}}}async#mr(e){KC(e,yC,new DP);const{fromAccountId:t,toAddress:r,amount:n,assetId:o}=e.params,s=await this.#Jt.findById(t);if(!s)return{valid:!1,errors:[{code:lC.Invalid}]};const a=await this.#Pe.getAssetByAccountId(t,o);if(!a)return{valid:!1,errors:[{code:lC.InsufficientBalance}]};const{chainId:i}=we(o),c=i,u=new Mn(n),l=await this.#dr.validateSend({scope:c,fromAccountId:t,toAddress:r,asset:a,amount:u,feeLimit:Dn});if(!l.valid)return{valid:!1,errors:[{code:l.errorCode??lC.InsufficientBalance}]};const[[d,f],p]=await Promise.all([this.#Pe.getAssetsByAccountId(t,[Qn[c].bandwidth.id,Qn[c].energy.id]),this.#dr.buildTransaction({fromAccountId:t,toAddress:r,asset:a,amount:u,feeLimit:Dn})]),h=f?new Mn(f.rawAmount):Fn,g=d?new Mn(d.rawAmount):Fn,y=await this.#Yt.computeFee({scope:c,transaction:p,availableEnergy:h,availableBandwidth:g,feeLimit:Dn}),m=await this.#Xt.ensureFreshRawData({scope:c,rawData:p.raw_data});if(!await this.#pr.confirmTransactionRequest({scope:c,fromAddress:s.address,toAddress:r,amount:n,fees:y,asset:a,accountType:s.type,origin:\"MetaMask\",transactionRawData:m}))throw new XP;const b=await this.#dr.signAndSendTransaction({scope:c,fromAccountId:t,transaction:p}),w=HC.createPendingSendTransaction({txId:b.txid,account:s,scope:c,toAddress:r,amount:n,assetType:o,assetSymbol:a.symbol});return await this.#Ee.save(w),this.#ne.log(`Created pending Send transaction ${b.txid} for account ${s.id}`),{transactionId:b.txid,status:dr.Submitted}}async#br(e){KC(e,BC,new DP);const{params:{scope:t,transaction:r,accountId:n,options:{type:o,feeLimit:s}}}=e;await this.#Jt.findByIdOrThrow(n);const a=this.#Ht.createClient(t);let i=GB.from(r,\"base64\").toString(\"hex\");const c=a.utils.deserializeTx.deserializeTransaction(o,i);i=this.#Wr(a,c,s),tE(c);const u={visible:!1,txID:YE(await cC(XE(i))).slice(2),raw_data:c,raw_data_hex:i},[l,d]=await this.#Pe.getAssetsByAccountId(n,[Qn[t].bandwidth.id,Qn[t].energy.id]),f=d?new Mn(d.rawAmount):Fn,p=l?new Mn(l.rawAmount):Fn,h=await this.#Yt.computeFee({scope:t,transaction:u,availableEnergy:f,availableBandwidth:p,feeLimit:c.fee_limit});return O(h,WC),h}async#wr(e){KC(e,IC,new DP);const{fromAccountId:t,value:r,options:{purpose:n}}=e.params,o=await this.#Jt.findByIdOrThrow(t),s=Ln.Mainnet,a=await this.#Pe.getAssetByAccountId(t,Qn[s].nativeToken.id),i=a?new Mn(a.uiAmount):Fn,c=Mn(r);if(c.isGreaterThan(i))return{valid:!1,errors:[lC.InsufficientBalance]};const u=this.#Ht.createClient(s),l=Number(zC(c)),d=await u.transactionBuilder.freezeBalanceV2(l,n,o.address),[f,p]=await this.#Pe.getAssetsByAccountId(t,[Qn[s].bandwidth.id,Qn[s].energy.id]),h=p?Mn(p.rawAmount):Fn,g=f?Mn(f.rawAmount):Fn,y=await this.#Yt.computeFee({scope:s,transaction:d,availableEnergy:h,availableBandwidth:g});return O(y,WC),y}async#Tr(e){KC(e,PC,new DP);const{accountId:t,assetId:r,value:n}=e.params;await this.#Jt.findByIdOrThrow(t);const o=await this.#Pe.getAssetByAccountId(t,r),s=o?new Mn(o.uiAmount):Fn;return new Mn(n).isGreaterThan(s)?{valid:!1,errors:[{code:lC.InsufficientBalance}]}:{valid:!0,errors:[]}}async#Ar(e){KC(e,CC,new DP);const{fromAccountId:t,assetId:r,value:n,options:{purpose:o,srNodeAddress:s}}=e.params,a=await this.#Jt.findByIdOrThrow(t),i=await this.#Pe.getAssetByAccountId(t,r),c=i?new Mn(i.uiAmount):Fn,u=new Mn(n);return u.isGreaterThan(c)?{valid:!1,errors:[{code:lC.InsufficientBalance}]}:(await this.#fr.stake({account:a,assetId:r,amount:u,purpose:o,srNodeAddress:s}),{valid:!0,errors:[]})}async#vr(e){KC(e,RC,new DP);const{accountId:t,assetId:r,value:n,options:{purpose:o}}=e.params,s=`${r}-staked-for-${o.toLowerCase()}`;await this.#Jt.findByIdOrThrow(t);const a=await this.#Pe.getAssetByAccountId(t,s),i=a?new Mn(a.uiAmount):Fn;return new Mn(n).isGreaterThan(i)?{valid:!1,errors:[{code:lC.InsufficientBalance}]}:{valid:!0,errors:[]}}async#Pr(e){KC(e,OC,new DP);const{accountId:t,assetId:r,value:n,options:{purpose:o}}=e.params,s=`${r}-staked-for-${o.toLowerCase()}`,a=await this.#Jt.findByIdOrThrow(t),i=await this.#Pe.getAssetByAccountId(t,s),c=i?new Mn(i.uiAmount):Fn,u=new Mn(n);return u.isGreaterThan(c)?{valid:!1,errors:[{code:lC.InsufficientBalance}]}:(await this.#fr.unstake({account:a,assetId:s,amount:u}),{valid:!0,errors:[]})}async#Er(e){KC(e,FC,new DP);const{fromAccountId:t,assetId:r}=e.params,n=await this.#Jt.findByIdOrThrow(t),{chainId:o}=we(r),s=o;if(!await this.#pr.confirmClaimUnstakedTrx({account:n,scope:s}))throw new XP;return await this.#fr.claimUnstakedTrx({account:n,scope:s}),{valid:!0,errors:[]}}async#Cr(e){KC(e,NC,new DP);const{fromAccountId:t,assetId:r}=e.params,n=await this.#Jt.findByIdOrThrow(t),{chainId:o}=we(r),s=o;return await this.#fr.claimTrxStakingRewards({account:n,scope:s}),{valid:!0,errors:[]}}async#Br(e){KC(e,$C,new DP);const{params:{accountId:t,message:r}}=e,n=await this.#Jt.findById(t);if(!n)throw new DP(`Account not found: ${t}`);const{address:o}=UC(r);if(o!==n.address)throw new DP(`Address in rewards message (${o}) does not match signing account address (${n.address})`);const{privateKeyHex:s}=await this.#Jt.deriveTronKeypair({entropySource:n.entropySource,derivationPath:n.derivationPath}),a=this.#Ht.createClient(Ln.Mainnet,s),i=GB.from(r,\"base64\").toString(\"utf8\");return{signature:a.trx.signMessageV2(i,s),signedMessage:r,signatureType:\"secp256k1\"}}#Wr(e,t,r=1e8){t.fee_limit=r;const n=e.utils.transaction.txJsonToPb({raw_data:t});return e.utils.transaction.txPbToRawDataHex(n)}}({logger:Ne,snapClient:I_,accountsService:j_,assetsService:$_,sendService:H_,tronWebFactory:k_,feeCalculatorService:V_,stakingService:K_,confirmationHandler:J_,transactionsService:z_,transactionExpirationRefresherService:G_}),Q_=new class{#ne;#Jt;#Ce;#Ie;#xe;#Re;#Sr;#Xt;constructor({logger:e,accountsService:t,snapClient:r,state:n,priceApiClient:o,tronHttpClient:s,transactionScanService:a,transactionExpirationRefresherService:i}){this.#ne=ke(e,\"[⏰ CronHandler]\"),this.#Jt=t,this.#Ce=r,this.#Ie=n,this.#xe=o,this.#Re=s,this.#Sr=a,this.#Xt=i}async handle(e){const{method:t,params:r}=e,{active:n,locked:o}=await this.#Ce.getClientStatus();if(n&&!o)switch(t){case\"onSynchronizeSelectedAccountsCronjob\":case\"onSynchronizeSelectedAccounts\":await this.synchronizeSelectedAccounts();break;case\"onSynchronizeAccounts\":await this.synchronizeAccounts(r);break;case\"onSynchronizeAccount\":await this.synchronizeAccount(r);break;case\"onSynchronizeAccountTransactions\":await this.synchronizeAccountTransactions(r);break;case\"refreshConfirmationPrices\":await this.refreshConfirmationPrices();break;case\"refreshConfirmationSend\":await this.refreshConfirmationSend();break;case\"refreshSignTransaction\":await this.refreshSignTransaction();break;case\"onTrackTransaction\":await this.trackTransaction(r);break;default:throw new Error(`Unknown cronjob method: ${t}`)}}async synchronizeSelectedAccounts(){this.#ne.info(\"Synchronizing selected accounts...\");const e=await this.#Jt.getAllSelected();await this.#Jt.synchronize(e)}async synchronizeAccounts({accountIds:e}){this.#ne.info(`Synchronizing accounts ${e.join(\", \")}...`);const t=await this.#Jt.findByIds(e);0!==t.length&&await this.#Jt.synchronize(t)}async synchronizeAccount({accountId:e}){this.#ne.info(`Synchronizing account ${e}...`);const t=await this.#Jt.findById(e);t&&await this.#Jt.synchronize([t])}async synchronizeAccountTransactions({accountId:e}){this.#ne.info(`Synchronizing account transactions ${e}...`);const t=await this.#Jt.findById(e);t&&await this.#Jt.synchronizeTransactions([t])}async refreshConfirmationPrices(){this.#ne.info(\"Background price refresh triggered for confirmation...\");const e=(await this.#Ie.getKey(\"mapInterfaceNameToId\")??{})[zB];e?await this.#Ir(e):this.#ne.info(\"No active transaction request interface found\")}async#Ir(e){const t=await this.#Ce.getInterfaceContext(e);if(t)try{const r=[t.asset.assetType,...t.fees.map(e=>e.asset.type)],n=[...new Set(r)],o={...t,tokenPricesFetchStatus:JC.Fetching};await this.#Ce.updateInterface(e,qC($B,{context:o}),o),this.#ne.info(`Fetching fresh prices for ${n.length} assets`);const s=await this.#xe.getMultipleSpotPrices(n,t.preferences.currency),a=await this.#Ce.getInterfaceContext(e);if(!a)return void this.#ne.info(\"Interface context no longer exists after fetch, skipping update\");const i={...a,tokenPrices:s,tokenPricesFetchStatus:JC.Fetched};await this.#Ce.updateInterface(e,qC($B,{context:i}),i),this.#ne.info(\"Successfully refreshed confirmation prices\"),await this.#Ce.scheduleBackgroundEvent({method:\"refreshConfirmationPrices\",duration:\"PT20S\"})}catch(e){this.#ne.warn({error:e},\"Could not refresh confirmation prices\")}else this.#ne.info(\"Interface context no longer exists, skipping refresh\")}async refreshConfirmationSend(){this.#ne.info(\"Background scan refresh triggered for send confirmation...\");const e=(await this.#Ie.getKey(\"mapInterfaceNameToId\")??{})[zB];if(!e)return void this.#ne.info(\"No active send confirmation interface found\");const t=await this.#Ce.getInterfaceContext(e);if(!t)return void this.#ne.info(\"Interface context no longer exists, skipping refresh\");if(!t.fromAddress||!t.scope)return void this.#ne.info(\"Context is missing required fields for scan refresh\");const{preferences:r,scope:n,fromAddress:o,origin:s}=t,a=t.transactionRawData;if(a)try{const i={...t,scanFetchStatus:JC.Fetching};await this.#Ce.updateInterface(e,qC($B,{context:i}),i);const c=[\"simulation\"];r.useSecurityAlerts&&c.push(\"validation\");const u={type:t.accountType,address:o};let{scan:l}=t,{scanFetchStatus:d}=t,f=a;try{f=await this.#Xt.ensureFreshRawData({scope:n,rawData:a}),l=await this.#Sr.scanTransaction({accountAddress:o,transactionRawData:f,origin:s,scope:n,options:c,account:u}),d=l?JC.Fetched:JC.Error,this.#ne.info(\"Successfully refreshed send confirmation scan\")}catch(e){this.#ne.error(\"Error refreshing send confirmation scan:\",e),l=null,d=JC.Error}const p=await this.#Ce.getInterfaceContext(e);if(!p)return void this.#ne.info(\"Interface context no longer exists after scan, skipping update\");const h={...p,scan:l,scanFetchStatus:d,transactionRawData:f};await this.#Ce.updateInterface(e,qC($B,{context:h}),h),this.#ne.info(\"Successfully refreshed send confirmation\"),await this.#Ce.scheduleBackgroundEvent({method:\"refreshConfirmationSend\",duration:\"PT20S\"})}catch(e){this.#ne.warn({error:e},\"Could not refresh send confirmation\")}else this.#ne.info(\"Context is missing transactionRawData for scan refresh\")}async refreshSignTransaction(){this.#ne.info(\"Background refresh triggered for signTransaction confirmation...\");const e=(await this.#Ie.getKey(\"mapInterfaceNameToId\")??{})[NB];if(!e)return void this.#ne.info(\"No active signTransaction confirmation interface found\");const t=await this.#Ce.getInterfaceContext(e);if(!t)return void this.#ne.info(\"Interface context no longer exists, skipping refresh\");if(!t.account?.address||!t.transaction||!t.scope)return void this.#ne.info(\"Context is missing required fields\");const{preferences:r,scope:n,account:o,origin:s,transaction:a}=t,i=r.simulateOnChainActions||r.useSecurityAlerts;try{const c={...t,scanFetchStatus:i?JC.Fetching:t.scanFetchStatus};await this.#Ce.updateInterface(e,qC(kB,{context:c}),c);let{scan:u,scanFetchStatus:l}=t,d=a.rawDataHex;if(i){const e=[];r.simulateOnChainActions&&e.push(\"simulation\"),r.useSecurityAlerts&&e.push(\"validation\");try{const t=await this.#Xt.ensureFreshSerializedTransaction({scope:n,type:a.type,rawDataHex:a.rawDataHex});d=t.raw_data_hex,u=await this.#Sr.scanTransaction({accountAddress:o.address,transactionRawData:t.raw_data,origin:s,scope:n,options:e,account:o}),l=u?JC.Fetched:JC.Error,this.#ne.info(\"Successfully refreshed signTransaction scan\")}catch(e){this.#ne.error(\"Error refreshing signTransaction scan:\",e),u=null,l=JC.Error}}const f=await this.#Ce.getInterfaceContext(e);if(!f)return void this.#ne.info(\"Interface context no longer exists after scan, skipping update\");const p={...f,scan:u,scanFetchStatus:l,transaction:{...f.transaction,rawDataHex:d}};await this.#Ce.updateInterface(e,qC(kB,{context:p}),p),this.#ne.info(\"Successfully refreshed signTransaction confirmation\"),await this.#Ce.scheduleBackgroundEvent({method:\"refreshSignTransaction\",duration:\"PT20S\"})}catch(e){this.#ne.warn({error:e},\"Could not refresh signTransaction\")}}async trackTransaction({txId:e,scope:t,accountIds:r,attempt:n=0}){const o=\"PT1S\";if(this.#ne.info(`[Attempt ${n+1} of 15] Tracking transaction ${e} on ${t}...`),n>=15){this.#ne.warn({txId:e,scope:t,attempts:15},\"Transaction tracking timeout - syncing accounts\");const n=await this.#Jt.findByIds(r);return void(n.length>0&&await this.#Jt.synchronize(n))}try{const s=await this.#Re.getTransactionInfoById(t,e);if(!s)return this.#ne.info({txId:e,attempt:n},\"Transaction not confirmed yet, scheduling next check...\"),void await this.#Ce.scheduleBackgroundEvent({method:\"onTrackTransaction\",params:{txId:e,scope:t,accountIds:r,attempt:n+1},duration:o});this.#ne.log({txId:e,blockNumber:s.blockNumber,scope:t},\"✅ Transaction confirmed on-chain\");const a=(await this.#Jt.findByIds(r))[0];if(!a)return void this.#ne.error({txId:e},\"Sender account not found\");await this.#Ce.scheduleBackgroundEvent({method:\"onSynchronizeSelectedAccounts\",duration:\"PT1S\"}),await this.#Ce.trackTransactionFinalized({origin:\"MetaMask\",accountType:a.type,chainIdCaip:t})}catch(s){if(this.#ne.error({error:s,txId:e,scope:t,attempt:n},\"Error tracking transaction\"),n<14)await this.#Ce.scheduleBackgroundEvent({method:\"onTrackTransaction\",params:{txId:e,scope:t,accountIds:r,attempt:n+1},duration:o});else{this.#ne.warn({txId:e,scope:t},\"Max tracking attempts reached with errors - falling back to account sync\");const n=await this.#Jt.findByIds(r);n.length>0&&await this.#Jt.synchronize(n)}}}}({logger:Ne,snapClient:I_,accountsService:j_,state:S_,priceApiClient:U_,tronHttpClient:O_,transactionScanService:Z_,transactionExpirationRefresherService:G_}),eR=new class{#ne;#Ce;#Jt;#Pe;#Ee;#_r;#pr;#Xt;constructor({logger:e,snapClient:t,accountsService:r,assetsService:n,transactionsService:o,walletService:s,confirmationHandler:a,transactionExpirationRefresherService:i}){this.#ne=ke(e,\"[🔑 KeyringHandler]\"),this.#Ce=t,this.#Jt=r,this.#Pe=n,this.#Ee=o,this.#_r=s,this.#pr=a,this.#Xt=i}async handle(e,t){oW(e,t.method);return await QB(async()=>KB(this,t))??null}async#Rr(){try{const e=await this.#Jt.getAll();return(0,Te.sortBy)(e,[\"entropySource\",\"index\"])}catch(e){throw this.#ne.error({error:e},\"Error listing accounts\"),new Error(\"Error listing accounts\")}}async listAccounts(){return(await this.#Rr()).map(YB)}async#xr(e){try{return await this.#Jt.findById(e)??void 0}catch(e){throw this.#ne.error({error:e},\"Error getting account\"),new MP(e)}}async getAccount(e){sW({accountId:e},vA);const t=await this.#xr(e);return t?YB(t):void 0}async#Or(e){const t=await this.#xr(e);if(!t)throw new Error(`Account \"${e}\" not found`);return t}async createAccount(e){sW(e,SA);try{return await this.#Jt.create(e)}catch(e){throw this.#ne.error({error:e},\"Error creating account\"),new Error(`Error creating account: ${e.message}`)}}async listAccountAssets(e){try{sW({accountId:e},EA),await this.#Or(e),this.#ne.info(\"Listing account assets\",{accountId:e});const t=(await this.#Pe.getByKeyringAccountId(e)).filter(e=>to.includes(e.assetType)||Number(e.rawAmount)>0).map(e=>e.assetType);return this.#ne.info(\"Account assets\",{accountId:e,result:t}),aW(t,rn),t}catch(e){throw this.#ne.error({error:e},\"Error listing account assets\"),e}}async listAccountTransactions(e,t){try{sW({accountId:e,pagination:t},BA),this.#ne.info(\"Listing account transactions...\");const{limit:r,next:n}=t,o=await this.#xr(e);if(!o)throw new Error(\"Account not found\");const s=await this.#Ee.findByAccounts([o]),a=n?s.findIndex(e=>e.id===n):0,i=s.slice(a,a+r),c=a+t.limit<s.length;return{data:i,next:c?s[a+t.limit]?.id??null:null}}catch(e){throw this.#ne.error({error:e},\"Error listing account transactions\"),e}}async discoverAccounts(e,t,r){try{sW({scopes:e,entropySource:t,groupIndex:r},IA);const n=await this.#Jt.deriveAccount({entropySource:t,index:r}),o=[];for(const t of e)o.push(this.#Ee.checkAddressActivity(t,n.address));const s=await Promise.all(o);return s.some(e=>e)?[{type:\"bip44\",scopes:e,derivationPath:n.derivationPath}]:[]}catch(e){throw this.#ne.error({error:e},\"Error discovering accounts\"),e}}async getAccountBalances(e,t){try{sW({accountId:e,assets:t},CA),this.#ne.info(\"Getting account balances\",{accountId:e,assets:t}),await this.#Or(e);const r=await this.#Pe.getByKeyringAccountId(e),n=r.filter(e=>t.includes(e.assetType)).filter(e=>to.includes(e.assetType)||Number(e.rawAmount)>0).reduce((e,t)=>(e[t.assetType]={unit:t.symbol,amount:t.uiAmount},e),{});return this.#ne.info(\"Account balances\",{accountId:e,result:n}),aW(n,_A),n}catch(e){throw this.#ne.error({error:e},\"Error getting account balances\"),e}}async resolveAccountAddress(e,t){this.#ne.info(\"Resolving account address\",{scope:e,request:t});const r=await this.#Rr();return await this.#_r.resolveAccountAddress(r,e,t)}async filterAccountChains(e,t){throw new Error(\"Method not implemented.\")}async updateAccount(e){throw new Error(\"Method not implemented.\")}async deleteAccount(e){try{sW({accountId:e},PA);const t=await this.#Or(e);await ZB(snap,gn.AccountDeleted,{id:t.id}),await this.#Jt.delete(e)}catch(e){throw this.#ne.error({error:e},\"Error deleting account\"),e}}async submitRequest(e){return{pending:!1,result:await this.#Mr(e)}}async#Fr(e){if(e.request.method!==cA.SignTransaction)return e;O(e.request.params,NA);const{scope:t,request:{params:{transaction:{rawDataHex:r,type:n}}}}=e,o=await this.#Xt.ensureFreshSerializedTransaction({scope:t,type:n,rawDataHex:r});return{...e,request:{...e.request,params:{...e.request.params,transaction:{...e.request.params.transaction,rawDataHex:o.raw_data_hex}}}}}async#Mr(e){O(e,LA),this.#ne.log(\"Handling submitRequest\",{method:e.request.method});const{request:{method:t,params:r={}},scope:n,account:o}=e,s=await this.#Or(o);if(n&&!s.scopes.includes(n))throw new Error(`Scope \"${n}\" is not allowed for this account`);if(!s.methods.includes(t))throw new Error(`Method \"${t}\" is not allowed for this account`);const a=await this.#Fr(e);if(!await this.#pr.handleKeyringRequest({request:a,account:s}))throw new XP;return await this.#_r.handleKeyringRequest({account:s,scope:a.scope,method:a.request.method,params:a.request.params??r})}async setSelectedAccounts(e){sW(e,D(wA));const t=new Set((await this.#Rr()).map(e=>e.id));if(!e.every(e=>t.has(e)))throw new DP(\"Account IDs were not part of existing accounts.\");await this.#Ce.scheduleBackgroundEvent({method:jB.SynchronizeSelectedAccounts,params:{accountIds:e},duration:\"PT1S\"})}}({logger:Ne,snapClient:I_,accountsService:j_,assetsService:$_,transactionsService:z_,walletService:q_,confirmationHandler:J_,transactionExpirationRefresherService:G_}),tR=new class{#ne;constructor({logger:e}){this.#ne=ke(e,\"[👋 RpcHandler]\")}async handle(e,t){oW(e,t.method),this.#ne.log(\"Handling RPC request\",t);const{method:r}=t;throw new zP}}({logger:Ne}),rR=new class{#ne;#Ce;constructor({logger:e,snapClient:t}){this.#ne=ke(e,\"[👵 LifecycleHandler]\"),this.#Ce=t}async handle({id:e,event:t,context:r}){if(this.#ne.log(\"[👇 onUserInput]\",e,t),!t.name)return;const n={...DB(this.#Ce),...cW(this.#Ce),...fB(this.#Ce)}[t.name];n&&await QB(async()=>n({id:e,event:t,context:r}))}}({logger:Ne,snapClient:I_}),nR={snapClient:I_,state:S_,priceApiClient:U_,feeCalculatorService:V_,assetsService:$_,accountsService:j_,transactionsService:z_,sendService:H_,walletService:q_,tronHttpClient:O_,tronWebFactory:k_,confirmationHandler:J_,transactionScanService:Z_,assetsHandler:Y_,clientRequestHandler:X_,cronHandler:Q_,keyringHandler:eR,rpcHandler:tR,userInputHandler:rR},oR=async e=>QB(async()=>Y_.onAssetHistoricalPrice(e)),sR=async e=>QB(async()=>Y_.onAssetsConversion(e)),aR=async e=>QB(async()=>Y_.onAssetsLookup(e)),iR=async e=>QB(async()=>Y_.onAssetsMarketData(e)),cR=async({request:e})=>QB(async()=>X_.handle(e)),uR=async({request:e})=>QB(async()=>Q_.handle(e)),lR=async({origin:e,request:t})=>QB(async()=>eR.handle(e,t)),dR=async({origin:e,request:t})=>QB(async()=>tR.handle(e,t)),fR=async e=>QB(async()=>rR.handle(e))})(),module.exports=n})();"},{"path":"locales/en.json","value":"{\n  \"locale\": \"en\",\n  \"messages\": {\n    \"confirmation.transaction.title\": {\n      \"message\": \"Transaction request\"\n    },\n    \"confirmation.estimatedChanges.title\": {\n      \"message\": \"Estimated changes\"\n    },\n    \"confirmation.estimatedChanges.tooltip\": {\n      \"message\": \"Estimated changes are what might happen if you go through with this transaction. This is just a prediction, not a guarantee.\"\n    },\n    \"confirmation.estimatedChanges.send\": {\n      \"message\": \"You send\"\n    },\n    \"confirmation.bandwidthConsumed\": {\n      \"message\": \"Bandwidth consumed\"\n    },\n    \"confirmation.estimatedChanges.receive\": {\n      \"message\": \"You receive\"\n    },\n    \"confirmation.origin\": {\n      \"message\": \"Request from\"\n    },\n    \"confirmation.origin.tooltip\": {\n      \"message\": \"This is the site asking for your confirmation.\"\n    },\n    \"confirmation.from\": {\n      \"message\": \"From\"\n    },\n    \"confirmation.to\": {\n      \"message\": \"To\"\n    },\n    \"confirmation.network\": {\n      \"message\": \"Network\"\n    },\n    \"confirmation.transactionFee\": {\n      \"message\": \"Network fee\"\n    },\n    \"confirmation.confirmButton\": {\n      \"message\": \"Confirm\"\n    },\n    \"confirmation.cancelButton\": {\n      \"message\": \"Cancel\"\n    },\n    \"confirmation.signMessage.title\": {\n      \"message\": \"Sign message\"\n    },\n    \"confirmation.signMessage.message\": {\n      \"message\": \"Message\"\n    },\n    \"confirmation.account\": {\n      \"message\": \"Account\"\n    },\n    \"confirmation.signTransaction.title\": {\n      \"message\": \"Sign transaction\"\n    },\n    \"confirmation.estimatedChanges.notAvailable\": {\n      \"message\": \"Estimated changes are not available\"\n    },\n    \"confirmation.estimatedChanges.noChanges\": {\n      \"message\": \"No estimated changes\"\n    },\n    \"confirmation.estimatedChanges.unsupportedContract\": {\n      \"message\": \"Unsupported contract for simulation\"\n    },\n    \"confirmation.simulationTitleAPIError\": {\n      \"message\": \"Because of an error, we couldn't check for security alerts.\"\n    },\n    \"confirmation.simulationMessageAPIError\": {\n      \"message\": \"Only continue if you trust every address involved.\"\n    },\n    \"confirmation.simulationErrorTitle\": {\n      \"message\": \"This transaction was reverted during simulation.\"\n    },\n    \"confirmation.simulationErrorSubtitle\": {\n      \"message\": \"{reason}\"\n    },\n    \"confirmation.validationErrorTitle\": {\n      \"message\": \"This is a deceptive request\"\n    },\n    \"confirmation.validationErrorSubtitle\": {\n      \"message\": \"If you approve this request, a third party known for scams will take all your assets.\"\n    },\n    \"confirmation.validationErrorLearnMore\": {\n      \"message\": \"Learn more\"\n    },\n    \"confirmation.validationErrorSecurityAdviced\": {\n      \"message\": \"Security advice by\"\n    },\n    \"transactionScan.errors.unknownError\": {\n      \"message\": \"An unknown error occurred\"\n    },\n    \"transactionScan.errors.insufficientBalance\": {\n      \"message\": \"Insufficient balance\"\n    },\n    \"transactionScan.errors.invalidTransaction\": {\n      \"message\": \"Invalid transaction\"\n    },\n    \"transactionScan.errors.insufficientFunds\": {\n      \"message\": \"Insufficient funds\"\n    },\n    \"transactionScan.errors.invalidAddress\": {\n      \"message\": \"Invalid address\"\n    },\n    \"transactionScan.errors.unsupportedEIP712Message\": {\n      \"message\": \"Unsupported method\"\n    }\n  }\n}\n"}],"removable":false,"hideSnapBranding":true}