Files
to_session/web_process/MetaMask 12.16.1/common-6.js

15 lines
943 KiB
JavaScript
Raw Normal View History

2025-11-12 12:54:37 +08:00
LavaPack.loadBundle([[3246,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=-32700,o=-32603,s=-32602,a=-32601,c=-32600,u=-32016,l=-32015,p=-32014,d=-32013,h=-32012,f=-32011,y=-32010,m=-32009,T=-32008,g=-32007,b=-32006,_=-32005,O=-32004,E=-32003,S=-32002,v=-32001,x=28e5,w=2800001,A=2800002,R=2800003,I=2800004,P=2800005,N=2800006,C=2800007,j=2800008,k=2800009,M=2800010,L=323e4,D=32300001,B=3230002,z=3230003,U=3230004,F=361e4,$=3610001,G=3610002,H=3610003,K=3610004,V=3610005,q=3610006,W=3610007,Y=3611e3,Q=3704e3,X=3704001,J=3704002,Z=3704003,ee=3704004,te=4128e3,re=4128001,ne=4128002,ie=4615e3,oe=4615001,se=4615002,ae=4615003,ce=4615004,ue=4615005,le=4615006,pe=4615007,de=4615008,he=4615009,fe=4615010,ye=4615011,me=4615012,Te=4615013,ge=4615014,be=4615015,_e=4615016,Oe=4615017,Ee=4615018,Se=4615019,ve=4615020,xe=4615021,we=4615022,Ae=4615023,Re=4615024,Ie=4615025,Pe=4615026,Ne=4615027,Ce=4615028,je=4615029,ke=4615030,Me=4615031,Le=4615032,De=4615033,Be=4615034,ze=4615035,Ue=4615036,Fe=4615037,$e=4615038,Ge=4615039,He=4615040,Ke=4615041,Ve=4615042,qe=4615043,We=4615044,Ye=4615045,Qe=4615046,Xe=4615047,Je=4615048,Ze=4615049,et=4615050,tt=4615051,rt=4615052,nt=4615053,it=4615054,ot=5508e3,st=5508001,at=5508002,ct=5508003,ut=5508004,lt=5508005,pt=5508006,dt=5508007,ht=5508008,ft=5508009,yt=5508010,mt=5508011,Tt=5663e3,gt=5663001,bt=5663002,_t=5663003,Ot=5663004,Et=5663005,St=5663006,vt=5663007,xt=5663008,wt=5663009,At=5663010,Rt=5663011,It=5663012,Pt=5663013,Nt=5663014,Ct=5663015,jt=5663016,kt=5663017,Mt=5663018,Lt=5663019,Dt=705e4,Bt=7050001,zt=7050002,Ut=7050003,Ft=7050004,$t=7050005,Gt=7050006,Ht=7050007,Kt=7050008,Vt=7050009,qt=7050010,Wt=7050011,Yt=7050012,Qt=7050013,Xt=7050014,Jt=7050015,Zt=7050016,er=7050017,tr=7050018,rr=7050019,nr=7050020,ir=7050021,or=7050022,sr=7050023,ar=7050024,cr=7050025,ur=7050026,lr=7050027,pr=7050028,dr=7050029,hr=7050030,fr=7050031,yr=7050032,mr=7050033,Tr=7050034,gr=7050035,br=7050036,_r=8078e3,Or=8078001,Er=8078002,Sr=8078003,vr=8078004,xr=8078005,wr=8078006,Ar=8078007,Rr=8078008,Ir=8078009,Pr=8078010,Nr=8078011,Cr=8078012,jr=8078013,kr=8078014,Mr=8078015,Lr=8078016,Dr=8078017,Br=8078018,zr=8078019,Ur=8078020,Fr=8078021,$r=8078022,Gr=81e5,Hr=8100001,Kr=8100002,Vr=8100003,qr=819e4,Wr=8190001,Yr=8190002,Qr=8190003,Xr=8190004,Jr=99e5,Zr=9900001,en=9900002,tn=9900003,rn=9900004;function nn(e){if(Array.isArray(e)){return"%5B"+e.map(nn).join("%2C%20")+"%5D"}return"bigint"==typeof e?`${e}n`:encodeURIComponent(String(null!=e&&null===Object.getPrototypeOf(e)?{...e}:e))}function on([e,t]){return`${e}=${nn(t)}`}function sn(e,t={}){{let r=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(r+=` '${function(e){const t=Object.entries(e).map(on).join("&");return btoa(t)}(t)}'`),`${r}\``}}var an=class extends Error{constructor(...[e,t]){let r,i;if(t){const{cause:e,...n}=t;e&&(i={cause:e}),Object.keys(n).length>0&&(r=n)}super(sn(e,r),i),n(this,"cause",this.cause),n(this,"context",void 0),this.context={__code:e,...r},this.name="SolanaError"}};function cn(...e){"captureStackTrace"in Error&&"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(...e)}function un({errorCodeBaseOffset:e,getErrorContext:t,orderedErrorNames:r,rpcEnumError:n},i){let o,s;"string"==typeof n?o=n:(o=Object.keys(n)[0],s=n[o]);const a=e+r.indexOf(o),c=t(a,o,s),u=new an(a,c);return cn(u,i),u}var ln=["GenericError","InvalidArgument","InvalidInstructionData","InvalidAccountData","AccountDataTooSmall","InsufficientFunds","IncorrectProgramId","MissingRequire
/*!
* accounting.js v0.4.1
* Copyright 2014 Open Exchange Rates
*
* Freely distributable under the MIT license.
* Portions of accounting.js are inspired or borrowed from underscore.js
*
* Full details and documentation:
* http://openexchangerates.github.io/accounting.js/
*/
!function(e,n){var i={version:"0.4.1",settings:{currency:{symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3},number:{precision:0,grouping:3,thousand:",",decimal:"."}}},o=Array.prototype.map,s=Array.isArray,a=Object.prototype.toString;function c(e){return!!(""===e||e&&e.charCodeAt&&e.substr)}function u(e){return s?s(e):"[object Array]"===a.call(e)}function l(e){return e&&"[object Object]"===a.call(e)}function p(e,t){var r;for(r in e=e||{},t=t||{})t.hasOwnProperty(r)&&null==e[r]&&(e[r]=t[r]);return e}function d(e,t,r){var n,i,s=[];if(!e)return s;if(o&&e.map===o)return e.map(t,r);for(n=0,i=e.length;n<i;n++)s[n]=t.call(r,e[n],n,e);return s}function h(e,t){return e=Math.round(Math.abs(e)),isNaN(e)?t:e}function f(e){var t=i.settings.currency.format;return"function"==typeof e&&(e=e()),c(e)&&e.match("%v")?{pos:e,neg:e.replace("-","").replace("%v","-%v"),zero:e}:e&&e.pos&&e.pos.match("%v")?e:c(t)?i.settings.currency.format={pos:t,neg:t.replace("%v","-%v"),zero:t}:t}var y,m=i.unformat=i.parse=function(e,t){if(u(e))return d(e,(function(e){return m(e,t)}));if("number"==typeof(e=e||0))return e;t=t||i.settings.number.decimal;var r=new RegExp("[^0-9-"+t+"]",["g"]),n=parseFloat((""+e).replace(/\((.*)\)/,"-$1").replace(r,"").replace(t,"."));return isNaN(n)?0:n},T=i.toFixed=function(e,t){t=h(t,i.settings.number.precision);var r=Math.pow(10,t);return(Math.round(i.unformat(e)*r)/r).toFixed(t)},g=i.formatNumber=i.format=function(e,t,r,n){if(u(e))return d(e,(function(e){return g(e,t,r,n)}));e=m(e);var o=p(l(t)?t:{precision:t,thousand:r,decimal:n},i.settings.number),s=h(o.precision),a=e<0?"-":"",c=parseInt(T(Math.abs(e||0),s),10)+"",f=c.length>3?c.length%3:0;return a+(f?c.substr(0,f)+o.thousand:"")+c.substr(f).replace(/(\d{3})(?=\d)/g,"$1"+o.thousand)+(s?o.decimal+T(Math.abs(e),s).split(".")[1]:"")},b=i.formatMoney=function(e,t,r,n,o,s){if(u(e))return d(e,(function(e){return b(e,t,r,n,o,s)}));e=m(e);var a=p(l(t)?t:{symbol:t,precision:r,thousand:n,decimal:o,format:s},i.settings.currency),c=f(a.format);return(e>0?c.pos:e<0?c.neg:c.zero).replace("%s",a.symbol).replace("%v",g(Math.abs(e),h(a.precision),a.thousand,a.decimal))};i.formatColumn=function(e,t,r,n,o,s){if(!e)return[];var a=p(l(t)?t:{symbol:t,precision:r,thousand:n,decimal:o,format:s},i.settings.currency),y=f(a.format),T=y.pos.indexOf("%s")<y.pos.indexOf("%v"),b=0,_=d(e,(function(e,t){if(u(e))return i.formatColumn(e,a);var r=((e=m(e))>0?y.pos:e<0?y.neg:y.zero).replace("%s",a.symbol).replace("%v",g(Math.abs(e),h(a.precision),a.thousand,a.decimal));return r.length>b&&(b=r.length),r}));return d(_,(function(e,t){return c(e)&&e.length<b?T?e.replace(a.symbol,a.symbol+new Array(b-e.length+1).join(" ")):new Array(b-e.length+1).join(" ")+e:e}))},void 0!==r?(void 0!==t&&t.exports&&(r=t.exports=i),r.accounting=i):"function"==typeof define&&define.amd?define([],(function(){return i})):(i.noConflict=(y=e.accounting,function(){return e.accounting=y,i.noConflict=void 0,i}),e.accounting=i)}(this)}}},{package:"currency-formatter>accounting",file:"node_modules/accounting/accounting.js"}],[3826,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){
/*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
!function(e){function n(e){return parseInt(e)===e}function i(e){if(!n(e.length))return!1;for(var t=0;t<e.length;t++)if(!n(e[t])||e[t]<0||e[t]>255)return!1;return!0}function o(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!i(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(n(e.length)&&i(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function s(e){return new Uint8Array(e)}function a(e,t,r,n,i){null==n&&null==i||(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var c,u={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r<e.length;){var n=e.charCodeAt(r++);37===n?(t.push(parseInt(e.substr(r,2),16)),r+=2):t.push(n)}return o(t)},fromBytes:function(e){for(var t=[],r=0;r<e.length;){var n=e[r];n<128?(t.push(String.fromCharCode(n)),r++):n>191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},l=(c="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},fromBytes:function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(c[(240&n)>>4]+c[15&n])}return t.join("")}}),p={16:10,24:12,32:14},d=[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],h=[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],f=[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],y=[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,13
t.exports=i=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},o=Object.prototype,s=o.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",p=c.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var i=t&&t.prototype instanceof _?t:_,o=Object.create(i.prototype),s=new j(n||[]);return a(o,"_invoke",{value:I(e,r,s)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=h;var y="suspendedStart",m="suspendedYield",T="executing",g="completed",b={};function _(){}function O(){}function E(){}var S={};d(S,u,(function(){return this}));var v=Object.getPrototypeOf,x=v&&v(v(k([])));x&&x!==o&&s.call(x,u)&&(S=x);var w=E.prototype=_.prototype=Object.create(S);function A(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(i,o,a,c){var u=f(e[i],e,o);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==n(p)&&s.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(p).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}})}function I(t,r,n){var i=y;return function(o,s){if(i===T)throw Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:e,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var c=P(a,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===y)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=T;var u=f(t,r,n);if("normal"===u.type){if(i=n.done?g:m,u.arg===b)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=g,n.method="throw",n.arg=u.arg)}}}function P(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;var s=o.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function k(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(s.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(n(t)+" is not iterable")}return O.prototype=E,a(w,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:O,configurable:!0}),O.displayName=d(E,p,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===O||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,d(e,p,"GeneratorFunction")),e.prototype=Object.create(w),e},r.awrap=function(e){return{__await:e}},A(R.prototype),d(R.prototype,l,(function(){return this})),r.AsyncIterator=R,r.async=function(e,t,n,i,o){void 0===o&&(o=Promise);var s=new R(h(e,t,n,i),o);return r.isGeneratorFunction(t)?s:s.next().then((function(e){return e.done?e.value:s.n