diff --git a/public/extensions/MetaMask_v10.22.2/background-0.js b/public/extensions/MetaMask_v10.22.2/background-0.js index 7f0d40a0b..560c37420 100644 --- a/public/extensions/MetaMask_v10.22.2/background-0.js +++ b/public/extensions/MetaMask_v10.22.2/background-0.js @@ -1 +1 @@ -LavaPack.loadBundle([[10,{"../../../shared/constants/network":5264,"../constants/contracts":5,"../lib/util":135,"@ethersproject/contracts":523,"@ethersproject/providers":561,"@metamask/base-controller":1396,"@metamask/eth-query":1640,"@metamask/utils":2761,lodash:4380,loglevel:4386,pify:4517,"single-call-balance-checker-abi":5094,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDefaultAccountTrackerControllerState=n.default=void 0;var r=f(e("@metamask/eth-query")),s=e("uuid"),o=f(e("loglevel")),a=f(e("pify")),i=e("@ethersproject/providers"),l=e("@ethersproject/contracts"),c=f(e("single-call-balance-checker-abi")),d=e("lodash"),u=e("@metamask/utils"),h=e("@metamask/base-controller"),p=e("../../../shared/constants/network"),m=e("../constants/contracts"),g=e("../lib/util");function f(e){return e&&e.__esModule?e:{default:e}}function C(e,t,n){y(e,t),t.set(e,n)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t){return e.get(b(e,t))}function v(e,t,n){return e.set(b(e,t),n),n}function b(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const k={accounts:{persist:!0,anonymous:!1},currentBlockGasLimit:{persist:!0,anonymous:!0},accountsByChainId:{persist:!0,anonymous:!1},currentBlockGasLimitByChainId:{persist:!0,anonymous:!0}},S=()=>({accounts:{},currentBlockGasLimit:"",accountsByChainId:{},currentBlockGasLimitByChainId:{}});n.getDefaultAccountTrackerControllerState=S;var A=new WeakMap,T=new WeakMap,E=new WeakMap,M=new WeakMap,P=new WeakMap,_=new WeakMap,I=new WeakMap,N=new WeakSet,R=new WeakMap;class O extends h.BaseController{constructor(e){var t,n;super({name:"AccountTrackerController",metadata:k,state:{accounts:{},currentBlockGasLimit:"",accountsByChainId:{},currentBlockGasLimitByChainId:{},...e.state},messenger:e.messenger}),y(t=this,n=N),n.add(t),C(this,A,new Map),C(this,T,{}),C(this,E,void 0),C(this,M,void 0),C(this,P,{}),C(this,_,void 0),C(this,I,void 0),C(this,R,(async e=>{await b(N,this,F).call(this,undefined,e)})),v(E,this,e.provider),v(M,this,e.blockTracker),v(_,this,e.getNetworkIdentifier),this.messagingSystem.subscribe("KeyringController:accountRemoved",(e=>this.removeAccounts([e])));const r=this.messagingSystem.call("OnboardingController:getState");this.messagingSystem.subscribe("OnboardingController:stateChange",(0,g.previousValueComparator)(((e,t)=>{const{completedOnboarding:n}=e,{completedOnboarding:r}=t;return!n&&r&&this.updateAccountsAllActiveNetworks(),!0}),r)),v(I,this,this.messagingSystem.call("AccountsController:getSelectedAccount")),this.messagingSystem.subscribe("AccountsController:selectedEvmAccountChange",(e=>{const{useMultiAccountBalanceChecker:t}=this.messagingSystem.call("PreferencesController:getState");w(I,this).id===e.id||t||(v(I,this,e),this.updateAccountsAllActiveNetworks())}))}resetState(){const{accounts:e,accountsByChainId:t,currentBlockGasLimit:n,currentBlockGasLimitByChainId:r}={accounts:{},currentBlockGasLimit:"",accountsByChainId:{},currentBlockGasLimitByChainId:{}};this.update((s=>{s.accounts=e,s.accountsByChainId=t,s.currentBlockGasLimit=n,s.currentBlockGasLimitByChainId=r}))}start(){v(P,this,{[b(N,this,x).call(this)]:w(M,this).getCurrentBlock()}),w(M,this).once("latest",(e=>{w(P,this)[b(N,this,x).call(this)]=e})),w(M,this).removeListener("latest",w(R,this)),w(M,this).addListener("latest",w(R,this)),this.updateAccounts()}stop(){w(M,this).removeListener("latest",w(R,this))}startPollingByNetworkClientId(e){const t=(0,s.v4)(),n=w(A,this).get(e);if(n)n.add(t);else{const n=new Set;n.add(t),w(A,this).set(e,n),b(N,this,j).call(this,e)}return t}stopAllPolling(){this.stop(),w(A,this).forEach(((e,t)=>{e.forEach((e=>{this.stopPollingByPollingToken(e)}))}))}stopPollingByPollingToken(e){if(!e)throw new Error("pollingToken required");let t=!1;if(w(A,this).forEach(((n,r)=>{n.has(e)&&(t=!0,n.delete(e),0===n.size&&(w(A,this).delete(r),b(N,this,D).call(this,r)))})),!t)throw new Error("pollingToken not found")}syncWithAddresses(e){const{accounts:t}=this.state,n=Object.keys(t),r=[];e.forEach((e=>{n.includes(e)||r.push(e)}));const s=[];n.forEach((t=>{e.includes(t)||s.push(t)})),this.addAccounts(r),this.removeAccounts(s)}addAccounts(e){const{accounts:t,accountsByChainId:n}=this.state,r=(0,d.cloneDeep)(t),s=(0,d.cloneDeep)(n);e.forEach((e=>{r[e]={}})),Object.keys(s).forEach((t=>{e.forEach((e=>{s[t][e]={}}))})),this.update((e=>{e.accounts=r,e.accountsByChainId=s})),w(P,this)[b(N,this,x).call(this)]&&this.updateAccounts(),w(A,this).forEach(((e,t)=>{const{chainId:n}=b(N,this,B).call(this,t);w(P,this)[n]&&this.updateAccounts(t)}))}removeAccounts(e){const{accounts:t,accountsByChainId:n}=this.state,r=(0,d.cloneDeep)(t),s=(0,d.cloneDeep)(n);e.forEach((e=>{delete r[e]})),Object.keys(s).forEach((t=>{e.forEach((e=>{delete s[t][e]}))})),this.update((e=>{e.accounts=r,e.accountsByChainId=s}))}clearAccounts(){this.update((e=>{e.accounts={},e.accountsByChainId={[b(N,this,x).call(this)]:{}}}))}async updateAccountsAllActiveNetworks(){await this.updateAccounts(),await Promise.all(Array.from(w(A,this)).map((([e])=>this.updateAccounts(e))))}async updateAccounts(e){const{completedOnboarding:t}=this.messagingSystem.call("OnboardingController:getState");if(!t)return;const{chainId:n,provider:r,identifier:s}=b(N,this,B).call(this,e),{useMultiAccountBalanceChecker:o}=this.messagingSystem.call("PreferencesController:getState");let a=[];if(o){const{accounts:e}=this.state;a=Object.keys(e)}else{a=[this.messagingSystem.call("AccountsController:getSelectedAccount").address]}s!==p.LOCALHOST_RPC_URL&&"http://127.0.0.1:8545"!==s&&n in m.SINGLE_CALL_BALANCES_ADDRESSES?await b(N,this,$).call(this,a,m.SINGLE_CALL_BALANCES_ADDRESSES[n],r,n):await Promise.all(a.map((e=>b(N,this,L).call(this,e,r,n))))}}function x(){const{selectedNetworkClientId:e}=this.messagingSystem.call("NetworkController:getState"),{configuration:{chainId:t}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return t}function B(e){if(e){const{configuration:t,provider:n,blockTracker:r}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return{chainId:t.chainId,provider:n,blockTracker:r,identifier:w(_,this).call(this,t)}}return{chainId:b(N,this,x).call(this),provider:w(E,this),blockTracker:w(M,this),identifier:w(_,this).call(this)}}function j(e){if(w(T,this)[e])return;const{blockTracker:t}=b(N,this,B).call(this,e),n=t=>b(N,this,F).call(this,e,t);t.addListener("latest",n),w(T,this)[e]=n,this.updateAccounts(e)}function D(e){if(!w(T,this)[e])return;const{blockTracker:t}=b(N,this,B).call(this,e);t.removeListener("latest",w(T,this)[e]),delete w(T,this)[e]}function U(e){const{accounts:t,accountsByChainId:n}=this.state;if(n[e])return(0,d.cloneDeep)(n[e]);const r={};return Object.keys(t).forEach((e=>{r[e]={}})),r}async function F(e,t){const{chainId:n,provider:s}=b(N,this,B).call(this,e);w(P,this)[n]=t;const i=await(0,a.default)(new r.default(s)).getBlockByNumber(t,!1);if(!i)return;const l=i.gasLimit;this.update((e=>{n===b(N,this,x).call(this)&&(e.currentBlockGasLimit=l),e.currentBlockGasLimitByChainId[n]=l}));try{await this.updateAccounts(e)}catch(e){o.default.error(e)}}async function L(e,t,n){const{useMultiAccountBalanceChecker:s}=this.messagingSystem.call("PreferencesController:getState");let o="0x0";try{o=await(0,a.default)(new r.default(t)).getBalance(e)}catch(e){if(e&&"object"==typeof e&&(0,u.hasProperty)(e,"data")&&e.data&&(0,u.hasProperty)(e.data,"request")&&e.data.request&&(0,u.hasProperty)(e.data.request,"method")&&"eth_getBalance"!==e.data.request.method)throw e}const i={address:e,balance:o},l=b(N,this,U).call(this,n);if(!l[e])return;let c=l;s||(c={},Object.keys(l).forEach((t=>{e!==t&&(c[t]={address:t,balance:null})}))),c[e]=i,this.update((e=>{n===b(N,this,x).call(this)&&(e.accounts=c),e.accountsByChainId[n]=c}))}async function $(e,t,n,r){const s=await new l.Contract(t,c.default,new i.Web3Provider(n)),a=["0x0000000000000000000000000000000000000000"];try{const t=await s.balances(e,a),n=b(N,this,U).call(this,r),o={};Object.keys(n).forEach((t=>{e.includes(t)||(o[t]={address:t,balance:null})})),e.forEach(((e,n)=>{const r=t[n]?t[n].toHexString():"0x0";o[e]={address:e,balance:r}})),this.update((e=>{r===b(N,this,x).call(this)&&(e.accounts=o),e.accountsByChainId[r]=o}))}catch(t){o.default.warn("MetaMask - Account Tracker single call balance fetch failed",t),Promise.allSettled(e.map((e=>b(N,this,L).call(this,e,n,r))))}}n.default=O}}},{package:"$root$",file:"app/scripts/controllers/account-tracker-controller.ts"}],[100,{"../../../../../shared/constants/app":5248,"./ethereum-chain-utils":102,"@metamask/controller-utils":1422,"@metamask/network-controller":1990,"@metamask/rpc-errors":2304,lodash:4380,"uri-js":5150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(e("uri-js")),s=e("@metamask/controller-utils"),o=e("@metamask/network-controller"),a=e("@metamask/rpc-errors"),i=e("lodash"),l=e("../../../../../shared/constants/app"),c=e("./ethereum-chain-utils");function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}const u={methodNames:[l.MESSAGE_TYPE.ADD_ETHEREUM_CHAIN],implementation:async function(e,t,n,l,{addNetwork:d,updateNetwork:u,getNetworkConfigurationByChainId:h,setActiveNetwork:p,requestUserApproval:m,startApprovalFlow:g,endApprovalFlow:f,getCurrentChainIdForDomain:C,getCaveat:y,requestPermittedChainsPermission:w,grantPermittedChainsPermissionIncremental:v}){let b;try{b=(0,c.validateAddEthereumChainParams)(e.params[0],l)}catch(e){return l(e)}const{chainId:k,chainName:S,firstValidBlockExplorerUrl:A,firstValidRPCUrl:T,ticker:E}=b,{origin:M}=e,P=C(M),_=h(k);if(_&&_.chainId===k&&_.nativeCurrency!==E)return l(a.rpcErrors.invalidParams({message:`nativeCurrency.symbol does not match currency symbol for a network the user already has added with the same chainId. Received:\n${E}`}));let I,N=_,R=null==_?void 0:_.rpcEndpoints.findIndex((({url:e})=>r.equal(e,T))),O=A?null==_?void 0:_.blockExplorerUrls.findIndex((e=>r.equal(e,A))):undefined;if(!_||R!==_.defaultRpcEndpointIndex||A&&O!==_.defaultBlockExplorerUrlIndex){({id:I}=await g());try{if(await m({origin:M,type:s.ApprovalType.AddEthereumChain,requestData:{chainId:k,rpcPrefs:{blockExplorerUrl:A},chainName:S,rpcUrl:T,ticker:E}}),_){const e=(0,i.cloneDeep)(_);-1===R&&(e.rpcEndpoints=[...e.rpcEndpoints,{url:T,type:o.RpcEndpointType.Custom,name:S}],R=e.rpcEndpoints.length-1),e.defaultRpcEndpointIndex=R,A&&(-1===O&&(e.blockExplorerUrls=[...e.blockExplorerUrls,A],O=e.blockExplorerUrls.length-1),e.defaultBlockExplorerUrlIndex=O),N=await u(e.chainId,e,P===k?{replacementSelectedRpcEndpointIndex:e.defaultRpcEndpointIndex}:undefined)}else N=await d({blockExplorerUrls:A?[A]:[],defaultBlockExplorerUrlIndex:A?0:undefined,chainId:k,defaultRpcEndpointIndex:0,name:S,nativeCurrency:E,rpcEndpoints:[{url:T,name:S,type:o.RpcEndpointType.Custom}]})}catch(e){return f({id:I}),l(e)}}if(k!==P){const{networkClientId:e}=N.rpcEndpoints[N.defaultRpcEndpointIndex];return(0,c.switchChain)(t,l,k,e,I,{isAddFlow:!0,setActiveNetwork:p,endApprovalFlow:f,getCaveat:y,requestPermittedChainsPermission:w,grantPermittedChainsPermissionIncremental:v})}I&&f({id:I});return t.result=null,l()},hookNames:{addNetwork:!0,updateNetwork:!0,getNetworkConfigurationByChainId:!0,setActiveNetwork:!0,requestUserApproval:!0,startApprovalFlow:!0,endApprovalFlow:!0,getCurrentChainIdForDomain:!0,getCaveat:!0,requestPermittedChainsPermission:!0,grantPermittedChainsPermissionIncremental:!0}};n.default=u}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/add-ethereum-chain.js"}],[101,{"../../../../../shared/constants/app":5248},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;const r={methodNames:[e("../../../../../shared/constants/app").MESSAGE_TYPE.ETH_ACCOUNTS],implementation:async function(e,t,n,r,{getAccounts:s}){return t.result=await s(),r()},hookNames:{getAccounts:!0}};n.default=r}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/eth-accounts.ts"}],[102,{"../../../../../shared/constants/app":5248,"../../../../../shared/constants/permissions":5268,"../../../../../shared/modules/network.utils":5311,"../../../controllers/permissions":30,"../../util":135,"@metamask/rpc-errors":2304},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.switchChain=async function(e,t,n,s,a,{isAddFlow:l,setActiveNetwork:c,endApprovalFlow:d,getCaveat:u,requestPermittedChainsPermission:h,grantPermittedChainsPermissionIncremental:p}){try{const{value:t}=u({target:i.PermissionNames.permittedChains,caveatType:o.CaveatTypes.restrictNetworkSwitching})??{};t!==undefined&&t.includes(n)||(l?await p([n]):await h([n])),await c(s),e.result=null}catch(n){return n.code===r.errorCodes.provider.userRejectedRequest&&a?(e.result=null,t()):t(n)}finally{a&&d({id:a})}return t()},n.validateAddEthereumChainParams=function(e,t){if(!e||"object"!=typeof e)throw r.rpcErrors.invalidParams({message:`Expected single, object parameter. Received:\n${JSON.stringify(e)}`});const{chainId:n,chainName:s,blockExplorerUrls:o,nativeCurrency:i,rpcUrls:d,...u}=e,h=Object.keys(u).filter((e=>!["iconUrls"].includes(e)));if(h.length>0)throw r.rpcErrors.invalidParams({message:`Received unexpected keys on object parameter. Unsupported keys:\n${h}`});const p=c(n);if(!d||!Array.isArray(d)||0===d.length)throw r.rpcErrors.invalidParams({message:`Expected an array with at least one valid string HTTPS url 'rpcUrls', Received:\n${d}`});const m=e=>{const t=(0,l.getValidUrl)(e);return null!==t&&("localhost"===t.hostname||"127.0.0.1"===t.hostname||"https:"===t.protocol)},g=d.find((e=>m(e))),f=Array.isArray(o)?o.find((e=>m(e))):null;if(!g)throw r.rpcErrors.invalidParams({message:`Expected an array with at least one valid string HTTPS url 'rpcUrls', Received:\n${d}`});if("string"!=typeof s||!s)throw r.rpcErrors.invalidParams({message:`Expected non-empty string 'chainName'. Received:\n${s}`});const C=s.length>100?s.substring(0,100):s;if(null!==i){if("object"!=typeof i||Array.isArray(i))throw r.rpcErrors.invalidParams({message:`Expected null or object 'nativeCurrency'. Received:\n${i}`});if(18!==i.decimals)throw r.rpcErrors.invalidParams({message:`Expected the number 18 for 'nativeCurrency.decimals' when 'nativeCurrency' is provided. Received: ${i.decimals}`});if(!i.symbol||"string"!=typeof i.symbol)throw r.rpcErrors.invalidParams({message:`Expected a string 'nativeCurrency.symbol'. Received: ${i.symbol}`})}const y=(null==i?void 0:i.symbol)||a.UNKNOWN_TICKER_SYMBOL;if(y!==a.UNKNOWN_TICKER_SYMBOL&&("string"!=typeof y||y.length<1||y.length>6))throw r.rpcErrors.invalidParams({message:`Expected 1-6 character string 'nativeCurrency.symbol'. Received:\n${y}`});return{chainId:p,chainName:C,firstValidBlockExplorerUrl:f,firstValidRPCUrl:g,ticker:y}},n.validateChainId=c,n.validateSwitchEthereumChainParams=function(e,t){var n;if(null===(n=e.params)||void 0===n||!n[0]||"object"!=typeof e.params[0])throw r.rpcErrors.invalidParams({message:`Expected single, object parameter. Received:\n${JSON.stringify(e.params)}`});const{chainId:s,...o}=e.params[0];if(Object.keys(o).length>0)throw r.rpcErrors.invalidParams({message:`Received unexpected keys on object parameter. Unsupported keys:\n${Object.keys(o)}`});return c(s)};var r=e("@metamask/rpc-errors"),s=e("../../../../../shared/modules/network.utils"),o=e("../../../../../shared/constants/permissions"),a=e("../../../../../shared/constants/app"),i=e("../../../controllers/permissions"),l=e("../../util");function c(e){const t="string"==typeof e&&e.toLowerCase();if(!(0,s.isPrefixedFormattedHexString)(t))throw r.rpcErrors.invalidParams({message:`Expected 0x-prefixed, unpadded, non-zero hexadecimal string 'chainId'. Received:\n${e}`});if(!(0,s.isSafeChainId)(parseInt(t,16)))throw r.rpcErrors.invalidParams({message:`Invalid chain ID "${t}": numerical value greater than max safe value. Received:\n${e}`});return t}}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/ethereum-chain-utils.js"}],[103,{"../../../../../shared/constants/app":5248},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;const r={methodNames:[e("../../../../../shared/constants/app").MESSAGE_TYPE.GET_PROVIDER_STATE],implementation:async function(e,t,n,r,{getProviderState:s}){return t.result={...await s(e.origin)},r()},hookNames:{getProviderState:!0}};n.default=r}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/get-provider-state.ts"}],[104,{"./add-ethereum-chain":100,"./eth-accounts":101,"./get-provider-state":103,"./log-web3-shim-usage":105,"./request-accounts":106,"./send-metadata":107,"./switch-ethereum-chain":108,"./watch-asset":109},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.legacyHandlers=n.handlers=void 0;var r=u(e("./add-ethereum-chain")),s=u(e("./eth-accounts")),o=u(e("./get-provider-state")),a=u(e("./log-web3-shim-usage")),i=u(e("./request-accounts")),l=u(e("./send-metadata")),c=u(e("./switch-ethereum-chain")),d=u(e("./watch-asset"));function u(e){return e&&e.__esModule?e:{default:e}}n.handlers=[r.default,o.default,a.default,i.default,l.default,c.default,d.default],n.legacyHandlers=[s.default]}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/index.ts"}],[105,{"../../../../../shared/constants/app":5248},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;const r={methodNames:[e("../../../../../shared/constants/app").MESSAGE_TYPE.LOG_WEB3_SHIM_USAGE],implementation:function(e,t,n,r,{getWeb3ShimUsageState:s,setWeb3ShimUsageRecorded:o}){const{origin:a}=e;s(a)===undefined&&o(a);return t.result=!0,r()},hookNames:{getWeb3ShimUsageState:!0,setWeb3ShimUsageRecorded:!0}};n.default=r}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/log-web3-shim-usage.ts"}],[106,{"../../../../../shared/constants/app":5248,"../../../../../shared/constants/metametrics":5260,"../../util":135,"@metamask/rpc-errors":2304},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("@metamask/rpc-errors"),s=e("../../../../../shared/constants/app"),o=e("../../../../../shared/constants/metametrics"),a=e("../../util");const i={methodNames:[s.MESSAGE_TYPE.ETH_REQUEST_ACCOUNTS],implementation:async function(e,t,n,i,{origin:c,getAccounts:d,getUnlockPromise:u,hasPermission:h,requestAccountsPermission:p,sendMetrics:m,getPermissionsForOrigin:g,metamaskState:f}){if(l.has(c))return t.error=r.rpcErrors.resourceUnavailable(`Already processing ${s.MESSAGE_TYPE.ETH_REQUEST_ACCOUNTS}. Please wait.`),i();if(h(s.MESSAGE_TYPE.ETH_ACCOUNTS)){try{l.add(c),await u(!0),t.result=await d(),i()}catch(e){i(e)}finally{l.delete(c)}return undefined}try{await p()}catch(e){return t.error=e,i()}const C=await d();if(C.length>0){t.result=C;const e=g(c).eth_accounts.caveats[0].value.length,n=!Object.keys(f.permissionHistory).includes(c);(0,a.shouldEmitDappViewedEvent)(f.metaMetricsId)&&m({event:o.MetaMetricsEventName.DappViewed,category:o.MetaMetricsEventCategory.InpageProvider,referrer:{url:c},properties:{is_first_visit:n,number_of_accounts:Object.keys(f.accounts).length,number_of_accounts_connected:e}})}else t.error=r.rpcErrors.internal("Accounts unexpectedly unavailable. Please report this bug.");return i()},hookNames:{origin:!0,getAccounts:!0,getUnlockPromise:!0,hasPermission:!0,requestAccountsPermission:!0,sendMetrics:!0,getPermissionsForOrigin:!0,metamaskState:!0}};n.default=i;const l=new Set}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/request-accounts.js"}],[107,{"../../../../../shared/constants/app":5248,"@metamask/rpc-errors":2304},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("@metamask/rpc-errors");const s={methodNames:[e("../../../../../shared/constants/app").MESSAGE_TYPE.SEND_METADATA],implementation:function(e,t,n,s,{addSubjectMetadata:o,subjectType:a}){const{origin:i,params:l}=e;if(!l||"object"!=typeof l||Array.isArray(l))return s(r.rpcErrors.invalidParams({data:l}));{const{icon:e=null,name:t=null,...n}=l;o({...n,iconUrl:e,name:t,subjectType:a,origin:i})}return t.result=!0,s()},hookNames:{addSubjectMetadata:!0,subjectType:!0}};n.default=s}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/send-metadata.js"}],[108,{"../../../../../shared/constants/app":5248,"./ethereum-chain-utils":102,"@metamask/rpc-errors":2304},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("@metamask/rpc-errors"),s=e("../../../../../shared/constants/app"),o=e("./ethereum-chain-utils");const a={methodNames:[s.MESSAGE_TYPE.SWITCH_ETHEREUM_CHAIN],implementation:async function(e,t,n,a,{getNetworkConfigurationByChainId:i,setActiveNetwork:l,requestPermittedChainsPermission:c,getCaveat:d,getCurrentChainIdForDomain:u,grantPermittedChainsPermissionIncremental:h}){let p;try{p=(0,o.validateSwitchEthereumChainParams)(e,a)}catch(e){return a(e)}const{origin:m}=e;if(u(m)===p)return t.result=null,a();const g=i(p),f=null==g?void 0:g.rpcEndpoints[g.defaultRpcEndpointIndex].networkClientId;if(!f)return a(r.providerErrors.custom({code:4902,message:`Unrecognized chain ID "${p}". Try adding the chain using ${s.MESSAGE_TYPE.ADD_ETHEREUM_CHAIN} first.`}));return(0,o.switchChain)(t,a,p,f,null,{setActiveNetwork:l,getCaveat:d,requestPermittedChainsPermission:c,grantPermittedChainsPermissionIncremental:h})},hookNames:{getNetworkConfigurationByChainId:!0,setActiveNetwork:!0,getCaveat:!0,requestPermittedChainsPermission:!0,getCurrentChainIdForDomain:!0,grantPermittedChainsPermissionIncremental:!0}};n.default=a}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/switch-ethereum-chain.js"}],[109,{"../../../../../shared/constants/app":5248,"@metamask/controller-utils":1422,"@metamask/rpc-errors":2304},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("@metamask/controller-utils"),s=e("@metamask/rpc-errors"),o=e("../../../../../shared/constants/app");const a={methodNames:[o.MESSAGE_TYPE.WATCH_ASSET,o.MESSAGE_TYPE.WATCH_ASSET_LEGACY],implementation:async function(e,t,n,o,{handleWatchAssetRequest:a}){try{const{params:{options:n,type:i},origin:l,networkClientId:c}=e,{tokenId:d}=n;return[r.ERC721,r.ERC1155].includes(i)&&d!==undefined&&"string"!=typeof d?o(s.rpcErrors.invalidParams({message:`Expected parameter 'tokenId' to be type 'string'. Received type '${typeof d}'`})):(await a({asset:n,type:i,origin:l,networkClientId:c}),t.result=!0,o())}catch(e){return o(e)}},hookNames:{handleWatchAssetRequest:!0}};n.default=a}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/watch-asset.js"}],[11,{"../../../shared/constants/alerts":5246,"@metamask/base-controller":1396},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDefaultAlertControllerState=n.AlertController=void 0;var r=e("@metamask/base-controller"),s=e("../../../shared/constants/alerts");function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(e,t,n){return e.set(i(e,t),n),n}function i(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const l=()=>({alertEnabledness:s.TOGGLEABLE_ALERT_TYPES.reduce(((e,t)=>(e[t]=!0,e)),{}),unconnectedAccountAlertShownOrigins:{},web3ShimUsageOrigins:{}});n.getDefaultAlertControllerState=l;const c={alertEnabledness:{persist:!0,anonymous:!0},unconnectedAccountAlertShownOrigins:{persist:!0,anonymous:!1},web3ShimUsageOrigins:{persist:!0,anonymous:!1}};var d=new WeakMap,u=new WeakSet;class h extends r.BaseController{constructor(e){var t,n;super({messenger:e.messenger,metadata:c,name:"AlertController",state:{...l(),...e.state}}),o(t=this,n=u),n.add(t),function(e,t,n){o(e,t),t.set(e,n)}(this,d,void 0),a(d,this,this.messagingSystem.call("AccountsController:getSelectedAccount").address),this.messagingSystem.subscribe("AccountsController:selectedAccountChange",(e=>{this.state.unconnectedAccountAlertShownOrigins&&function(e,t){return e.get(i(e,t))}(d,this)!==e.address&&(a(d,this,e.address),this.update((e=>{e.unconnectedAccountAlertShownOrigins={}})))}))}setAlertEnabledness(e,t){this.update((n=>{n.alertEnabledness[e]=t}))}setUnconnectedAccountAlertShown(e){this.update((t=>{t.unconnectedAccountAlertShownOrigins[e]=!0}))}getWeb3ShimUsageState(e){var t;return null===(t=this.state.web3ShimUsageOrigins)||void 0===t?void 0:t[e]}setWeb3ShimUsageRecorded(e){i(u,this,p).call(this,e,s.Web3ShimUsageAlertStates.recorded)}setWeb3ShimUsageAlertDismissed(e){i(u,this,p).call(this,e,s.Web3ShimUsageAlertStates.dismissed)}}function p(e,t){this.update((n=>{n.web3ShimUsageOrigins&&(n.web3ShimUsageOrigins[e]=t)}))}n.AlertController=h}}},{package:"$root$",file:"app/scripts/controllers/alert-controller.ts"}],[110,{"./createMethodMiddleware":98,"./createUnsupportedMethodMiddleware":99},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=e("./createMethodMiddleware");Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}));var s=e("./createUnsupportedMethodMiddleware");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))}))}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/index.js"}],[111,{"../util":135,"@segment/loosely-validate-event":2832,buffer:3561,"is-retry-allowed":4214,lodash:4380,"remove-trailing-slash":4800,timers:5116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t,r){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var s=c(e("remove-trailing-slash")),o=c(e("@segment/loosely-validate-event")),a=e("lodash"),i=c(e("is-retry-allowed")),l=e("../util");function c(e){return e&&e.__esModule?e:{default:e}}const d=()=>({});n.default=class{constructor(e,t={}){this.writeKey=e,this.host=(0,s.default)(t.host||"https://api.segment.io"),this.flushInterval=t.flushInterval||1e4,this.flushAt=t.flushAt||Math.max(t.flushAt,1)||20,this.queue=[],this.path="/v1/batch",this.maxQueueSize=460800,this.flushed=!1,this.retryCount=3,Object.defineProperty(this,"enable",{configurable:!1,writable:!1,enumerable:!0,value:!0})}_validate(e,t){(0,o.default)(e,t)}_message(e,t,n){return this._validate(t,e),this.enqueue(e,t,n),this}identify(e,t){return this._message("identify",e,t)}track(e,t){return this._message("track",e,t)}page(e,t){return this._message("page",e,t)}enqueue(e,t,n=d){if(!this.enable)return void r(n);const s={...t,type:e};if(s.context={...s.context,library:{name:"analytics-node"}},s.timestamp||(s.timestamp=new Date),s.messageId||(s.messageId=(0,l.generateRandomId)()),s.anonymousId&&!(0,a.isString)(s.anonymousId)&&(s.anonymousId=JSON.stringify(s.anonymousId)),s.userId&&!(0,a.isString)(s.userId)&&(s.userId=JSON.stringify(s.userId)),this.queue.push({message:s,callback:n}),!this.flushed)return this.flushed=!0,void this.flush();const o=this.queue.length>=this.flushAt,i=this.queue.reduce(((e,t)=>e+JSON.stringify(t).length),0)>=this.maxQueueSize;(o||i)&&this.flush(),this.flushInterval&&!this.timer&&(this.timer=setTimeout(this.flush.bind(this),this.flushInterval))}flush(e=d){if(!this.enable)return r(e),Promise.resolve();if(this.timer&&(clearTimeout(this.timer),this.timer=null),!this.queue.length)return r(e),Promise.resolve();const n=this.queue.splice(0,this.flushAt),s=n.map((e=>e.callback)),o={batch:n.map((e=>e.message)),timestamp:new Date,sentAt:new Date},a={Authorization:`Basic ${t.from(this.writeKey,"utf8").toString("base64")}`};return this._sendRequest(`${this.host}${this.path}`,{method:"POST",body:JSON.stringify(o),headers:a},(t=>{r((()=>{s.forEach((e=>e(t,o))),e(t,o)}))}),0)}_retryRequest(e,t,n,r){const s=100*Math.pow(2,r);setTimeout((()=>{this._sendRequest(e,t,n,r+1)}),s)}async _sendRequest(e,t,n,r){return fetch(e,t).then((async s=>{if(s.ok)n();else if(this._isErrorRetryable({response:s})&&r<=this.retryCount)this._retryRequest(e,t,n,r);else{const e=new Error(s.statusText);n(e)}})).catch((s=>{this._isErrorRetryable(s)&&r<=this.retryCount?this._retryRequest(e,t,n,r):n(s)}))}_isErrorRetryable(e){return!!function(e){return!e.response&&Boolean(e.code)&&"ECONNABORTED"!==e.code&&(0,i.default)(e)}(e)||!!e.response&&(e.response.status>=500&&e.response.status<=599||429===e.response.status)}}}).call(this)}).call(this,e("buffer").Buffer,e("timers").setImmediate)}}},{package:"$root$",file:"app/scripts/lib/segment/analytics.js"}],[112,{"../../../../shared/constants/time":5276,"./analytics":111},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.segment=n.createSegmentMock=void 0;var r,s=e("../../../../shared/constants/time");(r=e("./analytics"))&&r.__esModule;s.SECOND;const o=(e=1)=>{const t={queue:[],flush(){t.queue.forEach((([e,t])=>{t()})),t.queue=[]},track(n,r=(()=>undefined)){t.queue.push([n,r]),t.queue.length>=e&&t.flush()},page(){},identify(){}};return t};n.createSegmentMock=o;n.segment=o(1)}}},{package:"$root$",file:"app/scripts/lib/segment/index.js"}],[116,{"../../../../shared/lib/trace":5291},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.addPersonalMessage=async function({signatureParams:e,signatureController:t}){return s(e,t,"newUnsignedPersonalMessage")},n.addTypedMessage=async function({signatureParams:e,signatureController:t}){return s(e,t,"newUnsignedTypedMessage")};var r=e("../../../../shared/lib/trace");async function s(e,t,n){const[,s]=e,{id:o}=s,a=null==o?void 0:o.toString();(0,r.endTrace)({name:r.TraceName.Middleware,id:a});const i=await t[n](...e);return(0,r.endTrace)({name:r.TraceName.Signature,id:a}),i}}}},{package:"$root$",file:"app/scripts/lib/signature/util.ts"}],[117,{"./snap-keyring":120},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getAccountsBySnapId",{enumerable:!0,get:function(){return r.getAccountsBySnapId}}),Object.defineProperty(n,"snapKeyringBuilder",{enumerable:!0,get:function(){return r.snapKeyringBuilder}});var r=e("./snap-keyring")}}},{package:"$root$",file:"app/scripts/lib/snap-keyring/index.ts"}],[118,{"@metamask/keyring-api":1843,"@metamask/permission-controller":2133},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isProtocolAllowed=d,n.keyringSnapPermissionsBuilder=function(e,t){return()=>{if("metamask"===t)return a;if(o.includes(t))return l;const n=e.getSubjectMetadata(t);return(null==n?void 0:n.subjectType)===r.SubjectType.Website&&d(t)?i:[]}};var r=e("@metamask/permission-controller"),s=e("@metamask/keyring-api");const o=["https://portfolio.metamask.io"],a=[s.KeyringRpcMethod.ListAccounts,s.KeyringRpcMethod.GetAccount,s.KeyringRpcMethod.FilterAccountChains,s.KeyringRpcMethod.DeleteAccount,s.KeyringRpcMethod.ListRequests,s.KeyringRpcMethod.GetRequest,s.KeyringRpcMethod.SubmitRequest,s.KeyringRpcMethod.RejectRequest],i=[s.KeyringRpcMethod.ListAccounts,s.KeyringRpcMethod.GetAccount,s.KeyringRpcMethod.CreateAccount,s.KeyringRpcMethod.FilterAccountChains,s.KeyringRpcMethod.UpdateAccount,s.KeyringRpcMethod.DeleteAccount,s.KeyringRpcMethod.ExportAccount,s.KeyringRpcMethod.ListRequests,s.KeyringRpcMethod.GetRequest,s.KeyringRpcMethod.ApproveRequest,s.KeyringRpcMethod.RejectRequest],l=[s.KeyringRpcMethod.ListAccounts,s.KeyringRpcMethod.GetAccount,s.KeyringRpcMethod.GetAccountBalances,s.KeyringRpcMethod.SubmitRequest],c=["https:"];function d(e){try{const t=new URL(e);return c.includes(t.protocol)}catch(e){return!1}}}}},{package:"$root$",file:"app/scripts/lib/snap-keyring/keyring-snaps-permissions.ts"}],[119,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getSnapAndHardwareInfoForMetrics=async function(e,t,n){var r,s,o;if(!n)return{};const a=n.call("AccountsController:getSelectedAccount"),i=a.address,{keyring:l}=a.metadata;let c;var d;null!==(r=a.metadata.snap)&&void 0!==r&&r.id&&(c=n.call("SnapController:get",null===(d=a.metadata.snap)||void 0===d?void 0:d.id));return{account_type:await e(i),device_model:await t(i),account_hardware_type:await async function(){var e;return null!=l&&null!==(e=l.type)&&void 0!==e&&e.includes("Hardware")?l.type:undefined}(),account_snap_type:null===(s=c)||void 0===s?void 0:s.id,account_snap_version:null===(o=c)||void 0===o?void 0:o.version}}}}},{package:"$root$",file:"app/scripts/lib/snap-keyring/metrics.ts"}],[12,{"@metamask/base-controller":1396},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDefaultAppMetadataControllerState=n.default=void 0;var r=e("@metamask/base-controller");function s(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function o(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const a=()=>({currentAppVersion:"",previousAppVersion:"",previousMigrationVersion:0,currentMigrationVersion:0});n.getDefaultAppMetadataControllerState=a;const i={currentAppVersion:{persist:!0,anonymous:!0},previousAppVersion:{persist:!0,anonymous:!0},previousMigrationVersion:{persist:!0,anonymous:!0},currentMigrationVersion:{persist:!0,anonymous:!0}};var l=new WeakSet;class c extends r.BaseController{constructor({state:e={},messenger:t,currentAppVersion:n="",currentMigrationVersion:r=0}){super({name:"AppMetadataController",metadata:i,state:{currentAppVersion:"",previousAppVersion:"",previousMigrationVersion:0,currentMigrationVersion:0,...e},messenger:t}),s(this,l),o(l,this,d).call(this,n),o(l,this,u).call(this,r)}}function d(e){const t=this.state.currentAppVersion;e!==t&&this.update((n=>{n.currentAppVersion=e,n.previousAppVersion=t}))}function u(e){const t=this.state.currentMigrationVersion;e!==t&&this.update((n=>{n.previousMigrationVersion=t,n.currentMigrationVersion=e}))}n.default=c}}},{package:"$root$",file:"app/scripts/controllers/app-metadata.ts"}],[120,{"../../../../shared/constants/app":5248,"../../../../shared/constants/metametrics":5260,"../../../../ui/components/component-library/icon":5805,"../../translate":294,"./utils/isBlockedUrl":121,"./utils/showResult":122,"@metamask/eth-snap-keyring":1695,"webextension-polyfill":5225},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getAccountsBySnapId=void 0,n.showAccountCreationDialog=h,n.showAccountNameSuggestionDialog=p,n.snapKeyringBuilder=void 0;var r,s=e("@metamask/eth-snap-keyring"),o=(r=e("webextension-polyfill"))&&r.__esModule?r:{default:r},a=e("../../../../shared/constants/metametrics"),i=e("../../../../shared/constants/app"),l=e("../../translate"),c=e("../../../../ui/components/component-library/icon"),d=e("./utils/isBlockedUrl"),u=e("./utils/showResult");async function h(e,t){try{return Boolean(await t.call("ApprovalController:addRequest",{origin:e,type:i.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.confirmAccountCreation},!0))}catch(e){throw new Error(`Error occurred while showing account creation dialog.\n${e}`)}}async function p(e,t,n){try{return await t.call("ApprovalController:addRequest",{origin:e,type:i.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.showNameSnapAccount,requestData:{snapSuggestedAccountName:n}},!0)}catch(e){throw new Error(`Error occurred while showing name account dialog.\n${e}`)}}n.getAccountsBySnapId=async(e,t)=>{const n=await e.getSnapKeyring();return await n.getAccountsBySnapId(t)};n.snapKeyringBuilder=(e,t,n,r,m,g,f)=>{const C=()=>new s.SnapKeyring(t(),{addressExists:async t=>(await e.call("KeyringController:getAccounts")).includes(t.toLowerCase()),redirectUser:async(t,n,r)=>{if(n.length>0||r.length>0){const s=await(0,d.isBlockedUrl)(n,(async()=>await e.call("PhishingController:maybeUpdateState")),(t=>e.call("PhishingController:testOrigin",t))),a=await e.call("ApprovalController:addRequest",{origin:t,requestData:{url:n,message:r,isBlockedUrl:s},type:i.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.showSnapAccountRedirect},!0);Boolean(a)&&n.length>0?o.default.tabs.create({url:n}):console.log("User refused snap account redirection to:",n)}else console.log("Error occurred when redirecting snap account. url or message must be defined")},saveState:async()=>{await n()},addAccount:async(t,r,s,o="",i=!1)=>{const d=g(r),{id:C}=e.call("ApprovalController:startFlow"),y=e=>{m({event:e,category:a.MetaMetricsEventCategory.Accounts,properties:{account_type:a.MetaMetricsEventAccountType.Snap,snap_id:r,snap_name:d}})};try{const m="https://support.metamask.io/managing-my-wallet/accounts-and-addresses/how-to-add-accounts-in-your-wallet/",g=f(r)&&!i,C=g||await h(r,e);if(!C)throw await s(C),new Error("User denied account creation");const w=await p(r,e,o);if(null==w||!w.success)throw await s(null==w?void 0:w.success),new Error("User denied account creation");try{await n(),await s(w.success);const o=e.call("AccountsController:getAccountByAddress",t);if(!o)throw new Error(`Internal account not found for address: ${t}`);e.call("AccountsController:setSelectedAccount",o.id),w.name&&e.call("AccountsController:setAccountName",o.id,w.name),g||(y(a.MetaMetricsEventName.AddSnapAccountSuccessViewed),await(0,u.showSuccess)(e,r,{icon:c.IconName.UserCircleAdd,title:(0,l.t)("snapAccountCreated")},{message:(0,l.t)("snapAccountCreatedDescription"),address:t,learnMoreLink:m}),y(a.MetaMetricsEventName.AddSnapAccountSuccessClicked)),y(a.MetaMetricsEventName.AccountAdded)}catch(t){const n=t.message;throw await(0,u.showError)(e,r,{icon:c.IconName.UserCircleAdd,title:(0,l.t)("snapAccountCreationFailed")},{message:(0,l.t)("snapAccountCreationFailedDescription",d),learnMoreLink:m,error:n}),new Error(`Error occurred while creating snap account: ${n}`)}}finally{e.call("ApprovalController:endFlow",{id:C})}},removeAccount:async(t,s,o)=>{const d=g(s),{id:h}=e.call("ApprovalController:startFlow"),p="https://support.metamask.io/managing-my-wallet/accounts-and-addresses/how-to-remove-an-account-from-your-metamask-wallet/",f=e=>{m({event:e,category:a.MetaMetricsEventCategory.Accounts,properties:{account_type:a.MetaMetricsEventAccountType.Snap,snap_id:s,snap_name:d}})};let C=!1;try{if(C=Boolean(await e.call("ApprovalController:addRequest",{origin:s,type:i.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.confirmAccountRemoval,requestData:{publicAddress:t}},!0)),!C)throw await o(C),new Error("User denied account removal");try{await r(t),await o(C),await n(),f(a.MetaMetricsEventName.RemoveSnapAccountSuccessViewed),await(0,u.showError)(e,s,{icon:c.IconName.UserCircleRemove,title:(0,l.t)("snapAccountRemoved")},{message:(0,l.t)("snapAccountRemovedDescription"),learnMoreLink:p}),f(a.MetaMetricsEventName.RemoveSnapAccountSuccessClicked)}catch(t){const n=t.message;throw await(0,u.showError)(e,s,{icon:c.IconName.UserCircleRemove,title:(0,l.t)("snapAccountRemovalFailed")},{message:(0,l.t)("snapAccountRemovalFailedDescription",d),learnMoreLink:p,error:n}),f(a.MetaMetricsEventName.AccountRemoveFailed),new Error(`Error occurred while removing snap account: ${n}`)}}finally{C&&f(a.MetaMetricsEventName.AccountRemoved),e.call("ApprovalController:endFlow",{id:h})}}});return C.type=s.SnapKeyring.type,C}}}},{package:"$root$",file:"app/scripts/lib/snap-keyring/snap-keyring.ts"}],[121,{"../keyring-snaps-permissions":118},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isBlockedUrl=void 0;var r=e("../keyring-snaps-permissions");n.isBlockedUrl=async(e,t,n)=>{try{return!(0,r.isProtocolAllowed)(e)||(await t(),n(e).result)}catch(e){return console.error("Invalid URL passed into snap-keyring:",e),!1}}}}},{package:"$root$",file:"app/scripts/lib/snap-keyring/utils/isBlockedUrl.ts"}],[122,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.showSuccess=n.showError=void 0;const r=e=>({name:"SnapAuthorshipHeader",key:"snapHeader",properties:{snapId:e}});n.showError=(e,t,n,s)=>e.call("ApprovalController:showError",{header:[r(t)],title:n.title,icon:n.icon,error:{key:"snapAccountErrorMessage",name:"SnapAccountErrorMessage",properties:s}});n.showSuccess=(e,t,n,s)=>e.call("ApprovalController:showSuccess",{header:[r(t)],title:n.title,icon:n.icon,message:{key:"snapAccountSuccessMessage",name:"SnapAccountSuccessMessage",properties:s}})}}},{package:"$root$",file:"app/scripts/lib/snap-keyring/utils/showResult.ts"}],[123,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitizeUIState=function(e){const t={...e};for(const e of r)delete t[e];return function(e){const t=e.snaps;if(!t)return;e.snaps=Object.values(t).reduce(((e,t)=>(e[t.id]=function(e){const t={...e};return delete t.sourceCode,delete t.auxiliaryFiles,t}(t),e)),{})}(t),t};const r=["snapStates","unencryptedSnapStates","vault"]}}},{package:"$root$",file:"app/scripts/lib/state-utils.ts"}],[125,{"../../../../../shared/lib/four-byte":5284,"@ethersproject/abi":500,"@metamask/utils":2761,"ethereumjs-util":3796},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.decodeTransactionDataWithFourByte=async function(e){const t=e.slice(0,10),n=await(0,a.getMethodFrom4Byte)(t);if(!n)return undefined;const o=n.split("(")[0],u=function(e){let t=e.slice(e.indexOf("(")+1,-1);const n=[];for(;t.includes("(");){const e=d(t);if(!e)break;n.push(e.value),t=`${t.slice(0,e.start)}${n.length-1}#${t.slice(e.end+1)}`}return c(t,n)}(n);i("Generated inputs",u);const h=(0,r.addHexPrefix)(e.slice(10)),p=s.Interface.getAbiCoder().decode(u,h),m=u.map(((e,t)=>l(e,t,p)));return{name:o,params:m}};var r=e("ethereumjs-util"),s=e("@ethersproject/abi"),o=e("@metamask/utils"),a=e("../../../../../shared/lib/four-byte");const i=(0,o.createProjectLogger)("four-byte");function l(e,t,n){var r;const s=n[t],{type:o,name:a}=e;let i=null===(r=e.components)||void 0===r?void 0:r.map(((e,t)=>l(e,t,s)));if(o.endsWith("[]")){const t=o.slice(0,-2);i=s.map(((n,r)=>{const o=`Item ${r+1}`;return l({...e,name:o,type:t},r,s)}))}return{name:a,type:o,value:s,children:i}}function c(e,t){return e.split(",").map((e=>{const n=e.split("#"),r=n.length>1?parseInt(n[0],10):undefined;return{type:r===undefined?e:`tuple${n[1]??""}`,components:r===undefined?undefined:c(t[r],t)}}))}function d(e){let t=-1;for(let n=0;n(0,r.query)(t,"eth_getStorageAt",[e,n,"latest"]))))).find((e=>(0,s.stripHexPrefix)(e)!==a));return n&&(0,s.addHexPrefix)(n.slice(26))};var r=e("@metamask/controller-utils"),s=e("ethereumjs-util");const o=["0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3","0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"],a="0".padEnd(64,"0")}}},{package:"$root$",file:"app/scripts/lib/transaction/decode/proxy.ts"}],[127,{"@ethersproject/abi":500,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.decodeTransactionDataWithSourcify=async function(e,t,n){var i,l;const c=await async function(e,t){var n;const r=await async function(e,t){const n=parseInt(t,16),r=await fetch(`https://sourcify.dev/server/files/any/${n}/${e}`);if(!r.ok)throw new Error("Failed to fetch Sourcify files");return r.json()}(e,t),s=null===(n=r.files)||void 0===n?void 0:n.find((e=>e.name.includes("metadata.json")));if(!s)throw new Error("Metadata not found");return JSON.parse(s.content)}(t,n);s("Retrieved Sourcify metadata",{contractAddress:t,chainId:n,metadata:c});const{abi:d}=c.output,u=new r.Interface(d),h=e.slice(0,10);let p;try{p=u.getFunction(h)}catch(e){}if(!p)return s("Failed to find function in ABI",h,d),undefined;const{name:m,inputs:g}=p,f=a(m,g),C=null===(i=c.output.userdoc)||void 0===i?void 0:i.methods[f],y=null===(l=c.output.devdoc)||void 0===l?void 0:l.methods[f],w=(null==C?void 0:C.notice)??(null==y?void 0:y.details);s("Extracted NatSpec",{signature:f,userDoc:C,devDoc:y});const v=u.decodeFunctionData(h,e),b=g.map(((e,t)=>o(e,t,v,C,y)));return{name:m,description:w,params:b}};var r=e("@ethersproject/abi");const s=(0,e("@metamask/utils").createProjectLogger)("sourcify");function o(e,t,n,r,s){var a,i;const{name:l,type:c,components:d}=e,u=(null==r||null===(a=r.params)||void 0===a?void 0:a[l])??(null==s||null===(i=s.params)||void 0===i?void 0:i[l]),h=n[t];let p=null==d?void 0:d.map(((e,t)=>o(e,t,h,{},{})));if(c.endsWith("[]")){const t=c.slice(0,-2);p=h.map(((n,r)=>{const s=`Item ${r+1}`;return o({...e,name:s,type:t},r,h,{},{})}))}return{name:l,description:u,type:c,value:h,children:p}}function a(e,t){return`${e??""}(${t.map((e=>{var t;return null!==(t=e.components)&&void 0!==t&&t.length?`${a(undefined,e.components)}${e.type.endsWith("[]")?"[]":""}`:e.type})).join(",")})`}}}},{package:"$root$",file:"app/scripts/lib/transaction/decode/sourcify.ts"}],[128,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.UNISWAP_ROUTER_COMMANDS=void 0;n.UNISWAP_ROUTER_COMMANDS={0:{name:"V3_SWAP_EXACT_IN",params:[{type:"address",description:"The recipient of the output of the trade",name:"recipient"},{type:"uint256",description:"The amount of input tokens for the trade",name:"amountIn"},{type:"uint256",description:"The minimum amount of output tokens the user wants",name:"amountOutMin"},{type:"bytes",description:"The UniswapV3 encoded path to trade along",name:"path"},{type:"bool",description:"A flag for whether the input tokens should come from the msg.sender (through Permit2) or whether the funds are already in the UniversalRouter",name:"payerIsUser"}]},1:{name:"V3_SWAP_EXACT_OUT",params:[{type:"address",description:"The recipient of the output of the trade",name:"recipient"},{type:"uint256",description:"The amount of output tokens to receive",name:"amountOut"},{type:"uint256",description:"The maximum number of input tokens that should be spent",name:"amountInMax"},{type:"bytes",description:"The UniswapV3 encoded path to trade along",name:"path"},{type:"bool",description:"A flag for whether the input tokens should come from the msg.sender (through Permit2) or whether the funds are already in the UniversalRouter",name:"payerIsUser"}]},2:{name:"PERMIT2_TRANSFER_FROM",params:[{type:"address",description:"The token to fetch from Permit2",name:"token"},{type:"address",description:"The recipient of the tokens fetched",name:"recipient"},{type:"uint256",description:"The amount of token to fetch",name:"amount"}]},3:{name:"PERMIT2_PERMIT_BATCH",params:[{type:"bytes",description:"A PermitBatch struct outlining all of the Permit2 permits to execute.",name:"batch"},{type:"bytes",description:"The signature to provide to Permit2",name:"data"}]},4:{name:"SWEEP",params:[{type:"address",description:"The ERC20 token to sweep (or Constants.ETH for ETH)",name:"token"},{type:"address",description:"The recipient of the sweep",name:"recipient"},{type:"uint256",description:"The minimum required tokens to receive from the sweep",name:"amountMin"}]},5:{name:"TRANSFER",params:[{type:"address",description:"The ERC20 token to transfer (or Constants.ETH for ETH)",name:"token"},{type:"address",description:"The recipient of the transfer",name:"recipient"},{type:"uint256",description:"The amount to transfer",name:"value"}]},6:{name:"PAY_PORTION",params:[{type:"address",description:"The ERC20 token to transfer (or Constants.ETH for ETH)",name:"token"},{type:"address",description:"The recipient of the transfer",name:"recipient"},{type:"uint256",description:"In basis points, the percentage of the contract’s balance to transfer",name:"bips"}]},8:{name:"V2_SWAP_EXACT_IN",params:[{type:"address",description:"The recipient of the output of the trade",name:"recipient"},{type:"uint256",description:"The amount of input tokens for the trade",name:"amountIn"},{type:"uint256",description:"The minimum amount of output tokens the user wants",name:"amountOutMin"},{type:"address[]",description:"The UniswapV2 token path to trade along",name:"path"},{type:"bool",description:"A flag for whether the input tokens should come from the msg.sender (through Permit2) or whether the funds are already in the UniversalRouter",name:"payerIsUser"}]},9:{name:"V2_SWAP_EXACT_OUT",params:[{type:"address",description:"The recipient of the output of the trade",name:"recipient"},{type:"uint256",description:"The amount of output tokens to receive",name:"amountOut"},{type:"uint256",description:"The maximum number of input tokens that should be spent",name:"amountInMax"},{type:"address[]",description:"The UniswapV2 token path to trade along",name:"path"},{type:"bool",description:"A flag for whether the input tokens should come from the msg.sender (through Permit2) or whether the funds are already in the UniversalRouter",name:"payerIsUser"}]},10:{name:"PERMIT2_PERMIT",params:[{type:"bytes",description:"A PermitSingle struct outlining the Permit2 permit to execute",name:"permitSingle"},{type:"bytes",description:"The signature to provide to Permit2",name:"signature"}]},11:{name:"WRAP_ETH",params:[{type:"address",description:"The recipient of the WETH",name:"recipient"},{type:"uint256",description:"The amount of ETH to wrap",name:"amountMin"}]},12:{name:"UNWRAP_WETH",params:[{type:"address",description:"The recipient of the ETH",name:"recipient"},{type:"uint256",description:"The minimum required ETH to receive from the unwrapping",name:"amountMin"}]},13:{name:"PERMIT2_TRANSFER_FROM_BATCH",params:[{type:"bytes",description:"An array of AllowanceTransferDetails structs that each describe a Permit2 transfer to perform",name:"batchDetails"}]},16:{name:"SEAPORT",params:[{type:"uint256",description:"The ETH value to forward to the Seaport contract",name:"value"},{type:"bytes",description:"The calldata to use to call the Seaport contract",name:"data"}]},17:{name:"LOOKS_RARE_721",params:[{type:"uint256",description:"The ETH value to forward to the LooksRare contract",name:"value"},{type:"bytes",description:"The calldata to use to call the LooksRare contract",name:"data"},{type:"address",description:"The recipient of the ERC721",name:"recipient"},{type:"address",description:"The ERC721 token address",name:"token"},{type:"uint256",description:"The ID of the ERC721",name:"id"}]},18:{name:"NFTX",params:[{type:"uint256",description:"The ETH value to forward to the NFTX contract",name:"value"},{type:"bytes",description:"The calldata to use to call the NFTX contract",name:"data"}]},19:{name:"CRYPTOPUNKS",params:[{type:"uint256",description:"The PunkID to purchase",name:"punkId"},{type:"address",description:"The recipient for the cryptopunk",name:"recipient"},{type:"uint256",description:"The ETH value to forward to the Cryptopunks contract",name:"value"}]},20:{name:"LOOKS_RARE_1155",params:[{type:"uint256",description:"The ETH value to forward to the LooksRare contract",name:"value"},{type:"bytes",description:"The calldata to use to call the LooksRare contract",name:"data"},{type:"address",description:"The recipient of the ERC1155",name:"recipient"},{type:"address",description:"The ERC1155 token address",name:"token"},{type:"uint256",description:"The ID of the ERC1155",name:"id"},{type:"uint256",description:"The amount of the ERC1155 to transfer",name:"amount"}]},21:{name:"OWNER_CHECK_721",params:[{type:"address",description:"The required owner of the ERC721",name:"owner"},{type:"address",description:"The ERC721 token address",name:"token"},{type:"uint256",description:"The ID of the ERC721",name:"id"}]},22:{name:"OWNER_CHECK_1155",params:[{type:"address",description:"The required owner of the ERC1155",name:"owner"},{type:"address",description:"The ERC721 token address",name:"token"},{type:"uint256",description:"The ID of the ERC1155",name:"id"},{type:"uint256",description:"The minimum required amount of the ERC1155",name:"minBalance"}]},23:{name:"SWEEP_ERC721",params:[{type:"address",description:"The ERC721 token address to transfer",name:"token"},{type:"address",description:"The recipient of the transfer",name:"recipient"},{type:"uint256",description:"The token ID to transfer",name:"id"}]},24:{name:"X2Y2_721",params:[{type:"uint256",description:"The ETH value to forward to the X2Y2 contract",name:"value"},{type:"bytes",description:"The calldata to use to call the X2Y2 contract",name:"data"},{type:"address",description:"The recipient of the ERC721",name:"recipient"},{type:"address",description:"The ERC721 token address",name:"token"},{type:"uint256",description:"The ID of the ERC721",name:"id"}]},25:{name:"SUDOSWAP",params:[{type:"uint256",description:"The ETH value to forward to the Sudoswap contract",name:"value"},{type:"bytes",description:"The calldata to use to call the Sudoswap contract",name:"data"}]},26:{name:"NFT20",params:[{type:"uint256",description:"The ETH value to forward to the NFT20 contract",name:"value"},{type:"bytes",description:"The calldata to use to call the NFT20 contract",name:"data"}]},27:{name:"X2Y2_1155",params:[{type:"uint256",description:"The ETH value to forward to the X2Y2 contract",name:"value"},{type:"bytes",description:"The calldata to use to call the X2Y2 contract",name:"data"},{type:"address",description:"The recipient of the ERC1155",name:"recipient"},{type:"address",description:"The ERC1155 token address",name:"token"},{type:"uint256",description:"The ID of the ERC1155",name:"id"},{type:"uint256",description:"The amount of the ERC1155 to transfer",name:"amount"}]},28:{name:"FOUNDATION",params:[{type:"uint256",description:"The ETH value to forward to the Foundation contract",name:"value"},{type:"bytes",description:"The calldata to use to call the Foundation contract",name:"data"},{type:"address",description:"The recipient of the ERC721",name:"recipient"},{type:"address",description:"The ERC721 token address",name:"token"},{type:"uint256",description:"The ID of the ERC721",name:"id"}]},29:{name:"SWEEP_ERC1155",params:[{type:"address",description:"The ERC1155 token address to sweep",name:"token"},{type:"address",description:"The recipient of the sweep",name:"recipient"},{type:"uint256",description:"The token ID to sweep",name:"id"},{type:"uint256",description:"The minimum required tokens to receive from the sweep",name:"amount"}]}}}}},{package:"$root$",file:"app/scripts/lib/transaction/decode/uniswap-commands.ts"}],[129,{"../../../../../shared/constants/network":5264,"./uniswap-commands":128,"@ethersproject/abi":500,"ethereumjs-util":3796},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.UNISWAP_UNIVERSAL_ROUTER_ADDRESSES=void 0,n.decodeUniswapRouterTransactionData=function({transactionData:e,contractAddress:t,chainId:n}){const o=c[n];if(null==o||!o.map((e=>e.toLowerCase())).includes(t.toLowerCase()))return undefined;const u=new r.Interface(d);let h;try{h=u.parseTransaction({data:e})}catch(e){return undefined}const p=h.args.commands,m=h.args.inputs;return p.slice(2).match(/.{1,2}/gu).map(((e,t)=>function(e,t){const n=parseInt(e,16),o=31&n,c=a.UNISWAP_ROUTER_COMMANDS[String(o)];if(!c)return undefined;const d=c.params.map((e=>e.type)),u=r.Interface.getAbiCoder().decode(d,t),{name:h}=c,p=c.params.map(((e,t)=>{const{name:n,type:r,description:o}=e,a=u[t];return{name:n,type:r,value:"path"===n?function(e){const t=[];let n=(0,s.stripHexPrefix)(e),r={},o=!0;for(;n.length;){if(o){const e=(0,s.addHexPrefix)(n.slice(0,i));r.firstAddress?(r.secondAddress=e,t.push(r),r={firstAddress:e}):r.firstAddress=e,n=n.slice(i)}else r.tickSpacing=parseInt(n.slice(0,l),16),n=n.slice(l);o=!o}return t}(a):a,description:o}}));return{name:h,params:p}}(e,m[t]))).filter((e=>e!==undefined))};var r=e("@ethersproject/abi"),s=e("ethereumjs-util"),o=e("../../../../../shared/constants/network"),a=e("./uniswap-commands");const i=40,l=6,c=n.UNISWAP_UNIVERSAL_ROUTER_ADDRESSES={[o.CHAIN_IDS.ARBITRUM]:["0x4C60051384bd2d3C01bfc845Cf5F4b44bcbE9de5","0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4","0x5E325eDA8064b456f4781070C0738d849c824258"],[o.CHAIN_IDS.AVALANCHE]:["0x82635AF6146972cD6601161c4472ffe97237D292","0x4Dae2f939ACf50408e13d58534Ff8c2776d45265"],[o.CHAIN_IDS.BASE]:["0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4","0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD"],[o.CHAIN_IDS.BSC]:["0x5Dc88340E1c5c6366864Ee415d6034cadd1A9897","0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4","0x4Dae2f939ACf50408e13d58534Ff8c2776d45265"],[o.CHAIN_IDS.MAINNET]:["0xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B","0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD"],[o.CHAIN_IDS.OPTIMISM]:["0xb555edF5dcF85f42cEeF1f3630a52A108E55A654","0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4","0xCb1355ff08Ab38bBCE60111F1bb2B784bE25D7e8"],[o.CHAIN_IDS.POLYGON]:["0x4C60051384bd2d3C01bfc845Cf5F4b44bcbE9de5","0x643770E279d5D0733F21d6DC03A8efbABf3255B4","0xec7BE89e9d109e7e3Fec59c222CF297125FEFda2"],[o.CHAIN_IDS.SEPOLIA]:["0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD"]},d=[{constant:!0,inputs:[{name:"commands",type:"bytes"},{name:"inputs",type:"bytes[]"},{name:"deadline",type:"uint256"}],name:"execute",type:"function"},{constant:!0,inputs:[{name:"commands",type:"bytes"},{name:"inputs",type:"bytes[]"}],name:"execute",type:"function"}]}}},{package:"$root$",file:"app/scripts/lib/transaction/decode/uniswap.ts"}],[13,{"../../../shared/constants/alarms":5245,"../../../shared/constants/app":5248,"../../../shared/constants/preferences":5269,"../../../shared/constants/time":5276,"../../../shared/modules/mv3.utils":5310,"../../../ui/helpers/utils/build-types":6273,"../metamask-controller":136,"@metamask/controller-utils":1422,"@metamask/obs-store":2126,events:3868,loglevel:4386,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AppStateController=void 0;var r=g(e("events")),s=e("@metamask/obs-store"),o=e("uuid"),a=g(e("loglevel")),i=e("@metamask/controller-utils"),l=e("../metamask-controller"),c=e("../../../shared/constants/time"),d=e("../../../shared/constants/alarms"),u=e("../../../shared/modules/mv3.utils"),h=e("../../../ui/helpers/utils/build-types"),p=e("../../../shared/constants/app"),m=e("../../../shared/constants/preferences");function g(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;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:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){return e.get(v(e,t))}function w(e,t,n){return e.set(v(e,t),n),n}function v(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var b=new WeakMap,k=new WeakSet;class S extends r.default{constructor(e){const{addUnlockListener:t,isUnlocked:n,initState:r,onInactiveTimeout:o,messenger:a,extension:i}=e;var l,c;super(),f(l=this,c=k),c.add(l),C(this,"extension",void 0),C(this,"onInactiveTimeout",void 0),C(this,"store",void 0),C(this,"timer",void 0),C(this,"isUnlocked",void 0),C(this,"waitingForUnlock",void 0),C(this,"messagingSystem",void 0),function(e,t,n){f(e,t),t.set(e,n)}(this,b,void 0),this.extension=i,this.onInactiveTimeout=o||(()=>undefined),this.store=new s.ObservableStore((e=>({timeoutMinutes:m.DEFAULT_AUTO_LOCK_TIME_LIMIT,connectedStatusPopoverHasBeenShown:!0,defaultHomeActiveTabName:null,browserEnvironment:{},popupGasPollTokens:[],notificationGasPollTokens:[],fullScreenGasPollTokens:[],recoveryPhraseReminderHasBeenShown:!1,recoveryPhraseReminderLastShown:(new Date).getTime(),outdatedBrowserWarningLastShown:null,nftsDetectionNoticeDismissed:!1,showTestnetMessageInDropdown:!0,showBetaHeader:(0,h.isBeta)(),showPermissionsTour:!0,showNetworkBanner:!0,showAccountBanner:!0,trezorModel:null,onboardingDate:null,lastViewedUserSurvey:null,newPrivacyPolicyToastClickedOrClosed:null,newPrivacyPolicyToastShownDate:null,hadAdvancedGasFeesSetPriorToMigration92_3:!1,...e,qrHardware:{},nftsDropdownState:{},usedNetworks:{"0x1":!0,"0x5":!0,"0x539":!0},surveyLinkLastClickedOrClosed:null,signatureSecurityAlertResponses:{},switchedNetworkDetails:null,switchedNetworkNeverShowMessage:!1,currentExtensionPopupId:0}))(r)),this.timer=null,this.isUnlocked=n,this.waitingForUnlock=[],t(this.handleUnlock.bind(this)),a.subscribe("PreferencesController:stateChange",(({preferences:e})=>{const t=this.store.getState();"number"==typeof(null==e?void 0:e.autoLockTimeLimit)&&t.timeoutMinutes!==e.autoLockTimeLimit&&this._setInactiveTimeout(e.autoLockTimeLimit)})),a.subscribe("KeyringController:qrKeyringStateChange",(e=>this.store.updateState({qrHardware:e})));const{preferences:d}=a.call("PreferencesController:getState");"number"==typeof d.autoLockTimeLimit&&this._setInactiveTimeout(d.autoLockTimeLimit),this.messagingSystem=a,this.messagingSystem.registerActionHandler("AppStateController:getState",(()=>this.store.getState())),this.store.subscribe((e=>{this.messagingSystem.publish("AppStateController:stateChange",e,[])})),w(b,this,null)}getUnlockPromise(e){return new Promise((t=>{this.isUnlocked()?t():this.waitForUnlock(t,e)}))}waitForUnlock(e,t){this.waitingForUnlock.push({resolve:e}),this.emit(l.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE),t&&this._requestApproval()}handleUnlock(){if(this.waitingForUnlock.length>0){for(;this.waitingForUnlock.length>0;){var e;null===(e=this.waitingForUnlock.shift())||void 0===e||e.resolve()}this.emit(l.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE)}this._acceptApproval()}setDefaultHomeActiveTabName(e){this.store.updateState({defaultHomeActiveTabName:e})}setConnectedStatusPopoverHasBeenShown(){this.store.updateState({connectedStatusPopoverHasBeenShown:!0})}setRecoveryPhraseReminderHasBeenShown(){this.store.updateState({recoveryPhraseReminderHasBeenShown:!0})}setSurveyLinkLastClickedOrClosed(e){this.store.updateState({surveyLinkLastClickedOrClosed:e})}setOnboardingDate(){this.store.updateState({onboardingDate:Date.now()})}setLastViewedUserSurvey(e){this.store.updateState({lastViewedUserSurvey:e})}setNewPrivacyPolicyToastClickedOrClosed(){this.store.updateState({newPrivacyPolicyToastClickedOrClosed:!0})}setNewPrivacyPolicyToastShownDate(e){this.store.updateState({newPrivacyPolicyToastShownDate:e})}setRecoveryPhraseReminderLastShown(e){this.store.updateState({recoveryPhraseReminderLastShown:e})}setTermsOfUseLastAgreed(e){this.store.updateState({termsOfUseLastAgreed:e})}setSnapsInstallPrivacyWarningShownStatus(e){this.store.updateState({snapsInstallPrivacyWarningShown:e})}setOutdatedBrowserWarningLastShown(e){this.store.updateState({outdatedBrowserWarningLastShown:e})}setLastActiveTime(){this._resetTimer()}_setInactiveTimeout(e){this.store.updateState({timeoutMinutes:e}),this._resetTimer()}_resetTimer(){const{timeoutMinutes:e}=this.store.getState();if(this.timer?clearTimeout(this.timer):u.isManifestV3&&this.extension.alarms.clear(d.AUTO_LOCK_TIMEOUT_ALARM),!e)return;const t=Number(e);u.isManifestV3?(this.extension.alarms.create(d.AUTO_LOCK_TIMEOUT_ALARM,{delayInMinutes:t,periodInMinutes:t}),this.extension.alarms.onAlarm.addListener((e=>{e.name===d.AUTO_LOCK_TIMEOUT_ALARM&&(this.onInactiveTimeout(),this.extension.alarms.clear(d.AUTO_LOCK_TIMEOUT_ALARM))}))):this.timer=setTimeout((()=>this.onInactiveTimeout()),t*c.MINUTE)}setBrowserEnvironment(e,t){this.store.updateState({browserEnvironment:{os:e,browser:t}})}addPollingToken(e,t){t.toString()!==p.POLLING_TOKEN_ENVIRONMENT_TYPES[p.ENVIRONMENT_TYPE_BACKGROUND]&&v(k,this,T).call(this,t)&&v(k,this,A).call(this,e,t)}removePollingToken(e,t){if(t.toString()!==p.POLLING_TOKEN_ENVIRONMENT_TYPES[p.ENVIRONMENT_TYPE_BACKGROUND]){const n=this.store.getState()[t];v(k,this,T).call(this,t)&&this.store.updateState({[t]:n.filter((t=>t!==e))})}}clearPollingTokens(){this.store.updateState({popupGasPollTokens:[],notificationGasPollTokens:[],fullScreenGasPollTokens:[]})}setShowTestnetMessageInDropdown(e){this.store.updateState({showTestnetMessageInDropdown:e})}setShowBetaHeader(e){this.store.updateState({showBetaHeader:e})}setShowPermissionsTour(e){this.store.updateState({showPermissionsTour:e})}setShowNetworkBanner(e){this.store.updateState({showNetworkBanner:e})}setShowAccountBanner(e){this.store.updateState({showAccountBanner:e})}setCurrentExtensionPopupId(e){this.store.updateState({currentExtensionPopupId:e})}setSwitchedNetworkDetails(e){this.store.updateState({switchedNetworkDetails:e})}clearSwitchedNetworkDetails(){this.store.updateState({switchedNetworkDetails:null})}setSwitchedNetworkNeverShowMessage(e){this.store.updateState({switchedNetworkDetails:null,switchedNetworkNeverShowMessage:e})}setTrezorModel(e){this.store.updateState({trezorModel:e})}updateNftDropDownState(e){this.store.updateState({nftsDropdownState:e})}setFirstTimeUsedNetwork(e){const t=this.store.getState(),{usedNetworks:n}=t;n[e]=!0,this.store.updateState({usedNetworks:n})}getSignatureSecurityAlertResponse(e){return this.store.getState().signatureSecurityAlertResponses[e]}addSignatureSecurityAlertResponse(e){const t=this.store.getState(),{signatureSecurityAlertResponses:n}=t;e.securityAlertId&&this.store.updateState({signatureSecurityAlertResponses:{...n,[String(e.securityAlertId)]:e}})}setCurrentPopupId(e){this.store.updateState({currentPopupId:e})}getLastInteractedConfirmationInfo(){return this.store.getState().lastInteractedConfirmationInfo}setLastInteractedConfirmationInfo(e){this.store.updateState({lastInteractedConfirmationInfo:e})}getCurrentPopupId(){return this.store.getState().currentPopupId}_requestApproval(){y(b,this)||(w(b,this,(0,o.v4)()),this.messagingSystem.call("ApprovalController:addRequest",{id:y(b,this),origin:p.ORIGIN_METAMASK,type:i.ApprovalType.Unlock},!0).catch((()=>{w(b,this,null)})))}emit(e){return super.emit(e)}_acceptApproval(){if(y(b,this)){try{this.messagingSystem.call("ApprovalController:acceptRequest",y(b,this))}catch(e){a.default.error("Failed to unlock approval request",e)}w(b,this,null)}}}function A(e,t){const n=this.store.getState()[t];this.store.updateState({[t]:[...n,e]})}function T(e){return["popupGasPollTokens","notificationGasPollTokens","fullScreenGasPollTokens"].includes(e)}n.AppStateController=S}}},{package:"$root$",file:"app/scripts/controllers/app-state-controller.ts"}],[130,{"../../../../../shared/types/transaction-decode":5330,"./four-byte":125,"./proxy":126,"./sourcify":127,"./uniswap":129,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.decodeTransactionData=async function({transactionData:e,contractAddress:t,chainId:n,ethQuery:r}){c("Decoding transaction data",{transactionData:e,contractAddress:t,chainId:n});const u=(0,o.decodeUniswapRouterTransactionData)({transactionData:e,contractAddress:t,chainId:n});if(u)return c("Decoded with Uniswap commands",u),{data:d(u),source:s.DecodedTransactionDataSource.Uniswap};const h=await(0,i.getContractProxyAddress)(t,r);h&&c("Retrieved proxy implementation address",h);const p=h??t,m=(0,a.decodeTransactionDataWithSourcify)(e,p,n),g=(0,l.decodeTransactionDataWithFourByte)(e),[f,C]=await Promise.allSettled([m,g]);if("fulfilled"===f.status&&f.value)return c("Decoded data with Sourcify",f.value),{data:d([f.value]),source:s.DecodedTransactionDataSource.Sourcify};if(c("Failed to decode data with Sourcify",f),"fulfilled"===C.status&&C.value)return c("Decoded data with 4Byte",C.value),{data:d([C.value]),source:s.DecodedTransactionDataSource.FourByte};return c("Failed to decode data with 4Byte",C),undefined};var r=e("@metamask/utils"),s=e("../../../../../shared/types/transaction-decode"),o=e("./uniswap"),a=e("./sourcify"),i=e("./proxy"),l=e("./four-byte");const c=(0,r.createProjectLogger)("transaction-decode");function d(e){return e.map((e=>function(e){return{...e,params:e.params.map((e=>u(e)))}}(e)))}function u(e){var t;return{...e,value:h(e.value),children:null===(t=e.children)||void 0===t?void 0:t.map((e=>u(e)))}}function h(e){const t=e._hex;return t?parseInt(t,16):e}}}},{package:"$root$",file:"app/scripts/lib/transaction/decode/util.ts"}],[131,{"../../../../shared/constants/app":5248,"../../../../shared/constants/gas":5255,"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/transaction":5278,"../../../../shared/lib/confirmation.utils":5281,"../../../../shared/lib/transactions-controller-utils":5292,"../../../../shared/modules/conversion.utils":5301,"../../../../shared/modules/metametrics":5309,"../../../../shared/modules/transaction.utils":5326,"../../../../ui/helpers/utils/metrics":6283,"../snap-keyring/metrics":119,"@metamask/eth-query":1640,"@metamask/transaction-controller":2698,"bignumber.js":3465,"ethereumjs-util":3796},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.handleTransactionSubmitted=n.handleTransactionRejected=n.handleTransactionFailed=n.handleTransactionDropped=n.handleTransactionConfirmed=n.handleTransactionApproved=n.handleTransactionAdded=n.handlePostTransactionBalanceUpdate=n.createTransactionEventFragmentWithTxId=n.METRICS_STATUS_FAILED=void 0;var r,s=(r=e("@metamask/eth-query"))&&r.__esModule?r:{default:r},o=e("bignumber.js"),a=e("ethereumjs-util"),i=e("@metamask/transaction-controller"),l=e("../../../../shared/constants/app"),c=e("../../../../shared/constants/gas"),d=e("../../../../shared/constants/metametrics"),u=e("../../../../shared/constants/transaction"),h=e("../../../../shared/lib/transactions-controller-utils"),p=e("../../../../shared/modules/conversion.utils"),m=e("../../../../shared/modules/metametrics"),g=e("../../../../shared/modules/transaction.utils"),f=e("../../../../ui/helpers/utils/metrics"),C=e("../snap-keyring/metrics"),y=e("../../../../shared/lib/confirmation.utils");const w=n.METRICS_STATUS_FAILED="failed on-chain";n.handleTransactionAdded=async(e,t)=>{if(!t.transactionMeta)return;const{properties:n,sensitiveProperties:r}=await S({transactionEventPayload:t,transactionMetricsRequest:e});v({eventName:u.TransactionMetaMetricsEvent.added,transactionEventPayload:t,transactionMetricsRequest:e,payload:{properties:n,sensitiveProperties:r}})};n.handleTransactionApproved=async(e,t)=>{t.transactionMeta&&await b({eventName:u.TransactionMetaMetricsEvent.approved,transactionEventPayload:t,transactionMetricsRequest:e})};n.handleTransactionFailed=async(e,t)=>{if(!t.transactionMeta)return;const n={};t.error&&(n.error=t.error),await b({eventName:u.TransactionMetaMetricsEvent.finalized,extraParams:n,transactionEventPayload:t,transactionMetricsRequest:e})};n.handleTransactionConfirmed=async(e,t)=>{if(0===Object.keys(t).length)return;const n={},r={...t},{txReceipt:s}=r;n.gas_used=null==s?void 0:s.gasUsed;const{submittedTime:o}=r;o&&(n.completion_time=function(e){return Math.round((Date.now()-e)/1e3).toString()}(o)),"0x0"===(null==s?void 0:s.status)&&(n.status=w),await b({eventName:u.TransactionMetaMetricsEvent.finalized,extraParams:n,transactionEventPayload:{actionId:r.actionId,transactionMeta:r},transactionMetricsRequest:e})};n.handleTransactionDropped=async(e,t)=>{if(!t.transactionMeta)return;await b({eventName:u.TransactionMetaMetricsEvent.finalized,extraParams:{dropped:!0},transactionEventPayload:t,transactionMetricsRequest:e})};n.handleTransactionRejected=async(e,t)=>{t.transactionMeta&&await b({eventName:u.TransactionMetaMetricsEvent.rejected,transactionEventPayload:t,transactionMetricsRequest:e})};n.handleTransactionSubmitted=async(e,t)=>{if(!t.transactionMeta)return;const{properties:n,sensitiveProperties:r}=await S({transactionEventPayload:t,transactionMetricsRequest:e});v({eventName:u.TransactionMetaMetricsEvent.submitted,transactionEventPayload:t,transactionMetricsRequest:e,payload:{properties:n,sensitiveProperties:r}})};n.createTransactionEventFragmentWithTxId=async(e,{transactionId:t,actionId:n})=>{const r={...e.getTransaction(t),actionId:n},{properties:s,sensitiveProperties:o}=await S({transactionEventPayload:{transactionMeta:r},transactionMetricsRequest:e});v({eventName:u.TransactionMetaMetricsEvent.approved,transactionEventPayload:{actionId:r.actionId,transactionMeta:r},transactionMetricsRequest:e,payload:{properties:s,sensitiveProperties:o}})};function v({eventName:e,transactionEventPayload:{transactionMeta:t,actionId:n},transactionMetricsRequest:r,payload:s}){if(function(e,t,n){const r=k(t,n.id);return void 0!==e(r)}(r.getEventFragmentById,e,t)&&e!==u.TransactionMetaMetricsEvent.submitted)return;const o=k(e,t.id);switch(e){case u.TransactionMetaMetricsEvent.added:r.createEventFragment({category:d.MetaMetricsEventCategory.Transactions,initialEvent:u.TransactionMetaMetricsEvent.added,successEvent:u.TransactionMetaMetricsEvent.approved,failureEvent:u.TransactionMetaMetricsEvent.rejected,properties:s.properties,sensitiveProperties:s.sensitiveProperties,actionId:n,uniqueIdentifier:o,persist:!0});break;case u.TransactionMetaMetricsEvent.approved:case u.TransactionMetaMetricsEvent.rejected:r.createEventFragment({category:d.MetaMetricsEventCategory.Transactions,successEvent:u.TransactionMetaMetricsEvent.approved,failureEvent:u.TransactionMetaMetricsEvent.rejected,properties:s.properties,sensitiveProperties:s.sensitiveProperties,actionId:n,uniqueIdentifier:o,persist:!0});break;case u.TransactionMetaMetricsEvent.submitted:r.createEventFragment({category:d.MetaMetricsEventCategory.Transactions,initialEvent:u.TransactionMetaMetricsEvent.submitted,successEvent:u.TransactionMetaMetricsEvent.finalized,properties:s.properties,sensitiveProperties:s.sensitiveProperties,actionId:n,uniqueIdentifier:o,persist:!0});break;case u.TransactionMetaMetricsEvent.finalized:r.createEventFragment({category:d.MetaMetricsEventCategory.Transactions,successEvent:u.TransactionMetaMetricsEvent.finalized,properties:s.properties,sensitiveProperties:s.sensitiveProperties,actionId:n,uniqueIdentifier:o,persist:!0})}}async function b({eventName:e,transactionEventPayload:t,transactionMetricsRequest:n,extraParams:r={}}){const{properties:s,sensitiveProperties:o}=await S({transactionEventPayload:t,transactionMetricsRequest:n,extraParams:r});v({eventName:e,transactionEventPayload:t,transactionMetricsRequest:n,payload:{properties:s,sensitiveProperties:o}}),function({eventName:e,transactionEventPayload:{transactionMeta:t},transactionMetricsRequest:n,payload:r}){const s=k(e,t.id);switch(e){case u.TransactionMetaMetricsEvent.approved:case u.TransactionMetaMetricsEvent.rejected:case u.TransactionMetaMetricsEvent.finalized:n.updateEventFragment(s,{properties:r.properties,sensitiveProperties:r.sensitiveProperties})}}({eventName:e,transactionEventPayload:t,transactionMetricsRequest:n,payload:{properties:s,sensitiveProperties:o}}),function({eventName:e,transactionMetricsRequest:t,transactionEventPayload:{transactionMeta:n}}){const r=k(e,n.id);switch(e){case u.TransactionMetaMetricsEvent.approved:case u.TransactionMetaMetricsEvent.finalized:t.finalizeEventFragment(r);break;case u.TransactionMetaMetricsEvent.rejected:t.finalizeEventFragment(r,{abandoned:!0})}}({eventName:e,transactionEventPayload:t,transactionMetricsRequest:n})}function k(e,t){return`transaction-${e===u.TransactionMetaMetricsEvent.finalized||e===u.TransactionMetaMetricsEvent.submitted?"submitted":"added"}-${t}`}async function S({transactionEventPayload:{transactionMeta:e},transactionMetricsRequest:t,extraParams:n={}}){var r;const{type:w,time:v,status:b,chainId:k,origin:S,txParams:{gasPrice:A,gas:T,maxFeePerGas:E,maxPriorityFeePerGas:M,estimateSuggested:P,estimateUsed:_},defaultGasEstimates:I,originalType:N,replacedById:R,customTokenAmount:O,dappProposedTokenAmount:x,currentTokenBalance:B,originalApprovalAmount:j,finalApprovalAmount:D,securityProviderResponse:U,simulationFails:F}=e,L=new s.default(t.provider),$=S===l.ORIGIN_METAMASK?"user":"dapp",{assetType:H,tokenStandard:q}=await(0,g.determineTransactionAssetType)(e,L,t.getTokenStandardAndDetails);let G;if(e.txParams.data){const n=await t.getMethodData(e.txParams.data);G=null==n?void 0:n.name}const K={};if((0,g.isEIP1559Transaction)(e)?(K.max_fee_per_gas=E,K.max_priority_fee_per_gas=M):K.gas_price=A,I){var V,W;const{estimateType:n}=I;if(n){var z,J;K.default_estimate=n;let r=null===(z=e.defaultGasEstimates)||void 0===z?void 0:z.maxFeePerGas,s=null===(J=e.defaultGasEstimates)||void 0===J?void 0:J.maxPriorityFeePerGas;if([c.GasRecommendations.low,c.GasRecommendations.medium,c.GasRecommendations.high].includes(n)){var Y,Q;const{gasFeeEstimates:e}=await t.getEIP1559GasFeeEstimates();var X,Z;if(null!=e&&null!==(Y=e[n])&&void 0!==Y&&Y.suggestedMaxFeePerGas)r=null===(X=e[n])||void 0===X?void 0:X.suggestedMaxFeePerGas,K.default_max_fee_per_gas=r;if(null!=e&&null!==(Q=e[n])&&void 0!==Q&&Q.suggestedMaxPriorityFeePerGas)s=null===(Z=e[n])||void 0===Z?void 0:Z.suggestedMaxPriorityFeePerGas,K.default_max_priority_fee_per_gas=s}}null!==(V=e.defaultGasEstimates)&&void 0!==V&&V.gas&&(K.default_gas=e.defaultGasEstimates.gas),null!==(W=e.defaultGasEstimates)&&void 0!==W&&W.gasPrice&&(K.default_gas_price=e.defaultGasEstimates.gasPrice)}P&&(K.estimate_suggested=P),_&&(K.estimate_used=_),null!=n&&n.gas_used&&(K.gas_used=n.gas_used);const ee=function(e){const t={};for(const n in e)(0,a.isHexString)(e[n])?t[n]=(0,p.hexWEIToDecGWEI)(e[n]):t[n]=e[n];return t}(K);let te="0";e.txParams.maxFeePerGas&&(te="2");const ne=w&&[i.TransactionType.contractInteraction,i.TransactionType.tokenMethodApprove,i.TransactionType.tokenMethodIncreaseAllowance,i.TransactionType.tokenMethodSafeTransferFrom,i.TransactionType.tokenMethodSetApprovalForAll,i.TransactionType.tokenMethodTransfer,i.TransactionType.tokenMethodTransferFrom,i.TransactionType.swap,i.TransactionType.swapAndSend,i.TransactionType.swapApproval].includes(w),re="Approve";let se,oe,ae,ie,le,ce=i.TransactionType.simpleSend;if(w===i.TransactionType.swapAndSend)ce=i.TransactionType.swapAndSend;else if(w===i.TransactionType.cancel)ce=i.TransactionType.cancel;else if(w===i.TransactionType.retry&&N)ce=N;else if(w===i.TransactionType.deployContract)ce=i.TransactionType.deployContract;else if(ne){var de;ce=i.TransactionType.contractInteraction,oe=G,le=null===(de=e.txParams)||void 0===de?void 0:de.to,oe===re&&q===u.TokenStandard.ERC20&&("0"===x||"0"===O?se=u.TransactionApprovalAmountType.revoke:O&&O!==x?se=u.TransactionApprovalAmountType.custom:x&&(se=u.TransactionApprovalAmountType.dappProposed),ae=function(e,t,n){if(e===u.TransactionApprovalAmountType.custom&&t&&n)return`${new o.BigNumber(t,10).div(n,10).times(100).round(2)}`;return null}(se,j,D),ie=function(e,t,n){if((e===u.TransactionApprovalAmountType.custom||e===u.TransactionApprovalAmountType.dappProposed)&&t&&n)return`${new o.BigNumber(t,16).div(n,10).times(100).round(2)}`;return null}(se,x,B))}const ue=t.getTransaction(R),he={RETRY:i.TransactionType.retry,CANCEL:i.TransactionType.cancel,SAME_NONCE:"other"};let pe;null!=n&&n.dropped&&(pe=he.SAME_NONCE,(null==ue?void 0:ue.type)===i.TransactionType.cancel?pe=he.CANCEL:(null==ue?void 0:ue.type)===i.TransactionType.retry&&(pe=he.RETRY));const me=[];let ge=null;1===(null==U?void 0:U.flagAsDangerous)?me.push(d.MetaMetricsEventUiCustomization.FlaggedAsMalicious):2===(null==U?void 0:U.flagAsDangerous)&&me.push(d.MetaMetricsEventUiCustomization.FlaggedAsSafetyUnknown);const fe=(0,f.getBlockaidMetricsProps)(e);(null==fe||null===(r=fe.ui_customizations)||void 0===r?void 0:r.length)>0&&me.push(...fe.ui_customizations),F&&me.push(d.MetaMetricsEventUiCustomization.GasEstimationFailed);(0,y.shouldUseRedesignForTransactions)({transactionMetadataType:e.type,isRedesignedTransactionsUserSettingEnabled:t.getRedesignedTransactionsEnabled(),isRedesignedConfirmationsDeveloperEnabled:t.getIsRedesignedConfirmationsDeveloperEnabled()})&&(me.push(d.MetaMetricsEventUiCustomization.RedesignedConfirmation),ge=t.getIsConfirmationAdvancedDetailsOpen());const Ce=(0,m.getSmartTransactionMetricsProperties)(t,e),ye=(0,f.getSwapAndSendMetricsProps)(e);let we={chain_id:k,referrer:S,source:$,status:b,network:`${parseInt(k,16)}`,eip_1559_version:te,gas_edit_type:"none",gas_edit_attempted:"none",gas_estimation_failed:Boolean(F),account_type:await t.getAccountType(t.getSelectedAddress()),device_model:await t.getDeviceModel(t.getSelectedAddress()),asset_type:H,token_standard:q,transaction_type:ce,transaction_speed_up:w===i.TransactionType.retry,...fe,ui_customizations:me.length>0?me:null,transaction_advanced_view:ge,transaction_contract_method:oe,...Ce,...ye};const ve=await(0,C.getSnapAndHardwareInfoForMetrics)(t.getAccountType,t.getDeviceModel,t.snapAndHardwareMessenger);Object.assign(we,ve),oe===re&&(we={...we,transaction_approval_amount_type:se});let be={transaction_envelope_type:(0,g.isEIP1559Transaction)(e)?h.TRANSACTION_ENVELOPE_TYPE_NAMES.FEE_MARKET:h.TRANSACTION_ENVELOPE_TYPE_NAMES.LEGACY,first_seen:v,gas_limit:T,transaction_replaced:pe,transaction_contract_address:le,...n,...ee};return oe===re&&(be={...be,transaction_approval_amount_vs_balance_ratio:ie,transaction_approval_amount_vs_proposed_ratio:ae}),{properties:we,sensitiveProperties:be}}n.handlePostTransactionBalanceUpdate=async({getParticipateInMetrics:e,trackEvent:t},{transactionMeta:n,approvalTransactionMeta:r})=>{var s;if(e()&&n.swapMetaData)if("0x0"===(null===(s=n.txReceipt)||void 0===s?void 0:s.status))t({event:"Swap Failed",sensitiveProperties:{...n.swapMetaData},category:d.MetaMetricsEventCategory.Swaps});else{var a;const e=(0,h.getSwapsTokensReceivedFromTxMeta)(n.destinationTokenSymbol,n,n.destinationTokenAddress,n.txParams.from,n.destinationTokenDecimals,r,n.chainId),s=e?`${new o.BigNumber(e,10).div(n.swapMetaData.token_to_amount,10).times(100).round(2)}%`:null,i=null!==(a=n.txReceipt)&&void 0!==a&&a.gasUsed&&n.swapMetaData.estimated_gas?`${new o.BigNumber(n.txReceipt.gasUsed,16).div(n.swapMetaData.estimated_gas,10).times(100).round(2)}%`:null,l=function(e,t){var n,r;let s="0x0";null!=t&&t.txReceipt&&(s=(0,h.calcGasTotal)(t.txReceipt.gasUsed,t.txReceipt.effectiveGasPrice));const a=(0,h.calcGasTotal)(null===(n=e.txReceipt)||void 0===n?void 0:n.gasUsed,null===(r=e.txReceipt)||void 0===r?void 0:r.effectiveGasPrice),i=new o.BigNumber(a,16).plus(s,16).toString(16);return{approvalGasCostInEth:Number((0,p.hexWEIToDecETH)(s)),tradeGasCostInEth:Number((0,p.hexWEIToDecETH)(a)),tradeAndApprovalGasCostInEth:Number((0,p.hexWEIToDecETH)(i))}}(n,r);t({event:d.MetaMetricsEventName.SwapCompleted,category:d.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...n.swapMetaData,token_to_amount_received:e,quote_vs_executionRatio:s,estimated_vs_used_gasRatio:i,approval_gas_cost_in_eth:l.approvalGasCostInEth,trade_gas_cost_in_eth:l.tradeGasCostInEth,trade_and_approval_gas_cost_in_eth:l.tradeAndApprovalGasCostInEth,token_to_amount:n.swapMetaData.token_to_amount.toString(10)}})}}}}},{package:"$root$",file:"app/scripts/lib/transaction/metrics.ts"}],[132,{"../../../../shared/constants/app":5248,"../../../../shared/constants/smartTransactions":5272,"../../../../shared/modules/conversion.utils":5301,"@metamask/smart-transactions-controller/dist/types":2358,"@metamask/transaction-controller":2698,loglevel:4386},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.submitSmartTransactionHook=void 0;var r,s=e("@metamask/smart-transactions-controller/dist/types"),o=e("@metamask/transaction-controller"),a=(r=e("loglevel"))&&r.__esModule?r:{default:r},i=e("../../../../shared/modules/conversion.utils"),l=e("../../../../shared/constants/smartTransactions"),c=e("../../../../shared/constants/app");function d(e,t,n){u(e,t),t.set(e,n)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t){return e.get(m(e,t))}function p(e,t,n){return e.set(m(e,t),n),n}function m(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var g=new WeakMap,f=new WeakMap,C=new WeakMap,y=new WeakMap,w=new WeakMap,v=new WeakMap,b=new WeakMap,k=new WeakMap,S=new WeakMap,A=new WeakMap,T=new WeakMap,E=new WeakMap,M=new WeakSet;class P{constructor(e){!function(e,t){u(e,t),t.add(e)}(this,M),d(this,g,void 0),d(this,f,void 0),d(this,C,void 0),d(this,y,void 0),d(this,w,void 0),d(this,v,void 0),d(this,b,void 0),d(this,k,void 0),d(this,S,void 0),d(this,A,void 0),d(this,T,void 0),d(this,E,void 0);const{transactionMeta:t,signedTransactionInHex:n,smartTransactionsController:r,transactionController:s,isSmartTransaction:o,controllerMessenger:a,featureFlags:i}=e;p(f,this,""),p(g,this,!1),p(A,this,t),p(T,this,n),p(k,this,r),p(S,this,s),p(b,this,o),p(y,this,a),p(w,this,i),p(v,this,t.origin!==c.ORIGIN_METAMASK),p(C,this,t.chainId),p(E,this,t.txParams)}async submit(){var e;const t=!(null===(e=h(A,this))||void 0===e||!e.type)&&[o.TransactionType.swapAndSend,o.TransactionType.swapApproval].includes(h(A,this).type),n={transactionHash:undefined};if(!h(b,this)||t)return n;const{id:r}=await h(y,this).call("ApprovalController:startFlow");let s;p(f,this,r);try{s=await h(k,this).getFees({...h(E,this),chainId:h(C,this)},undefined)}catch(e){return a.default.error("Error in smart transaction publish hook, falling back to regular transaction submission",e),m(M,this,_).call(this),n}try{var i;const e=await m(M,this,x).call(this,{getFeesResponse:s}),t=null==e?void 0:e.uuid;if(!t)throw new Error("No smart transaction UUID");const n=null===(i=h(w,this))||void 0===i||null===(i=i.smartTransactions)||void 0===i?void 0:i.extensionReturnTxHashAsap;let r;if(m(M,this,I).call(this,{uuid:t}),m(M,this,R).call(this,{uuid:t}),r=n&&null!=e&&e.txHash?e.txHash:await m(M,this,O).call(this,{uuid:t}),null===r)throw new Error("Transaction does not have a transaction hash, there was a problem");return{transactionHash:r}}catch(e){throw a.default.error("Error in smart transaction publish hook",e),m(M,this,_).call(this),e}}}function _(){h(g,this)||(p(g,this,!0),h(y,this).call("ApprovalController:endFlow",{id:h(f,this)}))}function I({uuid:e}){const t=()=>{m(M,this,_).call(this)};h(y,this).call("ApprovalController:addRequest",{id:h(f,this),origin:origin,type:c.SMART_TRANSACTION_CONFIRMATION_TYPES.showSmartTransactionStatusPage,requestState:{smartTransaction:{status:s.SmartTransactionStatuses.PENDING,creationTime:Date.now(),uuid:e},isDapp:h(v,this),txId:h(A,this).id}},!0).then(t,t)}async function N({smartTransaction:e}){return await h(y,this).call("ApprovalController:updateRequestState",{id:h(f,this),requestState:{smartTransaction:e,isDapp:h(v,this),txId:h(A,this).id}})}async function R({uuid:e}){h(y,this).subscribe("SmartTransactionsController:smartTransaction",(async t=>{if(t.uuid===e){const{status:e}=t;if(!e||e===s.SmartTransactionStatuses.PENDING)return;h(g,this)||await m(M,this,N).call(this,{smartTransaction:t})}}))}function O({uuid:e}){return new Promise((t=>{h(y,this).subscribe("SmartTransactionsController:smartTransaction",(async n=>{if(n.uuid===e){const{status:e,statusMetadata:r}=n;if(!e||e===s.SmartTransactionStatuses.PENDING)return;a.default.debug("Smart Transaction: ",n),null!=r&&r.minedHash?(a.default.debug("Smart Transaction - Received tx hash: ",null==r?void 0:r.minedHash),t(r.minedHash)):t(null)}}))}))}async function x({getFeesResponse:e}){let t;var n;h(T,this)?t=[h(T,this)]:t=await m(M,this,j).call(this,(null===(n=e.tradeTxFees)||void 0===n?void 0:n.fees)??[],!1);return await h(k,this).submitSignedTransactions({signedTransactions:t,signedCanceledTransactions:[],txParams:h(E,this),transactionMeta:h(A,this)})}function B(e,t){const n={...h(E,this),maxFeePerGas:`0x${(0,i.decimalToHex)(e.maxFeePerGas)}`,maxPriorityFeePerGas:`0x${(0,i.decimalToHex)(e.maxPriorityFeePerGas)}`,gas:t?`0x${(0,i.decimalToHex)(l.CANCEL_GAS_LIMIT_DEC)}`:h(E,this).gas};return t&&(n.to=n.from,n.data="0x"),n}async function j(e,t){const n=e.map((e=>m(M,this,B).call(this,e,t))).map((e=>({...e,chainId:e.chainId||h(C,this)})));return await h(S,this).approveTransactionsWithSameNonce(n,{hasNonce:!0})}n.submitSmartTransactionHook=e=>new P(e).submit()}}},{package:"$root$",file:"app/scripts/lib/transaction/smart-transactions.ts"}],[133,{"../../../../shared/constants/security-provider":5270,"../../../../shared/lib/trace":5291,"../ppom/ppom-util":95,"@metamask/keyring-api":1843,"ethereumjs-util":3796},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.addDappTransaction=async function(e){const{dappRequest:t}=e,{id:n,method:r,origin:s}=t,{securityAlertResponse:o,traceContext:a}=t,c={actionId:n,method:r,origin:s,requireApproval:!0,securityAlertResponse:o};(0,i.endTrace)({name:i.TraceName.Middleware,id:n});const{waitForHash:d}=await l({...e,transactionOptions:{...c,traceContext:a}}),u=await d();return(0,i.endTrace)({name:i.TraceName.Transaction,id:n}),u},n.addTransaction=async function(e){await async function(e){const{chainId:t,ppomController:n,securityAlertsEnabled:r,transactionOptions:s,transactionParams:i,updateSecurityAlertResponse:l,internalAccounts:c}=e,{type:d}=s,u=a.SECURITY_PROVIDER_EXCLUDED_TRANSACTION_TYPES.includes(d);if(!r||u)return;if(c.some((({address:e})=>{var t;return e.toLowerCase()===(null===(t=i.to)||void 0===t?void 0:t.toLowerCase())})))return;try{const{from:r,to:c,value:d,data:u}=i,{actionId:h,origin:p}=s,m={method:"eth_sendTransaction",id:h??"",origin:p??"",params:[{from:r,to:c??"",value:d??"",data:u??""}],jsonrpc:"2.0"},g=(0,o.generateSecurityAlertId)();(0,o.validateRequestWithPPOM)({ppomController:n,request:m,securityAlertId:g,chainId:t,updateSecurityAlertResponse:l});const f={...a.SECURITY_ALERT_RESPONSE_CHECKING_CHAIN,securityAlertId:g};e.transactionOptions.securityAlertResponse=f}catch(e){(0,o.handlePPOMError)(e,"Error validating JSON RPC using PPOM: ")}}(e);const{transactionMeta:t,waitForHash:n}=await l(e);if(!e.waitForSubmit)return n().catch((()=>{})),t;const r=await n();return function(e,t){return t.state.transactions.find((t=>t.hash===e))}(r,e.transactionController)};var r=e("@metamask/keyring-api"),s=e("ethereumjs-util"),o=e("../ppom/ppom-util"),a=e("../../../../shared/constants/security-provider"),i=e("../../../../shared/lib/trace");async function l(e){const{selectedAccount:t}=e;return t.type===r.EthAccountType.Erc4337?async function(e){var t;const{networkClientId:n,transactionController:r,transactionOptions:o,transactionParams:a,userOperationController:i}=e,{maxFeePerGas:l,maxPriorityFeePerGas:d}=a,{origin:u,requireApproval:h,type:p}=o,m={...a,maxFeePerGas:(0,s.addHexPrefix)(l),maxPriorityFeePerGas:(0,s.addHexPrefix)(d)},g=null==o||null===(t=o.swaps)||void 0===t?void 0:t.meta;null!=g&&g.type&&delete g.type;const f={networkClientId:n,origin:u,requireApproval:h,swaps:g,type:p},C=await i.addUserOperationFromTransaction(m,f);i.startPollingByNetworkClientId(n);return{transactionMeta:c(C.id,r),waitForHash:C.transactionHash}}(e):async function(e){const{transactionController:t,transactionOptions:n,transactionParams:r,networkClientId:s}=e,{result:o,transactionMeta:a}=await t.addTransaction(r,{...n});return{transactionMeta:a,waitForHash:()=>o}}(e)}function c(e,t){return t.state.transactions.find((t=>t.id===e))}}}},{package:"$root$",file:"app/scripts/lib/transaction/util.ts"}],[134,{"../../../../shared/constants/app":5248,"../../../../shared/constants/verification":5280,"../../../../shared/modules/selectors/networks":5320,"@ethersproject/hash":529,"@ethersproject/wallet":612,"@metamask/rpc-errors":2304,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createTxVerificationMiddleware=function(e,t=i.TRUSTED_SIGNERS){return function(n,d,u,h){if(n.method!==l.MESSAGE_TYPE.ETH_SEND_TRANSACTION||!Array.isArray(n.params)||!function(e){return(0,a.isObject)(e[0])&&"string"==typeof e[0].data&&"string"==typeof e[0].from&&"string"==typeof e[0].to&&"string"==typeof e[0].value&&(!(0,a.hasProperty)(e[0],"chainId")||"string"==typeof e[0].chainId&&e[0].chainId.startsWith("0x"))}(n.params))return u();const p=n.params[0],m="string"==typeof p.chainId?p.chainId.toLowerCase():(0,c.getCurrentChainId)({metamask:e.state}),g=(0,i.getExperience)(p.to.toLowerCase(),m);if(!g||!i.EXPERIENCES_TO_VERIFY.includes(g))return u();const f=`0x${p.data.slice(-i.TX_SIG_LEN)}`,C=(0,s.verifyMessage)(function(e){const t={to:(0,r.hashMessage)(e.to.toLowerCase()),from:(0,r.hashMessage)(e.from.toLowerCase()),data:(0,r.hashMessage)(e.data.toLowerCase().slice(0,e.data.length-i.TX_SIG_LEN)),value:(0,r.hashMessage)(e.value.toLowerCase())};return(0,r.hashMessage)(JSON.stringify(t))}(p),f);return C!==t[g]?h(o.rpcErrors.invalidParams("Invalid transaction signature.")):u()}};var r=e("@ethersproject/hash"),s=e("@ethersproject/wallet"),o=e("@metamask/rpc-errors"),a=e("@metamask/utils"),i=e("../../../../shared/constants/verification"),l=e("../../../../shared/constants/app"),c=e("../../../../shared/modules/selectors/networks")}}},{package:"$root$",file:"app/scripts/lib/tx-verification/tx-verification-middleware.ts"}],[1346,{"./utils.cjs":1348,"@metamask/base-controller":1396,"@metamask/eth-snap-keyring":1695,"@metamask/keyring-api":1843,"@metamask/keyring-controller":1896,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var r,s,o,a,i,l,c,d,u,h,p,m,g,f,C,y=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.AccountsController=n.EMPTY_ACCOUNT=void 0;const w=e("@metamask/base-controller"),v=e("@metamask/eth-snap-keyring"),b=e("@metamask/keyring-api"),k=e("@metamask/keyring-controller"),S=e("@metamask/utils"),A=e("./utils.cjs"),T="AccountsController",E={internalAccounts:{persist:!0,anonymous:!1}},M={internalAccounts:{accounts:{},selectedAccount:""}};n.EMPTY_ACCOUNT={id:"",address:"",options:{},methods:[],type:b.EthAccountType.Eoa,metadata:{name:"",keyring:{type:""},importTime:0}};class P extends w.BaseController{constructor({messenger:e,state:t}){super({messenger:e,name:T,metadata:E,state:{...M,...t}}),r.add(this),this.messagingSystem.subscribe("SnapController:stateChange",(e=>y(this,r,"m",l).call(this,e))),this.messagingSystem.subscribe("KeyringController:stateChange",(e=>y(this,r,"m",i).call(this,e))),y(this,r,"m",C).call(this)}getAccount(e){return this.state.internalAccounts.accounts[e]}listAccounts(){return Object.values(this.state.internalAccounts.accounts).filter((e=>(0,b.isEvmAccountType)(e.type)))}listMultichainAccounts(e){const t=Object.values(this.state.internalAccounts.accounts);if(!e)return t;if(!(0,S.isCaipChainId)(e))throw new Error(`Invalid CAIP-2 chain ID: ${String(e)}`);return t.filter((t=>y(this,r,"m",u).call(this,t,e)))}getAccountExpect(e){const t=this.getAccount(e);if(t===undefined)throw new Error(`Account Id "${e}" not found`);return t}getSelectedAccount(){if(""===this.state.internalAccounts.selectedAccount)return n.EMPTY_ACCOUNT;const e=this.getAccountExpect(this.state.internalAccounts.selectedAccount);if((0,b.isEvmAccountType)(e.type))return e;const t=this.listAccounts();if(!t.length)throw new Error("No EVM accounts");return y(this,r,"m",d).call(this,t)}getSelectedMultichainAccount(e){if(""===this.state.internalAccounts.selectedAccount)return n.EMPTY_ACCOUNT;if(!e)return this.getAccountExpect(this.state.internalAccounts.selectedAccount);if(!(0,S.isCaipChainId)(e))throw new Error(`Invalid CAIP-2 chain ID: ${e}`);const t=Object.values(this.state.internalAccounts.accounts).filter((t=>y(this,r,"m",u).call(this,t,e)));return y(this,r,"m",d).call(this,t)}getAccountByAddress(e){return this.listMultichainAccounts().find((t=>t.address.toLowerCase()===e.toLowerCase()))}setSelectedAccount(e){const t=this.getAccountExpect(e);this.update((e=>{e.internalAccounts.accounts[t.id].metadata.lastSelected=Date.now(),e.internalAccounts.selectedAccount=t.id})),y(this,r,"m",m).call(this,t)}setAccountName(e,t){this.updateAccountMetadata(e,{name:t,nameLastUpdatedAt:Date.now()})}updateAccountMetadata(e,t){const n=this.getAccountExpect(e);if(t.name&&this.listMultichainAccounts().find((n=>n.metadata.name===t.name&&n.id!==e)))throw new Error("Account name already exists");this.update((r=>{const s={...n,metadata:{...n.metadata,...t}};r.internalAccounts.accounts[e]=s,t.name&&this.messagingSystem.publish("AccountsController:accountRenamed",s)}))}async updateAccounts(){const e=await y(this,r,"m",o).call(this),t=await y(this,r,"m",a).call(this),n=new Map,s=this.state.internalAccounts.accounts,i=[...t,...e].reduce(((e,t)=>{const o=(0,A.keyringTypeToName)(t.metadata.keyring.type),a=n.get(o)??0;a?n.set(o,a+1):n.set(o,1);const i=s[t.id];return e[t.id]={...t,metadata:{...t.metadata,name:y(this,r,"m",f).call(this,i?.id,"name")??`${o} ${a+1}`,importTime:y(this,r,"m",f).call(this,i?.id,"importTime")??Date.now(),lastSelected:y(this,r,"m",f).call(this,i?.id,"lastSelected")??0}},e}),{});this.update((e=>{if(e.internalAccounts.accounts=i,!e.internalAccounts.accounts[e.internalAccounts.selectedAccount]){const t=y(this,r,"m",d).call(this,Object.values(i));t?(e.internalAccounts.selectedAccount=t.id,e.internalAccounts.accounts[t.id].metadata.lastSelected=y(this,r,"m",h).call(this),y(this,r,"m",m).call(this,t)):e.internalAccounts.selectedAccount=""}}))}loadBackup(e){e.internalAccounts&&this.update((t=>{t.internalAccounts=e.internalAccounts}))}getNextAvailableAccountName(e=k.KeyringTypes.hd,t){const n=(0,A.keyringTypeToName)(e),s=y(this,r,"m",c).call(this,e,t),o=s.reduce(((e,t)=>{const r=new RegExp(`${n} ([0-9]+)$`,"u").exec(t.metadata.name);if(r){const t=parseInt(r[1],10);return Math.max(e,t)}return e}),0),a=Math.max(s.length+1,o+1);return`${n} ${a}`}}n.AccountsController=P,r=new WeakSet,s=function(e,t){return{id:(0,A.getUUIDFromAddressOfNormalAccount)(e),address:e,options:{},methods:[b.EthMethod.PersonalSign,b.EthMethod.Sign,b.EthMethod.SignTransaction,b.EthMethod.SignTypedDataV1,b.EthMethod.SignTypedDataV3,b.EthMethod.SignTypedDataV4],type:b.EthAccountType.Eoa,metadata:{name:"",importTime:Date.now(),keyring:{type:t}}}},o=async function(){const[e]=this.messagingSystem.call("KeyringController:getKeyringsByType",v.SnapKeyring.type);if(!e)return[];return e.listAccounts()},a=async function(){const e=await this.messagingSystem.call("KeyringController:getAccounts"),t=[];for(const n of e){const e=await this.messagingSystem.call("KeyringController:getKeyringForAccount",n),s=e.type;if(!(0,A.isNormalKeyringType)(s))continue;const o=(0,A.getUUIDFromAddressOfNormalAccount)(n),a=y(this,r,"m",f).call(this,o,"nameLastUpdatedAt");t.push({id:o,address:n,options:{},methods:[b.EthMethod.PersonalSign,b.EthMethod.Sign,b.EthMethod.SignTransaction,b.EthMethod.SignTypedDataV1,b.EthMethod.SignTypedDataV3,b.EthMethod.SignTypedDataV4],type:b.EthAccountType.Eoa,metadata:{name:y(this,r,"m",f).call(this,o,"name")??"",...a&&{nameLastUpdatedAt:a},importTime:y(this,r,"m",f).call(this,o,"importTime")??Date.now(),lastSelected:y(this,r,"m",f).call(this,o,"lastSelected")??0,keyring:{type:e.type}}})}return t},i=function(e){if(e.isUnlocked&&e.keyrings.length>0){const t=[],n=[];for(const r of e.keyrings)r.type===k.KeyringTypes.snap?n.push(...r.accounts.map((e=>({address:e,type:r.type})))):t.push(...r.accounts.map((e=>({address:e,type:r.type}))));const{previousNormalInternalAccounts:s,previousSnapInternalAccounts:o}=this.listMultichainAccounts().reduce(((e,t)=>(t.metadata.keyring.type===k.KeyringTypes.snap?e.previousSnapInternalAccounts.push(t):e.previousNormalInternalAccounts.push(t),e)),{previousNormalInternalAccounts:[],previousSnapInternalAccounts:[]}),a=[],i=[];for(const e of t)this.state.internalAccounts.accounts[(0,A.getUUIDFromAddressOfNormalAccount)(e.address)]||a.push(e);for(const e of n)o.find((t=>t.address.toLowerCase()===e.address.toLowerCase()))||a.push(e);for(const e of s)t.find((({address:t})=>t.toLowerCase()===e.address.toLowerCase()))||i.push(e);for(const e of o)n.find((({address:t})=>t.toLowerCase()===e.address.toLowerCase()))||i.push(e);this.update((e=>{if(i.length>0)for(const t of i)e.internalAccounts.accounts=y(this,r,"m",g).call(this,e.internalAccounts.accounts,t.id);if(a.length>0)for(const t of a)e.internalAccounts.accounts=y(this,r,"m",p).call(this,e.internalAccounts.accounts,t);const t=Object.values(e.internalAccounts.accounts);if(!e.internalAccounts.accounts[this.state.internalAccounts.selectedAccount]){const n=y(this,r,"m",d).call(this,t);n?(e.internalAccounts.selectedAccount=n.id,e.internalAccounts.accounts[n.id].metadata.lastSelected=y(this,r,"m",h).call(this),y(this,r,"m",m).call(this,n)):e.internalAccounts.selectedAccount=""}}))}},l=function(e){const{snaps:t}=e,n=this.listMultichainAccounts().filter((e=>e.metadata.snap));this.update((e=>{n.forEach((n=>{const r=e.internalAccounts.accounts[n.id];if(r.metadata.snap){const e=r.metadata.snap.id,n=t[e];n&&(r.metadata.snap.enabled=n.enabled&&!n.blocked)}}))}))},c=function(e,t){return(t??this.listMultichainAccounts()).filter((t=>e===k.KeyringTypes.hd||e===k.KeyringTypes.simple?t.metadata.keyring.type===k.KeyringTypes.hd||t.metadata.keyring.type===k.KeyringTypes.simple:t.metadata.keyring.type===e))},d=function(e){const[t]=e.sort(((e,t)=>(t.metadata.lastSelected??0)-(e.metadata.lastSelected??0)));return t},u=function(e,t){return e.type.startsWith((0,S.parseCaipChainId)(t).namespace)},h=function(){return Date.now()},p=function(e,t){let n;if(t.type!==k.KeyringTypes.snap)n=y(this,r,"m",s).call(this,t.address,t.type);else{const[r]=this.messagingSystem.call("KeyringController:getKeyringsByType",v.SnapKeyring.type);if(n=r.getAccountByAddress(t.address),!n)return e}const o=0===Object.keys(e).length,a=this.getNextAvailableAccountName(n.metadata.keyring.type,Object.values(e)),i={...n,metadata:{...n.metadata,name:a,importTime:Date.now(),lastSelected:o?y(this,r,"m",h).call(this):0}};return e[n.id]=i,this.messagingSystem.publish("AccountsController:accountAdded",i),e},m=function(e){(0,b.isEvmAccountType)(e.type)&&this.messagingSystem.publish("AccountsController:selectedEvmAccountChange",e),this.messagingSystem.publish("AccountsController:selectedAccountChange",e)},g=function(e,t){return delete e[t],this.messagingSystem.publish("AccountsController:accountRemoved",t),e},f=function(e,t,n){const r=n??this.getAccount(e);return r?r.metadata[t]:undefined},C=function(){this.messagingSystem.registerActionHandler(`${T}:setSelectedAccount`,this.setSelectedAccount.bind(this)),this.messagingSystem.registerActionHandler(`${T}:listAccounts`,this.listAccounts.bind(this)),this.messagingSystem.registerActionHandler(`${T}:listMultichainAccounts`,this.listMultichainAccounts.bind(this)),this.messagingSystem.registerActionHandler(`${T}:setAccountName`,this.setAccountName.bind(this)),this.messagingSystem.registerActionHandler(`${T}:updateAccounts`,this.updateAccounts.bind(this)),this.messagingSystem.registerActionHandler(`${T}:getSelectedAccount`,this.getSelectedAccount.bind(this)),this.messagingSystem.registerActionHandler(`${T}:getSelectedMultichainAccount`,this.getSelectedMultichainAccount.bind(this)),this.messagingSystem.registerActionHandler(`${T}:getAccountByAddress`,this.getAccountByAddress.bind(this)),this.messagingSystem.registerActionHandler(`${T}:getNextAvailableAccountName`,this.getNextAvailableAccountName.bind(this)),this.messagingSystem.registerActionHandler("AccountsController:getAccount",this.getAccount.bind(this)),this.messagingSystem.registerActionHandler("AccountsController:updateAccountMetadata",this.updateAccountMetadata.bind(this))}}}},{package:"@metamask/accounts-controller",file:"node_modules/@metamask/accounts-controller/dist/AccountsController.cjs"}],[1347,{"./AccountsController.cjs":1346,"./utils.cjs":1348},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getUUIDFromAddressOfNormalAccount=n.keyringTypeToName=n.AccountsController=void 0;var r=e("./AccountsController.cjs");Object.defineProperty(n,"AccountsController",{enumerable:!0,get:function(){return r.AccountsController}});var s=e("./utils.cjs");Object.defineProperty(n,"keyringTypeToName",{enumerable:!0,get:function(){return s.keyringTypeToName}}),Object.defineProperty(n,"getUUIDFromAddressOfNormalAccount",{enumerable:!0,get:function(){return s.getUUIDFromAddressOfNormalAccount}})}}},{package:"@metamask/accounts-controller",file:"node_modules/@metamask/accounts-controller/dist/index.cjs"}],[1348,{"@ethereumjs/util":478,"@metamask/keyring-controller":1896,"ethereum-cryptography/sha256":3787,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNormalKeyringType=n.getUUIDFromAddressOfNormalAccount=n.getUUIDOptionsFromAddressOfNormalAccount=n.keyringTypeToName=void 0;const r=e("@ethereumjs/util"),s=e("@metamask/keyring-controller"),o=e("ethereum-cryptography/sha256"),a=e("uuid");function i(e){return{random:(0,o.sha256)((0,r.toBuffer)(e)).slice(0,16)}}n.keyringTypeToName=function(e){if((0,s.isCustodyKeyring)(e))return"Custody";switch(e){case s.KeyringTypes.simple:case s.KeyringTypes.hd:return"Account";case s.KeyringTypes.trezor:return"Trezor";case s.KeyringTypes.ledger:return"Ledger";case s.KeyringTypes.lattice:return"Lattice";case s.KeyringTypes.qr:return"QR";case s.KeyringTypes.snap:return"Snap Account";default:throw new Error(`Unknown keyring ${e}`)}},n.getUUIDOptionsFromAddressOfNormalAccount=i,n.getUUIDFromAddressOfNormalAccount=function(e){return(0,a.v4)(i(e))},n.isNormalKeyringType=function(e){return e!==s.KeyringTypes.snap}}}},{package:"@metamask/accounts-controller",file:"node_modules/@metamask/accounts-controller/dist/utils.cjs"}],[1349,{"@metamask/base-controller":1396,"@metamask/controller-utils":1422},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=e("@metamask/base-controller"),s=e("@metamask/controller-utils"),o=(e=>(e.externallyOwnedAccounts="EXTERNALLY_OWNED_ACCOUNTS",e.contractAccounts="CONTRACT_ACCOUNTS",e.nonAccounts="NON_ACCOUNTS",e))(o||{}),a="AddressBookController",i={addressBook:{persist:!0,anonymous:!1}},l=()=>({addressBook:{}}),c=class extends r.BaseController{constructor({messenger:e,state:t}){const n={addressBook:{},...t};super({messenger:e,metadata:i,name:a,state:n})}clear(){this.update((e=>{e.addressBook={}}))}delete(e,t){return t=s.toChecksumHexAddress.call(void 0,t),!!([e,t].every((e=>s.isSafeDynamicKey.call(void 0,e)))&&s.isValidHexAddress.call(void 0,t)&&this.state.addressBook[e]&&this.state.addressBook[e][t])&&(this.update((n=>{delete n.addressBook[e][t],0===Object.keys(n.addressBook[e]).length&&delete n.addressBook[e]})),!0)}set(e,t,n=s.toHex.call(void 0,1),r="",o){if(e=s.toChecksumHexAddress.call(void 0,e),!s.isValidHexAddress.call(void 0,e))return!1;const a={address:e,chainId:n,isEns:!1,memo:r,name:t,addressType:o},i=s.normalizeEnsName.call(void 0,t);return i&&(a.name=i,a.isEns=!0),this.update((t=>{t.addressBook={...this.state.addressBook,[n]:{...this.state.addressBook[n],[e]:a}}})),!0}},d=c;n.AddressType=o,n.controllerName=a,n.getDefaultAddressBookControllerState=l,n.AddressBookController=c,n.AddressBookController_default=d}}},{package:"@metamask/address-book-controller",file:"node_modules/@metamask/address-book-controller/dist/chunk-QIOW2RCR.js"}],[1350,{"./chunk-QIOW2RCR.js":1349},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=e("./chunk-QIOW2RCR.js");n.AddressBookController=r.AddressBookController,n.getDefaultAddressBookControllerState=r.getDefaultAddressBookControllerState}}},{package:"@metamask/address-book-controller",file:"node_modules/@metamask/address-book-controller/dist/index.js"}],[1351,{"@metamask/base-controller":1358},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r,s,o=(e,t,n)=>(((e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)})(e,t,"access private method"),n),a=e("@metamask/base-controller"),i={announcements:{}},l={announcements:{persist:!0,anonymous:!0}},c=class extends a.BaseController{constructor({messenger:e,state:t,allAnnouncements:n}){const a={...i,...t};super({messenger:e,metadata:l,name:"AnnouncementController",state:a}),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,r),o(this,r,s).call(this,n)}resetViewed(){this.update((({announcements:e})=>{for(const t of Object.values(e))t.isShown=!1}))}updateViewed(e){this.update((({announcements:t})=>{for(const n of Object.keys(e).map(Number))t[n].isShown=e[n]}))}};r=new WeakSet,s=function(e){this.update((t=>{Object.values(e).forEach((e=>{t.announcements[e.id]=t.announcements[e.id]??{...e,isShown:!1}}))}))},n.AnnouncementController=c}}},{package:"@metamask/announcement-controller",file:"node_modules/@metamask/announcement-controller/dist/chunk-ZGM3XNIO.js"}],[1352,{"./chunk-ZGM3XNIO.js":1351},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=e("./chunk-ZGM3XNIO.js");n.AnnouncementController=r.AnnouncementController}}},{package:"@metamask/announcement-controller",file:"node_modules/@metamask/announcement-controller/dist/index.js"}],[1353,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=class{constructor(e={},t={}){this.defaultConfig={},this.defaultState={},this.disabled=!1,this.name="BaseController",this.internalConfig=this.defaultConfig,this.internalState=this.defaultState,this.internalListeners=[],this.initialState=t,this.initialConfig=e}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}get config(){return this.internalConfig}get state(){return this.internalState}configure(e,t=!1,n=!0){if(n){this.internalConfig=t?e:Object.assign(this.internalConfig,e);for(const e of Object.keys(this.internalConfig)){const t=this.internalConfig[e];void 0!==t&&(this[e]=t)}}else for(const t of Object.keys(e))if(void 0!==this.internalConfig[t]){const n=e[t];this.internalConfig[t]=n,this[t]=n}}notify(){this.disabled||this.internalListeners.forEach((e=>{e(this.internalState)}))}subscribe(e){this.internalListeners.push(e)}unsubscribe(e){const t=this.internalListeners.findIndex((t=>e===t));return t>-1&&this.internalListeners.splice(t,1),t>-1}update(e,t=!1){this.internalState=t?Object.assign({},e):Object.assign({},this.internalState,e),this.notify()}},s=r;n.BaseControllerV1=r,n.BaseControllerV1_default=s}}},{package:"@metamask/announcement-controller>@metamask/base-controller",file:"node_modules/@metamask/announcement-controller/node_modules/@metamask/base-controller/dist/chunk-FTHCJ6HY.js"}],[1354,{"./chunk-UJFCPTF3.js":1356,"./chunk-Z4BLTVTB.js":1357},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r,s,o,a,i=e("./chunk-UJFCPTF3.js"),l=e("./chunk-Z4BLTVTB.js");r=new WeakMap,s=new WeakMap,o=new WeakMap,a=new WeakMap,n.ControllerMessenger=class{constructor(){l.__privateAdd.call(void 0,this,r,new Map),l.__privateAdd.call(void 0,this,s,new Map),l.__privateAdd.call(void 0,this,o,new Map),l.__privateAdd.call(void 0,this,a,new Map)}registerActionHandler(e,t){if(l.__privateGet.call(void 0,this,r).has(e))throw new Error(`A handler for ${e} has already been registered`);l.__privateGet.call(void 0,this,r).set(e,t)}unregisterActionHandler(e){l.__privateGet.call(void 0,this,r).delete(e)}clearActions(){l.__privateGet.call(void 0,this,r).clear()}call(e,...t){const n=l.__privateGet.call(void 0,this,r).get(e);if(!n)throw new Error(`A handler for ${e} has not been registered`);return n(...t)}registerInitialEventPayload({eventType:e,getPayload:t}){l.__privateGet.call(void 0,this,o).set(e,t)}publish(e,...t){const n=l.__privateGet.call(void 0,this,s).get(e);if(n)for(const[e,r]of n.entries())try{if(r){const n=l.__privateGet.call(void 0,this,a).get(e),s=r(...t);s!==n&&(l.__privateGet.call(void 0,this,a).set(e,s),e(s,n))}else e(...t)}catch(e){setTimeout((()=>{throw e}))}}subscribe(e,t,n){let r=l.__privateGet.call(void 0,this,s).get(e);if(r||(r=new Map,l.__privateGet.call(void 0,this,s).set(e,r)),r.set(t,n),n){const r=l.__privateGet.call(void 0,this,o).get(e);if(r){const e=n(...r());l.__privateGet.call(void 0,this,a).set(t,e)}}}unsubscribe(e,t){const n=l.__privateGet.call(void 0,this,s).get(e);if(!n||!n.has(t))throw new Error(`Subscription not found for event: ${e}`);n.get(t)&&l.__privateGet.call(void 0,this,a).delete(t),n.delete(t)}clearEventSubscriptions(e){l.__privateGet.call(void 0,this,s).delete(e)}clearSubscriptions(){l.__privateGet.call(void 0,this,s).clear()}getRestricted({name:e,allowedActions:t,allowedEvents:n}){return new(0,i.RestrictedControllerMessenger)({controllerMessenger:this,name:e,allowedActions:t,allowedEvents:n})}}}}},{package:"@metamask/announcement-controller>@metamask/base-controller",file:"node_modules/@metamask/announcement-controller/node_modules/@metamask/base-controller/dist/chunk-G42723LG.js"}],[1355,{"./chunk-Z4BLTVTB.js":1357,immer:4195},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r,s=e("./chunk-Z4BLTVTB.js"),o=e("immer");o.enablePatches.call(void 0);function a(e,t,n){return Object.keys(e).reduce(((r,s)=>{try{const o=t[s];if(!o)throw new Error(`No metadata found for '${String(s)}'`);const a=o[n],i=e[s];return"function"==typeof a?r[s]=a(i):a&&(r[s]=i),r}catch(e){return setTimeout((()=>{throw e})),r}}),{})}r=new WeakMap,n.BaseController=class{constructor({messenger:e,metadata:t,name:n,state:a}){s.__privateAdd.call(void 0,this,r,void 0),this.messagingSystem=e,this.name=n,s.__privateSet.call(void 0,this,r,o.freeze.call(void 0,a,!0)),this.metadata=t,this.messagingSystem.registerActionHandler(`${n}:getState`,(()=>this.state)),this.messagingSystem.registerInitialEventPayload({eventType:`${n}:stateChange`,getPayload:()=>[this.state,[]]})}get state(){return s.__privateGet.call(void 0,this,r)}set state(e){throw new Error("Controller state cannot be directly mutated; use 'update' method instead.")}update(e){const[t,n,a]=o.produceWithPatches.call(void 0,s.__privateGet.call(void 0,this,r),e);return s.__privateSet.call(void 0,this,r,t),this.messagingSystem.publish(`${this.name}:stateChange`,t,n),{nextState:t,patches:n,inversePatches:a}}applyPatches(e){const t=o.applyPatches.call(void 0,s.__privateGet.call(void 0,this,r),e);s.__privateSet.call(void 0,this,r,t),this.messagingSystem.publish(`${this.name}:stateChange`,t,e)}destroy(){this.messagingSystem.clearEventSubscriptions(`${this.name}:stateChange`)}},n.getAnonymizedState=function(e,t){return a(e,t,"anonymous")},n.getPersistentState=function(e,t){return a(e,t,"persist")}}}},{package:"@metamask/announcement-controller>@metamask/base-controller",file:"node_modules/@metamask/announcement-controller/node_modules/@metamask/base-controller/dist/chunk-IURK6TKD.js"}],[1356,{"./chunk-Z4BLTVTB.js":1357},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r,s,o,a,i,l,c,d,u,h,p=e("./chunk-Z4BLTVTB.js");r=new WeakMap,s=new WeakMap,o=new WeakMap,a=new WeakMap,i=new WeakSet,l=function(e){const t=p.__privateGet.call(void 0,this,a);return p.__privateMethod.call(void 0,this,u,h).call(this,e)||null!==t&&t.includes(e)},c=new WeakSet,d=function(e){const t=p.__privateGet.call(void 0,this,o);return p.__privateMethod.call(void 0,this,u,h).call(this,e)||null!==t&&t.includes(e)},u=new WeakSet,h=function(e){return e.startsWith(`${p.__privateGet.call(void 0,this,s)}:`)},n.RestrictedControllerMessenger=class{constructor({controllerMessenger:e,name:t,allowedActions:n,allowedEvents:l}){p.__privateAdd.call(void 0,this,i),p.__privateAdd.call(void 0,this,c),p.__privateAdd.call(void 0,this,u),p.__privateAdd.call(void 0,this,r,void 0),p.__privateAdd.call(void 0,this,s,void 0),p.__privateAdd.call(void 0,this,o,void 0),p.__privateAdd.call(void 0,this,a,void 0),p.__privateSet.call(void 0,this,r,e),p.__privateSet.call(void 0,this,s,t),p.__privateSet.call(void 0,this,o,n),p.__privateSet.call(void 0,this,a,l)}registerActionHandler(e,t){if(!p.__privateMethod.call(void 0,this,u,h).call(this,e))throw new Error(`Only allowed registering action handlers prefixed by '${p.__privateGet.call(void 0,this,s)}:'`);p.__privateGet.call(void 0,this,r).registerActionHandler(e,t)}unregisterActionHandler(e){if(!p.__privateMethod.call(void 0,this,u,h).call(this,e))throw new Error(`Only allowed unregistering action handlers prefixed by '${p.__privateGet.call(void 0,this,s)}:'`);p.__privateGet.call(void 0,this,r).unregisterActionHandler(e)}call(e,...t){if(!p.__privateMethod.call(void 0,this,c,d).call(this,e))throw new Error(`Action missing from allow list: ${e}`);return p.__privateGet.call(void 0,this,r).call(e,...t)}registerInitialEventPayload({eventType:e,getPayload:t}){if(!p.__privateMethod.call(void 0,this,u,h).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${p.__privateGet.call(void 0,this,s)}:'`);p.__privateGet.call(void 0,this,r).registerInitialEventPayload({eventType:e,getPayload:t})}publish(e,...t){if(!p.__privateMethod.call(void 0,this,u,h).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${p.__privateGet.call(void 0,this,s)}:'`);p.__privateGet.call(void 0,this,r).publish(e,...t)}subscribe(e,t,n){if(!p.__privateMethod.call(void 0,this,i,l).call(this,e))throw new Error(`Event missing from allow list: ${e}`);return n?p.__privateGet.call(void 0,this,r).subscribe(e,t,n):p.__privateGet.call(void 0,this,r).subscribe(e,t)}unsubscribe(e,t){if(!p.__privateMethod.call(void 0,this,i,l).call(this,e))throw new Error(`Event missing from allow list: ${e}`);p.__privateGet.call(void 0,this,r).unsubscribe(e,t)}clearEventSubscriptions(e){if(!p.__privateMethod.call(void 0,this,u,h).call(this,e))throw new Error(`Only allowed clearing events prefixed by '${p.__privateGet.call(void 0,this,s)}:'`);p.__privateGet.call(void 0,this,r).clearEventSubscriptions(e)}}}}},{package:"@metamask/announcement-controller>@metamask/base-controller",file:"node_modules/@metamask/announcement-controller/node_modules/@metamask/base-controller/dist/chunk-UJFCPTF3.js"}],[1357,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};n.__privateGet=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e)),n.__privateAdd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},n.__privateSet=(e,t,n,s)=>(r(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),n.__privateMethod=(e,t,n)=>(r(e,t,"access private method"),n)}}},{package:"@metamask/announcement-controller>@metamask/base-controller",file:"node_modules/@metamask/announcement-controller/node_modules/@metamask/base-controller/dist/chunk-Z4BLTVTB.js"}],[1358,{"./chunk-FTHCJ6HY.js":1353,"./chunk-G42723LG.js":1354,"./chunk-IURK6TKD.js":1355,"./chunk-UJFCPTF3.js":1356,"./chunk-Z4BLTVTB.js":1357},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=e("./chunk-FTHCJ6HY.js"),s=e("./chunk-IURK6TKD.js"),o=e("./chunk-G42723LG.js"),a=e("./chunk-UJFCPTF3.js");e("./chunk-Z4BLTVTB.js"),n.BaseController=s.BaseController,n.BaseControllerV1=r.BaseControllerV1,n.ControllerMessenger=o.ControllerMessenger,n.RestrictedControllerMessenger=a.RestrictedControllerMessenger,n.getAnonymizedState=s.getAnonymizedState,n.getPersistentState=s.getPersistentState}}},{package:"@metamask/announcement-controller>@metamask/base-controller",file:"node_modules/@metamask/announcement-controller/node_modules/@metamask/base-controller/dist/index.js"}],[136,{"../../shared/constants/app":5248,"../../shared/constants/hardware-wallets":5256,"../../shared/constants/keyring":5257,"../../shared/constants/logs":5259,"../../shared/constants/metametrics":5260,"../../shared/constants/methods-tags":5261,"../../shared/constants/network":5264,"../../shared/constants/permissions":5268,"../../shared/constants/smartTransactions":5272,"../../shared/constants/swaps":5274,"../../shared/constants/time":5276,"../../shared/constants/tokens":5277,"../../shared/constants/transaction":5278,"../../shared/constants/urls":5279,"../../shared/lib/fetch-with-cache":5283,"../../shared/lib/metamask-controller-utils":5285,"../../shared/lib/storage-helpers":5287,"../../shared/lib/token-util":5290,"../../shared/lib/trace":5291,"../../shared/lib/transactions-controller-utils":5292,"../../shared/modules/caip-stream":5299,"../../shared/modules/mv3.utils":5310,"../../shared/modules/network.utils":5311,"../../shared/modules/selectors":5319,"../../shared/modules/selectors/networks":5320,"../../shared/modules/string-utils":5324,"../../shared/modules/transaction.utils":5326,"../../shared/notifications":5328,"../../shared/types/bridge-status":5329,"../../ui/helpers/utils/snaps":6292,"./constants/stream":8,"./controllers/account-order":9,"./controllers/account-tracker-controller":10,"./controllers/alert-controller":11,"./controllers/app-metadata":12,"./controllers/app-state-controller":13,"./controllers/bridge-status/bridge-status-controller":14,"./controllers/bridge-status/constants":15,"./controllers/bridge/bridge-controller":18,"./controllers/bridge/constants":19,"./controllers/bridge/types":20,"./controllers/decrypt-message":21,"./controllers/encryption-public-key":22,"./controllers/metametrics-controller":23,"./controllers/metametrics-data-deletion/metametrics-data-deletion":24,"./controllers/network-order":25,"./controllers/onboarding":26,"./controllers/permissions":30,"./controllers/preferences-controller":33,"./controllers/push-notifications":36,"./controllers/swaps":37,"./detect-multiple-instances":40,"./lib/AccountIdentitiesPetnamesBridge":51,"./lib/AddressBookPetnamesBridge":52,"./lib/ComposableObservableStore":53,"./lib/PatchStore":54,"./lib/SnapsNameProvider":55,"./lib/WeakRefObjectMap":56,"./lib/accounts/BalancesController":57,"./lib/backup":60,"./lib/createDupeReqFilterStream":61,"./lib/createEvmMethodsToNonEvmAccountReqFilterMiddleware":62,"./lib/createLoggerMiddleware":63,"./lib/createMainFrameOriginMiddleware":64,"./lib/createMetaRPCHandler":65,"./lib/createMetamaskMiddleware":66,"./lib/createOnboardingMiddleware":67,"./lib/createOriginMiddleware":68,"./lib/createRPCMethodTrackingMiddleware":69,"./lib/createTabIdMiddleware":71,"./lib/createTracingMiddleware":72,"./lib/encryptor-factory":73,"./lib/hardware-keyring-builder-factory":81,"./lib/multichain/address":87,"./lib/offscreen-bridge/lattice-offscreen-keyring":90,"./lib/offscreen-bridge/ledger-offscreen-bridge":91,"./lib/offscreen-bridge/trezor-offscreen-bridge":92,"./lib/ppom/indexed-db-backend":93,"./lib/ppom/ppom":96,"./lib/ppom/ppom-middleware":94,"./lib/ppom/ppom-util":95,"./lib/rpc-method-middleware":110,"./lib/segment":112,"./lib/signature/util":116,"./lib/snap-keyring":117,"./lib/snap-keyring/keyring-snaps-permissions":118,"./lib/state-utils":123,"./lib/stream-utils":124,"./lib/transaction/decode/util":130,"./lib/transaction/metrics":131,"./lib/transaction/smart-transactions":132,"./lib/transaction/util":133,"./lib/tx-verification/tx-verification-middleware":134,"./lib/util":135,"./services/data-deletion-service":292,"./snaps/preinstalled-snaps":293,"./translate":294,"@ethersproject/abi":500,"@keystonehq/metamask-airgapped-keyring":668,"@metamask/accounts-controller":1347,"@metamask/address-book-controller":1350,"@metamask/announcement-controller":1352,"@metamask/approval-controller":1361,"@metamask/assets-controllers":1381,"@metamask/base-controller":1396,"@metamask/controller-utils":1422,"@metamask/ens-controller":1450,"@metamask/eth-json-rpc-filters":1526,"@metamask/eth-json-rpc-filters/subscriptionManager":1528,"@metamask/eth-json-rpc-middleware":1598,"@metamask/eth-ledger-bridge-keyring":1633,"@metamask/eth-query":1640,"@metamask/eth-trezor-keyring":1745,"@metamask/ethjs-query":1762,"@metamask/gas-fee-controller":1771,"@metamask/json-rpc-engine":1780,"@metamask/json-rpc-middleware-stream":1784,"@metamask/keyring-api":1843,"@metamask/keyring-controller":1896,"@metamask/logging-controller":1929,"@metamask/metamask-eth-abis":1944,"@metamask/name-controller":1955,"@metamask/network-controller":1990,"@metamask/notification-services-controller":2115,"@metamask/obs-store":2126,"@metamask/obs-store/dist/asStream":2125,"@metamask/permission-controller":2133,"@metamask/permission-log-controller":2142,"@metamask/phishing-controller":2166,"@metamask/ppom-validator":2201,"@metamask/profile-sync-controller":2225,"@metamask/queued-request-controller":2245,"@metamask/rate-limit-controller":2247,"@metamask/rpc-errors":2304,"@metamask/scure-bip39/dist/wordlists/english":2308,"@metamask/selected-network-controller":2320,"@metamask/signature-controller":2322,"@metamask/smart-transactions-controller":2357,"@metamask/smart-transactions-controller/dist/types":2358,"@metamask/snaps-controllers":2418,"@metamask/snaps-rpc-methods":2479,"@metamask/snaps-utils":2647,"@metamask/transaction-controller":2698,"@metamask/user-operation-controller":2722,"@sentry/browser":2871,"await-semaphore":3454,buffer:3561,"eth-chainlist":3751,"eth-lattice-keyring":3756,events:3868,lodash:4380,loglevel:4386,nanoid:4473,"readable-stream":4791},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ONE_KEY_VIA_TREZOR_MINOR_VERSION=n.METAMASK_CONTROLLER_EVENTS=void 0;var r=Jt(e("events")),s=e("readable-stream"),o=e("@metamask/assets-controllers"),a=e("@metamask/json-rpc-engine"),i=e("@metamask/json-rpc-middleware-stream"),l=e("@metamask/obs-store"),c=e("@metamask/obs-store/dist/asStream"),d=e("@metamask/eth-json-rpc-middleware"),u=e("lodash"),h=e("@metamask/keyring-controller"),p=Jt(e("@metamask/eth-json-rpc-filters")),m=Jt(e("@metamask/eth-json-rpc-filters/subscriptionManager")),g=e("@metamask/rpc-errors"),f=e("await-semaphore"),C=Jt(e("loglevel")),y=e("@metamask/eth-trezor-keyring"),w=e("@metamask/eth-ledger-bridge-keyring"),v=Jt(e("eth-lattice-keyring")),b=e("eth-chainlist"),k=e("@keystonehq/metamask-airgapped-keyring"),S=Jt(e("@metamask/eth-query")),A=Jt(e("@metamask/ethjs-query")),T=e("nanoid"),E=e("@sentry/browser"),M=e("@metamask/address-book-controller"),P=e("@metamask/approval-controller"),_=e("@metamask/base-controller"),I=e("@metamask/ens-controller"),N=e("@metamask/phishing-controller"),R=e("@metamask/announcement-controller"),O=e("@metamask/network-controller"),x=e("@metamask/gas-fee-controller"),B=e("@metamask/permission-controller"),j=Jt(e("@metamask/smart-transactions-controller")),D=e("@metamask/smart-transactions-controller/dist/types"),U=e("@metamask/selected-network-controller"),F=e("@metamask/logging-controller"),L=e("@metamask/permission-log-controller"),$=e("@metamask/rate-limit-controller"),H=e("@metamask/snaps-controllers"),q=e("@metamask/snaps-rpc-methods"),G=e("@metamask/controller-utils"),K=e("@metamask/accounts-controller"),V=e("@metamask/signature-controller"),W=e("@metamask/ppom-validator"),z=e("@metamask/scure-bip39/dist/wordlists/english"),J=e("@metamask/name-controller"),Y=e("@metamask/queued-request-controller"),Q=e("@metamask/user-operation-controller"),X=e("@metamask/transaction-controller"),Z=e("@metamask/snaps-utils"),ee=e("@ethersproject/abi"),te=e("@metamask/metamask-eth-abis"),ne=e("@metamask/keyring-api"),re=e("@metamask/profile-sync-controller"),se=e("@metamask/notification-services-controller"),oe=e("../../shared/constants/methods-tags"),ae=e("../../shared/constants/transaction"),ie=e("../../shared/constants/swaps"),le=e("../../shared/constants/network"),ce=e("../../shared/constants/smartTransactions"),de=e("../../shared/constants/hardware-wallets"),ue=e("../../shared/constants/keyring"),he=e("../../shared/constants/permissions"),pe=e("../../shared/notifications"),me=e("../../shared/constants/time"),ge=e("../../shared/constants/app"),fe=e("../../shared/constants/metametrics"),Ce=e("../../shared/constants/logs"),ye=e("../../shared/lib/storage-helpers"),we=e("../../shared/lib/token-util"),ve=e("../../shared/modules/string-utils"),be=e("../../shared/modules/transaction.utils"),ke=e("../../shared/constants/tokens"),Se=e("../../shared/lib/metamask-controller-utils"),Ae=e("../../shared/modules/mv3.utils"),Te=e("../../shared/modules/network.utils"),Ee=e("../../shared/modules/selectors"),Me=e("../../shared/modules/caip-stream"),Pe=e("../../shared/constants/urls"),_e=e("../../shared/lib/transactions-controller-utils"),Ie=e("../../shared/modules/selectors/networks"),Ne=e("../../shared/lib/trace"),Re=e("../../ui/helpers/utils/snaps"),Oe=e("../../shared/types/bridge-status"),xe=Jt(e("../../shared/lib/fetch-with-cache")),Be=e("./lib/accounts/BalancesController"),je=e("./lib/transaction/metrics"),De=e("./lib/transaction/smart-transactions"),Ue=e("./lib/snap-keyring/keyring-snaps-permissions"),Fe=e("./lib/SnapsNameProvider"),Le=e("./lib/AddressBookPetnamesBridge"),$e=e("./lib/AccountIdentitiesPetnamesBridge"),He=e("./lib/ppom/ppom-middleware"),qe=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=zt(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(e("./lib/ppom/ppom")),Ge=e("./detect-multiple-instances"),Ke=Jt(e("./lib/ComposableObservableStore")),Ve=Jt(e("./controllers/account-tracker-controller")),We=Jt(e("./lib/createDupeReqFilterStream")),ze=Jt(e("./lib/createLoggerMiddleware")),Je=e("./lib/rpc-method-middleware"),Ye=Jt(e("./lib/createOriginMiddleware")),Qe=Jt(e("./lib/createMainFrameOriginMiddleware")),Xe=Jt(e("./lib/createTabIdMiddleware")),Ze=e("./controllers/network-order"),et=e("./controllers/account-order"),tt=Jt(e("./lib/createOnboardingMiddleware")),nt=e("./lib/stream-utils"),rt=e("./controllers/preferences-controller"),st=e("./controllers/app-state-controller"),ot=e("./controllers/alert-controller"),at=Jt(e("./controllers/onboarding")),it=Jt(e("./lib/backup")),lt=Jt(e("./controllers/decrypt-message")),ct=Jt(e("./controllers/swaps")),dt=Jt(e("./controllers/metametrics-controller")),ut=e("./lib/segment"),ht=Jt(e("./lib/createMetaRPCHandler")),pt=e("./lib/util"),mt=Jt(e("./lib/createMetamaskMiddleware")),gt=e("./lib/hardware-keyring-builder-factory"),ft=Jt(e("./controllers/encryption-public-key")),Ct=Jt(e("./controllers/app-metadata")),yt=e("./controllers/permissions"),wt=e("./controllers/metametrics-data-deletion/metametrics-data-deletion"),vt=e("./services/data-deletion-service"),bt=Jt(e("./lib/createRPCMethodTrackingMiddleware")),kt=e("./lib/ppom/indexed-db-backend"),St=e("./translate"),At=e("./lib/offscreen-bridge/trezor-offscreen-bridge"),Tt=e("./lib/offscreen-bridge/ledger-offscreen-bridge"),Et=e("./lib/snap-keyring"),Mt=e("./lib/encryptor-factory"),Pt=e("./lib/transaction/util"),_t=e("./lib/signature/util"),It=e("./lib/offscreen-bridge/lattice-offscreen-keyring"),Nt=Jt(e("./snaps/preinstalled-snaps")),Rt=e("./lib/WeakRefObjectMap"),Ot=e("./constants/stream"),xt=e("./lib/tx-verification/tx-verification-middleware"),Bt=e("./lib/ppom/ppom-util"),jt=Jt(e("./lib/createEvmMethodsToNonEvmAccountReqFilterMiddleware")),Dt=e("./lib/multichain/address"),Ut=e("./lib/transaction/decode/util"),Ft=e("./controllers/bridge/types"),Lt=Jt(e("./controllers/bridge/bridge-controller")),$t=e("./controllers/bridge/constants"),Ht=e("./controllers/push-notifications"),qt=Jt(e("./lib/createTracingMiddleware")),Gt=e("./lib/PatchStore"),Kt=e("./lib/state-utils"),Vt=Jt(e("./controllers/bridge-status/bridge-status-controller")),Wt=e("./controllers/bridge-status/constants");function zt(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(zt=function(e){return e?n:t})(e)}function Jt(e){return e&&e.__esModule?e:{default:e}}function Yt(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function Qt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;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:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xt(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const{TRIGGER_TYPES:Zt}=se.NotificationServicesController.Constants,en=(n.METAMASK_CONTROLLER_EVENTS={UPDATE_BADGE:"updateBadge",APPROVAL_STATE_CHANGE:"ApprovalController:stateChange",QUEUED_REQUEST_STATE_CHANGE:"QueuedRequestController:stateChange",METAMASK_NOTIFICATIONS_LIST_UPDATED:"NotificationServicesController:notificationsListUpdated",METAMASK_NOTIFICATIONS_MARK_AS_READ:"NotificationServicesController:markNotificationsAsRead"},n.ONE_KEY_VIA_TREZOR_MINOR_VERSION=99);var tn=new WeakSet;class nn extends r.default{constructor(e){var t;super(),Yt(this,tn),Qt(this,"_trackSnapExportUsage",(0,u.wrap)((0,u.memoize)((()=>(0,u.throttle)(((e,t,n,r)=>{var s;return this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.SnapExportUsed,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:e,export:t,snap_category:null===(s=this._getSnapMetadata(e))||void 0===s?void 0:s.category,success:n,origin:r}})}),60*me.SECOND)),((e,t,n,r)=>`${e}${t}${r}`)),((e,...t)=>e(...t)(...t)))),Qt(this,"handleWatchAssetRequest",(({asset:e,type:t,origin:n,networkClientId:r})=>{switch(t){case G.ERC20:return this.tokensController.watchAsset({asset:e,type:t,networkClientId:r});case G.ERC721:case G.ERC1155:return this.nftController.watchNft(e,t,n);default:throw new Error(`Asset type ${t} not supported`)}})),Qt(this,"removePermissionsFor",(e=>{try{this.permissionController.revokePermissions(e)}catch(e){if(!(e instanceof B.PermissionsRequestNotFoundError))throw e}})),Qt(this,"updateCaveat",((e,t,n,r)=>{try{this.controllerMessenger.call("PermissionController:updateCaveat",e,t,n,r)}catch(e){if(!(e instanceof B.PermissionsRequestNotFoundError))throw e}})),Qt(this,"updateNetworksList",(e=>{try{this.networkOrderController.updateNetworksList(e)}catch(e){throw C.default.error(e.message),e}})),Qt(this,"updateAccountsList",(e=>{try{this.accountOrderController.updateAccountsList(e)}catch(e){throw C.default.error(e.message),e}})),Qt(this,"updateHiddenAccountsList",(e=>{try{this.accountOrderController.updateHiddenAccountsList(e)}catch(e){throw C.default.error(e.message),e}})),Qt(this,"rejectPermissionsRequest",(e=>{try{this.permissionController.rejectPermissionsRequest(e)}catch(e){if(!(e instanceof B.PermissionsRequestNotFoundError))throw e}})),Qt(this,"acceptPermissionsRequest",(e=>{try{this.permissionController.acceptPermissionsRequest(e)}catch(e){if(!(e instanceof B.PermissionsRequestNotFoundError))throw e}})),Qt(this,"resolvePendingApproval",(async(e,t,n)=>{try{await this.approvalController.accept(e,t,n)}catch(e){if(!(e instanceof P.ApprovalRequestNotFoundError))throw e}})),Qt(this,"rejectPendingApproval",((e,t)=>{try{this.approvalController.reject(e,new g.JsonRpcError(t.code,t.message,t.data))}catch(e){if(!(e instanceof P.ApprovalRequestNotFoundError))throw e}}));const{isFirstMetaMaskControllerSetup:n}=e;this.defaultMaxListeners=20,this.sendUpdate=(0,u.debounce)(this.privateSendUpdate.bind(this),200*me.MILLISECOND),this.opts=e,this.extension=e.browser,this.platform=e.platform,this.notificationManager=e.notificationManager;const r=e.initState||{},s="12.9.3";this.recordFirstTimeInfo(r),this.featureFlags=e.featureFlags,this.activeControllerConnections=0,this.offscreenPromise=e.offscreenPromise??Promise.resolve(),this.getRequestAccountTabIds=e.getRequestAccountTabIds,this.getOpenMetamaskTabsIds=e.getOpenMetamaskTabsIds,this.initializeChainlist(),this.controllerMessenger=new _.ControllerMessenger,this.loggingController=new F.LoggingController({messenger:this.controllerMessenger.getRestricted({name:"LoggingController",allowedActions:[],allowedEvents:[]}),state:r.LoggingController}),this.localStoreApiWrapper=e.localStore,this.currentMigrationVersion=e.currentMigrationVersion,this.store=new Ke.default({state:r,controllerMessenger:this.controllerMessenger,persist:!0}),this.connections={},this.createVaultMutex=new f.Mutex,this.extension.runtime.onInstalled.addListener((e=>{"update"===e.reason&&this.loggingController.add({type:F.LogType.GenericLog,data:{event:Ce.LOG_EVENT.VERSION_UPDATE,previousVersion:e.previousVersion,version:s}})})),this.appMetadataController=new Ct.default({state:r.AppMetadataController,messenger:this.controllerMessenger.getRestricted({name:"AppMetadataController",allowedActions:[],allowedEvents:[]}),currentMigrationVersion:this.currentMigrationVersion,currentAppVersion:s});const a=()=>{this.encryptionPublicKeyController.clearUnapproved(),this.decryptMessageController.clearUnapproved(),this.signatureController.clearUnapproved(),this.approvalController.clear(g.providerErrors.userRejectedRequest())};this.approvalController=new P.ApprovalController({messenger:this.controllerMessenger.getRestricted({name:"ApprovalController"}),showApprovalRequest:e.showUserConfirmation,typesExcludedFromRateLimiting:[G.ApprovalType.PersonalSign,G.ApprovalType.EthSignTypedData,G.ApprovalType.Transaction,G.ApprovalType.WatchAsset,G.ApprovalType.EthGetEncryptionPublicKey,G.ApprovalType.EthDecrypt]}),this.queuedRequestController=new Y.QueuedRequestController({messenger:this.controllerMessenger.getRestricted({name:"QueuedRequestController",allowedActions:["NetworkController:getState","NetworkController:setActiveNetwork","SelectedNetworkController:getNetworkClientIdForDomain"],allowedEvents:["SelectedNetworkController:stateChange"]}),shouldRequestSwitchNetwork:({method:e})=>oe.methodsRequiringNetworkSwitch.includes(e),canRequestSwitchNetworkWithoutApproval:({method:e})=>oe.methodsThatCanSwitchNetworkWithoutApproval.includes(e),clearPendingConfirmations:a,showApprovalRequest:()=>{this.approvalController.getTotalApprovalCount()>0&&e.showUserConfirmation()}});const i=this.controllerMessenger.getRestricted({name:"NetworkController"});let l=r.NetworkController;if(!l){l=(0,O.getDefaultNetworkControllerState)();const e=l.networkConfigurationsByChainId;let t;e[le.CHAIN_IDS.MAINNET].name=le.MAINNET_DISPLAY_NAME,delete e[le.CHAIN_IDS.GOERLI],delete e[le.CHAIN_IDS.LINEA_GOERLI],Object.values(e).forEach((e=>{const t=e.rpcEndpoints[0].networkClientId;e.blockExplorerUrls=[G.BlockExplorerUrl[t]],e.defaultBlockExplorerUrlIndex=0})),t=e[le.CHAIN_IDS.MAINNET],l.selectedNetworkClientId=t.rpcEndpoints[t.defaultRpcEndpointIndex].networkClientId}this.networkController=new O.NetworkController({messenger:i,state:l,infuraProjectId:e.infuraProjectId}),this.networkController.initializeProvider(),this.provider=this.networkController.getProviderAndBlockTracker().provider,this.blockTracker=this.networkController.getProviderAndBlockTracker().blockTracker,this.deprecatedNetworkVersions={};const c=this.controllerMessenger.getRestricted({name:"AccountsController",allowedEvents:["SnapController:stateChange","KeyringController:accountRemoved","KeyringController:stateChange"],allowedActions:["KeyringController:getAccounts","KeyringController:getKeyringsByType","KeyringController:getKeyringForAccount"]});this.accountsController=new K.AccountsController({messenger:c,state:r.AccountsController});const d=this.controllerMessenger.getRestricted({name:"PreferencesController",allowedActions:["AccountsController:setSelectedAccount","AccountsController:getSelectedAccount","AccountsController:getAccountByAddress","AccountsController:setAccountName","NetworkController:getState"],allowedEvents:["AccountsController:stateChange"]});this.preferencesController=new rt.PreferencesController({state:{currentLocale:e.initLangCode??"",...r.PreferencesController},messenger:d});const p=this.controllerMessenger.getRestricted({name:"TokenListController",allowedActions:["NetworkController:getNetworkClientById"],allowedEvents:["NetworkController:stateChange"]});this.tokenListController=new o.TokenListController({chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state}),preventPollingOnNetworkRestart:!Xt(tn,this,sn).call(this,this.preferencesController.state),messenger:p,state:r.TokenListController});const m=this.controllerMessenger.getRestricted({name:"AssetsContractController",allowedActions:["NetworkController:getNetworkClientById","NetworkController:getNetworkConfigurationByNetworkClientId","NetworkController:getSelectedNetworkClient","NetworkController:getState"],allowedEvents:["PreferencesController:stateChange","NetworkController:networkDidChange"]});this.assetsContractController=new o.AssetsContractController({messenger:m,chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state})});const b=this.controllerMessenger.getRestricted({name:"TokensController",allowedActions:["ApprovalController:addRequest","NetworkController:getNetworkClientById","AccountsController:getSelectedAccount","AccountsController:getAccount"],allowedEvents:["NetworkController:networkDidChange","AccountsController:selectedEvmAccountChange","PreferencesController:stateChange","TokenListController:stateChange","NetworkController:stateChange"]});this.tokensController=new o.TokensController({state:r.TokensController,provider:this.provider,messenger:b,chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state})});const S=this.controllerMessenger.getRestricted({name:"NftController",allowedEvents:["PreferencesController:stateChange","NetworkController:networkDidChange","AccountsController:selectedEvmAccountChange"],allowedActions:[`${this.approvalController.name}:addRequest`,`${this.networkController.name}:getNetworkClientById`,"AccountsController:getSelectedAccount","AccountsController:getAccount","AssetsContractController:getERC721AssetName","AssetsContractController:getERC721AssetSymbol","AssetsContractController:getERC721TokenURI","AssetsContractController:getERC721OwnerOf","AssetsContractController:getERC1155BalanceOf","AssetsContractController:getERC1155TokenURI"]});this.nftController=new o.NftController({state:r.NftController,messenger:S,chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state}),onNftAdded:({address:e,symbol:t,tokenId:n,standard:r,source:s})=>this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.NftAdded,category:fe.MetaMetricsEventCategory.Wallet,sensitiveProperties:{token_contract_address:e,token_symbol:t,token_id:n,token_standard:r,asset_type:ae.AssetType.NFT,source:s}})}),this.nftController.setApiKey(null);const A=this.controllerMessenger.getRestricted({name:"NftDetectionController",allowedEvents:["NetworkController:stateChange","PreferencesController:stateChange"],allowedActions:["ApprovalController:addRequest","NetworkController:getState","NetworkController:getNetworkClientById","AccountsController:getSelectedAccount"]});this.nftDetectionController=new o.NftDetectionController({messenger:A,chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state}),getOpenSeaApiKey:()=>this.nftController.openSeaApiKey,getBalancesInSingleCall:this.assetsContractController.getBalancesInSingleCall.bind(this.assetsContractController),addNft:this.nftController.addNft.bind(this.nftController),getNftState:()=>this.nftController.state,disabled:!this.preferencesController.state.useNftDetection});const T=this.controllerMessenger.getRestricted({name:"MetaMetricsController",allowedActions:["PreferencesController:getState","NetworkController:getState","NetworkController:getNetworkClientById"],allowedEvents:["PreferencesController:stateChange","NetworkController:networkDidChange"]});this.metaMetricsController=new dt.default({state:r.MetaMetricsController,messenger:T,segment:ut.segment,version:"12.9.3",environment:"other",extension:this.extension,captureException:E.captureException}),this.on("update",(e=>{this.metaMetricsController.handleMetaMaskStateUpdate(e)}));const q=new vt.DataDeletionService,z=this.controllerMessenger.getRestricted({name:"MetaMetricsDataDeletionController",allowedActions:["MetaMetricsController:getState"],allowedEvents:[]});this.metaMetricsDataDeletionController=new wt.MetaMetricsDataDeletionController({dataDeletionService:q,messenger:z,state:r.metaMetricsDataDeletionController});const ee=this.controllerMessenger.getRestricted({name:"GasFeeController",allowedActions:["NetworkController:getEIP1559Compatibility","NetworkController:getNetworkClientById","NetworkController:getState"],allowedEvents:["NetworkController:stateChange"]}),te=ie.GAS_API_BASE_URL;this.gasFeeController=new x.GasFeeController({state:r.GasFeeController,interval:1e4,messenger:ee,clientId:ie.SWAPS_CLIENT_ID,getProvider:()=>this.networkController.getProviderAndBlockTracker().provider,onNetworkDidChange:e=>{i.subscribe("NetworkController:networkDidChange",(()=>e(this.networkController.state)))},getCurrentNetworkEIP1559Compatibility:this.networkController.getEIP1559Compatibility.bind(this.networkController),getCurrentAccountEIP1559Compatibility:this.getCurrentAccountEIP1559Compatibility.bind(this),legacyAPIEndpoint:`${te}/networks//gasPrices`,EIP1559APIEndpoint:`${te}/networks//suggestedGasFees`,getCurrentNetworkLegacyGasAPICompatibility:()=>(0,Ie.getCurrentChainId)({metamask:this.networkController.state})===le.CHAIN_IDS.BSC,getChainId:()=>(0,Ie.getCurrentChainId)({metamask:this.networkController.state})}),this.appStateController=new st.AppStateController({addUnlockListener:this.on.bind(this,"unlock"),isUnlocked:this.isUnlocked.bind(this),initState:r.AppStateController,onInactiveTimeout:()=>this.setLocked(),messenger:this.controllerMessenger.getRestricted({name:"AppStateController",allowedActions:[`${this.approvalController.name}:addRequest`,`${this.approvalController.name}:acceptRequest`,"PreferencesController:getState"],allowedEvents:["KeyringController:qrKeyringStateChange","PreferencesController:stateChange"]}),extension:this.extension});const ne=this.controllerMessenger.getRestricted({name:"CurrencyRateController",allowedActions:[`${this.networkController.name}:getNetworkClientById`]});this.currencyRateController=new o.CurrencyRateController({includeUsdRate:!0,messenger:ne,state:r.CurrencyController});const de=this.currencyRateController.fetchMultiExchangeRate.bind(this.currencyRateController);this.currencyRateController.fetchMultiExchangeRate=(...e)=>this.preferencesController.state.useCurrencyRateCheck?de(...e):{conversionRate:null,usdConversionRate:null};const ue=this.controllerMessenger.getRestricted({name:"TokenBalancesController",allowedActions:["NetworkController:getState","NetworkController:getNetworkClientById","TokensController:getState","PreferencesController:getState","AccountsController:getSelectedAccount"],allowedEvents:["PreferencesController:stateChange","TokensController:stateChange","NetworkController:stateChange"]});this.tokenBalancesController=new o.TokenBalancesController({messenger:ue,state:r.TokenBalancesController,interval:3e4});const ye=this.controllerMessenger.getRestricted({name:"PhishingController"});this.phishingController=new N.PhishingController({messenger:ye,state:r.PhishingController,hotlistRefreshInterval:undefined,stalelistRefreshInterval:undefined}),this.ppomController=new W.PPOMController({messenger:this.controllerMessenger.getRestricted({name:"PPOMController",allowedEvents:["NetworkController:stateChange","NetworkController:networkDidChange"],allowedActions:["NetworkController:getNetworkClientById"]}),storageBackend:new kt.IndexedDBPPOMStorage("PPOMDB",1),provider:this.provider,ppomProvider:{PPOM:qe.PPOM,ppomInit:()=>qe.default("./ppom_bg.wasm")},state:r.PPOMController,chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state}),securityAlertsEnabled:this.preferencesController.state.securityAlertsEnabled,onPreferencesChange:d.subscribe.bind(d,"PreferencesController:stateChange"),cdnBaseUrl:"static.cx.metamask.io/api/v1/confirmations/ppom",blockaidPublicKey:"066ad3e8af5583385e312c156d238055215d5f25247c1e91055afa756cb98a88"});const we=this.controllerMessenger.getRestricted({name:"AnnouncementController"});this.announcementController=new R.AnnouncementController({messenger:we,allAnnouncements:pe.UI_NOTIFICATIONS,state:r.AnnouncementController});const ve=this.controllerMessenger.getRestricted({name:"NetworkOrderController",allowedEvents:["NetworkController:stateChange"]});this.networkOrderController=new Ze.NetworkOrderController({messenger:ve,state:r.NetworkOrderController});const be=this.controllerMessenger.getRestricted({name:"AccountOrderController"});this.accountOrderController=new et.AccountOrderController({messenger:be,state:r.AccountOrderController});const ke=this.controllerMessenger.getRestricted({name:"BalancesController",allowedEvents:["AccountsController:accountAdded","AccountsController:accountRemoved"],allowedActions:["AccountsController:listMultichainAccounts","SnapController:handleRequest"]});this.multichainBalancesController=new Be.BalancesController({messenger:ke,state:r.MultichainBalancesController});const Se=this.controllerMessenger.getRestricted({name:"RatesController"});this.multichainRatesController=new o.RatesController({state:r.MultichainRatesController,messenger:Se,includeUsdRate:!0,fetchMultiExchangeRate:o.fetchMultiExchangeRate});const Te=this.controllerMessenger.getRestricted({name:"TokenRatesController",allowedActions:["TokensController:getState","NetworkController:getNetworkClientById","NetworkController:getState","AccountsController:getAccount","AccountsController:getSelectedAccount"],allowedEvents:["NetworkController:stateChange","AccountsController:selectedEvmAccountChange","PreferencesController:stateChange","TokensController:stateChange"]});this.tokenRatesController=new o.TokenRatesController({state:r.TokenRatesController,messenger:Te,tokenPricesService:new o.CodefiTokenPricesServiceV2,disabled:!this.preferencesController.state.useCurrencyRateCheck}),this.controllerMessenger.subscribe("PreferencesController:stateChange",(0,pt.previousValueComparator)(((e,t)=>{const{useCurrencyRateCheck:n}=e,{useCurrencyRateCheck:r}=t;r&&!n?this.tokenRatesController.enable():!r&&n&&this.tokenRatesController.disable()}),this.preferencesController.state)),this.ensController=new I.EnsController({messenger:this.controllerMessenger.getRestricted({name:"EnsController",allowedActions:["NetworkController:getNetworkClientById","NetworkController:getState"],allowedEvents:[]}),onNetworkDidChange:i.subscribe.bind(i,"NetworkController:networkDidChange")});const Me=this.controllerMessenger.getRestricted({name:"OnboardingController",allowedActions:[],allowedEvents:[]});this.onboardingController=new at.default({messenger:Me,state:r.OnboardingController});let Pe=[(0,h.keyringBuilderFactory)(k.MetaMaskKeyring)];const _e=null===(t=this.opts.overrides)||void 0===t?void 0:t.keyrings;if(!1===Ae.isManifestV3){const e=[(null==_e?void 0:_e.lattice)||v.default,k.MetaMaskKeyring],t=[{keyring:(null==_e?void 0:_e.trezor)||y.TrezorKeyring,bridge:(null==_e?void 0:_e.trezorBridge)||y.TrezorConnectBridge},{keyring:(null==_e?void 0:_e.ledger)||w.LedgerKeyring,bridge:(null==_e?void 0:_e.ledgerBridge)||w.LedgerIframeBridge}];Pe=e.map((e=>(0,h.keyringBuilderFactory)(e))),t.forEach((e=>Pe.push((0,gt.hardwareKeyringBuilderFactory)(e.keyring,e.bridge))))}else Pe.push((0,gt.hardwareKeyringBuilderFactory)(y.TrezorKeyring,(null==_e?void 0:_e.trezorBridge)||At.TrezorOffscreenBridge),(0,gt.hardwareKeyringBuilderFactory)(w.LedgerKeyring,(null==_e?void 0:_e.ledgerBridge)||Tt.LedgerOffscreenBridge),(0,h.keyringBuilderFactory)(It.LatticeKeyringOffscreen));const Re=this.controllerMessenger.getRestricted({name:"SnapKeyringBuilder",allowedActions:["ApprovalController:addRequest","ApprovalController:acceptRequest","ApprovalController:rejectRequest","ApprovalController:startFlow","ApprovalController:endFlow","ApprovalController:showSuccess","ApprovalController:showError","PhishingController:test","PhishingController:maybeUpdateState","KeyringController:getAccounts","AccountsController:setSelectedAccount","AccountsController:getAccountByAddress","AccountsController:setAccountName"]});Pe.push((0,Et.snapKeyringBuilder)(Re,(()=>this.snapController),(async()=>{await this.keyringController.persistAllKeyrings(),await this.accountsController.updateAccounts()}),(e=>this.removeAccount(e)),this.metaMetricsController.trackEvent.bind(this.metaMetricsController),(e=>{if(!e)return null;const t=this.getLocale(),{snaps:n}=this.snapController.state,r=n[e];if(!r)return(0,Z.stripSnapPrefix)(e);if(r.localizationFiles){return(0,Z.getLocalizedSnapManifest)(r.manifest,t,r.localizationFiles).proposedName}return r.manifest.proposedName}),(e=>Nt.default.some((t=>t.snapId===e)))));const Oe=this.controllerMessenger.getRestricted({name:"KeyringController"});this.keyringController=new h.KeyringController({cacheEncryptionKey:!0,keyringBuilders:Pe,state:r.KeyringController,encryptor:e.encryptor||(0,Mt.encryptorFactory)(6e5),messenger:Oe}),this.controllerMessenger.subscribe("KeyringController:unlock",(()=>this._onUnlock())),this.controllerMessenger.subscribe("KeyringController:lock",(()=>this._onLock())),this.controllerMessenger.subscribe("KeyringController:stateChange",(e=>{this._onKeyringControllerUpdate(e)})),this.permissionController=new B.PermissionController({messenger:this.controllerMessenger.getRestricted({name:"PermissionController",allowedActions:[`${this.approvalController.name}:addRequest`,`${this.approvalController.name}:hasRequest`,`${this.approvalController.name}:acceptRequest`,`${this.approvalController.name}:rejectRequest`,"SnapController:getPermitted","SnapController:install","SubjectMetadataController:getSubjectMetadata"]}),state:r.PermissionController,caveatSpecifications:(0,yt.getCaveatSpecifications)({getInternalAccounts:this.accountsController.listAccounts.bind(this.accountsController),findNetworkClientIdByChainId:this.networkController.findNetworkClientIdByChainId.bind(this.networkController)}),permissionSpecifications:{...(0,yt.getPermissionSpecifications)({getInternalAccounts:this.accountsController.listAccounts.bind(this.accountsController),getAllAccounts:this.keyringController.getAccounts.bind(this.keyringController),captureKeyringTypesWithMissingIdentities:(e=[],t=[])=>{const n=t.filter((t=>!e.some((e=>e.address.toLowerCase()===t.toLowerCase())))).map((e=>this.keyringController.getAccountKeyringType(e))),r=e.length,s=Object.keys(this.accountTrackerController.state.accounts||{}).length;(0,E.captureException)(new Error(`Attempt to get permission specifications failed because their were ${t.length} accounts, but ${r} identities, and the ${n} keyrings included accounts with missing identities. Meanwhile, there are ${s} accounts in the account tracker.`))}}),...this.getSnapPermissionSpecifications()},unrestrictedMethods:yt.unrestrictedMethods}),this.selectedNetworkController=new U.SelectedNetworkController({messenger:this.controllerMessenger.getRestricted({name:"SelectedNetworkController",allowedActions:["NetworkController:getNetworkClientById","NetworkController:getState","NetworkController:getSelectedNetworkClient","PermissionController:hasPermissions","PermissionController:getSubjectNames"],allowedEvents:["NetworkController:stateChange","PermissionController:stateChange"]}),state:r.SelectedNetworkController,useRequestQueuePreference:this.preferencesController.state.useRequestQueue,onPreferencesStateChange:e=>{d.subscribe("PreferencesController:stateChange",e)},domainProxyMap:new Rt.WeakRefObjectMap}),this.permissionLogController=new L.PermissionLogController({messenger:this.controllerMessenger.getRestricted({name:"PermissionLogController"}),restrictedMethods:new Set(Object.keys(he.RestrictedMethods)),state:r.PermissionLogController}),this.subjectMetadataController=new B.SubjectMetadataController({messenger:this.controllerMessenger.getRestricted({name:"SubjectMetadataController",allowedActions:[`${this.permissionController.name}:hasPermissions`]}),state:r.SubjectMetadataController,subjectCacheLimit:100});const xe=Ae.isManifestV3&&"undefined"!=typeof chrome&&void 0!==chrome.offscreen,je={messenger:this.controllerMessenger.getRestricted({name:"ExecutionService"}),setupSnapProvider:this.setupSnapProvider.bind(this)};this.snapExecutionService=!1===xe?new H.IframeExecutionService({...je,iframeUrl:new URL("https://execution.metamask.io/iframe/6.10.0/index.html")}):new H.OffscreenExecutionService({...je,offscreenPromise:this.offscreenPromise});const De=this.controllerMessenger.getRestricted({name:"SnapController",allowedEvents:["ExecutionService:unhandledError","ExecutionService:outboundRequest","ExecutionService:outboundResponse"],allowedActions:[`${this.permissionController.name}:getEndowments`,`${this.permissionController.name}:getPermissions`,`${this.permissionController.name}:hasPermission`,`${this.permissionController.name}:hasPermissions`,`${this.permissionController.name}:requestPermissions`,`${this.permissionController.name}:revokeAllPermissions`,`${this.permissionController.name}:revokePermissions`,`${this.permissionController.name}:revokePermissionForAllSubjects`,`${this.permissionController.name}:getSubjectNames`,`${this.permissionController.name}:updateCaveat`,`${this.approvalController.name}:addRequest`,`${this.approvalController.name}:updateRequestState`,`${this.permissionController.name}:grantPermissions`,`${this.subjectMetadataController.name}:getSubjectMetadata`,`${this.subjectMetadataController.name}:addSubjectMetadata`,"ExecutionService:executeSnap","ExecutionService:getRpcRequestHandler","ExecutionService:terminateSnap","ExecutionService:terminateAllSnaps","ExecutionService:handleRpcRequest","SnapsRegistry:get","SnapsRegistry:getMetadata","SnapsRegistry:update","SnapsRegistry:resolveVersion","SnapInterfaceController:createInterface","SnapInterfaceController:getInterface"]}),Ue=!0;this.snapController=new H.SnapController({environmentEndowmentPermissions:Object.values(he.EndowmentPermissions),excludedPermissions:{...he.ExcludedSnapPermissions,...he.ExcludedSnapEndowments},closeAllConnections:this.removeAllConnections.bind(this),state:r.SnapController,messenger:De,featureFlags:{dappsCanUpdateSnaps:!0,allowLocalSnaps:!1,requireAllowlist:Ue,rejectInvalidPlatformVersion:!0},encryptor:(0,Mt.encryptorFactory)(6e5),getMnemonic:this.getPrimaryKeyringMnemonic.bind(this),preinstalledSnaps:Nt.default,getFeatureFlags:()=>({disableSnaps:!1===this.preferencesController.state.useExternalServices})}),this.rateLimitController=new $.RateLimitController({state:r.RateLimitController,messenger:this.controllerMessenger.getRestricted({name:"RateLimitController"}),implementations:{showNativeNotification:{method:(e,t)=>{const n=this.controllerMessenger.call("SubjectMetadataController:getState").subjectMetadata[e];return this.platform._showNotification((null==n?void 0:n.name)??e,t).catch((e=>{C.default.error("Failed to create notification",e)})),null},rateLimitCount:2,rateLimitTimeout:3e5},showInAppNotification:{method:(e,t)=>{const{message:n}=t,r={data:{message:n,origin:e},type:Zt.SNAP,readDate:null};return this.controllerMessenger.call("NotificationServicesController:updateMetamaskNotificationsList",r),null},rateLimitCount:5,rateLimitTimeout:6e4}}});const He=this.controllerMessenger.getRestricted({name:"CronjobController",allowedEvents:["SnapController:snapInstalled","SnapController:snapUpdated","SnapController:snapUninstalled","SnapController:snapEnabled","SnapController:snapDisabled"],allowedActions:[`${this.permissionController.name}:getPermissions`,"SnapController:handleRequest","SnapController:getAll"]});this.cronjobController=new H.CronjobController({state:r.CronjobController,messenger:He});const We=this.controllerMessenger.getRestricted({name:"SnapsRegistry",allowedEvents:[],allowedActions:[]});this.snapsRegistry=new H.JsonSnapsRegistry({state:r.SnapsRegistry,messenger:We,refetchOnAllowlistMiss:Ue,url:{registry:"https://acl.execution.metamask.io/latest/registry.json",signature:"https://acl.execution.metamask.io/latest/signature.json"},publicKey:"0x025b65308f0f0fb8bc7f7ff87bfc296e0330eee5d3c1d1ee4a048b2fd6a86fa0a6"});const ze=this.controllerMessenger.getRestricted({name:"SnapInterfaceController",allowedActions:[`${this.phishingController.name}:maybeUpdateState`,`${this.phishingController.name}:testOrigin`,`${this.approvalController.name}:hasRequest`,`${this.approvalController.name}:acceptRequest`,`${this.snapController.name}:get`],allowedEvents:["NotificationServicesController:notificationsListUpdated"]});this.snapInterfaceController=new H.SnapInterfaceController({state:r.SnapInterfaceController,messenger:ze});const Je=this.controllerMessenger.getRestricted({name:"SnapInsightsController",allowedActions:[`${this.snapController.name}:handleRequest`,`${this.snapController.name}:getAll`,`${this.permissionController.name}:getPermissions`,`${this.snapInterfaceController.name}:deleteInterface`],allowedEvents:["TransactionController:unapprovedTransactionAdded","TransactionController:transactionStatusUpdated","SignatureController:stateChange"]});this.snapInsightsController=new H.SnapInsightsController({state:r.SnapInsightsController,messenger:Je}),this.authenticationController=new re.AuthenticationController.Controller({state:r.AuthenticationController,messenger:this.controllerMessenger.getRestricted({name:"AuthenticationController",allowedActions:["KeyringController:getState","SnapController:handleRequest"],allowedEvents:["KeyringController:lock","KeyringController:unlock"]}),metametrics:{getMetaMetricsId:()=>this.metaMetricsController.getMetaMetricsId(),agent:"extension"}}),this.userStorageController=new re.UserStorageController.Controller({getMetaMetricsState:()=>this.metaMetricsController.state.participateInMetaMetrics??!1,state:r.UserStorageController,config:{accountSyncing:{onAccountAdded:e=>{this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.ProfileSyncing,event:fe.MetaMetricsEventName.AccountsSyncAdded,properties:{profile_id:e}})},onAccountNameUpdated:e=>{this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.ProfileSyncing,event:fe.MetaMetricsEventName.AccountsSyncNameUpdated,properties:{profile_id:e}})},onAccountSyncErroneousSituation:(e,t)=>{this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.ProfileSyncing,event:fe.MetaMetricsEventName.AccountsSyncErroneousSituation,properties:{profile_id:e,situation_message:t}})}}},env:{isAccountSyncingEnabled:Ae.isManifestV3},messenger:this.controllerMessenger.getRestricted({name:"UserStorageController",allowedActions:["KeyringController:getState","KeyringController:addNewAccount","SnapController:handleRequest","AuthenticationController:getBearerToken","AuthenticationController:getSessionProfile","AuthenticationController:isSignedIn","AuthenticationController:performSignOut","AuthenticationController:performSignIn","NotificationServicesController:disableNotificationServices","NotificationServicesController:selectIsNotificationServicesEnabled","AccountsController:listAccounts","AccountsController:updateAccountMetadata"],allowedEvents:["KeyringController:lock","KeyringController:unlock","AccountsController:accountAdded","AccountsController:accountRenamed"]})});const Ye=this.controllerMessenger.getRestricted({name:"NotificationServicesPushController",allowedActions:["AuthenticationController:getBearerToken"],allowedEvents:[]});this.notificationServicesPushController=new se.NotificationServicesPushController.Controller({messenger:Ye,state:r.NotificationServicesPushController,env:{apiKey:"",authDomain:"",storageBucket:"",projectId:"",messagingSenderId:"",appId:"",measurementId:"",vapidKey:""},config:{isPushEnabled:Ae.isManifestV3,platform:"extension",onPushNotificationReceived:Ht.onPushNotificationReceived,onPushNotificationClicked:Ht.onPushNotificationClicked}}),Ye.subscribe("NotificationServicesPushController:onNewNotifications",(e=>{this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.PushNotifications,event:fe.MetaMetricsEventName.PushNotificationReceived,properties:{notification_id:e.id,notification_type:e.type,chain_id:null==e?void 0:e.chain_id}})})),Ye.subscribe("NotificationServicesPushController:pushNotificationClicked",(e=>{this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.PushNotifications,event:fe.MetaMetricsEventName.PushNotificationClicked,properties:{notification_id:e.id,notification_type:e.type,chain_id:null==e?void 0:e.chain_id}})})),this.notificationServicesController=new se.NotificationServicesController.Controller({messenger:this.controllerMessenger.getRestricted({name:"NotificationServicesController",allowedActions:["KeyringController:getAccounts","KeyringController:getState","AuthenticationController:getBearerToken","AuthenticationController:isSignedIn","UserStorageController:enableProfileSyncing","UserStorageController:getStorageKey","UserStorageController:performGetStorage","UserStorageController:performSetStorage","NotificationServicesPushController:enablePushNotifications","NotificationServicesPushController:disablePushNotifications","NotificationServicesPushController:subscribeToPushNotifications","NotificationServicesPushController:updateTriggerPushNotifications"],allowedEvents:["KeyringController:stateChange","KeyringController:lock","KeyringController:unlock","NotificationServicesPushController:onNewNotifications"]}),state:r.NotificationServicesController,env:{isPushIntegrated:Ae.isManifestV3,featureAnnouncements:{platform:"extension",spaceId:"",accessToken:""}}}),this.accountTrackerController=new Ve.default({state:{accounts:{}},messenger:this.controllerMessenger.getRestricted({name:"AccountTrackerController",allowedActions:["AccountsController:getSelectedAccount","NetworkController:getState","NetworkController:getNetworkClientById","OnboardingController:getState","PreferencesController:getState"],allowedEvents:["AccountsController:selectedEvmAccountChange","OnboardingController:stateChange","KeyringController:accountRemoved"]}),provider:this.provider,blockTracker:this.blockTracker,getNetworkIdentifier:e=>{const{type:t,rpcUrl:n}=e??(0,Ie.getProviderConfig)({metamask:this.networkController.state});return t===le.NETWORK_TYPES.RPC?n:t}}),this.on("controllerConnectionChanged",(e=>{const{completedOnboarding:t}=this.onboardingController.state;e>0&&t?this.triggerNetworkrequests():this.stopNetworkRequests()})),this.controllerMessenger.subscribe(`${this.onboardingController.name}:stateChange`,(0,pt.previousValueComparator)((async(e,t)=>{const{completedOnboarding:n}=e,{completedOnboarding:r}=t;if(!n&&r){const{address:e}=this.accountsController.getSelectedAccount();await this._addAccountsWithBalance(),this.postOnboardingInitialization(),this.triggerNetworkrequests(),await this.tokenDetectionController.detectTokens({selectedAddress:e})}}),this.onboardingController.state));const Qe=this.controllerMessenger.getRestricted({name:"TokenDetectionController",allowedActions:["AccountsController:getAccount","AccountsController:getSelectedAccount","KeyringController:getState","NetworkController:getNetworkClientById","NetworkController:getNetworkConfigurationByNetworkClientId","NetworkController:getState","PreferencesController:getState","TokenListController:getState","TokensController:getState","TokensController:addDetectedTokens"],allowedEvents:["AccountsController:selectedEvmAccountChange","KeyringController:lock","KeyringController:unlock","NetworkController:networkDidChange","PreferencesController:stateChange","TokenListController:stateChange"]});this.tokenDetectionController=new o.TokenDetectionController({messenger:Qe,getBalancesInSingleCall:this.assetsContractController.getBalancesInSingleCall.bind(this.assetsContractController),trackMetaMetricsEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController),useAccountsAPI:!0,platform:"extension"});const Xe=this.controllerMessenger.getRestricted({name:"AddressBookController",allowedActions:[],allowedEvents:[]});this.addressBookController=new M.AddressBookController({messenger:Xe,state:r.AddressBookController}),this.alertController=new ot.AlertController({state:r.AlertController,messenger:this.controllerMessenger.getRestricted({name:"AlertController",allowedEvents:["AccountsController:selectedAccountChange"],allowedActions:["AccountsController:getSelectedAccount"]})}),this.backup=new it.default({preferencesController:this.preferencesController,addressBookController:this.addressBookController,accountsController:this.accountsController,networkController:this.networkController,trackMetaMetricsEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController)}),this.snapAndHardwareMetricsParams={getSelectedAccount:this.accountsController.getSelectedAccount.bind(this.accountsController),getAccountType:this.getAccountType.bind(this),getDeviceModel:this.getDeviceModel.bind(this),snapAndHardwareMessenger:this.controllerMessenger.getRestricted({name:"SnapAndHardwareMessenger",allowedActions:["KeyringController:getKeyringForAccount","SnapController:get","AccountsController:getSelectedAccount"]})};const tt=this.controllerMessenger.getRestricted({name:"TransactionController",allowedActions:[`${this.approvalController.name}:addRequest`,"NetworkController:findNetworkClientIdByChainId","NetworkController:getNetworkClientById","AccountsController:getSelectedAccount"],allowedEvents:["NetworkController:stateChange"]});this.txController=new X.TransactionController({blockTracker:this.blockTracker,getCurrentNetworkEIP1559Compatibility:this.networkController.getEIP1559Compatibility.bind(this.networkController),getCurrentAccountEIP1559Compatibility:this.getCurrentAccountEIP1559Compatibility.bind(this),getExternalPendingTransactions:this.getExternalPendingTransactions.bind(this),getGasFeeEstimates:this.gasFeeController.fetchGasFeeEstimates.bind(this.gasFeeController),getNetworkClientRegistry:this.networkController.getNetworkClientRegistry.bind(this.networkController),getNetworkState:()=>this.networkController.state,getPermittedAccounts:this.getPermittedAccounts.bind(this),getSavedGasFees:()=>this.preferencesController.state.advancedGasFee[(0,Ie.getCurrentChainId)({metamask:this.networkController.state})],incomingTransactions:{etherscanApiKeysByChainId:{[le.CHAIN_IDS.MAINNET]:"",[le.CHAIN_IDS.SEPOLIA]:""},includeTokenTransfers:!1,isEnabled:()=>{var e;return Boolean((null===(e=this.preferencesController.state.incomingTransactionsPreferences)||void 0===e?void 0:e[(0,Ie.getCurrentChainId)({metamask:this.networkController.state})])&&this.onboardingController.state.completedOnboarding)},queryEntireHistory:!1,updateTransactions:!1},isFirstTimeInteractionEnabled:()=>this.preferencesController.state.securityAlertsEnabled,isMultichainEnabled:"",isSimulationEnabled:()=>this.preferencesController.state.useTransactionSimulations,messenger:tt,onNetworkStateChange:e=>{i.subscribe("NetworkController:networkDidChange",(()=>e()))},pendingTransactions:{isResubmitEnabled:()=>{const e=this._getMetaMaskState();return!((0,Ee.getSmartTransactionsPreferenceEnabled)(e)&&(0,Ee.getCurrentChainSupportsSmartTransactions)(e))}},provider:this.provider,testGasFeeFlows:!1,trace:Ne.trace,hooks:{publish:this._publishSmartTransactionHook.bind(this)},sign:(...e)=>this.keyringController.signTransaction(...e),state:r.TransactionController}),this._addTransactionControllerListeners(),this.decryptMessageController=new lt.default({getState:this.getState.bind(this),messenger:this.controllerMessenger.getRestricted({name:"DecryptMessageController",allowedActions:[`${this.approvalController.name}:addRequest`,`${this.approvalController.name}:acceptRequest`,`${this.approvalController.name}:rejectRequest`,`${this.keyringController.name}:decryptMessage`]}),metricsEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController)}),this.encryptionPublicKeyController=new ft.default({messenger:this.controllerMessenger.getRestricted({name:"EncryptionPublicKeyController",allowedActions:[`${this.approvalController.name}:addRequest`,`${this.approvalController.name}:acceptRequest`,`${this.approvalController.name}:rejectRequest`]}),getEncryptionPublicKey:this.keyringController.getEncryptionPublicKey.bind(this.keyringController),getAccountKeyringType:this.keyringController.getAccountKeyringType.bind(this.keyringController),getState:this.getState.bind(this),metricsEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController)}),this.signatureController=new V.SignatureController({messenger:this.controllerMessenger.getRestricted({name:"SignatureController",allowedActions:[`${this.approvalController.name}:addRequest`,`${this.keyringController.name}:signMessage`,`${this.keyringController.name}:signPersonalMessage`,`${this.keyringController.name}:signTypedMessage`,`${this.loggingController.name}:add`,`${this.networkController.name}:getNetworkClientById`]}),trace:Ne.trace,decodingApiUrl:"https://signature-insights.api.cx.metamask.io/v1",isDecodeSignatureRequestEnabled:()=>!0===this.preferencesController.state.useExternalServices&&this.preferencesController.state.useTransactionSimulations}),this.signatureController.hub.on("cancelWithReason",(({message:e,reason:t})=>{this.metaMetricsController.trackEvent({event:t,category:fe.MetaMetricsEventCategory.Transactions,properties:{action:"Sign Request",type:e.type}})}));const nt=this.controllerMessenger.getRestricted({name:"SwapsController",allowedActions:["NetworkController:getState","NetworkController:getNetworkClientById","TokenRatesController:getState"],allowedEvents:[]});this.swapsController=new ct.default({messenger:nt,getBufferedGasLimit:async(e,t)=>{const{gas:n,simulationFails:r}=await this.txController.estimateGasBuffered(e.txParams,t);return{gasLimit:n,simulationFails:r}},getEIP1559GasFeeEstimates:this.gasFeeController.fetchGasFeeEstimates.bind(this.gasFeeController),getLayer1GasFee:this.txController.getLayer1GasFee.bind(this.txController),trackMetaMetricsEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController)},r.SwapsController);const ht=this.controllerMessenger.getRestricted({name:$t.BRIDGE_CONTROLLER_NAME,allowedActions:["AccountsController:getSelectedAccount","NetworkController:getSelectedNetworkClient","NetworkController:findNetworkClientIdByChainId"],allowedEvents:[]});this.bridgeController=new Lt.default({messenger:ht,getLayer1GasFee:this.txController.getLayer1GasFee.bind(this.txController)});const bt=this.controllerMessenger.getRestricted({name:Wt.BRIDGE_STATUS_CONTROLLER_NAME,allowedActions:["AccountsController:getSelectedAccount","NetworkController:getNetworkClientById","NetworkController:findNetworkClientIdByChainId","NetworkController:getState"],allowedEvents:[]});this.bridgeStatusController=new Vt.default({messenger:bt,state:r.BridgeStatusController});const St=this.controllerMessenger.getRestricted({name:"SmartTransactionsController",allowedActions:["NetworkController:getNetworkClientById"],allowedEvents:["NetworkController:stateChange"]});this.smartTransactionsController=new j.default({supportedChainIds:(0,ce.getAllowedSmartTransactionsChainIds)(),clientId:D.ClientId.Extension,getNonceLock:this.txController.getNonceLock.bind(this.txController),confirmExternalTransaction:this.txController.confirmExternalTransaction.bind(this.txController),trackMetaMetricsEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController),state:r.SmartTransactionsController,messenger:St,getTransactions:this.txController.getTransactions.bind(this.txController),updateTransaction:this.txController.updateTransaction.bind(this.txController),getFeatureFlags:()=>{const e=this._getMetaMaskState();return(0,Ee.getFeatureFlagsByChainId)(e)},getMetaMetricsProps:async()=>{const e=this.accountsController.getSelectedAccount().address;return{accountHardwareType:await(0,Ee.getHardwareWalletType)(this._getMetaMaskState()),accountType:await this.getAccountType(e),deviceModel:await this.getDeviceModel(e)}}});const Ot=()=>this.preferencesController.state.useExternalNameSources;this.nameController=new J.NameController({messenger:this.controllerMessenger.getRestricted({name:"NameController",allowedActions:[]}),providers:[new J.ENSNameProvider({reverseLookup:this.ensController.reverseResolveAddress.bind(this.ensController)}),new J.EtherscanNameProvider({isEnabled:Ot}),new J.TokenNameProvider({isEnabled:Ot}),new J.LensNameProvider({isEnabled:Ot}),new Fe.SnapsNameProvider({messenger:this.controllerMessenger.getRestricted({name:"SnapsNameProvider",allowedActions:["SnapController:getAll","SnapController:get","SnapController:handleRequest","PermissionController:getState"]})})],state:r.NameController});const xt=this.controllerMessenger.getRestricted({name:"PetnamesBridge",allowedEvents:["NameController:stateChange","AccountsController:stateChange","AddressBookController:stateChange"],allowedActions:["AccountsController:listAccounts"]});new Le.AddressBookPetnamesBridge({addressBookController:this.addressBookController,nameController:this.nameController,messenger:xt}).init(),new $e.AccountIdentitiesPetnamesBridge({nameController:this.nameController,messenger:xt}).init(),this.userOperationController=new Q.UserOperationController({entrypoint:null,getGasFeeEstimates:this.gasFeeController.fetchGasFeeEstimates.bind(this.gasFeeController),messenger:this.controllerMessenger.getRestricted({name:"UserOperationController",allowedActions:["ApprovalController:addRequest","NetworkController:getNetworkClientById","KeyringController:prepareUserOperation","KeyringController:patchUserOperation","KeyringController:signUserOperation"]}),state:r.UserOperationController}),this.userOperationController.hub.on("user-operation-added",this._onUserOperationAdded.bind(this)),this.userOperationController.hub.on("transaction-updated",this._onUserOperationTransactionUpdated.bind(this)),i.subscribe("NetworkController:networkDidChange",(()=>{this.accountTrackerController.updateAccounts()})),i.subscribe("NetworkController:networkWillChange",a.bind(this)),this.metamaskMiddleware=(0,mt.default)({static:{eth_syncing:!1,web3_clientVersion:`MetaMask/v${s}`},version:s,getAccounts:async({origin:e},{suppressUnauthorizedError:t=!0}={})=>{if(e===ge.ORIGIN_METAMASK){const e=this.accountsController.getSelectedAccount().address;return e?[e]:[]}return this.isUnlocked()?await this.getPermittedAccounts(e,{suppressUnauthorizedError:t}):[]},processTransaction:(e,t)=>(0,Pt.addDappTransaction)(this.getAddTransactionRequest({transactionParams:e,dappRequest:t})),processTypedMessage:(...e)=>(0,_t.addTypedMessage)({signatureController:this.signatureController,signatureParams:e}),processTypedMessageV3:(...e)=>(0,_t.addTypedMessage)({signatureController:this.signatureController,signatureParams:e}),processTypedMessageV4:(...e)=>(0,_t.addTypedMessage)({signatureController:this.signatureController,signatureParams:e}),processPersonalMessage:(...e)=>(0,_t.addPersonalMessage)({signatureController:this.signatureController,signatureParams:e}),processEncryptionPublicKey:this.encryptionPublicKeyController.newRequestEncryptionPublicKey.bind(this.encryptionPublicKeyController),processDecryptMessage:this.decryptMessageController.newRequestDecryptMessage.bind(this.decryptMessageController),getPendingNonce:this.getPendingNonce.bind(this),getPendingTransactionByHash:e=>this.txController.state.transactions.find((t=>t.hash===e&&t.status===X.TransactionStatus.submitted))}),this.on("update",(e=>this._onStateUpdate(e)));const Bt={AccountTracker:this.accountTrackerController,TokenRatesController:this.tokenRatesController,DecryptMessageController:this.decryptMessageController,EncryptionPublicKeyController:this.encryptionPublicKeyController,SignatureController:this.signatureController,SwapsController:this.swapsController,BridgeController:this.bridgeController,BridgeStatusController:this.bridgeStatusController,EnsController:this.ensController,ApprovalController:this.approvalController,PPOMController:this.ppomController};this.store.updateStructure({AccountsController:this.accountsController,AppStateController:this.appStateController.store,AppMetadataController:this.appMetadataController,MultichainBalancesController:this.multichainBalancesController,TransactionController:this.txController,KeyringController:this.keyringController,PreferencesController:this.preferencesController,MetaMetricsController:this.metaMetricsController,MetaMetricsDataDeletionController:this.metaMetricsDataDeletionController,AddressBookController:this.addressBookController,CurrencyController:this.currencyRateController,NetworkController:this.networkController,AlertController:this.alertController,OnboardingController:this.onboardingController,PermissionController:this.permissionController,PermissionLogController:this.permissionLogController,SubjectMetadataController:this.subjectMetadataController,AnnouncementController:this.announcementController,NetworkOrderController:this.networkOrderController,AccountOrderController:this.accountOrderController,GasFeeController:this.gasFeeController,TokenListController:this.tokenListController,TokensController:this.tokensController,TokenBalancesController:this.tokenBalancesController,SmartTransactionsController:this.smartTransactionsController,NftController:this.nftController,PhishingController:this.phishingController,SelectedNetworkController:this.selectedNetworkController,LoggingController:this.loggingController,MultichainRatesController:this.multichainRatesController,SnapController:this.snapController,CronjobController:this.cronjobController,SnapsRegistry:this.snapsRegistry,SnapInterfaceController:this.snapInterfaceController,SnapInsightsController:this.snapInsightsController,PPOMController:this.ppomController,NameController:this.nameController,UserOperationController:this.userOperationController,AuthenticationController:this.authenticationController,UserStorageController:this.userStorageController,NotificationServicesController:this.notificationServicesController,NotificationServicesPushController:this.notificationServicesPushController,...Bt}),this.memStore=new Ke.default({config:{AccountsController:this.accountsController,AppStateController:this.appStateController.store,AppMetadataController:this.appMetadataController,MultichainBalancesController:this.multichainBalancesController,NetworkController:this.networkController,KeyringController:this.keyringController,PreferencesController:this.preferencesController,MetaMetricsController:this.metaMetricsController,MetaMetricsDataDeletionController:this.metaMetricsDataDeletionController,AddressBookController:this.addressBookController,CurrencyController:this.currencyRateController,AlertController:this.alertController,OnboardingController:this.onboardingController,PermissionController:this.permissionController,PermissionLogController:this.permissionLogController,SubjectMetadataController:this.subjectMetadataController,AnnouncementController:this.announcementController,NetworkOrderController:this.networkOrderController,AccountOrderController:this.accountOrderController,GasFeeController:this.gasFeeController,TokenListController:this.tokenListController,TokensController:this.tokensController,TokenBalancesController:this.tokenBalancesController,SmartTransactionsController:this.smartTransactionsController,NftController:this.nftController,SelectedNetworkController:this.selectedNetworkController,LoggingController:this.loggingController,TxController:this.txController,MultichainRatesController:this.multichainRatesController,SnapController:this.snapController,CronjobController:this.cronjobController,SnapsRegistry:this.snapsRegistry,SnapInterfaceController:this.snapInterfaceController,SnapInsightsController:this.snapInsightsController,NameController:this.nameController,UserOperationController:this.userOperationController,AuthenticationController:this.authenticationController,UserStorageController:this.userStorageController,NotificationServicesController:this.notificationServicesController,QueuedRequestController:this.queuedRequestController,NotificationServicesPushController:this.notificationServicesPushController,...Bt},controllerMessenger:this.controllerMessenger});const jt=[this.accountTrackerController.resetState.bind(this.accountTrackerController),this.decryptMessageController.resetState.bind(this.decryptMessageController),this.encryptionPublicKeyController.resetState.bind(this.encryptionPublicKeyController),this.signatureController.resetState.bind(this.signatureController),this.swapsController.resetState.bind(this.swapsController),this.bridgeController.resetState.bind(this.bridgeController),this.ensController.resetState.bind(this.ensController),this.approvalController.clear.bind(this.approvalController)];Ae.isManifestV3?!0===n&&(this.resetStates(jt),this.extension.storage.session.set({isFirstMetaMaskControllerSetup:!1})):this.resetStates(jt);!this.isUnlocked()&&this.onboardingController.state.completedOnboarding,this._startUISync(),this.extension.runtime.getPlatformInfo().then((({os:e})=>{this.appStateController.setBrowserEnvironment(e,this.extension.runtime.getBrowserInfo===undefined?"chrome":"firefox")})),this.setupControllerEventSubscriptions(),this.setupMultichainDataAndSubscriptions(),this.publicConfigStore=this.createPublicConfigStore(),this.extension.runtime.onMessageExternal.addListener(Ge.onMessageReceived),(0,Ge.checkForMultipleVersionsRunning)(),this.onboardingController.state.completedOnboarding&&this.postOnboardingInitialization()}getInfuraFeatureFlags(){(0,xe.default)({url:"https://swap.api.cx.metamask.io/featureFlags",cacheRefreshTime:20*me.MINUTE}).then(this.onFeatureFlagResponseReceived).catch((e=>{C.default.warn("Feature flag endpoint is unreachable",e)}))}onFeatureFlagResponseReceived(e){const{multiChainAssets:t={}}=e,{pollInterval:n}=t;n>0&&this.tokenBalancesController.setIntervalLength(n*me.SECOND)}postOnboardingInitialization(){const{usePhishDetect:e}=this.preferencesController.state;this.networkController.lookupNetwork(),e&&this.phishingController.maybeUpdateState();const t=this.preferencesController.state,{useTokenDetection:n,useNftDetection:r}=t??{};this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.Onboarding,event:fe.MetaMetricsUserTrait.TokenDetectionEnabled,properties:{[fe.MetaMetricsUserTrait.TokenDetectionEnabled]:n}}),this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.Onboarding,event:fe.MetaMetricsUserTrait.NftAutodetectionEnabled,properties:{[fe.MetaMetricsUserTrait.NftAutodetectionEnabled]:r}})}triggerNetworkrequests(){this.txController.startIncomingTransactionPolling(),this.tokenDetectionController.enable(),this.getInfuraFeatureFlags()}stopNetworkRequests(){this.txController.stopIncomingTransactionPolling(),this.tokenDetectionController.disable()}resetStates(e){e.forEach((e=>{try{e()}catch(e){console.error(e)}}))}async getSnapKeyring(){let[e]=this.keyringController.getKeyringsByType(ue.KeyringType.snap);return e||(e=await this.keyringController.addNewKeyring(ue.KeyringType.snap)),e}trackInsightSnapView(e){this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.InsightSnapViewed,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:e}})}_getSnapMetadata(e){var t;return null===(t=this.snapsRegistry.state.database)||void 0===t||null===(t=t.verifiedSnaps)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.metadata}async handleSnapRequest(e){try{const t=await this.controllerMessenger.call("SnapController:handleRequest",e);return this._trackSnapExportUsage(e.snapId,e.handler,!0,e.origin),t}catch(t){throw this._trackSnapExportUsage(e.snapId,e.handler,!1,e.origin),t}}getLocale(){const{currentLocale:e}=this.preferencesController.state;return e}getSnapPermissionSpecifications(){return{...(0,q.buildSnapEndowmentSpecifications)(Object.keys(he.ExcludedSnapEndowments)),...(0,q.buildSnapRestrictedMethodSpecifications)(Object.keys(he.ExcludedSnapPermissions),{getPreferences:()=>({locale:this.getLocale(),currency:this.currencyRateController.state.currentCurrency}),clearSnapState:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:clearSnapState"),getMnemonic:this.getPrimaryKeyringMnemonic.bind(this),getUnlockPromise:this.appStateController.getUnlockPromise.bind(this.appStateController),getSnap:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:get"),handleSnapRpcRequest:this.handleSnapRequest.bind(this),getSnapState:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:getSnapState"),requestUserApproval:this.approvalController.addAndShowApprovalRequest.bind(this.approvalController),showNativeNotification:(e,t)=>this.controllerMessenger.call("RateLimitController:call",e,"showNativeNotification",e,t.message),showInAppNotification:(e,t)=>this.controllerMessenger.call("RateLimitController:call",e,"showInAppNotification",e,t),updateSnapState:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:updateSnapState"),maybeUpdatePhishingList:()=>{const{usePhishDetect:e}=this.preferencesController.state;e&&this.controllerMessenger.call("PhishingController:maybeUpdateState")},isOnPhishingList:e=>{const{usePhishDetect:t}=this.preferencesController.state;return!!t&&this.controllerMessenger.call("PhishingController:testOrigin",e).result},createInterface:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:createInterface"),getInterface:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:getInterface"),getSnapKeyring:this.getSnapKeyring.bind(this)})}}setupControllerEventSubscriptions(){let e;this.controllerMessenger.subscribe("PreferencesController:stateChange",(0,pt.previousValueComparator)((async(e,t)=>{var n;const{currentLocale:r}=t,s=(0,Ie.getCurrentChainId)({metamask:this.networkController.state});await(0,St.updateCurrentLocale)(r),null!==(n=t.incomingTransactionsPreferences)&&void 0!==n&&n[s]?this.txController.startIncomingTransactionPolling():this.txController.stopIncomingTransactionPolling(),Xt(tn,this,rn).call(this,t,e)}),this.preferencesController.state)),this.controllerMessenger.subscribe(`${this.accountsController.name}:selectedAccountChange`,(async t=>{t.address&&t.address!==e&&(e=t.address,await this._onAccountChange(t.address))})),this.controllerMessenger.subscribe(`${this.permissionController.name}:stateChange`,(async(e,t)=>{const n=(0,yt.diffMap)(e,t);for(const[e,t]of n.entries())this._notifyAccountsChange(e,t)}),yt.getPermittedAccountsByOrigin),this.controllerMessenger.subscribe(`${this.permissionController.name}:stateChange`,(async(e,t)=>{const n=(0,yt.diffMap)(e,t);for(const[e,t]of n.entries()){const n=this.selectedNetworkController.getNetworkClientIdForDomain(e),{chainId:r}=this.networkController.getNetworkConfigurationByNetworkClientId(n);if(t.length>0&&!t.includes(r)){const n=this.networkController.findNetworkClientIdByChainId(t[0]);this.selectedNetworkController.setNetworkClientIdForDomain(e,n),this.networkController.setActiveNetwork(n)}}}),yt.getPermittedChainsByOrigin),this.controllerMessenger.subscribe("NetworkController:networkDidChange",(async()=>{await this.txController.updateIncomingTransactions()})),this.controllerMessenger.subscribe(`${this.snapController.name}:snapInstallStarted`,((e,t,n)=>{var r;const s=null===(r=this._getSnapMetadata(e))||void 0===r?void 0:r.category;this.metaMetricsController.trackEvent({event:n?fe.MetaMetricsEventName.SnapUpdateStarted:fe.MetaMetricsEventName.SnapInstallStarted,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:e,origin:t,snap_category:s}})})),this.controllerMessenger.subscribe(`${this.snapController.name}:snapInstallFailed`,((e,t,n,r)=>{var s;const o=r.includes("User rejected the request."),a=n?fe.MetaMetricsEventName.SnapUpdateFailed:fe.MetaMetricsEventName.SnapInstallFailed,i=n?fe.MetaMetricsEventName.SnapUpdateRejected:fe.MetaMetricsEventName.SnapInstallRejected,l=null===(s=this._getSnapMetadata(e))||void 0===s?void 0:s.category;this.metaMetricsController.trackEvent({event:o?i:a,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:e,origin:t,snap_category:l}})})),this.controllerMessenger.subscribe(`${this.snapController.name}:snapInstalled`,((e,t,n)=>{var r;if(n)return;const s=e.id,o=null===(r=this._getSnapMetadata(s))||void 0===r?void 0:r.category;this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.SnapInstalled,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:s,version:e.version,origin:t,snap_category:o}})})),this.controllerMessenger.subscribe(`${this.snapController.name}:snapUpdated`,((e,t,n,r)=>{var s;if(r)return;const o=e.id,a=null===(s=this._getSnapMetadata(o))||void 0===s?void 0:s.category;this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.SnapUpdated,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:o,old_version:t,new_version:e.version,origin:n,snap_category:a}})})),this.controllerMessenger.subscribe(`${this.snapController.name}:snapTerminated`,(e=>{const t=Object.values(this.approvalController.state.pendingApprovals).filter((t=>t.origin===e.id&&t.type.startsWith(he.RestrictedMethods.snap_dialog)));for(const e of t)this.approvalController.reject(e.id,new Error("Snap was terminated."))})),this.controllerMessenger.subscribe(`${this.snapController.name}:snapUninstalled`,(e=>{var t;const n=this.notificationServicesController.getNotificationsByType(Zt.SNAP).filter((t=>t.data.origin===e.id)).map((e=>e.id));this.notificationServicesController.deleteNotificationsById(n);const r=e.id,s=null===(t=this._getSnapMetadata(r))||void 0===t?void 0:t.category;this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.SnapUninstalled,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:r,version:e.version,snap_category:s}})}))}setupMultichainDataAndSubscriptions(){(0,ne.isEvmAccountType)(this.accountsController.getSelectedMultichainAccount().type)||this.multichainRatesController.start(),this.controllerMessenger.subscribe("AccountsController:selectedAccountChange",(e=>{(0,ne.isEvmAccountType)(e.type)?this.multichainRatesController.stop():this.multichainRatesController.start()})),this.multichainBalancesController.start(),this.multichainBalancesController.updateBalances()}createPublicConfigStore(){const e=new l.ObservableStore,t=async({isUnlocked:e})=>{const{chainId:t,networkVersion:n}=await this.getProviderNetworkState();return{isUnlocked:e,chainId:t,networkVersion:n??"loading"}},n=async n=>{var r;(null===(r=n.networksMetadata[n.selectedNetworkClientId])||void 0===r?void 0:r.status)===le.NetworkStatus.Available&&e.putState(await t(n))};return this.on("update",n),n(this.getState()),e}async getProviderState(e){const t=await this.getProviderNetworkState(this.preferencesController.getUseRequestQueue()?e:undefined);return{isUnlocked:this.isUnlocked(),accounts:await this.getPermittedAccounts(e),...t}}async getProviderNetworkState(e=U.METAMASK_DOMAIN){const t=this.controllerMessenger.call("SelectedNetworkController:getNetworkClientIdForDomain",e),n=this.controllerMessenger.call("NetworkController:getNetworkClientById",t),{chainId:r}=n.configuration,{completedOnboarding:s}=this.onboardingController.state;let o=this.deprecatedNetworkVersions[t];if(o===undefined&&s){const e=new S.default(n.provider);o=await new Promise((t=>{e.sendAsync({method:"net_version"},((e,n)=>{e?(console.error(e),t(null)):t((0,Te.convertNetworkId)(n))}))})),this.deprecatedNetworkVersions[t]=o}return{chainId:r,networkVersion:o??"loading"}}getState(){const{vault:e}=this.keyringController.state,t=Boolean(e),n=this.memStore.getFlatState();return{isInitialized:t,...(0,Kt.sanitizeUIState)(n)}}getApi(){const{accountsController:e,addressBookController:t,alertController:n,appStateController:r,keyringController:s,nftController:o,nftDetectionController:a,currencyRateController:i,tokenBalancesController:l,tokenDetectionController:c,ensController:d,tokenListController:u,gasFeeController:h,metaMetricsController:p,networkController:m,announcementController:g,onboardingController:f,permissionController:C,preferencesController:y,tokensController:w,smartTransactionsController:v,txController:b,assetsContractController:k,backup:A,approvalController:T,phishingController:E,tokenRatesController:M,accountTrackerController:P,authenticationController:_,userStorageController:I,notificationServicesController:N,notificationServicesPushController:R}=this;return{getState:this.getState.bind(this),setCurrentCurrency:i.setCurrentCurrency.bind(i),setUseBlockie:y.setUseBlockie.bind(y),setUseNonceField:y.setUseNonceField.bind(y),setUsePhishDetect:y.setUsePhishDetect.bind(y),setUseMultiAccountBalanceChecker:y.setUseMultiAccountBalanceChecker.bind(y),setUseSafeChainsListValidation:y.setUseSafeChainsListValidation.bind(y),setUseTokenDetection:y.setUseTokenDetection.bind(y),setUseNftDetection:y.setUseNftDetection.bind(y),setUse4ByteResolution:y.setUse4ByteResolution.bind(y),setUseCurrencyRateCheck:y.setUseCurrencyRateCheck.bind(y),setOpenSeaEnabled:y.setOpenSeaEnabled.bind(y),getUseRequestQueue:this.preferencesController.getUseRequestQueue.bind(this.preferencesController),getProviderConfig:()=>(0,Ie.getProviderConfig)({metamask:this.networkController.state}),grantPermissionsIncremental:this.permissionController.grantPermissionsIncremental.bind(this.permissionController),grantPermissions:this.permissionController.grantPermissions.bind(this.permissionController),setSecurityAlertsEnabled:y.setSecurityAlertsEnabled.bind(y),setAddSnapAccountEnabled:y.setAddSnapAccountEnabled.bind(y),setBitcoinSupportEnabled:y.setBitcoinSupportEnabled.bind(y),setBitcoinTestnetSupportEnabled:y.setBitcoinTestnetSupportEnabled.bind(y),setUseExternalNameSources:y.setUseExternalNameSources.bind(y),setUseTransactionSimulations:y.setUseTransactionSimulations.bind(y),setUseRequestQueue:this.setUseRequestQueue.bind(this),setIpfsGateway:y.setIpfsGateway.bind(y),setIsIpfsGatewayEnabled:y.setIsIpfsGatewayEnabled.bind(y),setUseAddressBarEnsResolution:y.setUseAddressBarEnsResolution.bind(y),setParticipateInMetaMetrics:p.setParticipateInMetaMetrics.bind(p),setDataCollectionForMarketing:p.setDataCollectionForMarketing.bind(p),setMarketingCampaignCookieId:p.setMarketingCampaignCookieId.bind(p),setCurrentLocale:y.setCurrentLocale.bind(y),setIncomingTransactionsPreferences:y.setIncomingTransactionsPreferences.bind(y),setServiceWorkerKeepAlivePreference:y.setServiceWorkerKeepAlivePreference.bind(y),markPasswordForgotten:this.markPasswordForgotten.bind(this),unMarkPasswordForgotten:this.unMarkPasswordForgotten.bind(this),getRequestAccountTabIds:this.getRequestAccountTabIds,getOpenMetamaskTabsIds:this.getOpenMetamaskTabsIds,markNotificationPopupAsAutomaticallyClosed:()=>this.notificationManager.markAsAutomaticallyClosed(),requestUserApproval:T.addAndShowApprovalRequest.bind(T),addNewAccount:this.addNewAccount.bind(this),getSeedPhrase:this.getSeedPhrase.bind(this),resetAccount:this.resetAccount.bind(this),removeAccount:this.removeAccount.bind(this),importAccountWithStrategy:this.importAccountWithStrategy.bind(this),getNextAvailableAccountName:e.getNextAvailableAccountName.bind(e),getAccountsBySnapId:e=>(0,Et.getAccountsBySnapId)(this,e),connectHardware:this.connectHardware.bind(this),forgetDevice:this.forgetDevice.bind(this),checkHardwareStatus:this.checkHardwareStatus.bind(this),getDeviceNameForMetric:this.getDeviceNameForMetric.bind(this),unlockHardwareWalletAccount:this.unlockHardwareWalletAccount.bind(this),attemptLedgerTransportCreation:this.attemptLedgerTransportCreation.bind(this),submitQRHardwareCryptoHDKey:s.submitQRCryptoHDKey.bind(s),submitQRHardwareCryptoAccount:s.submitQRCryptoAccount.bind(s),cancelSyncQRHardware:s.cancelQRSynchronization.bind(s),submitQRHardwareSignature:s.submitQRSignature.bind(s),cancelQRHardwareSignRequest:s.cancelQRSignRequest.bind(s),submitPassword:this.submitPassword.bind(this),verifyPassword:this.verifyPassword.bind(this),setActiveNetwork:e=>this.networkController.setActiveNetwork(e),setActiveNetworkConfigurationId:e=>{this.networkController.setActiveNetwork(e)},setNetworkClientIdForDomain:(e,t)=>this.selectedNetworkController.setNetworkClientIdForDomain(e,t),rollbackToPreviousProvider:m.rollbackToPreviousProvider.bind(m),addNetwork:this.networkController.addNetwork.bind(this.networkController),updateNetwork:this.networkController.updateNetwork.bind(this.networkController),removeNetwork:this.networkController.removeNetwork.bind(this.networkController),getCurrentNetworkEIP1559Compatibility:this.networkController.getEIP1559Compatibility.bind(this.networkController),getNetworkConfigurationByNetworkClientId:this.networkController.getNetworkConfigurationByNetworkClientId.bind(this.networkController),setSelectedAddress:e=>{const t=this.accountsController.getAccountByAddress(e);if(!t)throw new Error(`No account found for address: ${e}`);this.accountsController.setSelectedAccount(t.id)},toggleExternalServices:this.toggleExternalServices.bind(this),addToken:w.addToken.bind(w),updateTokenType:w.updateTokenType.bind(w),setFeatureFlag:y.setFeatureFlag.bind(y),setPreference:y.setPreference.bind(y),addKnownMethodData:y.addKnownMethodData.bind(y),setDismissSeedBackUpReminder:y.setDismissSeedBackUpReminder.bind(y),setOverrideContentSecurityPolicyHeader:y.setOverrideContentSecurityPolicyHeader.bind(y),setAdvancedGasFee:y.setAdvancedGasFee.bind(y),setTheme:y.setTheme.bind(y),setSnapsAddSnapAccountModalDismissed:y.setSnapsAddSnapAccountModalDismissed.bind(y),setSelectedInternalAccount:e=>{this.accountsController.getAccount(e)&&this.accountsController.setSelectedAccount(e)},setAccountName:e.setAccountName.bind(e),setAccountLabel:(e,t)=>{const n=this.accountsController.getAccountByAddress(e);if(n===undefined)throw new Error(`No account found for address: ${e}`);this.accountsController.setAccountName(n.id,t)},getTokenStandardAndDetails:this.getTokenStandardAndDetails.bind(this),getTokenSymbol:this.getTokenSymbol.bind(this),addNft:o.addNft.bind(o),addNftVerifyOwnership:o.addNftVerifyOwnership.bind(o),removeAndIgnoreNft:o.removeAndIgnoreNft.bind(o),removeNft:o.removeNft.bind(o),checkAndUpdateAllNftsOwnershipStatus:o.checkAndUpdateAllNftsOwnershipStatus.bind(o),checkAndUpdateSingleNftOwnershipStatus:o.checkAndUpdateSingleNftOwnershipStatus.bind(o),getNFTContractInfo:o.getNFTContractInfo.bind(o),isNftOwner:o.isNftOwner.bind(o),setAddressBook:t.set.bind(t),removeFromAddressBook:t.delete.bind(t),setLastActiveTime:r.setLastActiveTime.bind(r),setCurrentExtensionPopupId:r.setCurrentExtensionPopupId.bind(r),setDefaultHomeActiveTabName:r.setDefaultHomeActiveTabName.bind(r),setConnectedStatusPopoverHasBeenShown:r.setConnectedStatusPopoverHasBeenShown.bind(r),setRecoveryPhraseReminderHasBeenShown:r.setRecoveryPhraseReminderHasBeenShown.bind(r),setRecoveryPhraseReminderLastShown:r.setRecoveryPhraseReminderLastShown.bind(r),setTermsOfUseLastAgreed:r.setTermsOfUseLastAgreed.bind(r),setSurveyLinkLastClickedOrClosed:r.setSurveyLinkLastClickedOrClosed.bind(r),setOnboardingDate:r.setOnboardingDate.bind(r),setLastViewedUserSurvey:r.setLastViewedUserSurvey.bind(r),setNewPrivacyPolicyToastClickedOrClosed:r.setNewPrivacyPolicyToastClickedOrClosed.bind(r),setNewPrivacyPolicyToastShownDate:r.setNewPrivacyPolicyToastShownDate.bind(r),setSnapsInstallPrivacyWarningShownStatus:r.setSnapsInstallPrivacyWarningShownStatus.bind(r),setOutdatedBrowserWarningLastShown:r.setOutdatedBrowserWarningLastShown.bind(r),setShowTestnetMessageInDropdown:r.setShowTestnetMessageInDropdown.bind(r),setShowBetaHeader:r.setShowBetaHeader.bind(r),setShowPermissionsTour:r.setShowPermissionsTour.bind(r),setShowAccountBanner:r.setShowAccountBanner.bind(r),setShowNetworkBanner:r.setShowNetworkBanner.bind(r),updateNftDropDownState:r.updateNftDropDownState.bind(r),setFirstTimeUsedNetwork:r.setFirstTimeUsedNetwork.bind(r),setSwitchedNetworkDetails:r.setSwitchedNetworkDetails.bind(r),clearSwitchedNetworkDetails:r.clearSwitchedNetworkDetails.bind(r),setSwitchedNetworkNeverShowMessage:r.setSwitchedNetworkNeverShowMessage.bind(r),getLastInteractedConfirmationInfo:r.getLastInteractedConfirmationInfo.bind(r),setLastInteractedConfirmationInfo:r.setLastInteractedConfirmationInfo.bind(r),tryReverseResolveAddress:d.reverseResolveAddress.bind(d),setLocked:this.setLocked.bind(this),createNewVaultAndKeychain:this.createNewVaultAndKeychain.bind(this),createNewVaultAndRestore:this.createNewVaultAndRestore.bind(this),exportAccount:this.exportAccount.bind(this),updateTransaction:b.updateTransaction.bind(b),approveTransactionsWithSameNonce:b.approveTransactionsWithSameNonce.bind(b),createCancelTransaction:this.createCancelTransaction.bind(this),createSpeedUpTransaction:this.createSpeedUpTransaction.bind(this),estimateGas:this.estimateGas.bind(this),estimateGasFee:b.estimateGasFee.bind(b),getNextNonce:this.getNextNonce.bind(this),addTransaction:(e,t)=>(0,Pt.addTransaction)(this.getAddTransactionRequest({transactionParams:e,transactionOptions:t,waitForSubmit:!1})),addTransactionAndWaitForPublish:(e,t)=>(0,Pt.addTransaction)(this.getAddTransactionRequest({transactionParams:e,transactionOptions:t,waitForSubmit:!0})),createTransactionEventFragment:je.createTransactionEventFragmentWithTxId.bind(null,this.getTransactionMetricsRequest()),getTransactions:this.txController.getTransactions.bind(this.txController),updateEditableParams:this.txController.updateEditableParams.bind(this.txController),updateTransactionGasFees:b.updateTransactionGasFees.bind(b),updateTransactionSendFlowHistory:b.updateTransactionSendFlowHistory.bind(b),updatePreviousGasParams:b.updatePreviousGasParams.bind(b),abortTransactionSigning:b.abortTransactionSigning.bind(b),getLayer1GasFee:b.getLayer1GasFee.bind(b),decryptMessage:this.decryptMessageController.decryptMessage.bind(this.decryptMessageController),decryptMessageInline:this.decryptMessageController.decryptMessageInline.bind(this.decryptMessageController),cancelDecryptMessage:this.decryptMessageController.cancelDecryptMessage.bind(this.decryptMessageController),encryptionPublicKey:this.encryptionPublicKeyController.encryptionPublicKey.bind(this.encryptionPublicKeyController),cancelEncryptionPublicKey:this.encryptionPublicKeyController.cancelEncryptionPublicKey.bind(this.encryptionPublicKeyController),setSeedPhraseBackedUp:f.setSeedPhraseBackedUp.bind(f),completeOnboarding:f.completeOnboarding.bind(f),setFirstTimeFlowType:f.setFirstTimeFlowType.bind(f),setAlertEnabledness:n.setAlertEnabledness.bind(n),setUnconnectedAccountAlertShown:n.setUnconnectedAccountAlertShown.bind(n),setWeb3ShimUsageAlertDismissed:n.setWeb3ShimUsageAlertDismissed.bind(n),removePermissionsFor:this.removePermissionsFor,approvePermissionsRequest:this.acceptPermissionsRequest,rejectPermissionsRequest:this.rejectPermissionsRequest,...(0,yt.getPermissionBackgroundApiMethods)(C),disableSnap:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:disable"),enableSnap:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:enable"),updateSnap:(e,t)=>(this.controllerMessenger.call("SnapController:install",e,t),null),removeSnap:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:remove"),handleSnapRequest:this.handleSnapRequest.bind(this),revokeDynamicSnapPermissions:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:revokeDynamicPermissions"),disconnectOriginFromSnap:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:disconnectOrigin"),updateNetworksList:this.updateNetworksList.bind(this),updateAccountsList:this.updateAccountsList.bind(this),updateHiddenAccountsList:this.updateHiddenAccountsList.bind(this),getPhishingResult:async e=>(await E.maybeUpdateState(),E.test(e)),deleteInterface:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:deleteInterface"),updateInterfaceState:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:updateInterfaceState"),fetchAndSetQuotes:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:fetchAndSetQuotes"),setSelectedQuoteAggId:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSelectedQuoteAggId"),resetSwapsState:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:resetSwapsState"),setSwapsTokens:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsTokens"),clearSwapsQuotes:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:clearSwapsQuotes"),setApproveTxId:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setApproveTxId"),setTradeTxId:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setTradeTxId"),setSwapsTxGasPrice:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsTxGasPrice"),setSwapsTxGasLimit:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsTxGasLimit"),setSwapsTxMaxFeePerGas:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsTxMaxFeePerGas"),setSwapsTxMaxFeePriorityPerGas:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsTxMaxFeePriorityPerGas"),safeRefetchQuotes:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:safeRefetchQuotes"),stopPollingForQuotes:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:stopPollingForQuotes"),setBackgroundSwapRouteState:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setBackgroundSwapRouteState"),resetPostFetchState:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:resetPostFetchState"),setSwapsErrorKey:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsErrorKey"),setInitialGasEstimate:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setInitialGasEstimate"),setCustomApproveTxData:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setCustomApproveTxData"),setSwapsLiveness:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsLiveness"),setSwapsFeatureFlags:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsFeatureFlags"),setSwapsUserFeeLevel:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsUserFeeLevel"),setSwapsQuotesPollingLimitEnabled:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsQuotesPollingLimitEnabled"),[Ft.BridgeBackgroundAction.SET_FEATURE_FLAGS]:this.controllerMessenger.call.bind(this.controllerMessenger,`${$t.BRIDGE_CONTROLLER_NAME}:${Ft.BridgeBackgroundAction.SET_FEATURE_FLAGS}`),[Ft.BridgeBackgroundAction.RESET_STATE]:this.controllerMessenger.call.bind(this.controllerMessenger,`${$t.BRIDGE_CONTROLLER_NAME}:${Ft.BridgeBackgroundAction.RESET_STATE}`),[Ft.BridgeBackgroundAction.GET_BRIDGE_ERC20_ALLOWANCE]:this.controllerMessenger.call.bind(this.controllerMessenger,`${$t.BRIDGE_CONTROLLER_NAME}:${Ft.BridgeBackgroundAction.GET_BRIDGE_ERC20_ALLOWANCE}`),[Ft.BridgeUserAction.SELECT_SRC_NETWORK]:this.controllerMessenger.call.bind(this.controllerMessenger,`${$t.BRIDGE_CONTROLLER_NAME}:${Ft.BridgeUserAction.SELECT_SRC_NETWORK}`),[Ft.BridgeUserAction.SELECT_DEST_NETWORK]:this.controllerMessenger.call.bind(this.controllerMessenger,`${$t.BRIDGE_CONTROLLER_NAME}:${Ft.BridgeUserAction.SELECT_DEST_NETWORK}`),[Ft.BridgeUserAction.UPDATE_QUOTE_PARAMS]:this.controllerMessenger.call.bind(this.controllerMessenger,`${$t.BRIDGE_CONTROLLER_NAME}:${Ft.BridgeUserAction.UPDATE_QUOTE_PARAMS}`),[Oe.BridgeStatusAction.START_POLLING_FOR_BRIDGE_TX_STATUS]:this.controllerMessenger.call.bind(this.controllerMessenger,`${Wt.BRIDGE_STATUS_CONTROLLER_NAME}:${Oe.BridgeStatusAction.START_POLLING_FOR_BRIDGE_TX_STATUS}`),fetchSmartTransactionFees:v.getFees.bind(v),clearSmartTransactionFees:v.clearFees.bind(v),submitSignedTransactions:v.submitSignedTransactions.bind(v),cancelSmartTransaction:v.cancelSmartTransaction.bind(v),fetchSmartTransactionsLiveness:v.fetchLiveness.bind(v),updateSmartTransaction:v.updateSmartTransaction.bind(v),setStatusRefreshInterval:v.setStatusRefreshInterval.bind(v),trackMetaMetricsEvent:p.trackEvent.bind(p),trackMetaMetricsPage:p.trackPage.bind(p),createEventFragment:p.createEventFragment.bind(p),updateEventFragment:p.updateEventFragment.bind(p),finalizeEventFragment:p.finalizeEventFragment.bind(p),trackInsightSnapView:this.trackInsightSnapView.bind(this),resolvePendingApproval:this.resolvePendingApproval,rejectPendingApproval:this.rejectPendingApproval,resetViewedNotifications:g.resetViewed.bind(g),updateViewedNotifications:g.updateViewed.bind(g),currencyRateStartPolling:i.startPolling.bind(i),currencyRateStopPollingByPollingToken:i.stopPollingByPollingToken.bind(i),tokenRatesStartPolling:M.startPolling.bind(M),tokenRatesStopPollingByPollingToken:M.stopPollingByPollingToken.bind(M),accountTrackerStartPolling:P.startPollingByNetworkClientId.bind(P),accountTrackerStopPollingByPollingToken:P.stopPollingByPollingToken.bind(P),tokenDetectionStartPolling:c.startPolling.bind(c),tokenDetectionStopPollingByPollingToken:c.stopPollingByPollingToken.bind(c),tokenListStartPolling:u.startPolling.bind(u),tokenListStopPollingByPollingToken:u.stopPollingByPollingToken.bind(u),tokenBalancesStartPolling:l.startPolling.bind(l),tokenBalancesStopPollingByPollingToken:l.stopPollingByPollingToken.bind(l),gasFeeStartPolling:h.startPolling.bind(h),gasFeeStopPollingByPollingToken:h.stopPollingByPollingToken.bind(h),getGasFeeTimeEstimate:h.getTimeEstimate.bind(h),addPollingTokenToAppState:r.addPollingToken.bind(r),removePollingTokenFromAppState:r.removePollingToken.bind(r),backupUserData:A.backupUserData.bind(A),restoreUserData:A.restoreUserData.bind(A),detectTokens:c.detectTokens.bind(c),detectNfts:a.detectNfts.bind(a),addDetectedTokens:w.addDetectedTokens.bind(w),addImportedTokens:w.addTokens.bind(w),ignoreTokens:w.ignoreTokens.bind(w),getBalancesInSingleCall:k.getBalancesInSingleCall.bind(k),performSignIn:_.performSignIn.bind(_),performSignOut:_.performSignOut.bind(_),enableProfileSyncing:I.enableProfileSyncing.bind(I),disableProfileSyncing:I.disableProfileSyncing.bind(I),setIsProfileSyncingEnabled:I.setIsProfileSyncingEnabled.bind(I),syncInternalAccountsWithUserStorage:I.syncInternalAccountsWithUserStorage.bind(I),deleteAccountSyncingDataFromUserStorage:I.performDeleteStorageAllFeatureEntries.bind(I),checkAccountsPresence:N.checkAccountsPresence.bind(N),createOnChainTriggers:N.createOnChainTriggers.bind(N),deleteOnChainTriggersByAccount:N.deleteOnChainTriggersByAccount.bind(N),updateOnChainTriggersByAccount:N.updateOnChainTriggersByAccount.bind(N),fetchAndUpdateMetamaskNotifications:N.fetchAndUpdateMetamaskNotifications.bind(N),deleteNotificationsById:N.deleteNotificationsById.bind(N),getNotificationsByType:N.getNotificationsByType.bind(N),markMetamaskNotificationsAsRead:N.markMetamaskNotificationsAsRead.bind(N),setFeatureAnnouncementsEnabled:N.setFeatureAnnouncementsEnabled.bind(N),enablePushNotifications:R.enablePushNotifications.bind(R),disablePushNotifications:R.disablePushNotifications.bind(R),updateTriggerPushNotifications:R.updateTriggerPushNotifications.bind(R),enableMetamaskNotifications:N.enableMetamaskNotifications.bind(N),disableMetamaskNotifications:N.disableNotificationServices.bind(N),throwTestError:this.throwTestError.bind(this),updateProposedNames:this.nameController.updateProposedNames.bind(this.nameController),setName:this.nameController.setName.bind(this.nameController),multichainUpdateBalance:e=>this.multichainBalancesController.updateBalance(e),multichainUpdateBalances:()=>this.multichainBalancesController.updateBalances(),decodeTransactionData:e=>(0,Ut.decodeTransactionData)({...e,ethQuery:new S.default(this.provider)}),createMetaMetricsDataDeletionTask:this.metaMetricsDataDeletionController.createMetaMetricsDataDeletionTask.bind(this.metaMetricsDataDeletionController),updateDataDeletionTaskStatus:this.metaMetricsDataDeletionController.updateDataDeletionTaskStatus.bind(this.metaMetricsDataDeletionController),endTrace:Ne.endTrace}}async exportAccount(e,t){return await this.verifyPassword(t),this.keyringController.exportAccount(t,e)}async getTokenStandardAndDetails(e,t,n){var r,s;const{tokenList:o}=this.tokenListController.state,{tokens:a}=this.tokensController.state,i={...ke.STATIC_MAINNET_TOKEN_LIST[null==e?void 0:e.toLowerCase()]||{},...o[e.toLowerCase()]||{},...a.find((({address:t})=>(0,ve.isEqualCaseInsensitive)(t,e)))||{}},l=(0,ve.isEqualCaseInsensitive)(i.standard,ae.TokenStandard.ERC20)||!0===i.erc20,c=!(n||(0,ve.isEqualCaseInsensitive)(i.standard,ae.TokenStandard.ERC1155)||(0,ve.isEqualCaseInsensitive)(i.standard,ae.TokenStandard.ERC721)||i.erc721),d=i.decimals!==undefined&&i.symbol;let u;if(l||c&&d)try{const n=t?await(0,we.fetchTokenBalance)(e,t,this.provider):undefined;u={address:e,balance:n,standard:ae.TokenStandard.ERC20,decimals:i.decimals,symbol:i.symbol}}catch(e){C.default.warn(`Failed to get token balance. Error: ${e}`)}u===undefined&&(u=await this.assetsContractController.getTokenStandardAndDetails(e,t,n));if((0,ve.isEqualCaseInsensitive)(u.standard,ae.TokenStandard.ERC1155))try{const r=await(0,we.fetchERC1155Balance)(e,t,n,this.provider),s=null!=r&&r._hex?parseInt(r._hex,16).toString():null;u={...u,balance:s}}catch(e){C.default.warn("Failed to get token balance. Error:",e)}return{...u,decimals:null===(r=u)||void 0===r||null===(r=r.decimals)||void 0===r?void 0:r.toString(10),balance:null===(s=u)||void 0===s||null===(s=s.balance)||void 0===s?void 0:s.toString(10)}}async getTokenSymbol(e){try{const t=await this.assetsContractController.getTokenStandardAndDetails(e);return null==t?void 0:t.symbol}catch(e){return null}}async createNewVaultAndKeychain(e){const t=await this.createVaultMutex.acquire();try{return await this.keyringController.createNewVaultAndKeychain(e)}finally{t()}}async createNewVaultAndRestore(e,n){const r=await this.createVaultMutex.acquire();try{const{completedOnboarding:r}=this.onboardingController.state,s=t.from(n);this.permissionController.clearState(),this.snapController.clearState(),this.accountTrackerController.clearAccounts(),this.txController.clearUnapprovedTransactions(),r&&this.tokenDetectionController.enable(),await this.keyringController.createNewVaultAndRestore(e,this._convertMnemonicToWordlistIndices(s)),r&&(await this._addAccountsWithBalance(),this.setLedgerTransportPreference())}finally{r()}}async _addAccountsWithBalance(){try{const n=(0,Ie.getCurrentChainId)({metamask:this.networkController.state}),r=new S.default(this.provider),s=await this.keyringController.getAccounts();let o=s[s.length-1];for(let a=s.length;;a++){if("0x0"===await this.getBalance(o,r)){var e,t;await this.tokenDetectionController.detectTokens({chainIds:[n],selectedAddress:o});const r=null===(e=this.tokensController.state.allTokens)||void 0===e||null===(e=e[n])||void 0===e?void 0:e[o],s=null===(t=this.tokensController.state.allDetectedTokens)||void 0===t||null===(t=t[n])||void 0===t?void 0:t[o];if(0===((null==r?void 0:r.length)??0)&&0===((null==s?void 0:s.length)??0)){1!==a&&await this.removeAccount(o);break}}o=await this.keyringController.addNewAccount(a)}}catch(e){C.default.warn(`Failed to add accounts with balance. Error: ${e}`)}finally{await this.userStorageController.setIsAccountSyncingReadyToBeDispatched(!0)}}_convertMnemonicToWordlistIndices(e){const t=e.toString().split(" ").map((e=>z.wordlist.indexOf(e)));return new Uint8Array(new Uint16Array(t).buffer)}_convertEnglishWordlistIndicesToCodepoints(e){return t.from(Array.from(new Uint16Array(e.buffer)).map((e=>z.wordlist[e])).join(" "))}getBalance(e,t){return new Promise(((n,r)=>{const s=this.accountTrackerController.state.accounts[e];s&&s.balance?n(s.balance):t.getBalance(e,((e,t)=>{e?(r(e),C.default.error(e)):n(t||"0x0")}))}))}async submitPassword(e){const{completedOnboarding:t}=this.onboardingController.state;await this.offscreenPromise,await this.keyringController.submitPassword(e);try{await this.blockTracker.checkForLatestBlock()}catch(e){C.default.error("Error while unlocking extension.",e)}await this.accountsController.updateAccounts(),t&&this.setLedgerTransportPreference()}async _loginUser(e){try{await this.submitPassword(e),await this.accountTrackerController.updateAccountsAllActiveNetworks()}finally{this._startUISync()}}_startUISync(){this.emit("startUISync"),this.startUISync=!0,this.memStore.subscribe(this.sendUpdate.bind(this))}async submitEncryptionKey(){try{const{loginToken:e,loginSalt:t}=await this.extension.storage.session.get(["loginToken","loginSalt"]);if(e&&t){const{vault:n}=this.keyringController.state;if(JSON.parse(n).salt!==t)return console.warn("submitEncryptionKey: Stored salt and vault salt do not match"),void await this.clearLoginArtifacts();await this.keyringController.submitEncryptionKey(e,t)}}catch(e){throw await this.clearLoginArtifacts(),e}}async clearLoginArtifacts(){await this.extension.storage.session.remove(["loginToken","loginSalt"])}async verifyPassword(e){await this.keyringController.verifyPassword(e)}getPrimaryKeyringMnemonic(){const[e]=this.keyringController.getKeyringsByType(ue.KeyringType.hdKeyTree);if(!e.mnemonic)throw new Error("Primary keyring mnemonic unavailable.");return e.mnemonic}async getKeyringForDevice(e,t=null){var n,r,s,o;const a=null===(n=this.opts.overrides)||void 0===n?void 0:n.keyrings;let i=null;switch(e){case de.HardwareDeviceNames.trezor:i=(null==a||null===(r=a.trezor)||void 0===r?void 0:r.type)||y.TrezorKeyring.type;break;case de.HardwareDeviceNames.ledger:i=(null==a||null===(s=a.ledger)||void 0===s?void 0:s.type)||w.LedgerKeyring.type;break;case de.HardwareDeviceNames.qr:i=k.MetaMaskKeyring.type;break;case de.HardwareDeviceNames.lattice:i=(null==a||null===(o=a.lattice)||void 0===o?void 0:o.type)||v.default.type;break;default:throw new Error("MetamaskController:getKeyringForDevice - Unknown device")}console.log("getting kerying by name ",i);let[l]=await this.keyringController.getKeyringsByType(i);if(l||(console.log("adding new keyring ",i),l=await this.keyringController.addNewKeyring(i)),t&&l.setHdPath&&l.setHdPath(t),e===de.HardwareDeviceNames.lattice&&(l.appName="MetaMask"),e===de.HardwareDeviceNames.trezor){const e=l.getModel();this.appStateController.setTrezorModel(e)}return l.network=(0,Ie.getProviderConfig)({metamask:this.networkController.state}).type,l}async attemptLedgerTransportCreation(){const e=await this.getKeyringForDevice(de.HardwareDeviceNames.ledger);return await e.attemptMakeApp()}async connectHardware(e,t,n){console.log("in connect hardware for ",e," hd path ",n);const r=await this.getKeyringForDevice(e,n);console.log("got keyring for device"),e===de.HardwareDeviceNames.ledger&&await this.setLedgerTransportPreference(r);let s=[];switch(console.log("page is ",t),t){case-1:s=await r.getPreviousPage();break;case 1:s=await r.getNextPage();break;default:s=await r.getFirstPage()}console.log("getting accounts from keyring controller");const o=await this.keyringController.getAccounts(),a=[...new Set(o.concat(s.map((e=>e.address.toLowerCase()))))];return console.log("syncing accounts with addresses"),this.accountTrackerController.syncWithAddresses(a),console.log("returning accounts in connect hardware ",s),s}async checkHardwareStatus(e,t){return(await this.getKeyringForDevice(e,t)).isUnlocked()}async getDeviceNameForMetric(e,t){if(e===de.HardwareDeviceNames.trezor){const n=await this.getKeyringForDevice(e,t),{minorVersion:r}=n.bridge;if(r&&r===en)return de.HardwareDeviceNames.oneKeyViaTrezor}return e}async forgetDevice(e){const t=await this.getKeyringForDevice(e);for(const e of t.accounts)await this.removeAccount(e);return t.forgetDevice(),!0}async getAccountType(e){switch(await this.keyringController.getAccountKeyringType(e)){case ue.KeyringType.trezor:case ue.KeyringType.lattice:case ue.KeyringType.qr:case ue.KeyringType.ledger:return"hardware";case ue.KeyringType.imported:return"imported";case ue.KeyringType.snap:return"snap";default:return"MetaMask"}}async getDeviceModel(e){const t=await this.keyringController.getKeyringForAccount(e);switch(t.type){case ue.KeyringType.trezor:return t.getModel();case ue.KeyringType.qr:return t.getName();case ue.KeyringType.ledger:return de.HardwareDeviceNames.ledger;case ue.KeyringType.lattice:return de.HardwareDeviceNames.lattice;default:return undefined}}getAccountLabel(e,t,n){return`${e[0].toUpperCase()}${e.slice(1)} ${parseInt(t,10)+1} ${n||""}`.trim()}async unlockHardwareWalletAccount(e,t,n,r){const s=await this.getKeyringForDevice(t,n);s.setAccountToUnlock(e);const o=await this.keyringController.addNewAccountForKeyring(s),a=this.getAccountLabel(t===de.HardwareDeviceNames.qr?s.getName():t,e,r);this.preferencesController.setAccountLabel(o,a),this.preferencesController.setSelectedAddress(o);const i=this.accountsController.getAccountByAddress(o);this.accountsController.setAccountName(i.id,a);const l=this.accountsController.listAccounts(),{identities:c}=this.preferencesController.state;return{unlockedAccount:o,identities:c,accounts:l}}async addNewAccount(e){const t=await this.keyringController.getAccounts(),n=await this.keyringController.addNewAccount(e);return t.includes(n)||this.preferencesController.setSelectedAddress(n),n}async getSeedPhrase(e){return this._convertEnglishWordlistIndicesToCodepoints(await this.keyringController.exportSeedPhrase(e))}async resetAccount(){const e=this.accountsController.getSelectedAccount().address;return this.txController.wipeTransactions(!1,e),this.smartTransactionsController.wipeSmartTransactions({address:e,ignoreNetwork:!1}),this.bridgeStatusController.wipeBridgeStatus({address:e,ignoreNetwork:!1}),this.networkController.resetConnection(),e}async getPermittedAccounts(e,{suppressUnauthorizedError:t=!0}={}){try{return await this.permissionController.executeRestrictedMethod(e,he.RestrictedMethods.eth_accounts)}catch(e){if(t&&e.code===g.errorCodes.provider.unauthorized)return[];throw e}}removeAllChainIdPermissions(e){this.permissionController.updatePermissionsByCaveat(he.CaveatTypes.restrictNetworkSwitching,(t=>yt.CaveatMutatorFactories[he.CaveatTypes.restrictNetworkSwitching].removeChainId(e,t)))}removeAllAccountPermissions(e){this.permissionController.updatePermissionsByCaveat(he.CaveatTypes.restrictReturnedAccounts,(t=>yt.CaveatMutatorFactories[he.CaveatTypes.restrictReturnedAccounts].removeAccount(e,t)))}async removeAccount(e){this.removeAllAccountPermissions(e);const t=await this.keyringController.getKeyringForAccount(e);await this.keyringController.removeAccount(e);const n=t?await t.getAccounts():{};var r;0===(null==n?void 0:n.length)&&(null===(r=t.destroy)||void 0===r||r.call(t));return e}async importAccountWithStrategy(e,t){const n=await this.keyringController.importAccountWithStrategy(e,t);this.preferencesController.setSelectedAddress(n)}getAddTransactionRequest({transactionParams:e,transactionOptions:t,dappRequest:n,...r}){var s;return{internalAccounts:this.accountsController.listAccounts(),dappRequest:n,networkClientId:(null==n?void 0:n.networkClientId)??this.networkController.state.selectedNetworkClientId,selectedAccount:this.accountsController.getAccountByAddress(e.from),transactionController:this.txController,transactionOptions:t,transactionParams:e,userOperationController:this.userOperationController,chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state}),ppomController:this.ppomController,securityAlertsEnabled:null===(s=this.preferencesController.state)||void 0===s?void 0:s.securityAlertsEnabled,updateSecurityAlertResponse:this.updateSecurityAlertResponse.bind(this),...r}}async getCurrentAccountEIP1559Compatibility(){return!0}async createCancelTransaction(e,t,n){await this.txController.stopTransaction(e,t,n);return this.getState()}async createSpeedUpTransaction(e,t,n){await this.txController.speedUpTransaction(e,t,n);return this.getState()}async estimateGas(e){return new Promise(((t,n)=>new A.default(this.provider).estimateGas(e,((e,r)=>e?n(e):t(r.toString(16))))))}async updateSecurityAlertResponse(e,t,n){await(0,Bt.updateSecurityAlertResponse)({appStateController:this.appStateController,method:e,securityAlertId:t,securityAlertResponse:n,signatureController:this.signatureController,transactionController:this.txController})}markPasswordForgotten(){this.preferencesController.setPasswordForgotten(!0),this.sendUpdate()}unMarkPasswordForgotten(){this.preferencesController.setPasswordForgotten(!1),this.sendUpdate()}setUseRequestQueue(e){this.preferencesController.setUseRequestQueue(e)}setupUntrustedCommunicationEip1193({connectionStream:e,sender:t,subjectType:n}){if(t.url&&this.onboardingController.state.completedOnboarding&&this.preferencesController.state.usePhishDetect){const{hostname:n}=new URL(t.url);this.phishingController.maybeUpdateState();const r=this.phishingController.test(t.url);if(null!=r&&r.result)return this.sendPhishingWarning(e,n),void this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.PhishingPageDisplayed,category:fe.MetaMetricsEventCategory.Phishing,properties:{url:n}})}let r;r=n||(t.id&&t.id!==this.extension.runtime.id?B.SubjectType.Extension:B.SubjectType.Website);const s=(0,nt.setupMultiplex)(e);this.setupProviderConnectionEip1193(s.createStream("metamask-provider"),t,r),t.url&&this.setupPublicConfig(s.createStream("publicConfig"))}setupUntrustedCommunicationCaip({connectionStream:e,sender:t,subjectType:n}){let r;r=n||(t.id&&t.id!==this.extension.runtime.id?B.SubjectType.Extension:B.SubjectType.Website);const s=(0,Me.createCaipStream)(e);this.setupProviderConnectionCaip(s,t,r)}setupTrustedCommunication(e,t){const n=(0,nt.setupMultiplex)(e);this.setupControllerConnection(n.createStream("controller")),this.setupProviderConnectionEip1193(n.createStream("provider"),t,B.SubjectType.Internal)}setupPhishingCommunication({connectionStream:e}){const{usePhishDetect:t}=this.preferencesController.state;if(!t)return;const n=(0,nt.setupMultiplex)(e).createStream("metamask-phishing-safelist");n.on("data",(0,ht.default)({safelistPhishingDomain:this.safelistPhishingDomain.bind(this),backToSafetyPhishingWarning:this.backToSafetyPhishingWarning.bind(this)},n))}setUpCookieHandlerCommunication({connectionStream:e}){const{metaMetricsId:t,dataCollectionForMarketing:n,participateInMetaMetrics:r}=this.metaMetricsController.state;if(t&&n&&r){const t=(0,nt.setupMultiplex)(e).createStream(Ot.METAMASK_COOKIE_HANDLER);t.on("data",(0,ht.default)({getCookieFromMarketingPage:this.getCookieFromMarketingPage.bind(this)},t))}}getCookieFromMarketingPage(e){const{ga_client_id:t}=e;this.metaMetricsController.setMarketingCampaignCookieId(t)}sendPhishingWarning(e,t){(0,nt.setupMultiplex)(e).createStream("phishing").write({hostname:t})}setupControllerConnection(e){const t=new Gt.PatchStore(this.memStore);let n=!1;const r=()=>{if(!(0,nt.isStreamWritable)(e)||!n)return;const r=t.flushPendingPatches();e.write({jsonrpc:"2.0",method:"sendUpdate",params:[r]})},o={...this.getApi(),startPatches:()=>{n=!0,r()},getStatePatches:()=>t.flushPendingPatches()};this.on("update",r),this.activeControllerConnections+=1,this.emit("controllerConnectionChanged",this.activeControllerConnections),e.on("data",(0,ht.default)(o,e));const a=()=>{(0,nt.isStreamWritable)(e)&&e.write({jsonrpc:"2.0",method:"startUISync"})};this.startUISync?a():this.once("startUISync",a);const i=()=>{e.mmFinished||(this.activeControllerConnections-=1,this.emit("controllerConnectionChanged",this.activeControllerConnections),e.mmFinished=!0,this.removeListener("update",r),t.destroy())};e.mmFinished=!1,(0,s.finished)(e,i),e.once("close",i),e.once("end",i)}setupProviderConnectionEip1193(e,t,n){let r,o;r=n===B.SubjectType.Internal?ge.ORIGIN_METAMASK:n===B.SubjectType.Snap?t.snapId:new URL(t.url).origin,t.id&&t.id!==this.extension.runtime.id&&this.subjectMetadataController.addSubjectMetadata({origin:r,extensionId:t.id,subjectType:B.SubjectType.Extension}),t.tab&&t.tab.id&&(o=t.tab.id);let a=r;t.tab&&t.tab.url&&(a=new URL(t.tab.url).origin);const l=this.setupProviderEngineEip1193({origin:r,sender:t,subjectType:n,tabId:o,mainFrameOrigin:a}),c=(0,We.default)(),d=(0,i.createEngineStream)({engine:l}),u=this.addConnection(r,{engine:l});(0,s.pipeline)(e,c,d,e,(e=>{var t;l.destroy(),u&&this.removeConnection(r,u),!e||null!==(t=e.message)&&void 0!==t&&t.match("Premature close")||C.default.error(e)})),n!==B.SubjectType.Internal&&this._notifyChainChangeForConnection({engine:l},r)}setupProviderConnectionCaip(e,t,n){let r,o;r=n===B.SubjectType.Internal?ge.ORIGIN_METAMASK:n===B.SubjectType.Snap?t.snapId:new URL(t.url).origin,t.id&&t.id!==this.extension.runtime.id&&this.subjectMetadataController.addSubjectMetadata({origin:r,extensionId:t.id,subjectType:B.SubjectType.Extension}),t.tab&&t.tab.id&&(o=t.tab.id);const a=this.setupProviderEngineCaip({origin:r,tabId:o}),l=(0,We.default)(),c=(0,i.createEngineStream)({engine:a}),d=this.addConnection(r,{engine:a});(0,s.pipeline)(e,l,c,e,(e=>{a._middleware.forEach((e=>{e.destroy&&"function"==typeof e.destroy&&e.destroy()})),d&&this.removeConnection(r,d),e&&C.default.error(e)})),n!==B.SubjectType.Internal&&this._notifyChainChangeForConnection({engine:a},r)}setupSnapProvider(e,t){this.setupUntrustedCommunicationEip1193({connectionStream:t,sender:{snapId:e},subjectType:B.SubjectType.Snap})}setupProviderEngineEip1193({origin:e,subjectType:t,sender:n,tabId:r,mainFrameOrigin:s}){const o=new a.JsonRpcEngine;o.push((0,Ye.default)({origin:e})),s&&o.push((0,Qe.default)({mainFrameOrigin:s})),o.push((0,U.createSelectedNetworkMiddleware)(this.controllerMessenger));const i=(0,Y.createQueuedRequestMiddleware)({enqueueRequest:this.queuedRequestController.enqueueRequest.bind(this.queuedRequestController),useRequestQueue:this.preferencesController.getUseRequestQueue.bind(this.preferencesController),shouldEnqueueRequest:e=>oe.methodsThatShouldBeEnqueued.includes(e.method)});o.push(i);const l=this.selectedNetworkController.getProviderAndBlockTracker(e),c=(0,p.default)(l),u=(0,m.default)(l);return u.events.on("notification",(e=>o.emit("notification",e))),r&&o.push((0,Xe.default)({tabId:r})),o.push((0,ze.default)({origin:e})),o.push(this.permissionLogController.createMiddleware()),e===Pe.BaseUrl.Portfolio&&o.push((0,xt.createTxVerificationMiddleware)(this.networkController)),o.push((0,qt.default)()),o.push((0,He.createPPOMMiddleware)(this.ppomController,this.preferencesController,this.networkController,this.appStateController,this.accountsController,this.updateSecurityAlertResponse.bind(this))),o.push((0,bt.default)({getAccountType:this.getAccountType.bind(this),getDeviceModel:this.getDeviceModel.bind(this),isConfirmationRedesignEnabled:this.isConfirmationRedesignEnabled.bind(this),isRedesignedConfirmationsDeveloperEnabled:this.isConfirmationRedesignDeveloperEnabled.bind(this),snapAndHardwareMessenger:this.controllerMessenger.getRestricted({name:"SnapAndHardwareMessenger",allowedActions:["KeyringController:getKeyringForAccount","SnapController:get","AccountsController:getSelectedAccount"]}),appStateController:this.appStateController,metaMetricsController:this.metaMetricsController})),o.push((0,Je.createUnsupportedMethodMiddleware)()),o.push((0,Je.createLegacyMethodMiddleware)({getAccounts:this.getPermittedAccounts.bind(this,e)})),t!==B.SubjectType.Internal&&o.push(this.permissionController.createPermissionMiddleware({origin:e})),t===B.SubjectType.Website&&o.push((0,tt.default)({location:n.url,registerOnboarding:this.onboardingController.registerOnboarding})),o.push((0,jt.default)({messenger:this.controllerMessenger.getRestricted({name:"EvmMethodsToNonEvmAccountFilterMessenger",allowedActions:["AccountsController:getSelectedAccount"]})})),o.push((0,Je.createMethodMiddleware)({origin:e,subjectType:t,addSubjectMetadata:this.subjectMetadataController.addSubjectMetadata.bind(this.subjectMetadataController),metamaskState:this.getState(),getProviderState:this.getProviderState.bind(this),getUnlockPromise:this.appStateController.getUnlockPromise.bind(this.appStateController),handleWatchAssetRequest:this.handleWatchAssetRequest.bind(this),requestUserApproval:this.approvalController.addAndShowApprovalRequest.bind(this.approvalController),startApprovalFlow:this.approvalController.startFlow.bind(this.approvalController),endApprovalFlow:this.approvalController.endFlow.bind(this.approvalController),sendMetrics:this.metaMetricsController.trackEvent.bind(this.metaMetricsController),getAccounts:this.getPermittedAccounts.bind(this,e),getPermissionsForOrigin:this.permissionController.getPermissions.bind(this.permissionController,e),hasPermission:this.permissionController.hasPermission.bind(this.permissionController,e),requestAccountsPermission:this.permissionController.requestPermissions.bind(this.permissionController,{origin:e},{eth_accounts:{},...!(0,Re.isSnapId)(e)&&{[yt.PermissionNames.permittedChains]:{}}}),requestPermittedChainsPermission:t=>this.permissionController.requestPermissionsIncremental({origin:e},{[yt.PermissionNames.permittedChains]:{caveats:[yt.CaveatFactories[he.CaveatTypes.restrictNetworkSwitching](t)]}}),grantPermittedChainsPermissionIncremental:t=>this.permissionController.grantPermissionsIncremental({subject:{origin:e},approvedPermissions:{[yt.PermissionNames.permittedChains]:{caveats:[yt.CaveatFactories[he.CaveatTypes.restrictNetworkSwitching](t)]}}}),requestPermissionsForOrigin:t=>this.permissionController.requestPermissions({origin:e},{...t[yt.PermissionNames.eth_accounts]&&{[yt.PermissionNames.permittedChains]:{}},...t[yt.PermissionNames.permittedChains]&&{[yt.PermissionNames.eth_accounts]:{}},...t}),revokePermissionsForOrigin:t=>{try{this.permissionController.revokePermissions({[e]:t})}catch(e){console.log(e)}},getCaveat:({target:t,caveatType:n})=>{try{return this.permissionController.getCaveat(e,t,n)}catch(e){if(!(e instanceof B.PermissionDoesNotExistError))throw e}return undefined},setActiveNetwork:async t=>{await this.networkController.setActiveNetwork(t),this.permissionController.hasPermission(e,yt.PermissionNames.eth_accounts)&&this.selectedNetworkController.setNetworkClientIdForDomain(e,t)},addNetwork:this.networkController.addNetwork.bind(this.networkController),updateNetwork:this.networkController.updateNetwork.bind(this.networkController),getNetworkConfigurationByChainId:this.networkController.getNetworkConfigurationByChainId.bind(this.networkController),getCurrentChainIdForDomain:e=>{const t=this.selectedNetworkController.getNetworkClientIdForDomain(e),{chainId:n}=this.networkController.getNetworkConfigurationByNetworkClientId(t);return n},getWeb3ShimUsageState:this.alertController.getWeb3ShimUsageState.bind(this.alertController),setWeb3ShimUsageRecorded:this.alertController.setWeb3ShimUsageRecorded.bind(this.alertController)})),o.push((0,q.createSnapsMethodMiddleware)(t===B.SubjectType.Snap,{getUnlockPromise:this.appStateController.getUnlockPromise.bind(this.appStateController),getSnaps:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:getPermitted",e),requestPermissions:async t=>await this.permissionController.requestPermissions({origin:e},t),getPermissions:this.permissionController.getPermissions.bind(this.permissionController,e),getSnapFile:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:getFile",e),installSnaps:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:install",e),invokeSnap:this.permissionController.executeRestrictedMethod.bind(this.permissionController,e,he.RestrictedMethods.wallet_snap),getIsLocked:()=>!this.appStateController.isUnlocked(),getInterfaceState:(...t)=>this.controllerMessenger.call("SnapInterfaceController:getInterface",e,...t).state,getInterfaceContext:(...t)=>this.controllerMessenger.call("SnapInterfaceController:getInterface",e,...t).context,createInterface:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:createInterface",e),updateInterface:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:updateInterface",e),resolveInterface:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:resolveInterface",e),getSnap:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:get"),getAllSnaps:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:getAll"),getCurrencyRate:e=>{const t=this.multichainRatesController.state.rates[e],{fiatCurrency:n}=this.multichainRatesController.state;return t?{...t,currency:n}:undefined},hasPermission:this.permissionController.hasPermission.bind(this.permissionController,e),handleSnapRpcRequest:t=>this.handleSnapRequest({...t,origin:e}),getAllowedKeyringMethods:(0,Ue.keyringSnapPermissionsBuilder)(this.subjectMetadataController,e)})),o.push(c),o.push(u.middleware),o.push(this.metamaskMiddleware),o.push((0,d.providerAsMiddleware)(l.provider)),o}setupProviderEngineCaip({origin:e,tabId:t}){const n=new a.JsonRpcEngine;return n.push(((n,r,s,o)=>(console.log("CAIP request received",{origin:e,tabId:t,request:n}),o(new Error("CAIP RPC Pipeline not yet implemented."))))),n}setupPublicConfig(e){const t=(0,c.storeAsStream)(this.publicConfigStore);(0,s.pipeline)(t,e,(e=>{var n;t.destroy(),!e||null!==(n=e.message)&&void 0!==n&&n.match("Premature close")||C.default.error(e)}))}addConnection(e,{engine:t}){if(e===ge.ORIGIN_METAMASK)return null;this.connections[e]||(this.connections[e]={});const n=(0,T.nanoid)();return this.connections[e][n]={engine:t},n}removeConnection(e,t){const n=this.connections[e];n&&(delete n[t],0===Object.keys(n).length&&delete this.connections[e])}removeAllConnections(e){const t=this.connections[e];t&&Object.keys(t).forEach((t=>{this.removeConnection(e,t)}))}notifyConnections(e,t){const n=this.connections[e];n&&Object.values(n).forEach((e=>{e.engine&&e.engine.emit("notification",t)}))}notifyAllConnections(e){const t="function"==typeof e?t=>e(t):()=>e;Object.keys(this.connections).forEach((e=>{Object.values(this.connections[e]).forEach((async n=>{try{this.notifyConnection(n,await t(e))}catch(e){console.error(e)}}))}))}notifyConnection(e,t){try{e.engine&&e.engine.emit("notification",t)}catch(e){console.error(e)}}async _onKeyringControllerUpdate(e){const{keyrings:t}=e,n=t.reduce(((e,{accounts:t})=>e.concat(t)),[]).filter(Dt.isEthAddress);n.length&&this.accountTrackerController.syncWithAddresses(n)}_onUnlock(){this.notifyAllConnections((async e=>({method:yt.NOTIFICATION_NAMES.unlockStateChanged,params:{isUnlocked:!0,accounts:await this.getPermittedAccounts(e)}}))),this.unMarkPasswordForgotten(),this.emit("unlock")}_onLock(){this.notifyAllConnections({method:yt.NOTIFICATION_NAMES.unlockStateChanged,params:{isUnlocked:!1}}),this.emit("lock")}_onStateUpdate(e){this.isClientOpenAndUnlocked=e.isUnlocked&&this._isClientOpen,this._notifyChainChange()}privateSendUpdate(){this.emit("update",this.getState())}isUnlocked(){return this.keyringController.state.isUnlocked}getExternalPendingTransactions(e){return this.smartTransactionsController.getTransactions({addressFrom:e,status:"pending"})}isConfirmationRedesignEnabled(){return this.preferencesController.state.preferences.redesignedConfirmationsEnabled}isTransactionsRedesignEnabled(){return this.preferencesController.state.preferences.redesignedTransactionsEnabled}isConfirmationRedesignDeveloperEnabled(){return this.preferencesController.state.preferences.isRedesignedConfirmationsDeveloperEnabled}async initializeChainlist(){const e=`cachedFetch:${le.CHAIN_SPEC_URL}`,{cachedResponse:t}=await(0,ye.getStorageItem)(e)||{};t||await(0,ye.setStorageItem)(e,{cachedResponse:(0,b.rawChainData)(),cachedTime:0})}async getPendingNonce(e,t){const{nonceDetails:n,releaseLock:r}=await this.txController.getNonceLock(e,undefined),s=n.params.highestSuggested;return r(),s}async getNextNonce(e,t){const n=await this.txController.getNonceLock(e,undefined);return n.releaseLock(),n.nextNonce}throwTestError(e){setTimeout((()=>{const t=new Error(e);throw t.name="TestError",t}))}_addTransactionControllerListeners(){const e=this.getTransactionMetricsRequest();this.controllerMessenger.subscribe("TransactionController:postTransactionBalanceUpdated",je.handlePostTransactionBalanceUpdate.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:unapprovedTransactionAdded",(t=>(0,je.handleTransactionAdded)(e,{transactionMeta:t}))),this.controllerMessenger.subscribe("TransactionController:transactionApproved",je.handleTransactionApproved.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:transactionDropped",je.handleTransactionDropped.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:transactionConfirmed",je.handleTransactionConfirmed.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:transactionFailed",je.handleTransactionFailed.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:transactionNewSwap",(({transactionMeta:e})=>this.controllerMessenger.call("SwapsController:setTradeTxId",e.id))),this.controllerMessenger.subscribe("TransactionController:transactionNewSwapApproval",(({transactionMeta:e})=>this.controllerMessenger.call("SwapsController:setApproveTxId",e.id))),this.controllerMessenger.subscribe("TransactionController:transactionRejected",je.handleTransactionRejected.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:transactionSubmitted",je.handleTransactionSubmitted.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:transactionStatusUpdated",(({transactionMeta:e})=>{this._onFinishedTransaction(e)}))}getTransactionMetricsRequest(){return{...{createEventFragment:this.metaMetricsController.createEventFragment.bind(this.metaMetricsController),finalizeEventFragment:this.metaMetricsController.finalizeEventFragment.bind(this.metaMetricsController),getEventFragmentById:this.metaMetricsController.getEventFragmentById.bind(this.metaMetricsController),getParticipateInMetrics:()=>this.metaMetricsController.state.participateInMetaMetrics,trackEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController),updateEventFragment:this.metaMetricsController.updateEventFragment.bind(this.metaMetricsController),getAccountType:this.getAccountType.bind(this),getDeviceModel:this.getDeviceModel.bind(this),getEIP1559GasFeeEstimates:this.gasFeeController.fetchGasFeeEstimates.bind(this.gasFeeController),getSelectedAddress:()=>this.accountsController.getSelectedAccount().address,getTokenStandardAndDetails:this.getTokenStandardAndDetails.bind(this),getTransaction:e=>this.txController.state.transactions.find((t=>t.id===e)),getIsSmartTransaction:()=>(0,Ee.getIsSmartTransaction)(this._getMetaMaskState()),getSmartTransactionByMinedTxHash:e=>this.smartTransactionsController.getSmartTransactionByMinedTxHash(e),getRedesignedConfirmationsEnabled:this.isConfirmationRedesignEnabled.bind(this),getRedesignedTransactionsEnabled:this.isTransactionsRedesignEnabled.bind(this),getMethodData:e=>{if(!e)return null;const{knownMethodData:t,use4ByteResolution:n}=this.preferencesController.state,r=(0,pt.addHexPrefix)(e);return(0,pt.getMethodDataName)(t,n,r,this.preferencesController.addKnownMethodData.bind(this.preferencesController),this.provider)},getIsRedesignedConfirmationsDeveloperEnabled:this.isConfirmationRedesignDeveloperEnabled.bind(this),getIsConfirmationAdvancedDetailsOpen:()=>this.preferencesController.state.preferences.showConfirmationAdvancedDetails},snapAndHardwareMessenger:this.controllerMessenger.getRestricted({name:"SnapAndHardwareMessenger",allowedActions:["KeyringController:getKeyringForAccount","SnapController:get","AccountsController:getSelectedAccount"]}),provider:this.provider}}toggleExternalServices(e){this.preferencesController.toggleExternalServices(e),this.tokenListController.updatePreventPollingOnNetworkRestart(!e),e?(this.tokenDetectionController.enable(),this.gasFeeController.enableNonRPCGasFeeApis()):(this.tokenDetectionController.disable(),this.gasFeeController.disableNonRPCGasFeeApis())}async setLedgerTransportPreference(e){console.log("in mm controller setting ledger transport preference");const t=de.LedgerTransportTypes.webhid;console.log("in mm controller, updating transport type to ",t);const n=e||await this.getKeyringForDevice(de.HardwareDeviceNames.ledger);return null!=n&&n.updateTransportMethod?n.updateTransportMethod(t).catch((e=>{throw e})):undefined}recordFirstTimeInfo(e){if(!("firstTimeInfo"in e)){const t="12.9.3";e.firstTimeInfo={version:t,date:Date.now()}}}set isClientOpen(e){this._isClientOpen=e}onClientClosed(){try{this.gasFeeController.stopAllPolling(),this.currencyRateController.stopAllPolling(),this.tokenRatesController.stopAllPolling(),this.tokenDetectionController.stopAllPolling(),this.tokenListController.stopAllPolling(),this.tokenBalancesController.stopAllPolling(),this.appStateController.clearPollingTokens(),this.accountTrackerController.stopAllPolling()}catch(e){console.error(e)}}onEnvironmentTypeClosed(e){const t=ge.POLLING_TOKEN_ENVIRONMENT_TYPES[e];this.appStateController.store.getState()[t].forEach((e=>{this.gasFeeController.stopPollingByPollingToken(e),this.currencyRateController.stopPollingByPollingToken(e),this.appStateController.removePollingToken(e,t)}))}safelistPhishingDomain(e){return this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.Phishing,event:fe.MetaMetricsEventName.ProceedAnywayClicked,properties:{url:e,referrer:{url:e}}}),this.phishingController.bypass(e)}async backToSafetyPhishingWarning(){this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.Navigation,event:fe.MetaMetricsEventName.PortfolioLinkClicked,properties:{location:"phishing_page",text:"Back to safety"}}),await this.platform.switchToAnotherURL(undefined,"https://portfolio.metamask.io/?metamaskEntry=phishing_page_portfolio_button")}setLocked(){return this.keyringController.setLocked()}async _onAccountChange(e){const t=(0,yt.getPermittedAccountsByOrigin)(this.permissionController.state);for(const[n,r]of t.entries())r.includes(e)&&this._notifyAccountsChange(n,r);await this.txController.updateIncomingTransactions()}async _notifyAccountsChange(e,t){this.isUnlocked()&&this.notifyConnections(e,{method:yt.NOTIFICATION_NAMES.accountsChanged,params:t.length<2?t:await this.getPermittedAccounts(e)}),this.permissionLogController.updateAccountsHistory(e,t)}async _notifyChainChange(){this.preferencesController.getUseRequestQueue()?this.notifyAllConnections((async e=>({method:yt.NOTIFICATION_NAMES.chainChanged,params:await this.getProviderNetworkState(e)}))):this.notifyAllConnections({method:yt.NOTIFICATION_NAMES.chainChanged,params:await this.getProviderNetworkState()})}async _notifyChainChangeForConnection(e,t){this.preferencesController.getUseRequestQueue()?this.notifyConnection(e,{method:yt.NOTIFICATION_NAMES.chainChanged,params:await this.getProviderNetworkState(t)}):this.notifyConnection(e,{method:yt.NOTIFICATION_NAMES.chainChanged,params:await this.getProviderNetworkState()})}async _onFinishedTransaction(e){[X.TransactionStatus.confirmed,X.TransactionStatus.failed].includes(e.status)&&(await this._createTransactionNotifcation(e),await this._updateNFTOwnership(e),this._trackTransactionFailure(e),await this.tokenBalancesController.updateBalancesByChainId({chainId:e.chainId}))}async _createTransactionNotifcation(e){const{chainId:t}=e;let n={};if(t){var r,s;const e=null===(r=this.networkController.state.networkConfigurationsByChainId)||void 0===r?void 0:r[t];n={blockExplorerUrl:null==e||null===(s=e.blockExplorerUrls)||void 0===s?void 0:s[null==e?void 0:e.defaultBlockExplorerUrlIndex]}}try{await this.platform.showTransactionNotification(e,n)}catch(e){C.default.error("Failed to create transaction notification",e)}}async _updateNFTOwnership(e){const{type:t,txParams:n,chainId:r,txReceipt:s}=e,o=this.accountsController.getSelectedAccount().address,{allNfts:a}=this.nftController.state,i=null==s?void 0:s.logs,l=t===X.TransactionType.contractInteraction&&i,c=(t===X.TransactionType.tokenMethodTransferFrom||t===X.TransactionType.tokenMethodSafeTransferFrom)&&n!==undefined;if(l||c)if(c){var d;const{data:e,to:t,from:s}=n,o=(0,be.parseStandardTokenTransactionData)(e),i=(0,we.getTokenIdParam)(o)??(0,Se.getTokenValueParam)(o),l=null==a||null===(d=a[s])||void 0===d||null===(d=d[r])||void 0===d?void 0:d.find((({address:e,tokenId:n})=>(0,ve.isEqualCaseInsensitive)(e,t)&&n===i));l&&this.nftController.checkAndUpdateSingleNftOwnershipStatus(l,!1,{userAddress:s})}else{const e=i.map((e=>{const t=e.topics&&e.topics[0]===_e.TRANSFER_SINFLE_LOG_TOPIC_HASH,n=e.topics&&e.topics[0]===_e.TOKEN_TRANSFER_LOG_TOPIC_HASH;let r;return t&&(r=e.topics&&e.topics[3]&&e.topics[3].match(null==o?void 0:o.slice(2))),n&&(r=e.topics&&e.topics[2]&&e.topics[2].match(null==o?void 0:o.slice(2))),{isERC1155NftTransfer:t,isERC721NftTransfer:n,isTransferToSelectedAddress:r,...e}}));if(0!==e.length){const t=[];e.forEach((e=>{if(e.isTransferToSelectedAddress&&(e.isERC1155NftTransfer||e.isERC721NftTransfer)){let n;n=e.isERC1155NftTransfer?new ee.Interface(te.abiERC1155):new ee.Interface(te.abiERC721);try{const r=n.parseLog({data:e.data,topics:e.topics});t.push({contract:e.address,...r})}catch(e){}}}));const n=[],s=[];t.forEach((e=>{var t;const i=(0,we.getTokenIdParam)(e),l=null==a||null===(t=a[o])||void 0===t||null===(t=t[r])||void 0===t?void 0:t.find((({address:t,tokenId:n})=>(0,ve.isEqualCaseInsensitive)(t,e.contract)&&n===i));l?n.push(l):s.push({tokenId:i,...e})}));const i=n.map((async e=>this.nftController.checkAndUpdateSingleNftOwnershipStatus(e,!1,{selectedAddress:o})));await Promise.allSettled(i);const l=s.map((async e=>this.nftController.addNft(e.contract,e.tokenId)));await Promise.allSettled(l)}}}_trackTransactionFailure(e){var t;const{txReceipt:n}=e,r=this.getState();n&&"0x0"===n.status&&this.metaMetricsController.trackEvent({event:"Tx Status Update: On-Chain Failure",category:fe.MetaMetricsEventCategory.Background,properties:{action:"Transactions",errorMessage:null===(t=e.simulationFails)||void 0===t?void 0:t.reason,numberOfTokens:r.tokens.length,numberOfAccounts:Object.keys(r.accounts).length}},{matomoEvent:!0})}_onUserOperationAdded(e){const t=this.txController.state.transactions.find((t=>t.id===e.id));t&&(t.type===X.TransactionType.swap?this.controllerMessenger.publish("TransactionController:transactionNewSwap",{transactionMeta:t}):t.type===X.TransactionType.swapApproval&&this.controllerMessenger.publish("TransactionController:transactionNewSwapApproval",{transactionMeta:t}))}_onUserOperationTransactionUpdated(e){const t={...e,txParams:{...e.txParams,from:this.accountsController.getSelectedAccount().address}};this.txController.state.transactions.some((e=>e.id===t.id))||this.txController.update((e=>{e.transactions.push(t)})),this.txController.updateTransaction(t,"Generated from user operation"),this.controllerMessenger.publish("TransactionController:transactionStatusUpdated",{transactionMeta:t})}_publishSmartTransactionHook(e,t){const n=this._getMetaMaskState(),r=(0,Ee.getIsSmartTransaction)(n);if(!r)return{transactionHash:undefined};const s=(0,Ee.getFeatureFlagsByChainId)(n);return(0,De.submitSmartTransactionHook)({transactionMeta:e,signedTransactionInHex:t,transactionController:this.txController,smartTransactionsController:this.smartTransactionsController,controllerMessenger:this.controllerMessenger,isSmartTransaction:r,isHardwareWallet:(0,Ee.isHardwareWallet)(n),featureFlags:s})}_getMetaMaskState(){return{metamask:this.getState()}}}function rn(e,t){const n=Xt(tn,this,sn).call(this,t),r=Xt(tn,this,sn).call(this,e);n!==r&&this.tokenListController.updatePreventPollingOnNetworkRestart(!r)}function sn(e){const{useTokenDetection:t,useTransactionSimulations:n,preferences:r}=e??{},{petnamesEnabled:s}=r??{};return t||s||n}n.default=nn}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"$root$",file:"app/scripts/metamask-controller.js"}],[137,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:2,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=2;try{"etherscan"===t.data.config.provider.type&&(t.data.config.provider.type="rpc",t.data.config.provider.rpcTarget="https://rpc.metamask.io/")}catch(e){}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/002.js"}],[138,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:3,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=3;try{"https://rawtestrpc.metamask.io/"===t.data.config.provider.rpcTarget&&(t.data.config.provider.rpcTarget="https://testrpc.metamask.io/")}catch(e){}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/003.js"}],[139,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:4,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=4;try{if("rpc"!==t.data.config.provider.type)return Promise.resolve(t);switch(t.data.config.provider.rpcTarget){case"https://testrpc.metamask.io/":t.data.config.provider={type:"testnet"};break;case"https://rpc.metamask.io/":t.data.config.provider={type:"mainnet"}}}catch(e){}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/004.js"}],[14,{"../../../../shared/modules/conversion.utils":5301,"../../../../shared/types/bridge-status":5329,"./constants":15,"./utils":16,"@metamask/polling-controller":2172},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("@metamask/polling-controller"),s=e("../../../../shared/types/bridge-status"),o=e("../../../../shared/modules/conversion.utils"),a=e("./constants"),i=e("./utils");function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;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:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t,n){d(e,t),t.set(e,n)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t){return e.get(h(e,t))}function h(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const p={bridgeStatusState:{persist:!0,anonymous:!1}};var m=new WeakMap,g=new WeakMap,f=new WeakSet,C=new WeakMap,y=new WeakMap;class w extends((0,r.StaticIntervalPollingController)()){constructor({messenger:e,state:t}){var n,r;super({name:a.BRIDGE_STATUS_CONTROLLER_NAME,metadata:p,messenger:e,state:{...t,bridgeStatusState:{...a.DEFAULT_BRIDGE_STATUS_CONTROLLER_STATE,...null==t?void 0:t.bridgeStatusState}}}),d(n=this,r=f),r.add(n),c(this,m,{}),l(this,"resetState",(()=>{this.update((e=>{e.bridgeStatusState={...a.DEFAULT_BRIDGE_STATUS_CONTROLLER_STATE}}))})),l(this,"wipeBridgeStatus",(({address:e,ignoreNetwork:t})=>{if(t)this.update((e=>{e.bridgeStatusState={...a.DEFAULT_BRIDGE_STATUS_CONTROLLER_STATE}}));else{const{selectedNetworkClientId:t}=this.messagingSystem.call("NetworkController:getState"),n=this.messagingSystem.call("NetworkController:getNetworkClientById",t).configuration.chainId;u(y,this).call(this,e,n)}})),c(this,g,(()=>{const{bridgeStatusState:e}=this.state;Object.values(e.txHistory).filter((e=>e.status.status!==s.StatusTypes.COMPLETE)).filter((e=>{const t=e.status.srcChain.txHash;return!u(m,this)[t]})).forEach((e=>{const t={bridgeId:e.quote.bridgeId,srcTxHash:e.status.srcChain.txHash,bridge:e.quote.bridges[0],srcChainId:e.quote.srcChainId,destChainId:e.quote.destChainId,quote:e.quote,refuel:Boolean(e.quote.refuel)},n=(0,o.decimalToPrefixedHex)(t.srcChainId),r=this.messagingSystem.call("NetworkController:findNetworkClientIdByChainId",n);u(m,this)[t.srcTxHash]=this.startPolling({networkClientId:r,statusRequest:t})}))})),l(this,"startPollingForBridgeTxStatus",(e=>{const{statusRequest:t,quoteResponse:n,startTime:r,slippagePercentage:a,pricingData:i,initialDestAssetBalance:l,targetContractAddress:c}=e,d=(0,o.decimalToPrefixedHex)(t.srcChainId),{bridgeStatusState:p}=this.state,{address:g}=h(f,this,v).call(this);this.update((e=>{e.bridgeStatusState={...p,txHistory:{...p.txHistory,[t.srcTxHash]:{quote:n.quote,startTime:r,estimatedProcessingTimeInSeconds:n.estimatedProcessingTimeInSeconds,slippagePercentage:a,pricingData:i,initialDestAssetBalance:l,targetContractAddress:c,account:g,status:{status:s.StatusTypes.PENDING,srcChain:{chainId:t.srcChainId,txHash:t.srcTxHash}}}}}}));const C=this.messagingSystem.call("NetworkController:findNetworkClientIdByChainId",d);u(m,this)[t.srcTxHash]=this.startPolling({networkClientId:C,statusRequest:t})})),l(this,"_executePoll",(async e=>{await u(C,this).call(this,e)})),c(this,C,(async({networkClientId:e,statusRequest:t})=>{const{bridgeStatusState:n}=this.state;try{const e=await(0,i.fetchBridgeTxStatus)(t);this.update((r=>{const s=r.bridgeStatusState.txHistory[t.srcTxHash];r.bridgeStatusState={...n,txHistory:{...n.txHistory,[t.srcTxHash]:{...s,status:e}}}}));const r=u(m,this)[t.srcTxHash];e.status===s.StatusTypes.COMPLETE&&r&&this.stopPollingByPollingToken(r)}catch(e){console.log("Failed to fetch bridge tx status",e)}})),c(this,y,((e,t)=>{const n=Object.keys(this.state.bridgeStatusState.txHistory).filter((n=>{const r=this.state.bridgeStatusState.txHistory[n],s=(0,o.decimalToPrefixedHex)(r.quote.srcChainId),a=(0,o.decimalToPrefixedHex)(r.quote.destChainId);return r.account===e&&(s===t||a===t)}));n.forEach((e=>{u(m,this)[e]&&this.stopPollingByPollingToken(u(m,this)[e])})),this.update((e=>{e.bridgeStatusState.txHistory=n.reduce(((e,t)=>(delete e[t],e)),e.bridgeStatusState.txHistory)}))})),this.messagingSystem.registerActionHandler(`${a.BRIDGE_STATUS_CONTROLLER_NAME}:startPollingForBridgeTxStatus`,this.startPollingForBridgeTxStatus.bind(this)),this.messagingSystem.registerActionHandler(`${a.BRIDGE_STATUS_CONTROLLER_NAME}:wipeBridgeStatus`,this.wipeBridgeStatus.bind(this)),this.setIntervalLength(a.REFRESH_INTERVAL_MS),u(g,this).call(this)}}function v(){return this.messagingSystem.call("AccountsController:getSelectedAccount")}n.default=w}}},{package:"$root$",file:"app/scripts/controllers/bridge-status/bridge-status-controller.ts"}],[140,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:5,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=5;try{const e=function(e){const{config:t}=e,n={...e,KeyringController:{vault:e.vault,selectedAccount:t.selectedAccount,walletNicknames:e.walletNicknames}};return delete n.vault,delete n.walletNicknames,delete n.config.selectedAccount,n}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #5${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/005.js"}],[141,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:6,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=6;try{const e=function(e){const t=e.KeyringController,n={...e,PreferencesController:{selectedAddress:t.selectedAccount}};return delete n.KeyringController.selectedAccount,n}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #6${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/006.js"}],[142,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:7,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=7;try{const e=function(e){const t={...e,TransactionManager:{transactions:e.transactions||[],gasMultiplier:e.gasMultiplier||1}};return delete t.transactions,delete t.gasMultiplier,t}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #7${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/007.js"}],[143,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:8,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=8;try{const e=function(e){const t={...e,NoticeController:{noticesList:e.noticesList||[]}};return delete t.noticesList,t}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #8${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/008.js"}],[144,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:9,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=9;try{const e=function(e){const t=(0,r.merge)({},e,{CurrencyController:{currentCurrency:e.currentFiat||e.fiatCurrency||"USD",conversionRate:e.conversionRate,conversionDate:e.conversionDate}});return delete t.currentFiat,delete t.fiatCurrency,delete t.conversionRate,delete t.conversionDate,t}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #9${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/009.js"}],[1449,{"@ethersproject/providers":561,"@metamask/base-controller":1396,"@metamask/controller-utils":1422,"@metamask/utils":1461,"punycode/punycode.js":4586},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var r,s,o,a,i,l=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},c=this&&this.__classPrivateFieldSet||function(e,t,n,r,s){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?s.call(e,n):s?s.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.EnsController=n.DEFAULT_ENS_NETWORK_MAP=void 0;const d=e("@ethersproject/providers"),u=e("@metamask/base-controller"),h=e("@metamask/controller-utils"),p=e("@metamask/utils"),m=e("punycode/punycode.js"),g=(0,p.createProjectLogger)("ens-controller");n.DEFAULT_ENS_NETWORK_MAP={1:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",3:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",4:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",5:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",17e3:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",11155111:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"};const f={ensEntries:{persist:!0,anonymous:!1},ensResolutionsByAddress:{persist:!0,anonymous:!1}},C={ensEntries:{},ensResolutionsByAddress:{}};class y extends u.BaseController{constructor({registriesByChainId:e=n.DEFAULT_ENS_NETWORK_MAP,messenger:t,state:i={},onNetworkDidChange:c}){super({name:"EnsController",metadata:f,messenger:t,state:{...C,ensEntries:Object.fromEntries(Object.entries(e).map((([e,t])=>[(0,h.toHex)(e),{".":{address:t,chainId:(0,h.toHex)(e),ensName:"."}}]))),...i}}),r.add(this),s.set(this,null),l(this,r,"m",o).call(this,e),c&&c((({selectedNetworkClientId:t})=>{this.resetState(),l(this,r,"m",a).call(this,t,e)}))}resetState(){this.update((e=>{e.ensResolutionsByAddress={}}))}clear(){this.update((e=>{e.ensEntries={}}))}delete(e,t){const n=(0,h.normalizeEnsName)(t);return!!((0,h.isSafeDynamicKey)(e)&&n&&this.state.ensEntries[e]&&this.state.ensEntries[e][n])&&(this.update((t=>{delete t.ensEntries[e][n],0===Object.keys(t.ensEntries[e]).length&&delete t.ensEntries[e]})),!0)}get(e,t){const n=(0,h.normalizeEnsName)(t);return n&&this.state.ensEntries[e]&&this.state.ensEntries[e][n]||null}set(e,t,n){if(!Number.isInteger(Number.parseInt(e,10))||!t||"string"!=typeof t||n&&!(0,h.isValidHexAddress)(n))throw new Error(`Invalid ENS entry: { chainId:${e}, ensName:${t}, address:${n}}`);const r=(0,h.normalizeEnsName)(t);if(!r)throw new Error(`Invalid ENS name: ${t}`);const s=n?(0,h.toChecksumHexAddress)(n):null,o=this.state.ensEntries[e];return(!o?.[r]||o[r].address!==s)&&(this.update((t=>{t.ensEntries={...this.state.ensEntries,[e]:{...this.state.ensEntries[e],[r]:{address:s,chainId:e,ensName:r}}}})),!0)}async reverseResolveAddress(e){if(!l(this,s,"f"))return undefined;const t=(0,h.toChecksumHexAddress)(e);if(this.state.ensResolutionsByAddress[t])return this.state.ensResolutionsByAddress[t];let n,r;try{n=await l(this,s,"f").lookupAddress(t)}catch(e){return g(e),undefined}if(!n)return undefined;try{r=await l(this,s,"f").resolveName(n)}catch(e){return g(e),undefined}return r?"0x0000000000000000000000000000000000000000"===r||"0x"===r||(0,h.toChecksumHexAddress)(r)!==t?undefined:(this.update((e=>{e.ensResolutionsByAddress[t]=(0,m.toASCII)(n)})),n):undefined}}n.EnsController=y,s=new WeakMap,r=new WeakSet,o=function(e){const{selectedNetworkClientId:t}=this.messagingSystem.call("NetworkController:getState");l(this,r,"m",a).call(this,t,e)},a=function(e,t){const{configuration:{chainId:n},provider:o}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);t&&t[parseInt(n,16)]&&l(this,r,"m",i).call(this,n)?c(this,s,new d.Web3Provider(o,{chainId:(0,h.convertHexToDecimal)(n),name:h.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP[n],ensAddress:t[parseInt(n,16)]}),"f"):c(this,s,null,"f")},i=function(e){return Boolean(this.state.ensEntries[e])},n.default=y}}},{package:"@metamask/ens-controller",file:"node_modules/@metamask/ens-controller/dist/EnsController.cjs"}],[145,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:10,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=10;try{const e=function(e){const t=(0,r.merge)({},e,{ShapeShiftController:{shapeShiftTxList:e.shapeShiftTxList||[]}});return delete t.shapeShiftTxList,t}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #10${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/010.js"}],[1450,{"./EnsController.cjs":1449},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){r===undefined&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){r===undefined&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),s(e("./EnsController.cjs"),n)}}},{package:"@metamask/ens-controller",file:"node_modules/@metamask/ens-controller/dist/index.cjs"}],[1451,{"./errors.cjs":1459,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.assertExhaustive=n.assertStruct=n.assert=n.AssertionError=void 0;const r=e("@metamask/superstruct"),s=e("./errors.cjs");function o(e,t){return n=e,Boolean("string"==typeof n?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var n}class a extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}n.AssertionError=a,n.assert=function(e,t="Assertion failed.",n=a){if(!e){if(t instanceof Error)throw t;throw o(n,t)}},n.assertStruct=function(e,t,n="Assertion failed",i=a){try{(0,r.assert)(e,t)}catch(e){throw o(i,`${n}: ${function(e){return(0,s.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},n.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/assert.cjs"}],[1452,{"./assert.cjs":1451,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.base64=void 0;const r=e("@metamask/superstruct"),s=e("./assert.cjs");n.base64=(e,t={})=>{const n=t.paddingRequired??!1,o=t.characterSet??"base64";let a,i;return"base64"===o?a=String.raw`[A-Za-z0-9+\/]`:((0,s.assert)("base64url"===o),a=String.raw`[-_A-Za-z0-9]`),i=n?new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),(0,r.pattern)(e,i)}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/base64.cjs"}],[1453,{"./assert.cjs":1451,"./hex.cjs":1460,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.createDataView=n.concatBytes=n.valueToBytes=n.base64ToBytes=n.stringToBytes=n.numberToBytes=n.signedBigIntToBytes=n.bigIntToBytes=n.hexToBytes=n.bytesToBase64=n.bytesToString=n.bytesToNumber=n.bytesToSignedBigInt=n.bytesToBigInt=n.bytesToHex=n.assertIsBytes=n.isBytes=void 0;const r=e("@scure/base"),s=e("./assert.cjs"),o=e("./hex.cjs"),a=48,i=58,l=87;const c=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 d(e){return e instanceof Uint8Array}function u(e){(0,s.assert)(d(e),"Value must be a Uint8Array.")}function h(e){if(u(e),0===e.length)return"0x";const t=c(),n=new Array(e.length);for(let r=0;r=BigInt(0),"Value must be a non-negative bigint.");return m(e.toString(16))}function f(e){(0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return m(e.toString(16))}function C(e){return(0,s.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return g(e);if("number"==typeof e)return f(e);if("string"==typeof e)return e.startsWith("0x")?m(e):C(e);if(d(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}n.isBytes=d,n.assertIsBytes=u,n.bytesToHex=h,n.bytesToBigInt=p,n.bytesToSignedBigInt=function(e){u(e);let t=BigInt(0);for(const n of e)t=(t<0,"Byte length must be greater than 0."),(0,s.assert)(function(e,t){(0,s.assert)(t>0);const n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let n=e;const r=new Uint8Array(t);for(let e=0;e>=BigInt(8);return r.reverse()},n.numberToBytes=f,n.stringToBytes=C,n.base64ToBytes=function(e){return(0,s.assert)("string"==typeof e,"Value must be a string."),r.base64.decode(e)},n.valueToBytes=y,n.concatBytes=function(e){const t=new Array(e.length);let n=0;for(let r=0;r@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/bytes.cjs"}],[1454,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.toCaipChainId=n.parseCaipAccountId=n.parseCaipChainId=n.isCaipAssetId=n.isCaipAssetType=n.isCaipAccountAddress=n.isCaipAccountId=n.isCaipReference=n.isCaipNamespace=n.isCaipChainId=n.KnownCaipNamespace=n.CaipAssetIdStruct=n.CaipAssetTypeStruct=n.CaipAccountAddressStruct=n.CaipAccountIdStruct=n.CaipReferenceStruct=n.CaipNamespaceStruct=n.CaipChainIdStruct=n.CAIP_ASSET_ID_REGEX=n.CAIP_ASSET_TYPE_REGEX=n.CAIP_ACCOUNT_ADDRESS_REGEX=n.CAIP_ACCOUNT_ID_REGEX=n.CAIP_REFERENCE_REGEX=n.CAIP_NAMESPACE_REGEX=n.CAIP_CHAIN_ID_REGEX=void 0;const r=e("@metamask/superstruct");function s(e){return(0,r.is)(e,n.CaipNamespaceStruct)}function o(e){return(0,r.is)(e,n.CaipReferenceStruct)}n.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,n.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,n.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,n.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,n.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,n.CaipChainIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_CHAIN_ID_REGEX),n.CaipNamespaceStruct=(0,r.pattern)((0,r.string)(),n.CAIP_NAMESPACE_REGEX),n.CaipReferenceStruct=(0,r.pattern)((0,r.string)(),n.CAIP_REFERENCE_REGEX),n.CaipAccountIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ACCOUNT_ID_REGEX),n.CaipAccountAddressStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ACCOUNT_ADDRESS_REGEX),n.CaipAssetTypeStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ASSET_TYPE_REGEX),n.CaipAssetIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(n.KnownCaipNamespace||(n.KnownCaipNamespace={})),n.isCaipChainId=function(e){return(0,r.is)(e,n.CaipChainIdStruct)},n.isCaipNamespace=s,n.isCaipReference=o,n.isCaipAccountId=function(e){return(0,r.is)(e,n.CaipAccountIdStruct)},n.isCaipAccountAddress=function(e){return(0,r.is)(e,n.CaipAccountAddressStruct)},n.isCaipAssetType=function(e){return(0,r.is)(e,n.CaipAssetTypeStruct)},n.isCaipAssetId=function(e){return(0,r.is)(e,n.CaipAssetIdStruct)},n.parseCaipChainId=function(e){const t=n.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},n.parseCaipAccountId=function(e){const t=n.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.toCaipChainId=function(e,t){if(!s(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1455,{"./base64.cjs":1452,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ChecksumStruct=void 0;const r=e("@metamask/superstruct"),s=e("./base64.cjs");n.ChecksumStruct=(0,r.size)((0,s.base64)((0,r.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/checksum.cjs"}],[1456,{"./assert.cjs":1451,"./bytes.cjs":1453,"./hex.cjs":1460,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createHex=n.createBytes=n.createBigInt=n.createNumber=void 0;const r=e("@metamask/superstruct"),s=e("./assert.cjs"),o=e("./bytes.cjs"),a=e("./hex.cjs"),i=(0,r.union)([(0,r.number)(),(0,r.bigint)(),(0,r.string)(),a.StrictHexStruct]),l=(0,r.coerce)((0,r.number)(),i,Number),c=(0,r.coerce)((0,r.bigint)(),i,BigInt),d=((0,r.union)([a.StrictHexStruct,(0,r.instance)(Uint8Array)]),(0,r.coerce)((0,r.instance)(Uint8Array),(0,r.union)([a.StrictHexStruct]),o.hexToBytes)),u=(0,r.coerce)(a.StrictHexStruct,(0,r.instance)(Uint8Array),o.bytesToHex);n.createNumber=function(e){try{const t=(0,r.create)(e,l);return(0,s.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof r.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},n.createBigInt=function(e){try{return(0,r.create)(e,c)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},n.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,r.create)(e,d)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},n.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,r.create)(e,u)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/coercers.cjs"}],[1457,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var r,s,o=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},a=this&&this.__classPrivateFieldSet||function(e,t,n,r,s){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?s.call(e,n):s?s.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.FrozenSet=n.FrozenMap=void 0;class i{get size(){return o(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return o(this,r,"f")[Symbol.iterator]()}constructor(e){r.set(this,void 0),a(this,r,new Map(e),"f"),Object.freeze(this)}entries(){return o(this,r,"f").entries()}forEach(e,t){return o(this,r,"f").forEach(((n,r,s)=>e.call(t,n,r,this)))}get(e){return o(this,r,"f").get(e)}has(e){return o(this,r,"f").has(e)}keys(){return o(this,r,"f").keys()}values(){return o(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}n.FrozenMap=i;class l{get size(){return o(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return o(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),a(this,s,new Set(e),"f"),Object.freeze(this)}entries(){return o(this,s,"f").entries()}forEach(e,t){return o(this,s,"f").forEach(((n,r,s)=>e.call(t,n,r,this)))}has(e){return o(this,s,"f").has(e)}keys(){return o(this,s,"f").keys()}values(){return o(this,s,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}n.FrozenSet=l,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(l),Object.freeze(l.prototype)}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/collections.cjs"}],[1458,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1459,{"./misc.cjs":1465,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.wrapError=n.getErrorMessage=n.isErrorWithStack=n.isErrorWithMessage=n.isErrorWithCode=void 0;const r=e("pony-cause"),s=e("./misc.cjs");function o(e){return"object"==typeof e&&null!==e&&"code"in e}function a(e){return"object"==typeof e&&null!==e&&"message"in e}n.isErrorWithCode=o,n.isErrorWithMessage=a,n.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},n.getErrorMessage=function(e){return a(e)&&"string"==typeof e.message?e.message:(0,s.isNullOrUndefined)(e)?"":String(e)},n.wrapError=function(e,t){if((n=e)instanceof Error||(0,s.isObject)(n)&&"Error"===n.constructor.name){let n;return n=2===Error.length?new Error(t,{cause:e}):new r.ErrorWithCause(t,{cause:e}),o(e)&&(n.code=e.code),n}var n;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/errors.cjs"}],[146,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:11,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=11;try{const e=function(e){const t=e;return delete t.TOSHash,delete t.isDisclaimerConfirmed,t}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #11${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/011.js"}],[1460,{"./assert.cjs":1451,"./bytes.cjs":1453,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.remove0x=n.add0x=n.isValidChecksumAddress=n.getChecksumAddress=n.isValidHexAddress=n.assertIsStrictHexString=n.assertIsHexString=n.isStrictHexString=n.isHexString=n.HexChecksumAddressStruct=n.HexAddressStruct=n.StrictHexStruct=n.HexStruct=void 0;const r=e("@metamask/superstruct"),s=e("@noble/hashes/sha3"),o=e("./assert.cjs"),a=e("./bytes.cjs");function i(e){return(0,r.is)(e,n.HexStruct)}function l(e){return(0,r.is)(e,n.StrictHexStruct)}function c(e){(0,o.assert)((0,r.is)(e,n.HexChecksumAddressStruct),"Invalid hex address.");const t=u(e.toLowerCase()),i=u((0,a.bytesToHex)((0,s.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const n=i[t];return(0,o.assert)((0,r.is)(n,(0,r.string)()),"Hash shorter than address."),parseInt(n,16)>7?e.toUpperCase():e})).join("")}`}function d(e){return!!(0,r.is)(e,n.HexChecksumAddressStruct)&&c(e)===e}function u(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}n.HexStruct=(0,r.pattern)((0,r.string)(),/^(?:0x)?[0-9a-f]+$/iu),n.StrictHexStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]+$/iu),n.HexAddressStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]{40}$/u),n.HexChecksumAddressStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-fA-F]{40}$/u),n.isHexString=i,n.isStrictHexString=l,n.assertIsHexString=function(e){(0,o.assert)(i(e),"Value must be a hexadecimal string.")},n.assertIsStrictHexString=function(e){(0,o.assert)(l(e),'Value must be a hexadecimal string, starting with "0x".')},n.isValidHexAddress=function(e){return(0,r.is)(e,n.HexAddressStruct)||d(e)},n.getChecksumAddress=c,n.isValidChecksumAddress=d,n.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},n.remove0x=u}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/hex.cjs"}],[1461,{"./assert.cjs":1451,"./base64.cjs":1452,"./bytes.cjs":1453,"./caip-types.cjs":1454,"./checksum.cjs":1455,"./coercers.cjs":1456,"./collections.cjs":1457,"./encryption-types.cjs":1458,"./errors.cjs":1459,"./hex.cjs":1460,"./json.cjs":1462,"./keyring.cjs":1463,"./logging.cjs":1464,"./misc.cjs":1465,"./number.cjs":1466,"./opaque.cjs":1467,"./promise.cjs":1468,"./time.cjs":1469,"./transaction-types.cjs":1470,"./versions.cjs":1471},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){r===undefined&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){r===undefined&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),s(e("./assert.cjs"),n),s(e("./base64.cjs"),n),s(e("./bytes.cjs"),n),s(e("./caip-types.cjs"),n),s(e("./checksum.cjs"),n),s(e("./coercers.cjs"),n),s(e("./collections.cjs"),n),s(e("./encryption-types.cjs"),n),s(e("./errors.cjs"),n),s(e("./hex.cjs"),n),s(e("./json.cjs"),n),s(e("./keyring.cjs"),n),s(e("./logging.cjs"),n),s(e("./misc.cjs"),n),s(e("./number.cjs"),n),s(e("./opaque.cjs"),n),s(e("./promise.cjs"),n),s(e("./time.cjs"),n),s(e("./transaction-types.cjs"),n),s(e("./versions.cjs"),n)}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/index.cjs"}],[1462,{"./assert.cjs":1451,"./misc.cjs":1465,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonRpcIdValidator=n.assertIsJsonRpcError=n.isJsonRpcError=n.assertIsJsonRpcFailure=n.isJsonRpcFailure=n.assertIsJsonRpcSuccess=n.isJsonRpcSuccess=n.assertIsJsonRpcResponse=n.isJsonRpcResponse=n.assertIsPendingJsonRpcResponse=n.isPendingJsonRpcResponse=n.JsonRpcResponseStruct=n.JsonRpcFailureStruct=n.JsonRpcSuccessStruct=n.PendingJsonRpcResponseStruct=n.assertIsJsonRpcRequest=n.isJsonRpcRequest=n.assertIsJsonRpcNotification=n.isJsonRpcNotification=n.JsonRpcNotificationStruct=n.JsonRpcRequestStruct=n.JsonRpcParamsStruct=n.JsonRpcErrorStruct=n.JsonRpcIdStruct=n.JsonRpcVersionStruct=n.jsonrpc2=n.getJsonSize=n.getSafeJson=n.isValidJson=n.JsonStruct=n.UnsafeJsonStruct=n.exactOptional=n.object=void 0;const r=e("@metamask/superstruct"),s=e("./assert.cjs"),o=e("./misc.cjs");function a({path:e,branch:t}){const n=e[e.length-1];return(0,o.hasProperty)(t[t.length-2],n)}function i(e){return new r.Struct({...e,type:`optional ${e.type}`,validator:(t,n)=>!a(n)||e.validator(t,n),refiner:(t,n)=>!a(n)||e.refiner(t,n)})}n.object=e=>(0,r.object)(e),n.exactOptional=i;function l(e){return(0,r.create)(e,n.JsonStruct)}n.UnsafeJsonStruct=(0,r.union)([(0,r.literal)(null),(0,r.boolean)(),(0,r.define)("finite number",(e=>(0,r.is)(e,(0,r.number)())&&Number.isFinite(e))),(0,r.string)(),(0,r.array)((0,r.lazy)((()=>n.UnsafeJsonStruct))),(0,r.record)((0,r.string)(),(0,r.lazy)((()=>n.UnsafeJsonStruct)))]),n.JsonStruct=(0,r.coerce)(n.UnsafeJsonStruct,(0,r.any)(),(e=>((0,s.assertStruct)(e,n.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),n.isValidJson=function(e){try{return l(e),!0}catch{return!1}},n.getSafeJson=l,n.getJsonSize=function(e){(0,s.assertStruct)(e,n.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},n.jsonrpc2="2.0",n.JsonRpcVersionStruct=(0,r.literal)(n.jsonrpc2),n.JsonRpcIdStruct=(0,r.nullable)((0,r.union)([(0,r.number)(),(0,r.string)()])),n.JsonRpcErrorStruct=(0,n.object)({code:(0,r.integer)(),message:(0,r.string)(),data:i(n.JsonStruct),stack:i((0,r.string)())}),n.JsonRpcParamsStruct=(0,r.union)([(0,r.record)((0,r.string)(),n.JsonStruct),(0,r.array)(n.JsonStruct)]),n.JsonRpcRequestStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:i(n.JsonRpcParamsStruct)}),n.JsonRpcNotificationStruct=(0,n.object)({jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:i(n.JsonRpcParamsStruct)}),n.isJsonRpcNotification=function(e){return(0,r.is)(e,n.JsonRpcNotificationStruct)},n.assertIsJsonRpcNotification=function(e,t){(0,s.assertStruct)(e,n.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},n.isJsonRpcRequest=function(e){return(0,r.is)(e,n.JsonRpcRequestStruct)},n.assertIsJsonRpcRequest=function(e,t){(0,s.assertStruct)(e,n.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},n.PendingJsonRpcResponseStruct=(0,r.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:(0,r.optional)((0,r.unknown)()),error:(0,r.optional)(n.JsonRpcErrorStruct)}),n.JsonRpcSuccessStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:n.JsonStruct}),n.JsonRpcFailureStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,error:n.JsonRpcErrorStruct}),n.JsonRpcResponseStruct=(0,r.union)([n.JsonRpcSuccessStruct,n.JsonRpcFailureStruct]),n.isPendingJsonRpcResponse=function(e){return(0,r.is)(e,n.PendingJsonRpcResponseStruct)},n.assertIsPendingJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,n.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},n.isJsonRpcResponse=function(e){return(0,r.is)(e,n.JsonRpcResponseStruct)},n.assertIsJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,n.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},n.isJsonRpcSuccess=function(e){return(0,r.is)(e,n.JsonRpcSuccessStruct)},n.assertIsJsonRpcSuccess=function(e,t){(0,s.assertStruct)(e,n.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},n.isJsonRpcFailure=function(e){return(0,r.is)(e,n.JsonRpcFailureStruct)},n.assertIsJsonRpcFailure=function(e,t){(0,s.assertStruct)(e,n.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},n.isJsonRpcError=function(e){return(0,r.is)(e,n.JsonRpcErrorStruct)},n.assertIsJsonRpcError=function(e,t){(0,s.assertStruct)(e,n.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},n.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:n,permitNull:r}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(n||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||r&&null===e)}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/json.cjs"}],[1463,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/keyring.cjs"}],[1464,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.createProjectLogger=void 0;const s=(0,r(e("debug")).default)("metamask");n.createProjectLogger=function(e){return s.extend(e)},n.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/logging.cjs"}],[1465,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.calculateNumberSize=n.calculateStringSize=n.isASCII=n.isPlainObject=n.ESCAPE_CHARACTERS_REGEXP=n.JsonSize=n.getKnownPropertyNames=n.hasProperty=n.isObject=n.isNullOrUndefined=n.isNonEmptyArray=void 0,n.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},n.isNullOrUndefined=function(e){return null===e||e===undefined},n.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function r(e){return e.charCodeAt(0)<=127}n.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),n.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(n.JsonSize||(n.JsonSize={})),n.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,n.isPlainObject=function(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}},n.isASCII=r,n.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(e.match(n.ESCAPE_CHARACTERS_REGEXP)??[]).length},n.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/misc.cjs"}],[1466,{"./assert.cjs":1451,"./hex.cjs":1460},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.hexToBigInt=n.hexToNumber=n.bigIntToHex=n.numberToHex=void 0;const r=e("./assert.cjs"),s=e("./hex.cjs");n.numberToHex=e=>((0,r.assert)("number"==typeof e,"Value must be a number."),(0,r.assert)(e>=0,"Value must be a non-negative number."),(0,r.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,s.add0x)(e.toString(16)));n.bigIntToHex=e=>((0,r.assert)("bigint"==typeof e,"Value must be a bigint."),(0,r.assert)(e>=0,"Value must be a non-negative bigint."),(0,s.add0x)(e.toString(16)));n.hexToNumber=e=>{(0,s.assertIsHexString)(e);const t=parseInt(e,16);return(0,r.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};n.hexToBigInt=e=>((0,s.assertIsHexString)(e),BigInt((0,s.add0x)(e)))}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/number.cjs"}],[1467,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/opaque.cjs"}],[1468,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createDeferredPromise=void 0,n.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,n;const r=new Promise(((e,r)=>{t=e,n=r}));return e&&r.catch((e=>{})),{promise:r,resolve:t,reject:n}}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/promise.cjs"}],[1469,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.timeSince=n.inMilliseconds=n.Duration=void 0,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"}(n.Duration||(n.Duration={}));const r=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};n.inMilliseconds=function(e,t){return r(e,"count"),e*t},n.timeSince=function(e){return r(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/time.cjs"}],[147,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:12,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=12;try{const e=function(e){const t=e;return t.NoticeController.noticesList.forEach((e=>{e.read&&(e.body="")})),t}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #12${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/012.js"}],[1470,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1471,{"./assert.cjs":1451,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.satisfiesVersionRange=n.gtRange=n.gtVersion=n.assertIsSemVerRange=n.assertIsSemVerVersion=n.isValidSemVerRange=n.isValidSemVerVersion=n.VersionRangeStruct=n.VersionStruct=void 0;const r=e("@metamask/superstruct"),s=e("semver"),o=e("./assert.cjs");n.VersionStruct=(0,r.refine)((0,r.string)(),"Version",(e=>null!==(0,s.valid)(e)||`Expected SemVer version, got "${e}"`)),n.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",(e=>null!==(0,s.validRange)(e)||`Expected SemVer range, got "${e}"`)),n.isValidSemVerVersion=function(e){return(0,r.is)(e,n.VersionStruct)},n.isValidSemVerRange=function(e){return(0,r.is)(e,n.VersionRangeStruct)},n.assertIsSemVerVersion=function(e){(0,o.assertStruct)(e,n.VersionStruct)},n.assertIsSemVerRange=function(e){(0,o.assertStruct)(e,n.VersionRangeStruct)},n.gtVersion=function(e,t){return(0,s.gt)(e,t)},n.gtRange=function(e,t){return(0,s.gtr)(e,t)},n.satisfiesVersionRange=function(e,t){return(0,s.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/versions.cjs"}]],[],{}); \ No newline at end of file +LavaPack.loadBundle([[10,{"../../../shared/constants/network":5264,"../constants/contracts":5,"../lib/util":135,"@ethersproject/contracts":523,"@ethersproject/providers":561,"@metamask/base-controller":1396,"@metamask/eth-query":1640,"@metamask/utils":2761,lodash:4380,loglevel:4386,pify:4517,"single-call-balance-checker-abi":5094,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDefaultAccountTrackerControllerState=n.default=void 0;var r=f(e("@metamask/eth-query")),s=e("uuid"),o=f(e("loglevel")),a=f(e("pify")),i=e("@ethersproject/providers"),l=e("@ethersproject/contracts"),c=f(e("single-call-balance-checker-abi")),d=e("lodash"),u=e("@metamask/utils"),h=e("@metamask/base-controller"),p=e("../../../shared/constants/network"),m=e("../constants/contracts"),g=e("../lib/util");function f(e){return e&&e.__esModule?e:{default:e}}function C(e,t,n){y(e,t),t.set(e,n)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t){return e.get(b(e,t))}function v(e,t,n){return e.set(b(e,t),n),n}function b(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const k={accounts:{persist:!0,anonymous:!1},currentBlockGasLimit:{persist:!0,anonymous:!0},accountsByChainId:{persist:!0,anonymous:!1},currentBlockGasLimitByChainId:{persist:!0,anonymous:!0}},S=()=>({accounts:{},currentBlockGasLimit:"",accountsByChainId:{},currentBlockGasLimitByChainId:{}});n.getDefaultAccountTrackerControllerState=S;var A=new WeakMap,T=new WeakMap,E=new WeakMap,M=new WeakMap,P=new WeakMap,_=new WeakMap,I=new WeakMap,N=new WeakSet,R=new WeakMap;class O extends h.BaseController{constructor(e){var t,n;super({name:"AccountTrackerController",metadata:k,state:{accounts:{},currentBlockGasLimit:"",accountsByChainId:{},currentBlockGasLimitByChainId:{},...e.state},messenger:e.messenger}),y(t=this,n=N),n.add(t),C(this,A,new Map),C(this,T,{}),C(this,E,void 0),C(this,M,void 0),C(this,P,{}),C(this,_,void 0),C(this,I,void 0),C(this,R,(async e=>{await b(N,this,F).call(this,undefined,e)})),v(E,this,e.provider),v(M,this,e.blockTracker),v(_,this,e.getNetworkIdentifier),this.messagingSystem.subscribe("KeyringController:accountRemoved",(e=>this.removeAccounts([e])));const r=this.messagingSystem.call("OnboardingController:getState");this.messagingSystem.subscribe("OnboardingController:stateChange",(0,g.previousValueComparator)(((e,t)=>{const{completedOnboarding:n}=e,{completedOnboarding:r}=t;return!n&&r&&this.updateAccountsAllActiveNetworks(),!0}),r)),v(I,this,this.messagingSystem.call("AccountsController:getSelectedAccount")),this.messagingSystem.subscribe("AccountsController:selectedEvmAccountChange",(e=>{const{useMultiAccountBalanceChecker:t}=this.messagingSystem.call("PreferencesController:getState");w(I,this).id===e.id||t||(v(I,this,e),this.updateAccountsAllActiveNetworks())}))}resetState(){const{accounts:e,accountsByChainId:t,currentBlockGasLimit:n,currentBlockGasLimitByChainId:r}={accounts:{},currentBlockGasLimit:"",accountsByChainId:{},currentBlockGasLimitByChainId:{}};this.update((s=>{s.accounts=e,s.accountsByChainId=t,s.currentBlockGasLimit=n,s.currentBlockGasLimitByChainId=r}))}start(){v(P,this,{[b(N,this,x).call(this)]:w(M,this).getCurrentBlock()}),w(M,this).once("latest",(e=>{w(P,this)[b(N,this,x).call(this)]=e})),w(M,this).removeListener("latest",w(R,this)),w(M,this).addListener("latest",w(R,this)),this.updateAccounts()}stop(){w(M,this).removeListener("latest",w(R,this))}startPollingByNetworkClientId(e){const t=(0,s.v4)(),n=w(A,this).get(e);if(n)n.add(t);else{const n=new Set;n.add(t),w(A,this).set(e,n),b(N,this,j).call(this,e)}return t}stopAllPolling(){this.stop(),w(A,this).forEach(((e,t)=>{e.forEach((e=>{this.stopPollingByPollingToken(e)}))}))}stopPollingByPollingToken(e){if(!e)throw new Error("pollingToken required");let t=!1;if(w(A,this).forEach(((n,r)=>{n.has(e)&&(t=!0,n.delete(e),0===n.size&&(w(A,this).delete(r),b(N,this,D).call(this,r)))})),!t)throw new Error("pollingToken not found")}syncWithAddresses(e){const{accounts:t}=this.state,n=Object.keys(t),r=[];e.forEach((e=>{n.includes(e)||r.push(e)}));const s=[];n.forEach((t=>{e.includes(t)||s.push(t)})),this.addAccounts(r),this.removeAccounts(s)}addAccounts(e){const{accounts:t,accountsByChainId:n}=this.state,r=(0,d.cloneDeep)(t),s=(0,d.cloneDeep)(n);e.forEach((e=>{r[e]={}})),Object.keys(s).forEach((t=>{e.forEach((e=>{s[t][e]={}}))})),this.update((e=>{e.accounts=r,e.accountsByChainId=s})),w(P,this)[b(N,this,x).call(this)]&&this.updateAccounts(),w(A,this).forEach(((e,t)=>{const{chainId:n}=b(N,this,B).call(this,t);w(P,this)[n]&&this.updateAccounts(t)}))}removeAccounts(e){const{accounts:t,accountsByChainId:n}=this.state,r=(0,d.cloneDeep)(t),s=(0,d.cloneDeep)(n);e.forEach((e=>{delete r[e]})),Object.keys(s).forEach((t=>{e.forEach((e=>{delete s[t][e]}))})),this.update((e=>{e.accounts=r,e.accountsByChainId=s}))}clearAccounts(){this.update((e=>{e.accounts={},e.accountsByChainId={[b(N,this,x).call(this)]:{}}}))}async updateAccountsAllActiveNetworks(){await this.updateAccounts(),await Promise.all(Array.from(w(A,this)).map((([e])=>this.updateAccounts(e))))}async updateAccounts(e){const{completedOnboarding:t}=this.messagingSystem.call("OnboardingController:getState");if(!t)return;const{chainId:n,provider:r,identifier:s}=b(N,this,B).call(this,e),{useMultiAccountBalanceChecker:o}=this.messagingSystem.call("PreferencesController:getState");let a=[];if(o){const{accounts:e}=this.state;a=Object.keys(e)}else{a=[this.messagingSystem.call("AccountsController:getSelectedAccount").address]}s!==p.LOCALHOST_RPC_URL&&"http://127.0.0.1:8545"!==s&&n in m.SINGLE_CALL_BALANCES_ADDRESSES?await b(N,this,$).call(this,a,m.SINGLE_CALL_BALANCES_ADDRESSES[n],r,n):await Promise.all(a.map((e=>b(N,this,L).call(this,e,r,n))))}}function x(){const{selectedNetworkClientId:e}=this.messagingSystem.call("NetworkController:getState"),{configuration:{chainId:t}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return t}function B(e){if(e){const{configuration:t,provider:n,blockTracker:r}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return{chainId:t.chainId,provider:n,blockTracker:r,identifier:w(_,this).call(this,t)}}return{chainId:b(N,this,x).call(this),provider:w(E,this),blockTracker:w(M,this),identifier:w(_,this).call(this)}}function j(e){if(w(T,this)[e])return;const{blockTracker:t}=b(N,this,B).call(this,e),n=t=>b(N,this,F).call(this,e,t);t.addListener("latest",n),w(T,this)[e]=n,this.updateAccounts(e)}function D(e){if(!w(T,this)[e])return;const{blockTracker:t}=b(N,this,B).call(this,e);t.removeListener("latest",w(T,this)[e]),delete w(T,this)[e]}function U(e){const{accounts:t,accountsByChainId:n}=this.state;if(n[e])return(0,d.cloneDeep)(n[e]);const r={};return Object.keys(t).forEach((e=>{r[e]={}})),r}async function F(e,t){const{chainId:n,provider:s}=b(N,this,B).call(this,e);w(P,this)[n]=t;const i=await(0,a.default)(new r.default(s)).getBlockByNumber(t,!1);if(!i)return;const l=i.gasLimit;this.update((e=>{n===b(N,this,x).call(this)&&(e.currentBlockGasLimit=l),e.currentBlockGasLimitByChainId[n]=l}));try{await this.updateAccounts(e)}catch(e){o.default.error(e)}}async function L(e,t,n){const{useMultiAccountBalanceChecker:s}=this.messagingSystem.call("PreferencesController:getState");let o="0x0";try{o=await(0,a.default)(new r.default(t)).getBalance(e)}catch(e){if(e&&"object"==typeof e&&(0,u.hasProperty)(e,"data")&&e.data&&(0,u.hasProperty)(e.data,"request")&&e.data.request&&(0,u.hasProperty)(e.data.request,"method")&&"eth_getBalance"!==e.data.request.method)throw e}const i={address:e,balance:o},l=b(N,this,U).call(this,n);if(!l[e])return;let c=l;s||(c={},Object.keys(l).forEach((t=>{e!==t&&(c[t]={address:t,balance:null})}))),c[e]=i,this.update((e=>{n===b(N,this,x).call(this)&&(e.accounts=c),e.accountsByChainId[n]=c}))}async function $(e,t,n,r){const s=await new l.Contract(t,c.default,new i.Web3Provider(n)),a=["0x0000000000000000000000000000000000000000"];try{const t=await s.balances(e,a),n=b(N,this,U).call(this,r),o={};Object.keys(n).forEach((t=>{e.includes(t)||(o[t]={address:t,balance:null})})),e.forEach(((e,n)=>{const r=t[n]?t[n].toHexString():"0x0";o[e]={address:e,balance:r}})),this.update((e=>{r===b(N,this,x).call(this)&&(e.accounts=o),e.accountsByChainId[r]=o}))}catch(t){o.default.warn("MetaMask - Account Tracker single call balance fetch failed",t),Promise.allSettled(e.map((e=>b(N,this,L).call(this,e,n,r))))}}n.default=O}}},{package:"$root$",file:"app/scripts/controllers/account-tracker-controller.ts"}],[100,{"../../../../../shared/constants/app":5248,"./ethereum-chain-utils":102,"@metamask/controller-utils":1422,"@metamask/network-controller":1990,"@metamask/rpc-errors":2304,lodash:4380,"uri-js":5150},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(e("uri-js")),s=e("@metamask/controller-utils"),o=e("@metamask/network-controller"),a=e("@metamask/rpc-errors"),i=e("lodash"),l=e("../../../../../shared/constants/app"),c=e("./ethereum-chain-utils");function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}const u={methodNames:[l.MESSAGE_TYPE.ADD_ETHEREUM_CHAIN],implementation:async function(e,t,n,l,{addNetwork:d,updateNetwork:u,getNetworkConfigurationByChainId:h,setActiveNetwork:p,requestUserApproval:m,startApprovalFlow:g,endApprovalFlow:f,getCurrentChainIdForDomain:C,getCaveat:y,requestPermittedChainsPermission:w,grantPermittedChainsPermissionIncremental:v}){let b;try{b=(0,c.validateAddEthereumChainParams)(e.params[0],l)}catch(e){return l(e)}const{chainId:k,chainName:S,firstValidBlockExplorerUrl:A,firstValidRPCUrl:T,ticker:E}=b,{origin:M}=e,P=C(M),_=h(k);if(_&&_.chainId===k&&_.nativeCurrency!==E)return l(a.rpcErrors.invalidParams({message:`nativeCurrency.symbol does not match currency symbol for a network the user already has added with the same chainId. Received:\n${E}`}));let I,N=_,R=null==_?void 0:_.rpcEndpoints.findIndex((({url:e})=>r.equal(e,T))),O=A?null==_?void 0:_.blockExplorerUrls.findIndex((e=>r.equal(e,A))):undefined;if(!_||R!==_.defaultRpcEndpointIndex||A&&O!==_.defaultBlockExplorerUrlIndex){({id:I}=await g());try{if(await m({origin:M,type:s.ApprovalType.AddEthereumChain,requestData:{chainId:k,rpcPrefs:{blockExplorerUrl:A},chainName:S,rpcUrl:T,ticker:E}}),_){const e=(0,i.cloneDeep)(_);-1===R&&(e.rpcEndpoints=[...e.rpcEndpoints,{url:T,type:o.RpcEndpointType.Custom,name:S}],R=e.rpcEndpoints.length-1),e.defaultRpcEndpointIndex=R,A&&(-1===O&&(e.blockExplorerUrls=[...e.blockExplorerUrls,A],O=e.blockExplorerUrls.length-1),e.defaultBlockExplorerUrlIndex=O),N=await u(e.chainId,e,P===k?{replacementSelectedRpcEndpointIndex:e.defaultRpcEndpointIndex}:undefined)}else N=await d({blockExplorerUrls:A?[A]:[],defaultBlockExplorerUrlIndex:A?0:undefined,chainId:k,defaultRpcEndpointIndex:0,name:S,nativeCurrency:E,rpcEndpoints:[{url:T,name:S,type:o.RpcEndpointType.Custom}]})}catch(e){return f({id:I}),l(e)}}if(k!==P){const{networkClientId:e}=N.rpcEndpoints[N.defaultRpcEndpointIndex];return(0,c.switchChain)(t,l,k,e,I,{isAddFlow:!0,setActiveNetwork:p,endApprovalFlow:f,getCaveat:y,requestPermittedChainsPermission:w,grantPermittedChainsPermissionIncremental:v})}I&&f({id:I});return t.result=null,l()},hookNames:{addNetwork:!0,updateNetwork:!0,getNetworkConfigurationByChainId:!0,setActiveNetwork:!0,requestUserApproval:!0,startApprovalFlow:!0,endApprovalFlow:!0,getCurrentChainIdForDomain:!0,getCaveat:!0,requestPermittedChainsPermission:!0,grantPermittedChainsPermissionIncremental:!0}};n.default=u}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/add-ethereum-chain.js"}],[101,{"../../../../../shared/constants/app":5248},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;const r={methodNames:[e("../../../../../shared/constants/app").MESSAGE_TYPE.ETH_ACCOUNTS],implementation:async function(e,t,n,r,{getAccounts:s}){return t.result=await s(),r()},hookNames:{getAccounts:!0}};n.default=r}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/eth-accounts.ts"}],[102,{"../../../../../shared/constants/app":5248,"../../../../../shared/constants/permissions":5268,"../../../../../shared/modules/network.utils":5311,"../../../controllers/permissions":30,"../../util":135,"@metamask/rpc-errors":2304},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.switchChain=async function(e,t,n,s,a,{isAddFlow:l,setActiveNetwork:c,endApprovalFlow:d,getCaveat:u,requestPermittedChainsPermission:h,grantPermittedChainsPermissionIncremental:p}){try{const{value:t}=u({target:i.PermissionNames.permittedChains,caveatType:o.CaveatTypes.restrictNetworkSwitching})??{};t!==undefined&&t.includes(n)||(l?await p([n]):await h([n])),await c(s),e.result=null}catch(n){return n.code===r.errorCodes.provider.userRejectedRequest&&a?(e.result=null,t()):t(n)}finally{a&&d({id:a})}return t()},n.validateAddEthereumChainParams=function(e,t){if(!e||"object"!=typeof e)throw r.rpcErrors.invalidParams({message:`Expected single, object parameter. Received:\n${JSON.stringify(e)}`});const{chainId:n,chainName:s,blockExplorerUrls:o,nativeCurrency:i,rpcUrls:d,...u}=e,h=Object.keys(u).filter((e=>!["iconUrls"].includes(e)));if(h.length>0)throw r.rpcErrors.invalidParams({message:`Received unexpected keys on object parameter. Unsupported keys:\n${h}`});const p=c(n);if(!d||!Array.isArray(d)||0===d.length)throw r.rpcErrors.invalidParams({message:`Expected an array with at least one valid string HTTPS url 'rpcUrls', Received:\n${d}`});const m=e=>{const t=(0,l.getValidUrl)(e);return null!==t&&("localhost"===t.hostname||"127.0.0.1"===t.hostname||"https:"===t.protocol)},g=d.find((e=>m(e))),f=Array.isArray(o)?o.find((e=>m(e))):null;if(!g)throw r.rpcErrors.invalidParams({message:`Expected an array with at least one valid string HTTPS url 'rpcUrls', Received:\n${d}`});if("string"!=typeof s||!s)throw r.rpcErrors.invalidParams({message:`Expected non-empty string 'chainName'. Received:\n${s}`});const C=s.length>100?s.substring(0,100):s;if(null!==i){if("object"!=typeof i||Array.isArray(i))throw r.rpcErrors.invalidParams({message:`Expected null or object 'nativeCurrency'. Received:\n${i}`});if(18!==i.decimals)throw r.rpcErrors.invalidParams({message:`Expected the number 18 for 'nativeCurrency.decimals' when 'nativeCurrency' is provided. Received: ${i.decimals}`});if(!i.symbol||"string"!=typeof i.symbol)throw r.rpcErrors.invalidParams({message:`Expected a string 'nativeCurrency.symbol'. Received: ${i.symbol}`})}const y=(null==i?void 0:i.symbol)||a.UNKNOWN_TICKER_SYMBOL;if(y!==a.UNKNOWN_TICKER_SYMBOL&&("string"!=typeof y||y.length<1||y.length>6))throw r.rpcErrors.invalidParams({message:`Expected 1-6 character string 'nativeCurrency.symbol'. Received:\n${y}`});return{chainId:p,chainName:C,firstValidBlockExplorerUrl:f,firstValidRPCUrl:g,ticker:y}},n.validateChainId=c,n.validateSwitchEthereumChainParams=function(e,t){var n;if(null===(n=e.params)||void 0===n||!n[0]||"object"!=typeof e.params[0])throw r.rpcErrors.invalidParams({message:`Expected single, object parameter. Received:\n${JSON.stringify(e.params)}`});const{chainId:s,...o}=e.params[0];if(Object.keys(o).length>0)throw r.rpcErrors.invalidParams({message:`Received unexpected keys on object parameter. Unsupported keys:\n${Object.keys(o)}`});return c(s)};var r=e("@metamask/rpc-errors"),s=e("../../../../../shared/modules/network.utils"),o=e("../../../../../shared/constants/permissions"),a=e("../../../../../shared/constants/app"),i=e("../../../controllers/permissions"),l=e("../../util");function c(e){const t="string"==typeof e&&e.toLowerCase();if(!(0,s.isPrefixedFormattedHexString)(t))throw r.rpcErrors.invalidParams({message:`Expected 0x-prefixed, unpadded, non-zero hexadecimal string 'chainId'. Received:\n${e}`});if(!(0,s.isSafeChainId)(parseInt(t,16)))throw r.rpcErrors.invalidParams({message:`Invalid chain ID "${t}": numerical value greater than max safe value. Received:\n${e}`});return t}}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/ethereum-chain-utils.js"}],[103,{"../../../../../shared/constants/app":5248},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;const r={methodNames:[e("../../../../../shared/constants/app").MESSAGE_TYPE.GET_PROVIDER_STATE],implementation:async function(e,t,n,r,{getProviderState:s}){return t.result={...await s(e.origin)},r()},hookNames:{getProviderState:!0}};n.default=r}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/get-provider-state.ts"}],[104,{"./add-ethereum-chain":100,"./eth-accounts":101,"./get-provider-state":103,"./log-web3-shim-usage":105,"./request-accounts":106,"./send-metadata":107,"./switch-ethereum-chain":108,"./watch-asset":109},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.legacyHandlers=n.handlers=void 0;var r=u(e("./add-ethereum-chain")),s=u(e("./eth-accounts")),o=u(e("./get-provider-state")),a=u(e("./log-web3-shim-usage")),i=u(e("./request-accounts")),l=u(e("./send-metadata")),c=u(e("./switch-ethereum-chain")),d=u(e("./watch-asset"));function u(e){return e&&e.__esModule?e:{default:e}}n.handlers=[r.default,o.default,a.default,i.default,l.default,c.default,d.default],n.legacyHandlers=[s.default]}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/index.ts"}],[105,{"../../../../../shared/constants/app":5248},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;const r={methodNames:[e("../../../../../shared/constants/app").MESSAGE_TYPE.LOG_WEB3_SHIM_USAGE],implementation:function(e,t,n,r,{getWeb3ShimUsageState:s,setWeb3ShimUsageRecorded:o}){const{origin:a}=e;s(a)===undefined&&o(a);return t.result=!0,r()},hookNames:{getWeb3ShimUsageState:!0,setWeb3ShimUsageRecorded:!0}};n.default=r}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/log-web3-shim-usage.ts"}],[106,{"../../../../../shared/constants/app":5248,"../../../../../shared/constants/metametrics":5260,"../../util":135,"@metamask/rpc-errors":2304},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("@metamask/rpc-errors"),s=e("../../../../../shared/constants/app"),o=e("../../../../../shared/constants/metametrics"),a=e("../../util");const i={methodNames:[s.MESSAGE_TYPE.ETH_REQUEST_ACCOUNTS],implementation:async function(e,t,n,i,{origin:c,getAccounts:d,getUnlockPromise:u,hasPermission:h,requestAccountsPermission:p,sendMetrics:m,getPermissionsForOrigin:g,metamaskState:f}){if(l.has(c))return t.error=r.rpcErrors.resourceUnavailable(`Already processing ${s.MESSAGE_TYPE.ETH_REQUEST_ACCOUNTS}. Please wait.`),i();if(h(s.MESSAGE_TYPE.ETH_ACCOUNTS)){try{l.add(c),await u(!0),t.result=await d(),i()}catch(e){i(e)}finally{l.delete(c)}return undefined}try{await p()}catch(e){return t.error=e,i()}const C=await d();if(C.length>0){t.result=C;const e=g(c).eth_accounts.caveats[0].value.length,n=!Object.keys(f.permissionHistory).includes(c);(0,a.shouldEmitDappViewedEvent)(f.metaMetricsId)&&m({event:o.MetaMetricsEventName.DappViewed,category:o.MetaMetricsEventCategory.InpageProvider,referrer:{url:c},properties:{is_first_visit:n,number_of_accounts:Object.keys(f.accounts).length,number_of_accounts_connected:e}})}else t.error=r.rpcErrors.internal("Accounts unexpectedly unavailable. Please report this bug.");return i()},hookNames:{origin:!0,getAccounts:!0,getUnlockPromise:!0,hasPermission:!0,requestAccountsPermission:!0,sendMetrics:!0,getPermissionsForOrigin:!0,metamaskState:!0}};n.default=i;const l=new Set}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/request-accounts.js"}],[107,{"../../../../../shared/constants/app":5248,"@metamask/rpc-errors":2304},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("@metamask/rpc-errors");const s={methodNames:[e("../../../../../shared/constants/app").MESSAGE_TYPE.SEND_METADATA],implementation:function(e,t,n,s,{addSubjectMetadata:o,subjectType:a}){const{origin:i,params:l}=e;if(!l||"object"!=typeof l||Array.isArray(l))return s(r.rpcErrors.invalidParams({data:l}));{const{icon:e=null,name:t=null,...n}=l;o({...n,iconUrl:e,name:t,subjectType:a,origin:i})}return t.result=!0,s()},hookNames:{addSubjectMetadata:!0,subjectType:!0}};n.default=s}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/send-metadata.js"}],[108,{"../../../../../shared/constants/app":5248,"./ethereum-chain-utils":102,"@metamask/rpc-errors":2304},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("@metamask/rpc-errors"),s=e("../../../../../shared/constants/app"),o=e("./ethereum-chain-utils");const a={methodNames:[s.MESSAGE_TYPE.SWITCH_ETHEREUM_CHAIN],implementation:async function(e,t,n,a,{getNetworkConfigurationByChainId:i,setActiveNetwork:l,requestPermittedChainsPermission:c,getCaveat:d,getCurrentChainIdForDomain:u,grantPermittedChainsPermissionIncremental:h}){let p;try{p=(0,o.validateSwitchEthereumChainParams)(e,a)}catch(e){return a(e)}const{origin:m}=e;if(u(m)===p)return t.result=null,a();const g=i(p),f=null==g?void 0:g.rpcEndpoints[g.defaultRpcEndpointIndex].networkClientId;if(!f)return a(r.providerErrors.custom({code:4902,message:`Unrecognized chain ID "${p}". Try adding the chain using ${s.MESSAGE_TYPE.ADD_ETHEREUM_CHAIN} first.`}));return(0,o.switchChain)(t,a,p,f,null,{setActiveNetwork:l,getCaveat:d,requestPermittedChainsPermission:c,grantPermittedChainsPermissionIncremental:h})},hookNames:{getNetworkConfigurationByChainId:!0,setActiveNetwork:!0,getCaveat:!0,requestPermittedChainsPermission:!0,getCurrentChainIdForDomain:!0,grantPermittedChainsPermissionIncremental:!0}};n.default=a}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/switch-ethereum-chain.js"}],[109,{"../../../../../shared/constants/app":5248,"@metamask/controller-utils":1422,"@metamask/rpc-errors":2304},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("@metamask/controller-utils"),s=e("@metamask/rpc-errors"),o=e("../../../../../shared/constants/app");const a={methodNames:[o.MESSAGE_TYPE.WATCH_ASSET,o.MESSAGE_TYPE.WATCH_ASSET_LEGACY],implementation:async function(e,t,n,o,{handleWatchAssetRequest:a}){try{const{params:{options:n,type:i},origin:l,networkClientId:c}=e,{tokenId:d}=n;return[r.ERC721,r.ERC1155].includes(i)&&d!==undefined&&"string"!=typeof d?o(s.rpcErrors.invalidParams({message:`Expected parameter 'tokenId' to be type 'string'. Received type '${typeof d}'`})):(await a({asset:n,type:i,origin:l,networkClientId:c}),t.result=!0,o())}catch(e){return o(e)}},hookNames:{handleWatchAssetRequest:!0}};n.default=a}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/handlers/watch-asset.js"}],[11,{"../../../shared/constants/alerts":5246,"@metamask/base-controller":1396},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDefaultAlertControllerState=n.AlertController=void 0;var r=e("@metamask/base-controller"),s=e("../../../shared/constants/alerts");function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(e,t,n){return e.set(i(e,t),n),n}function i(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const l=()=>({alertEnabledness:s.TOGGLEABLE_ALERT_TYPES.reduce(((e,t)=>(e[t]=!0,e)),{}),unconnectedAccountAlertShownOrigins:{},web3ShimUsageOrigins:{}});n.getDefaultAlertControllerState=l;const c={alertEnabledness:{persist:!0,anonymous:!0},unconnectedAccountAlertShownOrigins:{persist:!0,anonymous:!1},web3ShimUsageOrigins:{persist:!0,anonymous:!1}};var d=new WeakMap,u=new WeakSet;class h extends r.BaseController{constructor(e){var t,n;super({messenger:e.messenger,metadata:c,name:"AlertController",state:{...l(),...e.state}}),o(t=this,n=u),n.add(t),function(e,t,n){o(e,t),t.set(e,n)}(this,d,void 0),a(d,this,this.messagingSystem.call("AccountsController:getSelectedAccount").address),this.messagingSystem.subscribe("AccountsController:selectedAccountChange",(e=>{this.state.unconnectedAccountAlertShownOrigins&&function(e,t){return e.get(i(e,t))}(d,this)!==e.address&&(a(d,this,e.address),this.update((e=>{e.unconnectedAccountAlertShownOrigins={}})))}))}setAlertEnabledness(e,t){this.update((n=>{n.alertEnabledness[e]=t}))}setUnconnectedAccountAlertShown(e){this.update((t=>{t.unconnectedAccountAlertShownOrigins[e]=!0}))}getWeb3ShimUsageState(e){var t;return null===(t=this.state.web3ShimUsageOrigins)||void 0===t?void 0:t[e]}setWeb3ShimUsageRecorded(e){i(u,this,p).call(this,e,s.Web3ShimUsageAlertStates.recorded)}setWeb3ShimUsageAlertDismissed(e){i(u,this,p).call(this,e,s.Web3ShimUsageAlertStates.dismissed)}}function p(e,t){this.update((n=>{n.web3ShimUsageOrigins&&(n.web3ShimUsageOrigins[e]=t)}))}n.AlertController=h}}},{package:"$root$",file:"app/scripts/controllers/alert-controller.ts"}],[110,{"./createMethodMiddleware":98,"./createUnsupportedMethodMiddleware":99},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=e("./createMethodMiddleware");Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===r[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return r[e]}}))}));var s=e("./createUnsupportedMethodMiddleware");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===s[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return s[e]}}))}))}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/index.js"}],[111,{"../util":135,"@segment/loosely-validate-event":2832,buffer:3561,"is-retry-allowed":4214,lodash:4380,"remove-trailing-slash":4800,timers:5116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t,r){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var s=c(e("remove-trailing-slash")),o=c(e("@segment/loosely-validate-event")),a=e("lodash"),i=c(e("is-retry-allowed")),l=e("../util");function c(e){return e&&e.__esModule?e:{default:e}}const d=()=>({});n.default=class{constructor(e,t={}){this.writeKey=e,this.host=(0,s.default)(t.host||"https://api.segment.io"),this.flushInterval=t.flushInterval||1e4,this.flushAt=t.flushAt||Math.max(t.flushAt,1)||20,this.queue=[],this.path="/v1/batch",this.maxQueueSize=460800,this.flushed=!1,this.retryCount=3,Object.defineProperty(this,"enable",{configurable:!1,writable:!1,enumerable:!0,value:!0})}_validate(e,t){(0,o.default)(e,t)}_message(e,t,n){return this._validate(t,e),this.enqueue(e,t,n),this}identify(e,t){return this._message("identify",e,t)}track(e,t){return this._message("track",e,t)}page(e,t){return this._message("page",e,t)}enqueue(e,t,n=d){if(!this.enable)return void r(n);const s={...t,type:e};if(s.context={...s.context,library:{name:"analytics-node"}},s.timestamp||(s.timestamp=new Date),s.messageId||(s.messageId=(0,l.generateRandomId)()),s.anonymousId&&!(0,a.isString)(s.anonymousId)&&(s.anonymousId=JSON.stringify(s.anonymousId)),s.userId&&!(0,a.isString)(s.userId)&&(s.userId=JSON.stringify(s.userId)),this.queue.push({message:s,callback:n}),!this.flushed)return this.flushed=!0,void this.flush();const o=this.queue.length>=this.flushAt,i=this.queue.reduce(((e,t)=>e+JSON.stringify(t).length),0)>=this.maxQueueSize;(o||i)&&this.flush(),this.flushInterval&&!this.timer&&(this.timer=setTimeout(this.flush.bind(this),this.flushInterval))}flush(e=d){if(!this.enable)return r(e),Promise.resolve();if(this.timer&&(clearTimeout(this.timer),this.timer=null),!this.queue.length)return r(e),Promise.resolve();const n=this.queue.splice(0,this.flushAt),s=n.map((e=>e.callback)),o={batch:n.map((e=>e.message)),timestamp:new Date,sentAt:new Date},a={Authorization:`Basic ${t.from(this.writeKey,"utf8").toString("base64")}`};return this._sendRequest(`${this.host}${this.path}`,{method:"POST",body:JSON.stringify(o),headers:a},(t=>{r((()=>{s.forEach((e=>e(t,o))),e(t,o)}))}),0)}_retryRequest(e,t,n,r){const s=100*Math.pow(2,r);setTimeout((()=>{this._sendRequest(e,t,n,r+1)}),s)}async _sendRequest(e,t,n,r){return fetch(e,t).then((async s=>{if(s.ok)n();else if(this._isErrorRetryable({response:s})&&r<=this.retryCount)this._retryRequest(e,t,n,r);else{const e=new Error(s.statusText);n(e)}})).catch((s=>{this._isErrorRetryable(s)&&r<=this.retryCount?this._retryRequest(e,t,n,r):n(s)}))}_isErrorRetryable(e){return!!function(e){return!e.response&&Boolean(e.code)&&"ECONNABORTED"!==e.code&&(0,i.default)(e)}(e)||!!e.response&&(e.response.status>=500&&e.response.status<=599||429===e.response.status)}}}).call(this)}).call(this,e("buffer").Buffer,e("timers").setImmediate)}}},{package:"$root$",file:"app/scripts/lib/segment/analytics.js"}],[112,{"../../../../shared/constants/time":5276,"./analytics":111},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.segment=n.createSegmentMock=void 0;var r,s=e("../../../../shared/constants/time");(r=e("./analytics"))&&r.__esModule;s.SECOND;const o=(e=1)=>{const t={queue:[],flush(){t.queue.forEach((([e,t])=>{t()})),t.queue=[]},track(n,r=(()=>undefined)){t.queue.push([n,r]),t.queue.length>=e&&t.flush()},page(){},identify(){}};return t};n.createSegmentMock=o;n.segment=o(1)}}},{package:"$root$",file:"app/scripts/lib/segment/index.js"}],[116,{"../../../../shared/lib/trace":5291},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.addPersonalMessage=async function({signatureParams:e,signatureController:t}){return s(e,t,"newUnsignedPersonalMessage")},n.addTypedMessage=async function({signatureParams:e,signatureController:t}){return s(e,t,"newUnsignedTypedMessage")};var r=e("../../../../shared/lib/trace");async function s(e,t,n){const[,s]=e,{id:o}=s,a=null==o?void 0:o.toString();(0,r.endTrace)({name:r.TraceName.Middleware,id:a});const i=await t[n](...e);return(0,r.endTrace)({name:r.TraceName.Signature,id:a}),i}}}},{package:"$root$",file:"app/scripts/lib/signature/util.ts"}],[117,{"./snap-keyring":120},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getAccountsBySnapId",{enumerable:!0,get:function(){return r.getAccountsBySnapId}}),Object.defineProperty(n,"snapKeyringBuilder",{enumerable:!0,get:function(){return r.snapKeyringBuilder}});var r=e("./snap-keyring")}}},{package:"$root$",file:"app/scripts/lib/snap-keyring/index.ts"}],[118,{"@metamask/keyring-api":1843,"@metamask/permission-controller":2133},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isProtocolAllowed=d,n.keyringSnapPermissionsBuilder=function(e,t){return()=>{if("metamask"===t)return a;if(o.includes(t))return l;const n=e.getSubjectMetadata(t);return(null==n?void 0:n.subjectType)===r.SubjectType.Website&&d(t)?i:[]}};var r=e("@metamask/permission-controller"),s=e("@metamask/keyring-api");const o=["https://portfolio.metamask.io"],a=[s.KeyringRpcMethod.ListAccounts,s.KeyringRpcMethod.GetAccount,s.KeyringRpcMethod.FilterAccountChains,s.KeyringRpcMethod.DeleteAccount,s.KeyringRpcMethod.ListRequests,s.KeyringRpcMethod.GetRequest,s.KeyringRpcMethod.SubmitRequest,s.KeyringRpcMethod.RejectRequest],i=[s.KeyringRpcMethod.ListAccounts,s.KeyringRpcMethod.GetAccount,s.KeyringRpcMethod.CreateAccount,s.KeyringRpcMethod.FilterAccountChains,s.KeyringRpcMethod.UpdateAccount,s.KeyringRpcMethod.DeleteAccount,s.KeyringRpcMethod.ExportAccount,s.KeyringRpcMethod.ListRequests,s.KeyringRpcMethod.GetRequest,s.KeyringRpcMethod.ApproveRequest,s.KeyringRpcMethod.RejectRequest],l=[s.KeyringRpcMethod.ListAccounts,s.KeyringRpcMethod.GetAccount,s.KeyringRpcMethod.GetAccountBalances,s.KeyringRpcMethod.SubmitRequest],c=["https:"];function d(e){try{const t=new URL(e);return c.includes(t.protocol)}catch(e){return!1}}}}},{package:"$root$",file:"app/scripts/lib/snap-keyring/keyring-snaps-permissions.ts"}],[119,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getSnapAndHardwareInfoForMetrics=async function(e,t,n){var r,s,o;if(!n)return{};const a=n.call("AccountsController:getSelectedAccount"),i=a.address,{keyring:l}=a.metadata;let c;var d;null!==(r=a.metadata.snap)&&void 0!==r&&r.id&&(c=n.call("SnapController:get",null===(d=a.metadata.snap)||void 0===d?void 0:d.id));return{account_type:await e(i),device_model:await t(i),account_hardware_type:await async function(){var e;return null!=l&&null!==(e=l.type)&&void 0!==e&&e.includes("Hardware")?l.type:undefined}(),account_snap_type:null===(s=c)||void 0===s?void 0:s.id,account_snap_version:null===(o=c)||void 0===o?void 0:o.version}}}}},{package:"$root$",file:"app/scripts/lib/snap-keyring/metrics.ts"}],[12,{"@metamask/base-controller":1396},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDefaultAppMetadataControllerState=n.default=void 0;var r=e("@metamask/base-controller");function s(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function o(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const a=()=>({currentAppVersion:"",previousAppVersion:"",previousMigrationVersion:0,currentMigrationVersion:0});n.getDefaultAppMetadataControllerState=a;const i={currentAppVersion:{persist:!0,anonymous:!0},previousAppVersion:{persist:!0,anonymous:!0},previousMigrationVersion:{persist:!0,anonymous:!0},currentMigrationVersion:{persist:!0,anonymous:!0}};var l=new WeakSet;class c extends r.BaseController{constructor({state:e={},messenger:t,currentAppVersion:n="",currentMigrationVersion:r=0}){super({name:"AppMetadataController",metadata:i,state:{currentAppVersion:"",previousAppVersion:"",previousMigrationVersion:0,currentMigrationVersion:0,...e},messenger:t}),s(this,l),o(l,this,d).call(this,n),o(l,this,u).call(this,r)}}function d(e){const t=this.state.currentAppVersion;e!==t&&this.update((n=>{n.currentAppVersion=e,n.previousAppVersion=t}))}function u(e){const t=this.state.currentMigrationVersion;e!==t&&this.update((n=>{n.previousMigrationVersion=t,n.currentMigrationVersion=e}))}n.default=c}}},{package:"$root$",file:"app/scripts/controllers/app-metadata.ts"}],[120,{"../../../../shared/constants/app":5248,"../../../../shared/constants/metametrics":5260,"../../../../ui/components/component-library/icon":5805,"../../translate":294,"./utils/isBlockedUrl":121,"./utils/showResult":122,"@metamask/eth-snap-keyring":1695,"webextension-polyfill":5225},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getAccountsBySnapId=void 0,n.showAccountCreationDialog=h,n.showAccountNameSuggestionDialog=p,n.snapKeyringBuilder=void 0;var r,s=e("@metamask/eth-snap-keyring"),o=(r=e("webextension-polyfill"))&&r.__esModule?r:{default:r},a=e("../../../../shared/constants/metametrics"),i=e("../../../../shared/constants/app"),l=e("../../translate"),c=e("../../../../ui/components/component-library/icon"),d=e("./utils/isBlockedUrl"),u=e("./utils/showResult");async function h(e,t){try{return Boolean(await t.call("ApprovalController:addRequest",{origin:e,type:i.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.confirmAccountCreation},!0))}catch(e){throw new Error(`Error occurred while showing account creation dialog.\n${e}`)}}async function p(e,t,n){try{return await t.call("ApprovalController:addRequest",{origin:e,type:i.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.showNameSnapAccount,requestData:{snapSuggestedAccountName:n}},!0)}catch(e){throw new Error(`Error occurred while showing name account dialog.\n${e}`)}}n.getAccountsBySnapId=async(e,t)=>{const n=await e.getSnapKeyring();return await n.getAccountsBySnapId(t)};n.snapKeyringBuilder=(e,t,n,r,m,g,f)=>{const C=()=>new s.SnapKeyring(t(),{addressExists:async t=>(await e.call("KeyringController:getAccounts")).includes(t.toLowerCase()),redirectUser:async(t,n,r)=>{if(n.length>0||r.length>0){const s=await(0,d.isBlockedUrl)(n,(async()=>await e.call("PhishingController:maybeUpdateState")),(t=>e.call("PhishingController:testOrigin",t))),a=await e.call("ApprovalController:addRequest",{origin:t,requestData:{url:n,message:r,isBlockedUrl:s},type:i.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.showSnapAccountRedirect},!0);Boolean(a)&&n.length>0?o.default.tabs.create({url:n}):console.log("User refused snap account redirection to:",n)}else console.log("Error occurred when redirecting snap account. url or message must be defined")},saveState:async()=>{await n()},addAccount:async(t,r,s,o="",i=!1)=>{const d=g(r),{id:C}=e.call("ApprovalController:startFlow"),y=e=>{m({event:e,category:a.MetaMetricsEventCategory.Accounts,properties:{account_type:a.MetaMetricsEventAccountType.Snap,snap_id:r,snap_name:d}})};try{const m="https://support.metamask.io/managing-my-wallet/accounts-and-addresses/how-to-add-accounts-in-your-wallet/",g=f(r)&&!i,C=g||await h(r,e);if(!C)throw await s(C),new Error("User denied account creation");const w=await p(r,e,o);if(null==w||!w.success)throw await s(null==w?void 0:w.success),new Error("User denied account creation");try{await n(),await s(w.success);const o=e.call("AccountsController:getAccountByAddress",t);if(!o)throw new Error(`Internal account not found for address: ${t}`);e.call("AccountsController:setSelectedAccount",o.id),w.name&&e.call("AccountsController:setAccountName",o.id,w.name),g||(y(a.MetaMetricsEventName.AddSnapAccountSuccessViewed),await(0,u.showSuccess)(e,r,{icon:c.IconName.UserCircleAdd,title:(0,l.t)("snapAccountCreated")},{message:(0,l.t)("snapAccountCreatedDescription"),address:t,learnMoreLink:m}),y(a.MetaMetricsEventName.AddSnapAccountSuccessClicked)),y(a.MetaMetricsEventName.AccountAdded)}catch(t){const n=t.message;throw await(0,u.showError)(e,r,{icon:c.IconName.UserCircleAdd,title:(0,l.t)("snapAccountCreationFailed")},{message:(0,l.t)("snapAccountCreationFailedDescription",d),learnMoreLink:m,error:n}),new Error(`Error occurred while creating snap account: ${n}`)}}finally{e.call("ApprovalController:endFlow",{id:C})}},removeAccount:async(t,s,o)=>{const d=g(s),{id:h}=e.call("ApprovalController:startFlow"),p="https://support.metamask.io/managing-my-wallet/accounts-and-addresses/how-to-remove-an-account-from-your-metamask-wallet/",f=e=>{m({event:e,category:a.MetaMetricsEventCategory.Accounts,properties:{account_type:a.MetaMetricsEventAccountType.Snap,snap_id:s,snap_name:d}})};let C=!1;try{if(C=Boolean(await e.call("ApprovalController:addRequest",{origin:s,type:i.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.confirmAccountRemoval,requestData:{publicAddress:t}},!0)),!C)throw await o(C),new Error("User denied account removal");try{await r(t),await o(C),await n(),f(a.MetaMetricsEventName.RemoveSnapAccountSuccessViewed),await(0,u.showError)(e,s,{icon:c.IconName.UserCircleRemove,title:(0,l.t)("snapAccountRemoved")},{message:(0,l.t)("snapAccountRemovedDescription"),learnMoreLink:p}),f(a.MetaMetricsEventName.RemoveSnapAccountSuccessClicked)}catch(t){const n=t.message;throw await(0,u.showError)(e,s,{icon:c.IconName.UserCircleRemove,title:(0,l.t)("snapAccountRemovalFailed")},{message:(0,l.t)("snapAccountRemovalFailedDescription",d),learnMoreLink:p,error:n}),f(a.MetaMetricsEventName.AccountRemoveFailed),new Error(`Error occurred while removing snap account: ${n}`)}}finally{C&&f(a.MetaMetricsEventName.AccountRemoved),e.call("ApprovalController:endFlow",{id:h})}}});return C.type=s.SnapKeyring.type,C}}}},{package:"$root$",file:"app/scripts/lib/snap-keyring/snap-keyring.ts"}],[121,{"../keyring-snaps-permissions":118},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isBlockedUrl=void 0;var r=e("../keyring-snaps-permissions");n.isBlockedUrl=async(e,t,n)=>{try{return!(0,r.isProtocolAllowed)(e)||(await t(),n(e).result)}catch(e){return console.error("Invalid URL passed into snap-keyring:",e),!1}}}}},{package:"$root$",file:"app/scripts/lib/snap-keyring/utils/isBlockedUrl.ts"}],[122,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.showSuccess=n.showError=void 0;const r=e=>({name:"SnapAuthorshipHeader",key:"snapHeader",properties:{snapId:e}});n.showError=(e,t,n,s)=>e.call("ApprovalController:showError",{header:[r(t)],title:n.title,icon:n.icon,error:{key:"snapAccountErrorMessage",name:"SnapAccountErrorMessage",properties:s}});n.showSuccess=(e,t,n,s)=>e.call("ApprovalController:showSuccess",{header:[r(t)],title:n.title,icon:n.icon,message:{key:"snapAccountSuccessMessage",name:"SnapAccountSuccessMessage",properties:s}})}}},{package:"$root$",file:"app/scripts/lib/snap-keyring/utils/showResult.ts"}],[123,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitizeUIState=function(e){const t={...e};for(const e of r)delete t[e];return function(e){const t=e.snaps;if(!t)return;e.snaps=Object.values(t).reduce(((e,t)=>(e[t.id]=function(e){const t={...e};return delete t.sourceCode,delete t.auxiliaryFiles,t}(t),e)),{})}(t),t};const r=["snapStates","unencryptedSnapStates","vault"]}}},{package:"$root$",file:"app/scripts/lib/state-utils.ts"}],[125,{"../../../../../shared/lib/four-byte":5284,"@ethersproject/abi":500,"@metamask/utils":2761,"ethereumjs-util":3796},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.decodeTransactionDataWithFourByte=async function(e){const t=e.slice(0,10),n=await(0,a.getMethodFrom4Byte)(t);if(!n)return undefined;const o=n.split("(")[0],u=function(e){let t=e.slice(e.indexOf("(")+1,-1);const n=[];for(;t.includes("(");){const e=d(t);if(!e)break;n.push(e.value),t=`${t.slice(0,e.start)}${n.length-1}#${t.slice(e.end+1)}`}return c(t,n)}(n);i("Generated inputs",u);const h=(0,r.addHexPrefix)(e.slice(10)),p=s.Interface.getAbiCoder().decode(u,h),m=u.map(((e,t)=>l(e,t,p)));return{name:o,params:m}};var r=e("ethereumjs-util"),s=e("@ethersproject/abi"),o=e("@metamask/utils"),a=e("../../../../../shared/lib/four-byte");const i=(0,o.createProjectLogger)("four-byte");function l(e,t,n){var r;const s=n[t],{type:o,name:a}=e;let i=null===(r=e.components)||void 0===r?void 0:r.map(((e,t)=>l(e,t,s)));if(o.endsWith("[]")){const t=o.slice(0,-2);i=s.map(((n,r)=>{const o=`Item ${r+1}`;return l({...e,name:o,type:t},r,s)}))}return{name:a,type:o,value:s,children:i}}function c(e,t){return e.split(",").map((e=>{const n=e.split("#"),r=n.length>1?parseInt(n[0],10):undefined;return{type:r===undefined?e:`tuple${n[1]??""}`,components:r===undefined?undefined:c(t[r],t)}}))}function d(e){let t=-1;for(let n=0;n(0,r.query)(t,"eth_getStorageAt",[e,n,"latest"]))))).find((e=>(0,s.stripHexPrefix)(e)!==a));return n&&(0,s.addHexPrefix)(n.slice(26))};var r=e("@metamask/controller-utils"),s=e("ethereumjs-util");const o=["0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3","0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"],a="0".padEnd(64,"0")}}},{package:"$root$",file:"app/scripts/lib/transaction/decode/proxy.ts"}],[127,{"@ethersproject/abi":500,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.decodeTransactionDataWithSourcify=async function(e,t,n){var i,l;const c=await async function(e,t){var n;const r=await async function(e,t){const n=parseInt(t,16),r=await fetch(`https://sourcify.dev/server/files/any/${n}/${e}`);if(!r.ok)throw new Error("Failed to fetch Sourcify files");return r.json()}(e,t),s=null===(n=r.files)||void 0===n?void 0:n.find((e=>e.name.includes("metadata.json")));if(!s)throw new Error("Metadata not found");return JSON.parse(s.content)}(t,n);s("Retrieved Sourcify metadata",{contractAddress:t,chainId:n,metadata:c});const{abi:d}=c.output,u=new r.Interface(d),h=e.slice(0,10);let p;try{p=u.getFunction(h)}catch(e){}if(!p)return s("Failed to find function in ABI",h,d),undefined;const{name:m,inputs:g}=p,f=a(m,g),C=null===(i=c.output.userdoc)||void 0===i?void 0:i.methods[f],y=null===(l=c.output.devdoc)||void 0===l?void 0:l.methods[f],w=(null==C?void 0:C.notice)??(null==y?void 0:y.details);s("Extracted NatSpec",{signature:f,userDoc:C,devDoc:y});const v=u.decodeFunctionData(h,e),b=g.map(((e,t)=>o(e,t,v,C,y)));return{name:m,description:w,params:b}};var r=e("@ethersproject/abi");const s=(0,e("@metamask/utils").createProjectLogger)("sourcify");function o(e,t,n,r,s){var a,i;const{name:l,type:c,components:d}=e,u=(null==r||null===(a=r.params)||void 0===a?void 0:a[l])??(null==s||null===(i=s.params)||void 0===i?void 0:i[l]),h=n[t];let p=null==d?void 0:d.map(((e,t)=>o(e,t,h,{},{})));if(c.endsWith("[]")){const t=c.slice(0,-2);p=h.map(((n,r)=>{const s=`Item ${r+1}`;return o({...e,name:s,type:t},r,h,{},{})}))}return{name:l,description:u,type:c,value:h,children:p}}function a(e,t){return`${e??""}(${t.map((e=>{var t;return null!==(t=e.components)&&void 0!==t&&t.length?`${a(undefined,e.components)}${e.type.endsWith("[]")?"[]":""}`:e.type})).join(",")})`}}}},{package:"$root$",file:"app/scripts/lib/transaction/decode/sourcify.ts"}],[128,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.UNISWAP_ROUTER_COMMANDS=void 0;n.UNISWAP_ROUTER_COMMANDS={0:{name:"V3_SWAP_EXACT_IN",params:[{type:"address",description:"The recipient of the output of the trade",name:"recipient"},{type:"uint256",description:"The amount of input tokens for the trade",name:"amountIn"},{type:"uint256",description:"The minimum amount of output tokens the user wants",name:"amountOutMin"},{type:"bytes",description:"The UniswapV3 encoded path to trade along",name:"path"},{type:"bool",description:"A flag for whether the input tokens should come from the msg.sender (through Permit2) or whether the funds are already in the UniversalRouter",name:"payerIsUser"}]},1:{name:"V3_SWAP_EXACT_OUT",params:[{type:"address",description:"The recipient of the output of the trade",name:"recipient"},{type:"uint256",description:"The amount of output tokens to receive",name:"amountOut"},{type:"uint256",description:"The maximum number of input tokens that should be spent",name:"amountInMax"},{type:"bytes",description:"The UniswapV3 encoded path to trade along",name:"path"},{type:"bool",description:"A flag for whether the input tokens should come from the msg.sender (through Permit2) or whether the funds are already in the UniversalRouter",name:"payerIsUser"}]},2:{name:"PERMIT2_TRANSFER_FROM",params:[{type:"address",description:"The token to fetch from Permit2",name:"token"},{type:"address",description:"The recipient of the tokens fetched",name:"recipient"},{type:"uint256",description:"The amount of token to fetch",name:"amount"}]},3:{name:"PERMIT2_PERMIT_BATCH",params:[{type:"bytes",description:"A PermitBatch struct outlining all of the Permit2 permits to execute.",name:"batch"},{type:"bytes",description:"The signature to provide to Permit2",name:"data"}]},4:{name:"SWEEP",params:[{type:"address",description:"The ERC20 token to sweep (or Constants.ETH for ETH)",name:"token"},{type:"address",description:"The recipient of the sweep",name:"recipient"},{type:"uint256",description:"The minimum required tokens to receive from the sweep",name:"amountMin"}]},5:{name:"TRANSFER",params:[{type:"address",description:"The ERC20 token to transfer (or Constants.ETH for ETH)",name:"token"},{type:"address",description:"The recipient of the transfer",name:"recipient"},{type:"uint256",description:"The amount to transfer",name:"value"}]},6:{name:"PAY_PORTION",params:[{type:"address",description:"The ERC20 token to transfer (or Constants.ETH for ETH)",name:"token"},{type:"address",description:"The recipient of the transfer",name:"recipient"},{type:"uint256",description:"In basis points, the percentage of the contract’s balance to transfer",name:"bips"}]},8:{name:"V2_SWAP_EXACT_IN",params:[{type:"address",description:"The recipient of the output of the trade",name:"recipient"},{type:"uint256",description:"The amount of input tokens for the trade",name:"amountIn"},{type:"uint256",description:"The minimum amount of output tokens the user wants",name:"amountOutMin"},{type:"address[]",description:"The UniswapV2 token path to trade along",name:"path"},{type:"bool",description:"A flag for whether the input tokens should come from the msg.sender (through Permit2) or whether the funds are already in the UniversalRouter",name:"payerIsUser"}]},9:{name:"V2_SWAP_EXACT_OUT",params:[{type:"address",description:"The recipient of the output of the trade",name:"recipient"},{type:"uint256",description:"The amount of output tokens to receive",name:"amountOut"},{type:"uint256",description:"The maximum number of input tokens that should be spent",name:"amountInMax"},{type:"address[]",description:"The UniswapV2 token path to trade along",name:"path"},{type:"bool",description:"A flag for whether the input tokens should come from the msg.sender (through Permit2) or whether the funds are already in the UniversalRouter",name:"payerIsUser"}]},10:{name:"PERMIT2_PERMIT",params:[{type:"bytes",description:"A PermitSingle struct outlining the Permit2 permit to execute",name:"permitSingle"},{type:"bytes",description:"The signature to provide to Permit2",name:"signature"}]},11:{name:"WRAP_ETH",params:[{type:"address",description:"The recipient of the WETH",name:"recipient"},{type:"uint256",description:"The amount of ETH to wrap",name:"amountMin"}]},12:{name:"UNWRAP_WETH",params:[{type:"address",description:"The recipient of the ETH",name:"recipient"},{type:"uint256",description:"The minimum required ETH to receive from the unwrapping",name:"amountMin"}]},13:{name:"PERMIT2_TRANSFER_FROM_BATCH",params:[{type:"bytes",description:"An array of AllowanceTransferDetails structs that each describe a Permit2 transfer to perform",name:"batchDetails"}]},16:{name:"SEAPORT",params:[{type:"uint256",description:"The ETH value to forward to the Seaport contract",name:"value"},{type:"bytes",description:"The calldata to use to call the Seaport contract",name:"data"}]},17:{name:"LOOKS_RARE_721",params:[{type:"uint256",description:"The ETH value to forward to the LooksRare contract",name:"value"},{type:"bytes",description:"The calldata to use to call the LooksRare contract",name:"data"},{type:"address",description:"The recipient of the ERC721",name:"recipient"},{type:"address",description:"The ERC721 token address",name:"token"},{type:"uint256",description:"The ID of the ERC721",name:"id"}]},18:{name:"NFTX",params:[{type:"uint256",description:"The ETH value to forward to the NFTX contract",name:"value"},{type:"bytes",description:"The calldata to use to call the NFTX contract",name:"data"}]},19:{name:"CRYPTOPUNKS",params:[{type:"uint256",description:"The PunkID to purchase",name:"punkId"},{type:"address",description:"The recipient for the cryptopunk",name:"recipient"},{type:"uint256",description:"The ETH value to forward to the Cryptopunks contract",name:"value"}]},20:{name:"LOOKS_RARE_1155",params:[{type:"uint256",description:"The ETH value to forward to the LooksRare contract",name:"value"},{type:"bytes",description:"The calldata to use to call the LooksRare contract",name:"data"},{type:"address",description:"The recipient of the ERC1155",name:"recipient"},{type:"address",description:"The ERC1155 token address",name:"token"},{type:"uint256",description:"The ID of the ERC1155",name:"id"},{type:"uint256",description:"The amount of the ERC1155 to transfer",name:"amount"}]},21:{name:"OWNER_CHECK_721",params:[{type:"address",description:"The required owner of the ERC721",name:"owner"},{type:"address",description:"The ERC721 token address",name:"token"},{type:"uint256",description:"The ID of the ERC721",name:"id"}]},22:{name:"OWNER_CHECK_1155",params:[{type:"address",description:"The required owner of the ERC1155",name:"owner"},{type:"address",description:"The ERC721 token address",name:"token"},{type:"uint256",description:"The ID of the ERC1155",name:"id"},{type:"uint256",description:"The minimum required amount of the ERC1155",name:"minBalance"}]},23:{name:"SWEEP_ERC721",params:[{type:"address",description:"The ERC721 token address to transfer",name:"token"},{type:"address",description:"The recipient of the transfer",name:"recipient"},{type:"uint256",description:"The token ID to transfer",name:"id"}]},24:{name:"X2Y2_721",params:[{type:"uint256",description:"The ETH value to forward to the X2Y2 contract",name:"value"},{type:"bytes",description:"The calldata to use to call the X2Y2 contract",name:"data"},{type:"address",description:"The recipient of the ERC721",name:"recipient"},{type:"address",description:"The ERC721 token address",name:"token"},{type:"uint256",description:"The ID of the ERC721",name:"id"}]},25:{name:"SUDOSWAP",params:[{type:"uint256",description:"The ETH value to forward to the Sudoswap contract",name:"value"},{type:"bytes",description:"The calldata to use to call the Sudoswap contract",name:"data"}]},26:{name:"NFT20",params:[{type:"uint256",description:"The ETH value to forward to the NFT20 contract",name:"value"},{type:"bytes",description:"The calldata to use to call the NFT20 contract",name:"data"}]},27:{name:"X2Y2_1155",params:[{type:"uint256",description:"The ETH value to forward to the X2Y2 contract",name:"value"},{type:"bytes",description:"The calldata to use to call the X2Y2 contract",name:"data"},{type:"address",description:"The recipient of the ERC1155",name:"recipient"},{type:"address",description:"The ERC1155 token address",name:"token"},{type:"uint256",description:"The ID of the ERC1155",name:"id"},{type:"uint256",description:"The amount of the ERC1155 to transfer",name:"amount"}]},28:{name:"FOUNDATION",params:[{type:"uint256",description:"The ETH value to forward to the Foundation contract",name:"value"},{type:"bytes",description:"The calldata to use to call the Foundation contract",name:"data"},{type:"address",description:"The recipient of the ERC721",name:"recipient"},{type:"address",description:"The ERC721 token address",name:"token"},{type:"uint256",description:"The ID of the ERC721",name:"id"}]},29:{name:"SWEEP_ERC1155",params:[{type:"address",description:"The ERC1155 token address to sweep",name:"token"},{type:"address",description:"The recipient of the sweep",name:"recipient"},{type:"uint256",description:"The token ID to sweep",name:"id"},{type:"uint256",description:"The minimum required tokens to receive from the sweep",name:"amount"}]}}}}},{package:"$root$",file:"app/scripts/lib/transaction/decode/uniswap-commands.ts"}],[129,{"../../../../../shared/constants/network":5264,"./uniswap-commands":128,"@ethersproject/abi":500,"ethereumjs-util":3796},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.UNISWAP_UNIVERSAL_ROUTER_ADDRESSES=void 0,n.decodeUniswapRouterTransactionData=function({transactionData:e,contractAddress:t,chainId:n}){const o=c[n];if(null==o||!o.map((e=>e.toLowerCase())).includes(t.toLowerCase()))return undefined;const u=new r.Interface(d);let h;try{h=u.parseTransaction({data:e})}catch(e){return undefined}const p=h.args.commands,m=h.args.inputs;return p.slice(2).match(/.{1,2}/gu).map(((e,t)=>function(e,t){const n=parseInt(e,16),o=31&n,c=a.UNISWAP_ROUTER_COMMANDS[String(o)];if(!c)return undefined;const d=c.params.map((e=>e.type)),u=r.Interface.getAbiCoder().decode(d,t),{name:h}=c,p=c.params.map(((e,t)=>{const{name:n,type:r,description:o}=e,a=u[t];return{name:n,type:r,value:"path"===n?function(e){const t=[];let n=(0,s.stripHexPrefix)(e),r={},o=!0;for(;n.length;){if(o){const e=(0,s.addHexPrefix)(n.slice(0,i));r.firstAddress?(r.secondAddress=e,t.push(r),r={firstAddress:e}):r.firstAddress=e,n=n.slice(i)}else r.tickSpacing=parseInt(n.slice(0,l),16),n=n.slice(l);o=!o}return t}(a):a,description:o}}));return{name:h,params:p}}(e,m[t]))).filter((e=>e!==undefined))};var r=e("@ethersproject/abi"),s=e("ethereumjs-util"),o=e("../../../../../shared/constants/network"),a=e("./uniswap-commands");const i=40,l=6,c=n.UNISWAP_UNIVERSAL_ROUTER_ADDRESSES={[o.CHAIN_IDS.ARBITRUM]:["0x4C60051384bd2d3C01bfc845Cf5F4b44bcbE9de5","0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4","0x5E325eDA8064b456f4781070C0738d849c824258"],[o.CHAIN_IDS.AVALANCHE]:["0x82635AF6146972cD6601161c4472ffe97237D292","0x4Dae2f939ACf50408e13d58534Ff8c2776d45265"],[o.CHAIN_IDS.BASE]:["0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4","0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD"],[o.CHAIN_IDS.BSC]:["0x5Dc88340E1c5c6366864Ee415d6034cadd1A9897","0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4","0x4Dae2f939ACf50408e13d58534Ff8c2776d45265"],[o.CHAIN_IDS.MAINNET]:["0xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B","0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD"],[o.CHAIN_IDS.OPTIMISM]:["0xb555edF5dcF85f42cEeF1f3630a52A108E55A654","0xeC8B0F7Ffe3ae75d7FfAb09429e3675bb63503e4","0xCb1355ff08Ab38bBCE60111F1bb2B784bE25D7e8"],[o.CHAIN_IDS.POLYGON]:["0x4C60051384bd2d3C01bfc845Cf5F4b44bcbE9de5","0x643770E279d5D0733F21d6DC03A8efbABf3255B4","0xec7BE89e9d109e7e3Fec59c222CF297125FEFda2"],[o.CHAIN_IDS.SEPOLIA]:["0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD"]},d=[{constant:!0,inputs:[{name:"commands",type:"bytes"},{name:"inputs",type:"bytes[]"},{name:"deadline",type:"uint256"}],name:"execute",type:"function"},{constant:!0,inputs:[{name:"commands",type:"bytes"},{name:"inputs",type:"bytes[]"}],name:"execute",type:"function"}]}}},{package:"$root$",file:"app/scripts/lib/transaction/decode/uniswap.ts"}],[13,{"../../../shared/constants/alarms":5245,"../../../shared/constants/app":5248,"../../../shared/constants/preferences":5269,"../../../shared/constants/time":5276,"../../../shared/modules/mv3.utils":5310,"../../../ui/helpers/utils/build-types":6273,"../metamask-controller":136,"@metamask/controller-utils":1422,"@metamask/obs-store":2126,events:3868,loglevel:4386,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AppStateController=void 0;var r=g(e("events")),s=e("@metamask/obs-store"),o=e("uuid"),a=g(e("loglevel")),i=e("@metamask/controller-utils"),l=e("../metamask-controller"),c=e("../../../shared/constants/time"),d=e("../../../shared/constants/alarms"),u=e("../../../shared/modules/mv3.utils"),h=e("../../../ui/helpers/utils/build-types"),p=e("../../../shared/constants/app"),m=e("../../../shared/constants/preferences");function g(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;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:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){return e.get(v(e,t))}function w(e,t,n){return e.set(v(e,t),n),n}function v(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var b=new WeakMap,k=new WeakSet;class S extends r.default{constructor(e){const{addUnlockListener:t,isUnlocked:n,initState:r,onInactiveTimeout:o,messenger:a,extension:i}=e;var l,c;super(),f(l=this,c=k),c.add(l),C(this,"extension",void 0),C(this,"onInactiveTimeout",void 0),C(this,"store",void 0),C(this,"timer",void 0),C(this,"isUnlocked",void 0),C(this,"waitingForUnlock",void 0),C(this,"messagingSystem",void 0),function(e,t,n){f(e,t),t.set(e,n)}(this,b,void 0),this.extension=i,this.onInactiveTimeout=o||(()=>undefined),this.store=new s.ObservableStore((e=>({timeoutMinutes:m.DEFAULT_AUTO_LOCK_TIME_LIMIT,connectedStatusPopoverHasBeenShown:!0,defaultHomeActiveTabName:null,browserEnvironment:{},popupGasPollTokens:[],notificationGasPollTokens:[],fullScreenGasPollTokens:[],recoveryPhraseReminderHasBeenShown:!1,recoveryPhraseReminderLastShown:(new Date).getTime(),outdatedBrowserWarningLastShown:null,nftsDetectionNoticeDismissed:!1,showTestnetMessageInDropdown:!0,showBetaHeader:(0,h.isBeta)(),showPermissionsTour:!0,showNetworkBanner:!0,showAccountBanner:!0,trezorModel:null,onboardingDate:null,lastViewedUserSurvey:null,newPrivacyPolicyToastClickedOrClosed:null,newPrivacyPolicyToastShownDate:null,hadAdvancedGasFeesSetPriorToMigration92_3:!1,...e,qrHardware:{},nftsDropdownState:{},usedNetworks:{"0x1":!0,"0x5":!0,"0x539":!0},surveyLinkLastClickedOrClosed:null,signatureSecurityAlertResponses:{},switchedNetworkDetails:null,switchedNetworkNeverShowMessage:!1,currentExtensionPopupId:0}))(r)),this.timer=null,this.isUnlocked=n,this.waitingForUnlock=[],t(this.handleUnlock.bind(this)),a.subscribe("PreferencesController:stateChange",(({preferences:e})=>{const t=this.store.getState();"number"==typeof(null==e?void 0:e.autoLockTimeLimit)&&t.timeoutMinutes!==e.autoLockTimeLimit&&this._setInactiveTimeout(e.autoLockTimeLimit)})),a.subscribe("KeyringController:qrKeyringStateChange",(e=>this.store.updateState({qrHardware:e})));const{preferences:d}=a.call("PreferencesController:getState");"number"==typeof d.autoLockTimeLimit&&this._setInactiveTimeout(d.autoLockTimeLimit),this.messagingSystem=a,this.messagingSystem.registerActionHandler("AppStateController:getState",(()=>this.store.getState())),this.store.subscribe((e=>{this.messagingSystem.publish("AppStateController:stateChange",e,[])})),w(b,this,null)}getUnlockPromise(e){return new Promise((t=>{this.isUnlocked()?t():this.waitForUnlock(t,e)}))}waitForUnlock(e,t){this.waitingForUnlock.push({resolve:e}),this.emit(l.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE),t&&this._requestApproval()}handleUnlock(){if(this.waitingForUnlock.length>0){for(;this.waitingForUnlock.length>0;){var e;null===(e=this.waitingForUnlock.shift())||void 0===e||e.resolve()}this.emit(l.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE)}this._acceptApproval()}setDefaultHomeActiveTabName(e){this.store.updateState({defaultHomeActiveTabName:e})}setConnectedStatusPopoverHasBeenShown(){this.store.updateState({connectedStatusPopoverHasBeenShown:!0})}setRecoveryPhraseReminderHasBeenShown(){this.store.updateState({recoveryPhraseReminderHasBeenShown:!0})}setSurveyLinkLastClickedOrClosed(e){this.store.updateState({surveyLinkLastClickedOrClosed:e})}setOnboardingDate(){this.store.updateState({onboardingDate:Date.now()})}setLastViewedUserSurvey(e){this.store.updateState({lastViewedUserSurvey:e})}setNewPrivacyPolicyToastClickedOrClosed(){this.store.updateState({newPrivacyPolicyToastClickedOrClosed:!0})}setNewPrivacyPolicyToastShownDate(e){this.store.updateState({newPrivacyPolicyToastShownDate:e})}setRecoveryPhraseReminderLastShown(e){this.store.updateState({recoveryPhraseReminderLastShown:e})}setTermsOfUseLastAgreed(e){this.store.updateState({termsOfUseLastAgreed:e})}setSnapsInstallPrivacyWarningShownStatus(e){this.store.updateState({snapsInstallPrivacyWarningShown:e})}setOutdatedBrowserWarningLastShown(e){this.store.updateState({outdatedBrowserWarningLastShown:e})}setLastActiveTime(){this._resetTimer()}_setInactiveTimeout(e){this.store.updateState({timeoutMinutes:e}),this._resetTimer()}_resetTimer(){const{timeoutMinutes:e}=this.store.getState();if(this.timer?clearTimeout(this.timer):u.isManifestV3&&this.extension.alarms.clear(d.AUTO_LOCK_TIMEOUT_ALARM),!e)return;const t=Number(e);u.isManifestV3?(this.extension.alarms.create(d.AUTO_LOCK_TIMEOUT_ALARM,{delayInMinutes:t,periodInMinutes:t}),this.extension.alarms.onAlarm.addListener((e=>{e.name===d.AUTO_LOCK_TIMEOUT_ALARM&&(this.onInactiveTimeout(),this.extension.alarms.clear(d.AUTO_LOCK_TIMEOUT_ALARM))}))):this.timer=setTimeout((()=>this.onInactiveTimeout()),t*c.MINUTE)}setBrowserEnvironment(e,t){this.store.updateState({browserEnvironment:{os:e,browser:t}})}addPollingToken(e,t){t.toString()!==p.POLLING_TOKEN_ENVIRONMENT_TYPES[p.ENVIRONMENT_TYPE_BACKGROUND]&&v(k,this,T).call(this,t)&&v(k,this,A).call(this,e,t)}removePollingToken(e,t){if(t.toString()!==p.POLLING_TOKEN_ENVIRONMENT_TYPES[p.ENVIRONMENT_TYPE_BACKGROUND]){const n=this.store.getState()[t];v(k,this,T).call(this,t)&&this.store.updateState({[t]:n.filter((t=>t!==e))})}}clearPollingTokens(){this.store.updateState({popupGasPollTokens:[],notificationGasPollTokens:[],fullScreenGasPollTokens:[]})}setShowTestnetMessageInDropdown(e){this.store.updateState({showTestnetMessageInDropdown:e})}setShowBetaHeader(e){this.store.updateState({showBetaHeader:e})}setShowPermissionsTour(e){this.store.updateState({showPermissionsTour:e})}setShowNetworkBanner(e){this.store.updateState({showNetworkBanner:e})}setShowAccountBanner(e){this.store.updateState({showAccountBanner:e})}setCurrentExtensionPopupId(e){this.store.updateState({currentExtensionPopupId:e})}setSwitchedNetworkDetails(e){this.store.updateState({switchedNetworkDetails:e})}clearSwitchedNetworkDetails(){this.store.updateState({switchedNetworkDetails:null})}setSwitchedNetworkNeverShowMessage(e){this.store.updateState({switchedNetworkDetails:null,switchedNetworkNeverShowMessage:e})}setTrezorModel(e){this.store.updateState({trezorModel:e})}updateNftDropDownState(e){this.store.updateState({nftsDropdownState:e})}setFirstTimeUsedNetwork(e){const t=this.store.getState(),{usedNetworks:n}=t;n[e]=!0,this.store.updateState({usedNetworks:n})}getSignatureSecurityAlertResponse(e){return this.store.getState().signatureSecurityAlertResponses[e]}addSignatureSecurityAlertResponse(e){const t=this.store.getState(),{signatureSecurityAlertResponses:n}=t;e.securityAlertId&&this.store.updateState({signatureSecurityAlertResponses:{...n,[String(e.securityAlertId)]:e}})}setCurrentPopupId(e){this.store.updateState({currentPopupId:e})}getLastInteractedConfirmationInfo(){return this.store.getState().lastInteractedConfirmationInfo}setLastInteractedConfirmationInfo(e){this.store.updateState({lastInteractedConfirmationInfo:e})}getCurrentPopupId(){return this.store.getState().currentPopupId}_requestApproval(){y(b,this)||(w(b,this,(0,o.v4)()),this.messagingSystem.call("ApprovalController:addRequest",{id:y(b,this),origin:p.ORIGIN_METAMASK,type:i.ApprovalType.Unlock},!0).catch((()=>{w(b,this,null)})))}emit(e){return super.emit(e)}_acceptApproval(){if(y(b,this)){try{this.messagingSystem.call("ApprovalController:acceptRequest",y(b,this))}catch(e){a.default.error("Failed to unlock approval request",e)}w(b,this,null)}}}function A(e,t){const n=this.store.getState()[t];this.store.updateState({[t]:[...n,e]})}function T(e){return["popupGasPollTokens","notificationGasPollTokens","fullScreenGasPollTokens"].includes(e)}n.AppStateController=S}}},{package:"$root$",file:"app/scripts/controllers/app-state-controller.ts"}],[130,{"../../../../../shared/types/transaction-decode":5330,"./four-byte":125,"./proxy":126,"./sourcify":127,"./uniswap":129,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.decodeTransactionData=async function({transactionData:e,contractAddress:t,chainId:n,ethQuery:r}){c("Decoding transaction data",{transactionData:e,contractAddress:t,chainId:n});const u=(0,o.decodeUniswapRouterTransactionData)({transactionData:e,contractAddress:t,chainId:n});if(u)return c("Decoded with Uniswap commands",u),{data:d(u),source:s.DecodedTransactionDataSource.Uniswap};const h=await(0,i.getContractProxyAddress)(t,r);h&&c("Retrieved proxy implementation address",h);const p=h??t,m=(0,a.decodeTransactionDataWithSourcify)(e,p,n),g=(0,l.decodeTransactionDataWithFourByte)(e),[f,C]=await Promise.allSettled([m,g]);if("fulfilled"===f.status&&f.value)return c("Decoded data with Sourcify",f.value),{data:d([f.value]),source:s.DecodedTransactionDataSource.Sourcify};if(c("Failed to decode data with Sourcify",f),"fulfilled"===C.status&&C.value)return c("Decoded data with 4Byte",C.value),{data:d([C.value]),source:s.DecodedTransactionDataSource.FourByte};return c("Failed to decode data with 4Byte",C),undefined};var r=e("@metamask/utils"),s=e("../../../../../shared/types/transaction-decode"),o=e("./uniswap"),a=e("./sourcify"),i=e("./proxy"),l=e("./four-byte");const c=(0,r.createProjectLogger)("transaction-decode");function d(e){return e.map((e=>function(e){return{...e,params:e.params.map((e=>u(e)))}}(e)))}function u(e){var t;return{...e,value:h(e.value),children:null===(t=e.children)||void 0===t?void 0:t.map((e=>u(e)))}}function h(e){const t=e._hex;return t?parseInt(t,16):e}}}},{package:"$root$",file:"app/scripts/lib/transaction/decode/util.ts"}],[131,{"../../../../shared/constants/app":5248,"../../../../shared/constants/gas":5255,"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/transaction":5278,"../../../../shared/lib/confirmation.utils":5281,"../../../../shared/lib/transactions-controller-utils":5292,"../../../../shared/modules/conversion.utils":5301,"../../../../shared/modules/metametrics":5309,"../../../../shared/modules/transaction.utils":5326,"../../../../ui/helpers/utils/metrics":6283,"../snap-keyring/metrics":119,"@metamask/eth-query":1640,"@metamask/transaction-controller":2698,"bignumber.js":3465,"ethereumjs-util":3796},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.handleTransactionSubmitted=n.handleTransactionRejected=n.handleTransactionFailed=n.handleTransactionDropped=n.handleTransactionConfirmed=n.handleTransactionApproved=n.handleTransactionAdded=n.handlePostTransactionBalanceUpdate=n.createTransactionEventFragmentWithTxId=n.METRICS_STATUS_FAILED=void 0;var r,s=(r=e("@metamask/eth-query"))&&r.__esModule?r:{default:r},o=e("bignumber.js"),a=e("ethereumjs-util"),i=e("@metamask/transaction-controller"),l=e("../../../../shared/constants/app"),c=e("../../../../shared/constants/gas"),d=e("../../../../shared/constants/metametrics"),u=e("../../../../shared/constants/transaction"),h=e("../../../../shared/lib/transactions-controller-utils"),p=e("../../../../shared/modules/conversion.utils"),m=e("../../../../shared/modules/metametrics"),g=e("../../../../shared/modules/transaction.utils"),f=e("../../../../ui/helpers/utils/metrics"),C=e("../snap-keyring/metrics"),y=e("../../../../shared/lib/confirmation.utils");const w=n.METRICS_STATUS_FAILED="failed on-chain";n.handleTransactionAdded=async(e,t)=>{if(!t.transactionMeta)return;const{properties:n,sensitiveProperties:r}=await S({transactionEventPayload:t,transactionMetricsRequest:e});v({eventName:u.TransactionMetaMetricsEvent.added,transactionEventPayload:t,transactionMetricsRequest:e,payload:{properties:n,sensitiveProperties:r}})};n.handleTransactionApproved=async(e,t)=>{t.transactionMeta&&await b({eventName:u.TransactionMetaMetricsEvent.approved,transactionEventPayload:t,transactionMetricsRequest:e})};n.handleTransactionFailed=async(e,t)=>{if(!t.transactionMeta)return;const n={};t.error&&(n.error=t.error),await b({eventName:u.TransactionMetaMetricsEvent.finalized,extraParams:n,transactionEventPayload:t,transactionMetricsRequest:e})};n.handleTransactionConfirmed=async(e,t)=>{if(0===Object.keys(t).length)return;const n={},r={...t},{txReceipt:s}=r;n.gas_used=null==s?void 0:s.gasUsed;const{submittedTime:o}=r;o&&(n.completion_time=function(e){return Math.round((Date.now()-e)/1e3).toString()}(o)),"0x0"===(null==s?void 0:s.status)&&(n.status=w),await b({eventName:u.TransactionMetaMetricsEvent.finalized,extraParams:n,transactionEventPayload:{actionId:r.actionId,transactionMeta:r},transactionMetricsRequest:e})};n.handleTransactionDropped=async(e,t)=>{if(!t.transactionMeta)return;await b({eventName:u.TransactionMetaMetricsEvent.finalized,extraParams:{dropped:!0},transactionEventPayload:t,transactionMetricsRequest:e})};n.handleTransactionRejected=async(e,t)=>{t.transactionMeta&&await b({eventName:u.TransactionMetaMetricsEvent.rejected,transactionEventPayload:t,transactionMetricsRequest:e})};n.handleTransactionSubmitted=async(e,t)=>{if(!t.transactionMeta)return;const{properties:n,sensitiveProperties:r}=await S({transactionEventPayload:t,transactionMetricsRequest:e});v({eventName:u.TransactionMetaMetricsEvent.submitted,transactionEventPayload:t,transactionMetricsRequest:e,payload:{properties:n,sensitiveProperties:r}})};n.createTransactionEventFragmentWithTxId=async(e,{transactionId:t,actionId:n})=>{const r={...e.getTransaction(t),actionId:n},{properties:s,sensitiveProperties:o}=await S({transactionEventPayload:{transactionMeta:r},transactionMetricsRequest:e});v({eventName:u.TransactionMetaMetricsEvent.approved,transactionEventPayload:{actionId:r.actionId,transactionMeta:r},transactionMetricsRequest:e,payload:{properties:s,sensitiveProperties:o}})};function v({eventName:e,transactionEventPayload:{transactionMeta:t,actionId:n},transactionMetricsRequest:r,payload:s}){if(function(e,t,n){const r=k(t,n.id);return void 0!==e(r)}(r.getEventFragmentById,e,t)&&e!==u.TransactionMetaMetricsEvent.submitted)return;const o=k(e,t.id);switch(e){case u.TransactionMetaMetricsEvent.added:r.createEventFragment({category:d.MetaMetricsEventCategory.Transactions,initialEvent:u.TransactionMetaMetricsEvent.added,successEvent:u.TransactionMetaMetricsEvent.approved,failureEvent:u.TransactionMetaMetricsEvent.rejected,properties:s.properties,sensitiveProperties:s.sensitiveProperties,actionId:n,uniqueIdentifier:o,persist:!0});break;case u.TransactionMetaMetricsEvent.approved:case u.TransactionMetaMetricsEvent.rejected:r.createEventFragment({category:d.MetaMetricsEventCategory.Transactions,successEvent:u.TransactionMetaMetricsEvent.approved,failureEvent:u.TransactionMetaMetricsEvent.rejected,properties:s.properties,sensitiveProperties:s.sensitiveProperties,actionId:n,uniqueIdentifier:o,persist:!0});break;case u.TransactionMetaMetricsEvent.submitted:r.createEventFragment({category:d.MetaMetricsEventCategory.Transactions,initialEvent:u.TransactionMetaMetricsEvent.submitted,successEvent:u.TransactionMetaMetricsEvent.finalized,properties:s.properties,sensitiveProperties:s.sensitiveProperties,actionId:n,uniqueIdentifier:o,persist:!0});break;case u.TransactionMetaMetricsEvent.finalized:r.createEventFragment({category:d.MetaMetricsEventCategory.Transactions,successEvent:u.TransactionMetaMetricsEvent.finalized,properties:s.properties,sensitiveProperties:s.sensitiveProperties,actionId:n,uniqueIdentifier:o,persist:!0})}}async function b({eventName:e,transactionEventPayload:t,transactionMetricsRequest:n,extraParams:r={}}){const{properties:s,sensitiveProperties:o}=await S({transactionEventPayload:t,transactionMetricsRequest:n,extraParams:r});v({eventName:e,transactionEventPayload:t,transactionMetricsRequest:n,payload:{properties:s,sensitiveProperties:o}}),function({eventName:e,transactionEventPayload:{transactionMeta:t},transactionMetricsRequest:n,payload:r}){const s=k(e,t.id);switch(e){case u.TransactionMetaMetricsEvent.approved:case u.TransactionMetaMetricsEvent.rejected:case u.TransactionMetaMetricsEvent.finalized:n.updateEventFragment(s,{properties:r.properties,sensitiveProperties:r.sensitiveProperties})}}({eventName:e,transactionEventPayload:t,transactionMetricsRequest:n,payload:{properties:s,sensitiveProperties:o}}),function({eventName:e,transactionMetricsRequest:t,transactionEventPayload:{transactionMeta:n}}){const r=k(e,n.id);switch(e){case u.TransactionMetaMetricsEvent.approved:case u.TransactionMetaMetricsEvent.finalized:t.finalizeEventFragment(r);break;case u.TransactionMetaMetricsEvent.rejected:t.finalizeEventFragment(r,{abandoned:!0})}}({eventName:e,transactionEventPayload:t,transactionMetricsRequest:n})}function k(e,t){return`transaction-${e===u.TransactionMetaMetricsEvent.finalized||e===u.TransactionMetaMetricsEvent.submitted?"submitted":"added"}-${t}`}async function S({transactionEventPayload:{transactionMeta:e},transactionMetricsRequest:t,extraParams:n={}}){var r;const{type:w,time:v,status:b,chainId:k,origin:S,txParams:{gasPrice:A,gas:T,maxFeePerGas:E,maxPriorityFeePerGas:M,estimateSuggested:P,estimateUsed:_},defaultGasEstimates:I,originalType:N,replacedById:R,customTokenAmount:O,dappProposedTokenAmount:x,currentTokenBalance:B,originalApprovalAmount:j,finalApprovalAmount:D,securityProviderResponse:U,simulationFails:F}=e,L=new s.default(t.provider),$=S===l.ORIGIN_METAMASK?"user":"dapp",{assetType:H,tokenStandard:q}=await(0,g.determineTransactionAssetType)(e,L,t.getTokenStandardAndDetails);let G;if(e.txParams.data){const n=await t.getMethodData(e.txParams.data);G=null==n?void 0:n.name}const K={};if((0,g.isEIP1559Transaction)(e)?(K.max_fee_per_gas=E,K.max_priority_fee_per_gas=M):K.gas_price=A,I){var V,W;const{estimateType:n}=I;if(n){var z,J;K.default_estimate=n;let r=null===(z=e.defaultGasEstimates)||void 0===z?void 0:z.maxFeePerGas,s=null===(J=e.defaultGasEstimates)||void 0===J?void 0:J.maxPriorityFeePerGas;if([c.GasRecommendations.low,c.GasRecommendations.medium,c.GasRecommendations.high].includes(n)){var Y,Q;const{gasFeeEstimates:e}=await t.getEIP1559GasFeeEstimates();var X,Z;if(null!=e&&null!==(Y=e[n])&&void 0!==Y&&Y.suggestedMaxFeePerGas)r=null===(X=e[n])||void 0===X?void 0:X.suggestedMaxFeePerGas,K.default_max_fee_per_gas=r;if(null!=e&&null!==(Q=e[n])&&void 0!==Q&&Q.suggestedMaxPriorityFeePerGas)s=null===(Z=e[n])||void 0===Z?void 0:Z.suggestedMaxPriorityFeePerGas,K.default_max_priority_fee_per_gas=s}}null!==(V=e.defaultGasEstimates)&&void 0!==V&&V.gas&&(K.default_gas=e.defaultGasEstimates.gas),null!==(W=e.defaultGasEstimates)&&void 0!==W&&W.gasPrice&&(K.default_gas_price=e.defaultGasEstimates.gasPrice)}P&&(K.estimate_suggested=P),_&&(K.estimate_used=_),null!=n&&n.gas_used&&(K.gas_used=n.gas_used);const ee=function(e){const t={};for(const n in e)(0,a.isHexString)(e[n])?t[n]=(0,p.hexWEIToDecGWEI)(e[n]):t[n]=e[n];return t}(K);let te="0";e.txParams.maxFeePerGas&&(te="2");const ne=w&&[i.TransactionType.contractInteraction,i.TransactionType.tokenMethodApprove,i.TransactionType.tokenMethodIncreaseAllowance,i.TransactionType.tokenMethodSafeTransferFrom,i.TransactionType.tokenMethodSetApprovalForAll,i.TransactionType.tokenMethodTransfer,i.TransactionType.tokenMethodTransferFrom,i.TransactionType.swap,i.TransactionType.swapAndSend,i.TransactionType.swapApproval].includes(w),re="Approve";let se,oe,ae,ie,le,ce=i.TransactionType.simpleSend;if(w===i.TransactionType.swapAndSend)ce=i.TransactionType.swapAndSend;else if(w===i.TransactionType.cancel)ce=i.TransactionType.cancel;else if(w===i.TransactionType.retry&&N)ce=N;else if(w===i.TransactionType.deployContract)ce=i.TransactionType.deployContract;else if(ne){var de;ce=i.TransactionType.contractInteraction,oe=G,le=null===(de=e.txParams)||void 0===de?void 0:de.to,oe===re&&q===u.TokenStandard.ERC20&&("0"===x||"0"===O?se=u.TransactionApprovalAmountType.revoke:O&&O!==x?se=u.TransactionApprovalAmountType.custom:x&&(se=u.TransactionApprovalAmountType.dappProposed),ae=function(e,t,n){if(e===u.TransactionApprovalAmountType.custom&&t&&n)return`${new o.BigNumber(t,10).div(n,10).times(100).round(2)}`;return null}(se,j,D),ie=function(e,t,n){if((e===u.TransactionApprovalAmountType.custom||e===u.TransactionApprovalAmountType.dappProposed)&&t&&n)return`${new o.BigNumber(t,16).div(n,10).times(100).round(2)}`;return null}(se,x,B))}const ue=t.getTransaction(R),he={RETRY:i.TransactionType.retry,CANCEL:i.TransactionType.cancel,SAME_NONCE:"other"};let pe;null!=n&&n.dropped&&(pe=he.SAME_NONCE,(null==ue?void 0:ue.type)===i.TransactionType.cancel?pe=he.CANCEL:(null==ue?void 0:ue.type)===i.TransactionType.retry&&(pe=he.RETRY));const me=[];let ge=null;1===(null==U?void 0:U.flagAsDangerous)?me.push(d.MetaMetricsEventUiCustomization.FlaggedAsMalicious):2===(null==U?void 0:U.flagAsDangerous)&&me.push(d.MetaMetricsEventUiCustomization.FlaggedAsSafetyUnknown);const fe=(0,f.getBlockaidMetricsProps)(e);(null==fe||null===(r=fe.ui_customizations)||void 0===r?void 0:r.length)>0&&me.push(...fe.ui_customizations),F&&me.push(d.MetaMetricsEventUiCustomization.GasEstimationFailed);(0,y.shouldUseRedesignForTransactions)({transactionMetadataType:e.type,isRedesignedTransactionsUserSettingEnabled:t.getRedesignedTransactionsEnabled(),isRedesignedConfirmationsDeveloperEnabled:t.getIsRedesignedConfirmationsDeveloperEnabled()})&&(me.push(d.MetaMetricsEventUiCustomization.RedesignedConfirmation),ge=t.getIsConfirmationAdvancedDetailsOpen());const Ce=(0,m.getSmartTransactionMetricsProperties)(t,e),ye=(0,f.getSwapAndSendMetricsProps)(e);let we={chain_id:k,referrer:S,source:$,status:b,network:`${parseInt(k,16)}`,eip_1559_version:te,gas_edit_type:"none",gas_edit_attempted:"none",gas_estimation_failed:Boolean(F),account_type:await t.getAccountType(t.getSelectedAddress()),device_model:await t.getDeviceModel(t.getSelectedAddress()),asset_type:H,token_standard:q,transaction_type:ce,transaction_speed_up:w===i.TransactionType.retry,...fe,ui_customizations:me.length>0?me:null,transaction_advanced_view:ge,transaction_contract_method:oe,...Ce,...ye};const ve=await(0,C.getSnapAndHardwareInfoForMetrics)(t.getAccountType,t.getDeviceModel,t.snapAndHardwareMessenger);Object.assign(we,ve),oe===re&&(we={...we,transaction_approval_amount_type:se});let be={transaction_envelope_type:(0,g.isEIP1559Transaction)(e)?h.TRANSACTION_ENVELOPE_TYPE_NAMES.FEE_MARKET:h.TRANSACTION_ENVELOPE_TYPE_NAMES.LEGACY,first_seen:v,gas_limit:T,transaction_replaced:pe,transaction_contract_address:le,...n,...ee};return oe===re&&(be={...be,transaction_approval_amount_vs_balance_ratio:ie,transaction_approval_amount_vs_proposed_ratio:ae}),{properties:we,sensitiveProperties:be}}n.handlePostTransactionBalanceUpdate=async({getParticipateInMetrics:e,trackEvent:t},{transactionMeta:n,approvalTransactionMeta:r})=>{var s;if(e()&&n.swapMetaData)if("0x0"===(null===(s=n.txReceipt)||void 0===s?void 0:s.status))t({event:"Swap Failed",sensitiveProperties:{...n.swapMetaData},category:d.MetaMetricsEventCategory.Swaps});else{var a;const e=(0,h.getSwapsTokensReceivedFromTxMeta)(n.destinationTokenSymbol,n,n.destinationTokenAddress,n.txParams.from,n.destinationTokenDecimals,r,n.chainId),s=e?`${new o.BigNumber(e,10).div(n.swapMetaData.token_to_amount,10).times(100).round(2)}%`:null,i=null!==(a=n.txReceipt)&&void 0!==a&&a.gasUsed&&n.swapMetaData.estimated_gas?`${new o.BigNumber(n.txReceipt.gasUsed,16).div(n.swapMetaData.estimated_gas,10).times(100).round(2)}%`:null,l=function(e,t){var n,r;let s="0x0";null!=t&&t.txReceipt&&(s=(0,h.calcGasTotal)(t.txReceipt.gasUsed,t.txReceipt.effectiveGasPrice));const a=(0,h.calcGasTotal)(null===(n=e.txReceipt)||void 0===n?void 0:n.gasUsed,null===(r=e.txReceipt)||void 0===r?void 0:r.effectiveGasPrice),i=new o.BigNumber(a,16).plus(s,16).toString(16);return{approvalGasCostInEth:Number((0,p.hexWEIToDecETH)(s)),tradeGasCostInEth:Number((0,p.hexWEIToDecETH)(a)),tradeAndApprovalGasCostInEth:Number((0,p.hexWEIToDecETH)(i))}}(n,r);t({event:d.MetaMetricsEventName.SwapCompleted,category:d.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...n.swapMetaData,token_to_amount_received:e,quote_vs_executionRatio:s,estimated_vs_used_gasRatio:i,approval_gas_cost_in_eth:l.approvalGasCostInEth,trade_gas_cost_in_eth:l.tradeGasCostInEth,trade_and_approval_gas_cost_in_eth:l.tradeAndApprovalGasCostInEth,token_to_amount:n.swapMetaData.token_to_amount.toString(10)}})}}}}},{package:"$root$",file:"app/scripts/lib/transaction/metrics.ts"}],[132,{"../../../../shared/constants/app":5248,"../../../../shared/constants/smartTransactions":5272,"../../../../shared/modules/conversion.utils":5301,"@metamask/smart-transactions-controller/dist/types":2358,"@metamask/transaction-controller":2698,loglevel:4386},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.submitSmartTransactionHook=void 0;var r,s=e("@metamask/smart-transactions-controller/dist/types"),o=e("@metamask/transaction-controller"),a=(r=e("loglevel"))&&r.__esModule?r:{default:r},i=e("../../../../shared/modules/conversion.utils"),l=e("../../../../shared/constants/smartTransactions"),c=e("../../../../shared/constants/app");function d(e,t,n){u(e,t),t.set(e,n)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t){return e.get(m(e,t))}function p(e,t,n){return e.set(m(e,t),n),n}function m(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var g=new WeakMap,f=new WeakMap,C=new WeakMap,y=new WeakMap,w=new WeakMap,v=new WeakMap,b=new WeakMap,k=new WeakMap,S=new WeakMap,A=new WeakMap,T=new WeakMap,E=new WeakMap,M=new WeakSet;class P{constructor(e){!function(e,t){u(e,t),t.add(e)}(this,M),d(this,g,void 0),d(this,f,void 0),d(this,C,void 0),d(this,y,void 0),d(this,w,void 0),d(this,v,void 0),d(this,b,void 0),d(this,k,void 0),d(this,S,void 0),d(this,A,void 0),d(this,T,void 0),d(this,E,void 0);const{transactionMeta:t,signedTransactionInHex:n,smartTransactionsController:r,transactionController:s,isSmartTransaction:o,controllerMessenger:a,featureFlags:i}=e;p(f,this,""),p(g,this,!1),p(A,this,t),p(T,this,n),p(k,this,r),p(S,this,s),p(b,this,o),p(y,this,a),p(w,this,i),p(v,this,t.origin!==c.ORIGIN_METAMASK),p(C,this,t.chainId),p(E,this,t.txParams)}async submit(){var e;const t=!(null===(e=h(A,this))||void 0===e||!e.type)&&[o.TransactionType.swapAndSend,o.TransactionType.swapApproval].includes(h(A,this).type),n={transactionHash:undefined};if(!h(b,this)||t)return n;const{id:r}=await h(y,this).call("ApprovalController:startFlow");let s;p(f,this,r);try{s=await h(k,this).getFees({...h(E,this),chainId:h(C,this)},undefined)}catch(e){return a.default.error("Error in smart transaction publish hook, falling back to regular transaction submission",e),m(M,this,_).call(this),n}try{var i;const e=await m(M,this,x).call(this,{getFeesResponse:s}),t=null==e?void 0:e.uuid;if(!t)throw new Error("No smart transaction UUID");const n=null===(i=h(w,this))||void 0===i||null===(i=i.smartTransactions)||void 0===i?void 0:i.extensionReturnTxHashAsap;let r;if(m(M,this,I).call(this,{uuid:t}),m(M,this,R).call(this,{uuid:t}),r=n&&null!=e&&e.txHash?e.txHash:await m(M,this,O).call(this,{uuid:t}),null===r)throw new Error("Transaction does not have a transaction hash, there was a problem");return{transactionHash:r}}catch(e){throw a.default.error("Error in smart transaction publish hook",e),m(M,this,_).call(this),e}}}function _(){h(g,this)||(p(g,this,!0),h(y,this).call("ApprovalController:endFlow",{id:h(f,this)}))}function I({uuid:e}){const t=()=>{m(M,this,_).call(this)};h(y,this).call("ApprovalController:addRequest",{id:h(f,this),origin:origin,type:c.SMART_TRANSACTION_CONFIRMATION_TYPES.showSmartTransactionStatusPage,requestState:{smartTransaction:{status:s.SmartTransactionStatuses.PENDING,creationTime:Date.now(),uuid:e},isDapp:h(v,this),txId:h(A,this).id}},!0).then(t,t)}async function N({smartTransaction:e}){return await h(y,this).call("ApprovalController:updateRequestState",{id:h(f,this),requestState:{smartTransaction:e,isDapp:h(v,this),txId:h(A,this).id}})}async function R({uuid:e}){h(y,this).subscribe("SmartTransactionsController:smartTransaction",(async t=>{if(t.uuid===e){const{status:e}=t;if(!e||e===s.SmartTransactionStatuses.PENDING)return;h(g,this)||await m(M,this,N).call(this,{smartTransaction:t})}}))}function O({uuid:e}){return new Promise((t=>{h(y,this).subscribe("SmartTransactionsController:smartTransaction",(async n=>{if(n.uuid===e){const{status:e,statusMetadata:r}=n;if(!e||e===s.SmartTransactionStatuses.PENDING)return;a.default.debug("Smart Transaction: ",n),null!=r&&r.minedHash?(a.default.debug("Smart Transaction - Received tx hash: ",null==r?void 0:r.minedHash),t(r.minedHash)):t(null)}}))}))}async function x({getFeesResponse:e}){let t;var n;h(T,this)?t=[h(T,this)]:t=await m(M,this,j).call(this,(null===(n=e.tradeTxFees)||void 0===n?void 0:n.fees)??[],!1);return await h(k,this).submitSignedTransactions({signedTransactions:t,signedCanceledTransactions:[],txParams:h(E,this),transactionMeta:h(A,this)})}function B(e,t){const n={...h(E,this),maxFeePerGas:`0x${(0,i.decimalToHex)(e.maxFeePerGas)}`,maxPriorityFeePerGas:`0x${(0,i.decimalToHex)(e.maxPriorityFeePerGas)}`,gas:t?`0x${(0,i.decimalToHex)(l.CANCEL_GAS_LIMIT_DEC)}`:h(E,this).gas};return t&&(n.to=n.from,n.data="0x"),n}async function j(e,t){const n=e.map((e=>m(M,this,B).call(this,e,t))).map((e=>({...e,chainId:e.chainId||h(C,this)})));return await h(S,this).approveTransactionsWithSameNonce(n,{hasNonce:!0})}n.submitSmartTransactionHook=e=>new P(e).submit()}}},{package:"$root$",file:"app/scripts/lib/transaction/smart-transactions.ts"}],[133,{"../../../../shared/constants/security-provider":5270,"../../../../shared/lib/trace":5291,"../ppom/ppom-util":95,"@metamask/keyring-api":1843,"ethereumjs-util":3796},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.addDappTransaction=async function(e){const{dappRequest:t}=e,{id:n,method:r,origin:s}=t,{securityAlertResponse:o,traceContext:a}=t,c={actionId:n,method:r,origin:s,requireApproval:!0,securityAlertResponse:o};(0,i.endTrace)({name:i.TraceName.Middleware,id:n});const{waitForHash:d}=await l({...e,transactionOptions:{...c,traceContext:a}}),u=await d();return(0,i.endTrace)({name:i.TraceName.Transaction,id:n}),u},n.addTransaction=async function(e){await async function(e){const{chainId:t,ppomController:n,securityAlertsEnabled:r,transactionOptions:s,transactionParams:i,updateSecurityAlertResponse:l,internalAccounts:c}=e,{type:d}=s,u=a.SECURITY_PROVIDER_EXCLUDED_TRANSACTION_TYPES.includes(d);if(!r||u)return;if(c.some((({address:e})=>{var t;return e.toLowerCase()===(null===(t=i.to)||void 0===t?void 0:t.toLowerCase())})))return;try{const{from:r,to:c,value:d,data:u}=i,{actionId:h,origin:p}=s,m={method:"eth_sendTransaction",id:h??"",origin:p??"",params:[{from:r,to:c??"",value:d??"",data:u??""}],jsonrpc:"2.0"},g=(0,o.generateSecurityAlertId)();(0,o.validateRequestWithPPOM)({ppomController:n,request:m,securityAlertId:g,chainId:t,updateSecurityAlertResponse:l});const f={...a.SECURITY_ALERT_RESPONSE_CHECKING_CHAIN,securityAlertId:g};e.transactionOptions.securityAlertResponse=f}catch(e){(0,o.handlePPOMError)(e,"Error validating JSON RPC using PPOM: ")}}(e);const{transactionMeta:t,waitForHash:n}=await l(e);if(!e.waitForSubmit)return n().catch((()=>{})),t;const r=await n();return function(e,t){return t.state.transactions.find((t=>t.hash===e))}(r,e.transactionController)};var r=e("@metamask/keyring-api"),s=e("ethereumjs-util"),o=e("../ppom/ppom-util"),a=e("../../../../shared/constants/security-provider"),i=e("../../../../shared/lib/trace");async function l(e){const{selectedAccount:t}=e;return t.type===r.EthAccountType.Erc4337?async function(e){var t;const{networkClientId:n,transactionController:r,transactionOptions:o,transactionParams:a,userOperationController:i}=e,{maxFeePerGas:l,maxPriorityFeePerGas:d}=a,{origin:u,requireApproval:h,type:p}=o,m={...a,maxFeePerGas:(0,s.addHexPrefix)(l),maxPriorityFeePerGas:(0,s.addHexPrefix)(d)},g=null==o||null===(t=o.swaps)||void 0===t?void 0:t.meta;null!=g&&g.type&&delete g.type;const f={networkClientId:n,origin:u,requireApproval:h,swaps:g,type:p},C=await i.addUserOperationFromTransaction(m,f);i.startPollingByNetworkClientId(n);return{transactionMeta:c(C.id,r),waitForHash:C.transactionHash}}(e):async function(e){const{transactionController:t,transactionOptions:n,transactionParams:r,networkClientId:s}=e,{result:o,transactionMeta:a}=await t.addTransaction(r,{...n});return{transactionMeta:a,waitForHash:()=>o}}(e)}function c(e,t){return t.state.transactions.find((t=>t.id===e))}}}},{package:"$root$",file:"app/scripts/lib/transaction/util.ts"}],[134,{"../../../../shared/constants/app":5248,"../../../../shared/constants/verification":5280,"../../../../shared/modules/selectors/networks":5320,"@ethersproject/hash":529,"@ethersproject/wallet":612,"@metamask/rpc-errors":2304,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createTxVerificationMiddleware=function(e,t=i.TRUSTED_SIGNERS){return function(n,d,u,h){if(n.method!==l.MESSAGE_TYPE.ETH_SEND_TRANSACTION||!Array.isArray(n.params)||!function(e){return(0,a.isObject)(e[0])&&"string"==typeof e[0].data&&"string"==typeof e[0].from&&"string"==typeof e[0].to&&"string"==typeof e[0].value&&(!(0,a.hasProperty)(e[0],"chainId")||"string"==typeof e[0].chainId&&e[0].chainId.startsWith("0x"))}(n.params))return u();const p=n.params[0],m="string"==typeof p.chainId?p.chainId.toLowerCase():(0,c.getCurrentChainId)({metamask:e.state}),g=(0,i.getExperience)(p.to.toLowerCase(),m);if(!g||!i.EXPERIENCES_TO_VERIFY.includes(g))return u();const f=`0x${p.data.slice(-i.TX_SIG_LEN)}`,C=(0,s.verifyMessage)(function(e){const t={to:(0,r.hashMessage)(e.to.toLowerCase()),from:(0,r.hashMessage)(e.from.toLowerCase()),data:(0,r.hashMessage)(e.data.toLowerCase().slice(0,e.data.length-i.TX_SIG_LEN)),value:(0,r.hashMessage)(e.value.toLowerCase())};return(0,r.hashMessage)(JSON.stringify(t))}(p),f);return C!==t[g]?h(o.rpcErrors.invalidParams("Invalid transaction signature.")):u()}};var r=e("@ethersproject/hash"),s=e("@ethersproject/wallet"),o=e("@metamask/rpc-errors"),a=e("@metamask/utils"),i=e("../../../../shared/constants/verification"),l=e("../../../../shared/constants/app"),c=e("../../../../shared/modules/selectors/networks")}}},{package:"$root$",file:"app/scripts/lib/tx-verification/tx-verification-middleware.ts"}],[1346,{"./utils.cjs":1348,"@metamask/base-controller":1396,"@metamask/eth-snap-keyring":1695,"@metamask/keyring-api":1843,"@metamask/keyring-controller":1896,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var r,s,o,a,i,l,c,d,u,h,p,m,g,f,C,y=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.AccountsController=n.EMPTY_ACCOUNT=void 0;const w=e("@metamask/base-controller"),v=e("@metamask/eth-snap-keyring"),b=e("@metamask/keyring-api"),k=e("@metamask/keyring-controller"),S=e("@metamask/utils"),A=e("./utils.cjs"),T="AccountsController",E={internalAccounts:{persist:!0,anonymous:!1}},M={internalAccounts:{accounts:{},selectedAccount:""}};n.EMPTY_ACCOUNT={id:"",address:"",options:{},methods:[],type:b.EthAccountType.Eoa,metadata:{name:"",keyring:{type:""},importTime:0}};class P extends w.BaseController{constructor({messenger:e,state:t}){super({messenger:e,name:T,metadata:E,state:{...M,...t}}),r.add(this),this.messagingSystem.subscribe("SnapController:stateChange",(e=>y(this,r,"m",l).call(this,e))),this.messagingSystem.subscribe("KeyringController:stateChange",(e=>y(this,r,"m",i).call(this,e))),y(this,r,"m",C).call(this)}getAccount(e){return this.state.internalAccounts.accounts[e]}listAccounts(){return Object.values(this.state.internalAccounts.accounts).filter((e=>(0,b.isEvmAccountType)(e.type)))}listMultichainAccounts(e){const t=Object.values(this.state.internalAccounts.accounts);if(!e)return t;if(!(0,S.isCaipChainId)(e))throw new Error(`Invalid CAIP-2 chain ID: ${String(e)}`);return t.filter((t=>y(this,r,"m",u).call(this,t,e)))}getAccountExpect(e){const t=this.getAccount(e);if(t===undefined)throw new Error(`Account Id "${e}" not found`);return t}getSelectedAccount(){if(""===this.state.internalAccounts.selectedAccount)return n.EMPTY_ACCOUNT;const e=this.getAccountExpect(this.state.internalAccounts.selectedAccount);if((0,b.isEvmAccountType)(e.type))return e;const t=this.listAccounts();if(!t.length)throw new Error("No EVM accounts");return y(this,r,"m",d).call(this,t)}getSelectedMultichainAccount(e){if(""===this.state.internalAccounts.selectedAccount)return n.EMPTY_ACCOUNT;if(!e)return this.getAccountExpect(this.state.internalAccounts.selectedAccount);if(!(0,S.isCaipChainId)(e))throw new Error(`Invalid CAIP-2 chain ID: ${e}`);const t=Object.values(this.state.internalAccounts.accounts).filter((t=>y(this,r,"m",u).call(this,t,e)));return y(this,r,"m",d).call(this,t)}getAccountByAddress(e){return this.listMultichainAccounts().find((t=>t.address.toLowerCase()===e.toLowerCase()))}setSelectedAccount(e){const t=this.getAccountExpect(e);this.update((e=>{e.internalAccounts.accounts[t.id].metadata.lastSelected=Date.now(),e.internalAccounts.selectedAccount=t.id})),y(this,r,"m",m).call(this,t)}setAccountName(e,t){this.updateAccountMetadata(e,{name:t,nameLastUpdatedAt:Date.now()})}updateAccountMetadata(e,t){const n=this.getAccountExpect(e);if(t.name&&this.listMultichainAccounts().find((n=>n.metadata.name===t.name&&n.id!==e)))throw new Error("Account name already exists");this.update((r=>{const s={...n,metadata:{...n.metadata,...t}};r.internalAccounts.accounts[e]=s,t.name&&this.messagingSystem.publish("AccountsController:accountRenamed",s)}))}async updateAccounts(){const e=await y(this,r,"m",o).call(this),t=await y(this,r,"m",a).call(this),n=new Map,s=this.state.internalAccounts.accounts,i=[...t,...e].reduce(((e,t)=>{const o=(0,A.keyringTypeToName)(t.metadata.keyring.type),a=n.get(o)??0;a?n.set(o,a+1):n.set(o,1);const i=s[t.id];return e[t.id]={...t,metadata:{...t.metadata,name:y(this,r,"m",f).call(this,i?.id,"name")??`${o} ${a+1}`,importTime:y(this,r,"m",f).call(this,i?.id,"importTime")??Date.now(),lastSelected:y(this,r,"m",f).call(this,i?.id,"lastSelected")??0}},e}),{});this.update((e=>{if(e.internalAccounts.accounts=i,!e.internalAccounts.accounts[e.internalAccounts.selectedAccount]){const t=y(this,r,"m",d).call(this,Object.values(i));t?(e.internalAccounts.selectedAccount=t.id,e.internalAccounts.accounts[t.id].metadata.lastSelected=y(this,r,"m",h).call(this),y(this,r,"m",m).call(this,t)):e.internalAccounts.selectedAccount=""}}))}loadBackup(e){e.internalAccounts&&this.update((t=>{t.internalAccounts=e.internalAccounts}))}getNextAvailableAccountName(e=k.KeyringTypes.hd,t){const n=(0,A.keyringTypeToName)(e),s=y(this,r,"m",c).call(this,e,t),o=s.reduce(((e,t)=>{const r=new RegExp(`${n} ([0-9]+)$`,"u").exec(t.metadata.name);if(r){const t=parseInt(r[1],10);return Math.max(e,t)}return e}),0),a=Math.max(s.length+1,o+1);return`${n} ${a}`}}n.AccountsController=P,r=new WeakSet,s=function(e,t){return{id:(0,A.getUUIDFromAddressOfNormalAccount)(e),address:e,options:{},methods:[b.EthMethod.PersonalSign,b.EthMethod.Sign,b.EthMethod.SignTransaction,b.EthMethod.SignTypedDataV1,b.EthMethod.SignTypedDataV3,b.EthMethod.SignTypedDataV4],type:b.EthAccountType.Eoa,metadata:{name:"",importTime:Date.now(),keyring:{type:t}}}},o=async function(){const[e]=this.messagingSystem.call("KeyringController:getKeyringsByType",v.SnapKeyring.type);if(!e)return[];return e.listAccounts()},a=async function(){const e=await this.messagingSystem.call("KeyringController:getAccounts"),t=[];for(const n of e){const e=await this.messagingSystem.call("KeyringController:getKeyringForAccount",n),s=e.type;if(!(0,A.isNormalKeyringType)(s))continue;const o=(0,A.getUUIDFromAddressOfNormalAccount)(n),a=y(this,r,"m",f).call(this,o,"nameLastUpdatedAt");t.push({id:o,address:n,options:{},methods:[b.EthMethod.PersonalSign,b.EthMethod.Sign,b.EthMethod.SignTransaction,b.EthMethod.SignTypedDataV1,b.EthMethod.SignTypedDataV3,b.EthMethod.SignTypedDataV4],type:b.EthAccountType.Eoa,metadata:{name:y(this,r,"m",f).call(this,o,"name")??"",...a&&{nameLastUpdatedAt:a},importTime:y(this,r,"m",f).call(this,o,"importTime")??Date.now(),lastSelected:y(this,r,"m",f).call(this,o,"lastSelected")??0,keyring:{type:e.type}}})}return t},i=function(e){if(e.isUnlocked&&e.keyrings.length>0){const t=[],n=[];for(const r of e.keyrings)r.type===k.KeyringTypes.snap?n.push(...r.accounts.map((e=>({address:e,type:r.type})))):t.push(...r.accounts.map((e=>({address:e,type:r.type}))));const{previousNormalInternalAccounts:s,previousSnapInternalAccounts:o}=this.listMultichainAccounts().reduce(((e,t)=>(t.metadata.keyring.type===k.KeyringTypes.snap?e.previousSnapInternalAccounts.push(t):e.previousNormalInternalAccounts.push(t),e)),{previousNormalInternalAccounts:[],previousSnapInternalAccounts:[]}),a=[],i=[];for(const e of t)this.state.internalAccounts.accounts[(0,A.getUUIDFromAddressOfNormalAccount)(e.address)]||a.push(e);for(const e of n)o.find((t=>t.address.toLowerCase()===e.address.toLowerCase()))||a.push(e);for(const e of s)t.find((({address:t})=>t.toLowerCase()===e.address.toLowerCase()))||i.push(e);for(const e of o)n.find((({address:t})=>t.toLowerCase()===e.address.toLowerCase()))||i.push(e);this.update((e=>{if(i.length>0)for(const t of i)e.internalAccounts.accounts=y(this,r,"m",g).call(this,e.internalAccounts.accounts,t.id);if(a.length>0)for(const t of a)e.internalAccounts.accounts=y(this,r,"m",p).call(this,e.internalAccounts.accounts,t);const t=Object.values(e.internalAccounts.accounts);if(!e.internalAccounts.accounts[this.state.internalAccounts.selectedAccount]){const n=y(this,r,"m",d).call(this,t);n?(e.internalAccounts.selectedAccount=n.id,e.internalAccounts.accounts[n.id].metadata.lastSelected=y(this,r,"m",h).call(this),y(this,r,"m",m).call(this,n)):e.internalAccounts.selectedAccount=""}}))}},l=function(e){const{snaps:t}=e,n=this.listMultichainAccounts().filter((e=>e.metadata.snap));this.update((e=>{n.forEach((n=>{const r=e.internalAccounts.accounts[n.id];if(r.metadata.snap){const e=r.metadata.snap.id,n=t[e];n&&(r.metadata.snap.enabled=n.enabled&&!n.blocked)}}))}))},c=function(e,t){return(t??this.listMultichainAccounts()).filter((t=>e===k.KeyringTypes.hd||e===k.KeyringTypes.simple?t.metadata.keyring.type===k.KeyringTypes.hd||t.metadata.keyring.type===k.KeyringTypes.simple:t.metadata.keyring.type===e))},d=function(e){const[t]=e.sort(((e,t)=>(t.metadata.lastSelected??0)-(e.metadata.lastSelected??0)));return t},u=function(e,t){return e.type.startsWith((0,S.parseCaipChainId)(t).namespace)},h=function(){return Date.now()},p=function(e,t){let n;if(t.type!==k.KeyringTypes.snap)n=y(this,r,"m",s).call(this,t.address,t.type);else{const[r]=this.messagingSystem.call("KeyringController:getKeyringsByType",v.SnapKeyring.type);if(n=r.getAccountByAddress(t.address),!n)return e}const o=0===Object.keys(e).length,a=this.getNextAvailableAccountName(n.metadata.keyring.type,Object.values(e)),i={...n,metadata:{...n.metadata,name:a,importTime:Date.now(),lastSelected:o?y(this,r,"m",h).call(this):0}};return e[n.id]=i,this.messagingSystem.publish("AccountsController:accountAdded",i),e},m=function(e){(0,b.isEvmAccountType)(e.type)&&this.messagingSystem.publish("AccountsController:selectedEvmAccountChange",e),this.messagingSystem.publish("AccountsController:selectedAccountChange",e)},g=function(e,t){return delete e[t],this.messagingSystem.publish("AccountsController:accountRemoved",t),e},f=function(e,t,n){const r=n??this.getAccount(e);return r?r.metadata[t]:undefined},C=function(){this.messagingSystem.registerActionHandler(`${T}:setSelectedAccount`,this.setSelectedAccount.bind(this)),this.messagingSystem.registerActionHandler(`${T}:listAccounts`,this.listAccounts.bind(this)),this.messagingSystem.registerActionHandler(`${T}:listMultichainAccounts`,this.listMultichainAccounts.bind(this)),this.messagingSystem.registerActionHandler(`${T}:setAccountName`,this.setAccountName.bind(this)),this.messagingSystem.registerActionHandler(`${T}:updateAccounts`,this.updateAccounts.bind(this)),this.messagingSystem.registerActionHandler(`${T}:getSelectedAccount`,this.getSelectedAccount.bind(this)),this.messagingSystem.registerActionHandler(`${T}:getSelectedMultichainAccount`,this.getSelectedMultichainAccount.bind(this)),this.messagingSystem.registerActionHandler(`${T}:getAccountByAddress`,this.getAccountByAddress.bind(this)),this.messagingSystem.registerActionHandler(`${T}:getNextAvailableAccountName`,this.getNextAvailableAccountName.bind(this)),this.messagingSystem.registerActionHandler("AccountsController:getAccount",this.getAccount.bind(this)),this.messagingSystem.registerActionHandler("AccountsController:updateAccountMetadata",this.updateAccountMetadata.bind(this))}}}},{package:"@metamask/accounts-controller",file:"node_modules/@metamask/accounts-controller/dist/AccountsController.cjs"}],[1347,{"./AccountsController.cjs":1346,"./utils.cjs":1348},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getUUIDFromAddressOfNormalAccount=n.keyringTypeToName=n.AccountsController=void 0;var r=e("./AccountsController.cjs");Object.defineProperty(n,"AccountsController",{enumerable:!0,get:function(){return r.AccountsController}});var s=e("./utils.cjs");Object.defineProperty(n,"keyringTypeToName",{enumerable:!0,get:function(){return s.keyringTypeToName}}),Object.defineProperty(n,"getUUIDFromAddressOfNormalAccount",{enumerable:!0,get:function(){return s.getUUIDFromAddressOfNormalAccount}})}}},{package:"@metamask/accounts-controller",file:"node_modules/@metamask/accounts-controller/dist/index.cjs"}],[1348,{"@ethereumjs/util":478,"@metamask/keyring-controller":1896,"ethereum-cryptography/sha256":3787,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNormalKeyringType=n.getUUIDFromAddressOfNormalAccount=n.getUUIDOptionsFromAddressOfNormalAccount=n.keyringTypeToName=void 0;const r=e("@ethereumjs/util"),s=e("@metamask/keyring-controller"),o=e("ethereum-cryptography/sha256"),a=e("uuid");function i(e){return{random:(0,o.sha256)((0,r.toBuffer)(e)).slice(0,16)}}n.keyringTypeToName=function(e){if((0,s.isCustodyKeyring)(e))return"Custody";switch(e){case s.KeyringTypes.simple:case s.KeyringTypes.hd:return"Account";case s.KeyringTypes.trezor:return"Trezor";case s.KeyringTypes.ledger:return"Ledger";case s.KeyringTypes.lattice:return"Lattice";case s.KeyringTypes.qr:return"QR";case s.KeyringTypes.snap:return"Snap Account";default:throw new Error(`Unknown keyring ${e}`)}},n.getUUIDOptionsFromAddressOfNormalAccount=i,n.getUUIDFromAddressOfNormalAccount=function(e){return(0,a.v4)(i(e))},n.isNormalKeyringType=function(e){return e!==s.KeyringTypes.snap}}}},{package:"@metamask/accounts-controller",file:"node_modules/@metamask/accounts-controller/dist/utils.cjs"}],[1349,{"@metamask/base-controller":1396,"@metamask/controller-utils":1422},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=e("@metamask/base-controller"),s=e("@metamask/controller-utils"),o=(e=>(e.externallyOwnedAccounts="EXTERNALLY_OWNED_ACCOUNTS",e.contractAccounts="CONTRACT_ACCOUNTS",e.nonAccounts="NON_ACCOUNTS",e))(o||{}),a="AddressBookController",i={addressBook:{persist:!0,anonymous:!1}},l=()=>({addressBook:{}}),c=class extends r.BaseController{constructor({messenger:e,state:t}){const n={addressBook:{},...t};super({messenger:e,metadata:i,name:a,state:n})}clear(){this.update((e=>{e.addressBook={}}))}delete(e,t){return t=s.toChecksumHexAddress.call(void 0,t),!!([e,t].every((e=>s.isSafeDynamicKey.call(void 0,e)))&&s.isValidHexAddress.call(void 0,t)&&this.state.addressBook[e]&&this.state.addressBook[e][t])&&(this.update((n=>{delete n.addressBook[e][t],0===Object.keys(n.addressBook[e]).length&&delete n.addressBook[e]})),!0)}set(e,t,n=s.toHex.call(void 0,1),r="",o){if(e=s.toChecksumHexAddress.call(void 0,e),!s.isValidHexAddress.call(void 0,e))return!1;const a={address:e,chainId:n,isEns:!1,memo:r,name:t,addressType:o},i=s.normalizeEnsName.call(void 0,t);return i&&(a.name=i,a.isEns=!0),this.update((t=>{t.addressBook={...this.state.addressBook,[n]:{...this.state.addressBook[n],[e]:a}}})),!0}},d=c;n.AddressType=o,n.controllerName=a,n.getDefaultAddressBookControllerState=l,n.AddressBookController=c,n.AddressBookController_default=d}}},{package:"@metamask/address-book-controller",file:"node_modules/@metamask/address-book-controller/dist/chunk-QIOW2RCR.js"}],[1350,{"./chunk-QIOW2RCR.js":1349},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=e("./chunk-QIOW2RCR.js");n.AddressBookController=r.AddressBookController,n.getDefaultAddressBookControllerState=r.getDefaultAddressBookControllerState}}},{package:"@metamask/address-book-controller",file:"node_modules/@metamask/address-book-controller/dist/index.js"}],[1351,{"@metamask/base-controller":1358},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r,s,o=(e,t,n)=>(((e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)})(e,t,"access private method"),n),a=e("@metamask/base-controller"),i={announcements:{}},l={announcements:{persist:!0,anonymous:!0}},c=class extends a.BaseController{constructor({messenger:e,state:t,allAnnouncements:n}){const a={...i,...t};super({messenger:e,metadata:l,name:"AnnouncementController",state:a}),((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,r),o(this,r,s).call(this,n)}resetViewed(){this.update((({announcements:e})=>{for(const t of Object.values(e))t.isShown=!1}))}updateViewed(e){this.update((({announcements:t})=>{for(const n of Object.keys(e).map(Number))t[n].isShown=e[n]}))}};r=new WeakSet,s=function(e){this.update((t=>{Object.values(e).forEach((e=>{t.announcements[e.id]=t.announcements[e.id]??{...e,isShown:!1}}))}))},n.AnnouncementController=c}}},{package:"@metamask/announcement-controller",file:"node_modules/@metamask/announcement-controller/dist/chunk-ZGM3XNIO.js"}],[1352,{"./chunk-ZGM3XNIO.js":1351},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=e("./chunk-ZGM3XNIO.js");n.AnnouncementController=r.AnnouncementController}}},{package:"@metamask/announcement-controller",file:"node_modules/@metamask/announcement-controller/dist/index.js"}],[1353,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=class{constructor(e={},t={}){this.defaultConfig={},this.defaultState={},this.disabled=!1,this.name="BaseController",this.internalConfig=this.defaultConfig,this.internalState=this.defaultState,this.internalListeners=[],this.initialState=t,this.initialConfig=e}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}get config(){return this.internalConfig}get state(){return this.internalState}configure(e,t=!1,n=!0){if(n){this.internalConfig=t?e:Object.assign(this.internalConfig,e);for(const e of Object.keys(this.internalConfig)){const t=this.internalConfig[e];void 0!==t&&(this[e]=t)}}else for(const t of Object.keys(e))if(void 0!==this.internalConfig[t]){const n=e[t];this.internalConfig[t]=n,this[t]=n}}notify(){this.disabled||this.internalListeners.forEach((e=>{e(this.internalState)}))}subscribe(e){this.internalListeners.push(e)}unsubscribe(e){const t=this.internalListeners.findIndex((t=>e===t));return t>-1&&this.internalListeners.splice(t,1),t>-1}update(e,t=!1){this.internalState=t?Object.assign({},e):Object.assign({},this.internalState,e),this.notify()}},s=r;n.BaseControllerV1=r,n.BaseControllerV1_default=s}}},{package:"@metamask/announcement-controller>@metamask/base-controller",file:"node_modules/@metamask/announcement-controller/node_modules/@metamask/base-controller/dist/chunk-FTHCJ6HY.js"}],[1354,{"./chunk-UJFCPTF3.js":1356,"./chunk-Z4BLTVTB.js":1357},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r,s,o,a,i=e("./chunk-UJFCPTF3.js"),l=e("./chunk-Z4BLTVTB.js");r=new WeakMap,s=new WeakMap,o=new WeakMap,a=new WeakMap,n.ControllerMessenger=class{constructor(){l.__privateAdd.call(void 0,this,r,new Map),l.__privateAdd.call(void 0,this,s,new Map),l.__privateAdd.call(void 0,this,o,new Map),l.__privateAdd.call(void 0,this,a,new Map)}registerActionHandler(e,t){if(l.__privateGet.call(void 0,this,r).has(e))throw new Error(`A handler for ${e} has already been registered`);l.__privateGet.call(void 0,this,r).set(e,t)}unregisterActionHandler(e){l.__privateGet.call(void 0,this,r).delete(e)}clearActions(){l.__privateGet.call(void 0,this,r).clear()}call(e,...t){const n=l.__privateGet.call(void 0,this,r).get(e);if(!n)throw new Error(`A handler for ${e} has not been registered`);return n(...t)}registerInitialEventPayload({eventType:e,getPayload:t}){l.__privateGet.call(void 0,this,o).set(e,t)}publish(e,...t){const n=l.__privateGet.call(void 0,this,s).get(e);if(n)for(const[e,r]of n.entries())try{if(r){const n=l.__privateGet.call(void 0,this,a).get(e),s=r(...t);s!==n&&(l.__privateGet.call(void 0,this,a).set(e,s),e(s,n))}else e(...t)}catch(e){setTimeout((()=>{throw e}))}}subscribe(e,t,n){let r=l.__privateGet.call(void 0,this,s).get(e);if(r||(r=new Map,l.__privateGet.call(void 0,this,s).set(e,r)),r.set(t,n),n){const r=l.__privateGet.call(void 0,this,o).get(e);if(r){const e=n(...r());l.__privateGet.call(void 0,this,a).set(t,e)}}}unsubscribe(e,t){const n=l.__privateGet.call(void 0,this,s).get(e);if(!n||!n.has(t))throw new Error(`Subscription not found for event: ${e}`);n.get(t)&&l.__privateGet.call(void 0,this,a).delete(t),n.delete(t)}clearEventSubscriptions(e){l.__privateGet.call(void 0,this,s).delete(e)}clearSubscriptions(){l.__privateGet.call(void 0,this,s).clear()}getRestricted({name:e,allowedActions:t,allowedEvents:n}){return new(0,i.RestrictedControllerMessenger)({controllerMessenger:this,name:e,allowedActions:t,allowedEvents:n})}}}}},{package:"@metamask/announcement-controller>@metamask/base-controller",file:"node_modules/@metamask/announcement-controller/node_modules/@metamask/base-controller/dist/chunk-G42723LG.js"}],[1355,{"./chunk-Z4BLTVTB.js":1357,immer:4195},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r,s=e("./chunk-Z4BLTVTB.js"),o=e("immer");o.enablePatches.call(void 0);function a(e,t,n){return Object.keys(e).reduce(((r,s)=>{try{const o=t[s];if(!o)throw new Error(`No metadata found for '${String(s)}'`);const a=o[n],i=e[s];return"function"==typeof a?r[s]=a(i):a&&(r[s]=i),r}catch(e){return setTimeout((()=>{throw e})),r}}),{})}r=new WeakMap,n.BaseController=class{constructor({messenger:e,metadata:t,name:n,state:a}){s.__privateAdd.call(void 0,this,r,void 0),this.messagingSystem=e,this.name=n,s.__privateSet.call(void 0,this,r,o.freeze.call(void 0,a,!0)),this.metadata=t,this.messagingSystem.registerActionHandler(`${n}:getState`,(()=>this.state)),this.messagingSystem.registerInitialEventPayload({eventType:`${n}:stateChange`,getPayload:()=>[this.state,[]]})}get state(){return s.__privateGet.call(void 0,this,r)}set state(e){throw new Error("Controller state cannot be directly mutated; use 'update' method instead.")}update(e){const[t,n,a]=o.produceWithPatches.call(void 0,s.__privateGet.call(void 0,this,r),e);return s.__privateSet.call(void 0,this,r,t),this.messagingSystem.publish(`${this.name}:stateChange`,t,n),{nextState:t,patches:n,inversePatches:a}}applyPatches(e){const t=o.applyPatches.call(void 0,s.__privateGet.call(void 0,this,r),e);s.__privateSet.call(void 0,this,r,t),this.messagingSystem.publish(`${this.name}:stateChange`,t,e)}destroy(){this.messagingSystem.clearEventSubscriptions(`${this.name}:stateChange`)}},n.getAnonymizedState=function(e,t){return a(e,t,"anonymous")},n.getPersistentState=function(e,t){return a(e,t,"persist")}}}},{package:"@metamask/announcement-controller>@metamask/base-controller",file:"node_modules/@metamask/announcement-controller/node_modules/@metamask/base-controller/dist/chunk-IURK6TKD.js"}],[1356,{"./chunk-Z4BLTVTB.js":1357},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r,s,o,a,i,l,c,d,u,h,p=e("./chunk-Z4BLTVTB.js");r=new WeakMap,s=new WeakMap,o=new WeakMap,a=new WeakMap,i=new WeakSet,l=function(e){const t=p.__privateGet.call(void 0,this,a);return p.__privateMethod.call(void 0,this,u,h).call(this,e)||null!==t&&t.includes(e)},c=new WeakSet,d=function(e){const t=p.__privateGet.call(void 0,this,o);return p.__privateMethod.call(void 0,this,u,h).call(this,e)||null!==t&&t.includes(e)},u=new WeakSet,h=function(e){return e.startsWith(`${p.__privateGet.call(void 0,this,s)}:`)},n.RestrictedControllerMessenger=class{constructor({controllerMessenger:e,name:t,allowedActions:n,allowedEvents:l}){p.__privateAdd.call(void 0,this,i),p.__privateAdd.call(void 0,this,c),p.__privateAdd.call(void 0,this,u),p.__privateAdd.call(void 0,this,r,void 0),p.__privateAdd.call(void 0,this,s,void 0),p.__privateAdd.call(void 0,this,o,void 0),p.__privateAdd.call(void 0,this,a,void 0),p.__privateSet.call(void 0,this,r,e),p.__privateSet.call(void 0,this,s,t),p.__privateSet.call(void 0,this,o,n),p.__privateSet.call(void 0,this,a,l)}registerActionHandler(e,t){if(!p.__privateMethod.call(void 0,this,u,h).call(this,e))throw new Error(`Only allowed registering action handlers prefixed by '${p.__privateGet.call(void 0,this,s)}:'`);p.__privateGet.call(void 0,this,r).registerActionHandler(e,t)}unregisterActionHandler(e){if(!p.__privateMethod.call(void 0,this,u,h).call(this,e))throw new Error(`Only allowed unregistering action handlers prefixed by '${p.__privateGet.call(void 0,this,s)}:'`);p.__privateGet.call(void 0,this,r).unregisterActionHandler(e)}call(e,...t){if(!p.__privateMethod.call(void 0,this,c,d).call(this,e))throw new Error(`Action missing from allow list: ${e}`);return p.__privateGet.call(void 0,this,r).call(e,...t)}registerInitialEventPayload({eventType:e,getPayload:t}){if(!p.__privateMethod.call(void 0,this,u,h).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${p.__privateGet.call(void 0,this,s)}:'`);p.__privateGet.call(void 0,this,r).registerInitialEventPayload({eventType:e,getPayload:t})}publish(e,...t){if(!p.__privateMethod.call(void 0,this,u,h).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${p.__privateGet.call(void 0,this,s)}:'`);p.__privateGet.call(void 0,this,r).publish(e,...t)}subscribe(e,t,n){if(!p.__privateMethod.call(void 0,this,i,l).call(this,e))throw new Error(`Event missing from allow list: ${e}`);return n?p.__privateGet.call(void 0,this,r).subscribe(e,t,n):p.__privateGet.call(void 0,this,r).subscribe(e,t)}unsubscribe(e,t){if(!p.__privateMethod.call(void 0,this,i,l).call(this,e))throw new Error(`Event missing from allow list: ${e}`);p.__privateGet.call(void 0,this,r).unsubscribe(e,t)}clearEventSubscriptions(e){if(!p.__privateMethod.call(void 0,this,u,h).call(this,e))throw new Error(`Only allowed clearing events prefixed by '${p.__privateGet.call(void 0,this,s)}:'`);p.__privateGet.call(void 0,this,r).clearEventSubscriptions(e)}}}}},{package:"@metamask/announcement-controller>@metamask/base-controller",file:"node_modules/@metamask/announcement-controller/node_modules/@metamask/base-controller/dist/chunk-UJFCPTF3.js"}],[1357,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};n.__privateGet=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e)),n.__privateAdd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},n.__privateSet=(e,t,n,s)=>(r(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),n.__privateMethod=(e,t,n)=>(r(e,t,"access private method"),n)}}},{package:"@metamask/announcement-controller>@metamask/base-controller",file:"node_modules/@metamask/announcement-controller/node_modules/@metamask/base-controller/dist/chunk-Z4BLTVTB.js"}],[1358,{"./chunk-FTHCJ6HY.js":1353,"./chunk-G42723LG.js":1354,"./chunk-IURK6TKD.js":1355,"./chunk-UJFCPTF3.js":1356,"./chunk-Z4BLTVTB.js":1357},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=e("./chunk-FTHCJ6HY.js"),s=e("./chunk-IURK6TKD.js"),o=e("./chunk-G42723LG.js"),a=e("./chunk-UJFCPTF3.js");e("./chunk-Z4BLTVTB.js"),n.BaseController=s.BaseController,n.BaseControllerV1=r.BaseControllerV1,n.ControllerMessenger=o.ControllerMessenger,n.RestrictedControllerMessenger=a.RestrictedControllerMessenger,n.getAnonymizedState=s.getAnonymizedState,n.getPersistentState=s.getPersistentState}}},{package:"@metamask/announcement-controller>@metamask/base-controller",file:"node_modules/@metamask/announcement-controller/node_modules/@metamask/base-controller/dist/index.js"}],[136,{"../../shared/constants/app":5248,"../../shared/constants/hardware-wallets":5256,"../../shared/constants/keyring":5257,"../../shared/constants/logs":5259,"../../shared/constants/metametrics":5260,"../../shared/constants/methods-tags":5261,"../../shared/constants/network":5264,"../../shared/constants/permissions":5268,"../../shared/constants/smartTransactions":5272,"../../shared/constants/swaps":5274,"../../shared/constants/time":5276,"../../shared/constants/tokens":5277,"../../shared/constants/transaction":5278,"../../shared/constants/urls":5279,"../../shared/lib/fetch-with-cache":5283,"../../shared/lib/metamask-controller-utils":5285,"../../shared/lib/storage-helpers":5287,"../../shared/lib/token-util":5290,"../../shared/lib/trace":5291,"../../shared/lib/transactions-controller-utils":5292,"../../shared/modules/caip-stream":5299,"../../shared/modules/mv3.utils":5310,"../../shared/modules/network.utils":5311,"../../shared/modules/selectors":5319,"../../shared/modules/selectors/networks":5320,"../../shared/modules/string-utils":5324,"../../shared/modules/transaction.utils":5326,"../../shared/notifications":5328,"../../shared/types/bridge-status":5329,"../../ui/helpers/utils/snaps":6292,"./constants/stream":8,"./controllers/account-order":9,"./controllers/account-tracker-controller":10,"./controllers/alert-controller":11,"./controllers/app-metadata":12,"./controllers/app-state-controller":13,"./controllers/bridge-status/bridge-status-controller":14,"./controllers/bridge-status/constants":15,"./controllers/bridge/bridge-controller":18,"./controllers/bridge/constants":19,"./controllers/bridge/types":20,"./controllers/decrypt-message":21,"./controllers/encryption-public-key":22,"./controllers/metametrics-controller":23,"./controllers/metametrics-data-deletion/metametrics-data-deletion":24,"./controllers/network-order":25,"./controllers/onboarding":26,"./controllers/permissions":30,"./controllers/preferences-controller":33,"./controllers/push-notifications":36,"./controllers/swaps":37,"./detect-multiple-instances":40,"./lib/AccountIdentitiesPetnamesBridge":51,"./lib/AddressBookPetnamesBridge":52,"./lib/ComposableObservableStore":53,"./lib/PatchStore":54,"./lib/SnapsNameProvider":55,"./lib/WeakRefObjectMap":56,"./lib/accounts/BalancesController":57,"./lib/backup":60,"./lib/createDupeReqFilterStream":61,"./lib/createEvmMethodsToNonEvmAccountReqFilterMiddleware":62,"./lib/createLoggerMiddleware":63,"./lib/createMainFrameOriginMiddleware":64,"./lib/createMetaRPCHandler":65,"./lib/createMetamaskMiddleware":66,"./lib/createOnboardingMiddleware":67,"./lib/createOriginMiddleware":68,"./lib/createRPCMethodTrackingMiddleware":69,"./lib/createTabIdMiddleware":71,"./lib/createTracingMiddleware":72,"./lib/encryptor-factory":73,"./lib/hardware-keyring-builder-factory":81,"./lib/multichain/address":87,"./lib/offscreen-bridge/lattice-offscreen-keyring":90,"./lib/offscreen-bridge/ledger-offscreen-bridge":91,"./lib/offscreen-bridge/trezor-offscreen-bridge":92,"./lib/ppom/indexed-db-backend":93,"./lib/ppom/ppom":96,"./lib/ppom/ppom-middleware":94,"./lib/ppom/ppom-util":95,"./lib/rpc-method-middleware":110,"./lib/segment":112,"./lib/signature/util":116,"./lib/snap-keyring":117,"./lib/snap-keyring/keyring-snaps-permissions":118,"./lib/state-utils":123,"./lib/stream-utils":124,"./lib/transaction/decode/util":130,"./lib/transaction/metrics":131,"./lib/transaction/smart-transactions":132,"./lib/transaction/util":133,"./lib/tx-verification/tx-verification-middleware":134,"./lib/util":135,"./services/data-deletion-service":292,"./snaps/preinstalled-snaps":293,"./translate":294,"@ethersproject/abi":500,"@keystonehq/metamask-airgapped-keyring":668,"@metamask/accounts-controller":1347,"@metamask/address-book-controller":1350,"@metamask/announcement-controller":1352,"@metamask/approval-controller":1361,"@metamask/assets-controllers":1381,"@metamask/base-controller":1396,"@metamask/controller-utils":1422,"@metamask/ens-controller":1450,"@metamask/eth-json-rpc-filters":1526,"@metamask/eth-json-rpc-filters/subscriptionManager":1528,"@metamask/eth-json-rpc-middleware":1598,"@metamask/eth-ledger-bridge-keyring":1633,"@metamask/eth-query":1640,"@metamask/eth-trezor-keyring":1745,"@metamask/ethjs-query":1762,"@metamask/gas-fee-controller":1771,"@metamask/json-rpc-engine":1780,"@metamask/json-rpc-middleware-stream":1784,"@metamask/keyring-api":1843,"@metamask/keyring-controller":1896,"@metamask/logging-controller":1929,"@metamask/metamask-eth-abis":1944,"@metamask/name-controller":1955,"@metamask/network-controller":1990,"@metamask/notification-services-controller":2115,"@metamask/obs-store":2126,"@metamask/obs-store/dist/asStream":2125,"@metamask/permission-controller":2133,"@metamask/permission-log-controller":2142,"@metamask/phishing-controller":2166,"@metamask/ppom-validator":2201,"@metamask/profile-sync-controller":2225,"@metamask/queued-request-controller":2245,"@metamask/rate-limit-controller":2247,"@metamask/rpc-errors":2304,"@metamask/scure-bip39/dist/wordlists/english":2308,"@metamask/selected-network-controller":2320,"@metamask/signature-controller":2322,"@metamask/smart-transactions-controller":2357,"@metamask/smart-transactions-controller/dist/types":2358,"@metamask/snaps-controllers":2418,"@metamask/snaps-rpc-methods":2479,"@metamask/snaps-utils":2647,"@metamask/transaction-controller":2698,"@metamask/user-operation-controller":2722,"@sentry/browser":2871,"await-semaphore":3454,buffer:3561,"eth-chainlist":3751,"eth-lattice-keyring":3756,events:3868,lodash:4380,loglevel:4386,nanoid:4473,"readable-stream":4791},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ONE_KEY_VIA_TREZOR_MINOR_VERSION=n.METAMASK_CONTROLLER_EVENTS=void 0;var r=Jt(e("events")),s=e("readable-stream"),o=e("@metamask/assets-controllers"),a=e("@metamask/json-rpc-engine"),i=e("@metamask/json-rpc-middleware-stream"),l=e("@metamask/obs-store"),c=e("@metamask/obs-store/dist/asStream"),d=e("@metamask/eth-json-rpc-middleware"),u=e("lodash"),h=e("@metamask/keyring-controller"),p=Jt(e("@metamask/eth-json-rpc-filters")),m=Jt(e("@metamask/eth-json-rpc-filters/subscriptionManager")),g=e("@metamask/rpc-errors"),f=e("await-semaphore"),C=Jt(e("loglevel")),y=e("@metamask/eth-trezor-keyring"),w=e("@metamask/eth-ledger-bridge-keyring"),v=Jt(e("eth-lattice-keyring")),b=e("eth-chainlist"),k=e("@keystonehq/metamask-airgapped-keyring"),S=Jt(e("@metamask/eth-query")),A=Jt(e("@metamask/ethjs-query")),T=e("nanoid"),E=e("@sentry/browser"),M=e("@metamask/address-book-controller"),P=e("@metamask/approval-controller"),_=e("@metamask/base-controller"),I=e("@metamask/ens-controller"),N=e("@metamask/phishing-controller"),R=e("@metamask/announcement-controller"),O=e("@metamask/network-controller"),x=e("@metamask/gas-fee-controller"),B=e("@metamask/permission-controller"),j=Jt(e("@metamask/smart-transactions-controller")),D=e("@metamask/smart-transactions-controller/dist/types"),U=e("@metamask/selected-network-controller"),F=e("@metamask/logging-controller"),L=e("@metamask/permission-log-controller"),$=e("@metamask/rate-limit-controller"),H=e("@metamask/snaps-controllers"),q=e("@metamask/snaps-rpc-methods"),G=e("@metamask/controller-utils"),K=e("@metamask/accounts-controller"),V=e("@metamask/signature-controller"),W=e("@metamask/ppom-validator"),z=e("@metamask/scure-bip39/dist/wordlists/english"),J=e("@metamask/name-controller"),Y=e("@metamask/queued-request-controller"),Q=e("@metamask/user-operation-controller"),X=e("@metamask/transaction-controller"),Z=e("@metamask/snaps-utils"),ee=e("@ethersproject/abi"),te=e("@metamask/metamask-eth-abis"),ne=e("@metamask/keyring-api"),re=e("@metamask/profile-sync-controller"),se=e("@metamask/notification-services-controller"),oe=e("../../shared/constants/methods-tags"),ae=e("../../shared/constants/transaction"),ie=e("../../shared/constants/swaps"),le=e("../../shared/constants/network"),ce=e("../../shared/constants/smartTransactions"),de=e("../../shared/constants/hardware-wallets"),ue=e("../../shared/constants/keyring"),he=e("../../shared/constants/permissions"),pe=e("../../shared/notifications"),me=e("../../shared/constants/time"),ge=e("../../shared/constants/app"),fe=e("../../shared/constants/metametrics"),Ce=e("../../shared/constants/logs"),ye=e("../../shared/lib/storage-helpers"),we=e("../../shared/lib/token-util"),ve=e("../../shared/modules/string-utils"),be=e("../../shared/modules/transaction.utils"),ke=e("../../shared/constants/tokens"),Se=e("../../shared/lib/metamask-controller-utils"),Ae=e("../../shared/modules/mv3.utils"),Te=e("../../shared/modules/network.utils"),Ee=e("../../shared/modules/selectors"),Me=e("../../shared/modules/caip-stream"),Pe=e("../../shared/constants/urls"),_e=e("../../shared/lib/transactions-controller-utils"),Ie=e("../../shared/modules/selectors/networks"),Ne=e("../../shared/lib/trace"),Re=e("../../ui/helpers/utils/snaps"),Oe=e("../../shared/types/bridge-status"),xe=Jt(e("../../shared/lib/fetch-with-cache")),Be=e("./lib/accounts/BalancesController"),je=e("./lib/transaction/metrics"),De=e("./lib/transaction/smart-transactions"),Ue=e("./lib/snap-keyring/keyring-snaps-permissions"),Fe=e("./lib/SnapsNameProvider"),Le=e("./lib/AddressBookPetnamesBridge"),$e=e("./lib/AccountIdentitiesPetnamesBridge"),He=e("./lib/ppom/ppom-middleware"),qe=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=zt(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(e("./lib/ppom/ppom")),Ge=e("./detect-multiple-instances"),Ke=Jt(e("./lib/ComposableObservableStore")),Ve=Jt(e("./controllers/account-tracker-controller")),We=Jt(e("./lib/createDupeReqFilterStream")),ze=Jt(e("./lib/createLoggerMiddleware")),Je=e("./lib/rpc-method-middleware"),Ye=Jt(e("./lib/createOriginMiddleware")),Qe=Jt(e("./lib/createMainFrameOriginMiddleware")),Xe=Jt(e("./lib/createTabIdMiddleware")),Ze=e("./controllers/network-order"),et=e("./controllers/account-order"),tt=Jt(e("./lib/createOnboardingMiddleware")),nt=e("./lib/stream-utils"),rt=e("./controllers/preferences-controller"),st=e("./controllers/app-state-controller"),ot=e("./controllers/alert-controller"),at=Jt(e("./controllers/onboarding")),it=Jt(e("./lib/backup")),lt=Jt(e("./controllers/decrypt-message")),ct=Jt(e("./controllers/swaps")),dt=Jt(e("./controllers/metametrics-controller")),ut=e("./lib/segment"),ht=Jt(e("./lib/createMetaRPCHandler")),pt=e("./lib/util"),mt=Jt(e("./lib/createMetamaskMiddleware")),gt=e("./lib/hardware-keyring-builder-factory"),ft=Jt(e("./controllers/encryption-public-key")),Ct=Jt(e("./controllers/app-metadata")),yt=e("./controllers/permissions"),wt=e("./controllers/metametrics-data-deletion/metametrics-data-deletion"),vt=e("./services/data-deletion-service"),bt=Jt(e("./lib/createRPCMethodTrackingMiddleware")),kt=e("./lib/ppom/indexed-db-backend"),St=e("./translate"),At=e("./lib/offscreen-bridge/trezor-offscreen-bridge"),Tt=e("./lib/offscreen-bridge/ledger-offscreen-bridge"),Et=e("./lib/snap-keyring"),Mt=e("./lib/encryptor-factory"),Pt=e("./lib/transaction/util"),_t=e("./lib/signature/util"),It=e("./lib/offscreen-bridge/lattice-offscreen-keyring"),Nt=Jt(e("./snaps/preinstalled-snaps")),Rt=e("./lib/WeakRefObjectMap"),Ot=e("./constants/stream"),xt=e("./lib/tx-verification/tx-verification-middleware"),Bt=e("./lib/ppom/ppom-util"),jt=Jt(e("./lib/createEvmMethodsToNonEvmAccountReqFilterMiddleware")),Dt=e("./lib/multichain/address"),Ut=e("./lib/transaction/decode/util"),Ft=e("./controllers/bridge/types"),Lt=Jt(e("./controllers/bridge/bridge-controller")),$t=e("./controllers/bridge/constants"),Ht=e("./controllers/push-notifications"),qt=Jt(e("./lib/createTracingMiddleware")),Gt=e("./lib/PatchStore"),Kt=e("./lib/state-utils"),Vt=Jt(e("./controllers/bridge-status/bridge-status-controller")),Wt=e("./controllers/bridge-status/constants");function zt(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(zt=function(e){return e?n:t})(e)}function Jt(e){return e&&e.__esModule?e:{default:e}}function Yt(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function Qt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;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:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xt(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const{TRIGGER_TYPES:Zt}=se.NotificationServicesController.Constants,en=(n.METAMASK_CONTROLLER_EVENTS={UPDATE_BADGE:"updateBadge",APPROVAL_STATE_CHANGE:"ApprovalController:stateChange",QUEUED_REQUEST_STATE_CHANGE:"QueuedRequestController:stateChange",METAMASK_NOTIFICATIONS_LIST_UPDATED:"NotificationServicesController:notificationsListUpdated",METAMASK_NOTIFICATIONS_MARK_AS_READ:"NotificationServicesController:markNotificationsAsRead"},n.ONE_KEY_VIA_TREZOR_MINOR_VERSION=99);var tn=new WeakSet;class nn extends r.default{constructor(e){var t;super(),Yt(this,tn),Qt(this,"_trackSnapExportUsage",(0,u.wrap)((0,u.memoize)((()=>(0,u.throttle)(((e,t,n,r)=>{var s;return this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.SnapExportUsed,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:e,export:t,snap_category:null===(s=this._getSnapMetadata(e))||void 0===s?void 0:s.category,success:n,origin:r}})}),60*me.SECOND)),((e,t,n,r)=>`${e}${t}${r}`)),((e,...t)=>e(...t)(...t)))),Qt(this,"handleWatchAssetRequest",(({asset:e,type:t,origin:n,networkClientId:r})=>{switch(t){case G.ERC20:return this.tokensController.watchAsset({asset:e,type:t,networkClientId:r});case G.ERC721:case G.ERC1155:return this.nftController.watchNft(e,t,n);default:throw new Error(`Asset type ${t} not supported`)}})),Qt(this,"removePermissionsFor",(e=>{try{this.permissionController.revokePermissions(e)}catch(e){if(!(e instanceof B.PermissionsRequestNotFoundError))throw e}})),Qt(this,"updateCaveat",((e,t,n,r)=>{try{this.controllerMessenger.call("PermissionController:updateCaveat",e,t,n,r)}catch(e){if(!(e instanceof B.PermissionsRequestNotFoundError))throw e}})),Qt(this,"updateNetworksList",(e=>{try{this.networkOrderController.updateNetworksList(e)}catch(e){throw C.default.error(e.message),e}})),Qt(this,"updateAccountsList",(e=>{try{this.accountOrderController.updateAccountsList(e)}catch(e){throw C.default.error(e.message),e}})),Qt(this,"updateHiddenAccountsList",(e=>{try{this.accountOrderController.updateHiddenAccountsList(e)}catch(e){throw C.default.error(e.message),e}})),Qt(this,"rejectPermissionsRequest",(e=>{try{this.permissionController.rejectPermissionsRequest(e)}catch(e){if(!(e instanceof B.PermissionsRequestNotFoundError))throw e}})),Qt(this,"acceptPermissionsRequest",(e=>{try{this.permissionController.acceptPermissionsRequest(e)}catch(e){if(!(e instanceof B.PermissionsRequestNotFoundError))throw e}})),Qt(this,"resolvePendingApproval",(async(e,t,n)=>{try{await this.approvalController.accept(e,t,n)}catch(e){if(!(e instanceof P.ApprovalRequestNotFoundError))throw e}})),Qt(this,"rejectPendingApproval",((e,t)=>{try{this.approvalController.reject(e,new g.JsonRpcError(t.code,t.message,t.data))}catch(e){if(!(e instanceof P.ApprovalRequestNotFoundError))throw e}}));const{isFirstMetaMaskControllerSetup:n}=e;this.defaultMaxListeners=20,this.sendUpdate=(0,u.debounce)(this.privateSendUpdate.bind(this),200*me.MILLISECOND),this.opts=e,this.extension=e.browser,this.platform=e.platform,this.notificationManager=e.notificationManager;const r=e.initState||{},s="12.9.3";this.recordFirstTimeInfo(r),this.featureFlags=e.featureFlags,this.activeControllerConnections=0,this.offscreenPromise=e.offscreenPromise??Promise.resolve(),this.getRequestAccountTabIds=e.getRequestAccountTabIds,this.getOpenMetamaskTabsIds=e.getOpenMetamaskTabsIds,this.initializeChainlist(),this.controllerMessenger=new _.ControllerMessenger,this.loggingController=new F.LoggingController({messenger:this.controllerMessenger.getRestricted({name:"LoggingController",allowedActions:[],allowedEvents:[]}),state:r.LoggingController}),this.localStoreApiWrapper=e.localStore,this.currentMigrationVersion=e.currentMigrationVersion,this.store=new Ke.default({state:r,controllerMessenger:this.controllerMessenger,persist:!0}),this.connections={},this.createVaultMutex=new f.Mutex,this.extension.runtime.onInstalled.addListener((e=>{"update"===e.reason&&this.loggingController.add({type:F.LogType.GenericLog,data:{event:Ce.LOG_EVENT.VERSION_UPDATE,previousVersion:e.previousVersion,version:s}})})),this.appMetadataController=new Ct.default({state:r.AppMetadataController,messenger:this.controllerMessenger.getRestricted({name:"AppMetadataController",allowedActions:[],allowedEvents:[]}),currentMigrationVersion:this.currentMigrationVersion,currentAppVersion:s});const a=()=>{this.encryptionPublicKeyController.clearUnapproved(),this.decryptMessageController.clearUnapproved(),this.signatureController.clearUnapproved(),this.approvalController.clear(g.providerErrors.userRejectedRequest())};this.approvalController=new P.ApprovalController({messenger:this.controllerMessenger.getRestricted({name:"ApprovalController"}),showApprovalRequest:e.showUserConfirmation,typesExcludedFromRateLimiting:[G.ApprovalType.PersonalSign,G.ApprovalType.EthSignTypedData,G.ApprovalType.Transaction,G.ApprovalType.WatchAsset,G.ApprovalType.EthGetEncryptionPublicKey,G.ApprovalType.EthDecrypt]}),this.queuedRequestController=new Y.QueuedRequestController({messenger:this.controllerMessenger.getRestricted({name:"QueuedRequestController",allowedActions:["NetworkController:getState","NetworkController:setActiveNetwork","SelectedNetworkController:getNetworkClientIdForDomain"],allowedEvents:["SelectedNetworkController:stateChange"]}),shouldRequestSwitchNetwork:({method:e})=>oe.methodsRequiringNetworkSwitch.includes(e),canRequestSwitchNetworkWithoutApproval:({method:e})=>oe.methodsThatCanSwitchNetworkWithoutApproval.includes(e),clearPendingConfirmations:a,showApprovalRequest:()=>{this.approvalController.getTotalApprovalCount()>0&&e.showUserConfirmation()}});const i=this.controllerMessenger.getRestricted({name:"NetworkController"});let l=r.NetworkController;if(!l){l=(0,O.getDefaultNetworkControllerState)();const e=l.networkConfigurationsByChainId;let t;e[le.CHAIN_IDS.MAINNET].name=le.MAINNET_DISPLAY_NAME,delete e[le.CHAIN_IDS.GOERLI],delete e[le.CHAIN_IDS.LINEA_GOERLI],Object.values(e).forEach((e=>{const t=e.rpcEndpoints[0].networkClientId;e.blockExplorerUrls=[G.BlockExplorerUrl[t]],e.defaultBlockExplorerUrlIndex=0})),t=e[le.CHAIN_IDS.MAINNET],l.selectedNetworkClientId=t.rpcEndpoints[t.defaultRpcEndpointIndex].networkClientId}this.networkController=new O.NetworkController({messenger:i,state:l,infuraProjectId:e.infuraProjectId}),this.networkController.initializeProvider(),this.provider=this.networkController.getProviderAndBlockTracker().provider,this.blockTracker=this.networkController.getProviderAndBlockTracker().blockTracker,this.deprecatedNetworkVersions={};const c=this.controllerMessenger.getRestricted({name:"AccountsController",allowedEvents:["SnapController:stateChange","KeyringController:accountRemoved","KeyringController:stateChange"],allowedActions:["KeyringController:getAccounts","KeyringController:getKeyringsByType","KeyringController:getKeyringForAccount"]});this.accountsController=new K.AccountsController({messenger:c,state:r.AccountsController});const d=this.controllerMessenger.getRestricted({name:"PreferencesController",allowedActions:["AccountsController:setSelectedAccount","AccountsController:getSelectedAccount","AccountsController:getAccountByAddress","AccountsController:setAccountName","NetworkController:getState"],allowedEvents:["AccountsController:stateChange"]});this.preferencesController=new rt.PreferencesController({state:{currentLocale:e.initLangCode??"",...r.PreferencesController},messenger:d});const p=this.controllerMessenger.getRestricted({name:"TokenListController",allowedActions:["NetworkController:getNetworkClientById"],allowedEvents:["NetworkController:stateChange"]});this.tokenListController=new o.TokenListController({chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state}),preventPollingOnNetworkRestart:!Xt(tn,this,sn).call(this,this.preferencesController.state),messenger:p,state:r.TokenListController});const m=this.controllerMessenger.getRestricted({name:"AssetsContractController",allowedActions:["NetworkController:getNetworkClientById","NetworkController:getNetworkConfigurationByNetworkClientId","NetworkController:getSelectedNetworkClient","NetworkController:getState"],allowedEvents:["PreferencesController:stateChange","NetworkController:networkDidChange"]});this.assetsContractController=new o.AssetsContractController({messenger:m,chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state})});const b=this.controllerMessenger.getRestricted({name:"TokensController",allowedActions:["ApprovalController:addRequest","NetworkController:getNetworkClientById","AccountsController:getSelectedAccount","AccountsController:getAccount"],allowedEvents:["NetworkController:networkDidChange","AccountsController:selectedEvmAccountChange","PreferencesController:stateChange","TokenListController:stateChange","NetworkController:stateChange"]});this.tokensController=new o.TokensController({state:r.TokensController,provider:this.provider,messenger:b,chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state})});const S=this.controllerMessenger.getRestricted({name:"NftController",allowedEvents:["PreferencesController:stateChange","NetworkController:networkDidChange","AccountsController:selectedEvmAccountChange"],allowedActions:[`${this.approvalController.name}:addRequest`,`${this.networkController.name}:getNetworkClientById`,"AccountsController:getSelectedAccount","AccountsController:getAccount","AssetsContractController:getERC721AssetName","AssetsContractController:getERC721AssetSymbol","AssetsContractController:getERC721TokenURI","AssetsContractController:getERC721OwnerOf","AssetsContractController:getERC1155BalanceOf","AssetsContractController:getERC1155TokenURI"]});this.nftController=new o.NftController({state:r.NftController,messenger:S,chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state}),onNftAdded:({address:e,symbol:t,tokenId:n,standard:r,source:s})=>this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.NftAdded,category:fe.MetaMetricsEventCategory.Wallet,sensitiveProperties:{token_contract_address:e,token_symbol:t,token_id:n,token_standard:r,asset_type:ae.AssetType.NFT,source:s}})}),this.nftController.setApiKey(null);const A=this.controllerMessenger.getRestricted({name:"NftDetectionController",allowedEvents:["NetworkController:stateChange","PreferencesController:stateChange"],allowedActions:["ApprovalController:addRequest","NetworkController:getState","NetworkController:getNetworkClientById","AccountsController:getSelectedAccount"]});this.nftDetectionController=new o.NftDetectionController({messenger:A,chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state}),getOpenSeaApiKey:()=>this.nftController.openSeaApiKey,getBalancesInSingleCall:this.assetsContractController.getBalancesInSingleCall.bind(this.assetsContractController),addNft:this.nftController.addNft.bind(this.nftController),getNftState:()=>this.nftController.state,disabled:!this.preferencesController.state.useNftDetection});const T=this.controllerMessenger.getRestricted({name:"MetaMetricsController",allowedActions:["PreferencesController:getState","NetworkController:getState","NetworkController:getNetworkClientById"],allowedEvents:["PreferencesController:stateChange","NetworkController:networkDidChange"]});this.metaMetricsController=new dt.default({state:r.MetaMetricsController,messenger:T,segment:ut.segment,version:"12.9.3",environment:"other",extension:this.extension,captureException:E.captureException}),this.on("update",(e=>{this.metaMetricsController.handleMetaMaskStateUpdate(e)}));const q=new vt.DataDeletionService,z=this.controllerMessenger.getRestricted({name:"MetaMetricsDataDeletionController",allowedActions:["MetaMetricsController:getState"],allowedEvents:[]});this.metaMetricsDataDeletionController=new wt.MetaMetricsDataDeletionController({dataDeletionService:q,messenger:z,state:r.metaMetricsDataDeletionController});const ee=this.controllerMessenger.getRestricted({name:"GasFeeController",allowedActions:["NetworkController:getEIP1559Compatibility","NetworkController:getNetworkClientById","NetworkController:getState"],allowedEvents:["NetworkController:stateChange"]}),te=ie.GAS_API_BASE_URL;this.gasFeeController=new x.GasFeeController({state:r.GasFeeController,interval:1e4,messenger:ee,clientId:ie.SWAPS_CLIENT_ID,getProvider:()=>this.networkController.getProviderAndBlockTracker().provider,onNetworkDidChange:e=>{i.subscribe("NetworkController:networkDidChange",(()=>e(this.networkController.state)))},getCurrentNetworkEIP1559Compatibility:this.networkController.getEIP1559Compatibility.bind(this.networkController),getCurrentAccountEIP1559Compatibility:this.getCurrentAccountEIP1559Compatibility.bind(this),legacyAPIEndpoint:`${te}/networks//gasPrices`,EIP1559APIEndpoint:`${te}/networks//suggestedGasFees`,getCurrentNetworkLegacyGasAPICompatibility:()=>(0,Ie.getCurrentChainId)({metamask:this.networkController.state})===le.CHAIN_IDS.BSC,getChainId:()=>(0,Ie.getCurrentChainId)({metamask:this.networkController.state})}),this.appStateController=new st.AppStateController({addUnlockListener:this.on.bind(this,"unlock"),isUnlocked:this.isUnlocked.bind(this),initState:r.AppStateController,onInactiveTimeout:()=>this.setLocked(),messenger:this.controllerMessenger.getRestricted({name:"AppStateController",allowedActions:[`${this.approvalController.name}:addRequest`,`${this.approvalController.name}:acceptRequest`,"PreferencesController:getState"],allowedEvents:["KeyringController:qrKeyringStateChange","PreferencesController:stateChange"]}),extension:this.extension});const ne=this.controllerMessenger.getRestricted({name:"CurrencyRateController",allowedActions:[`${this.networkController.name}:getNetworkClientById`]});this.currencyRateController=new o.CurrencyRateController({includeUsdRate:!0,messenger:ne,state:r.CurrencyController});const de=this.currencyRateController.fetchMultiExchangeRate.bind(this.currencyRateController);this.currencyRateController.fetchMultiExchangeRate=(...e)=>this.preferencesController.state.useCurrencyRateCheck?de(...e):{conversionRate:null,usdConversionRate:null};const ue=this.controllerMessenger.getRestricted({name:"TokenBalancesController",allowedActions:["NetworkController:getState","NetworkController:getNetworkClientById","TokensController:getState","PreferencesController:getState","AccountsController:getSelectedAccount"],allowedEvents:["PreferencesController:stateChange","TokensController:stateChange","NetworkController:stateChange"]});this.tokenBalancesController=new o.TokenBalancesController({messenger:ue,state:r.TokenBalancesController,interval:3e4});const ye=this.controllerMessenger.getRestricted({name:"PhishingController"});this.phishingController=new N.PhishingController({messenger:ye,state:r.PhishingController,hotlistRefreshInterval:undefined,stalelistRefreshInterval:undefined}),this.ppomController=new W.PPOMController({messenger:this.controllerMessenger.getRestricted({name:"PPOMController",allowedEvents:["NetworkController:stateChange","NetworkController:networkDidChange"],allowedActions:["NetworkController:getNetworkClientById"]}),storageBackend:new kt.IndexedDBPPOMStorage("PPOMDB",1),provider:this.provider,ppomProvider:{PPOM:qe.PPOM,ppomInit:()=>qe.default("./ppom_bg.wasm")},state:r.PPOMController,chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state}),securityAlertsEnabled:this.preferencesController.state.securityAlertsEnabled,onPreferencesChange:d.subscribe.bind(d,"PreferencesController:stateChange"),cdnBaseUrl:"static.cx.metamask.io/api/v1/confirmations/ppom",blockaidPublicKey:"066ad3e8af5583385e312c156d238055215d5f25247c1e91055afa756cb98a88"});const we=this.controllerMessenger.getRestricted({name:"AnnouncementController"});this.announcementController=new R.AnnouncementController({messenger:we,allAnnouncements:pe.UI_NOTIFICATIONS,state:r.AnnouncementController});const ve=this.controllerMessenger.getRestricted({name:"NetworkOrderController",allowedEvents:["NetworkController:stateChange"]});this.networkOrderController=new Ze.NetworkOrderController({messenger:ve,state:r.NetworkOrderController});const be=this.controllerMessenger.getRestricted({name:"AccountOrderController"});this.accountOrderController=new et.AccountOrderController({messenger:be,state:r.AccountOrderController});const ke=this.controllerMessenger.getRestricted({name:"BalancesController",allowedEvents:["AccountsController:accountAdded","AccountsController:accountRemoved"],allowedActions:["AccountsController:listMultichainAccounts","SnapController:handleRequest"]});this.multichainBalancesController=new Be.BalancesController({messenger:ke,state:r.MultichainBalancesController});const Se=this.controllerMessenger.getRestricted({name:"RatesController"});this.multichainRatesController=new o.RatesController({state:r.MultichainRatesController,messenger:Se,includeUsdRate:!0,fetchMultiExchangeRate:o.fetchMultiExchangeRate});const Te=this.controllerMessenger.getRestricted({name:"TokenRatesController",allowedActions:["TokensController:getState","NetworkController:getNetworkClientById","NetworkController:getState","AccountsController:getAccount","AccountsController:getSelectedAccount"],allowedEvents:["NetworkController:stateChange","AccountsController:selectedEvmAccountChange","PreferencesController:stateChange","TokensController:stateChange"]});this.tokenRatesController=new o.TokenRatesController({state:r.TokenRatesController,messenger:Te,tokenPricesService:new o.CodefiTokenPricesServiceV2,disabled:!this.preferencesController.state.useCurrencyRateCheck}),this.controllerMessenger.subscribe("PreferencesController:stateChange",(0,pt.previousValueComparator)(((e,t)=>{const{useCurrencyRateCheck:n}=e,{useCurrencyRateCheck:r}=t;r&&!n?this.tokenRatesController.enable():!r&&n&&this.tokenRatesController.disable()}),this.preferencesController.state)),this.ensController=new I.EnsController({messenger:this.controllerMessenger.getRestricted({name:"EnsController",allowedActions:["NetworkController:getNetworkClientById","NetworkController:getState"],allowedEvents:[]}),onNetworkDidChange:i.subscribe.bind(i,"NetworkController:networkDidChange")});const Me=this.controllerMessenger.getRestricted({name:"OnboardingController",allowedActions:[],allowedEvents:[]});this.onboardingController=new at.default({messenger:Me,state:r.OnboardingController});let Pe=[(0,h.keyringBuilderFactory)(k.MetaMaskKeyring)];const _e=null===(t=this.opts.overrides)||void 0===t?void 0:t.keyrings;if(!1===Ae.isManifestV3){const e=[(null==_e?void 0:_e.lattice)||v.default,k.MetaMaskKeyring],t=[{keyring:(null==_e?void 0:_e.trezor)||y.TrezorKeyring,bridge:(null==_e?void 0:_e.trezorBridge)||y.TrezorConnectBridge},{keyring:(null==_e?void 0:_e.ledger)||w.LedgerKeyring,bridge:(null==_e?void 0:_e.ledgerBridge)||w.LedgerIframeBridge}];Pe=e.map((e=>(0,h.keyringBuilderFactory)(e))),t.forEach((e=>Pe.push((0,gt.hardwareKeyringBuilderFactory)(e.keyring,e.bridge))))}else Pe.push((0,gt.hardwareKeyringBuilderFactory)(y.TrezorKeyring,(null==_e?void 0:_e.trezorBridge)||At.TrezorOffscreenBridge),(0,gt.hardwareKeyringBuilderFactory)(w.LedgerKeyring,(null==_e?void 0:_e.ledgerBridge)||Tt.LedgerOffscreenBridge),(0,h.keyringBuilderFactory)(It.LatticeKeyringOffscreen));const Re=this.controllerMessenger.getRestricted({name:"SnapKeyringBuilder",allowedActions:["ApprovalController:addRequest","ApprovalController:acceptRequest","ApprovalController:rejectRequest","ApprovalController:startFlow","ApprovalController:endFlow","ApprovalController:showSuccess","ApprovalController:showError","PhishingController:test","PhishingController:maybeUpdateState","KeyringController:getAccounts","AccountsController:setSelectedAccount","AccountsController:getAccountByAddress","AccountsController:setAccountName"]});Pe.push((0,Et.snapKeyringBuilder)(Re,(()=>this.snapController),(async()=>{await this.keyringController.persistAllKeyrings(),await this.accountsController.updateAccounts()}),(e=>this.removeAccount(e)),this.metaMetricsController.trackEvent.bind(this.metaMetricsController),(e=>{if(!e)return null;const t=this.getLocale(),{snaps:n}=this.snapController.state,r=n[e];if(!r)return(0,Z.stripSnapPrefix)(e);if(r.localizationFiles){return(0,Z.getLocalizedSnapManifest)(r.manifest,t,r.localizationFiles).proposedName}return r.manifest.proposedName}),(e=>Nt.default.some((t=>t.snapId===e)))));const Oe=this.controllerMessenger.getRestricted({name:"KeyringController"});this.keyringController=new h.KeyringController({cacheEncryptionKey:!0,keyringBuilders:Pe,state:r.KeyringController,encryptor:e.encryptor||(0,Mt.encryptorFactory)(6e5),messenger:Oe}),this.controllerMessenger.subscribe("KeyringController:unlock",(()=>this._onUnlock())),this.controllerMessenger.subscribe("KeyringController:lock",(()=>this._onLock())),this.controllerMessenger.subscribe("KeyringController:stateChange",(e=>{this._onKeyringControllerUpdate(e)})),this.permissionController=new B.PermissionController({messenger:this.controllerMessenger.getRestricted({name:"PermissionController",allowedActions:[`${this.approvalController.name}:addRequest`,`${this.approvalController.name}:hasRequest`,`${this.approvalController.name}:acceptRequest`,`${this.approvalController.name}:rejectRequest`,"SnapController:getPermitted","SnapController:install","SubjectMetadataController:getSubjectMetadata"]}),state:r.PermissionController,caveatSpecifications:(0,yt.getCaveatSpecifications)({getInternalAccounts:this.accountsController.listAccounts.bind(this.accountsController),findNetworkClientIdByChainId:this.networkController.findNetworkClientIdByChainId.bind(this.networkController)}),permissionSpecifications:{...(0,yt.getPermissionSpecifications)({getInternalAccounts:this.accountsController.listAccounts.bind(this.accountsController),getAllAccounts:this.keyringController.getAccounts.bind(this.keyringController),captureKeyringTypesWithMissingIdentities:(e=[],t=[])=>{const n=t.filter((t=>!e.some((e=>e.address.toLowerCase()===t.toLowerCase())))).map((e=>this.keyringController.getAccountKeyringType(e))),r=e.length,s=Object.keys(this.accountTrackerController.state.accounts||{}).length;(0,E.captureException)(new Error(`Attempt to get permission specifications failed because their were ${t.length} accounts, but ${r} identities, and the ${n} keyrings included accounts with missing identities. Meanwhile, there are ${s} accounts in the account tracker.`))}}),...this.getSnapPermissionSpecifications()},unrestrictedMethods:yt.unrestrictedMethods}),this.selectedNetworkController=new U.SelectedNetworkController({messenger:this.controllerMessenger.getRestricted({name:"SelectedNetworkController",allowedActions:["NetworkController:getNetworkClientById","NetworkController:getState","NetworkController:getSelectedNetworkClient","PermissionController:hasPermissions","PermissionController:getSubjectNames"],allowedEvents:["NetworkController:stateChange","PermissionController:stateChange"]}),state:r.SelectedNetworkController,useRequestQueuePreference:this.preferencesController.state.useRequestQueue,onPreferencesStateChange:e=>{d.subscribe("PreferencesController:stateChange",e)},domainProxyMap:new Rt.WeakRefObjectMap}),this.permissionLogController=new L.PermissionLogController({messenger:this.controllerMessenger.getRestricted({name:"PermissionLogController"}),restrictedMethods:new Set(Object.keys(he.RestrictedMethods)),state:r.PermissionLogController}),this.subjectMetadataController=new B.SubjectMetadataController({messenger:this.controllerMessenger.getRestricted({name:"SubjectMetadataController",allowedActions:[`${this.permissionController.name}:hasPermissions`]}),state:r.SubjectMetadataController,subjectCacheLimit:100});const xe=Ae.isManifestV3&&"undefined"!=typeof chrome&&void 0!==chrome.offscreen,je={messenger:this.controllerMessenger.getRestricted({name:"ExecutionService"}),setupSnapProvider:this.setupSnapProvider.bind(this)};this.snapExecutionService=!1===xe?new H.IframeExecutionService({...je,iframeUrl:new URL("https://execution.metamask.io/iframe/6.10.0/index.html")}):new H.OffscreenExecutionService({...je,offscreenPromise:this.offscreenPromise});const De=this.controllerMessenger.getRestricted({name:"SnapController",allowedEvents:["ExecutionService:unhandledError","ExecutionService:outboundRequest","ExecutionService:outboundResponse"],allowedActions:[`${this.permissionController.name}:getEndowments`,`${this.permissionController.name}:getPermissions`,`${this.permissionController.name}:hasPermission`,`${this.permissionController.name}:hasPermissions`,`${this.permissionController.name}:requestPermissions`,`${this.permissionController.name}:revokeAllPermissions`,`${this.permissionController.name}:revokePermissions`,`${this.permissionController.name}:revokePermissionForAllSubjects`,`${this.permissionController.name}:getSubjectNames`,`${this.permissionController.name}:updateCaveat`,`${this.approvalController.name}:addRequest`,`${this.approvalController.name}:updateRequestState`,`${this.permissionController.name}:grantPermissions`,`${this.subjectMetadataController.name}:getSubjectMetadata`,`${this.subjectMetadataController.name}:addSubjectMetadata`,"ExecutionService:executeSnap","ExecutionService:getRpcRequestHandler","ExecutionService:terminateSnap","ExecutionService:terminateAllSnaps","ExecutionService:handleRpcRequest","SnapsRegistry:get","SnapsRegistry:getMetadata","SnapsRegistry:update","SnapsRegistry:resolveVersion","SnapInterfaceController:createInterface","SnapInterfaceController:getInterface"]}),Ue=!0;this.snapController=new H.SnapController({environmentEndowmentPermissions:Object.values(he.EndowmentPermissions),excludedPermissions:{...he.ExcludedSnapPermissions,...he.ExcludedSnapEndowments},closeAllConnections:this.removeAllConnections.bind(this),state:r.SnapController,messenger:De,featureFlags:{dappsCanUpdateSnaps:!0,allowLocalSnaps:!1,requireAllowlist:Ue,rejectInvalidPlatformVersion:!0},encryptor:(0,Mt.encryptorFactory)(6e5),getMnemonic:this.getPrimaryKeyringMnemonic.bind(this),preinstalledSnaps:Nt.default,getFeatureFlags:()=>({disableSnaps:!1===this.preferencesController.state.useExternalServices})}),this.rateLimitController=new $.RateLimitController({state:r.RateLimitController,messenger:this.controllerMessenger.getRestricted({name:"RateLimitController"}),implementations:{showNativeNotification:{method:(e,t)=>{const n=this.controllerMessenger.call("SubjectMetadataController:getState").subjectMetadata[e];return this.platform._showNotification((null==n?void 0:n.name)??e,t).catch((e=>{C.default.error("Failed to create notification",e)})),null},rateLimitCount:2,rateLimitTimeout:3e5},showInAppNotification:{method:(e,t)=>{const{message:n}=t,r={data:{message:n,origin:e},type:Zt.SNAP,readDate:null};return this.controllerMessenger.call("NotificationServicesController:updateMetamaskNotificationsList",r),null},rateLimitCount:5,rateLimitTimeout:6e4}}});const He=this.controllerMessenger.getRestricted({name:"CronjobController",allowedEvents:["SnapController:snapInstalled","SnapController:snapUpdated","SnapController:snapUninstalled","SnapController:snapEnabled","SnapController:snapDisabled"],allowedActions:[`${this.permissionController.name}:getPermissions`,"SnapController:handleRequest","SnapController:getAll"]});this.cronjobController=new H.CronjobController({state:r.CronjobController,messenger:He});const We=this.controllerMessenger.getRestricted({name:"SnapsRegistry",allowedEvents:[],allowedActions:[]});this.snapsRegistry=new H.JsonSnapsRegistry({state:r.SnapsRegistry,messenger:We,refetchOnAllowlistMiss:Ue,url:{registry:"https://acl.execution.metamask.io/latest/registry.json",signature:"https://acl.execution.metamask.io/latest/signature.json"},publicKey:"0x025b65308f0f0fb8bc7f7ff87bfc296e0330eee5d3c1d1ee4a048b2fd6a86fa0a6"});const ze=this.controllerMessenger.getRestricted({name:"SnapInterfaceController",allowedActions:[`${this.phishingController.name}:maybeUpdateState`,`${this.phishingController.name}:testOrigin`,`${this.approvalController.name}:hasRequest`,`${this.approvalController.name}:acceptRequest`,`${this.snapController.name}:get`],allowedEvents:["NotificationServicesController:notificationsListUpdated"]});this.snapInterfaceController=new H.SnapInterfaceController({state:r.SnapInterfaceController,messenger:ze});const Je=this.controllerMessenger.getRestricted({name:"SnapInsightsController",allowedActions:[`${this.snapController.name}:handleRequest`,`${this.snapController.name}:getAll`,`${this.permissionController.name}:getPermissions`,`${this.snapInterfaceController.name}:deleteInterface`],allowedEvents:["TransactionController:unapprovedTransactionAdded","TransactionController:transactionStatusUpdated","SignatureController:stateChange"]});this.snapInsightsController=new H.SnapInsightsController({state:r.SnapInsightsController,messenger:Je}),this.authenticationController=new re.AuthenticationController.Controller({state:r.AuthenticationController,messenger:this.controllerMessenger.getRestricted({name:"AuthenticationController",allowedActions:["KeyringController:getState","SnapController:handleRequest"],allowedEvents:["KeyringController:lock","KeyringController:unlock"]}),metametrics:{getMetaMetricsId:()=>this.metaMetricsController.getMetaMetricsId(),agent:"extension"}}),this.userStorageController=new re.UserStorageController.Controller({getMetaMetricsState:()=>this.metaMetricsController.state.participateInMetaMetrics??!1,state:r.UserStorageController,config:{accountSyncing:{onAccountAdded:e=>{this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.ProfileSyncing,event:fe.MetaMetricsEventName.AccountsSyncAdded,properties:{profile_id:e}})},onAccountNameUpdated:e=>{this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.ProfileSyncing,event:fe.MetaMetricsEventName.AccountsSyncNameUpdated,properties:{profile_id:e}})},onAccountSyncErroneousSituation:(e,t)=>{this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.ProfileSyncing,event:fe.MetaMetricsEventName.AccountsSyncErroneousSituation,properties:{profile_id:e,situation_message:t}})}}},env:{isAccountSyncingEnabled:Ae.isManifestV3},messenger:this.controllerMessenger.getRestricted({name:"UserStorageController",allowedActions:["KeyringController:getState","KeyringController:addNewAccount","SnapController:handleRequest","AuthenticationController:getBearerToken","AuthenticationController:getSessionProfile","AuthenticationController:isSignedIn","AuthenticationController:performSignOut","AuthenticationController:performSignIn","NotificationServicesController:disableNotificationServices","NotificationServicesController:selectIsNotificationServicesEnabled","AccountsController:listAccounts","AccountsController:updateAccountMetadata"],allowedEvents:["KeyringController:lock","KeyringController:unlock","AccountsController:accountAdded","AccountsController:accountRenamed"]})});const Ye=this.controllerMessenger.getRestricted({name:"NotificationServicesPushController",allowedActions:["AuthenticationController:getBearerToken"],allowedEvents:[]});this.notificationServicesPushController=new se.NotificationServicesPushController.Controller({messenger:Ye,state:r.NotificationServicesPushController,env:{apiKey:"",authDomain:"",storageBucket:"",projectId:"",messagingSenderId:"",appId:"",measurementId:"",vapidKey:""},config:{isPushEnabled:Ae.isManifestV3,platform:"extension",onPushNotificationReceived:Ht.onPushNotificationReceived,onPushNotificationClicked:Ht.onPushNotificationClicked}}),Ye.subscribe("NotificationServicesPushController:onNewNotifications",(e=>{this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.PushNotifications,event:fe.MetaMetricsEventName.PushNotificationReceived,properties:{notification_id:e.id,notification_type:e.type,chain_id:null==e?void 0:e.chain_id}})})),Ye.subscribe("NotificationServicesPushController:pushNotificationClicked",(e=>{this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.PushNotifications,event:fe.MetaMetricsEventName.PushNotificationClicked,properties:{notification_id:e.id,notification_type:e.type,chain_id:null==e?void 0:e.chain_id}})})),this.notificationServicesController=new se.NotificationServicesController.Controller({messenger:this.controllerMessenger.getRestricted({name:"NotificationServicesController",allowedActions:["KeyringController:getAccounts","KeyringController:getState","AuthenticationController:getBearerToken","AuthenticationController:isSignedIn","UserStorageController:enableProfileSyncing","UserStorageController:getStorageKey","UserStorageController:performGetStorage","UserStorageController:performSetStorage","NotificationServicesPushController:enablePushNotifications","NotificationServicesPushController:disablePushNotifications","NotificationServicesPushController:subscribeToPushNotifications","NotificationServicesPushController:updateTriggerPushNotifications"],allowedEvents:["KeyringController:stateChange","KeyringController:lock","KeyringController:unlock","NotificationServicesPushController:onNewNotifications"]}),state:r.NotificationServicesController,env:{isPushIntegrated:Ae.isManifestV3,featureAnnouncements:{platform:"extension",spaceId:"",accessToken:""}}}),this.accountTrackerController=new Ve.default({state:{accounts:{}},messenger:this.controllerMessenger.getRestricted({name:"AccountTrackerController",allowedActions:["AccountsController:getSelectedAccount","NetworkController:getState","NetworkController:getNetworkClientById","OnboardingController:getState","PreferencesController:getState"],allowedEvents:["AccountsController:selectedEvmAccountChange","OnboardingController:stateChange","KeyringController:accountRemoved"]}),provider:this.provider,blockTracker:this.blockTracker,getNetworkIdentifier:e=>{const{type:t,rpcUrl:n}=e??(0,Ie.getProviderConfig)({metamask:this.networkController.state});return t===le.NETWORK_TYPES.RPC?n:t}}),this.on("controllerConnectionChanged",(e=>{const{completedOnboarding:t}=this.onboardingController.state;e>0&&t?this.triggerNetworkrequests():this.stopNetworkRequests()})),this.controllerMessenger.subscribe(`${this.onboardingController.name}:stateChange`,(0,pt.previousValueComparator)((async(e,t)=>{const{completedOnboarding:n}=e,{completedOnboarding:r}=t;if(!n&&r){const{address:e}=this.accountsController.getSelectedAccount();await this._addAccountsWithBalance(),this.postOnboardingInitialization(),this.triggerNetworkrequests(),await this.tokenDetectionController.detectTokens({selectedAddress:e})}}),this.onboardingController.state));const Qe=this.controllerMessenger.getRestricted({name:"TokenDetectionController",allowedActions:["AccountsController:getAccount","AccountsController:getSelectedAccount","KeyringController:getState","NetworkController:getNetworkClientById","NetworkController:getNetworkConfigurationByNetworkClientId","NetworkController:getState","PreferencesController:getState","TokenListController:getState","TokensController:getState","TokensController:addDetectedTokens"],allowedEvents:["AccountsController:selectedEvmAccountChange","KeyringController:lock","KeyringController:unlock","NetworkController:networkDidChange","PreferencesController:stateChange","TokenListController:stateChange"]});this.tokenDetectionController=new o.TokenDetectionController({messenger:Qe,getBalancesInSingleCall:this.assetsContractController.getBalancesInSingleCall.bind(this.assetsContractController),trackMetaMetricsEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController),useAccountsAPI:!0,platform:"extension"});const Xe=this.controllerMessenger.getRestricted({name:"AddressBookController",allowedActions:[],allowedEvents:[]});this.addressBookController=new M.AddressBookController({messenger:Xe,state:r.AddressBookController}),this.alertController=new ot.AlertController({state:r.AlertController,messenger:this.controllerMessenger.getRestricted({name:"AlertController",allowedEvents:["AccountsController:selectedAccountChange"],allowedActions:["AccountsController:getSelectedAccount"]})}),this.backup=new it.default({preferencesController:this.preferencesController,addressBookController:this.addressBookController,accountsController:this.accountsController,networkController:this.networkController,trackMetaMetricsEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController)}),this.snapAndHardwareMetricsParams={getSelectedAccount:this.accountsController.getSelectedAccount.bind(this.accountsController),getAccountType:this.getAccountType.bind(this),getDeviceModel:this.getDeviceModel.bind(this),snapAndHardwareMessenger:this.controllerMessenger.getRestricted({name:"SnapAndHardwareMessenger",allowedActions:["KeyringController:getKeyringForAccount","SnapController:get","AccountsController:getSelectedAccount"]})};const tt=this.controllerMessenger.getRestricted({name:"TransactionController",allowedActions:[`${this.approvalController.name}:addRequest`,"NetworkController:findNetworkClientIdByChainId","NetworkController:getNetworkClientById","AccountsController:getSelectedAccount"],allowedEvents:["NetworkController:stateChange"]});this.txController=new X.TransactionController({blockTracker:this.blockTracker,getCurrentNetworkEIP1559Compatibility:this.networkController.getEIP1559Compatibility.bind(this.networkController),getCurrentAccountEIP1559Compatibility:this.getCurrentAccountEIP1559Compatibility.bind(this),getExternalPendingTransactions:this.getExternalPendingTransactions.bind(this),getGasFeeEstimates:this.gasFeeController.fetchGasFeeEstimates.bind(this.gasFeeController),getNetworkClientRegistry:this.networkController.getNetworkClientRegistry.bind(this.networkController),getNetworkState:()=>this.networkController.state,getPermittedAccounts:this.getPermittedAccounts.bind(this),getSavedGasFees:()=>this.preferencesController.state.advancedGasFee[(0,Ie.getCurrentChainId)({metamask:this.networkController.state})],incomingTransactions:{etherscanApiKeysByChainId:{[le.CHAIN_IDS.MAINNET]:"",[le.CHAIN_IDS.SEPOLIA]:""},includeTokenTransfers:!1,isEnabled:()=>{var e;return Boolean((null===(e=this.preferencesController.state.incomingTransactionsPreferences)||void 0===e?void 0:e[(0,Ie.getCurrentChainId)({metamask:this.networkController.state})])&&this.onboardingController.state.completedOnboarding)},queryEntireHistory:!1,updateTransactions:!1},isFirstTimeInteractionEnabled:()=>this.preferencesController.state.securityAlertsEnabled,isMultichainEnabled:"",isSimulationEnabled:()=>this.preferencesController.state.useTransactionSimulations,messenger:tt,onNetworkStateChange:e=>{i.subscribe("NetworkController:networkDidChange",(()=>e()))},pendingTransactions:{isResubmitEnabled:()=>{const e=this._getMetaMaskState();return!((0,Ee.getSmartTransactionsPreferenceEnabled)(e)&&(0,Ee.getCurrentChainSupportsSmartTransactions)(e))}},provider:this.provider,testGasFeeFlows:!1,trace:Ne.trace,hooks:{publish:this._publishSmartTransactionHook.bind(this)},sign:(...e)=>this.keyringController.signTransaction(...e),state:r.TransactionController}),this._addTransactionControllerListeners(),this.decryptMessageController=new lt.default({getState:this.getState.bind(this),messenger:this.controllerMessenger.getRestricted({name:"DecryptMessageController",allowedActions:[`${this.approvalController.name}:addRequest`,`${this.approvalController.name}:acceptRequest`,`${this.approvalController.name}:rejectRequest`,`${this.keyringController.name}:decryptMessage`]}),metricsEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController)}),this.encryptionPublicKeyController=new ft.default({messenger:this.controllerMessenger.getRestricted({name:"EncryptionPublicKeyController",allowedActions:[`${this.approvalController.name}:addRequest`,`${this.approvalController.name}:acceptRequest`,`${this.approvalController.name}:rejectRequest`]}),getEncryptionPublicKey:this.keyringController.getEncryptionPublicKey.bind(this.keyringController),getAccountKeyringType:this.keyringController.getAccountKeyringType.bind(this.keyringController),getState:this.getState.bind(this),metricsEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController)}),this.signatureController=new V.SignatureController({messenger:this.controllerMessenger.getRestricted({name:"SignatureController",allowedActions:[`${this.approvalController.name}:addRequest`,`${this.keyringController.name}:signMessage`,`${this.keyringController.name}:signPersonalMessage`,`${this.keyringController.name}:signTypedMessage`,`${this.loggingController.name}:add`,`${this.networkController.name}:getNetworkClientById`]}),trace:Ne.trace,decodingApiUrl:"https://signature-insights.api.cx.metamask.io/v1",isDecodeSignatureRequestEnabled:()=>!0===this.preferencesController.state.useExternalServices&&this.preferencesController.state.useTransactionSimulations}),this.signatureController.hub.on("cancelWithReason",(({message:e,reason:t})=>{this.metaMetricsController.trackEvent({event:t,category:fe.MetaMetricsEventCategory.Transactions,properties:{action:"Sign Request",type:e.type}})}));const nt=this.controllerMessenger.getRestricted({name:"SwapsController",allowedActions:["NetworkController:getState","NetworkController:getNetworkClientById","TokenRatesController:getState"],allowedEvents:[]});this.swapsController=new ct.default({messenger:nt,getBufferedGasLimit:async(e,t)=>{const{gas:n,simulationFails:r}=await this.txController.estimateGasBuffered(e.txParams,t);return{gasLimit:n,simulationFails:r}},getEIP1559GasFeeEstimates:this.gasFeeController.fetchGasFeeEstimates.bind(this.gasFeeController),getLayer1GasFee:this.txController.getLayer1GasFee.bind(this.txController),trackMetaMetricsEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController)},r.SwapsController);const ht=this.controllerMessenger.getRestricted({name:$t.BRIDGE_CONTROLLER_NAME,allowedActions:["AccountsController:getSelectedAccount","NetworkController:getSelectedNetworkClient","NetworkController:findNetworkClientIdByChainId"],allowedEvents:[]});this.bridgeController=new Lt.default({messenger:ht,getLayer1GasFee:this.txController.getLayer1GasFee.bind(this.txController)});const bt=this.controllerMessenger.getRestricted({name:Wt.BRIDGE_STATUS_CONTROLLER_NAME,allowedActions:["AccountsController:getSelectedAccount","NetworkController:getNetworkClientById","NetworkController:findNetworkClientIdByChainId","NetworkController:getState"],allowedEvents:[]});this.bridgeStatusController=new Vt.default({messenger:bt,state:r.BridgeStatusController});const St=this.controllerMessenger.getRestricted({name:"SmartTransactionsController",allowedActions:["NetworkController:getNetworkClientById"],allowedEvents:["NetworkController:stateChange"]});this.smartTransactionsController=new j.default({supportedChainIds:(0,ce.getAllowedSmartTransactionsChainIds)(),clientId:D.ClientId.Extension,getNonceLock:this.txController.getNonceLock.bind(this.txController),confirmExternalTransaction:this.txController.confirmExternalTransaction.bind(this.txController),trackMetaMetricsEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController),state:r.SmartTransactionsController,messenger:St,getTransactions:this.txController.getTransactions.bind(this.txController),updateTransaction:this.txController.updateTransaction.bind(this.txController),getFeatureFlags:()=>{const e=this._getMetaMaskState();return(0,Ee.getFeatureFlagsByChainId)(e)},getMetaMetricsProps:async()=>{const e=this.accountsController.getSelectedAccount().address;return{accountHardwareType:await(0,Ee.getHardwareWalletType)(this._getMetaMaskState()),accountType:await this.getAccountType(e),deviceModel:await this.getDeviceModel(e)}}});const Ot=()=>this.preferencesController.state.useExternalNameSources;this.nameController=new J.NameController({messenger:this.controllerMessenger.getRestricted({name:"NameController",allowedActions:[]}),providers:[new J.ENSNameProvider({reverseLookup:this.ensController.reverseResolveAddress.bind(this.ensController)}),new J.EtherscanNameProvider({isEnabled:Ot}),new J.TokenNameProvider({isEnabled:Ot}),new J.LensNameProvider({isEnabled:Ot}),new Fe.SnapsNameProvider({messenger:this.controllerMessenger.getRestricted({name:"SnapsNameProvider",allowedActions:["SnapController:getAll","SnapController:get","SnapController:handleRequest","PermissionController:getState"]})})],state:r.NameController});const xt=this.controllerMessenger.getRestricted({name:"PetnamesBridge",allowedEvents:["NameController:stateChange","AccountsController:stateChange","AddressBookController:stateChange"],allowedActions:["AccountsController:listAccounts"]});new Le.AddressBookPetnamesBridge({addressBookController:this.addressBookController,nameController:this.nameController,messenger:xt}).init(),new $e.AccountIdentitiesPetnamesBridge({nameController:this.nameController,messenger:xt}).init(),this.userOperationController=new Q.UserOperationController({entrypoint:null,getGasFeeEstimates:this.gasFeeController.fetchGasFeeEstimates.bind(this.gasFeeController),messenger:this.controllerMessenger.getRestricted({name:"UserOperationController",allowedActions:["ApprovalController:addRequest","NetworkController:getNetworkClientById","KeyringController:prepareUserOperation","KeyringController:patchUserOperation","KeyringController:signUserOperation"]}),state:r.UserOperationController}),this.userOperationController.hub.on("user-operation-added",this._onUserOperationAdded.bind(this)),this.userOperationController.hub.on("transaction-updated",this._onUserOperationTransactionUpdated.bind(this)),i.subscribe("NetworkController:networkDidChange",(()=>{this.accountTrackerController.updateAccounts()})),i.subscribe("NetworkController:networkWillChange",a.bind(this)),this.metamaskMiddleware=(0,mt.default)({static:{eth_syncing:!1,web3_clientVersion:`MetaMask/v${s}`},version:s,getAccounts:async({origin:e},{suppressUnauthorizedError:t=!0}={})=>{if(e===ge.ORIGIN_METAMASK){const e=this.accountsController.getSelectedAccount().address;return e?[e]:[]}return this.isUnlocked()?await this.getPermittedAccounts(e,{suppressUnauthorizedError:t}):[]},processTransaction:(e,t)=>(0,Pt.addDappTransaction)(this.getAddTransactionRequest({transactionParams:e,dappRequest:t})),processTypedMessage:(...e)=>(0,_t.addTypedMessage)({signatureController:this.signatureController,signatureParams:e}),processTypedMessageV3:(...e)=>(0,_t.addTypedMessage)({signatureController:this.signatureController,signatureParams:e}),processTypedMessageV4:(...e)=>(0,_t.addTypedMessage)({signatureController:this.signatureController,signatureParams:e}),processPersonalMessage:(...e)=>(0,_t.addPersonalMessage)({signatureController:this.signatureController,signatureParams:e}),processEncryptionPublicKey:this.encryptionPublicKeyController.newRequestEncryptionPublicKey.bind(this.encryptionPublicKeyController),processDecryptMessage:this.decryptMessageController.newRequestDecryptMessage.bind(this.decryptMessageController),getPendingNonce:this.getPendingNonce.bind(this),getPendingTransactionByHash:e=>this.txController.state.transactions.find((t=>t.hash===e&&t.status===X.TransactionStatus.submitted))}),this.on("update",(e=>this._onStateUpdate(e)));const Bt={AccountTracker:this.accountTrackerController,TokenRatesController:this.tokenRatesController,DecryptMessageController:this.decryptMessageController,EncryptionPublicKeyController:this.encryptionPublicKeyController,SignatureController:this.signatureController,SwapsController:this.swapsController,BridgeController:this.bridgeController,BridgeStatusController:this.bridgeStatusController,EnsController:this.ensController,ApprovalController:this.approvalController,PPOMController:this.ppomController};this.store.updateStructure({AccountsController:this.accountsController,AppStateController:this.appStateController.store,AppMetadataController:this.appMetadataController,MultichainBalancesController:this.multichainBalancesController,TransactionController:this.txController,KeyringController:this.keyringController,PreferencesController:this.preferencesController,MetaMetricsController:this.metaMetricsController,MetaMetricsDataDeletionController:this.metaMetricsDataDeletionController,AddressBookController:this.addressBookController,CurrencyController:this.currencyRateController,NetworkController:this.networkController,AlertController:this.alertController,OnboardingController:this.onboardingController,PermissionController:this.permissionController,PermissionLogController:this.permissionLogController,SubjectMetadataController:this.subjectMetadataController,AnnouncementController:this.announcementController,NetworkOrderController:this.networkOrderController,AccountOrderController:this.accountOrderController,GasFeeController:this.gasFeeController,TokenListController:this.tokenListController,TokensController:this.tokensController,TokenBalancesController:this.tokenBalancesController,SmartTransactionsController:this.smartTransactionsController,NftController:this.nftController,PhishingController:this.phishingController,SelectedNetworkController:this.selectedNetworkController,LoggingController:this.loggingController,MultichainRatesController:this.multichainRatesController,SnapController:this.snapController,CronjobController:this.cronjobController,SnapsRegistry:this.snapsRegistry,SnapInterfaceController:this.snapInterfaceController,SnapInsightsController:this.snapInsightsController,PPOMController:this.ppomController,NameController:this.nameController,UserOperationController:this.userOperationController,AuthenticationController:this.authenticationController,UserStorageController:this.userStorageController,NotificationServicesController:this.notificationServicesController,NotificationServicesPushController:this.notificationServicesPushController,...Bt}),this.memStore=new Ke.default({config:{AccountsController:this.accountsController,AppStateController:this.appStateController.store,AppMetadataController:this.appMetadataController,MultichainBalancesController:this.multichainBalancesController,NetworkController:this.networkController,KeyringController:this.keyringController,PreferencesController:this.preferencesController,MetaMetricsController:this.metaMetricsController,MetaMetricsDataDeletionController:this.metaMetricsDataDeletionController,AddressBookController:this.addressBookController,CurrencyController:this.currencyRateController,AlertController:this.alertController,OnboardingController:this.onboardingController,PermissionController:this.permissionController,PermissionLogController:this.permissionLogController,SubjectMetadataController:this.subjectMetadataController,AnnouncementController:this.announcementController,NetworkOrderController:this.networkOrderController,AccountOrderController:this.accountOrderController,GasFeeController:this.gasFeeController,TokenListController:this.tokenListController,TokensController:this.tokensController,TokenBalancesController:this.tokenBalancesController,SmartTransactionsController:this.smartTransactionsController,NftController:this.nftController,SelectedNetworkController:this.selectedNetworkController,LoggingController:this.loggingController,TxController:this.txController,MultichainRatesController:this.multichainRatesController,SnapController:this.snapController,CronjobController:this.cronjobController,SnapsRegistry:this.snapsRegistry,SnapInterfaceController:this.snapInterfaceController,SnapInsightsController:this.snapInsightsController,NameController:this.nameController,UserOperationController:this.userOperationController,AuthenticationController:this.authenticationController,UserStorageController:this.userStorageController,NotificationServicesController:this.notificationServicesController,QueuedRequestController:this.queuedRequestController,NotificationServicesPushController:this.notificationServicesPushController,...Bt},controllerMessenger:this.controllerMessenger});const jt=[this.accountTrackerController.resetState.bind(this.accountTrackerController),this.decryptMessageController.resetState.bind(this.decryptMessageController),this.encryptionPublicKeyController.resetState.bind(this.encryptionPublicKeyController),this.signatureController.resetState.bind(this.signatureController),this.swapsController.resetState.bind(this.swapsController),this.bridgeController.resetState.bind(this.bridgeController),this.ensController.resetState.bind(this.ensController),this.approvalController.clear.bind(this.approvalController)];Ae.isManifestV3?!0===n&&(this.resetStates(jt),this.extension.storage.session.set({isFirstMetaMaskControllerSetup:!1})):this.resetStates(jt);!this.isUnlocked()&&this.onboardingController.state.completedOnboarding,console.log("in app/scripts/metamask-controller.js unlocked in constructor so starting"),this._startUISync(),this.extension.runtime.getPlatformInfo().then((({os:e})=>{this.appStateController.setBrowserEnvironment(e,this.extension.runtime.getBrowserInfo===undefined?"chrome":"firefox")})),this.setupControllerEventSubscriptions(),this.setupMultichainDataAndSubscriptions(),this.publicConfigStore=this.createPublicConfigStore(),this.extension.runtime.onMessageExternal.addListener(Ge.onMessageReceived),(0,Ge.checkForMultipleVersionsRunning)(),this.onboardingController.state.completedOnboarding&&this.postOnboardingInitialization()}getInfuraFeatureFlags(){(0,xe.default)({url:"https://swap.api.cx.metamask.io/featureFlags",cacheRefreshTime:20*me.MINUTE}).then(this.onFeatureFlagResponseReceived).catch((e=>{C.default.warn("Feature flag endpoint is unreachable",e)}))}onFeatureFlagResponseReceived(e){const{multiChainAssets:t={}}=e,{pollInterval:n}=t;n>0&&this.tokenBalancesController.setIntervalLength(n*me.SECOND)}postOnboardingInitialization(){const{usePhishDetect:e}=this.preferencesController.state;this.networkController.lookupNetwork(),e&&this.phishingController.maybeUpdateState();const t=this.preferencesController.state,{useTokenDetection:n,useNftDetection:r}=t??{};this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.Onboarding,event:fe.MetaMetricsUserTrait.TokenDetectionEnabled,properties:{[fe.MetaMetricsUserTrait.TokenDetectionEnabled]:n}}),this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.Onboarding,event:fe.MetaMetricsUserTrait.NftAutodetectionEnabled,properties:{[fe.MetaMetricsUserTrait.NftAutodetectionEnabled]:r}})}triggerNetworkrequests(){this.txController.startIncomingTransactionPolling(),this.tokenDetectionController.enable(),this.getInfuraFeatureFlags()}stopNetworkRequests(){this.txController.stopIncomingTransactionPolling(),this.tokenDetectionController.disable()}resetStates(e){e.forEach((e=>{try{e()}catch(e){console.error(e)}}))}async getSnapKeyring(){let[e]=this.keyringController.getKeyringsByType(ue.KeyringType.snap);return e||(e=await this.keyringController.addNewKeyring(ue.KeyringType.snap)),e}trackInsightSnapView(e){this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.InsightSnapViewed,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:e}})}_getSnapMetadata(e){var t;return null===(t=this.snapsRegistry.state.database)||void 0===t||null===(t=t.verifiedSnaps)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.metadata}async handleSnapRequest(e){try{const t=await this.controllerMessenger.call("SnapController:handleRequest",e);return this._trackSnapExportUsage(e.snapId,e.handler,!0,e.origin),t}catch(t){throw this._trackSnapExportUsage(e.snapId,e.handler,!1,e.origin),t}}getLocale(){const{currentLocale:e}=this.preferencesController.state;return e}getSnapPermissionSpecifications(){return{...(0,q.buildSnapEndowmentSpecifications)(Object.keys(he.ExcludedSnapEndowments)),...(0,q.buildSnapRestrictedMethodSpecifications)(Object.keys(he.ExcludedSnapPermissions),{getPreferences:()=>({locale:this.getLocale(),currency:this.currencyRateController.state.currentCurrency}),clearSnapState:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:clearSnapState"),getMnemonic:this.getPrimaryKeyringMnemonic.bind(this),getUnlockPromise:this.appStateController.getUnlockPromise.bind(this.appStateController),getSnap:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:get"),handleSnapRpcRequest:this.handleSnapRequest.bind(this),getSnapState:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:getSnapState"),requestUserApproval:this.approvalController.addAndShowApprovalRequest.bind(this.approvalController),showNativeNotification:(e,t)=>this.controllerMessenger.call("RateLimitController:call",e,"showNativeNotification",e,t.message),showInAppNotification:(e,t)=>this.controllerMessenger.call("RateLimitController:call",e,"showInAppNotification",e,t),updateSnapState:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:updateSnapState"),maybeUpdatePhishingList:()=>{const{usePhishDetect:e}=this.preferencesController.state;e&&this.controllerMessenger.call("PhishingController:maybeUpdateState")},isOnPhishingList:e=>{const{usePhishDetect:t}=this.preferencesController.state;return!!t&&this.controllerMessenger.call("PhishingController:testOrigin",e).result},createInterface:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:createInterface"),getInterface:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:getInterface"),getSnapKeyring:this.getSnapKeyring.bind(this)})}}setupControllerEventSubscriptions(){let e;this.controllerMessenger.subscribe("PreferencesController:stateChange",(0,pt.previousValueComparator)((async(e,t)=>{var n;const{currentLocale:r}=t,s=(0,Ie.getCurrentChainId)({metamask:this.networkController.state});await(0,St.updateCurrentLocale)(r),null!==(n=t.incomingTransactionsPreferences)&&void 0!==n&&n[s]?this.txController.startIncomingTransactionPolling():this.txController.stopIncomingTransactionPolling(),Xt(tn,this,rn).call(this,t,e)}),this.preferencesController.state)),this.controllerMessenger.subscribe(`${this.accountsController.name}:selectedAccountChange`,(async t=>{t.address&&t.address!==e&&(e=t.address,await this._onAccountChange(t.address))})),this.controllerMessenger.subscribe(`${this.permissionController.name}:stateChange`,(async(e,t)=>{const n=(0,yt.diffMap)(e,t);for(const[e,t]of n.entries())this._notifyAccountsChange(e,t)}),yt.getPermittedAccountsByOrigin),this.controllerMessenger.subscribe(`${this.permissionController.name}:stateChange`,(async(e,t)=>{const n=(0,yt.diffMap)(e,t);for(const[e,t]of n.entries()){const n=this.selectedNetworkController.getNetworkClientIdForDomain(e),{chainId:r}=this.networkController.getNetworkConfigurationByNetworkClientId(n);if(t.length>0&&!t.includes(r)){const n=this.networkController.findNetworkClientIdByChainId(t[0]);this.selectedNetworkController.setNetworkClientIdForDomain(e,n),this.networkController.setActiveNetwork(n)}}}),yt.getPermittedChainsByOrigin),this.controllerMessenger.subscribe("NetworkController:networkDidChange",(async()=>{await this.txController.updateIncomingTransactions()})),this.controllerMessenger.subscribe(`${this.snapController.name}:snapInstallStarted`,((e,t,n)=>{var r;const s=null===(r=this._getSnapMetadata(e))||void 0===r?void 0:r.category;this.metaMetricsController.trackEvent({event:n?fe.MetaMetricsEventName.SnapUpdateStarted:fe.MetaMetricsEventName.SnapInstallStarted,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:e,origin:t,snap_category:s}})})),this.controllerMessenger.subscribe(`${this.snapController.name}:snapInstallFailed`,((e,t,n,r)=>{var s;const o=r.includes("User rejected the request."),a=n?fe.MetaMetricsEventName.SnapUpdateFailed:fe.MetaMetricsEventName.SnapInstallFailed,i=n?fe.MetaMetricsEventName.SnapUpdateRejected:fe.MetaMetricsEventName.SnapInstallRejected,l=null===(s=this._getSnapMetadata(e))||void 0===s?void 0:s.category;this.metaMetricsController.trackEvent({event:o?i:a,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:e,origin:t,snap_category:l}})})),this.controllerMessenger.subscribe(`${this.snapController.name}:snapInstalled`,((e,t,n)=>{var r;if(n)return;const s=e.id,o=null===(r=this._getSnapMetadata(s))||void 0===r?void 0:r.category;this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.SnapInstalled,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:s,version:e.version,origin:t,snap_category:o}})})),this.controllerMessenger.subscribe(`${this.snapController.name}:snapUpdated`,((e,t,n,r)=>{var s;if(r)return;const o=e.id,a=null===(s=this._getSnapMetadata(o))||void 0===s?void 0:s.category;this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.SnapUpdated,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:o,old_version:t,new_version:e.version,origin:n,snap_category:a}})})),this.controllerMessenger.subscribe(`${this.snapController.name}:snapTerminated`,(e=>{const t=Object.values(this.approvalController.state.pendingApprovals).filter((t=>t.origin===e.id&&t.type.startsWith(he.RestrictedMethods.snap_dialog)));for(const e of t)this.approvalController.reject(e.id,new Error("Snap was terminated."))})),this.controllerMessenger.subscribe(`${this.snapController.name}:snapUninstalled`,(e=>{var t;const n=this.notificationServicesController.getNotificationsByType(Zt.SNAP).filter((t=>t.data.origin===e.id)).map((e=>e.id));this.notificationServicesController.deleteNotificationsById(n);const r=e.id,s=null===(t=this._getSnapMetadata(r))||void 0===t?void 0:t.category;this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.SnapUninstalled,category:fe.MetaMetricsEventCategory.Snaps,properties:{snap_id:r,version:e.version,snap_category:s}})}))}setupMultichainDataAndSubscriptions(){(0,ne.isEvmAccountType)(this.accountsController.getSelectedMultichainAccount().type)||this.multichainRatesController.start(),this.controllerMessenger.subscribe("AccountsController:selectedAccountChange",(e=>{(0,ne.isEvmAccountType)(e.type)?this.multichainRatesController.stop():this.multichainRatesController.start()})),this.multichainBalancesController.start(),this.multichainBalancesController.updateBalances()}createPublicConfigStore(){const e=new l.ObservableStore,t=async({isUnlocked:e})=>{const{chainId:t,networkVersion:n}=await this.getProviderNetworkState();return{isUnlocked:e,chainId:t,networkVersion:n??"loading"}},n=async n=>{var r;(null===(r=n.networksMetadata[n.selectedNetworkClientId])||void 0===r?void 0:r.status)===le.NetworkStatus.Available&&e.putState(await t(n))};return this.on("update",n),n(this.getState()),e}async getProviderState(e){const t=await this.getProviderNetworkState(this.preferencesController.getUseRequestQueue()?e:undefined);return{isUnlocked:this.isUnlocked(),accounts:await this.getPermittedAccounts(e),...t}}async getProviderNetworkState(e=U.METAMASK_DOMAIN){const t=this.controllerMessenger.call("SelectedNetworkController:getNetworkClientIdForDomain",e),n=this.controllerMessenger.call("NetworkController:getNetworkClientById",t),{chainId:r}=n.configuration,{completedOnboarding:s}=this.onboardingController.state;let o=this.deprecatedNetworkVersions[t];if(o===undefined&&s){const e=new S.default(n.provider);o=await new Promise((t=>{e.sendAsync({method:"net_version"},((e,n)=>{e?(console.error(e),t(null)):t((0,Te.convertNetworkId)(n))}))})),this.deprecatedNetworkVersions[t]=o}return{chainId:r,networkVersion:o??"loading"}}getState(){const{vault:e}=this.keyringController.state,t=Boolean(e),n=this.memStore.getFlatState();return{isInitialized:t,...(0,Kt.sanitizeUIState)(n)}}getApi(){const{accountsController:e,addressBookController:t,alertController:n,appStateController:r,keyringController:s,nftController:o,nftDetectionController:a,currencyRateController:i,tokenBalancesController:l,tokenDetectionController:c,ensController:d,tokenListController:u,gasFeeController:h,metaMetricsController:p,networkController:m,announcementController:g,onboardingController:f,permissionController:C,preferencesController:y,tokensController:w,smartTransactionsController:v,txController:b,assetsContractController:k,backup:A,approvalController:T,phishingController:E,tokenRatesController:M,accountTrackerController:P,authenticationController:_,userStorageController:I,notificationServicesController:N,notificationServicesPushController:R}=this;return{getState:this.getState.bind(this),setCurrentCurrency:i.setCurrentCurrency.bind(i),setUseBlockie:y.setUseBlockie.bind(y),setUseNonceField:y.setUseNonceField.bind(y),setUsePhishDetect:y.setUsePhishDetect.bind(y),setUseMultiAccountBalanceChecker:y.setUseMultiAccountBalanceChecker.bind(y),setUseSafeChainsListValidation:y.setUseSafeChainsListValidation.bind(y),setUseTokenDetection:y.setUseTokenDetection.bind(y),setUseNftDetection:y.setUseNftDetection.bind(y),setUse4ByteResolution:y.setUse4ByteResolution.bind(y),setUseCurrencyRateCheck:y.setUseCurrencyRateCheck.bind(y),setOpenSeaEnabled:y.setOpenSeaEnabled.bind(y),getUseRequestQueue:this.preferencesController.getUseRequestQueue.bind(this.preferencesController),getProviderConfig:()=>(0,Ie.getProviderConfig)({metamask:this.networkController.state}),grantPermissionsIncremental:this.permissionController.grantPermissionsIncremental.bind(this.permissionController),grantPermissions:this.permissionController.grantPermissions.bind(this.permissionController),setSecurityAlertsEnabled:y.setSecurityAlertsEnabled.bind(y),setAddSnapAccountEnabled:y.setAddSnapAccountEnabled.bind(y),setBitcoinSupportEnabled:y.setBitcoinSupportEnabled.bind(y),setBitcoinTestnetSupportEnabled:y.setBitcoinTestnetSupportEnabled.bind(y),setUseExternalNameSources:y.setUseExternalNameSources.bind(y),setUseTransactionSimulations:y.setUseTransactionSimulations.bind(y),setUseRequestQueue:this.setUseRequestQueue.bind(this),setIpfsGateway:y.setIpfsGateway.bind(y),setIsIpfsGatewayEnabled:y.setIsIpfsGatewayEnabled.bind(y),setUseAddressBarEnsResolution:y.setUseAddressBarEnsResolution.bind(y),setParticipateInMetaMetrics:p.setParticipateInMetaMetrics.bind(p),setDataCollectionForMarketing:p.setDataCollectionForMarketing.bind(p),setMarketingCampaignCookieId:p.setMarketingCampaignCookieId.bind(p),setCurrentLocale:y.setCurrentLocale.bind(y),setIncomingTransactionsPreferences:y.setIncomingTransactionsPreferences.bind(y),setServiceWorkerKeepAlivePreference:y.setServiceWorkerKeepAlivePreference.bind(y),markPasswordForgotten:this.markPasswordForgotten.bind(this),unMarkPasswordForgotten:this.unMarkPasswordForgotten.bind(this),getRequestAccountTabIds:this.getRequestAccountTabIds,getOpenMetamaskTabsIds:this.getOpenMetamaskTabsIds,markNotificationPopupAsAutomaticallyClosed:()=>this.notificationManager.markAsAutomaticallyClosed(),requestUserApproval:T.addAndShowApprovalRequest.bind(T),addNewAccount:this.addNewAccount.bind(this),getSeedPhrase:this.getSeedPhrase.bind(this),resetAccount:this.resetAccount.bind(this),removeAccount:this.removeAccount.bind(this),importAccountWithStrategy:this.importAccountWithStrategy.bind(this),getNextAvailableAccountName:e.getNextAvailableAccountName.bind(e),getAccountsBySnapId:e=>(0,Et.getAccountsBySnapId)(this,e),connectHardware:this.connectHardware.bind(this),forgetDevice:this.forgetDevice.bind(this),checkHardwareStatus:this.checkHardwareStatus.bind(this),getDeviceNameForMetric:this.getDeviceNameForMetric.bind(this),unlockHardwareWalletAccount:this.unlockHardwareWalletAccount.bind(this),attemptLedgerTransportCreation:this.attemptLedgerTransportCreation.bind(this),submitQRHardwareCryptoHDKey:s.submitQRCryptoHDKey.bind(s),submitQRHardwareCryptoAccount:s.submitQRCryptoAccount.bind(s),cancelSyncQRHardware:s.cancelQRSynchronization.bind(s),submitQRHardwareSignature:s.submitQRSignature.bind(s),cancelQRHardwareSignRequest:s.cancelQRSignRequest.bind(s),submitPassword:this.submitPassword.bind(this),verifyPassword:this.verifyPassword.bind(this),setActiveNetwork:e=>this.networkController.setActiveNetwork(e),setActiveNetworkConfigurationId:e=>{this.networkController.setActiveNetwork(e)},setNetworkClientIdForDomain:(e,t)=>this.selectedNetworkController.setNetworkClientIdForDomain(e,t),rollbackToPreviousProvider:m.rollbackToPreviousProvider.bind(m),addNetwork:this.networkController.addNetwork.bind(this.networkController),updateNetwork:this.networkController.updateNetwork.bind(this.networkController),removeNetwork:this.networkController.removeNetwork.bind(this.networkController),getCurrentNetworkEIP1559Compatibility:this.networkController.getEIP1559Compatibility.bind(this.networkController),getNetworkConfigurationByNetworkClientId:this.networkController.getNetworkConfigurationByNetworkClientId.bind(this.networkController),setSelectedAddress:e=>{const t=this.accountsController.getAccountByAddress(e);if(!t)throw new Error(`No account found for address: ${e}`);this.accountsController.setSelectedAccount(t.id)},toggleExternalServices:this.toggleExternalServices.bind(this),addToken:w.addToken.bind(w),updateTokenType:w.updateTokenType.bind(w),setFeatureFlag:y.setFeatureFlag.bind(y),setPreference:y.setPreference.bind(y),addKnownMethodData:y.addKnownMethodData.bind(y),setDismissSeedBackUpReminder:y.setDismissSeedBackUpReminder.bind(y),setOverrideContentSecurityPolicyHeader:y.setOverrideContentSecurityPolicyHeader.bind(y),setAdvancedGasFee:y.setAdvancedGasFee.bind(y),setTheme:y.setTheme.bind(y),setSnapsAddSnapAccountModalDismissed:y.setSnapsAddSnapAccountModalDismissed.bind(y),setSelectedInternalAccount:e=>{this.accountsController.getAccount(e)&&this.accountsController.setSelectedAccount(e)},setAccountName:e.setAccountName.bind(e),setAccountLabel:(e,t)=>{const n=this.accountsController.getAccountByAddress(e);if(n===undefined)throw new Error(`No account found for address: ${e}`);this.accountsController.setAccountName(n.id,t)},getTokenStandardAndDetails:this.getTokenStandardAndDetails.bind(this),getTokenSymbol:this.getTokenSymbol.bind(this),addNft:o.addNft.bind(o),addNftVerifyOwnership:o.addNftVerifyOwnership.bind(o),removeAndIgnoreNft:o.removeAndIgnoreNft.bind(o),removeNft:o.removeNft.bind(o),checkAndUpdateAllNftsOwnershipStatus:o.checkAndUpdateAllNftsOwnershipStatus.bind(o),checkAndUpdateSingleNftOwnershipStatus:o.checkAndUpdateSingleNftOwnershipStatus.bind(o),getNFTContractInfo:o.getNFTContractInfo.bind(o),isNftOwner:o.isNftOwner.bind(o),setAddressBook:t.set.bind(t),removeFromAddressBook:t.delete.bind(t),setLastActiveTime:r.setLastActiveTime.bind(r),setCurrentExtensionPopupId:r.setCurrentExtensionPopupId.bind(r),setDefaultHomeActiveTabName:r.setDefaultHomeActiveTabName.bind(r),setConnectedStatusPopoverHasBeenShown:r.setConnectedStatusPopoverHasBeenShown.bind(r),setRecoveryPhraseReminderHasBeenShown:r.setRecoveryPhraseReminderHasBeenShown.bind(r),setRecoveryPhraseReminderLastShown:r.setRecoveryPhraseReminderLastShown.bind(r),setTermsOfUseLastAgreed:r.setTermsOfUseLastAgreed.bind(r),setSurveyLinkLastClickedOrClosed:r.setSurveyLinkLastClickedOrClosed.bind(r),setOnboardingDate:r.setOnboardingDate.bind(r),setLastViewedUserSurvey:r.setLastViewedUserSurvey.bind(r),setNewPrivacyPolicyToastClickedOrClosed:r.setNewPrivacyPolicyToastClickedOrClosed.bind(r),setNewPrivacyPolicyToastShownDate:r.setNewPrivacyPolicyToastShownDate.bind(r),setSnapsInstallPrivacyWarningShownStatus:r.setSnapsInstallPrivacyWarningShownStatus.bind(r),setOutdatedBrowserWarningLastShown:r.setOutdatedBrowserWarningLastShown.bind(r),setShowTestnetMessageInDropdown:r.setShowTestnetMessageInDropdown.bind(r),setShowBetaHeader:r.setShowBetaHeader.bind(r),setShowPermissionsTour:r.setShowPermissionsTour.bind(r),setShowAccountBanner:r.setShowAccountBanner.bind(r),setShowNetworkBanner:r.setShowNetworkBanner.bind(r),updateNftDropDownState:r.updateNftDropDownState.bind(r),setFirstTimeUsedNetwork:r.setFirstTimeUsedNetwork.bind(r),setSwitchedNetworkDetails:r.setSwitchedNetworkDetails.bind(r),clearSwitchedNetworkDetails:r.clearSwitchedNetworkDetails.bind(r),setSwitchedNetworkNeverShowMessage:r.setSwitchedNetworkNeverShowMessage.bind(r),getLastInteractedConfirmationInfo:r.getLastInteractedConfirmationInfo.bind(r),setLastInteractedConfirmationInfo:r.setLastInteractedConfirmationInfo.bind(r),tryReverseResolveAddress:d.reverseResolveAddress.bind(d),setLocked:this.setLocked.bind(this),createNewVaultAndKeychain:this.createNewVaultAndKeychain.bind(this),createNewVaultAndRestore:this.createNewVaultAndRestore.bind(this),exportAccount:this.exportAccount.bind(this),updateTransaction:b.updateTransaction.bind(b),approveTransactionsWithSameNonce:b.approveTransactionsWithSameNonce.bind(b),createCancelTransaction:this.createCancelTransaction.bind(this),createSpeedUpTransaction:this.createSpeedUpTransaction.bind(this),estimateGas:this.estimateGas.bind(this),estimateGasFee:b.estimateGasFee.bind(b),getNextNonce:this.getNextNonce.bind(this),addTransaction:(e,t)=>(0,Pt.addTransaction)(this.getAddTransactionRequest({transactionParams:e,transactionOptions:t,waitForSubmit:!1})),addTransactionAndWaitForPublish:(e,t)=>(0,Pt.addTransaction)(this.getAddTransactionRequest({transactionParams:e,transactionOptions:t,waitForSubmit:!0})),createTransactionEventFragment:je.createTransactionEventFragmentWithTxId.bind(null,this.getTransactionMetricsRequest()),getTransactions:this.txController.getTransactions.bind(this.txController),updateEditableParams:this.txController.updateEditableParams.bind(this.txController),updateTransactionGasFees:b.updateTransactionGasFees.bind(b),updateTransactionSendFlowHistory:b.updateTransactionSendFlowHistory.bind(b),updatePreviousGasParams:b.updatePreviousGasParams.bind(b),abortTransactionSigning:b.abortTransactionSigning.bind(b),getLayer1GasFee:b.getLayer1GasFee.bind(b),decryptMessage:this.decryptMessageController.decryptMessage.bind(this.decryptMessageController),decryptMessageInline:this.decryptMessageController.decryptMessageInline.bind(this.decryptMessageController),cancelDecryptMessage:this.decryptMessageController.cancelDecryptMessage.bind(this.decryptMessageController),encryptionPublicKey:this.encryptionPublicKeyController.encryptionPublicKey.bind(this.encryptionPublicKeyController),cancelEncryptionPublicKey:this.encryptionPublicKeyController.cancelEncryptionPublicKey.bind(this.encryptionPublicKeyController),setSeedPhraseBackedUp:f.setSeedPhraseBackedUp.bind(f),completeOnboarding:f.completeOnboarding.bind(f),setFirstTimeFlowType:f.setFirstTimeFlowType.bind(f),setAlertEnabledness:n.setAlertEnabledness.bind(n),setUnconnectedAccountAlertShown:n.setUnconnectedAccountAlertShown.bind(n),setWeb3ShimUsageAlertDismissed:n.setWeb3ShimUsageAlertDismissed.bind(n),removePermissionsFor:this.removePermissionsFor,approvePermissionsRequest:this.acceptPermissionsRequest,rejectPermissionsRequest:this.rejectPermissionsRequest,...(0,yt.getPermissionBackgroundApiMethods)(C),disableSnap:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:disable"),enableSnap:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:enable"),updateSnap:(e,t)=>(this.controllerMessenger.call("SnapController:install",e,t),null),removeSnap:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:remove"),handleSnapRequest:this.handleSnapRequest.bind(this),revokeDynamicSnapPermissions:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:revokeDynamicPermissions"),disconnectOriginFromSnap:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:disconnectOrigin"),updateNetworksList:this.updateNetworksList.bind(this),updateAccountsList:this.updateAccountsList.bind(this),updateHiddenAccountsList:this.updateHiddenAccountsList.bind(this),getPhishingResult:async e=>(await E.maybeUpdateState(),E.test(e)),deleteInterface:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:deleteInterface"),updateInterfaceState:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:updateInterfaceState"),fetchAndSetQuotes:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:fetchAndSetQuotes"),setSelectedQuoteAggId:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSelectedQuoteAggId"),resetSwapsState:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:resetSwapsState"),setSwapsTokens:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsTokens"),clearSwapsQuotes:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:clearSwapsQuotes"),setApproveTxId:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setApproveTxId"),setTradeTxId:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setTradeTxId"),setSwapsTxGasPrice:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsTxGasPrice"),setSwapsTxGasLimit:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsTxGasLimit"),setSwapsTxMaxFeePerGas:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsTxMaxFeePerGas"),setSwapsTxMaxFeePriorityPerGas:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsTxMaxFeePriorityPerGas"),safeRefetchQuotes:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:safeRefetchQuotes"),stopPollingForQuotes:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:stopPollingForQuotes"),setBackgroundSwapRouteState:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setBackgroundSwapRouteState"),resetPostFetchState:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:resetPostFetchState"),setSwapsErrorKey:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsErrorKey"),setInitialGasEstimate:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setInitialGasEstimate"),setCustomApproveTxData:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setCustomApproveTxData"),setSwapsLiveness:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsLiveness"),setSwapsFeatureFlags:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsFeatureFlags"),setSwapsUserFeeLevel:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsUserFeeLevel"),setSwapsQuotesPollingLimitEnabled:this.controllerMessenger.call.bind(this.controllerMessenger,"SwapsController:setSwapsQuotesPollingLimitEnabled"),[Ft.BridgeBackgroundAction.SET_FEATURE_FLAGS]:this.controllerMessenger.call.bind(this.controllerMessenger,`${$t.BRIDGE_CONTROLLER_NAME}:${Ft.BridgeBackgroundAction.SET_FEATURE_FLAGS}`),[Ft.BridgeBackgroundAction.RESET_STATE]:this.controllerMessenger.call.bind(this.controllerMessenger,`${$t.BRIDGE_CONTROLLER_NAME}:${Ft.BridgeBackgroundAction.RESET_STATE}`),[Ft.BridgeBackgroundAction.GET_BRIDGE_ERC20_ALLOWANCE]:this.controllerMessenger.call.bind(this.controllerMessenger,`${$t.BRIDGE_CONTROLLER_NAME}:${Ft.BridgeBackgroundAction.GET_BRIDGE_ERC20_ALLOWANCE}`),[Ft.BridgeUserAction.SELECT_SRC_NETWORK]:this.controllerMessenger.call.bind(this.controllerMessenger,`${$t.BRIDGE_CONTROLLER_NAME}:${Ft.BridgeUserAction.SELECT_SRC_NETWORK}`),[Ft.BridgeUserAction.SELECT_DEST_NETWORK]:this.controllerMessenger.call.bind(this.controllerMessenger,`${$t.BRIDGE_CONTROLLER_NAME}:${Ft.BridgeUserAction.SELECT_DEST_NETWORK}`),[Ft.BridgeUserAction.UPDATE_QUOTE_PARAMS]:this.controllerMessenger.call.bind(this.controllerMessenger,`${$t.BRIDGE_CONTROLLER_NAME}:${Ft.BridgeUserAction.UPDATE_QUOTE_PARAMS}`),[Oe.BridgeStatusAction.START_POLLING_FOR_BRIDGE_TX_STATUS]:this.controllerMessenger.call.bind(this.controllerMessenger,`${Wt.BRIDGE_STATUS_CONTROLLER_NAME}:${Oe.BridgeStatusAction.START_POLLING_FOR_BRIDGE_TX_STATUS}`),fetchSmartTransactionFees:v.getFees.bind(v),clearSmartTransactionFees:v.clearFees.bind(v),submitSignedTransactions:v.submitSignedTransactions.bind(v),cancelSmartTransaction:v.cancelSmartTransaction.bind(v),fetchSmartTransactionsLiveness:v.fetchLiveness.bind(v),updateSmartTransaction:v.updateSmartTransaction.bind(v),setStatusRefreshInterval:v.setStatusRefreshInterval.bind(v),trackMetaMetricsEvent:p.trackEvent.bind(p),trackMetaMetricsPage:p.trackPage.bind(p),createEventFragment:p.createEventFragment.bind(p),updateEventFragment:p.updateEventFragment.bind(p),finalizeEventFragment:p.finalizeEventFragment.bind(p),trackInsightSnapView:this.trackInsightSnapView.bind(this),resolvePendingApproval:this.resolvePendingApproval,rejectPendingApproval:this.rejectPendingApproval,resetViewedNotifications:g.resetViewed.bind(g),updateViewedNotifications:g.updateViewed.bind(g),currencyRateStartPolling:i.startPolling.bind(i),currencyRateStopPollingByPollingToken:i.stopPollingByPollingToken.bind(i),tokenRatesStartPolling:M.startPolling.bind(M),tokenRatesStopPollingByPollingToken:M.stopPollingByPollingToken.bind(M),accountTrackerStartPolling:P.startPollingByNetworkClientId.bind(P),accountTrackerStopPollingByPollingToken:P.stopPollingByPollingToken.bind(P),tokenDetectionStartPolling:c.startPolling.bind(c),tokenDetectionStopPollingByPollingToken:c.stopPollingByPollingToken.bind(c),tokenListStartPolling:u.startPolling.bind(u),tokenListStopPollingByPollingToken:u.stopPollingByPollingToken.bind(u),tokenBalancesStartPolling:l.startPolling.bind(l),tokenBalancesStopPollingByPollingToken:l.stopPollingByPollingToken.bind(l),gasFeeStartPolling:h.startPolling.bind(h),gasFeeStopPollingByPollingToken:h.stopPollingByPollingToken.bind(h),getGasFeeTimeEstimate:h.getTimeEstimate.bind(h),addPollingTokenToAppState:r.addPollingToken.bind(r),removePollingTokenFromAppState:r.removePollingToken.bind(r),backupUserData:A.backupUserData.bind(A),restoreUserData:A.restoreUserData.bind(A),detectTokens:c.detectTokens.bind(c),detectNfts:a.detectNfts.bind(a),addDetectedTokens:w.addDetectedTokens.bind(w),addImportedTokens:w.addTokens.bind(w),ignoreTokens:w.ignoreTokens.bind(w),getBalancesInSingleCall:k.getBalancesInSingleCall.bind(k),performSignIn:_.performSignIn.bind(_),performSignOut:_.performSignOut.bind(_),enableProfileSyncing:I.enableProfileSyncing.bind(I),disableProfileSyncing:I.disableProfileSyncing.bind(I),setIsProfileSyncingEnabled:I.setIsProfileSyncingEnabled.bind(I),syncInternalAccountsWithUserStorage:I.syncInternalAccountsWithUserStorage.bind(I),deleteAccountSyncingDataFromUserStorage:I.performDeleteStorageAllFeatureEntries.bind(I),checkAccountsPresence:N.checkAccountsPresence.bind(N),createOnChainTriggers:N.createOnChainTriggers.bind(N),deleteOnChainTriggersByAccount:N.deleteOnChainTriggersByAccount.bind(N),updateOnChainTriggersByAccount:N.updateOnChainTriggersByAccount.bind(N),fetchAndUpdateMetamaskNotifications:N.fetchAndUpdateMetamaskNotifications.bind(N),deleteNotificationsById:N.deleteNotificationsById.bind(N),getNotificationsByType:N.getNotificationsByType.bind(N),markMetamaskNotificationsAsRead:N.markMetamaskNotificationsAsRead.bind(N),setFeatureAnnouncementsEnabled:N.setFeatureAnnouncementsEnabled.bind(N),enablePushNotifications:R.enablePushNotifications.bind(R),disablePushNotifications:R.disablePushNotifications.bind(R),updateTriggerPushNotifications:R.updateTriggerPushNotifications.bind(R),enableMetamaskNotifications:N.enableMetamaskNotifications.bind(N),disableMetamaskNotifications:N.disableNotificationServices.bind(N),throwTestError:this.throwTestError.bind(this),updateProposedNames:this.nameController.updateProposedNames.bind(this.nameController),setName:this.nameController.setName.bind(this.nameController),multichainUpdateBalance:e=>this.multichainBalancesController.updateBalance(e),multichainUpdateBalances:()=>this.multichainBalancesController.updateBalances(),decodeTransactionData:e=>(0,Ut.decodeTransactionData)({...e,ethQuery:new S.default(this.provider)}),createMetaMetricsDataDeletionTask:this.metaMetricsDataDeletionController.createMetaMetricsDataDeletionTask.bind(this.metaMetricsDataDeletionController),updateDataDeletionTaskStatus:this.metaMetricsDataDeletionController.updateDataDeletionTaskStatus.bind(this.metaMetricsDataDeletionController),endTrace:Ne.endTrace}}async exportAccount(e,t){return await this.verifyPassword(t),this.keyringController.exportAccount(t,e)}async getTokenStandardAndDetails(e,t,n){var r,s;const{tokenList:o}=this.tokenListController.state,{tokens:a}=this.tokensController.state,i={...ke.STATIC_MAINNET_TOKEN_LIST[null==e?void 0:e.toLowerCase()]||{},...o[e.toLowerCase()]||{},...a.find((({address:t})=>(0,ve.isEqualCaseInsensitive)(t,e)))||{}},l=(0,ve.isEqualCaseInsensitive)(i.standard,ae.TokenStandard.ERC20)||!0===i.erc20,c=!(n||(0,ve.isEqualCaseInsensitive)(i.standard,ae.TokenStandard.ERC1155)||(0,ve.isEqualCaseInsensitive)(i.standard,ae.TokenStandard.ERC721)||i.erc721),d=i.decimals!==undefined&&i.symbol;let u;if(l||c&&d)try{const n=t?await(0,we.fetchTokenBalance)(e,t,this.provider):undefined;u={address:e,balance:n,standard:ae.TokenStandard.ERC20,decimals:i.decimals,symbol:i.symbol}}catch(e){C.default.warn(`Failed to get token balance. Error: ${e}`)}u===undefined&&(u=await this.assetsContractController.getTokenStandardAndDetails(e,t,n));if((0,ve.isEqualCaseInsensitive)(u.standard,ae.TokenStandard.ERC1155))try{const r=await(0,we.fetchERC1155Balance)(e,t,n,this.provider),s=null!=r&&r._hex?parseInt(r._hex,16).toString():null;u={...u,balance:s}}catch(e){C.default.warn("Failed to get token balance. Error:",e)}return{...u,decimals:null===(r=u)||void 0===r||null===(r=r.decimals)||void 0===r?void 0:r.toString(10),balance:null===(s=u)||void 0===s||null===(s=s.balance)||void 0===s?void 0:s.toString(10)}}async getTokenSymbol(e){try{const t=await this.assetsContractController.getTokenStandardAndDetails(e);return null==t?void 0:t.symbol}catch(e){return null}}async createNewVaultAndKeychain(e){const t=await this.createVaultMutex.acquire();try{return await this.keyringController.createNewVaultAndKeychain(e)}finally{t()}}async createNewVaultAndRestore(e,n){const r=await this.createVaultMutex.acquire();try{const{completedOnboarding:r}=this.onboardingController.state,s=t.from(n);this.permissionController.clearState(),this.snapController.clearState(),this.accountTrackerController.clearAccounts(),this.txController.clearUnapprovedTransactions(),r&&this.tokenDetectionController.enable(),await this.keyringController.createNewVaultAndRestore(e,this._convertMnemonicToWordlistIndices(s)),r&&(await this._addAccountsWithBalance(),this.setLedgerTransportPreference())}finally{r()}}async _addAccountsWithBalance(){try{const n=(0,Ie.getCurrentChainId)({metamask:this.networkController.state}),r=new S.default(this.provider),s=await this.keyringController.getAccounts();let o=s[s.length-1];for(let a=s.length;;a++){if("0x0"===await this.getBalance(o,r)){var e,t;await this.tokenDetectionController.detectTokens({chainIds:[n],selectedAddress:o});const r=null===(e=this.tokensController.state.allTokens)||void 0===e||null===(e=e[n])||void 0===e?void 0:e[o],s=null===(t=this.tokensController.state.allDetectedTokens)||void 0===t||null===(t=t[n])||void 0===t?void 0:t[o];if(0===((null==r?void 0:r.length)??0)&&0===((null==s?void 0:s.length)??0)){1!==a&&await this.removeAccount(o);break}}o=await this.keyringController.addNewAccount(a)}}catch(e){C.default.warn(`Failed to add accounts with balance. Error: ${e}`)}finally{await this.userStorageController.setIsAccountSyncingReadyToBeDispatched(!0)}}_convertMnemonicToWordlistIndices(e){const t=e.toString().split(" ").map((e=>z.wordlist.indexOf(e)));return new Uint8Array(new Uint16Array(t).buffer)}_convertEnglishWordlistIndicesToCodepoints(e){return t.from(Array.from(new Uint16Array(e.buffer)).map((e=>z.wordlist[e])).join(" "))}getBalance(e,t){return new Promise(((n,r)=>{const s=this.accountTrackerController.state.accounts[e];s&&s.balance?n(s.balance):t.getBalance(e,((e,t)=>{e?(r(e),C.default.error(e)):n(t||"0x0")}))}))}async submitPassword(e){const{completedOnboarding:t}=this.onboardingController.state;await this.offscreenPromise,await this.keyringController.submitPassword(e);try{await this.blockTracker.checkForLatestBlock()}catch(e){C.default.error("Error while unlocking extension.",e)}await this.accountsController.updateAccounts(),t&&this.setLedgerTransportPreference()}async _loginUser(e){try{console.log("in app/scripts/metamask-controller.js _loginUser ",e),await this.submitPassword(e),await this.accountTrackerController.updateAccountsAllActiveNetworks()}finally{console.log("in app/scripts/metamask-controller.js _loginUser finally ",e),this._startUISync()}}_startUISync(){console.log("in app/scripts/metamask-controller.js _startUISync"),this.emit("startUISync"),this.startUISync=!0,this.memStore.subscribe(this.sendUpdate.bind(this))}async submitEncryptionKey(){try{const{loginToken:e,loginSalt:t}=await this.extension.storage.session.get(["loginToken","loginSalt"]);if(e&&t){const{vault:n}=this.keyringController.state;if(JSON.parse(n).salt!==t)return console.warn("submitEncryptionKey: Stored salt and vault salt do not match"),void await this.clearLoginArtifacts();await this.keyringController.submitEncryptionKey(e,t)}}catch(e){throw await this.clearLoginArtifacts(),e}}async clearLoginArtifacts(){await this.extension.storage.session.remove(["loginToken","loginSalt"])}async verifyPassword(e){await this.keyringController.verifyPassword(e)}getPrimaryKeyringMnemonic(){const[e]=this.keyringController.getKeyringsByType(ue.KeyringType.hdKeyTree);if(!e.mnemonic)throw new Error("Primary keyring mnemonic unavailable.");return e.mnemonic}async getKeyringForDevice(e,t=null){var n,r,s,o;const a=null===(n=this.opts.overrides)||void 0===n?void 0:n.keyrings;let i=null;switch(e){case de.HardwareDeviceNames.trezor:i=(null==a||null===(r=a.trezor)||void 0===r?void 0:r.type)||y.TrezorKeyring.type;break;case de.HardwareDeviceNames.ledger:i=(null==a||null===(s=a.ledger)||void 0===s?void 0:s.type)||w.LedgerKeyring.type;break;case de.HardwareDeviceNames.qr:i=k.MetaMaskKeyring.type;break;case de.HardwareDeviceNames.lattice:i=(null==a||null===(o=a.lattice)||void 0===o?void 0:o.type)||v.default.type;break;default:throw new Error("MetamaskController:getKeyringForDevice - Unknown device")}console.log("getting kerying by name ",i);let[l]=await this.keyringController.getKeyringsByType(i);if(l||(console.log("adding new keyring ",i),l=await this.keyringController.addNewKeyring(i)),t&&l.setHdPath&&l.setHdPath(t),e===de.HardwareDeviceNames.lattice&&(l.appName="MetaMask"),e===de.HardwareDeviceNames.trezor){const e=l.getModel();this.appStateController.setTrezorModel(e)}return l.network=(0,Ie.getProviderConfig)({metamask:this.networkController.state}).type,l}async attemptLedgerTransportCreation(){const e=await this.getKeyringForDevice(de.HardwareDeviceNames.ledger);return await e.attemptMakeApp()}async connectHardware(e,t,n){console.log("in connect hardware for ",e," hd path ",n);const r=await this.getKeyringForDevice(e,n);console.log("got keyring for device"),e===de.HardwareDeviceNames.ledger&&await this.setLedgerTransportPreference(r);let s=[];switch(console.log("page is ",t),t){case-1:s=await r.getPreviousPage();break;case 1:s=await r.getNextPage();break;default:s=await r.getFirstPage()}console.log("getting accounts from keyring controller");const o=await this.keyringController.getAccounts(),a=[...new Set(o.concat(s.map((e=>e.address.toLowerCase()))))];return console.log("syncing accounts with addresses"),this.accountTrackerController.syncWithAddresses(a),console.log("returning accounts in connect hardware ",s),s}async checkHardwareStatus(e,t){return(await this.getKeyringForDevice(e,t)).isUnlocked()}async getDeviceNameForMetric(e,t){if(e===de.HardwareDeviceNames.trezor){const n=await this.getKeyringForDevice(e,t),{minorVersion:r}=n.bridge;if(r&&r===en)return de.HardwareDeviceNames.oneKeyViaTrezor}return e}async forgetDevice(e){const t=await this.getKeyringForDevice(e);for(const e of t.accounts)await this.removeAccount(e);return t.forgetDevice(),!0}async getAccountType(e){switch(await this.keyringController.getAccountKeyringType(e)){case ue.KeyringType.trezor:case ue.KeyringType.lattice:case ue.KeyringType.qr:case ue.KeyringType.ledger:return"hardware";case ue.KeyringType.imported:return"imported";case ue.KeyringType.snap:return"snap";default:return"MetaMask"}}async getDeviceModel(e){const t=await this.keyringController.getKeyringForAccount(e);switch(t.type){case ue.KeyringType.trezor:return t.getModel();case ue.KeyringType.qr:return t.getName();case ue.KeyringType.ledger:return de.HardwareDeviceNames.ledger;case ue.KeyringType.lattice:return de.HardwareDeviceNames.lattice;default:return undefined}}getAccountLabel(e,t,n){return`${e[0].toUpperCase()}${e.slice(1)} ${parseInt(t,10)+1} ${n||""}`.trim()}async unlockHardwareWalletAccount(e,t,n,r){const s=await this.getKeyringForDevice(t,n);s.setAccountToUnlock(e);const o=await this.keyringController.addNewAccountForKeyring(s),a=this.getAccountLabel(t===de.HardwareDeviceNames.qr?s.getName():t,e,r);this.preferencesController.setAccountLabel(o,a),this.preferencesController.setSelectedAddress(o);const i=this.accountsController.getAccountByAddress(o);this.accountsController.setAccountName(i.id,a);const l=this.accountsController.listAccounts(),{identities:c}=this.preferencesController.state;return{unlockedAccount:o,identities:c,accounts:l}}async addNewAccount(e){const t=await this.keyringController.getAccounts(),n=await this.keyringController.addNewAccount(e);return t.includes(n)||this.preferencesController.setSelectedAddress(n),n}async getSeedPhrase(e){return this._convertEnglishWordlistIndicesToCodepoints(await this.keyringController.exportSeedPhrase(e))}async resetAccount(){const e=this.accountsController.getSelectedAccount().address;return this.txController.wipeTransactions(!1,e),this.smartTransactionsController.wipeSmartTransactions({address:e,ignoreNetwork:!1}),this.bridgeStatusController.wipeBridgeStatus({address:e,ignoreNetwork:!1}),this.networkController.resetConnection(),e}async getPermittedAccounts(e,{suppressUnauthorizedError:t=!0}={}){try{return await this.permissionController.executeRestrictedMethod(e,he.RestrictedMethods.eth_accounts)}catch(e){if(t&&e.code===g.errorCodes.provider.unauthorized)return[];throw e}}removeAllChainIdPermissions(e){this.permissionController.updatePermissionsByCaveat(he.CaveatTypes.restrictNetworkSwitching,(t=>yt.CaveatMutatorFactories[he.CaveatTypes.restrictNetworkSwitching].removeChainId(e,t)))}removeAllAccountPermissions(e){this.permissionController.updatePermissionsByCaveat(he.CaveatTypes.restrictReturnedAccounts,(t=>yt.CaveatMutatorFactories[he.CaveatTypes.restrictReturnedAccounts].removeAccount(e,t)))}async removeAccount(e){this.removeAllAccountPermissions(e);const t=await this.keyringController.getKeyringForAccount(e);await this.keyringController.removeAccount(e);const n=t?await t.getAccounts():{};var r;0===(null==n?void 0:n.length)&&(null===(r=t.destroy)||void 0===r||r.call(t));return e}async importAccountWithStrategy(e,t){const n=await this.keyringController.importAccountWithStrategy(e,t);this.preferencesController.setSelectedAddress(n)}getAddTransactionRequest({transactionParams:e,transactionOptions:t,dappRequest:n,...r}){var s;return{internalAccounts:this.accountsController.listAccounts(),dappRequest:n,networkClientId:(null==n?void 0:n.networkClientId)??this.networkController.state.selectedNetworkClientId,selectedAccount:this.accountsController.getAccountByAddress(e.from),transactionController:this.txController,transactionOptions:t,transactionParams:e,userOperationController:this.userOperationController,chainId:(0,Ie.getCurrentChainId)({metamask:this.networkController.state}),ppomController:this.ppomController,securityAlertsEnabled:null===(s=this.preferencesController.state)||void 0===s?void 0:s.securityAlertsEnabled,updateSecurityAlertResponse:this.updateSecurityAlertResponse.bind(this),...r}}async getCurrentAccountEIP1559Compatibility(){return!0}async createCancelTransaction(e,t,n){await this.txController.stopTransaction(e,t,n);return this.getState()}async createSpeedUpTransaction(e,t,n){await this.txController.speedUpTransaction(e,t,n);return this.getState()}async estimateGas(e){return new Promise(((t,n)=>new A.default(this.provider).estimateGas(e,((e,r)=>e?n(e):t(r.toString(16))))))}async updateSecurityAlertResponse(e,t,n){await(0,Bt.updateSecurityAlertResponse)({appStateController:this.appStateController,method:e,securityAlertId:t,securityAlertResponse:n,signatureController:this.signatureController,transactionController:this.txController})}markPasswordForgotten(){this.preferencesController.setPasswordForgotten(!0),this.sendUpdate()}unMarkPasswordForgotten(){this.preferencesController.setPasswordForgotten(!1),this.sendUpdate()}setUseRequestQueue(e){this.preferencesController.setUseRequestQueue(e)}setupUntrustedCommunicationEip1193({connectionStream:e,sender:t,subjectType:n}){if(t.url&&this.onboardingController.state.completedOnboarding&&this.preferencesController.state.usePhishDetect){const{hostname:n}=new URL(t.url);this.phishingController.maybeUpdateState();const r=this.phishingController.test(t.url);if(null!=r&&r.result)return this.sendPhishingWarning(e,n),void this.metaMetricsController.trackEvent({event:fe.MetaMetricsEventName.PhishingPageDisplayed,category:fe.MetaMetricsEventCategory.Phishing,properties:{url:n}})}let r;r=n||(t.id&&t.id!==this.extension.runtime.id?B.SubjectType.Extension:B.SubjectType.Website);const s=(0,nt.setupMultiplex)(e);this.setupProviderConnectionEip1193(s.createStream("metamask-provider"),t,r),t.url&&this.setupPublicConfig(s.createStream("publicConfig"))}setupUntrustedCommunicationCaip({connectionStream:e,sender:t,subjectType:n}){let r;r=n||(t.id&&t.id!==this.extension.runtime.id?B.SubjectType.Extension:B.SubjectType.Website);const s=(0,Me.createCaipStream)(e);this.setupProviderConnectionCaip(s,t,r)}setupTrustedCommunication(e,t){const n=(0,nt.setupMultiplex)(e);this.setupControllerConnection(n.createStream("controller")),this.setupProviderConnectionEip1193(n.createStream("provider"),t,B.SubjectType.Internal)}setupPhishingCommunication({connectionStream:e}){const{usePhishDetect:t}=this.preferencesController.state;if(!t)return;const n=(0,nt.setupMultiplex)(e).createStream("metamask-phishing-safelist");n.on("data",(0,ht.default)({safelistPhishingDomain:this.safelistPhishingDomain.bind(this),backToSafetyPhishingWarning:this.backToSafetyPhishingWarning.bind(this)},n))}setUpCookieHandlerCommunication({connectionStream:e}){const{metaMetricsId:t,dataCollectionForMarketing:n,participateInMetaMetrics:r}=this.metaMetricsController.state;if(t&&n&&r){const t=(0,nt.setupMultiplex)(e).createStream(Ot.METAMASK_COOKIE_HANDLER);t.on("data",(0,ht.default)({getCookieFromMarketingPage:this.getCookieFromMarketingPage.bind(this)},t))}}getCookieFromMarketingPage(e){const{ga_client_id:t}=e;this.metaMetricsController.setMarketingCampaignCookieId(t)}sendPhishingWarning(e,t){(0,nt.setupMultiplex)(e).createStream("phishing").write({hostname:t})}setupControllerConnection(e){const t=new Gt.PatchStore(this.memStore);let n=!1;const r=()=>{if(!(0,nt.isStreamWritable)(e)||!n)return;const r=t.flushPendingPatches();e.write({jsonrpc:"2.0",method:"sendUpdate",params:[r]})},o={...this.getApi(),startPatches:()=>{n=!0,r()},getStatePatches:()=>t.flushPendingPatches()};this.on("update",r),this.activeControllerConnections+=1,this.emit("controllerConnectionChanged",this.activeControllerConnections),e.on("data",(0,ht.default)(o,e));const a=()=>{console.log("app/scripts/metamask-controller.js startUISync called"),(0,nt.isStreamWritable)(e)?e.write({jsonrpc:"2.0",method:"startUISync"}):console.log("app/scripts/metamask-controller.js startUISync early return")};this.startUISync?(console.log("app/scripts/metamask-controller.js calling startUISync"),a()):this.once("startUISync",a);const i=()=>{e.mmFinished||(this.activeControllerConnections-=1,this.emit("controllerConnectionChanged",this.activeControllerConnections),e.mmFinished=!0,this.removeListener("update",r),t.destroy())};e.mmFinished=!1,(0,s.finished)(e,i),e.once("close",i),e.once("end",i)}setupProviderConnectionEip1193(e,t,n){let r,o;r=n===B.SubjectType.Internal?ge.ORIGIN_METAMASK:n===B.SubjectType.Snap?t.snapId:new URL(t.url).origin,t.id&&t.id!==this.extension.runtime.id&&this.subjectMetadataController.addSubjectMetadata({origin:r,extensionId:t.id,subjectType:B.SubjectType.Extension}),t.tab&&t.tab.id&&(o=t.tab.id);let a=r;t.tab&&t.tab.url&&(a=new URL(t.tab.url).origin);const l=this.setupProviderEngineEip1193({origin:r,sender:t,subjectType:n,tabId:o,mainFrameOrigin:a}),c=(0,We.default)(),d=(0,i.createEngineStream)({engine:l}),u=this.addConnection(r,{engine:l});(0,s.pipeline)(e,c,d,e,(e=>{var t;l.destroy(),u&&this.removeConnection(r,u),!e||null!==(t=e.message)&&void 0!==t&&t.match("Premature close")||C.default.error(e)})),n!==B.SubjectType.Internal&&this._notifyChainChangeForConnection({engine:l},r)}setupProviderConnectionCaip(e,t,n){let r,o;r=n===B.SubjectType.Internal?ge.ORIGIN_METAMASK:n===B.SubjectType.Snap?t.snapId:new URL(t.url).origin,t.id&&t.id!==this.extension.runtime.id&&this.subjectMetadataController.addSubjectMetadata({origin:r,extensionId:t.id,subjectType:B.SubjectType.Extension}),t.tab&&t.tab.id&&(o=t.tab.id);const a=this.setupProviderEngineCaip({origin:r,tabId:o}),l=(0,We.default)(),c=(0,i.createEngineStream)({engine:a}),d=this.addConnection(r,{engine:a});(0,s.pipeline)(e,l,c,e,(e=>{a._middleware.forEach((e=>{e.destroy&&"function"==typeof e.destroy&&e.destroy()})),d&&this.removeConnection(r,d),e&&C.default.error(e)})),n!==B.SubjectType.Internal&&this._notifyChainChangeForConnection({engine:a},r)}setupSnapProvider(e,t){this.setupUntrustedCommunicationEip1193({connectionStream:t,sender:{snapId:e},subjectType:B.SubjectType.Snap})}setupProviderEngineEip1193({origin:e,subjectType:t,sender:n,tabId:r,mainFrameOrigin:s}){const o=new a.JsonRpcEngine;o.push((0,Ye.default)({origin:e})),s&&o.push((0,Qe.default)({mainFrameOrigin:s})),o.push((0,U.createSelectedNetworkMiddleware)(this.controllerMessenger));const i=(0,Y.createQueuedRequestMiddleware)({enqueueRequest:this.queuedRequestController.enqueueRequest.bind(this.queuedRequestController),useRequestQueue:this.preferencesController.getUseRequestQueue.bind(this.preferencesController),shouldEnqueueRequest:e=>oe.methodsThatShouldBeEnqueued.includes(e.method)});o.push(i);const l=this.selectedNetworkController.getProviderAndBlockTracker(e),c=(0,p.default)(l),u=(0,m.default)(l);return u.events.on("notification",(e=>o.emit("notification",e))),r&&o.push((0,Xe.default)({tabId:r})),o.push((0,ze.default)({origin:e})),o.push(this.permissionLogController.createMiddleware()),e===Pe.BaseUrl.Portfolio&&o.push((0,xt.createTxVerificationMiddleware)(this.networkController)),o.push((0,qt.default)()),o.push((0,He.createPPOMMiddleware)(this.ppomController,this.preferencesController,this.networkController,this.appStateController,this.accountsController,this.updateSecurityAlertResponse.bind(this))),o.push((0,bt.default)({getAccountType:this.getAccountType.bind(this),getDeviceModel:this.getDeviceModel.bind(this),isConfirmationRedesignEnabled:this.isConfirmationRedesignEnabled.bind(this),isRedesignedConfirmationsDeveloperEnabled:this.isConfirmationRedesignDeveloperEnabled.bind(this),snapAndHardwareMessenger:this.controllerMessenger.getRestricted({name:"SnapAndHardwareMessenger",allowedActions:["KeyringController:getKeyringForAccount","SnapController:get","AccountsController:getSelectedAccount"]}),appStateController:this.appStateController,metaMetricsController:this.metaMetricsController})),o.push((0,Je.createUnsupportedMethodMiddleware)()),o.push((0,Je.createLegacyMethodMiddleware)({getAccounts:this.getPermittedAccounts.bind(this,e)})),t!==B.SubjectType.Internal&&o.push(this.permissionController.createPermissionMiddleware({origin:e})),t===B.SubjectType.Website&&o.push((0,tt.default)({location:n.url,registerOnboarding:this.onboardingController.registerOnboarding})),o.push((0,jt.default)({messenger:this.controllerMessenger.getRestricted({name:"EvmMethodsToNonEvmAccountFilterMessenger",allowedActions:["AccountsController:getSelectedAccount"]})})),o.push((0,Je.createMethodMiddleware)({origin:e,subjectType:t,addSubjectMetadata:this.subjectMetadataController.addSubjectMetadata.bind(this.subjectMetadataController),metamaskState:this.getState(),getProviderState:this.getProviderState.bind(this),getUnlockPromise:this.appStateController.getUnlockPromise.bind(this.appStateController),handleWatchAssetRequest:this.handleWatchAssetRequest.bind(this),requestUserApproval:this.approvalController.addAndShowApprovalRequest.bind(this.approvalController),startApprovalFlow:this.approvalController.startFlow.bind(this.approvalController),endApprovalFlow:this.approvalController.endFlow.bind(this.approvalController),sendMetrics:this.metaMetricsController.trackEvent.bind(this.metaMetricsController),getAccounts:this.getPermittedAccounts.bind(this,e),getPermissionsForOrigin:this.permissionController.getPermissions.bind(this.permissionController,e),hasPermission:this.permissionController.hasPermission.bind(this.permissionController,e),requestAccountsPermission:this.permissionController.requestPermissions.bind(this.permissionController,{origin:e},{eth_accounts:{},...!(0,Re.isSnapId)(e)&&{[yt.PermissionNames.permittedChains]:{}}}),requestPermittedChainsPermission:t=>this.permissionController.requestPermissionsIncremental({origin:e},{[yt.PermissionNames.permittedChains]:{caveats:[yt.CaveatFactories[he.CaveatTypes.restrictNetworkSwitching](t)]}}),grantPermittedChainsPermissionIncremental:t=>this.permissionController.grantPermissionsIncremental({subject:{origin:e},approvedPermissions:{[yt.PermissionNames.permittedChains]:{caveats:[yt.CaveatFactories[he.CaveatTypes.restrictNetworkSwitching](t)]}}}),requestPermissionsForOrigin:t=>this.permissionController.requestPermissions({origin:e},{...t[yt.PermissionNames.eth_accounts]&&{[yt.PermissionNames.permittedChains]:{}},...t[yt.PermissionNames.permittedChains]&&{[yt.PermissionNames.eth_accounts]:{}},...t}),revokePermissionsForOrigin:t=>{try{this.permissionController.revokePermissions({[e]:t})}catch(e){console.log(e)}},getCaveat:({target:t,caveatType:n})=>{try{return this.permissionController.getCaveat(e,t,n)}catch(e){if(!(e instanceof B.PermissionDoesNotExistError))throw e}return undefined},setActiveNetwork:async t=>{await this.networkController.setActiveNetwork(t),this.permissionController.hasPermission(e,yt.PermissionNames.eth_accounts)&&this.selectedNetworkController.setNetworkClientIdForDomain(e,t)},addNetwork:this.networkController.addNetwork.bind(this.networkController),updateNetwork:this.networkController.updateNetwork.bind(this.networkController),getNetworkConfigurationByChainId:this.networkController.getNetworkConfigurationByChainId.bind(this.networkController),getCurrentChainIdForDomain:e=>{const t=this.selectedNetworkController.getNetworkClientIdForDomain(e),{chainId:n}=this.networkController.getNetworkConfigurationByNetworkClientId(t);return n},getWeb3ShimUsageState:this.alertController.getWeb3ShimUsageState.bind(this.alertController),setWeb3ShimUsageRecorded:this.alertController.setWeb3ShimUsageRecorded.bind(this.alertController)})),o.push((0,q.createSnapsMethodMiddleware)(t===B.SubjectType.Snap,{getUnlockPromise:this.appStateController.getUnlockPromise.bind(this.appStateController),getSnaps:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:getPermitted",e),requestPermissions:async t=>await this.permissionController.requestPermissions({origin:e},t),getPermissions:this.permissionController.getPermissions.bind(this.permissionController,e),getSnapFile:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:getFile",e),installSnaps:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:install",e),invokeSnap:this.permissionController.executeRestrictedMethod.bind(this.permissionController,e,he.RestrictedMethods.wallet_snap),getIsLocked:()=>!this.appStateController.isUnlocked(),getInterfaceState:(...t)=>this.controllerMessenger.call("SnapInterfaceController:getInterface",e,...t).state,getInterfaceContext:(...t)=>this.controllerMessenger.call("SnapInterfaceController:getInterface",e,...t).context,createInterface:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:createInterface",e),updateInterface:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:updateInterface",e),resolveInterface:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapInterfaceController:resolveInterface",e),getSnap:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:get"),getAllSnaps:this.controllerMessenger.call.bind(this.controllerMessenger,"SnapController:getAll"),getCurrencyRate:e=>{const t=this.multichainRatesController.state.rates[e],{fiatCurrency:n}=this.multichainRatesController.state;return t?{...t,currency:n}:undefined},hasPermission:this.permissionController.hasPermission.bind(this.permissionController,e),handleSnapRpcRequest:t=>this.handleSnapRequest({...t,origin:e}),getAllowedKeyringMethods:(0,Ue.keyringSnapPermissionsBuilder)(this.subjectMetadataController,e)})),o.push(c),o.push(u.middleware),o.push(this.metamaskMiddleware),o.push((0,d.providerAsMiddleware)(l.provider)),o}setupProviderEngineCaip({origin:e,tabId:t}){const n=new a.JsonRpcEngine;return n.push(((n,r,s,o)=>(console.log("CAIP request received",{origin:e,tabId:t,request:n}),o(new Error("CAIP RPC Pipeline not yet implemented."))))),n}setupPublicConfig(e){const t=(0,c.storeAsStream)(this.publicConfigStore);(0,s.pipeline)(t,e,(e=>{var n;t.destroy(),!e||null!==(n=e.message)&&void 0!==n&&n.match("Premature close")||C.default.error(e)}))}addConnection(e,{engine:t}){if(e===ge.ORIGIN_METAMASK)return null;this.connections[e]||(this.connections[e]={});const n=(0,T.nanoid)();return this.connections[e][n]={engine:t},n}removeConnection(e,t){const n=this.connections[e];n&&(delete n[t],0===Object.keys(n).length&&delete this.connections[e])}removeAllConnections(e){const t=this.connections[e];t&&Object.keys(t).forEach((t=>{this.removeConnection(e,t)}))}notifyConnections(e,t){const n=this.connections[e];n&&Object.values(n).forEach((e=>{e.engine&&e.engine.emit("notification",t)}))}notifyAllConnections(e){const t="function"==typeof e?t=>e(t):()=>e;Object.keys(this.connections).forEach((e=>{Object.values(this.connections[e]).forEach((async n=>{try{this.notifyConnection(n,await t(e))}catch(e){console.error(e)}}))}))}notifyConnection(e,t){try{e.engine&&e.engine.emit("notification",t)}catch(e){console.error(e)}}async _onKeyringControllerUpdate(e){const{keyrings:t}=e,n=t.reduce(((e,{accounts:t})=>e.concat(t)),[]).filter(Dt.isEthAddress);n.length&&this.accountTrackerController.syncWithAddresses(n)}_onUnlock(){this.notifyAllConnections((async e=>({method:yt.NOTIFICATION_NAMES.unlockStateChanged,params:{isUnlocked:!0,accounts:await this.getPermittedAccounts(e)}}))),this.unMarkPasswordForgotten(),this.emit("unlock")}_onLock(){this.notifyAllConnections({method:yt.NOTIFICATION_NAMES.unlockStateChanged,params:{isUnlocked:!1}}),this.emit("lock")}_onStateUpdate(e){this.isClientOpenAndUnlocked=e.isUnlocked&&this._isClientOpen,this._notifyChainChange()}privateSendUpdate(){this.emit("update",this.getState())}isUnlocked(){return this.keyringController.state.isUnlocked}getExternalPendingTransactions(e){return this.smartTransactionsController.getTransactions({addressFrom:e,status:"pending"})}isConfirmationRedesignEnabled(){return this.preferencesController.state.preferences.redesignedConfirmationsEnabled}isTransactionsRedesignEnabled(){return this.preferencesController.state.preferences.redesignedTransactionsEnabled}isConfirmationRedesignDeveloperEnabled(){return this.preferencesController.state.preferences.isRedesignedConfirmationsDeveloperEnabled}async initializeChainlist(){const e=`cachedFetch:${le.CHAIN_SPEC_URL}`,{cachedResponse:t}=await(0,ye.getStorageItem)(e)||{};t||await(0,ye.setStorageItem)(e,{cachedResponse:(0,b.rawChainData)(),cachedTime:0})}async getPendingNonce(e,t){const{nonceDetails:n,releaseLock:r}=await this.txController.getNonceLock(e,undefined),s=n.params.highestSuggested;return r(),s}async getNextNonce(e,t){const n=await this.txController.getNonceLock(e,undefined);return n.releaseLock(),n.nextNonce}throwTestError(e){setTimeout((()=>{const t=new Error(e);throw t.name="TestError",t}))}_addTransactionControllerListeners(){const e=this.getTransactionMetricsRequest();this.controllerMessenger.subscribe("TransactionController:postTransactionBalanceUpdated",je.handlePostTransactionBalanceUpdate.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:unapprovedTransactionAdded",(t=>(0,je.handleTransactionAdded)(e,{transactionMeta:t}))),this.controllerMessenger.subscribe("TransactionController:transactionApproved",je.handleTransactionApproved.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:transactionDropped",je.handleTransactionDropped.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:transactionConfirmed",je.handleTransactionConfirmed.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:transactionFailed",je.handleTransactionFailed.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:transactionNewSwap",(({transactionMeta:e})=>this.controllerMessenger.call("SwapsController:setTradeTxId",e.id))),this.controllerMessenger.subscribe("TransactionController:transactionNewSwapApproval",(({transactionMeta:e})=>this.controllerMessenger.call("SwapsController:setApproveTxId",e.id))),this.controllerMessenger.subscribe("TransactionController:transactionRejected",je.handleTransactionRejected.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:transactionSubmitted",je.handleTransactionSubmitted.bind(null,e)),this.controllerMessenger.subscribe("TransactionController:transactionStatusUpdated",(({transactionMeta:e})=>{this._onFinishedTransaction(e)}))}getTransactionMetricsRequest(){return{...{createEventFragment:this.metaMetricsController.createEventFragment.bind(this.metaMetricsController),finalizeEventFragment:this.metaMetricsController.finalizeEventFragment.bind(this.metaMetricsController),getEventFragmentById:this.metaMetricsController.getEventFragmentById.bind(this.metaMetricsController),getParticipateInMetrics:()=>this.metaMetricsController.state.participateInMetaMetrics,trackEvent:this.metaMetricsController.trackEvent.bind(this.metaMetricsController),updateEventFragment:this.metaMetricsController.updateEventFragment.bind(this.metaMetricsController),getAccountType:this.getAccountType.bind(this),getDeviceModel:this.getDeviceModel.bind(this),getEIP1559GasFeeEstimates:this.gasFeeController.fetchGasFeeEstimates.bind(this.gasFeeController),getSelectedAddress:()=>this.accountsController.getSelectedAccount().address,getTokenStandardAndDetails:this.getTokenStandardAndDetails.bind(this),getTransaction:e=>this.txController.state.transactions.find((t=>t.id===e)),getIsSmartTransaction:()=>(0,Ee.getIsSmartTransaction)(this._getMetaMaskState()),getSmartTransactionByMinedTxHash:e=>this.smartTransactionsController.getSmartTransactionByMinedTxHash(e),getRedesignedConfirmationsEnabled:this.isConfirmationRedesignEnabled.bind(this),getRedesignedTransactionsEnabled:this.isTransactionsRedesignEnabled.bind(this),getMethodData:e=>{if(!e)return null;const{knownMethodData:t,use4ByteResolution:n}=this.preferencesController.state,r=(0,pt.addHexPrefix)(e);return(0,pt.getMethodDataName)(t,n,r,this.preferencesController.addKnownMethodData.bind(this.preferencesController),this.provider)},getIsRedesignedConfirmationsDeveloperEnabled:this.isConfirmationRedesignDeveloperEnabled.bind(this),getIsConfirmationAdvancedDetailsOpen:()=>this.preferencesController.state.preferences.showConfirmationAdvancedDetails},snapAndHardwareMessenger:this.controllerMessenger.getRestricted({name:"SnapAndHardwareMessenger",allowedActions:["KeyringController:getKeyringForAccount","SnapController:get","AccountsController:getSelectedAccount"]}),provider:this.provider}}toggleExternalServices(e){this.preferencesController.toggleExternalServices(e),this.tokenListController.updatePreventPollingOnNetworkRestart(!e),e?(this.tokenDetectionController.enable(),this.gasFeeController.enableNonRPCGasFeeApis()):(this.tokenDetectionController.disable(),this.gasFeeController.disableNonRPCGasFeeApis())}async setLedgerTransportPreference(e){console.log("in mm controller setting ledger transport preference");const t=de.LedgerTransportTypes.webhid;console.log("in mm controller, updating transport type to ",t);const n=e||await this.getKeyringForDevice(de.HardwareDeviceNames.ledger);return null!=n&&n.updateTransportMethod?n.updateTransportMethod(t).catch((e=>{throw e})):undefined}recordFirstTimeInfo(e){if(!("firstTimeInfo"in e)){const t="12.9.3";e.firstTimeInfo={version:t,date:Date.now()}}}set isClientOpen(e){this._isClientOpen=e}onClientClosed(){try{this.gasFeeController.stopAllPolling(),this.currencyRateController.stopAllPolling(),this.tokenRatesController.stopAllPolling(),this.tokenDetectionController.stopAllPolling(),this.tokenListController.stopAllPolling(),this.tokenBalancesController.stopAllPolling(),this.appStateController.clearPollingTokens(),this.accountTrackerController.stopAllPolling()}catch(e){console.error(e)}}onEnvironmentTypeClosed(e){const t=ge.POLLING_TOKEN_ENVIRONMENT_TYPES[e];this.appStateController.store.getState()[t].forEach((e=>{this.gasFeeController.stopPollingByPollingToken(e),this.currencyRateController.stopPollingByPollingToken(e),this.appStateController.removePollingToken(e,t)}))}safelistPhishingDomain(e){return this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.Phishing,event:fe.MetaMetricsEventName.ProceedAnywayClicked,properties:{url:e,referrer:{url:e}}}),this.phishingController.bypass(e)}async backToSafetyPhishingWarning(){this.metaMetricsController.trackEvent({category:fe.MetaMetricsEventCategory.Navigation,event:fe.MetaMetricsEventName.PortfolioLinkClicked,properties:{location:"phishing_page",text:"Back to safety"}}),await this.platform.switchToAnotherURL(undefined,"https://portfolio.metamask.io/?metamaskEntry=phishing_page_portfolio_button")}setLocked(){return this.keyringController.setLocked()}async _onAccountChange(e){const t=(0,yt.getPermittedAccountsByOrigin)(this.permissionController.state);for(const[n,r]of t.entries())r.includes(e)&&this._notifyAccountsChange(n,r);await this.txController.updateIncomingTransactions()}async _notifyAccountsChange(e,t){this.isUnlocked()&&this.notifyConnections(e,{method:yt.NOTIFICATION_NAMES.accountsChanged,params:t.length<2?t:await this.getPermittedAccounts(e)}),this.permissionLogController.updateAccountsHistory(e,t)}async _notifyChainChange(){this.preferencesController.getUseRequestQueue()?this.notifyAllConnections((async e=>({method:yt.NOTIFICATION_NAMES.chainChanged,params:await this.getProviderNetworkState(e)}))):this.notifyAllConnections({method:yt.NOTIFICATION_NAMES.chainChanged,params:await this.getProviderNetworkState()})}async _notifyChainChangeForConnection(e,t){this.preferencesController.getUseRequestQueue()?this.notifyConnection(e,{method:yt.NOTIFICATION_NAMES.chainChanged,params:await this.getProviderNetworkState(t)}):this.notifyConnection(e,{method:yt.NOTIFICATION_NAMES.chainChanged,params:await this.getProviderNetworkState()})}async _onFinishedTransaction(e){[X.TransactionStatus.confirmed,X.TransactionStatus.failed].includes(e.status)&&(await this._createTransactionNotifcation(e),await this._updateNFTOwnership(e),this._trackTransactionFailure(e),await this.tokenBalancesController.updateBalancesByChainId({chainId:e.chainId}))}async _createTransactionNotifcation(e){const{chainId:t}=e;let n={};if(t){var r,s;const e=null===(r=this.networkController.state.networkConfigurationsByChainId)||void 0===r?void 0:r[t];n={blockExplorerUrl:null==e||null===(s=e.blockExplorerUrls)||void 0===s?void 0:s[null==e?void 0:e.defaultBlockExplorerUrlIndex]}}try{await this.platform.showTransactionNotification(e,n)}catch(e){C.default.error("Failed to create transaction notification",e)}}async _updateNFTOwnership(e){const{type:t,txParams:n,chainId:r,txReceipt:s}=e,o=this.accountsController.getSelectedAccount().address,{allNfts:a}=this.nftController.state,i=null==s?void 0:s.logs,l=t===X.TransactionType.contractInteraction&&i,c=(t===X.TransactionType.tokenMethodTransferFrom||t===X.TransactionType.tokenMethodSafeTransferFrom)&&n!==undefined;if(l||c)if(c){var d;const{data:e,to:t,from:s}=n,o=(0,be.parseStandardTokenTransactionData)(e),i=(0,we.getTokenIdParam)(o)??(0,Se.getTokenValueParam)(o),l=null==a||null===(d=a[s])||void 0===d||null===(d=d[r])||void 0===d?void 0:d.find((({address:e,tokenId:n})=>(0,ve.isEqualCaseInsensitive)(e,t)&&n===i));l&&this.nftController.checkAndUpdateSingleNftOwnershipStatus(l,!1,{userAddress:s})}else{const e=i.map((e=>{const t=e.topics&&e.topics[0]===_e.TRANSFER_SINFLE_LOG_TOPIC_HASH,n=e.topics&&e.topics[0]===_e.TOKEN_TRANSFER_LOG_TOPIC_HASH;let r;return t&&(r=e.topics&&e.topics[3]&&e.topics[3].match(null==o?void 0:o.slice(2))),n&&(r=e.topics&&e.topics[2]&&e.topics[2].match(null==o?void 0:o.slice(2))),{isERC1155NftTransfer:t,isERC721NftTransfer:n,isTransferToSelectedAddress:r,...e}}));if(0!==e.length){const t=[];e.forEach((e=>{if(e.isTransferToSelectedAddress&&(e.isERC1155NftTransfer||e.isERC721NftTransfer)){let n;n=e.isERC1155NftTransfer?new ee.Interface(te.abiERC1155):new ee.Interface(te.abiERC721);try{const r=n.parseLog({data:e.data,topics:e.topics});t.push({contract:e.address,...r})}catch(e){}}}));const n=[],s=[];t.forEach((e=>{var t;const i=(0,we.getTokenIdParam)(e),l=null==a||null===(t=a[o])||void 0===t||null===(t=t[r])||void 0===t?void 0:t.find((({address:t,tokenId:n})=>(0,ve.isEqualCaseInsensitive)(t,e.contract)&&n===i));l?n.push(l):s.push({tokenId:i,...e})}));const i=n.map((async e=>this.nftController.checkAndUpdateSingleNftOwnershipStatus(e,!1,{selectedAddress:o})));await Promise.allSettled(i);const l=s.map((async e=>this.nftController.addNft(e.contract,e.tokenId)));await Promise.allSettled(l)}}}_trackTransactionFailure(e){var t;const{txReceipt:n}=e,r=this.getState();n&&"0x0"===n.status&&this.metaMetricsController.trackEvent({event:"Tx Status Update: On-Chain Failure",category:fe.MetaMetricsEventCategory.Background,properties:{action:"Transactions",errorMessage:null===(t=e.simulationFails)||void 0===t?void 0:t.reason,numberOfTokens:r.tokens.length,numberOfAccounts:Object.keys(r.accounts).length}},{matomoEvent:!0})}_onUserOperationAdded(e){const t=this.txController.state.transactions.find((t=>t.id===e.id));t&&(t.type===X.TransactionType.swap?this.controllerMessenger.publish("TransactionController:transactionNewSwap",{transactionMeta:t}):t.type===X.TransactionType.swapApproval&&this.controllerMessenger.publish("TransactionController:transactionNewSwapApproval",{transactionMeta:t}))}_onUserOperationTransactionUpdated(e){const t={...e,txParams:{...e.txParams,from:this.accountsController.getSelectedAccount().address}};this.txController.state.transactions.some((e=>e.id===t.id))||this.txController.update((e=>{e.transactions.push(t)})),this.txController.updateTransaction(t,"Generated from user operation"),this.controllerMessenger.publish("TransactionController:transactionStatusUpdated",{transactionMeta:t})}_publishSmartTransactionHook(e,t){const n=this._getMetaMaskState(),r=(0,Ee.getIsSmartTransaction)(n);if(!r)return{transactionHash:undefined};const s=(0,Ee.getFeatureFlagsByChainId)(n);return(0,De.submitSmartTransactionHook)({transactionMeta:e,signedTransactionInHex:t,transactionController:this.txController,smartTransactionsController:this.smartTransactionsController,controllerMessenger:this.controllerMessenger,isSmartTransaction:r,isHardwareWallet:(0,Ee.isHardwareWallet)(n),featureFlags:s})}_getMetaMaskState(){return{metamask:this.getState()}}}function rn(e,t){const n=Xt(tn,this,sn).call(this,t),r=Xt(tn,this,sn).call(this,e);n!==r&&this.tokenListController.updatePreventPollingOnNetworkRestart(!r)}function sn(e){const{useTokenDetection:t,useTransactionSimulations:n,preferences:r}=e??{},{petnamesEnabled:s}=r??{};return t||s||n}n.default=nn}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"$root$",file:"app/scripts/metamask-controller.js"}],[137,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:2,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=2;try{"etherscan"===t.data.config.provider.type&&(t.data.config.provider.type="rpc",t.data.config.provider.rpcTarget="https://rpc.metamask.io/")}catch(e){}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/002.js"}],[138,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:3,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=3;try{"https://rawtestrpc.metamask.io/"===t.data.config.provider.rpcTarget&&(t.data.config.provider.rpcTarget="https://testrpc.metamask.io/")}catch(e){}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/003.js"}],[139,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:4,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=4;try{if("rpc"!==t.data.config.provider.type)return Promise.resolve(t);switch(t.data.config.provider.rpcTarget){case"https://testrpc.metamask.io/":t.data.config.provider={type:"testnet"};break;case"https://rpc.metamask.io/":t.data.config.provider={type:"mainnet"}}}catch(e){}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/004.js"}],[14,{"../../../../shared/modules/conversion.utils":5301,"../../../../shared/types/bridge-status":5329,"./constants":15,"./utils":16,"@metamask/polling-controller":2172},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("@metamask/polling-controller"),s=e("../../../../shared/types/bridge-status"),o=e("../../../../shared/modules/conversion.utils"),a=e("./constants"),i=e("./utils");function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;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:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t,n){d(e,t),t.set(e,n)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t){return e.get(h(e,t))}function h(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const p={bridgeStatusState:{persist:!0,anonymous:!1}};var m=new WeakMap,g=new WeakMap,f=new WeakSet,C=new WeakMap,y=new WeakMap;class w extends((0,r.StaticIntervalPollingController)()){constructor({messenger:e,state:t}){var n,r;super({name:a.BRIDGE_STATUS_CONTROLLER_NAME,metadata:p,messenger:e,state:{...t,bridgeStatusState:{...a.DEFAULT_BRIDGE_STATUS_CONTROLLER_STATE,...null==t?void 0:t.bridgeStatusState}}}),d(n=this,r=f),r.add(n),c(this,m,{}),l(this,"resetState",(()=>{this.update((e=>{e.bridgeStatusState={...a.DEFAULT_BRIDGE_STATUS_CONTROLLER_STATE}}))})),l(this,"wipeBridgeStatus",(({address:e,ignoreNetwork:t})=>{if(t)this.update((e=>{e.bridgeStatusState={...a.DEFAULT_BRIDGE_STATUS_CONTROLLER_STATE}}));else{const{selectedNetworkClientId:t}=this.messagingSystem.call("NetworkController:getState"),n=this.messagingSystem.call("NetworkController:getNetworkClientById",t).configuration.chainId;u(y,this).call(this,e,n)}})),c(this,g,(()=>{const{bridgeStatusState:e}=this.state;Object.values(e.txHistory).filter((e=>e.status.status!==s.StatusTypes.COMPLETE)).filter((e=>{const t=e.status.srcChain.txHash;return!u(m,this)[t]})).forEach((e=>{const t={bridgeId:e.quote.bridgeId,srcTxHash:e.status.srcChain.txHash,bridge:e.quote.bridges[0],srcChainId:e.quote.srcChainId,destChainId:e.quote.destChainId,quote:e.quote,refuel:Boolean(e.quote.refuel)},n=(0,o.decimalToPrefixedHex)(t.srcChainId),r=this.messagingSystem.call("NetworkController:findNetworkClientIdByChainId",n);u(m,this)[t.srcTxHash]=this.startPolling({networkClientId:r,statusRequest:t})}))})),l(this,"startPollingForBridgeTxStatus",(e=>{const{statusRequest:t,quoteResponse:n,startTime:r,slippagePercentage:a,pricingData:i,initialDestAssetBalance:l,targetContractAddress:c}=e,d=(0,o.decimalToPrefixedHex)(t.srcChainId),{bridgeStatusState:p}=this.state,{address:g}=h(f,this,v).call(this);this.update((e=>{e.bridgeStatusState={...p,txHistory:{...p.txHistory,[t.srcTxHash]:{quote:n.quote,startTime:r,estimatedProcessingTimeInSeconds:n.estimatedProcessingTimeInSeconds,slippagePercentage:a,pricingData:i,initialDestAssetBalance:l,targetContractAddress:c,account:g,status:{status:s.StatusTypes.PENDING,srcChain:{chainId:t.srcChainId,txHash:t.srcTxHash}}}}}}));const C=this.messagingSystem.call("NetworkController:findNetworkClientIdByChainId",d);u(m,this)[t.srcTxHash]=this.startPolling({networkClientId:C,statusRequest:t})})),l(this,"_executePoll",(async e=>{await u(C,this).call(this,e)})),c(this,C,(async({networkClientId:e,statusRequest:t})=>{const{bridgeStatusState:n}=this.state;try{const e=await(0,i.fetchBridgeTxStatus)(t);this.update((r=>{const s=r.bridgeStatusState.txHistory[t.srcTxHash];r.bridgeStatusState={...n,txHistory:{...n.txHistory,[t.srcTxHash]:{...s,status:e}}}}));const r=u(m,this)[t.srcTxHash];e.status===s.StatusTypes.COMPLETE&&r&&this.stopPollingByPollingToken(r)}catch(e){console.log("Failed to fetch bridge tx status",e)}})),c(this,y,((e,t)=>{const n=Object.keys(this.state.bridgeStatusState.txHistory).filter((n=>{const r=this.state.bridgeStatusState.txHistory[n],s=(0,o.decimalToPrefixedHex)(r.quote.srcChainId),a=(0,o.decimalToPrefixedHex)(r.quote.destChainId);return r.account===e&&(s===t||a===t)}));n.forEach((e=>{u(m,this)[e]&&this.stopPollingByPollingToken(u(m,this)[e])})),this.update((e=>{e.bridgeStatusState.txHistory=n.reduce(((e,t)=>(delete e[t],e)),e.bridgeStatusState.txHistory)}))})),this.messagingSystem.registerActionHandler(`${a.BRIDGE_STATUS_CONTROLLER_NAME}:startPollingForBridgeTxStatus`,this.startPollingForBridgeTxStatus.bind(this)),this.messagingSystem.registerActionHandler(`${a.BRIDGE_STATUS_CONTROLLER_NAME}:wipeBridgeStatus`,this.wipeBridgeStatus.bind(this)),this.setIntervalLength(a.REFRESH_INTERVAL_MS),u(g,this).call(this)}}function v(){return this.messagingSystem.call("AccountsController:getSelectedAccount")}n.default=w}}},{package:"$root$",file:"app/scripts/controllers/bridge-status/bridge-status-controller.ts"}],[140,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:5,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=5;try{const e=function(e){const{config:t}=e,n={...e,KeyringController:{vault:e.vault,selectedAccount:t.selectedAccount,walletNicknames:e.walletNicknames}};return delete n.vault,delete n.walletNicknames,delete n.config.selectedAccount,n}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #5${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/005.js"}],[141,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:6,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=6;try{const e=function(e){const t=e.KeyringController,n={...e,PreferencesController:{selectedAddress:t.selectedAccount}};return delete n.KeyringController.selectedAccount,n}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #6${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/006.js"}],[142,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:7,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=7;try{const e=function(e){const t={...e,TransactionManager:{transactions:e.transactions||[],gasMultiplier:e.gasMultiplier||1}};return delete t.transactions,delete t.gasMultiplier,t}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #7${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/007.js"}],[143,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:8,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=8;try{const e=function(e){const t={...e,NoticeController:{noticesList:e.noticesList||[]}};return delete t.noticesList,t}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #8${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/008.js"}],[144,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:9,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=9;try{const e=function(e){const t=(0,r.merge)({},e,{CurrencyController:{currentCurrency:e.currentFiat||e.fiatCurrency||"USD",conversionRate:e.conversionRate,conversionDate:e.conversionDate}});return delete t.currentFiat,delete t.fiatCurrency,delete t.conversionRate,delete t.conversionDate,t}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #9${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/009.js"}],[1449,{"@ethersproject/providers":561,"@metamask/base-controller":1396,"@metamask/controller-utils":1422,"@metamask/utils":1461,"punycode/punycode.js":4586},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var r,s,o,a,i,l=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},c=this&&this.__classPrivateFieldSet||function(e,t,n,r,s){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?s.call(e,n):s?s.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.EnsController=n.DEFAULT_ENS_NETWORK_MAP=void 0;const d=e("@ethersproject/providers"),u=e("@metamask/base-controller"),h=e("@metamask/controller-utils"),p=e("@metamask/utils"),m=e("punycode/punycode.js"),g=(0,p.createProjectLogger)("ens-controller");n.DEFAULT_ENS_NETWORK_MAP={1:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",3:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",4:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",5:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",17e3:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",11155111:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"};const f={ensEntries:{persist:!0,anonymous:!1},ensResolutionsByAddress:{persist:!0,anonymous:!1}},C={ensEntries:{},ensResolutionsByAddress:{}};class y extends u.BaseController{constructor({registriesByChainId:e=n.DEFAULT_ENS_NETWORK_MAP,messenger:t,state:i={},onNetworkDidChange:c}){super({name:"EnsController",metadata:f,messenger:t,state:{...C,ensEntries:Object.fromEntries(Object.entries(e).map((([e,t])=>[(0,h.toHex)(e),{".":{address:t,chainId:(0,h.toHex)(e),ensName:"."}}]))),...i}}),r.add(this),s.set(this,null),l(this,r,"m",o).call(this,e),c&&c((({selectedNetworkClientId:t})=>{this.resetState(),l(this,r,"m",a).call(this,t,e)}))}resetState(){this.update((e=>{e.ensResolutionsByAddress={}}))}clear(){this.update((e=>{e.ensEntries={}}))}delete(e,t){const n=(0,h.normalizeEnsName)(t);return!!((0,h.isSafeDynamicKey)(e)&&n&&this.state.ensEntries[e]&&this.state.ensEntries[e][n])&&(this.update((t=>{delete t.ensEntries[e][n],0===Object.keys(t.ensEntries[e]).length&&delete t.ensEntries[e]})),!0)}get(e,t){const n=(0,h.normalizeEnsName)(t);return n&&this.state.ensEntries[e]&&this.state.ensEntries[e][n]||null}set(e,t,n){if(!Number.isInteger(Number.parseInt(e,10))||!t||"string"!=typeof t||n&&!(0,h.isValidHexAddress)(n))throw new Error(`Invalid ENS entry: { chainId:${e}, ensName:${t}, address:${n}}`);const r=(0,h.normalizeEnsName)(t);if(!r)throw new Error(`Invalid ENS name: ${t}`);const s=n?(0,h.toChecksumHexAddress)(n):null,o=this.state.ensEntries[e];return(!o?.[r]||o[r].address!==s)&&(this.update((t=>{t.ensEntries={...this.state.ensEntries,[e]:{...this.state.ensEntries[e],[r]:{address:s,chainId:e,ensName:r}}}})),!0)}async reverseResolveAddress(e){if(!l(this,s,"f"))return undefined;const t=(0,h.toChecksumHexAddress)(e);if(this.state.ensResolutionsByAddress[t])return this.state.ensResolutionsByAddress[t];let n,r;try{n=await l(this,s,"f").lookupAddress(t)}catch(e){return g(e),undefined}if(!n)return undefined;try{r=await l(this,s,"f").resolveName(n)}catch(e){return g(e),undefined}return r?"0x0000000000000000000000000000000000000000"===r||"0x"===r||(0,h.toChecksumHexAddress)(r)!==t?undefined:(this.update((e=>{e.ensResolutionsByAddress[t]=(0,m.toASCII)(n)})),n):undefined}}n.EnsController=y,s=new WeakMap,r=new WeakSet,o=function(e){const{selectedNetworkClientId:t}=this.messagingSystem.call("NetworkController:getState");l(this,r,"m",a).call(this,t,e)},a=function(e,t){const{configuration:{chainId:n},provider:o}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);t&&t[parseInt(n,16)]&&l(this,r,"m",i).call(this,n)?c(this,s,new d.Web3Provider(o,{chainId:(0,h.convertHexToDecimal)(n),name:h.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP[n],ensAddress:t[parseInt(n,16)]}),"f"):c(this,s,null,"f")},i=function(e){return Boolean(this.state.ensEntries[e])},n.default=y}}},{package:"@metamask/ens-controller",file:"node_modules/@metamask/ens-controller/dist/EnsController.cjs"}],[145,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:10,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=10;try{const e=function(e){const t=(0,r.merge)({},e,{ShapeShiftController:{shapeShiftTxList:e.shapeShiftTxList||[]}});return delete t.shapeShiftTxList,t}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #10${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/010.js"}],[1450,{"./EnsController.cjs":1449},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){r===undefined&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){r===undefined&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),s(e("./EnsController.cjs"),n)}}},{package:"@metamask/ens-controller",file:"node_modules/@metamask/ens-controller/dist/index.cjs"}],[1451,{"./errors.cjs":1459,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.assertExhaustive=n.assertStruct=n.assert=n.AssertionError=void 0;const r=e("@metamask/superstruct"),s=e("./errors.cjs");function o(e,t){return n=e,Boolean("string"==typeof n?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var n}class a extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}n.AssertionError=a,n.assert=function(e,t="Assertion failed.",n=a){if(!e){if(t instanceof Error)throw t;throw o(n,t)}},n.assertStruct=function(e,t,n="Assertion failed",i=a){try{(0,r.assert)(e,t)}catch(e){throw o(i,`${n}: ${function(e){return(0,s.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},n.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/assert.cjs"}],[1452,{"./assert.cjs":1451,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.base64=void 0;const r=e("@metamask/superstruct"),s=e("./assert.cjs");n.base64=(e,t={})=>{const n=t.paddingRequired??!1,o=t.characterSet??"base64";let a,i;return"base64"===o?a=String.raw`[A-Za-z0-9+\/]`:((0,s.assert)("base64url"===o),a=String.raw`[-_A-Za-z0-9]`),i=n?new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),(0,r.pattern)(e,i)}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/base64.cjs"}],[1453,{"./assert.cjs":1451,"./hex.cjs":1460,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.createDataView=n.concatBytes=n.valueToBytes=n.base64ToBytes=n.stringToBytes=n.numberToBytes=n.signedBigIntToBytes=n.bigIntToBytes=n.hexToBytes=n.bytesToBase64=n.bytesToString=n.bytesToNumber=n.bytesToSignedBigInt=n.bytesToBigInt=n.bytesToHex=n.assertIsBytes=n.isBytes=void 0;const r=e("@scure/base"),s=e("./assert.cjs"),o=e("./hex.cjs"),a=48,i=58,l=87;const c=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 d(e){return e instanceof Uint8Array}function u(e){(0,s.assert)(d(e),"Value must be a Uint8Array.")}function h(e){if(u(e),0===e.length)return"0x";const t=c(),n=new Array(e.length);for(let r=0;r=BigInt(0),"Value must be a non-negative bigint.");return m(e.toString(16))}function f(e){(0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return m(e.toString(16))}function C(e){return(0,s.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return g(e);if("number"==typeof e)return f(e);if("string"==typeof e)return e.startsWith("0x")?m(e):C(e);if(d(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}n.isBytes=d,n.assertIsBytes=u,n.bytesToHex=h,n.bytesToBigInt=p,n.bytesToSignedBigInt=function(e){u(e);let t=BigInt(0);for(const n of e)t=(t<0,"Byte length must be greater than 0."),(0,s.assert)(function(e,t){(0,s.assert)(t>0);const n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let n=e;const r=new Uint8Array(t);for(let e=0;e>=BigInt(8);return r.reverse()},n.numberToBytes=f,n.stringToBytes=C,n.base64ToBytes=function(e){return(0,s.assert)("string"==typeof e,"Value must be a string."),r.base64.decode(e)},n.valueToBytes=y,n.concatBytes=function(e){const t=new Array(e.length);let n=0;for(let r=0;r@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/bytes.cjs"}],[1454,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.toCaipChainId=n.parseCaipAccountId=n.parseCaipChainId=n.isCaipAssetId=n.isCaipAssetType=n.isCaipAccountAddress=n.isCaipAccountId=n.isCaipReference=n.isCaipNamespace=n.isCaipChainId=n.KnownCaipNamespace=n.CaipAssetIdStruct=n.CaipAssetTypeStruct=n.CaipAccountAddressStruct=n.CaipAccountIdStruct=n.CaipReferenceStruct=n.CaipNamespaceStruct=n.CaipChainIdStruct=n.CAIP_ASSET_ID_REGEX=n.CAIP_ASSET_TYPE_REGEX=n.CAIP_ACCOUNT_ADDRESS_REGEX=n.CAIP_ACCOUNT_ID_REGEX=n.CAIP_REFERENCE_REGEX=n.CAIP_NAMESPACE_REGEX=n.CAIP_CHAIN_ID_REGEX=void 0;const r=e("@metamask/superstruct");function s(e){return(0,r.is)(e,n.CaipNamespaceStruct)}function o(e){return(0,r.is)(e,n.CaipReferenceStruct)}n.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,n.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,n.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,n.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,n.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,n.CaipChainIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_CHAIN_ID_REGEX),n.CaipNamespaceStruct=(0,r.pattern)((0,r.string)(),n.CAIP_NAMESPACE_REGEX),n.CaipReferenceStruct=(0,r.pattern)((0,r.string)(),n.CAIP_REFERENCE_REGEX),n.CaipAccountIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ACCOUNT_ID_REGEX),n.CaipAccountAddressStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ACCOUNT_ADDRESS_REGEX),n.CaipAssetTypeStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ASSET_TYPE_REGEX),n.CaipAssetIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(n.KnownCaipNamespace||(n.KnownCaipNamespace={})),n.isCaipChainId=function(e){return(0,r.is)(e,n.CaipChainIdStruct)},n.isCaipNamespace=s,n.isCaipReference=o,n.isCaipAccountId=function(e){return(0,r.is)(e,n.CaipAccountIdStruct)},n.isCaipAccountAddress=function(e){return(0,r.is)(e,n.CaipAccountAddressStruct)},n.isCaipAssetType=function(e){return(0,r.is)(e,n.CaipAssetTypeStruct)},n.isCaipAssetId=function(e){return(0,r.is)(e,n.CaipAssetIdStruct)},n.parseCaipChainId=function(e){const t=n.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},n.parseCaipAccountId=function(e){const t=n.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.toCaipChainId=function(e,t){if(!s(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1455,{"./base64.cjs":1452,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ChecksumStruct=void 0;const r=e("@metamask/superstruct"),s=e("./base64.cjs");n.ChecksumStruct=(0,r.size)((0,s.base64)((0,r.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/checksum.cjs"}],[1456,{"./assert.cjs":1451,"./bytes.cjs":1453,"./hex.cjs":1460,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createHex=n.createBytes=n.createBigInt=n.createNumber=void 0;const r=e("@metamask/superstruct"),s=e("./assert.cjs"),o=e("./bytes.cjs"),a=e("./hex.cjs"),i=(0,r.union)([(0,r.number)(),(0,r.bigint)(),(0,r.string)(),a.StrictHexStruct]),l=(0,r.coerce)((0,r.number)(),i,Number),c=(0,r.coerce)((0,r.bigint)(),i,BigInt),d=((0,r.union)([a.StrictHexStruct,(0,r.instance)(Uint8Array)]),(0,r.coerce)((0,r.instance)(Uint8Array),(0,r.union)([a.StrictHexStruct]),o.hexToBytes)),u=(0,r.coerce)(a.StrictHexStruct,(0,r.instance)(Uint8Array),o.bytesToHex);n.createNumber=function(e){try{const t=(0,r.create)(e,l);return(0,s.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof r.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},n.createBigInt=function(e){try{return(0,r.create)(e,c)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},n.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,r.create)(e,d)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},n.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,r.create)(e,u)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/coercers.cjs"}],[1457,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var r,s,o=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},a=this&&this.__classPrivateFieldSet||function(e,t,n,r,s){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?s.call(e,n):s?s.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.FrozenSet=n.FrozenMap=void 0;class i{get size(){return o(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return o(this,r,"f")[Symbol.iterator]()}constructor(e){r.set(this,void 0),a(this,r,new Map(e),"f"),Object.freeze(this)}entries(){return o(this,r,"f").entries()}forEach(e,t){return o(this,r,"f").forEach(((n,r,s)=>e.call(t,n,r,this)))}get(e){return o(this,r,"f").get(e)}has(e){return o(this,r,"f").has(e)}keys(){return o(this,r,"f").keys()}values(){return o(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}n.FrozenMap=i;class l{get size(){return o(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return o(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),a(this,s,new Set(e),"f"),Object.freeze(this)}entries(){return o(this,s,"f").entries()}forEach(e,t){return o(this,s,"f").forEach(((n,r,s)=>e.call(t,n,r,this)))}has(e){return o(this,s,"f").has(e)}keys(){return o(this,s,"f").keys()}values(){return o(this,s,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}n.FrozenSet=l,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(l),Object.freeze(l.prototype)}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/collections.cjs"}],[1458,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1459,{"./misc.cjs":1465,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.wrapError=n.getErrorMessage=n.isErrorWithStack=n.isErrorWithMessage=n.isErrorWithCode=void 0;const r=e("pony-cause"),s=e("./misc.cjs");function o(e){return"object"==typeof e&&null!==e&&"code"in e}function a(e){return"object"==typeof e&&null!==e&&"message"in e}n.isErrorWithCode=o,n.isErrorWithMessage=a,n.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},n.getErrorMessage=function(e){return a(e)&&"string"==typeof e.message?e.message:(0,s.isNullOrUndefined)(e)?"":String(e)},n.wrapError=function(e,t){if((n=e)instanceof Error||(0,s.isObject)(n)&&"Error"===n.constructor.name){let n;return n=2===Error.length?new Error(t,{cause:e}):new r.ErrorWithCause(t,{cause:e}),o(e)&&(n.code=e.code),n}var n;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/errors.cjs"}],[146,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:11,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=11;try{const e=function(e){const t=e;return delete t.TOSHash,delete t.isDisclaimerConfirmed,t}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #11${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/011.js"}],[1460,{"./assert.cjs":1451,"./bytes.cjs":1453,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.remove0x=n.add0x=n.isValidChecksumAddress=n.getChecksumAddress=n.isValidHexAddress=n.assertIsStrictHexString=n.assertIsHexString=n.isStrictHexString=n.isHexString=n.HexChecksumAddressStruct=n.HexAddressStruct=n.StrictHexStruct=n.HexStruct=void 0;const r=e("@metamask/superstruct"),s=e("@noble/hashes/sha3"),o=e("./assert.cjs"),a=e("./bytes.cjs");function i(e){return(0,r.is)(e,n.HexStruct)}function l(e){return(0,r.is)(e,n.StrictHexStruct)}function c(e){(0,o.assert)((0,r.is)(e,n.HexChecksumAddressStruct),"Invalid hex address.");const t=u(e.toLowerCase()),i=u((0,a.bytesToHex)((0,s.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const n=i[t];return(0,o.assert)((0,r.is)(n,(0,r.string)()),"Hash shorter than address."),parseInt(n,16)>7?e.toUpperCase():e})).join("")}`}function d(e){return!!(0,r.is)(e,n.HexChecksumAddressStruct)&&c(e)===e}function u(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}n.HexStruct=(0,r.pattern)((0,r.string)(),/^(?:0x)?[0-9a-f]+$/iu),n.StrictHexStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]+$/iu),n.HexAddressStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]{40}$/u),n.HexChecksumAddressStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-fA-F]{40}$/u),n.isHexString=i,n.isStrictHexString=l,n.assertIsHexString=function(e){(0,o.assert)(i(e),"Value must be a hexadecimal string.")},n.assertIsStrictHexString=function(e){(0,o.assert)(l(e),'Value must be a hexadecimal string, starting with "0x".')},n.isValidHexAddress=function(e){return(0,r.is)(e,n.HexAddressStruct)||d(e)},n.getChecksumAddress=c,n.isValidChecksumAddress=d,n.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},n.remove0x=u}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/hex.cjs"}],[1461,{"./assert.cjs":1451,"./base64.cjs":1452,"./bytes.cjs":1453,"./caip-types.cjs":1454,"./checksum.cjs":1455,"./coercers.cjs":1456,"./collections.cjs":1457,"./encryption-types.cjs":1458,"./errors.cjs":1459,"./hex.cjs":1460,"./json.cjs":1462,"./keyring.cjs":1463,"./logging.cjs":1464,"./misc.cjs":1465,"./number.cjs":1466,"./opaque.cjs":1467,"./promise.cjs":1468,"./time.cjs":1469,"./transaction-types.cjs":1470,"./versions.cjs":1471},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){r===undefined&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){r===undefined&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),s(e("./assert.cjs"),n),s(e("./base64.cjs"),n),s(e("./bytes.cjs"),n),s(e("./caip-types.cjs"),n),s(e("./checksum.cjs"),n),s(e("./coercers.cjs"),n),s(e("./collections.cjs"),n),s(e("./encryption-types.cjs"),n),s(e("./errors.cjs"),n),s(e("./hex.cjs"),n),s(e("./json.cjs"),n),s(e("./keyring.cjs"),n),s(e("./logging.cjs"),n),s(e("./misc.cjs"),n),s(e("./number.cjs"),n),s(e("./opaque.cjs"),n),s(e("./promise.cjs"),n),s(e("./time.cjs"),n),s(e("./transaction-types.cjs"),n),s(e("./versions.cjs"),n)}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/index.cjs"}],[1462,{"./assert.cjs":1451,"./misc.cjs":1465,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonRpcIdValidator=n.assertIsJsonRpcError=n.isJsonRpcError=n.assertIsJsonRpcFailure=n.isJsonRpcFailure=n.assertIsJsonRpcSuccess=n.isJsonRpcSuccess=n.assertIsJsonRpcResponse=n.isJsonRpcResponse=n.assertIsPendingJsonRpcResponse=n.isPendingJsonRpcResponse=n.JsonRpcResponseStruct=n.JsonRpcFailureStruct=n.JsonRpcSuccessStruct=n.PendingJsonRpcResponseStruct=n.assertIsJsonRpcRequest=n.isJsonRpcRequest=n.assertIsJsonRpcNotification=n.isJsonRpcNotification=n.JsonRpcNotificationStruct=n.JsonRpcRequestStruct=n.JsonRpcParamsStruct=n.JsonRpcErrorStruct=n.JsonRpcIdStruct=n.JsonRpcVersionStruct=n.jsonrpc2=n.getJsonSize=n.getSafeJson=n.isValidJson=n.JsonStruct=n.UnsafeJsonStruct=n.exactOptional=n.object=void 0;const r=e("@metamask/superstruct"),s=e("./assert.cjs"),o=e("./misc.cjs");function a({path:e,branch:t}){const n=e[e.length-1];return(0,o.hasProperty)(t[t.length-2],n)}function i(e){return new r.Struct({...e,type:`optional ${e.type}`,validator:(t,n)=>!a(n)||e.validator(t,n),refiner:(t,n)=>!a(n)||e.refiner(t,n)})}n.object=e=>(0,r.object)(e),n.exactOptional=i;function l(e){return(0,r.create)(e,n.JsonStruct)}n.UnsafeJsonStruct=(0,r.union)([(0,r.literal)(null),(0,r.boolean)(),(0,r.define)("finite number",(e=>(0,r.is)(e,(0,r.number)())&&Number.isFinite(e))),(0,r.string)(),(0,r.array)((0,r.lazy)((()=>n.UnsafeJsonStruct))),(0,r.record)((0,r.string)(),(0,r.lazy)((()=>n.UnsafeJsonStruct)))]),n.JsonStruct=(0,r.coerce)(n.UnsafeJsonStruct,(0,r.any)(),(e=>((0,s.assertStruct)(e,n.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),n.isValidJson=function(e){try{return l(e),!0}catch{return!1}},n.getSafeJson=l,n.getJsonSize=function(e){(0,s.assertStruct)(e,n.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},n.jsonrpc2="2.0",n.JsonRpcVersionStruct=(0,r.literal)(n.jsonrpc2),n.JsonRpcIdStruct=(0,r.nullable)((0,r.union)([(0,r.number)(),(0,r.string)()])),n.JsonRpcErrorStruct=(0,n.object)({code:(0,r.integer)(),message:(0,r.string)(),data:i(n.JsonStruct),stack:i((0,r.string)())}),n.JsonRpcParamsStruct=(0,r.union)([(0,r.record)((0,r.string)(),n.JsonStruct),(0,r.array)(n.JsonStruct)]),n.JsonRpcRequestStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:i(n.JsonRpcParamsStruct)}),n.JsonRpcNotificationStruct=(0,n.object)({jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:i(n.JsonRpcParamsStruct)}),n.isJsonRpcNotification=function(e){return(0,r.is)(e,n.JsonRpcNotificationStruct)},n.assertIsJsonRpcNotification=function(e,t){(0,s.assertStruct)(e,n.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},n.isJsonRpcRequest=function(e){return(0,r.is)(e,n.JsonRpcRequestStruct)},n.assertIsJsonRpcRequest=function(e,t){(0,s.assertStruct)(e,n.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},n.PendingJsonRpcResponseStruct=(0,r.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:(0,r.optional)((0,r.unknown)()),error:(0,r.optional)(n.JsonRpcErrorStruct)}),n.JsonRpcSuccessStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:n.JsonStruct}),n.JsonRpcFailureStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,error:n.JsonRpcErrorStruct}),n.JsonRpcResponseStruct=(0,r.union)([n.JsonRpcSuccessStruct,n.JsonRpcFailureStruct]),n.isPendingJsonRpcResponse=function(e){return(0,r.is)(e,n.PendingJsonRpcResponseStruct)},n.assertIsPendingJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,n.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},n.isJsonRpcResponse=function(e){return(0,r.is)(e,n.JsonRpcResponseStruct)},n.assertIsJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,n.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},n.isJsonRpcSuccess=function(e){return(0,r.is)(e,n.JsonRpcSuccessStruct)},n.assertIsJsonRpcSuccess=function(e,t){(0,s.assertStruct)(e,n.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},n.isJsonRpcFailure=function(e){return(0,r.is)(e,n.JsonRpcFailureStruct)},n.assertIsJsonRpcFailure=function(e,t){(0,s.assertStruct)(e,n.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},n.isJsonRpcError=function(e){return(0,r.is)(e,n.JsonRpcErrorStruct)},n.assertIsJsonRpcError=function(e,t){(0,s.assertStruct)(e,n.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},n.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:n,permitNull:r}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(n||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||r&&null===e)}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/json.cjs"}],[1463,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/keyring.cjs"}],[1464,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.createProjectLogger=void 0;const s=(0,r(e("debug")).default)("metamask");n.createProjectLogger=function(e){return s.extend(e)},n.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/logging.cjs"}],[1465,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.calculateNumberSize=n.calculateStringSize=n.isASCII=n.isPlainObject=n.ESCAPE_CHARACTERS_REGEXP=n.JsonSize=n.getKnownPropertyNames=n.hasProperty=n.isObject=n.isNullOrUndefined=n.isNonEmptyArray=void 0,n.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},n.isNullOrUndefined=function(e){return null===e||e===undefined},n.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function r(e){return e.charCodeAt(0)<=127}n.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),n.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(n.JsonSize||(n.JsonSize={})),n.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,n.isPlainObject=function(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}},n.isASCII=r,n.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(e.match(n.ESCAPE_CHARACTERS_REGEXP)??[]).length},n.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/misc.cjs"}],[1466,{"./assert.cjs":1451,"./hex.cjs":1460},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.hexToBigInt=n.hexToNumber=n.bigIntToHex=n.numberToHex=void 0;const r=e("./assert.cjs"),s=e("./hex.cjs");n.numberToHex=e=>((0,r.assert)("number"==typeof e,"Value must be a number."),(0,r.assert)(e>=0,"Value must be a non-negative number."),(0,r.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,s.add0x)(e.toString(16)));n.bigIntToHex=e=>((0,r.assert)("bigint"==typeof e,"Value must be a bigint."),(0,r.assert)(e>=0,"Value must be a non-negative bigint."),(0,s.add0x)(e.toString(16)));n.hexToNumber=e=>{(0,s.assertIsHexString)(e);const t=parseInt(e,16);return(0,r.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};n.hexToBigInt=e=>((0,s.assertIsHexString)(e),BigInt((0,s.add0x)(e)))}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/number.cjs"}],[1467,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/opaque.cjs"}],[1468,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createDeferredPromise=void 0,n.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,n;const r=new Promise(((e,r)=>{t=e,n=r}));return e&&r.catch((e=>{})),{promise:r,resolve:t,reject:n}}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/promise.cjs"}],[1469,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.timeSince=n.inMilliseconds=n.Duration=void 0,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"}(n.Duration||(n.Duration={}));const r=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};n.inMilliseconds=function(e,t){return r(e,"count"),e*t},n.timeSince=function(e){return r(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/time.cjs"}],[147,{lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=e("lodash");n.default={version:12,migrate(e){const t=(0,r.cloneDeep)(e);t.meta.version=12;try{const e=function(e){const t=e;return t.NoticeController.noticesList.forEach((e=>{e.read&&(e.body="")})),t}(t.data);t.data=e}catch(e){console.warn(`MetaMask Migration #12${e.stack}`)}return Promise.resolve(t)}}}}},{package:"$root$",file:"app/scripts/migrations/012.js"}],[1470,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1471,{"./assert.cjs":1451,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.satisfiesVersionRange=n.gtRange=n.gtVersion=n.assertIsSemVerRange=n.assertIsSemVerVersion=n.isValidSemVerRange=n.isValidSemVerVersion=n.VersionRangeStruct=n.VersionStruct=void 0;const r=e("@metamask/superstruct"),s=e("semver"),o=e("./assert.cjs");n.VersionStruct=(0,r.refine)((0,r.string)(),"Version",(e=>null!==(0,s.valid)(e)||`Expected SemVer version, got "${e}"`)),n.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",(e=>null!==(0,s.validRange)(e)||`Expected SemVer range, got "${e}"`)),n.isValidSemVerVersion=function(e){return(0,r.is)(e,n.VersionStruct)},n.isValidSemVerRange=function(e){return(0,r.is)(e,n.VersionRangeStruct)},n.assertIsSemVerVersion=function(e){(0,o.assertStruct)(e,n.VersionStruct)},n.assertIsSemVerRange=function(e){(0,o.assertStruct)(e,n.VersionRangeStruct)},n.gtVersion=function(e,t){return(0,s.gt)(e,t)},n.gtRange=function(e,t){return(0,s.gtr)(e,t)},n.satisfiesVersionRange=function(e,t){return(0,s.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/ens-controller>@metamask/utils",file:"node_modules/@metamask/ens-controller/node_modules/@metamask/utils/dist/versions.cjs"}]],[],{}); \ No newline at end of file diff --git a/public/extensions/MetaMask_v10.22.2/background-7.js b/public/extensions/MetaMask_v10.22.2/background-7.js index 37994fa9e..518ab6030 100644 --- a/public/extensions/MetaMask_v10.22.2/background-7.js +++ b/public/extensions/MetaMask_v10.22.2/background-7.js @@ -1 +1 @@ -LavaPack.loadBundle([[818,{"../core/AxiosError":792,"../env/data":802},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../env/data").version,o=e("../core/AxiosError"),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,r){function i(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new o(i(n," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!s[n]&&(s[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},t.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),i=n.length;i-- >0;){var s=n[i],a=t[s];if(a){var c=e[s],l=c===undefined||a(c,s,e);if(!0!==l)throw new o("option "+s+" must be "+l,o.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new o("Unknown option "+s,o.ERR_BAD_OPTION)}},validators:i}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios",file:"node_modules/@ledgerhq/evm-tools/node_modules/axios/lib/helpers/validator.js"}],[819,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=FormData}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios",file:"node_modules/@ledgerhq/evm-tools/node_modules/axios/lib/platform/browser/classes/FormData.js"}],[820,{"../../../helpers/AxiosURLSearchParams":803},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../../helpers/AxiosURLSearchParams");t.exports="undefined"!=typeof URLSearchParams?URLSearchParams:n}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios",file:"node_modules/@ledgerhq/evm-tools/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"}],[821,{"./classes/FormData":819,"./classes/URLSearchParams":820},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={isBrowser:!0,classes:{URLSearchParams:e("./classes/URLSearchParams"),FormData:e("./classes/FormData"),Blob:Blob},protocols:["http","https","file","blob","url","data"]}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios",file:"node_modules/@ledgerhq/evm-tools/node_modules/axios/lib/platform/browser/index.js"}],[822,{"./node/":821},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("./node/")}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios",file:"node_modules/@ledgerhq/evm-tools/node_modules/axios/lib/platform/index.js"}],[823,{"./helpers/bind":804},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,o=e("./helpers/bind"),i=Object.prototype.toString,s=(n=Object.create(null),function(e){var t=i.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())});function a(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function c(e){return Array.isArray(e)}function l(e){return void 0===e}var u=a("ArrayBuffer");function d(e){return"number"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=a("Date"),g=a("File"),m=a("Blob"),b=a("FileList");function _(e){return"[object Function]"===i.call(e)}var y=a("URLSearchParams");function E(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),c(e))for(var r=0,n=e.length;r0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:function(e,t,r){e=String(e),(r===undefined||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(c(e))return e;var t=e.length;if(!d(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:v,isFileList:b,forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:O,hasOwnProperty:T}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios",file:"node_modules/@ledgerhq/evm-tools/node_modules/axios/lib/utils.js"}],[824,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.version=void 0,r.version="ethers/5.7.2"}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers",file:"node_modules/@ledgerhq/evm-tools/node_modules/ethers/lib/_version.js"}],[825,{"./_version":824,"./utils":827,"@ethersproject/abstract-signer":505,"@ethersproject/bignumber":514,"@ethersproject/constants":520,"@ethersproject/contracts":523,"@ethersproject/logger":544,"@ethersproject/providers":561,"@ethersproject/wallet":612,"@ethersproject/wordlists":617},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(r,"__esModule",{value:!0}),r.Wordlist=r.version=r.wordlists=r.utils=r.logger=r.errors=r.constants=r.FixedNumber=r.BigNumber=r.ContractFactory=r.Contract=r.BaseContract=r.providers=r.getDefaultProvider=r.VoidSigner=r.Wallet=r.Signer=void 0;var s=e("@ethersproject/contracts");Object.defineProperty(r,"BaseContract",{enumerable:!0,get:function(){return s.BaseContract}}),Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return s.Contract}}),Object.defineProperty(r,"ContractFactory",{enumerable:!0,get:function(){return s.ContractFactory}});var a=e("@ethersproject/bignumber");Object.defineProperty(r,"BigNumber",{enumerable:!0,get:function(){return a.BigNumber}}),Object.defineProperty(r,"FixedNumber",{enumerable:!0,get:function(){return a.FixedNumber}});var c=e("@ethersproject/abstract-signer");Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return c.Signer}}),Object.defineProperty(r,"VoidSigner",{enumerable:!0,get:function(){return c.VoidSigner}});var l=e("@ethersproject/wallet");Object.defineProperty(r,"Wallet",{enumerable:!0,get:function(){return l.Wallet}});var u=i(e("@ethersproject/constants"));r.constants=u;var d=i(e("@ethersproject/providers"));r.providers=d;var f=e("@ethersproject/providers");Object.defineProperty(r,"getDefaultProvider",{enumerable:!0,get:function(){return f.getDefaultProvider}});var p=e("@ethersproject/wordlists");Object.defineProperty(r,"Wordlist",{enumerable:!0,get:function(){return p.Wordlist}}),Object.defineProperty(r,"wordlists",{enumerable:!0,get:function(){return p.wordlists}});var h=i(e("./utils"));r.utils=h;var g=e("@ethersproject/logger");Object.defineProperty(r,"errors",{enumerable:!0,get:function(){return g.ErrorCode}});var m=e("./_version");Object.defineProperty(r,"version",{enumerable:!0,get:function(){return m.version}});var b=new g.Logger(m.version);r.logger=b}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers",file:"node_modules/@ledgerhq/evm-tools/node_modules/ethers/lib/ethers.js"}],[826,{"./ethers":825},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(r,"__esModule",{value:!0}),r.Wordlist=r.version=r.wordlists=r.utils=r.logger=r.errors=r.constants=r.FixedNumber=r.BigNumber=r.ContractFactory=r.Contract=r.BaseContract=r.providers=r.getDefaultProvider=r.VoidSigner=r.Wallet=r.Signer=r.ethers=void 0;var s=i(e("./ethers"));r.ethers=s;try{var a=window;null==a._ethers&&(a._ethers=s)}catch(e){}var c=e("./ethers");Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return c.Signer}}),Object.defineProperty(r,"Wallet",{enumerable:!0,get:function(){return c.Wallet}}),Object.defineProperty(r,"VoidSigner",{enumerable:!0,get:function(){return c.VoidSigner}}),Object.defineProperty(r,"getDefaultProvider",{enumerable:!0,get:function(){return c.getDefaultProvider}}),Object.defineProperty(r,"providers",{enumerable:!0,get:function(){return c.providers}}),Object.defineProperty(r,"BaseContract",{enumerable:!0,get:function(){return c.BaseContract}}),Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(r,"ContractFactory",{enumerable:!0,get:function(){return c.ContractFactory}}),Object.defineProperty(r,"BigNumber",{enumerable:!0,get:function(){return c.BigNumber}}),Object.defineProperty(r,"FixedNumber",{enumerable:!0,get:function(){return c.FixedNumber}}),Object.defineProperty(r,"constants",{enumerable:!0,get:function(){return c.constants}}),Object.defineProperty(r,"errors",{enumerable:!0,get:function(){return c.errors}}),Object.defineProperty(r,"logger",{enumerable:!0,get:function(){return c.logger}}),Object.defineProperty(r,"utils",{enumerable:!0,get:function(){return c.utils}}),Object.defineProperty(r,"wordlists",{enumerable:!0,get:function(){return c.wordlists}}),Object.defineProperty(r,"version",{enumerable:!0,get:function(){return c.version}}),Object.defineProperty(r,"Wordlist",{enumerable:!0,get:function(){return c.Wordlist}})}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers",file:"node_modules/@ledgerhq/evm-tools/node_modules/ethers/lib/index.js"}],[827,{"@ethersproject/abi":500,"@ethersproject/address":507,"@ethersproject/base64":509,"@ethersproject/basex":510,"@ethersproject/bytes":516,"@ethersproject/hash":529,"@ethersproject/hdnode":534,"@ethersproject/json-wallets":537,"@ethersproject/keccak256":542,"@ethersproject/logger":544,"@ethersproject/properties":550,"@ethersproject/random":573,"@ethersproject/rlp":576,"@ethersproject/sha2":579,"@ethersproject/signing-key":583,"@ethersproject/solidity":601,"@ethersproject/strings":605,"@ethersproject/transactions":608,"@ethersproject/units":610,"@ethersproject/wallet":612,"@ethersproject/web":615},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(r,"__esModule",{value:!0}),r.formatBytes32String=r.Utf8ErrorFuncs=r.toUtf8String=r.toUtf8CodePoints=r.toUtf8Bytes=r._toEscapedUtf8String=r.nameprep=r.hexDataSlice=r.hexDataLength=r.hexZeroPad=r.hexValue=r.hexStripZeros=r.hexConcat=r.isHexString=r.hexlify=r.base64=r.base58=r.TransactionDescription=r.LogDescription=r.Interface=r.SigningKey=r.HDNode=r.defaultPath=r.isBytesLike=r.isBytes=r.zeroPad=r.stripZeros=r.concat=r.arrayify=r.shallowCopy=r.resolveProperties=r.getStatic=r.defineReadOnly=r.deepCopy=r.checkProperties=r.poll=r.fetchJson=r._fetchData=r.RLP=r.Logger=r.checkResultErrors=r.FormatTypes=r.ParamType=r.FunctionFragment=r.EventFragment=r.ErrorFragment=r.ConstructorFragment=r.Fragment=r.defaultAbiCoder=r.AbiCoder=void 0,r.Indexed=r.Utf8ErrorReason=r.UnicodeNormalizationForm=r.SupportedAlgorithm=r.mnemonicToSeed=r.isValidMnemonic=r.entropyToMnemonic=r.mnemonicToEntropy=r.getAccountPath=r.verifyTypedData=r.verifyMessage=r.recoverPublicKey=r.computePublicKey=r.recoverAddress=r.computeAddress=r.getJsonWalletAddress=r.TransactionTypes=r.serializeTransaction=r.parseTransaction=r.accessListify=r.joinSignature=r.splitSignature=r.soliditySha256=r.solidityKeccak256=r.solidityPack=r.shuffled=r.randomBytes=r.sha512=r.sha256=r.ripemd160=r.keccak256=r.computeHmac=r.commify=r.parseUnits=r.formatUnits=r.parseEther=r.formatEther=r.isAddress=r.getCreate2Address=r.getContractAddress=r.getIcapAddress=r.getAddress=r._TypedDataEncoder=r.id=r.isValidName=r.namehash=r.hashMessage=r.dnsEncode=r.parseBytes32String=void 0;var s=e("@ethersproject/abi");Object.defineProperty(r,"AbiCoder",{enumerable:!0,get:function(){return s.AbiCoder}}),Object.defineProperty(r,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(r,"ConstructorFragment",{enumerable:!0,get:function(){return s.ConstructorFragment}}),Object.defineProperty(r,"defaultAbiCoder",{enumerable:!0,get:function(){return s.defaultAbiCoder}}),Object.defineProperty(r,"ErrorFragment",{enumerable:!0,get:function(){return s.ErrorFragment}}),Object.defineProperty(r,"EventFragment",{enumerable:!0,get:function(){return s.EventFragment}}),Object.defineProperty(r,"FormatTypes",{enumerable:!0,get:function(){return s.FormatTypes}}),Object.defineProperty(r,"Fragment",{enumerable:!0,get:function(){return s.Fragment}}),Object.defineProperty(r,"FunctionFragment",{enumerable:!0,get:function(){return s.FunctionFragment}}),Object.defineProperty(r,"Indexed",{enumerable:!0,get:function(){return s.Indexed}}),Object.defineProperty(r,"Interface",{enumerable:!0,get:function(){return s.Interface}}),Object.defineProperty(r,"LogDescription",{enumerable:!0,get:function(){return s.LogDescription}}),Object.defineProperty(r,"ParamType",{enumerable:!0,get:function(){return s.ParamType}}),Object.defineProperty(r,"TransactionDescription",{enumerable:!0,get:function(){return s.TransactionDescription}});var a=e("@ethersproject/address");Object.defineProperty(r,"getAddress",{enumerable:!0,get:function(){return a.getAddress}}),Object.defineProperty(r,"getCreate2Address",{enumerable:!0,get:function(){return a.getCreate2Address}}),Object.defineProperty(r,"getContractAddress",{enumerable:!0,get:function(){return a.getContractAddress}}),Object.defineProperty(r,"getIcapAddress",{enumerable:!0,get:function(){return a.getIcapAddress}}),Object.defineProperty(r,"isAddress",{enumerable:!0,get:function(){return a.isAddress}});var c=i(e("@ethersproject/base64"));r.base64=c;var l=e("@ethersproject/basex");Object.defineProperty(r,"base58",{enumerable:!0,get:function(){return l.Base58}});var u=e("@ethersproject/bytes");Object.defineProperty(r,"arrayify",{enumerable:!0,get:function(){return u.arrayify}}),Object.defineProperty(r,"concat",{enumerable:!0,get:function(){return u.concat}}),Object.defineProperty(r,"hexConcat",{enumerable:!0,get:function(){return u.hexConcat}}),Object.defineProperty(r,"hexDataSlice",{enumerable:!0,get:function(){return u.hexDataSlice}}),Object.defineProperty(r,"hexDataLength",{enumerable:!0,get:function(){return u.hexDataLength}}),Object.defineProperty(r,"hexlify",{enumerable:!0,get:function(){return u.hexlify}}),Object.defineProperty(r,"hexStripZeros",{enumerable:!0,get:function(){return u.hexStripZeros}}),Object.defineProperty(r,"hexValue",{enumerable:!0,get:function(){return u.hexValue}}),Object.defineProperty(r,"hexZeroPad",{enumerable:!0,get:function(){return u.hexZeroPad}}),Object.defineProperty(r,"isBytes",{enumerable:!0,get:function(){return u.isBytes}}),Object.defineProperty(r,"isBytesLike",{enumerable:!0,get:function(){return u.isBytesLike}}),Object.defineProperty(r,"isHexString",{enumerable:!0,get:function(){return u.isHexString}}),Object.defineProperty(r,"joinSignature",{enumerable:!0,get:function(){return u.joinSignature}}),Object.defineProperty(r,"zeroPad",{enumerable:!0,get:function(){return u.zeroPad}}),Object.defineProperty(r,"splitSignature",{enumerable:!0,get:function(){return u.splitSignature}}),Object.defineProperty(r,"stripZeros",{enumerable:!0,get:function(){return u.stripZeros}});var d=e("@ethersproject/hash");Object.defineProperty(r,"_TypedDataEncoder",{enumerable:!0,get:function(){return d._TypedDataEncoder}}),Object.defineProperty(r,"dnsEncode",{enumerable:!0,get:function(){return d.dnsEncode}}),Object.defineProperty(r,"hashMessage",{enumerable:!0,get:function(){return d.hashMessage}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return d.id}}),Object.defineProperty(r,"isValidName",{enumerable:!0,get:function(){return d.isValidName}}),Object.defineProperty(r,"namehash",{enumerable:!0,get:function(){return d.namehash}});var f=e("@ethersproject/hdnode");Object.defineProperty(r,"defaultPath",{enumerable:!0,get:function(){return f.defaultPath}}),Object.defineProperty(r,"entropyToMnemonic",{enumerable:!0,get:function(){return f.entropyToMnemonic}}),Object.defineProperty(r,"getAccountPath",{enumerable:!0,get:function(){return f.getAccountPath}}),Object.defineProperty(r,"HDNode",{enumerable:!0,get:function(){return f.HDNode}}),Object.defineProperty(r,"isValidMnemonic",{enumerable:!0,get:function(){return f.isValidMnemonic}}),Object.defineProperty(r,"mnemonicToEntropy",{enumerable:!0,get:function(){return f.mnemonicToEntropy}}),Object.defineProperty(r,"mnemonicToSeed",{enumerable:!0,get:function(){return f.mnemonicToSeed}});var p=e("@ethersproject/json-wallets");Object.defineProperty(r,"getJsonWalletAddress",{enumerable:!0,get:function(){return p.getJsonWalletAddress}});var h=e("@ethersproject/keccak256");Object.defineProperty(r,"keccak256",{enumerable:!0,get:function(){return h.keccak256}});var g=e("@ethersproject/logger");Object.defineProperty(r,"Logger",{enumerable:!0,get:function(){return g.Logger}});var m=e("@ethersproject/sha2");Object.defineProperty(r,"computeHmac",{enumerable:!0,get:function(){return m.computeHmac}}),Object.defineProperty(r,"ripemd160",{enumerable:!0,get:function(){return m.ripemd160}}),Object.defineProperty(r,"sha256",{enumerable:!0,get:function(){return m.sha256}}),Object.defineProperty(r,"sha512",{enumerable:!0,get:function(){return m.sha512}});var b=e("@ethersproject/solidity");Object.defineProperty(r,"solidityKeccak256",{enumerable:!0,get:function(){return b.keccak256}}),Object.defineProperty(r,"solidityPack",{enumerable:!0,get:function(){return b.pack}}),Object.defineProperty(r,"soliditySha256",{enumerable:!0,get:function(){return b.sha256}});var _=e("@ethersproject/random");Object.defineProperty(r,"randomBytes",{enumerable:!0,get:function(){return _.randomBytes}}),Object.defineProperty(r,"shuffled",{enumerable:!0,get:function(){return _.shuffled}});var y=e("@ethersproject/properties");Object.defineProperty(r,"checkProperties",{enumerable:!0,get:function(){return y.checkProperties}}),Object.defineProperty(r,"deepCopy",{enumerable:!0,get:function(){return y.deepCopy}}),Object.defineProperty(r,"defineReadOnly",{enumerable:!0,get:function(){return y.defineReadOnly}}),Object.defineProperty(r,"getStatic",{enumerable:!0,get:function(){return y.getStatic}}),Object.defineProperty(r,"resolveProperties",{enumerable:!0,get:function(){return y.resolveProperties}}),Object.defineProperty(r,"shallowCopy",{enumerable:!0,get:function(){return y.shallowCopy}});var E=i(e("@ethersproject/rlp"));r.RLP=E;var w=e("@ethersproject/signing-key");Object.defineProperty(r,"computePublicKey",{enumerable:!0,get:function(){return w.computePublicKey}}),Object.defineProperty(r,"recoverPublicKey",{enumerable:!0,get:function(){return w.recoverPublicKey}}),Object.defineProperty(r,"SigningKey",{enumerable:!0,get:function(){return w.SigningKey}});var v=e("@ethersproject/strings");Object.defineProperty(r,"formatBytes32String",{enumerable:!0,get:function(){return v.formatBytes32String}}),Object.defineProperty(r,"nameprep",{enumerable:!0,get:function(){return v.nameprep}}),Object.defineProperty(r,"parseBytes32String",{enumerable:!0,get:function(){return v.parseBytes32String}}),Object.defineProperty(r,"_toEscapedUtf8String",{enumerable:!0,get:function(){return v._toEscapedUtf8String}}),Object.defineProperty(r,"toUtf8Bytes",{enumerable:!0,get:function(){return v.toUtf8Bytes}}),Object.defineProperty(r,"toUtf8CodePoints",{enumerable:!0,get:function(){return v.toUtf8CodePoints}}),Object.defineProperty(r,"toUtf8String",{enumerable:!0,get:function(){return v.toUtf8String}}),Object.defineProperty(r,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return v.Utf8ErrorFuncs}});var P=e("@ethersproject/transactions");Object.defineProperty(r,"accessListify",{enumerable:!0,get:function(){return P.accessListify}}),Object.defineProperty(r,"computeAddress",{enumerable:!0,get:function(){return P.computeAddress}}),Object.defineProperty(r,"parseTransaction",{enumerable:!0,get:function(){return P.parse}}),Object.defineProperty(r,"recoverAddress",{enumerable:!0,get:function(){return P.recoverAddress}}),Object.defineProperty(r,"serializeTransaction",{enumerable:!0,get:function(){return P.serialize}}),Object.defineProperty(r,"TransactionTypes",{enumerable:!0,get:function(){return P.TransactionTypes}});var O=e("@ethersproject/units");Object.defineProperty(r,"commify",{enumerable:!0,get:function(){return O.commify}}),Object.defineProperty(r,"formatEther",{enumerable:!0,get:function(){return O.formatEther}}),Object.defineProperty(r,"parseEther",{enumerable:!0,get:function(){return O.parseEther}}),Object.defineProperty(r,"formatUnits",{enumerable:!0,get:function(){return O.formatUnits}}),Object.defineProperty(r,"parseUnits",{enumerable:!0,get:function(){return O.parseUnits}});var T=e("@ethersproject/wallet");Object.defineProperty(r,"verifyMessage",{enumerable:!0,get:function(){return T.verifyMessage}}),Object.defineProperty(r,"verifyTypedData",{enumerable:!0,get:function(){return T.verifyTypedData}});var A=e("@ethersproject/web");Object.defineProperty(r,"_fetchData",{enumerable:!0,get:function(){return A._fetchData}}),Object.defineProperty(r,"fetchJson",{enumerable:!0,get:function(){return A.fetchJson}}),Object.defineProperty(r,"poll",{enumerable:!0,get:function(){return A.poll}});var S=e("@ethersproject/sha2");Object.defineProperty(r,"SupportedAlgorithm",{enumerable:!0,get:function(){return S.SupportedAlgorithm}});var I=e("@ethersproject/strings");Object.defineProperty(r,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return I.UnicodeNormalizationForm}}),Object.defineProperty(r,"Utf8ErrorReason",{enumerable:!0,get:function(){return I.Utf8ErrorReason}})}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers",file:"node_modules/@ledgerhq/evm-tools/node_modules/ethers/lib/utils.js"}],[828,{"./errors":829,"./modules/Domains":830,"./modules/EIP712":831,"./services/ledger":835,"./utils":838,"@ledgerhq/logs":881,"bignumber.js":878,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.ledgerService=void 0;const a=e("bignumber.js"),c=e("@ledgerhq/logs"),l=e("./utils"),u=e("./modules/Domains"),d=s(e("./services/ledger"));r.ledgerService=d.default;const f=e("./errors"),p=e("./modules/EIP712");o(e("./utils"),r);const h={eth:1,erc20:2,erc721:3,erc20mintable:4,erc721mintable:5},g=e=>e&&27264===e.statusCode?new f.EthAppPleaseEnableContractData("Please enable Blind signing or Contract data in the Ethereum app Settings"):e;r.default=class{setLoadConfig(e){this.loadConfig=e}constructor(e,t="w0w",r={}){this.transport=e,this.loadConfig=r,e.decorateAppAPIMethods(this,["getAddress","signTransaction","signPersonalMessage","getAppConfiguration","signEIP712Message","signEIP712HashedMessage","starkGetPublicKey","starkSignOrder","starkSignOrder_v2","starkSignTransfer","starkSignTransfer_v2","starkProvideQuantum","starkProvideQuantum_v2","starkUnsafeSign","eth2GetPublicKey","eth2SetWithdrawalIndex","getEIP1024PublicEncryptionKey","getEIP1024SharedSecret"],t)}getAddress(e,r,n,o){const i=(0,l.splitPath)(e);let s=t.alloc(1+4*i.length);if(s[0]=i.length,i.forEach(((e,t)=>{s.writeUInt32BE(e,1+4*t)})),o){const e=t.alloc(8,0),r=t.from((0,l.padHexString)(new a.BigNumber(o).toString(16)),"hex");e.write(r.toString("hex"),e.length-r.length,"hex"),s=t.concat([s,e])}return this.transport.send(224,2,r?1:0,n?1:0,s).then((e=>{const t=e[0],r=e[1+t];return{publicKey:e.slice(1,1+t).toString("hex"),address:"0x"+e.slice(1+t+1,1+t+1+r).toString("ascii"),chainCode:n?e.slice(1+t+1+r,1+t+1+r+32).toString("hex"):undefined}}))}signTransaction(e,r,n){return i(this,void 0,void 0,(function*(){if(n===undefined&&(console.warn("hw-app-eth: signTransaction(path, rawTxHex, resolution): please provide the 'resolution' parameter. See https://github.com/LedgerHQ/ledgerjs/blob/master/packages/hw-app-eth/README.md – the previous signature is deprecated and providing the 3rd 'resolution' parameter explicitly will become mandatory so you have the control on the resolution and the fallback mecanism (e.g. fallback to blind signing or not).// Possible solution:\n + import { ledgerService } from '@ledgerhq/hw-app-eth';\n + const resolution = await ledgerService.resolveTransaction(rawTxHex);"),n=yield d.default.resolveTransaction(r,this.loadConfig,{externalPlugins:!0,erc20:!0}).catch((e=>(console.warn("an error occurred in resolveTransaction => fallback to blind signing: "+String(e)),null)))),n){for(const e of n.domains)yield(0,u.domainResolutionFlow)(this,e).catch((t=>{(0,c.log)("error","domainResolutionFlow failed",{domainDescriptor:e,error:t})}));for(const e of n.plugin)yield this.setPlugin(e);for(const{payload:e,signature:t}of n.externalPlugin)yield this.setExternalPlugin(e,t);for(const e of n.nfts)yield this.provideNFTInformation(e);for(const e of n.erc20Tokens)yield this.provideERC20TokenInformation(e)}const o=t.from(r,"hex"),{vrsOffset:i,txType:s,chainId:a,chainIdTruncated:f}=(0,l.decodeTxInfo)(o),p=(0,l.splitPath)(e);let h,m=0;for(;m!==o.length;){const e=0===m,r=e?149-4*p.length:150;let n=m+r>o.length?o.length-m:r;0!=i&&m+n>=i&&(n=o.length-m);const s=t.alloc(e?1+4*p.length+n:n);e?(s[0]=p.length,p.forEach(((e,t)=>{s.writeUInt32BE(e,1+4*t)})),o.copy(s,1+4*p.length,m,m+n)):o.copy(s,0,m,m+n),h=yield this.transport.send(224,4,e?0:128,0,s).catch((e=>{throw g(e)})),m+=n}const b=h[0];let _="";if(a.times(2).plus(35).plus(1).isGreaterThan(255)){const e=(2*f+35)%256,t=Math.abs(b-e);_=null!=s?t%2==1?"00":"01":a.times(2).plus(35).plus(t).toString(16)}else _=b.toString(16);_.length%2==1&&(_="0"+_);return{v:_,r:h.slice(1,33).toString("hex"),s:h.slice(33,65).toString("hex")}}))}clearSignTransaction(e,t,r){return i(this,arguments,void 0,(function*(e,t,r,n=!1){const o=yield d.default.resolveTransaction(t,this.loadConfig,r).catch((e=>{if(console.warn("an error occurred in resolveTransaction => fallback to blind signing: "+String(e)),n)throw e;return null}));return this.signTransaction(e,t,o)}))}getAppConfiguration(){return this.transport.send(224,6,0,0).then((e=>({arbitraryDataEnabled:1&e[0],erc20ProvisioningNecessary:2&e[0],starkEnabled:4&e[0],starkv2Supported:8&e[0],version:e[1]+"."+e[2]+"."+e[3]})))}signPersonalMessage(e,r){return i(this,void 0,void 0,(function*(){const n=(0,l.splitPath)(e);let o=0;const i=t.from(r,"hex");let s;for(;o!==i.length;){const e=0===o?149-4*n.length-4:150,r=o+e>i.length?i.length-o:e,a=t.alloc(0===o?1+4*n.length+4+r:r);0===o?(a[0]=n.length,n.forEach(((e,t)=>{a.writeUInt32BE(e,1+4*t)})),a.writeUInt32BE(i.length,1+4*n.length),i.copy(a,1+4*n.length+4,o,o+r)):i.copy(a,0,o,o+r),s=yield this.transport.send(224,8,0===o?0:128,0,a),o+=r}return{v:s[0],r:s.slice(1,33).toString("hex"),s:s.slice(33,65).toString("hex")}}))}signEIP712HashedMessage(e,t,r){return(0,p.signEIP712HashedMessage)(this.transport,e,t,r)}signEIP712Message(e,t){return i(this,arguments,void 0,(function*(e,t,r=!1){return(0,p.signEIP712Message)(this.transport,e,t,r,this.loadConfig)}))}getChallenge(){return i(this,void 0,void 0,(function*(){let e;return function(e){e[e.CLA=224]="CLA",e[e.INS=32]="INS",e[e.P1=0]="P1",e[e.P2=0]="P2",e[e.LC=0]="LC"}(e||(e={})),this.transport.send(e.CLA,e.INS,e.P1,e.P2).then((e=>{const[,t,r]=new RegExp("(.*)(.{4}$)").exec(e.toString("hex"))||[];if("9000"!==r)throw new Error(`An error happened while generating the challenge. Status code: ${r}`);return`0x${t}`})).catch((e=>{throw(0,c.log)("error","couldn't request a challenge",e),e}))}))}starkGetPublicKey(e,r){const n=(0,l.splitPath)(e),o=t.alloc(1+4*n.length);return o[0]=n.length,n.forEach(((e,t)=>{o.writeUInt32BE(e,1+4*t)})),this.transport.send(240,2,r?1:0,0,o).then((e=>e.slice(0,e.length-2)))}starkSignOrder(e,r,n,o,i,s,a,c,u,d,f){const p=(0,l.maybeHexBuffer)(r),h=(0,l.maybeHexBuffer)(o),g=(0,l.splitPath)(e),m=t.alloc(1+4*g.length+20+32+20+32+4+4+8+8+4+4,0);let b=0;return m[0]=g.length,g.forEach(((e,t)=>{m.writeUInt32BE(e,1+4*t)})),b=1+4*g.length,p&&p.copy(m,b),b+=20,t.from(n.toString(16).padStart(64,"0"),"hex").copy(m,b),b+=32,h&&h.copy(m,b),b+=20,t.from(i.toString(16).padStart(64,"0"),"hex").copy(m,b),b+=32,m.writeUInt32BE(s,b),b+=4,m.writeUInt32BE(a,b),b+=4,t.from(c.toString(16).padStart(16,"0"),"hex").copy(m,b),b+=8,t.from(u.toString(16).padStart(16,"0"),"hex").copy(m,b),b+=8,m.writeUInt32BE(d,b),b+=4,m.writeUInt32BE(f,b),this.transport.send(240,4,1,0,m).then((e=>({r:e.slice(1,33).toString("hex"),s:e.slice(33,65).toString("hex")})))}starkSignOrder_v2(e,r,n,o,i,s,a,c,u,d,f,p,g,m,b){const _=(0,l.maybeHexBuffer)(r),y=(0,l.maybeHexBuffer)(s);if(!(n in h))throw new Error("eth.starkSignOrderv2 invalid source quantization type="+n);if(!(a in h))throw new Error("eth.starkSignOrderv2 invalid destination quantization type="+a);const E=(0,l.splitPath)(e),w=t.alloc(1+4*E.length+1+20+32+32+1+20+32+32+4+4+8+8+4+4,0);let v=0;return w[0]=E.length,E.forEach(((e,t)=>{w.writeUInt32BE(e,1+4*t)})),v=1+4*E.length,w[v]=h[n],v++,_&&_.copy(w,v),v+=20,o&&t.from(o.toString(16).padStart(64,"0"),"hex").copy(w,v),v+=32,i&&t.from(i.toString(16).padStart(64,"0"),"hex").copy(w,v),v+=32,w[v]=h[a],v++,y&&y.copy(w,v),v+=20,c&&t.from(c.toString(16).padStart(64,"0"),"hex").copy(w,v),v+=32,u&&t.from(u.toString(16).padStart(64,"0"),"hex").copy(w,v),v+=32,w.writeUInt32BE(d,v),v+=4,w.writeUInt32BE(f,v),v+=4,t.from(p.toString(16).padStart(16,"0"),"hex").copy(w,v),v+=8,t.from(g.toString(16).padStart(16,"0"),"hex").copy(w,v),v+=8,w.writeUInt32BE(m,v),v+=4,w.writeUInt32BE(b,v),this.transport.send(240,4,3,0,w).then((e=>({r:e.slice(1,33).toString("hex"),s:e.slice(33,65).toString("hex")})))}starkSignTransfer(e,r,n,o,i,s,a,c,u){const d=(0,l.maybeHexBuffer)(r),f=(0,l.hexBuffer)(o),p=(0,l.splitPath)(e),h=t.alloc(1+4*p.length+20+32+32+4+4+8+4+4,0);let g=0;return h[0]=p.length,p.forEach(((e,t)=>{h.writeUInt32BE(e,1+4*t)})),g=1+4*p.length,d&&d.copy(h,g),g+=20,t.from(n.toString(16).padStart(64,"0"),"hex").copy(h,g),g+=32,f.copy(h,g),g+=32,h.writeUInt32BE(i,g),g+=4,h.writeUInt32BE(s,g),g+=4,t.from(a.toString(16).padStart(16,"0"),"hex").copy(h,g),g+=8,h.writeUInt32BE(c,g),g+=4,h.writeUInt32BE(u,g),this.transport.send(240,4,2,0,h).then((e=>({r:e.slice(1,33).toString("hex"),s:e.slice(33,65).toString("hex")})))}starkSignTransfer_v2(e,r,n,o,i,s,a,c,u,d,f,p,g){const m=(0,l.maybeHexBuffer)(r),b=(0,l.hexBuffer)(s),_=(0,l.maybeHexBuffer)(p);if(!(n in h))throw new Error("eth.starkSignTransferv2 invalid quantization type="+n);const y=(0,l.splitPath)(e),E=t.alloc(1+4*y.length+1+20+32+32+32+4+4+8+4+4+(_?52:0),0);let w=0;return E[0]=y.length,y.forEach(((e,t)=>{E.writeUInt32BE(e,1+4*t)})),w=1+4*y.length,E[w]=h[n],w++,m&&m.copy(E,w),w+=20,o&&t.from(o.toString(16).padStart(64,"0"),"hex").copy(E,w),w+=32,i&&t.from(i.toString(16).padStart(64,"0"),"hex").copy(E,w),w+=32,b.copy(E,w),w+=32,E.writeUInt32BE(a,w),w+=4,E.writeUInt32BE(c,w),w+=4,t.from(u.toString(16).padStart(16,"0"),"hex").copy(E,w),w+=8,E.writeUInt32BE(d,w),w+=4,E.writeUInt32BE(f,w),_&&g&&(w+=4,t.from(g.toString(16).padStart(64,"0"),"hex").copy(E,w),w+=32,_.copy(E,w)),this.transport.send(240,4,_?5:4,0,E).then((e=>({r:e.slice(1,33).toString("hex"),s:e.slice(33,65).toString("hex")})))}starkProvideQuantum(e,r){const n=(0,l.maybeHexBuffer)(e),o=t.alloc(52,0);return n&&n.copy(o,0),t.from(r.toString(16).padStart(64,"0"),"hex").copy(o,20),this.transport.send(240,8,0,0,o).then((()=>!0),(e=>{if(e&&27904===e.statusCode)return!1;throw e}))}starkProvideQuantum_v2(e,r,n,o){const i=(0,l.maybeHexBuffer)(e);if(!(r in h))throw new Error("eth.starkProvideQuantumV2 invalid quantization type="+r);const s=t.alloc(84,0);let a=0;return i&&i.copy(s,a),a+=20,n&&t.from(n.toString(16).padStart(64,"0"),"hex").copy(s,a),a+=32,o&&t.from(o.toString(16).padStart(64,"0"),"hex").copy(s,a),this.transport.send(240,8,h[r],0,s).then((()=>!0),(e=>{if(e&&27904===e.statusCode)return!1;throw e}))}starkUnsafeSign(e,r){const n=(0,l.hexBuffer)(r),o=(0,l.splitPath)(e),i=t.alloc(1+4*o.length+32);let s=0;return i[0]=o.length,o.forEach(((e,t)=>{i.writeUInt32BE(e,1+4*t)})),s=1+4*o.length,n.copy(i,s),this.transport.send(240,10,0,0,i).then((e=>({r:e.slice(1,33).toString("hex"),s:e.slice(33,65).toString("hex")})))}eth2GetPublicKey(e,r){const n=(0,l.splitPath)(e),o=t.alloc(1+4*n.length);return o[0]=n.length,n.forEach(((e,t)=>{o.writeUInt32BE(e,1+4*t)})),this.transport.send(224,14,r?1:0,0,o).then((e=>({publicKey:e.slice(0,-2).toString("hex")})))}eth2SetWithdrawalIndex(e){const r=t.alloc(4,0);return r.writeUInt32BE(e,0),this.transport.send(224,16,0,0,r).then((()=>!0),(e=>{if(e&&27904===e.statusCode)return!1;throw e}))}getEIP1024PublicEncryptionKey(e,r){const n=(0,l.splitPath)(e),o=t.alloc(1+4*n.length);return o[0]=n.length,n.forEach(((e,t)=>{o.writeUInt32BE(e,1+4*t)})),this.transport.send(224,24,r?1:0,0,o).then((e=>({publicKey:e.slice(0,-2).toString("hex")})))}getEIP1024SharedSecret(e,r,n){const o=(0,l.splitPath)(e),i=(0,l.hexBuffer)(r),s=t.alloc(1+4*o.length+32);let a=0;return s[0]=o.length,o.forEach(((e,t)=>{s.writeUInt32BE(e,1+4*t)})),a=1+4*o.length,i.copy(s,a),this.transport.send(224,24,n?1:0,1,s).then((e=>({sharedSecret:e.slice(0,-2).toString("hex")})))}provideERC20TokenInformation(e){const r=t.from(e,"hex");return this.transport.send(224,10,0,0,r).then((()=>!0),(e=>{if(e&&27904===e.statusCode)return!1;throw e}))}setExternalPlugin(e,r){const n=t.from(e,"hex"),o=t.from(null!=r?r:"","hex"),i=t.concat([n,o]);return this.transport.send(224,18,0,0,i).then((()=>!0),(e=>{if(e&&27264===e.statusCode)return!1;if(e&&27012===e.statusCode)return!1;if(e&&27904===e.statusCode)return!1;throw e}))}setPlugin(e){const r=t.from(e,"hex");return this.transport.send(224,22,0,0,r).then((()=>!0),(e=>{if(e&&27264===e.statusCode)return!1;if(e&&27012===e.statusCode)return!1;if(e&&27904===e.statusCode)return!1;throw e}))}provideNFTInformation(e){const r=t.from(e,"hex");return this.transport.send(224,20,0,0,r).then((()=>!0),(e=>{if(e&&27904===e.statusCode)throw new f.EthAppNftNotSupported;throw e}))}provideDomainName(e){return i(this,void 0,void 0,(function*(){let r;!function(e){e[e.CLA=224]="CLA",e[e.INS=34]="INS",e[e.P1_FIRST_CHUNK=1]="P1_FIRST_CHUNK",e[e.P1_FOLLOWING_CHUNK=0]="P1_FOLLOWING_CHUNK",e[e.P2=0]="P2"}(r||(r={}));const n=t.from(e,"hex"),o=t.concat([t.from((0,l.intAsHexBytes)(n.length,2),"hex"),n]),i=new Array(Math.ceil(o.length/256)).fill(null).map(((e,t)=>o.slice(255*t,255*(t+1))));for(const e of i){const t=e===i[0];yield this.transport.send(r.CLA,r.INS,t?r.P1_FIRST_CHUNK:r.P1_FOLLOWING_CHUNK,r.P2,e)}return!0}))}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/Eth.js"}],[829,{"@ledgerhq/errors":781},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.EthAppNftNotSupported=r.EthAppPleaseEnableContractData=void 0;const n=e("@ledgerhq/errors");r.EthAppPleaseEnableContractData=(0,n.createCustomErrorClass)("EthAppPleaseEnableContractData"),r.EthAppNftNotSupported=(0,n.createCustomErrorClass)("EthAppNftNotSupported")}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/errors.js"}],[830,{"../../services/ledger":835},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.domainResolutionFlow=void 0;const i=o(e("../../services/ledger"));r.domainResolutionFlow=(e,t)=>n(void 0,void 0,void 0,(function*(){if(!t)return;const{domain:r,address:n,registry:o,type:s}=t,a=yield e.getChallenge(),c="forward"===s?yield i.default.signDomainResolution(r,o,a):yield i.default.signAddressResolution(n,o,a);c&&(yield e.provideDomainName(c))}))}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/modules/Domains/index.js"}],[831,{"../../services/ledger/erc20":834,"../../services/ledger/loadConfig":836,"../../utils":838,"./utils":832,"@ledgerhq/evm-tools/lib/message/EIP712/index":782,buffer:3561,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.signEIP712HashedMessage=r.signEIP712Message=void 0;const i=o(e("semver")),s=e("@ledgerhq/evm-tools/lib/message/EIP712/index"),a=e("../../services/ledger/erc20"),c=e("../../utils"),l=e("../../services/ledger/loadConfig"),u=e("./utils"),d=(e,r)=>{let n;!function(e){e[e.CLA=224]="CLA",e[e.INS=26]="INS",e[e.P1_complete=0]="P1_complete",e[e.P1_partial=1]="P1_partial",e[e.P2_name=0]="P2_name",e[e.P2_field=255]="P2_field"}(n||(n={}));const{structType:o,value:i}=r,s="name"===o&&"string"==typeof i?t.from(i,"utf-8"):i;return e.send(n.CLA,n.INS,n.P1_complete,"name"===o?n.P2_name:n.P2_field,s)},f=(e,r)=>n(void 0,void 0,void 0,(function*(){var n;let o;!function(e){e[e.CLA=224]="CLA",e[e.INS=28]="INS",e[e.P1_complete=0]="P1_complete",e[e.P1_partial=1]="P1_partial",e[e.P2_root=0]="P2_root",e[e.P2_array=15]="P2_array",e[e.P2_field=255]="P2_field"}(o||(o={}));const{structType:i,value:s}=r;if("root"===i)return e.send(o.CLA,o.INS,o.P1_complete,o.P2_root,t.from(s,"utf-8"));if("array"===i)return e.send(o.CLA,o.INS,o.P1_complete,o.P2_array,t.from((0,c.intAsHexBytes)(s,1),"hex"));if("field"===i){const{data:r,type:i,sizeInBits:a}=s,l=null===(n=u.EIP712_TYPE_ENCODERS[i.toUpperCase()])||void 0===n?void 0:n.call(u.EIP712_TYPE_ENCODERS,r,a);if(l){const r=Math.floor(l.length/256),n=l.length%256,i=t.concat([t.from((0,c.intAsHexBytes)(r,1),"hex"),t.from((0,c.intAsHexBytes)(n,1),"hex"),l]),s=new Array(Math.ceil(i.length/256)).fill(null).map(((e,t)=>i.subarray(255*t,255*(t+1))));for(const t of s)yield e.send(o.CLA,o.INS,t!==s[s.length-1]?o.P1_partial:o.P1_complete,o.P2_field,t)}}return Promise.resolve()}));function p(e,r,o,i){return n(this,void 0,void 0,(function*(){let n;switch(function(e){e[e.CLA=224]="CLA",e[e.INS=30]="INS",e[e.P1_standard=0]="P1_standard",e[e.P1_discarded=1]="P1_discarded",e[e.P2_activate=0]="P2_activate",e[e.P2_discarded=1]="P2_discarded",e[e.P2_show_field=255]="P2_show_field",e[e.P2_message_info=15]="P2_message_info",e[e.P2_datetime=252]="P2_datetime",e[e.P2_amount_join_token=253]="P2_amount_join_token",e[e.P2_amount_join_value=254]="P2_amount_join_value",e[e.P2_raw=255]="P2_raw"}(n||(n={})),r){case"activate":return e.send(n.CLA,n.INS,n.P1_discarded,n.P2_activate);case"contractName":{const{displayName:r,filtersCount:o,sig:s}=i,{displayNameBuffer:a,sigBuffer:l}=(0,u.getFilterDisplayNameAndSigBuffers)(r,s),d=t.from((0,c.intAsHexBytes)(o,1),"hex"),f=t.concat([a,d,l]);return e.send(n.CLA,n.INS,n.P1_standard,n.P2_message_info,f)}case"showField":{const{displayName:r,sig:o,format:s,coinRef:c,chainId:l,coinRefsTokensMap:d,shouldUseV1Filters:f,erc20SignaturesBlob:p,isDiscarded:h}=i,{displayNameBuffer:g,sigBuffer:m}=(0,u.getFilterDisplayNameAndSigBuffers)(r,o);if(f){const r=t.concat([g,m]);return e.send(n.CLA,n.INS,n.P1_standard,n.P2_show_field,r)}if("token"===s&&c!==undefined){const{token:t,deviceTokenIndex:r}=d[c];if(r===undefined){const r=yield(0,a.byContractAddressAndChainId)(t,l,p);if(r){let t;!function(e){e[e.CLA=224]="CLA",e[e.INS=10]="INS",e[e.P1=0]="P1",e[e.P2=0]="P2"}(t||(t={}));const n=yield e.send(t.CLA,t.INS,t.P1,t.P2,r.data);d[c].deviceTokenIndex=n[0]}}}if("amount"===s&&255===c){const{token:t}=d[255],r=yield(0,a.byContractAddressAndChainId)(t,l,p);r&&(yield e.send(224,10,0,0,r.data),d[255].deviceTokenIndex=255)}if(!s)throw new Error("Missing format");const b={raw:n.P2_raw,datetime:n.P2_datetime,token:n.P2_amount_join_token,amount:n.P2_amount_join_value},_=(0,u.getPayloadForFilterV2)(s,c,d,g,m);return e.send(n.CLA,n.INS,h?n.P1_discarded:n.P1_standard,b[s],_)}case"discardField":{const{path:r}=i,o=t.from(r),s=t.from((0,c.intAsHexBytes)(o.length,1),"hex"),a=t.concat([s,o]);return e.send(n.CLA,n.INS,n.P1_standard,n.P2_discarded,a)}}}))}r.signEIP712Message=(e,r,o,...h)=>n(void 0,[e,r,o,...h],void 0,(function*(e,r,o,h=!1,g){let m;!function(e){e[e.CLA=224]="CLA",e[e.INS=12]="INS",e[e.P1=0]="P1",e[e.P2_v0=0]="P2_v0",e[e.P2_full=1]="P2_full"}(m||(m={}));const{primaryType:b,types:_,domain:y,message:E}=o,{calServiceURL:w}=(0,l.getLoadConfig)(g),v=(0,s.sortObjectAlphabetically)(_),{version:P}=yield(0,u.getAppAndVersion)(e),O=!i.default.gte(P,"1.11.1-0",{includePrerelease:!0}),T=i.default.gte(P,"1.12.0-0",{includePrerelease:!0}),A=yield(0,s.getFiltersForMessage)(o,O,w),S=(0,u.getCoinRefTokensMap)(A,O,o),I=Object.entries(v);for(const[t,r]of I){yield d(e,{structType:"name",value:t});for(const{name:t,type:n}of r){const r=(0,u.makeTypeEntryStructBuffer)({name:t,type:n});yield d(e,{structType:"field",value:r})}}A&&(yield p(e,"activate"));const C=O?undefined:yield(0,a.findERC20SignaturesInfo)(g,y.chainId||0),N=(({transport:e,loadConfig:t,chainId:r,erc20SignaturesBlob:o,types:i,filters:s,shouldUseV1Filters:a,shouldUseDiscardedFields:c,coinRefsTokensMap:l})=>{var d;const h={};for(const e in i)h[e]=null===(d=i[e])||void 0===d?void 0:d.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.name]:t.type})),{});const g=(t,i,...d)=>n(void 0,[t,i,...d],void 0,(function*(t,n,i=""){var d,m;const[b,_]=t,[y,...E]=_,w=!u.EIP712_TYPE_PROPERTIES[(null===(d=null==b?void 0:b.name)||void 0===d?void 0:d.toUpperCase())||""];if(Array.isArray(n)&&void 0!==y){yield f(e,{structType:"array",value:n.length});const t=`${i}.[]`;if(!n.length){const n=null==s?void 0:s.fields.filter((e=>e.path.startsWith(t)));if(n&&c)for(const t of n)yield p(e,"discardField",0,{path:t.path}),yield p(e,"showField",0,{displayName:t.label,sig:t.signature,format:t.format,coinRef:t.coin_ref,chainId:r,erc20SignaturesBlob:o,shouldUseV1Filters:a,coinRefsTokensMap:l,isDiscarded:!0})}for(const e of n)yield g([b,E],e,t)}else if(w)for(const[e,t]of Object.entries(n)){const r=null===(m=h[(null==b?void 0:b.name)||""])||void 0===m?void 0:m[e];r&&(yield g((0,u.destructTypeFromString)(r),t,`${i}.${e}`))}else{const t=null==s?void 0:s.fields.find((e=>i===e.path));t&&(yield p(e,"showField",0,{displayName:t.label,sig:t.signature,format:t.format,coinRef:t.coin_ref,chainId:r,erc20SignaturesBlob:o,shouldUseV1Filters:a,coinRefsTokensMap:l,isDiscarded:!1})),yield f(e,{structType:"field",value:{data:n,type:(null==b?void 0:b.name)||"",sizeInBits:null==b?void 0:b.size}})}}));return g})({transport:e,loadConfig:g,chainId:y.chainId||0,erc20SignaturesBlob:C,types:v,filters:A,shouldUseV1Filters:O,shouldUseDiscardedFields:T,coinRefsTokensMap:S}),x="EIP712Domain";yield f(e,{structType:"root",value:x});const R=v[x];for(const{name:e,type:t}of R){const r=y[e];yield N((0,u.destructTypeFromString)(t),r)}if(A){const{contractName:t,fields:r}=A,n={displayName:t.label,filtersCount:r.length,sig:t.signature};yield p(e,"contractName",0,n)}yield f(e,{structType:"root",value:b});const k=v[b];for(const{name:e,type:t}of k){const r=E[e];yield N((0,u.destructTypeFromString)(t),r,e)}const j=(0,c.splitPath)(r),L=t.alloc(1+4*j.length);return L[0]=j.length,j.forEach(((e,t)=>{L.writeUInt32BE(e,1+4*t)})),e.send(m.CLA,m.INS,m.P1,h?m.P2_v0:m.P2_full,L).then((e=>({v:e[0],r:e.subarray(1,33).toString("hex"),s:e.subarray(33,65).toString("hex")})))}));r.signEIP712HashedMessage=(e,r,n,o)=>{const i=(0,c.hexBuffer)(n),s=(0,c.hexBuffer)(o),a=(0,c.splitPath)(r),l=t.alloc(1+4*a.length+32+32,0);let u=0;return l[0]=a.length,a.forEach(((e,t)=>{l.writeUInt32BE(e,1+4*t)})),u=1+4*a.length,i.copy(l,u),u+=32,s.copy(l,u),e.send(224,12,0,0,l).then((e=>({v:e[0],r:e.subarray(1,33).toString("hex"),s:e.subarray(33,65).toString("hex")})))}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/modules/EIP712/index.js"}],[832,{"../../utils":838,"@ledgerhq/evm-tools/lib/message/index":783,"bignumber.js":878,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getPayloadForFilterV2=r.getFilterDisplayNameAndSigBuffers=r.getAppAndVersion=r.getCoinRefTokensMap=r.makeTypeEntryStructBuffer=r.constructTypeDescByteString=r.destructTypeFromString=r.EIP712_TYPE_ENCODERS=r.EIP712_TYPE_PROPERTIES=void 0;const i=o(e("bignumber.js")),s=e("@ledgerhq/evm-tools/lib/message/index"),a=e("../../utils");var c;!function(e){e[e.DYNAMIC=0]="DYNAMIC",e[e.FIXED=1]="FIXED"}(c||(c={})),r.EIP712_TYPE_PROPERTIES={CUSTOM:{key:()=>0,size:()=>null},INT:{key:()=>1,size:e=>Number(e)/8},UINT:{key:()=>2,size:e=>Number(e)/8},ADDRESS:{key:()=>3,size:()=>null},BOOL:{key:()=>4,size:()=>null},STRING:{key:()=>5,size:()=>null},BYTES:{key:e=>void 0!==e?6:7,size:e=>void 0!==e?Number(e):null}},r.EIP712_TYPE_ENCODERS={INT(e,r=256){const n=null!=e?e:"0";if("string"==typeof n&&(null==n?void 0:n.startsWith("0x")))return(0,a.hexBuffer)(n);let o=new i.default(n);if(o.lt(0)){const e=r/8;o=new i.default(`0x${t.alloc(e,255).toString("hex")}`).plus(o).plus(1)}const s=o.toString(16).length%2?"0"+o.toString(16):o.toString(16);return t.from(s,"hex")},UINT(e){return this.INT(e)},BOOL(e){return this.INT("boolean"==typeof e?Number(e).toString():e)},ADDRESS:e=>(0,a.hexBuffer)(null!=e?e:"").slice(0,20),STRING:e=>t.from(null!=e?e:"","utf-8"),BYTES(e,t){const r=null!=e?e:"";return(0,a.hexBuffer)(r).slice(0,null!=t?t:((null==r?void 0:r.length)-2)/2)}};r.destructTypeFromString=e=>{const t=new RegExp(/^([^[\]]*)(\[.*\])*/g),r=new RegExp(/\[(\d*)\]/g),n=new RegExp(/(?=u?int|bytes)([a-zA-Z-0-9]+?)(\d{1,3})$/g),[,o,i]=t.exec(e||"")||[],[,s=o,a]=n.exec(o||"")||[];return[s?{name:s,size:a?Number(a):undefined}:null,(i?[...i.matchAll(r)]:[]).map((([,e])=>e?Number(e):null))]};r.constructTypeDescByteString=(e,t,r)=>{if(r>=16)throw new Error("Eth utils - constructTypeDescByteString - Cannot accept a typeValue >= 16 because the typeValue can only be 4 bits in binary"+{isArray:e,typeSize:t,typeValue:r});const n=e?"1":"0",o="number"==typeof t?"1":"0",i=r.toString(2).padStart(4,"0");return(0,a.intAsHexBytes)(parseInt(n+o+"00"+i,2),1)};r.makeTypeEntryStructBuffer=({name:e,type:n})=>{var o,i,s,l;const[u,d]=(0,r.destructTypeFromString)(n),f=Boolean(d.length),p=r.EIP712_TYPE_PROPERTIES[(null===(o=null==u?void 0:u.name)||void 0===o?void 0:o.toUpperCase())||""]||r.EIP712_TYPE_PROPERTIES.CUSTOM,h=p.key(null==u?void 0:u.size),g=p.size(null==u?void 0:u.size),m=(0,r.constructTypeDescByteString)(f,g,h),b=[t.from(m,"hex")];return p===r.EIP712_TYPE_PROPERTIES.CUSTOM&&(b.push(t.from((0,a.intAsHexBytes)(null!==(s=null===(i=null==u?void 0:u.name)||void 0===i?void 0:i.length)&&void 0!==s?s:0,1),"hex")),b.push(t.from(null!==(l=null==u?void 0:u.name)&&void 0!==l?l:"","utf-8"))),"number"==typeof g&&b.push(t.from((0,a.intAsHexBytes)(g,1),"hex")),f&&(b.push(t.from((0,a.intAsHexBytes)(d.length,1),"hex")),d.forEach((e=>{"number"==typeof e?b.push(t.from((0,a.intAsHexBytes)(c.FIXED,1),"hex"),t.from((0,a.intAsHexBytes)(e,1),"hex")):b.push(t.from((0,a.intAsHexBytes)(c.DYNAMIC,1),"hex"))}))),b.push(t.from((0,a.intAsHexBytes)(e.length,1),"hex"),t.from(e,"utf-8")),t.concat(b)};r.getCoinRefTokensMap=(e,t,r)=>{const n={};if(t||!e)return n;const o=e.fields.filter((({format:e})=>"token"===e)).sort(((e,t)=>(e.coin_ref||0)-(t.coin_ref||0))).reduce(((e,t)=>{const n=(0,s.getValueFromPath)(t.path,r);if(Array.isArray(n))throw new Error("Array of tokens is not supported with a single coin ref");return[...e,{token:n,coinRef:t.coin_ref}]}),[]);for(const{token:e,coinRef:t}of o)n[t]={token:e};return e.fields.some((e=>"amount"===e.format&&255===e.coin_ref))&&r.domain.verifyingContract&&(n[255]={token:r.domain.verifyingContract}),n};r.getAppAndVersion=e=>n(void 0,void 0,void 0,(function*(){const t=yield e.send(176,1,0,0);let r=1;const n=t[r];r+=1;const o=t.subarray(r,r+n).toString("ascii");r+=n;const i=t[r];r+=1;return{name:o,version:t.subarray(r,r+i).toString("ascii")}}));r.getFilterDisplayNameAndSigBuffers=(e,r)=>{const n=t.from(e),o=t.from((0,a.intAsHexBytes)(n.length,1),"hex"),i=t.from(r,"hex"),s=t.from((0,a.intAsHexBytes)(i.length,1),"hex");return{displayNameBuffer:t.concat([o,n]),sigBuffer:t.concat([s,i])}};r.getPayloadForFilterV2=(e,r,n,o,i)=>{switch(e){case"raw":case"datetime":return t.concat([o,i]);case"token":{const{deviceTokenIndex:e}=n[r];return t.concat([t.from((0,a.intAsHexBytes)(e||r||0,1),"hex"),i])}case"amount":{const{deviceTokenIndex:e}=n[r];return t.concat([o,t.from((0,a.intAsHexBytes)(e||r||0,1),"hex"),i])}default:throw new Error("Invalid format")}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/modules/EIP712/utils.js"}],[833,{"./loadConfig":836,"@ledgerhq/logs":881,axios:839},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.loadInfosForContractMethod=void 0;const i=o(e("axios")),s=e("./loadConfig"),a=e("@ledgerhq/logs");r.loadInfosForContractMethod=(e,t,r,o)=>n(void 0,void 0,void 0,(function*(){const{pluginBaseURL:r,extraPlugins:n}=(0,s.getLoadConfig)(o);let c={};if(r){const e=`${r}/plugins/ethereum.json`;c=yield i.default.get(`${r}/plugins/ethereum.json`).then((e=>e.data)).catch((t=>((0,a.log)("error","could not fetch from "+e+": "+String(t)),null)))}if(n&&(c=Object.assign(Object.assign({},c),n)),!c)return;const l=t.toLowerCase(),u=e.toLowerCase();if(u in c){const e=c[u];if(l in e)return{payload:e[l].serialized_data,signature:e[l].signature,plugin:e[l].plugin,erc20OfInterest:e[l].erc20OfInterest,abi:e.abi}}}))}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/contracts.js"}],[834,{"./loadConfig":836,"@ledgerhq/cryptoassets-evm-signatures/lib/data/evm/index":737,"@ledgerhq/logs":881,axios:839,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.byContractAddressAndChainId=r.findERC20SignaturesInfo=void 0;const i=o(e("axios")),s=e("@ledgerhq/logs"),a=e("@ledgerhq/cryptoassets-evm-signatures/lib/data/evm/index"),c=e("./loadConfig"),l=e=>{const t=e.toLowerCase();return t.startsWith("0x")?t:"0x"+t};r.findERC20SignaturesInfo=(e,t)=>n(void 0,void 0,void 0,(function*(){const{cryptoassetsBaseURL:r}=(0,c.getLoadConfig)(e);if(!r)return null;const n=`${r}/evm/${t}/erc20-signatures.json`;return yield i.default.get(n).then((({data:e})=>{if(!e||"string"!=typeof e)throw new Error(`ERC20 signatures for chainId ${t} file is malformed ${n}`);return e})).catch((e=>((0,s.log)("error","could not fetch from "+n+": "+String(e)),null)))}));r.byContractAddressAndChainId=(e,t,r)=>{var n,o;if(r)try{return u(r).byContractAndChainId(l(e),t)}catch(r){return null===(n=d(t))||void 0===n?void 0:n.byContractAndChainId(l(e),t)}return null===(o=d(t))||void 0===o?void 0:o.byContractAndChainId(l(e),t)};const u=e=>{const r=t.from(e,"base64"),n={},o=[];let i=0;for(;io,byContractAndChainId:(e,t)=>n[String(t)+":"+e]}},d=(()=>{const e={};return t=>{if(e[t])return e[t];const r=a.signatures[t];if(!r)return null;const n=u(r);return e[t]=n,n}})()}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/erc20.js"}],[835,{"../../utils":838,"./contracts":833,"./erc20":834,"./nfts":837,"@ethersproject/abi":500,"@ledgerhq/domain-service/lib/signers/index":739,"@ledgerhq/logs":881,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(r,"__esModule",{value:!0});const o=e("@ledgerhq/logs"),i=e("@ethersproject/abi"),s=e("@ledgerhq/domain-service/lib/signers/index"),a=e("./erc20"),c=e("./contracts"),l=e("./nfts"),u=e("../../utils"),d=(e,t,r,i)=>n(void 0,void 0,void 0,(function*(){const n={nfts:[],erc20Tokens:[]};if(i.nft){const i=yield(0,l.getNFTInfo)(e,t,r);i?((0,o.log)("ethereum","loaded nft info for "+i.contractAddress+" ("+i.collectionName+")"),n.nfts.push(i.data)):(0,o.log)("ethereum","couldn't load nft info for "+e)}if(i.token){const i=yield(0,a.findERC20SignaturesInfo)(r,t),s=(0,a.byContractAddressAndChainId)(e,t,i);s?((0,o.log)("ethereum","loaded erc20token info for "+s.contractAddress+" ("+s.ticker+")"),n.erc20Tokens.push(s.data.toString("hex"))):(0,o.log)("ethereum","couldn't load erc20token info for "+e)}return n}));r.default={resolveTransaction:(e,r,s)=>n(void 0,void 0,void 0,(function*(){const a=t.from(e,"hex"),{decodedTx:f,chainIdTruncated:p}=(0,u.decodeTxInfo)(a),{domains:h}=s,g=f.to,m=f.data.length>=10&&f.data.substring(0,10),b=[];if(m){const e={token:s.erc20&&u.tokenSelectors.includes(m),nft:s.nft&&u.nftSelectors.includes(m),externalPlugins:s.externalPlugins},t=yield((e,t,r,s,a,f)=>n(void 0,void 0,void 0,(function*(){let n={externalPlugin:[],plugin:[],nfts:[],erc20Tokens:[],domains:[]};if(f.nft){const r=yield(0,l.loadNftPlugin)(e,t,s,a);r?n.plugin.push(r):(0,o.log)("ethereum","no NFT plugin payload for selector "+t+" and address "+e)}if(f.externalPlugins){const l=yield(0,c.loadInfosForContractMethod)(e,t,s,a);if(l){const{plugin:e,payload:c,signature:f,erc20OfInterest:p,abi:h}=l;if(e&&((0,o.log)("ethereum",`found plugin (${e}) for selector: ${t}`),n.externalPlugin.push({payload:c,signature:f})),p&&p.length&&h){const e=new i.Interface(h).parseTransaction(r).args;for(const t of p){const r=t.split(".").reduce(((e,t)=>"-1"===t&&Array.isArray(e)?e[e.length-1]:e[t]),e),o=yield d(r,s,a,{nft:!1,externalPlugins:!1,token:!0});n=(0,u.mergeResolutions)([n,o])}}}else(0,o.log)("ethereum","no infos for selector "+t)}return n})))(g,m,f,p,r,e);t&&b.push(t);const a=yield d(g,p,r,e);a&&b.push(a)}if(h){const e={domains:h};b.push(e)}return(0,u.mergeResolutions)(b)})),signDomainResolution:s.signDomainResolution,signAddressResolution:s.signAddressResolution}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/index.js"}],[836,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getLoadConfig=void 0;const n={nftExplorerBaseURL:"https://nft.api.live.ledger.com/v1/ethereum",pluginBaseURL:"https://cdn.live.ledger.com",extraPlugins:null,cryptoassetsBaseURL:"https://cdn.live.ledger.com/cryptoassets",calServiceURL:"https://crypto-assets-service.api.ledger.com"};r.getLoadConfig=function(e){return Object.assign(Object.assign({},n),e)}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/loadConfig.js"}],[837,{"./loadConfig":836,"@ledgerhq/logs":881,axios:839},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.loadNftPlugin=r.getNFTInfo=void 0;const i=o(e("axios")),s=e("./loadConfig"),a=e("@ledgerhq/logs");r.getNFTInfo=(e,t,r)=>n(void 0,void 0,void 0,(function*(){var n;const{nftExplorerBaseURL:o}=(0,s.getLoadConfig)(r);if(!o)return;const c=`${o}/${t}/contracts/${e}`,l=yield i.default.get(c).then((e=>e.data)).catch((e=>((0,a.log)("error","could not fetch from "+c+": "+String(e)),null)));if(!l)return;const u=l.payload,d=parseInt(u.slice(4,6),16),f=null===(n=u.substr(6,2*d).match(/.{2}/g))||void 0===n?void 0:n.reduce(((e,t)=>e+String.fromCharCode(parseInt(t,16))),"");return{contractAddress:e,collectionName:f||"",data:u}}));r.loadNftPlugin=(e,t,r,o)=>n(void 0,void 0,void 0,(function*(){const{nftExplorerBaseURL:n}=(0,s.getLoadConfig)(o);if(!n)return;const c=`${n}/${r}/contracts/${e}/plugin-selector/${t}`,l=yield i.default.get(c).then((e=>e.data)).catch((e=>((0,a.log)("error","could not fetch from "+c+": "+String(e)),null)));if(!l)return;return l.payload}))}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/nfts.js"}],[838,{"@ethersproject/rlp":576,"@ledgerhq/evm-tools/lib/selectors/index":784,"bignumber.js":878,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.mergeResolutions=r.nftSelectors=r.tokenSelectors=r.intAsHexBytes=r.decodeTxInfo=r.maybeHexBuffer=r.hexBuffer=r.splitPath=r.padHexString=r.ERC1155_CLEAR_SIGNED_SELECTORS=r.ERC721_CLEAR_SIGNED_SELECTORS=r.ERC20_CLEAR_SIGNED_SELECTORS=void 0;const n=e("bignumber.js"),o=e("@ledgerhq/evm-tools/lib/selectors/index");Object.defineProperty(r,"ERC20_CLEAR_SIGNED_SELECTORS",{enumerable:!0,get:function(){return o.ERC20_CLEAR_SIGNED_SELECTORS}}),Object.defineProperty(r,"ERC721_CLEAR_SIGNED_SELECTORS",{enumerable:!0,get:function(){return o.ERC721_CLEAR_SIGNED_SELECTORS}}),Object.defineProperty(r,"ERC1155_CLEAR_SIGNED_SELECTORS",{enumerable:!0,get:function(){return o.ERC1155_CLEAR_SIGNED_SELECTORS}});const i=e("@ethersproject/rlp");function s(e){const n=e.startsWith("0x")?e.slice(2):e;return t.from((0,r.padHexString)(n),"hex")}r.padHexString=e=>e.length%2?"0"+e:e,r.splitPath=function(e){const t=[];return e.split("/").forEach((e=>{let r=parseInt(e,10);isNaN(r)||(e.length>1&&"'"===e[e.length-1]&&(r+=2147483648),t.push(r))})),t},r.hexBuffer=s,r.maybeHexBuffer=function(e){return e?s(e):null};r.decodeTxInfo=e=>{const r=[1,2].includes(e[0])?e[0]:null,o=null===r?e:e.slice(1),s=(0,i.decode)(o).map((e=>t.from(e.slice(2),"hex")));let a=0;const c=(0,i.decode)(o);let l;l=2===r?{data:c[7],to:c[5],chainId:s[0]}:1===r?{data:c[6],to:c[4],chainId:s[0]}:{data:c[5],to:c[3],chainId:s.length>6?s[6]:t.from("0x01","hex")};const u=l.chainId;let d=new n.BigNumber(0);if(u){d=new n.BigNumber(u.toString("hex"),16);const e=t.alloc(4);u.length>4?u.copy(e):u.copy(e,4-u.length),a=e.readUInt32BE(0)}let f=0;if(null===r&&s.length>6){const r=t.from((0,i.encode)(s.slice(-3)).slice(2),"hex");if(f=e.length-(r.length-1),r[0]>247){f++;f+=r[0]-247-1}}return{decodedTx:l,txType:r,chainId:d,chainIdTruncated:a,vrsOffset:f}};r.intAsHexBytes=(e,t)=>e.toString(16).padStart(2*t,"0"),r.tokenSelectors=Object.values(o.ERC20_CLEAR_SIGNED_SELECTORS),r.nftSelectors=[...Object.values(o.ERC721_CLEAR_SIGNED_SELECTORS),...Object.values(o.ERC1155_CLEAR_SIGNED_SELECTORS)];r.mergeResolutions=e=>{const t={nfts:[],erc20Tokens:[],externalPlugin:[],plugin:[],domains:[]};for(const r of e)for(const e in r)t[e].push(...r[e]);return t}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/utils.js"}],[839,{"./lib/axios":841},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("./lib/axios")}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/index.js"}],[840,{"../cancel/CanceledError":843,"../core/AxiosError":846,"../core/buildFullPath":848,"../defaults/transitional":854,"../helpers/parseProtocol":868,"../platform":876,"./../core/settle":851,"./../helpers/buildURL":859,"./../helpers/cookies":861,"./../helpers/isURLSameOrigin":865,"./../helpers/parseHeaders":867,"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils"),o=e("./../core/settle"),i=e("./../helpers/cookies"),s=e("./../helpers/buildURL"),a=e("../core/buildFullPath"),c=e("./../helpers/parseHeaders"),l=e("./../helpers/isURLSameOrigin"),u=e("../defaults/transitional"),d=e("../core/AxiosError"),f=e("../cancel/CanceledError"),p=e("../helpers/parseProtocol"),h=e("../platform");t.exports=function(e){return new Promise((function(t,r){var g,m=e.data,b=e.headers,_=e.responseType,y=e.withXSRFToken;function E(){e.cancelToken&&e.cancelToken.unsubscribe(g),e.signal&&e.signal.removeEventListener("abort",g)}n.isFormData(m)&&n.isStandardBrowserEnv()&&delete b["Content-Type"];var w=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"",P=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";b.Authorization="Basic "+btoa(v+":"+P)}var O=a(e.baseURL,e.url);function T(){if(w){var n="getAllResponseHeaders"in w?c(w.getAllResponseHeaders()):null,i={data:_&&"text"!==_&&"json"!==_?w.response:w.responseText,status:w.status,statusText:w.statusText,headers:n,config:e,request:w};o((function(e){t(e),E()}),(function(e){r(e),E()}),i),w=null}}if(w.open(e.method.toUpperCase(),s(O,e.params,e.paramsSerializer),!0),w.timeout=e.timeout,"onloadend"in w?w.onloadend=T:w.onreadystatechange=function(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&0===w.responseURL.indexOf("file:"))&&setTimeout(T)},w.onabort=function(){w&&(r(new d("Request aborted",d.ECONNABORTED,e,w)),w=null)},w.onerror=function(){r(new d("Network Error",d.ERR_NETWORK,e,w)),w=null},w.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new d(t,n.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,w)),w=null},n.isStandardBrowserEnv()&&(y&&n.isFunction(y)&&(y=y(e)),y||!1!==y&&l(O))){var A=e.xsrfHeaderName&&e.xsrfCookieName&&i.read(e.xsrfCookieName);A&&(b[e.xsrfHeaderName]=A)}"setRequestHeader"in w&&n.forEach(b,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete b[t]:w.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(w.withCredentials=!!e.withCredentials),_&&"json"!==_&&(w.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&w.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&w.upload&&w.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(g=function(t){w&&(r(!t||t.type?new f(null,e,w):t),w.abort(),w=null)},e.cancelToken&&e.cancelToken.subscribe(g),e.signal&&(e.signal.aborted?g():e.signal.addEventListener("abort",g))),m||!1===m||0===m||""===m||(m=null);var S=p(O);S&&-1===h.protocols.indexOf(S)?r(new d("Unsupported protocol "+S+":",d.ERR_BAD_REQUEST,e)):w.send(m)}))}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/adapters/xhr.js"}],[841,{"../lib/core/AxiosError":846,"./cancel/CancelToken":842,"./cancel/CanceledError":843,"./cancel/isCancel":844,"./core/Axios":845,"./core/mergeConfig":850,"./defaults":853,"./env/data":856,"./helpers/bind":858,"./helpers/formDataToJSON":862,"./helpers/isAxiosError":864,"./helpers/spread":869,"./helpers/toFormData":870,"./utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./utils"),o=e("./helpers/bind"),i=e("./core/Axios"),s=e("./core/mergeConfig"),a=e("./defaults"),c=e("./helpers/formDataToJSON");var l=function e(t){var r=new i(t),a=o(i.prototype.request,r);return n.extend(a,i.prototype,r),n.extend(a,r),a.create=function(r){return e(s(t,r))},a}(a);l.Axios=i,l.CanceledError=e("./cancel/CanceledError"),l.CancelToken=e("./cancel/CancelToken"),l.isCancel=e("./cancel/isCancel"),l.VERSION=e("./env/data").version,l.toFormData=e("./helpers/toFormData"),l.AxiosError=e("../lib/core/AxiosError"),l.Cancel=l.CanceledError,l.all=function(e){return Promise.all(e)},l.spread=e("./helpers/spread"),l.isAxiosError=e("./helpers/isAxiosError"),l.formToJSON=function(e){return c(n.isHTMLForm(e)?new FormData(e):e)},t.exports=l,t.exports.default=l}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/axios.js"}],[842,{"./CanceledError":843},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./CanceledError");function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,o,i){r.reason||(r.reason=new n(e,o,i),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},t.exports=o}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/cancel/CancelToken.js"}],[843,{"../core/AxiosError":846,"../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../core/AxiosError");function o(e,t,r){n.call(this,null==e?"canceled":e,n.ERR_CANCELED,t,r),this.name="CanceledError"}e("../utils").inherits(o,n,{__CANCEL__:!0}),t.exports=o}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/cancel/CanceledError.js"}],[844,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){return!(!e||!e.__CANCEL__)}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/cancel/isCancel.js"}],[845,{"../helpers/buildURL":859,"../helpers/validator":872,"./../utils":877,"./InterceptorManager":847,"./buildFullPath":848,"./dispatchRequest":849,"./mergeConfig":850},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils"),o=e("../helpers/buildURL"),i=e("./InterceptorManager"),s=e("./dispatchRequest"),a=e("./mergeConfig"),c=e("./buildFullPath"),l=e("../helpers/validator"),u=l.validators;function d(e){this.defaults=e,this.interceptors={request:new i,response:new i}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;r!==undefined&&l.assertOptions(r,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var o=t.paramsSerializer;o!==undefined&&l.assertOptions(o,{encode:u.function,serialize:u.function},!0),n.isFunction(o)&&(t.paramsSerializer={serialize:o});var i=[],c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));var d,f=[];if(this.interceptors.response.forEach((function(e){f.push(e.fulfilled,e.rejected)})),!c){var p=[s,undefined];for(Array.prototype.unshift.apply(p,i),p=p.concat(f),d=Promise.resolve(t);p.length;)d=d.then(p.shift(),p.shift());return d}for(var h=t;i.length;){var g=i.shift(),m=i.shift();try{h=g(h)}catch(e){m(e);break}}try{d=s(h)}catch(e){return Promise.reject(e)}for(;f.length;)d=d.then(f.shift(),f.shift());return d},d.prototype.getUri=function(e){e=a(this.defaults,e);var t=c(e.baseURL,e.url);return o(t,e.params,e.paramsSerializer)},n.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(a(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),t.exports=d}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/Axios.js"}],[846,{"../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../utils");function o(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)}n.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i=o.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){s[e]={value:e}})),Object.defineProperties(o,s),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=function(e,t,r,s,a,c){var l=Object.create(i);return n.toFlatObject(e,l,(function(e){return e!==Error.prototype})),o.call(l,e.message,t,r,s,a),l.cause=e,l.name=e.name,c&&Object.assign(l,c),l},t.exports=o}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/AxiosError.js"}],[847,{"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils");function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.clear=function(){this.handlers&&(this.handlers=[])},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},t.exports=o}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/InterceptorManager.js"}],[848,{"../helpers/combineURLs":860,"../helpers/isAbsoluteURL":863},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../helpers/isAbsoluteURL"),o=e("../helpers/combineURLs");t.exports=function(e,t){return e&&!n(t)?o(e,t):t}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/buildFullPath.js"}],[849,{"../cancel/CanceledError":843,"../cancel/isCancel":844,"../defaults":853,"../helpers/normalizeHeaderName":866,"./../utils":877,"./transformData":852},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils"),o=e("./transformData"),i=e("../cancel/isCancel"),s=e("../defaults"),a=e("../cancel/CanceledError"),c=e("../helpers/normalizeHeaderName");function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a}t.exports=function(e){return l(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,null,e.transformRequest),c(e.headers,"Accept"),c(e.headers,"Content-Type"),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return l(e),t.data=o.call(e,t.data,t.headers,t.status,e.transformResponse),t}),(function(t){return i(t)||(l(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)}))}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/dispatchRequest.js"}],[85,{"../util":135,"@metamask/json-rpc-engine":1780},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createPendingNonceMiddleware=function({getPendingNonce:e}){return(0,n.createAsyncMiddleware)((async(t,r,n)=>{const{method:o,params:i}=t;if("eth_getTransactionCount"!==o)return void n();const[s,a]=i;"pending"===a?r.result=await e(s,t.networkClientId):n()}))},r.createPendingTxMiddleware=function({getPendingTransactionByHash:e}){return(0,n.createAsyncMiddleware)((async(t,r,n)=>{const{method:i,params:s}=t;if("eth_getTransactionByHash"!==i)return void n();const[a]=s,c=e(a);c?r.result=(0,o.formatTxMetaForRpcResult)(c):n()}))};var n=e("@metamask/json-rpc-engine"),o=e("../util")}}},{package:"$root$",file:"app/scripts/lib/middleware/pending.js"}],[850,{"../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../utils");t.exports=function(e,t){t=t||{};var r={};function o(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isEmptyObject(t)?n.merge({},e):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function i(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:o(undefined,e[r]):o(e[r],t[r])}function s(e){if(!n.isUndefined(t[e]))return o(undefined,t[e])}function a(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:o(undefined,e[r]):o(undefined,t[r])}function c(r){return r in t?o(e[r],t[r]):r in e?o(undefined,e[r]):void 0}var l={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:c};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=l[e]||i,o=t(e);n.isUndefined(o)&&t!==c||(r[e]=o)})),r}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/mergeConfig.js"}],[851,{"./AxiosError":846},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./AxiosError");t.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(new n("Request failed with status code "+r.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/settle.js"}],[852,{"../defaults":853,"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils"),o=e("../defaults");t.exports=function(e,t,r,i){var s=this||o;return n.forEach(i,(function(n){e=n.call(s,e,t,r)})),e}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/transformData.js"}],[853,{"../adapters/http":840,"../adapters/xhr":840,"../core/AxiosError":846,"../helpers/formDataToJSON":862,"../helpers/normalizeHeaderName":866,"../helpers/toFormData":870,"../helpers/toURLEncodedForm":871,"../platform":876,"../utils":877,"./transitional":854,_process:4523},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("../utils"),o=e("../helpers/normalizeHeaderName"),i=e("../core/AxiosError"),s=e("./transitional"),a=e("../helpers/toFormData"),c=e("../helpers/toURLEncodedForm"),l=e("../platform"),u=e("../helpers/formDataToJSON"),d={"Content-Type":"application/x-www-form-urlencoded"};function f(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var p,h={transitional:s,adapter:("undefined"!=typeof XMLHttpRequest?p=e("../adapters/xhr"):void 0!==r&&"[object process]"===Object.prototype.toString.call(r)&&(p=e("../adapters/http")),p),transformRequest:[function(e,t){o(t,"Accept"),o(t,"Content-Type");var r,i=t&&t["Content-Type"]||"",s=i.indexOf("application/json")>-1,l=n.isObject(e);if(l&&n.isHTMLForm(e)&&(e=new FormData(e)),n.isFormData(e))return s?JSON.stringify(u(e)):e;if(n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e))return e;if(n.isArrayBufferView(e))return e.buffer;if(n.isURLSearchParams(e))return f(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();if(l){if(-1!==i.indexOf("application/x-www-form-urlencoded"))return c(e,this.formSerializer).toString();if((r=n.isFileList(e))||i.indexOf("multipart/form-data")>-1){var d=this.env&&this.env.FormData;return a(r?{"files[]":e}:e,d&&new d,this.formSerializer)}}return l||s?(f(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||h.transitional,r=t&&t.forcedJSONParsing,o="json"===this.responseType;if(e&&n.isString(e)&&(r&&!this.responseType||o)){var s=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i.from(e,i.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:l.classes.FormData,Blob:l.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){h.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){h.headers[e]=n.merge(d)})),t.exports=h}).call(this)}).call(this,e("_process"))}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/defaults/index.js"}],[854,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/defaults/transitional.js"}],[855,{"form-data":3944},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("form-data")}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/env/classes/FormData.js"}],[856,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={version:"0.28.1"}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/env/data.js"}],[857,{"./toFormData":870},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./toFormData");function o(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,(function(e){return t[e]}))}function i(e,t){this._pairs=[],e&&n(e,this,t)}var s=i.prototype;s.append=function(e,t){this._pairs.push([e,t])},s.toString=function(e){var t=e?function(t){return e.call(this,t,o)}:o;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")},t.exports=i}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/AxiosURLSearchParams.js"}],[858,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e,t){return function(){return e.apply(t,arguments)}}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/bind.js"}],[859,{"../helpers/AxiosURLSearchParams":857,"../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../utils"),o=e("../helpers/AxiosURLSearchParams");function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(e,t,r){if(!t)return e;var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s));var a,c=r&&r.encode||i,l=r&&r.serialize;return(a=l?l(t,r):n.isURLSearchParams(t)?t.toString():new o(t,r).toString(c))&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/buildURL.js"}],[86,{events:3868,loglevel:4386},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=i(e("events")),o=i(e("loglevel"));function i(e){return e&&e.__esModule?e:{default:e}}class s extends n.default{constructor(e={}){super();const t=e.migrations||[];this.migrations=t.sort(((e,t)=>e.version-t.version));const r=this.migrations.slice(-1)[0];this.defaultVersion=e.defaultVersion||r&&r.version||0}async migrateData(e=this.generateInitialState()){const t=this.migrations.filter((function(t){return t.version>e.meta.version}));for(const r of t)try{o.default.info(`Running migration ${r.version}...`);const t=await r.migrate(e);if(!t.data)throw new Error("Migrator - migration returned empty data");if(t.version!==undefined&&t.meta.version!==r.version)throw new Error("Migrator - Migration did not update version number correctly");e=t,o.default.info(`Migration ${r.version} complete`)}catch(t){const n=t.message;return t.message=`MetaMask Migration Error #${r.version}: ${n}`,this.emit("error",t),e}return e}generateInitialState(e){return{meta:{version:this.defaultVersion},data:e}}}r.default=s}}},{package:"$root$",file:"app/scripts/lib/migrator/index.js"}],[860,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/combineURLs.js"}],[861,{"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils");t.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/cookies.js"}],[862,{"../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../utils");t.exports=function(e){function t(e,r,o,i){var s=e[i++],a=Number.isFinite(+s),c=i>=e.length;return s=!s&&n.isArray(o)?o.length:s,c?(n.hasOwnProperty(o,s)?o[s]=[o[s],r]:o[s]=r,!a):(o[s]&&n.isObject(o[s])||(o[s]=[]),t(e,r,o[s],i)&&n.isArray(o[s])&&(o[s]=function(e){var t,r,n={},o=Object.keys(e),i=o.length;for(t=0;t@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/formDataToJSON.js"}],[863,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/isAbsoluteURL.js"}],[864,{"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils");t.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/isAxiosError.js"}],[865,{"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils");t.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/isURLSameOrigin.js"}],[866,{"../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../utils");t.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/normalizeHeaderName.js"}],[867,{"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils"),o=["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"];t.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.slice(0,i)).toLowerCase(),r=n.trim(e.slice(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/parseHeaders.js"}],[868,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/parseProtocol.js"}],[869,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){return function(t){return e.apply(null,t)}}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/spread.js"}],[870,{"../core/AxiosError":846,"../env/classes/FormData":855,"../utils":877,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("../utils"),o=e("../core/AxiosError"),i=e("../env/classes/FormData");function s(e){return n.isPlainObject(e)||n.isArray(e)}function a(e){return n.endsWith(e,"[]")?e.slice(0,-2):e}function c(e,t,r){return e?e.concat(t).map((function(e,t){return e=a(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var l=n.toFlatObject(n,{},null,(function(e){return/^is[A-Z]/.test(e)}));t.exports=function(e,t,u){if(!n.isObject(e))throw new TypeError("target must be an object");t=t||new(i||FormData);var d,f=(u=n.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!n.isUndefined(t[e])}))).metaTokens,p=u.visitor||_,h=u.dots,g=u.indexes,m=(u.Blob||"undefined"!=typeof Blob&&Blob)&&((d=t)&&n.isFunction(d.append)&&"FormData"===d[Symbol.toStringTag]&&d[Symbol.iterator]);if(!n.isFunction(p))throw new TypeError("visitor must be a function");function b(e){if(null===e)return"";if(n.isDate(e))return e.toISOString();if(!m&&n.isBlob(e))throw new o("Blob is not supported. Use a Buffer instead.");return n.isArrayBuffer(e)||n.isTypedArray(e)?m&&"function"==typeof Blob?new Blob([e]):r.from(e):e}function _(e,r,o){var i=e;if(e&&!o&&"object"==typeof e)if(n.endsWith(r,"{}"))r=f?r:r.slice(0,-2),e=JSON.stringify(e);else if(n.isArray(e)&&function(e){return n.isArray(e)&&!e.some(s)}(e)||n.isFileList(e)||n.endsWith(r,"[]")&&(i=n.toArray(e)))return r=a(r),i.forEach((function(e,o){!n.isUndefined(e)&&t.append(!0===g?c([r],o,h):null===g?r:r+"[]",b(e))})),!1;return!!s(e)||(t.append(c(o,r,h),b(e)),!1)}var y=[],E=Object.assign(l,{defaultVisitor:_,convertValue:b,isVisitable:s});if(!n.isObject(e))throw new TypeError("data must be an object");return function e(r,o){if(!n.isUndefined(r)){if(-1!==y.indexOf(r))throw Error("Circular reference detected in "+o.join("."));y.push(r),n.forEach(r,(function(r,i){!0===(!n.isUndefined(r)&&p.call(t,r,n.isString(i)?i.trim():i,o,E))&&e(r,o?o.concat(i):[i])})),y.pop()}}(e),t}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/toFormData.js"}],[871,{"../platform/":876,"../utils":877,"./toFormData":870},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../utils"),o=e("./toFormData"),i=e("../platform/");t.exports=function(e,t){return o(e,new i.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,o){return i.isNode&&n.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/toURLEncodedForm.js"}],[872,{"../core/AxiosError":846,"../env/data":856},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../env/data").version,o=e("../core/AxiosError"),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,r){function i(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new o(i(n," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!s[n]&&(s[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},t.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),i=n.length;i-- >0;){var s=n[i],a=t[s];if(a){var c=e[s],l=c===undefined||a(c,s,e);if(!0!==l)throw new o("option "+s+" must be "+l,o.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new o("Unknown option "+s,o.ERR_BAD_OPTION)}},validators:i}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/validator.js"}],[873,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=FormData}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/platform/browser/classes/FormData.js"}],[874,{"../../../helpers/AxiosURLSearchParams":857},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../../helpers/AxiosURLSearchParams");t.exports="undefined"!=typeof URLSearchParams?URLSearchParams:n}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"}],[875,{"./classes/FormData":873,"./classes/URLSearchParams":874},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={isBrowser:!0,classes:{URLSearchParams:e("./classes/URLSearchParams"),FormData:e("./classes/FormData"),Blob:Blob},protocols:["http","https","file","blob","url","data"]}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/platform/browser/index.js"}],[876,{"./node/":875},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("./node/")}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/platform/index.js"}],[877,{"./helpers/bind":858},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,o=e("./helpers/bind"),i=Object.prototype.toString,s=(n=Object.create(null),function(e){var t=i.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())});function a(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function c(e){return Array.isArray(e)}function l(e){return void 0===e}var u=a("ArrayBuffer");function d(e){return"number"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=a("Date"),g=a("File"),m=a("Blob"),b=a("FileList");function _(e){return"[object Function]"===i.call(e)}var y=a("URLSearchParams");function E(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),c(e))for(var r=0,n=e.length;r0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:function(e,t,r){e=String(e),(r===undefined||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(c(e))return e;var t=e.length;if(!d(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:v,isFileList:b,forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:O,hasOwnProperty:T}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/utils.js"}],[878,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){!function(e){var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,s="[BigNumber Error] ",a=s+"Number primitive has more than 15 significant digits: ",c=1e14,l=14,u=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],f=1e7,p=1e9;function h(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,i=e[0]+"";nl^r?1:-1;for(a=(c=o.length)<(l=i.length)?c:l,s=0;si[s]^r?1:-1;return c==l?0:c>l^r?1:-1}function b(e,t,r,n){if(er||e!==i(e))throw Error(s+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function _(e){var t=e.c.length-1;return h(e.e/l)==t&&e.c[t]%2!=0}function y(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function E(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 tD?g.c=g.e=null:e.e=10;d/=10,c++);return void(c>D?g.c=g.e=null:(g.e=c,g.c=[e]))}h=String(e)}else{if(!n.test(h=String(e)))return v(g,h,f);g.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(c=h.indexOf("."))>-1&&(h=h.replace(".","")),(d=h.search(/e/i))>0?(c<0&&(c=d),c+=+h.slice(d+1),h=h.substring(0,d)):c<0&&(c=h.length)}else{if(b(t,2,H.length,"Base"),10==t&&G)return Y(g=new V(e),R+g.e+1,k);if(h=String(e),f="number"==typeof e){if(0*e!=0)return v(g,h,f,t);if(g.s=1/e<0?(h=h.slice(1),-1):1,V.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else g.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(r=H.slice(0,t),c=d=0,p=h.length;dc){c=p;continue}}else if(!s&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){s=!0,d=-1,c=0;continue}return v(g,String(e),f,t)}f=!1,(c=(h=w(h,t,10,g.s)).indexOf("."))>-1?h=h.replace(".",""):c=h.length}for(d=0;48===h.charCodeAt(d);d++);for(p=h.length;48===h.charCodeAt(--p););if(h=h.slice(d,++p)){if(p-=d,f&&V.DEBUG&&p>15&&(e>u||e!==i(e)))throw Error(a+g.s*e);if((c=c-d-1)>D)g.c=g.e=null;else if(c=L)?y(c,s):E(c,s,"0");else if(i=(e=Y(new V(e),t,r)).e,a=(c=g(e.c)).length,1==n||2==n&&(t<=i||i<=j)){for(;aa){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-a)>0)for(i+1==a&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function z(e,t){for(var r,n,o=1,i=new V(e[0]);o=10;o/=10,n++);return(r=n+r*l-1)>D?e.c=e.e=null:r=10;f/=10,s++);if((a=t-s)<0)a+=l,u=t,p=m[h=0],g=i(p/b[s-u-1]%10);else if((h=o((a+1)/l))>=m.length){if(!n)break e;for(;m.length<=h;m.push(0));p=g=0,s=1,u=(a%=l)-l+1}else{for(p=f=m[h],s=1;f>=10;f/=10,s++);g=(u=(a%=l)-l+s)<0?0:i(p/b[s-u-1]%10)}if(n=n||t<0||null!=m[h+1]||(u<0?p:p%b[s-u-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(a>0?u>0?p/b[s-u]:0:m[h-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=b[(l-t%l)%l],e.e=-t||0):m[0]=e.e=0,e;if(0==a?(m.length=h,f=1,h--):(m.length=h+1,f=b[l-a],m[h]=u>0?i(p/b[s-u]%b[u])*f:0),n)for(;;){if(0==h){for(a=1,u=m[0];u>=10;u/=10,a++);for(u=m[0]+=f,f=1;u>=10;u/=10,f++);a!=f&&(e.e++,m[0]==c&&(m[0]=1));break}if(m[h]+=f,m[h]!=c)break;m[h--]=0,f=1}for(a=m.length;0===m[--a];m.pop());}e.e>D?e.c=e.e=null:e.e=L?y(t,r):E(t,r,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(s+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(b(r=e[t],0,p,t),R=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(b(r=e[t],0,8,t),k=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(b(r[0],-p,0,t),b(r[1],0,p,t),j=r[0],L=r[1]):(b(r,-p,p,t),j=-(L=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)b(r[0],-p,-1,t),b(r[1],1,p,t),M=r[0],D=r[1];else{if(b(r,-p,p,t),!r)throw Error(s+t+" cannot be zero: "+r);M=-(D=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(s+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!r,Error(s+"crypto unavailable");U=r}else U=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(b(r=e[t],0,9,t),B=r),e.hasOwnProperty(t="POW_PRECISION")&&(b(r=e[t],0,p,t),F=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(s+t+" not an object: "+r);q=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(s+t+" invalid: "+r);G="0123456789"==r.slice(0,10),H=r}}return{DECIMAL_PLACES:R,ROUNDING_MODE:k,EXPONENTIAL_AT:[j,L],RANGE:[M,D],CRYPTO:U,MODULO_MODE:B,POW_PRECISION:F,FORMAT:q,ALPHABET:H}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,r,n=e.c,o=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===a||-1===a)&&o>=-p&&o<=p&&o===i(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%l)<1&&(t+=l),String(n[0]).length==t){for(t=0;t=c||r!==i(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===a||1===a||-1===a))return!0;throw Error(s+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return z(arguments,-1)},V.minimum=V.min=function(){return z(arguments,1)},V.random=(P=9007199254740992,O=Math.random()*P&2097151?function(){return i(Math.random()*P)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,a,c,u=0,f=[],h=new V(x);if(null==e?e=R:b(e,0,p),a=o(e/l),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[u]=r[0],t[u+1]=r[1]):(f.push(c%1e14),u+=2);u=a/2}else{if(!crypto.randomBytes)throw U=!1,Error(s+"crypto unavailable");for(t=crypto.randomBytes(a*=7);u=9e15?crypto.randomBytes(7).copy(t,u):(f.push(c%1e14),u+=7);u=a/7}if(!U)for(;u=10;c/=10,u++);ur-1&&(null==s[o+1]&&(s[o+1]=0),s[o+1]+=s[o]/r|0,s[o]%=r)}return s.reverse()}return function(n,o,i,s,a){var c,l,u,d,f,p,h,m,b=n.indexOf("."),_=R,y=k;for(b>=0&&(d=F,F=0,n=n.replace(".",""),p=(m=new V(o)).pow(n.length-b),F=d,m.c=t(E(g(p.c),p.e,"0"),10,i,e),m.e=m.c.length),u=d=(h=t(n,o,i,a?(c=H,e):(c=e,H))).length;0==h[--d];h.pop());if(!h[0])return c.charAt(0);if(b<0?--u:(p.c=h,p.e=u,p.s=s,h=(p=r(p,m,_,y,i)).c,f=p.r,u=p.e),b=h[l=u+_+1],d=i/2,f=f||l<0||null!=h[l+1],f=y<4?(null!=b||f)&&(0==y||y==(p.s<0?3:2)):b>d||b==d&&(4==y||f||6==y&&1&h[l-1]||y==(p.s<0?8:7)),l<1||!h[0])n=f?E(c.charAt(1),-_,c.charAt(0)):c.charAt(0);else{if(h.length=l,f)for(--i;++h[--l]>i;)h[l]=0,l||(++u,h=[1].concat(h));for(d=h.length;!h[--d];);for(b=0,n="";b<=d;n+=c.charAt(h[b++]));n=E(n,u,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,i,s,a=0,c=e.length,l=t%f,u=t/f|0;for(e=e.slice();c--;)a=((o=l*(i=e[c]%f)+(n=u*i+(s=e[c]/f|0)*l)%f*f+a)/r|0)+(n/f|0)+u*s,e[c]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;ot[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]1;e.splice(0,1));}return function(n,o,s,a,u){var d,f,p,g,m,b,_,y,E,w,v,P,O,T,A,S,I,C=n.s==o.s?1:-1,N=n.c,x=o.c;if(!(N&&N[0]&&x&&x[0]))return new V(n.s&&o.s&&(N?!x||N[0]!=x[0]:x)?N&&0==N[0]||!x?0*C:C/0:NaN);for(E=(y=new V(C)).c=[],C=s+(f=n.e-o.e)+1,u||(u=c,f=h(n.e/l)-h(o.e/l),C=C/l|0),p=0;x[p]==(N[p]||0);p++);if(x[p]>(N[p]||0)&&f--,C<0)E.push(1),g=!0;else{for(T=N.length,S=x.length,p=0,C+=2,(m=i(u/(x[0]+1)))>1&&(x=e(x,m,u),N=e(N,m,u),S=x.length,T=N.length),O=S,v=(w=N.slice(0,S)).length;v=u/2&&A++;do{if(m=0,(d=t(x,w,S,v))<0){if(P=w[0],S!=v&&(P=P*u+(w[1]||0)),(m=i(P/A))>1)for(m>=u&&(m=u-1),_=(b=e(x,m,u)).length,v=w.length;1==t(b,w,_,v);)m--,r(b,S<_?I:x,_,u),_=b.length,d=1;else 0==m&&(d=m=1),_=(b=x.slice()).length;if(_=10;C/=10,p++);Y(y,s+(y.e=p+f*l-1)+1,a,g)}else y.e=f,y.r=+g;return y}}(),T=/^(-?)0([xbo])(?=\w[\w.]*$)/i,A=/^([^.]+)\.$/,S=/^\.([^.]+)$/,I=/^-?(Infinity|NaN)$/,C=/^\s*\+(?=[\w.])|^\s+|\s+$/g,v=function(e,t,r,n){var o,i=r?t:t.replace(C,"");if(I.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(T,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(A,"$1").replace(S,"0.$1")),t!=i))return new V(i,o);if(V.DEBUG)throw Error(s+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},N.absoluteValue=N.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},N.comparedTo=function(e,t){return m(this,new V(e,t))},N.decimalPlaces=N.dp=function(e,t){var r,n,o,i=this;if(null!=e)return b(e,0,p),null==t?t=k:b(t,0,8),Y(new V(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-h(this.e/l))*l,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},N.dividedBy=N.div=function(e,t){return r(this,new V(e,t),R,k)},N.dividedToIntegerBy=N.idiv=function(e,t){return r(this,new V(e,t),0,1)},N.exponentiatedBy=N.pow=function(e,t){var r,n,a,c,u,d,f,p,h=this;if((e=new V(e)).c&&!e.isInteger())throw Error(s+"Exponent not an integer: "+W(e));if(null!=t&&(t=new V(t)),u=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return p=new V(Math.pow(+W(h),u?e.s*(2-_(e)):+W(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(NaN);(n=!d&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||u&&h.c[1]>=24e7:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return c=h.s<0&&_(e)?-0:0,h.e>-1&&(c=1/c),new V(d?1/c:c);F&&(c=o(F/l+2))}for(u?(r=new V(.5),d&&(e.s=1),f=_(e)):f=(a=Math.abs(+W(e)))%2,p=new V(x);;){if(f){if(!(p=p.times(h)).c)break;c?p.c.length>c&&(p.c.length=c):n&&(p=p.mod(t))}if(a){if(0===(a=i(a/2)))break;f=a%2}else if(Y(e=e.times(r),e.e+1,1),e.e>14)f=_(e);else{if(0===(a=+W(e)))break;f=a%2}h=h.times(h),c?h.c&&h.c.length>c&&(h.c.length=c):n&&(h=h.mod(t))}return n?p:(d&&(p=x.div(p)),t?p.mod(t):c?Y(p,F,k,undefined):p)},N.integerValue=function(e){var t=new V(this);return null==e?e=k:b(e,0,8),Y(t,t.e+1,e)},N.isEqualTo=N.eq=function(e,t){return 0===m(this,new V(e,t))},N.isFinite=function(){return!!this.c},N.isGreaterThan=N.gt=function(e,t){return m(this,new V(e,t))>0},N.isGreaterThanOrEqualTo=N.gte=function(e,t){return 1===(t=m(this,new V(e,t)))||0===t},N.isInteger=function(){return!!this.c&&h(this.e/l)>this.c.length-2},N.isLessThan=N.lt=function(e,t){return m(this,new V(e,t))<0},N.isLessThanOrEqualTo=N.lte=function(e,t){return-1===(t=m(this,new V(e,t)))||0===t},N.isNaN=function(){return!this.s},N.isNegative=function(){return this.s<0},N.isPositive=function(){return this.s>0},N.isZero=function(){return!!this.c&&0==this.c[0]},N.minus=function(e,t){var r,n,o,i,s=this,a=s.s;if(t=(e=new V(e,t)).s,!a||!t)return new V(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/l,d=e.e/l,f=s.c,p=e.c;if(!u||!d){if(!f||!p)return f?(e.s=-t,e):new V(p?s:NaN);if(!f[0]||!p[0])return p[0]?(e.s=-t,e):new V(f[0]?s:3==k?-0:0)}if(u=h(u),d=h(d),f=f.slice(),a=u-d){for((i=a<0)?(a=-a,o=f):(d=u,o=p),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(i=(a=f.length)<(t=p.length))?a:t,a=t=0;t0)for(;t--;f[r++]=0);for(t=c-1;n>a;){if(f[--n]=0;){for(r=0,m=P[o]%E,b=P[o]/E|0,i=o+(s=u);i>o;)r=((d=m*(d=v[--s]%E)+(a=b*d+(p=v[s]/E|0)*m)%E*E+_[i]+r)/y|0)+(a/E|0)+b*p,_[i--]=d%y;_[i]=r}return r?++n:_.splice(0,1),K(e,_,n)},N.negated=function(){var e=new V(this);return e.s=-e.s||null,e},N.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new V(e,t)).s,!o||!t)return new V(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/l,s=e.e/l,a=n.c,u=e.c;if(!i||!s){if(!a||!u)return new V(o/0);if(!a[0]||!u[0])return u[0]?e:new V(a[0]?n:0*o)}if(i=h(i),s=h(s),a=a.slice(),o=i-s){for(o>0?(s=i,r=u):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+u[t]+o)/c|0,a[t]=c===a[t]?0:a[t]%c;return o&&(a=[o].concat(a),++s),K(e,a,s)},N.precision=N.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return b(e,1,p),null==t?t=k:b(t,0,8),Y(new V(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*l+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},N.shiftedBy=function(e){return b(e,-9007199254740991,u),this.times("1e"+e)},N.squareRoot=N.sqrt=function(){var e,t,n,o,i,s=this,a=s.c,c=s.s,l=s.e,u=R+4,d=new V("0.5");if(1!==c||!a||!a[0])return new V(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+W(s)))||c==1/0?(((t=g(a)).length+l)%2==0&&(t+="0"),c=Math.sqrt(+t),l=h((l+1)/2)-(l<0||l%2),n=new V(t=c==1/0?"5e"+l:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new V(c+""),n.c[0])for((c=(l=n.e)+u)<3&&(c=0);;)if(i=n,n=d.times(i.plus(r(s,i,u,1))),g(i.c).slice(0,c)===(t=g(n.c)).slice(0,c)){if(n.e0&&g>0){for(i=g%c||c,d=h.substr(0,i);i0&&(d+=u+h.slice(i)),p&&(d="-"+d)}n=f?d+(r.decimalSeparator||"")+((l=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):d}return(r.prefix||"")+n+(r.suffix||"")},N.toFraction=function(e){var t,n,o,i,a,c,u,f,p,h,m,b,_=this,y=_.c;if(null!=e&&(!(u=new V(e)).isInteger()&&(u.c||1!==u.s)||u.lt(x)))throw Error(s+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+W(u));if(!y)return new V(_);for(t=new V(x),p=n=new V(x),o=f=new V(x),b=g(y),a=t.e=b.length-_.e-1,t.c[0]=d[(c=a%l)<0?l+c:c],e=!e||u.comparedTo(t)>0?a>0?t:p:u,c=D,D=1/0,u=new V(b),f.c[0]=0;h=r(u,t,0,1),1!=(i=n.plus(h.times(o))).comparedTo(e);)n=o,o=i,p=f.plus(h.times(i=p)),f=i,t=u.minus(h.times(i=t)),u=i;return i=r(e.minus(n),o,0,1),f=f.plus(i.times(p)),n=n.plus(i.times(o)),f.s=p.s=_.s,m=r(p,o,a*=2,k).minus(_).abs().comparedTo(r(f,n,a,k).minus(_).abs())<1?[p,o]:[f,n],D=c,m},N.toNumber=function(){return+W(this)},N.toPrecision=function(e,t){return null!=e&&b(e,1,p),$(this,e,t,2)},N.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=o<=j||o>=L?y(g(r.c),o):E(g(r.c),o,"0"):10===e&&G?t=E(g((r=Y(new V(r),R+o+1,k)).c),r.e,"0"):(b(e,2,H.length,"Base"),t=w(E(g(r.c),o,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},N.valueOf=N.toJSON=function(){return W(this)},N._isBigNumber=!0,null!=t&&V.set(t),V}(),r.default=r.BigNumber=r,"function"==typeof define&&define.amd?define((function(){return r})):void 0!==t&&t.exports?t.exports=r:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=r)}(this)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>bignumber.js",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/bignumber.js/bignumber.js"}],[879,{rxjs:4808},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.setEnvUnsafe=r.setEnv=r.changes=r.getEnvDesc=r.isEnvDefault=r.getEnvDefault=r.getEnv=r.getAllEnvs=r.getAllEnvNames=r.getDefinition=void 0;const n=e("rxjs"),o=e=>{if(!Number.isNaN(e))return parseInt(e,10)},i=e=>{if(!Number.isNaN(e))return parseFloat(e)},s=e=>"boolean"==typeof e?e:!("0"===e||"false"===e),a=e=>"string"==typeof e?e:undefined,c=e=>{const t="string"==typeof e?e.split(","):null;if(Array.isArray(t)&&t.length>0)return t},l={ADDRESS_POISONING_FAMILIES:{def:"evm,tron",parser:a,desc:"List of families impacted by the address poisoning attack"},ANALYTICS_CONSOLE:{def:!1,parser:s,desc:"Show tracking overlays on the app UI"},DEBUG_THEME:{def:!1,parser:s,desc:"Show theme debug overlay UI"},API_ICP_ENDPOINT:{def:"https://icp.coin.ledger.com/",parser:a,desc:"Rosetta API for ICP"},API_CASPER_INDEXER_ENDPOINT:{parser:a,def:"https://casper.coin.ledger.com/indexer",desc:"Casper API url indexer"},API_CASPER_NODE_ENDPOINT:{parser:a,def:"https://casper.coin.ledger.com/node/",desc:"Casper API url node"},API_ALGORAND_BLOCKCHAIN_EXPLORER_API_ENDPOINT:{def:"https://algorand.coin.ledger.com",parser:a,desc:"Node API endpoint for algorand"},API_CELO_INDEXER:{def:"https://celo.coin.ledger.com/indexer/",parser:a,desc:"Explorer API for celo"},API_CELO_NODE:{def:"https://celo.coin.ledger.com/archive/",parser:a,desc:"Node endpoint for celo"},COSMOS_GAS_AMPLIFIER:{def:1.3,parser:o,desc:"Cosmos gas estimate multiplier"},API_FILECOIN_ENDPOINT:{parser:a,def:"https://filecoin.coin.ledger.com",desc:"Filecoin API url"},API_STACKS_ENDPOINT:{parser:a,def:"https://stacks.coin.ledger.com",desc:"Stacks API url"},API_POLKADOT_INDEXER:{parser:a,def:"https://polkadot.coin.ledger.com",desc:"Explorer API for polkadot"},API_POLKADOT_SIDECAR:{parser:a,def:"https://polkadot-sidecar.coin.ledger.com",desc:"Polkadot Sidecar API url"},API_POLKADOT_SIDECAR_CREDENTIALS:{parser:a,def:"",desc:"Polkadot Sidecar API credentials"},API_POLKADOT_NODE:{parser:a,def:"https://polkadot-fullnodes.api.live.ledger.com",desc:"Polkadot Node"},ELROND_API_ENDPOINT:{parser:a,def:"https://elrond.coin.ledger.com",desc:"Elrond API url"},ELROND_DELEGATION_API_ENDPOINT:{parser:a,def:"https://delegations-elrond.coin.ledger.com",desc:"Elrond DELEGATION API url"},API_STELLAR_HORIZON:{parser:a,def:"https://stellar.coin.ledger.com",desc:"Stellar Horizon API url"},API_STELLAR_HORIZON_FETCH_LIMIT:{parser:o,def:100,desc:"Limit of operation that Horizon will fetch per page"},API_STELLAR_HORIZON_STATIC_FEE:{def:!1,parser:s,desc:"Static fee for Stellar account"},API_TEZOS_BAKER:{parser:a,def:"https://tezos-bakers.api.live.ledger.com",desc:"bakers API for tezos"},API_TEZOS_BLOCKCHAIN_EXPLORER_API_ENDPOINT:{def:"https://xtz-explorer.api.live.ledger.com/explorer",parser:a,desc:"Ledger explorer API for tezos"},API_TEZOS_TZKT_API:{def:"https://xtz-tzkt-explorer.api.live.ledger.com",parser:a,desc:"tzkt.io explorer"},API_TEZOS_NODE:{def:"https://xtz-node.api.live.ledger.com",parser:a,desc:"node API for tezos (for broadcast only)"},API_TRONGRID_PROXY:{parser:a,def:"https://tron.coin.ledger.com",desc:"proxy url for trongrid API"},API_SOLANA_PROXY:{parser:a,def:"https://solana.coin.ledger.com",desc:"proxy url for solana API"},SOLANA_VALIDATORS_APP_BASE_URL:{parser:a,def:"https://earn.api.live.ledger.com/v0/network/solana/validator-details",desc:"base url for validators.app validator list"},SOLANA_TESTNET_VALIDATORS_APP_BASE_URL:{parser:a,def:"https://validators-solana.coin.ledger.com/api/v1/validators",desc:"base url for testnet validators.app validator list"},SOLANA_TX_CONFIRMATION_TIMEOUT:{def:1e5,parser:o,desc:"solana transaction broadcast confirmation timeout"},API_HEDERA_MIRROR:{def:"https://hedera.coin.ledger.com",parser:a,desc:"mirror node API for Hedera"},API_VECHAIN_THOREST:{def:"https://vechain.coin.ledger.com",parser:a,desc:"Thorest API for VeChain"},BASE_SOCKET_URL:{def:"wss://scriptrunner.api.live.ledger.com/update",parser:a,desc:"Ledger script runner API"},BOT_TIMEOUT_SCAN_ACCOUNTS:{def:6e5,parser:o,desc:"bot's default timeout for scanAccounts"},BOT_SPEC_DEFAULT_TIMEOUT:{def:18e5,parser:o,desc:"define the default value of spec.skipMutationsTimeout (if not overriden by spec)"},BUY_API_BASE:{def:"https://buy.api.live.ledger.com/buy/v1",parser:a,desc:"Buy crypto API base url - version 1"},CARDANO_API_ENDPOINT:{def:"https://cardano.coin.ledger.com/api",parser:a,desc:"Cardano API url"},CARDANO_TESTNET_API_ENDPOINT:{def:"https://testnet-ledger.cardanoscan.io/api",parser:a,desc:"Cardano API url"},ICON_NODE_ENDPOINT:{parser:a,def:"https://icon.coin.ledger.com/api/v3",desc:"ICON RPC url"},ICON_DEBUG_ENDPOINT:{parser:a,def:"https://icon.coin.ledger.com/api/v3d",desc:"ICON debug RPC url"},ICON_INDEXER_ENDPOINT:{parser:a,def:"https://icon.coin.ledger.com/api/v1",desc:"ICON API url"},ICON_TESTNET_NODE_ENDPOINT:{parser:a,def:"https://berlin.net.solidwallet.io/api/v3",desc:"ICON Berlin Testnet API url"},ICON_TESTNET_DEBUG_ENDPOINT:{parser:a,def:"https://berlin.net.solidwallet.io/api/v3d",desc:"ICON Berlin Testnet debug"},ICON_TESTNET_INDEXER_ENDPOINT:{parser:a,def:"https://tracker.berlin.icon.community/api/v1",desc:"ICON Berlin Testnet API url"},COINAPPS:{def:"",parser:a,desc:"(dev feature) defines the folder for speculos mode that contains Nano apps binaries (.elf) in a specific structure: ///app_.elf"},CRYPTO_ORG_INDEXER:{def:"https://cryptoorg-rpc-indexer.coin.ledger.com",parser:a,desc:"location of the Cronos POS Chain (formerly Crypto.org) indexer API"},CRYPTO_ORG_TESTNET_INDEXER:{def:"https://cronos-pos.org/explorer/croeseid4",parser:a,desc:"location of the Cronos POS Chain (formerly Crypto.org) indexer testnet API"},CRYPTO_ORG_RPC_URL:{def:"https://cryptoorg-rpc-node.coin.ledger.com",parser:a,desc:"location of the Cronos POS Chain (formerly Crypto.org) chain node"},CRYPTO_ORG_TESTNET_RPC_URL:{def:"https://rpc-testnet-croeseid-4.crypto.org",parser:a,desc:"location of the Cronos POS Chain (formerly Crypto.org) chain testnet node"},DEBUG_UTXO_DISPLAY:{def:4,parser:o,desc:"define maximum number of utxos to display in CLI"},DEBUG_HTTP_RESPONSE:{def:!1,parser:s,desc:"includes HTTP response body in logs"},DEVICE_CANCEL_APDU_FLUSH_MECHANISM:{def:!0,parser:s,desc:"enable a mechanism that send a 0x00 apdu to force device to awake from its 'Processing' UI state"},DEVICE_PROXY_URL:{def:"",parser:a,desc:"enable a proxy to use instead of a physical device"},DEVICE_PROXY_MODEL:{def:"nanoS",parser:a,desc:"allow to override the default model of a proxied device"},DISABLE_TRANSACTION_BROADCAST:{def:!1,parser:s,desc:"disable broadcast of transactions"},DISABLE_SYNC_TOKEN:{def:!0,parser:s,desc:"disable a problematic mechanism of our API"},DISABLE_FW_UPDATE_VERSION_CHECK:{def:!1,parser:s,desc:"disable the version check for firmware update eligibility"},EIP1559_MINIMUM_FEES_GATE:{def:!0,parser:s,desc:"prevents the user from doing an EIP1559 transaction with fees too low"},EIP1559_PRIORITY_FEE_LOWER_GATE:{def:.85,parser:i,desc:"minimum priority fee percents allowed compared to network conditions allowed when EIP1559_MINIMUM_FEES_GATE is activated"},EIP1559_BASE_FEE_MULTIPLIER:{def:1.5,parser:i,desc:"mutiplier for the base fee that is composing the maxFeePerGas property"},EXPERIMENTAL_BLE:{def:!1,parser:s,desc:"enable experimental support of Bluetooth"},EXPERIMENTAL_CURRENCIES:{def:"",parser:a,desc:"enable experimental support of currencies (comma separated)"},EXPERIMENTAL_EXPLORERS:{def:!1,parser:s,desc:"enable experimental explorer APIs"},EXPERIMENTAL_LANGUAGES:{def:!1,parser:s,desc:"enable experimental languages"},EXPERIMENTAL_MANAGER:{def:!1,parser:s,desc:"enable an experimental version of Manager"},EXPERIMENTAL_ROI_CALCULATION:{def:!1,parser:s,desc:"enable an experimental version of the portfolio percentage calculation"},EXPERIMENTAL_SEND_MAX:{def:!1,parser:s,desc:"force enabling SEND MAX even if not yet stable"},EXPERIMENTAL_USB:{def:!1,parser:s,desc:"enable an experimental implementation of USB support"},EXPERIMENTAL_SWAP:{def:!1,parser:s,desc:"enable an experimental swap interface"},EXPLORER:{def:"https://explorers.api.live.ledger.com",parser:a,desc:"Ledger generic explorer API"},EXPLORER_STAGING:{def:"https://explorers.api-01.live.ledger-stg.com",parser:a,desc:"Ledger staging explorer API"},EXPLORER_BETA:{def:"https://explorers.api.live.ledger.com",parser:a,desc:"Ledger generic explorer beta API"},EXPLORER_SATSTACK:{def:"http://localhost:20000",parser:a,desc:"Ledger satstack Bitcoin explorer API"},EXPORT_EXCLUDED_LOG_TYPES:{def:"ble-frame",parser:a,desc:"comma-separated list of excluded log types for exported logs"},EXPORT_MAX_LOGS:{def:5e3,parser:o,desc:"maximum logs to keep for export"},DISABLE_APP_VERSION_REQUIREMENTS:{def:!1,parser:s,desc:"force an old application version to be accepted regardless of its version"},FORCE_PROVIDER:{def:1,parser:o,desc:"use a different provider for app store (for developers only)"},FILTER_ZERO_AMOUNT_ERC20_EVENTS:{def:!0,parser:s,desc:"Remove filter of address poisoning"},GET_CALLS_RETRY:{def:2,parser:o,desc:"how many times to retry a GET http call"},GET_CALLS_TIMEOUT:{def:6e4,parser:o,desc:"how much time to timeout a GET http call"},HIDE_EMPTY_TOKEN_ACCOUNTS:{def:!1,parser:s,desc:"hide the sub accounts when they are empty"},KEYCHAIN_OBSERVABLE_RANGE:{def:0,parser:o,desc:"overrides the gap limit specified by BIP44 (default to 20)"},LEDGER_CLIENT_VERSION:{def:"",parser:a,desc:"the 'X-Ledger-Client-Version' HTTP header to use for queries to Ledger APIs"},LEDGER_COUNTERVALUES_API:{def:"https://countervalues.live.ledger.com",parser:a,desc:"Ledger countervalues API"},LEDGER_REST_API_BASE:{def:"https://explorers.api.live.ledger.com",parser:a,desc:"DEPRECATED"},LEGACY_KT_SUPPORT_TO_YOUR_OWN_RISK:{def:!1,parser:s,desc:"enable sending to KT accounts. Not tested."},MANAGER_API_BASE:{def:"https://manager.api.live.ledger.com/api",parser:a,desc:"Ledger Manager API"},MANAGER_DEV_MODE:{def:!1,parser:s,desc:"enable visibility of utility apps in Manager"},MANAGER_INSTALL_DELAY:{def:1e3,parser:o,desc:"defines the time to wait before installing apps to prevent known glitch (<=1.5.5) when chaining installs"},MAPPING_SERVICE:{def:"https://mapping-service.api.ledger.com",parser:a,desc:""},MAX_ACCOUNT_NAME_SIZE:{def:50,parser:o,desc:"maximum size of account names"},MOCK:{def:"",parser:a,desc:"switch the app into a MOCK mode for test purpose, the value will be used as a seed for the rng. Avoid falsy values."},MOCK_COUNTERVALUES:{def:"",parser:a,desc:"switch the countervalues resolution into a MOCK mode for test purpose"},MOCK_APP_UPDATE:{def:!1,parser:s,desc:"Always shows app update in the manager"},MOCK_EXCHANGE_TEST_CONFIG:{def:!1,parser:s,desc:"mock the cryptoassets config and test partner (in the context of app-exchange)"},MOCK_REMOTE_LIVE_MANIFEST:{def:"",parser:a,desc:"mock remote live app manifest"},MOCK_OS_VERSION:{def:"",parser:a,desc:"if defined, overrides the os and version. format: os@version. Example: Windows_NT@6.1.7601"},MOCK_NO_BYPASS:{def:!1,parser:s,desc:"if defined, avoids bypass of the currentDevice in the store."},NFT_CURRENCIES:{def:"ethereum,polygon",parser:a,desc:"set the currencies where NFT is active"},NFT_ETH_METADATA_SERVICE:{def:"https://nft.api.live.ledger.com",parser:a,desc:"service uri used to get the metadata of an nft"},OPERATION_ADDRESSES_LIMIT:{def:100,parser:o,desc:"limit the number of addresses in from/to of operations"},OPERATION_OPTIMISTIC_RETENTION:{def:18e5,parser:o,desc:"timeout to keep an optimistic operation that was broadcasted but not yet visible from the coin implementation or the API"},OPERATION_PAGE_SIZE_INITIAL:{def:100,parser:o,desc:"defines the initial default operation length page to use"},POLKADOT_ELECTION_STATUS_THRESHOLD:{def:25,parser:o,desc:"in blocks - number of blocks before Polkadot election effectively opens to consider it as open and disable all staking features"},SATSTACK:{def:!1,parser:s,desc:"Switch to satstack mode"},SCAN_FOR_INVALID_PATHS:{def:!1,parser:s,desc:"enable searching accounts in exotic derivation paths"},SEED:{def:"",parser:a,desc:"(dev feature) seed to be used by speculos (device simulator)"},SHOW_LEGACY_NEW_ACCOUNT:{def:!1,parser:s,desc:"allow the creation of legacy accounts"},SIMPLE_HASH_API_BASE:{def:"https://simplehash.api.live.ledger.com/api/v0",parser:a,desc:"SimpleHash API base url"},SKIP_ONBOARDING:{def:!1,parser:s,desc:"dev flag to skip onboarding flow"},SPECULOS_API_PORT:{def:0,parser:o,desc:"API port for speculos"},SPECULOS_PID_OFFSET:{def:0,parser:o,desc:"offset to be added to the speculos pid and avoid collision with other instances"},SPECULOS_USE_WEBSOCKET:{def:!1,parser:s,desc:"Use speculos websocket interface instead of Rest API"},SWAP_API_BASE:{def:"https://swap.ledger.com/v5",parser:a,desc:"Swap API base"},SWAP_USER_IP:{def:"",parser:a,desc:"Swap IP"},SWAP_DISABLE_APPS_INSTALL:{def:!1,parser:s,desc:"bypass app checks on Nano for speculos swap tests"},SYNC_ALL_INTERVAL:{def:48e4,parser:o,desc:"delay between successive sync"},SYNC_BOOT_DELAY:{def:2e3,parser:o,desc:"delay before the sync starts"},SYNC_PENDING_INTERVAL:{def:1e4,parser:o,desc:"delay between sync when an operation is still pending"},SYNC_OUTDATED_CONSIDERED_DELAY:{def:6e5,parser:o,desc:"delay until Live consider a sync outdated"},SYNC_MAX_CONCURRENT:{def:4,parser:o,desc:"maximum limit to synchronize accounts concurrently to limit overload"},BOT_MAX_CONCURRENT:{def:10,parser:o,desc:"maximum limit to run bot spec in parallel"},USER_ID:{def:"",parser:a,desc:"unique identifier of app instance. used to derivate dissociated ids for difference purposes (e.g. the firmware update incremental deployment)."},WALLETCONNECT:{def:!1,parser:s,desc:"is walletconnect enabled"},CLOUD_SYNC_API_STAGING:{def:"https://cloud-sync-backend.api.aws.stg.ldg-tech.com",parser:a,desc:"wallet sync api staging base url"},CLOUD_SYNC_API_PROD:{def:"https://cloud-sync.api.live.ledger.com",parser:a,desc:"wallet sync api production base url"},WITH_DEVICE_POLLING_DELAY:{def:500,parser:i,desc:"delay when polling device"},ANNOUNCEMENTS_API_URL:{def:"https://cdn.live.ledger.com/announcements",parser:a,desc:"url used to fetch new announcements"},ANNOUNCEMENTS_API_VERSION:{def:1,parser:o,desc:"version used for the announcements api"},STATUS_API_URL:{def:"https://ledger.statuspage.io/api",parser:a,desc:"url used to fetch ledger status"},STATUS_API_VERSION:{def:2,parser:o,desc:"version used for ledger status api"},TEZOS_MAX_TX_QUERIES:{def:100,parser:o,desc:"safe max on maximum number of queries to synchronize a tezos account"},TRUSTCHAIN_API_STAGING:{def:"https://trustchain-backend.api.aws.stg.ldg-tech.com",parser:a,desc:"Trustchain API Staging"},TRUSTCHAIN_API_PROD:{def:"https://trustchain.api.live.ledger.com",parser:a,desc:"Trustchain API Prod"},PLATFORM_DEBUG:{def:!1,parser:s,desc:"enable visibility of debug apps and tools in Platform Catalog"},PLATFORM_EXPERIMENTAL_APPS:{def:!1,parser:s,desc:"enable visibility of experimental apps and tools in Platform Catalog"},PLATFORM_MANIFEST_API_URL:{def:"https://live-app-catalog.ledger.com/api/v1/apps",parser:a,desc:"url used to fetch platform app manifests"},PLATFORM_LOCAL_MANIFEST_JSON:{def:"",parser:a,desc:'json manifest for a local (test) platform app manifests. How to use: PLATFORM_LOCAL_MANIFEST_JSON="$(cat /path/to/file.json)"'},PLATFORM_GLOBAL_CATALOG_API_URL:{def:"https://cdn.live.ledger.com/platform/catalog/v1/data.json",parser:a,desc:"url used to fetch platform app manifests"},PLATFORM_GLOBAL_CATALOG_STAGING_API_URL:{def:"https://cdn.live.ledger-stg.com/platform/catalog/v1/data.json",parser:a,desc:"url used to fetch platform app manifests (staging)"},PLATFORM_RAMP_CATALOG_API_URL:{def:"https://cdn.live.ledger.com/platform/trade/v1/data.json",parser:a,desc:"url used to fetch platform app manifests"},PLATFORM_RAMP_CATALOG_STAGING_API_URL:{def:"https://cdn.live.ledger-stg.com/platform/trade/v1/data.json",parser:a,desc:"url used to fetch platform app manifests (staging)"},PLATFORM_API_URL:{def:"",parser:a,desc:"url used to fetch platform catalog"},PLATFORM_API_VERSION:{def:1,parser:o,desc:"version used for the platform api"},PLAYWRIGHT_RUN:{def:!1,parser:s,desc:"true when launched for E2E testing"},MARKET_API_URL:{def:"https://proxycg.api.live.ledger.com/api/v3",parser:a,desc:"Market data api"},USE_LEARN_STAGING_URL:{def:!1,parser:s,desc:"use the staging URL for the learn page"},DYNAMIC_CAL_BASE_URL:{def:"https://cdn.live.ledger.com/cryptoassets",parser:a,desc:"bucket S3 of the dynamic cryptoassets list"},CAL_SERVICE_URL:{def:"https://crypto-assets-service.api.ledger.com",parser:a,desc:"Cryptoassets list service url"},FEATURE_FLAGS:{def:"{}",parser:e=>{try{if("string"!=typeof e)throw new Error;return JSON.parse(e)}catch(e){return undefined}},desc:"key value map for feature flags: {[key in FeatureId]?: Feature]}"},PERFORMANCE_CONSOLE:{def:!1,parser:s,desc:"Show a performance overlay on the app UI"},ETHEREUM_STUCK_TRANSACTION_TIMEOUT:{def:3e5,parser:o,desc:"Time after which an optimisc operation is considered stuck"},EVM_REPLACE_TX_LEGACY_GASPRICE_FACTOR:{def:1.3,parser:i,desc:"Replace transaction gasprice factor for legacy evm transaction. This value should be 1.1 minimum since this is the minimum increase required by most nodes"},EVM_REPLACE_TX_EIP1559_MAXFEE_FACTOR:{def:1.3,parser:i,desc:"Replace transaction max fee factor for EIP1559 evm transaction. This value should be 1.1 minimum since this is the minimum increase required by most nodes"},EVM_REPLACE_TX_EIP1559_MAXPRIORITYFEE_FACTOR:{def:1.1,parser:i,desc:"Replace transaction max priority fee factor for EIP1559 evm transaction. This value should be 1.1 minimum since this is the minimum increase required by most nodes"},ENABLE_NETWORK_LOGS:{def:!1,parser:s,desc:"Enable network request and responses logs. Errors are always logged"},CRYPTO_ASSET_SEARCH_KEYS:{def:["ticker","name","keywords"],parser:c,desc:"Fuse search attributes to find a currency according to user input"},VERBOSE:{def:[],parser:c,desc:'Sets up debug console printing of logs. `VERBOSE=1` or `VERBOSE=true`: to print all logs | `VERBOSE="apdu,hw,transport,hid-verbose"` : filtering on a list of log `type` separated by a `,`'},DEFAULT_TRANSACTION_POLLING_INTERVAL:{def:3e4,parser:o,desc:"Default interval to poll for transaction confirmation in speedup/cancel evm flow (in ms)"},LOW_BATTERY_PERCENTAGE:{def:20,parser:o,desc:"Configure the low battery percentage threshold"},LOG_DRAWERS:{def:!1,parser:s,desc:"Enable logs for drawers"}};r.getDefinition=e=>e in l?l[e]:undefined;const u=Object.keys(l).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:l[t].def})),{}),d=Object.assign({},u);r.getAllEnvNames=()=>Object.keys(l);r.getAllEnvs=()=>Object.assign({},d);r.getEnv=e=>d[e];r.getEnvDefault=e=>u[e];r.isEnvDefault=e=>d[e]===u[e];r.getEnvDesc=e=>l[e].desc,r.changes=new n.Subject;r.setEnv=(e,t)=>{const n=d[e];n!==t&&(d[e]=t,r.changes.next({name:e,value:t,oldValue:n}))};r.setEnvUnsafe=(e,t)=>{const n=(0,r.getDefinition)(e);if(!n)return!1;const{parser:o}=n,i=o(t);return i===undefined||null===i?(console.warn(`Invalid ENV value for ${e}`),!1):((0,r.setEnv)(e,i),!0)}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>@ledgerhq/live-env",file:"node_modules/@ledgerhq/live-env/lib/env.js"}],[880,{"./env":879},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),o(e("./env"),r)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>@ledgerhq/live-env",file:"node_modules/@ledgerhq/live-env/lib/index.js"}],[881,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.listen=r.LocalTracer=r.trace=r.log=void 0;let n=0;const o=[];r.log=(e,t,r)=>{const o={type:e,id:String(++n),date:new Date};t&&(o.message=t),r&&(o.data=r),s(o)};r.trace=({type:e,message:t,data:r,context:o})=>{const i={type:e,id:String(++n),date:new Date};t&&(i.message=t),r&&(i.data=r),o&&(i.context=o),s(i)};class i{constructor(e,t){this.type=e,this.context=t}trace(e,t){(0,r.trace)({type:this.type,message:e,data:t,context:this.context})}getContext(){return this.context}setContext(e){this.context=e}updateContext(e){this.context=Object.assign(Object.assign({},this.context),e)}getType(){return this.type}setType(e){this.type=e}withType(e){return new i(e,this.context)}withContext(e){return new i(this.type,e)}withUpdatedContext(e){return new i(this.type,Object.assign(Object.assign({},this.context),e))}}r.LocalTracer=i;function s(e){for(let t=0;t(o.push(e),()=>{const t=o.indexOf(e);-1!==t&&(o[t]=o[o.length-1],o.pop())}),"undefined"!=typeof window&&(window.__ledgerLogsListen=r.listen)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/logs",file:"node_modules/@ledgerhq/logs/lib/index.js"}],[89,{"../../../shared/constants/notifications":5265,"../platforms/extension":291,"@metamask/safe-event-emitter":2306},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.NOTIFICATION_MANAGER_EVENTS=void 0;var n=s(e("@metamask/safe-event-emitter")),o=s(e("../platforms/extension")),i=e("../../../shared/constants/notifications");function s(e){return e&&e.__esModule?e:{default:e}}const a=r.NOTIFICATION_MANAGER_EVENTS={POPUP_CLOSED:"onPopupClosed"};class c extends n.default{constructor(){super(),this.platform=new o.default,this.platform.addOnRemovedListener(this._onWindowClosed.bind(this))}markAsAutomaticallyClosed(){this._popupAutomaticallyClosed=!0}async showPopup(e,t){this._popupId=t,this._setCurrentPopupId=e;const r=await this._getPopup(t);if(r)await this.platform.focusWindow(r.id);else{const e=0,t=0,r=await this.platform.openWindow({url:"notification.html",type:"popup",width:i.NOTIFICATION_WIDTH,height:i.NOTIFICATION_HEIGHT,left:e,top:t});r.left!==e&&"fullscreen"!==r.state&&await this.platform.updateWindowPosition(r.id,e,t),this._setCurrentPopupId(r.id),this._popupId=r.id}}_onWindowClosed(e){e===this._popupId&&(this._setCurrentPopupId(undefined),this._popupId=undefined,this.emit(a.POPUP_CLOSED,{automaticallyClosed:this._popupAutomaticallyClosed}),this._popupAutomaticallyClosed=undefined)}async _getPopup(){const e=await this.platform.getAllWindows();return this._getPopupIn(e)}_getPopupIn(e){return e?e.find((e=>e&&"popup"===e.type&&e.id===this._popupId)):null}}r.default=c}}},{package:"$root$",file:"app/scripts/lib/notification-manager.js"}],[9,{"@metamask/base-controller":1396},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.AccountOrderController=void 0;var n=e("@metamask/base-controller");const o={pinnedAccountList:[],hiddenAccountList:[]},i={pinnedAccountList:{persist:!0,anonymous:!0},hiddenAccountList:{persist:!0,anonymous:!0}};class s extends n.BaseController{constructor({messenger:e,state:t}){super({messenger:e,metadata:i,name:"AccountOrderController",state:{...o,...t}})}updateAccountsList(e){this.update((t=>(t.pinnedAccountList=e,t)))}updateHiddenAccountsList(e){this.update((t=>(t.hiddenAccountList=e,t)))}}r.AccountOrderController=s}}},{package:"$root$",file:"app/scripts/controllers/account-order.ts"}],[90,{"../../../../shared/constants/offscreen-communication":5266,"eth-lattice-keyring":3756},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.LatticeKeyringOffscreen=void 0;var n,o=(n=e("eth-lattice-keyring"))&&n.__esModule?n:{default:n},i=e("../../../../shared/constants/offscreen-communication");class s extends o.default{constructor(e={}){super(e)}async _getCreds(){try{const e=this.appName?this.appName:"Unknown",t=`${i.KnownOrigins.lattice}?keyring=${e}&forceLogin=true`;return await new Promise(((e,r)=>{chrome.runtime.sendMessage({target:i.OffscreenCommunicationTarget.latticeOffscreen,params:{url:t}},(t=>{t.error&&r(t.error),e(t.result)}))}))}catch(e){throw new Error(e)}}}r.LatticeKeyringOffscreen=s,function(e,t,r){(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}(s,"type",void 0),s.type=o.default.type}}},{package:"$root$",file:"app/scripts/lib/offscreen-bridge/lattice-offscreen-keyring.ts"}],[91,{"../../../../shared/constants/offscreen-communication":5266},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.LedgerOffscreenBridge=void 0;var n=e("../../../../shared/constants/offscreen-communication");function o(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}r.LedgerOffscreenBridge=class{constructor(){o(this,"isDeviceConnected",!1)}init(){return chrome.runtime.onMessage.addListener((e=>{e.target===n.OffscreenCommunicationTarget.extension&&e.event===n.OffscreenCommunicationEvents.ledgerDeviceConnect&&(this.isDeviceConnected=!0)})),Promise.resolve()}destroy(){return Promise.resolve()}getOptions(){return Promise.resolve({})}setOptions(){return Promise.resolve()}attemptMakeApp(){return new Promise(((e,t)=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.ledgerOffscreen,action:n.LedgerAction.makeApp},(r=>{r.success?e(!0):r.error?t(r.error):t(new Error("Unknown error occurred"))}))}))}updateTransportMethod(e){return new Promise(((t,r)=>{console.log("updating transport type to ",e," in ledger offscreen bridge"),chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.ledgerOffscreen,action:n.LedgerAction.updateTransport,params:{transportType:e}},(e=>{e.success?t(!0):r(new Error("Ledger transport could not be updated"))}))}))}getPublicKey(e){return new Promise(((t,r)=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.ledgerOffscreen,action:n.LedgerAction.getPublicKey,params:e},(e=>{e.success?t(e.payload):r(e.payload.error)}))}))}deviceSignTransaction(e){return new Promise(((t,r)=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.ledgerOffscreen,action:n.LedgerAction.signTransaction,params:e},(e=>{e.success?t(e.payload):r(e.payload.error)}))}))}deviceSignMessage(e){return new Promise(((t,r)=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.ledgerOffscreen,action:n.LedgerAction.signPersonalMessage,params:e},(e=>{e.success?t(e.payload):r(e.payload.error)}))}))}deviceSignTypedData(e){return new Promise(((t,r)=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.ledgerOffscreen,action:n.LedgerAction.signTypedData,params:e},(e=>{e.success?t(e.payload):r(e.payload.error)}))}))}}}}},{package:"$root$",file:"app/scripts/lib/offscreen-bridge/ledger-offscreen-bridge.ts"}],[92,{"../../../../shared/constants/offscreen-communication":5266},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.TrezorOffscreenBridge=void 0;var n=e("../../../../shared/constants/offscreen-communication");function o(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}r.TrezorOffscreenBridge=class{constructor(){o(this,"model",void 0),o(this,"minorVersion",void 0)}init(e){return chrome.runtime.onMessage.addListener((e=>{e.target===n.OffscreenCommunicationTarget.extension&&e.event===n.OffscreenCommunicationEvents.trezorDeviceConnect&&(this.model=e.payload.model,this.minorVersion=e.payload.minorVersion)})),new Promise((t=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.trezorOffscreen,action:n.TrezorAction.init,params:e},(()=>{t()}))}))}dispose(){return new Promise((e=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.trezorOffscreen,action:n.TrezorAction.dispose},(()=>{e()}))}))}getPublicKey(e){return console.log("getting public key for trezore offscreen bridge ",e.path,e.coin),new Promise((t=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.trezorOffscreen,action:n.TrezorAction.getPublicKey,params:e},(e=>{console.log("received get public key response for trezor offscreen bridge"),t(e)}))}))}ethereumSignTransaction(e){return new Promise((t=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.trezorOffscreen,action:n.TrezorAction.signTransaction,params:e},(e=>{t(e)}))}))}ethereumSignMessage(e){return new Promise((t=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.trezorOffscreen,action:n.TrezorAction.signMessage,params:e},(e=>{t(e)}))}))}ethereumSignTypedData(e){return new Promise((t=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.trezorOffscreen,action:n.TrezorAction.signTypedData,params:e},(e=>{t(e)}))}))}}}}},{package:"$root$",file:"app/scripts/lib/offscreen-bridge/trezor-offscreen-bridge.ts"}],[93,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function o(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}Object.defineProperty(r,"__esModule",{value:!0}),r.IndexedDBPPOMStorage=void 0;const i=async(e,t,r)=>{const n=await crypto.subtle.digest("SHA-256",t);if(Array.from(new Uint8Array(n)).map((e=>e.toString(16).padStart(2,"0"))).join("")!==r)throw new Error(`Checksum mismatch for key ${e}`)};var s=new WeakSet;function a(e){return new Promise(((t,r)=>{const n=indexedDB.open(this.storeName,this.dbVersion);n.onerror=e=>{var t;r(new Error(`Failed to open database ${this.storeName}: ${null===(t=e.target)||void 0===t?void 0:t.error}`))},n.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName,{keyPath:["name","chainId"]})},n.onsuccess=r=>{const n=r.target.result.transaction([this.storeName],e).objectStore(this.storeName);t(n)}}))}r.IndexedDBPPOMStorage=class{constructor(e,t){n(this,s),o(this,"storeName",void 0),o(this,"dbVersion",void 0),this.storeName=e,this.dbVersion=t}async objectStoreAction(e,t,r="readonly"){return new Promise(((n,o)=>{(function(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")})(s,this,a).call(this,r).then((r=>{const i=r[e](t);i.onsuccess=async e=>{n(e)},i.onerror=t=>{var r;o(new Error(`Error in indexDB operation ${e}: ${null===(r=t.target)||void 0===r?void 0:r.error}`))}})).catch((e=>{o(e)}))}))}async read(e,t){var r;const n=null===(r=(await this.objectStoreAction("get",[e.name,e.chainId])).target)||void 0===r||null===(r=r.result)||void 0===r?void 0:r.data;return await i(e,n,t),n}async write(e,t,r){await i(e,t,r),await this.objectStoreAction("put",{...e,data:t},"readwrite")}async delete(e){await this.objectStoreAction("delete",[e.name,e.chainId],"readwrite")}async dir(){var e;return null===(e=(await this.objectStoreAction("getAllKeys")).target)||void 0===e?void 0:e.result.map((([e,t])=>({name:e,chainId:t})))}}}}},{package:"$root$",file:"app/scripts/lib/ppom/indexed-db-backend.ts"}],[94,{"../../../../shared/constants/app":5248,"../../../../shared/constants/security-provider":5270,"../../../../shared/constants/transaction":5278,"../../../../shared/lib/trace":5291,"../../../../shared/modules/selectors/networks":5320,"./ppom-util":95,"@metamask/controller-utils":1422},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createPPOMMiddleware=function(e,t,r,d,f,p){return async(h,g,m)=>{try{const{securityAlertsEnabled:g}=t.state,{chainId:m}=(0,a.getProviderConfig)({metamask:r.state})??{};if(!m)return;if(!g||!u.includes(h.method))return;const b=h.params[0];if("string"==typeof b){const{isSIWEMessage:e}=(0,n.detectSIWE)({data:b});if(e)return}else if(h.method===o.MESSAGE_TYPE.ETH_SEND_TRANSACTION){const{to:e}=b??{},t=f.listAccounts();if(t.some((({address:t})=>(null==t?void 0:t.toLowerCase())===(null==e?void 0:e.toLowerCase()))))return}const _=(0,l.generateSecurityAlertId)();(0,c.trace)({name:c.TraceName.PPOMValidation,parentContext:h.traceContext},(()=>(0,l.validateRequestWithPPOM)({ppomController:e,request:h,securityAlertId:_,chainId:m,updateSecurityAlertResponse:p})));const y={...s.SECURITY_ALERT_RESPONSE_CHECKING_CHAIN,securityAlertId:_};i.SIGNING_METHODS.includes(h.method)&&d.addSignatureSecurityAlertResponse(y),h.securityAlertResponse=y}catch(e){h.securityAlertResponse=(0,l.handlePPOMError)(e,"Error createPPOMMiddleware: ")}finally{m()}}};var n=e("@metamask/controller-utils"),o=e("../../../../shared/constants/app"),i=e("../../../../shared/constants/transaction"),s=e("../../../../shared/constants/security-provider"),a=e("../../../../shared/modules/selectors/networks"),c=e("../../../../shared/lib/trace"),l=e("./ppom-util");const u=Object.freeze(["eth_sendRawTransaction","eth_sendTransaction",...i.SIGNING_METHODS])}}},{package:"$root$",file:"app/scripts/lib/ppom/ppom-middleware.ts"}],[95,{"../../../../shared/constants/security-provider":5270,"../../../../shared/constants/transaction":5278,"./security-alerts-api":97,"@metamask/transaction-controller":2698,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.METHOD_SIGN_TYPED_DATA_V4=r.METHOD_SIGN_TYPED_DATA_V3=void 0,r.generateSecurityAlertId=function(){return(0,o.v4)()},r.handlePPOMError=p,r.isChainSupported=h,r.updateSecurityAlertResponse=async function({appStateController:e,method:t,securityAlertId:r,securityAlertResponse:n,signatureController:o,transactionController:i}){const a=s.SIGNING_METHODS.includes(t),c=await async function(e,t,r,n){const o=s.SIGNING_METHODS.includes(t);for(;;){let t;if(t=o?Object.values(r.messages).find((t=>{var r;return(null===(r=t.securityAlertResponse)||void 0===r?void 0:r.securityAlertId)===e})):n.state.transactions.find((t=>{var r;return(null===(r=t.securityAlertResponse)||void 0===r?void 0:r.securityAlertId)===e})),t)return t;await new Promise((e=>setTimeout(e,100)))}}(r,t,o,i);a?e.addSignatureSecurityAlertResponse({...n,securityAlertId:r}):i.updateSecurityAlertResponse(c.id,{...n,securityAlertId:r})},r.validateRequestWithPPOM=async function({ppomController:e,request:t,securityAlertId:r,chainId:o,updateSecurityAlertResponse:s}){try{if(!await h(o))return void await s(t.method,r,i.SECURITY_ALERT_RESPONSE_CHAIN_NOT_SUPPORTED);await s(t.method,r,i.LOADING_SECURITY_ALERT_RESPONSE);const c=function(e){if(t=e,t.method!==l)return function(e){if((e.method===d||e.method===u)&&Array.isArray(e.params))return{...e,params:e.params.slice(0,2)};return e}(e);var t;const r=e.params[0],o=(0,n.normalizeTransactionParams)(r);return{...e,params:[o]}}(t),f=(0,a.isSecurityAlertsAPIEnabled)()?await async function(e,t,r){try{return{...await(0,a.validateWithSecurityAlertsAPI)(t,r),source:i.SecurityAlertSource.API}}catch(n){return p(n,"Error validating request with security alerts API"),await g(e,r,t)}}(e,o,c):await g(e,c,o);await s(t.method,r,f)}catch(e){await s(t.method,r,p(e,"Error validating JSON RPC using PPOM: "))}};var n=e("@metamask/transaction-controller"),o=e("uuid"),i=e("../../../../shared/constants/security-provider"),s=e("../../../../shared/constants/transaction"),a=e("./security-alerts-api");const{sentry:c}=global,l="eth_sendTransaction",u=r.METHOD_SIGN_TYPED_DATA_V3="eth_signTypedData_v3",d=r.METHOD_SIGN_TYPED_DATA_V4="eth_signTypedData_v4",f={result_type:i.BlockaidResultType.Errored,reason:i.BlockaidReason.errored};function p(e,t){const r=function(e){if("object"==typeof e||"string"==typeof e)return e;return JSON.stringify(e)}(e),n=function(e){if(e instanceof Error)return`${e.name}: ${e.message}`;return JSON.stringify(e)}(e);return null==c||c.captureException(e),console.error(t,r),{...f,description:n}}async function h(e){let t=i.SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS_FALLBACK_LIST;try{(0,a.isSecurityAlertsAPIEnabled)()&&(t=await(0,a.getSecurityAlertsAPISupportedChainIds)())}catch(e){p(e,"Error fetching supported chains from security alerts API")}return t.includes(e)}async function g(e,t,r){return{...await e.usePPOM((e=>e.validateJsonRpc(t)),r),source:i.SecurityAlertSource.Local}}}}},{package:"$root$",file:"app/scripts/lib/ppom/ppom-util.ts"}],[96,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){let n;Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.PPOM=void 0,r.initSync=function(e){if(n!==undefined)return n;const t=A();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));const r=new WebAssembly.Instance(e,t);return S(r,e)},r.main=function(){n.main()};const o="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&o.decode();let i=null;function s(){return null!==i&&0!==i.byteLength||(i=new Uint8Array(n.memory.buffer)),i}function a(e,t){return e>>>=0,o.decode(s().subarray(e,e+t))}const c=new Array(128).fill(undefined);c.push(undefined,null,!0,!1);let l=c.length;function u(e){l===c.length&&c.push(c.length+1);const t=l;return l=c[t],c[t]=e,t}function d(e){return c[e]}function f(e){const t=d(e);return function(e){e<132||(c[e]=l,l=e)}(e),t}let p=0;const h="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},g="function"==typeof h.encodeInto?function(e,t){return h.encodeInto(e,t)}:function(e,t){const r=h.encode(e);return t.set(r),{read:e.length,written:r.length}};function m(e,t,r){if(r===undefined){const r=h.encode(e),n=t(r.length,1)>>>0;return s().subarray(n,n+r.length).set(r),p=r.length,n}let n=e.length,o=t(n,1)>>>0;const i=s();let a=0;for(;a127)break;i[o+a]=t}if(a!==n){0!==a&&(e=e.slice(a)),o=r(o,n,n=a+3*e.length,1)>>>0;const t=s().subarray(o+a,o+n);a+=g(e,t).written}return p=a,o}let b=null;function _(){return null!==b&&0!==b.byteLength||(b=new Int32Array(n.memory.buffer)),b}function y(e){const t=typeof e;if("number"==t||"boolean"==t||null==e)return`${e}`;if("string"==t)return`"${e}"`;if("symbol"==t){const t=e.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=e.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(e)){const t=e.length;let r="[";t>0&&(r+=y(e[0]));for(let n=1;n1))return toString.call(e);if(n=r[1],"Object"==n)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:n}function E(e,t,r){n.wasm_bindgen__convert__closures__invoke1_mut(e,t,u(r))}function w(e,t){n._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__destroy(e,t)}let v=null;function P(e,t){const r=t(4*e.length,4)>>>0,o=(null!==v&&0!==v.byteLength||(v=new Uint32Array(n.memory.buffer)),v);for(let t=0;t>>=0;const t=Object.create(T.prototype);return t.__wbg_ptr=e,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();n.__wbg_ppom_free(e)}static new(e,t){const r=P(t,n.__wbindgen_malloc),o=p;return f(n.ppom_new(u(e),r,o))}validateJsonRpc(e){return f(n.ppom_validateJsonRpc(this.__wbg_ptr,u(e)))}static version(){return f(n.ppom_version())}}function A(){const e={wbg:{}};return e.wbg.__wbg_buffer_085ec1f694018c4f=function(e){return u(d(e).buffer)},e.wbg.__wbg_call_01734de55d61e11d=function(){return O((function(e,t,r){return u(d(e).call(d(t),d(r)))}),arguments)},e.wbg.__wbg_call_4c92f6aec1e1d6e6=function(){return O((function(e,t,r,n){return u(d(e).call(d(t),d(r),d(n)))}),arguments)},e.wbg.__wbg_from_d7c216d4616bb368=function(e){return u(Array.from(d(e)))},e.wbg.__wbg_get_44be0491f933a435=function(e,t){return u(d(e)[t>>>0])},e.wbg.__wbg_length_72e2208bbc0efc61=function(e){return d(e).length},e.wbg.__wbg_length_d813e535247d427e=function(e){return d(e).length},e.wbg.__wbg_length_fff51ee6522a1a18=function(e){return d(e).length},e.wbg.__wbg_new_43f1b47c28813cbd=function(e,t){try{var r={a:e,b:t};const o=new Promise(((e,t)=>{const o=r.a;r.a=0;try{return function(e,t,r,o){n.wasm_bindgen__convert__closures__invoke2_mut(e,t,u(r),u(o))}(o,r.b,e,t)}finally{r.a=o}}));return u(o)}finally{r.a=r.b=0}},e.wbg.__wbg_new_8125e318e6245eed=function(e){return u(new Uint8Array(d(e)))},e.wbg.__wbg_parse_670c19d4e984792e=function(){return O((function(e,t){return u(JSON.parse(a(e,t)))}),arguments)},e.wbg.__wbg_ppom_new=function(e){return u(T.__wrap(e))},e.wbg.__wbg_resolve_53698b95aaf7fcf8=function(e){return u(Promise.resolve(d(e)))},e.wbg.__wbg_set_5cf90238115182c3=function(e,t,r){d(e).set(d(t),r>>>0)},e.wbg.__wbg_stringify_e25465938f3f611f=function(){return O((function(e){return u(JSON.stringify(d(e)))}),arguments)},e.wbg.__wbg_then_b2267541e2a73865=function(e,t,r){return u(d(e).then(d(t),d(r)))},e.wbg.__wbg_then_f7e06ee3c11698eb=function(e,t){return u(d(e).then(d(t)))},e.wbg.__wbindgen_cb_drop=function(e){const t=f(e).original;if(1==t.cnt--)return t.a=0,!0;return!1},e.wbg.__wbindgen_closure_wrapper_wasm_bindgen__closure__Closure_T___wrap__breaks_if_inlined=function(e,t,r){const n=function(e,t,r,n){const o={a:e,b:t,cnt:1},i=(...e)=>{o.cnt++;const t=o.a;o.a=0;try{return n(t,o.b,...e)}finally{0==--o.cnt?r(t,o.b):o.a=t}};return i.original=o,i}(e,t,w,E);return u(n)},e.wbg.__wbindgen_debug_string=function(e,t){const r=m(y(d(t)),n.__wbindgen_malloc,n.__wbindgen_realloc),o=p;_()[e/4+1]=o,_()[e/4+0]=r},e.wbg.__wbindgen_error_new=function(e,t){return u(new Error(a(e,t)))},e.wbg.__wbindgen_is_undefined=function(e){return d(e)===undefined},e.wbg.__wbindgen_memory=function(){return u(n.memory)},e.wbg.__wbindgen_object_drop_ref=function(e){f(e)},e.wbg.__wbindgen_string_get=function(e,t){const r=d(t),o="string"==typeof r?r:undefined;var i,s=(i=o)===undefined||null===i?0:m(o,n.__wbindgen_malloc,n.__wbindgen_realloc),a=p;_()[e/4+1]=a,_()[e/4+0]=s},e.wbg.__wbindgen_string_new=function(e,t){return u(a(e,t))},e.wbg.__wbindgen_throw=function(e,t){throw new Error(a(e,t))},e}function S(e,t){return n=e.exports,I.__wbindgen_wasm_module=t,b=null,v=null,i=null,n.__wbindgen_start(),n}async function I(e){if(n!==undefined)return n;const t=A();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:r,module:o}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}{const r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}(await e,t);return S(r,o)}r.PPOM=T;r.default=I}}},{package:"$root$",file:"app/scripts/lib/ppom/ppom.js"}],[97,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getSecurityAlertsAPISupportedChainIds=async function(){return i(o)},r.isSecurityAlertsAPIEnabled=function(){const e="true";return"true"===e.toString()},r.validateWithSecurityAlertsAPI=async function(e,t){return i(`${n}/${e}`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})};const n="validate",o="supportedChains";async function i(e,t){const r=function(e){const t="https://security-alerts.api.cx.metamask.io";if(!t)throw new Error("Security alerts API URL is not set");return`${t}/${e}`}(e),n=await fetch(r,t);if(!n.ok)throw new Error(`Security alerts API request failed with status: ${n.status}`);return await n.json()}}}},{package:"$root$",file:"app/scripts/lib/ppom/security-alerts-api.ts"}],[98,{"./handlers":104,"@metamask/permission-controller":2133,"@metamask/rpc-errors":2304,"@metamask/snaps-rpc-methods":2479,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createMethodMiddleware=r.createLegacyMethodMiddleware=void 0;var n=e("@metamask/permission-controller"),o=e("@metamask/rpc-errors"),i=e("@metamask/snaps-rpc-methods"),s=e("@metamask/utils"),a=e("./handlers");const c=[...a.handlers,...n.permissionRpcMethods.handlers];r.createMethodMiddleware=l(c),r.createLegacyMethodMiddleware=l(a.legacyHandlers);function l(e){const t=e.reduce(((e,t)=>{for(const r of t.methodNames)e[r]=t;return e}),{}),r=new Set(e.flatMap((({hookNames:e})=>Object.getOwnPropertyNames(e))));return e=>{!function(e,t){const r=[];if(t.forEach((t=>{(0,s.hasProperty)(e,t)||r.push(t)})),r.length>0)throw new Error(`Missing expected hooks:\n\n${r.join("\n")}\n`);const n=Object.getOwnPropertyNames(e).filter((e=>!t.has(e)));if(n.length>0)throw new Error(`Received unexpected hooks:\n\n${n.join("\n")}\n`)}(e,r);return async(r,n,s,a)=>{const c=t[r.method];if(c){const{implementation:t,hookNames:l}=c;try{return await t(r,n,s,a,(0,i.selectHooks)(e,l))}catch(e){return a(e instanceof Error?e:o.rpcErrors.internal({data:e}))}}return s()}}}}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/createMethodMiddleware.js"}],[99,{"../../../../shared/constants/network":5264,"@metamask/rpc-errors":2304},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createUnsupportedMethodMiddleware=function(){return async function(e,t,r,i){return o.UNSUPPORTED_RPC_METHODS.has(e.method)?i(n.rpcErrors.methodNotSupported()):r()}};var n=e("@metamask/rpc-errors"),o=e("../../../../shared/constants/network")}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/createUnsupportedMethodMiddleware.ts"}],[4,{"../../shared/constants/app":5248,"../../shared/constants/metametrics":5260,"../../shared/constants/offscreen-communication":5266,"../../shared/modules/add-nonce-to-csp":5295,"../../shared/modules/browser-runtime.utils":5297,"../../shared/modules/mv3.utils":5310,"../../shared/modules/object.utils":5312,"../../shared/modules/provider-injection":5313,"../../shared/modules/selectors/networks":5320,"../../test/e2e/background-socket/socket-background-to-mocha":5331,"../../test/e2e/default-fixture":5333,"../../test/stub/keyring-bridge":5339,"./constants/marketing-site-whitelist":6,"./constants/sentry-state":7,"./first-time-state":41,"./fixtures/generate-wallet-state":42,"./lib/createStreamSink":70,"./lib/ens-ipfs/setup":77,"./lib/get-first-preferred-lang-code":79,"./lib/getObjStructure":80,"./lib/local-store":82,"./lib/migrator":86,"./lib/network-store":88,"./lib/notification-manager":89,"./lib/setup-initial-state-hooks":114,"./lib/util":135,"./metamask-controller":136,"./migrations":289,"./offscreen":290,"./platforms/extension":291,"@metamask/controller-utils":1422,"@metamask/notification-services-controller":2115,"@metamask/obs-store":2126,"@metamask/rpc-errors":2304,"@metamask/snaps-rpc-methods":2479,"@metamask/utils":2761,"debounce-stream":3702,events:3868,"extension-port-stream":3871,loglevel:4386,"readable-stream":4791,"webextension-polyfill":5225},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loadStateFromPersistence=ve,r.setupController=Te,r.statePersistenceEvents=void 0,e("./lib/setup-initial-state-hooks");var n=H(e("events")),o=e("readable-stream"),i=H(e("debounce-stream")),s=H(e("loglevel")),a=H(e("webextension-polyfill")),c=e("@metamask/obs-store"),l=e("@metamask/utils"),u=e("@metamask/controller-utils"),d=H(e("extension-port-stream")),f=e("@metamask/rpc-errors"),p=e("@metamask/snaps-rpc-methods"),h=e("@metamask/notification-services-controller"),g=e("../../shared/constants/app"),m=e("../../shared/constants/metametrics"),b=e("../../shared/modules/browser-runtime.utils"),_=e("../../shared/modules/mv3.utils"),y=e("../../shared/modules/object.utils"),E=(e("../../test/e2e/default-fixture"),e("../../test/e2e/background-socket/socket-background-to-mocha"),e("../../shared/constants/offscreen-communication"),e("../../test/stub/keyring-bridge")),w=e("../../shared/modules/selectors/networks"),v=e("../../shared/modules/add-nonce-to-csp"),P=e("../../shared/modules/provider-injection"),O=H(e("./migrations")),T=H(e("./lib/migrator")),A=H(e("./platforms/extension")),S=H(e("./lib/local-store")),I=H(e("./lib/network-store")),C=e("./constants/sentry-state"),N=H(e("./lib/createStreamSink")),x=q(e("./lib/notification-manager")),R=q(e("./metamask-controller")),k=H(e("./first-time-state")),j=H(e("./lib/get-first-preferred-lang-code")),L=H(e("./lib/getObjStructure")),M=H(e("./lib/ens-ipfs/setup")),D=e("./lib/util"),U=(e("./fixtures/generate-wallet-state"),e("./offscreen")),B=e("./constants/marketing-site-whitelist");function F(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(F=function(e){return e?r:t})(e)}function q(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=F(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function H(e){return e&&e.__esModule?e:{default:e}}const G="#0376C9",V="#D73847",$=9,z=!1,K=z?new I.default:new S.default;global.stateHooks.getMostRecentPersistedState=()=>K.mostRecentRetrievedState;const{sentry:Y}=global;let W={...k.default};const X={[g.ENVIRONMENT_TYPE_POPUP]:!0,[g.ENVIRONMENT_TYPE_NOTIFICATION]:!0,[g.ENVIRONMENT_TYPE_FULLSCREEN]:!0},J=["trezor-connect"];s.default.setLevel("info",!1);const Z=new A.default,Q=new x.default;let ee=0,te=!1,re=!1;const ne={},oe={};let ie,se;const ae={};z&&(global.stateHooks.metamaskGetState=K.get.bind(K));const ce=new URL("https://metamask.github.io/phishing-warning/v4.1.0/"),le=ce.toString(),ue=1e3,de=r.statePersistenceEvents=new n.default,{promise:fe,resolve:pe,reject:he}=(0,D.deferredPromise)(),ge=async()=>{const e=await a.default.tabs.query({url:"",windowType:"normal"}).then((e=>((0,b.checkForLastErrorAndLog)(),e))).catch((()=>{(0,b.checkForLastErrorAndLog)()}));for(const t of e)a.default.tabs.sendMessage(t.id,{name:g.EXTENSION_MESSAGES.READY}).then((()=>{(0,b.checkForLastErrorAndLog)()})).catch((()=>{(0,b.checkForLastErrorAndLog)()}))};let me,be,_e;function ye(){const e=(new Date).toISOString();a.default.storage.session.set({timestamp:e})}async function Ee(){console.log("mm bg.js initialize called");try{console.log("mm bg.js loadStateFromPersistence called");const t=await ve();console.log("mm bg.js createOffscreen called");const r=_.isManifestV3?(0,U.createOffscreen)():null,n=t.data,o=await(0,j.default)();let i;if(_.isManifestV3){var e;if(!1!==(null===(e=n.PreferencesController)||void 0===e?void 0:e.enableMV3TimestampSave)){const e=2e3;ye(),setInterval(ye,e)}console.log("mm bg.js sessionData get called");const t=await a.default.storage.session.get(["isFirstMetaMaskControllerSetup"]);i=(null==t?void 0:t.isFirstMetaMaskControllerSetup)===undefined,await a.default.storage.session.set({isFirstMetaMaskControllerSetup:i})}const c=z?{keyrings:{trezorBridge:E.FakeTrezorBridge,ledgerBridge:E.FakeLedgerBridge}}:{};console.log("mm bg.js setupController get called"),Te(n,o,c,i,t.meta,r),console.log("mm bg.js maybeDetectPhishing get called"),function(e){async function t(e,t){try{return await a.default.tabs.update(e,{url:t})}catch(e){return null==Y?void 0:Y.captureException(e)}}const r=!_.isManifestV3;a.default.webRequest.onBeforeRequest.addListener((n=>{var o,i,s;if(n.tabId===a.default.tabs.TAB_ID_NONE)return{};const{completedOnboarding:c}=e.onboardingController.state;if(!c)return{};if(!e.preferencesController.state.usePhishDetect)return{};if(n.initiator&&new URL(n.initiator).host===ce.host)return{};const{hostname:l,href:u,searchParams:d}=new URL(n.url);if(z&&d.has("IN_TEST_BYPASS_EARLY_PHISHING_DETECTION"))return{};e.phishingController.maybeUpdateState();const f=e.phishingController.isBlockedRequest(n.url);let p,h;if("main_frame"!==n.type&&"sub_frame"!==n.type||(p=e.phishingController.test(n.url)),!(null!==(o=p)&&void 0!==o&&o.result||f.result))return{};let g=l;null!==(i=p)&&void 0!==i&&i.result&&f.result?h=`${p.type} and ${f.type}`:null!==(s=p)&&void 0!==s&&s.result?h=p.type:(h=f.type,g=n.initiator),e.metaMetricsController.trackEvent({event:m.MetaMetricsEventName.PhishingPageDisplayed,category:m.MetaMetricsEventCategory.Phishing,properties:{url:g,referrer:{url:g},reason:h,requestDomain:f.result?l:undefined}});const b=new URLSearchParams({hostname:l,href:u}),_=new URL(le);_.hash=b.toString();const y=_.toString();return r?"main_frame"===n.type?{redirectUrl:y}:(t(n.tabId,y),{cancel:!0}):(t(n.tabId,y),{})}),{urls:["http://*/*","https://*/*","ws://*/*","wss://*/*"]},r?["blocking"]:[])}(ie),_.isManifestV3||(await async function(){let e;try{const t=new URL(le);let r,n;t.hash="#extensionStartup",e=window.document.createElement("iframe"),e.setAttribute("src",t.href),e.setAttribute("sandbox","allow-scripts allow-same-origin");const o=new Promise(((e,t)=>{r=e,n=t}));e.addEventListener("load",r),window.document.body.appendChild(e),setTimeout((()=>n(new we)),ue),await o}catch(e){e instanceof we?console.warn("Phishing warning page timeout; page not guaranteed to work offline."):console.error("Failed to initialize phishing warning page",e)}finally{e&&e.remove()}}(),(0,D.getPlatform)()===g.PLATFORM_FIREFOX&&function(){const e=btoa(a.default.runtime.getURL("/"));a.default.webRequest.onHeadersReceived.addListener((({responseHeaders:t,url:r})=>{const n=(0,P.checkURLForProviderInjection)(new URL(r)),o=ie.preferencesController.state.overrideContentSecurityPolicyHeader;if(n&&o)for(const r of t)"content-security-policy"===r.name.toLowerCase()&&(r.value=(0,v.addNonceToCsp)(r.value,e));return{responseHeaders:t}}),{types:["main_frame","sub_frame"],urls:["http://*/*","https://*/*"]},["blocking","responseHeaders"])}()),console.log("mm bg.js sendReadyMessageToTabs get called"),await ge(),s.default.info("MetaMask initialization complete."),console.log("mm bg.js resolveInitialization get called"),pe()}catch(e){he(e)}}console.log("browser.runtime.onConnect.addListener called at ",Date.now()),a.default.runtime.onConnect.addListener((async(...e)=>{console.log("mm bg.js queing up conn attempt ",e),await fe,console.log("mm bg.js connectRemote with ",e),me(...e)})),console.log("browser.runtime.onConnectExternal.addListener ",Date.now()),a.default.runtime.onConnectExternal.addListener((async(...e)=>{var t;console.log("mm bg.js queing up conn ext attempt ",e),await fe,console.log("mm bg.js onConnectExternal isInitialized with ",e);null!==(t=e[0].sender.tab)&&void 0!==t&&t.id,console.log("mm bg.js onConnectExternal connectExternalExtension ",e),be(...e)}));class we extends Error{constructor(){super("Timeout failed")}}async function ve(){const e=new T.default({migrations:O.default,defaultVersion:null});if(e.on("error",console.warn),se=await K.get()||e.generateInitialState(W),se&&!se.data&&(se=e.generateInitialState(W),Y.captureMessage("MetaMask - Empty vault found - unable to recover")),e.on("error",(e=>{const t=(0,L.default)(se);Y.captureException(e,{extra:{vaultStructure:t}})})),se=await e.migrateData(se),!se)throw new Error("MetaMask - migrator returned undefined");if(!(0,l.isObject)(se.meta))throw new Error(`MetaMask - migrator metadata has invalid type '${typeof se.meta}'`);if("number"!=typeof se.meta.version)throw new Error(`MetaMask - migrator metadata version has invalid type '${typeof se.meta.version}'`);if(!(0,l.isObject)(se.data))throw new Error(`MetaMask - migrator data has invalid type '${typeof se.data}'`);return K.setMetadata(se.meta),K.set(se.data),se}function Pe(e){var t;const{metaMetricsId:r}=ie.metaMetricsController.state;if(!(0,D.shouldEmitDappViewedEvent)(r))return;const n=ie.controllerMessenger.call("PermissionController:getPermissions",e),o=null==n||null===(t=n.eth_accounts)||void 0===t||null===(t=t.caveats[0])||void 0===t?void 0:t.value.length;if(!o)return;const i=ie.controllerMessenger.call("PreferencesController:getState"),s=Object.keys(i.identities).length;ie.metaMetricsController.trackEvent({event:m.MetaMetricsEventName.DappViewed,category:m.MetaMetricsEventCategory.InpageProvider,referrer:{url:e},properties:{is_first_visit:!1,number_of_accounts:s,number_of_accounts_connected:o}})}function Oe(e){if(!e.sender||!e.sender.tab||!e.sender.url)return;const t=e.sender.tab.id,r=new URL(e.sender.url),{origin:n}=r;Object.keys(ae).includes(t)||(ae[t]=n);const o=ie.controllerMessenger.call("PermissionController:hasPermissions",n),i="New Tab"!==e.sender.tab.title;o&&i&&Pe(n)}function Te(e,t,r,n,l,b){var E;ie=new R.default({infuraProjectId:"b6bf7d3508c941499b10025c0776eaf8",showUserConfirmation:Ae,initState:e,initLangCode:t,platform:Z,notificationManager:Q,browser:a.default,getRequestAccountTabIds:()=>oe,getOpenMetamaskTabsIds:()=>ne,localStore:K,overrides:r,isFirstMetaMaskControllerSetup:n,currentMigrationVersion:l.version,featureFlags:{},offscreenPromise:b}),(0,M.default)({getCurrentChainId:()=>(0,w.getCurrentChainId)({metamask:ie.networkController.state}),getIpfsGateway:ie.preferencesController.getIpfsGateway.bind(ie.preferencesController),getUseAddressBarEnsResolution:()=>ie.preferencesController.state.useAddressBarEnsResolution,provider:ie.provider}),(0,o.pipeline)((0,c.storeAsStream)(ie.store),(0,i.default)(1e3),(0,N.default)((async e=>{await K.set(e),de.emit("state-persisted",e)})),(e=>{s.default.error("MetaMask - Persistence pipeline failed",e)})),E=ie,global.stateHooks.getSentryAppState=function(){const e=E.memStore.getState();return(0,y.maskObject)(e,C.SENTRY_BACKGROUND_STATE)};const v=()=>ee>0||Boolean(Object.keys(ne).length)||te,P=(e,t)=>{if(!1===e)ie.onClientClosed();else{if(t===g.ENVIRONMENT_TYPE_FULLSCREEN&&Boolean(Object.keys(ne).length))return;ie.onEnvironmentTypeClosed(t)}};function O(e,t){return e>t?`${t}+`:String(e)}function T(){const e=A(),t=function(){try{const{isNotificationServicesEnabled:e,isFeatureAnnouncementsEnabled:t}=ie.notificationServicesController.state,r=Object.values(ie.notificationServicesController.state.metamaskNotificationsList).filter((e=>e.type===h.NotificationServicesController.Constants.TRIGGER_TYPES.SNAP&&null===e.readDate)).length,n=t?ie.notificationServicesController.state.metamaskNotificationsList.filter((e=>!e.isRead&&e.type===h.NotificationServicesController.Constants.TRIGGER_TYPES.FEATURES_ANNOUNCEMENT)).length:0,o=e?ie.notificationServicesController.state.metamaskNotificationsList.filter((e=>!e.isRead&&e.type!==h.NotificationServicesController.Constants.TRIGGER_TYPES.FEATURES_ANNOUNCEMENT&&e.type!==h.NotificationServicesController.Constants.TRIGGER_TYPES.SNAP)).length:0;return r+n+o}catch(e){return console.error("Failed to get unread notifications count:",e),0}}();let r="",n=G;e?r=O(e,$):t>0&&(r=O(t,$),n=V);try{const e={text:r},t={color:n};_.isManifestV3?(a.default.action.setBadgeText(e),a.default.action.setBadgeBackgroundColor(t)):(a.default.browserAction.setBadgeText(e),a.default.browserAction.setBadgeBackgroundColor(t))}catch(e){console.error("Error updating browser badge:",e)}}function A(){try{let e=ie.appStateController.waitingForUnlock.length+ie.approvalController.getTotalApprovalCount();return ie.preferencesController.getUseRequestQueue()&&(e+=ie.queuedRequestController.state.queuedRequestCount),e}catch(e){return console.error("Failed to get pending approval count:",e),0}}me=async e=>{var t;const n=e.name;if(J.includes(e.name))return;let i=!1;const s=(0,D.getPlatform)(),c=null!==(t=e.sender)&&void 0!==t&&t.url?new URL(e.sender.url):null;if(i=s===g.PLATFORM_FIREFOX?X[n]:(null==c?void 0:c.origin)===`chrome-extension://${a.default.runtime.id}`,i){var l;const t=(null==r||null===(l=r.getPortStream)||void 0===l?void 0:l.call(r,e))||new d.default(e);if(ie.isClientOpen=!0,ie.setupTrustedCommunication(t,e.sender),n===g.ENVIRONMENT_TYPE_POPUP&&(ee+=1,(0,o.finished)(t,(()=>{ee-=1;const e=v();ie.isClientOpen=e,P(e,g.ENVIRONMENT_TYPE_POPUP)}))),n===g.ENVIRONMENT_TYPE_NOTIFICATION&&(te=!0,(0,o.finished)(t,(()=>{te=!1;const e=v();ie.isClientOpen=e,P(e,g.ENVIRONMENT_TYPE_NOTIFICATION)}))),n===g.ENVIRONMENT_TYPE_FULLSCREEN){const r=e.sender.tab.id;ne[r]=!0,(0,o.finished)(t,(()=>{delete ne[r];const e=v();ie.isClientOpen=e,P(e,g.ENVIRONMENT_TYPE_FULLSCREEN)}))}}else if(c&&c.origin===ce.origin&&c.pathname===ce.pathname){var u;const t=(null==r||null===(u=r.getPortStream)||void 0===u?void 0:u.call(r,e))||new d.default(e);ie.setupPhishingCommunication({connectionStream:t})}else{if(e.sender&&e.sender.tab&&e.sender.url){const t=e.sender.tab.id,r=new URL(e.sender.url),{origin:n}=r;Oe(e),e.onMessage.addListener((e=>{e.data&&e.data.method===g.MESSAGE_TYPE.ETH_REQUEST_ACCOUNTS&&(oe[n]=t)}))}if(c&&B.COOKIE_ID_MARKETING_WHITELIST_ORIGINS.some((e=>e===c.origin))){var f;const t=(null==r||null===(f=r.getPortStream)||void 0===f?void 0:f.call(r,e))||new d.default(e);ie.setUpCookieHandlerCommunication({connectionStream:t})}be(e)}},be=e=>{var t;const n=(null==r||null===(t=r.getPortStream)||void 0===t?void 0:t.call(r,e))||new d.default(e);ie.setupUntrustedCommunicationEip1193({connectionStream:n,sender:e.sender})},_e=async e=>{var t;if(J.includes(e.name))return;e.sender&&e.sender.tab&&e.sender.url&&Oe(e);const n=(null==r||null===(t=r.getPortStream)||void 0===t?void 0:t.call(r,e))||new d.default(e);ie.setupUntrustedCommunicationCaip({connectionStream:n,sender:e.sender})},null!=r&&r.registerConnectListeners&&r.registerConnectListeners(me,be),T(),ie.decryptMessageController.hub.on(R.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE,T),ie.encryptionPublicKeyController.hub.on(R.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE,T),ie.signatureController.hub.on(R.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE,T),ie.appStateController.on(R.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE,T),ie.controllerMessenger.subscribe(R.METAMASK_CONTROLLER_EVENTS.APPROVAL_STATE_CHANGE,T),ie.controllerMessenger.subscribe(R.METAMASK_CONTROLLER_EVENTS.QUEUED_REQUEST_STATE_CHANGE,T),ie.controllerMessenger.subscribe(R.METAMASK_CONTROLLER_EVENTS.METAMASK_NOTIFICATIONS_LIST_UPDATED,T),ie.controllerMessenger.subscribe(R.METAMASK_CONTROLLER_EVENTS.METAMASK_NOTIFICATIONS_MARK_AS_READ,T),Q.on(x.NOTIFICATION_MANAGER_EVENTS.POPUP_CLOSED,(({automaticallyClosed:e})=>{e?A()>0&&Ae():(ie.signatureController.rejectUnapproved(m.REJECT_NOTIFICATION_CLOSE_SIG),ie.decryptMessageController.rejectUnapproved(m.REJECT_NOTIFICATION_CLOSE),ie.encryptionPublicKeyController.rejectUnapproved(m.REJECT_NOTIFICATION_CLOSE),Object.values(ie.approvalController.state.pendingApprovals).forEach((({id:e,type:t})=>{switch(t){case u.ApprovalType.SnapDialogAlert:case u.ApprovalType.SnapDialogPrompt:case p.DIALOG_APPROVAL_TYPES.default:ie.approvalController.accept(e,null);break;case u.ApprovalType.SnapDialogConfirmation:case g.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.confirmAccountCreation:case g.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.confirmAccountRemoval:case g.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.showSnapAccountRedirect:ie.approvalController.accept(e,!1);break;default:ie.approvalController.reject(e,f.providerErrors.userRejectedRequest())}}))),T()})),Object.values(ie.snapController.state.snaps).some((e=>!e.preinstalled))&&ie.snapController.updateBlockedSnaps()}async function Ae(){const e=await Z.getActiveTabs(),t=Boolean(e.find((e=>ne[e.id]))),r=e.length>0&&e[0].extData&&e[0].extData.indexOf("vivaldi_tab")>-1;if(!re&&(r||0===ee)&&!t){re=!0;try{const e=ie.appStateController.getCurrentPopupId();await Q.showPopup((e=>ie.appStateController.setCurrentPopupId(e)),e)}finally{re=!1}}}const Se=()=>{if(ie)return ie.metaMetricsController.updateTraits({[m.MetaMetricsUserTrait.InstallDateExt]:(new Date).toISOString().split("T")[0]}),void ie.metaMetricsController.addEventBeforeMetricsOptIn({category:m.MetaMetricsEventCategory.App,event:m.MetaMetricsEventName.AppInstalled,properties:{}});setTimeout((()=>{Se()}),500)};async function Ie(){Boolean(await K.get())||(Se(),Z.openExtensionInBrowser()),a.default.tabs.onActivated.addListener((e=>{if(ie){const{tabId:t}=e,r=ae[t];r&&ie.permissionController.state.subjects[r]!==undefined&&Pe(r)}}))}(async function(){console.log("mm bg.js init background called"),await Ie();try{await Ee(),K.cleanUpMostRecentRetrievedState()}catch(e){s.default.error(e)}})()}}},{package:"$root$",file:"app/scripts/background.js"}]],[4],{}); \ No newline at end of file +LavaPack.loadBundle([[818,{"../core/AxiosError":792,"../env/data":802},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../env/data").version,o=e("../core/AxiosError"),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,r){function i(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new o(i(n," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!s[n]&&(s[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},t.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),i=n.length;i-- >0;){var s=n[i],a=t[s];if(a){var c=e[s],l=c===undefined||a(c,s,e);if(!0!==l)throw new o("option "+s+" must be "+l,o.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new o("Unknown option "+s,o.ERR_BAD_OPTION)}},validators:i}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios",file:"node_modules/@ledgerhq/evm-tools/node_modules/axios/lib/helpers/validator.js"}],[819,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=FormData}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios",file:"node_modules/@ledgerhq/evm-tools/node_modules/axios/lib/platform/browser/classes/FormData.js"}],[820,{"../../../helpers/AxiosURLSearchParams":803},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../../helpers/AxiosURLSearchParams");t.exports="undefined"!=typeof URLSearchParams?URLSearchParams:n}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios",file:"node_modules/@ledgerhq/evm-tools/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"}],[821,{"./classes/FormData":819,"./classes/URLSearchParams":820},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={isBrowser:!0,classes:{URLSearchParams:e("./classes/URLSearchParams"),FormData:e("./classes/FormData"),Blob:Blob},protocols:["http","https","file","blob","url","data"]}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios",file:"node_modules/@ledgerhq/evm-tools/node_modules/axios/lib/platform/browser/index.js"}],[822,{"./node/":821},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("./node/")}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios",file:"node_modules/@ledgerhq/evm-tools/node_modules/axios/lib/platform/index.js"}],[823,{"./helpers/bind":804},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,o=e("./helpers/bind"),i=Object.prototype.toString,s=(n=Object.create(null),function(e){var t=i.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())});function a(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function c(e){return Array.isArray(e)}function l(e){return void 0===e}var u=a("ArrayBuffer");function d(e){return"number"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=a("Date"),g=a("File"),m=a("Blob"),b=a("FileList");function _(e){return"[object Function]"===i.call(e)}var y=a("URLSearchParams");function E(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),c(e))for(var r=0,n=e.length;r0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:function(e,t,r){e=String(e),(r===undefined||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(c(e))return e;var t=e.length;if(!d(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:v,isFileList:b,forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:O,hasOwnProperty:T}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios",file:"node_modules/@ledgerhq/evm-tools/node_modules/axios/lib/utils.js"}],[824,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.version=void 0,r.version="ethers/5.7.2"}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers",file:"node_modules/@ledgerhq/evm-tools/node_modules/ethers/lib/_version.js"}],[825,{"./_version":824,"./utils":827,"@ethersproject/abstract-signer":505,"@ethersproject/bignumber":514,"@ethersproject/constants":520,"@ethersproject/contracts":523,"@ethersproject/logger":544,"@ethersproject/providers":561,"@ethersproject/wallet":612,"@ethersproject/wordlists":617},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(r,"__esModule",{value:!0}),r.Wordlist=r.version=r.wordlists=r.utils=r.logger=r.errors=r.constants=r.FixedNumber=r.BigNumber=r.ContractFactory=r.Contract=r.BaseContract=r.providers=r.getDefaultProvider=r.VoidSigner=r.Wallet=r.Signer=void 0;var s=e("@ethersproject/contracts");Object.defineProperty(r,"BaseContract",{enumerable:!0,get:function(){return s.BaseContract}}),Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return s.Contract}}),Object.defineProperty(r,"ContractFactory",{enumerable:!0,get:function(){return s.ContractFactory}});var a=e("@ethersproject/bignumber");Object.defineProperty(r,"BigNumber",{enumerable:!0,get:function(){return a.BigNumber}}),Object.defineProperty(r,"FixedNumber",{enumerable:!0,get:function(){return a.FixedNumber}});var c=e("@ethersproject/abstract-signer");Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return c.Signer}}),Object.defineProperty(r,"VoidSigner",{enumerable:!0,get:function(){return c.VoidSigner}});var l=e("@ethersproject/wallet");Object.defineProperty(r,"Wallet",{enumerable:!0,get:function(){return l.Wallet}});var u=i(e("@ethersproject/constants"));r.constants=u;var d=i(e("@ethersproject/providers"));r.providers=d;var f=e("@ethersproject/providers");Object.defineProperty(r,"getDefaultProvider",{enumerable:!0,get:function(){return f.getDefaultProvider}});var p=e("@ethersproject/wordlists");Object.defineProperty(r,"Wordlist",{enumerable:!0,get:function(){return p.Wordlist}}),Object.defineProperty(r,"wordlists",{enumerable:!0,get:function(){return p.wordlists}});var h=i(e("./utils"));r.utils=h;var g=e("@ethersproject/logger");Object.defineProperty(r,"errors",{enumerable:!0,get:function(){return g.ErrorCode}});var m=e("./_version");Object.defineProperty(r,"version",{enumerable:!0,get:function(){return m.version}});var b=new g.Logger(m.version);r.logger=b}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers",file:"node_modules/@ledgerhq/evm-tools/node_modules/ethers/lib/ethers.js"}],[826,{"./ethers":825},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(r,"__esModule",{value:!0}),r.Wordlist=r.version=r.wordlists=r.utils=r.logger=r.errors=r.constants=r.FixedNumber=r.BigNumber=r.ContractFactory=r.Contract=r.BaseContract=r.providers=r.getDefaultProvider=r.VoidSigner=r.Wallet=r.Signer=r.ethers=void 0;var s=i(e("./ethers"));r.ethers=s;try{var a=window;null==a._ethers&&(a._ethers=s)}catch(e){}var c=e("./ethers");Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return c.Signer}}),Object.defineProperty(r,"Wallet",{enumerable:!0,get:function(){return c.Wallet}}),Object.defineProperty(r,"VoidSigner",{enumerable:!0,get:function(){return c.VoidSigner}}),Object.defineProperty(r,"getDefaultProvider",{enumerable:!0,get:function(){return c.getDefaultProvider}}),Object.defineProperty(r,"providers",{enumerable:!0,get:function(){return c.providers}}),Object.defineProperty(r,"BaseContract",{enumerable:!0,get:function(){return c.BaseContract}}),Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(r,"ContractFactory",{enumerable:!0,get:function(){return c.ContractFactory}}),Object.defineProperty(r,"BigNumber",{enumerable:!0,get:function(){return c.BigNumber}}),Object.defineProperty(r,"FixedNumber",{enumerable:!0,get:function(){return c.FixedNumber}}),Object.defineProperty(r,"constants",{enumerable:!0,get:function(){return c.constants}}),Object.defineProperty(r,"errors",{enumerable:!0,get:function(){return c.errors}}),Object.defineProperty(r,"logger",{enumerable:!0,get:function(){return c.logger}}),Object.defineProperty(r,"utils",{enumerable:!0,get:function(){return c.utils}}),Object.defineProperty(r,"wordlists",{enumerable:!0,get:function(){return c.wordlists}}),Object.defineProperty(r,"version",{enumerable:!0,get:function(){return c.version}}),Object.defineProperty(r,"Wordlist",{enumerable:!0,get:function(){return c.Wordlist}})}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers",file:"node_modules/@ledgerhq/evm-tools/node_modules/ethers/lib/index.js"}],[827,{"@ethersproject/abi":500,"@ethersproject/address":507,"@ethersproject/base64":509,"@ethersproject/basex":510,"@ethersproject/bytes":516,"@ethersproject/hash":529,"@ethersproject/hdnode":534,"@ethersproject/json-wallets":537,"@ethersproject/keccak256":542,"@ethersproject/logger":544,"@ethersproject/properties":550,"@ethersproject/random":573,"@ethersproject/rlp":576,"@ethersproject/sha2":579,"@ethersproject/signing-key":583,"@ethersproject/solidity":601,"@ethersproject/strings":605,"@ethersproject/transactions":608,"@ethersproject/units":610,"@ethersproject/wallet":612,"@ethersproject/web":615},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(r,"__esModule",{value:!0}),r.formatBytes32String=r.Utf8ErrorFuncs=r.toUtf8String=r.toUtf8CodePoints=r.toUtf8Bytes=r._toEscapedUtf8String=r.nameprep=r.hexDataSlice=r.hexDataLength=r.hexZeroPad=r.hexValue=r.hexStripZeros=r.hexConcat=r.isHexString=r.hexlify=r.base64=r.base58=r.TransactionDescription=r.LogDescription=r.Interface=r.SigningKey=r.HDNode=r.defaultPath=r.isBytesLike=r.isBytes=r.zeroPad=r.stripZeros=r.concat=r.arrayify=r.shallowCopy=r.resolveProperties=r.getStatic=r.defineReadOnly=r.deepCopy=r.checkProperties=r.poll=r.fetchJson=r._fetchData=r.RLP=r.Logger=r.checkResultErrors=r.FormatTypes=r.ParamType=r.FunctionFragment=r.EventFragment=r.ErrorFragment=r.ConstructorFragment=r.Fragment=r.defaultAbiCoder=r.AbiCoder=void 0,r.Indexed=r.Utf8ErrorReason=r.UnicodeNormalizationForm=r.SupportedAlgorithm=r.mnemonicToSeed=r.isValidMnemonic=r.entropyToMnemonic=r.mnemonicToEntropy=r.getAccountPath=r.verifyTypedData=r.verifyMessage=r.recoverPublicKey=r.computePublicKey=r.recoverAddress=r.computeAddress=r.getJsonWalletAddress=r.TransactionTypes=r.serializeTransaction=r.parseTransaction=r.accessListify=r.joinSignature=r.splitSignature=r.soliditySha256=r.solidityKeccak256=r.solidityPack=r.shuffled=r.randomBytes=r.sha512=r.sha256=r.ripemd160=r.keccak256=r.computeHmac=r.commify=r.parseUnits=r.formatUnits=r.parseEther=r.formatEther=r.isAddress=r.getCreate2Address=r.getContractAddress=r.getIcapAddress=r.getAddress=r._TypedDataEncoder=r.id=r.isValidName=r.namehash=r.hashMessage=r.dnsEncode=r.parseBytes32String=void 0;var s=e("@ethersproject/abi");Object.defineProperty(r,"AbiCoder",{enumerable:!0,get:function(){return s.AbiCoder}}),Object.defineProperty(r,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(r,"ConstructorFragment",{enumerable:!0,get:function(){return s.ConstructorFragment}}),Object.defineProperty(r,"defaultAbiCoder",{enumerable:!0,get:function(){return s.defaultAbiCoder}}),Object.defineProperty(r,"ErrorFragment",{enumerable:!0,get:function(){return s.ErrorFragment}}),Object.defineProperty(r,"EventFragment",{enumerable:!0,get:function(){return s.EventFragment}}),Object.defineProperty(r,"FormatTypes",{enumerable:!0,get:function(){return s.FormatTypes}}),Object.defineProperty(r,"Fragment",{enumerable:!0,get:function(){return s.Fragment}}),Object.defineProperty(r,"FunctionFragment",{enumerable:!0,get:function(){return s.FunctionFragment}}),Object.defineProperty(r,"Indexed",{enumerable:!0,get:function(){return s.Indexed}}),Object.defineProperty(r,"Interface",{enumerable:!0,get:function(){return s.Interface}}),Object.defineProperty(r,"LogDescription",{enumerable:!0,get:function(){return s.LogDescription}}),Object.defineProperty(r,"ParamType",{enumerable:!0,get:function(){return s.ParamType}}),Object.defineProperty(r,"TransactionDescription",{enumerable:!0,get:function(){return s.TransactionDescription}});var a=e("@ethersproject/address");Object.defineProperty(r,"getAddress",{enumerable:!0,get:function(){return a.getAddress}}),Object.defineProperty(r,"getCreate2Address",{enumerable:!0,get:function(){return a.getCreate2Address}}),Object.defineProperty(r,"getContractAddress",{enumerable:!0,get:function(){return a.getContractAddress}}),Object.defineProperty(r,"getIcapAddress",{enumerable:!0,get:function(){return a.getIcapAddress}}),Object.defineProperty(r,"isAddress",{enumerable:!0,get:function(){return a.isAddress}});var c=i(e("@ethersproject/base64"));r.base64=c;var l=e("@ethersproject/basex");Object.defineProperty(r,"base58",{enumerable:!0,get:function(){return l.Base58}});var u=e("@ethersproject/bytes");Object.defineProperty(r,"arrayify",{enumerable:!0,get:function(){return u.arrayify}}),Object.defineProperty(r,"concat",{enumerable:!0,get:function(){return u.concat}}),Object.defineProperty(r,"hexConcat",{enumerable:!0,get:function(){return u.hexConcat}}),Object.defineProperty(r,"hexDataSlice",{enumerable:!0,get:function(){return u.hexDataSlice}}),Object.defineProperty(r,"hexDataLength",{enumerable:!0,get:function(){return u.hexDataLength}}),Object.defineProperty(r,"hexlify",{enumerable:!0,get:function(){return u.hexlify}}),Object.defineProperty(r,"hexStripZeros",{enumerable:!0,get:function(){return u.hexStripZeros}}),Object.defineProperty(r,"hexValue",{enumerable:!0,get:function(){return u.hexValue}}),Object.defineProperty(r,"hexZeroPad",{enumerable:!0,get:function(){return u.hexZeroPad}}),Object.defineProperty(r,"isBytes",{enumerable:!0,get:function(){return u.isBytes}}),Object.defineProperty(r,"isBytesLike",{enumerable:!0,get:function(){return u.isBytesLike}}),Object.defineProperty(r,"isHexString",{enumerable:!0,get:function(){return u.isHexString}}),Object.defineProperty(r,"joinSignature",{enumerable:!0,get:function(){return u.joinSignature}}),Object.defineProperty(r,"zeroPad",{enumerable:!0,get:function(){return u.zeroPad}}),Object.defineProperty(r,"splitSignature",{enumerable:!0,get:function(){return u.splitSignature}}),Object.defineProperty(r,"stripZeros",{enumerable:!0,get:function(){return u.stripZeros}});var d=e("@ethersproject/hash");Object.defineProperty(r,"_TypedDataEncoder",{enumerable:!0,get:function(){return d._TypedDataEncoder}}),Object.defineProperty(r,"dnsEncode",{enumerable:!0,get:function(){return d.dnsEncode}}),Object.defineProperty(r,"hashMessage",{enumerable:!0,get:function(){return d.hashMessage}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return d.id}}),Object.defineProperty(r,"isValidName",{enumerable:!0,get:function(){return d.isValidName}}),Object.defineProperty(r,"namehash",{enumerable:!0,get:function(){return d.namehash}});var f=e("@ethersproject/hdnode");Object.defineProperty(r,"defaultPath",{enumerable:!0,get:function(){return f.defaultPath}}),Object.defineProperty(r,"entropyToMnemonic",{enumerable:!0,get:function(){return f.entropyToMnemonic}}),Object.defineProperty(r,"getAccountPath",{enumerable:!0,get:function(){return f.getAccountPath}}),Object.defineProperty(r,"HDNode",{enumerable:!0,get:function(){return f.HDNode}}),Object.defineProperty(r,"isValidMnemonic",{enumerable:!0,get:function(){return f.isValidMnemonic}}),Object.defineProperty(r,"mnemonicToEntropy",{enumerable:!0,get:function(){return f.mnemonicToEntropy}}),Object.defineProperty(r,"mnemonicToSeed",{enumerable:!0,get:function(){return f.mnemonicToSeed}});var p=e("@ethersproject/json-wallets");Object.defineProperty(r,"getJsonWalletAddress",{enumerable:!0,get:function(){return p.getJsonWalletAddress}});var h=e("@ethersproject/keccak256");Object.defineProperty(r,"keccak256",{enumerable:!0,get:function(){return h.keccak256}});var g=e("@ethersproject/logger");Object.defineProperty(r,"Logger",{enumerable:!0,get:function(){return g.Logger}});var m=e("@ethersproject/sha2");Object.defineProperty(r,"computeHmac",{enumerable:!0,get:function(){return m.computeHmac}}),Object.defineProperty(r,"ripemd160",{enumerable:!0,get:function(){return m.ripemd160}}),Object.defineProperty(r,"sha256",{enumerable:!0,get:function(){return m.sha256}}),Object.defineProperty(r,"sha512",{enumerable:!0,get:function(){return m.sha512}});var b=e("@ethersproject/solidity");Object.defineProperty(r,"solidityKeccak256",{enumerable:!0,get:function(){return b.keccak256}}),Object.defineProperty(r,"solidityPack",{enumerable:!0,get:function(){return b.pack}}),Object.defineProperty(r,"soliditySha256",{enumerable:!0,get:function(){return b.sha256}});var _=e("@ethersproject/random");Object.defineProperty(r,"randomBytes",{enumerable:!0,get:function(){return _.randomBytes}}),Object.defineProperty(r,"shuffled",{enumerable:!0,get:function(){return _.shuffled}});var y=e("@ethersproject/properties");Object.defineProperty(r,"checkProperties",{enumerable:!0,get:function(){return y.checkProperties}}),Object.defineProperty(r,"deepCopy",{enumerable:!0,get:function(){return y.deepCopy}}),Object.defineProperty(r,"defineReadOnly",{enumerable:!0,get:function(){return y.defineReadOnly}}),Object.defineProperty(r,"getStatic",{enumerable:!0,get:function(){return y.getStatic}}),Object.defineProperty(r,"resolveProperties",{enumerable:!0,get:function(){return y.resolveProperties}}),Object.defineProperty(r,"shallowCopy",{enumerable:!0,get:function(){return y.shallowCopy}});var E=i(e("@ethersproject/rlp"));r.RLP=E;var w=e("@ethersproject/signing-key");Object.defineProperty(r,"computePublicKey",{enumerable:!0,get:function(){return w.computePublicKey}}),Object.defineProperty(r,"recoverPublicKey",{enumerable:!0,get:function(){return w.recoverPublicKey}}),Object.defineProperty(r,"SigningKey",{enumerable:!0,get:function(){return w.SigningKey}});var v=e("@ethersproject/strings");Object.defineProperty(r,"formatBytes32String",{enumerable:!0,get:function(){return v.formatBytes32String}}),Object.defineProperty(r,"nameprep",{enumerable:!0,get:function(){return v.nameprep}}),Object.defineProperty(r,"parseBytes32String",{enumerable:!0,get:function(){return v.parseBytes32String}}),Object.defineProperty(r,"_toEscapedUtf8String",{enumerable:!0,get:function(){return v._toEscapedUtf8String}}),Object.defineProperty(r,"toUtf8Bytes",{enumerable:!0,get:function(){return v.toUtf8Bytes}}),Object.defineProperty(r,"toUtf8CodePoints",{enumerable:!0,get:function(){return v.toUtf8CodePoints}}),Object.defineProperty(r,"toUtf8String",{enumerable:!0,get:function(){return v.toUtf8String}}),Object.defineProperty(r,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return v.Utf8ErrorFuncs}});var P=e("@ethersproject/transactions");Object.defineProperty(r,"accessListify",{enumerable:!0,get:function(){return P.accessListify}}),Object.defineProperty(r,"computeAddress",{enumerable:!0,get:function(){return P.computeAddress}}),Object.defineProperty(r,"parseTransaction",{enumerable:!0,get:function(){return P.parse}}),Object.defineProperty(r,"recoverAddress",{enumerable:!0,get:function(){return P.recoverAddress}}),Object.defineProperty(r,"serializeTransaction",{enumerable:!0,get:function(){return P.serialize}}),Object.defineProperty(r,"TransactionTypes",{enumerable:!0,get:function(){return P.TransactionTypes}});var O=e("@ethersproject/units");Object.defineProperty(r,"commify",{enumerable:!0,get:function(){return O.commify}}),Object.defineProperty(r,"formatEther",{enumerable:!0,get:function(){return O.formatEther}}),Object.defineProperty(r,"parseEther",{enumerable:!0,get:function(){return O.parseEther}}),Object.defineProperty(r,"formatUnits",{enumerable:!0,get:function(){return O.formatUnits}}),Object.defineProperty(r,"parseUnits",{enumerable:!0,get:function(){return O.parseUnits}});var T=e("@ethersproject/wallet");Object.defineProperty(r,"verifyMessage",{enumerable:!0,get:function(){return T.verifyMessage}}),Object.defineProperty(r,"verifyTypedData",{enumerable:!0,get:function(){return T.verifyTypedData}});var A=e("@ethersproject/web");Object.defineProperty(r,"_fetchData",{enumerable:!0,get:function(){return A._fetchData}}),Object.defineProperty(r,"fetchJson",{enumerable:!0,get:function(){return A.fetchJson}}),Object.defineProperty(r,"poll",{enumerable:!0,get:function(){return A.poll}});var S=e("@ethersproject/sha2");Object.defineProperty(r,"SupportedAlgorithm",{enumerable:!0,get:function(){return S.SupportedAlgorithm}});var I=e("@ethersproject/strings");Object.defineProperty(r,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return I.UnicodeNormalizationForm}}),Object.defineProperty(r,"Utf8ErrorReason",{enumerable:!0,get:function(){return I.Utf8ErrorReason}})}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers",file:"node_modules/@ledgerhq/evm-tools/node_modules/ethers/lib/utils.js"}],[828,{"./errors":829,"./modules/Domains":830,"./modules/EIP712":831,"./services/ledger":835,"./utils":838,"@ledgerhq/logs":881,"bignumber.js":878,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.ledgerService=void 0;const a=e("bignumber.js"),c=e("@ledgerhq/logs"),l=e("./utils"),u=e("./modules/Domains"),d=s(e("./services/ledger"));r.ledgerService=d.default;const f=e("./errors"),p=e("./modules/EIP712");o(e("./utils"),r);const h={eth:1,erc20:2,erc721:3,erc20mintable:4,erc721mintable:5},g=e=>e&&27264===e.statusCode?new f.EthAppPleaseEnableContractData("Please enable Blind signing or Contract data in the Ethereum app Settings"):e;r.default=class{setLoadConfig(e){this.loadConfig=e}constructor(e,t="w0w",r={}){this.transport=e,this.loadConfig=r,e.decorateAppAPIMethods(this,["getAddress","signTransaction","signPersonalMessage","getAppConfiguration","signEIP712Message","signEIP712HashedMessage","starkGetPublicKey","starkSignOrder","starkSignOrder_v2","starkSignTransfer","starkSignTransfer_v2","starkProvideQuantum","starkProvideQuantum_v2","starkUnsafeSign","eth2GetPublicKey","eth2SetWithdrawalIndex","getEIP1024PublicEncryptionKey","getEIP1024SharedSecret"],t)}getAddress(e,r,n,o){const i=(0,l.splitPath)(e);let s=t.alloc(1+4*i.length);if(s[0]=i.length,i.forEach(((e,t)=>{s.writeUInt32BE(e,1+4*t)})),o){const e=t.alloc(8,0),r=t.from((0,l.padHexString)(new a.BigNumber(o).toString(16)),"hex");e.write(r.toString("hex"),e.length-r.length,"hex"),s=t.concat([s,e])}return this.transport.send(224,2,r?1:0,n?1:0,s).then((e=>{const t=e[0],r=e[1+t];return{publicKey:e.slice(1,1+t).toString("hex"),address:"0x"+e.slice(1+t+1,1+t+1+r).toString("ascii"),chainCode:n?e.slice(1+t+1+r,1+t+1+r+32).toString("hex"):undefined}}))}signTransaction(e,r,n){return i(this,void 0,void 0,(function*(){if(n===undefined&&(console.warn("hw-app-eth: signTransaction(path, rawTxHex, resolution): please provide the 'resolution' parameter. See https://github.com/LedgerHQ/ledgerjs/blob/master/packages/hw-app-eth/README.md – the previous signature is deprecated and providing the 3rd 'resolution' parameter explicitly will become mandatory so you have the control on the resolution and the fallback mecanism (e.g. fallback to blind signing or not).// Possible solution:\n + import { ledgerService } from '@ledgerhq/hw-app-eth';\n + const resolution = await ledgerService.resolveTransaction(rawTxHex);"),n=yield d.default.resolveTransaction(r,this.loadConfig,{externalPlugins:!0,erc20:!0}).catch((e=>(console.warn("an error occurred in resolveTransaction => fallback to blind signing: "+String(e)),null)))),n){for(const e of n.domains)yield(0,u.domainResolutionFlow)(this,e).catch((t=>{(0,c.log)("error","domainResolutionFlow failed",{domainDescriptor:e,error:t})}));for(const e of n.plugin)yield this.setPlugin(e);for(const{payload:e,signature:t}of n.externalPlugin)yield this.setExternalPlugin(e,t);for(const e of n.nfts)yield this.provideNFTInformation(e);for(const e of n.erc20Tokens)yield this.provideERC20TokenInformation(e)}const o=t.from(r,"hex"),{vrsOffset:i,txType:s,chainId:a,chainIdTruncated:f}=(0,l.decodeTxInfo)(o),p=(0,l.splitPath)(e);let h,m=0;for(;m!==o.length;){const e=0===m,r=e?149-4*p.length:150;let n=m+r>o.length?o.length-m:r;0!=i&&m+n>=i&&(n=o.length-m);const s=t.alloc(e?1+4*p.length+n:n);e?(s[0]=p.length,p.forEach(((e,t)=>{s.writeUInt32BE(e,1+4*t)})),o.copy(s,1+4*p.length,m,m+n)):o.copy(s,0,m,m+n),h=yield this.transport.send(224,4,e?0:128,0,s).catch((e=>{throw g(e)})),m+=n}const b=h[0];let _="";if(a.times(2).plus(35).plus(1).isGreaterThan(255)){const e=(2*f+35)%256,t=Math.abs(b-e);_=null!=s?t%2==1?"00":"01":a.times(2).plus(35).plus(t).toString(16)}else _=b.toString(16);_.length%2==1&&(_="0"+_);return{v:_,r:h.slice(1,33).toString("hex"),s:h.slice(33,65).toString("hex")}}))}clearSignTransaction(e,t,r){return i(this,arguments,void 0,(function*(e,t,r,n=!1){const o=yield d.default.resolveTransaction(t,this.loadConfig,r).catch((e=>{if(console.warn("an error occurred in resolveTransaction => fallback to blind signing: "+String(e)),n)throw e;return null}));return this.signTransaction(e,t,o)}))}getAppConfiguration(){return this.transport.send(224,6,0,0).then((e=>({arbitraryDataEnabled:1&e[0],erc20ProvisioningNecessary:2&e[0],starkEnabled:4&e[0],starkv2Supported:8&e[0],version:e[1]+"."+e[2]+"."+e[3]})))}signPersonalMessage(e,r){return i(this,void 0,void 0,(function*(){const n=(0,l.splitPath)(e);let o=0;const i=t.from(r,"hex");let s;for(;o!==i.length;){const e=0===o?149-4*n.length-4:150,r=o+e>i.length?i.length-o:e,a=t.alloc(0===o?1+4*n.length+4+r:r);0===o?(a[0]=n.length,n.forEach(((e,t)=>{a.writeUInt32BE(e,1+4*t)})),a.writeUInt32BE(i.length,1+4*n.length),i.copy(a,1+4*n.length+4,o,o+r)):i.copy(a,0,o,o+r),s=yield this.transport.send(224,8,0===o?0:128,0,a),o+=r}return{v:s[0],r:s.slice(1,33).toString("hex"),s:s.slice(33,65).toString("hex")}}))}signEIP712HashedMessage(e,t,r){return(0,p.signEIP712HashedMessage)(this.transport,e,t,r)}signEIP712Message(e,t){return i(this,arguments,void 0,(function*(e,t,r=!1){return(0,p.signEIP712Message)(this.transport,e,t,r,this.loadConfig)}))}getChallenge(){return i(this,void 0,void 0,(function*(){let e;return function(e){e[e.CLA=224]="CLA",e[e.INS=32]="INS",e[e.P1=0]="P1",e[e.P2=0]="P2",e[e.LC=0]="LC"}(e||(e={})),this.transport.send(e.CLA,e.INS,e.P1,e.P2).then((e=>{const[,t,r]=new RegExp("(.*)(.{4}$)").exec(e.toString("hex"))||[];if("9000"!==r)throw new Error(`An error happened while generating the challenge. Status code: ${r}`);return`0x${t}`})).catch((e=>{throw(0,c.log)("error","couldn't request a challenge",e),e}))}))}starkGetPublicKey(e,r){const n=(0,l.splitPath)(e),o=t.alloc(1+4*n.length);return o[0]=n.length,n.forEach(((e,t)=>{o.writeUInt32BE(e,1+4*t)})),this.transport.send(240,2,r?1:0,0,o).then((e=>e.slice(0,e.length-2)))}starkSignOrder(e,r,n,o,i,s,a,c,u,d,f){const p=(0,l.maybeHexBuffer)(r),h=(0,l.maybeHexBuffer)(o),g=(0,l.splitPath)(e),m=t.alloc(1+4*g.length+20+32+20+32+4+4+8+8+4+4,0);let b=0;return m[0]=g.length,g.forEach(((e,t)=>{m.writeUInt32BE(e,1+4*t)})),b=1+4*g.length,p&&p.copy(m,b),b+=20,t.from(n.toString(16).padStart(64,"0"),"hex").copy(m,b),b+=32,h&&h.copy(m,b),b+=20,t.from(i.toString(16).padStart(64,"0"),"hex").copy(m,b),b+=32,m.writeUInt32BE(s,b),b+=4,m.writeUInt32BE(a,b),b+=4,t.from(c.toString(16).padStart(16,"0"),"hex").copy(m,b),b+=8,t.from(u.toString(16).padStart(16,"0"),"hex").copy(m,b),b+=8,m.writeUInt32BE(d,b),b+=4,m.writeUInt32BE(f,b),this.transport.send(240,4,1,0,m).then((e=>({r:e.slice(1,33).toString("hex"),s:e.slice(33,65).toString("hex")})))}starkSignOrder_v2(e,r,n,o,i,s,a,c,u,d,f,p,g,m,b){const _=(0,l.maybeHexBuffer)(r),y=(0,l.maybeHexBuffer)(s);if(!(n in h))throw new Error("eth.starkSignOrderv2 invalid source quantization type="+n);if(!(a in h))throw new Error("eth.starkSignOrderv2 invalid destination quantization type="+a);const E=(0,l.splitPath)(e),w=t.alloc(1+4*E.length+1+20+32+32+1+20+32+32+4+4+8+8+4+4,0);let v=0;return w[0]=E.length,E.forEach(((e,t)=>{w.writeUInt32BE(e,1+4*t)})),v=1+4*E.length,w[v]=h[n],v++,_&&_.copy(w,v),v+=20,o&&t.from(o.toString(16).padStart(64,"0"),"hex").copy(w,v),v+=32,i&&t.from(i.toString(16).padStart(64,"0"),"hex").copy(w,v),v+=32,w[v]=h[a],v++,y&&y.copy(w,v),v+=20,c&&t.from(c.toString(16).padStart(64,"0"),"hex").copy(w,v),v+=32,u&&t.from(u.toString(16).padStart(64,"0"),"hex").copy(w,v),v+=32,w.writeUInt32BE(d,v),v+=4,w.writeUInt32BE(f,v),v+=4,t.from(p.toString(16).padStart(16,"0"),"hex").copy(w,v),v+=8,t.from(g.toString(16).padStart(16,"0"),"hex").copy(w,v),v+=8,w.writeUInt32BE(m,v),v+=4,w.writeUInt32BE(b,v),this.transport.send(240,4,3,0,w).then((e=>({r:e.slice(1,33).toString("hex"),s:e.slice(33,65).toString("hex")})))}starkSignTransfer(e,r,n,o,i,s,a,c,u){const d=(0,l.maybeHexBuffer)(r),f=(0,l.hexBuffer)(o),p=(0,l.splitPath)(e),h=t.alloc(1+4*p.length+20+32+32+4+4+8+4+4,0);let g=0;return h[0]=p.length,p.forEach(((e,t)=>{h.writeUInt32BE(e,1+4*t)})),g=1+4*p.length,d&&d.copy(h,g),g+=20,t.from(n.toString(16).padStart(64,"0"),"hex").copy(h,g),g+=32,f.copy(h,g),g+=32,h.writeUInt32BE(i,g),g+=4,h.writeUInt32BE(s,g),g+=4,t.from(a.toString(16).padStart(16,"0"),"hex").copy(h,g),g+=8,h.writeUInt32BE(c,g),g+=4,h.writeUInt32BE(u,g),this.transport.send(240,4,2,0,h).then((e=>({r:e.slice(1,33).toString("hex"),s:e.slice(33,65).toString("hex")})))}starkSignTransfer_v2(e,r,n,o,i,s,a,c,u,d,f,p,g){const m=(0,l.maybeHexBuffer)(r),b=(0,l.hexBuffer)(s),_=(0,l.maybeHexBuffer)(p);if(!(n in h))throw new Error("eth.starkSignTransferv2 invalid quantization type="+n);const y=(0,l.splitPath)(e),E=t.alloc(1+4*y.length+1+20+32+32+32+4+4+8+4+4+(_?52:0),0);let w=0;return E[0]=y.length,y.forEach(((e,t)=>{E.writeUInt32BE(e,1+4*t)})),w=1+4*y.length,E[w]=h[n],w++,m&&m.copy(E,w),w+=20,o&&t.from(o.toString(16).padStart(64,"0"),"hex").copy(E,w),w+=32,i&&t.from(i.toString(16).padStart(64,"0"),"hex").copy(E,w),w+=32,b.copy(E,w),w+=32,E.writeUInt32BE(a,w),w+=4,E.writeUInt32BE(c,w),w+=4,t.from(u.toString(16).padStart(16,"0"),"hex").copy(E,w),w+=8,E.writeUInt32BE(d,w),w+=4,E.writeUInt32BE(f,w),_&&g&&(w+=4,t.from(g.toString(16).padStart(64,"0"),"hex").copy(E,w),w+=32,_.copy(E,w)),this.transport.send(240,4,_?5:4,0,E).then((e=>({r:e.slice(1,33).toString("hex"),s:e.slice(33,65).toString("hex")})))}starkProvideQuantum(e,r){const n=(0,l.maybeHexBuffer)(e),o=t.alloc(52,0);return n&&n.copy(o,0),t.from(r.toString(16).padStart(64,"0"),"hex").copy(o,20),this.transport.send(240,8,0,0,o).then((()=>!0),(e=>{if(e&&27904===e.statusCode)return!1;throw e}))}starkProvideQuantum_v2(e,r,n,o){const i=(0,l.maybeHexBuffer)(e);if(!(r in h))throw new Error("eth.starkProvideQuantumV2 invalid quantization type="+r);const s=t.alloc(84,0);let a=0;return i&&i.copy(s,a),a+=20,n&&t.from(n.toString(16).padStart(64,"0"),"hex").copy(s,a),a+=32,o&&t.from(o.toString(16).padStart(64,"0"),"hex").copy(s,a),this.transport.send(240,8,h[r],0,s).then((()=>!0),(e=>{if(e&&27904===e.statusCode)return!1;throw e}))}starkUnsafeSign(e,r){const n=(0,l.hexBuffer)(r),o=(0,l.splitPath)(e),i=t.alloc(1+4*o.length+32);let s=0;return i[0]=o.length,o.forEach(((e,t)=>{i.writeUInt32BE(e,1+4*t)})),s=1+4*o.length,n.copy(i,s),this.transport.send(240,10,0,0,i).then((e=>({r:e.slice(1,33).toString("hex"),s:e.slice(33,65).toString("hex")})))}eth2GetPublicKey(e,r){const n=(0,l.splitPath)(e),o=t.alloc(1+4*n.length);return o[0]=n.length,n.forEach(((e,t)=>{o.writeUInt32BE(e,1+4*t)})),this.transport.send(224,14,r?1:0,0,o).then((e=>({publicKey:e.slice(0,-2).toString("hex")})))}eth2SetWithdrawalIndex(e){const r=t.alloc(4,0);return r.writeUInt32BE(e,0),this.transport.send(224,16,0,0,r).then((()=>!0),(e=>{if(e&&27904===e.statusCode)return!1;throw e}))}getEIP1024PublicEncryptionKey(e,r){const n=(0,l.splitPath)(e),o=t.alloc(1+4*n.length);return o[0]=n.length,n.forEach(((e,t)=>{o.writeUInt32BE(e,1+4*t)})),this.transport.send(224,24,r?1:0,0,o).then((e=>({publicKey:e.slice(0,-2).toString("hex")})))}getEIP1024SharedSecret(e,r,n){const o=(0,l.splitPath)(e),i=(0,l.hexBuffer)(r),s=t.alloc(1+4*o.length+32);let a=0;return s[0]=o.length,o.forEach(((e,t)=>{s.writeUInt32BE(e,1+4*t)})),a=1+4*o.length,i.copy(s,a),this.transport.send(224,24,n?1:0,1,s).then((e=>({sharedSecret:e.slice(0,-2).toString("hex")})))}provideERC20TokenInformation(e){const r=t.from(e,"hex");return this.transport.send(224,10,0,0,r).then((()=>!0),(e=>{if(e&&27904===e.statusCode)return!1;throw e}))}setExternalPlugin(e,r){const n=t.from(e,"hex"),o=t.from(null!=r?r:"","hex"),i=t.concat([n,o]);return this.transport.send(224,18,0,0,i).then((()=>!0),(e=>{if(e&&27264===e.statusCode)return!1;if(e&&27012===e.statusCode)return!1;if(e&&27904===e.statusCode)return!1;throw e}))}setPlugin(e){const r=t.from(e,"hex");return this.transport.send(224,22,0,0,r).then((()=>!0),(e=>{if(e&&27264===e.statusCode)return!1;if(e&&27012===e.statusCode)return!1;if(e&&27904===e.statusCode)return!1;throw e}))}provideNFTInformation(e){const r=t.from(e,"hex");return this.transport.send(224,20,0,0,r).then((()=>!0),(e=>{if(e&&27904===e.statusCode)throw new f.EthAppNftNotSupported;throw e}))}provideDomainName(e){return i(this,void 0,void 0,(function*(){let r;!function(e){e[e.CLA=224]="CLA",e[e.INS=34]="INS",e[e.P1_FIRST_CHUNK=1]="P1_FIRST_CHUNK",e[e.P1_FOLLOWING_CHUNK=0]="P1_FOLLOWING_CHUNK",e[e.P2=0]="P2"}(r||(r={}));const n=t.from(e,"hex"),o=t.concat([t.from((0,l.intAsHexBytes)(n.length,2),"hex"),n]),i=new Array(Math.ceil(o.length/256)).fill(null).map(((e,t)=>o.slice(255*t,255*(t+1))));for(const e of i){const t=e===i[0];yield this.transport.send(r.CLA,r.INS,t?r.P1_FIRST_CHUNK:r.P1_FOLLOWING_CHUNK,r.P2,e)}return!0}))}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/Eth.js"}],[829,{"@ledgerhq/errors":781},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.EthAppNftNotSupported=r.EthAppPleaseEnableContractData=void 0;const n=e("@ledgerhq/errors");r.EthAppPleaseEnableContractData=(0,n.createCustomErrorClass)("EthAppPleaseEnableContractData"),r.EthAppNftNotSupported=(0,n.createCustomErrorClass)("EthAppNftNotSupported")}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/errors.js"}],[830,{"../../services/ledger":835},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.domainResolutionFlow=void 0;const i=o(e("../../services/ledger"));r.domainResolutionFlow=(e,t)=>n(void 0,void 0,void 0,(function*(){if(!t)return;const{domain:r,address:n,registry:o,type:s}=t,a=yield e.getChallenge(),c="forward"===s?yield i.default.signDomainResolution(r,o,a):yield i.default.signAddressResolution(n,o,a);c&&(yield e.provideDomainName(c))}))}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/modules/Domains/index.js"}],[831,{"../../services/ledger/erc20":834,"../../services/ledger/loadConfig":836,"../../utils":838,"./utils":832,"@ledgerhq/evm-tools/lib/message/EIP712/index":782,buffer:3561,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.signEIP712HashedMessage=r.signEIP712Message=void 0;const i=o(e("semver")),s=e("@ledgerhq/evm-tools/lib/message/EIP712/index"),a=e("../../services/ledger/erc20"),c=e("../../utils"),l=e("../../services/ledger/loadConfig"),u=e("./utils"),d=(e,r)=>{let n;!function(e){e[e.CLA=224]="CLA",e[e.INS=26]="INS",e[e.P1_complete=0]="P1_complete",e[e.P1_partial=1]="P1_partial",e[e.P2_name=0]="P2_name",e[e.P2_field=255]="P2_field"}(n||(n={}));const{structType:o,value:i}=r,s="name"===o&&"string"==typeof i?t.from(i,"utf-8"):i;return e.send(n.CLA,n.INS,n.P1_complete,"name"===o?n.P2_name:n.P2_field,s)},f=(e,r)=>n(void 0,void 0,void 0,(function*(){var n;let o;!function(e){e[e.CLA=224]="CLA",e[e.INS=28]="INS",e[e.P1_complete=0]="P1_complete",e[e.P1_partial=1]="P1_partial",e[e.P2_root=0]="P2_root",e[e.P2_array=15]="P2_array",e[e.P2_field=255]="P2_field"}(o||(o={}));const{structType:i,value:s}=r;if("root"===i)return e.send(o.CLA,o.INS,o.P1_complete,o.P2_root,t.from(s,"utf-8"));if("array"===i)return e.send(o.CLA,o.INS,o.P1_complete,o.P2_array,t.from((0,c.intAsHexBytes)(s,1),"hex"));if("field"===i){const{data:r,type:i,sizeInBits:a}=s,l=null===(n=u.EIP712_TYPE_ENCODERS[i.toUpperCase()])||void 0===n?void 0:n.call(u.EIP712_TYPE_ENCODERS,r,a);if(l){const r=Math.floor(l.length/256),n=l.length%256,i=t.concat([t.from((0,c.intAsHexBytes)(r,1),"hex"),t.from((0,c.intAsHexBytes)(n,1),"hex"),l]),s=new Array(Math.ceil(i.length/256)).fill(null).map(((e,t)=>i.subarray(255*t,255*(t+1))));for(const t of s)yield e.send(o.CLA,o.INS,t!==s[s.length-1]?o.P1_partial:o.P1_complete,o.P2_field,t)}}return Promise.resolve()}));function p(e,r,o,i){return n(this,void 0,void 0,(function*(){let n;switch(function(e){e[e.CLA=224]="CLA",e[e.INS=30]="INS",e[e.P1_standard=0]="P1_standard",e[e.P1_discarded=1]="P1_discarded",e[e.P2_activate=0]="P2_activate",e[e.P2_discarded=1]="P2_discarded",e[e.P2_show_field=255]="P2_show_field",e[e.P2_message_info=15]="P2_message_info",e[e.P2_datetime=252]="P2_datetime",e[e.P2_amount_join_token=253]="P2_amount_join_token",e[e.P2_amount_join_value=254]="P2_amount_join_value",e[e.P2_raw=255]="P2_raw"}(n||(n={})),r){case"activate":return e.send(n.CLA,n.INS,n.P1_discarded,n.P2_activate);case"contractName":{const{displayName:r,filtersCount:o,sig:s}=i,{displayNameBuffer:a,sigBuffer:l}=(0,u.getFilterDisplayNameAndSigBuffers)(r,s),d=t.from((0,c.intAsHexBytes)(o,1),"hex"),f=t.concat([a,d,l]);return e.send(n.CLA,n.INS,n.P1_standard,n.P2_message_info,f)}case"showField":{const{displayName:r,sig:o,format:s,coinRef:c,chainId:l,coinRefsTokensMap:d,shouldUseV1Filters:f,erc20SignaturesBlob:p,isDiscarded:h}=i,{displayNameBuffer:g,sigBuffer:m}=(0,u.getFilterDisplayNameAndSigBuffers)(r,o);if(f){const r=t.concat([g,m]);return e.send(n.CLA,n.INS,n.P1_standard,n.P2_show_field,r)}if("token"===s&&c!==undefined){const{token:t,deviceTokenIndex:r}=d[c];if(r===undefined){const r=yield(0,a.byContractAddressAndChainId)(t,l,p);if(r){let t;!function(e){e[e.CLA=224]="CLA",e[e.INS=10]="INS",e[e.P1=0]="P1",e[e.P2=0]="P2"}(t||(t={}));const n=yield e.send(t.CLA,t.INS,t.P1,t.P2,r.data);d[c].deviceTokenIndex=n[0]}}}if("amount"===s&&255===c){const{token:t}=d[255],r=yield(0,a.byContractAddressAndChainId)(t,l,p);r&&(yield e.send(224,10,0,0,r.data),d[255].deviceTokenIndex=255)}if(!s)throw new Error("Missing format");const b={raw:n.P2_raw,datetime:n.P2_datetime,token:n.P2_amount_join_token,amount:n.P2_amount_join_value},_=(0,u.getPayloadForFilterV2)(s,c,d,g,m);return e.send(n.CLA,n.INS,h?n.P1_discarded:n.P1_standard,b[s],_)}case"discardField":{const{path:r}=i,o=t.from(r),s=t.from((0,c.intAsHexBytes)(o.length,1),"hex"),a=t.concat([s,o]);return e.send(n.CLA,n.INS,n.P1_standard,n.P2_discarded,a)}}}))}r.signEIP712Message=(e,r,o,...h)=>n(void 0,[e,r,o,...h],void 0,(function*(e,r,o,h=!1,g){let m;!function(e){e[e.CLA=224]="CLA",e[e.INS=12]="INS",e[e.P1=0]="P1",e[e.P2_v0=0]="P2_v0",e[e.P2_full=1]="P2_full"}(m||(m={}));const{primaryType:b,types:_,domain:y,message:E}=o,{calServiceURL:w}=(0,l.getLoadConfig)(g),v=(0,s.sortObjectAlphabetically)(_),{version:P}=yield(0,u.getAppAndVersion)(e),O=!i.default.gte(P,"1.11.1-0",{includePrerelease:!0}),T=i.default.gte(P,"1.12.0-0",{includePrerelease:!0}),A=yield(0,s.getFiltersForMessage)(o,O,w),S=(0,u.getCoinRefTokensMap)(A,O,o),I=Object.entries(v);for(const[t,r]of I){yield d(e,{structType:"name",value:t});for(const{name:t,type:n}of r){const r=(0,u.makeTypeEntryStructBuffer)({name:t,type:n});yield d(e,{structType:"field",value:r})}}A&&(yield p(e,"activate"));const C=O?undefined:yield(0,a.findERC20SignaturesInfo)(g,y.chainId||0),N=(({transport:e,loadConfig:t,chainId:r,erc20SignaturesBlob:o,types:i,filters:s,shouldUseV1Filters:a,shouldUseDiscardedFields:c,coinRefsTokensMap:l})=>{var d;const h={};for(const e in i)h[e]=null===(d=i[e])||void 0===d?void 0:d.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.name]:t.type})),{});const g=(t,i,...d)=>n(void 0,[t,i,...d],void 0,(function*(t,n,i=""){var d,m;const[b,_]=t,[y,...E]=_,w=!u.EIP712_TYPE_PROPERTIES[(null===(d=null==b?void 0:b.name)||void 0===d?void 0:d.toUpperCase())||""];if(Array.isArray(n)&&void 0!==y){yield f(e,{structType:"array",value:n.length});const t=`${i}.[]`;if(!n.length){const n=null==s?void 0:s.fields.filter((e=>e.path.startsWith(t)));if(n&&c)for(const t of n)yield p(e,"discardField",0,{path:t.path}),yield p(e,"showField",0,{displayName:t.label,sig:t.signature,format:t.format,coinRef:t.coin_ref,chainId:r,erc20SignaturesBlob:o,shouldUseV1Filters:a,coinRefsTokensMap:l,isDiscarded:!0})}for(const e of n)yield g([b,E],e,t)}else if(w)for(const[e,t]of Object.entries(n)){const r=null===(m=h[(null==b?void 0:b.name)||""])||void 0===m?void 0:m[e];r&&(yield g((0,u.destructTypeFromString)(r),t,`${i}.${e}`))}else{const t=null==s?void 0:s.fields.find((e=>i===e.path));t&&(yield p(e,"showField",0,{displayName:t.label,sig:t.signature,format:t.format,coinRef:t.coin_ref,chainId:r,erc20SignaturesBlob:o,shouldUseV1Filters:a,coinRefsTokensMap:l,isDiscarded:!1})),yield f(e,{structType:"field",value:{data:n,type:(null==b?void 0:b.name)||"",sizeInBits:null==b?void 0:b.size}})}}));return g})({transport:e,loadConfig:g,chainId:y.chainId||0,erc20SignaturesBlob:C,types:v,filters:A,shouldUseV1Filters:O,shouldUseDiscardedFields:T,coinRefsTokensMap:S}),x="EIP712Domain";yield f(e,{structType:"root",value:x});const R=v[x];for(const{name:e,type:t}of R){const r=y[e];yield N((0,u.destructTypeFromString)(t),r)}if(A){const{contractName:t,fields:r}=A,n={displayName:t.label,filtersCount:r.length,sig:t.signature};yield p(e,"contractName",0,n)}yield f(e,{structType:"root",value:b});const k=v[b];for(const{name:e,type:t}of k){const r=E[e];yield N((0,u.destructTypeFromString)(t),r,e)}const j=(0,c.splitPath)(r),L=t.alloc(1+4*j.length);return L[0]=j.length,j.forEach(((e,t)=>{L.writeUInt32BE(e,1+4*t)})),e.send(m.CLA,m.INS,m.P1,h?m.P2_v0:m.P2_full,L).then((e=>({v:e[0],r:e.subarray(1,33).toString("hex"),s:e.subarray(33,65).toString("hex")})))}));r.signEIP712HashedMessage=(e,r,n,o)=>{const i=(0,c.hexBuffer)(n),s=(0,c.hexBuffer)(o),a=(0,c.splitPath)(r),l=t.alloc(1+4*a.length+32+32,0);let u=0;return l[0]=a.length,a.forEach(((e,t)=>{l.writeUInt32BE(e,1+4*t)})),u=1+4*a.length,i.copy(l,u),u+=32,s.copy(l,u),e.send(224,12,0,0,l).then((e=>({v:e[0],r:e.subarray(1,33).toString("hex"),s:e.subarray(33,65).toString("hex")})))}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/modules/EIP712/index.js"}],[832,{"../../utils":838,"@ledgerhq/evm-tools/lib/message/index":783,"bignumber.js":878,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getPayloadForFilterV2=r.getFilterDisplayNameAndSigBuffers=r.getAppAndVersion=r.getCoinRefTokensMap=r.makeTypeEntryStructBuffer=r.constructTypeDescByteString=r.destructTypeFromString=r.EIP712_TYPE_ENCODERS=r.EIP712_TYPE_PROPERTIES=void 0;const i=o(e("bignumber.js")),s=e("@ledgerhq/evm-tools/lib/message/index"),a=e("../../utils");var c;!function(e){e[e.DYNAMIC=0]="DYNAMIC",e[e.FIXED=1]="FIXED"}(c||(c={})),r.EIP712_TYPE_PROPERTIES={CUSTOM:{key:()=>0,size:()=>null},INT:{key:()=>1,size:e=>Number(e)/8},UINT:{key:()=>2,size:e=>Number(e)/8},ADDRESS:{key:()=>3,size:()=>null},BOOL:{key:()=>4,size:()=>null},STRING:{key:()=>5,size:()=>null},BYTES:{key:e=>void 0!==e?6:7,size:e=>void 0!==e?Number(e):null}},r.EIP712_TYPE_ENCODERS={INT(e,r=256){const n=null!=e?e:"0";if("string"==typeof n&&(null==n?void 0:n.startsWith("0x")))return(0,a.hexBuffer)(n);let o=new i.default(n);if(o.lt(0)){const e=r/8;o=new i.default(`0x${t.alloc(e,255).toString("hex")}`).plus(o).plus(1)}const s=o.toString(16).length%2?"0"+o.toString(16):o.toString(16);return t.from(s,"hex")},UINT(e){return this.INT(e)},BOOL(e){return this.INT("boolean"==typeof e?Number(e).toString():e)},ADDRESS:e=>(0,a.hexBuffer)(null!=e?e:"").slice(0,20),STRING:e=>t.from(null!=e?e:"","utf-8"),BYTES(e,t){const r=null!=e?e:"";return(0,a.hexBuffer)(r).slice(0,null!=t?t:((null==r?void 0:r.length)-2)/2)}};r.destructTypeFromString=e=>{const t=new RegExp(/^([^[\]]*)(\[.*\])*/g),r=new RegExp(/\[(\d*)\]/g),n=new RegExp(/(?=u?int|bytes)([a-zA-Z-0-9]+?)(\d{1,3})$/g),[,o,i]=t.exec(e||"")||[],[,s=o,a]=n.exec(o||"")||[];return[s?{name:s,size:a?Number(a):undefined}:null,(i?[...i.matchAll(r)]:[]).map((([,e])=>e?Number(e):null))]};r.constructTypeDescByteString=(e,t,r)=>{if(r>=16)throw new Error("Eth utils - constructTypeDescByteString - Cannot accept a typeValue >= 16 because the typeValue can only be 4 bits in binary"+{isArray:e,typeSize:t,typeValue:r});const n=e?"1":"0",o="number"==typeof t?"1":"0",i=r.toString(2).padStart(4,"0");return(0,a.intAsHexBytes)(parseInt(n+o+"00"+i,2),1)};r.makeTypeEntryStructBuffer=({name:e,type:n})=>{var o,i,s,l;const[u,d]=(0,r.destructTypeFromString)(n),f=Boolean(d.length),p=r.EIP712_TYPE_PROPERTIES[(null===(o=null==u?void 0:u.name)||void 0===o?void 0:o.toUpperCase())||""]||r.EIP712_TYPE_PROPERTIES.CUSTOM,h=p.key(null==u?void 0:u.size),g=p.size(null==u?void 0:u.size),m=(0,r.constructTypeDescByteString)(f,g,h),b=[t.from(m,"hex")];return p===r.EIP712_TYPE_PROPERTIES.CUSTOM&&(b.push(t.from((0,a.intAsHexBytes)(null!==(s=null===(i=null==u?void 0:u.name)||void 0===i?void 0:i.length)&&void 0!==s?s:0,1),"hex")),b.push(t.from(null!==(l=null==u?void 0:u.name)&&void 0!==l?l:"","utf-8"))),"number"==typeof g&&b.push(t.from((0,a.intAsHexBytes)(g,1),"hex")),f&&(b.push(t.from((0,a.intAsHexBytes)(d.length,1),"hex")),d.forEach((e=>{"number"==typeof e?b.push(t.from((0,a.intAsHexBytes)(c.FIXED,1),"hex"),t.from((0,a.intAsHexBytes)(e,1),"hex")):b.push(t.from((0,a.intAsHexBytes)(c.DYNAMIC,1),"hex"))}))),b.push(t.from((0,a.intAsHexBytes)(e.length,1),"hex"),t.from(e,"utf-8")),t.concat(b)};r.getCoinRefTokensMap=(e,t,r)=>{const n={};if(t||!e)return n;const o=e.fields.filter((({format:e})=>"token"===e)).sort(((e,t)=>(e.coin_ref||0)-(t.coin_ref||0))).reduce(((e,t)=>{const n=(0,s.getValueFromPath)(t.path,r);if(Array.isArray(n))throw new Error("Array of tokens is not supported with a single coin ref");return[...e,{token:n,coinRef:t.coin_ref}]}),[]);for(const{token:e,coinRef:t}of o)n[t]={token:e};return e.fields.some((e=>"amount"===e.format&&255===e.coin_ref))&&r.domain.verifyingContract&&(n[255]={token:r.domain.verifyingContract}),n};r.getAppAndVersion=e=>n(void 0,void 0,void 0,(function*(){const t=yield e.send(176,1,0,0);let r=1;const n=t[r];r+=1;const o=t.subarray(r,r+n).toString("ascii");r+=n;const i=t[r];r+=1;return{name:o,version:t.subarray(r,r+i).toString("ascii")}}));r.getFilterDisplayNameAndSigBuffers=(e,r)=>{const n=t.from(e),o=t.from((0,a.intAsHexBytes)(n.length,1),"hex"),i=t.from(r,"hex"),s=t.from((0,a.intAsHexBytes)(i.length,1),"hex");return{displayNameBuffer:t.concat([o,n]),sigBuffer:t.concat([s,i])}};r.getPayloadForFilterV2=(e,r,n,o,i)=>{switch(e){case"raw":case"datetime":return t.concat([o,i]);case"token":{const{deviceTokenIndex:e}=n[r];return t.concat([t.from((0,a.intAsHexBytes)(e||r||0,1),"hex"),i])}case"amount":{const{deviceTokenIndex:e}=n[r];return t.concat([o,t.from((0,a.intAsHexBytes)(e||r||0,1),"hex"),i])}default:throw new Error("Invalid format")}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/modules/EIP712/utils.js"}],[833,{"./loadConfig":836,"@ledgerhq/logs":881,axios:839},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.loadInfosForContractMethod=void 0;const i=o(e("axios")),s=e("./loadConfig"),a=e("@ledgerhq/logs");r.loadInfosForContractMethod=(e,t,r,o)=>n(void 0,void 0,void 0,(function*(){const{pluginBaseURL:r,extraPlugins:n}=(0,s.getLoadConfig)(o);let c={};if(r){const e=`${r}/plugins/ethereum.json`;c=yield i.default.get(`${r}/plugins/ethereum.json`).then((e=>e.data)).catch((t=>((0,a.log)("error","could not fetch from "+e+": "+String(t)),null)))}if(n&&(c=Object.assign(Object.assign({},c),n)),!c)return;const l=t.toLowerCase(),u=e.toLowerCase();if(u in c){const e=c[u];if(l in e)return{payload:e[l].serialized_data,signature:e[l].signature,plugin:e[l].plugin,erc20OfInterest:e[l].erc20OfInterest,abi:e.abi}}}))}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/contracts.js"}],[834,{"./loadConfig":836,"@ledgerhq/cryptoassets-evm-signatures/lib/data/evm/index":737,"@ledgerhq/logs":881,axios:839,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.byContractAddressAndChainId=r.findERC20SignaturesInfo=void 0;const i=o(e("axios")),s=e("@ledgerhq/logs"),a=e("@ledgerhq/cryptoassets-evm-signatures/lib/data/evm/index"),c=e("./loadConfig"),l=e=>{const t=e.toLowerCase();return t.startsWith("0x")?t:"0x"+t};r.findERC20SignaturesInfo=(e,t)=>n(void 0,void 0,void 0,(function*(){const{cryptoassetsBaseURL:r}=(0,c.getLoadConfig)(e);if(!r)return null;const n=`${r}/evm/${t}/erc20-signatures.json`;return yield i.default.get(n).then((({data:e})=>{if(!e||"string"!=typeof e)throw new Error(`ERC20 signatures for chainId ${t} file is malformed ${n}`);return e})).catch((e=>((0,s.log)("error","could not fetch from "+n+": "+String(e)),null)))}));r.byContractAddressAndChainId=(e,t,r)=>{var n,o;if(r)try{return u(r).byContractAndChainId(l(e),t)}catch(r){return null===(n=d(t))||void 0===n?void 0:n.byContractAndChainId(l(e),t)}return null===(o=d(t))||void 0===o?void 0:o.byContractAndChainId(l(e),t)};const u=e=>{const r=t.from(e,"base64"),n={},o=[];let i=0;for(;io,byContractAndChainId:(e,t)=>n[String(t)+":"+e]}},d=(()=>{const e={};return t=>{if(e[t])return e[t];const r=a.signatures[t];if(!r)return null;const n=u(r);return e[t]=n,n}})()}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/erc20.js"}],[835,{"../../utils":838,"./contracts":833,"./erc20":834,"./nfts":837,"@ethersproject/abi":500,"@ledgerhq/domain-service/lib/signers/index":739,"@ledgerhq/logs":881,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(r,"__esModule",{value:!0});const o=e("@ledgerhq/logs"),i=e("@ethersproject/abi"),s=e("@ledgerhq/domain-service/lib/signers/index"),a=e("./erc20"),c=e("./contracts"),l=e("./nfts"),u=e("../../utils"),d=(e,t,r,i)=>n(void 0,void 0,void 0,(function*(){const n={nfts:[],erc20Tokens:[]};if(i.nft){const i=yield(0,l.getNFTInfo)(e,t,r);i?((0,o.log)("ethereum","loaded nft info for "+i.contractAddress+" ("+i.collectionName+")"),n.nfts.push(i.data)):(0,o.log)("ethereum","couldn't load nft info for "+e)}if(i.token){const i=yield(0,a.findERC20SignaturesInfo)(r,t),s=(0,a.byContractAddressAndChainId)(e,t,i);s?((0,o.log)("ethereum","loaded erc20token info for "+s.contractAddress+" ("+s.ticker+")"),n.erc20Tokens.push(s.data.toString("hex"))):(0,o.log)("ethereum","couldn't load erc20token info for "+e)}return n}));r.default={resolveTransaction:(e,r,s)=>n(void 0,void 0,void 0,(function*(){const a=t.from(e,"hex"),{decodedTx:f,chainIdTruncated:p}=(0,u.decodeTxInfo)(a),{domains:h}=s,g=f.to,m=f.data.length>=10&&f.data.substring(0,10),b=[];if(m){const e={token:s.erc20&&u.tokenSelectors.includes(m),nft:s.nft&&u.nftSelectors.includes(m),externalPlugins:s.externalPlugins},t=yield((e,t,r,s,a,f)=>n(void 0,void 0,void 0,(function*(){let n={externalPlugin:[],plugin:[],nfts:[],erc20Tokens:[],domains:[]};if(f.nft){const r=yield(0,l.loadNftPlugin)(e,t,s,a);r?n.plugin.push(r):(0,o.log)("ethereum","no NFT plugin payload for selector "+t+" and address "+e)}if(f.externalPlugins){const l=yield(0,c.loadInfosForContractMethod)(e,t,s,a);if(l){const{plugin:e,payload:c,signature:f,erc20OfInterest:p,abi:h}=l;if(e&&((0,o.log)("ethereum",`found plugin (${e}) for selector: ${t}`),n.externalPlugin.push({payload:c,signature:f})),p&&p.length&&h){const e=new i.Interface(h).parseTransaction(r).args;for(const t of p){const r=t.split(".").reduce(((e,t)=>"-1"===t&&Array.isArray(e)?e[e.length-1]:e[t]),e),o=yield d(r,s,a,{nft:!1,externalPlugins:!1,token:!0});n=(0,u.mergeResolutions)([n,o])}}}else(0,o.log)("ethereum","no infos for selector "+t)}return n})))(g,m,f,p,r,e);t&&b.push(t);const a=yield d(g,p,r,e);a&&b.push(a)}if(h){const e={domains:h};b.push(e)}return(0,u.mergeResolutions)(b)})),signDomainResolution:s.signDomainResolution,signAddressResolution:s.signAddressResolution}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/index.js"}],[836,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getLoadConfig=void 0;const n={nftExplorerBaseURL:"https://nft.api.live.ledger.com/v1/ethereum",pluginBaseURL:"https://cdn.live.ledger.com",extraPlugins:null,cryptoassetsBaseURL:"https://cdn.live.ledger.com/cryptoassets",calServiceURL:"https://crypto-assets-service.api.ledger.com"};r.getLoadConfig=function(e){return Object.assign(Object.assign({},n),e)}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/loadConfig.js"}],[837,{"./loadConfig":836,"@ledgerhq/logs":881,axios:839},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(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(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.loadNftPlugin=r.getNFTInfo=void 0;const i=o(e("axios")),s=e("./loadConfig"),a=e("@ledgerhq/logs");r.getNFTInfo=(e,t,r)=>n(void 0,void 0,void 0,(function*(){var n;const{nftExplorerBaseURL:o}=(0,s.getLoadConfig)(r);if(!o)return;const c=`${o}/${t}/contracts/${e}`,l=yield i.default.get(c).then((e=>e.data)).catch((e=>((0,a.log)("error","could not fetch from "+c+": "+String(e)),null)));if(!l)return;const u=l.payload,d=parseInt(u.slice(4,6),16),f=null===(n=u.substr(6,2*d).match(/.{2}/g))||void 0===n?void 0:n.reduce(((e,t)=>e+String.fromCharCode(parseInt(t,16))),"");return{contractAddress:e,collectionName:f||"",data:u}}));r.loadNftPlugin=(e,t,r,o)=>n(void 0,void 0,void 0,(function*(){const{nftExplorerBaseURL:n}=(0,s.getLoadConfig)(o);if(!n)return;const c=`${n}/${r}/contracts/${e}/plugin-selector/${t}`,l=yield i.default.get(c).then((e=>e.data)).catch((e=>((0,a.log)("error","could not fetch from "+c+": "+String(e)),null)));if(!l)return;return l.payload}))}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/nfts.js"}],[838,{"@ethersproject/rlp":576,"@ledgerhq/evm-tools/lib/selectors/index":784,"bignumber.js":878,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.mergeResolutions=r.nftSelectors=r.tokenSelectors=r.intAsHexBytes=r.decodeTxInfo=r.maybeHexBuffer=r.hexBuffer=r.splitPath=r.padHexString=r.ERC1155_CLEAR_SIGNED_SELECTORS=r.ERC721_CLEAR_SIGNED_SELECTORS=r.ERC20_CLEAR_SIGNED_SELECTORS=void 0;const n=e("bignumber.js"),o=e("@ledgerhq/evm-tools/lib/selectors/index");Object.defineProperty(r,"ERC20_CLEAR_SIGNED_SELECTORS",{enumerable:!0,get:function(){return o.ERC20_CLEAR_SIGNED_SELECTORS}}),Object.defineProperty(r,"ERC721_CLEAR_SIGNED_SELECTORS",{enumerable:!0,get:function(){return o.ERC721_CLEAR_SIGNED_SELECTORS}}),Object.defineProperty(r,"ERC1155_CLEAR_SIGNED_SELECTORS",{enumerable:!0,get:function(){return o.ERC1155_CLEAR_SIGNED_SELECTORS}});const i=e("@ethersproject/rlp");function s(e){const n=e.startsWith("0x")?e.slice(2):e;return t.from((0,r.padHexString)(n),"hex")}r.padHexString=e=>e.length%2?"0"+e:e,r.splitPath=function(e){const t=[];return e.split("/").forEach((e=>{let r=parseInt(e,10);isNaN(r)||(e.length>1&&"'"===e[e.length-1]&&(r+=2147483648),t.push(r))})),t},r.hexBuffer=s,r.maybeHexBuffer=function(e){return e?s(e):null};r.decodeTxInfo=e=>{const r=[1,2].includes(e[0])?e[0]:null,o=null===r?e:e.slice(1),s=(0,i.decode)(o).map((e=>t.from(e.slice(2),"hex")));let a=0;const c=(0,i.decode)(o);let l;l=2===r?{data:c[7],to:c[5],chainId:s[0]}:1===r?{data:c[6],to:c[4],chainId:s[0]}:{data:c[5],to:c[3],chainId:s.length>6?s[6]:t.from("0x01","hex")};const u=l.chainId;let d=new n.BigNumber(0);if(u){d=new n.BigNumber(u.toString("hex"),16);const e=t.alloc(4);u.length>4?u.copy(e):u.copy(e,4-u.length),a=e.readUInt32BE(0)}let f=0;if(null===r&&s.length>6){const r=t.from((0,i.encode)(s.slice(-3)).slice(2),"hex");if(f=e.length-(r.length-1),r[0]>247){f++;f+=r[0]-247-1}}return{decodedTx:l,txType:r,chainId:d,chainIdTruncated:a,vrsOffset:f}};r.intAsHexBytes=(e,t)=>e.toString(16).padStart(2*t,"0"),r.tokenSelectors=Object.values(o.ERC20_CLEAR_SIGNED_SELECTORS),r.nftSelectors=[...Object.values(o.ERC721_CLEAR_SIGNED_SELECTORS),...Object.values(o.ERC1155_CLEAR_SIGNED_SELECTORS)];r.mergeResolutions=e=>{const t={nfts:[],erc20Tokens:[],externalPlugin:[],plugin:[],domains:[]};for(const r of e)for(const e in r)t[e].push(...r[e]);return t}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth",file:"node_modules/@ledgerhq/hw-app-eth/lib/utils.js"}],[839,{"./lib/axios":841},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("./lib/axios")}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/index.js"}],[840,{"../cancel/CanceledError":843,"../core/AxiosError":846,"../core/buildFullPath":848,"../defaults/transitional":854,"../helpers/parseProtocol":868,"../platform":876,"./../core/settle":851,"./../helpers/buildURL":859,"./../helpers/cookies":861,"./../helpers/isURLSameOrigin":865,"./../helpers/parseHeaders":867,"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils"),o=e("./../core/settle"),i=e("./../helpers/cookies"),s=e("./../helpers/buildURL"),a=e("../core/buildFullPath"),c=e("./../helpers/parseHeaders"),l=e("./../helpers/isURLSameOrigin"),u=e("../defaults/transitional"),d=e("../core/AxiosError"),f=e("../cancel/CanceledError"),p=e("../helpers/parseProtocol"),h=e("../platform");t.exports=function(e){return new Promise((function(t,r){var g,m=e.data,b=e.headers,_=e.responseType,y=e.withXSRFToken;function E(){e.cancelToken&&e.cancelToken.unsubscribe(g),e.signal&&e.signal.removeEventListener("abort",g)}n.isFormData(m)&&n.isStandardBrowserEnv()&&delete b["Content-Type"];var w=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"",P=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";b.Authorization="Basic "+btoa(v+":"+P)}var O=a(e.baseURL,e.url);function T(){if(w){var n="getAllResponseHeaders"in w?c(w.getAllResponseHeaders()):null,i={data:_&&"text"!==_&&"json"!==_?w.response:w.responseText,status:w.status,statusText:w.statusText,headers:n,config:e,request:w};o((function(e){t(e),E()}),(function(e){r(e),E()}),i),w=null}}if(w.open(e.method.toUpperCase(),s(O,e.params,e.paramsSerializer),!0),w.timeout=e.timeout,"onloadend"in w?w.onloadend=T:w.onreadystatechange=function(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&0===w.responseURL.indexOf("file:"))&&setTimeout(T)},w.onabort=function(){w&&(r(new d("Request aborted",d.ECONNABORTED,e,w)),w=null)},w.onerror=function(){r(new d("Network Error",d.ERR_NETWORK,e,w)),w=null},w.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new d(t,n.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,w)),w=null},n.isStandardBrowserEnv()&&(y&&n.isFunction(y)&&(y=y(e)),y||!1!==y&&l(O))){var A=e.xsrfHeaderName&&e.xsrfCookieName&&i.read(e.xsrfCookieName);A&&(b[e.xsrfHeaderName]=A)}"setRequestHeader"in w&&n.forEach(b,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete b[t]:w.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(w.withCredentials=!!e.withCredentials),_&&"json"!==_&&(w.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&w.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&w.upload&&w.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(g=function(t){w&&(r(!t||t.type?new f(null,e,w):t),w.abort(),w=null)},e.cancelToken&&e.cancelToken.subscribe(g),e.signal&&(e.signal.aborted?g():e.signal.addEventListener("abort",g))),m||!1===m||0===m||""===m||(m=null);var S=p(O);S&&-1===h.protocols.indexOf(S)?r(new d("Unsupported protocol "+S+":",d.ERR_BAD_REQUEST,e)):w.send(m)}))}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/adapters/xhr.js"}],[841,{"../lib/core/AxiosError":846,"./cancel/CancelToken":842,"./cancel/CanceledError":843,"./cancel/isCancel":844,"./core/Axios":845,"./core/mergeConfig":850,"./defaults":853,"./env/data":856,"./helpers/bind":858,"./helpers/formDataToJSON":862,"./helpers/isAxiosError":864,"./helpers/spread":869,"./helpers/toFormData":870,"./utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./utils"),o=e("./helpers/bind"),i=e("./core/Axios"),s=e("./core/mergeConfig"),a=e("./defaults"),c=e("./helpers/formDataToJSON");var l=function e(t){var r=new i(t),a=o(i.prototype.request,r);return n.extend(a,i.prototype,r),n.extend(a,r),a.create=function(r){return e(s(t,r))},a}(a);l.Axios=i,l.CanceledError=e("./cancel/CanceledError"),l.CancelToken=e("./cancel/CancelToken"),l.isCancel=e("./cancel/isCancel"),l.VERSION=e("./env/data").version,l.toFormData=e("./helpers/toFormData"),l.AxiosError=e("../lib/core/AxiosError"),l.Cancel=l.CanceledError,l.all=function(e){return Promise.all(e)},l.spread=e("./helpers/spread"),l.isAxiosError=e("./helpers/isAxiosError"),l.formToJSON=function(e){return c(n.isHTMLForm(e)?new FormData(e):e)},t.exports=l,t.exports.default=l}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/axios.js"}],[842,{"./CanceledError":843},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./CanceledError");function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,o,i){r.reason||(r.reason=new n(e,o,i),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},t.exports=o}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/cancel/CancelToken.js"}],[843,{"../core/AxiosError":846,"../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../core/AxiosError");function o(e,t,r){n.call(this,null==e?"canceled":e,n.ERR_CANCELED,t,r),this.name="CanceledError"}e("../utils").inherits(o,n,{__CANCEL__:!0}),t.exports=o}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/cancel/CanceledError.js"}],[844,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){return!(!e||!e.__CANCEL__)}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/cancel/isCancel.js"}],[845,{"../helpers/buildURL":859,"../helpers/validator":872,"./../utils":877,"./InterceptorManager":847,"./buildFullPath":848,"./dispatchRequest":849,"./mergeConfig":850},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils"),o=e("../helpers/buildURL"),i=e("./InterceptorManager"),s=e("./dispatchRequest"),a=e("./mergeConfig"),c=e("./buildFullPath"),l=e("../helpers/validator"),u=l.validators;function d(e){this.defaults=e,this.interceptors={request:new i,response:new i}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;r!==undefined&&l.assertOptions(r,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var o=t.paramsSerializer;o!==undefined&&l.assertOptions(o,{encode:u.function,serialize:u.function},!0),n.isFunction(o)&&(t.paramsSerializer={serialize:o});var i=[],c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));var d,f=[];if(this.interceptors.response.forEach((function(e){f.push(e.fulfilled,e.rejected)})),!c){var p=[s,undefined];for(Array.prototype.unshift.apply(p,i),p=p.concat(f),d=Promise.resolve(t);p.length;)d=d.then(p.shift(),p.shift());return d}for(var h=t;i.length;){var g=i.shift(),m=i.shift();try{h=g(h)}catch(e){m(e);break}}try{d=s(h)}catch(e){return Promise.reject(e)}for(;f.length;)d=d.then(f.shift(),f.shift());return d},d.prototype.getUri=function(e){e=a(this.defaults,e);var t=c(e.baseURL,e.url);return o(t,e.params,e.paramsSerializer)},n.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(a(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),t.exports=d}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/Axios.js"}],[846,{"../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../utils");function o(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)}n.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i=o.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){s[e]={value:e}})),Object.defineProperties(o,s),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=function(e,t,r,s,a,c){var l=Object.create(i);return n.toFlatObject(e,l,(function(e){return e!==Error.prototype})),o.call(l,e.message,t,r,s,a),l.cause=e,l.name=e.name,c&&Object.assign(l,c),l},t.exports=o}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/AxiosError.js"}],[847,{"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils");function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.clear=function(){this.handlers&&(this.handlers=[])},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},t.exports=o}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/InterceptorManager.js"}],[848,{"../helpers/combineURLs":860,"../helpers/isAbsoluteURL":863},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../helpers/isAbsoluteURL"),o=e("../helpers/combineURLs");t.exports=function(e,t){return e&&!n(t)?o(e,t):t}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/buildFullPath.js"}],[849,{"../cancel/CanceledError":843,"../cancel/isCancel":844,"../defaults":853,"../helpers/normalizeHeaderName":866,"./../utils":877,"./transformData":852},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils"),o=e("./transformData"),i=e("../cancel/isCancel"),s=e("../defaults"),a=e("../cancel/CanceledError"),c=e("../helpers/normalizeHeaderName");function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a}t.exports=function(e){return l(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,null,e.transformRequest),c(e.headers,"Accept"),c(e.headers,"Content-Type"),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return l(e),t.data=o.call(e,t.data,t.headers,t.status,e.transformResponse),t}),(function(t){return i(t)||(l(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)}))}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/dispatchRequest.js"}],[85,{"../util":135,"@metamask/json-rpc-engine":1780},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createPendingNonceMiddleware=function({getPendingNonce:e}){return(0,n.createAsyncMiddleware)((async(t,r,n)=>{const{method:o,params:i}=t;if("eth_getTransactionCount"!==o)return void n();const[s,a]=i;"pending"===a?r.result=await e(s,t.networkClientId):n()}))},r.createPendingTxMiddleware=function({getPendingTransactionByHash:e}){return(0,n.createAsyncMiddleware)((async(t,r,n)=>{const{method:i,params:s}=t;if("eth_getTransactionByHash"!==i)return void n();const[a]=s,c=e(a);c?r.result=(0,o.formatTxMetaForRpcResult)(c):n()}))};var n=e("@metamask/json-rpc-engine"),o=e("../util")}}},{package:"$root$",file:"app/scripts/lib/middleware/pending.js"}],[850,{"../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../utils");t.exports=function(e,t){t=t||{};var r={};function o(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isEmptyObject(t)?n.merge({},e):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function i(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:o(undefined,e[r]):o(e[r],t[r])}function s(e){if(!n.isUndefined(t[e]))return o(undefined,t[e])}function a(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:o(undefined,e[r]):o(undefined,t[r])}function c(r){return r in t?o(e[r],t[r]):r in e?o(undefined,e[r]):void 0}var l={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:c};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=l[e]||i,o=t(e);n.isUndefined(o)&&t!==c||(r[e]=o)})),r}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/mergeConfig.js"}],[851,{"./AxiosError":846},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./AxiosError");t.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(new n("Request failed with status code "+r.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/settle.js"}],[852,{"../defaults":853,"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils"),o=e("../defaults");t.exports=function(e,t,r,i){var s=this||o;return n.forEach(i,(function(n){e=n.call(s,e,t,r)})),e}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/core/transformData.js"}],[853,{"../adapters/http":840,"../adapters/xhr":840,"../core/AxiosError":846,"../helpers/formDataToJSON":862,"../helpers/normalizeHeaderName":866,"../helpers/toFormData":870,"../helpers/toURLEncodedForm":871,"../platform":876,"../utils":877,"./transitional":854,_process:4523},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("../utils"),o=e("../helpers/normalizeHeaderName"),i=e("../core/AxiosError"),s=e("./transitional"),a=e("../helpers/toFormData"),c=e("../helpers/toURLEncodedForm"),l=e("../platform"),u=e("../helpers/formDataToJSON"),d={"Content-Type":"application/x-www-form-urlencoded"};function f(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var p,h={transitional:s,adapter:("undefined"!=typeof XMLHttpRequest?p=e("../adapters/xhr"):void 0!==r&&"[object process]"===Object.prototype.toString.call(r)&&(p=e("../adapters/http")),p),transformRequest:[function(e,t){o(t,"Accept"),o(t,"Content-Type");var r,i=t&&t["Content-Type"]||"",s=i.indexOf("application/json")>-1,l=n.isObject(e);if(l&&n.isHTMLForm(e)&&(e=new FormData(e)),n.isFormData(e))return s?JSON.stringify(u(e)):e;if(n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e))return e;if(n.isArrayBufferView(e))return e.buffer;if(n.isURLSearchParams(e))return f(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();if(l){if(-1!==i.indexOf("application/x-www-form-urlencoded"))return c(e,this.formSerializer).toString();if((r=n.isFileList(e))||i.indexOf("multipart/form-data")>-1){var d=this.env&&this.env.FormData;return a(r?{"files[]":e}:e,d&&new d,this.formSerializer)}}return l||s?(f(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||h.transitional,r=t&&t.forcedJSONParsing,o="json"===this.responseType;if(e&&n.isString(e)&&(r&&!this.responseType||o)){var s=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i.from(e,i.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:l.classes.FormData,Blob:l.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){h.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){h.headers[e]=n.merge(d)})),t.exports=h}).call(this)}).call(this,e("_process"))}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/defaults/index.js"}],[854,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/defaults/transitional.js"}],[855,{"form-data":3944},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("form-data")}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/env/classes/FormData.js"}],[856,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={version:"0.28.1"}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/env/data.js"}],[857,{"./toFormData":870},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./toFormData");function o(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,(function(e){return t[e]}))}function i(e,t){this._pairs=[],e&&n(e,this,t)}var s=i.prototype;s.append=function(e,t){this._pairs.push([e,t])},s.toString=function(e){var t=e?function(t){return e.call(this,t,o)}:o;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")},t.exports=i}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/AxiosURLSearchParams.js"}],[858,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e,t){return function(){return e.apply(t,arguments)}}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/bind.js"}],[859,{"../helpers/AxiosURLSearchParams":857,"../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../utils"),o=e("../helpers/AxiosURLSearchParams");function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(e,t,r){if(!t)return e;var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s));var a,c=r&&r.encode||i,l=r&&r.serialize;return(a=l?l(t,r):n.isURLSearchParams(t)?t.toString():new o(t,r).toString(c))&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/buildURL.js"}],[86,{events:3868,loglevel:4386},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=i(e("events")),o=i(e("loglevel"));function i(e){return e&&e.__esModule?e:{default:e}}class s extends n.default{constructor(e={}){super();const t=e.migrations||[];this.migrations=t.sort(((e,t)=>e.version-t.version));const r=this.migrations.slice(-1)[0];this.defaultVersion=e.defaultVersion||r&&r.version||0}async migrateData(e=this.generateInitialState()){const t=this.migrations.filter((function(t){return t.version>e.meta.version}));for(const r of t)try{o.default.info(`Running migration ${r.version}...`);const t=await r.migrate(e);if(!t.data)throw new Error("Migrator - migration returned empty data");if(t.version!==undefined&&t.meta.version!==r.version)throw new Error("Migrator - Migration did not update version number correctly");e=t,o.default.info(`Migration ${r.version} complete`)}catch(t){const n=t.message;return t.message=`MetaMask Migration Error #${r.version}: ${n}`,this.emit("error",t),e}return e}generateInitialState(e){return{meta:{version:this.defaultVersion},data:e}}}r.default=s}}},{package:"$root$",file:"app/scripts/lib/migrator/index.js"}],[860,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/combineURLs.js"}],[861,{"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils");t.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/cookies.js"}],[862,{"../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../utils");t.exports=function(e){function t(e,r,o,i){var s=e[i++],a=Number.isFinite(+s),c=i>=e.length;return s=!s&&n.isArray(o)?o.length:s,c?(n.hasOwnProperty(o,s)?o[s]=[o[s],r]:o[s]=r,!a):(o[s]&&n.isObject(o[s])||(o[s]=[]),t(e,r,o[s],i)&&n.isArray(o[s])&&(o[s]=function(e){var t,r,n={},o=Object.keys(e),i=o.length;for(t=0;t@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/formDataToJSON.js"}],[863,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/isAbsoluteURL.js"}],[864,{"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils");t.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/isAxiosError.js"}],[865,{"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils");t.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/isURLSameOrigin.js"}],[866,{"../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../utils");t.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/normalizeHeaderName.js"}],[867,{"./../utils":877},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./../utils"),o=["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"];t.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.slice(0,i)).toLowerCase(),r=n.trim(e.slice(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/parseHeaders.js"}],[868,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/parseProtocol.js"}],[869,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){return function(t){return e.apply(null,t)}}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/spread.js"}],[870,{"../core/AxiosError":846,"../env/classes/FormData":855,"../utils":877,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("../utils"),o=e("../core/AxiosError"),i=e("../env/classes/FormData");function s(e){return n.isPlainObject(e)||n.isArray(e)}function a(e){return n.endsWith(e,"[]")?e.slice(0,-2):e}function c(e,t,r){return e?e.concat(t).map((function(e,t){return e=a(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var l=n.toFlatObject(n,{},null,(function(e){return/^is[A-Z]/.test(e)}));t.exports=function(e,t,u){if(!n.isObject(e))throw new TypeError("target must be an object");t=t||new(i||FormData);var d,f=(u=n.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!n.isUndefined(t[e])}))).metaTokens,p=u.visitor||_,h=u.dots,g=u.indexes,m=(u.Blob||"undefined"!=typeof Blob&&Blob)&&((d=t)&&n.isFunction(d.append)&&"FormData"===d[Symbol.toStringTag]&&d[Symbol.iterator]);if(!n.isFunction(p))throw new TypeError("visitor must be a function");function b(e){if(null===e)return"";if(n.isDate(e))return e.toISOString();if(!m&&n.isBlob(e))throw new o("Blob is not supported. Use a Buffer instead.");return n.isArrayBuffer(e)||n.isTypedArray(e)?m&&"function"==typeof Blob?new Blob([e]):r.from(e):e}function _(e,r,o){var i=e;if(e&&!o&&"object"==typeof e)if(n.endsWith(r,"{}"))r=f?r:r.slice(0,-2),e=JSON.stringify(e);else if(n.isArray(e)&&function(e){return n.isArray(e)&&!e.some(s)}(e)||n.isFileList(e)||n.endsWith(r,"[]")&&(i=n.toArray(e)))return r=a(r),i.forEach((function(e,o){!n.isUndefined(e)&&t.append(!0===g?c([r],o,h):null===g?r:r+"[]",b(e))})),!1;return!!s(e)||(t.append(c(o,r,h),b(e)),!1)}var y=[],E=Object.assign(l,{defaultVisitor:_,convertValue:b,isVisitable:s});if(!n.isObject(e))throw new TypeError("data must be an object");return function e(r,o){if(!n.isUndefined(r)){if(-1!==y.indexOf(r))throw Error("Circular reference detected in "+o.join("."));y.push(r),n.forEach(r,(function(r,i){!0===(!n.isUndefined(r)&&p.call(t,r,n.isString(i)?i.trim():i,o,E))&&e(r,o?o.concat(i):[i])})),y.pop()}}(e),t}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/toFormData.js"}],[871,{"../platform/":876,"../utils":877,"./toFormData":870},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../utils"),o=e("./toFormData"),i=e("../platform/");t.exports=function(e,t){return o(e,new i.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,o){return i.isNode&&n.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/toURLEncodedForm.js"}],[872,{"../core/AxiosError":846,"../env/data":856},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../env/data").version,o=e("../core/AxiosError"),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,r){function i(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new o(i(n," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!s[n]&&(s[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},t.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),i=n.length;i-- >0;){var s=n[i],a=t[s];if(a){var c=e[s],l=c===undefined||a(c,s,e);if(!0!==l)throw new o("option "+s+" must be "+l,o.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new o("Unknown option "+s,o.ERR_BAD_OPTION)}},validators:i}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/helpers/validator.js"}],[873,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=FormData}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/platform/browser/classes/FormData.js"}],[874,{"../../../helpers/AxiosURLSearchParams":857},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../../helpers/AxiosURLSearchParams");t.exports="undefined"!=typeof URLSearchParams?URLSearchParams:n}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"}],[875,{"./classes/FormData":873,"./classes/URLSearchParams":874},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={isBrowser:!0,classes:{URLSearchParams:e("./classes/URLSearchParams"),FormData:e("./classes/FormData"),Blob:Blob},protocols:["http","https","file","blob","url","data"]}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/platform/browser/index.js"}],[876,{"./node/":875},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("./node/")}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/platform/index.js"}],[877,{"./helpers/bind":858},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,o=e("./helpers/bind"),i=Object.prototype.toString,s=(n=Object.create(null),function(e){var t=i.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())});function a(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function c(e){return Array.isArray(e)}function l(e){return void 0===e}var u=a("ArrayBuffer");function d(e){return"number"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=a("Date"),g=a("File"),m=a("Blob"),b=a("FileList");function _(e){return"[object Function]"===i.call(e)}var y=a("URLSearchParams");function E(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),c(e))for(var r=0,n=e.length;r0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:function(e,t,r){e=String(e),(r===undefined||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(c(e))return e;var t=e.length;if(!d(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:v,isFileList:b,forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:O,hasOwnProperty:T}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/axios/lib/utils.js"}],[878,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){!function(e){var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,s="[BigNumber Error] ",a=s+"Number primitive has more than 15 significant digits: ",c=1e14,l=14,u=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],f=1e7,p=1e9;function h(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,i=e[0]+"";nl^r?1:-1;for(a=(c=o.length)<(l=i.length)?c:l,s=0;si[s]^r?1:-1;return c==l?0:c>l^r?1:-1}function b(e,t,r,n){if(er||e!==i(e))throw Error(s+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function _(e){var t=e.c.length-1;return h(e.e/l)==t&&e.c[t]%2!=0}function y(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function E(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 tD?g.c=g.e=null:e.e=10;d/=10,c++);return void(c>D?g.c=g.e=null:(g.e=c,g.c=[e]))}h=String(e)}else{if(!n.test(h=String(e)))return v(g,h,f);g.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(c=h.indexOf("."))>-1&&(h=h.replace(".","")),(d=h.search(/e/i))>0?(c<0&&(c=d),c+=+h.slice(d+1),h=h.substring(0,d)):c<0&&(c=h.length)}else{if(b(t,2,H.length,"Base"),10==t&&G)return Y(g=new V(e),R+g.e+1,k);if(h=String(e),f="number"==typeof e){if(0*e!=0)return v(g,h,f,t);if(g.s=1/e<0?(h=h.slice(1),-1):1,V.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else g.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(r=H.slice(0,t),c=d=0,p=h.length;dc){c=p;continue}}else if(!s&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){s=!0,d=-1,c=0;continue}return v(g,String(e),f,t)}f=!1,(c=(h=w(h,t,10,g.s)).indexOf("."))>-1?h=h.replace(".",""):c=h.length}for(d=0;48===h.charCodeAt(d);d++);for(p=h.length;48===h.charCodeAt(--p););if(h=h.slice(d,++p)){if(p-=d,f&&V.DEBUG&&p>15&&(e>u||e!==i(e)))throw Error(a+g.s*e);if((c=c-d-1)>D)g.c=g.e=null;else if(c=L)?y(c,s):E(c,s,"0");else if(i=(e=Y(new V(e),t,r)).e,a=(c=g(e.c)).length,1==n||2==n&&(t<=i||i<=j)){for(;aa){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-a)>0)for(i+1==a&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function z(e,t){for(var r,n,o=1,i=new V(e[0]);o=10;o/=10,n++);return(r=n+r*l-1)>D?e.c=e.e=null:r=10;f/=10,s++);if((a=t-s)<0)a+=l,u=t,p=m[h=0],g=i(p/b[s-u-1]%10);else if((h=o((a+1)/l))>=m.length){if(!n)break e;for(;m.length<=h;m.push(0));p=g=0,s=1,u=(a%=l)-l+1}else{for(p=f=m[h],s=1;f>=10;f/=10,s++);g=(u=(a%=l)-l+s)<0?0:i(p/b[s-u-1]%10)}if(n=n||t<0||null!=m[h+1]||(u<0?p:p%b[s-u-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(a>0?u>0?p/b[s-u]:0:m[h-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=b[(l-t%l)%l],e.e=-t||0):m[0]=e.e=0,e;if(0==a?(m.length=h,f=1,h--):(m.length=h+1,f=b[l-a],m[h]=u>0?i(p/b[s-u]%b[u])*f:0),n)for(;;){if(0==h){for(a=1,u=m[0];u>=10;u/=10,a++);for(u=m[0]+=f,f=1;u>=10;u/=10,f++);a!=f&&(e.e++,m[0]==c&&(m[0]=1));break}if(m[h]+=f,m[h]!=c)break;m[h--]=0,f=1}for(a=m.length;0===m[--a];m.pop());}e.e>D?e.c=e.e=null:e.e=L?y(t,r):E(t,r,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(s+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(b(r=e[t],0,p,t),R=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(b(r=e[t],0,8,t),k=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(b(r[0],-p,0,t),b(r[1],0,p,t),j=r[0],L=r[1]):(b(r,-p,p,t),j=-(L=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)b(r[0],-p,-1,t),b(r[1],1,p,t),M=r[0],D=r[1];else{if(b(r,-p,p,t),!r)throw Error(s+t+" cannot be zero: "+r);M=-(D=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(s+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!r,Error(s+"crypto unavailable");U=r}else U=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(b(r=e[t],0,9,t),B=r),e.hasOwnProperty(t="POW_PRECISION")&&(b(r=e[t],0,p,t),F=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(s+t+" not an object: "+r);q=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(s+t+" invalid: "+r);G="0123456789"==r.slice(0,10),H=r}}return{DECIMAL_PLACES:R,ROUNDING_MODE:k,EXPONENTIAL_AT:[j,L],RANGE:[M,D],CRYPTO:U,MODULO_MODE:B,POW_PRECISION:F,FORMAT:q,ALPHABET:H}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,r,n=e.c,o=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===a||-1===a)&&o>=-p&&o<=p&&o===i(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%l)<1&&(t+=l),String(n[0]).length==t){for(t=0;t=c||r!==i(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===a||1===a||-1===a))return!0;throw Error(s+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return z(arguments,-1)},V.minimum=V.min=function(){return z(arguments,1)},V.random=(P=9007199254740992,O=Math.random()*P&2097151?function(){return i(Math.random()*P)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,a,c,u=0,f=[],h=new V(x);if(null==e?e=R:b(e,0,p),a=o(e/l),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[u]=r[0],t[u+1]=r[1]):(f.push(c%1e14),u+=2);u=a/2}else{if(!crypto.randomBytes)throw U=!1,Error(s+"crypto unavailable");for(t=crypto.randomBytes(a*=7);u=9e15?crypto.randomBytes(7).copy(t,u):(f.push(c%1e14),u+=7);u=a/7}if(!U)for(;u=10;c/=10,u++);ur-1&&(null==s[o+1]&&(s[o+1]=0),s[o+1]+=s[o]/r|0,s[o]%=r)}return s.reverse()}return function(n,o,i,s,a){var c,l,u,d,f,p,h,m,b=n.indexOf("."),_=R,y=k;for(b>=0&&(d=F,F=0,n=n.replace(".",""),p=(m=new V(o)).pow(n.length-b),F=d,m.c=t(E(g(p.c),p.e,"0"),10,i,e),m.e=m.c.length),u=d=(h=t(n,o,i,a?(c=H,e):(c=e,H))).length;0==h[--d];h.pop());if(!h[0])return c.charAt(0);if(b<0?--u:(p.c=h,p.e=u,p.s=s,h=(p=r(p,m,_,y,i)).c,f=p.r,u=p.e),b=h[l=u+_+1],d=i/2,f=f||l<0||null!=h[l+1],f=y<4?(null!=b||f)&&(0==y||y==(p.s<0?3:2)):b>d||b==d&&(4==y||f||6==y&&1&h[l-1]||y==(p.s<0?8:7)),l<1||!h[0])n=f?E(c.charAt(1),-_,c.charAt(0)):c.charAt(0);else{if(h.length=l,f)for(--i;++h[--l]>i;)h[l]=0,l||(++u,h=[1].concat(h));for(d=h.length;!h[--d];);for(b=0,n="";b<=d;n+=c.charAt(h[b++]));n=E(n,u,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,i,s,a=0,c=e.length,l=t%f,u=t/f|0;for(e=e.slice();c--;)a=((o=l*(i=e[c]%f)+(n=u*i+(s=e[c]/f|0)*l)%f*f+a)/r|0)+(n/f|0)+u*s,e[c]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;ot[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]1;e.splice(0,1));}return function(n,o,s,a,u){var d,f,p,g,m,b,_,y,E,w,v,P,O,T,A,S,I,C=n.s==o.s?1:-1,N=n.c,x=o.c;if(!(N&&N[0]&&x&&x[0]))return new V(n.s&&o.s&&(N?!x||N[0]!=x[0]:x)?N&&0==N[0]||!x?0*C:C/0:NaN);for(E=(y=new V(C)).c=[],C=s+(f=n.e-o.e)+1,u||(u=c,f=h(n.e/l)-h(o.e/l),C=C/l|0),p=0;x[p]==(N[p]||0);p++);if(x[p]>(N[p]||0)&&f--,C<0)E.push(1),g=!0;else{for(T=N.length,S=x.length,p=0,C+=2,(m=i(u/(x[0]+1)))>1&&(x=e(x,m,u),N=e(N,m,u),S=x.length,T=N.length),O=S,v=(w=N.slice(0,S)).length;v=u/2&&A++;do{if(m=0,(d=t(x,w,S,v))<0){if(P=w[0],S!=v&&(P=P*u+(w[1]||0)),(m=i(P/A))>1)for(m>=u&&(m=u-1),_=(b=e(x,m,u)).length,v=w.length;1==t(b,w,_,v);)m--,r(b,S<_?I:x,_,u),_=b.length,d=1;else 0==m&&(d=m=1),_=(b=x.slice()).length;if(_=10;C/=10,p++);Y(y,s+(y.e=p+f*l-1)+1,a,g)}else y.e=f,y.r=+g;return y}}(),T=/^(-?)0([xbo])(?=\w[\w.]*$)/i,A=/^([^.]+)\.$/,S=/^\.([^.]+)$/,I=/^-?(Infinity|NaN)$/,C=/^\s*\+(?=[\w.])|^\s+|\s+$/g,v=function(e,t,r,n){var o,i=r?t:t.replace(C,"");if(I.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(T,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(A,"$1").replace(S,"0.$1")),t!=i))return new V(i,o);if(V.DEBUG)throw Error(s+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},N.absoluteValue=N.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},N.comparedTo=function(e,t){return m(this,new V(e,t))},N.decimalPlaces=N.dp=function(e,t){var r,n,o,i=this;if(null!=e)return b(e,0,p),null==t?t=k:b(t,0,8),Y(new V(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-h(this.e/l))*l,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},N.dividedBy=N.div=function(e,t){return r(this,new V(e,t),R,k)},N.dividedToIntegerBy=N.idiv=function(e,t){return r(this,new V(e,t),0,1)},N.exponentiatedBy=N.pow=function(e,t){var r,n,a,c,u,d,f,p,h=this;if((e=new V(e)).c&&!e.isInteger())throw Error(s+"Exponent not an integer: "+W(e));if(null!=t&&(t=new V(t)),u=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return p=new V(Math.pow(+W(h),u?e.s*(2-_(e)):+W(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(NaN);(n=!d&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||u&&h.c[1]>=24e7:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return c=h.s<0&&_(e)?-0:0,h.e>-1&&(c=1/c),new V(d?1/c:c);F&&(c=o(F/l+2))}for(u?(r=new V(.5),d&&(e.s=1),f=_(e)):f=(a=Math.abs(+W(e)))%2,p=new V(x);;){if(f){if(!(p=p.times(h)).c)break;c?p.c.length>c&&(p.c.length=c):n&&(p=p.mod(t))}if(a){if(0===(a=i(a/2)))break;f=a%2}else if(Y(e=e.times(r),e.e+1,1),e.e>14)f=_(e);else{if(0===(a=+W(e)))break;f=a%2}h=h.times(h),c?h.c&&h.c.length>c&&(h.c.length=c):n&&(h=h.mod(t))}return n?p:(d&&(p=x.div(p)),t?p.mod(t):c?Y(p,F,k,undefined):p)},N.integerValue=function(e){var t=new V(this);return null==e?e=k:b(e,0,8),Y(t,t.e+1,e)},N.isEqualTo=N.eq=function(e,t){return 0===m(this,new V(e,t))},N.isFinite=function(){return!!this.c},N.isGreaterThan=N.gt=function(e,t){return m(this,new V(e,t))>0},N.isGreaterThanOrEqualTo=N.gte=function(e,t){return 1===(t=m(this,new V(e,t)))||0===t},N.isInteger=function(){return!!this.c&&h(this.e/l)>this.c.length-2},N.isLessThan=N.lt=function(e,t){return m(this,new V(e,t))<0},N.isLessThanOrEqualTo=N.lte=function(e,t){return-1===(t=m(this,new V(e,t)))||0===t},N.isNaN=function(){return!this.s},N.isNegative=function(){return this.s<0},N.isPositive=function(){return this.s>0},N.isZero=function(){return!!this.c&&0==this.c[0]},N.minus=function(e,t){var r,n,o,i,s=this,a=s.s;if(t=(e=new V(e,t)).s,!a||!t)return new V(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/l,d=e.e/l,f=s.c,p=e.c;if(!u||!d){if(!f||!p)return f?(e.s=-t,e):new V(p?s:NaN);if(!f[0]||!p[0])return p[0]?(e.s=-t,e):new V(f[0]?s:3==k?-0:0)}if(u=h(u),d=h(d),f=f.slice(),a=u-d){for((i=a<0)?(a=-a,o=f):(d=u,o=p),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(i=(a=f.length)<(t=p.length))?a:t,a=t=0;t0)for(;t--;f[r++]=0);for(t=c-1;n>a;){if(f[--n]=0;){for(r=0,m=P[o]%E,b=P[o]/E|0,i=o+(s=u);i>o;)r=((d=m*(d=v[--s]%E)+(a=b*d+(p=v[s]/E|0)*m)%E*E+_[i]+r)/y|0)+(a/E|0)+b*p,_[i--]=d%y;_[i]=r}return r?++n:_.splice(0,1),K(e,_,n)},N.negated=function(){var e=new V(this);return e.s=-e.s||null,e},N.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new V(e,t)).s,!o||!t)return new V(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/l,s=e.e/l,a=n.c,u=e.c;if(!i||!s){if(!a||!u)return new V(o/0);if(!a[0]||!u[0])return u[0]?e:new V(a[0]?n:0*o)}if(i=h(i),s=h(s),a=a.slice(),o=i-s){for(o>0?(s=i,r=u):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+u[t]+o)/c|0,a[t]=c===a[t]?0:a[t]%c;return o&&(a=[o].concat(a),++s),K(e,a,s)},N.precision=N.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return b(e,1,p),null==t?t=k:b(t,0,8),Y(new V(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*l+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},N.shiftedBy=function(e){return b(e,-9007199254740991,u),this.times("1e"+e)},N.squareRoot=N.sqrt=function(){var e,t,n,o,i,s=this,a=s.c,c=s.s,l=s.e,u=R+4,d=new V("0.5");if(1!==c||!a||!a[0])return new V(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+W(s)))||c==1/0?(((t=g(a)).length+l)%2==0&&(t+="0"),c=Math.sqrt(+t),l=h((l+1)/2)-(l<0||l%2),n=new V(t=c==1/0?"5e"+l:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new V(c+""),n.c[0])for((c=(l=n.e)+u)<3&&(c=0);;)if(i=n,n=d.times(i.plus(r(s,i,u,1))),g(i.c).slice(0,c)===(t=g(n.c)).slice(0,c)){if(n.e0&&g>0){for(i=g%c||c,d=h.substr(0,i);i0&&(d+=u+h.slice(i)),p&&(d="-"+d)}n=f?d+(r.decimalSeparator||"")+((l=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):d}return(r.prefix||"")+n+(r.suffix||"")},N.toFraction=function(e){var t,n,o,i,a,c,u,f,p,h,m,b,_=this,y=_.c;if(null!=e&&(!(u=new V(e)).isInteger()&&(u.c||1!==u.s)||u.lt(x)))throw Error(s+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+W(u));if(!y)return new V(_);for(t=new V(x),p=n=new V(x),o=f=new V(x),b=g(y),a=t.e=b.length-_.e-1,t.c[0]=d[(c=a%l)<0?l+c:c],e=!e||u.comparedTo(t)>0?a>0?t:p:u,c=D,D=1/0,u=new V(b),f.c[0]=0;h=r(u,t,0,1),1!=(i=n.plus(h.times(o))).comparedTo(e);)n=o,o=i,p=f.plus(h.times(i=p)),f=i,t=u.minus(h.times(i=t)),u=i;return i=r(e.minus(n),o,0,1),f=f.plus(i.times(p)),n=n.plus(i.times(o)),f.s=p.s=_.s,m=r(p,o,a*=2,k).minus(_).abs().comparedTo(r(f,n,a,k).minus(_).abs())<1?[p,o]:[f,n],D=c,m},N.toNumber=function(){return+W(this)},N.toPrecision=function(e,t){return null!=e&&b(e,1,p),$(this,e,t,2)},N.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=o<=j||o>=L?y(g(r.c),o):E(g(r.c),o,"0"):10===e&&G?t=E(g((r=Y(new V(r),R+o+1,k)).c),r.e,"0"):(b(e,2,H.length,"Base"),t=w(E(g(r.c),o,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},N.valueOf=N.toJSON=function(){return W(this)},N._isBigNumber=!0,null!=t&&V.set(t),V}(),r.default=r.BigNumber=r,"function"==typeof define&&define.amd?define((function(){return r})):void 0!==t&&t.exports?t.exports=r:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=r)}(this)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>bignumber.js",file:"node_modules/@ledgerhq/hw-app-eth/node_modules/bignumber.js/bignumber.js"}],[879,{rxjs:4808},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.setEnvUnsafe=r.setEnv=r.changes=r.getEnvDesc=r.isEnvDefault=r.getEnvDefault=r.getEnv=r.getAllEnvs=r.getAllEnvNames=r.getDefinition=void 0;const n=e("rxjs"),o=e=>{if(!Number.isNaN(e))return parseInt(e,10)},i=e=>{if(!Number.isNaN(e))return parseFloat(e)},s=e=>"boolean"==typeof e?e:!("0"===e||"false"===e),a=e=>"string"==typeof e?e:undefined,c=e=>{const t="string"==typeof e?e.split(","):null;if(Array.isArray(t)&&t.length>0)return t},l={ADDRESS_POISONING_FAMILIES:{def:"evm,tron",parser:a,desc:"List of families impacted by the address poisoning attack"},ANALYTICS_CONSOLE:{def:!1,parser:s,desc:"Show tracking overlays on the app UI"},DEBUG_THEME:{def:!1,parser:s,desc:"Show theme debug overlay UI"},API_ICP_ENDPOINT:{def:"https://icp.coin.ledger.com/",parser:a,desc:"Rosetta API for ICP"},API_CASPER_INDEXER_ENDPOINT:{parser:a,def:"https://casper.coin.ledger.com/indexer",desc:"Casper API url indexer"},API_CASPER_NODE_ENDPOINT:{parser:a,def:"https://casper.coin.ledger.com/node/",desc:"Casper API url node"},API_ALGORAND_BLOCKCHAIN_EXPLORER_API_ENDPOINT:{def:"https://algorand.coin.ledger.com",parser:a,desc:"Node API endpoint for algorand"},API_CELO_INDEXER:{def:"https://celo.coin.ledger.com/indexer/",parser:a,desc:"Explorer API for celo"},API_CELO_NODE:{def:"https://celo.coin.ledger.com/archive/",parser:a,desc:"Node endpoint for celo"},COSMOS_GAS_AMPLIFIER:{def:1.3,parser:o,desc:"Cosmos gas estimate multiplier"},API_FILECOIN_ENDPOINT:{parser:a,def:"https://filecoin.coin.ledger.com",desc:"Filecoin API url"},API_STACKS_ENDPOINT:{parser:a,def:"https://stacks.coin.ledger.com",desc:"Stacks API url"},API_POLKADOT_INDEXER:{parser:a,def:"https://polkadot.coin.ledger.com",desc:"Explorer API for polkadot"},API_POLKADOT_SIDECAR:{parser:a,def:"https://polkadot-sidecar.coin.ledger.com",desc:"Polkadot Sidecar API url"},API_POLKADOT_SIDECAR_CREDENTIALS:{parser:a,def:"",desc:"Polkadot Sidecar API credentials"},API_POLKADOT_NODE:{parser:a,def:"https://polkadot-fullnodes.api.live.ledger.com",desc:"Polkadot Node"},ELROND_API_ENDPOINT:{parser:a,def:"https://elrond.coin.ledger.com",desc:"Elrond API url"},ELROND_DELEGATION_API_ENDPOINT:{parser:a,def:"https://delegations-elrond.coin.ledger.com",desc:"Elrond DELEGATION API url"},API_STELLAR_HORIZON:{parser:a,def:"https://stellar.coin.ledger.com",desc:"Stellar Horizon API url"},API_STELLAR_HORIZON_FETCH_LIMIT:{parser:o,def:100,desc:"Limit of operation that Horizon will fetch per page"},API_STELLAR_HORIZON_STATIC_FEE:{def:!1,parser:s,desc:"Static fee for Stellar account"},API_TEZOS_BAKER:{parser:a,def:"https://tezos-bakers.api.live.ledger.com",desc:"bakers API for tezos"},API_TEZOS_BLOCKCHAIN_EXPLORER_API_ENDPOINT:{def:"https://xtz-explorer.api.live.ledger.com/explorer",parser:a,desc:"Ledger explorer API for tezos"},API_TEZOS_TZKT_API:{def:"https://xtz-tzkt-explorer.api.live.ledger.com",parser:a,desc:"tzkt.io explorer"},API_TEZOS_NODE:{def:"https://xtz-node.api.live.ledger.com",parser:a,desc:"node API for tezos (for broadcast only)"},API_TRONGRID_PROXY:{parser:a,def:"https://tron.coin.ledger.com",desc:"proxy url for trongrid API"},API_SOLANA_PROXY:{parser:a,def:"https://solana.coin.ledger.com",desc:"proxy url for solana API"},SOLANA_VALIDATORS_APP_BASE_URL:{parser:a,def:"https://earn.api.live.ledger.com/v0/network/solana/validator-details",desc:"base url for validators.app validator list"},SOLANA_TESTNET_VALIDATORS_APP_BASE_URL:{parser:a,def:"https://validators-solana.coin.ledger.com/api/v1/validators",desc:"base url for testnet validators.app validator list"},SOLANA_TX_CONFIRMATION_TIMEOUT:{def:1e5,parser:o,desc:"solana transaction broadcast confirmation timeout"},API_HEDERA_MIRROR:{def:"https://hedera.coin.ledger.com",parser:a,desc:"mirror node API for Hedera"},API_VECHAIN_THOREST:{def:"https://vechain.coin.ledger.com",parser:a,desc:"Thorest API for VeChain"},BASE_SOCKET_URL:{def:"wss://scriptrunner.api.live.ledger.com/update",parser:a,desc:"Ledger script runner API"},BOT_TIMEOUT_SCAN_ACCOUNTS:{def:6e5,parser:o,desc:"bot's default timeout for scanAccounts"},BOT_SPEC_DEFAULT_TIMEOUT:{def:18e5,parser:o,desc:"define the default value of spec.skipMutationsTimeout (if not overriden by spec)"},BUY_API_BASE:{def:"https://buy.api.live.ledger.com/buy/v1",parser:a,desc:"Buy crypto API base url - version 1"},CARDANO_API_ENDPOINT:{def:"https://cardano.coin.ledger.com/api",parser:a,desc:"Cardano API url"},CARDANO_TESTNET_API_ENDPOINT:{def:"https://testnet-ledger.cardanoscan.io/api",parser:a,desc:"Cardano API url"},ICON_NODE_ENDPOINT:{parser:a,def:"https://icon.coin.ledger.com/api/v3",desc:"ICON RPC url"},ICON_DEBUG_ENDPOINT:{parser:a,def:"https://icon.coin.ledger.com/api/v3d",desc:"ICON debug RPC url"},ICON_INDEXER_ENDPOINT:{parser:a,def:"https://icon.coin.ledger.com/api/v1",desc:"ICON API url"},ICON_TESTNET_NODE_ENDPOINT:{parser:a,def:"https://berlin.net.solidwallet.io/api/v3",desc:"ICON Berlin Testnet API url"},ICON_TESTNET_DEBUG_ENDPOINT:{parser:a,def:"https://berlin.net.solidwallet.io/api/v3d",desc:"ICON Berlin Testnet debug"},ICON_TESTNET_INDEXER_ENDPOINT:{parser:a,def:"https://tracker.berlin.icon.community/api/v1",desc:"ICON Berlin Testnet API url"},COINAPPS:{def:"",parser:a,desc:"(dev feature) defines the folder for speculos mode that contains Nano apps binaries (.elf) in a specific structure: ///app_.elf"},CRYPTO_ORG_INDEXER:{def:"https://cryptoorg-rpc-indexer.coin.ledger.com",parser:a,desc:"location of the Cronos POS Chain (formerly Crypto.org) indexer API"},CRYPTO_ORG_TESTNET_INDEXER:{def:"https://cronos-pos.org/explorer/croeseid4",parser:a,desc:"location of the Cronos POS Chain (formerly Crypto.org) indexer testnet API"},CRYPTO_ORG_RPC_URL:{def:"https://cryptoorg-rpc-node.coin.ledger.com",parser:a,desc:"location of the Cronos POS Chain (formerly Crypto.org) chain node"},CRYPTO_ORG_TESTNET_RPC_URL:{def:"https://rpc-testnet-croeseid-4.crypto.org",parser:a,desc:"location of the Cronos POS Chain (formerly Crypto.org) chain testnet node"},DEBUG_UTXO_DISPLAY:{def:4,parser:o,desc:"define maximum number of utxos to display in CLI"},DEBUG_HTTP_RESPONSE:{def:!1,parser:s,desc:"includes HTTP response body in logs"},DEVICE_CANCEL_APDU_FLUSH_MECHANISM:{def:!0,parser:s,desc:"enable a mechanism that send a 0x00 apdu to force device to awake from its 'Processing' UI state"},DEVICE_PROXY_URL:{def:"",parser:a,desc:"enable a proxy to use instead of a physical device"},DEVICE_PROXY_MODEL:{def:"nanoS",parser:a,desc:"allow to override the default model of a proxied device"},DISABLE_TRANSACTION_BROADCAST:{def:!1,parser:s,desc:"disable broadcast of transactions"},DISABLE_SYNC_TOKEN:{def:!0,parser:s,desc:"disable a problematic mechanism of our API"},DISABLE_FW_UPDATE_VERSION_CHECK:{def:!1,parser:s,desc:"disable the version check for firmware update eligibility"},EIP1559_MINIMUM_FEES_GATE:{def:!0,parser:s,desc:"prevents the user from doing an EIP1559 transaction with fees too low"},EIP1559_PRIORITY_FEE_LOWER_GATE:{def:.85,parser:i,desc:"minimum priority fee percents allowed compared to network conditions allowed when EIP1559_MINIMUM_FEES_GATE is activated"},EIP1559_BASE_FEE_MULTIPLIER:{def:1.5,parser:i,desc:"mutiplier for the base fee that is composing the maxFeePerGas property"},EXPERIMENTAL_BLE:{def:!1,parser:s,desc:"enable experimental support of Bluetooth"},EXPERIMENTAL_CURRENCIES:{def:"",parser:a,desc:"enable experimental support of currencies (comma separated)"},EXPERIMENTAL_EXPLORERS:{def:!1,parser:s,desc:"enable experimental explorer APIs"},EXPERIMENTAL_LANGUAGES:{def:!1,parser:s,desc:"enable experimental languages"},EXPERIMENTAL_MANAGER:{def:!1,parser:s,desc:"enable an experimental version of Manager"},EXPERIMENTAL_ROI_CALCULATION:{def:!1,parser:s,desc:"enable an experimental version of the portfolio percentage calculation"},EXPERIMENTAL_SEND_MAX:{def:!1,parser:s,desc:"force enabling SEND MAX even if not yet stable"},EXPERIMENTAL_USB:{def:!1,parser:s,desc:"enable an experimental implementation of USB support"},EXPERIMENTAL_SWAP:{def:!1,parser:s,desc:"enable an experimental swap interface"},EXPLORER:{def:"https://explorers.api.live.ledger.com",parser:a,desc:"Ledger generic explorer API"},EXPLORER_STAGING:{def:"https://explorers.api-01.live.ledger-stg.com",parser:a,desc:"Ledger staging explorer API"},EXPLORER_BETA:{def:"https://explorers.api.live.ledger.com",parser:a,desc:"Ledger generic explorer beta API"},EXPLORER_SATSTACK:{def:"http://localhost:20000",parser:a,desc:"Ledger satstack Bitcoin explorer API"},EXPORT_EXCLUDED_LOG_TYPES:{def:"ble-frame",parser:a,desc:"comma-separated list of excluded log types for exported logs"},EXPORT_MAX_LOGS:{def:5e3,parser:o,desc:"maximum logs to keep for export"},DISABLE_APP_VERSION_REQUIREMENTS:{def:!1,parser:s,desc:"force an old application version to be accepted regardless of its version"},FORCE_PROVIDER:{def:1,parser:o,desc:"use a different provider for app store (for developers only)"},FILTER_ZERO_AMOUNT_ERC20_EVENTS:{def:!0,parser:s,desc:"Remove filter of address poisoning"},GET_CALLS_RETRY:{def:2,parser:o,desc:"how many times to retry a GET http call"},GET_CALLS_TIMEOUT:{def:6e4,parser:o,desc:"how much time to timeout a GET http call"},HIDE_EMPTY_TOKEN_ACCOUNTS:{def:!1,parser:s,desc:"hide the sub accounts when they are empty"},KEYCHAIN_OBSERVABLE_RANGE:{def:0,parser:o,desc:"overrides the gap limit specified by BIP44 (default to 20)"},LEDGER_CLIENT_VERSION:{def:"",parser:a,desc:"the 'X-Ledger-Client-Version' HTTP header to use for queries to Ledger APIs"},LEDGER_COUNTERVALUES_API:{def:"https://countervalues.live.ledger.com",parser:a,desc:"Ledger countervalues API"},LEDGER_REST_API_BASE:{def:"https://explorers.api.live.ledger.com",parser:a,desc:"DEPRECATED"},LEGACY_KT_SUPPORT_TO_YOUR_OWN_RISK:{def:!1,parser:s,desc:"enable sending to KT accounts. Not tested."},MANAGER_API_BASE:{def:"https://manager.api.live.ledger.com/api",parser:a,desc:"Ledger Manager API"},MANAGER_DEV_MODE:{def:!1,parser:s,desc:"enable visibility of utility apps in Manager"},MANAGER_INSTALL_DELAY:{def:1e3,parser:o,desc:"defines the time to wait before installing apps to prevent known glitch (<=1.5.5) when chaining installs"},MAPPING_SERVICE:{def:"https://mapping-service.api.ledger.com",parser:a,desc:""},MAX_ACCOUNT_NAME_SIZE:{def:50,parser:o,desc:"maximum size of account names"},MOCK:{def:"",parser:a,desc:"switch the app into a MOCK mode for test purpose, the value will be used as a seed for the rng. Avoid falsy values."},MOCK_COUNTERVALUES:{def:"",parser:a,desc:"switch the countervalues resolution into a MOCK mode for test purpose"},MOCK_APP_UPDATE:{def:!1,parser:s,desc:"Always shows app update in the manager"},MOCK_EXCHANGE_TEST_CONFIG:{def:!1,parser:s,desc:"mock the cryptoassets config and test partner (in the context of app-exchange)"},MOCK_REMOTE_LIVE_MANIFEST:{def:"",parser:a,desc:"mock remote live app manifest"},MOCK_OS_VERSION:{def:"",parser:a,desc:"if defined, overrides the os and version. format: os@version. Example: Windows_NT@6.1.7601"},MOCK_NO_BYPASS:{def:!1,parser:s,desc:"if defined, avoids bypass of the currentDevice in the store."},NFT_CURRENCIES:{def:"ethereum,polygon",parser:a,desc:"set the currencies where NFT is active"},NFT_ETH_METADATA_SERVICE:{def:"https://nft.api.live.ledger.com",parser:a,desc:"service uri used to get the metadata of an nft"},OPERATION_ADDRESSES_LIMIT:{def:100,parser:o,desc:"limit the number of addresses in from/to of operations"},OPERATION_OPTIMISTIC_RETENTION:{def:18e5,parser:o,desc:"timeout to keep an optimistic operation that was broadcasted but not yet visible from the coin implementation or the API"},OPERATION_PAGE_SIZE_INITIAL:{def:100,parser:o,desc:"defines the initial default operation length page to use"},POLKADOT_ELECTION_STATUS_THRESHOLD:{def:25,parser:o,desc:"in blocks - number of blocks before Polkadot election effectively opens to consider it as open and disable all staking features"},SATSTACK:{def:!1,parser:s,desc:"Switch to satstack mode"},SCAN_FOR_INVALID_PATHS:{def:!1,parser:s,desc:"enable searching accounts in exotic derivation paths"},SEED:{def:"",parser:a,desc:"(dev feature) seed to be used by speculos (device simulator)"},SHOW_LEGACY_NEW_ACCOUNT:{def:!1,parser:s,desc:"allow the creation of legacy accounts"},SIMPLE_HASH_API_BASE:{def:"https://simplehash.api.live.ledger.com/api/v0",parser:a,desc:"SimpleHash API base url"},SKIP_ONBOARDING:{def:!1,parser:s,desc:"dev flag to skip onboarding flow"},SPECULOS_API_PORT:{def:0,parser:o,desc:"API port for speculos"},SPECULOS_PID_OFFSET:{def:0,parser:o,desc:"offset to be added to the speculos pid and avoid collision with other instances"},SPECULOS_USE_WEBSOCKET:{def:!1,parser:s,desc:"Use speculos websocket interface instead of Rest API"},SWAP_API_BASE:{def:"https://swap.ledger.com/v5",parser:a,desc:"Swap API base"},SWAP_USER_IP:{def:"",parser:a,desc:"Swap IP"},SWAP_DISABLE_APPS_INSTALL:{def:!1,parser:s,desc:"bypass app checks on Nano for speculos swap tests"},SYNC_ALL_INTERVAL:{def:48e4,parser:o,desc:"delay between successive sync"},SYNC_BOOT_DELAY:{def:2e3,parser:o,desc:"delay before the sync starts"},SYNC_PENDING_INTERVAL:{def:1e4,parser:o,desc:"delay between sync when an operation is still pending"},SYNC_OUTDATED_CONSIDERED_DELAY:{def:6e5,parser:o,desc:"delay until Live consider a sync outdated"},SYNC_MAX_CONCURRENT:{def:4,parser:o,desc:"maximum limit to synchronize accounts concurrently to limit overload"},BOT_MAX_CONCURRENT:{def:10,parser:o,desc:"maximum limit to run bot spec in parallel"},USER_ID:{def:"",parser:a,desc:"unique identifier of app instance. used to derivate dissociated ids for difference purposes (e.g. the firmware update incremental deployment)."},WALLETCONNECT:{def:!1,parser:s,desc:"is walletconnect enabled"},CLOUD_SYNC_API_STAGING:{def:"https://cloud-sync-backend.api.aws.stg.ldg-tech.com",parser:a,desc:"wallet sync api staging base url"},CLOUD_SYNC_API_PROD:{def:"https://cloud-sync.api.live.ledger.com",parser:a,desc:"wallet sync api production base url"},WITH_DEVICE_POLLING_DELAY:{def:500,parser:i,desc:"delay when polling device"},ANNOUNCEMENTS_API_URL:{def:"https://cdn.live.ledger.com/announcements",parser:a,desc:"url used to fetch new announcements"},ANNOUNCEMENTS_API_VERSION:{def:1,parser:o,desc:"version used for the announcements api"},STATUS_API_URL:{def:"https://ledger.statuspage.io/api",parser:a,desc:"url used to fetch ledger status"},STATUS_API_VERSION:{def:2,parser:o,desc:"version used for ledger status api"},TEZOS_MAX_TX_QUERIES:{def:100,parser:o,desc:"safe max on maximum number of queries to synchronize a tezos account"},TRUSTCHAIN_API_STAGING:{def:"https://trustchain-backend.api.aws.stg.ldg-tech.com",parser:a,desc:"Trustchain API Staging"},TRUSTCHAIN_API_PROD:{def:"https://trustchain.api.live.ledger.com",parser:a,desc:"Trustchain API Prod"},PLATFORM_DEBUG:{def:!1,parser:s,desc:"enable visibility of debug apps and tools in Platform Catalog"},PLATFORM_EXPERIMENTAL_APPS:{def:!1,parser:s,desc:"enable visibility of experimental apps and tools in Platform Catalog"},PLATFORM_MANIFEST_API_URL:{def:"https://live-app-catalog.ledger.com/api/v1/apps",parser:a,desc:"url used to fetch platform app manifests"},PLATFORM_LOCAL_MANIFEST_JSON:{def:"",parser:a,desc:'json manifest for a local (test) platform app manifests. How to use: PLATFORM_LOCAL_MANIFEST_JSON="$(cat /path/to/file.json)"'},PLATFORM_GLOBAL_CATALOG_API_URL:{def:"https://cdn.live.ledger.com/platform/catalog/v1/data.json",parser:a,desc:"url used to fetch platform app manifests"},PLATFORM_GLOBAL_CATALOG_STAGING_API_URL:{def:"https://cdn.live.ledger-stg.com/platform/catalog/v1/data.json",parser:a,desc:"url used to fetch platform app manifests (staging)"},PLATFORM_RAMP_CATALOG_API_URL:{def:"https://cdn.live.ledger.com/platform/trade/v1/data.json",parser:a,desc:"url used to fetch platform app manifests"},PLATFORM_RAMP_CATALOG_STAGING_API_URL:{def:"https://cdn.live.ledger-stg.com/platform/trade/v1/data.json",parser:a,desc:"url used to fetch platform app manifests (staging)"},PLATFORM_API_URL:{def:"",parser:a,desc:"url used to fetch platform catalog"},PLATFORM_API_VERSION:{def:1,parser:o,desc:"version used for the platform api"},PLAYWRIGHT_RUN:{def:!1,parser:s,desc:"true when launched for E2E testing"},MARKET_API_URL:{def:"https://proxycg.api.live.ledger.com/api/v3",parser:a,desc:"Market data api"},USE_LEARN_STAGING_URL:{def:!1,parser:s,desc:"use the staging URL for the learn page"},DYNAMIC_CAL_BASE_URL:{def:"https://cdn.live.ledger.com/cryptoassets",parser:a,desc:"bucket S3 of the dynamic cryptoassets list"},CAL_SERVICE_URL:{def:"https://crypto-assets-service.api.ledger.com",parser:a,desc:"Cryptoassets list service url"},FEATURE_FLAGS:{def:"{}",parser:e=>{try{if("string"!=typeof e)throw new Error;return JSON.parse(e)}catch(e){return undefined}},desc:"key value map for feature flags: {[key in FeatureId]?: Feature]}"},PERFORMANCE_CONSOLE:{def:!1,parser:s,desc:"Show a performance overlay on the app UI"},ETHEREUM_STUCK_TRANSACTION_TIMEOUT:{def:3e5,parser:o,desc:"Time after which an optimisc operation is considered stuck"},EVM_REPLACE_TX_LEGACY_GASPRICE_FACTOR:{def:1.3,parser:i,desc:"Replace transaction gasprice factor for legacy evm transaction. This value should be 1.1 minimum since this is the minimum increase required by most nodes"},EVM_REPLACE_TX_EIP1559_MAXFEE_FACTOR:{def:1.3,parser:i,desc:"Replace transaction max fee factor for EIP1559 evm transaction. This value should be 1.1 minimum since this is the minimum increase required by most nodes"},EVM_REPLACE_TX_EIP1559_MAXPRIORITYFEE_FACTOR:{def:1.1,parser:i,desc:"Replace transaction max priority fee factor for EIP1559 evm transaction. This value should be 1.1 minimum since this is the minimum increase required by most nodes"},ENABLE_NETWORK_LOGS:{def:!1,parser:s,desc:"Enable network request and responses logs. Errors are always logged"},CRYPTO_ASSET_SEARCH_KEYS:{def:["ticker","name","keywords"],parser:c,desc:"Fuse search attributes to find a currency according to user input"},VERBOSE:{def:[],parser:c,desc:'Sets up debug console printing of logs. `VERBOSE=1` or `VERBOSE=true`: to print all logs | `VERBOSE="apdu,hw,transport,hid-verbose"` : filtering on a list of log `type` separated by a `,`'},DEFAULT_TRANSACTION_POLLING_INTERVAL:{def:3e4,parser:o,desc:"Default interval to poll for transaction confirmation in speedup/cancel evm flow (in ms)"},LOW_BATTERY_PERCENTAGE:{def:20,parser:o,desc:"Configure the low battery percentage threshold"},LOG_DRAWERS:{def:!1,parser:s,desc:"Enable logs for drawers"}};r.getDefinition=e=>e in l?l[e]:undefined;const u=Object.keys(l).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:l[t].def})),{}),d=Object.assign({},u);r.getAllEnvNames=()=>Object.keys(l);r.getAllEnvs=()=>Object.assign({},d);r.getEnv=e=>d[e];r.getEnvDefault=e=>u[e];r.isEnvDefault=e=>d[e]===u[e];r.getEnvDesc=e=>l[e].desc,r.changes=new n.Subject;r.setEnv=(e,t)=>{const n=d[e];n!==t&&(d[e]=t,r.changes.next({name:e,value:t,oldValue:n}))};r.setEnvUnsafe=(e,t)=>{const n=(0,r.getDefinition)(e);if(!n)return!1;const{parser:o}=n,i=o(t);return i===undefined||null===i?(console.warn(`Invalid ENV value for ${e}`),!1):((0,r.setEnv)(e,i),!0)}}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>@ledgerhq/live-env",file:"node_modules/@ledgerhq/live-env/lib/env.js"}],[880,{"./env":879},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),o(e("./env"),r)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>@ledgerhq/live-env",file:"node_modules/@ledgerhq/live-env/lib/index.js"}],[881,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.listen=r.LocalTracer=r.trace=r.log=void 0;let n=0;const o=[];r.log=(e,t,r)=>{const o={type:e,id:String(++n),date:new Date};t&&(o.message=t),r&&(o.data=r),s(o)};r.trace=({type:e,message:t,data:r,context:o})=>{const i={type:e,id:String(++n),date:new Date};t&&(i.message=t),r&&(i.data=r),o&&(i.context=o),s(i)};class i{constructor(e,t){this.type=e,this.context=t}trace(e,t){(0,r.trace)({type:this.type,message:e,data:t,context:this.context})}getContext(){return this.context}setContext(e){this.context=e}updateContext(e){this.context=Object.assign(Object.assign({},this.context),e)}getType(){return this.type}setType(e){this.type=e}withType(e){return new i(e,this.context)}withContext(e){return new i(this.type,e)}withUpdatedContext(e){return new i(this.type,Object.assign(Object.assign({},this.context),e))}}r.LocalTracer=i;function s(e){for(let t=0;t(o.push(e),()=>{const t=o.indexOf(e);-1!==t&&(o[t]=o[o.length-1],o.pop())}),"undefined"!=typeof window&&(window.__ledgerLogsListen=r.listen)}}},{package:"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/logs",file:"node_modules/@ledgerhq/logs/lib/index.js"}],[89,{"../../../shared/constants/notifications":5265,"../platforms/extension":291,"@metamask/safe-event-emitter":2306},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.NOTIFICATION_MANAGER_EVENTS=void 0;var n=s(e("@metamask/safe-event-emitter")),o=s(e("../platforms/extension")),i=e("../../../shared/constants/notifications");function s(e){return e&&e.__esModule?e:{default:e}}const a=r.NOTIFICATION_MANAGER_EVENTS={POPUP_CLOSED:"onPopupClosed"};class c extends n.default{constructor(){super(),this.platform=new o.default,this.platform.addOnRemovedListener(this._onWindowClosed.bind(this))}markAsAutomaticallyClosed(){this._popupAutomaticallyClosed=!0}async showPopup(e,t){this._popupId=t,this._setCurrentPopupId=e;const r=await this._getPopup(t);if(r)await this.platform.focusWindow(r.id);else{const e=0,t=0,r=await this.platform.openWindow({url:"notification.html",type:"popup",width:i.NOTIFICATION_WIDTH,height:i.NOTIFICATION_HEIGHT,left:e,top:t});r.left!==e&&"fullscreen"!==r.state&&await this.platform.updateWindowPosition(r.id,e,t),this._setCurrentPopupId(r.id),this._popupId=r.id}}_onWindowClosed(e){e===this._popupId&&(this._setCurrentPopupId(undefined),this._popupId=undefined,this.emit(a.POPUP_CLOSED,{automaticallyClosed:this._popupAutomaticallyClosed}),this._popupAutomaticallyClosed=undefined)}async _getPopup(){const e=await this.platform.getAllWindows();return this._getPopupIn(e)}_getPopupIn(e){return e?e.find((e=>e&&"popup"===e.type&&e.id===this._popupId)):null}}r.default=c}}},{package:"$root$",file:"app/scripts/lib/notification-manager.js"}],[9,{"@metamask/base-controller":1396},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.AccountOrderController=void 0;var n=e("@metamask/base-controller");const o={pinnedAccountList:[],hiddenAccountList:[]},i={pinnedAccountList:{persist:!0,anonymous:!0},hiddenAccountList:{persist:!0,anonymous:!0}};class s extends n.BaseController{constructor({messenger:e,state:t}){super({messenger:e,metadata:i,name:"AccountOrderController",state:{...o,...t}})}updateAccountsList(e){this.update((t=>(t.pinnedAccountList=e,t)))}updateHiddenAccountsList(e){this.update((t=>(t.hiddenAccountList=e,t)))}}r.AccountOrderController=s}}},{package:"$root$",file:"app/scripts/controllers/account-order.ts"}],[90,{"../../../../shared/constants/offscreen-communication":5266,"eth-lattice-keyring":3756},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.LatticeKeyringOffscreen=void 0;var n,o=(n=e("eth-lattice-keyring"))&&n.__esModule?n:{default:n},i=e("../../../../shared/constants/offscreen-communication");class s extends o.default{constructor(e={}){super(e)}async _getCreds(){try{const e=this.appName?this.appName:"Unknown",t=`${i.KnownOrigins.lattice}?keyring=${e}&forceLogin=true`;return await new Promise(((e,r)=>{chrome.runtime.sendMessage({target:i.OffscreenCommunicationTarget.latticeOffscreen,params:{url:t}},(t=>{t.error&&r(t.error),e(t.result)}))}))}catch(e){throw new Error(e)}}}r.LatticeKeyringOffscreen=s,function(e,t,r){(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}(s,"type",void 0),s.type=o.default.type}}},{package:"$root$",file:"app/scripts/lib/offscreen-bridge/lattice-offscreen-keyring.ts"}],[91,{"../../../../shared/constants/offscreen-communication":5266},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.LedgerOffscreenBridge=void 0;var n=e("../../../../shared/constants/offscreen-communication");function o(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}r.LedgerOffscreenBridge=class{constructor(){o(this,"isDeviceConnected",!1)}init(){return chrome.runtime.onMessage.addListener((e=>{e.target===n.OffscreenCommunicationTarget.extension&&e.event===n.OffscreenCommunicationEvents.ledgerDeviceConnect&&(this.isDeviceConnected=!0)})),Promise.resolve()}destroy(){return Promise.resolve()}getOptions(){return Promise.resolve({})}setOptions(){return Promise.resolve()}attemptMakeApp(){return new Promise(((e,t)=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.ledgerOffscreen,action:n.LedgerAction.makeApp},(r=>{r.success?e(!0):r.error?t(r.error):t(new Error("Unknown error occurred"))}))}))}updateTransportMethod(e){return new Promise(((t,r)=>{console.log("updating transport type to ",e," in ledger offscreen bridge"),chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.ledgerOffscreen,action:n.LedgerAction.updateTransport,params:{transportType:e}},(e=>{e.success?t(!0):r(new Error("Ledger transport could not be updated"))}))}))}getPublicKey(e){return new Promise(((t,r)=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.ledgerOffscreen,action:n.LedgerAction.getPublicKey,params:e},(e=>{e.success?t(e.payload):r(e.payload.error)}))}))}deviceSignTransaction(e){return new Promise(((t,r)=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.ledgerOffscreen,action:n.LedgerAction.signTransaction,params:e},(e=>{e.success?t(e.payload):r(e.payload.error)}))}))}deviceSignMessage(e){return new Promise(((t,r)=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.ledgerOffscreen,action:n.LedgerAction.signPersonalMessage,params:e},(e=>{e.success?t(e.payload):r(e.payload.error)}))}))}deviceSignTypedData(e){return new Promise(((t,r)=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.ledgerOffscreen,action:n.LedgerAction.signTypedData,params:e},(e=>{e.success?t(e.payload):r(e.payload.error)}))}))}}}}},{package:"$root$",file:"app/scripts/lib/offscreen-bridge/ledger-offscreen-bridge.ts"}],[92,{"../../../../shared/constants/offscreen-communication":5266},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.TrezorOffscreenBridge=void 0;var n=e("../../../../shared/constants/offscreen-communication");function o(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}r.TrezorOffscreenBridge=class{constructor(){o(this,"model",void 0),o(this,"minorVersion",void 0)}init(e){return chrome.runtime.onMessage.addListener((e=>{e.target===n.OffscreenCommunicationTarget.extension&&e.event===n.OffscreenCommunicationEvents.trezorDeviceConnect&&(this.model=e.payload.model,this.minorVersion=e.payload.minorVersion)})),new Promise((t=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.trezorOffscreen,action:n.TrezorAction.init,params:e},(()=>{t()}))}))}dispose(){return new Promise((e=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.trezorOffscreen,action:n.TrezorAction.dispose},(()=>{e()}))}))}getPublicKey(e){return console.log("getting public key for trezore offscreen bridge ",e.path,e.coin),new Promise((t=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.trezorOffscreen,action:n.TrezorAction.getPublicKey,params:e},(e=>{console.log("received get public key response for trezor offscreen bridge"),t(e)}))}))}ethereumSignTransaction(e){return new Promise((t=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.trezorOffscreen,action:n.TrezorAction.signTransaction,params:e},(e=>{t(e)}))}))}ethereumSignMessage(e){return new Promise((t=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.trezorOffscreen,action:n.TrezorAction.signMessage,params:e},(e=>{t(e)}))}))}ethereumSignTypedData(e){return new Promise((t=>{chrome.runtime.sendMessage({target:n.OffscreenCommunicationTarget.trezorOffscreen,action:n.TrezorAction.signTypedData,params:e},(e=>{t(e)}))}))}}}}},{package:"$root$",file:"app/scripts/lib/offscreen-bridge/trezor-offscreen-bridge.ts"}],[93,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function o(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}Object.defineProperty(r,"__esModule",{value:!0}),r.IndexedDBPPOMStorage=void 0;const i=async(e,t,r)=>{const n=await crypto.subtle.digest("SHA-256",t);if(Array.from(new Uint8Array(n)).map((e=>e.toString(16).padStart(2,"0"))).join("")!==r)throw new Error(`Checksum mismatch for key ${e}`)};var s=new WeakSet;function a(e){return new Promise(((t,r)=>{const n=indexedDB.open(this.storeName,this.dbVersion);n.onerror=e=>{var t;r(new Error(`Failed to open database ${this.storeName}: ${null===(t=e.target)||void 0===t?void 0:t.error}`))},n.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName,{keyPath:["name","chainId"]})},n.onsuccess=r=>{const n=r.target.result.transaction([this.storeName],e).objectStore(this.storeName);t(n)}}))}r.IndexedDBPPOMStorage=class{constructor(e,t){n(this,s),o(this,"storeName",void 0),o(this,"dbVersion",void 0),this.storeName=e,this.dbVersion=t}async objectStoreAction(e,t,r="readonly"){return new Promise(((n,o)=>{(function(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")})(s,this,a).call(this,r).then((r=>{const i=r[e](t);i.onsuccess=async e=>{n(e)},i.onerror=t=>{var r;o(new Error(`Error in indexDB operation ${e}: ${null===(r=t.target)||void 0===r?void 0:r.error}`))}})).catch((e=>{o(e)}))}))}async read(e,t){var r;const n=null===(r=(await this.objectStoreAction("get",[e.name,e.chainId])).target)||void 0===r||null===(r=r.result)||void 0===r?void 0:r.data;return await i(e,n,t),n}async write(e,t,r){await i(e,t,r),await this.objectStoreAction("put",{...e,data:t},"readwrite")}async delete(e){await this.objectStoreAction("delete",[e.name,e.chainId],"readwrite")}async dir(){var e;return null===(e=(await this.objectStoreAction("getAllKeys")).target)||void 0===e?void 0:e.result.map((([e,t])=>({name:e,chainId:t})))}}}}},{package:"$root$",file:"app/scripts/lib/ppom/indexed-db-backend.ts"}],[94,{"../../../../shared/constants/app":5248,"../../../../shared/constants/security-provider":5270,"../../../../shared/constants/transaction":5278,"../../../../shared/lib/trace":5291,"../../../../shared/modules/selectors/networks":5320,"./ppom-util":95,"@metamask/controller-utils":1422},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createPPOMMiddleware=function(e,t,r,d,f,p){return async(h,g,m)=>{try{const{securityAlertsEnabled:g}=t.state,{chainId:m}=(0,a.getProviderConfig)({metamask:r.state})??{};if(!m)return;if(!g||!u.includes(h.method))return;const b=h.params[0];if("string"==typeof b){const{isSIWEMessage:e}=(0,n.detectSIWE)({data:b});if(e)return}else if(h.method===o.MESSAGE_TYPE.ETH_SEND_TRANSACTION){const{to:e}=b??{},t=f.listAccounts();if(t.some((({address:t})=>(null==t?void 0:t.toLowerCase())===(null==e?void 0:e.toLowerCase()))))return}const _=(0,l.generateSecurityAlertId)();(0,c.trace)({name:c.TraceName.PPOMValidation,parentContext:h.traceContext},(()=>(0,l.validateRequestWithPPOM)({ppomController:e,request:h,securityAlertId:_,chainId:m,updateSecurityAlertResponse:p})));const y={...s.SECURITY_ALERT_RESPONSE_CHECKING_CHAIN,securityAlertId:_};i.SIGNING_METHODS.includes(h.method)&&d.addSignatureSecurityAlertResponse(y),h.securityAlertResponse=y}catch(e){h.securityAlertResponse=(0,l.handlePPOMError)(e,"Error createPPOMMiddleware: ")}finally{m()}}};var n=e("@metamask/controller-utils"),o=e("../../../../shared/constants/app"),i=e("../../../../shared/constants/transaction"),s=e("../../../../shared/constants/security-provider"),a=e("../../../../shared/modules/selectors/networks"),c=e("../../../../shared/lib/trace"),l=e("./ppom-util");const u=Object.freeze(["eth_sendRawTransaction","eth_sendTransaction",...i.SIGNING_METHODS])}}},{package:"$root$",file:"app/scripts/lib/ppom/ppom-middleware.ts"}],[95,{"../../../../shared/constants/security-provider":5270,"../../../../shared/constants/transaction":5278,"./security-alerts-api":97,"@metamask/transaction-controller":2698,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.METHOD_SIGN_TYPED_DATA_V4=r.METHOD_SIGN_TYPED_DATA_V3=void 0,r.generateSecurityAlertId=function(){return(0,o.v4)()},r.handlePPOMError=p,r.isChainSupported=h,r.updateSecurityAlertResponse=async function({appStateController:e,method:t,securityAlertId:r,securityAlertResponse:n,signatureController:o,transactionController:i}){const a=s.SIGNING_METHODS.includes(t),c=await async function(e,t,r,n){const o=s.SIGNING_METHODS.includes(t);for(;;){let t;if(t=o?Object.values(r.messages).find((t=>{var r;return(null===(r=t.securityAlertResponse)||void 0===r?void 0:r.securityAlertId)===e})):n.state.transactions.find((t=>{var r;return(null===(r=t.securityAlertResponse)||void 0===r?void 0:r.securityAlertId)===e})),t)return t;await new Promise((e=>setTimeout(e,100)))}}(r,t,o,i);a?e.addSignatureSecurityAlertResponse({...n,securityAlertId:r}):i.updateSecurityAlertResponse(c.id,{...n,securityAlertId:r})},r.validateRequestWithPPOM=async function({ppomController:e,request:t,securityAlertId:r,chainId:o,updateSecurityAlertResponse:s}){try{if(!await h(o))return void await s(t.method,r,i.SECURITY_ALERT_RESPONSE_CHAIN_NOT_SUPPORTED);await s(t.method,r,i.LOADING_SECURITY_ALERT_RESPONSE);const c=function(e){if(t=e,t.method!==l)return function(e){if((e.method===d||e.method===u)&&Array.isArray(e.params))return{...e,params:e.params.slice(0,2)};return e}(e);var t;const r=e.params[0],o=(0,n.normalizeTransactionParams)(r);return{...e,params:[o]}}(t),f=(0,a.isSecurityAlertsAPIEnabled)()?await async function(e,t,r){try{return{...await(0,a.validateWithSecurityAlertsAPI)(t,r),source:i.SecurityAlertSource.API}}catch(n){return p(n,"Error validating request with security alerts API"),await g(e,r,t)}}(e,o,c):await g(e,c,o);await s(t.method,r,f)}catch(e){await s(t.method,r,p(e,"Error validating JSON RPC using PPOM: "))}};var n=e("@metamask/transaction-controller"),o=e("uuid"),i=e("../../../../shared/constants/security-provider"),s=e("../../../../shared/constants/transaction"),a=e("./security-alerts-api");const{sentry:c}=global,l="eth_sendTransaction",u=r.METHOD_SIGN_TYPED_DATA_V3="eth_signTypedData_v3",d=r.METHOD_SIGN_TYPED_DATA_V4="eth_signTypedData_v4",f={result_type:i.BlockaidResultType.Errored,reason:i.BlockaidReason.errored};function p(e,t){const r=function(e){if("object"==typeof e||"string"==typeof e)return e;return JSON.stringify(e)}(e),n=function(e){if(e instanceof Error)return`${e.name}: ${e.message}`;return JSON.stringify(e)}(e);return null==c||c.captureException(e),console.error(t,r),{...f,description:n}}async function h(e){let t=i.SECURITY_PROVIDER_SUPPORTED_CHAIN_IDS_FALLBACK_LIST;try{(0,a.isSecurityAlertsAPIEnabled)()&&(t=await(0,a.getSecurityAlertsAPISupportedChainIds)())}catch(e){p(e,"Error fetching supported chains from security alerts API")}return t.includes(e)}async function g(e,t,r){return{...await e.usePPOM((e=>e.validateJsonRpc(t)),r),source:i.SecurityAlertSource.Local}}}}},{package:"$root$",file:"app/scripts/lib/ppom/ppom-util.ts"}],[96,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){let n;Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.PPOM=void 0,r.initSync=function(e){if(n!==undefined)return n;const t=A();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));const r=new WebAssembly.Instance(e,t);return S(r,e)},r.main=function(){n.main()};const o="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&o.decode();let i=null;function s(){return null!==i&&0!==i.byteLength||(i=new Uint8Array(n.memory.buffer)),i}function a(e,t){return e>>>=0,o.decode(s().subarray(e,e+t))}const c=new Array(128).fill(undefined);c.push(undefined,null,!0,!1);let l=c.length;function u(e){l===c.length&&c.push(c.length+1);const t=l;return l=c[t],c[t]=e,t}function d(e){return c[e]}function f(e){const t=d(e);return function(e){e<132||(c[e]=l,l=e)}(e),t}let p=0;const h="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},g="function"==typeof h.encodeInto?function(e,t){return h.encodeInto(e,t)}:function(e,t){const r=h.encode(e);return t.set(r),{read:e.length,written:r.length}};function m(e,t,r){if(r===undefined){const r=h.encode(e),n=t(r.length,1)>>>0;return s().subarray(n,n+r.length).set(r),p=r.length,n}let n=e.length,o=t(n,1)>>>0;const i=s();let a=0;for(;a127)break;i[o+a]=t}if(a!==n){0!==a&&(e=e.slice(a)),o=r(o,n,n=a+3*e.length,1)>>>0;const t=s().subarray(o+a,o+n);a+=g(e,t).written}return p=a,o}let b=null;function _(){return null!==b&&0!==b.byteLength||(b=new Int32Array(n.memory.buffer)),b}function y(e){const t=typeof e;if("number"==t||"boolean"==t||null==e)return`${e}`;if("string"==t)return`"${e}"`;if("symbol"==t){const t=e.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=e.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(e)){const t=e.length;let r="[";t>0&&(r+=y(e[0]));for(let n=1;n1))return toString.call(e);if(n=r[1],"Object"==n)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:n}function E(e,t,r){n.wasm_bindgen__convert__closures__invoke1_mut(e,t,u(r))}function w(e,t){n._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__destroy(e,t)}let v=null;function P(e,t){const r=t(4*e.length,4)>>>0,o=(null!==v&&0!==v.byteLength||(v=new Uint32Array(n.memory.buffer)),v);for(let t=0;t>>=0;const t=Object.create(T.prototype);return t.__wbg_ptr=e,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();n.__wbg_ppom_free(e)}static new(e,t){const r=P(t,n.__wbindgen_malloc),o=p;return f(n.ppom_new(u(e),r,o))}validateJsonRpc(e){return f(n.ppom_validateJsonRpc(this.__wbg_ptr,u(e)))}static version(){return f(n.ppom_version())}}function A(){const e={wbg:{}};return e.wbg.__wbg_buffer_085ec1f694018c4f=function(e){return u(d(e).buffer)},e.wbg.__wbg_call_01734de55d61e11d=function(){return O((function(e,t,r){return u(d(e).call(d(t),d(r)))}),arguments)},e.wbg.__wbg_call_4c92f6aec1e1d6e6=function(){return O((function(e,t,r,n){return u(d(e).call(d(t),d(r),d(n)))}),arguments)},e.wbg.__wbg_from_d7c216d4616bb368=function(e){return u(Array.from(d(e)))},e.wbg.__wbg_get_44be0491f933a435=function(e,t){return u(d(e)[t>>>0])},e.wbg.__wbg_length_72e2208bbc0efc61=function(e){return d(e).length},e.wbg.__wbg_length_d813e535247d427e=function(e){return d(e).length},e.wbg.__wbg_length_fff51ee6522a1a18=function(e){return d(e).length},e.wbg.__wbg_new_43f1b47c28813cbd=function(e,t){try{var r={a:e,b:t};const o=new Promise(((e,t)=>{const o=r.a;r.a=0;try{return function(e,t,r,o){n.wasm_bindgen__convert__closures__invoke2_mut(e,t,u(r),u(o))}(o,r.b,e,t)}finally{r.a=o}}));return u(o)}finally{r.a=r.b=0}},e.wbg.__wbg_new_8125e318e6245eed=function(e){return u(new Uint8Array(d(e)))},e.wbg.__wbg_parse_670c19d4e984792e=function(){return O((function(e,t){return u(JSON.parse(a(e,t)))}),arguments)},e.wbg.__wbg_ppom_new=function(e){return u(T.__wrap(e))},e.wbg.__wbg_resolve_53698b95aaf7fcf8=function(e){return u(Promise.resolve(d(e)))},e.wbg.__wbg_set_5cf90238115182c3=function(e,t,r){d(e).set(d(t),r>>>0)},e.wbg.__wbg_stringify_e25465938f3f611f=function(){return O((function(e){return u(JSON.stringify(d(e)))}),arguments)},e.wbg.__wbg_then_b2267541e2a73865=function(e,t,r){return u(d(e).then(d(t),d(r)))},e.wbg.__wbg_then_f7e06ee3c11698eb=function(e,t){return u(d(e).then(d(t)))},e.wbg.__wbindgen_cb_drop=function(e){const t=f(e).original;if(1==t.cnt--)return t.a=0,!0;return!1},e.wbg.__wbindgen_closure_wrapper_wasm_bindgen__closure__Closure_T___wrap__breaks_if_inlined=function(e,t,r){const n=function(e,t,r,n){const o={a:e,b:t,cnt:1},i=(...e)=>{o.cnt++;const t=o.a;o.a=0;try{return n(t,o.b,...e)}finally{0==--o.cnt?r(t,o.b):o.a=t}};return i.original=o,i}(e,t,w,E);return u(n)},e.wbg.__wbindgen_debug_string=function(e,t){const r=m(y(d(t)),n.__wbindgen_malloc,n.__wbindgen_realloc),o=p;_()[e/4+1]=o,_()[e/4+0]=r},e.wbg.__wbindgen_error_new=function(e,t){return u(new Error(a(e,t)))},e.wbg.__wbindgen_is_undefined=function(e){return d(e)===undefined},e.wbg.__wbindgen_memory=function(){return u(n.memory)},e.wbg.__wbindgen_object_drop_ref=function(e){f(e)},e.wbg.__wbindgen_string_get=function(e,t){const r=d(t),o="string"==typeof r?r:undefined;var i,s=(i=o)===undefined||null===i?0:m(o,n.__wbindgen_malloc,n.__wbindgen_realloc),a=p;_()[e/4+1]=a,_()[e/4+0]=s},e.wbg.__wbindgen_string_new=function(e,t){return u(a(e,t))},e.wbg.__wbindgen_throw=function(e,t){throw new Error(a(e,t))},e}function S(e,t){return n=e.exports,I.__wbindgen_wasm_module=t,b=null,v=null,i=null,n.__wbindgen_start(),n}async function I(e){if(n!==undefined)return n;const t=A();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:r,module:o}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}{const r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}(await e,t);return S(r,o)}r.PPOM=T;r.default=I}}},{package:"$root$",file:"app/scripts/lib/ppom/ppom.js"}],[97,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getSecurityAlertsAPISupportedChainIds=async function(){return i(o)},r.isSecurityAlertsAPIEnabled=function(){const e="true";return"true"===e.toString()},r.validateWithSecurityAlertsAPI=async function(e,t){return i(`${n}/${e}`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})};const n="validate",o="supportedChains";async function i(e,t){const r=function(e){const t="https://security-alerts.api.cx.metamask.io";if(!t)throw new Error("Security alerts API URL is not set");return`${t}/${e}`}(e),n=await fetch(r,t);if(!n.ok)throw new Error(`Security alerts API request failed with status: ${n.status}`);return await n.json()}}}},{package:"$root$",file:"app/scripts/lib/ppom/security-alerts-api.ts"}],[98,{"./handlers":104,"@metamask/permission-controller":2133,"@metamask/rpc-errors":2304,"@metamask/snaps-rpc-methods":2479,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createMethodMiddleware=r.createLegacyMethodMiddleware=void 0;var n=e("@metamask/permission-controller"),o=e("@metamask/rpc-errors"),i=e("@metamask/snaps-rpc-methods"),s=e("@metamask/utils"),a=e("./handlers");const c=[...a.handlers,...n.permissionRpcMethods.handlers];r.createMethodMiddleware=l(c),r.createLegacyMethodMiddleware=l(a.legacyHandlers);function l(e){const t=e.reduce(((e,t)=>{for(const r of t.methodNames)e[r]=t;return e}),{}),r=new Set(e.flatMap((({hookNames:e})=>Object.getOwnPropertyNames(e))));return e=>{!function(e,t){const r=[];if(t.forEach((t=>{(0,s.hasProperty)(e,t)||r.push(t)})),r.length>0)throw new Error(`Missing expected hooks:\n\n${r.join("\n")}\n`);const n=Object.getOwnPropertyNames(e).filter((e=>!t.has(e)));if(n.length>0)throw new Error(`Received unexpected hooks:\n\n${n.join("\n")}\n`)}(e,r);return async(r,n,s,a)=>{const c=t[r.method];if(c){const{implementation:t,hookNames:l}=c;try{return await t(r,n,s,a,(0,i.selectHooks)(e,l))}catch(e){return a(e instanceof Error?e:o.rpcErrors.internal({data:e}))}}return s()}}}}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/createMethodMiddleware.js"}],[99,{"../../../../shared/constants/network":5264,"@metamask/rpc-errors":2304},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createUnsupportedMethodMiddleware=function(){return async function(e,t,r,i){return o.UNSUPPORTED_RPC_METHODS.has(e.method)?i(n.rpcErrors.methodNotSupported()):r()}};var n=e("@metamask/rpc-errors"),o=e("../../../../shared/constants/network")}}},{package:"$root$",file:"app/scripts/lib/rpc-method-middleware/createUnsupportedMethodMiddleware.ts"}],[4,{"../../shared/constants/app":5248,"../../shared/constants/metametrics":5260,"../../shared/constants/offscreen-communication":5266,"../../shared/modules/add-nonce-to-csp":5295,"../../shared/modules/browser-runtime.utils":5297,"../../shared/modules/mv3.utils":5310,"../../shared/modules/object.utils":5312,"../../shared/modules/provider-injection":5313,"../../shared/modules/selectors/networks":5320,"../../test/e2e/background-socket/socket-background-to-mocha":5331,"../../test/e2e/default-fixture":5333,"../../test/stub/keyring-bridge":5339,"./constants/marketing-site-whitelist":6,"./constants/sentry-state":7,"./first-time-state":41,"./fixtures/generate-wallet-state":42,"./lib/createStreamSink":70,"./lib/ens-ipfs/setup":77,"./lib/get-first-preferred-lang-code":79,"./lib/getObjStructure":80,"./lib/local-store":82,"./lib/migrator":86,"./lib/network-store":88,"./lib/notification-manager":89,"./lib/setup-initial-state-hooks":114,"./lib/util":135,"./metamask-controller":136,"./migrations":289,"./offscreen":290,"./platforms/extension":291,"@metamask/controller-utils":1422,"@metamask/notification-services-controller":2115,"@metamask/obs-store":2126,"@metamask/rpc-errors":2304,"@metamask/snaps-rpc-methods":2479,"@metamask/utils":2761,"debounce-stream":3702,events:3868,"extension-port-stream":3871,loglevel:4386,"readable-stream":4791,"webextension-polyfill":5225},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loadStateFromPersistence=ve,r.setupController=Te,r.statePersistenceEvents=void 0,e("./lib/setup-initial-state-hooks");var n=H(e("events")),o=e("readable-stream"),i=H(e("debounce-stream")),s=H(e("loglevel")),a=H(e("webextension-polyfill")),c=e("@metamask/obs-store"),l=e("@metamask/utils"),u=e("@metamask/controller-utils"),d=H(e("extension-port-stream")),f=e("@metamask/rpc-errors"),p=e("@metamask/snaps-rpc-methods"),h=e("@metamask/notification-services-controller"),g=e("../../shared/constants/app"),m=e("../../shared/constants/metametrics"),b=e("../../shared/modules/browser-runtime.utils"),_=e("../../shared/modules/mv3.utils"),y=e("../../shared/modules/object.utils"),E=(e("../../test/e2e/default-fixture"),e("../../test/e2e/background-socket/socket-background-to-mocha"),e("../../shared/constants/offscreen-communication"),e("../../test/stub/keyring-bridge")),w=e("../../shared/modules/selectors/networks"),v=e("../../shared/modules/add-nonce-to-csp"),P=e("../../shared/modules/provider-injection"),O=H(e("./migrations")),T=H(e("./lib/migrator")),A=H(e("./platforms/extension")),S=H(e("./lib/local-store")),I=H(e("./lib/network-store")),C=e("./constants/sentry-state"),N=H(e("./lib/createStreamSink")),x=q(e("./lib/notification-manager")),R=q(e("./metamask-controller")),k=H(e("./first-time-state")),j=H(e("./lib/get-first-preferred-lang-code")),L=H(e("./lib/getObjStructure")),M=H(e("./lib/ens-ipfs/setup")),D=e("./lib/util"),U=(e("./fixtures/generate-wallet-state"),e("./offscreen")),B=e("./constants/marketing-site-whitelist");function F(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(F=function(e){return e?r:t})(e)}function q(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=F(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function H(e){return e&&e.__esModule?e:{default:e}}const G="#0376C9",V="#D73847",$=9,z=!1,K=z?new I.default:new S.default;global.stateHooks.getMostRecentPersistedState=()=>K.mostRecentRetrievedState;const{sentry:Y}=global;let W={...k.default};const X={[g.ENVIRONMENT_TYPE_POPUP]:!0,[g.ENVIRONMENT_TYPE_NOTIFICATION]:!0,[g.ENVIRONMENT_TYPE_FULLSCREEN]:!0},J=["trezor-connect"];s.default.setLevel("info",!1);const Z=new A.default,Q=new x.default;let ee=0,te=!1,re=!1;const ne={},oe={};let ie,se;const ae={};z&&(global.stateHooks.metamaskGetState=K.get.bind(K));const ce=new URL("https://metamask.github.io/phishing-warning/v4.1.0/"),le=ce.toString(),ue=1e3,de=r.statePersistenceEvents=new n.default,{promise:fe,resolve:pe,reject:he}=(0,D.deferredPromise)(),ge=async()=>{const e=await a.default.tabs.query({url:"",windowType:"normal"}).then((e=>((0,b.checkForLastErrorAndLog)(),e))).catch((()=>{(0,b.checkForLastErrorAndLog)()}));for(const t of e)a.default.tabs.sendMessage(t.id,{name:g.EXTENSION_MESSAGES.READY}).then((()=>{(0,b.checkForLastErrorAndLog)()})).catch((()=>{(0,b.checkForLastErrorAndLog)()}))};let me,be,_e;function ye(){const e=(new Date).toISOString();console.log("saving this timestamp so bg.js doesnt sleep ",e),a.default.storage.session.set({timestamp:e})}async function Ee(){console.log("mm bg.js initialize called");try{console.log("mm bg.js loadStateFromPersistence called");const t=await ve();console.log("mm bg.js createOffscreen called");const r=_.isManifestV3?(0,U.createOffscreen)():null,n=t.data,o=await(0,j.default)();let i;if(_.isManifestV3){var e;if(!1!==(null===(e=n.PreferencesController)||void 0===e?void 0:e.enableMV3TimestampSave)){const e=2e3;ye(),console.log("setting interval for save timestamp"),setInterval(ye,e)}console.log("mm bg.js sessionData get called");const t=await a.default.storage.session.get(["isFirstMetaMaskControllerSetup"]);i=(null==t?void 0:t.isFirstMetaMaskControllerSetup)===undefined,await a.default.storage.session.set({isFirstMetaMaskControllerSetup:i})}const c=z?{keyrings:{trezorBridge:E.FakeTrezorBridge,ledgerBridge:E.FakeLedgerBridge}}:{};console.log("mm bg.js setupController get called"),Te(n,o,c,i,t.meta,r),console.log("mm bg.js maybeDetectPhishing get called"),function(e){async function t(e,t){try{return await a.default.tabs.update(e,{url:t})}catch(e){return null==Y?void 0:Y.captureException(e)}}const r=!_.isManifestV3;a.default.webRequest.onBeforeRequest.addListener((n=>{var o,i,s;if(n.tabId===a.default.tabs.TAB_ID_NONE)return{};const{completedOnboarding:c}=e.onboardingController.state;if(!c)return{};if(!e.preferencesController.state.usePhishDetect)return{};if(n.initiator&&new URL(n.initiator).host===ce.host)return{};const{hostname:l,href:u,searchParams:d}=new URL(n.url);if(z&&d.has("IN_TEST_BYPASS_EARLY_PHISHING_DETECTION"))return{};e.phishingController.maybeUpdateState();const f=e.phishingController.isBlockedRequest(n.url);let p,h;if("main_frame"!==n.type&&"sub_frame"!==n.type||(p=e.phishingController.test(n.url)),!(null!==(o=p)&&void 0!==o&&o.result||f.result))return{};let g=l;null!==(i=p)&&void 0!==i&&i.result&&f.result?h=`${p.type} and ${f.type}`:null!==(s=p)&&void 0!==s&&s.result?h=p.type:(h=f.type,g=n.initiator),e.metaMetricsController.trackEvent({event:m.MetaMetricsEventName.PhishingPageDisplayed,category:m.MetaMetricsEventCategory.Phishing,properties:{url:g,referrer:{url:g},reason:h,requestDomain:f.result?l:undefined}});const b=new URLSearchParams({hostname:l,href:u}),_=new URL(le);_.hash=b.toString();const y=_.toString();return r?"main_frame"===n.type?{redirectUrl:y}:(t(n.tabId,y),{cancel:!0}):(t(n.tabId,y),{})}),{urls:["http://*/*","https://*/*","ws://*/*","wss://*/*"]},r?["blocking"]:[])}(ie),_.isManifestV3||(await async function(){let e;try{const t=new URL(le);let r,n;t.hash="#extensionStartup",e=window.document.createElement("iframe"),e.setAttribute("src",t.href),e.setAttribute("sandbox","allow-scripts allow-same-origin");const o=new Promise(((e,t)=>{r=e,n=t}));e.addEventListener("load",r),window.document.body.appendChild(e),setTimeout((()=>n(new we)),ue),await o}catch(e){e instanceof we?console.warn("Phishing warning page timeout; page not guaranteed to work offline."):console.error("Failed to initialize phishing warning page",e)}finally{e&&e.remove()}}(),(0,D.getPlatform)()===g.PLATFORM_FIREFOX&&function(){const e=btoa(a.default.runtime.getURL("/"));a.default.webRequest.onHeadersReceived.addListener((({responseHeaders:t,url:r})=>{const n=(0,P.checkURLForProviderInjection)(new URL(r)),o=ie.preferencesController.state.overrideContentSecurityPolicyHeader;if(n&&o)for(const r of t)"content-security-policy"===r.name.toLowerCase()&&(r.value=(0,v.addNonceToCsp)(r.value,e));return{responseHeaders:t}}),{types:["main_frame","sub_frame"],urls:["http://*/*","https://*/*"]},["blocking","responseHeaders"])}()),console.log("mm bg.js sendReadyMessageToTabs get called"),await ge(),s.default.info("MetaMask initialization complete."),console.log("mm bg.js resolveInitialization get called"),pe()}catch(e){he(e)}}console.log("browser.runtime.onConnect.addListener called at ",Date.now()),a.default.runtime.onConnect.addListener((async(...e)=>{console.log("mm bg.js queing up conn attempt ",e),await fe,console.log("mm bg.js connectRemote with ",e),me(...e)})),console.log("browser.runtime.onConnectExternal.addListener ",Date.now()),a.default.runtime.onConnectExternal.addListener((async(...e)=>{var t;console.log("mm bg.js queing up conn ext attempt ",e),await fe,console.log("mm bg.js onConnectExternal isInitialized with ",e);null!==(t=e[0].sender.tab)&&void 0!==t&&t.id,console.log("mm bg.js onConnectExternal connectExternalExtension ",e),be(...e)}));class we extends Error{constructor(){super("Timeout failed")}}async function ve(){const e=new T.default({migrations:O.default,defaultVersion:null});if(e.on("error",console.warn),se=await K.get()||e.generateInitialState(W),se&&!se.data&&(se=e.generateInitialState(W),Y.captureMessage("MetaMask - Empty vault found - unable to recover")),e.on("error",(e=>{const t=(0,L.default)(se);Y.captureException(e,{extra:{vaultStructure:t}})})),se=await e.migrateData(se),!se)throw new Error("MetaMask - migrator returned undefined");if(!(0,l.isObject)(se.meta))throw new Error(`MetaMask - migrator metadata has invalid type '${typeof se.meta}'`);if("number"!=typeof se.meta.version)throw new Error(`MetaMask - migrator metadata version has invalid type '${typeof se.meta.version}'`);if(!(0,l.isObject)(se.data))throw new Error(`MetaMask - migrator data has invalid type '${typeof se.data}'`);return K.setMetadata(se.meta),K.set(se.data),se}function Pe(e){var t;const{metaMetricsId:r}=ie.metaMetricsController.state;if(!(0,D.shouldEmitDappViewedEvent)(r))return;const n=ie.controllerMessenger.call("PermissionController:getPermissions",e),o=null==n||null===(t=n.eth_accounts)||void 0===t||null===(t=t.caveats[0])||void 0===t?void 0:t.value.length;if(!o)return;const i=ie.controllerMessenger.call("PreferencesController:getState"),s=Object.keys(i.identities).length;ie.metaMetricsController.trackEvent({event:m.MetaMetricsEventName.DappViewed,category:m.MetaMetricsEventCategory.InpageProvider,referrer:{url:e},properties:{is_first_visit:!1,number_of_accounts:s,number_of_accounts_connected:o}})}function Oe(e){if(!e.sender||!e.sender.tab||!e.sender.url)return;const t=e.sender.tab.id,r=new URL(e.sender.url),{origin:n}=r;Object.keys(ae).includes(t)||(ae[t]=n);const o=ie.controllerMessenger.call("PermissionController:hasPermissions",n),i="New Tab"!==e.sender.tab.title;o&&i&&Pe(n)}function Te(e,t,r,n,l,b){var E;ie=new R.default({infuraProjectId:"b6bf7d3508c941499b10025c0776eaf8",showUserConfirmation:Ae,initState:e,initLangCode:t,platform:Z,notificationManager:Q,browser:a.default,getRequestAccountTabIds:()=>oe,getOpenMetamaskTabsIds:()=>ne,localStore:K,overrides:r,isFirstMetaMaskControllerSetup:n,currentMigrationVersion:l.version,featureFlags:{},offscreenPromise:b}),(0,M.default)({getCurrentChainId:()=>(0,w.getCurrentChainId)({metamask:ie.networkController.state}),getIpfsGateway:ie.preferencesController.getIpfsGateway.bind(ie.preferencesController),getUseAddressBarEnsResolution:()=>ie.preferencesController.state.useAddressBarEnsResolution,provider:ie.provider}),(0,o.pipeline)((0,c.storeAsStream)(ie.store),(0,i.default)(1e3),(0,N.default)((async e=>{await K.set(e),de.emit("state-persisted",e)})),(e=>{s.default.error("MetaMask - Persistence pipeline failed",e)})),E=ie,global.stateHooks.getSentryAppState=function(){const e=E.memStore.getState();return(0,y.maskObject)(e,C.SENTRY_BACKGROUND_STATE)};const v=()=>ee>0||Boolean(Object.keys(ne).length)||te,P=(e,t)=>{if(!1===e)ie.onClientClosed();else{if(t===g.ENVIRONMENT_TYPE_FULLSCREEN&&Boolean(Object.keys(ne).length))return;ie.onEnvironmentTypeClosed(t)}};function O(e,t){return e>t?`${t}+`:String(e)}function T(){const e=A(),t=function(){try{const{isNotificationServicesEnabled:e,isFeatureAnnouncementsEnabled:t}=ie.notificationServicesController.state,r=Object.values(ie.notificationServicesController.state.metamaskNotificationsList).filter((e=>e.type===h.NotificationServicesController.Constants.TRIGGER_TYPES.SNAP&&null===e.readDate)).length,n=t?ie.notificationServicesController.state.metamaskNotificationsList.filter((e=>!e.isRead&&e.type===h.NotificationServicesController.Constants.TRIGGER_TYPES.FEATURES_ANNOUNCEMENT)).length:0,o=e?ie.notificationServicesController.state.metamaskNotificationsList.filter((e=>!e.isRead&&e.type!==h.NotificationServicesController.Constants.TRIGGER_TYPES.FEATURES_ANNOUNCEMENT&&e.type!==h.NotificationServicesController.Constants.TRIGGER_TYPES.SNAP)).length:0;return r+n+o}catch(e){return console.error("Failed to get unread notifications count:",e),0}}();let r="",n=G;e?r=O(e,$):t>0&&(r=O(t,$),n=V);try{const e={text:r},t={color:n};_.isManifestV3?(a.default.action.setBadgeText(e),a.default.action.setBadgeBackgroundColor(t)):(a.default.browserAction.setBadgeText(e),a.default.browserAction.setBadgeBackgroundColor(t))}catch(e){console.error("Error updating browser badge:",e)}}function A(){try{let e=ie.appStateController.waitingForUnlock.length+ie.approvalController.getTotalApprovalCount();return ie.preferencesController.getUseRequestQueue()&&(e+=ie.queuedRequestController.state.queuedRequestCount),e}catch(e){return console.error("Failed to get pending approval count:",e),0}}me=async e=>{var t;const n=e.name;if(J.includes(e.name))return;let i=!1;const s=(0,D.getPlatform)(),c=null!==(t=e.sender)&&void 0!==t&&t.url?new URL(e.sender.url):null;if(i=s===g.PLATFORM_FIREFOX?X[n]:(null==c?void 0:c.origin)===`chrome-extension://${a.default.runtime.id}`,console.log("isMetaMaskInternalProcess ",i),i){var l;const t=(null==r||null===(l=r.getPortStream)||void 0===l?void 0:l.call(r,e))||new d.default(e);if(ie.isClientOpen=!0,ie.setupTrustedCommunication(t,e.sender),n===g.ENVIRONMENT_TYPE_POPUP&&(ee+=1,(0,o.finished)(t,(()=>{ee-=1;const e=v();ie.isClientOpen=e,P(e,g.ENVIRONMENT_TYPE_POPUP)}))),n===g.ENVIRONMENT_TYPE_NOTIFICATION&&(te=!0,(0,o.finished)(t,(()=>{te=!1;const e=v();ie.isClientOpen=e,P(e,g.ENVIRONMENT_TYPE_NOTIFICATION)}))),n===g.ENVIRONMENT_TYPE_FULLSCREEN){const r=e.sender.tab.id;ne[r]=!0,(0,o.finished)(t,(()=>{delete ne[r];const e=v();ie.isClientOpen=e,P(e,g.ENVIRONMENT_TYPE_FULLSCREEN)}))}}else if(c&&c.origin===ce.origin&&c.pathname===ce.pathname){var u;const t=(null==r||null===(u=r.getPortStream)||void 0===u?void 0:u.call(r,e))||new d.default(e);ie.setupPhishingCommunication({connectionStream:t})}else{if(e.sender&&e.sender.tab&&e.sender.url){const t=e.sender.tab.id,r=new URL(e.sender.url),{origin:n}=r;Oe(e),e.onMessage.addListener((e=>{e.data&&e.data.method===g.MESSAGE_TYPE.ETH_REQUEST_ACCOUNTS&&(oe[n]=t)}))}if(c&&B.COOKIE_ID_MARKETING_WHITELIST_ORIGINS.some((e=>e===c.origin))){var f;const t=(null==r||null===(f=r.getPortStream)||void 0===f?void 0:f.call(r,e))||new d.default(e);ie.setUpCookieHandlerCommunication({connectionStream:t})}be(e)}},be=e=>{var t;const n=(null==r||null===(t=r.getPortStream)||void 0===t?void 0:t.call(r,e))||new d.default(e);ie.setupUntrustedCommunicationEip1193({connectionStream:n,sender:e.sender})},_e=async e=>{var t;if(J.includes(e.name))return;e.sender&&e.sender.tab&&e.sender.url&&Oe(e);const n=(null==r||null===(t=r.getPortStream)||void 0===t?void 0:t.call(r,e))||new d.default(e);ie.setupUntrustedCommunicationCaip({connectionStream:n,sender:e.sender})},null!=r&&r.registerConnectListeners&&r.registerConnectListeners(me,be),T(),ie.decryptMessageController.hub.on(R.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE,T),ie.encryptionPublicKeyController.hub.on(R.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE,T),ie.signatureController.hub.on(R.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE,T),ie.appStateController.on(R.METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE,T),ie.controllerMessenger.subscribe(R.METAMASK_CONTROLLER_EVENTS.APPROVAL_STATE_CHANGE,T),ie.controllerMessenger.subscribe(R.METAMASK_CONTROLLER_EVENTS.QUEUED_REQUEST_STATE_CHANGE,T),ie.controllerMessenger.subscribe(R.METAMASK_CONTROLLER_EVENTS.METAMASK_NOTIFICATIONS_LIST_UPDATED,T),ie.controllerMessenger.subscribe(R.METAMASK_CONTROLLER_EVENTS.METAMASK_NOTIFICATIONS_MARK_AS_READ,T),Q.on(x.NOTIFICATION_MANAGER_EVENTS.POPUP_CLOSED,(({automaticallyClosed:e})=>{e?A()>0&&Ae():(ie.signatureController.rejectUnapproved(m.REJECT_NOTIFICATION_CLOSE_SIG),ie.decryptMessageController.rejectUnapproved(m.REJECT_NOTIFICATION_CLOSE),ie.encryptionPublicKeyController.rejectUnapproved(m.REJECT_NOTIFICATION_CLOSE),Object.values(ie.approvalController.state.pendingApprovals).forEach((({id:e,type:t})=>{switch(t){case u.ApprovalType.SnapDialogAlert:case u.ApprovalType.SnapDialogPrompt:case p.DIALOG_APPROVAL_TYPES.default:ie.approvalController.accept(e,null);break;case u.ApprovalType.SnapDialogConfirmation:case g.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.confirmAccountCreation:case g.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.confirmAccountRemoval:case g.SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.showSnapAccountRedirect:ie.approvalController.accept(e,!1);break;default:ie.approvalController.reject(e,f.providerErrors.userRejectedRequest())}}))),T()})),Object.values(ie.snapController.state.snaps).some((e=>!e.preinstalled))&&ie.snapController.updateBlockedSnaps()}async function Ae(){const e=await Z.getActiveTabs(),t=Boolean(e.find((e=>ne[e.id]))),r=e.length>0&&e[0].extData&&e[0].extData.indexOf("vivaldi_tab")>-1;if(!re&&(r||0===ee)&&!t){re=!0;try{const e=ie.appStateController.getCurrentPopupId();await Q.showPopup((e=>ie.appStateController.setCurrentPopupId(e)),e)}finally{re=!1}}}const Se=()=>{if(ie)return ie.metaMetricsController.updateTraits({[m.MetaMetricsUserTrait.InstallDateExt]:(new Date).toISOString().split("T")[0]}),void ie.metaMetricsController.addEventBeforeMetricsOptIn({category:m.MetaMetricsEventCategory.App,event:m.MetaMetricsEventName.AppInstalled,properties:{}});setTimeout((()=>{Se()}),500)};async function Ie(){Boolean(await K.get())||(Se(),Z.openExtensionInBrowser()),a.default.tabs.onActivated.addListener((e=>{if(ie){const{tabId:t}=e,r=ae[t];r&&ie.permissionController.state.subjects[r]!==undefined&&Pe(r)}}))}(async function(){console.log("mm bg.js init background called"),await Ie();try{await Ee(),K.cleanUpMostRecentRetrievedState()}catch(e){s.default.error(e)}})()}}},{package:"$root$",file:"app/scripts/background.js"}]],[4],{}); \ No newline at end of file diff --git a/public/extensions/MetaMask_v10.22.2/common-0.js b/public/extensions/MetaMask_v10.22.2/common-0.js index 289dd8eea..c87c4aeb0 100644 --- a/public/extensions/MetaMask_v10.22.2/common-0.js +++ b/public/extensions/MetaMask_v10.22.2/common-0.js @@ -1 +1 @@ -LavaPack.loadBundle([[113,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.filterEvents=function({getMetaMetricsEnabled:e,log:t}){return{name:s,processEvent:async r=>await e()?r:(t("Event dropped as metrics disabled"),null)}};const s="FilterEvents"}}},{package:"$root$",file:"app/scripts/lib/sentry-filter-events.ts"}],[114,{"../../../shared/modules/object.utils":5312,"../constants/sentry-state":7,"../platforms/extension":291,"./local-store":82,"./network-store":88},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=e("../../../shared/modules/object.utils"),n=i(e("../platforms/extension")),a=e("../constants/sentry-state"),o=i(e("./local-store"));i(e("./network-store"));function i(e){return e&&e.__esModule?e:{default:e}}const c=new n.default,l=new o.default;globalThis.stateHooks.getPersistedState=async function(){return await l.get()};const u={data:a.SENTRY_BACKGROUND_STATE,meta:{version:!0}};globalThis.stateHooks.getSentryState=function(){const e={browser:window.navigator.userAgent,version:c.getVersion()};if(globalThis.stateHooks.getSentryAppState)return l.cleanUpMostRecentRetrievedState(),{...e,state:globalThis.stateHooks.getSentryAppState()};if(l.mostRecentRetrievedState||globalThis.stateHooks.getMostRecentPersistedState){const t=l.mostRecentRetrievedState||globalThis.stateHooks.getMostRecentPersistedState();if(t)return{...e,persistedState:(0,s.maskObject)(t,u)}}return e}}}},{package:"$root$",file:"app/scripts/lib/setup-initial-state-hooks.js"}],[115,{"../../../shared/modules/mv3.utils":5310,"./extractEthjsErrorMessage":78,"./manifestFlags":83,"./sentry-filter-events":113,"@metamask/utils":2761,"@sentry/browser":2871,"@sentry/utils":2991,"webextension-polyfill":5225},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERROR_URL_ALLOWLIST=void 0,r.beforeBreadcrumb=D,r.default=function(){if(!E)throw new Error("Missing release");if(!I())return p("Skipped initialization"),undefined;return p("Initializing"),function(){if(!y)return;for(const e of["log","error"])a.logger[e]=(...t)=>{const r=t[0].replace(`Sentry Logger [${e}]: `,"");g(r,...t.slice(1))};p("Integrated logging")}(),function(){const e=function(){const e=function(){if("main"===b)return k;return`${k}-${b}`}(),t=I();return{beforeBreadcrumb:D(),beforeSend:e=>O(e),debug:y,dist:i.isManifestV3?"mv3":"mv2",dsn:t,environment:e,integrations:[n.dedupeIntegration(),n.extraErrorDataIntegration(),n.browserTracingIntegration({shouldCreateSpanForRequest:e=>!e.match(/^https?:\/\/([\w\d.@-]+\.)?sentry\.io(\/|$)/u)}),(0,u.filterEvents)({getMetaMetricsEnabled:B,log:p})],release:E,sendClientReports:!1,tracesSampleRate:x(t),transport:L}}(),{dsn:t,environment:r,release:s,tracesSampleRate:a}=e;globalThis.nw={},globalThis.history??(globalThis.history={}),p("Updating client",{environment:r,dsn:t,release:s,tracesSampleRate:a}),n.registerSpanErrorInstrumentation(),n.init(e),function(){const{circleci:e}=(0,l.getManifestFlags)();null!=e&&e.enabled&&(n.setTag("circleci.enabled",e.enabled),n.setTag("circleci.branch",e.branch),n.setTag("circleci.buildNum",e.buildNum),n.setTag("circleci.job",e.job),n.setTag("circleci.nodeIndex",e.nodeIndex),n.setTag("circleci.prNumber",e.prNumber))}(),function(){if(!y)return;const e=n.getClient();null==e||e.on("beforeEnvelope",(e=>{(function(e){var t,r;const s=null==e||null===(t=e[1])||void 0===t||null===(t=t[0])||void 0===t||null===(t=t[0])||void 0===t?void 0:t.type,n=(null==e||null===(r=e[1])||void 0===r||null===(r=r[0])||void 0===r?void 0:r[1])??{};return"session"===s&&"exited"===n.status})(e)&&p("Completed session",e)})),null==e||e.on("afterSendEvent",(e=>{const t=function(e){if("transaction"===e.type)return"Trace";if("error"===e.level)return"Error";return"Event"}(e);p(t,e)})),p("Added debug listeners")}()}(),{...n,getMetaMetricsEnabled:B}},r.log=void 0,r.removeUrlsFromBreadCrumb=N,r.rewriteReport=O;var s=e("@metamask/utils"),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(s,a,o):s[a]=e[a]}return s.default=e,r&&r.set(e,s),s}(e("@sentry/browser")),a=e("@sentry/utils"),o=d(e("webextension-polyfill")),i=e("../../../shared/modules/mv3.utils"),c=d(e("./extractEthjsErrorMessage")),l=e("./manifestFlags"),u=e("./sentry-filter-events");function d(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}const f=(0,s.createProjectLogger)("sentry");let h="unknown";const p=r.log=(0,s.createModuleLogger)(f,globalThis.document?"ui":"background"),g=(0,s.createModuleLogger)(p,"internal"),b="main",y=!1,k="other",E="12.9.3",C="https://24a3ef3399ee2049b00f92c1399c9be1@o4505435504377856.ingest.us.sentry.io/4507177964208128",A="https://24a3ef3399ee2049b00f92c1399c9be1@o4505435504377856.ingest.us.sentry.io/4507177964208128",S="",w="https://fake@sentry.io/0000000",v=r.ERROR_URL_ALLOWLIST={CRYPTOCOMPARE:"cryptocompare.com",COINGECKO:"coingecko.com",ETHERSCAN:"etherscan.io",CODEFI:"codefi.network",SEGMENT:"segment.io"};function x(e){var t;if(e===w)return 1;const r=(0,l.getManifestFlags)();return(null===(t=r.sentry)||void 0===t?void 0:t.tracesSampleRate)!==undefined?r.sentry.tracesSampleRate:r.circleci?"develop"===r.circleci.branch?.015:0:y?1:.01}function T(e){return e.persistedState?_(e.persistedState):!!e.state&&(e.state.metamask?Boolean(e.state.metamask.participateInMetaMetrics):Boolean(null===(t=e.state.MetaMetricsController)||void 0===t?void 0:t.participateInMetaMetrics));var t}function _(e){var t;return Boolean(null==e||null===(t=e.data)||void 0===t||null===(t=t.MetaMetricsController)||void 0===t?void 0:t.participateInMetaMetrics)}function j(e){return e.persistedState?R(e.persistedState):!!e.state&&(e.state.metamask?Boolean(e.state.metamask.completedOnboarding):Boolean(null===(t=e.state.OnboardingController)||void 0===t?void 0:t.completedOnboarding));var t}function R(e){var t;return Boolean(null===(t=e.data)||void 0===t||null===(t=t.OnboardingController)||void 0===t?void 0:t.completedOnboarding)}function I(){if("production"!==k)return A;if("mmi"===b)return S;if(!C)throw new Error("Missing SENTRY_DSN environment variable in production environment");return C}async function B(){const e=(0,l.getManifestFlags)();if("mmi"===b||e.circleci&&e.sentry.forceEnable)return!0;const t=J();if(t.state||t.persistedState)return T(t)&&j(t);try{const e=await globalThis.stateHooks.getPersistedState();return _(e)&&R(e)}catch(e){return p("Error retrieving persisted state",e),!1}}function P(e){return e.match(/^(chrome-extension|moz-extension):\/\//u)?e:""}function D(){return e=>{if(!J)return null;const t=J();if(!T(t)||!j(t)||"ui.input"===(null==e?void 0:e.category))return null;return N(e)}}function N(e){var t,r,s;return null!=e&&null!==(t=e.data)&&void 0!==t&&t.url&&(e.data.url=P(e.data.url)),null!=e&&null!==(r=e.data)&&void 0!==r&&r.to&&(e.data.to=P(e.data.to)),null!=e&&null!==(s=e.data)&&void 0!==s&&s.from&&(e.data.from=P(e.data.from)),e}function O(e){try{var t;!function(e){F(e,(e=>{let t=(0,c.default)(e);return 0===t.indexOf("Transaction Failed: known transaction")&&(t="Transaction Failed: known transaction"),t}))}(e),function(e){F(e,(e=>{let t=e;const r=/(([-.+a-zA-Z]+:\/\/)|(www\.))\S+[@:.]\S+/gu;return(t.match(r)||[]).forEach((e=>{try{const r=new URL(e),{hostname:s}=r;Object.values(v).some((e=>s===e||s.endsWith(`.${e}`)))||(t=t.replace(e,"**"))}catch(r){t=t.replace(e,"**")}})),t}))}(e),function(e){F(e,(e=>e.replace(/0x[A-Fa-f0-9]{40}/u,"0x**")))}(e),function(e){var t;null!==(t=e.request)&&void 0!==t&&t.url&&(e.request.url=M(e.request.url));e.exception&&e.exception.values&&e.exception.values.forEach((e=>{e.stacktrace&&e.stacktrace.frames.forEach((e=>{e.filename=M(e.filename)}))}))}(e);const r=J();e.extra||(e.extra={}),e.tags||(e.tags={}),Object.assign(e.extra,{appState:r,installType:h,extensionId:null===(t=o.default.runtime)||void 0===t?void 0:t.id}),e.tags.installType=h}catch(e){p("Error rewriting report",e)}return e}function F(e,t){"string"==typeof e.message&&(e.message=t(e.message)),e.exception&&e.exception.values&&e.exception.values.forEach((e=>{"string"==typeof e.value&&(e.value=t(e.value))}))}function M(e){var t;if(null===(t=globalThis.location)||void 0===t||!t.origin)return e;const r=null==e?void 0:e.split(globalThis.location.origin)[1];if(!r)return e;return`/metamask${r}`}function J(){var e,t;return(null===(e=globalThis.stateHooks)||void 0===e||null===(t=e.getSentryState)||void 0===t?void 0:t.call(e))||{}}function L(e){return n.makeFetchTransport(e,(async(...e)=>{if(!await B())throw new Error("Network request skipped as metrics disabled");return await fetch(...e)}))}}}},{package:"$root$",file:"app/scripts/lib/setupSentry.js"}],[124,{"../../../shared/constants/app":5248,"@metamask/object-multiplex":2121,"readable-stream":4791},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isStreamWritable=function(e){var t;return Boolean(e.writable&&!e.destroyed&&!(null!==(t=e._writableState)&&void 0!==t&&t.ended))},r.setupMultiplex=function(e){const t=new n.default;return t.ignoreStream(o.EXTENSION_MESSAGES.CONNECTION_READY),(0,a.pipeline)(e,t,e,(e=>{var t;!e||null!==(t=e.message)&&void 0!==t&&t.match("Premature close")||console.error(e)})),t};var s,n=(s=e("@metamask/object-multiplex"))&&s.__esModule?s:{default:s},a=e("readable-stream"),o=e("../../../shared/constants/app")}}},{package:"$root$",file:"app/scripts/lib/stream-utils.js"}],[1305,{"./errors":1306,"./packer":1309,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.decodeSingle=r.decode=r.encodePacked=r.encodeSingle=r.encode=void 0;const s=e("@metamask/utils"),n=e("./errors"),a=e("./packer");r.encode=(e,t,r,s)=>{try{return(0,a.pack)({types:e,values:t,packed:r,tight:s})}catch(e){if(e instanceof n.ParserError)throw new n.ParserError(`Unable to encode value: ${e.message}`,e);throw new n.ParserError(`An unexpected error occurred: ${(0,n.getErrorMessage)(e)}`,e)}};r.encodeSingle=(e,t)=>(0,r.encode)([e],[t]);r.encodePacked=(e,t,s)=>(0,r.encode)(e,t,!0,s);r.decode=(e,t)=>{const r=(0,s.createBytes)(t);try{return(0,a.unpack)(e,r)}catch(e){if(e instanceof n.ParserError)throw new n.ParserError(`Unable to decode value: ${e.message}`,e);throw new n.ParserError(`An unexpected error occurred: ${(0,n.getErrorMessage)(e)}`,e)}};r.decodeSingle=(e,t)=>{const a=(0,r.decode)([e],t);return(0,s.assert)(1===a.length,new n.ParserError("Decoded value array has unexpected length.")),a[0]}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/abi.js"}],[1306,{"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ParserError=r.getErrorStack=r.getErrorMessage=void 0;const s=e("@metamask/utils");r.getErrorMessage=e=>"string"==typeof e?e:e instanceof Error||(0,s.isObject)(e)&&(0,s.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:"Unknown error.";r.getErrorStack=e=>e instanceof Error?e.stack:undefined;class n extends Error{constructor(e,t){super(e),this.name="ParserError";const s=(0,r.getErrorStack)(t);s&&(this.stack=s)}}r.ParserError=n}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/errors.js"}],[1307,{"./abi":1305,"./errors":1306,"./types":1322},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./abi"),r),n(e("./errors"),r),n(e("./types"),r)}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/index.js"}],[1308,{"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.iterate=void 0;const s=e("@metamask/utils");r.iterate=function*(e,t=32){for(let r=0;r{(0,s.assert)(e>=0,"Cannot skip a negative number of bytes."),(0,s.assert)(e%t==0,"Length must be a multiple of the size."),r+=e},a=e.subarray(r);yield{skip:n,value:a}}return{skip:()=>undefined,value:new Uint8Array}}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/iterator.js"}],[1309,{"./errors":1306,"./iterator":1308,"./parsers":1316,"./utils":1324,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.unpack=r.pack=r.isDynamicParser=r.getParser=void 0;const s=e("@metamask/utils"),n=e("./errors"),a=e("./iterator"),o=e("./parsers"),i=e("./utils");r.getParser=e=>{const t={address:o.address,array:o.array,bool:o.bool,bytes:o.bytes,fixedBytes:o.fixedBytes,function:o.fn,number:o.number,string:o.string,tuple:o.tuple},r=t[e];if(r)return r;const s=Object.values(t).find((t=>t.isType(e)));if(s)return s;throw new n.ParserError(`The type "${e}" is not supported.`)};r.isDynamicParser=(e,t)=>{const{isDynamic:r}=e;return"function"==typeof r?r(t):r};r.pack=({types:e,values:t,packed:a=!1,tight:o=!1,arrayPacked:c=!1,byteArray:l=new Uint8Array})=>{(0,s.assert)(e.length===t.length,new n.ParserError(`The number of types (${e.length}) does not match the number of values (${t.length}).`));const{staticBuffer:u,dynamicBuffer:d,pointers:m}=e.reduce((({staticBuffer:e,dynamicBuffer:n,pointers:i},l,u)=>{const d=(0,r.getParser)(l),m=t[u];if(a||c||!(0,r.isDynamicParser)(d,l))return{staticBuffer:d.encode({buffer:e,value:m,type:l,packed:a,tight:o}),dynamicBuffer:n,pointers:i};return{staticBuffer:(0,s.concatBytes)([e,new Uint8Array(32)]),dynamicBuffer:d.encode({buffer:n,value:m,type:l,packed:a,tight:o}),pointers:[...i,{position:e.length,pointer:n.length}]}}),{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,s.assert)(!a&&!c||0===d.length,new n.ParserError("Invalid pack state."));const f=u.length,h=m.reduce(((e,{pointer:t,position:r})=>{const n=(0,i.padStart)((0,s.numberToBytes)(f+t));return(0,i.set)(e,n,r)}),u);return(0,s.concatBytes)([l,h,d])};r.unpack=(e,t)=>{const o=(0,a.iterate)(t);return e.map((e=>{const{value:{value:a,skip:i},done:c}=o.next();(0,s.assert)(!c,new n.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${e}".`));const l=(0,r.getParser)(e);if((0,r.isDynamicParser)(l,e)){const r=(0,s.bytesToNumber)(a.subarray(0,32)),n=t.subarray(r);return l.decode({type:e,value:n,skip:i})}return l.decode({type:e,value:a,skip:i})}))}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/packer.js"}],[1310,{"../errors":1306,"../utils":1324,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.address=r.getAddress=void 0;const s=e("@metamask/utils"),n=e("../errors"),a=e("../utils");r.getAddress=e=>{const t=(0,s.createBytes)(e);return(0,s.assert)(t.length<=20,new n.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${t.length} bytes.`)),(0,a.padStart)(t,20)},r.address={isDynamic:!1,isType:e=>"address"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:n}){const o=(0,r.getAddress)(t);if(n)return(0,s.concatBytes)([e,o]);const i=(0,a.padStart)(o);return(0,s.concatBytes)([e,i])},decode:({value:e})=>(0,s.add0x)((0,s.bytesToHex)(e.slice(12,32)))}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/address.js"}],[1311,{"../errors":1306,"../packer":1309,"../utils":1324,"./fixed-bytes":1314,"./tuple":1320,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.array=r.getTupleType=r.getArrayType=r.isArrayType=void 0;const s=e("@metamask/utils"),n=e("../errors"),a=e("../packer"),o=e("../utils"),i=e("./fixed-bytes"),c=e("./tuple"),l=/^(?.*)\[(?\d*?)\]$/u;r.isArrayType=e=>l.test(e);r.getArrayType=e=>{const t=e.match(l);return(0,s.assert)(t?.groups?.type,new n.ParserError(`Invalid array type. Expected an array type, but received "${e}".`)),[t.groups.type,t.groups.length?parseInt(t.groups.length,10):undefined]};r.getTupleType=(e,t)=>`(${new Array(t).fill(e).join(",")})`,r.array={isDynamic(e){const[t,s]=(0,r.getArrayType)(e);return s===undefined||(0,a.isDynamicParser)((0,a.getParser)(t),t)},isType:e=>(0,r.isArrayType)(e),getByteLength(e){(0,s.assert)((0,r.isArrayType)(e),new n.ParserError(`Expected an array type, but received "${e}".`));const[t,o]=(0,r.getArrayType)(e);return(0,a.isDynamicParser)(this,e)||o===undefined?32:c.tuple.getByteLength((0,r.getTupleType)(t,o))},encode({type:e,buffer:t,value:l,packed:u,tight:d}){const[m,f]=(0,r.getArrayType)(e);if((0,s.assert)(!u||!(0,r.isArrayType)(m),new n.ParserError("Cannot pack nested arrays.")),u&&(0,a.isDynamicParser)((0,a.getParser)(m),m))return(0,a.pack)({types:new Array(l.length).fill(m),values:l,byteArray:t,packed:u,arrayPacked:!0,tight:d});if(f)return(0,s.assert)(f===l.length,new n.ParserError(`Array length does not match type length. Expected a length of ${f}, but received ${l.length}.`)),c.tuple.encode({type:(0,r.getTupleType)(m,f),buffer:t,value:l,packed:i.fixedBytes.isType(m)&&d,tight:d});if(u)return(0,a.pack)({types:new Array(l.length).fill(m),values:l,byteArray:t,packed:i.fixedBytes.isType(m)&&d,arrayPacked:!0,tight:d});const h=(0,o.padStart)((0,s.numberToBytes)(l.length));return(0,a.pack)({types:new Array(l.length).fill(m),values:l,byteArray:(0,s.concatBytes)([t,h]),packed:u,tight:d})},decode({type:e,value:t,...o}){const[i,l]=(0,r.getArrayType)(e);if(l){const e=c.tuple.decode({type:(0,r.getTupleType)(i,l),value:t,...o});return(0,s.assert)(e.length===l,new n.ParserError(`Array length does not match type length. Expected a length of ${l}, but received ${e.length}.`)),e}const u=(0,s.bytesToNumber)(t.subarray(0,32));return(0,a.unpack)(new Array(u).fill(i),t.subarray(32))}}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/array.js"}],[1312,{"../errors":1306,"./number":1317,"@metamask/superstruct":2670,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.bool=r.getBooleanValue=void 0;const s=e("@metamask/superstruct"),n=e("@metamask/utils"),a=e("../errors"),o=e("./number"),i=(0,s.coerce)((0,s.boolean)(),(0,s.union)([(0,s.literal)("true"),(0,s.literal)("false")]),(e=>"true"===e));r.getBooleanValue=e=>{try{return(0,s.create)(e,i)?BigInt(1):BigInt(0)}catch{throw new a.ParserError(`Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${e}".`)}},r.bool={isDynamic:!1,isType:e=>"bool"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:s,tight:a}){const i=(0,r.getBooleanValue)(t);return s?(0,n.concatBytes)([e,(0,n.bigIntToBytes)(i)]):o.number.encode({type:"uint256",buffer:e,value:i,packed:s,tight:a})},decode:e=>o.number.decode({...e,type:"uint256"})===BigInt(1)}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/bool.js"}],[1313,{"../utils":1324,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.bytes=void 0;const s=e("@metamask/utils"),n=e("../utils");r.bytes={isDynamic:!0,isType:e=>"bytes"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:r}){const a=(0,s.createBytes)(t);if(r)return(0,s.concatBytes)([e,a]);const o=32*Math.ceil(a.byteLength/32);return(0,s.concatBytes)([e,(0,n.padStart)((0,s.numberToBytes)(a.byteLength)),(0,n.padEnd)(a,o)])},decode({value:e}){const t=e.subarray(0,32),r=(0,s.bytesToNumber)(t);return e.slice(32,32+r)}}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/bytes.js"}],[1314,{"../errors":1306,"../utils":1324,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fixedBytes=r.getByteLength=void 0;const s=e("@metamask/utils"),n=e("../errors"),a=e("../utils"),o=/^bytes([0-9]{1,2})$/u;r.getByteLength=e=>{const t=e.match(o)?.[1];(0,s.assert)(t,`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`);const r=Number(t);return(0,s.assert)(r>0&&r<=32,new n.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`)),r},r.fixedBytes={isDynamic:!1,isType:e=>o.test(e),getByteLength:()=>32,encode({type:e,buffer:t,value:o,packed:i}){const c=(0,r.getByteLength)(e),l=(0,s.createBytes)(o);return(0,s.assert)(l.length<=c,new n.ParserError(`Expected a value of length ${c}, but received a value of length ${l.length}.`)),i?(0,s.concatBytes)([t,(0,a.padEnd)(l,c)]):(0,s.concatBytes)([t,(0,a.padEnd)(l)])},decode({type:e,value:t}){const s=(0,r.getByteLength)(e);return t.slice(0,s)}}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/fixed-bytes.js"}],[1315,{"../errors":1306,"./fixed-bytes":1314,"@metamask/superstruct":2670,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fn=r.getFunction=void 0;const s=e("@metamask/superstruct"),n=e("@metamask/utils"),a=e("../errors"),o=e("./fixed-bytes"),i=(0,s.coerce)((0,s.object)({address:n.StrictHexStruct,selector:n.StrictHexStruct}),(0,s.union)([n.StrictHexStruct,(0,s.instance)(Uint8Array)]),(e=>{const t=(0,n.createBytes)(e);return(0,n.assert)(24===t.length,new a.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${t.length} bytes.`)),{address:(0,n.bytesToHex)(t.subarray(0,20)),selector:(0,n.bytesToHex)(t.subarray(20,24))}}));r.getFunction=e=>{const t=(0,s.create)(e,i);return(0,n.concatBytes)([(0,n.hexToBytes)(t.address),(0,n.hexToBytes)(t.selector)])},r.fn={isDynamic:!1,isType:e=>"function"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:s,tight:n}){const a=(0,r.getFunction)(t);return o.fixedBytes.encode({type:"bytes24",buffer:e,value:a,packed:s,tight:n})},decode:({value:e})=>({address:(0,n.bytesToHex)(e.slice(0,20)),selector:(0,n.bytesToHex)(e.slice(20,24))})}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/function.js"}],[1316,{"./address":1310,"./array":1311,"./bool":1312,"./bytes":1313,"./fixed-bytes":1314,"./function":1315,"./number":1317,"./parser":1318,"./string":1319,"./tuple":1320},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./address"),r),n(e("./array"),r),n(e("./bool"),r),n(e("./bytes"),r),n(e("./fixed-bytes"),r),n(e("./function"),r),n(e("./number"),r),n(e("./parser"),r),n(e("./string"),r),n(e("./tuple"),r)}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/index.js"}],[1317,{"../errors":1306,"../utils":1324,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.number=r.getBigInt=r.assertNumberLength=r.getLength=r.isSigned=void 0;const s=e("@metamask/utils"),n=e("../errors"),a=e("../utils"),o=/^u?int(?[0-9]*)?$/u;r.isSigned=e=>!e.startsWith("u");r.getLength=e=>{if("int"===e||"uint"===e)return 256;const t=e.match(o);(0,s.assert)(t?.groups?.length,new n.ParserError(`Invalid number type. Expected a number type, but received "${e}".`));const r=parseInt(t.groups.length,10);return(0,s.assert)(r>=8&&r<=256,new n.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${e}".`)),(0,s.assert)(r%8==0,new n.ParserError(`Invalid number length. Expected a multiple of 8, but received "${e}".`)),r};r.assertNumberLength=(e,t)=>{const a=(0,r.getLength)(t),o=BigInt(2)**BigInt(a-((0,r.isSigned)(t)?1:0))-BigInt(1);(0,r.isSigned)(t)?(0,s.assert)(e>=-(o+BigInt(1))&&e<=o,new n.ParserError(`Number "${e}" is out of range for type "${t}".`)):(0,s.assert)(e<=o,new n.ParserError(`Number "${e}" is out of range for type "${t}".`))};r.getBigInt=e=>{try{return(0,s.createBigInt)(e)}catch{throw new n.ParserError(`Invalid number. Expected a valid number value, but received "${e}".`)}},r.number={isDynamic:!1,isType:e=>o.test(e),getByteLength:()=>32,encode({type:e,buffer:t,value:n,packed:o}){const i=(0,r.getBigInt)(n);if((0,r.assertNumberLength)(i,e),(0,r.isSigned)(e)){if(o){const n=(0,r.getLength)(e)/8;return(0,s.concatBytes)([t,(0,s.signedBigIntToBytes)(i,n)])}return(0,s.concatBytes)([t,(0,a.padStart)((0,s.signedBigIntToBytes)(i,32))])}if(o){const n=(0,r.getLength)(e)/8;return(0,s.concatBytes)([t,(0,a.padStart)((0,s.bigIntToBytes)(i),n)])}return(0,s.concatBytes)([t,(0,a.padStart)((0,s.bigIntToBytes)(i))])},decode({type:e,value:t}){const n=t.subarray(0,32);if((0,r.isSigned)(e)){const t=(0,s.bytesToSignedBigInt)(n);return(0,r.assertNumberLength)(t,e),t}const a=(0,s.bytesToBigInt)(n);return(0,r.assertNumberLength)(a,e),a}}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/number.js"}],[1318,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/parser.js"}],[1319,{"./bytes":1313,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.string=void 0;const s=e("@metamask/utils"),n=e("./bytes");r.string={isDynamic:!0,isType:e=>"string"===e,getByteLength:()=>32,encode:({buffer:e,value:t,packed:r,tight:a})=>n.bytes.encode({type:"bytes",buffer:e,value:(0,s.stringToBytes)(t),packed:r,tight:a}),decode:e=>(0,s.bytesToString)(n.bytes.decode(e))}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/string.js"}],[1320,{"../errors":1306,"../packer":1309,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.tuple=r.getTupleElements=void 0;const s=e("@metamask/utils"),n=e("../errors"),a=e("../packer"),o=/^\((.+)\)$/u;r.getTupleElements=e=>{(0,s.assert)(e.startsWith("(")&&e.endsWith(")"),new n.ParserError(`Invalid tuple type. Expected tuple type, but received "${e}".`));const t=[];let r="",a=0;for(let s=1;s(0,r.getTupleElements)(e).some((e=>{const t=(0,a.getParser)(e);return(0,a.isDynamicParser)(t,e)})),isType:e=>(e=>o.test(e))(e),getByteLength(e){if((0,a.isDynamicParser)(this,e))return 32;return(0,r.getTupleElements)(e).reduce(((e,t)=>e+(0,a.getParser)(t).getByteLength(t)),0)},encode({type:e,buffer:t,value:s,packed:n,tight:o}){const i=(0,r.getTupleElements)(e);return(0,a.pack)({types:i,values:s,byteArray:t,packed:n,tight:o})},decode({type:e,value:t,skip:s}){const n=(0,r.getTupleElements)(e);return s(this.getByteLength(e)-32),(0,a.unpack)(n,t)}}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/tuple.js"}],[1321,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/types/abi.js"}],[1322,{"./abi":1321},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./abi"),r)}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/types/index.js"}],[1323,{"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.padEnd=r.padStart=r.set=void 0;const s=e("@metamask/utils");r.set=(e,t,r)=>(0,s.concatBytes)([e.subarray(0,r),t,e.subarray(r+t.length)]);r.padStart=(e,t=32)=>{const r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,s.concatBytes)([r,e])};r.padEnd=(e,t=32)=>{const r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,s.concatBytes)([e,r])}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/utils/buffer.js"}],[1324,{"./buffer":1323},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./buffer"),r)}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/utils/index.js"}],[1325,{"./errors.cjs":1333,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/assert.cjs"}],[1326,{"./assert.cjs":1325,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/base64.cjs"}],[1327,{"./assert.cjs":1325,"./hex.cjs":1334,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/bytes.cjs"}],[1328,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAssetId=r.isCaipAssetType=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAssetIdStruct=r.CaipAssetTypeStruct=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ASSET_ID_REGEX=r.CAIP_ASSET_TYPE_REGEX=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),r.CaipAssetTypeStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_TYPE_REGEX),r.CaipAssetIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.isCaipAssetType=function(e){return(0,s.is)(e,r.CaipAssetTypeStruct)},r.isCaipAssetId=function(e){return(0,s.is)(e,r.CaipAssetIdStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1329,{"./base64.cjs":1326,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/checksum.cjs"}],[1330,{"./assert.cjs":1325,"./bytes.cjs":1327,"./hex.cjs":1334,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/coercers.cjs"}],[1331,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/collections.cjs"}],[1332,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1333,{"./misc.cjs":1339,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/errors.cjs"}],[1334,{"./assert.cjs":1325,"./bytes.cjs":1327,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/hex.cjs"}],[1335,{"./assert.cjs":1325,"./base64.cjs":1326,"./bytes.cjs":1327,"./caip-types.cjs":1328,"./checksum.cjs":1329,"./coercers.cjs":1330,"./collections.cjs":1331,"./encryption-types.cjs":1332,"./errors.cjs":1333,"./hex.cjs":1334,"./json.cjs":1336,"./keyring.cjs":1337,"./logging.cjs":1338,"./misc.cjs":1339,"./number.cjs":1340,"./opaque.cjs":1341,"./promise.cjs":1342,"./time.cjs":1343,"./transaction-types.cjs":1344,"./versions.cjs":1345},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/index.cjs"}],[1336,{"./assert.cjs":1325,"./misc.cjs":1339,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/json.cjs"}],[1337,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/keyring.cjs"}],[1338,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/logging.cjs"}],[1339,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/misc.cjs"}],[1340,{"./assert.cjs":1325,"./hex.cjs":1334},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/number.cjs"}],[1341,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/opaque.cjs"}],[1342,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/promise.cjs"}],[1343,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/time.cjs"}],[1344,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1345,{"./assert.cjs":1325,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/versions.cjs"}],[135,{"../../../shared/constants/app":5248,"../../../shared/constants/network":5264,"../../../shared/lib/four-byte":5284,"../../../shared/modules/hexstring-utils":5307,"@metamask/transaction-controller":2698,"bn.js":3513,lodash:4380,url:5151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BnMultiplyByFraction=function(e,t,r){const s=new n.default(t),a=new n.default(r);return e.mul(s).div(a)},r.addHexPrefix=void 0,r.addUrlProtocolPrefix=function(e){let t=e.trim();t.length&&!s.default.parse(t).protocol&&(t=`https://${t}`);if(null!==h(t))return t;return null},r.checkAlarmExists=function(e,t){return e.some((e=>e.name===t))},r.deferredPromise=function(){let e,t;return{promise:new Promise(((r,s)=>{e=r,t=s})),resolve:e,reject:t}},r.formatTxMetaForRpcResult=function(e){const{r:t,s:r,v:s,hash:n,txReceipt:a,txParams:i}=e,{to:c,data:l,nonce:u,gas:d,from:m,value:f,gasPrice:h,accessList:p,maxFeePerGas:g,maxPriorityFeePerGas:b}=i,y={v:s,r:t,s:r,to:c,gas:d,from:m,hash:n,nonce:`${u}`,input:l||"0x",value:f||"0x0",accessList:p||null,blockHash:(null==a?void 0:a.blockHash)||null,blockNumber:(null==a?void 0:a.blockNumber)||null,transactionIndex:(null==a?void 0:a.transactionIndex)||null,type:g&&b?o.TransactionEnvelopeType.feeMarket:o.TransactionEnvelopeType.legacy};g&&b?(y.gasPrice=g,y.maxFeePerGas=g,y.maxPriorityFeePerGas=b):y.gasPrice=h;return y},r.formatValue=function(e,t){if(!p(e))return"";const r=`${e>=0?"+":""}${e.toFixed(2)}%`;return t?`(${r})`:r},r.generateRandomId=void 0,r.getChainType=function(e){if(e===c.CHAIN_IDS.MAINNET)return"mainnet";if(c.TEST_CHAINS.includes(e))return"testnet";return"custom"},r.getPlatform=r.getMethodDataName=r.getEnvironmentType=void 0,r.getValidUrl=h,r.hexToBn=function(e){return new n.default((0,l.stripHexPrefix)(e),16)},r.isValidDate=r.isValidAmount=void 0,r.isWebUrl=function(e){const t=h(e);return null!==t&&("https:"===t.protocol||"http:"===t.protocol)},r.previousValueComparator=function(e,t){let r,s=!0;return n=>{try{return s?(s=!1,e(t??n,n)):e(r,n)}finally{r=n}}},r.shouldEmitDappViewedEvent=function(e){if(null===e)return!1;const t=e.slice(-4);return parseInt(t,16)%100==0};var s=d(e("url")),n=d(e("bn.js")),a=e("lodash"),o=e("@metamask/transaction-controller"),i=e("../../../shared/constants/app"),c=e("../../../shared/constants/network"),l=e("../../../shared/modules/hexstring-utils"),u=e("../../../shared/lib/four-byte");function d(e){return e&&e.__esModule?e:{default:e}}const m=(0,a.memoize)((e=>{const t=new URL(e);return"/popup.html"===t.pathname?i.ENVIRONMENT_TYPE_POPUP:["/home.html"].includes(t.pathname)?i.ENVIRONMENT_TYPE_FULLSCREEN:"/notification.html"===t.pathname?i.ENVIRONMENT_TYPE_NOTIFICATION:i.ENVIRONMENT_TYPE_BACKGROUND}));r.getEnvironmentType=(e=window.location.href)=>m(e);r.getPlatform=()=>{const{navigator:e}=window,{userAgent:t}=e;return t.includes("Firefox")?i.PLATFORM_FIREFOX:"brave"in e?i.PLATFORM_BRAVE:t.includes("Edg/")?i.PLATFORM_EDGE:t.includes("OPR")?i.PLATFORM_OPERA:i.PLATFORM_CHROME};r.addHexPrefix=e=>"string"!=typeof e||e.match(/^-?0x/u)?e:e.match(/^-?0X/u)?e.replace("0X","0x"):e.startsWith("-")?e.replace("-","-0x"):`0x${e}`;const f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";r.generateRandomId=()=>{let e="";for(let t=0;t<20;t++)e+=f.charAt(Math.floor(62*Math.random()));return e};function h(e){try{const t=new URL(e);return 0===t.hostname.length||0===t.pathname.length||t.hostname!==decodeURIComponent(t.hostname)?null:t}catch(e){return null}}r.isValidDate=e=>e instanceof Date;const p=e=>null!==e&&e!==undefined&&!Number.isNaN(e);r.isValidAmount=p;r.getMethodDataName=async(e,t,r,s,n)=>{if(!r||!t)return null;const a=r.slice(0,10);if(null!=e&&e[a])return null==e?void 0:e[a];const o=await(0,u.getMethodDataAsync)(a,t,n);return null!=o&&o.name&&s(a,o),o}}}},{package:"$root$",file:"app/scripts/lib/util.ts"}],[1359,{"./errors.cjs":1360,"@metamask/base-controller":1396,"@metamask/rpc-errors":2304,nanoid:4473},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m,f,h,p=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},g=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.ApprovalController=r.APPROVAL_TYPE_RESULT_SUCCESS=r.APPROVAL_TYPE_RESULT_ERROR=r.ORIGIN_METAMASK=void 0;const b=e("@metamask/base-controller"),y=e("@metamask/rpc-errors"),k=e("nanoid"),E=e("./errors.cjs");r.ORIGIN_METAMASK="metamask",r.APPROVAL_TYPE_RESULT_ERROR="result_error",r.APPROVAL_TYPE_RESULT_SUCCESS="result_success";const C="ApprovalController",A={pendingApprovals:{persist:!1,anonymous:!0},pendingApprovalCount:{persist:!1,anonymous:!1},approvalFlows:{persist:!1,anonymous:!1}};class S extends b.BaseController{constructor({messenger:e,showApprovalRequest:t,state:r={},typesExcludedFromRateLimiting:c=[]}){super({name:C,metadata:A,messenger:e,state:{pendingApprovals:{},pendingApprovalCount:0,approvalFlows:[],...r}}),s.add(this),n.set(this,void 0),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),p(this,n,new Map,"f"),p(this,a,new Map,"f"),p(this,o,t,"f"),p(this,i,c,"f"),this.registerMessageHandlers()}registerMessageHandlers(){this.messagingSystem.registerActionHandler(`${C}:clearRequests`,this.clear.bind(this)),this.messagingSystem.registerActionHandler(`${C}:addRequest`,((e,t)=>t?this.addAndShowApprovalRequest(e):this.add(e))),this.messagingSystem.registerActionHandler(`${C}:hasRequest`,this.has.bind(this)),this.messagingSystem.registerActionHandler(`${C}:acceptRequest`,this.accept.bind(this)),this.messagingSystem.registerActionHandler(`${C}:rejectRequest`,this.reject.bind(this)),this.messagingSystem.registerActionHandler(`${C}:updateRequestState`,this.updateRequestState.bind(this)),this.messagingSystem.registerActionHandler(`${C}:startFlow`,this.startFlow.bind(this)),this.messagingSystem.registerActionHandler(`${C}:endFlow`,this.endFlow.bind(this)),this.messagingSystem.registerActionHandler(`${C}:setFlowLoadingText`,this.setFlowLoadingText.bind(this)),this.messagingSystem.registerActionHandler(`${C}:showSuccess`,this.success.bind(this)),this.messagingSystem.registerActionHandler(`${C}:showError`,this.error.bind(this))}addAndShowApprovalRequest(e){const t=g(this,s,"m",c).call(this,e.origin,e.type,e.id,e.requestData,e.requestState,e.expectsResult);return g(this,o,"f").call(this),t}add(e){return g(this,s,"m",c).call(this,e.origin,e.type,e.id,e.requestData,e.requestState,e.expectsResult)}get(e){return this.state.pendingApprovals[e]}getApprovalCount(e={}){if(!e.origin&&!e.type)throw new Error("Must specify origin, type, or both.");const{origin:t,type:r}=e;if(t&&r)return g(this,a,"f").get(t)?.get(r)||0;if(t)return Array.from((g(this,a,"f").get(t)||new Map).values()).reduce(((e,t)=>e+t),0);let s=0;for(const e of Object.values(this.state.pendingApprovals))e.type===r&&(s+=1);return s}getTotalApprovalCount(){return this.state.pendingApprovalCount}has(e={}){const{id:t,origin:r,type:s}=e;if(t){if("string"!=typeof t)throw new Error("May not specify non-string id.");return g(this,n,"f").has(t)}if(s&&"string"!=typeof s)throw new Error("May not specify non-string type.");if(r){if("string"!=typeof r)throw new Error("May not specify non-string origin.");return s?Boolean(g(this,a,"f").get(r)?.get(s)):g(this,a,"f").has(r)}if(s){for(const e of Object.values(this.state.pendingApprovals))if(e.type===s)return!0;return!1}throw new Error("Must specify a valid combination of id, origin, and type.")}accept(e,t,r){const n=this.get(e),a=g(this,s,"m",f).call(this,e);let o=!1;return r?.deleteAfterResult&&r.waitForResult||(g(this,s,"m",m).call(this,e),o=!0),new Promise(((s,o)=>{const i={success:e=>s({value:e}),error:o};if(r?.waitForResult&&!n.expectsResult)return void o(new E.ApprovalRequestNoResultSupportError(e));const c=r?.waitForResult?i:undefined,l=n.expectsResult?{value:t,resultCallbacks:c}:t;a.resolve(l),r?.waitForResult||s({value:undefined})})).finally((()=>{o||g(this,s,"m",m).call(this,e)}))}reject(e,t){const r=g(this,s,"m",f).call(this,e);g(this,s,"m",m).call(this,e),r.reject(t)}clear(e){for(const t of g(this,n,"f").keys())this.reject(t,e);g(this,a,"f").clear(),this.update((e=>{e.pendingApprovals={},e.pendingApprovalCount=0}))}updateRequestState(e){if(!this.state.pendingApprovals[e.id])throw new E.ApprovalRequestNotFoundError(e.id);this.update((t=>{t.pendingApprovals[e.id].requestState=e.requestState}))}startFlow(e={}){const t=e.id??(0,k.nanoid)(),r=e.loadingText??null;return this.update((e=>{e.approvalFlows.push({id:t,loadingText:r})})),!1!==e.show&&g(this,o,"f").call(this),{id:t,loadingText:r}}endFlow({id:e}){if(!this.state.approvalFlows.length)throw new E.NoApprovalFlowsError;if(e!==this.state.approvalFlows.slice(-1)[0].id)throw new E.EndInvalidFlowError(e,this.state.approvalFlows.map((e=>e.id)));this.update((e=>{e.approvalFlows.pop()}))}setFlowLoadingText({id:e,loadingText:t}){const r=this.state.approvalFlows.findIndex((t=>t.id===e));if(-1===r)throw new E.MissingApprovalFlowError(e);this.update((e=>{e.approvalFlows[r].loadingText=t}))}async success(e={}){return await g(this,s,"m",h).call(this,r.APPROVAL_TYPE_RESULT_SUCCESS,e,{message:e.message,header:e.header,title:e.title,icon:e.icon}),{}}async error(e={}){return await g(this,s,"m",h).call(this,r.APPROVAL_TYPE_RESULT_ERROR,e,{error:e.error,header:e.header,title:e.title,icon:e.icon}),{}}}r.ApprovalController=S,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakSet,c=function(e,t,r=(0,k.nanoid)(),a,o,c){if(g(this,s,"m",l).call(this,r,e,t,a,o),!g(this,i,"f").includes(t)&&this.has({origin:e,type:t}))throw y.rpcErrors.resourceUnavailable(((e,t)=>`Request of type '${t}' already pending for origin ${e}. Please wait.`)(e,t));return new Promise(((i,l)=>{g(this,n,"f").set(r,{resolve:i,reject:l}),g(this,s,"m",u).call(this,e,t),g(this,s,"m",d).call(this,r,e,t,a,o,c)}))},l=function(e,t,r,s,a){let o=null;if(e&&"string"==typeof e?g(this,n,"f").has(e)?o=`Approval request with id '${e}' already exists.`:t&&"string"==typeof t?r&&"string"==typeof r?s&&("object"!=typeof s||Array.isArray(s))?o="Request data must be a plain object if specified.":a&&("object"!=typeof a||Array.isArray(a))&&(o="Request state must be a plain object if specified."):o="Must specify non-empty string type.":o="Must specify non-empty string origin.":o="Must specify non-empty string id.",o)throw y.rpcErrors.internal(o)},u=function(e,t){let r=g(this,a,"f").get(e);r||(r=new Map,g(this,a,"f").set(e,r));const s=r.get(t)||0;r.set(t,s+1)},d=function(e,t,r,s,n,a){const o={id:e,origin:t,type:r,time:Date.now(),requestData:s||null,requestState:n||null,expectsResult:a||!1};this.update((t=>{t.pendingApprovals[e]=o,t.pendingApprovalCount=Object.keys(t.pendingApprovals).length}))},m=function(e){if(!g(this,n,"f").has(e))throw new E.ApprovalRequestNotFoundError(e);g(this,n,"f").delete(e);const{origin:t,type:r}=this.state.pendingApprovals[e],s=g(this,a,"f").get(t),o=this.getApprovalCount({origin:t}),i=s.get(r);1===o?g(this,a,"f").delete(t):s.set(r,i-1),this.update((t=>{delete t.pendingApprovals[e],t.pendingApprovalCount=Object.keys(t.pendingApprovals).length}))},f=function(e){const t=g(this,n,"f").get(e);if(!t)throw new E.ApprovalRequestNotFoundError(e);return t},h=async function(e,t,s){try{await this.addAndShowApprovalRequest({origin:r.ORIGIN_METAMASK,type:e,requestData:s})}catch(e){console.info("Failed to display result page",e)}finally{if(t.flowToEnd)try{this.endFlow({id:t.flowToEnd})}catch(e){console.info("Failed to end flow",{id:t.flowToEnd,error:e})}}},r.default=S}}},{package:"@metamask/approval-controller",file:"node_modules/@metamask/approval-controller/dist/ApprovalController.cjs"}],[1360,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.MissingApprovalFlowError=r.EndInvalidFlowError=r.NoApprovalFlowsError=r.ApprovalRequestNoResultSupportError=r.ApprovalRequestNotFoundError=void 0;class s extends Error{constructor(e){super(`Approval request with id '${e}' not found.`)}}r.ApprovalRequestNotFoundError=s;class n extends Error{constructor(e){super(`Approval acceptance requested result but request with id '${e}' does not support it.`)}}r.ApprovalRequestNoResultSupportError=n;class a extends Error{constructor(){super("No approval flows found.")}}r.NoApprovalFlowsError=a;class o extends Error{constructor(e,t){super(`Attempted to end flow with id '${e}' which does not match current flow with id '${t.slice(-1)[0]}'. All Flows: ${t.join(", ")}`)}}r.EndInvalidFlowError=o;class i extends Error{constructor(e){super(`No approval flows found with id '${e}'.`)}}r.MissingApprovalFlowError=i}}},{package:"@metamask/approval-controller",file:"node_modules/@metamask/approval-controller/dist/errors.cjs"}],[1361,{"./ApprovalController.cjs":1359,"./errors.cjs":1360},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./ApprovalController.cjs"),r),n(e("./errors.cjs"),r)}}},{package:"@metamask/approval-controller",file:"node_modules/@metamask/approval-controller/dist/index.cjs"}],[1362,{"@metamask/controller-utils":1422,"@metamask/eth-query":1640,"@metamask/polling-controller":1391,"@metamask/utils":2761,"async-mutex":3450,lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},m=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccountTrackerController=void 0;const h=e("@metamask/controller-utils"),p=f(e("@metamask/eth-query")),g=e("@metamask/polling-controller"),b=e("@metamask/utils"),y=e("async-mutex"),k=e("lodash"),E={accounts:{persist:!0,anonymous:!1},accountsByChainId:{persist:!0,anonymous:!1}};class C extends((0,g.StaticIntervalPollingController)()){constructor({interval:e=1e4,state:t,messenger:r,getStakedBalanceForChain:c,includeStakedAssets:l=!1}){const{selectedNetworkClientId:u}=r.call("NetworkController:getState"),{configuration:{chainId:m}}=r.call("NetworkController:getNetworkClientById",u);super({name:"AccountTrackerController",messenger:r,state:{accounts:{},accountsByChainId:{[m]:{}},...t},metadata:E}),s.add(this),n.set(this,new y.Mutex),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),d(this,o,c,"f"),d(this,a,l,"f"),this.setIntervalLength(e),this.poll(),this.messagingSystem.subscribe("AccountsController:selectedEvmAccountChange",(()=>this.refresh()))}syncAccounts(e){const t={...this.state.accounts},r=(0,k.cloneDeep)(this.state.accountsByChainId),s=Object.keys(t);r[e]||(r[e]={},s.forEach((t=>{r[e][t]={balance:"0x0"}})));const n=Object.values(this.messagingSystem.call("AccountsController:listAccounts").map((e=>(0,h.toChecksumHexAddress)(e.address)))),a=n.filter((e=>!s.includes(e))),o=s.filter((e=>!n.includes(e)));a.forEach((e=>{t[e]={balance:"0x0"}})),Object.keys(r).forEach((e=>{a.forEach((t=>{r[e][t]={balance:"0x0"}}))})),o.forEach((e=>{delete t[e]})),Object.keys(r).forEach((e=>{o.forEach((t=>{delete r[e][t]}))})),this.update((e=>{e.accounts=t,e.accountsByChainId=r}))}async poll(e){e&&this.setIntervalLength(e),m(this,i,"f")&&clearTimeout(m(this,i,"f")),await this.refresh(),d(this,i,setTimeout((()=>{this.poll(this.getIntervalLength())}),this.getIntervalLength()),"f")}async _executePoll({networkClientId:e}){this.refresh(e)}async refresh(e){const t=this.messagingSystem.call("AccountsController:getSelectedAccount"),r=await m(this,n,"f").acquire();try{const{chainId:r,ethQuery:n}=m(this,s,"m",l).call(this,e);this.syncAccounts(r);const{accounts:i,accountsByChainId:d}=this.state,{isMultiAccountBalancesEnabled:f}=this.messagingSystem.call("PreferencesController:getState"),p=f?Object.keys(i):[(0,h.toChecksumHexAddress)(t.address)],g={...d[r]};for(const t of p){const r=await m(this,s,"m",u).call(this,t,n);if(r&&(g[t]={balance:r}),m(this,a,"f")){const r=await m(this,o,"f").call(this,t,e);r&&(g[t]={...g[t],stakedBalance:r})}}this.update((e=>{r===m(this,s,"m",c).call(this)&&(e.accounts=g),e.accountsByChainId[r]=g}))}finally{r()}}async syncBalanceWithAddresses(e,t){const{ethQuery:r}=m(this,s,"m",l).call(this,t);return await Promise.all(e.map((e=>(0,h.safelyExecuteWithTimeout)((async()=>{(0,b.assert)(r,"Provider not set.");const s=await(0,h.query)(r,"getBalance",[e]);let n;return m(this,a,"f")&&(n=await m(this,o,"f").call(this,e,t)),[e,s,n]}))))).then((e=>e.reduce(((e,t)=>{if(!t)return e;const[r,s,n]=t;return{...e,[r]:{balance:s,stakedBalance:n}}}),{})))}}r.AccountTrackerController=C,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakSet,c=function(){const{selectedNetworkClientId:e}=this.messagingSystem.call("NetworkController:getState"),{configuration:{chainId:t}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return t},l=function(e){const t=e??this.messagingSystem.call("NetworkController:getState").selectedNetworkClientId,{configuration:{chainId:r},provider:s}=this.messagingSystem.call("NetworkController:getNetworkClientById",t);return{chainId:r,ethQuery:new p.default(s)}},u=async function(e,t){return await(0,h.safelyExecuteWithTimeout)((async()=>((0,b.assert)(t,"Provider not set."),await(0,h.query)(t,"getBalance",[e]))))},r.default=C}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/AccountTrackerController.cjs"}],[1363,{"./Standards/ERC20Standard.cjs":1369,"./Standards/NftStandards/ERC1155/ERC1155Standard.cjs":1370,"./Standards/NftStandards/ERC721/ERC721Standard.cjs":1371,"./assetsUtil.cjs":1377,"@ethersproject/bignumber":514,"@ethersproject/contracts":523,"@ethersproject/providers":561,"@metamask/controller-utils":1422,"@metamask/utils":2761,"single-call-balance-checker-abi":5094},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},m=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.AssetsContractController=r.MISSING_PROVIDER_ERROR=r.STAKING_CONTRACT_ADDRESS_BY_CHAINID=r.SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID=void 0;const h=e("@ethersproject/bignumber"),p=e("@ethersproject/contracts"),g=e("@ethersproject/providers"),b=e("@metamask/controller-utils"),y=e("@metamask/utils"),k=f(e("single-call-balance-checker-abi")),E=e("./assetsUtil.cjs"),C=e("./Standards/ERC20Standard.cjs"),A=e("./Standards/NftStandards/ERC1155/ERC1155Standard.cjs"),S=e("./Standards/NftStandards/ERC721/ERC721Standard.cjs");r.SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID={[E.SupportedTokenDetectionNetworks.mainnet]:"0xb1f8e55c7f64d203c1400b9d8555d050f94adf39",[E.SupportedTokenDetectionNetworks.bsc]:"0x2352c63A83f9Fd126af8676146721Fa00924d7e4",[E.SupportedTokenDetectionNetworks.polygon]:"0x2352c63A83f9Fd126af8676146721Fa00924d7e4",[E.SupportedTokenDetectionNetworks.avax]:"0xD023D153a0DFa485130ECFdE2FAA7e612EF94818",[E.SupportedTokenDetectionNetworks.aurora]:"0x1286415D333855237f89Df27D388127181448538",[E.SupportedTokenDetectionNetworks.linea_goerli]:"0x10dAd7Ca3921471f616db788D9300DC97Db01783",[E.SupportedTokenDetectionNetworks.linea_mainnet]:"0xF62e6a41561b3650a69Bb03199C735e3E3328c0D",[E.SupportedTokenDetectionNetworks.arbitrum]:"0x151E24A486D7258dd7C33Fb67E4bB01919B7B32c",[E.SupportedTokenDetectionNetworks.optimism]:"0xB1c568e9C3E6bdaf755A60c7418C269eb11524FC",[E.SupportedTokenDetectionNetworks.base]:"0x6AA75276052D96696134252587894ef5FFA520af",[E.SupportedTokenDetectionNetworks.zksync]:"0x458fEd3144680a5b8bcfaa0F9594aa19B4Ea2D34",[E.SupportedTokenDetectionNetworks.cronos]:"0x768ca200f0fc702ac9ea502498c18f5eff176378",[E.SupportedTokenDetectionNetworks.celo]:"0x6aa75276052d96696134252587894ef5ffa520af",[E.SupportedTokenDetectionNetworks.gnosis]:"0x6aa75276052d96696134252587894ef5ffa520af",[E.SupportedTokenDetectionNetworks.fantom]:"0x6aa75276052d96696134252587894ef5ffa520af",[E.SupportedTokenDetectionNetworks.polygon_zkevm]:"0x6aa75276052d96696134252587894ef5ffa520af",[E.SupportedTokenDetectionNetworks.moonbeam]:"0x6aa75276052d96696134252587894ef5ffa520af",[E.SupportedTokenDetectionNetworks.moonriver]:"0x6aa75276052d96696134252587894ef5ffa520af"},r.STAKING_CONTRACT_ADDRESS_BY_CHAINID={[E.SupportedStakedBalanceNetworks.mainnet]:"0x4fef9d741011476750a243ac70b9789a63dd47df",[E.SupportedStakedBalanceNetworks.holesky]:"0x37bf0883c27365cffcd0c4202918df930989891f"},r.MISSING_PROVIDER_ERROR="AssetsContractController failed to set the provider correctly. A provider must be set for this method to be available";const w="AssetsContractController";class v{constructor({messenger:e,chainId:t}){s.add(this),this.name=w,n.set(this,void 0),a.set(this,void 0),o.set(this,void 0),this.messagingSystem=e,d(this,n,undefined,"f"),d(this,a,b.IPFS_DEFAULT_GATEWAY_URL,"f"),d(this,o,t,"f"),m(this,s,"m",i).call(this),m(this,s,"m",c).call(this)}setProvider(e){d(this,n,e,"f")}get ipfsGateway(){return m(this,a,"f")}get chainId(){return m(this,o,"f")}getERC20Standard(e){const t=m(this,s,"m",l).call(this,e);return new C.ERC20Standard(t)}getERC721Standard(e){const t=m(this,s,"m",l).call(this,e);return new S.ERC721Standard(t)}getERC1155Standard(e){const t=m(this,s,"m",l).call(this,e);return new A.ERC1155Standard(t)}async getERC20BalanceOf(e,t,r){return this.getERC20Standard(r).getBalanceOf(e,t)}async getERC20TokenDecimals(e,t){return this.getERC20Standard(t).getTokenDecimals(e)}async getERC20TokenName(e,t){return this.getERC20Standard(t).getTokenName(e)}async getERC721NftTokenId(e,t,r,s){return this.getERC721Standard(s).getNftTokenId(e,t,r)}async getTokenStandardAndDetails(e,t,r,n){m(this,s,"m",l).call(this,n);try{const t=this.getERC721Standard(n);return{...await t.getDetails(e,m(this,a,"f"),r)}}catch{}try{const t=this.getERC1155Standard(n);return{...await t.getDetails(e,m(this,a,"f"),r)}}catch{}try{const r=this.getERC20Standard(n);return{...await r.getDetails(e,t)}}catch{}throw new Error("Unable to determine contract standard")}async getERC721TokenURI(e,t,r){return this.getERC721Standard(r).getTokenURI(e,t)}async getERC721AssetName(e,t){return this.getERC721Standard(t).getAssetName(e)}async getERC721AssetSymbol(e,t){return this.getERC721Standard(t).getAssetSymbol(e)}async getERC721OwnerOf(e,t,r){return this.getERC721Standard(r).getOwnerOf(e,t)}async getERC1155TokenURI(e,t,r){return this.getERC1155Standard(r).getTokenURI(e,t)}async getERC1155BalanceOf(e,t,r,s){return this.getERC1155Standard(s).getBalanceOf(t,e,r)}async transferSingleERC1155(e,t,r,s,n,a){return this.getERC1155Standard(a).transferSingle(e,t,r,s,n)}async getBalancesInSingleCall(e,t,n){const a=m(this,s,"m",u).call(this,n),o=m(this,s,"m",l).call(this,n);if(!(a in r.SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID))return{};const i=r.SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID[a],c=new p.Contract(i,k.default,o),d=await c.balances([e],t),f={};return d.length>0&&t.forEach(((e,t)=>{const r=d[t];"0"!==String(r)&&(f[e]=r)})),f}async getStakedBalanceForChain(e,t){const n=m(this,s,"m",u).call(this,t),a=m(this,s,"m",l).call(this,t);let o=h.BigNumber.from(0);if(![E.SupportedStakedBalanceNetworks.mainnet,E.SupportedStakedBalanceNetworks.holesky].includes(n))return undefined;if(!(n in r.STAKING_CONTRACT_ADDRESS_BY_CHAINID))return undefined;const i=r.STAKING_CONTRACT_ADDRESS_BY_CHAINID[n],c=[{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getShares",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{internalType:"uint256",name:"assets",type:"uint256"}],stateMutability:"view",type:"function"}];try{const t=new p.Contract(i,c,a),r=await t.getShares(e);r.lte(0)||(o=await t.convertToAssets(r.toString()))}catch(e){console.error(e)}return o.toHexString()}}r.AssetsContractController=v,n=new WeakMap,a=new WeakMap,o=new WeakMap,s=new WeakSet,i=function(){const e=["constructor","messagingSystem","setProvider","provider","ipfsGateway","chainId"];(0,y.getKnownPropertyNames)(Object.getPrototypeOf(this)).forEach((t=>{(t=>!e.find((e=>e===t))&&"function"==typeof this[t])(t)&&this.messagingSystem.registerActionHandler(`${w}:${t}`,this[t].bind(this))}))},c=function(){this.messagingSystem.subscribe("PreferencesController:stateChange",(({ipfsGateway:e})=>{d(this,a,e,"f")})),this.messagingSystem.subscribe("NetworkController:networkDidChange",(({selectedNetworkClientId:e})=>{const t=m(this,s,"m",u).call(this,e);m(this,o,"f")!==t&&(d(this,o,t,"f"),d(this,n,m(this,s,"m",l).call(this),"f"))}))},l=function(e){const t=e?this.messagingSystem.call("NetworkController:getNetworkClientById",e).provider:this.messagingSystem.call("NetworkController:getSelectedNetworkClient")?.provider??m(this,n,"f");if(t===undefined)throw new Error(r.MISSING_PROVIDER_ERROR);return new g.Web3Provider(t)},u=function(e){if(e){const t=this.messagingSystem.call("NetworkController:getNetworkConfigurationByNetworkClientId",e);if(t)return t.chainId}const{selectedNetworkClientId:t}=this.messagingSystem.call("NetworkController:getState"),r=this.messagingSystem.call("NetworkController:getNetworkClientById",t);return r.configuration?.chainId??m(this,o,"f")},r.default=v}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/AssetsContractController.cjs"}],[1364,{"./crypto-compare-service/index.cjs":1380,"@metamask/controller-utils":1422,"@metamask/polling-controller":1391,"async-mutex":3450},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.CurrencyRateController=void 0;const s=e("@metamask/controller-utils"),n=e("@metamask/polling-controller"),a=e("async-mutex"),o=e("./crypto-compare-service/index.cjs"),i={currentCurrency:{persist:!0,anonymous:!0},currencyRates:{persist:!0,anonymous:!0}},c={currentCurrency:"usd",currencyRates:{ETH:{conversionDate:0,conversionRate:0,usdConversionRate:null}}};class l extends((0,n.StaticIntervalPollingController)()){constructor({includeUsdRate:e=!1,interval:t=18e4,messenger:r,state:s,fetchMultiExchangeRate:n=o.fetchMultiExchangeRate}){super({name:"CurrencyRateController",metadata:i,messenger:r,state:{...c,...s}}),this.mutex=new a.Mutex,this.includeUsdRate=e,this.setIntervalLength(t),this.fetchMultiExchangeRate=n}async setCurrentCurrency(e){const t=await this.mutex.acquire(),r=Object.keys(this.state.currencyRates);try{this.update((()=>({...c,currentCurrency:e})))}finally{t()}this.updateExchangeRate(r)}async updateExchangeRate(e){const t=await this.mutex.acquire();try{const{currentCurrency:t}=this.state,r=Object.values(s.TESTNET_TICKER_SYMBOLS),n=e.reduce(((e,t)=>(e[t]=r.includes(t)?s.FALL_BACK_VS_CURRENCY:t,e)),{}),a=await this.fetchMultiExchangeRate(t,[...new Set(Object.values(n))],this.includeUsdRate),o=Object.entries(n).reduce(((e,[r,s])=>{const n=a[s.toLowerCase()];return e[r]={conversionDate:n!==undefined?Date.now()/1e3:null,conversionRate:n?.[t.toLowerCase()]??null,usdConversionRate:n?.usd??null},e}),{});this.update((e=>{e.currencyRates={...e.currencyRates,...o}}))}catch(e){throw console.error("Failed to fetch exchange rates.",e),e}finally{t()}}destroy(){super.destroy(),this.stopAllPolling()}async _executePoll({nativeCurrencies:e}){await this.updateExchangeRate(e)}}r.CurrencyRateController=l,r.default=l}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/CurrencyRateController.cjs"}],[1365,{"./assetsUtil.cjs":1377,"./constants.cjs":1378,"@ethersproject/address":507,"@metamask/base-controller":1396,"@metamask/controller-utils":1422,"@metamask/rpc-errors":2304,"@metamask/utils":2761,"async-mutex":3450,"bn.js":3513,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m,f,h,p,g,b,y,k,E,C,A,S,w,v,x,T,_,j,R,I,B=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},P=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},D=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.NftController=r.getDefaultNftControllerState=void 0;const N=e("@ethersproject/address"),O=e("@metamask/base-controller"),F=e("@metamask/controller-utils"),M=e("@metamask/rpc-errors"),J=e("@metamask/utils"),L=e("async-mutex"),V=D(e("bn.js")),H=e("uuid"),U=e("./assetsUtil.cjs"),$=e("./constants.cjs"),z={allNftContracts:{persist:!0,anonymous:!1},allNfts:{persist:!0,anonymous:!1},ignoredNfts:{persist:!0,anonymous:!1}},G="allNfts",W="allNftContracts";r.getDefaultNftControllerState=()=>({allNftContracts:{},allNfts:{},ignoredNfts:[]});class K extends O.BaseController{constructor({chainId:e,ipfsGateway:t=F.IPFS_DEFAULT_GATEWAY_URL,openSeaEnabled:p=!1,useIpfsSubdomains:g=!0,isIpfsGatewayEnabled:b=!0,onNftAdded:y,messenger:k,state:E={}}){super({name:"NftController",metadata:z,messenger:k,state:{...(0,r.getDefaultNftControllerState)(),...E}}),s.add(this),n.set(this,new L.Mutex),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),c.set(this,void 0),l.set(this,void 0),u.set(this,void 0),d.set(this,void 0),B(this,a,this.messagingSystem.call("AccountsController:getSelectedAccount").id,"f"),B(this,o,e,"f"),B(this,i,t,"f"),B(this,c,p,"f"),B(this,l,g,"f"),B(this,u,b,"f"),B(this,d,y,"f"),this.messagingSystem.subscribe("PreferencesController:stateChange",P(this,s,"m",f).bind(this)),this.messagingSystem.subscribe("NetworkController:networkDidChange",P(this,s,"m",m).bind(this)),this.messagingSystem.subscribe("AccountsController:selectedEvmAccountChange",P(this,s,"m",h).bind(this))}getNftApi(){return`${F.NFT_API_BASE_URL}/tokens`}async watchNft(e,t,r,{networkClientId:n,userAddress:a}={}){const o=P(this,s,"m",R).call(this,a);if(!o)return;await P(this,s,"m",_).call(this,e,t,o);const i=await P(this,s,"m",E).call(this,e.address,e.tokenId,n);if(i.standard&&i.standard!==t)throw M.rpcErrors.invalidInput(`Suggested NFT of type ${i.standard} does not match received type ${t}`);const c={asset:{...e,...i},type:t,id:(0,H.v4)(),time:Date.now(),interactingAddress:o,origin:r};await this._requestApproval(c);const{address:l,tokenId:u}=e,{name:d,standard:m,description:f,image:h}=i;await this.addNft(l,u,{nftMetadata:{name:d??null,description:f??null,image:h??null,standard:m??null},userAddress:a,source:$.Source.Dapp,networkClientId:n})}setApiKey(e){this.openSeaApiKey=e}async isNftOwner(e,t,r,{networkClientId:s}={}){try{const n=await this.messagingSystem.call("AssetsContractController:getERC721OwnerOf",t,r,s);return e.toLowerCase()===n.toLowerCase()}catch{}try{return!(await this.messagingSystem.call("AssetsContractController:getERC1155BalanceOf",e,t,r,s)).isZero()}catch{}throw new Error("Unable to verify ownership. Possibly because the standard is not supported or the user's currently selected network does not match the chain of the asset in question.")}async addNftVerifyOwnership(e,t,{userAddress:r,networkClientId:n,source:a}={}){const o=P(this,s,"m",R).call(this,r);if(!await this.isNftOwner(o,e,t,{networkClientId:n}))throw new Error("This NFT is not owned by the user");await this.addNft(e,t,{networkClientId:n,userAddress:o,source:a})}async addNft(e,t,{nftMetadata:r,userAddress:n,source:a=$.Source.Custom,networkClientId:o}={}){const i=P(this,s,"m",R).call(this,n);if(!i)return;const c=(0,F.toChecksumHexAddress)(e),l=P(this,s,"m",j).call(this,{networkClientId:o});r=r||await P(this,s,"m",E).call(this,c,t,o);const u=(await P(this,s,"m",w).call(this,{tokenAddress:c,userAddress:i,networkClientId:o,source:a,nftMetadata:r})).find((e=>e.address.toLowerCase()===c.toLowerCase()));u&&await P(this,s,"m",S).call(this,c,t,r,u,l,i,a)}async updateNftMetadata({nfts:e,userAddress:t,networkClientId:r}){const a=P(this,s,"m",R).call(this,t),o=await P(this,n,"f").acquire();try{const t=P(this,s,"m",j).call(this,{networkClientId:r}),n=e.map((e=>({...e,address:(0,F.toChecksumHexAddress)(e.address)}))),o=await Promise.all(n.map((async e=>({nft:e,newMetadata:await P(this,s,"m",E).call(this,e.address,e.tokenId,r)})))),i=[],{allNfts:c}=this.state,l=c[a]?.[t]||[];o.forEach((e=>{const t=l.find((t=>t.address.toLowerCase()===e.nft.address.toLowerCase()&&t.tokenId===e.nft.tokenId));if(t){(0,U.compareNftMetadata)(e.newMetadata,t)&&i.push(e)}})),0!==i.length&&i.forEach((e=>this.updateNft(e.nft,e.newMetadata,a,t)))}finally{o()}}removeNft(e,t,{networkClientId:r,userAddress:n}={}){const a=P(this,s,"m",R).call(this,n),o=P(this,s,"m",j).call(this,{networkClientId:r}),i=(0,F.toChecksumHexAddress)(e);P(this,s,"m",x).call(this,i,t,{chainId:o,userAddress:a});const{allNfts:c}=this.state;(c[a]?.[o]||[]).find((e=>e.address.toLowerCase()===i.toLowerCase()))||P(this,s,"m",T).call(this,i,{chainId:o,userAddress:a})}removeAndIgnoreNft(e,t,{networkClientId:r,userAddress:n}={}){const a=P(this,s,"m",R).call(this,n),o=P(this,s,"m",j).call(this,{networkClientId:r}),i=(0,F.toChecksumHexAddress)(e);P(this,s,"m",v).call(this,i,t,{chainId:o,userAddress:a});const{allNfts:c}=this.state;(c[a]?.[o]||[]).find((e=>e.address.toLowerCase()===i.toLowerCase()))||P(this,s,"m",T).call(this,i,{chainId:o,userAddress:a})}clearIgnoredNfts(){this.update((e=>{e.ignoredNfts=[]}))}async checkAndUpdateSingleNftOwnershipStatus(e,t,{userAddress:r,networkClientId:n}={}){const a=P(this,s,"m",R).call(this,r),o=P(this,s,"m",j).call(this,{networkClientId:n}),{address:i,tokenId:c}=e;let l=e.isCurrentlyOwned;try{l=await this.isNftOwner(a,i,c,{networkClientId:n})}catch{}const u={...e,isCurrentlyOwned:l};if(t)return u;const{allNfts:d}=this.state,m=[...d[a]?.[o]||[]],f=m.findIndex((e=>e.tokenId===c&&e.address.toLowerCase()===i.toLowerCase()));return-1!==f&&(m[f]=u,this.update((e=>{e.allNfts[a]=Object.assign({},e.allNfts[a],{[o]:m})})),P(this,s,"m",p).call(this,m,G,{userAddress:a,chainId:o})),u}async checkAndUpdateAllNftsOwnershipStatus({networkClientId:e,userAddress:t}={}){const r=P(this,s,"m",R).call(this,t),n=P(this,s,"m",j).call(this,{networkClientId:e}),{allNfts:a}=this.state,o=a[r]?.[n]||[],i=await Promise.all(o.map((async r=>await this.checkAndUpdateSingleNftOwnershipStatus(r,!0,{networkClientId:e,userAddress:t})??r)));P(this,s,"m",p).call(this,i,G,{userAddress:r,chainId:n})}updateNftFavoriteStatus(e,t,r,{networkClientId:n,userAddress:a}={}){const o=P(this,s,"m",R).call(this,a),i=P(this,s,"m",j).call(this,{networkClientId:n}),{allNfts:c}=this.state,l=[...c[o]?.[i]||[]],u=l.findIndex((r=>r.address===e&&r.tokenId===t));if(-1===u)return;const d={...l[u],favorite:r};l[u]=d,P(this,s,"m",p).call(this,l,G,{chainId:i,userAddress:o})}findNftByAddressAndTokenId(e,t,r,s){const{allNfts:n}=this.state,a=n[r]?.[s]||[],o=a.findIndex((r=>r.address.toLowerCase()===e.toLowerCase()&&r.tokenId===t));return-1===o?null:{nft:a[o],index:o}}updateNft(e,t,r,n){const{allNfts:a}=this.state,o=a[r]?.[n]||[],i=this.findNftByAddressAndTokenId(e.address,e.tokenId,r,n);if(!i)return;const c={...e,...t},l=[...o.slice(0,i.index),c,...o.slice(i.index+1)];P(this,s,"m",p).call(this,l,G,{chainId:n,userAddress:r})}resetNftTransactionStatusByTransactionId(e,t,r){const{allNfts:n}=this.state,a=n[t]?.[r]||[],o=a.findIndex((t=>t.transactionId===e));if(-1===o)return!1;const i={...a[o],transactionId:undefined},c=[...a.slice(0,o),i,...a.slice(o+1)];return P(this,s,"m",p).call(this,c,G,{chainId:r,userAddress:t}),!0}async getNFTContractInfo(e,t){const r=new URL(P(this,s,"m",g).call(this));r.searchParams.append("chainId",t);for(const t of e)r.searchParams.append("contract",t);return await(0,F.handleFetch)(r,{headers:{Version:F.NFT_API_VERSION}})}async _requestApproval(e){return this.messagingSystem.call("ApprovalController:addRequest",{id:e.id,origin:e.origin,type:F.ApprovalType.WatchAsset,requestData:{id:e.id,interactingAddress:e.interactingAddress,asset:{address:e.asset.address,tokenId:e.asset.tokenId,name:e.asset.name,description:e.asset.description,image:e.asset.image,standard:e.asset.standard}}},!0)}resetState(){this.update((()=>(0,r.getDefaultNftControllerState)()))}}r.NftController=K,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,s=new WeakSet,m=function({selectedNetworkClientId:e}){const{configuration:{chainId:t}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);B(this,o,t,"f")},f=async function({ipfsGateway:e,openSeaEnabled:t,isIpfsGatewayEnabled:r}){const n=this.messagingSystem.call("AccountsController:getSelectedAccount");B(this,a,n.id,"f"),B(this,i,e,"f"),B(this,c,t,"f"),B(this,u,r,"f");(r&&""!==e||t)&&n&&await P(this,s,"m",I).call(this,n)},h=async function(e){const t=P(this,a,"f");B(this,a,e.id,"f");(P(this,u,"f")&&""!==P(this,i,"f")||P(this,c,"f"))&&t!==e.id&&await P(this,s,"m",I).call(this,e)},p=function(e,t,{userAddress:r,chainId:s}){r&&this.update((n=>{const a=n[t],o={...a[r]||{},[s]:e};n[t]={...a,[r]:o}}))},g=function(){return`${F.NFT_API_BASE_URL}/collections`},b=async function(e,t){const r=new URLSearchParams({chainIds:"1",tokens:`${e}:${t}`,includeTopBid:"true",includeAttributes:"true",includeLastSale:"true"}).toString(),s=await(0,F.fetchWithErrorHandling)({url:`${this.getNftApi()}?${r}`,options:{headers:{Version:F.NFT_API_VERSION}}}),n=new URLSearchParams({chainId:"1",id:`${s?.tokens[0]?.token?.collection?.id}`}).toString(),a=await(0,F.fetchWithErrorHandling)({url:`${F.NFT_API_BASE_URL}/collections?${n}`,options:{headers:{Version:F.NFT_API_VERSION}}});if(!s?.tokens?.[0]?.token)return{name:null,description:null,image:null,standard:null};const{image:o,metadata:{imageOriginal:i}={},name:c,description:l,collection:u,kind:d,rarityRank:m,rarity:f,attributes:h,lastSale:p,imageSmall:g}=s.tokens[0].token;return Object.assign({},{name:c||null},{description:l||null},{image:o||null},u?.creator&&{creator:u.creator},i&&{imageOriginal:i},g&&{imageThumbnail:g},d&&{standard:d.toUpperCase()},p&&{lastSale:p},h&&{attributes:h},s.tokens[0].market?.topBid&&{topBid:s.tokens[0].market?.topBid},m&&{rarityRank:m},f&&{rarity:f},(u||a)&&{collection:{...u||{},creator:u?.creator||a?.collections[0].creator,openseaVerificationStatus:a?.collections[0].openseaVerificationStatus,contractDeployedAt:a?.collections[0].contractDeployedAt,ownerCount:a?.collections[0].ownerCount,topBid:a?.collections[0].topBid}})},y=async function(e,t,r){const n=await P(this,s,"m",k).call(this,e,t,r);let a=n[0];const o=n[1],d=a.startsWith("ipfs://");if(d&&!P(this,u,"f"))return{image:null,name:null,description:null,standard:o||null,favorite:!1,tokenURI:a??null};const m=P(this,c,"f");if(!d&&!m)return{image:null,name:null,description:null,standard:o||null,favorite:!1,tokenURI:a??null};if(d&&(a=await(0,U.getFormattedIpfsUrl)(P(this,i,"f"),a,P(this,l,"f"))),a.startsWith("data:image/"))return{image:a,name:null,description:null,standard:o||null,favorite:!1,tokenURI:a??null};try{const e=await(0,F.handleFetch)(a);return{image:e[Object.prototype.hasOwnProperty.call(e,"image")?"image":"image_url"],name:e.name,description:e.description,standard:o,favorite:!1,tokenURI:a??null}}catch{return{image:null,name:null,description:null,standard:o||null,favorite:!1,tokenURI:a??null}}},k=async function(e,t,r){try{return[await this.messagingSystem.call("AssetsContractController:getERC721TokenURI",e,t,r),F.ERC721]}catch{}try{const s=await this.messagingSystem.call("AssetsContractController:getERC1155TokenURI",e,t,r);if(!s.includes("{id}"))return[s,F.ERC1155];const n=(0,J.remove0x)((0,F.BNToHex)(new V.default(t))).padStart(64,"0").toLowerCase();return[s.replace("{id}",n),F.ERC1155]}catch{}return["",""]},E=async function(e,t,r){const n=P(this,s,"m",j).call(this,{networkClientId:r}),[a,o]=await Promise.all([(0,F.safelyExecute)((()=>P(this,s,"m",y).call(this,e,t,r))),P(this,c,"f")&&"0x1"===n?(0,F.safelyExecute)((()=>P(this,s,"m",b).call(this,e,t))):undefined]);return{...o,name:a?.name??o?.name??null,description:a?.description??o?.description??null,image:o?.image??a?.image??null,standard:a?.standard??o?.standard??null,tokenURI:a?.tokenURI??null}},C=async function(e,t){const[r,s]=await Promise.all([this.messagingSystem.call("AssetsContractController:getERC721AssetName",e,t),this.messagingSystem.call("AssetsContractController:getERC721AssetSymbol",e,t)]);return{collection:{name:r},symbol:s,address:e}},A=async function(e,t,r){const n=await(0,F.safelyExecute)((()=>P(this,s,"m",C).call(this,e,r)));return n||!Object.values(t).every((e=>null===e))?{address:e,...n,schema_name:t?.standard??null,collection:{name:null,image_url:t?.collection?.image??t?.collection?.imageUrl??null,tokenCount:t?.collection?.tokenCount??null,...t?.collection,...n?.collection}}:{address:e,asset_contract_type:null,created_date:null,schema_name:null,symbol:null,total_supply:null,description:null,external_link:null,collection:{name:null,image_url:null}}},S=async function(e,t,r,a,o,i,c){const l=await P(this,n,"f").acquire();try{const n=(0,F.toChecksumHexAddress)(e),{allNfts:l}=this.state,u=[...l[i]?.[o]??[]],m=u.find((e=>e.address.toLowerCase()===n.toLowerCase()&&e.tokenId===t));if(m){const e=(0,U.compareNftMetadata)(r,m),s=(0,U.hasNewCollectionFields)(r,m);if(!e&&m.isCurrentlyOwned&&!s)return;const a=u.findIndex((e=>e.address.toLowerCase()===n.toLowerCase()&&e.tokenId===t));-1!==a&&(u[a]={...m,...r})}else{const e={address:n,tokenId:t,favorite:!1,isCurrentlyOwned:!0,...r};u.push(e)}P(this,s,"m",p).call(this,u,G,{chainId:o,userAddress:i}),P(this,d,"f")&&P(this,d,"f").call(this,{address:n,symbol:a.symbol,tokenId:t.toString(),standard:r.standard,source:c})}finally{l()}},w=async function({tokenAddress:e,userAddress:t,networkClientId:r,source:a,nftMetadata:o}){const i=await P(this,n,"f").acquire();try{const n=(0,F.toChecksumHexAddress)(e),{allNftContracts:i}=this.state,c=P(this,s,"m",j).call(this,{networkClientId:r}),l=i[t]?.[c]||[];if(l.find((e=>e.address.toLowerCase()===n.toLowerCase())))return l;const u=await P(this,s,"m",A).call(this,n,o,r),{asset_contract_type:d,created_date:m,symbol:f,description:h,external_link:g,schema_name:b,collection:{name:y,image_url:k,tokenCount:E}}=u;if(a===$.Source.Detected&&"address"in u&&"string"==typeof u.address&&"collection"in u&&null===u.collection.name&&"image_url"in u.collection&&null===u.collection.image_url&&Object.entries(u).every((([e,t])=>"address"===e||"collection"===e||!t)))return l;const C=Object.assign({},{address:n},h&&{description:h},y&&{name:y},k&&{logo:k},f&&{symbol:f},null!=E&&{totalSupply:E},d&&{assetContractType:d},m&&{createdDate:m},b&&{schemaName:b},g&&{externalLink:g}),S=[...l,C];return P(this,s,"m",p).call(this,S,W,{chainId:c,userAddress:t}),S}finally{i()}},v=function(e,t,{chainId:r,userAddress:n}){const a=(0,F.toChecksumHexAddress)(e),{allNfts:o,ignoredNfts:i}=this.state,c=[...i],l=(o[n]?.[r]||[]).filter((e=>{if(e.address.toLowerCase()===a.toLowerCase()&&e.tokenId===t){return!c.find((e=>e.address===a&&e.tokenId===t))&&c.push(e),!1}return!0}));P(this,s,"m",p).call(this,l,G,{userAddress:n,chainId:r}),this.update((e=>{e.ignoredNfts=c}))},x=function(e,t,{chainId:r,userAddress:n}){const a=(0,F.toChecksumHexAddress)(e),{allNfts:o}=this.state,i=(o[n]?.[r]||[]).filter((e=>!(e.address.toLowerCase()===a.toLowerCase()&&e.tokenId===t)));P(this,s,"m",p).call(this,i,G,{userAddress:n,chainId:r})},T=function(e,{chainId:t,userAddress:r}){const n=(0,F.toChecksumHexAddress)(e),{allNftContracts:a}=this.state,o=(a[r]?.[t]||[]).filter((e=>!(e.address.toLowerCase()===n.toLowerCase())));return P(this,s,"m",p).call(this,o,W,{chainId:t,userAddress:r}),o},_=async function(e,t,r,{networkClientId:s}={}){const{address:n,tokenId:a}=e;if(!t)throw M.rpcErrors.invalidParams("Asset type is required");if(t!==F.ERC721&&t!==F.ERC1155)throw M.rpcErrors.invalidParams(`Non NFT asset type ${t} not supported by watchNft`);if(!n||!a)throw M.rpcErrors.invalidParams("Both address and tokenId are required");if(!(0,N.isAddress)(n))throw M.rpcErrors.invalidParams("Invalid address");if(!/^\d+$/u.test(a))throw M.rpcErrors.invalidParams("Invalid tokenId");try{if(!await this.isNftOwner(r,n,a,{networkClientId:s}))throw M.rpcErrors.invalidInput("Suggested NFT is not owned by the selected account")}catch(e){if(e instanceof Error)throw M.rpcErrors.resourceUnavailable(e.message);throw e}},j=function({networkClientId:e}){if(e){const{configuration:{chainId:t}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return t}return P(this,o,"f")},R=function(e){if(e)return e;const t=this.messagingSystem.call("AccountsController:getAccount",P(this,a,"f"));return t?.address||""},I=async function(e){const t=(this.state.allNfts[e.address]?.[P(this,o,"f")]??[]).filter((e=>!e.name&&!e.description&&!e.image));0!==t.length&&await this.updateNftMetadata({nfts:t,userAddress:e.address})},r.default=K}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/NftController.cjs"}],[1366,{"./assetsUtil.cjs":1377,"./constants.cjs":1378,"@metamask/base-controller":1396,"@metamask/controller-utils":1422,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},m=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.NftDetectionController=r.MAX_GET_COLLECTION_BATCH_SIZE=r.BlockaidResultType=void 0;const f=e("@metamask/base-controller"),h=e("@metamask/controller-utils"),p=e("@metamask/utils"),g=e("./assetsUtil.cjs"),b=e("./constants.cjs"),y=[h.ChainId.mainnet,h.ChainId["linea-mainnet"]];var k;!function(e){e.Benign="Benign",e.Spam="Spam",e.Warning="Warning",e.Malicious="Malicious"}(k||(r.BlockaidResultType=k={})),r.MAX_GET_COLLECTION_BATCH_SIZE=20;class E extends f.BaseController{constructor({messenger:e,disabled:t=!1,addNft:r,getNftState:l}){super({name:"NftDetectionController",messenger:e,metadata:{},state:{}}),s.add(this),n.set(this,void 0),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),d(this,n,t,"f"),d(this,i,{},"f"),d(this,o,l,"f"),d(this,a,r,"f"),this.messagingSystem.subscribe("PreferencesController:stateChange",m(this,s,"m",c).bind(this))}isMainnet(){const{selectedNetworkClientId:e}=this.messagingSystem.call("NetworkController:getState"),{configuration:{chainId:t}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return t===h.ChainId.mainnet}isMainnetByNetworkClientId(e){return e.configuration.chainId===h.ChainId.mainnet}async detectNfts(e){const t=e?.userAddress??this.messagingSystem.call("AccountsController:getSelectedAccount").address,{selectedNetworkClientId:c}=this.messagingSystem.call("NetworkController:getState"),{configuration:{chainId:l}}=this.messagingSystem.call("NetworkController:getNetworkClientById",c);if(!y.includes(l)||m(this,n,"f"))return;if(!t)return;const d=`${l}:${t}`;if(d in m(this,i,"f"))return void await m(this,i,"f")[d];const{promise:f,resolve:E,reject:C}=(0,p.createDeferredPromise)({suppressUnhandledRejection:!0});let A;m(this,i,"f")[d]=f;let S,w=[];try{do{S=await m(this,s,"m",u).call(this,t,l,A),w=S.tokens.filter((e=>!1===e.token.isSpam&&(!e.blockaidResult?.result_type||e.blockaidResult?.result_type===k.Benign)));const n=w.reduce(((e,t)=>(e.includes(t.token.contract)||t.token.contract!==t?.token?.collection?.id||e.push(t.token.contract),e)),[]);if(0!==n.length){const e=await(0,g.reduceInBatchesSerially)({values:n,batchSize:r.MAX_GET_COLLECTION_BATCH_SIZE,eachBatch:async(e,t)=>{const r=new URLSearchParams(t.map((e=>["contract",e])));r.append("chainId","1");return{...e,...await(0,h.fetchWithErrorHandling)({url:`${h.NFT_API_BASE_URL}/collections?${r.toString()}`,options:{headers:{Version:h.NFT_API_VERSION}},timeout:h.NFT_API_TIMEOUT})}},initialResult:{}});e.collections?.length&&w.forEach((t=>{const r=e.collections.find((e=>e.id?.toLowerCase()===t.token.contract.toLowerCase()));r&&(t.token={...t.token,collection:{...t.token.collection??{},creator:r?.creator,openseaVerificationStatus:r?.openseaVerificationStatus,contractDeployedAt:r.contractDeployedAt,ownerCount:r.ownerCount,topBid:r.topBid}})}))}const i=w.map((async r=>{const{tokenId:s,contract:n,kind:i,image:c,imageSmall:l,metadata:{imageOriginal:u}={},name:d,description:f,attributes:p,topBid:g,lastSale:y,rarityRank:k,rarityScore:E,collection:C}=r.token;let A;const{ignoredNfts:S}=m(this,o,"f").call(this);if(S.length&&(A=S.find((e=>e.address===(0,h.toChecksumHexAddress)(n)&&e.tokenId===s))),!A){const r=Object.assign({},{name:d},f&&{description:f},c&&{image:c},l&&{imageThumbnail:l},u&&{imageOriginal:u},i&&{standard:i.toUpperCase()},y&&{lastSale:y},p&&{attributes:p},g&&{topBid:g},k&&{rarityRank:k},E&&{rarityScore:E},C&&{collection:C});await m(this,a,"f").call(this,n,s,{nftMetadata:r,userAddress:t,source:b.Source.Detected,networkClientId:e?.networkClientId})}}));await Promise.all(i)}while(A=S.continuation);E()}catch(e){throw C(e),e}finally{delete m(this,i,"f")[d]}}}r.NftDetectionController=E,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakSet,c=function({useNftDetection:e}){!e!==m(this,n,"f")&&d(this,n,!e,"f")},l=function({chainId:e,address:t,next:r}){return`${h.NFT_API_BASE_URL}/users/${t}/tokens?chainIds=${e}&limit=50&includeTopBid=true&continuation=${r??""}`},u=async function(e,t,r){const n=(0,h.convertHexToDecimal)(t).toString(),a=m(this,s,"m",l).call(this,{chainId:n,address:e,next:r});return await(0,h.handleFetch)(a,{headers:{Version:h.NFT_API_VERSION}})},r.default=E}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/NftDetectionController.cjs"}],[1367,{"../crypto-compare-service/index.cjs":1380,"@metamask/base-controller":1396,"async-mutex":3450},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},f=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.RatesController=r.Cryptocurrency=r.name=void 0;const h=e("@metamask/base-controller"),p=e("async-mutex"),g=e("../crypto-compare-service/index.cjs");var b;r.name="RatesController",function(e){e.Btc="btc",e.Solana="sol"}(b||(r.Cryptocurrency=b={}));const y={fiatCurrency:{persist:!0,anonymous:!0},rates:{persist:!0,anonymous:!0},cryptocurrencies:{persist:!0,anonymous:!0}},k={fiatCurrency:"usd",rates:{[b.Btc]:{conversionDate:0,conversionRate:0},[b.Solana]:{conversionDate:0,conversionRate:0}},cryptocurrencies:[b.Btc,b.Solana]};class E extends h.BaseController{constructor({interval:e=18e4,messenger:t,state:l,includeUsdRate:u,fetchMultiExchangeRate:d=g.fetchMultiExchangeRate}){super({name:r.name,metadata:y,messenger:t,state:{...k,...l}}),s.add(this),n.set(this,new p.Mutex),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),c.set(this,void 0),m(this,o,u,"f"),m(this,a,d,"f"),m(this,i,e,"f")}async start(){f(this,c,"f")||(this.messagingSystem.publish(`${r.name}:pollingStarted`),m(this,c,setInterval((()=>{f(this,s,"m",u).call(this).catch(console.error)}),f(this,i,"f")),"f"))}async stop(){f(this,c,"f")&&(clearInterval(f(this,c,"f")),m(this,c,undefined,"f"),this.messagingSystem.publish(`${r.name}:pollingStopped`))}getCryptocurrencyList(){const{cryptocurrencies:e}=this.state;return e}async setCryptocurrencyList(e){await f(this,s,"m",l).call(this,(()=>{this.update((t=>({...t,cryptocurrencies:e})))}))}async setFiatCurrency(e){if(""===e)throw new Error("The currency can not be an empty string");await f(this,s,"m",l).call(this,(()=>{this.update((t=>({...t,fiatCurrency:e})))})),await f(this,s,"m",d).call(this)}}r.RatesController=E,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,c=new WeakMap,s=new WeakSet,l=async function(e){const t=await f(this,n,"f").acquire();try{return e()}finally{t()}},u=async function(){await f(this,s,"m",d).call(this)},d=async function(){await f(this,s,"m",l).call(this,(async()=>{const{fiatCurrency:e,cryptocurrencies:t}=this.state,r=await f(this,a,"f").call(this,e,t,f(this,o,"f")),s={};for(const[t,n]of Object.entries(r))s[t]={conversionDate:Date.now(),conversionRate:n[e],...f(this,o,"f")&&{usdConversionRate:n.usd}};this.update((e=>({...e,rates:s})))}))}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/RatesController/RatesController.cjs"}],[1368,{"./RatesController.cjs":1367},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Cryptocurrency=r.RatesController=void 0;var s=e("./RatesController.cjs");Object.defineProperty(r,"RatesController",{enumerable:!0,get:function(){return s.RatesController}}),Object.defineProperty(r,"Cryptocurrency",{enumerable:!0,get:function(){return s.Cryptocurrency}})}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/RatesController/index.cjs"}],[1369,{"../assetsUtil.cjs":1377,"@ethereumjs/util":478,"@ethersproject/contracts":523,"@metamask/abi-utils":1307,"@metamask/controller-utils":1422,"@metamask/metamask-eth-abis":1944,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERC20Standard=void 0;const s=e("@ethereumjs/util"),n=e("@ethersproject/contracts"),a=e("@metamask/abi-utils"),o=e("@metamask/controller-utils"),i=e("@metamask/metamask-eth-abis"),c=e("@metamask/utils"),l=e("../assetsUtil.cjs");r.ERC20Standard=class{constructor(e){this.provider=e}async getBalanceOf(e,t){const r=new n.Contract(e,i.abiERC20,this.provider),s=await r.balanceOf(t);return(0,l.ethersBigNumberToBN)(s)}async getTokenDecimals(e){const t=new n.Contract(e,i.abiERC20,this.provider);try{return(await t.decimals()).toString()}catch(e){if(e instanceof Error&&e.message.includes("call revert exception"))throw new Error("Failed to parse token decimals");throw e}}async getTokenName(e){const t=new n.Contract(e,i.abiERC20,this.provider);try{return(await t.name()).toString()}catch(e){if(e instanceof Error&&e.message.includes("call revert exception"))throw new Error("Failed to parse token name");throw e}}async getTokenSymbol(e){const t={to:e,data:"0x95d89b41"},r=await this.provider.call(t);(0,c.assertIsStrictHexString)(r);try{const e=(0,a.decodeSingle)("string",r);if(e?.length>0)return e}catch{}try{const e=(0,s.toUtf8)(r);if(e.length>0)return e}catch{}throw new Error("Failed to parse token symbol")}async getDetails(e,t){const[r,s,n]=await Promise.all([this.getTokenDecimals(e),this.getTokenSymbol(e),t?this.getBalanceOf(e,t):undefined]);return{decimals:r,symbol:s,balance:n,standard:o.ERC20}}}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/Standards/ERC20Standard.cjs"}],[1370,{"../../../assetsUtil.cjs":1377,"@ethersproject/contracts":523,"@metamask/controller-utils":1422,"@metamask/metamask-eth-abis":1944},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERC1155Standard=void 0;const s=e("@ethersproject/contracts"),n=e("@metamask/controller-utils"),a=e("@metamask/metamask-eth-abis"),o=e("../../../assetsUtil.cjs");r.ERC1155Standard=class{constructor(e){this.provider=e}async contractSupportsURIMetadataInterface(e){return this.contractSupportsInterface(e,n.ERC1155_METADATA_URI_INTERFACE_ID)}async contractSupportsTokenReceiverInterface(e){return this.contractSupportsInterface(e,n.ERC1155_TOKEN_RECEIVER_INTERFACE_ID)}async contractSupportsBase1155Interface(e){return this.contractSupportsInterface(e,n.ERC1155_INTERFACE_ID)}async getTokenURI(e,t){return new s.Contract(e,a.abiERC1155,this.provider).uri(t)}async getBalanceOf(e,t,r){const n=new s.Contract(e,a.abiERC1155,this.provider),i=await n.balanceOf(t,r);return(0,o.ethersBigNumberToBN)(i)}async transferSingle(e,t,r,n,o){const i=new s.Contract(e,a.abiERC1155,this.provider);return new Promise(((s,a)=>{i.transferSingle(e,t,r,n,o,((e,t)=>{e?a(e):s(t)}))}))}async getAssetSymbol(e){return new s.Contract(e,[{inputs:[],name:"symbol",outputs:[{name:"_symbol",type:"string"}],stateMutability:"view",type:"function",payable:!1}],this.provider).symbol()}async getAssetName(e){return new s.Contract(e,[{inputs:[],name:"name",outputs:[{name:"_name",type:"string"}],stateMutability:"view",type:"function",payable:!1}],this.provider).name()}async contractSupportsInterface(e,t){return new s.Contract(e,a.abiERC1155,this.provider).supportsInterface(t)}async getDetails(e,t,r){if(!await this.contractSupportsBase1155Interface(e))throw new Error("This isn't a valid ERC1155 contract");let s;const[a,i,c]=await Promise.all([(0,n.safelyExecute)((()=>this.getAssetSymbol(e))),(0,n.safelyExecute)((()=>this.getAssetName(e))),r?(0,n.safelyExecute)((()=>this.getTokenURI(e,r).then((e=>e.startsWith("ipfs://")?(0,o.getFormattedIpfsUrl)(t,e,!0):e)))):undefined]);if(c)try{const e=await(0,n.timeoutFetch)(c),r=await e.json();s=r?.image,s?.startsWith("ipfs://")&&(s=(0,o.getFormattedIpfsUrl)(t,s,!0))}catch{}return{standard:n.ERC1155,tokenURI:c,image:s,symbol:a,name:i}}}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/Standards/NftStandards/ERC1155/ERC1155Standard.cjs"}],[1371,{"../../../assetsUtil.cjs":1377,"@ethersproject/contracts":523,"@metamask/controller-utils":1422,"@metamask/metamask-eth-abis":1944},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERC721Standard=void 0;const s=e("@ethersproject/contracts"),n=e("@metamask/controller-utils"),a=e("@metamask/metamask-eth-abis"),o=e("../../../assetsUtil.cjs");r.ERC721Standard=class{constructor(e){this.contractSupportsMetadataInterface=async e=>this.contractSupportsInterface(e,n.ERC721_METADATA_INTERFACE_ID),this.contractSupportsEnumerableInterface=async e=>this.contractSupportsInterface(e,n.ERC721_ENUMERABLE_INTERFACE_ID),this.contractSupportsBase721Interface=async e=>this.contractSupportsInterface(e,n.ERC721_INTERFACE_ID),this.getNftTokenId=async(e,t,r)=>new s.Contract(e,a.abiERC721,this.provider).tokenOfOwnerByIndex(t,r),this.getTokenURI=async(e,t)=>{const r=new s.Contract(e,a.abiERC721,this.provider);return await this.contractSupportsMetadataInterface(e)||console.error("Contract does not support ERC721 metadata interface."),r.tokenURI(t)},this.getAssetName=async e=>new s.Contract(e,a.abiERC721,this.provider).name(),this.getAssetSymbol=async e=>new s.Contract(e,a.abiERC721,this.provider).symbol(),this.contractSupportsInterface=async(e,t)=>{const r=new s.Contract(e,a.abiERC721,this.provider);try{return await r.supportsInterface(t)}catch(e){if(e instanceof Error&&e.message.includes("call revert exception"))return!1;throw e}},this.getDetails=async(e,t,r)=>{if(!await this.contractSupportsBase721Interface(e))throw new Error("This isn't a valid ERC721 contract");const[s,a,i]=await Promise.all([(0,n.safelyExecute)((()=>this.getAssetSymbol(e))),(0,n.safelyExecute)((()=>this.getAssetName(e))),r?(0,n.safelyExecute)((()=>this.getTokenURI(e,r).then((e=>e.startsWith("ipfs://")?(0,o.getFormattedIpfsUrl)(t,e,!0):e)))):undefined]);let c;if(i)try{const e=await(0,n.timeoutFetch)(i),r=await e.json();c=r?.image,c?.startsWith("ipfs://")&&(c=(0,o.getFormattedIpfsUrl)(t,c,!0))}catch{}return{standard:n.ERC721,tokenURI:i,symbol:s,name:a,image:c}},this.provider=e}async getOwnerOf(e,t){return new s.Contract(e,a.abiERC721,this.provider).ownerOf(t)}}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/Standards/NftStandards/ERC721/ERC721Standard.cjs"}],[1372,{"./multicall.cjs":1384,"@ethersproject/contracts":523,"@ethersproject/providers":561,"@metamask/controller-utils":1422,"@metamask/metamask-eth-abis":1944,"@metamask/polling-controller":1391,lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m,f=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},h=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.TokenBalancesController=r.getDefaultTokenBalancesState=void 0;const p=e("@ethersproject/contracts"),g=e("@ethersproject/providers"),b=e("@metamask/controller-utils"),y=e("@metamask/metamask-eth-abis"),k=e("@metamask/polling-controller"),E=e("lodash"),C=e("./multicall.cjs"),A={tokenBalances:{persist:!0,anonymous:!1}};function S(){return{tokenBalances:{}}}r.getDefaultTokenBalancesState=S;class w extends((0,k.StaticIntervalPollingController)()){constructor({interval:e=18e4,messenger:t,state:r={}}){var m,p;super({name:"TokenBalancesController",metadata:A,messenger:t,state:{tokenBalances:{},...r}}),s.add(this),n.set(this,void 0),a.set(this,void 0),o.set(this,void 0),i.set(this,(({isMultiAccountBalancesEnabled:e,useMultiAccountBalanceChecker:t})=>Boolean(e||t))),c.set(this,(e=>{const t=f(this,i,"f").call(this,e),r=t&&!f(this,n,"f");h(this,n,t,"f"),r&&this.updateBalances().catch(console.error)})),l.set(this,(({allTokens:e,allDetectedTokens:t})=>{const r=f(this,d,"f").call(this,e,t).filter((r=>!(0,E.isEqual)(f(this,a,"f")[r],e[r])||!(0,E.isEqual)(f(this,o,"f")[r],t[r])));h(this,a,e,"f"),h(this,o,t,"f"),this.updateBalances({chainIds:r}).catch(console.error)})),d.set(this,((e,t)=>[...new Set([...Object.keys(e),...Object.keys(t)])])),this.setIntervalLength(e),h(this,n,f(this,i,"f").call(this,this.messagingSystem.call("PreferencesController:getState")),"f"),this.messagingSystem.subscribe("PreferencesController:stateChange",f(this,c,"f").bind(this)),m=this,p=this,({allTokens:{set value(e){h(m,a,e,"f")}}.value,allDetectedTokens:{set value(e){h(p,o,e,"f")}}.value}=this.messagingSystem.call("TokensController:getState")),this.messagingSystem.subscribe("TokensController:stateChange",f(this,l,"f").bind(this)),this.messagingSystem.subscribe("NetworkController:stateChange",f(this,s,"m",u).bind(this))}async _executePoll({chainId:e}){await this.updateBalancesByChainId({chainId:e})}async updateBalances({chainIds:e}={}){e??(e=f(this,d,"f").call(this,f(this,a,"f"),f(this,o,"f"))),await Promise.allSettled(e.map((e=>this.updateBalancesByChainId({chainId:e}))))}async updateBalancesByChainId({chainId:e}){const{address:t}=this.messagingSystem.call("AccountsController:getSelectedAccount"),r=[],i=([e,s])=>f(this,n,"f")||(e=>(0,b.toChecksumHexAddress)(e)===(0,b.toChecksumHexAddress)(t))(e)?s.forEach((t=>r.push({accountAddress:e,tokenAddress:t.address}))):undefined;Object.entries(f(this,a,"f")[e]??{}).forEach(i),Object.entries(f(this,o,"f")[e]??{}).forEach(i);let c=[];if(r.length>0){const t=new g.Web3Provider(f(this,s,"m",m).call(this,e).provider),n=r.map((({accountAddress:e,tokenAddress:r})=>({contract:new p.Contract(r,y.abiERC20,t),functionSignature:"balanceOf(address)",arguments:[e]})));c=await(0,C.multicallOrFallback)(n,e,t)}this.update((t=>{var s,n;for(const r of Object.keys(t.tokenBalances))t.tokenBalances[r][e]={};for(let a=0;a({tokenBalances:{}})))}}r.TokenBalancesController=w,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,c=new WeakMap,l=new WeakMap,d=new WeakMap,s=new WeakSet,u=function(e,t){for(const e of t)if("remove"===e.op&&"networkConfigurationsByChainId"===e.path[0]){const t=e.path[1];this.update((e=>{for(const r of Object.keys(e.tokenBalances))delete e.tokenBalances[r][t]}))}},m=function(e){const{networkConfigurationsByChainId:t}=this.messagingSystem.call("NetworkController:getState"),r=t[e];if(!r)throw new Error(`TokenBalancesController: No network configuration found for chainId ${e}`);const{networkClientId:s}=r.rpcEndpoints[r.defaultRpcEndpointIndex];return this.messagingSystem.call("NetworkController:getNetworkClientById",s)},r.default=w}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/TokenBalancesController.cjs"}],[1373,{"./assetsUtil.cjs":1377,"./multi-chain-accounts-service/index.cjs":1382,"@metamask/contract-metadata":1420,"@metamask/controller-utils":1422,"@metamask/polling-controller":1391,"@metamask/utils":2761,lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m,f,h,p,g,b,y,k,E,C,A,S,w,v,x,T,_,j,R,I,B,P,D=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},N=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},O=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.TokenDetectionController=r.controllerName=r.mapChainIdWithTokenListMap=r.STATIC_MAINNET_TOKEN_LIST=void 0;const F=O(e("@metamask/contract-metadata")),M=e("@metamask/controller-utils"),J=e("@metamask/polling-controller"),L=e("@metamask/utils"),V=e("lodash"),H=e("./assetsUtil.cjs"),U=e("./multi-chain-accounts-service/index.cjs"),$=18e4;function z(e){return(0,V.mapValues)(e,(e=>(0,V.isObject)(e)&&"data"in e?(0,V.get)(e,["data"]):e))}r.STATIC_MAINNET_TOKEN_LIST=Object.entries(F.default).reduce(((e,[t,r])=>{const{logo:s,erc20:n,erc721:a,...o}=r;return{...e,[t.toLowerCase()]:{...o,address:t.toLowerCase(),iconUrl:`images/contract/${s}`,aggregators:[]}}}),{}),r.mapChainIdWithTokenListMap=z,r.controllerName="TokenDetectionController";class G extends((0,J.StaticIntervalPollingController)()){constructor({interval:e=18e4,disabled:t=!0,getBalancesInSingleCall:g,trackMetaMetricsEvent:b,messenger:y,useAccountsAPI:k=!0,platform:C}){super({name:r.controllerName,messenger:y,state:{},metadata:{}}),s.add(this),n.set(this,void 0),a.set(this,void 0),o.set(this,void 0),i.set(this,{}),c.set(this,void 0),l.set(this,void 0),u.set(this,void 0),d.set(this,void 0),m.set(this,void 0),f.set(this,void 0),h.set(this,{isAccountsAPIEnabled:!0,supportedNetworksCache:null,platform:"",async getSupportedNetworks(){if(!this.isAccountsAPIEnabled)throw new Error("Accounts API Feature Switch is disabled");if(this.supportedNetworksCache)return this.supportedNetworksCache;const e=await(0,U.fetchSupportedNetworks)().catch((()=>null));return this.supportedNetworksCache=e,e},async getMultiNetworksBalances(e,t,r){const s=t.map((e=>(0,L.hexToNumber)(e)));if(!r||!s.every((e=>r.includes(e)))){const e=(r??[]).toString();throw new Error(`Unsupported Network: supported networks ${e}, requested networks: ${s.toString()}`)}return(await(0,U.fetchMultiChainBalances)(e,{networks:s},this.platform)).balances}}),D(this,c,t,"f"),this.setIntervalLength(e),D(this,a,N(this,s,"m",B).call(this).id,"f");const{chainId:A,networkClientId:S}=N(this,s,"m",E).call(this);D(this,o,S,"f");const{tokensChainsCache:w}=this.messagingSystem.call("TokenListController:getState");D(this,i,w,"f");const{useTokenDetection:v}=this.messagingSystem.call("PreferencesController:getState");D(this,u,v,"f"),D(this,d,(0,H.isTokenDetectionSupportedForNetwork)(A),"f"),D(this,m,g,"f"),D(this,f,b,"f");const{isUnlocked:x}=this.messagingSystem.call("KeyringController:getState");D(this,l,x,"f"),N(this,h,"f").isAccountsAPIEnabled=k,N(this,h,"f").platform=C,N(this,s,"m",p).call(this)}enable(){D(this,c,!1,"f")}disable(){D(this,c,!0,"f")}get isActive(){return!N(this,c,"f")&&N(this,l,"f")}async start(){this.enable(),await N(this,s,"m",b).call(this)}stop(){this.disable(),N(this,s,"m",g).call(this)}async _executePoll({chainIds:e,address:t}){this.isActive&&await this.detectTokens({chainIds:e,selectedAddress:t})}async detectTokens({chainIds:e,selectedAddress:t}={}){if(!this.isActive)return;const r=t??N(this,s,"m",P).call(this),n=N(this,s,"m",k).call(this,e);let a;N(this,h,"f").isAccountsAPIEnabled&&(a=await N(this,h,"f").getSupportedNetworks());const{chainsToDetectUsingRpc:o,chainsToDetectUsingAccountAPI:i}=N(this,s,"m",A).call(this,n,a);if(a&&i.length>0){const e=await N(this,s,"m",S).call(this,i,r,a);"failed"===e?.result&&N(this,s,"m",w).call(this,o,i,n)}o.length>0&&await N(this,s,"m",x).call(this,o,r)}}r.TokenDetectionController=G,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,m=new WeakMap,f=new WeakMap,h=new WeakMap,s=new WeakSet,p=function(){this.messagingSystem.subscribe("KeyringController:unlock",(async()=>{D(this,l,!0,"f"),await N(this,s,"m",C).call(this)})),this.messagingSystem.subscribe("KeyringController:lock",(()=>{D(this,l,!1,"f"),N(this,s,"m",g).call(this)})),this.messagingSystem.subscribe("TokenListController:stateChange",(async({tokensChainsCache:e})=>{N(this,s,"m",y).call(this,e,N(this,i,"f"))||await N(this,s,"m",C).call(this)})),this.messagingSystem.subscribe("PreferencesController:stateChange",(async({useTokenDetection:e})=>{const t=N(this,s,"m",B).call(this),r=N(this,u,"f")!==e;D(this,u,e,"f"),r&&await N(this,s,"m",C).call(this,{selectedAddress:t.address})})),this.messagingSystem.subscribe("AccountsController:selectedEvmAccountChange",(async e=>{const{networkConfigurationsByChainId:t}=this.messagingSystem.call("NetworkController:getState"),r=Object.keys(t);N(this,a,"f")!==e.id&&(D(this,a,e.id,"f"),await N(this,s,"m",C).call(this,{selectedAddress:e.address,chainIds:r}))}))},g=function(){N(this,n,"f")&&clearInterval(N(this,n,"f"))},b=async function(){this.isActive&&(N(this,s,"m",g).call(this),await this.detectTokens(),D(this,n,setInterval((async()=>{await this.detectTokens()}),this.getIntervalLength()),"f"))},y=function(e,t){const r=z(t),s=z(e);return(0,V.isEqual)(s,r)},k=function(e){const{networkConfigurationsByChainId:t,selectedNetworkClientId:r}=this.messagingSystem.call("NetworkController:getState");if(!e){const e=this.messagingSystem.call("NetworkController:getNetworkConfigurationByNetworkClientId",r);return[{chainId:e?.chainId??M.ChainId.mainnet,networkClientId:r}]}return e.map((e=>{const r=t[e];return{chainId:e,networkClientId:r.rpcEndpoints[r.defaultRpcEndpointIndex].networkClientId}}))},E=function(){const{selectedNetworkClientId:e}=this.messagingSystem.call("NetworkController:getState"),{configuration:{chainId:t}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return{chainId:t,networkClientId:e}},C=async function({selectedAddress:e,chainIds:t}={}){await this.detectTokens({chainIds:t,selectedAddress:e}),this.setIntervalLength($)},A=function(e,t){const r=[],s=[];return e.forEach((({chainId:e,networkClientId:n})=>{t?.includes((0,L.hexToNumber)(e))?r.push(e):s.push({chainId:e,networkClientId:n})})),{chainsToDetectUsingRpc:s,chainsToDetectUsingAccountAPI:r}},S=async function(e,t,r){return await N(this,s,"m",j).call(this,{chainIds:e,selectedAddress:t,supportedNetworks:r})},w=function(e,t,r){t.forEach((t=>{const s=r.find((e=>e.chainId===t));s&&e.push({chainId:s.chainId,networkClientId:s.networkClientId})}))},v=function(e){if(!(0,H.isTokenDetectionSupportedForNetwork)(e))return!1;if(!N(this,u,"f")&&e!==M.ChainId.mainnet)return!1;if(!N(this,u,"f")&&e===M.ChainId.mainnet)D(this,i,N(this,s,"m",_).call(this),"f");else{const{tokensChainsCache:e}=this.messagingSystem.call("TokenListController:getState");D(this,i,e??{},"f")}return!0},x=async function(e,t){for(const{chainId:r,networkClientId:n}of e){if(!N(this,s,"m",v).call(this,r))continue;const e=N(this,s,"m",T).call(this,{chainId:r,selectedAddress:t}).map((e=>N(this,s,"m",I).call(this,{tokensSlice:e,selectedAddress:t,networkClientId:n,chainId:r})));await Promise.all(e)}},T=function({chainId:e,selectedAddress:t}){const{allTokens:r,allDetectedTokens:s,allIgnoredTokens:n}=this.messagingSystem.call("TokensController:getState"),[a,o,c]=[r,s,n].map((r=>(r[e]?.[t]??[]).map((e=>"string"==typeof e?e:e.address)))),l=[];for(const t of Object.keys(N(this,i,"f")?.[e]?.data||{}))[a,o,c].every((e=>!e.find((e=>(0,M.isEqualCaseInsensitive)(e,t)))))&&l.push(t);const u=[];for(let e=0,t=1e3;e({...e,[t]:{name:r.name,symbol:r.symbol,decimals:r.decimals,address:r.address,aggregators:[],iconUrl:r?.iconUrl}})),{}),timestamp:0}}},j=async function({selectedAddress:e,chainIds:t,supportedNetworks:r}){return await(0,M.safelyExecute)((async()=>{const n=await N(this,h,"f").getMultiNetworksBalances(e,t,r).catch((()=>null));if(null===n)return{result:"failed"};for(const r of t){const t=!N(this,u,"f")&&r===M.ChainId.mainnet,{tokensChainsCache:a}=this.messagingSystem.call("TokenListController:getState");D(this,i,t?N(this,s,"m",_).call(this):a??{},"f");const o=N(this,s,"m",T).call(this,{chainId:r,selectedAddress:e}),c=n.filter((e=>e.chainId===(0,L.hexToNumber)(r)));if(!c||0===c.length)continue;const{tokensWithBalance:l,eventTokensDetails:d}=N(this,s,"m",R).call(this,o,c,r);l.length&&(N(this,f,"f").call(this,{event:"Token Detected",category:"Wallet",properties:{tokens:d,token_standard:M.ERC20,asset_type:M.ASSET_TYPES.TOKEN}}),await this.messagingSystem.call("TokensController:addDetectedTokens",l,{selectedAddress:e,chainId:r}))}return{result:"success"}}))},R=function(e,t,r){const s=[],n=[],a=new Set(e.flat());return t?.forEach((e=>{const t=e.address;if(!a.has(t))return;const o=N(this,i,"f")[r]?.data[t];if(!o)return;const{decimals:c,symbol:l,aggregators:u,iconUrl:d,name:m}=o;n.push(`${l} - ${t}`),s.push({address:t,decimals:c,symbol:l,aggregators:u,image:d,isERC721:!1,name:m})})),{tokensWithBalance:s,eventTokensDetails:n}},I=async function({tokensSlice:e,selectedAddress:t,networkClientId:r,chainId:s}){await(0,M.safelyExecute)((async()=>{const n=await N(this,m,"f").call(this,t,e,r),a=[],o=[];for(const e of Object.keys(n)){const{decimals:t,symbol:r,aggregators:n,iconUrl:c,name:l}=N(this,i,"f")[s].data[e];o.push(`${r} - ${e}`),a.push({address:e,decimals:t,symbol:r,aggregators:n,image:c,isERC721:!1,name:l})}a.length&&(N(this,f,"f").call(this,{event:"Token Detected",category:"Wallet",properties:{tokens:o,token_standard:M.ERC20,asset_type:M.ASSET_TYPES.TOKEN}}),await this.messagingSystem.call("TokensController:addDetectedTokens",a,{selectedAddress:t,chainId:s}))}))},B=function(){return this.messagingSystem.call("AccountsController:getSelectedAccount")},P=function(){const e=this.messagingSystem.call("AccountsController:getAccount",N(this,a,"f"));return e?.address||""},r.default=G}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/TokenDetectionController.cjs"}],[1374,{"./assetsUtil.cjs":1377,"./token-service.cjs":1387,"@metamask/controller-utils":1422,"@metamask/polling-controller":1391,"async-mutex":3450},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.TokenListController=r.getDefaultTokenListState=void 0;const c=e("@metamask/controller-utils"),l=e("@metamask/polling-controller"),u=e("async-mutex"),d=e("./assetsUtil.cjs"),m=e("./token-service.cjs"),f={tokenList:{persist:!0,anonymous:!0},tokensChainsCache:{persist:!0,anonymous:!0},preventPollingOnNetworkRestart:{persist:!0,anonymous:!0}};r.getDefaultTokenListState=()=>({tokenList:{},tokensChainsCache:{},preventPollingOnNetworkRestart:!1});class h extends((0,l.StaticIntervalPollingController)()){constructor({chainId:e,preventPollingOnNetworkRestart:t=!1,onNetworkStateChange:a,interval:o=864e5,cacheRefreshThreshold:c=864e5,messenger:l,state:d}){super({name:"TokenListController",metadata:f,messenger:l,state:{...(0,r.getDefaultTokenListState)(),...d}}),s.add(this),this.mutex=new u.Mutex,this.intervalDelay=o,this.setIntervalLength(o),this.cacheRefreshThreshold=c,this.chainId=e,this.updatePreventPollingOnNetworkRestart(t),this.abortController=new AbortController,a?a((async e=>{await i(this,s,"m",n).call(this,e)})):this.messagingSystem.subscribe("NetworkController:stateChange",(async e=>{await i(this,s,"m",n).call(this,e)}))}async start(){(0,d.isTokenListSupportedForNetwork)(this.chainId)&&await i(this,s,"m",a).call(this)}async restart(){this.stopPolling(),await i(this,s,"m",a).call(this)}stop(){this.stopPolling()}destroy(){super.destroy(),this.stopPolling()}stopPolling(){this.intervalId&&clearInterval(this.intervalId)}async _executePoll({chainId:e}){return this.fetchTokenList(e)}async fetchTokenList(e){const t=await this.mutex.acquire();try{const{tokensChainsCache:t}=this.state;let r={};const n=await(0,c.safelyExecute)((()=>i(this,s,"m",o).call(this,e)));if(n)r={...n};else{const s=await(0,c.safelyExecute)((()=>(0,m.fetchTokenListByChainId)(e,this.abortController.signal)));if(s){r={};for(const t of s)r[t.address]={...t,aggregators:(0,d.formatAggregatorNames)(t.aggregators),iconUrl:(0,d.formatIconUrlWithProxy)({chainId:e,tokenAddress:t.address})}}else r={...t[e]?.data||{}}}this.update((()=>({...this.state,tokenList:this.chainId===e?r:this.state.tokenList,tokensChainsCache:{...t,[e]:{timestamp:Date.now(),data:r}}})))}finally{t()}}clearingTokenListData(){this.update((()=>({...this.state,tokenList:{},tokensChainsCache:{}})))}updatePreventPollingOnNetworkRestart(e){this.update((()=>({...this.state,preventPollingOnNetworkRestart:e})))}}r.TokenListController=h,s=new WeakSet,n=async function(e){const t=this.messagingSystem.call("NetworkController:getNetworkClientById",e.selectedNetworkClientId),{chainId:r}=t.configuration;this.chainId!==r&&(this.abortController.abort(),this.abortController=new AbortController,this.chainId=r,this.state.preventPollingOnNetworkRestart?this.clearingTokenListData():this.update((()=>({...this.state,tokenList:this.state.tokensChainsCache[this.chainId]?.data||{}}))))},a=async function(){await(0,c.safelyExecute)((()=>this.fetchTokenList(this.chainId))),this.intervalId=setInterval((async()=>{await(0,c.safelyExecute)((()=>this.fetchTokenList(this.chainId)))}),this.intervalDelay)},o=async function(e){const{tokensChainsCache:t}=this.state,r=t[e],s=Date.now();return r?.data&&s-r?.timestamp({marketData:{}});class M extends((0,j.StaticIntervalPollingController)()){constructor({interval:e=18e4,disabled:t=!1,tokenPricesService:b,messenger:C,state:A}){super({name:r.controllerName,messenger:C,state:{...(0,r.getDefaultTokenRatesControllerState)(),...A},metadata:F}),s.add(this),n.set(this,void 0),a.set(this,N.Inactive),o.set(this,void 0),i.set(this,{}),c.set(this,void 0),l.set(this,void 0),u.set(this,void 0),d.set(this,void 0),m.set(this,void 0),f.set(this,void 0),h.set(this,void 0),this.setIntervalLength(e),x(this,o,b,"f"),x(this,l,t,"f"),x(this,m,e,"f");const{chainId:S,ticker:w}=T(this,s,"m",k).call(this);x(this,u,S,"f"),x(this,d,w,"f"),x(this,c,T(this,s,"m",y).call(this).id,"f");const{allTokens:v,allDetectedTokens:_}=T(this,s,"m",E).call(this);x(this,f,v,"f"),x(this,h,_,"f"),T(this,s,"m",p).call(this),T(this,s,"m",g).call(this)}enable(){x(this,l,!1,"f")}disable(){x(this,l,!0,"f")}async start(){T(this,s,"m",C).call(this),x(this,a,N.Active,"f"),await T(this,s,"m",A).call(this)}stop(){T(this,s,"m",C).call(this),x(this,a,N.Inactive,"f")}async updateExchangeRates(){await this.updateExchangeRatesByChainId({chainId:T(this,u,"f"),nativeCurrency:T(this,d,"f")})}async updateExchangeRatesByChainId({chainId:e,nativeCurrency:t}){if(T(this,l,"f"))return;const r=T(this,s,"m",b).call(this,e),n=`${e}:${t}`;if(n in T(this,i,"f"))return void await T(this,i,"f")[n];const{promise:a,resolve:o,reject:c}=(0,R.createDeferredPromise)({suppressUnhandledRejection:!0});T(this,i,"f")[n]=a;try{const n={[e]:{...await T(this,s,"m",S).call(this,{tokenAddresses:r,chainId:e,nativeCurrency:t})??{}}};this.update((e=>{e.marketData={...e.marketData,...n}})),o()}catch(e){throw c(e),e}finally{delete T(this,i,"f")[n]}}async _executePoll({chainId:e}){const{networkConfigurationsByChainId:t}=this.messagingSystem.call("NetworkController:getState"),r=t[e];r?await this.updateExchangeRatesByChainId({chainId:e,nativeCurrency:r.nativeCurrency}):console.error(`TokenRatesController: No network configuration found for chainId ${e}`)}resetState(){this.update((()=>(0,r.getDefaultTokenRatesControllerState)()))}}r.TokenRatesController=M,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,m=new WeakMap,f=new WeakMap,h=new WeakMap,s=new WeakSet,p=function(){this.messagingSystem.subscribe("TokensController:stateChange",(async({allTokens:e,allDetectedTokens:t})=>{if(T(this,l,"f"))return;const r=[...new Set([...Object.keys(e),...Object.keys(t)])].filter((r=>!(0,I.isEqual)(T(this,f,"f")[r],e[r])||!(0,I.isEqual)(T(this,h,"f")[r],t[r])));x(this,f,e,"f"),x(this,h,t,"f");const{networkConfigurationsByChainId:s}=this.messagingSystem.call("NetworkController:getState");await Promise.allSettled(r.map((async e=>{const t=s[e]?.nativeCurrency;t&&await this.updateExchangeRatesByChainId({chainId:e,nativeCurrency:t})})))}),(({allTokens:e,allDetectedTokens:t})=>({allTokens:e,allDetectedTokens:t})))},g=function(){this.messagingSystem.subscribe("NetworkController:stateChange",(async({selectedNetworkClientId:e},t)=>{const{configuration:{chainId:r,ticker:s}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);T(this,u,"f")===r&&T(this,d,"f")===s||(x(this,u,r,"f"),x(this,d,s,"f"),T(this,a,"f")===N.Active&&await this.updateExchangeRates());for(const e of t)if("remove"===e.op&&"networkConfigurationsByChainId"===e.path[0]){const t=e.path[1];this.update((e=>{delete e.marketData[t]}))}}))},b=function(e){const t=e=>Object.values(e??{}).flatMap((e=>e.map((({address:e})=>(0,_.toHex)((0,_.toChecksumHexAddress)(e)))))),r=t(T(this,f,"f")[e]),s=t(T(this,h,"f")[e]);return[...new Set([...r,...s])].sort()},y=function(){return this.messagingSystem.call("AccountsController:getSelectedAccount")},k=function(){const{selectedNetworkClientId:e}=this.messagingSystem.call("NetworkController:getState"),t=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return{chainId:t.configuration.chainId,ticker:t.configuration.ticker}},E=function(){const{allTokens:e,allDetectedTokens:t}=this.messagingSystem.call("TokensController:getState");return{allTokens:e,allDetectedTokens:t}},C=function(){T(this,n,"f")&&clearTimeout(T(this,n,"f"))},A=async function e(){await(0,_.safelyExecute)((()=>this.updateExchangeRates())),x(this,n,setTimeout((()=>{T(this,s,"m",e).call(this)}),T(this,m,"f")),"f")},S=async function({tokenAddresses:e,chainId:t,nativeCurrency:r}){return T(this,o,"f").validateChainIdSupported(t)?T(this,o,"f").validateCurrencySupported(r)?await T(this,s,"m",w).call(this,{tokenAddresses:e,chainId:t,nativeCurrency:r}):await T(this,s,"m",v).call(this,{chainId:t,tokenAddresses:e,nativeCurrency:r}):e.reduce(((e,t)=>e={...e,[t]:undefined}),{})},w=async function({tokenAddresses:e,chainId:t,nativeCurrency:r}){let s;if(s=await(0,B.reduceInBatchesSerially)({values:[...e].sort(),batchSize:B.TOKEN_PRICES_BATCH_SIZE,eachBatch:async(e,s)=>({...e,...await T(this,o,"f").fetchTokenPrices({tokenAddresses:s,chainId:t,currency:r})}),initialResult:{}}),0===e.length){const e=await T(this,o,"f").fetchTokenPrices({tokenAddresses:[],chainId:t,currency:r});s={[(0,D.getNativeTokenAddress)(t)]:{currency:r,...e[(0,D.getNativeTokenAddress)(t)]}}}return Object.entries(s).reduce(((e,[t,r])=>e={...e,[t]:{...r}}),{})},v=async function({chainId:e,tokenAddresses:t,nativeCurrency:r}){const[n,a]=await Promise.all([T(this,s,"m",w).call(this,{tokenAddresses:t,chainId:e,nativeCurrency:_.FALL_BACK_VS_CURRENCY}),O({from:_.FALL_BACK_VS_CURRENCY,to:r})]);if(null===a)return{};const o=e=>e!==undefined&&null!==e?e*a:undefined;return Object.entries(n).reduce(((e,[t,s])=>e={...e,[t]:{...s,currency:r,price:o(s.price),marketCap:o(s.marketCap),allTimeHigh:o(s.allTimeHigh),allTimeLow:o(s.allTimeLow),totalVolume:o(s.totalVolume),high1d:o(s.high1d),low1d:o(s.low1d),dilutedMarketCap:o(s.dilutedMarketCap)}}),{})},r.default=M}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/TokenRatesController.cjs"}],[1376,{"./Standards/ERC20Standard.cjs":1369,"./Standards/NftStandards/ERC1155/ERC1155Standard.cjs":1370,"./assetsUtil.cjs":1377,"./token-service.cjs":1387,"@ethersproject/contracts":523,"@ethersproject/providers":561,"@metamask/base-controller":1396,"@metamask/contract-metadata":1420,"@metamask/controller-utils":1422,"@metamask/metamask-eth-abis":1944,"@metamask/rpc-errors":2304,"async-mutex":3450,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m,f,h,p,g,b,y,k,E,C,A,S,w=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},v=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},x=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.TokensController=r.getDefaultTokensState=void 0;const T=e("@ethersproject/contracts"),_=e("@ethersproject/providers"),j=e("@metamask/base-controller"),R=x(e("@metamask/contract-metadata")),I=e("@metamask/controller-utils"),B=e("@metamask/metamask-eth-abis"),P=e("@metamask/rpc-errors"),D=e("async-mutex"),N=e("uuid"),O=e("./assetsUtil.cjs"),F=e("./Standards/ERC20Standard.cjs"),M=e("./Standards/NftStandards/ERC1155/ERC1155Standard.cjs"),J=e("./token-service.cjs"),L={tokens:{persist:!0,anonymous:!1},ignoredTokens:{persist:!0,anonymous:!1},detectedTokens:{persist:!0,anonymous:!1},allTokens:{persist:!0,anonymous:!1},allIgnoredTokens:{persist:!0,anonymous:!1},allDetectedTokens:{persist:!0,anonymous:!1}},V="TokensController";r.getDefaultTokensState=()=>({tokens:[],ignoredTokens:[],detectedTokens:[],allTokens:{},allIgnoredTokens:{},allDetectedTokens:{}});class H extends j.BaseController{constructor({chainId:e,provider:t,state:m,messenger:h}){super({name:V,metadata:L,messenger:h,state:{...(0,r.getDefaultTokensState)(),...m}}),s.add(this),n.set(this,new D.Mutex),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),c.set(this,void 0),w(this,a,e,"f"),w(this,i,t,"f"),w(this,o,v(this,s,"m",A).call(this).id,"f"),w(this,c,new AbortController,"f"),this.messagingSystem.registerActionHandler(`${V}:addDetectedTokens`,this.addDetectedTokens.bind(this)),this.messagingSystem.subscribe("AccountsController:selectedEvmAccountChange",v(this,s,"m",d).bind(this)),this.messagingSystem.subscribe("NetworkController:networkDidChange",v(this,s,"m",l).bind(this)),this.messagingSystem.subscribe("NetworkController:stateChange",v(this,s,"m",u).bind(this)),this.messagingSystem.subscribe("TokenListController:stateChange",(({tokenList:e})=>{const{tokens:t}=this.state;t.length&&!t[0].name&&v(this,s,"m",f).call(this,e,"name")}))}async addToken({address:e,symbol:t,decimals:r,name:o,image:i,interactingAddress:c,networkClientId:l}){const u=v(this,a,"f"),d=await v(this,n,"f").acquire(),{allTokens:f,allIgnoredTokens:p,allDetectedTokens:g}=this.state;let b=u;l&&(b=this.messagingSystem.call("NetworkController:getNetworkClientById",l).configuration.chainId);const C=v(this,s,"m",k).call(this,c),A=v(this,s,"m",E).call(this,C);try{e=(0,I.toChecksumHexAddress)(e);const n=f[b]?.[C]||[],c=p[b]?.[C]||[],u=g[b]?.[C]||[],d=[...n],[k,E]=await Promise.all([v(this,s,"m",h).call(this,e,l),v(this,s,"m",m).call(this,e)]);if(!l&&b!==v(this,a,"f"))throw new Error("TokensController Error: Switched networks while adding token");const S={address:e,symbol:t,decimals:r,image:i||(0,O.formatIconUrlWithProxy)({chainId:b,tokenAddress:e}),isERC721:k,aggregators:(0,O.formatAggregatorNames)(E?.aggregators||[]),name:o},w=d.findIndex((t=>t.address.toLowerCase()===e.toLowerCase()));-1!==w?d[w]=S:d.push(S);const x=c.filter((t=>t.toLowerCase()!==e.toLowerCase())),T=u.filter((t=>t.address.toLowerCase()!==e.toLowerCase())),{newAllTokens:_,newAllIgnoredTokens:j,newAllDetectedTokens:R}=v(this,s,"m",y).call(this,{newTokens:d,newIgnoredTokens:x,newDetectedTokens:T,interactingAddress:C,interactingChainId:b});let B={allTokens:_,allIgnoredTokens:j,allDetectedTokens:R};return A&&(B={...B,tokens:d,ignoredTokens:x,detectedTokens:T}),this.update((e=>{Object.assign(e,B)})),d}finally{d()}}async addTokens(e,t){const r=await v(this,n,"f").acquire(),{allTokens:o,ignoredTokens:i,allDetectedTokens:c}=this.state,l={};let u;t&&(u=this.messagingSystem.call("NetworkController:getNetworkClientById",t).configuration.chainId);const d=[...o[u??v(this,a,"f")]?.[v(this,s,"m",A).call(this).address]||[],...e].reduce(((e,t)=>(e[t.address]=t,e)),{});try{e.forEach((e=>{const{address:t,symbol:r,decimals:s,image:n,aggregators:a,name:o}=e,i={address:(0,I.toChecksumHexAddress)(t),symbol:r,decimals:s,image:n,aggregators:a,name:o};return d[t]=i,l[t.toLowerCase()]=!0,i}));const t=Object.values(d),r=i.filter((e=>!d[e.toLowerCase()])),n=u?c?.[u]?.[v(this,s,"m",S).call(this)]:[],a=n?.filter((e=>!l[e.address.toLowerCase()])),{newAllTokens:o,newAllDetectedTokens:m,newAllIgnoredTokens:f}=v(this,s,"m",y).call(this,{newTokens:t,newDetectedTokens:a,newIgnoredTokens:r,interactingChainId:u});this.update((e=>{e.tokens=t,e.allTokens=o,e.detectedTokens=a,e.allDetectedTokens=m,e.ignoredTokens=r,e.allIgnoredTokens=f}))}finally{r()}}ignoreTokens(e,t){let r;t&&(r=this.messagingSystem.call("NetworkController:getNetworkClientById",t).configuration.chainId);const{allTokens:n,allDetectedTokens:o,allIgnoredTokens:i}=this.state,c={},l=i[r??v(this,a,"f")]?.[v(this,s,"m",S).call(this)]||[];let u=[...l];const d=n[r??v(this,a,"f")]?.[v(this,s,"m",S).call(this)]||[],m=o[r??v(this,a,"f")]?.[v(this,s,"m",S).call(this)]||[],f=e.map((e=>{const t=(0,I.toChecksumHexAddress)(e);return c[e.toLowerCase()]=!0,t}));u=[...l,...f];const h=m.filter((e=>!c[e.address.toLowerCase()])),p=d.filter((e=>!c[e.address.toLowerCase()])),{newAllIgnoredTokens:g,newAllDetectedTokens:b,newAllTokens:k}=v(this,s,"m",y).call(this,{newIgnoredTokens:u,newDetectedTokens:h,newTokens:p,interactingChainId:r});this.update((e=>{e.ignoredTokens=u,e.tokens=p,e.detectedTokens=h,e.allIgnoredTokens=g,e.allDetectedTokens=b,e.allTokens=k}))}async addDetectedTokens(e,t){const r=await v(this,n,"f").acquire(),o=t?.chainId??v(this,a,"f"),i=t?.selectedAddress??v(this,s,"m",S).call(this),{allTokens:c,allDetectedTokens:l,allIgnoredTokens:u}=this.state;let d=[...c?.[o]?.[i]??[]],m=[...l?.[o]?.[i]??[]];try{e.forEach((e=>{const{address:t,symbol:r,decimals:s,image:n,aggregators:a,isERC721:c,name:l}=e,f=(0,I.toChecksumHexAddress)(t),h={address:f,symbol:r,decimals:s,image:n,isERC721:c,aggregators:a,name:l},p=d.findIndex((e=>e.address.toLowerCase()===f.toLowerCase()));if(-1!==p)d[p]=h;else{if(-1===(u?.[o]?.[i]?.indexOf(t)??-1)){const e=m.findIndex((e=>e.address.toLowerCase()===f.toLowerCase()));-1!==e?m[e]=h:m.push(h)}}}));const{newAllTokens:t,newAllDetectedTokens:r}=v(this,s,"m",y).call(this,{newTokens:d,newDetectedTokens:m,interactingAddress:i,interactingChainId:o}),n=v(this,s,"m",S).call(this);d=t?.[v(this,a,"f")]?.[n]||[],m=r?.[v(this,a,"f")]?.[n]||[],this.update((e=>{e.tokens=d,e.allTokens=t,e.detectedTokens=m,e.allDetectedTokens=r}))}finally{r()}}async updateTokenType(e){const t=await v(this,s,"m",h).call(this,e),r=[...this.state.tokens],n=r.findIndex((t=>t.address.toLowerCase()===e.toLowerCase())),a={...r[n],isERC721:t};return r[n]=a,this.update((e=>{e.tokens=r})),a}async watchAsset({asset:e,type:t,interactingAddress:r,networkClientId:n}){if(t!==I.ERC20)throw new Error(`Asset of type ${t} not supported`);if(!e.address)throw P.rpcErrors.invalidParams("Address must be specified");if(!(0,I.isValidHexAddress)(e.address))throw P.rpcErrors.invalidParams(`Invalid address "${e.address}"`);const a=v(this,s,"m",k).call(this,r);if(await v(this,s,"m",h).call(this,e.address,n))throw P.rpcErrors.invalidParams(`Contract ${e.address} must match type ${t}, but was detected as ${I.ERC721}`);const o=v(this,s,"m",p).call(this,n);if(await(0,I.safelyExecute)((()=>new M.ERC1155Standard(o).contractSupportsBase1155Interface(e.address))))throw P.rpcErrors.invalidParams(`Contract ${e.address} must match type ${t}, but was detected as ${I.ERC1155}`);const i=new F.ERC20Standard(o),[c,l,u]=await Promise.all([(0,I.safelyExecute)((()=>i.getTokenName(e.address))),(0,I.safelyExecute)((()=>i.getTokenSymbol(e.address))),(0,I.safelyExecute)((async()=>i.getTokenDecimals(e.address)))]);if(e.name=c,!e.symbol&&!l)throw P.rpcErrors.invalidParams("A symbol is required, but was not found in either the request or contract");if(l!==undefined&&e.symbol!==undefined&&e.symbol.toUpperCase()!==l.toUpperCase())throw P.rpcErrors.invalidParams(`The symbol in the request (${e.symbol}) does not match the symbol in the contract (${l})`);if(e.symbol=l??e.symbol,"string"!=typeof e.symbol)throw P.rpcErrors.invalidParams("Invalid symbol: not a string");if(e.symbol.length>11)throw P.rpcErrors.invalidParams(`Invalid symbol "${e.symbol}": longer than 11 characters`);if(e.decimals===undefined&&u===undefined)throw P.rpcErrors.invalidParams("Decimals are required, but were not found in either the request or contract");if(u!==undefined&&e.decimals!==undefined&&String(e.decimals)!==u)throw P.rpcErrors.invalidParams(`The decimals in the request (${e.decimals}) do not match the decimals in the contract (${u})`);const d=u??e.decimals,m=parseInt(d,10);if(!Number.isInteger(m)||m>36||m<0)throw P.rpcErrors.invalidParams(`Invalid decimals "${d}": must be an integer 0 <= 36`);e.decimals=m;const f={asset:e,id:v(this,s,"m",b).call(this),time:Date.now(),type:t,interactingAddress:a};await v(this,s,"m",C).call(this,f);const{address:g,symbol:y,decimals:E,name:A,image:S}=e;await this.addToken({address:g,symbol:y,decimals:E,name:A,image:S,interactingAddress:f.interactingAddress,networkClientId:n})}clearIgnoredTokens(){this.update((e=>{e.ignoredTokens=[],e.allIgnoredTokens={}}))}resetState(){this.update((()=>(0,r.getDefaultTokensState)()))}}r.TokensController=H,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,c=new WeakMap,s=new WeakSet,l=function({selectedNetworkClientId:e}){const t=this.messagingSystem.call("NetworkController:getNetworkClientById",e),{allTokens:r,allIgnoredTokens:n,allDetectedTokens:o}=this.state,{chainId:i}=t.configuration;v(this,c,"f").abort(),w(this,c,new AbortController,"f"),w(this,a,i,"f");const l=v(this,s,"m",S).call(this);this.update((e=>{e.tokens=r[i]?.[l]||[],e.ignoredTokens=n[i]?.[l]||[],e.detectedTokens=o[i]?.[l]||[]}))},u=function(e,t){for(const e of t)if("remove"===e.op&&"networkConfigurationsByChainId"===e.path[0]){const t=e.path[1];this.update((e=>{delete e.allTokens[t],delete e.allIgnoredTokens[t],delete e.allDetectedTokens[t]}))}},d=function(e){const{allTokens:t,allIgnoredTokens:r,allDetectedTokens:s}=this.state;w(this,o,e.id,"f"),this.update((n=>{n.tokens=t[v(this,a,"f")]?.[e.address]??[],n.ignoredTokens=r[v(this,a,"f")]?.[e.address]??[],n.detectedTokens=s[v(this,a,"f")]?.[e.address]??[]}))},m=async function(e){try{return await(0,J.fetchTokenMetadata)(v(this,a,"f"),e,v(this,c,"f").signal)}catch(e){if(e instanceof Error&&e.message.includes(J.TOKEN_METADATA_NO_SUPPORT_ERROR))return undefined;throw e}},f=function(e,t){const{tokens:r}=this.state,s=r.map((r=>{const s=e[r.address.toLowerCase()];return!r[t]&&s?.[t]?{...r,[t]:s[t]}:{...r}}));this.update((e=>{e.tokens=s}))},h=async function(e,t){const r=(0,I.toChecksumHexAddress)(e);if(!0===R.default[r]?.erc721)return Promise.resolve(!0);if(!0===R.default[r]?.erc20)return Promise.resolve(!1);const n=v(this,s,"m",g).call(this,e,B.abiERC721,t);try{return await n.supportsInterface(I.ERC721_INTERFACE_ID)}catch(e){return!1}},p=function(e){return new _.Web3Provider(e?this.messagingSystem.call("NetworkController:getNetworkClientById",e).provider:v(this,i,"f"))},g=function(e,t,r){const n=v(this,s,"m",p).call(this,r);return new T.Contract(e,t,n)},b=function(){return(0,N.v1)()},y=function(e){const{newTokens:t,newIgnoredTokens:r,newDetectedTokens:n,interactingAddress:o,interactingChainId:i}=e,{allTokens:c,allIgnoredTokens:l,allDetectedTokens:u}=this.state,d=v(this,s,"m",k).call(this,o),m=i??v(this,a,"f");let f=c;if(t?.length||t&&c&&c[m]&&c[m][d]){const e={...c[m],[d]:t};f={...c,[m]:e}}let h=l;if(r?.length||r&&l&&l[m]&&l[m][d]){const e={...l[m],[d]:r};h={...l,[m]:e}}let p=u;if(n?.length||n&&u&&u[m]&&u[m][d]){const e={...u[m],[d]:n};p={...u,[m]:e}}return{newAllTokens:f,newAllIgnoredTokens:h,newAllDetectedTokens:p}},k=function(e){return e||v(this,s,"m",S).call(this)},E=function(e){return v(this,s,"m",S).call(this)===e},C=async function(e){return this.messagingSystem.call("ApprovalController:addRequest",{id:e.id,origin:I.ORIGIN_METAMASK,type:I.ApprovalType.WatchAsset,requestData:{id:e.id,interactingAddress:e.interactingAddress,asset:{address:e.asset.address,decimals:e.asset.decimals,symbol:e.asset.symbol,image:e.asset.image||null}}},!0)},A=function(){return this.messagingSystem.call("AccountsController:getSelectedAccount")},S=function(){const e=this.messagingSystem.call("AccountsController:getAccount",v(this,o,"f"));return e?.address||""},r.default=H}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/TokensController.cjs"}],[1377,{"@metamask/controller-utils":1422,"@metamask/utils":2761,"bn.js":3513,multiformats:4463},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.fetchTokenContractExchangeRates=r.reduceInBatchesSerially=r.divideIntoBatches=r.ethersBigNumberToBN=r.addUrlProtocolPrefix=r.getFormattedIpfsUrl=r.getIpfsCIDv1AndPath=r.removeIpfsProtocolPrefix=r.isTokenListSupportedForNetwork=r.isTokenDetectionSupportedForNetwork=r.SupportedStakedBalanceNetworks=r.SupportedTokenDetectionNetworks=r.formatIconUrlWithProxy=r.formatAggregatorNames=r.hasNewCollectionFields=r.compareNftMetadata=r.TOKEN_PRICES_BATCH_SIZE=void 0;const n=e("@metamask/controller-utils"),a=e("@metamask/utils"),o=s(e("bn.js"));r.TOKEN_PRICES_BATCH_SIZE=30,r.compareNftMetadata=function(e,t){return["image","backgroundColor","imagePreview","imageThumbnail","imageOriginal","animation","animationOriginal","externalLink","tokenURI"].reduce(((r,s)=>e[s]&&e[s]!==t[s]?r+1:r),0)>0},r.hasNewCollectionFields=function(e,t){const r=Object.keys(e.collection??{}),s=new Set(Object.keys(t.collection??{}));return r.some((e=>!s.has(e)))};const i={aave:"Aave",bancor:"Bancor",cmc:"CMC",cryptocom:"Crypto.com",coinGecko:"CoinGecko",oneInch:"1inch",paraswap:"Paraswap",pmm:"PMM",zapper:"Zapper",zerion:"Zerion",zeroEx:"0x",synthetix:"Synthetix",yearn:"Yearn",apeswap:"ApeSwap",binanceDex:"BinanceDex",pancakeTop100:"PancakeTop100",pancakeExtended:"PancakeExtended",balancer:"Balancer",quickswap:"QuickSwap",matcha:"Matcha",pangolinDex:"PangolinDex",pangolinDexStableCoin:"PangolinDexStableCoin",pangolinDexAvaxBridge:"PangolinDexAvaxBridge",traderJoe:"TraderJoe",airswapLight:"AirswapLight",kleros:"Kleros"};r.formatAggregatorNames=e=>e.map((e=>i[e]||`${e[0].toUpperCase()}${e.substring(1,e.length)}`));var c,l;function u(e){return Object.values(c).includes(e)}function d(e){if(e.startsWith("ipfs://ipfs/"))return e.replace("ipfs://ipfs/","");if(e.startsWith("ipfs://"))return e.replace("ipfs://","");throw new Error("this method should not be used with non ipfs urls")}async function m(t){const r=d(t),s=r.indexOf("/"),n=-1!==s?r.substring(0,s):r,a=-1!==s?r.substring(s):undefined,{CID:o}=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("multiformats"));return{cid:o.parse(n).toV1().toString(),path:a}}function f(e){return e.match(/(^http:\/\/)|(^https:\/\/)/u)?e:`https://${e}`}function h(e,{batchSize:t}){const r=[];for(let s=0;s`https://static.cx.metamask.io/api/v1/tokenIcons/${(0,n.convertHexToDecimal)(e).toString()}/${t.toLowerCase()}.png`,function(e){e.mainnet="0x1",e.bsc="0x38",e.polygon="0x89",e.avax="0xa86a",e.aurora="0x4e454152",e.linea_goerli="0xe704",e.linea_mainnet="0xe708",e.arbitrum="0xa4b1",e.optimism="0xa",e.base="0x2105",e.zksync="0x144",e.cronos="0x19",e.celo="0xa4ec",e.gnosis="0x64",e.fantom="0xfa",e.polygon_zkevm="0x44d",e.moonbeam="0x504",e.moonriver="0x505"}(c||(r.SupportedTokenDetectionNetworks=c={})),function(e){e.mainnet="0x1",e.holesky="0x4268"}(l||(r.SupportedStakedBalanceNetworks=l={})),r.isTokenDetectionSupportedForNetwork=u,r.isTokenListSupportedForNetwork=function(e){return u(e)},r.removeIpfsProtocolPrefix=d,r.getIpfsCIDv1AndPath=m,r.getFormattedIpfsUrl=async function(e,t,r){const{host:s,protocol:n,origin:a}=new URL(f(e));if(r){const{cid:e,path:r}=await m(t);return`${n}//${e}.ipfs.${s}${r??""}`}return`${a}/ipfs/${d(t)}`},r.addUrlProtocolPrefix=f,r.ethersBigNumberToBN=function(e){return new o.default((0,a.remove0x)(e.toHexString()),"hex")},r.divideIntoBatches=h,r.reduceInBatchesSerially=p,r.fetchTokenContractExchangeRates=async function({tokenPricesService:e,nativeCurrency:t,tokenAddresses:s,chainId:a}){const o=e.validateChainIdSupported(a),i=e.validateCurrencySupported(t);if(!o||!i)return{};const c=await p({values:[...s].sort(),batchSize:r.TOKEN_PRICES_BATCH_SIZE,eachBatch:async(r,s)=>({...r,...await e.fetchTokenPrices({tokenAddresses:s,chainId:a,currency:t})}),initialResult:{}});return Object.entries(c).reduce(((e,[t,r])=>({...e,[(0,n.toChecksumHexAddress)(t)]:r?.price})),{})}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/assetsUtil.cjs"}],[1378,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s;Object.defineProperty(r,"__esModule",{value:!0}),r.Source=void 0,function(e){e.Custom="custom",e.Dapp="dapp",e.Detected="detected"}(s||(r.Source=s={}))}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/constants.cjs"}],[1379,{"@metamask/controller-utils":1422},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fetchMultiExchangeRate=r.fetchExchangeRate=void 0;const s=e("@metamask/controller-utils"),n=new Map([["MNT","MANTLE"],["OMNI","OMNINET"]]),a="https://min-api.cryptocompare.com";function o(e){if("Error"===e.Response)throw new Error(e.Message)}r.fetchExchangeRate=async function(e,t,r){const i=await(0,s.handleFetch)(function(e,t,r){t=t.toUpperCase();const s=n.get(t)??t;return`${a}/data/price?fsym=${s}&tsyms=${e.toUpperCase()}`+(r&&"USD"!==e.toUpperCase()?",USD":"")}(e,t,r));o(i);const c=Number(i[e.toUpperCase()]),l=Number(i.USD);if(!Number.isFinite(c))throw new Error(`Invalid response for ${e.toUpperCase()}: ${i[e.toUpperCase()]}`);if(r&&!Number.isFinite(l))throw new Error(`Invalid response for usdConversionRate: ${i.USD}`);return{conversionRate:c,usdConversionRate:l}},r.fetchMultiExchangeRate=async function(e,t,r){const n=function(e,t,r=!1){const s=r&&!t.some((e=>"USD"===e.toUpperCase()))?[...t,"USD"]:t,n=new URLSearchParams;n.append("fsyms",e.join(",")),n.append("tsyms",s.join(","));const o=new URL(`${a}/data/pricemulti`);return o.search=n.toString(),o.toString()}(t,[e],r),i=await(0,s.handleFetch)(n);o(i);const c={};for(const[t,s]of Object.entries(i))c[t.toLowerCase()]={[e.toLowerCase()]:s[e.toUpperCase()],...r&&{usd:s.USD}};return c}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/crypto-compare-service/crypto-compare.cjs"}],[1380,{"./crypto-compare.cjs":1379},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fetchMultiExchangeRate=r.fetchExchangeRate=void 0;var s=e("./crypto-compare.cjs");Object.defineProperty(r,"fetchExchangeRate",{enumerable:!0,get:function(){return s.fetchExchangeRate}}),Object.defineProperty(r,"fetchMultiExchangeRate",{enumerable:!0,get:function(){return s.fetchMultiExchangeRate}})}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/crypto-compare-service/index.cjs"}],[1381,{"./AccountTrackerController.cjs":1362,"./AssetsContractController.cjs":1363,"./CurrencyRateController.cjs":1364,"./NftController.cjs":1365,"./NftDetectionController.cjs":1366,"./RatesController/index.cjs":1368,"./TokenBalancesController.cjs":1372,"./TokenDetectionController.cjs":1373,"./TokenListController.cjs":1374,"./TokenRatesController.cjs":1375,"./TokensController.cjs":1376,"./assetsUtil.cjs":1377,"./token-prices-service/index.cjs":1386},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.Cryptocurrency=r.RatesController=r.getNativeTokenAddress=r.SUPPORTED_CHAIN_IDS=r.CodefiTokenPricesServiceV2=r.fetchTokenContractExchangeRates=r.getFormattedIpfsUrl=r.formatIconUrlWithProxy=r.isTokenDetectionSupportedForNetwork=r.TokensController=r.TokenRatesController=r.getDefaultTokenRatesControllerState=r.TokenListController=r.TokenDetectionController=r.TokenBalancesController=r.NftDetectionController=r.NftController=r.getDefaultNftControllerState=r.AssetsContractController=r.SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID=r.AccountTrackerController=void 0;var a=e("./AccountTrackerController.cjs");Object.defineProperty(r,"AccountTrackerController",{enumerable:!0,get:function(){return a.AccountTrackerController}});var o=e("./AssetsContractController.cjs");Object.defineProperty(r,"SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID",{enumerable:!0,get:function(){return o.SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID}}),Object.defineProperty(r,"AssetsContractController",{enumerable:!0,get:function(){return o.AssetsContractController}}),n(e("./CurrencyRateController.cjs"),r);var i=e("./NftController.cjs");Object.defineProperty(r,"getDefaultNftControllerState",{enumerable:!0,get:function(){return i.getDefaultNftControllerState}}),Object.defineProperty(r,"NftController",{enumerable:!0,get:function(){return i.NftController}});var c=e("./NftDetectionController.cjs");Object.defineProperty(r,"NftDetectionController",{enumerable:!0,get:function(){return c.NftDetectionController}});var l=e("./TokenBalancesController.cjs");Object.defineProperty(r,"TokenBalancesController",{enumerable:!0,get:function(){return l.TokenBalancesController}});var u=e("./TokenDetectionController.cjs");Object.defineProperty(r,"TokenDetectionController",{enumerable:!0,get:function(){return u.TokenDetectionController}});var d=e("./TokenListController.cjs");Object.defineProperty(r,"TokenListController",{enumerable:!0,get:function(){return d.TokenListController}});var m=e("./TokenRatesController.cjs");Object.defineProperty(r,"getDefaultTokenRatesControllerState",{enumerable:!0,get:function(){return m.getDefaultTokenRatesControllerState}}),Object.defineProperty(r,"TokenRatesController",{enumerable:!0,get:function(){return m.TokenRatesController}});var f=e("./TokensController.cjs");Object.defineProperty(r,"TokensController",{enumerable:!0,get:function(){return f.TokensController}});var h=e("./assetsUtil.cjs");Object.defineProperty(r,"isTokenDetectionSupportedForNetwork",{enumerable:!0,get:function(){return h.isTokenDetectionSupportedForNetwork}}),Object.defineProperty(r,"formatIconUrlWithProxy",{enumerable:!0,get:function(){return h.formatIconUrlWithProxy}}),Object.defineProperty(r,"getFormattedIpfsUrl",{enumerable:!0,get:function(){return h.getFormattedIpfsUrl}}),Object.defineProperty(r,"fetchTokenContractExchangeRates",{enumerable:!0,get:function(){return h.fetchTokenContractExchangeRates}});var p=e("./token-prices-service/index.cjs");Object.defineProperty(r,"CodefiTokenPricesServiceV2",{enumerable:!0,get:function(){return p.CodefiTokenPricesServiceV2}}),Object.defineProperty(r,"SUPPORTED_CHAIN_IDS",{enumerable:!0,get:function(){return p.SUPPORTED_CHAIN_IDS}}),Object.defineProperty(r,"getNativeTokenAddress",{enumerable:!0,get:function(){return p.getNativeTokenAddress}});var g=e("./RatesController/index.cjs");Object.defineProperty(r,"RatesController",{enumerable:!0,get:function(){return g.RatesController}}),Object.defineProperty(r,"Cryptocurrency",{enumerable:!0,get:function(){return g.Cryptocurrency}})}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/index.cjs"}],[1382,{"./multi-chain-accounts.cjs":1383},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fetchSupportedNetworks=r.fetchMultiChainBalances=void 0;var s=e("./multi-chain-accounts.cjs");Object.defineProperty(r,"fetchMultiChainBalances",{enumerable:!0,get:function(){return s.fetchMultiChainBalances}}),Object.defineProperty(r,"fetchSupportedNetworks",{enumerable:!0,get:function(){return s.fetchSupportedNetworks}})}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/multi-chain-accounts-service/index.cjs"}],[1383,{"@metamask/controller-utils":1422},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fetchMultiChainBalances=r.fetchSupportedNetworks=r.MULTICHAIN_ACCOUNTS_DOMAIN=void 0;const s=e("@metamask/controller-utils");r.MULTICHAIN_ACCOUNTS_DOMAIN="https://accounts.api.cx.metamask.io";r.fetchSupportedNetworks=async function(){const e=new URL(`${r.MULTICHAIN_ACCOUNTS_DOMAIN}/v1/supportedNetworks`);return(await(0,s.handleFetch)(e)).fullSupport},r.fetchMultiChainBalances=async function(e,t,n){const a=((e,t)=>{const s=new URL(`${r.MULTICHAIN_ACCOUNTS_DOMAIN}/v2/accounts/${e}/balances`);return t?.networks!==undefined&&s.searchParams.append("networks",t.networks),s})(e,{networks:t?.networks?.join()});return await(0,s.handleFetch)(a,{headers:{"x-metamask-clientproduct":`metamask-${n}`}})}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/multi-chain-accounts-service/multi-chain-accounts.cjs"}],[1384,{"./assetsUtil.cjs":1377,"@ethersproject/contracts":523},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.multicallOrFallback=void 0;const s=e("@ethersproject/contracts"),n=e("./assetsUtil.cjs"),a={"0x1":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3":"0xcA11bde05977b3631167028862bE2a173976CA11","0xaa36a7":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4268":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5e9":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1b6e6":"0xcA11bde05977b3631167028862bE2a173976CA11","0x18fc4a":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa":"0xcA11bde05977b3631167028862bE2a173976CA11","0x45":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1a4":"0xcA11bde05977b3631167028862bE2a173976CA11","0xaa37dc":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa4b1":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa4ba":"0xcA11bde05977b3631167028862bE2a173976CA11","0x66eed":"0xcA11bde05977b3631167028862bE2a173976CA11","0x66eee":"0xcA11bde05977b3631167028862bE2a173976CA11","0x66eeb":"0xcA11bde05977b3631167028862bE2a173976CA11","0x15f2249":"0xcA11bde05977b3631167028862bE2a173976CA11","0x89":"0xcA11bde05977b3631167028862bE2a173976CA11","0x13881":"0xcA11bde05977b3631167028862bE2a173976CA11","0x13882":"0xcA11bde05977b3631167028862bE2a173976CA11","0x44d":"0xca11bde05977b3631167028862be2a173976ca11","0x5a2":"0xca11bde05977b3631167028862be2a173976ca11","0x98a":"0xca11bde05977b3631167028862be2a173976ca11","0x64":"0xcA11bde05977b3631167028862bE2a173976CA11","0x27d8":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa86a":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa869":"0xcA11bde05977b3631167028862bE2a173976CA11","0xfa2":"0xcA11bde05977b3631167028862bE2a173976CA11","0xfa":"0xcA11bde05977b3631167028862bE2a173976CA11","0xfaf0":"0xca11bde05977b3631167028862be2a173976ca11","0x38":"0xcA11bde05977b3631167028862bE2a173976CA11","0x61":"0xcA11bde05977b3631167028862bE2a173976CA11","0x15eb":"0xcA11bde05977b3631167028862bE2a173976CA11","0xcc":"0xcA11bde05977b3631167028862bE2a173976CA11","0x504":"0xcA11bde05977b3631167028862bE2a173976CA11","0x505":"0xcA11bde05977b3631167028862bE2a173976CA11","0x507":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2a15c308d":"0xca11bde05977b3631167028862be2a173976ca11","0x2a15c3083":"0xca11bde05977b3631167028862be2a173976ca11","0x63564c40":"0xcA11bde05977b3631167028862bE2a173976CA11","0x19":"0xcA11bde05977b3631167028862bE2a173976CA11","0x152":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5535072":"0xcA11bde05977b3631167028862bE2a173976CA11","0x6c1":"0xcA11bde05977b3631167028862bE2a173976CA11","0x7a":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe":"0xcA11bde05977b3631167028862bE2a173976CA11","0x13":"0xcA11bde05977b3631167028862bE2a173976CA11","0x10":"0xcA11bde05977b3631167028862bE2a173976CA11","0x72":"0xcA11bde05977b3631167028862bE2a173976CA11","0x120":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4e454152":"0xcA11bde05977b3631167028862bE2a173976CA11","0x250":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5c2359":"0xcA11bde05977b3631167028862bE2a173976CA11","0xec0":"0xcA11bde05977b3631167028862bE2a173976CA11","0x42":"0xcA11bde05977b3631167028862bE2a173976CA11","0x80":"0xcA11bde05977b3631167028862bE2a173976CA11","0x440":"0xcA11bde05977b3631167028862bE2a173976CA11","0x257":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe9fe":"0xcA11bde05977b3631167028862bE2a173976CA11","0xd3a0":"0xcA11bde05977b3631167028862bE2a173976CA11","0x84444":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1e":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1f":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2329":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2328":"0xcA11bde05977b3631167028862bE2a173976CA11","0x6c":"0xcA11bde05977b3631167028862bE2a173976CA11","0x12":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa516":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5afe":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa4ec":"0xcA11bde05977b3631167028862bE2a173976CA11","0xaef3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x116ea":"0xcA11bde05977b3631167028862bE2a173976CA11","0x116e9":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2019":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3e9":"0xca11bde05977b3631167028862be2a173976ca11","0x7d1":"0xcA11bde05977b3631167028862bE2a173976CA11","0x141":"0xcA11bde05977b3631167028862bE2a173976CA11","0x6a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x28":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4d2":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1e14":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1e15":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1251":"0xcA11bde05977b3631167028862bE2a173976CA11","0x7f08":"0xcA11bde05977b3631167028862bE2a173976CA11","0x8ae":"0xcA11bde05977b3631167028862bE2a173976CA11","0x138b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1389":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1388":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1f92":"0xcA11bde05977b3631167028862bE2a173976CA11","0x14a33":"0xca11bde05977b3631167028862be2a173976ca11","0x14a34":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2105":"0xca11bde05977b3631167028862be2a173976ca11","0x936":"0xcA11bde05977b3631167028862bE2a173976CA11","0xff":"0xcA11bde05977b3631167028862bE2a173976CA11","0x46a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x46b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x8a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x14f":"0xcA11bde05977b3631167028862bE2a173976CA11","0xd2af":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe9ac0ce":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe705":"0xca11bde05977b3631167028862be2a173976ca11","0xe704":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe708":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2b6f":"0xcA11bde05977b3631167028862bE2a173976CA11","0x39":"0xcA11bde05977b3631167028862bE2a173976CA11","0x23a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1644":"0xcA11bde05977b3631167028862bE2a173976CA11","0xdea8":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3af":"0xcA11bde05977b3631167028862bE2a173976CA11","0x171":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3e7":"0xcA11bde05977b3631167028862bE2a173976CA11","0x76adf1":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3b9ac9ff":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2c":"0xca11bde05977b3631167028862be2a173976ca11","0x2e":"0xca11bde05977b3631167028862be2a173976ca11","0x15b3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x82751":"0xcA11bde05977b3631167028862bE2a173976CA11","0x8274f":"0xca11bde05977b3631167028862be2a173976ca11","0x82750":"0xcA11bde05977b3631167028862bE2a173976CA11","0x96f":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3cc5":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4571":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe99":"0xcA11bde05977b3631167028862bE2a173976CA11","0x7d0":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1297":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1d5e":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3a14269b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x561bf78b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x235ddd0":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3cd156dc":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5d456c62":"0xcA11bde05977b3631167028862bE2a173976CA11","0x79f99296":"0xcA11bde05977b3631167028862bE2a173976CA11","0x585eb4b1":"0xcA11bde05977b3631167028862bE2a173976CA11","0x507aaa2a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1fc3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x32d":"0xcA11bde05977b3631167028862bE2a173976CA11","0x8a73":"0xcA11bde05977b3631167028862bE2a173976CA11","0x8a72":"0xcA11bde05977b3631167028862bE2a173976CA11","0x8a71":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe9ac0d6":"0xca11bde05977b3631167028862be2a173976ca11","0x1069":"0xcA11bde05977b3631167028862bE2a173976CA11","0x7e5":"0xcA11bde05977b3631167028862bE2a173976CA11","0x53":"0xca11bde05977b3631167028862be2a173976ca11","0x52":"0xca11bde05977b3631167028862be2a173976ca11","0xe298":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1a8":"0xcA11bde05977b3631167028862bE2a173976CA11","0x94":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2c6":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2803":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2802":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa9":"0xcA11bde05977b3631167028862bE2a173976CA11","0x28c5f":"0xcA11bde05977b3631167028862bE2a173976CA11","0x28c60":"0xcA11bde05977b3631167028862bE2a173976CA11","0x13a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4cb2f":"0xdbfa261cd7d17bb40479a0493ad6c0fee435859e","0x7f93":"0xcA11bde05977b3631167028862bE2a173976CA11","0xb660":"0xcA11bde05977b3631167028862bE2a173976CA11","0xb02113d3f":"0xcA11bde05977b3631167028862bE2a173976CA11","0xdad":"0xcA11bde05977b3631167028862bE2a173976CA11","0xdae":"0xcA11bde05977b3631167028862bE2a173976CA11","0x15b38":"0xcA11bde05977b3631167028862bE2a173976CA11","0x15b32":"0xcA11bde05977b3631167028862bE2a173976CA11","0x45c":"0xcA11bde05977b3631167028862bE2a173976CA11","0x45b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3d":"0xcA11bde05977b3631167028862bE2a173976CA11","0x41a6ace":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa729":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1f47b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1b59":"0xca11bde05977b3631167028862be2a173976ca11","0x1b58":"0xcA11bde05977b3631167028862bE2a173976CA11","0xc3":"0xca11bde05977b3631167028862be2a173976ca11","0x16fd8":"0xcA11bde05977b3631167028862bE2a173976CA11","0xc7":"0xca11bde05977b3631167028862be2a173976ca11","0x405":"0xca11bde05977b3631167028862be2a173976ca11","0x334":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1ce":"0xca11bde05977b3631167028862be2a173976ca11","0x1cf":"0xca11bde05977b3631167028862be2a173976ca11","0xa70e":"0xcA11bde05977b3631167028862bE2a173976CA11","0x868b":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa0c71fd":"0xcA11bde05977b3631167028862bE2a173976CA11","0x13e31":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa1337":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1f2b":"0xcA11bde05977b3631167028862bE2a173976CA11","0xf63":"0xcA11bde05977b3631167028862bE2a173976CA11","0x144":"0xF9cda624FBC7e059355ce98a31693d299FACd963","0x118":"0xF9cda624FBC7e059355ce98a31693d299FACd963","0x12c":"0xF9cda624FBC7e059355ce98a31693d299FACd963","0x18995f":"0xF9cda624FBC7e059355ce98a31693d299FACd963","0x2b74":"0xF9cda624FBC7e059355ce98a31693d299FACd963","0xfc":"0xcA11bde05977b3631167028862bE2a173976CA11","0x9da":"0xcA11bde05977b3631167028862bE2a173976CA11","0x137":"0xcA11bde05977b3631167028862bE2a173976CA11","0x13ed":"0xcA11bde05977b3631167028862bE2a173976CA11","0x24b1":"0xcA11bde05977b3631167028862bE2a173976CA11","0xba9302":"0xcA11bde05977b3631167028862bE2a173976CA11","0x7c8":"0xcA11bde05977b3631167028862bE2a173976CA11","0x138d5":"0xcA11bde05977b3631167028862bE2a173976CA11","0x6d":"0xcA11bde05977b3631167028862bE2a173976CA11","0x343b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x34a1":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3109":"0xcA11bde05977b3631167028862bE2a173976CA11","0x91b":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa96":"0xcA11bde05977b3631167028862bE2a173976CA11","0x22c3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2be3":"0xcA11bde05977b3631167028862bE2a173976CA11","0xbf03":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1b254":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa7b14":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2276":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1b9e":"0xcA11bde05977b3631167028862bE2a173976CA11","0x6a63bb8":"0xcA11bde05977b3631167028862bE2a173976CA11","0x15af3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x15af1":"0xcA11bde05977b3631167028862bE2a173976CA11","0xae3f3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x531":"0xcA11bde05977b3631167028862bE2a173976CA11","0x28c61":"0xcA11bde05977b3631167028862bE2a173976CA11","0x28c58":"0xca11bde05977b3631167028862be2a173976ca11","0x1d88":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5b9b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4c7e1":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa53b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1a2b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x406":"0xca11bde05977b3631167028862be2a173976ca11","0x2cef":"0xcA11bde05977b3631167028862bE2a173976CA11","0x18b2":"0xca11bde05977b3631167028862be2a173976ca11","0x182a9":"0xcA11bde05977b3631167028862bE2a173976CA11","0xc4":"0xcA11bde05977b3631167028862bE2a173976CA11","0xfdd":"0xcA11bde05977b3631167028862bE2a173976CA11","0xfde":"0xcA11bde05977b3631167028862bE2a173976CA11","0x99c0a0f":"0xca11bde05977b3631167028862be2a173976ca11","0x22cf":"0xcA11bde05977b3631167028862bE2a173976CA11","0x310c5":"0xca11bde05977b3631167028862be2a173976ca11","0x46f":"0xcA11bde05977b3631167028862bE2a173976CA11","0x659":"0xca11bde05977b3631167028862be2a173976ca11","0x139c968f9":"0xcA11bde05977b3631167028862bE2a173976CA11","0xed88":"0xcA11bde05977b3631167028862bE2a173976CA11","0xd036":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1f3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x31bf8c3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1cbc67bfdc":"0xcA11bde05977b3631167028862bE2a173976CA11","0x98967f":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4f588":"0xcA11bde05977b3631167028862bE2a173976CA11","0x16db":"0xca11bde05977b3631167028862be2a173976ca11","0x3a":"0xca11bde05977b3631167028862be2a173976ca11","0x59":"0xca11bde05977b3631167028862be2a173976ca11","0x1e0":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2eb":"0xcA11bde05977b3631167028862bE2a173976CA11","0x221":"0xcA11bde05977b3631167028862bE2a173976CA11"},o=[{name:"tryAggregate",type:"function",stateMutability:"payable",inputs:[{name:"requireSuccess",type:"bool"},{name:"calls",type:"tuple[]",components:[{name:"target",type:"address"},{name:"callData",type:"bytes"}]}],outputs:[{name:"returnData",type:"tuple[]",components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}]}]}];r.multicallOrFallback=async(e,t,r,i=300,c=20)=>{if(0===e.length)return[];const l=a[t];if(l)try{return await(async(e,t,r,a)=>{const i=new s.Contract(t,o,r);return await(0,n.reduceInBatchesSerially)({values:e,batchSize:a,initialResult:[],eachBatch:async(e,t)=>{const r=t.map((e=>({target:e.contract.address,callData:e.contract.interface.encodeFunctionData(e.contract.interface.functions[e.functionSignature],e.arguments)})));return[...e,...(await i.callStatic.tryAggregate(!1,r)).map(((e,r)=>({success:e.success,value:e.success?t[r].contract.interface.decodeFunctionResult(t[r].functionSignature,e.returnData)[0]:undefined})))]}})})(e,l,r,i)}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"CALL_EXCEPTION"!==e.code)throw e}return await(async(e,t)=>await(0,n.reduceInBatchesSerially)({values:e,batchSize:t,initialResult:[],eachBatch:async(e,t)=>[...e,...(await Promise.allSettled(t.map((e=>e.contract[e.functionSignature](...e.arguments))))).map((e=>({success:"fulfilled"===e.status,value:"fulfilled"===e.status?e.value:undefined})))]}))(e,c)}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/multicall.cjs"}],[1385,{"@metamask/controller-utils":1422,"@metamask/utils":2761,cockatiel:3612},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.CodefiTokenPricesServiceV2=r.SUPPORTED_CHAIN_IDS=r.getNativeTokenAddress=r.ZERO_ADDRESS=r.SUPPORTED_CURRENCIES=void 0;const o=e("@metamask/controller-utils"),i=e("@metamask/utils"),c=e("cockatiel");r.SUPPORTED_CURRENCIES=["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","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"],r.ZERO_ADDRESS="0x0000000000000000000000000000000000000000";const l={"0x89":"0x0000000000000000000000000000000000001010"};r.getNativeTokenAddress=e=>l[e]??r.ZERO_ADDRESS,r.SUPPORTED_CHAIN_IDS=["0x1","0xa","0x19","0x38","0x39","0x42","0x46","0x52","0x58","0x64","0x6a","0x7a","0x80","0x89","0xfa","0x120","0x141","0x144","0x169","0x440","0x504","0x505","0x1388","0x2105","0x150","0x2710","0xa4b1","0xa4ec","0xa516","0xa86a","0x518af","0x4e454152","0x63564c40","0xe708"];r.CodefiTokenPricesServiceV2=class{constructor({degradedThreshold:e=5e3,retries:t=3,maximumConsecutiveFailures:r=12,onBreak:a,onDegraded:o,circuitBreakDuration:i=18e5}={}){s.set(this,void 0);const l=(0,c.retry)(c.handleAll,{maxAttempts:t,backoff:new c.ExponentialBackoff}),u=(0,c.circuitBreaker)(c.handleAll,{halfOpenAfter:i,breaker:new c.ConsecutiveBreaker(r)});a&&u.onBreak(a),o&&(l.onGiveUp((()=>{u.state===c.CircuitState.Closed&&o()})),l.onSuccess((({duration:t})=>{u.state===c.CircuitState.Closed&&t>e&&o()}))),n(this,s,(0,c.wrap)(l,u),"f")}async fetchTokenPrices({chainId:e,tokenAddresses:t,currency:n}){const c=(0,i.hexToNumber)(e),l=new URL(`https://price.api.cx.metamask.io/v2/chains/${c}/spot-prices`);l.searchParams.append("tokenAddresses",[(0,r.getNativeTokenAddress)(e),...t].join(",")),l.searchParams.append("vsCurrency",n),l.searchParams.append("includeMarketData","true");const u=await a(this,s,"f").execute((()=>(0,o.handleFetch)(l,{headers:{"Cache-Control":"no-cache"}})));return[(0,r.getNativeTokenAddress)(e),...t].reduce(((e,t)=>{const r=t.toLowerCase(),s=u[r];if(!s)return e;const a={tokenAddress:t,currency:n,...s};return{...e,[t]:a}}),{})}validateChainIdSupported(e){const t=r.SUPPORTED_CHAIN_IDS;return"string"==typeof e&&t.includes(e)}validateCurrencySupported(e){const t=r.SUPPORTED_CURRENCIES;return"string"==typeof e&&t.includes(e.toLowerCase())}},s=new WeakMap}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/token-prices-service/codefi-v2.cjs"}],[1386,{"./codefi-v2.cjs":1385},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getNativeTokenAddress=r.SUPPORTED_CHAIN_IDS=r.CodefiTokenPricesServiceV2=void 0;var s=e("./codefi-v2.cjs");Object.defineProperty(r,"CodefiTokenPricesServiceV2",{enumerable:!0,get:function(){return s.CodefiTokenPricesServiceV2}}),Object.defineProperty(r,"SUPPORTED_CHAIN_IDS",{enumerable:!0,get:function(){return s.SUPPORTED_CHAIN_IDS}}),Object.defineProperty(r,"getNativeTokenAddress",{enumerable:!0,get:function(){return s.getNativeTokenAddress}})}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/token-prices-service/index.cjs"}],[1387,{"./assetsUtil.cjs":1377,"@metamask/controller-utils":1422},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fetchTokenMetadata=r.fetchTokenListByChainId=r.TOKEN_METADATA_NO_SUPPORT_ERROR=r.TOKEN_END_POINT_API=void 0;const s=e("@metamask/controller-utils"),n=e("./assetsUtil.cjs");r.TOKEN_END_POINT_API="https://token.api.cx.metamask.io",r.TOKEN_METADATA_NO_SUPPORT_ERROR="TokenService Error: Network does not support fetchTokenMetadata";async function a(e,t,r){const n={referrer:e,referrerPolicy:"no-referrer-when-downgrade",method:"GET",mode:"cors",signal:t,cache:"default"};n.headers=new window.Headers,n.headers.set("Content-Type","application/json");try{return await(0,s.timeoutFetch)(e,n,r)}catch(e){e instanceof Error&&"AbortError"===e.name&&console.log("Request is aborted")}return undefined}async function o(e){const t=await e.json();if(t?.error)throw new Error(`TokenService Error: ${t.error}`);return t}r.fetchTokenListByChainId=async function(e,t,{timeout:n=1e4}={}){const i=function(e){const t=e===s.ChainId["linea-mainnet"]?1:3;return`${r.TOKEN_END_POINT_API}/tokens/${(0,s.convertHexToDecimal)(e)}?occurrenceFloor=${t}&includeNativeAssets=false&includeTokenFees=false&includeAssetType=false&includeERC20Permit=false&includeStorage=false`}(e),c=await a(i,t,n);if(c){const t=await o(c);return Array.isArray(t)&&e===s.ChainId["linea-mainnet"]?t.filter((e=>e.aggregators.includes("lineaTeam")||e.aggregators.length>=3)):t}return undefined},r.fetchTokenMetadata=async function(e,t,i,{timeout:c=1e4}={}){if(!(0,n.isTokenListSupportedForNetwork)(e))throw new Error(r.TOKEN_METADATA_NO_SUPPORT_ERROR);const l=function(e,t){return`${r.TOKEN_END_POINT_API}/token/${(0,s.convertHexToDecimal)(e)}?address=${t}`}(e,t),u=await a(l,i,c);return u?o(u):undefined}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/token-service.cjs"}],[1388,{"fast-json-stable-stringify":3903,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.AbstractPollingControllerBaseMixin=r.getKey=void 0;const a=n(e("fast-json-stable-stringify")),o=e("uuid");r.getKey=e=>(0,a.default)(e),r.AbstractPollingControllerBaseMixin=function(e){var t,n;return t=new WeakMap,n=new WeakMap,class extends e{constructor(){super(...arguments),t.set(this,new Map),n.set(this,new Map)}startPolling(e){const n=(0,o.v4)(),a=(0,r.getKey)(e),i=s(this,t,"f").get(a)??new Set;return i.add(n),s(this,t,"f").set(a,i),1===i.size&&this._startPolling(e),n}stopAllPolling(){s(this,t,"f").forEach(((e,t)=>{e.forEach((e=>{this.stopPollingByPollingToken(e)}))}))}stopPollingByPollingToken(e){if(!e)throw new Error("pollingToken required");let r=null;for(const[n,a]of s(this,t,"f"))if(a.delete(e)){0===a.size&&(r=n);break}if(r){this._stopPollingByPollingTokenSetId(r),s(this,t,"f").delete(r);const e=s(this,n,"f").get(r);if(e){for(const t of e)t(JSON.parse(r));e.clear()}}}onPollingComplete(e,t){const a=(0,r.getKey)(e),o=s(this,n,"f").get(a)??new Set;o.add(t),s(this,n,"f").set(a,o)}}}}}},{package:"@metamask/assets-controllers>@metamask/polling-controller",file:"node_modules/@metamask/assets-controllers/node_modules/@metamask/polling-controller/dist/AbstractPollingController.cjs"}],[1389,{"./AbstractPollingController.cjs":1388,"@metamask/base-controller":1396},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.BlockTrackerPollingControllerV1=r.BlockTrackerPollingController=r.BlockTrackerPollingControllerOnly=void 0;const n=e("@metamask/base-controller"),a=e("./AbstractPollingController.cjs");function o(e){var t;class r extends((0,a.AbstractPollingControllerBaseMixin)(e)){constructor(){super(...arguments),t.set(this,{})}_startPolling(e){const r=(0,a.getKey)(e);if(s(this,t,"f")[r])return;const n=this._getNetworkClientById(e.networkClientId);if(!n)throw new Error(`Unable to retrieve blockTracker for networkClientId ${e.networkClientId}`);{const a=this._executePoll.bind(this,e);n.blockTracker.addListener("latest",a),s(this,t,"f")[r]=a}}_stopPollingByPollingTokenSetId(e){const{networkClientId:r}=JSON.parse(e),n=this._getNetworkClientById(r);if(n&&s(this,t,"f")[e]){const r=s(this,t,"f")[e];r&&(n.blockTracker.removeListener("latest",r),delete s(this,t,"f")[e])}}}return t=new WeakMap,r}class i{}r.BlockTrackerPollingControllerOnly=()=>o(i);r.BlockTrackerPollingController=()=>o(n.BaseController);r.BlockTrackerPollingControllerV1=()=>o(n.BaseControllerV1)}}},{package:"@metamask/assets-controllers>@metamask/polling-controller",file:"node_modules/@metamask/assets-controllers/node_modules/@metamask/polling-controller/dist/BlockTrackerPollingController.cjs"}],[1390,{"./AbstractPollingController.cjs":1388,"@metamask/base-controller":1396},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},n=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.StaticIntervalPollingControllerV1=r.StaticIntervalPollingController=r.StaticIntervalPollingControllerOnly=void 0;const a=e("@metamask/base-controller"),o=e("./AbstractPollingController.cjs");function i(e){var t,r;class a extends((0,o.AbstractPollingControllerBaseMixin)(e)){constructor(){super(...arguments),t.set(this,{}),r.set(this,1e3)}setIntervalLength(e){s(this,r,e,"f")}getIntervalLength(){return n(this,r,"f")}_startPolling(e){if(!n(this,r,"f"))throw new Error("intervalLength must be defined and greater than 0");const s=(0,o.getKey)(e),a=n(this,t,"f")[s];this._stopPollingByPollingTokenSetId(s);const i=n(this,t,"f")[s]=setTimeout((async()=>{try{await this._executePoll(e)}catch(e){console.error(e)}i===n(this,t,"f")[s]&&this._startPolling(e)}),a?n(this,r,"f"):0)}_stopPollingByPollingTokenSetId(e){const r=n(this,t,"f")[e];r&&(clearTimeout(r),delete n(this,t,"f")[e])}}return t=new WeakMap,r=new WeakMap,a}class c{}r.StaticIntervalPollingControllerOnly=()=>i(c);r.StaticIntervalPollingController=()=>i(a.BaseController);r.StaticIntervalPollingControllerV1=()=>i(a.BaseControllerV1)}}},{package:"@metamask/assets-controllers>@metamask/polling-controller",file:"node_modules/@metamask/assets-controllers/node_modules/@metamask/polling-controller/dist/StaticIntervalPollingController.cjs"}],[1391,{"./BlockTrackerPollingController.cjs":1389,"./StaticIntervalPollingController.cjs":1390},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.StaticIntervalPollingControllerV1=r.StaticIntervalPollingController=r.StaticIntervalPollingControllerOnly=r.BlockTrackerPollingControllerV1=r.BlockTrackerPollingController=r.BlockTrackerPollingControllerOnly=void 0;var s=e("./BlockTrackerPollingController.cjs");Object.defineProperty(r,"BlockTrackerPollingControllerOnly",{enumerable:!0,get:function(){return s.BlockTrackerPollingControllerOnly}}),Object.defineProperty(r,"BlockTrackerPollingController",{enumerable:!0,get:function(){return s.BlockTrackerPollingController}}),Object.defineProperty(r,"BlockTrackerPollingControllerV1",{enumerable:!0,get:function(){return s.BlockTrackerPollingControllerV1}});var n=e("./StaticIntervalPollingController.cjs");Object.defineProperty(r,"StaticIntervalPollingControllerOnly",{enumerable:!0,get:function(){return n.StaticIntervalPollingControllerOnly}}),Object.defineProperty(r,"StaticIntervalPollingController",{enumerable:!0,get:function(){return n.StaticIntervalPollingController}}),Object.defineProperty(r,"StaticIntervalPollingControllerV1",{enumerable:!0,get:function(){return n.StaticIntervalPollingControllerV1}})}}},{package:"@metamask/assets-controllers>@metamask/polling-controller",file:"node_modules/@metamask/assets-controllers/node_modules/@metamask/polling-controller/dist/index.cjs"}],[1392,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BaseControllerV1=r.isBaseControllerV1=void 0,r.isBaseControllerV1=function(e){return"name"in e&&"string"==typeof e.name&&"config"in e&&"object"==typeof e.config&&"defaultConfig"in e&&"object"==typeof e.defaultConfig&&"state"in e&&"object"==typeof e.state&&"defaultState"in e&&"object"==typeof e.defaultState&&"disabled"in e&&"boolean"==typeof e.disabled&&"subscribe"in e&&"function"==typeof e.subscribe};class s{constructor(e={},t={}){this.defaultConfig={},this.defaultState={},this.disabled=!1,this.name="BaseController",this.internalConfig=this.defaultConfig,this.internalState=this.defaultState,this.internalListeners=[],this.initialState=t,this.initialConfig=e}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}get config(){return this.internalConfig}get state(){return this.internalState}configure(e,t=!1,r=!0){if(r){this.internalConfig=t?e:Object.assign(this.internalConfig,e);for(const e of Object.keys(this.internalConfig)){const t=this.internalConfig[e];t!==undefined&&(this[e]=t)}}else for(const t of Object.keys(e))if(this.internalConfig[t]!==undefined){const r=e[t];this.internalConfig[t]=r,this[t]=r}}notify(){this.disabled||this.internalListeners.forEach((e=>{e(this.internalState)}))}subscribe(e){this.internalListeners.push(e)}unsubscribe(e){const t=this.internalListeners.findIndex((t=>e===t));return t>-1&&this.internalListeners.splice(t,1),t>-1}update(e,t=!1){this.internalState=t?Object.assign({},e):Object.assign({},this.internalState,e),this.notify()}}r.BaseControllerV1=s,r.default=s}}},{package:"@metamask/base-controller",file:"node_modules/@metamask/base-controller/dist/BaseControllerV1.cjs"}],[1393,{immer:4195},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.getPersistentState=r.getAnonymizedState=r.BaseController=r.isBaseController=void 0;const o=e("immer");(0,o.enablePatches)(),r.isBaseController=function(e){return"name"in e&&"string"==typeof e.name&&"state"in e&&"object"==typeof e.state&&"metadata"in e&&"object"==typeof e.metadata};function i(e,t,r){return Object.keys(e).reduce(((s,n)=>{try{const a=t[n];if(!a)throw new Error(`No metadata found for '${String(n)}'`);const o=a[r],i=e[n];return"function"==typeof o?s[n]=o(i):o&&(s[n]=i),s}catch(e){return setTimeout((()=>{throw e})),s}}),{})}r.BaseController=class{constructor({messenger:e,metadata:t,name:r,state:a}){s.set(this,void 0),this.messagingSystem=e,this.name=r,n(this,s,(0,o.freeze)(a,!0),"f"),this.metadata=t,this.messagingSystem.registerActionHandler(`${r}:getState`,(()=>this.state)),this.messagingSystem.registerInitialEventPayload({eventType:`${r}:stateChange`,getPayload:()=>[this.state,[]]})}get state(){return a(this,s,"f")}set state(e){throw new Error("Controller state cannot be directly mutated; use 'update' method instead.")}update(e){const[t,r,i]=o.produceWithPatches(a(this,s,"f"),e);return n(this,s,t,"f"),this.messagingSystem.publish(`${this.name}:stateChange`,t,r),{nextState:t,patches:r,inversePatches:i}}applyPatches(e){const t=(0,o.applyPatches)(a(this,s,"f"),e);n(this,s,t,"f"),this.messagingSystem.publish(`${this.name}:stateChange`,t,e)}destroy(){this.messagingSystem.clearEventSubscriptions(`${this.name}:stateChange`)}},s=new WeakMap,r.getAnonymizedState=function(e,t){return i(e,t,"anonymous")},r.getPersistentState=function(e,t){return i(e,t,"persist")}}}},{package:"@metamask/base-controller",file:"node_modules/@metamask/base-controller/dist/BaseControllerV2.cjs"}],[1394,{"./RestrictedControllerMessenger.cjs":1395},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.ControllerMessenger=void 0;const c=e("./RestrictedControllerMessenger.cjs");r.ControllerMessenger=class{constructor(){s.set(this,new Map),n.set(this,new Map),a.set(this,new Map),o.set(this,new Map)}registerActionHandler(e,t){if(i(this,s,"f").has(e))throw new Error(`A handler for ${e} has already been registered`);i(this,s,"f").set(e,t)}unregisterActionHandler(e){i(this,s,"f").delete(e)}clearActions(){i(this,s,"f").clear()}call(e,...t){const r=i(this,s,"f").get(e);if(!r)throw new Error(`A handler for ${e} has not been registered`);return r(...t)}registerInitialEventPayload({eventType:e,getPayload:t}){i(this,a,"f").set(e,t)}publish(e,...t){const r=i(this,n,"f").get(e);if(r)for(const[e,s]of r.entries())try{if(s){const r=i(this,o,"f").get(e),n=s(...t);n!==r&&(i(this,o,"f").set(e,n),e(n,r))}else e(...t)}catch(e){setTimeout((()=>{throw e}))}}subscribe(e,t,r){let s=i(this,n,"f").get(e);if(s||(s=new Map,i(this,n,"f").set(e,s)),s.set(t,r),r){const s=i(this,a,"f").get(e);if(s){const e=r(...s());i(this,o,"f").set(t,e)}}}unsubscribe(e,t){const r=i(this,n,"f").get(e);if(!r||!r.has(t))throw new Error(`Subscription not found for event: ${e}`);r.get(t)&&i(this,o,"f").delete(t),r.delete(t)}clearEventSubscriptions(e){i(this,n,"f").delete(e)}clearSubscriptions(){i(this,n,"f").clear()}getRestricted({name:e,allowedActions:t,allowedEvents:r}){return new c.RestrictedControllerMessenger({controllerMessenger:this,name:e,allowedActions:t,allowedEvents:r})}},s=new WeakMap,n=new WeakMap,a=new WeakMap,o=new WeakMap}}},{package:"@metamask/base-controller",file:"node_modules/@metamask/base-controller/dist/ControllerMessenger.cjs"}],[1395,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},m=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.RestrictedControllerMessenger=void 0;r.RestrictedControllerMessenger=class{constructor({controllerMessenger:e,name:t,allowedActions:r,allowedEvents:c}){s.add(this),n.set(this,void 0),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),d(this,n,e,"f"),d(this,a,t,"f"),d(this,o,r,"f"),d(this,i,c,"f")}registerActionHandler(e,t){if(!m(this,s,"m",u).call(this,e))throw new Error(`Only allowed registering action handlers prefixed by '${m(this,a,"f")}:'`);m(this,n,"f").registerActionHandler(e,t)}unregisterActionHandler(e){if(!m(this,s,"m",u).call(this,e))throw new Error(`Only allowed unregistering action handlers prefixed by '${m(this,a,"f")}:'`);m(this,n,"f").unregisterActionHandler(e)}call(e,...t){if(!m(this,s,"m",l).call(this,e))throw new Error(`Action missing from allow list: ${e}`);return m(this,n,"f").call(e,...t)}registerInitialEventPayload({eventType:e,getPayload:t}){if(!m(this,s,"m",u).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${m(this,a,"f")}:'`);m(this,n,"f").registerInitialEventPayload({eventType:e,getPayload:t})}publish(e,...t){if(!m(this,s,"m",u).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${m(this,a,"f")}:'`);m(this,n,"f").publish(e,...t)}subscribe(e,t,r){if(!m(this,s,"m",c).call(this,e))throw new Error(`Event missing from allow list: ${e}`);return r?m(this,n,"f").subscribe(e,t,r):m(this,n,"f").subscribe(e,t)}unsubscribe(e,t){if(!m(this,s,"m",c).call(this,e))throw new Error(`Event missing from allow list: ${e}`);m(this,n,"f").unsubscribe(e,t)}clearEventSubscriptions(e){if(!m(this,s,"m",u).call(this,e))throw new Error(`Only allowed clearing events prefixed by '${m(this,a,"f")}:'`);m(this,n,"f").clearEventSubscriptions(e)}},n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakSet,c=function(e){const t=m(this,i,"f");return m(this,s,"m",u).call(this,e)||null!==t&&t.includes(e)},l=function(e){const t=m(this,o,"f");return m(this,s,"m",u).call(this,e)||null!==t&&t.includes(e)},u=function(e){return e.startsWith(`${m(this,a,"f")}:`)}}}},{package:"@metamask/base-controller",file:"node_modules/@metamask/base-controller/dist/RestrictedControllerMessenger.cjs"}],[1396,{"./BaseControllerV1.cjs":1392,"./BaseControllerV2.cjs":1393,"./ControllerMessenger.cjs":1394,"./RestrictedControllerMessenger.cjs":1395},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.RestrictedControllerMessenger=r.ControllerMessenger=r.isBaseController=r.getPersistentState=r.getAnonymizedState=r.BaseController=r.isBaseControllerV1=r.BaseControllerV1=void 0;var s=e("./BaseControllerV1.cjs");Object.defineProperty(r,"BaseControllerV1",{enumerable:!0,get:function(){return s.BaseControllerV1}}),Object.defineProperty(r,"isBaseControllerV1",{enumerable:!0,get:function(){return s.isBaseControllerV1}});var n=e("./BaseControllerV2.cjs");Object.defineProperty(r,"BaseController",{enumerable:!0,get:function(){return n.BaseController}}),Object.defineProperty(r,"getAnonymizedState",{enumerable:!0,get:function(){return n.getAnonymizedState}}),Object.defineProperty(r,"getPersistentState",{enumerable:!0,get:function(){return n.getPersistentState}}),Object.defineProperty(r,"isBaseController",{enumerable:!0,get:function(){return n.isBaseController}});var a=e("./ControllerMessenger.cjs");Object.defineProperty(r,"ControllerMessenger",{enumerable:!0,get:function(){return a.ControllerMessenger}});var o=e("./RestrictedControllerMessenger.cjs");Object.defineProperty(r,"RestrictedControllerMessenger",{enumerable:!0,get:function(){return o.RestrictedControllerMessenger}})}}},{package:"@metamask/base-controller",file:"node_modules/@metamask/base-controller/dist/index.cjs"}],[1397,{"@metamask/utils":1408,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.isVaultUpdated=r.updateVaultWithDetail=r.updateVault=r.generateSalt=r.serializeBufferForStorage=r.serializeBufferFromStorage=r.keyFromPassword=r.exportKey=r.importKey=r.decryptWithKey=r.decryptWithDetail=r.decrypt=r.encryptWithKey=r.encryptWithDetail=r.encrypt=void 0;const s=e("@metamask/utils"),n="jwk",a="AES-GCM",o="utf-8",i={algorithm:"PBKDF2",params:{iterations:1e4}},c={algorithm:"PBKDF2",params:{iterations:9e5}};async function l(e,t,r,s=g(),n=c){const a=r||await p(e,s,!1,n),o=await d(a,t);return o.salt=s,JSON.stringify(o)}async function u(e,t,r=g(),s=c){const n=await p(e,r,!0,s),a=await h(n);return{vault:await l(e,t,n,r),exportedKeyString:a}}async function d(e,r){const s=JSON.stringify(r),n=t.from(s,o),i=global.crypto.getRandomValues(new Uint8Array(16)),c=k(e),l=await global.crypto.subtle.encrypt({name:a,iv:i},c,n),u=new Uint8Array(l),d=t.from(i).toString("base64"),m={data:t.from(u).toString("base64"),iv:d};return b(e)&&(m.keyMetadata=e.derivationOptions),m}async function m(e,t,r){const s=JSON.parse(t),{salt:n,keyMetadata:a}=s,o=k(r||await p(e,n,!1,a));return await f(o,s)}async function f(e,r){const s=t.from(r.data,"base64"),n=t.from(r.iv,"base64"),i=k(e);let c;try{const e=await crypto.subtle.decrypt({name:a,iv:n},i,s),r=new Uint8Array(e),l=t.from(r).toString(o);c=JSON.parse(l)}catch(e){throw new Error("Incorrect password")}return c}async function h(e){return b(e)?JSON.stringify({key:await window.crypto.subtle.exportKey(n,e.key),derivationOptions:e.derivationOptions}):JSON.stringify(await window.crypto.subtle.exportKey(n,e))}async function p(e,r,s=!1,n=i){const c=t.from(e,o),l=t.from(r,"base64"),u=await global.crypto.subtle.importKey("raw",c,{name:"PBKDF2"},!1,["deriveBits","deriveKey"]),d=await global.crypto.subtle.deriveKey({name:"PBKDF2",salt:l,iterations:n.params.iterations,hash:"SHA-256"},u,{name:a,length:256},s,["encrypt","decrypt"]);return n?{key:d,derivationOptions:n}:d}function g(e=32){const t=new Uint8Array(e);global.crypto.getRandomValues(t);return btoa(String.fromCharCode.apply(null,t))}function b(e){return(0,s.isPlainObject)(e)&&(0,s.hasProperty)(e,"key")&&(0,s.hasProperty)(e,"derivationOptions")&&e.key instanceof CryptoKey&&y(e.derivationOptions)}function y(e){return(0,s.isPlainObject)(e)&&(0,s.hasProperty)(e,"algorithm")&&(0,s.hasProperty)(e,"params")}function k(e){return b(e)?e.key:e}function E(e,t=c){const{keyMetadata:r}=JSON.parse(e);return y(r)&&r.algorithm===t.algorithm&&r.params.iterations===t.params.iterations}r.encrypt=l,r.encryptWithDetail=u,r.encryptWithKey=d,r.decrypt=m,r.decryptWithDetail=async function(e,t){const r=JSON.parse(t),{salt:s,keyMetadata:n}=r,a=await p(e,s,!0,n);return{exportedKeyString:await h(a),vault:await m(e,t,a),salt:s}},r.decryptWithKey=f,r.importKey=async function(e){const t=JSON.parse(e);return r=t,(0,s.isPlainObject)(r)&&(0,s.hasProperty)(r,"key")&&(0,s.hasProperty)(r,"derivationOptions")&&y(r.derivationOptions)?{key:await window.crypto.subtle.importKey(n,t.key,a,!0,["encrypt","decrypt"]),derivationOptions:t.derivationOptions}:await window.crypto.subtle.importKey(n,t,a,!0,["encrypt","decrypt"]);var r},r.exportKey=h,r.keyFromPassword=p,r.serializeBufferFromStorage=function(e){const t="0x"===e.slice(0,2)?e.slice(2):e,r=new Uint8Array(t.length/2);for(let e=0;e{t+=function(e){let t=e.toString(16);for(;t.length<2;)t=`0${t}`;return t}(e)})),t},r.generateSalt=g,r.updateVault=async function(e,t,r=c){return E(e,r)?e:l(t,await m(t,e),undefined,undefined,r)},r.updateVaultWithDetail=async function(e,t,r=c){return E(e.vault,r)?e:u(t,await m(t,e.vault),undefined,r)},r.isVaultUpdated=E}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/browser-passworder",file:"node_modules/@metamask/browser-passworder/dist/index.js"}],[1398,{"./errors.cjs":1406,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/assert.cjs"}],[1399,{"./assert.cjs":1398,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/base64.cjs"}],[1400,{"./assert.cjs":1398,"./hex.cjs":1407,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/bytes.cjs"}],[1401,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),function(e){e.Eip155="eip155"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1402,{"./base64.cjs":1399,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/checksum.cjs"}],[1403,{"./assert.cjs":1398,"./bytes.cjs":1400,"./hex.cjs":1407,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/coercers.cjs"}],[1404,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/collections.cjs"}],[1405,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1406,{"./misc.cjs":1412,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/errors.cjs"}],[1407,{"./assert.cjs":1398,"./bytes.cjs":1400,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/hex.cjs"}],[1408,{"./assert.cjs":1398,"./base64.cjs":1399,"./bytes.cjs":1400,"./caip-types.cjs":1401,"./checksum.cjs":1402,"./coercers.cjs":1403,"./collections.cjs":1404,"./encryption-types.cjs":1405,"./errors.cjs":1406,"./hex.cjs":1407,"./json.cjs":1409,"./keyring.cjs":1410,"./logging.cjs":1411,"./misc.cjs":1412,"./number.cjs":1413,"./opaque.cjs":1414,"./promise.cjs":1415,"./time.cjs":1416,"./transaction-types.cjs":1417,"./versions.cjs":1418},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/index.cjs"}],[1409,{"./assert.cjs":1398,"./misc.cjs":1412,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/json.cjs"}],[1410,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/keyring.cjs"}],[1411,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/logging.cjs"}],[1412,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/misc.cjs"}],[1413,{"./assert.cjs":1398,"./hex.cjs":1407},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/number.cjs"}],[1414,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/opaque.cjs"}],[1415,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/promise.cjs"}],[1416,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/time.cjs"}],[1417,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1418,{"./assert.cjs":1398,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/versions.cjs"}],[1419,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={"0x12652C6d93FDB6F4f37d48A8687783C782BB0d10":{name:"Entangle",logo:"NGL.svg",erc20:!0,symbol:"NGL",decimals:18},"0xB50721BCf8d664c30412Cfbc6cf7a15145234ad1":{name:"Arbitrum",logo:"Arb.svg",erc20:!0,symbol:"ARB",decimals:18},"0x4D0528598F916Fd1D8dc80e5f54a8fEEDcFd4b18":{name:"Atoshi",logo:"ATOS.svg",erc20:!0,symbol:"ATOS",decimals:18},"0x57B946008913B82E4dF85f501cbAeD910e58D26C":{name:"POND",logo:"POND.svg",erc20:!0,symbol:"POND",decimals:18},"0x5eed99d066a8CaF10f3E4327c1b3D8b673485eED":{name:"SEED",logo:"SEED.svg",erc20:!0,symbol:"SEED",decimals:18},"0x487d62468282Bd04ddf976631C23128A425555EE":{name:"UPCX",logo:"UPC.svg",erc20:!0,symbol:"UPC",decimals:5},"0xd3210F246Ae54C5a45A7b4A83315bf718F591bfc":{name:"ArkiTech",logo:"ARKI.svg",erc20:!0,symbol:"ARKI",decimals:9},"0x7d51888C5ABb7CDfa9cdd6A50673c7F8afAccD7F":{name:"DuckDAO Token",logo:"duckdao.svg",erc20:!0,symbol:"DD",decimals:18},"0x49642110B712C1FD7261Bc074105E9E44676c68F":{name:"DinoLFG",logo:"DINO.svg",erc20:!0,symbol:"DINO",decimals:18},"0xB8BAa0e4287890a5F79863aB62b7F175ceCbD433":{name:"Swerve DAO Token",logo:"swrv.svg",erc20:!0,symbol:"SWRV",decimals:18},"0x8b79656FC38a04044E495e22fAD747126ca305C4":{name:"AgaveCoin",logo:"agvc.svg",erc20:!0,symbol:"AGVC",decimals:18},"0x967da4048cD07aB37855c090aAF366e4ce1b9F48":{name:"Ocean Token",logo:"ocean.svg",erc20:!0,symbol:"OCEAN",decimals:18},"0x83e6f1E41cdd28eAcEB20Cb649155049Fac3D5Aa":{name:"PolkastarterToken",logo:"pols.svg",erc20:!0,symbol:"POLS",decimals:18},"0x08d967bb0134F2d07f7cfb6E246680c53927DD30":{name:"MATH Token",logo:"math.svg",erc20:!0,symbol:"MATH",decimals:18},"0xccC8cb5229B0ac8069C51fd58367Fd1e622aFD97":{name:"Gods Unchained",logo:"gods.svg",erc20:!0,symbol:"GODS",decimals:18},"0xF57e7e7C23978C3cAEC3C3548E3D615c346e79fF":{name:"Immutable X",logo:"imx.svg",erc20:!0,symbol:"IMX",decimals:18},"0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f":{name:"Gho Token",logo:"GHO.svg",erc20:!0,symbol:"GHO",decimals:18},"0x536381a8628dBcC8C70aC9A30A7258442eAb4c92":{name:"Pantos Token ",logo:"pan.svg",erc20:!0,symbol:"PAN",decimals:8},"0x011E128Ec62840186F4A07E85E3ACe28858c5606":{name:"Valeria",logo:"val.svg",erc20:!0,symbol:"VAL",decimals:18},"0x6c3ea9036406852006290770BEdFcAbA0e23A0e8":{name:"PayPal USD",logo:"pyusd.svg",erc20:!0,symbol:"PYUSD",decimals:6},"0x8b385Ca3592A5EFc34E0C9fE663de56897F1751F":{name:"INFibit",logo:"INFibit.svg",erc20:!0,symbol:"IBIT",decimals:18},"0x9bf1D7D63dD7a4ce167CF4866388226EEefa702E":{name:"Ben Coin",logo:"BEN.svg",erc20:!0,symbol:"BEN",decimals:18},"0xC7a2572fA8FDB0f7E81d6D3c4e3CCF78FB0DC374":{name:"Bens Finale",logo:"BensFinale.svg",erc20:!0,symbol:"FINALE",decimals:18},"0x99cFB8cBA9c821B4a343c6a1Fc630465C9708DF5":{name:"Pepe Inu",logo:"PepeInu.svg",erc20:!0,symbol:"$PEPEINU",decimals:18},"0xCEBA2a8F6Ec221AEB5f3a7bcd15Cbc7e6a387bfb":{name:"Peter Pan",logo:"PeterPan.svg",erc20:!0,symbol:"PAN",decimals:18},"0x467719aD09025FcC6cF6F8311755809d45a5E5f3":{name:"Axelar",logo:"axelar.svg",erc20:!0,symbol:"AXL",decimals:6},"0x665F77fbA5975ab40Ce61c90F28007fb5b09D7B1":{name:"Genieswap",logo:"Genieswap.svg",erc20:!0,symbol:"GENIE",decimals:18},"0x09E6d500D14D13e0528d2c0fff24E5ffF68237B4":{name:"Dohrnii",logo:"dhn.svg",erc20:!0,symbol:"DHN",decimals:18},"0xaE0585a259A3BCAB258D6EE02FB583f7B33C2a12":{name:"TempleCoin",logo:"tem.svg",erc20:!0,symbol:"TEM",decimals:18},"0xaeDf386B755465871fF874E3E37Af5976E247064":{name:"Fasttoken",logo:"ftn.svg",erc20:!0,symbol:"FTN",decimals:18},"0x7BEF710a5759d197EC0Bf621c3Df802C2D60D848":{name:"SHOPX",logo:"SHOPX.svg",erc20:!0,symbol:"SHOPX",decimals:18},"0xBa3335588D9403515223F109EdC4eB7269a9Ab5D":{name:"Gearbox",logo:"gear.svg",erc20:!0,symbol:"GEAR",decimals:18},"0x9B6B9d2468E165a02FEf69E61B6D3D6CBC0Ac409":{name:"OASISLIFE",logo:"OFE.svg",erc20:!0,symbol:"OFE",decimals:18},"0xdf0162A6B3e9fDf0302c1e949739DeeaFafd8F89":{name:"METAOASIS",logo:"MOA.svg",erc20:!0,symbol:"MOA",decimals:18},"0xe4dae00bc1c46ea2F44ae71B1BEb8b171C15d812":{name:"PREMA",logo:"PREMA.svg",erc20:!0,symbol:"PRMX",decimals:18},"0x1416946162B1C2c871A73B07E932D2fB6C932069":{name:"Energi",logo:"energi.svg",erc20:!0,symbol:"NRG",decimals:18},"0x0d88eD6E74bbFD96B831231638b66C05571e824F":{name:"Aventus",logo:"aventus.svg",erc20:!0,symbol:"AVT",decimals:18},"0x4FC15c91a9c4A9efB404174464687E8e128730C2":{name:"STAT",logo:"STAT.svg",erc20:!0,erc721:!1,symbol:"STAT",decimals:18},"0x4ad7a056191F4c9519fAcd6D75FA94CA26003aCE":{name:"GoldPesa Option",logo:"GPO.svg",erc20:!0,symbol:"GPO",decimals:18},"0x767FE9EDC9E0dF98E07454847909b5E959D7ca0E":{name:"Illuvium",logo:"illuvium.svg",erc20:!0,erc721:!1,symbol:"ILV",decimals:18},"0x85F17Cf997934a597031b2E18a9aB6ebD4B9f6a4":{name:"NEAR",logo:"NEAR.svg",erc20:!0,symbol:"NEAR",decimals:24},"0x6B3595068778DD592e39A122f4f5a5cF09C90fE2":{name:"SushiSwap",logo:"sushi.svg",erc20:!0,erc721:!1,symbol:"SUSHI",decimals:18},"0x881Ba05de1E78f549cC63a8f6Cabb1d4AD32250D":{name:"00",logo:"00.svg",erc20:!0,erc721:!1,symbol:"00",decimals:18},"0xC211477cb4098aC22a98432781f5f26a1E07a4d4":{name:"CULTURED",logo:"CULTURED.svg",erc20:!0,erc721:!1,symbol:"CULTURED",decimals:18},"0x86f2A193b116d1f9C53Ed26d97F77cDC8BcF4c2b":{name:"EHTAGA",logo:"EHTAGA.svg",erc20:!0,erc721:!1,symbol:"EHTAGA",decimals:18},"0x54b79A15b2e2c55c736A66bb0A978fb840407aC8":{name:"FEVER",logo:"FEVER.svg",erc20:!0,erc721:!1,symbol:"FEVER",decimals:18},"0x677c9fE4396D3D13A0F9013a8118eAE386C843A5":{name:"IAM",logo:"IAM.svg",erc20:!0,erc721:!1,symbol:"IAM",decimals:18},"0xf63c65E855020E4B74f0Ad842D9537dA0E6162eC":{name:"ISH",logo:"ISH.svg",erc20:!0,erc721:!1,symbol:"ISH",decimals:18},"0xc105fA46510F32c0444CCdB4e51065da95caA1B4":{name:"LITA",logo:"LITA.svg",erc20:!0,erc721:!1,symbol:"LITA",decimals:18},"0x5401F949cDfa3E5aF32538167c0314230769209C":{name:"MAHCOIN",logo:"MAHCOIN.svg",erc20:!0,erc721:!1,symbol:"MAHCOIN",decimals:18},"0x711D2C47aFf84B96AD0F36983b1c41Be2C509e18":{name:"NIKITA",logo:"NIKITA.svg",erc20:!0,erc721:!1,symbol:"NIKITA",decimals:18},"0x3C44aEc33993b6830e5C2a705ea879b9C9ba0f7c":{name:"NYELA",logo:"NYELA.svg",erc20:!0,erc721:!1,symbol:"NYELA",decimals:18},"0xfa9096c99e687ea8E0064C23DAaCFE87cc99E4Ba":{name:"RON",logo:"RON.svg",erc20:!0,erc721:!1,symbol:"RON",decimals:18},"0x287a7C95aD00bBDd48599Ad2919567fD09281f07":{name:"STEELO",logo:"STEELO.svg",erc20:!0,erc721:!1,symbol:"STEELO",decimals:18},"0x2Ec3275f7aCe4044e499823F511cd58250be8E3d":{name:"Privilege",logo:"prvg.svg",erc20:!0,symbol:"PRVG",decimals:8},"0x65BB569FAaDD324a00883FdE4c46346cc96D5c0A":{name:"Provide",logo:"prvd.svg",erc20:!0,symbol:"PRVD",decimals:8},"0xB4272071eCAdd69d933AdcD19cA99fe80664fc08":{name:"CryptoFranc",logo:"XCHF.svg",erc20:!0,symbol:"XCHF",decimals:18},"0x5aFE3855358E112B5647B952709E6165e1c1eEEe":{name:"Safe Token",logo:"safe-green-token.svg",erc20:!0,symbol:"SAFE",decimals:18},"0x9C8fF314C9Bc7F6e59A9d9225Fb22946427eDC03":{name:"Nouns",erc20:!1,erc721:!0,symbol:"NOUN",decimals:0,logo:"nouns.svg"},"0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D":{name:"BoredApeYachtClub",erc20:!1,erc721:!0,symbol:"BAYC",decimals:0,logo:"bayc.svg"},"0x08D7C0242953446436F34b4C78Fe9da38c73668d":{name:"PROOF Collective",erc20:!1,erc721:!0,symbol:"PROOF",decimals:0,logo:"proof.svg"},"0x23581767a106ae21c074b2276D25e5C3e136a68b":{name:"Moonbirds",erc20:!1,erc721:!0,symbol:"MOONBIRD",decimals:0,logo:"moonbirds.svg"},"0x60E4d786628Fea6478F785A6d7e704777c86a7c6":{name:"MutantApeYachtClub",erc20:!1,erc721:!0,symbol:"MAYC",decimals:0,logo:"mayc.svg"},"0x49cF6f5d44E70224e2E23fDcdd2C053F30aDA28B":{name:"CloneX",erc20:!1,erc721:!0,symbol:"CloneX",decimals:0,logo:"clonex.svg"},"0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e":{name:"Doodles",erc20:!1,erc721:!0,symbol:"DOODLE",decimals:0,logo:"doodles.svg"},"0xED5AF388653567Af2F388E6224dC7C4b3241C544":{name:"Azuki",erc20:!1,erc721:!0,symbol:"AZUKI",decimals:0,logo:"azuki.svg"},"0xa3AEe8BcE55BEeA1951EF834b99f3Ac60d1ABeeB":{name:"VeeFriends",erc20:!1,erc721:!0,symbol:"VFT",decimals:0,logo:"veefriends.svg"},"0x34d85c9CDeB23FA97cb08333b511ac86E1C4E258":{name:"Otherdeed",erc20:!1,erc721:!0,symbol:"OTHR",decimals:0,logo:"otherdeed.svg"},"0xBBc2AE13b23d715c30720F079fcd9B4a74093505":{name:"Ethernity Chain Token",logo:"ERN.svg",erc20:!0,symbol:"ERN",decimals:18},"0x243cACb4D5fF6814AD668C3e225246efA886AD5a":{name:"Shina Inu",logo:"shina.svg",erc20:!0,symbol:"SHI",decimals:18},"0xD057B63f5E69CF1B929b356b579Cba08D7688048":{name:"CoW Protocol Virtual Token",logo:"vCOW.svg",erc20:!0,symbol:"vCOW",decimals:18},"0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB":{name:"CoW Protocol Token",logo:"COW.svg",erc20:!0,symbol:"COW",decimals:18},"0xEd04915c23f00A313a544955524EB7DBD823143d":{name:"Alchemy Pay",logo:"ACH.svg",erc20:!0,symbol:"ACH",decimals:8},"0xeDF6568618A00C6F0908Bf7758A16F76B6E04aF9":{name:"Arianee",logo:"aria20.svg",erc20:!0,symbol:"ARIA20",decimals:18},"0x88D8DA2A8D0fA5b1f4E38030AC486aDE0AFA2798":{name:"Terrapass Coin",logo:"tpsc.svg",erc20:!0,symbol:"TPSC",decimals:18},"0x4730fB1463A6F1F44AEB45F6c5c422427f37F4D0":{name:"The 4th Pillar Token",logo:"four.svg",erc20:!0,symbol:"FOUR",decimals:18},"0x875773784Af8135eA0ef43b5a374AaD105c5D39e":{name:"Idle DAO Token",logo:"idle.svg",erc20:!0,symbol:"IDLE",decimals:18},"0x6BeA7CFEF803D1e3d5f7C0103f7ded065644e197":{name:"Gamma",logo:"Gamma.svg",erc20:!0,symbol:"GAMMA",decimals:18},"0x26805021988F1a45dC708B5FB75Fc75F21747D8c":{name:"xGamma",logo:"xGamma.svg",erc20:!0,symbol:"xGAMMA",decimals:18},"0xc7D9c108D4E1dD1484D3e2568d7f74bfD763d356":{name:"SORA Synthetic USD",logo:"sora-xstusd.svg",erc20:!0,symbol:"XSTUSD",decimals:18},"0x519C1001D550C0a1DaE7d1fC220f7d14c2A521BB":{name:"Polkaswap",logo:"sora-pswap.svg",erc20:!0,symbol:"PSWAP",decimals:18},"0x40FD72257597aA14C7231A7B1aaa29Fce868F677":{name:"SORA",logo:"sora-xor.svg",erc20:!0,symbol:"XOR",decimals:18},"0x909E34d3f6124C324ac83DccA84b74398a6fa173":{name:"$ZKP Token",logo:"ZKP.svg",erc20:!0,erc721:!1,symbol:"$ZKP",decimals:18},"0xe88f8313e61A97cEc1871EE37fBbe2a8bf3ed1E4":{name:"SORA Validator",logo:"sora-val.svg",erc20:!0,symbol:"VAL",decimals:18},"0x7A58c0Be72BE218B41C608b7Fe7C5bB630736C71":{name:"ConstitutionDAO",logo:"PEOPLE.svg",erc20:!0,symbol:"PEOPLE",decimals:18},"0x32E6C34Cd57087aBBD59B5A4AECC4cB495924356":{name:"BitBase",logo:"BTBS.svg",erc20:!0,symbol:"BTBS",decimals:18},"0x3fa400483487A489EC9b1dB29C4129063EEC4654":{name:"Cryptokek.com",logo:"cryptokek.svg",erc20:!0,symbol:"KEK",decimals:18},"0xEd3D4e446A96dC3b181B64B75c3c70dA41dC3CBe":{name:"Vodra",logo:"Vodra.svg",erc20:!0,symbol:"VDR",decimals:18},"0xb753428af26E81097e7fD17f40c88aaA3E04902c":{name:"Spice",logo:"sfi.svg",erc20:!0,symbol:"SFI",decimals:18},"0xd084944d3c05CD115C09d072B9F44bA3E0E45921":{name:"Manifold Finance",logo:"Manifold.svg",erc20:!0,symbol:"FOLD",decimals:18},"0x9a0242b7a33DAcbe40eDb927834F96eB39f8fBCB":{name:"BABB",logo:"bax.svg",erc20:!0,symbol:"BAX",decimals:18},"0x4Cf89ca06ad997bC732Dc876ed2A7F26a9E7f361":{name:"Mysterium",logo:"MYST.svg",erc20:!0,symbol:"MYST",decimals:18},"0x697eF32B4a3F5a4C39dE1cB7563f24CA7BfC5947":{name:"Insula Token",logo:"Insula.svg",erc20:!0,symbol:"ISLA",decimals:18},"0x62Dc4817588d53a056cBbD18231d91ffCcd34b2A":{name:"DeHive",logo:"dehive.svg",erc20:!0,erc721:!1,symbol:"DHV",decimals:18},"0x8400D94A5cb0fa0D041a3788e395285d61c9ee5e":{name:"Unibright",logo:"ubt.svg",erc20:!0,symbol:"UBT",decimals:8},"0xfAd45E47083e4607302aa43c65fB3106F1cd7607":{name:"Hoge Finance",logo:"HogeFinanceLogo.svg",erc20:!0,symbol:"HOGE",decimals:9},"0xBB0E17EF65F82Ab018d8EDd776e8DD940327B28b":{name:"Axie Infinity Shard",logo:"AXS.svg",erc20:!0,symbol:"AXS",decimals:18},"0xCC8Fa225D80b9c7D42F96e9570156c65D6cAAa25":{name:"Smooth Love Potion",logo:"SLP.svg",erc20:!0,symbol:"SLP",decimals:0},"0x10633216E7E8281e33c86F02Bf8e565a635D9770":{name:"Dvision Network",logo:"dvision.svg",erc20:!0,symbol:"DVI",decimals:18},"0x898BAD2774EB97cF6b94605677F43b41871410B1":{name:"vEth2",logo:"vEth2.svg",erc20:!0,symbol:"vEth2",decimals:18},"0x321C2fE4446C7c963dc41Dd58879AF648838f98D":{name:"Cryptex Finance",logo:"ctx.svg",erc20:!0,symbol:"CTX",decimals:18},"0x16c52CeeCE2ed57dAd87319D91B5e3637d50aFa4":{name:"TCAP Token",logo:"tcap.svg",erc20:!0,symbol:"TCAP",decimals:18},"0xE94B97b6b43639E238c851A7e693F50033EfD75C":{name:"Rainbow Token",logo:"halodao-rnbw.svg",erc20:!0,symbol:"RNBW",decimals:18},"0x47BE779De87de6580d0548cde80710a93c502405":{name:"Rainbow Pool",logo:"halodao-xrnbw.svg",erc20:!0,symbol:"xRNBW",decimals:18},"0xe7aE6D0C56CACaf007b7e4d312f9af686a9E9a04":{name:"Vabble",logo:"VAB.svg",erc20:!0,symbol:"VAB",decimals:18},"0x853d955aCEf822Db058eb8505911ED77F175b99e":{name:"Frax",logo:"frax.svg",erc20:!0,symbol:"FRAX",decimals:18},"0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0":{name:"Frax Share",logo:"fxs.svg",erc20:!0,symbol:"FXS",decimals:18},"0x84810bcF08744d5862B8181f12d17bfd57d3b078":{name:"SharedStake",logo:"sharedstake.svg",erc20:!0,symbol:"SGT",decimals:18},"0x75387e1287Dd85482aB66102DA9f6577E027f609":{name:"MindsyncAI",logo:"MAI.svg",erc20:!0,symbol:"MAI",decimals:18},"0x196f4727526eA7FB1e17b2071B3d8eAA38486988":{name:"Reserve",logo:"rsv.svg",erc20:!0,symbol:"RSV",decimals:18},"0x320623b8E4fF03373931769A31Fc52A4E78B5d70":{name:"Reserve Rights",logo:"rsr.svg",erc20:!0,symbol:"RSR",decimals:18},"0x1cF4592ebfFd730c7dc92c1bdFFDfc3B9EfCf29a":{name:"WAVES",logo:"waves.svg",erc20:!0,symbol:"WAVES",decimals:18},"0x252739487C1fa66eaeaE7CED41d6358aB2a6bCa9":{name:"ArCoin",logo:"ArCoin.svg",erc20:!0,symbol:"RCOIN",decimals:8},"0x18aAA7115705e8be94bfFEBDE57Af9BFc265B998":{name:"Audius",logo:"audius.svg",erc20:!0,symbol:"AUDIO",decimals:18},"0x8E3BCC334657560253B83f08331d85267316e08a":{name:"Rubic",logo:"brbc.svg",erc20:!0,symbol:"BRBC",decimals:18},"0xca1207647Ff814039530D7d35df0e1Dd2e91Fa84":{name:"dHEDGE DAO Token",logo:"DHT.svg",erc20:!0,symbol:"DHT",decimals:18},"0x6243d8CEA23066d098a15582d81a598b4e8391F4":{name:"Reflexer Ungovernance Token",logo:"flx.svg",erc20:!0,symbol:"FLX",decimals:18},"0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919":{name:"Rai Reflex Index",logo:"rai.svg",erc20:!0,symbol:"RAI",decimals:18},"0xF25c91C87e0B1fd9B4064Af0F427157AaB0193A7":{name:"BASIC Token",logo:"basic.svg",erc20:!0,symbol:"BASIC",decimals:18},"0x53C8395465A84955c95159814461466053DedEDE":{name:"DeGate Token",logo:"DG.svg",erc20:!0,symbol:"DG",decimals:18},"0xBCf9dBf8B14eD096B2BA08b7269356197fDd1b5D":{name:"Avaluse",logo:"avaluse.svg",erc20:!0,symbol:"AVAL",decimals:18},"0x6E765D26388A17A6e86c49A8E41DF3F58aBcd337":{name:"Kangal",logo:"kangal.svg",erc20:!0,symbol:"KANGAL",decimals:18},"0x9AF4f26941677C706cfEcf6D3379FF01bB85D5Ab":{name:"DomRaiderToken",logo:"drt.svg",erc20:!0,symbol:"DRT",decimals:8},"0x06B179e292f080871825beD5D722162fD96B4c95":{name:"10x.gg",logo:"xgg.svg",erc20:!0,symbol:"XGG",decimals:18},"0xF29992D7b589A0A6bD2de7Be29a97A6EB73EaF85":{name:"DMScript",logo:"dmst.svg",erc20:!0,symbol:"DMST",decimals:18},"0x64aa3364F17a4D01c6f1751Fd97C2BD3D7e7f1D5":{name:"Olympus",logo:"OHM.svg",erc20:!0,symbol:"OHM",decimals:9},"0x0ab87046fBb341D058F17CBC4c1133F25a20a52f":{name:"Governance OHM",logo:"gOHM.svg",erc20:!0,symbol:"gOHM",decimals:18},"0xDd1Ad9A21Ce722C151A836373baBe42c868cE9a4":{name:"Universal Basic Income",logo:"ubi.svg",erc20:!0,symbol:"UBI",decimals:18},"0xf293d23BF2CDc05411Ca0edDD588eb1977e8dcd4":{name:"Sylo",logo:"SYLO.svg",erc20:!0,symbol:"SYLO",decimals:18},"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84":{name:"Liquid staked Ether 2.0",logo:"stETH.svg",erc20:!0,symbol:"stETH",decimals:18},"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0":{name:"Wrapped liquid staked Ether 2.0",logo:"wstETH.svg",erc20:!0,symbol:"wstETH",decimals:18},"0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32":{name:"Lido DAO Token",logo:"LDO.svg",erc20:!0,symbol:"LDO",decimals:18},"0xbd31EA8212119f94A611FA969881CBa3EA06Fa3d":{name:"LUNA Token",logo:"Luna.svg",erc20:!0,symbol:"LUNA",decimals:6},"0xa693B19d2931d498c5B318dF961919BB4aee87a5":{name:"UST Token",logo:"UST.svg",erc20:!0,symbol:"UST",decimals:6},"0xd2877702675e6cEb975b4A1dFf9fb7BAF4C91ea9":{name:"LUNA Token - Shuttle",logo:"lunc.svg",erc20:!0,symbol:"LUNC",decimals:18},"0xa47c8bf37f92aBed4A126BDA807A7b7498661acD":{name:"UST Token - Shuttle",logo:"ustc.svg",erc20:!0,symbol:"USTC",decimals:18},"0xcAAfF72A8CbBfc5Cf343BA4e26f65a257065bFF1":{name:"KRT Token - Shuttle",logo:"KRT.svg",erc20:!0,symbol:"KRT-S",decimals:18},"0x676Ad1b33ae6423c6618C1AEcf53BAa29cf39EE5":{name:"SDT Token - Shuttle",logo:"SDT.svg",erc20:!0,symbol:"SDT-S",decimals:18},"0x156B36ec68FdBF84a925230BA96cb1Ca4c4bdE45":{name:"MNT Token - Shuttle",logo:"MNT.svg",erc20:!0,symbol:"MNT-S",decimals:18},"0x09a3EcAFa817268f77BE1283176B946C4ff2E608":{name:"MIR Token - Shuttle",logo:"MIR.svg",erc20:!0,symbol:"MIR-S",decimals:18},"0xd36932143F6eBDEDD872D5Fb0651f4B72Fd15a84":{name:"Mirror AAPL Token - Shuttle",logo:"mAAPL.svg",erc20:!0,symbol:"mAAPL-S",decimals:18},"0x59A921Db27Dd6d4d974745B7FfC5c33932653442":{name:"Mirror GOOGL Token - Shuttle",logo:"mGOOGL.svg",erc20:!0,symbol:"mGOGL-S",decimals:18},"0x21cA39943E91d704678F5D00b6616650F066fD63":{name:"Mirror TSLA Token - Shuttle",logo:"mTSLA.svg",erc20:!0,symbol:"mTSLA-S",decimals:18},"0xC8d674114bac90148d11D3C1d33C61835a0F9DCD":{name:"Mirror NFLX Token - Shuttle",logo:"mNFLX.svg",erc20:!0,symbol:"mNFLX-S",decimals:18},"0x13B02c8dE71680e71F0820c996E4bE43c2F57d15":{name:"Mirror QQQ Token - Shuttle",logo:"mQQQ.svg",erc20:!0,symbol:"mQQQ-S",decimals:18},"0xEdb0414627E6f1e3F082DE65cD4F9C693D78CCA9":{name:"Mirror TWTR Token - Shuttle",logo:"mTWTR.svg",erc20:!0,symbol:"mTWTR-S",decimals:18},"0x41BbEDd7286dAab5910a1f15d12CBda839852BD7":{name:"Mirror MSFT Token - Shuttle",logo:"mMSFT.svg",erc20:!0,symbol:"mMSFT-S",decimals:18},"0x0cae9e4d663793c2a2A0b211c1Cf4bBca2B9cAa7":{name:"Mirror AMZN Token - Shuttle",logo:"mAMZN.svg",erc20:!0,symbol:"mAMZN-S",decimals:18},"0x56aA298a19C93c6801FDde870fA63EF75Cc0aF72":{name:"Mirror BABA Token - Shuttle",logo:"mBABA.svg",erc20:!0,symbol:"mBABA-S",decimals:18},"0x1d350417d9787E000cc1b95d70E9536DcD91F373":{name:"Mirror IAU Token - Shuttle",logo:"mIAU.svg",erc20:!0,symbol:"mIAU-S",decimals:18},"0x9d1555d8cB3C846Bb4f7D5B1B1080872c3166676":{name:"Mirror SLV Token - Shuttle",logo:"mSLV.svg",erc20:!0,symbol:"mSLV-S",decimals:18},"0x31c63146a635EB7465e5853020b39713AC356991":{name:"Mirror USO Token - Shuttle",logo:"mUSO.svg",erc20:!0,symbol:"mUSO-S",decimals:18},"0xf72FCd9DCF0190923Fadd44811E240Ef4533fc86":{name:"Mirror VIXY Token - Shuttle",logo:"mVIXY.svg",erc20:!0,symbol:"mVIXY-S",decimals:18},"0x21BfBDa47A0B4B5b1248c767Ee49F7caA9B23697":{name:"OVR",logo:"OVR.svg",erc20:!0,symbol:"OVR",decimals:18},"0x4691937a7508860F876c9c0a2a617E7d9E945D4B":{name:"Wootrade Network",logo:"wootrade.svg",erc20:!0,symbol:"WOO",decimals:18},"0xaf9f549774ecEDbD0966C52f250aCc548D3F36E5":{name:"RFUEL",logo:"RFUEL.svg",erc20:!0,symbol:"RFUEL",decimals:18},"0x7420B4b9a0110cdC71fB720908340C03F9Bc03EC":{name:"JasmyCoin",logo:"JASMY.svg",erc20:!0,symbol:"JASMY",decimals:18},"0x947AEb02304391f8fbE5B25D7D98D649b57b1788":{name:"Mandala Exchange Token",logo:"mandala.svg",erc20:!0,symbol:"MDX",decimals:18},"0xCdeee767beD58c5325f68500115d4B722b3724EE":{name:"Carbon",logo:"CRBN.svg",erc20:!0,symbol:"CRBN",decimals:18},"0xA4EED63db85311E22dF4473f87CcfC3DaDCFA3E3":{name:"Rubic",logo:"Rubic.svg",erc20:!0,symbol:"RBC",decimals:18},"0x3A880652F47bFaa771908C07Dd8673A787dAEd3A":{name:"DerivaDAO",logo:"DDX.svg",erc20:!0,symbol:"DDX",decimals:18},"0xbC396689893D065F41bc2C6EcbeE5e0085233447":{name:"Perpetual",logo:"PERP.svg",erc20:!0,symbol:"PERP",decimals:18},"0xeca82185adCE47f39c684352B0439f030f860318":{name:"Perlin",logo:"PERL.svg",erc20:!0,symbol:"PERL",decimals:18},"0xA1AFFfE3F4D611d252010E3EAf6f4D77088b0cd7":{name:"Reflect Finance",logo:"RFI.svg",erc20:!0,symbol:"RFI",decimals:9},"0xC0bA369c8Db6eB3924965e5c4FD0b4C1B91e305F":{name:"DLP Duck Token",logo:"dlpducktoken.svg",erc20:!0,symbol:"DUCK",decimals:18},"0xFbEEa1C75E4c4465CB2FCCc9c6d6afe984558E20":{name:"DuckDaoDime",logo:"ddim.svg",erc20:!0,symbol:"DDIM",decimals:18},"0x745407c86DF8DB893011912d3aB28e68B62E49B0":{name:"MahaDAO",logo:"MAHA.svg",erc20:!0,symbol:"MAHA",decimals:18},"0x8CC0F052fff7eaD7f2EdCCcaC895502E884a8a71":{name:"ARTH Valuecoin",logo:"ARTH.svg",erc20:!0,symbol:"ARTH",decimals:18},"0x3231Cb76718CDeF2155FC47b5286d82e6eDA273f":{name:"Monerium EUR",logo:"EURe.svg",erc20:!0,symbol:"EURe",decimals:18},"0x7ba92741Bf2A568abC6f1D3413c58c6e0244F8fD":{name:"Monerium GBP",logo:"GBPe.svg",erc20:!0,symbol:"GBPe",decimals:18},"0xBc5142e0CC5eB16b47c63B0f033d4c2480853a52":{name:"Monerium USD",logo:"USDe.svg",erc20:!0,symbol:"USDe",decimals:18},"0xC642549743A93674cf38D6431f75d6443F88E3E2":{name:"Monerium ISK",logo:"ISKe.svg",erc20:!0,symbol:"ISKe",decimals:18},"0x66a0f676479Cee1d7373f3DC2e2952778BfF5bd6":{name:"WISE Token",logo:"wise.svg",erc20:!0,symbol:"WISE",decimals:18},"0x72F020f8f3E8fd9382705723Cd26380f8D0c66Bb":{name:"PlotX",logo:"plotx.svg",erc20:!0,symbol:"PLOT",decimals:18},"0x44197A4c44D6A059297cAf6be4F7e172BD56Caaf":{name:"ELTCOIN",logo:"ELTCOIN.svg",erc20:!0,symbol:"ELT",decimals:8},"0x6781a0F84c7E9e846DCb84A9a5bd49333067b104":{name:"ZAP TOKEN",logo:"zapicon.svg",erc20:!0,symbol:"ZAP",decimals:18},"0x00c83aeCC790e8a4453e5dD3B0B4b3680501a7A7":{name:"SKALE",logo:"skl.svg",erc20:!0,symbol:"SKL",decimals:18},"0x674C6Ad92Fd080e4004b2312b45f796a192D27a0":{name:"Neutrino USD",logo:"usdn.svg",erc20:!0,symbol:"USDN",decimals:18},"0xE5CAeF4Af8780E59Df925470b050Fb23C43CA68C":{name:"Ferrum Network Token",logo:"frm.svg",erc20:!0,symbol:"FRM",decimals:6},"0x998FFE1E43fAcffb941dc337dD0468d52bA5b48A":{name:"Rupiah Token",logo:"idrt.svg",erc20:!0,symbol:"IDRT",decimals:2},"0x4E15361FD6b4BB609Fa63C81A2be19d873717870":{name:"Fantom",logo:"ftm.svg",erc20:!0,symbol:"FTM",decimals:18},"0x557B933a7C2c45672B610F8954A3deB39a51A8Ca":{name:"REVV",logo:"revv.svg",erc20:!0,symbol:"REVV",decimals:18},"0xFFC97d72E13E01096502Cb8Eb52dEe56f74DAD7B":{name:"Aave AAVE",logo:"aAAVE.svg",erc20:!0,symbol:"aAAVE",decimals:18},"0x05Ec93c0365baAeAbF7AefFb0972ea7ECdD39CF1":{name:"Aave BAT",logo:"aBAT.svg",erc20:!0,symbol:"aBAT",decimals:18},"0xA361718326c15715591c299427c62086F69923D9":{name:"Aave BUSD",logo:"aBUSD.svg",erc20:!0,symbol:"aBUSD",decimals:18},"0x028171bCA77440897B824Ca71D1c56caC55b68A3":{name:"Aave DAI",logo:"aDAI.svg",erc20:!0,symbol:"aDAI",decimals:18},"0xaC6Df26a590F08dcC95D5a4705ae8abbc88509Ef":{name:"Aave ENJ",logo:"aENJ.svg",erc20:!0,symbol:"aENJ",decimals:18},"0xD37EE7e4f452C6638c96536e68090De8cBcdb583":{name:"Aave GUSD",logo:"aGUSD.svg",erc20:!0,symbol:"aGUSD",decimals:2},"0x39C6b3e42d6A679d7D776778Fe880BC9487C2EDA":{name:"Aave KNC",logo:"aKNC.svg",erc20:!0,symbol:"aKNC",decimals:18},"0xa06bC25B5805d5F8d82847D191Cb4Af5A3e873E0":{name:"Aave LINK",logo:"aLINK.svg",erc20:!0,symbol:"aLINK",decimals:18},"0xa685a61171bb30d4072B338c80Cb7b2c865c873E":{name:"Aave MANA",logo:"aMANA.svg",erc20:!0,symbol:"aMANA",decimals:18},"0xc713e5E149D5D0715DcD1c156a020976e7E56B88":{name:"Aave MKR",logo:"aMKR.svg",erc20:!0,symbol:"aMKR",decimals:18},"0xCC12AbE4ff81c9378D670De1b57F8e0Dd228D77a":{name:"Aave REN",logo:"aREN.svg",erc20:!0,symbol:"aREN",decimals:18},"0x35f6B052C598d933D69A4EEC4D04c73A191fE6c2":{name:"Aave SNX",logo:"aSNX.svg",erc20:!0,symbol:"aSNX",decimals:18},"0x6C5024Cd4F8A59110119C56f8933403A539555EB":{name:"Aave SUSD",logo:"aSUSD.svg",erc20:!0,symbol:"aSUSD",decimals:18},"0x101cc05f4A51C0319f570d5E146a8C625198e636":{name:"Aave TUSD",logo:"aTUSD.svg",erc20:!0,symbol:"aTUSD",decimals:18},"0xB9D7CB55f463405CDfBe4E90a6D2Df01C2B92BF1":{name:"Aave UNI",logo:"aUNI.svg",erc20:!0,symbol:"aUNI",decimals:18},"0xBcca60bB61934080951369a648Fb03DF4F96263C":{name:"Aave USDC",logo:"aUSDC.svg",erc20:!0,symbol:"aUSDC",decimals:6},"0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811":{name:"Aave USDT",logo:"aUSDT.svg",erc20:!0,symbol:"aUSDT",decimals:6},"0x9ff58f4fFB29fA2266Ab25e75e2A8b3503311656":{name:"Aave WBTC",logo:"aWBTC.svg",erc20:!0,symbol:"aWBTC",decimals:8},"0x030bA81f1c18d280636F32af80b9AAd02Cf0854e":{name:"Aave WETH",logo:"aWETH.svg",erc20:!0,symbol:"aWETH",decimals:18},"0x5165d24277cD063F5ac44Efd447B27025e888f37":{name:"Aave YFI",logo:"aYFI.svg",erc20:!0,symbol:"aYFI",decimals:18},"0xdef1fac7Bf08f173D286BbBDcBeeADe695129840":{name:"Defi Factory Token",logo:"DEFT.svg",erc20:!0,symbol:"DEFT",decimals:18},"0xDf7FF54aAcAcbFf42dfe29DD6144A69b629f8C9e":{name:"Aave ZRX",logo:"aZRX.svg",erc20:!0,symbol:"aZRX",decimals:18},"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9":{name:"Aave",logo:"AAVE.svg",erc20:!0,symbol:"AAVE",decimals:18},"0x44e2deC86B9F0e0266E9AA66e10323A2bd69CF9A":{name:"Attrace",logo:"attr.svg",erc20:!0,symbol:"ATTR",decimals:18},"0x1Da87b114f35E1DC91F72bF57fc07A768Ad40Bb0":{name:"Equalizer",logo:"EQZ.svg",erc20:!0,symbol:"EQZ",decimals:18},"0x4da27a545c0c5B758a6BA100e3a049001de870f5":{name:"Staked Aave",logo:"stkAAVE.svg",erc20:!0,symbol:"stAAVE",decimals:18},"0xba9d4199faB4f26eFE3551D490E3821486f135Ba":{name:"SwissBorg",logo:"chsb.svg",erc20:!0,symbol:"CHSB",decimals:8},"0x7DD9c5Cba05E151C895FDe1CF355C9A1D5DA6429":{name:"Golem Network Token",logo:"glm.svg",erc20:!0,symbol:"GLM",decimals:18},"0x7240aC91f01233BaAf8b064248E80feaA5912BA3":{name:"OctoFi",logo:"octo.svg",erc20:!0,symbol:"OCTO",decimals:18},"0xff56Cc6b1E6dEd347aA0B7676C85AB0B3D08B0FA":{name:"Orbs",logo:"orbs.svg",erc20:!0,symbol:"ORBS",decimals:18},"0x63f88A2298a5c4AEE3c216Aa6D926B184a4b2437":{name:"GAME Credits",logo:"GAMECreditsLogo.svg",erc20:!0,symbol:"GAME",decimals:18},"0x5150956E082C748Ca837a5dFa0a7C10CA4697f9c":{name:"Zeedex",logo:"zdex.svg",erc20:!0,symbol:"ZDEX",decimals:18},"0x84cA8bc7997272c7CfB4D0Cd3D55cd942B3c9419":{name:"DIAdata",logo:"dia.svg",erc20:!0,symbol:"DIA",decimals:18},"0xb78B3320493a4EFaa1028130C5Ba26f0B6085Ef8":{name:"Dracula",logo:"dracula.svg",erc20:!0,symbol:"DRC",decimals:18},"0xF433089366899D83a9f26A773D59ec7eCF30355e":{name:"Metal",logo:"mtl.svg",erc20:!0,symbol:"MTL",decimals:8},"0x85Eee30c52B0b379b046Fb0F85F4f3Dc3009aFEC":{name:"KEEP",logo:"keep.svg",erc20:!0,symbol:"KEEP",decimals:18},"0x8dAEBADE922dF735c38C80C7eBD708Af50815fAa":{name:"tBTC",logo:"tbtc.svg",erc20:!0,symbol:"TBTC",decimals:18},"0xD7EFB00d12C2c13131FD319336Fdf952525dA2af":{name:"Proton",logo:"proton.svg",erc20:!0,symbol:"XPR",decimals:4},"0x178c820f862B14f316509ec36b13123DA19A6054":{name:"Energy Web Token Bridged",logo:"ewtb.svg",erc20:!0,symbol:"EWTB",decimals:18},"0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39":{name:"HEX",logo:"hex.svg",erc20:!0,symbol:"HEX",decimals:8},"0xFca59Cd816aB1eaD66534D82bc21E7515cE441CF":{name:"Rarible",logo:"rari.svg",erc20:!0,symbol:"RARI",decimals:18},"0x7865af71cf0b288b4E7F654f4F7851EB46a2B7F8":{name:"Sentivate",logo:"sentivate.svg",erc20:!0,symbol:"SNTVT",decimals:18},"0xa3d58c4E56fedCae3a7c43A725aeE9A71F0ece4e":{name:"Metronome",logo:"metronome.svg",erc20:!0,symbol:"MET",decimals:18},"0x49d716DFe60b37379010A75329ae09428f17118d":{name:"PoolTogether Dai",logo:"pldai.svg",erc20:!0,symbol:"PLDAI",decimals:18},"0xfE6892654CBB05eB73d28DCc1Ff938f59666Fe9f":{name:"PoolTogether Sai",logo:"plsai.svg",erc20:!0,symbol:"PLSAI",decimals:18},"0x5732046A883704404F284Ce41FfADd5b007FD668":{name:"Bluzelle Token",logo:"Bluzelle.svg",erc20:!0,symbol:"BLZ",decimals:18},"0xBD87447F48ad729C5c4b8bcb503e1395F62e8B98":{name:"PoolTogether USDC",logo:"plusdc.svg",erc20:!0,symbol:"PLUSDC",decimals:6},"0x69A95185ee2a045CDC4bCd1b1Df10710395e4e23":{name:"$Poolz Finance",logo:"Poolz.svg",erc20:!0,symbol:"POOLZ",decimals:18},"0x0adA190c81b814548ddC2F6AdC4a689ce7C1FE73":{name:"yAxis",logo:"yaxis.svg",erc20:!0,symbol:"YAXIS",decimals:18},"0xb1dC9124c395c1e97773ab855d66E879f053A289":{name:"yAxis",logo:"yaxis.svg",erc20:!0,symbol:"YAX",decimals:18},"0xeF31Cb88048416E301Fee1eA13e7664b887BA7e8":{name:"Staked yAxis",logo:"yaxis.svg",erc20:!0,symbol:"sYAX",decimals:18},"0x28cb7e841ee97947a86B06fA4090C8451f64c0be":{name:"YF Link",logo:"YFL.svg",erc20:!0,symbol:"YFL",decimals:18},"0x75D1aA733920b14fC74c9F6e6faB7ac1EcE8482E":{name:"YFLink Staking Share",logo:"YFL.svg",erc20:!0,symbol:"yYFL",decimals:18},"0x7b760D06E401f85545F3B50c44bf5B05308b7b62":{name:"YFLink USD",logo:"YFLUSD.svg",erc20:!0,symbol:"YFLUSD",decimals:18},"0x8282df223AC402d04B2097d16f758Af4F70e7Db0":{name:"YFLink Synthetic",logo:"sYFL.svg",erc20:!0,symbol:"sYFL",decimals:18},"0x008377EB0C62cE8e0BA3D7Bb4A5638591f21588E":{name:"YFLink Bond",logo:"bYFL.svg",erc20:!0,symbol:"bYFL",decimals:18},"0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e":{name:"yearn.finance",logo:"yfi.svg",erc20:!0,symbol:"YFI",decimals:18},"0x261b45D85cCFeAbb11F022eBa346ee8D1cd488c0":{name:"rDAI",logo:"rdai.svg",erc20:!0,symbol:"rDAI",decimals:18},"0xea8b224eDD3e342DEb514C4176c2E72Bcce6fFF9":{name:"rSAI",logo:"rsai.svg",erc20:!0,symbol:"rSAI",decimals:18},"0x12B19D3e2ccc14Da04FAe33e63652ce469b3F2FD":{name:"GridPlus",logo:"GridPlus.svg",erc20:!0,symbol:"GRID",decimals:12},"0xDb05EA0877A2622883941b939f0bb11d1ac7c400":{name:"Opacity",logo:"opct.svg",erc20:!0,symbol:"OPCT",decimals:18},"0x4575f41308EC1483f3d399aa9a2826d74Da13Deb":{name:"Orchid",logo:"OXT.svg",erc20:!0,symbol:"OXT",decimals:18},"0x4CC19356f2D37338b9802aa8E8fc58B0373296E7":{name:"Selfkey",logo:"KEY.svg",erc20:!0,symbol:"KEY",decimals:18},"0x92A5B04D0ED5D94D7a193d1d334D3D16996f4E13":{name:"Eristica",logo:"Eristica.svg",erc20:!0,symbol:"ERT",decimals:18},"0xdAC17F958D2ee523a2206206994597C13D831ec7":{name:"Tether USD",logo:"usdt.svg",erc20:!0,symbol:"USDT",decimals:6},"0x06AF07097C9Eeb7fD685c692751D5C66dB49c215":{name:"Chai",logo:"CHAI.svg",erc20:!0,symbol:"CHAI",decimals:18},"0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828":{name:"UMA",logo:"uma.svg",erc20:!0,symbol:"UMA",decimals:18},"0x5f778ec4B31a506c1Dfd8b06F131E9B451a61D39":{name:"UPX Token",logo:"UPX.svg",erc20:!0,symbol:"UPX",decimals:18},"0xb1CD6e4153B2a390Cf00A6556b0fC1458C4A5533":{name:"ETHBNT Liquidity Pool",logo:"ETHBNT.svg",erc20:!0,symbol:"ETHBNT",decimals:18},"0xf0Ee6b27b759C9893Ce4f094b49ad28fd15A23e4":{name:"Enigma",logo:"enigma.svg",erc20:!0,symbol:"ENG",decimals:8},"0xaaAEBE6Fe48E54f431b0C390CfaF0b017d09D42d":{name:"Celsius",logo:"celsius.svg",erc20:!0,symbol:"CEL",decimals:4},"0xb683D83a532e2Cb7DFa5275eED3698436371cc9f":{name:"BTU",logo:"BTU.svg",erc20:!0,symbol:"BTU",decimals:18},"0x746DdA2ea243400D5a63e0700F190aB79f06489e":{name:"BOSAGORA",logo:"BOA.svg",erc20:!0,symbol:"BOA",decimals:7},"0x5D858bcd53E085920620549214a8b27CE2f04670":{name:"POP Network Token",logo:"POP.svg",erc20:!0,symbol:"POP",decimals:18},"0x048Fe49BE32adfC9ED68C37D32B5ec9Df17b3603":{name:"Skrumble Network V2",logo:"skm.svg",erc20:!0,symbol:"SKM",decimals:18},"0x16EA01aCB4b0Bca2000ee5473348B6937ee6f72F":{name:"Enecuum",logo:"ENQ-logo.svg",erc20:!0,symbol:"ENQ",decimals:10},"0xE5B826Ca2Ca02F09c1725e9bd98d9a8874C30532":{name:"ZEON Network",logo:"ZEON_logo.png",erc20:!0,symbol:"ZEON",decimals:18},"0x13cb85823f78Cff38f0B0E90D3e975b8CB3AAd64":{name:"REMIIT REMI Token",logo:"remi.svg",erc20:!0,symbol:"REMI",decimals:18},"0x93a7174dafd31d13400cD9fa01f4e5B5BAa00D39":{name:"Shaka",logo:"hak.svg",erc20:!0,symbol:"HAK",decimals:18},"0x6fB3e0A217407EFFf7Ca062D46c26E5d60a14d69":{name:"IoTeX",logo:"iotex.svg",erc20:!0,symbol:"IOTX",decimals:18},"0xE5a3229CCb22b6484594973A03a3851dCd948756":{name:"RAE Token",logo:"rae.svg",erc20:!0,symbol:"RAE",decimals:18},"0x4470BB87d77b963A013DB939BE332f927f2b992e":{name:"AdEx Legacy Token",logo:"adex.svg",erc20:!0,symbol:"ADXL",decimals:4},"0xADE00C28244d5CE17D72E40330B1c318cD12B7c3":{name:"AdEx Token",logo:"adex.svg",erc20:!0,symbol:"ADX",decimals:18},"0xDc5864eDe28BD4405aa04d93E05A0531797D9D59":{name:"Falcon",logo:"fnt.svg",erc20:!0,symbol:"FNT",decimals:6},"0x1966d718A565566e8E202792658D7b5Ff4ECe469":{name:"nDEX",logo:"nDEX.png",erc20:!0,symbol:"NDX",decimals:18},"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599":{name:"Wrapped BTC",logo:"wbtc.svg",erc20:!0,symbol:"WBTC",decimals:8},"0x150b0b96933B75Ce27af8b92441F8fB683bF9739":{name:"Dragonereum Gold",logo:"gold.svg",erc20:!0,symbol:"GOLD",decimals:18},"0x82f4dED9Cec9B5750FBFf5C2185AEe35AfC16587":{name:"DreamTeam Token",logo:"dream.svg",erc20:!0,symbol:"DREAM",decimals:6},"0x5d60d8d7eF6d37E16EBABc324de3bE57f135e0BC":{name:"MyBit",logo:"MYB.svg",erc20:!0,symbol:"MYB",decimals:18},"0x01FA555c97D7958Fa6f771f3BbD5CCD508f81e22":{name:"Civil Token",logo:"CVL_token.svg",erc20:!0,symbol:"CVL",decimals:18},"0x5adc961D6AC3f7062D2eA45FEFB8D8167d44b190":{name:"Dether",logo:"dether.svg",erc20:!0,symbol:"DTH",decimals:18},"0x3F17Dd476faF0a4855572F0B6ed5115D9bBA22AD":{name:"Wibson",logo:"wibson-logo.png",erc20:!0,symbol:"WIB",decimals:9},"0xDF347911910b6c9A4286bA8E2EE5ea4a39eB2134":{name:"Bob's Repair",logo:"bobsrepair.png",erc20:!0,symbol:"BOB",decimals:18},"0x3505F494c3f0fed0B594E01Fa41Dd3967645ca39":{name:"SWARM",logo:"swarm.svg",erc20:!0,symbol:"SWM",decimals:18},"0x6863bE0e7CF7ce860A574760e9020D519a8bDC47":{name:"On.Live",logo:"onlive.svg",erc20:!0,symbol:"ONL",decimals:18},"0xea5f88E54d982Cbb0c441cde4E79bC305e5b43Bc":{name:"Pareto",logo:"ParetoLogo.png",erc20:!0,symbol:"PARETO",decimals:18},"0x2e91E3e54C5788e9FdD6A181497FDcEa1De1bcc1":{name:"Hercules",logo:"herc.png",erc20:!0,symbol:"HERC",decimals:18},"0x4946Fcea7C692606e8908002e55A582af44AC121":{name:"FOAM",logo:"FOAM.svg",erc20:!0,symbol:"FOAM",decimals:18},"0x4D807509aECe24C0fa5A102b6a3B059Ec6E14392":{name:"Menlo One",logo:"Menlo_One.png",erc20:!0,symbol:"ONE",decimals:18},"0x27054b13b1B798B345b591a4d22e6562d47eA75a":{name:"AirSwap Token",logo:"AirSwapLogo.svg",erc20:!0,symbol:"AST",decimals:4},"0x8D5682941cE456900b12d47ac06a88b47C764CE1":{name:"RightMesh Token",logo:"Rmesh.png",erc20:!0,symbol:"RMESH",decimals:18},"0xDDe12a12A6f67156e0DA672be05c374e1B0a3e57":{name:"JOYSO",logo:"JOY.png",erc20:!0,symbol:"JOY",decimals:6},"0x0D262e5dC4A06a0F1c90cE79C7a60C09DfC884E4":{name:"JET8 Token",logo:"J8T.svg",erc20:!0,symbol:"J8T",decimals:8},"0x4a220E6096B25EADb88358cb44068A3248254675":{name:"Quant Network",logo:"quant-network.svg",erc20:!0,symbol:"QNT",decimals:18},"0xBC86727E770de68B1060C91f6BB6945c73e10388":{name:"Ink Protocol",logo:"ink_protocol.svg",erc20:!0,symbol:"XNK",decimals:18},"0xa95592DCFfA3C080B4B40E459c5f5692F67DB7F8":{name:"ELY Token",logo:"ely.png",erc20:!0,symbol:"ELY",decimals:18},"0x9E46A38F5DaaBe8683E10793b06749EEF7D733d1":{name:"PolySwarm Nectar",logo:"polyswarm_nectar.svg",erc20:!0,symbol:"NCT",decimals:18},"0xe1A178B681BD05964d3e3Ed33AE731577d9d96dD":{name:"BOX Token",logo:"box_token.png",erc20:!0,symbol:"BOX",decimals:18},"0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf":{name:"DAOstack",logo:"gen.svg",erc20:!0,symbol:"GEN",decimals:18},"0x6aEDbF8dFF31437220dF351950Ba2a3362168d1b":{name:"Dragonglass",logo:"dragonglass.svg",erc20:!0,symbol:"DGS",decimals:8},"0xd26114cd6EE289AccF82350c8d8487fedB8A0C07":{name:"OmiseGO",logo:"omg.svg",erc20:!0,symbol:"OMG",decimals:18},"0x99ea4dB9EE77ACD40B119BD1dC4E33e1C070b80d":{name:"Quantstamp",logo:"qsp.svg",erc20:!0,symbol:"QSP",decimals:18},"0xB64ef51C888972c908CFacf59B47C1AfBC0Ab8aC":{name:"Storj",logo:"storj.svg",erc20:!0,symbol:"STORJ",decimals:8},"0xD8E3FB3b08eBA982F2754988d70D57eDc0055ae6":{name:"Zoracles",logo:"zora.svg",erc20:!0,symbol:"ZORA",decimals:9},"0xF938424F7210f31dF2Aee3011291b658f872e91e":{name:"VISOR",logo:"VISR.svg",erc20:!0,symbol:"VISR",decimals:18},"0x0F5D2fB29fb7d3CFeE444a200298f468908cC942":{name:"Decentraland",logo:"mana.svg",erc20:!0,symbol:"MANA",decimals:18},"0x0F513fFb4926ff82D7F60A05069047AcA295C413":{name:"CrowdstartCoin",logo:"XSC_Logo.svg",erc20:!0,symbol:"XSC",decimals:18},"0x5BC7e5f0Ab8b2E10D2D0a3F21739FCe62459aeF3":{name:"Hut34 Entropy Token",logo:"ENTRP.png",symbol:"ENTRP",erc20:!0,decimals:18},"0x946112efaB61C3636CBD52DE2E1392D7A75A6f01":{name:"HYDRO TOKEN",logo:"hydro.svg",erc20:!0,symbol:"HYDRO",decimals:18},"0x2604FA406Be957E542BEb89E6754fCdE6815e83f":{name:"Playkey Token",logo:"playkey.svg",erc20:!0,symbol:"PKT",decimals:18},"0xE41d2489571d322189246DaFA5ebDe1F4699F498":{name:"0x",logo:"zrx.svg",erc20:!0,symbol:"ZRX",decimals:18},"0x957c30aB0426e0C93CD8241E2c60392d08c6aC8e":{name:"Modum Token",logo:"modum.svg",erc20:!0,symbol:"MOD",decimals:0},"0x1a7a8BD9106F2B8D977E08582DC7d24c723ab0DB":{name:"AppCoins",logo:"appc.svg",erc20:!0,decimals:18,symbol:"APPC"},"0xdB25f211AB05b1c97D595516F45794528a807ad8":{name:"STASIS EURS Token",logo:"stasis-eurs.svg",erc20:!0,decimals:2,symbol:"EURS"},"0xCA0e7269600d353F70b14Ad118A49575455C0f2f":{name:"AMLT",logo:"amlt.png",erc20:!0,decimals:18,symbol:"AMLT"},"0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F":{name:"Synthetix Network Token",logo:"synthetix.svg",erc20:!0,decimals:18,symbol:"SNX"},"0x57Ab1ec28D129707052df4dF418D58a2D46d5f51":{name:"Synth sUSD",logo:"synthetix_susd.svg",erc20:!0,decimals:18,symbol:"SUSD"},"0x5e74C9036fb86BD7eCdcb084a0673EFc32eA31cb":{name:"Synth sETH",logo:"synthetix_seth.svg",erc20:!0,decimals:18,symbol:"SETH"},"0xfE18be6b3Bd88A2D2A7f928d00292E7a9963CfC6":{name:"Synth sBTC",logo:"synthetix_sbtc.svg",erc20:!0,decimals:18,symbol:"SBTC"},"0x0DB8D8b76BC361bAcbB72E2C491E06085A97Ab31":{name:"IQeon",logo:"iqeon.svg",erc20:!0,decimals:18,symbol:"IQN"},"0x000C100050E98C91f9114fa5Dd75CE6869Bf4F53":{name:"CRYPTO10 Hedged",logo:"c10.svg",erc20:!0,symbol:"C10",decimals:18},"0x26E75307Fc0C021472fEb8F727839531F112f317":{name:"Crypto20",logo:"c20.svg",erc20:!0,symbol:"C20",decimals:18},"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d":{name:"Crypto Kitties",logo:"ck.svg",erc20:!1,erc721:!0,symbol:"CK",decimals:0},"0xE477292f1B3268687A29376116B0ED27A9c76170":{name:"Herocoin",logo:"herocoin_logo.png",erc20:!0,symbol:"PLAY",decimals:18},"0x4F4f0Db4de903B88f2B1a2847971E231D54F8fd3":{name:"Geens Platform Token",logo:"gee-icon.svg",erc20:!0,symbol:"GEE",decimals:8},"0xec67005c4E498Ec7f55E092bd1d35cbC47C91892":{name:"Enzyme Finance",logo:"mln.svg",erc20:!0,symbol:"MLN",decimals:18},"0xba2184520A1cC49a6159c57e61E1844E085615B6":{name:"HelloGold Token",logo:"hgt.png",erc20:!0,symbol:"HGT",decimals:8},"0xba358B6f5b4c0215650444B8C30D870B55050D2D":{name:"Hub Token",logo:"hub.svg",erc20:!0,symbol:"HUB",decimals:18},"0x8727c112C712c4a03371AC87a74dD6aB104Af768":{name:"Jetcoin Institute Token",logo:"JETCOIN28.png",erc20:!0,symbol:"JET",decimals:18},"0xf8e386EDa857484f5a12e4B5DAa9984E06E73705":{name:"Indorse Token",logo:"indorseLogo.jpg",erc20:!0,symbol:"IND",decimals:18},"0xA54ddC7B3CcE7FC8b1E3Fa0256D0DB80D2c10970":{name:"NEVERDIE Coin",logo:"ndc.png",erc20:!0,symbol:"NDC",decimals:18},"0x1c4481750daa5Ff521A2a7490d9981eD46465Dbd":{name:"BlockMason Credit Protocol Token",logo:"bcpt.svg",erc20:!0,symbol:"BCPT",decimals:18},"0x20F7A3DdF244dc9299975b4Da1C39F8D5D75f05A":{name:"Sapien Network Token",logo:"spn.svg",erc20:!0,symbol:"SPN",decimals:6},"0xA4e8C3Ec456107eA67d3075bF9e3DF3A75823DB0":{name:"Loom Token",logo:"loom.svg",erc20:!0,symbol:"LOOM",decimals:18},"0x42476F744292107e34519F9c357927074Ea3F75D":{name:"Loom",logo:"loom.svg",erc20:!0,symbol:"LOOM",decimals:18},"0x4F9254C83EB525f9FCf346490bbb3ed28a81C667":{name:"Celer Network Token",logo:"CELR.svg",erc20:!0,symbol:"CELR",decimals:18},"0x71D01dB8d6a2fBEa7f8d434599C237980C234e4C":{name:"Gladius",logo:"gladius.svg",erc20:!0,symbol:"GLA",decimals:8},"0xdd974D5C2e2928deA5F71b9825b8b646686BD200":{name:"Kyber Network Crystal",logo:"kyber.svg",erc20:!0,symbol:"KNC",decimals:18},"0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C":{name:"Bancor Network Token",logo:"bnt.svg",erc20:!0,symbol:"BNT",decimals:18},"0xfa05A73FfE78ef8f1a739473e462c54bae6567D9":{name:"Lunyr Token",logo:"lun.svg",erc20:!0,symbol:"LUN",decimals:18},"0xC741f06082AA47F93729070aD0dD95E223Bda091":{name:"LEDU Token",logo:"edu.svg",erc20:!0,symbol:"LEDU",decimals:8},"0x5c543e7AE0A1104f78406C340E9C64FD9fCE5170":{name:"vSlice",logo:"vslice.png",erc20:!0,symbol:"VSL",decimals:18},"0x1f41E42D0a9e3c0Dd3BA15B527342783B43200A9":{name:"Blockchain Capital",logo:"bcap.svg",erc20:!0,symbol:"BCAP",decimals:0},"0x6531f133e6DeeBe7F2dcE5A0441aA7ef330B4e53":{name:"Chronobank TIME",logo:"chronobank.png",erc20:!0,symbol:"TIME",decimals:8},"0xaAAf91D9b90dF800Df4F55c205fd6989c977E73a":{name:"Monolith TKN",logo:"tkn.svg",erc20:!0,symbol:"TKN",decimals:8},"0x08711D3B02C8758F2FB3ab4e80228418a7F8e39c":{name:"Edgeless",logo:"edg.svg",erc20:!0,symbol:"EDG",decimals:0},"0xf7B098298f7C69Fc14610bf71d5e02c60792894C":{name:"Guppy",logo:"guppy.png",erc20:!0,symbol:"GUP",decimals:3},"0x4DF812F6064def1e5e029f1ca858777CC98D2D81":{name:"Xaurum",logo:"xaurum_logo.svg",erc20:!0,symbol:"XAUR",decimals:8},"0xB9e7F8568e08d5659f5D29C4997173d84CdF2607":{name:"Swarm City Token",logo:"swt.svg",erc20:!0,symbol:"SWT",decimals:18},"0xCb94be6f13A1182E4A4B6140cb7bf2025d28e41B":{name:"Trustcoin",logo:"trst.svg",erc20:!0,symbol:"TRST",decimals:6},"0xCB56b52316041A62B6b5D0583DcE4A8AE7a3C629":{name:"Cigarettes",logo:"cig.svg",erc20:!0,symbol:"CIG",decimals:18},"0x960b236A07cf122663c4303350609A66A7B288C0":{name:"Aragon Network Token v1",logo:"antv1.svg",erc20:!0,symbol:"ANTv1",decimals:18},"0x667088b212ce3d06a1b553a7221E1fD19000d9aF":{name:"WINGS",logo:"wings_logo.svg",erc20:!0,symbol:"WINGS",decimals:18},"0x16484d73Ac08d2355F466d448D2b79D2039F6EBB":{name:"FortKnoxster",logo:"FortKnoxster.svg",erc20:!0,symbol:"FKX",decimals:18},"0xAf30D2a7E90d7DC361c8C4585e9BB7D2F6f15bc7":{name:"FirstBlood Token",logo:"1st.svg",erc20:!0,symbol:"1ST",decimals:18},"0x607F4C5BB672230e8672085532f7e901544a7375":{name:"iExec RLC Token",logo:"rlc.svg",erc20:!0,symbol:"RLC",decimals:9},"0xaeC2E87E0A235266D9C5ADc9DEb4b2E29b54D009":{name:"SingularDTV",logo:"singulardtv.svg",erc20:!0,symbol:"SNGLS",decimals:0},"0x888666CA69E0f178DED6D75b5726Cee99A87D698":{name:"ICONOMI",logo:"iconomi.png",erc20:!0,symbol:"ICN",decimals:18},"0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2":{name:"Maker",logo:"mkr.svg",erc20:!0,symbol:"MKR",decimals:18},"0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359":{name:"Sai Stablecoin v1.0",logo:"sai.svg",erc20:!0,symbol:"SAI",decimals:18},"0x6B175474E89094C44Da98b954EedeAC495271d0F":{name:"Dai Stablecoin",logo:"dai.svg",erc20:!0,symbol:"DAI",decimals:18},"0xC477D038d5420C6A9e0b031712f61c5120090de9":{name:"Boson Token",logo:"boson.svg",erc20:!0,symbol:"BOSON",decimals:18},"0xD46bA6D942050d489DBd938a2C909A5d5039A161":{name:"Ampleforth",logo:"ampl.svg",erc20:!0,symbol:"AMPL",decimals:9},"0x4b9278b94a1112cAD404048903b8d343a810B07e":{name:"Hifi Finance",logo:"hifi.svg",erc20:!0,symbol:"HIFI",decimals:18},"0x0D8775F648430679A709E98d2b0Cb6250d2887EF":{name:"Basic Attention Token",logo:"bat.svg",erc20:!0,symbol:"BAT",decimals:18},"0x4D8fc1453a0F359e99c9675954e656D80d996FbF":{name:"BEE Token",logo:"bee_token.svg",erc20:!0,symbol:"BEE",decimals:18},"0x6810e776880C02933D47DB1b9fc05908e5386b96":{name:"Gnosis Token",logo:"gnosis.svg",erc20:!0,symbol:"GNO",decimals:18},"0x514910771AF9Ca656af840dff83E8264EcF986CA":{name:"Chainlink Token",logo:"chainlink.svg",erc20:!0,symbol:"LINK",decimals:18},"0xD8912C10681D8B21Fd3742244f44658dBA12264E":{name:"Pluton",logo:"plutus-god.svg",erc20:!0,symbol:"PLU",decimals:18},"0x1985365e9f78359a9B6AD760e32412f4a445E862":{name:"Reputation Old",logo:"rep.svg",erc20:!0,symbol:"REP",decimals:18},"0x221657776846890989a759BA2973e427DfF5C9bB":{name:"Reputation",logo:"repv2.svg",erc20:!0,symbol:"REPv2",decimals:18},"0xd0929d411954c47438dc1d871dd6081F5C5e149c":{name:"Refereum",logo:"rfr.svg",erc20:!0,symbol:"RFR",decimals:4},"0xb0866289e870D2efc282406cF4123Df6E5BcB652":{name:"NoFakeCoin",logo:"nfticon.png",erc20:!0,symbol:"NFC",decimals:18},"0x2C4e8f2D746113d0696cE89B35F0d8bF88E0AEcA":{name:"Open Simple Token",logo:"OST.svg",erc20:!0,symbol:"OST",decimals:18},"0x408e41876cCCDC0F92210600ef50372656052a38":{name:"Republic Token",logo:"ren.svg",erc20:!0,symbol:"REN",decimals:18},"0xEB4C2781e4ebA804CE9a9803C67d0893436bB27D":{name:"renBTC",logo:"renBTC.svg",erc20:!0,symbol:"renBTC",decimals:8},"0x1C5db575E2Ff833E46a2E9864C22F4B22E0B37C2":{name:"renZEC",logo:"renZEC.svg",erc20:!0,symbol:"renZEC",decimals:8},"0x459086F2376525BdCebA5bDDA135e4E9d3FeF5bf":{name:"renBCH",logo:"renBCH.svg",erc20:!0,symbol:"renBCH",decimals:8},"0xD5147bc8e386d91Cc5DBE72099DAC6C9b99276F5":{name:"renFIL",logo:"renFIL.svg",erc20:!0,symbol:"renFIL",decimals:18},"0xa74476443119A942dE498590Fe1f2454d7D4aC0d":{name:"Golem Network Token",logo:"golem.svg",erc20:!0,symbol:"GNT",decimals:18},"0x6888a16eA9792c15A4DCF2f6C623D055c8eDe792":{name:"Spectiv Signal Token",logo:"spectiv.svg",erc20:!0,symbol:"SIG",decimals:18},"0x9a642d6b3368ddc662CA244bAdf32cDA716005BC":{name:"Qtum",logo:"qtum.svg",erc20:!0,decimals:18,symbol:"QTUM"},"0x1234567461d3f8Db7496581774Bd869C83D51c93":{name:"BitClave",logo:"bitclave.svg",erc20:!0,decimals:18,symbol:"CAT"},"0x7d4b8Cce0591C9044a22ee543533b72E976E36C3":{name:"Change",logo:"change.svg",erc20:!0,decimals:18,symbol:"CAG"},"0x1d462414fe14cf489c7A21CaC78509f4bF8CD7c0":{name:"CanYaCoin",logo:"CanYa.svg",erc20:!0,decimals:6,symbol:"CAN"},"0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72":{name:"Ethereum Name Service",logo:"ens.svg",erc20:!0,decimals:18,symbol:"ENS"},"0x3d1BA9be9f66B8ee101911bC36D3fB562eaC2244":{name:"Rivetz",logo:"rivetz.png",erc20:!0,decimals:18,symbol:"RVT"},"0x056017c55aE7AE32d12AeF7C679dF83A85ca75Ff":{name:"Project Wyvern Token",logo:"wyvern-logo.svg",erc20:!0,symbol:"WYV",decimals:18},"0xfec0cF7fE078a500abf15F1284958F22049c2C7e":{name:"Maecenas ART Token",logo:"art.svg",erc20:!0,symbol:"ART",decimals:18},"0x05f4a42e251f2d52b8ed15E9FEdAacFcEF1FAD27":{name:"Zilliqa",logo:"zilliqa.svg",erc20:!0,symbol:"ZIL",decimals:12},"0x986EE2B944c42D017F52Af21c4c69B84DBeA35d8":{name:"BitMartToken",logo:"bitmart.png",erc20:!0,symbol:"BMX",decimals:18},"0xF03f8D65BaFA598611C3495124093c56e8F638f0":{name:"Viewly",logo:"viewly.svg",erc20:!0,symbol:"VIEW",decimals:18},"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2":{name:"Wrapped Ether",logo:"weth.svg",erc20:!0,symbol:"WETH",decimals:18},"0xba5BDe662c17e2aDFF1075610382B9B691296350":{name:"SuperRare Token",logo:"rare.svg",erc20:!0,symbol:"RARE",decimals:18},"0x6C8c6b02E7b2BE14d4fA6022Dfd6d75921D90E4E":{name:"Compound Basic Attention Token",logo:"ctoken-bat.svg",erc20:!0,symbol:"cBAT",decimals:8},"0x70e36f6BF80a52b3B46b3aF8e106CC0ed743E8e4":{name:"Compound Collateral",logo:"ctoken-comp.svg",erc20:!0,symbol:"cCOMP",decimals:8},"0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643":{name:"Compound Dai",logo:"ctoken-dai.svg",erc20:!0,symbol:"cDAI",decimals:8},"0xF5DCe57282A584D2746FaF1593d3121Fcac444dC":{name:"Compound Sai (Legacy Dai)",logo:"ctoken-sai.svg",erc20:!0,symbol:"cSAI",decimals:8},"0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5":{name:"Compound Ether",logo:"ctoken-eth.svg",erc20:!0,symbol:"cETH",decimals:8},"0x158079Ee67Fce2f58472A96584A73C7Ab9AC95c1":{name:"Compound Augur",logo:"ctoken-rep.svg",erc20:!0,symbol:"cREP",decimals:8},"0x39AA39c021dfbaE8faC545936693aC917d5E7563":{name:"Compound USD Coin",logo:"ctoken-usdc.svg",erc20:!0,symbol:"cUSDC",decimals:8},"0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9":{name:"Compound Tether",logo:"ctoken-usdt.svg",erc20:!0,symbol:"cUSDT",decimals:8},"0xC11b1268C1A384e55C48c2391d8d480264A3A7F4":{name:"Compound Wrapped BTC",logo:"ctoken-wbtc.svg",erc20:!0,symbol:"cWBTC",decimals:8},"0xB3319f5D18Bc0D84dD1b4825Dcde5d5f7266d407":{name:"Compound 0x",logo:"ctoken-zrx.svg",erc20:!0,symbol:"cZRX",decimals:8},"0xc00e94Cb662C3520282E6f5717214004A7f26888":{name:"Compound",logo:"comp.svg",erc20:!0,symbol:"COMP",decimals:18},"0xFFE02ee4C69eDf1b340fCaD64fbd6b37a7b9e265":{name:"NANJCOIN",logo:"nanjcoin.svg",erc20:!0,symbol:"NANJ",decimals:8},"0xB6eD7644C69416d67B522e20bC294A9a9B405B31":{name:"0xBitcoin Token",logo:"0xbitcoin.svg",erc20:!0,symbol:"0xBTC",decimals:8},"0x744d70FDBE2Ba4CF95131626614a1763DF805B9E":{name:"Status Network Token",logo:"snt.svg",erc20:!0,symbol:"SNT",decimals:18},"0x42d6622deCe394b54999Fbd73D108123806f6a18":{name:"SPANK",logo:"spank.svg",erc20:!0,symbol:"SPANK",decimals:18},"0x6B01c3170ae1EFEBEe1a3159172CB3F7A5ECf9E5":{name:"BOOTY",logo:"booty.png",erc20:!0,symbol:"BOOTY",decimals:18},"0x4a6058666cf1057eaC3CD3A5a614620547559fc9":{name:"Brickblock",logo:"Brickblock.svg",erc20:!0,symbol:"BBK",decimals:18},"0x80fB784B7eD66730e8b1DBd9820aFD29931aab03":{name:"ETHLend Token",logo:"lend.svg",erc20:!0,symbol:"LEND",decimals:18},"0x48FF53777F747cFB694101222a944dE070c15D36":{name:"Ether Kingdoms Token",logo:"IMP.svg",erc20:!0,symbol:"IMP",decimals:7},"0x02F61Fd266DA6E8B102D4121f5CE7b992640CF98":{name:"LikeCoin",logo:"like.svg",erc20:!0,symbol:"LIKE",decimals:18},"0xB8c77482e45F1F44dE1745F52C74426C631bDD52":{name:"Binance Coin",logo:"bnb.png",erc20:!0,symbol:"BNB",decimals:18},"0xD850942eF8811f2A866692A623011bDE52a462C1":{name:"VeChain",logo:"ven.svg",erc20:!0,symbol:"VEN",decimals:18},"0x91Af0fBB28ABA7E31403Cb457106Ce79397FD4E6":{name:"Aergo",logo:"Aergo.svg",erc20:!0,symbol:"AERGO",decimals:18},"0x5CA9a71B1d01849C0a95490Cc00559717fCF0D1d":{name:"Aeternity",logo:"aeternity.svg",erc20:!0,symbol:"AE",decimals:18},"0xd4fa1460F537bb9085d22C7bcCB5DD450Ef28e3a":{name:"Populous",logo:"ppt.svg",erc20:!0,symbol:"PPT",decimals:8},"0xFA1a856Cfa3409CFa145Fa4e20Eb270dF3EB21ab":{name:"IOST",logo:"iost.png",erc20:!0,symbol:"IOST",decimals:18},"0x039B5649A59967e3e936D7471f9c3700100Ee1ab":{name:"Kucoin Shares",logo:"kucoin.svg",erc20:!0,symbol:"KCS",decimals:6},"0x3893b9422Cd5D70a81eDeFfe3d5A1c6A978310BB":{name:"Mithril",logo:"mith.svg",erc20:!0,symbol:"MITH",decimals:18},"0xb7cB1C96dB6B22b0D3d9536E0108d062BD488F74":{name:"Walton Token",logo:"wtc.svg",erc20:!0,symbol:"WTC",decimals:18},"0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671":{name:"Numeraire",logo:"nmr.png",erc20:!0,symbol:"NMR",decimals:18},"0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd":{name:"Gemini Dollar",logo:"gusd.svg",erc20:!0,symbol:"GUSD",decimals:2},"0xA4Bdb11dc0a2bEC88d24A3aa1E6Bb17201112eBe":{name:"StableUSD",logo:"usds.svg",erc20:!0,symbol:"USDS",decimals:6},"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48":{name:"USDC",logo:"usdc.svg",erc20:!0,symbol:"USDC",decimals:6},"0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c":{name:"EURC",logo:"eurc.svg",erc20:!0,symbol:"EURC",decimals:6},"0x93ED3FBe21207Ec2E8f2d3c3de6e058Cb73Bc04d":{name:"Pinakion Token",logo:"pinakion.svg",erc20:!0,symbol:"PNK",decimals:18},"0x419D0d8BdD9aF5e606Ae2232ed285Aff190E711b":{name:"FunFair",logo:"fun.svg",erc20:!0,symbol:"FUN",decimals:8},"0xcA2796F9F61dc7b238Aab043971e49c6164DF375":{name:"YGGDRASH YEED Token",logo:"yggdrash.svg",erc20:!0,symbol:"YEED",decimals:18},"0x03e3f0c25965f13DbbC58246738C183E27b26a56":{name:"Disciplina Token",logo:"disciplina.svg",erc20:!0,symbol:"DSCP",decimals:18},"0xE814aeE960a85208C3dB542C53E7D4a6C8D5f60F":{name:"Chronologic DAY Token",logo:"DAY.png",erc20:!0,symbol:"DAY",decimals:18},"0x7E43581b19ab509BCF9397a2eFd1ab10233f27dE":{name:"PLATINUM",logo:"plat.png",erc20:!0,symbol:"PLAT",decimals:18},"0x8E870D67F660D95d5be530380D0eC0bd388289E1":{name:"Pax Dollar",logo:"usdp.svg",erc20:!0,symbol:"USDP",decimals:18},"0x45804880De22913dAFE09f4980848ECE6EcbAf78":{name:"PAX Gold",logo:"paxg.svg",erc20:!0,symbol:"PAXG",decimals:18},"0x0000000000085d4780B73119b644AE5ecd22b376":{name:"TrueUSD",logo:"TUSD.svg",erc20:!0,symbol:"TUSD",decimals:18},"0x00000000441378008EA67F4284A57932B1c000a5":{name:"TrueGBP",logo:"TGBP.svg",erc20:!0,symbol:"TGBP",decimals:18},"0x00006100F7090010005F1bd7aE6122c3C2CF0090":{name:"TrueAUD",logo:"TAUD.svg",erc20:!0,symbol:"TAUD",decimals:18},"0x00000100F2A2bd000715001920eB70D229700085":{name:"TrueCAD",logo:"TCAD.svg",erc20:!0,symbol:"TCAD",decimals:18},"0x0000852600CEB001E08e00bC008be620d60031F2":{name:"TrueHKD",logo:"THKD.svg",erc20:!0,symbol:"THKD",decimals:18},"0x4Fabb145d64652a948d72533023f6E7A623C7C53":{name:"Binance USD",logo:"busd.svg",erc20:!0,symbol:"BUSD",decimals:18},"0x23Ccc43365D9dD3882eab88F43d515208f832430":{name:"MidasProtocol",logo:"MAS.png",erc20:!0,symbol:"MAS",decimals:18},"0xC16b542ff490e01fcc0DC58a60e1EFdc3e357cA6":{name:"ICE ROCK MINING",logo:"rock2.png",erc20:!0,symbol:"ROCK2",decimals:0},"0x6758B7d441a9739b98552B373703d8d3d14f9e62":{name:"POA20 Token",logo:"POA20.png",erc20:!0,symbol:"POA20",decimals:18},"0x3DB6Ba6ab6F95efed1a6E794caD492fAAabF294D":{name:"LTO Network Token (old)",logo:"LTO.svg",erc20:!0,symbol:"LTOOLD",decimals:8},"0xd01409314aCb3b245CEa9500eCE3F6Fd4d70ea30":{name:"LTO Network Token",logo:"LTO.svg",erc20:!0,symbol:"LTO",decimals:8},"0xfeF4185594457050cC9c23980d301908FE057Bb1":{name:"VIDT Datalink",logo:"VIDT.svg",erc20:!0,symbol:"VIDT-OLD",decimals:18},"0x3BE7bF1A5F23BD8336787D0289B70602f1940875":{name:"VIDT DAO",logo:"VIDT.svg",erc20:!0,symbol:"VIDT",decimals:18},"0x7064aAb39A0Fcf7221c3396719D0917a65E35515":{name:"Cpollo",logo:"Cpollo.svg",erc20:!0,symbol:"CPLO",decimals:18},"0xd8446236FA95b9b5f9fd0f8E7Df1a944823c683d":{name:"NEEO",logo:"neeo.png",erc20:!0,symbol:"NEEO",decimals:18},"0xA823E6722006afe99E91c30FF5295052fe6b8E32":{name:"Neumark",logo:"neu.svg",erc20:!0,symbol:"NEU",decimals:18},"0x8f693ca8D21b157107184d29D398A8D082b38b76":{name:"Streamr",logo:"streamr.svg",erc20:!0,symbol:"DATA",decimals:18},"0x0Cf0Ee63788A0849fE5297F3407f701E122cC023":{name:"Streamr (old)",logo:"streamr_old.svg",erc20:!0,symbol:"XDATA",decimals:18},"0xA0b73E1Ff0B80914AB6fe0444E65848C4C34450b":{name:"Cronos",logo:"cro.svg",erc20:!0,symbol:"CRO",decimals:8},"0xF70a642bD387F94380fFb90451C2c81d4Eb82CBc":{name:"STAR",logo:"starbase.png",erc20:!0,symbol:"STAR",decimals:18},"0x7C5A0CE9267ED19B22F8cae653F198e3E8daf098":{name:"Santiment",logo:"santiment.svg",erc20:!0,symbol:"SAN",decimals:18},"0x58b6A8A3302369DAEc383334672404Ee733aB239":{name:"Livepeer",logo:"lpt.svg",erc20:!0,symbol:"LPT",decimals:18},"0x6fe56C0bcdD471359019FcBC48863d6c3e9d4F41":{name:"Props",logo:"props.png",erc20:!0,symbol:"PROPS",decimals:18},"0x6c6EE5e31d828De241282B9606C8e98Ea48526E2":{name:"HoloToken",logo:"hot.svg",erc20:!0,symbol:"HOT",decimals:18},"0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c":{name:"Enjin Coin",logo:"enj.svg",erc20:!0,symbol:"ENJ",decimals:18},"0xbf2179859fc6D5BEE9Bf9158632Dc51678a4100e":{name:"AELF",logo:"elf.svg",erc20:!0,symbol:"ELF",decimals:18},"0x39Bb259F66E1C59d5ABEF88375979b4D20D98022":{name:"WAX Token",logo:"wax.svg",erc20:!0,symbol:"WAX",decimals:8},"0x595832F8FC6BF59c85C527fEC3740A1b7a361269":{name:"PowerLedger",logo:"powr.svg",erc20:!0,symbol:"POWR",decimals:6},"0x28dee01D53FED0Edf5f6E310BF8Ef9311513Ae40":{name:"BlitzPredict",logo:"blitzpredict.svg",erc20:!0,symbol:"XBP",decimals:18},"0x33349B282065b0284d756F0577FB39c158F935e6":{name:"Maple Finance",logo:"maple-finance.svg",erc20:!0,erc721:!1,symbol:"MPL",decimals:18},"0xFBeef911Dc5821886e1dda71586d90eD28174B7d":{name:"KnownOrigin",logo:"knownorigin.svg",erc20:!0,symbol:"KODA",decimals:0},"0x8207c1FfC5B6804F6024322CcF34F29c3541Ae26":{name:"Origin Protocol",logo:"ogn.svg",erc20:!0,symbol:"OGN",decimals:18},"0x2A8e1E676Ec238d8A992307B495b45B3fEAa5e86":{name:"Origin Dollar",logo:"ousd.svg",erc20:!0,symbol:"OUSD",decimals:18},"0x856c4Efb76C1D1AE02e20CEB03A2A6a08b0b8dC3":{name:"Origin Ether",logo:"oeth.svg",erc20:!0,symbol:"OETH",decimals:18},"0x9c354503C38481a7A7a51629142963F98eCC12D0":{name:"Origin DeFi Governance",logo:"ogv.svg",erc20:!0,symbol:"OGV",decimals:18},"0x0C4576Ca1c365868E162554AF8e385dc3e7C66D9":{name:"Vote Escrowed Origin DeFi Governance",logo:"veogv.svg",erc20:!0,symbol:"veOGV",decimals:18},"0x8f8221aFbB33998d8584A2B05749bA73c37a938a":{name:"Request",logo:"request.svg",erc20:!0,symbol:"REQ",decimals:18},"0x2aEa4Add166EBf38b63d09a75dE1a7b94Aa24163":{name:"Kudos",logo:"kudos.svg",erc20:!1,erc721:!0,symbol:"KDO",decimals:0},"0x14C926F2290044B647e1Bf2072e67B495eff1905":{name:"Bethereum",logo:"bether.jpg",erc20:!0,symbol:"BETHER",decimals:18},"0x9AAb071B4129B083B01cB5A0Cb513Ce7ecA26fa5":{name:"Hunt Token",logo:"hunt.png",erc20:!0,symbol:"HUNT",decimals:18},"0xFEF3884b603C33EF8eD4183346E093A173C94da6":{name:"Metamorph",logo:"metamorph.svg",erc20:!0,symbol:"METM",decimals:18},"0x0AbdAce70D3790235af448C88547603b945604ea":{name:"district0x",logo:"district0x.svg",erc20:!0,symbol:"DNT",decimals:18},"0xB26631c6dda06aD89B93C71400D25692de89c068":{name:"Minds",logo:"minds.svg",erc20:!0,symbol:"MINDS",decimals:18},"0xBb1f24C0c1554b9990222f036b0AaD6Ee4CAec29":{name:"CryptoSoul",logo:"SOUL.svg",erc20:!0,symbol:"SOUL",decimals:18},"0xFF0E5e014cf97e0615cb50F6f39Da6388E2FaE6E":{name:"Origo",logo:"origo.svg",erc20:!0,symbol:"OGO",decimals:18},"0x0cB8D0B37C7487b11d57F1f33dEfA2B1d3cFccfE":{name:"DANKToken",logo:"dank-logo.svg",erc20:!0,symbol:"DANK",decimals:18},"0x3a4f40631a4f906c2BaD353Ed06De7A5D3fCb430":{name:"PlayDapp Token",logo:"playdapp.svg",erc20:!0,symbol:"PLA",decimals:18},"0xE9e3F9cfc1A64DFca53614a0182CFAD56c10624F":{name:"Su Squares",logo:"Su-Squares.svg",erc20:!1,erc721:!0,symbol:"SU",decimals:0},"0xfA5047c9c78B8877af97BDcb85Db743fD7313d4a":{name:"ROOK",logo:"Rook.svg",erc20:!0,symbol:"ROOK",decimals:18},"0xa62cc35625B0C8dc1fAEA39d33625Bb4C15bD71C":{name:"StormX",logo:"stormx.svg",erc20:!0,symbol:"STMX",decimals:18},"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0":{name:"Matic Network Token",logo:"matic.svg",erc20:!0,symbol:"MATIC",decimals:18},"0x9992eC3cF6A55b00978cdDF2b27BC6882d88D1eC":{name:"Polymath",logo:"poly.svg",erc20:!0,symbol:"POLY",decimals:18},"0x0a50C93c762fDD6E56D86215C24AaAD43aB629aa":{name:"LGO Token",logo:"lgo.png",erc20:!0,symbol:"LGO",decimals:8},"0xc8Cac7672f4669685817cF332a33Eb249F085475":{name:"LivenCoin",logo:"LVN.svg",erc20:!0,symbol:"LVN",decimals:18},"0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD":{name:"Loopring",logo:"LRC.svg",erc20:!0,symbol:"LRC",decimals:18},"0x255Aa6DF07540Cb5d3d297f0D0D4D84cb52bc8e6":{name:"Raiden Network Token",logo:"raiden.svg",erc20:!0,symbol:"RDN",decimals:18},"0x66fD97a78d8854fEc445cd1C80a07896B0b4851f":{name:"Lunch Money",logo:"LMY.svg",erc20:!0,symbol:"LMY",decimals:18},"0x679131F591B4f369acB8cd8c51E68596806c3916":{name:"Trustlines Network Token",logo:"TLN128.png",erc20:!0,symbol:"TLN",decimals:18},"0xdcD85914b8aE28c1E62f1C488E1D968D5aaFfE2b":{name:"TOP Network Token",logo:"TOP.svg",erc20:!0,symbol:"TOP",decimals:18},"0xaea46A60368A7bD060eec7DF8CBa43b7EF41Ad85":{name:"Fetch",logo:"fetch.svg",erc20:!0,symbol:"FET",decimals:18},"0x2e1E15C44Ffe4Df6a0cb7371CD00d5028e571d14":{name:"Mettalex",logo:"mettalex.svg",erc20:!0,symbol:"MTLX",decimals:18},"0xf21661D0D1d76d3ECb8e1B9F1c923DBfffAe4097":{name:"Realio Network",logo:"rio.svg",erc20:!0,symbol:"RIO",decimals:18},"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984":{name:"Uniswap",logo:"uni.svg",erc20:!0,symbol:"UNI",decimals:18},"0x2e6539edc3b76f1E21B71d214527FAbA875F70F3":{name:"Yearn Finance Dot",logo:"YFDOT.svg",erc20:!0,symbol:"YFDOT",decimals:18},"0x9F284E1337A815fe77D2Ff4aE46544645B20c5ff":{name:"Darwinia Commitment Token",logo:"kton.svg",erc20:!0,symbol:"KTON",decimals:18},"0xE48972fCd82a274411c01834e2f031D4377Fa2c0":{name:"TwoKeyEconomy",logo:"2key.svg",erc20:!0,symbol:"2KEY",decimals:18},"0x970B9bB2C0444F5E81e9d0eFb84C8ccdcdcAf84d":{name:"Fuse Token",logo:"fuse.svg",erc20:!0,symbol:"FUSE",decimals:18},"0x0Ae055097C6d159879521C384F1D2123D1f195e6":{name:"STAKE Token",logo:"stake.svg",erc20:!0,symbol:"STAKE",decimals:18},"0x5dc60C4D5e75D22588FA17fFEB90A63E535efCE0":{name:"dKargo",logo:"DKA.svg",erc20:!0,symbol:"DKA",decimals:18},"0x9469D013805bFfB7D3DEBe5E7839237e535ec483":{name:"Darwinia Network Native Token",logo:"ring.svg",erc20:!0,symbol:"RING",decimals:18},"0xA31B1767e09f842ECFd4bc471Fe44F830E3891AA":{name:"ROOBEE",logo:"ROOBEE.svg",erc20:!0,symbol:"ROOBEE",decimals:18},"0xC7e43A1c8E118aA2965F5EAbe0e718D83DB7A63C":{name:"ZCore Token",logo:"zcrt.svg",erc20:!0,symbol:"ZCRT",decimals:18},"0x08d32b0da63e2C3bcF8019c9c5d849d7a9d791e6":{name:"Dentacoin Token",logo:"dcn.svg",erc20:!0,symbol:"DCN",decimals:0},"0xe2f2a5C287993345a840Db3B0845fbC70f5935a5":{name:"mStable USD",logo:"mUSD.svg",erc20:!0,symbol:"mUSD",decimals:18},"0xa3BeD4E1c75D00fa6f4E5E6922DB7261B5E9AcD2":{name:"Meta",logo:"MTA.svg",erc20:!0,symbol:"MTA",decimals:18},"0xe3818504c1B32bF1557b16C238B2E01Fd3149C17":{name:"Pillar",logo:"plr.svg",erc20:!0,symbol:"PLR",decimals:18},"0xba100000625a3754423978a60c9317c58a424e3D":{name:"Balancer (BAL)",logo:"balancer.svg",erc20:!0,symbol:"BAL",decimals:18},"0x8a854288a5976036A725879164Ca3e91d30c6A1B":{name:"Guaranteed Entrance Token",logo:"get-logo.svg",erc20:!0,symbol:"GET",decimals:18},"0x2781246fe707bB15CeE3e5ea354e2154a2877B16":{name:"Elysia",logo:"el.svg",erc20:!0,symbol:"EL",decimals:18},"0x4dA34f8264CB33A5c9F17081B9EF5Ff6091116f4":{name:"Elyfi",logo:"elyfi.svg",erc20:!0,symbol:"ELFI",decimals:18},"0xc12d099be31567add4e4e4d0D45691C3F58f5663":{name:"Auctus",logo:"auc.svg",erc20:!0,symbol:"AUC",decimals:18},"0xdF574c24545E5FfEcb9a659c229253D4111d87e1":{name:"HUSD",logo:"HUSD.svg",erc20:!0,symbol:"HUSD",decimals:8},"0x2ecB13A8c458c379c4d9a7259e202De03c8F3D19":{name:"Block-Chain.com Token",logo:"block-chain.svg",erc20:!0,symbol:"BC",decimals:18},"0x38e4adB44ef08F22F5B5b76A8f0c2d0dCbE7DcA1":{name:"Concentrated Voting Power",logo:"PowerPool.svg",erc20:!0,symbol:"CVP",decimals:18},"0xa117000000f279D81A1D3cc75430fAA017FA5A2e":{name:"Aragon Network Token",logo:"antv2.svg",erc20:!0,symbol:"ANT",decimals:18},"0xDecade1c6Bf2cD9fb89aFad73e4a519C867adcF5":{name:"Experty Wisdom Token",logo:"wisdom-token.svg",erc20:!0,symbol:"WIS",decimals:18},"0x7D85e23014F84E6E21d5663aCD8751bEF3562352":{name:"Axion Old",logo:"obsolete.svg",erc20:!0,symbol:"AXNv1",decimals:18},"0x358AA737e033F34df7c54306960a38d09AaBd523":{name:"Ares Token",logo:"ares.svg",erc20:!0,symbol:"ARES",decimals:18},"0xB62132e35a6c13ee1EE0f84dC5d40bad8d815206":{name:"NEXO",logo:"NEXO.svg",erc20:!0,symbol:"NEXO",decimals:18},"0x4612021C75809160Be60DB21fBc9D6adD0B32deF":{name:"BCP Coin",logo:"BCP.svg",erc20:!0,symbol:"BCP",decimals:18},"0xE9E73E1aE76D17A16cC53E3e87a9a7dA78834d37":{name:"Camp",logo:"Camp.svg",erc20:!0,symbol:"CAMP",decimals:18},"0xdacD69347dE42baBfAEcD09dC88958378780FB62":{name:"Atari Token",logo:"atrilast.svg",erc20:!0,symbol:"ATRI",decimals:0},"0x71F85B2E46976bD21302B64329868fd15eb0D127":{name:"Axion",logo:"axion.svg",erc20:!0,symbol:"AXN",decimals:18},"0xc944E90C64B2c07662A292be6244BDf05Cda44a7":{name:"Graph Token",logo:"graphToken.svg",erc20:!0,symbol:"GRT",decimals:18},"0xFE3E6a25e6b192A42a44ecDDCd13796471735ACf":{name:"Reef Finance",logo:"reef.svg",erc20:!0,symbol:"REEF",decimals:18},"0x43Dfc4159D86F3A37A5A4B3D4580b888ad7d4DDd":{name:"DODO bird",logo:"DODO.svg",erc20:!0,symbol:"DODO",decimals:18},"0x4a615bB7166210CCe20E6642a6f8Fb5d4D044496":{name:"NAOS Finance",logo:"naos.svg",erc20:!0,symbol:"NAOS",decimals:18},"0x111111111117dC0aa78b770fA6A738034120C302":{name:"1INCH Token",logo:"1inch.svg",erc20:!0,symbol:"1INCH",decimals:18},"0x27702a26126e0B3702af63Ee09aC4d1A084EF628":{name:"Aleph.im Token",logo:"aleph.svg",erc20:!0,symbol:"ALEPH",decimals:18},"0x32a7C02e79c4ea1008dD6564b35F131428673c41":{name:"CRUST",logo:"crust.svg",erc20:!0,symbol:"CRU",decimals:18},"0x3472A5A71965499acd81997a54BBA8D852C6E53d":{name:"BADGER",logo:"badger.svg",erc20:!0,symbol:"BADGER",decimals:18},"0x65Def5029A0e7591e46B38742bFEdd1Fb7b24436":{name:"Kanpeki",logo:"kanpeki-green.svg",erc20:!0,symbol:"KAE",decimals:18},"0xF94b5C5651c888d928439aB6514B93944eEE6F48":{name:"Yield App",logo:"yield-app.svg",erc20:!0,symbol:"YLD",decimals:18},"0xDcB01cc464238396E213a6fDd933E36796eAfF9f":{name:"Yield",logo:"yield-logo.svg",erc20:!0,symbol:"YLD",decimals:18},"0x968F6f898a6Df937fC1859b323aC2F14643e3fED":{name:"Newscrypto",logo:"NWC.svg",erc20:!0,symbol:"NWC",decimals:18},"0xeb269732ab75A6fD61Ea60b06fE994cD32a83549":{name:"dForce USDx",logo:"USDx.svg",erc20:!0,symbol:"USDx",decimals:18},"0x6e0daDE58D2d89eBBe7aFc384e3E4f15b70b14D8":{name:"QuiverX",logo:"quiverx.svg",erc20:!0,symbol:"QRX",decimals:18},"0x0beAD9a1bcc1b84D06E3f2df67E3549Fd55aB054":{name:"EURxb",logo:"eurxb.svg",erc20:!0,symbol:"EURxb",decimals:18},"0x9F9c8ec3534c3cE16F928381372BfbFBFb9F4D24":{name:"GraphLinq",logo:"glq.svg",erc20:!0,symbol:"GLQ",decimals:18},"0xEB58343b36C7528F23CAAe63a150240241310049":{name:"NBU",logo:"NBU.svg",erc20:!0,symbol:"NBU",decimals:18},"0x16ECCfDbb4eE1A85A33f3A9B21175Cd7Ae753dB4":{name:"Route",logo:"route.svg",erc20:!0,symbol:"ROUTE",decimals:18},"0x75739d5944534115d7C54ee8C73F186D793BAE02":{name:"Collective",logo:"CO2.svg",erc20:!0,symbol:"CO2",decimals:18},"0x35bD01FC9d6D5D81CA9E055Db88Dc49aa2c699A8":{name:"FWB Pro",logo:"FWB.svg",erc20:!0,symbol:"FWB",decimals:18},"0x9B99CcA871Be05119B2012fd4474731dd653FEBe":{name:"Antimatter",logo:"antimatter.svg",erc20:!0,symbol:"MATTER",decimals:18},"0x6De037ef9aD2725EB40118Bb1702EBb27e4Aeb24":{name:"Render Token",logo:"RNDR.svg",erc20:!0,symbol:"RNDR",decimals:18},"0xDf49C9f599A0A9049D97CFF34D0C30E468987389":{name:"SaTT",logo:"SaTT.svg",erc20:!0,symbol:"SATT",decimals:18},"0x431ad2ff6a9C365805eBaD47Ee021148d6f7DBe0":{name:"dForce",logo:"DF.svg",erc20:!0,symbol:"DF",decimals:18},"0x6e1A19F235bE7ED8E3369eF73b196C07257494DE":{name:"Wrapped Filecoin",logo:"WFIL.svg",erc20:!0,symbol:"WFIL",decimals:18},"0xE452E6Ea2dDeB012e20dB73bf5d3863A3Ac8d77a":{name:"Wrapped Celo",logo:"WCELO.svg",erc20:!0,symbol:"wCELO",decimals:18},"0x4A64515E5E1d1073e83f30cB97BEd20400b66E10":{name:"Wrapped ZEC",logo:"WZEC.svg",erc20:!0,symbol:"WZEC",decimals:18},"0xA3865E64121537b5b59B5e239Db4aCBe6F36aa74":{name:"Wrapped Tezos",logo:"WXTZ.svg",erc20:!0,symbol:"WXTZ",decimals:18},"0x53c4871322Bb47e7A24136fce291a6dcC832a294":{name:"Wrapped Litecoin",logo:"WLTC.svg",erc20:!0,symbol:"WLTC",decimals:18},"0xad3E3Fc59dff318BecEaAb7D00EB4F68b1EcF195":{name:"Wrapped Celo USD",logo:"WCUSD.svg",erc20:!0,symbol:"wCUSD",decimals:18},"0x85D7bdfc9c3426b33A684241eEEE70385Bc42820":{name:"Wrapped Kadena",logo:"WKDA.svg",erc20:!0,symbol:"WKDA",decimals:18},"0x39fBBABf11738317a448031930706cd3e612e1B9":{name:"Wrapped XRP",logo:"WXRP.svg",erc20:!0,symbol:"WXRP",decimals:18},"0xBBC7f7A6AADAc103769C66CBC69AB720f7F9Eae3":{name:"INX Token",logo:"INX.svg",erc20:!0,symbol:"INX",decimals:18},"0x1b40183EFB4Dd766f11bDa7A7c3AD8982e998421":{name:"Vesper",logo:"vsp.svg",erc20:!0,symbol:"VSP",decimals:18},"0x544c42fBB96B39B21DF61cf322b5EDC285EE7429":{name:"InsurAce",logo:"INSUR.svg",erc20:!0,symbol:"INSUR",decimals:18},"0xcC665390b03c5D324D8fAF81C15eCee29A73bCB4":{name:"ChainSwap.com Governance Token",logo:"chainswap.svg",erc20:!0,symbol:"ASAP",decimals:18},"0x182F4c4C97cd1c24E1Df8FC4c053E5C47bf53Bef":{name:"keyTango Token",logo:"keyTango.svg",erc20:!0,symbol:"TANGO",decimals:18},"0x0275E1001e293C46CFe158B3702AADe0B99f88a5":{name:"Oiler",logo:"oiler.svg",erc20:!0,symbol:"OIL",decimals:18},"0xDe30da39c46104798bB5aA3fe8B9e0e1F348163F":{name:"Gitcoin",logo:"gtc.svg",erc20:!0,symbol:"GTC",decimals:18},"0x1796ae0b0fa4862485106a0de9b654eFE301D0b2":{name:"Polychain Monsters",logo:"PMON.svg",erc20:!0,symbol:"PMON",decimals:18},"0x8eEF5a82E6Aa222a60F009ac18c24EE12dBf4b41":{name:"Tixl",logo:"TXL.svg",erc20:!0,symbol:"TXL",decimals:18},"0x5218E472cFCFE0b64A064F055B43b4cdC9EfD3A6":{name:"unFederalReserve Token",logo:"eRSDL.svg",erc20:!0,symbol:"eRSDL",decimals:18},"0xE4cC5A22B39fFB0A56d67F94f9300db20D786a5F":{name:"unFederal eRSDL",logo:"uneRSDL.svg",erc20:!0,symbol:"uneRSDL",decimals:8},"0x2dbA05B51eF5A7DE3E7c3327201CA2F8a25C2414":{name:"unFederal DAI",logo:"unDAI.svg",erc20:!0,symbol:"unDAI",decimals:8},"0xFaCecE87e14B50eafc85C44C01702F5f485CA460":{name:"unFederal ETH",logo:"unETH.svg",erc20:!0,symbol:"unETH",decimals:8},"0x6b576972de33BebDe3A703BfF52a091e79f8c87A":{name:"unFederal USDC",logo:"unUSDC.svg",erc20:!0,symbol:"unUSDC",decimals:8},"0x6e2aA5bB90ac37D9006685AFc651ef067E1c7b44":{name:"unFederal USDT",logo:"unUSDT.svg",erc20:!0,symbol:"unUSDT",decimals:8},"0x5D446FC8DBd10EBAcfE9A427aB5402586af98cD4":{name:"unFederal WBTC",logo:"unWBTC.svg",erc20:!0,symbol:"unWBTC",decimals:8},"0xD837eCa6C91c67D98461A411BA2f00bdA9960a9D":{name:"unFederal AAVE",logo:"unAAVE.svg",erc20:!0,symbol:"unAAVE",decimals:8},"0x9e29Ce9cD25F4141dF6BB85b27Ef6933a16A5824":{name:"unFederal YFI",logo:"unYFI.svg",erc20:!0,symbol:"unYFI",decimals:8},"0x031002d15B0D0Cd7c9129d6F644446368deaE391":{name:"unFederal LINK",logo:"unLINK.svg",erc20:!0,symbol:"unLINK",decimals:8},"0xB8E2e2101eD11e9138803cd3e06e16dd19910647":{name:"ArdCoin",logo:"ardcoin.svg",erc20:!0,symbol:"ARDX",decimals:2},"0x6D0F5149c502faf215C89ab306ec3E50b15e2892":{name:"Portion Token",logo:"PRT.svg",erc20:!0,symbol:"PRT",decimals:18},"0xcc7ab8d78dBA187dC95bF3bB86e65E0C26d0041f":{name:"3SPACE ART",logo:"3SPACE.svg",erc20:!0,symbol:"PACE",decimals:18},"0x3845badAde8e6dFF049820680d1F14bD3903a5d0":{name:"SAND",logo:"SAND.svg",erc20:!0,symbol:"SAND",decimals:18},"0xcc7ab8d78dBA187dC95bF3bB86e65E0C26d0041f":{name:"Spacelens",logo:"SPACE.svg",erc20:!0,symbol:"SPACE",decimals:18},"0x50f5474724e0Ee42D9a4e711ccFB275809Fd6d4a":{name:"Sandbox's LANDs",logo:"SAND.svg",erc20:!1,erc721:!0,symbol:"LAND",decimals:0},"0x362bc847A3a9637d3af6624EeC853618a43ed7D2":{name:"PARSIQ",logo:"parsiq.svg",erc20:!0,symbol:"PRQ",decimals:18},"0x21381e026Ad6d8266244f2A583b35F9E4413FA2a":{name:"Formation Finance",logo:"form.svg",erc20:!0,symbol:"FORM",decimals:18},"0x2ba592F78dB6436527729929AAf6c908497cB200":{name:"Cream",logo:"cream.svg",erc20:!0,symbol:"CREAM",decimals:18},"0x46576e20EC5F25586A6Fa2E0d6B6058354B72E72":{name:"Cryptomind",logo:"CR.svg",erc20:!0,erc721:!1,symbol:"CR",decimals:8},"0x5ab21Ec0bfa0B29545230395e3Adaca7d552C948":{name:"PUNKS Comic",logo:"punks-comic.svg",erc20:!1,erc721:!0,symbol:"COMIC",decimals:0},"0x9C2dc0c3CC2BADdE84B0025Cf4df1c5aF288D835":{name:"Coreto",logo:"coreto.svg",erc20:!0,symbol:"COR",decimals:18},"0x0De05F6447ab4D22c8827449EE4bA2D5C288379B":{name:"OOKI",logo:"ooki.svg",erc20:!0,symbol:"OOKI",decimals:18},"0x6B4c7A5e3f0B99FCD83e9c089BDDD6c7FCe5c611":{name:"Million",logo:"million.svg",erc20:!0,symbol:"MM",decimals:18},"0x56d811088235F11C8920698a204A5010a788f4b3":{name:"bZx Protocol Token (BZRX)",logo:"ic_token_bzrx.svg",erc20:!0,symbol:"BZRX",decimals:18},"0xB72B31907C1C95F3650b64b2469e08EdACeE5e8F":{name:"bZx Vesting Token (vBZRX)",logo:"ic_token_vbzrx.svg",erc20:!0,symbol:"vBZRX",decimals:18},"0x3085154623F51b00Dedfc6Ceeb5197277A66B17B":{name:"NIFTY",logo:"nfty.svg",erc20:!0,symbol:"NFTY",decimals:18},"0xB983E01458529665007fF7E0CDdeCDB74B967Eb6":{name:"Fulcrum ETH iToken (iETH)",logo:"ic_token_ieth.svg",erc20:!0,symbol:"iETH",decimals:18},"0x32E4c68B3A4a813b710595AebA7f6B7604Ab9c15":{name:"Fulcrum USDC iToken (iUSDC)",logo:"ic_token_iusdc.svg",erc20:!0,symbol:"iUSDC",decimals:6},"0x2ffa85f655752fB2aCB210287c60b9ef335f5b6E":{name:"Fulcrum WBTC iToken (iWBTC)",logo:"ic_token_ibtc.svg",erc20:!0,symbol:"iWBTC",decimals:8},"0x687642347a9282Be8FD809d8309910A3f984Ac5a":{name:"Fulcrum KNC iToken (iKNC)",logo:"ic_token_iknc.svg",erc20:!0,symbol:"iKNC",decimals:18},"0x463538705E7d22aA7f03Ebf8ab09B067e1001B54":{name:"Fulcrum LINK iToken (iLINK)",logo:"ic_token_ilink.svg",erc20:!0,symbol:"iLINK",decimals:18},"0x6b093998D36f2C7F0cc359441FBB24CC629D5FF0":{name:"Fulcrum DAI iToken (iDAI)",logo:"ic_token_idai.svg",erc20:!0,symbol:"iDAI",decimals:18},"0x7e9997a38A439b2be7ed9c9C4628391d3e055D48":{name:"Fulcrum USDT iToken (iUSDT)",logo:"ic_token_iusdt.svg",erc20:!0,symbol:"iUSDT",decimals:6},"0x9189c499727f88F8eCC7dC4EEA22c828E6AaC015":{name:"Fulcrum MKR iToken (iMKR)",logo:"ic_token_imkr.svg",erc20:!0,symbol:"iMKR",decimals:18},"0x18240BD9C07fA6156Ce3F3f61921cC82b2619157":{name:"Fulcrum BZRX iToken (iBZRX)",logo:"ic_token_ibzrx.svg",erc20:!0,symbol:"iBZRX",decimals:18},"0x7F3Fe9D492A9a60aEBb06d82cBa23c6F32CAd10b":{name:"Fulcrum YFI iToken (iYFI)",logo:"ic_token_iyfi.svg",erc20:!0,symbol:"iYFI",decimals:18},"0x0a625FceC657053Fe2D9FFFdeb1DBb4e412Cf8A8":{name:"Fulcrum UNI iToken (iUNI)",logo:"ic_token_iuni.svg",erc20:!0,symbol:"iUNI",decimals:18},"0x0cae8d91E0b1b7Bd00D906E990C3625b2c220db1":{name:"Fulcrum AAVE iToken (iAAVE)",logo:"ic_token_iaave.svg",erc20:!0,symbol:"iAAVE",decimals:18},"0x3dA0e01472Dee3746b4D324a65D7EdFaECa9Aa4f":{name:"Fulcrum LRC iToken (iLRC)",logo:"ic_token_ilrc.svg",erc20:!0,symbol:"iLRC",decimals:18},"0x6d29903BC2c4318b59B35d97Ab98ab9eC08Ed70D":{name:"Fulcrum COMP iToken (iCOMP)",logo:"ic_token_icomp.svg",erc20:!0,symbol:"iCOMP",decimals:18},"0x08c32b0726C5684024ea6e141C50aDe9690bBdcc":{name:"Stratos Token",logo:"stos.svg",erc20:!0,symbol:"STOS",decimals:18},"0xe28b3B32B6c345A34Ff64674606124Dd5Aceca30":{name:"Injective",logo:"inj.svg",erc20:!0,symbol:"INJ",decimals:18},"0xe516D78d784C77D479977BE58905B3f2b1111126":{name:"Bitspawn",logo:"spwn.svg",erc20:!0,symbol:"SPWN",decimals:18},"0xB16e967ff83DE3F1e9FCeAfbc2C28c1c5c56eF91":{name:"Polkadog",logo:"polkadog.svg",erc20:!0,symbol:"PDOG",decimals:18},"0x07c52c2537D84e532a9F15d32E152C8B94D2b232":{name:"ZkTube",logo:"ZKT.svg",erc20:!0,symbol:"ZKT",decimals:18},"0xF4d861575ecC9493420A3f5a14F85B13f0b50EB3":{name:"Fractal Protocol",logo:"fractal.svg",erc20:!0,symbol:"FCL",decimals:18},"0x3af33bEF05C2dCb3C7288b77fe1C8d2AeBA4d789":{name:"Kromatika",logo:"krom.svg",erc20:!0,symbol:"KROM",decimals:18},"0xA130E3a33a4d84b04c3918c4E5762223Ae252F80":{name:"Swash Token",logo:"swash.svg",erc20:!0,symbol:"SWASH",decimals:18},"0xea7Cc765eBC94C4805e3BFf28D7E4aE48D06468A":{name:"NearPad Token",logo:"nearpad.svg",erc20:!0,symbol:"PAD",decimals:18},"0x87C22615435998D69ACA34889D03155B694a94fc":{name:"DiemLibre",logo:"DLB.svg",erc20:!0,symbol:"DLB",decimals:18},"0x4d224452801ACEd8B2F0aebE155379bb5D594381":{name:"ApeCoin",logo:"APE.svg",erc20:!0,symbol:"APE",decimals:18},"0xCd1fAFf6e578Fa5cAC469d2418C95671bA1a62Fe":{name:"Torum Token",logo:"torum.svg",erc20:!0,symbol:"XTM",decimals:18},"0xcf0C122c6b73ff809C693DB761e7BaeBe62b6a2E":{name:"FLOKI",logo:"floki.svg",erc20:!0,symbol:"FLOKI",decimals:9},"0xe831F96A7a1DcE1aa2EB760b1e296c6A74CaA9d5":{name:"Nexum Coin",logo:"nexum.svg",erc20:!0,symbol:"Nexm",decimals:8},"0x6710c63432A2De02954fc0f851db07146a6c0312":{name:"MFG",logo:"mfg.svg",erc20:!0,symbol:"MFG",decimals:18},"0xae78736Cd615f374D3085123A210448E74Fc6393":{name:"Rocket Pool ETH",logo:"rETH.svg",erc20:!0,symbol:"rETH",decimals:18},"0x0C10bF8FcB7Bf5412187A595ab97a3609160b5c6":{name:"Decentralized USD",logo:"USDD.svg",erc20:!0,symbol:"USDD",decimals:18},"0xD33526068D116cE69F19A9ee46F0bd304F21A51f":{name:"Rocket Pool",logo:"rpl.svg",erc20:!0,symbol:"RPL",decimals:18},"0x9d38F670D15C14716BE1F109a4F453E966A2B6D4":{name:"Quid Ika",logo:"QuidIka.svg",erc20:!0,symbol:"QUID",decimals:9},"0xD3c625F54dec647DB8780dBBe0E880eF21BA4329":{name:"HollaEx Token",logo:"xht.svg",erc20:!0,symbol:"XHT",decimals:18},"0x01e0E2e61f554eCAaeC0cC933E739Ad90f24a86d":{name:"GTON",logo:"gton.svg",erc20:!0,symbol:"GTON",decimals:18},"0xeFF66B4A84C8a6b69b99EB1C5e39aF8fc35d13db":{name:"sGTON",logo:"sgton.svg",erc20:!0,symbol:"sGTON",decimals:18},"0x7659CE147D0e714454073a5dd7003544234b6Aa0":{name:"XCAD Token",logo:"xcad.svg",erc20:!0,symbol:"XCAD",decimals:18},"0x88dF592F8eb5D7Bd38bFeF7dEb0fBc02cf3778a0":{name:"Tellor Tributes",logo:"TRB.svg",erc20:!0,symbol:"TRB",decimals:18},"0x8d96B4ab6C741a4C8679AE323a100d74f085BA8F":{name:"Bazaars",logo:"BZR.svg",erc20:!0,symbol:"BZR",decimals:18},"0x9ee91F9f426fA633d227f7a9b000E28b9dfd8599":{name:"Liquid staked MATIC",logo:"stMATIC.svg",erc20:!0,symbol:"stMATIC",decimals:18},"0x0d02755a5700414B26FF040e1dE35D337DF56218":{name:"Bend Token",logo:"BendDAO.svg",erc20:!0,symbol:"BEND",decimals:18},"0x1A4b46696b2bB4794Eb3D4c26f1c55F9170fa4C5":{name:"BitDAO",logo:"BitDAO.svg",erc20:!0,erc721:!1,symbol:"BIT",decimals:18},"0xb8919522331C59f5C16bDfAA6A121a6E03A91F62":{name:"Home",logo:"home.svg",erc20:!0,erc721:!1,symbol:"HOME",decimals:6},"0xa54d2EBfD977ad836203c85F18db2F0a0cF88854":{name:"Bacon",logo:"bacon.svg",erc20:!0,erc721:!1,symbol:"BACON",decimals:18},"0x249cA82617eC3DfB2589c4c17ab7EC9765350a18":{name:"Verse",logo:"VERSE.svg",erc20:!0,erc721:!1,symbol:"VERSE",decimals:18},"0x317eb4ad9cfaC6232f0046831322E895507bcBeb":{name:"Tidex Token",logo:"tidex.svg",erc20:!0,symbol:"TDX",decimals:18},"0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE":{name:"SHIBA INU",logo:"shib.svg",erc20:!0,symbol:"SHIB",decimals:18},"0x3506424F91fD33084466F402d5D97f05F8e3b4AF":{name:"chiliZ",logo:"chz.svg",erc20:!0,symbol:"CHZ",decimals:18},"0x15D4c048F83bd7e37d49eA4C83a07267Ec4203dA":{name:"Gala",logo:"gala.svg",erc20:!0,symbol:"GALA",decimals:8},"0x69af81e73A73B40adF4f3d4223Cd9b1ECE623074":{name:"Mask Network",logo:"mask.svg",erc20:!0,symbol:"MASK",decimals:18},"0xD533a949740bb3306d119CC777fa900bA034cd52":{name:"Curve DAO Token",logo:"crv.svg",erc20:!0,symbol:"CRV",decimals:18},"0x92D6C1e31e14520e676a687F0a93788B716BEff5":{name:"dYdX",logo:"dydx.svg",erc20:!0,symbol:"DYDX",decimals:18},"0x60bE1e1fE41c1370ADaF5d8e66f07Cf1C2Df2268":{name:"Perion Credits",logo:"perc.svg",erc20:!0,symbol:"PERC",decimals:18},"0x8971f9fd7196e5cEE2C1032B50F656855af7Dd26":{name:"Lambda",logo:"LAMB.svg",erc20:!0,symbol:"LAMB",decimals:18},"0x65514b352d1d4a17DE97f95C7faB177C625Bd6ff":{name:"KIBBLE Token",logo:"kibble.svg",erc20:!0,erc721:!1,symbol:"KBLE",decimals:18},"0xd9Fcd98c322942075A5C3860693e9f4f03AAE07b":{name:"Euler",logo:"eul.svg",erc20:!0,erc721:!1,symbol:"EUL",decimals:18},"0x777fD20c983d6658c1D50b3958B3A1733d1cd1E1":{name:"PUBLISH",logo:"publish.svg",erc20:!0,symbol:"NEWS",decimals:9},"0x19062190B1925b5b6689D7073fDfC8c2976EF8Cb":{name:"Swarm",logo:"ethswarm.svg",erc20:!0,symbol:"BZZ",decimals:16},"0x6aA030a9710CAD6E719A4EC0a85260Eb3F4F86c1":{name:"Real World Asset",logo:"rwa.svg",erc20:!0,symbol:"RWA",decimals:18},"0xde16Ce60804a881e9F8c4eBB3824646EDecd478D":{name:"MagicCraft",logo:"magiccraft.svg",erc20:!0,symbol:"MCRT",decimals:9},"0x7163436b8EfFfB469F6BB81cc908b1661d4795e6":{name:"Esco coin",logo:"escocoin.svg",erc20:!0,symbol:"ESCO",decimals:18},"0x9625cE7753ace1fa1865A47aAe2c5C2Ce4418569":{name:"KAP Games",logo:"kap-games.svg",erc20:!0,symbol:"KAP",decimals:18},"0x4FbB350052Bca5417566f188eB2EBCE5b19BC964":{name:"Rigo",logo:"grg.svg",erc20:!0,symbol:"GRG",decimals:18},"0xD8E163967FED76806Df0097B704bA721B9b37656":{name:"Cope",logo:"cope.svg",erc20:!0,symbol:"COPE",decimals:18},"0xdfbc9050F5B01DF53512DCC39B4f2B2BBaCD517A":{name:"Jobchain",logo:"job.svg",erc20:!0,symbol:"JOB",decimals:8},"0x083D41d6DD21EE938f0c055CA4fb12268DF0EfaC":{name:"GogolCoin",logo:"gol.svg",erc20:!0,symbol:"GOL",decimals:4},"0x9B4a69dE6CA0deFDD02c0c4ce6Cb84de5202944E":{name:"PROOF Platform",erc20:!0,symbol:"PROOF",decimals:9,logo:"proof-platform.svg"},"0x4507cEf57C46789eF8d1a19EA45f4216bae2B528":{name:"TokenFi",logo:"tokenfi.svg",erc20:!0,symbol:"TOKEN",decimals:9},"0x8B39B70E39Aa811b69365398e0aACe9bee238AEb":{name:"PolkaFoundry",logo:"pkf.svg",erc20:!0,symbol:"PKF",decimals:18},"0x2c95D751DA37A5C1d9c5a7Fd465c1d50F3d96160":{name:"WASSIE",logo:"wassie.svg",erc20:!0,symbol:"WASSIE",decimals:18},"0x06325440D014e39736583c165C2963BA99fAf14E":{name:"Curve.fi",logo:"steCRV.png",erc20:!0,symbol:"steCRV",decimals:18},"0x4E241A9EC66832a16bceaeB9156E524487f061D7":{name:"ETF Rocks",logo:"etf.svg",erc20:!0,symbol:"ETF",decimals:18},"0xA849EaaE994fb86Afa73382e9Bd88c2B6b18Dc71":{name:"Mass Vehicle Ledger",logo:"mvl.svg",erc20:!0,symbol:"MVL",decimals:18},"0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa":{name:"Mantle Staked Ether",logo:"mETH.svg",erc20:!0,erc721:!1,symbol:"mETH",decimals:18}}}}},{package:"@metamask/contract-metadata",file:"node_modules/@metamask/contract-metadata/contract-map.json"}],[1420,{"./contract-map.json":1419},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("./contract-map.json")}}},{package:"@metamask/contract-metadata",file:"node_modules/@metamask/contract-metadata/index.js"}],[1421,{"./types.cjs":1425},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP=r.ApprovalType=r.ORIGIN_METAMASK=r.NFT_API_TIMEOUT=r.NFT_API_VERSION=r.NFT_API_BASE_URL=r.OPENSEA_PROXY_URL=r.BUILT_IN_NETWORKS=r.TESTNET_TICKER_SYMBOLS=r.ASSET_TYPES=r.GWEI=r.ERC1155_TOKEN_RECEIVER_INTERFACE_ID=r.ERC1155_METADATA_URI_INTERFACE_ID=r.ERC1155_INTERFACE_ID=r.ERC721_ENUMERABLE_INTERFACE_ID=r.ERC721_METADATA_INTERFACE_ID=r.ERC721_INTERFACE_ID=r.ERC20=r.ERC1155=r.ERC721=r.MAX_SAFE_CHAIN_ID=r.GANACHE_CHAIN_ID=r.IPFS_DEFAULT_GATEWAY_URL=r.FALL_BACK_VS_CURRENCY=r.RPC=void 0;const s=e("./types.cjs");var n;r.RPC="rpc",r.FALL_BACK_VS_CURRENCY="ETH",r.IPFS_DEFAULT_GATEWAY_URL="https://cloudflare-ipfs.com/ipfs/",r.GANACHE_CHAIN_ID="0x539",r.MAX_SAFE_CHAIN_ID=0xfffffffffffec,r.ERC721="ERC721",r.ERC1155="ERC1155",r.ERC20="ERC20",r.ERC721_INTERFACE_ID="0x80ac58cd",r.ERC721_METADATA_INTERFACE_ID="0x5b5e139f",r.ERC721_ENUMERABLE_INTERFACE_ID="0x780e9d63",r.ERC1155_INTERFACE_ID="0xd9b67a26",r.ERC1155_METADATA_URI_INTERFACE_ID="0x0e89341c",r.ERC1155_TOKEN_RECEIVER_INTERFACE_ID="0x4e2312e0",r.GWEI="gwei",r.ASSET_TYPES={NATIVE:"NATIVE",TOKEN:"TOKEN",NFT:"NFT",UNKNOWN:"UNKNOWN"},r.TESTNET_TICKER_SYMBOLS={GOERLI:"GoerliETH",SEPOLIA:"SepoliaETH",LINEA_GOERLI:"LineaETH",LINEA_SEPOLIA:"LineaETH"},r.BUILT_IN_NETWORKS={[s.NetworkType.goerli]:{chainId:s.ChainId.goerli,ticker:s.NetworksTicker.goerli,rpcPrefs:{blockExplorerUrl:`https://${s.NetworkType.goerli}.etherscan.io`}},[s.NetworkType.sepolia]:{chainId:s.ChainId.sepolia,ticker:s.NetworksTicker.sepolia,rpcPrefs:{blockExplorerUrl:`https://${s.NetworkType.sepolia}.etherscan.io`}},[s.NetworkType.mainnet]:{chainId:s.ChainId.mainnet,ticker:s.NetworksTicker.mainnet,rpcPrefs:{blockExplorerUrl:"https://etherscan.io"}},[s.NetworkType["linea-goerli"]]:{chainId:s.ChainId["linea-goerli"],ticker:s.NetworksTicker["linea-goerli"],rpcPrefs:{blockExplorerUrl:"https://goerli.lineascan.build"}},[s.NetworkType["linea-sepolia"]]:{chainId:s.ChainId["linea-sepolia"],ticker:s.NetworksTicker["linea-sepolia"],rpcPrefs:{blockExplorerUrl:"https://sepolia.lineascan.build"}},[s.NetworkType["linea-mainnet"]]:{chainId:s.ChainId["linea-mainnet"],ticker:s.NetworksTicker["linea-mainnet"],rpcPrefs:{blockExplorerUrl:"https://lineascan.build"}},[s.NetworkType.rpc]:{chainId:undefined,blockExplorerUrl:undefined,ticker:undefined,rpcPrefs:undefined}},r.OPENSEA_PROXY_URL="https://proxy.api.cx.metamask.io/opensea/v1/api/v2",r.NFT_API_BASE_URL="https://nft.api.cx.metamask.io",r.NFT_API_VERSION="1",r.NFT_API_TIMEOUT=15e3,r.ORIGIN_METAMASK="metamask",function(e){e.AddEthereumChain="wallet_addEthereumChain",e.ConnectAccounts="connect_accounts",e.EthDecrypt="eth_decrypt",e.EthGetEncryptionPublicKey="eth_getEncryptionPublicKey",e.EthSignTypedData="eth_signTypedData",e.PersonalSign="personal_sign",e.ResultError="result_error",e.ResultSuccess="result_success",e.SnapDialogAlert="snap_dialog:alert",e.SnapDialogConfirmation="snap_dialog:confirmation",e.SnapDialogPrompt="snap_dialog:prompt",e.SnapDialogDefault="snap_dialog",e.SwitchEthereumChain="wallet_switchEthereumChain",e.Transaction="transaction",e.Unlock="unlock",e.WalletConnect="wallet_connect",e.WalletRequestPermissions="wallet_requestPermissions",e.WatchAsset="wallet_watchAsset"}(n||(r.ApprovalType=n={})),r.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP={[s.ChainId.goerli]:s.BuiltInNetworkName.Goerli,[s.ChainId.sepolia]:s.BuiltInNetworkName.Sepolia,[s.ChainId.mainnet]:s.BuiltInNetworkName.Mainnet,[s.ChainId["linea-goerli"]]:s.BuiltInNetworkName.LineaGoerli,[s.ChainId["linea-sepolia"]]:s.BuiltInNetworkName.LineaSepolia,[s.ChainId["linea-mainnet"]]:s.BuiltInNetworkName.LineaMainnet,[s.ChainId.aurora]:s.BuiltInNetworkName.Aurora}}}},{package:"@metamask/controller-utils",file:"node_modules/@metamask/controller-utils/dist/constants.cjs"}],[1422,{"./constants.cjs":1421,"./siwe.cjs":1424,"./types.cjs":1425,"./util.cjs":1426},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.isEqualCaseInsensitive=r.weiHexToGweiDec=r.toHex=r.toChecksumHexAddress=r.timeoutFetch=r.successfulFetch=r.safelyExecuteWithTimeout=r.safelyExecute=r.query=r.normalizeEnsName=r.isValidHexAddress=r.isValidJson=r.isSmartContractCode=r.isSafeDynamicKey=r.isSafeChainId=r.isPlainObject=r.isNonEmptyArray=r.hexToText=r.hexToBN=r.handleFetch=r.gweiDecToWEIBN=r.getBuyURL=r.fromHex=r.fractionBN=r.fetchWithErrorHandling=r.convertHexToDecimal=r.BNToHex=void 0,n(e("./constants.cjs"),r);var a=e("./util.cjs");Object.defineProperty(r,"BNToHex",{enumerable:!0,get:function(){return a.BNToHex}}),Object.defineProperty(r,"convertHexToDecimal",{enumerable:!0,get:function(){return a.convertHexToDecimal}}),Object.defineProperty(r,"fetchWithErrorHandling",{enumerable:!0,get:function(){return a.fetchWithErrorHandling}}),Object.defineProperty(r,"fractionBN",{enumerable:!0,get:function(){return a.fractionBN}}),Object.defineProperty(r,"fromHex",{enumerable:!0,get:function(){return a.fromHex}}),Object.defineProperty(r,"getBuyURL",{enumerable:!0,get:function(){return a.getBuyURL}}),Object.defineProperty(r,"gweiDecToWEIBN",{enumerable:!0,get:function(){return a.gweiDecToWEIBN}}),Object.defineProperty(r,"handleFetch",{enumerable:!0,get:function(){return a.handleFetch}}),Object.defineProperty(r,"hexToBN",{enumerable:!0,get:function(){return a.hexToBN}}),Object.defineProperty(r,"hexToText",{enumerable:!0,get:function(){return a.hexToText}}),Object.defineProperty(r,"isNonEmptyArray",{enumerable:!0,get:function(){return a.isNonEmptyArray}}),Object.defineProperty(r,"isPlainObject",{enumerable:!0,get:function(){return a.isPlainObject}}),Object.defineProperty(r,"isSafeChainId",{enumerable:!0,get:function(){return a.isSafeChainId}}),Object.defineProperty(r,"isSafeDynamicKey",{enumerable:!0,get:function(){return a.isSafeDynamicKey}}),Object.defineProperty(r,"isSmartContractCode",{enumerable:!0,get:function(){return a.isSmartContractCode}}),Object.defineProperty(r,"isValidJson",{enumerable:!0,get:function(){return a.isValidJson}}),Object.defineProperty(r,"isValidHexAddress",{enumerable:!0,get:function(){return a.isValidHexAddress}}),Object.defineProperty(r,"normalizeEnsName",{enumerable:!0,get:function(){return a.normalizeEnsName}}),Object.defineProperty(r,"query",{enumerable:!0,get:function(){return a.query}}),Object.defineProperty(r,"safelyExecute",{enumerable:!0,get:function(){return a.safelyExecute}}),Object.defineProperty(r,"safelyExecuteWithTimeout",{enumerable:!0,get:function(){return a.safelyExecuteWithTimeout}}),Object.defineProperty(r,"successfulFetch",{enumerable:!0,get:function(){return a.successfulFetch}}),Object.defineProperty(r,"timeoutFetch",{enumerable:!0,get:function(){return a.timeoutFetch}}),Object.defineProperty(r,"toChecksumHexAddress",{enumerable:!0,get:function(){return a.toChecksumHexAddress}}),Object.defineProperty(r,"toHex",{enumerable:!0,get:function(){return a.toHex}}),Object.defineProperty(r,"weiHexToGweiDec",{enumerable:!0,get:function(){return a.weiHexToGweiDec}}),Object.defineProperty(r,"isEqualCaseInsensitive",{enumerable:!0,get:function(){return a.isEqualCaseInsensitive}}),n(e("./types.cjs"),r),n(e("./siwe.cjs"),r)}}},{package:"@metamask/controller-utils",file:"node_modules/@metamask/controller-utils/dist/index.cjs"}],[1423,{"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.projectLogger=void 0;const s=e("@metamask/utils");Object.defineProperty(r,"createModuleLogger",{enumerable:!0,get:function(){return s.createModuleLogger}}),r.projectLogger=(0,s.createProjectLogger)("controller-utils")}}},{package:"@metamask/controller-utils",file:"node_modules/@metamask/controller-utils/dist/logger.cjs"}],[1424,{"./logger.cjs":1423,"@metamask/utils":2761,"@spruceid/siwe-parser":3031,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.detectSIWE=r.isValidSIWEOrigin=r.parseDomainParts=void 0;const s=e("@metamask/utils"),n=e("@spruceid/siwe-parser"),a=e("./logger.cjs"),o=(0,a.createModuleLogger)(a.projectLogger,"detect-siwe");function i(e){try{const n="string"!=typeof(r=e)?r:(0,s.remove0x)(r),a=t.from(n,"hex");return 32===a.length?e:a.toString("utf8")}catch(t){return o(t),e}var r}const c={"http:":"80","https:":"443"};r.parseDomainParts=(e,t)=>e.match(/^[^/:]*:\/\//u)?new URL(e):new URL(`${t}//${e}`);r.isValidSIWEOrigin=e=>{try{const{origin:t,siwe:s}=e;if(t.startsWith("file://"))return!0;if(!t||!s?.parsedMessage?.domain)return!1;const n=new URL(t),a=(0,r.parseDomainParts)(s.parsedMessage.domain,n.protocol);return 0===a.hostname.localeCompare(n.hostname,undefined,{sensitivity:"accent"})&&(""!==a.port&&a.port!==n.port?""===n.port&&a.port===c[n.protocol]:""===a.username||a.username===n.username)}catch(e){return o(e),!1}};r.detectSIWE=e=>{try{const{data:t}=e,r=i(t);return{isSIWEMessage:!0,parsedMessage:new n.ParsedMessage(r)}}catch(e){return{isSIWEMessage:!1,parsedMessage:null}}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/controller-utils",file:"node_modules/@metamask/controller-utils/dist/siwe.cjs"}],[1425,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n;Object.defineProperty(r,"__esModule",{value:!0}),r.NetworkNickname=r.BlockExplorerUrl=r.NetworksTicker=r.ChainId=r.BuiltInNetworkName=r.isInfuraNetworkType=r.isNetworkType=r.NetworkType=r.InfuraNetworkType=void 0,r.InfuraNetworkType={mainnet:"mainnet",goerli:"goerli",sepolia:"sepolia","linea-goerli":"linea-goerli","linea-sepolia":"linea-sepolia","linea-mainnet":"linea-mainnet"},r.NetworkType={...r.InfuraNetworkType,rpc:"rpc"},r.isNetworkType=function(e){return Object.values(r.NetworkType).includes(e)},r.isInfuraNetworkType=function(e){return Object.keys(r.InfuraNetworkType).includes(e)},function(e){e.Mainnet="mainnet",e.Goerli="goerli",e.Sepolia="sepolia",e.LineaGoerli="linea-goerli",e.LineaSepolia="linea-sepolia",e.LineaMainnet="linea-mainnet",e.Aurora="aurora"}(s||(r.BuiltInNetworkName=s={})),r.ChainId={[s.Mainnet]:"0x1",[s.Goerli]:"0x5",[s.Sepolia]:"0xaa36a7",[s.Aurora]:"0x4e454152",[s.LineaGoerli]:"0xe704",[s.LineaSepolia]:"0xe705",[s.LineaMainnet]:"0xe708"},function(e){e.mainnet="ETH",e.goerli="GoerliETH",e.sepolia="SepoliaETH",e["linea-goerli"]="LineaETH",e["linea-sepolia"]="LineaETH",e["linea-mainnet"]="ETH",e.rpc=""}(n||(r.NetworksTicker=n={})),r.BlockExplorerUrl={[s.Mainnet]:"https://etherscan.io",[s.Goerli]:"https://goerli.etherscan.io",[s.Sepolia]:"https://sepolia.etherscan.io",[s.LineaGoerli]:"https://goerli.lineascan.build",[s.LineaSepolia]:"https://sepolia.lineascan.build",[s.LineaMainnet]:"https://lineascan.build"},r.NetworkNickname={[s.Mainnet]:"Ethereum Mainnet",[s.Goerli]:"Goerli",[s.Sepolia]:"Sepolia",[s.LineaGoerli]:"Linea Goerli",[s.LineaSepolia]:"Linea Sepolia",[s.LineaMainnet]:"Linea"}}}},{package:"@metamask/controller-utils",file:"node_modules/@metamask/controller-utils/dist/types.cjs"}],[1426,{"./constants.cjs":1421,"@ethereumjs/util":478,"@metamask/ethjs-unit":1764,"@metamask/utils":2761,"bn.js":3513,buffer:3561,"eth-ens-namehash":3755,"fast-deep-equal":3896},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.isEqualCaseInsensitive=r.isValidJson=r.isNonEmptyArray=r.isPlainObject=r.convertHexToDecimal=r.query=r.normalizeEnsName=r.timeoutFetch=r.fetchWithErrorHandling=r.handleFetch=r.successfulFetch=r.isSmartContractCode=r.isValidHexAddress=r.toChecksumHexAddress=r.safelyExecuteWithTimeout=r.safelyExecute=r.toHex=r.fromHex=r.hexToText=r.hexToBN=r.getBuyURL=r.weiHexToGweiDec=r.gweiDecToWEIBN=r.fractionBN=r.BNToHex=r.isSafeChainId=r.isSafeDynamicKey=r.PROTOTYPE_POLLUTION_BLOCKLIST=void 0;const n=e("@ethereumjs/util"),a=e("@metamask/ethjs-unit"),o=e("@metamask/utils"),i=s(e("bn.js")),c=s(e("eth-ens-namehash")),l=s(e("fast-deep-equal")),u=e("./constants.cjs"),d=new Error("timeout");function m(e){return e?new i.default((0,o.remove0x)(e),16):new i.default(0)}async function f(e,t){const r=await fetch(e,t);if(!r.ok)throw new Error(`Fetch failed with status '${r.status}' for request '${String(e)}'`);return r}async function h(e,t){const r=await f(e,t);return await r.json()}r.PROTOTYPE_POLLUTION_BLOCKLIST=["__proto__","constructor","prototype"],r.isSafeDynamicKey=function(e){return"string"==typeof e&&!r.PROTOTYPE_POLLUTION_BLOCKLIST.some((t=>e===t))},r.isSafeChainId=function(e){if(!(0,o.isHexString)(e))return!1;const t=Number.parseInt(e,(0,o.isStrictHexString)(e)?16:10);return Number.isSafeInteger(t)&&t>0&&t<=u.MAX_SAFE_CHAIN_ID},r.BNToHex=function(e){return(0,o.add0x)(e.toString(16))},r.fractionBN=function(e,t,r){const s=new i.default(t),n=new i.default(r);return e.mul(s).div(n)},r.gweiDecToWEIBN=function(e){if(Number.isNaN(e))return new i.default(0);const t=e.toString().split("."),r=t[0]||"0";let s=t[1]||"";if(!s)return(0,a.toWei)(r,"gwei");if(s.length<=9)return(0,a.toWei)(`${r}.${s}`,"gwei");const n=s.slice(9)[0];s=s.slice(0,9);let o=(0,a.toWei)(`${r}.${s}`,"gwei");return Number(n)>=5&&(o=o.add(new i.default(1))),o},r.weiHexToGweiDec=function(e){const t=new i.default((0,o.remove0x)(e),16);return(0,a.fromWei)(t,"gwei")},r.getBuyURL=function(e="1",t,r=5){switch(e){case"1":return`https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${r}&address=${t}&crypto_currency=ETH`;case"5":return"https://goerli-faucet.slock.it/";case"11155111":return"https://sepoliafaucet.net/";default:return undefined}},r.hexToBN=m,r.hexToText=function(e){try{const r=(0,o.remove0x)(e);return t.from(r,"hex").toString("utf8")}catch(t){return e}},r.fromHex=function(e){return i.default.isBN(e)?e:new i.default(m(e).toString(10))},r.toHex=function(e){return"string"==typeof e&&(0,o.isStrictHexString)(e)?e:`0x${i.default.isBN(e)||"bigint"==typeof e?e.toString(16):new i.default(e.toString(),10).toString(16)}`},r.safelyExecute=async function(e,t=!1){try{return await e()}catch(e){return t&&console.error(e),undefined}},r.safelyExecuteWithTimeout=async function(e,t=!1,r=500){try{return await Promise.race([e(),new Promise(((e,t)=>setTimeout((()=>{t(d)}),r)))])}catch(e){return t&&console.error(e),undefined}},r.toChecksumHexAddress=function(e){if("string"!=typeof e)return e;const t=(0,o.add0x)(e);return(0,o.isHexString)(t)?(0,n.toChecksumAddress)(t):t},r.isValidHexAddress=function(e,{allowNonPrefixed:t=!0}={}){const r=t?(0,o.add0x)(e):e;return!!(0,o.isStrictHexString)(r)&&(0,n.isValidAddress)(r)},r.isSmartContractCode=function(e){return!!e&&("0x"!==e&&"0x0"!==e)},r.successfulFetch=f,r.handleFetch=h,r.fetchWithErrorHandling=async function({url:e,options:t,timeout:r,errorCodesToCatch:s}){let n;try{n=r?Promise.race([await h(e,t),new Promise(((e,t)=>setTimeout((()=>{t(d)}),r)))]):await h(e,t)}catch(e){!function(e,t=[]){if(!e)return;if(!(e instanceof Error))throw e;if(!t.some((t=>e.message.includes(`Fetch failed with status '${t}'`)))&&!e.message.includes("Failed to fetch")&&e!==d)throw e;console.error(e)}(e,s)}return n},r.timeoutFetch=async function(e,t,r=500){return Promise.race([f(e,t),new Promise(((e,t)=>setTimeout((()=>{t(d)}),r)))])},r.normalizeEnsName=function(e){if("."===e)return e;if(e&&"string"==typeof e)try{const t=c.default.normalize(e.trim());if(t.match(/^(([\w\d-]+)\.)*[\w\d-]{7,}\.(eth|test)$/u))return t}catch(e){}return null},r.query=function(e,t,r=[]){return new Promise(((s,n)=>{const a=(e,t)=>{e?n(e):s(t)};t in e&&"function"==typeof e[t]?e[t](...r,a):e.sendAsync({method:t,params:r},a)}))};r.convertHexToDecimal=(e="0x0")=>(0,o.isStrictHexString)(e)?parseInt(e,16):Number(e)?Number(e):0,r.isPlainObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isValidJson=function(e){try{return(0,l.default)(e,JSON.parse(JSON.stringify(e)))}catch(e){return!1}},r.isEqualCaseInsensitive=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/controller-utils",file:"node_modules/@metamask/controller-utils/dist/util.cjs"}],[1473,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker",file:"node_modules/@metamask/eth-block-tracker/dist/BlockTracker.js"}],[1474,{"./logging-utils":1477,"@metamask/safe-event-emitter":2306,"json-rpc-random-id":4230,pify:4517},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.PollingBlockTracker=void 0;const n=s(e("@metamask/safe-event-emitter")),a=s(e("json-rpc-random-id")),o=s(e("pify")),i=e("./logging-utils"),c=(0,i.createModuleLogger)(i.projectLogger,"polling-block-tracker"),l=(0,a.default)(),u=(e,t)=>e+t,d=["sync","latest"];class m extends n.default{constructor(e={}){if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super(),this._blockResetDuration=e.blockResetDuration||2e4,this._usePastBlocks=e.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents(),this._provider=e.provider,this._pollingInterval=e.pollingInterval||2e4,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===undefined||e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async destroy(){this._cancelBlockResetTimeout(),this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){if(this._currentBlock)return this._currentBlock;return await new Promise((e=>this.once("latest",e)))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){d.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start(),this.emit("_started"))}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return d.map((e=>this.listenerCount(e))).reduce(u)}_shouldUseNewBlock(e){const t=this._currentBlock;if(!t)return!0;const r=f(e),s=f(t);return this._usePastBlocks&&rs}_newPotentialLatest(e){this._shouldUseNewBlock(e)&&this._setCurrentBlock(e)}_setCurrentBlock(e){const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._updateAndQueue()}_end(){this._clearPollingTimeout()}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:l(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),c("Making request",e);const t=await(0,o.default)((t=>this._provider.sendAsync(e,t)))();if(c("Got response",t),t.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n${t.error.message}`);return t.result}async _updateAndQueue(){var e;let t=this._pollingInterval;try{await this._updateLatestBlock()}catch(r){const s=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${null!==(e=r.stack)&&void 0!==e?e:r}`);try{this.emit("error",s)}catch(e){console.error(s)}t=this._retryTimeout}if(!this._isRunning)return;this._clearPollingTimeout();const r=setTimeout((()=>{this._updateAndQueue()}),t);r.unref&&!this._keepEventLoopActive&&r.unref(),this._pollingTimeout=r,this.emit("_waitingForNextIteration")}_clearPollingTimeout(){this._pollingTimeout&&(clearTimeout(this._pollingTimeout),this._pollingTimeout=undefined)}}function f(e){return Number.parseInt(e,16)}r.PollingBlockTracker=m}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker",file:"node_modules/@metamask/eth-block-tracker/dist/PollingBlockTracker.js"}],[1475,{"@metamask/safe-event-emitter":2306,"json-rpc-random-id":4230},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.SubscribeBlockTracker=void 0;const n=s(e("@metamask/safe-event-emitter")),a=(0,s(e("json-rpc-random-id")).default)(),o=(e,t)=>e+t,i=["sync","latest"];class c extends n.default{constructor(e={}){if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(),this._blockResetDuration=e.blockResetDuration||2e4,this._usePastBlocks=e.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents(),this._provider=e.provider,this._subscriptionId=null}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){if(this._currentBlock)return this._currentBlock;return await new Promise((e=>this.once("latest",e)))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){i.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return i.map((e=>this.listenerCount(e))).reduce(o)}_shouldUseNewBlock(e){const t=this._currentBlock;if(!t)return!0;const r=l(e),s=l(t);return this._usePastBlocks&&rs}_newPotentialLatest(e){this._shouldUseNewBlock(e)&&this._setCurrentBlock(e)}_setCurrentBlock(e){const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===undefined||null===this._subscriptionId)try{const e=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}}async _end(){if(null!==this._subscriptionId&&this._subscriptionId!==undefined)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit("error",e)}}async _call(e,...t){return new Promise(((r,s)=>{this._provider.sendAsync({id:a(),method:e,params:t,jsonrpc:"2.0"},((e,t)=>{e?s(e):r(t.result)}))}))}_handleSubData(e,t){var r;"eth_subscription"===t.method&&(null===(r=t.params)||void 0===r?void 0:r.subscription)===this._subscriptionId&&this._newPotentialLatest(t.params.result.number)}}function l(e){return Number.parseInt(e,16)}r.SubscribeBlockTracker=c}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker",file:"node_modules/@metamask/eth-block-tracker/dist/SubscribeBlockTracker.js"}],[1476,{"./BlockTracker":1473,"./PollingBlockTracker":1474,"./SubscribeBlockTracker":1475},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./PollingBlockTracker"),r),n(e("./SubscribeBlockTracker"),r),n(e("./BlockTracker"),r)}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker",file:"node_modules/@metamask/eth-block-tracker/dist/index.js"}],[1477,{"@metamask/utils":1488},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.projectLogger=void 0;const s=e("@metamask/utils");Object.defineProperty(r,"createModuleLogger",{enumerable:!0,get:function(){return s.createModuleLogger}}),r.projectLogger=(0,s.createProjectLogger)("eth-block-tracker")}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker",file:"node_modules/@metamask/eth-block-tracker/dist/logging-utils.js"}],[1478,{"./errors.cjs":1486,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/assert.cjs"}],[1479,{"./assert.cjs":1478,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/base64.cjs"}],[1480,{"./assert.cjs":1478,"./hex.cjs":1487,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/bytes.cjs"}],[1481,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),function(e){e.Eip155="eip155"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1482,{"./base64.cjs":1479,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/checksum.cjs"}],[1483,{"./assert.cjs":1478,"./bytes.cjs":1480,"./hex.cjs":1487,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/coercers.cjs"}],[1484,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/collections.cjs"}],[1485,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1486,{"./misc.cjs":1492,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/errors.cjs"}],[1487,{"./assert.cjs":1478,"./bytes.cjs":1480,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/hex.cjs"}],[1488,{"./assert.cjs":1478,"./base64.cjs":1479,"./bytes.cjs":1480,"./caip-types.cjs":1481,"./checksum.cjs":1482,"./coercers.cjs":1483,"./collections.cjs":1484,"./encryption-types.cjs":1485,"./errors.cjs":1486,"./hex.cjs":1487,"./json.cjs":1489,"./keyring.cjs":1490,"./logging.cjs":1491,"./misc.cjs":1492,"./number.cjs":1493,"./opaque.cjs":1494,"./promise.cjs":1495,"./time.cjs":1496,"./transaction-types.cjs":1497,"./versions.cjs":1498},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/index.cjs"}],[1489,{"./assert.cjs":1478,"./misc.cjs":1492,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/json.cjs"}],[1490,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/keyring.cjs"}],[1491,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/logging.cjs"}],[1492,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/misc.cjs"}],[1493,{"./assert.cjs":1478,"./hex.cjs":1487},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/number.cjs"}],[1494,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/opaque.cjs"}],[1495,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/promise.cjs"}],[1496,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/time.cjs"}],[1497,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1498,{"./assert.cjs":1478,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/versions.cjs"}],[1499,{"@ethereumjs/util":478,"@metamask/eth-sig-util":1642,"@metamask/scure-bip39":2307,"@metamask/scure-bip39/dist/wordlists/english":2308,"@metamask/utils":1510,buffer:3561,"ethereum-cryptography/hdkey":3783,"ethereum-cryptography/keccak":3784,"ethereum-cryptography/utils":3788},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){const{HDKey:s}=e("ethereum-cryptography/hdkey"),{keccak256:n}=e("ethereum-cryptography/keccak"),{bytesToHex:a}=e("ethereum-cryptography/utils"),{privateToPublic:o,publicToAddress:i,ecsign:c,arrToBufArr:l,bufferToHex:u}=e("@ethereumjs/util"),d=e("@metamask/scure-bip39"),{wordlist:m}=e("@metamask/scure-bip39/dist/wordlists/english"),{concatSig:f,decrypt:h,getEncryptionPublicKey:p,normalize:g,personalSign:b,signTypedData:y,SignTypedDataVersion:k}=e("@metamask/eth-sig-util"),{assertIsHexString:E,remove0x:C}=e("@metamask/utils"),A="HD Key Tree";class S{constructor(e={}){this.type=A,this._wallets=[],this.deserialize(e)}generateRandomMnemonic(){this._initFromMnemonic(d.generateMnemonic(m))}_uint8ArrayToString(e){return Array.from(new Uint16Array(new Uint8Array(e).buffer)).map((e=>m[e])).join(" ")}_stringToUint8Array(e){const t=e.split(" ").map((e=>m.indexOf(e)));return new Uint8Array(new Uint16Array(t).buffer)}_mnemonicToUint8Array(e){let t=e;if(e&&e.type&&"Buffer"===e.type&&(t=e.data),"string"==typeof t||r.isBuffer(t)||Array.isArray(t)){let e=t;return Array.isArray(t)?e=r.from(t).toString():r.isBuffer(t)&&(e=t.toString()),this._stringToUint8Array(e)}return t instanceof Object&&!(t instanceof Uint8Array)?Uint8Array.from(Object.values(t)):t}serialize(){const e=this._uint8ArrayToString(this.mnemonic),t=new TextEncoder("utf-8").encode(e);return Promise.resolve({mnemonic:Array.from(t),numberOfAccounts:this._wallets.length,hdPath:this.hdPath})}deserialize(e={}){if(e.numberOfAccounts&&!e.mnemonic)throw new Error("Eth-Hd-Keyring: Deserialize method cannot be called with an opts value for numberOfAccounts and no menmonic");if(this.root)throw new Error("Eth-Hd-Keyring: Secret recovery phrase already provided");return this.opts=e,this._wallets=[],this.mnemonic=null,this.root=null,this.hdPath=e.hdPath||"m/44'/60'/0'/0",e.mnemonic&&this._initFromMnemonic(e.mnemonic),e.numberOfAccounts?this.addAccounts(e.numberOfAccounts):Promise.resolve([])}addAccounts(e=1){if(!this.root)throw new Error("Eth-Hd-Keyring: No secret recovery phrase provided");const t=this._wallets.length,r=[];for(let s=t;sthis._addressfromPublicKey(e.publicKey)));return Promise.resolve(s)}getAccounts(){return this._wallets.map((e=>this._addressfromPublicKey(e.publicKey)))}async getAppKeyAddress(e,t){if(!t||"string"!=typeof t)throw new Error("'origin' must be a non-empty string");const r=this._getWalletForAccount(e,{withAppKeyOrigin:t});return g(i(r.publicKey).toString("hex"))}async exportAccount(e,t={}){const r=this._getWalletForAccount(e,t);return a(r.privateKey)}async signTransaction(e,t,r={}){const s=this._getPrivateKeyFor(e,r),n=t.sign(s);return n===undefined?t:n}async signMessage(e,t,s={}){E(t);const n=C(t),a=this._getPrivateKeyFor(e,s),o=c(r.from(n,"hex"),a);return f(o.v,o.r,o.s)}async signPersonalMessage(e,t,s={}){const n=this._getPrivateKeyFor(e,s),a=r.from(n,"hex");return b({privateKey:a,data:t})}async decryptMessage(e,t){const s=this._getWalletForAccount(e),{privateKey:n}=s,a=r.from(n).toString("hex");return h({privateKey:a,encryptedData:t})}async signTypedData(e,t,r={version:k.V1}){const s=Object.keys(k).includes(r.version)?r.version:k.V1,n=this._getPrivateKeyFor(e,r);return y({privateKey:n,data:t,version:s})}removeAccount(e){const t=g(e);if(!this._wallets.map((({publicKey:e})=>this._addressfromPublicKey(e))).includes(t))throw new Error(`Address ${t} not found in this keyring`);this._wallets=this._wallets.filter((({publicKey:e})=>this._addressfromPublicKey(e)!==t))}async getEncryptionPublicKey(e,t={}){const r=this._getPrivateKeyFor(e,t);return p(r)}_getPrivateKeyFor(e,t={}){if(!e)throw new Error("Must specify address.");return this._getWalletForAccount(e,t).privateKey}_getWalletForAccount(e,t={}){const s=g(e);let a=this._wallets.find((({publicKey:e})=>this._addressfromPublicKey(e)===s));if(!a)throw new Error("HD Keyring - Unable to find matching address.");if(t.withAppKeyOrigin){const{privateKey:e}=a,s=r.from(t.withAppKeyOrigin,"utf8"),i=r.concat([e,s]),c=l(n(i,256));a={privateKey:c,publicKey:o(c)}}return a}_initFromMnemonic(e){if(this.root)throw new Error("Eth-Hd-Keyring: Secret recovery phrase already provided");this.mnemonic=this._mnemonicToUint8Array(e);if(!d.validateMnemonic(this.mnemonic,m))throw new Error("Eth-Hd-Keyring: Invalid secret recovery phrase provided");const t=d.mnemonicToSeedSync(this.mnemonic,m);this.hdWallet=s.fromMasterSeed(t),this.root=this.hdWallet.derive(this.hdPath)}_addressfromPublicKey(e){return u(i(r.from(e),!0)).toLowerCase()}}S.type=A,t.exports=S}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring",file:"node_modules/@metamask/eth-hd-keyring/index.js"}],[1500,{"./errors.cjs":1508,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/assert.cjs"}],[1501,{"./assert.cjs":1500,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/base64.cjs"}],[1502,{"./assert.cjs":1500,"./hex.cjs":1509,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/bytes.cjs"}],[1503,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAssetId=r.isCaipAssetType=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAssetIdStruct=r.CaipAssetTypeStruct=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ASSET_ID_REGEX=r.CAIP_ASSET_TYPE_REGEX=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),r.CaipAssetTypeStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_TYPE_REGEX),r.CaipAssetIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.isCaipAssetType=function(e){return(0,s.is)(e,r.CaipAssetTypeStruct)},r.isCaipAssetId=function(e){return(0,s.is)(e,r.CaipAssetIdStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1504,{"./base64.cjs":1501,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/checksum.cjs"}],[1505,{"./assert.cjs":1500,"./bytes.cjs":1502,"./hex.cjs":1509,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/coercers.cjs"}],[1506,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/collections.cjs"}],[1507,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1508,{"./misc.cjs":1514,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/errors.cjs"}],[1509,{"./assert.cjs":1500,"./bytes.cjs":1502,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/hex.cjs"}],[1510,{"./assert.cjs":1500,"./base64.cjs":1501,"./bytes.cjs":1502,"./caip-types.cjs":1503,"./checksum.cjs":1504,"./coercers.cjs":1505,"./collections.cjs":1506,"./encryption-types.cjs":1507,"./errors.cjs":1508,"./hex.cjs":1509,"./json.cjs":1511,"./keyring.cjs":1512,"./logging.cjs":1513,"./misc.cjs":1514,"./number.cjs":1515,"./opaque.cjs":1516,"./promise.cjs":1517,"./time.cjs":1518,"./transaction-types.cjs":1519,"./versions.cjs":1520},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/index.cjs"}],[1511,{"./assert.cjs":1500,"./misc.cjs":1514,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/json.cjs"}],[1512,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/keyring.cjs"}],[1513,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/logging.cjs"}],[1514,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/misc.cjs"}],[1515,{"./assert.cjs":1500,"./hex.cjs":1509},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/number.cjs"}],[1516,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/opaque.cjs"}],[1517,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/promise.cjs"}],[1518,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/time.cjs"}],[1519,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1520,{"./assert.cjs":1500,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/versions.cjs"}],[1530,{"./fetch-config-from-req":1532,"./logging-utils":1534,"@metamask/json-rpc-engine":1544,"@metamask/rpc-errors":1549,"node-fetch":4475},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createInfuraMiddleware=void 0;const n=e("@metamask/json-rpc-engine"),a=e("@metamask/rpc-errors"),o=s(e("node-fetch")),i=e("./fetch-config-from-req"),c=e("./logging-utils"),l=(0,c.createModuleLogger)(c.projectLogger,"create-infura-middleware"),u=["Gateway timeout","ETIMEDOUT","ECONNRESET","SyntaxError"];async function d(e,t,r,s,n,c){const{fetchUrl:l,fetchParams:u}=(0,i.fetchConfigFromReq)({network:e,projectId:t,extraHeaders:r,req:s,source:c}),d=await(0,o.default)(l,u),f=await d.text();if(!d.ok)switch(d.status){case 405:throw a.rpcErrors.methodNotFound();case 429:throw m("Request is being rate limited.");case 503:case 504:throw function(){let e="Gateway timeout. The request took too long to process. ";return e+="This can happen when querying logs over too wide a block range.",m(e)}();default:throw m(f)}if("eth_getBlockByNumber"===s.method&&"Not Found"===f)return void(n.result=null);const h=JSON.parse(f);n.result=h.result,n.error=h.error}function m(e){return a.rpcErrors.internal(e)}function f(e){const t=e.toString();return u.some((e=>t.includes(e)))}async function h(e){return new Promise((t=>{setTimeout(t,e)}))}r.createInfuraMiddleware=function({network:e="mainnet",maxAttempts:t=5,source:r,projectId:s,headers:a={}}){if(!s||"string"!=typeof s)throw new Error(`Invalid value for 'projectId': "${s}"`);if(!a||"object"!=typeof a)throw new Error(`Invalid value for 'headers': "${a}"`);if(!t)throw new Error(`Invalid value for 'maxAttempts': "${t}" (${typeof t})`);return(0,n.createAsyncMiddleware)((async(n,o)=>{for(let i=1;i<=t;i++)try{l("Attempting request to Infura. network = %o, projectId = %s, headers = %o, req = %o",e,s,a,n),await d(e,s,a,n,o,r);break}catch(e){if(!f(e))throw l("Non-retriable request error encountered. req = %o, res = %o, error = %o",n,o,e),e;if(!(t-i)){l("Retriable request error encountered, but exceeded max attempts. req = %o, res = %o, error = %o",n,o,e);const t=`InfuraProvider - cannot complete request. All retries exhausted.\nOriginal Error:\n${e.toString()}\n\n`;throw new Error(t)}l("Retriable request error encountered. req = %o, res = %o, error = %o",n,o,e),l("Waiting 1 second to try again..."),await h(1e3)}}))}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura",file:"node_modules/@metamask/eth-json-rpc-infura/dist/create-infura-middleware.js"}],[1531,{"./create-infura-middleware":1530,"@metamask/eth-json-rpc-provider":1535,"@metamask/json-rpc-engine":1544},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createProvider=void 0;const s=e("@metamask/eth-json-rpc-provider"),n=e("@metamask/json-rpc-engine"),a=e("./create-infura-middleware");r.createProvider=function(e){const t=new n.JsonRpcEngine;return t.push((0,a.createInfuraMiddleware)(e)),(0,s.providerFromEngine)(t)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura",file:"node_modules/@metamask/eth-json-rpc-infura/dist/create-provider.js"}],[1532,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function s(e){return{id:e.id,jsonrpc:e.jsonrpc,method:e.method,params:e.params}}Object.defineProperty(r,"__esModule",{value:!0}),r.fetchConfigFromReq=void 0,r.fetchConfigFromReq=function({network:e,projectId:t,extraHeaders:r={},req:n,source:a}){const o=n.origin||"internal",i=Object.assign({},r,{Accept:"application/json","Content-Type":"application/json"});return a&&(i["Infura-Source"]=`${a}/${o}`),{fetchUrl:`https://${e}.infura.io/v3/${t}`,fetchParams:{method:"POST",headers:i,body:JSON.stringify(s(n))}}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura",file:"node_modules/@metamask/eth-json-rpc-infura/dist/fetch-config-from-req.js"}],[1533,{"./create-infura-middleware":1530,"./create-provider":1531,"./fetch-config-from-req":1532},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./create-infura-middleware"),r),n(e("./fetch-config-from-req"),r),n(e("./create-provider"),r)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura",file:"node_modules/@metamask/eth-json-rpc-infura/dist/index.js"}],[1534,{"@metamask/utils":1582},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.projectLogger=void 0;const s=e("@metamask/utils");Object.defineProperty(r,"createModuleLogger",{enumerable:!0,get:function(){return s.createModuleLogger}}),r.projectLogger=(0,s.createProjectLogger)("eth-json-rpc-infura")}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura",file:"node_modules/@metamask/eth-json-rpc-infura/dist/logging-utils.js"}],[1535,{"./provider-from-engine":1536,"./provider-from-middleware":1537,"./safe-event-emitter-provider":1538},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.SafeEventEmitterProvider=void 0,n(e("./provider-from-engine"),r),n(e("./provider-from-middleware"),r);var a=e("./safe-event-emitter-provider");Object.defineProperty(r,"SafeEventEmitterProvider",{enumerable:!0,get:function(){return a.SafeEventEmitterProvider}})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/eth-json-rpc-provider/dist/index.js"}],[1536,{"./safe-event-emitter-provider":1538},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerFromEngine=void 0;const s=e("./safe-event-emitter-provider");r.providerFromEngine=function(e){return new s.SafeEventEmitterProvider({engine:e})}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/eth-json-rpc-provider/dist/provider-from-engine.js"}],[1537,{"./provider-from-engine":1536,"@metamask/json-rpc-engine":1544},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerFromMiddleware=void 0;const s=e("@metamask/json-rpc-engine"),n=e("./provider-from-engine");r.providerFromMiddleware=function(e){const t=new s.JsonRpcEngine;return t.push(e),(0,n.providerFromEngine)(t)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/eth-json-rpc-provider/dist/provider-from-middleware.js"}],[1538,{"@metamask/safe-event-emitter":2306},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.SafeEventEmitterProvider=void 0;const i=o(e("@metamask/safe-event-emitter"));class c extends i.default{constructor({engine:e}){super(),s.set(this,void 0),this.sendAsync=(e,t)=>{a(this,s,"f").handle(e,t)},this.send=(e,t)=>{if("function"!=typeof t)throw new Error('Must provide callback to "send" method.');a(this,s,"f").handle(e,t)},n(this,s,e,"f"),e.on&&e.on("notification",(e=>{this.emit("data",null,e)}))}}r.SafeEventEmitterProvider=c,s=new WeakMap}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/eth-json-rpc-provider/dist/safe-event-emitter-provider.js"}],[1539,{"@metamask/rpc-errors":1549,"@metamask/safe-event-emitter":2306,"@metamask/utils":1582},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m,f,h,p,g=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))((function(n,a){function o(e){try{c(s.next(e))}catch(e){a(e)}}function i(e){try{c(s.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,i)}c((s=s.apply(e,t||[])).next())}))},b=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},y=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},k=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.JsonRpcEngine=void 0;const E=e("@metamask/rpc-errors"),C=k(e("@metamask/safe-event-emitter")),A=e("@metamask/utils");class S extends C.default{constructor({notificationHandler:e}={}){super(),s.add(this),a.set(this,!1),o.set(this,void 0),i.set(this,void 0),b(this,o,[],"f"),b(this,i,e,"f")}destroy(){y(this,o,"f").forEach((e=>{"destroy"in e&&"function"==typeof e.destroy&&e.destroy()})),b(this,o,[],"f"),b(this,a,!0,"f")}push(e){y(this,s,"m",c).call(this),y(this,o,"f").push(e)}handle(e,t){if(y(this,s,"m",c).call(this),t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?y(this,s,"m",l).call(this,e,t):y(this,s,"m",l).call(this,e):t?y(this,s,"m",u).call(this,e,t):this._promiseHandle(e)}asMiddleware(){return y(this,s,"m",c).call(this),(e,t,r,s)=>g(this,void 0,void 0,(function*(){try{const[a,i,c]=yield y(S,n,"m",m).call(S,e,t,y(this,o,"f"));return i?(yield y(S,n,"m",h).call(S,c),s(a)):r((e=>g(this,void 0,void 0,(function*(){try{yield y(S,n,"m",h).call(S,c)}catch(t){return e(t)}return e()}))))}catch(e){return s(e)}}))}_promiseHandle(e){return g(this,void 0,void 0,(function*(){return new Promise(((t,r)=>{y(this,s,"m",u).call(this,e,((e,s)=>{e&&s===undefined?r(e):t(s)})).catch(r)}))}))}}function w(e){return JSON.stringify(e,null,2)}r.JsonRpcEngine=S,n=S,a=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakSet,c=function(){if(y(this,a,"f"))throw new Error("This engine is destroyed and can no longer be used.")},l=function(e,t){return g(this,void 0,void 0,(function*(){try{if(0===e.length){const e=[{id:null,jsonrpc:"2.0",error:new E.JsonRpcError(E.errorCodes.rpc.invalidRequest,"Request batch must contain plain objects. Received an empty array")}];return t?t(null,e):e}const r=(yield Promise.all(e.map(this._promiseHandle.bind(this)))).filter((e=>e!==undefined));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}))},u=function(e,t){var r;return g(this,void 0,void 0,(function*(){if(!e||Array.isArray(e)||"object"!=typeof e){const r=new E.JsonRpcError(E.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:null,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const s=new E.JsonRpcError(E.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return y(this,i,"f")&&!(0,A.isJsonRpcRequest)(e)?t(null):t(s,{id:null!==(r=e.id)&&void 0!==r?r:null,jsonrpc:"2.0",error:s})}if(y(this,i,"f")&&!(0,A.isJsonRpcRequest)(e)){try{yield y(this,i,"f").call(this,e)}catch(s){return t(s)}return t(null)}let s=null;const a=Object.assign({},e),c={id:a.id,jsonrpc:a.jsonrpc};try{yield y(S,n,"m",d).call(S,a,c,y(this,o,"f"))}catch(e){s=e}return s&&(delete c.result,c.error||(c.error=(0,E.serializeError)(s))),t(s,c)}))},d=function(e,t,r){return g(this,void 0,void 0,(function*(){const[s,a,o]=yield y(S,n,"m",m).call(S,e,t,r);if(y(S,n,"m",p).call(S,e,t,a),yield y(S,n,"m",h).call(S,o),s)throw s}))},m=function(e,t,r){return g(this,void 0,void 0,(function*(){const s=[];let a=null,o=!1;for(const i of r)if([a,o]=yield y(S,n,"m",f).call(S,e,t,i,s),o)break;return[a,o,s.reverse()]}))},f=function(e,t,r,s){return g(this,void 0,void 0,(function*(){return new Promise((n=>{const a=e=>{const r=e||t.error;r&&(t.error=(0,E.serializeError)(r)),n([r,!0])},o=r=>{t.error?a(t.error):(r&&("function"!=typeof r&&a(new E.JsonRpcError(E.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${w(e)}`,{request:e})),s.push(r)),n([null,!1]))};try{r(e,t,o,a)}catch(e){a(e)}}))}))},h=function(e){return g(this,void 0,void 0,(function*(){for(const t of e)yield new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}))},p=function(e,t,r){if(!(0,A.hasProperty)(t,"result")&&!(0,A.hasProperty)(t,"error"))throw new E.JsonRpcError(E.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${w(e)}`,{request:e});if(!r)throw new E.JsonRpcError(E.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${w(e)}`,{request:e})}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/JsonRpcEngine.js"}],[1540,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))((function(n,a){function o(e){try{c(s.next(e))}catch(e){a(e)}}function i(e){try{c(s.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,i)}c((s=s.apply(e,t||[])).next())}))};Object.defineProperty(r,"__esModule",{value:!0}),r.createAsyncMiddleware=void 0,r.createAsyncMiddleware=function(e){return(t,r,n,a)=>s(this,void 0,void 0,(function*(){let o;const i=new Promise((e=>{o=e}));let c=null,l=!1;const u=()=>s(this,void 0,void 0,(function*(){return l=!0,n((e=>{c=e,o()})),i}));try{yield e(t,r,u),l?(yield i,c(null)):a(null)}catch(e){c?c(e):a(e)}}))}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/createAsyncMiddleware.js"}],[1541,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createScaffoldMiddleware=void 0,r.createScaffoldMiddleware=function(e){return(t,r,s,n)=>{const a=e[t.method];return a===undefined?s():"function"==typeof a?a(t,r,s,n):(r.result=a,n())}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/createScaffoldMiddleware.js"}],[1542,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getUniqueId=void 0;const s=4294967295;let n=Math.floor(Math.random()*s);r.getUniqueId=function(){return n=(n+1)%s,n}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/getUniqueId.js"}],[1543,{"./getUniqueId":1542},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createIdRemapMiddleware=void 0;const s=e("./getUniqueId");r.createIdRemapMiddleware=function(){return(e,t,r,n)=>{const a=e.id,o=(0,s.getUniqueId)();e.id=o,t.id=o,r((r=>{e.id=a,t.id=a,r()}))}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/idRemapMiddleware.js"}],[1544,{"./JsonRpcEngine":1539,"./createAsyncMiddleware":1540,"./createScaffoldMiddleware":1541,"./getUniqueId":1542,"./idRemapMiddleware":1543,"./mergeMiddleware":1545},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./createAsyncMiddleware"),r),n(e("./createScaffoldMiddleware"),r),n(e("./getUniqueId"),r),n(e("./idRemapMiddleware"),r),n(e("./JsonRpcEngine"),r),n(e("./mergeMiddleware"),r)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/index.js"}],[1545,{"./JsonRpcEngine":1539},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.mergeMiddleware=void 0;const s=e("./JsonRpcEngine");r.mergeMiddleware=function(e){const t=new s.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/mergeMiddleware.js"}],[1546,{"./utils.cjs":1550,"@metamask/utils":1561,"fast-safe-stringify":3904},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.EthereumProviderError=r.JsonRpcError=void 0;const n=e("@metamask/utils"),a=s(e("fast-safe-stringify")),o=e("./utils.cjs");class i 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.');(0,o.dataHasCause)(r)?(super(t,{cause:r.cause}),(0,n.hasProperty)(this,"cause")||Object.assign(this,{cause:r.cause})):super(t),r!==undefined&&(this.data=r),this.code=e}serialize(){const e={code:this.code,message:this.message};return this.data!==undefined&&(e.data=this.data,(0,n.isPlainObject)(this.data)&&(e.data.cause=(0,o.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,a.default)(this.serialize(),c,2)}}r.JsonRpcError=i;function c(e,t){return"[Circular]"===t?undefined:t}r.EthereumProviderError=class extends i{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)}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/dist/classes.cjs"}],[1547,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorValues=r.errorCodes=void 0,r.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},r.errorValues={"-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."}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/dist/error-constants.cjs"}],[1548,{"./classes.cjs":1546,"./error-constants.cjs":1547,"./utils.cjs":1550},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerErrors=r.rpcErrors=void 0;const s=e("./classes.cjs"),n=e("./error-constants.cjs"),a=e("./utils.cjs");function o(e,t){const[r,n]=c(t);return new s.JsonRpcError(e,r??(0,a.getMessageFromCode)(e),n)}function i(e,t){const[r,n]=c(t);return new s.EthereumProviderError(e,r??(0,a.getMessageFromCode)(e),n)}function c(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??undefined,r]}}return[]}r.rpcErrors={parse:e=>o(n.errorCodes.rpc.parse,e),invalidRequest:e=>o(n.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(n.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(n.errorCodes.rpc.methodNotFound,e),internal:e=>o(n.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(t,e)},invalidInput:e=>o(n.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(n.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(n.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(n.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(n.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(n.errorCodes.rpc.limitExceeded,e)},r.providerErrors={userRejectedRequest:e=>i(n.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>i(n.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>i(n.errorCodes.provider.unsupportedMethod,e),disconnected:e=>i(n.errorCodes.provider.disconnected,e),chainDisconnected:e=>i(n.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new s.EthereumProviderError(t,r,n)}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/dist/errors.cjs"}],[1549,{"./classes.cjs":1546,"./error-constants.cjs":1547,"./errors.cjs":1548,"./utils.cjs":1550},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorCodes=r.providerErrors=r.rpcErrors=r.getMessageFromCode=r.serializeError=r.serializeCause=r.dataHasCause=r.EthereumProviderError=r.JsonRpcError=void 0;var s=e("./classes.cjs");Object.defineProperty(r,"JsonRpcError",{enumerable:!0,get:function(){return s.JsonRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return s.EthereumProviderError}});var n=e("./utils.cjs");Object.defineProperty(r,"dataHasCause",{enumerable:!0,get:function(){return n.dataHasCause}}),Object.defineProperty(r,"serializeCause",{enumerable:!0,get:function(){return n.serializeCause}}),Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});var a=e("./errors.cjs");Object.defineProperty(r,"rpcErrors",{enumerable:!0,get:function(){return a.rpcErrors}}),Object.defineProperty(r,"providerErrors",{enumerable:!0,get:function(){return a.providerErrors}});var o=e("./error-constants.cjs");Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/dist/index.cjs"}],[1550,{"./error-constants.cjs":1547,"@metamask/utils":1561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.dataHasCause=r.serializeCause=r.serializeError=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const s=e("@metamask/utils"),n=e("./error-constants.cjs"),a=n.errorCodes.rpc.internal,o={code:a,message:i(a)};function i(e,t="Unspecified error message. This is a bug, please report it."){if(c(e)){const t=e.toString();if((0,s.hasProperty)(n.errorValues,t))return n.errorValues[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function c(e){return Number.isInteger(e)}function l(e){return Array.isArray(e)?e.map((e=>(0,s.isValidJson)(e)?e:(0,s.isObject)(e)?u(e):null)):(0,s.isObject)(e)?u(e):(0,s.isValidJson)(e)?e:null}function u(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const n=e[r];return(0,s.isValidJson)(n)&&(t[r]=n),t}),{})}r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",r.getMessageFromCode=i,r.isValidCode=c,r.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:r=!0}={}){if(!(0,s.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const n=function(e,t){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if((0,s.isJsonRpcError)(e))return e;const r=l(e),n={...t,data:{cause:r}};return n}(e,t);return r||delete n.stack,n},r.serializeCause=l,r.dataHasCause=function(e){return(0,s.isObject)(e)&&(0,s.hasProperty)(e,"cause")&&(0,s.isObject)(e.cause)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/dist/utils.cjs"}],[1551,{"./errors.cjs":1559,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/assert.cjs"}],[1552,{"./assert.cjs":1551,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/base64.cjs"}],[1553,{"./assert.cjs":1551,"./hex.cjs":1560,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/bytes.cjs"}],[1554,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAssetId=r.isCaipAssetType=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAssetIdStruct=r.CaipAssetTypeStruct=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ASSET_ID_REGEX=r.CAIP_ASSET_TYPE_REGEX=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),r.CaipAssetTypeStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_TYPE_REGEX),r.CaipAssetIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.isCaipAssetType=function(e){return(0,s.is)(e,r.CaipAssetTypeStruct)},r.isCaipAssetId=function(e){return(0,s.is)(e,r.CaipAssetIdStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1555,{"./base64.cjs":1552,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/checksum.cjs"}],[1556,{"./assert.cjs":1551,"./bytes.cjs":1553,"./hex.cjs":1560,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/coercers.cjs"}],[1557,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/collections.cjs"}],[1558,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1559,{"./misc.cjs":1565,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/errors.cjs"}],[1560,{"./assert.cjs":1551,"./bytes.cjs":1553,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/hex.cjs"}],[1561,{"./assert.cjs":1551,"./base64.cjs":1552,"./bytes.cjs":1553,"./caip-types.cjs":1554,"./checksum.cjs":1555,"./coercers.cjs":1556,"./collections.cjs":1557,"./encryption-types.cjs":1558,"./errors.cjs":1559,"./hex.cjs":1560,"./json.cjs":1562,"./keyring.cjs":1563,"./logging.cjs":1564,"./misc.cjs":1565,"./number.cjs":1566,"./opaque.cjs":1567,"./promise.cjs":1568,"./time.cjs":1569,"./transaction-types.cjs":1570,"./versions.cjs":1571},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/index.cjs"}],[1562,{"./assert.cjs":1551,"./misc.cjs":1565,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/json.cjs"}],[1563,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/keyring.cjs"}],[1564,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/logging.cjs"}],[1565,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/misc.cjs"}],[1566,{"./assert.cjs":1551,"./hex.cjs":1560},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/number.cjs"}],[1567,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/opaque.cjs"}],[1568,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/promise.cjs"}],[1569,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/time.cjs"}],[1570,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1571,{"./assert.cjs":1551,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/versions.cjs"}],[1572,{"./errors.cjs":1580,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/assert.cjs"}],[1573,{"./assert.cjs":1572,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/base64.cjs"}],[1574,{"./assert.cjs":1572,"./hex.cjs":1581,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/bytes.cjs"}],[1575,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),function(e){e.Eip155="eip155"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1576,{"./base64.cjs":1573,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/checksum.cjs"}],[1577,{"./assert.cjs":1572,"./bytes.cjs":1574,"./hex.cjs":1581,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/coercers.cjs"}],[1578,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/collections.cjs"}],[1579,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1580,{"./misc.cjs":1586,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/errors.cjs"}],[1581,{"./assert.cjs":1572,"./bytes.cjs":1574,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/hex.cjs"}],[1582,{"./assert.cjs":1572,"./base64.cjs":1573,"./bytes.cjs":1574,"./caip-types.cjs":1575,"./checksum.cjs":1576,"./coercers.cjs":1577,"./collections.cjs":1578,"./encryption-types.cjs":1579,"./errors.cjs":1580,"./hex.cjs":1581,"./json.cjs":1583,"./keyring.cjs":1584,"./logging.cjs":1585,"./misc.cjs":1586,"./number.cjs":1587,"./opaque.cjs":1588,"./promise.cjs":1589,"./time.cjs":1590,"./transaction-types.cjs":1591,"./versions.cjs":1592},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/index.cjs"}],[1583,{"./assert.cjs":1572,"./misc.cjs":1586,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/json.cjs"}],[1584,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/keyring.cjs"}],[1585,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/logging.cjs"}],[1586,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/misc.cjs"}],[1587,{"./assert.cjs":1572,"./hex.cjs":1581},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/number.cjs"}],[1588,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/opaque.cjs"}],[1589,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/promise.cjs"}],[1590,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/time.cjs"}],[1591,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1592,{"./assert.cjs":1572,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/versions.cjs"}],[1629,{"./provider-from-engine.cjs":1630,"./provider-from-middleware.cjs":1631,"./safe-event-emitter-provider.cjs":1632},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.SafeEventEmitterProvider=void 0,n(e("./provider-from-engine.cjs"),r),n(e("./provider-from-middleware.cjs"),r);var a=e("./safe-event-emitter-provider.cjs");Object.defineProperty(r,"SafeEventEmitterProvider",{enumerable:!0,get:function(){return a.SafeEventEmitterProvider}})}}},{package:"@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-provider/dist/index.cjs"}],[1630,{"./safe-event-emitter-provider.cjs":1632},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerFromEngine=void 0;const s=e("./safe-event-emitter-provider.cjs");r.providerFromEngine=function(e){return new s.SafeEventEmitterProvider({engine:e})}}}},{package:"@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-provider/dist/provider-from-engine.cjs"}],[1631,{"./provider-from-engine.cjs":1630,"@metamask/json-rpc-engine":1780},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerFromMiddleware=void 0;const s=e("@metamask/json-rpc-engine"),n=e("./provider-from-engine.cjs");r.providerFromMiddleware=function(e){const t=new s.JsonRpcEngine;return t.push(e),(0,n.providerFromEngine)(t)}}}},{package:"@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-provider/dist/provider-from-middleware.cjs"}],[1632,{"@metamask/rpc-errors":2304,"@metamask/safe-event-emitter":2306,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.SafeEventEmitterProvider=r.convertEip1193RequestToJsonRpcRequest=void 0;const i=e("@metamask/rpc-errors"),c=o(e("@metamask/safe-event-emitter")),l=e("uuid");function u(e){const{id:t=(0,l.v4)(),jsonrpc:r="2.0",method:s,params:n}=e;return n?{id:t,jsonrpc:r,method:s,params:n}:{id:t,jsonrpc:r,method:s}}r.convertEip1193RequestToJsonRpcRequest=u;class d extends c.default{constructor({engine:e}){super(),s.set(this,void 0),this.sendAsync=(e,t)=>{const r=u(e);a(this,s,"f").handle(r,t)},this.send=(e,t)=>{if("function"!=typeof t)throw new Error('Must provide callback to "send" method.');const r=u(e);a(this,s,"f").handle(r,t)},n(this,s,e,"f"),e.on&&e.on("notification",(e=>{this.emit("data",null,e)}))}async request(e){const t=u(e),r=await a(this,s,"f").handle(t);if("result"in r)return r.result;const n=new i.JsonRpcError(r.error.code,r.error.message,r.error.data);throw"stack"in r.error&&(n.stack=r.error.stack),n}}r.SafeEventEmitterProvider=d,s=new WeakMap}}},{package:"@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-provider/dist/safe-event-emitter-provider.cjs"}],[1640,{"json-rpc-random-id":4230,xtend:5231},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const s=e("json-rpc-random-id")(),n=e("xtend");function a(e){this.currentProvider=e}function o(e){return function(...t){const r=t.pop();this.sendAsync({method:e,params:t},r)}}function i(e,t){return function(...r){const s=r.pop();r.length0&&(o=2048-a-16),n.padding="0".repeat(o),l({publicKey:e,data:JSON.stringify(n),version:s})},r.decrypt=u,r.decryptSafely=function({encryptedData:e,privateKey:t}){if((0,c.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,c.isNullish)(t))throw new Error("Missing privateKey parameter");return JSON.parse(u({encryptedData:e,privateKey:t})).data},r.getEncryptionPublicKey=function(e){const r=t.from(e,"hex"),s=i.box.keyPair.fromSecretKey(r).publicKey;return o.base64.encode(s)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-sig-util",file:"node_modules/@metamask/eth-sig-util/dist/encryption.js"}],[1642,{"./encryption":1641,"./personal-sign":1643,"./sign-typed-data":1644,"./utils":1645},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.normalize=r.concatSig=void 0,n(e("./personal-sign"),r),n(e("./sign-typed-data"),r),n(e("./encryption"),r);var a=e("./utils");Object.defineProperty(r,"concatSig",{enumerable:!0,get:function(){return a.concatSig}}),Object.defineProperty(r,"normalize",{enumerable:!0,get:function(){return a.normalize}})}}},{package:"@metamask/eth-sig-util",file:"node_modules/@metamask/eth-sig-util/dist/index.js"}],[1643,{"./utils":1645,"@ethereumjs/util":478},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.extractPublicKey=r.recoverPersonalSignature=r.personalSign=void 0;const s=e("@ethereumjs/util"),n=e("./utils");function a(e,t){const r=(0,s.hashPersonalMessage)((0,n.legacyToBuffer)(e));return(0,n.recoverPublicKey)(r,t)}r.personalSign=function({privateKey:e,data:t}){if((0,n.isNullish)(t))throw new Error("Missing data parameter");if((0,n.isNullish)(e))throw new Error("Missing privateKey parameter");const r=(0,n.legacyToBuffer)(t),a=(0,s.hashPersonalMessage)(r),o=(0,s.ecsign)(a,e);return(0,n.concatSig)((0,s.toBuffer)(o.v),o.r,o.s)},r.recoverPersonalSignature=function({data:e,signature:t}){if((0,n.isNullish)(e))throw new Error("Missing data parameter");if((0,n.isNullish)(t))throw new Error("Missing signature parameter");const r=a(e,t),o=(0,s.publicToAddress)(r);return(0,s.bufferToHex)(o)},r.extractPublicKey=function({data:e,signature:t}){if((0,n.isNullish)(e))throw new Error("Missing data parameter");if((0,n.isNullish)(t))throw new Error("Missing signature parameter");return`0x${a(e,t).toString("hex")}`}}}},{package:"@metamask/eth-sig-util",file:"node_modules/@metamask/eth-sig-util/dist/personal-sign.js"}],[1644,{"./utils":1645,"@ethereumjs/util":478,"@metamask/abi-utils":1307,"@metamask/abi-utils/dist/parsers":1316,"@metamask/abi-utils/dist/utils":1324,"@metamask/utils":1656,"ethereum-cryptography/keccak":3784},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.recoverTypedSignature=r.signTypedData=r.typedSignatureHash=r.TypedDataUtils=r.TYPED_MESSAGE_SCHEMA=r.SignTypedDataVersion=void 0;const s=e("@ethereumjs/util"),n=e("@metamask/abi-utils"),a=e("@metamask/abi-utils/dist/parsers"),o=e("@metamask/abi-utils/dist/utils"),i=e("@metamask/utils"),c=e("ethereum-cryptography/keccak"),l=e("./utils");var u;function d(e,t){if(!Object.keys(u).includes(e))throw new Error(`Invalid version: '${e}'`);if(t&&!t.includes(e))throw new Error(`SignTypedDataVersion not allowed: '${e}'. Allowed versions are: ${t.join(", ")}`)}function m(e,t){(0,i.assert)(null!==t,`Unable to encode value: Invalid number. Expected a valid number value, but received "${t}".`);const r=BigInt(t),s=(0,a.getLength)(e),n=BigInt(2)**BigInt(s)-BigInt(1);return(0,i.assert)(r>=-n&&r<=n,`Unable to encode value: Number "${t}" is out of range for type "${e}".`),r}function f(e){let t=BigInt(0);for(let r=0;r=49?s-BigInt(49)+BigInt(10):s>=17?s-BigInt(17)+BigInt(10):s}return(0,o.padStart)((0,i.bigIntToBytes)(t),20)}function h(e,t,r,a,l){if(d(l,[u.V3,u.V4]),e[r]!==undefined)return["bytes32",l===u.V4&&null==a?"0x0000000000000000000000000000000000000000000000000000000000000000":(0,s.arrToBufArr)((0,c.keccak256)(p(r,a,e,l)))];if("function"===r)throw new Error('Unsupported or invalid type: "function"');if(a===undefined)throw new Error(`missing value for field ${t} of type ${r}`);if("address"===r){if("number"==typeof a)return["address",(0,o.padStart)((0,i.numberToBytes)(a),20)];if((0,i.isStrictHexString)(a))return["address",(0,i.add0x)(a)];if("string"==typeof a)return["address",f(a).subarray(0,20)]}if("bool"===r)return["bool",Boolean(a)];if("bytes"===r)return"number"==typeof a?a=(0,i.numberToBytes)(a):(0,i.isStrictHexString)(a)||"0x"===a?a=(0,i.hexToBytes)(a):"string"==typeof a&&(a=(0,i.stringToBytes)(a)),["bytes32",(0,s.arrToBufArr)((0,c.keccak256)(a))];if(r.startsWith("bytes")&&"bytes"!==r&&!r.includes("["))return"number"==typeof a?a<0?["bytes32",new Uint8Array(32)]:["bytes32",(0,i.bigIntToBytes)(BigInt(a))]:(0,i.isStrictHexString)(a)?["bytes32",(0,i.hexToBytes)(a)]:["bytes32",a];if(r.startsWith("int")&&!r.includes("[")){const e=m(r,a);return e>=BigInt(0)?["uint256",e]:["int256",e]}if("string"===r)return a="number"==typeof a?(0,i.numberToBytes)(a):(0,i.stringToBytes)(null!=a?a:""),["bytes32",(0,s.arrToBufArr)((0,c.keccak256)(a))];if(r.endsWith("]")){if(l===u.V3)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");const o=r.slice(0,r.lastIndexOf("[")),i=a.map((r=>h(e,t,o,r,l)));return["bytes32",(0,s.arrToBufArr)((0,c.keccak256)((0,n.encode)(i.map((([e])=>e)),i.map((([,e])=>e)))))]}return[r,a]}function p(e,t,r,a){d(a,[u.V3,u.V4]);const o=["bytes32"],i=[k(e,r)];for(const s of r[e]){if(a===u.V3&&t[s.name]===undefined)continue;const[e,n]=h(r,s.name,s.type,t[s.name],a);o.push(e),i.push(n)}return(0,s.arrToBufArr)((0,n.encode)(o,i))}function g(e,t){let r="";const s=b(e,t);s.delete(e);const n=[e,...Array.from(s).sort()];for(const e of n){if(!t[e])throw new Error(`No type definition specified: ${e}`);r+=`${e}(${t[e].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`}return r}function b(e,t,r=new Set){if("string"!=typeof e)throw new Error(`Invalid findTypeDependencies input ${JSON.stringify(e)}`);const s=e.match(/^\w*/u);if([e]=s,r.has(e)||t[e]===undefined)return r;r.add(e);for(const s of t[e])b(s.type,t,r);return r}function y(e,t,r,n){d(n,[u.V3,u.V4]);const a=p(e,t,r,n),o=(0,c.keccak256)(a);return(0,s.arrToBufArr)(o)}function k(e,t){const r=(0,i.stringToBytes)(g(e,t));return(0,s.arrToBufArr)((0,c.keccak256)(r))}function E(e){const t={};for(const s in r.TYPED_MESSAGE_SCHEMA.properties)e[s]&&(t[s]=e[s]);return"types"in t&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t}function C(e,t){d(t,[u.V3,u.V4]);const r=E(e),{domain:s}=r;return y("EIP712Domain",s,{EIP712Domain:r.types.EIP712Domain},t)}function A(e,t){if((0,a.isArrayType)(e)&&Array.isArray(t)){const[r]=(0,a.getArrayType)(e);return t.map((e=>A(r,e)))}if("address"===e){if("number"==typeof t)return(0,o.padStart)((0,i.numberToBytes)(t),20);if((0,i.isStrictHexString)(t))return(0,o.padStart)((0,i.hexToBytes)(t).subarray(0,20),20);if(t instanceof Uint8Array)return(0,o.padStart)(t.subarray(0,20),20)}if("bool"===e)return Boolean(t);if(e.startsWith("bytes")&&"bytes"!==e){const r=(0,a.getByteLength)(e);if("number"==typeof t)return t<0?new Uint8Array:(0,i.numberToBytes)(t).subarray(0,r);if((0,i.isStrictHexString)(t))return(0,i.hexToBytes)(t).subarray(0,r);if(t instanceof Uint8Array)return t.subarray(0,r)}if(e.startsWith("uint")&&"number"==typeof t)return Math.abs(t);if(e.startsWith("int")&&"number"==typeof t){const r=(0,a.getLength)(e);return BigInt.asIntN(r,BigInt(t))}return t}function S(e,t){return t.map((t=>{if("string"==typeof t||"number"==typeof t||"bigint"==typeof t){const r=m(e,t);if(r>=BigInt(0))return(0,o.padStart)((0,i.bigIntToBytes)(r),32);const s=(0,a.getLength)(e),n=BigInt.asIntN(s,r);return(0,i.signedBigIntToBytes)(n,32)}return t}))}function w(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!("length"in e)||!e.length)throw t;const r=e.map((({name:e,type:t,value:r})=>{if("address[]"===t)return{name:e,type:"bytes32[]",value:(s=r,s.map((e=>"number"==typeof e?(0,o.padStart)((0,i.numberToBytes)(e),32):(0,i.isStrictHexString)(e)?(0,o.padStart)((0,i.hexToBytes)(e).subarray(0,32),32):e instanceof Uint8Array?(0,o.padStart)(e.subarray(0,32),32):e)))};var s;if(t.startsWith("int")&&(0,a.isArrayType)(t)){const[s,n]=(0,a.getArrayType)(t);return{name:e,type:`bytes32[${null!=n?n:""}]`,value:S(s,r)}}return{name:e,type:t,value:A(t,r)}})),u=r.map((e=>"bytes"!==e.type?e.value:(0,l.legacyToBuffer)(e.value))),d=r.map((e=>{if("function"===e.type)throw new Error('Unsupported or invalid type: "function"');return e.type})),m=e.map((e=>{if(!e.name)throw t;return`${e.type} ${e.name}`}));return(0,s.arrToBufArr)((0,c.keccak256)((0,n.encodePacked)(["bytes32","bytes32"],[(0,c.keccak256)((0,n.encodePacked)(["string[]"],[m],!0)),(0,c.keccak256)((0,n.encodePacked)(d,u,!0))])))}!function(e){e.V1="V1",e.V3="V3",e.V4="V4"}(u=r.SignTypedDataVersion||(r.SignTypedDataVersion={})),r.TYPED_MESSAGE_SCHEMA={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},r.TypedDataUtils={encodeData:p,encodeType:g,findTypeDependencies:b,hashStruct:y,hashType:k,sanitizeData:E,eip712Hash:function(e,t){d(t,[u.V3,u.V4]);const r=E(e),n=[(0,i.hexToBytes)("1901")];return n.push(C(e,t)),"EIP712Domain"!==r.primaryType&&n.push(y(r.primaryType,r.message,r.types,t)),(0,s.arrToBufArr)((0,c.keccak256)((0,i.concatBytes)(n)))},eip712DomainHash:C},r.typedSignatureHash=function(e){const t=w(e);return(0,i.bytesToHex)(t)},r.signTypedData=function({privateKey:e,data:t,version:n}){if(d(n),(0,l.isNullish)(t))throw new Error("Missing data parameter");if((0,l.isNullish)(e))throw new Error("Missing private key parameter");const a=n===u.V1?w(t):r.TypedDataUtils.eip712Hash(t,n),o=(0,s.ecsign)(a,e);return(0,l.concatSig)((0,s.arrToBufArr)((0,i.bigIntToBytes)(o.v)),o.r,o.s)},r.recoverTypedSignature=function({data:e,signature:t,version:n}){if(d(n),(0,l.isNullish)(e))throw new Error("Missing data parameter");if((0,l.isNullish)(t))throw new Error("Missing signature parameter");const a=n===u.V1?w(e):r.TypedDataUtils.eip712Hash(e,n),o=(0,l.recoverPublicKey)(a,t),c=(0,s.publicToAddress)(o);return(0,i.bytesToHex)(c)}}}},{package:"@metamask/eth-sig-util",file:"node_modules/@metamask/eth-sig-util/dist/sign-typed-data.js"}],[1645,{"@ethereumjs/util":478,"@metamask/utils":1656,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.normalize=r.recoverPublicKey=r.concatSig=r.legacyToBuffer=r.isNullish=r.padWithZeroes=void 0;const s=e("@ethereumjs/util"),n=e("@metamask/utils");function a(e,t){if(""!==e&&!/^[a-f0-9]+$/iu.test(e))throw new Error(`Expected an unprefixed hex string. Received: ${e}`);if(t<0)throw new Error(`Expected a non-negative integer target length. Received: ${t}`);return String.prototype.padStart.call(e,t,"0")}function o(e){return null===e||e===undefined}r.padWithZeroes=a,r.isNullish=o,r.legacyToBuffer=function(e){return"string"!=typeof e||(0,s.isHexString)(e)?(0,s.toBuffer)(e):t.from(e)},r.concatSig=function(e,t,r){const o=(0,s.fromSigned)(t),i=(0,s.fromSigned)(r),c=(0,s.bufferToInt)(e),l=a((0,s.toUnsigned)(o).toString("hex"),64),u=a((0,s.toUnsigned)(i).toString("hex"),64),d=(0,n.remove0x)((0,n.numberToHex)(c));return(0,n.add0x)(l.concat(u,d))},r.recoverPublicKey=function(e,t){const r=(0,s.fromRpcSig)(t);return(0,s.ecrecover)(e,r.v,r.r,r.s)},r.normalize=function(e){if(o(e))return undefined;if("number"==typeof e){if(e<0)return"0x";const t=(0,n.numberToBytes)(e);e=(0,n.bytesToHex)(t)}if("string"!=typeof e){let t="eth-sig-util.normalize() requires hex string or integer input.";throw t+=` received ${typeof e}: ${e}`,new Error(t)}return(0,n.add0x)(e.toLowerCase())}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-sig-util",file:"node_modules/@metamask/eth-sig-util/dist/utils.js"}],[1646,{"./errors.cjs":1654,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/assert.cjs"}],[1647,{"./assert.cjs":1646,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/base64.cjs"}],[1648,{"./assert.cjs":1646,"./hex.cjs":1655,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/bytes.cjs"}],[1649,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAssetId=r.isCaipAssetType=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAssetIdStruct=r.CaipAssetTypeStruct=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ASSET_ID_REGEX=r.CAIP_ASSET_TYPE_REGEX=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),r.CaipAssetTypeStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_TYPE_REGEX),r.CaipAssetIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.isCaipAssetType=function(e){return(0,s.is)(e,r.CaipAssetTypeStruct)},r.isCaipAssetId=function(e){return(0,s.is)(e,r.CaipAssetIdStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1650,{"./base64.cjs":1647,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/checksum.cjs"}],[1651,{"./assert.cjs":1646,"./bytes.cjs":1648,"./hex.cjs":1655,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/coercers.cjs"}],[1652,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/collections.cjs"}],[1653,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1654,{"./misc.cjs":1660,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/errors.cjs"}],[1655,{"./assert.cjs":1646,"./bytes.cjs":1648,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/hex.cjs"}],[1656,{"./assert.cjs":1646,"./base64.cjs":1647,"./bytes.cjs":1648,"./caip-types.cjs":1649,"./checksum.cjs":1650,"./coercers.cjs":1651,"./collections.cjs":1652,"./encryption-types.cjs":1653,"./errors.cjs":1654,"./hex.cjs":1655,"./json.cjs":1657,"./keyring.cjs":1658,"./logging.cjs":1659,"./misc.cjs":1660,"./number.cjs":1661,"./opaque.cjs":1662,"./promise.cjs":1663,"./time.cjs":1664,"./transaction-types.cjs":1665,"./versions.cjs":1666},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/index.cjs"}],[1657,{"./assert.cjs":1646,"./misc.cjs":1660,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/json.cjs"}],[1658,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/keyring.cjs"}],[1659,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/logging.cjs"}],[1660,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/misc.cjs"}],[1661,{"./assert.cjs":1646,"./hex.cjs":1655},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/number.cjs"}],[1662,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/opaque.cjs"}],[1663,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/promise.cjs"}],[1664,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/time.cjs"}],[1665,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1666,{"./assert.cjs":1646,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/versions.cjs"}],[1667,{"./simple-keyring":1668},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("./simple-keyring");Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s(n).default}})}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring",file:"node_modules/@metamask/eth-simple-keyring/dist/index.js"}],[1668,{"@ethereumjs/util":478,"@metamask/eth-sig-util":1642,"@metamask/utils":1679,buffer:3561,"ethereum-cryptography/keccak":3784,randombytes:4596},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var s,n,a,o,i=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},c=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const u=e("@ethereumjs/util"),d=e("@metamask/eth-sig-util"),m=e("@metamask/utils"),f=e("ethereum-cryptography/keccak"),h=l(e("randombytes")),p="Simple Key Pair";class g{constructor(e=[]){s.add(this),n.set(this,void 0),this.type=p,i(this,n,[],"f"),this.deserialize(e).catch((e=>{throw new Error(`Problem deserializing SimpleKeyring ${e.message}`)}))}async serialize(){return c(this,n,"f").map((e=>e.privateKey.toString("hex")))}async deserialize(e=[]){i(this,n,e.map((e=>{const r=(0,u.stripHexPrefix)(e),s=t.from(r,"hex");return{privateKey:s,publicKey:(0,u.privateToPublic)(s)}})),"f")}async addAccounts(e=1){const t=[];for(let r=0;r(0,m.add0x)((0,u.bufferToHex)((0,u.publicToAddress)(e)))))}async getAccounts(){return c(this,n,"f").map((({publicKey:e})=>(0,m.add0x)((0,u.bufferToHex)((0,u.publicToAddress)(e)))))}async signTransaction(e,t,r={}){const n=c(this,s,"m",a).call(this,e,r),o=t.sign(n);return o===undefined?t:o}async signMessage(e,r,n={withAppKeyOrigin:"",validateMessage:!0}){const o=(0,u.stripHexPrefix)(r);if(n.validateMessage&&(0===o.length||!o.match(/^[a-fA-F0-9]*$/u)))throw new Error("Cannot sign invalid message");const i=c(this,s,"m",a).call(this,e,n),l=(0,u.ecsign)(t.from(o,"hex"),i);return(0,d.concatSig)((0,u.toBuffer)(l.v),l.r,l.s)}async signPersonalMessage(e,t,r={withAppKeyOrigin:""}){const n=c(this,s,"m",a).call(this,e,r);return(0,d.personalSign)({privateKey:n,data:t})}async decryptMessage(e,t){const r=c(this,s,"m",o).call(this,e).privateKey.toString("hex");return(0,d.decrypt)({privateKey:r,encryptedData:t})}async signTypedData(e,t,r={version:d.SignTypedDataVersion.V1}){let n=d.SignTypedDataVersion.V1;r.version&&function(e){return e in d.SignTypedDataVersion}(r.version)&&(n=d.SignTypedDataVersion[r.version]);const o=c(this,s,"m",a).call(this,e,r);return(0,d.signTypedData)({privateKey:o,data:t,version:n})}async getEncryptionPublicKey(e,t){const r=c(this,s,"m",a).call(this,e,t);return(0,d.getEncryptionPublicKey)(r.toString("hex"))}async getAppKeyAddress(e,t){if(!t||"string"!=typeof t)throw new Error("'origin' must be a non-empty string");const r=c(this,s,"m",o).call(this,e,{withAppKeyOrigin:t});return(0,m.add0x)((0,u.bufferToHex)((0,u.publicToAddress)(r.publicKey)))}async exportAccount(e,t={withAppKeyOrigin:""}){return c(this,s,"m",o).call(this,e,t).privateKey.toString("hex")}removeAccount(e){if(!c(this,n,"f").map((({publicKey:e})=>(0,u.bufferToHex)((0,u.publicToAddress)(e)).toLowerCase())).includes(e.toLowerCase()))throw new Error(`Address ${e} not found in this keyring`);i(this,n,c(this,n,"f").filter((({publicKey:t})=>(0,u.bufferToHex)((0,u.publicToAddress)(t)).toLowerCase()!==e.toLowerCase())),"f")}}function b(){const e=(0,h.default)(32);if(!(0,u.isValidPrivate)(e))throw new Error("Private key does not satisfy the curve requirements (ie. it is invalid)");return e}r.default=g,n=new WeakMap,s=new WeakSet,a=function(e,t={withAppKeyOrigin:""}){if(!e)throw new Error("Must specify address.");return c(this,s,"m",o).call(this,e,t).privateKey},o=function(e,r={}){const s=(0,d.normalize)(e);let a=c(this,n,"f").find((({publicKey:e})=>(0,u.bufferToHex)((0,u.publicToAddress)(e))===s));if(!a)throw new Error("Simple Keyring - Unable to find matching address.");if(r.withAppKeyOrigin){const{privateKey:e}=a,s=t.from(r.withAppKeyOrigin,"utf8"),n=t.concat([e,s]),o=(0,u.arrToBufArr)((0,f.keccak256)(n));a={privateKey:o,publicKey:(0,u.privateToPublic)(o)}}return a},g.type=p}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring",file:"node_modules/@metamask/eth-simple-keyring/dist/simple-keyring.js"}],[1669,{"./errors.cjs":1677,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/assert.cjs"}],[1670,{"./assert.cjs":1669,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/base64.cjs"}],[1671,{"./assert.cjs":1669,"./hex.cjs":1678,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/bytes.cjs"}],[1672,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAssetId=r.isCaipAssetType=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAssetIdStruct=r.CaipAssetTypeStruct=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ASSET_ID_REGEX=r.CAIP_ASSET_TYPE_REGEX=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),r.CaipAssetTypeStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_TYPE_REGEX),r.CaipAssetIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.isCaipAssetType=function(e){return(0,s.is)(e,r.CaipAssetTypeStruct)},r.isCaipAssetId=function(e){return(0,s.is)(e,r.CaipAssetIdStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1673,{"./base64.cjs":1670,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/checksum.cjs"}],[1674,{"./assert.cjs":1669,"./bytes.cjs":1671,"./hex.cjs":1678,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/coercers.cjs"}],[1675,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/collections.cjs"}],[1676,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1677,{"./misc.cjs":1683,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/errors.cjs"}],[1678,{"./assert.cjs":1669,"./bytes.cjs":1671,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/hex.cjs"}],[1679,{"./assert.cjs":1669,"./base64.cjs":1670,"./bytes.cjs":1671,"./caip-types.cjs":1672,"./checksum.cjs":1673,"./coercers.cjs":1674,"./collections.cjs":1675,"./encryption-types.cjs":1676,"./errors.cjs":1677,"./hex.cjs":1678,"./json.cjs":1680,"./keyring.cjs":1681,"./logging.cjs":1682,"./misc.cjs":1683,"./number.cjs":1684,"./opaque.cjs":1685,"./promise.cjs":1686,"./time.cjs":1687,"./transaction-types.cjs":1688,"./versions.cjs":1689},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/index.cjs"}],[1680,{"./assert.cjs":1669,"./misc.cjs":1683,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/json.cjs"}],[1681,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/keyring.cjs"}],[1682,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/logging.cjs"}],[1683,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/misc.cjs"}],[1684,{"./assert.cjs":1669,"./hex.cjs":1678},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/number.cjs"}],[1685,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/opaque.cjs"}],[1686,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/promise.cjs"}],[1687,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/time.cjs"}],[1688,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1689,{"./assert.cjs":1669,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/versions.cjs"}],[1749,{"./helpers":1751,"./prefix-for-chain":1753,"./prefix-for-network":1754},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getAccountLink=r.createCustomAccountLink=r.createAccountLinkForChain=r.createAccountLink=void 0;const n=e("./helpers"),a=s(e("./prefix-for-chain")),o=s(e("./prefix-for-network"));function i(e,t){const r=o.default(t);return null===r?"":`https://${r}etherscan.io/address/${e}`}function c(e,t){const r=a.default(t);return null===r?"":`https://${r}etherscan.io/address/${e}`}function l(e,t){return n.addPathToUrl(t,"address",e)}r.createAccountLink=i,r.createAccountLinkForChain=c,r.createCustomAccountLink=l,r.getAccountLink=function(e,t,r={},s=""){return r.blockExplorerUrl?l(e,r.blockExplorerUrl):s?i(e,s):c(e,t)}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/account-link.js"}],[1750,{"./helpers":1751,"./prefix-for-chain":1753,"./prefix-for-network":1754},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getBlockExplorerLink=r.createExplorerLinkForChain=r.createExplorerLink=r.createCustomExplorerLink=void 0;const n=e("./helpers"),a=s(e("./prefix-for-chain")),o=s(e("./prefix-for-network"));function i(e,t){return n.addPathToUrl(t,"tx",e)}function c(e,t){const r=o.default(t);return null===r?"":`https://${r}etherscan.io/tx/${e}`}function l(e,t){const r=a.default(t);return null===r?"":`https://${r}etherscan.io/tx/${e}`}r.createCustomExplorerLink=i,r.createExplorerLink=c,r.createExplorerLinkForChain=l,r.getBlockExplorerLink=function(e,t={}){return t.blockExplorerUrl?i(e.hash,t.blockExplorerUrl):e.chainId?l(e.hash,e.chainId):c(e.hash,e.metamaskNetworkId)}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/explorer-link.js"}],[1751,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.addPathToUrl=void 0,r.addPathToUrl=(e,t,r)=>{const{username:s,password:n,protocol:a,host:o,pathname:i,search:c,hash:l}=new URL(e),u=i.endsWith("/")?`${i}${t}/${r}`:`${i}/${t}/${r}`;return new URL(`${a}//${s?`${s}:${n}`:""}${o}${u}${c}${l}`).toString()}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/helpers.js"}],[1752,{"./account-link":1749,"./explorer-link":1750,"./token-tracker-link":1755},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const s=e("./account-link"),n=e("./explorer-link"),a=e("./token-tracker-link");t.exports={createExplorerLink:n.createExplorerLink,createCustomExplorerLink:n.createCustomExplorerLink,createExplorerLinkForChain:n.createExplorerLinkForChain,createAccountLink:s.createAccountLink,createCustomAccountLink:s.createCustomAccountLink,createAccountLinkForChain:s.createAccountLinkForChain,createTokenTrackerLink:a.createTokenTrackerLink,createCustomTokenTrackerLink:a.createCustomTokenTrackerLink,createTokenTrackerLinkForChain:a.createTokenTrackerLinkForChain,getBlockExplorerLink:n.getBlockExplorerLink,getAccountLink:s.getAccountLink,getTokenTrackerLink:a.getTokenTrackerLink}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/index.js"}],[1753,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){let t;switch(e){case"0x1":t="";break;case"0x5":t="goerli.";break;case"0xaa36a7":t="sepolia.";break;default:t=null}return t}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/prefix-for-chain.js"}],[1754,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){let t;switch(parseInt(e)){case 1:t="";break;case 5:t="goerli.";break;case 11155111:t="sepolia.";break;default:t=null}return t}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/prefix-for-network.js"}],[1755,{"./helpers":1751,"./prefix-for-chain":1753,"./prefix-for-network":1754},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getTokenTrackerLink=r.createTokenTrackerLinkForChain=r.createCustomTokenTrackerLink=r.createTokenTrackerLink=void 0;const n=e("./helpers"),a=s(e("./prefix-for-chain")),o=s(e("./prefix-for-network"));function i(e,t,r){const s=o.default(t);return null===s?"":`https://${s}etherscan.io/token/${e}${r?`?a=${r}`:""}`}function c(e,t){return n.addPathToUrl(t,"token",e)}function l(e,t,r){const s=a.default(t);return null===s?"":`https://${s}etherscan.io/token/${e}${r?`?a=${r}`:""}`}r.createTokenTrackerLink=i,r.createCustomTokenTrackerLink=c,r.createTokenTrackerLinkForChain=l,r.getTokenTrackerLink=function(e,t,r,s,n={}){return n.blockExplorerUrl?c(e,n.blockExplorerUrl):r?i(e,r,s):l(e,t,s)}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/token-tracker-link.js"}],[1756,{"./has-tx-object":1757,"@babel/runtime/helpers/asyncToGenerator":303,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/regenerator":330,"@metamask/ethjs-filter":1759,"@metamask/ethjs-util":1765,"ethjs-abi":3865,"js-sha3":4228,"promise-to-callback":4524},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=e("@babel/runtime/helpers/interopRequireDefault"),n=s(e("@babel/runtime/regenerator")),a=s(e("@babel/runtime/helpers/asyncToGenerator")),o=e("ethjs-abi"),i=e("@metamask/ethjs-filter"),c=e("@metamask/ethjs-util").getKeys,l=e("js-sha3").keccak_256,u=e("promise-to-callback"),d=e("./has-tx-object");t.exports=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},t=this;function r(e){return function(){var t,r=[].slice.call(arguments);"function"==typeof r[r.length-1]&&(t=r.pop());var n=function(e){return s.apply(this,arguments)}({methodObject:e,methodArgs:r});return t?u(n)(t):n}}function s(){return(s=(0,a.default)(n.default.mark((function e(r){var s,a,i,c,l,u,m;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=r.methodObject,a=r.methodArgs,i="call",c={},d(a)&&(c=a.pop()),(l=Object.assign({},t.defaultTxObject,c,{to:t.address})).data=o.encodeMethod(s,a),!1===s.constant&&(i="sendTransaction"),e.next=9,t.query[i](l);case 9:if(u=e.sent,"call"!==i){e.next=20;break}return e.prev=11,m=o.decodeMethod(s,u),e.abrupt("return",m);case 16:throw e.prev=16,e.t0=e.catch(11),new Error("[ethjs-contract] while formatting incoming raw call data "+JSON.stringify(u)+" "+e.t0);case 20:return e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,null,[[11,16]])})))).apply(this,arguments)}t.abi=e.contractABI||[],t.query=e.query,t.address=e.address||"0x",t.bytecode=e.contractBytecode||"0x",t.defaultTxObject=e.contractDefaultTxObject||{},t.filters=new i(t.query),(m=t.abi,m.filter((function(e){return("function"===e.type||"event"===e.type)&&e.name.length>0}))).forEach((function(e){"function"===e.type?t[e.name]=r(e):"event"===e.type&&(t[e.name]=function(e){return function(){var r=[].slice.call(arguments),s=c(e.inputs,"type",!1),n=["0x"+l(e.name+"("+s.join(",")+")")],a=Object.assign({},r[0])||{},i=Object.assign({},r[0]||{},{to:t.address,topics:n}),u=Object.assign({},a,{decoder:function(t){return o.decodeEvent(e,t,n)},defaultFilterObject:i});return new t.filters.Filter(u)}}(e))}));var m}}}},{package:"@metamask/ethjs-contract",file:"node_modules/@metamask/ethjs-contract/lib/contract.js"}],[1757,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=["from","to","data","value","gasPrice","gas"];t.exports=function(e){if(!Array.isArray(e)||0===e.length)return!1;var t=e[e.length-1];if(!t)return!1;if("object"!=typeof t)return!1;if(0===Object.keys(t).length)return!0;var r=Object.keys(t);if(s.some((function(e){return r.includes(e)})))return!0;return!1}}}},{package:"@metamask/ethjs-contract",file:"node_modules/@metamask/ethjs-contract/lib/has-tx-object.js"}],[1758,{"./contract":1756,"./has-tx-object":1757,"@metamask/ethjs-filter":1759,"@metamask/ethjs-util":1765,"ethjs-abi":3865,"js-sha3":4228},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=e("ethjs-abi"),n=(e("js-sha3").keccak_256,e("@metamask/ethjs-filter"),e("@metamask/ethjs-util").getKeys),a=e("./contract"),o=e("./has-tx-object");t.exports=function(e){return function(t,r,i){if(!Array.isArray(t))throw new Error("[ethjs-contract] Contract ABI must be type Array, got type "+typeof t);if(void 0!==r&&"string"!=typeof r)throw new Error("[ethjs-contract] Contract bytecode must be type String, got type "+typeof r);if(void 0!==i&&"object"!=typeof i)throw new Error("[ethjs-contract] Contract default tx object must be type Object, got type "+typeof t);var c={at:function(s){return new a({address:s,query:e,contractBytecode:r,contractDefaultTxObject:i,contractABI:t})},new:function(){var a={},c=null,l=[].slice.call(arguments);"function"==typeof l[l.length-1]&&(c=l.pop()),o(l)&&(a=l.pop());var u=function(e){return e.filter((function(e){return"constructor"===e.type}))[0]}(t),d=Object.assign({},i,a);if(r&&(d.data=r),u){var m=s.encodeParams(n(u.inputs,"type"),l).substring(2);d.data=""+d.data+m}return c?e.sendTransaction(d,c):e.sendTransaction(d)}};return c}}}}},{package:"@metamask/ethjs-contract",file:"node_modules/@metamask/ethjs-contract/lib/index.js"}],[1759,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function s(e,t){function r(e){var r=this;r.filterId=null,r.options=Object.assign({delay:300,decoder:function(e){return e},defaultFilterObject:{}},e||{}),r.watchers={},r.interval=setInterval((function(){null!==r.filterId&&Object.keys(r.watchers).length>0&&t.getFilterChanges(r.filterId,(function(e,t){var s=[],n=null;if(!e)try{t.forEach((function(e,n){s[n]=t[n],"object"==typeof t[n]&&(s[n].data=r.options.decoder(s[n].data))}))}catch(e){n=new Error("[ethjs-filter] while decoding filter change event data from RPC '"+JSON.stringify(s)+"': "+e)}Object.keys(r.watchers).forEach((function(a){var o=r.watchers[a];!0!==o.stop?n?o.callback(n,null):e?o.callback(e,null):Array.isArray(s)&&t.length>0&&o.callback(e,s):delete r.watchers[a]}))}))}),r.options.delay)}return r.prototype.at=function(e){this.filterId=e},r.prototype.watch=function(e){var t=e||function(){},r=this,s=Math.random().toString(36).substring(7);return r.watchers[s]={callback:t,stop:!1,stopWatching:function(){r.watchers[s].stop=!0}},r.watchers[s]},r.prototype.uninstall=function(e){var r=this,s=e||null;r.watchers=Object.assign({}),clearInterval(r.interval);var n=new Promise((function(e,s){t.uninstallFilter(r.filterId,(function(t,r){t?s(t):e(r)}))}));return s&&n.then((function(e){return s(null,e)})).catch((function(e){return s(e,null)})),s?null:n},r.prototype.new=function(){var r=null,s=this,n=[],a=[].slice.call(arguments);"function"==typeof a[a.length-1]&&(r=a.pop()),"Filter"===e&&n.push(Object.assign(s.options.defaultFilterObject,a[a.length-1]||{}));var o=new Promise((function(r,a){n.push((function(e,t){e?a(e):(s.filterId=t,r(t))})),t["new"+e].apply(t,n)}));return r&&o.then((function(e){return r(null,e)})).catch((function(e){return r(e,null)})),r?null:o},r}t.exports=function e(t){var r=this;if(!(r instanceof e))throw new Error("the EthFilter object must be instantiated with `new` flag.. (e.g. `const filters = new EthFilter(query);`)");if("object"!=typeof t)throw new Error("the EthFilter object must be instantiated with an EthQuery instance (e.g. `const filters = new EthFilter(new EthQuery(provider));`). See github.com/ethjs/ethjs-query for more details..");r.Filter=s("Filter",t),r.BlockFilter=s("BlockFilter",t),r.PendingTransactionFilter=s("PendingTransactionFilter",t)}}}},{package:"@metamask/ethjs>@metamask/ethjs-filter",file:"node_modules/@metamask/ethjs-filter/lib/index.js"}],[1760,{"@metamask/ethjs-util":1765,"@metamask/number-to-bn":2118,"ethjs-schema":3867,"strip-hex-prefix":5112},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=e("@metamask/number-to-bn"),n=e("ethjs-schema"),a=e("@metamask/ethjs-util"),o=a.arrayContainsArray,i=a.getBinarySize,c=a.padToEven,l=e("strip-hex-prefix");function u(e,t,r){if(-1===["string","number","object"].indexOf(typeof e)||null===e)return e;var n=s(e),a=r&&n.toString(16).length%2?"0":"";if(s(e).isNeg())throw new Error("[ethjs-format] while formatting quantity '"+n.toString(10)+"', invalid negative number. Number must be positive or zero.");return t?"0x"+a+n.toString(16):n}function d(e,t){var r=e;return-1===n.tags.indexOf(e)&&(r=u(e,t)),r}function m(e,t){var r=e,s=0;if("string"==typeof e&&(r="0x"+c(l(e)),s=i(r)),"0x00"===r&&(r="0x0"),"number"==typeof t&&null!==e&&"0x"!==r&&"0x0"!==r&&(!/^[0-9A-Fa-f]+$/.test(l(r))||s!==2+2*t))throw new Error("[ethjs-format] hex string '"+r+"' must be an alphanumeric "+(2+2*t)+" utf8 byte hex (chars: a-fA-F) string, is "+s+" bytes");return r}function f(e,t,r){var s=Object.assign({},t),a=null;if("string"==typeof e&&(a="Boolean|EthSyncing"===e?Object.assign({},n.objects.EthSyncing):"DATA|Transaction"===e?Object.assign({},n.objects.Transaction):Object.assign({},n.objects[e])),!o(Object.keys(t),a.__required))throw new Error("[ethjs-format] object "+JSON.stringify(t)+" must contain properties: "+a.__required.join(", "));return Object.keys(a).forEach((function(e){"__required"!==e&&void 0!==t[e]&&(s[e]=p(a[e],t[e],r))})),s}function h(e,t,r,s){var n=t.slice(),a=e;if("Array|DATA"===e&&(a=["D"]),"FilterChange"===e&&"string"==typeof t[0]&&(a=["D32"]),!0===r&&"number"==typeof s&&t.length1&&(s=t),n[t]=p(a[s],e,r)})),n}function p(e,t,r,s){var n=t;return"Q"===e?n=u(t,r):"QP"===e?n=u(t,r,!0):"Q|T"===e?n=d(t,r):"D"===e?n=m(t):"D20"===e?n=m(t,20):"D32"===e?n=m(t,32):"object"==typeof t&&null!==t&&!1===Array.isArray(t)?n=f(e,t,r):Array.isArray(t)&&(n=h(e,t,r,s)),n}t.exports={schema:n,formatQuantity:u,formatQuantityOrTag:d,formatObject:f,formatArray:h,format:p,formatInputs:function(e,t){return p(n.methods[e][0],t,!0,n.methods[e][2])},formatOutputs:function(e,t){return p(n.methods[e][1],t,!1)}}}}},{package:"@metamask/ethjs-query>@metamask/ethjs-format",file:"node_modules/@metamask/ethjs-format/lib/index.js"}],[1762,{"@metamask/ethjs-format":1760,"@metamask/ethjs-rpc":1763,"promise-to-callback":4524},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=e("@metamask/ethjs-format"),n=e("@metamask/ethjs-rpc"),a=e("promise-to-callback");function o(e,t){var r=this,s=t||{};if(!(this instanceof o))throw new Error('[ethjs-query] the Eth object requires the "new" flag in order to function normally (i.e. `const eth = new Eth(provider);`).');if("object"!=typeof e)throw new Error("[ethjs-query] the Eth object requires that the first input 'provider' must be an object, got '"+typeof e+"' (i.e. 'const eth = new Eth(provider);')");r.options=Object.assign({debug:s.debug||!1,logger:s.logger||console,jsonSpace:s.jsonSpace||0}),r.rpc=new n(e),r.setProvider=r.rpc.setProvider}function i(e,t){return function(){var r=null,n=null,o=this,i=[].slice.call(arguments),c=e.replace("eth_","");i.length>0&&"function"==typeof i[i.length-1]&&(r=i.pop());var l=function(){var r=this;return new Promise((function(a,l){if(i.lengtht[0].length)l(new Error("[ethjs-query] method '"+c+"' requires at most "+t[0].length+" params, "+i.length+" provided '"+JSON.stringify(i,null,o.options.jsonSpace)+"'. For more information visit: https://github.com/ethereum/wiki/wiki/JSON-RPC#"+e.toLowerCase()));else{t[3]&&i.length@metamask/ethjs-rpc",file:"node_modules/@metamask/ethjs-rpc/lib/index.js"}],[1764,{"@metamask/number-to-bn":2118,"bn.js":3513},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=e("bn.js"),n=e("@metamask/number-to-bn"),a=new s(0),o=new s(-1),i={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function c(e){var t=e?e.toLowerCase():"ether",r=i[t];if("string"!=typeof r)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(i,null,2));return new s(r,10)}function l(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"==typeof e&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+typeof e+".")}t.exports={unitMap:i,numberToString:l,getValueOfUnit:c,fromWei:function(e,t,r){var s=n(e),l=s.lt(a),u=c(t),d=i[t].length-1||1,m=r||{};l&&(s=s.mul(o));for(var f=s.mod(u).toString(10);f.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var m=d[0],f=d[1];if(m||(m="0"),f||(f="0"),f.length>a)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;f.length@metamask/ethjs-unit",file:"node_modules/@metamask/ethjs-unit/lib/index.js"}]],[],{}); \ No newline at end of file +LavaPack.loadBundle([[113,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.filterEvents=function({getMetaMetricsEnabled:e,log:t}){return{name:s,processEvent:async r=>await e()?r:(t("Event dropped as metrics disabled"),null)}};const s="FilterEvents"}}},{package:"$root$",file:"app/scripts/lib/sentry-filter-events.ts"}],[114,{"../../../shared/modules/object.utils":5312,"../constants/sentry-state":7,"../platforms/extension":291,"./local-store":82,"./network-store":88},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=e("../../../shared/modules/object.utils"),n=i(e("../platforms/extension")),a=e("../constants/sentry-state"),o=i(e("./local-store"));i(e("./network-store"));function i(e){return e&&e.__esModule?e:{default:e}}const c=new n.default,l=new o.default;globalThis.stateHooks.getPersistedState=async function(){return await l.get()};const u={data:a.SENTRY_BACKGROUND_STATE,meta:{version:!0}};globalThis.stateHooks.getSentryState=function(){const e={browser:window.navigator.userAgent,version:c.getVersion()};if(globalThis.stateHooks.getSentryAppState)return l.cleanUpMostRecentRetrievedState(),{...e,state:globalThis.stateHooks.getSentryAppState()};if(l.mostRecentRetrievedState||globalThis.stateHooks.getMostRecentPersistedState){const t=l.mostRecentRetrievedState||globalThis.stateHooks.getMostRecentPersistedState();if(t)return{...e,persistedState:(0,s.maskObject)(t,u)}}return e}}}},{package:"$root$",file:"app/scripts/lib/setup-initial-state-hooks.js"}],[115,{"../../../shared/modules/mv3.utils":5310,"./extractEthjsErrorMessage":78,"./manifestFlags":83,"./sentry-filter-events":113,"@metamask/utils":2761,"@sentry/browser":2871,"@sentry/utils":2991,"webextension-polyfill":5225},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERROR_URL_ALLOWLIST=void 0,r.beforeBreadcrumb=D,r.default=function(){if(!E)throw new Error("Missing release");if(!I())return p("Skipped initialization"),undefined;return p("Initializing"),function(){if(!y)return;for(const e of["log","error"])a.logger[e]=(...t)=>{const r=t[0].replace(`Sentry Logger [${e}]: `,"");g(r,...t.slice(1))};p("Integrated logging")}(),function(){const e=function(){const e=function(){if("main"===b)return k;return`${k}-${b}`}(),t=I();return{beforeBreadcrumb:D(),beforeSend:e=>O(e),debug:y,dist:i.isManifestV3?"mv3":"mv2",dsn:t,environment:e,integrations:[n.dedupeIntegration(),n.extraErrorDataIntegration(),n.browserTracingIntegration({shouldCreateSpanForRequest:e=>!e.match(/^https?:\/\/([\w\d.@-]+\.)?sentry\.io(\/|$)/u)}),(0,u.filterEvents)({getMetaMetricsEnabled:B,log:p})],release:E,sendClientReports:!1,tracesSampleRate:x(t),transport:L}}(),{dsn:t,environment:r,release:s,tracesSampleRate:a}=e;globalThis.nw={},globalThis.history??(globalThis.history={}),p("Updating client",{environment:r,dsn:t,release:s,tracesSampleRate:a}),n.registerSpanErrorInstrumentation(),n.init(e),function(){const{circleci:e}=(0,l.getManifestFlags)();null!=e&&e.enabled&&(n.setTag("circleci.enabled",e.enabled),n.setTag("circleci.branch",e.branch),n.setTag("circleci.buildNum",e.buildNum),n.setTag("circleci.job",e.job),n.setTag("circleci.nodeIndex",e.nodeIndex),n.setTag("circleci.prNumber",e.prNumber))}(),function(){if(!y)return;const e=n.getClient();null==e||e.on("beforeEnvelope",(e=>{(function(e){var t,r;const s=null==e||null===(t=e[1])||void 0===t||null===(t=t[0])||void 0===t||null===(t=t[0])||void 0===t?void 0:t.type,n=(null==e||null===(r=e[1])||void 0===r||null===(r=r[0])||void 0===r?void 0:r[1])??{};return"session"===s&&"exited"===n.status})(e)&&p("Completed session",e)})),null==e||e.on("afterSendEvent",(e=>{const t=function(e){if("transaction"===e.type)return"Trace";if("error"===e.level)return"Error";return"Event"}(e);p(t,e)})),p("Added debug listeners")}()}(),{...n,getMetaMetricsEnabled:B}},r.log=void 0,r.removeUrlsFromBreadCrumb=N,r.rewriteReport=O;var s=e("@metamask/utils"),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(s,a,o):s[a]=e[a]}return s.default=e,r&&r.set(e,s),s}(e("@sentry/browser")),a=e("@sentry/utils"),o=d(e("webextension-polyfill")),i=e("../../../shared/modules/mv3.utils"),c=d(e("./extractEthjsErrorMessage")),l=e("./manifestFlags"),u=e("./sentry-filter-events");function d(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}const f=(0,s.createProjectLogger)("sentry");let h="unknown";const p=r.log=(0,s.createModuleLogger)(f,globalThis.document?"ui":"background"),g=(0,s.createModuleLogger)(p,"internal"),b="main",y=!1,k="other",E="12.9.3",C="https://24a3ef3399ee2049b00f92c1399c9be1@o4505435504377856.ingest.us.sentry.io/4507177964208128",A="https://24a3ef3399ee2049b00f92c1399c9be1@o4505435504377856.ingest.us.sentry.io/4507177964208128",S="",w="https://fake@sentry.io/0000000",v=r.ERROR_URL_ALLOWLIST={CRYPTOCOMPARE:"cryptocompare.com",COINGECKO:"coingecko.com",ETHERSCAN:"etherscan.io",CODEFI:"codefi.network",SEGMENT:"segment.io"};function x(e){var t;if(e===w)return 1;const r=(0,l.getManifestFlags)();return(null===(t=r.sentry)||void 0===t?void 0:t.tracesSampleRate)!==undefined?r.sentry.tracesSampleRate:r.circleci?"develop"===r.circleci.branch?.015:0:y?1:.01}function T(e){return e.persistedState?_(e.persistedState):!!e.state&&(e.state.metamask?Boolean(e.state.metamask.participateInMetaMetrics):Boolean(null===(t=e.state.MetaMetricsController)||void 0===t?void 0:t.participateInMetaMetrics));var t}function _(e){var t;return Boolean(null==e||null===(t=e.data)||void 0===t||null===(t=t.MetaMetricsController)||void 0===t?void 0:t.participateInMetaMetrics)}function j(e){return e.persistedState?R(e.persistedState):!!e.state&&(e.state.metamask?Boolean(e.state.metamask.completedOnboarding):Boolean(null===(t=e.state.OnboardingController)||void 0===t?void 0:t.completedOnboarding));var t}function R(e){var t;return Boolean(null===(t=e.data)||void 0===t||null===(t=t.OnboardingController)||void 0===t?void 0:t.completedOnboarding)}function I(){if("production"!==k)return A;if("mmi"===b)return S;if(!C)throw new Error("Missing SENTRY_DSN environment variable in production environment");return C}async function B(){const e=(0,l.getManifestFlags)();if("mmi"===b||e.circleci&&e.sentry.forceEnable)return!0;const t=J();if(t.state||t.persistedState)return T(t)&&j(t);try{const e=await globalThis.stateHooks.getPersistedState();return _(e)&&R(e)}catch(e){return p("Error retrieving persisted state",e),!1}}function P(e){return e.match(/^(chrome-extension|moz-extension):\/\//u)?e:""}function D(){return e=>{if(!J)return null;const t=J();if(!T(t)||!j(t)||"ui.input"===(null==e?void 0:e.category))return null;return N(e)}}function N(e){var t,r,s;return null!=e&&null!==(t=e.data)&&void 0!==t&&t.url&&(e.data.url=P(e.data.url)),null!=e&&null!==(r=e.data)&&void 0!==r&&r.to&&(e.data.to=P(e.data.to)),null!=e&&null!==(s=e.data)&&void 0!==s&&s.from&&(e.data.from=P(e.data.from)),e}function O(e){try{var t;!function(e){F(e,(e=>{let t=(0,c.default)(e);return 0===t.indexOf("Transaction Failed: known transaction")&&(t="Transaction Failed: known transaction"),t}))}(e),function(e){F(e,(e=>{let t=e;const r=/(([-.+a-zA-Z]+:\/\/)|(www\.))\S+[@:.]\S+/gu;return(t.match(r)||[]).forEach((e=>{try{const r=new URL(e),{hostname:s}=r;Object.values(v).some((e=>s===e||s.endsWith(`.${e}`)))||(t=t.replace(e,"**"))}catch(r){t=t.replace(e,"**")}})),t}))}(e),function(e){F(e,(e=>e.replace(/0x[A-Fa-f0-9]{40}/u,"0x**")))}(e),function(e){var t;null!==(t=e.request)&&void 0!==t&&t.url&&(e.request.url=M(e.request.url));e.exception&&e.exception.values&&e.exception.values.forEach((e=>{e.stacktrace&&e.stacktrace.frames.forEach((e=>{e.filename=M(e.filename)}))}))}(e);const r=J();e.extra||(e.extra={}),e.tags||(e.tags={}),Object.assign(e.extra,{appState:r,installType:h,extensionId:null===(t=o.default.runtime)||void 0===t?void 0:t.id}),e.tags.installType=h}catch(e){p("Error rewriting report",e)}return e}function F(e,t){"string"==typeof e.message&&(e.message=t(e.message)),e.exception&&e.exception.values&&e.exception.values.forEach((e=>{"string"==typeof e.value&&(e.value=t(e.value))}))}function M(e){var t;if(null===(t=globalThis.location)||void 0===t||!t.origin)return e;const r=null==e?void 0:e.split(globalThis.location.origin)[1];if(!r)return e;return`/metamask${r}`}function J(){var e,t;return(null===(e=globalThis.stateHooks)||void 0===e||null===(t=e.getSentryState)||void 0===t?void 0:t.call(e))||{}}function L(e){return n.makeFetchTransport(e,(async(...e)=>{if(!await B())throw new Error("Network request skipped as metrics disabled");return await fetch(...e)}))}}}},{package:"$root$",file:"app/scripts/lib/setupSentry.js"}],[124,{"../../../shared/constants/app":5248,"@metamask/object-multiplex":2121,"readable-stream":4791},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isStreamWritable=function(e){var t;return Boolean(e.writable&&!e.destroyed&&!(null!==(t=e._writableState)&&void 0!==t&&t.ended))},r.setupMultiplex=function(e){const t=new n.default;return t.ignoreStream(o.EXTENSION_MESSAGES.CONNECTION_READY),(0,a.pipeline)(e,t,e,(e=>{var t;!e||null!==(t=e.message)&&void 0!==t&&t.match("Premature close")||console.error(e)})),t};var s,n=(s=e("@metamask/object-multiplex"))&&s.__esModule?s:{default:s},a=e("readable-stream"),o=e("../../../shared/constants/app")}}},{package:"$root$",file:"app/scripts/lib/stream-utils.js"}],[1305,{"./errors":1306,"./packer":1309,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.decodeSingle=r.decode=r.encodePacked=r.encodeSingle=r.encode=void 0;const s=e("@metamask/utils"),n=e("./errors"),a=e("./packer");r.encode=(e,t,r,s)=>{try{return(0,a.pack)({types:e,values:t,packed:r,tight:s})}catch(e){if(e instanceof n.ParserError)throw new n.ParserError(`Unable to encode value: ${e.message}`,e);throw new n.ParserError(`An unexpected error occurred: ${(0,n.getErrorMessage)(e)}`,e)}};r.encodeSingle=(e,t)=>(0,r.encode)([e],[t]);r.encodePacked=(e,t,s)=>(0,r.encode)(e,t,!0,s);r.decode=(e,t)=>{const r=(0,s.createBytes)(t);try{return(0,a.unpack)(e,r)}catch(e){if(e instanceof n.ParserError)throw new n.ParserError(`Unable to decode value: ${e.message}`,e);throw new n.ParserError(`An unexpected error occurred: ${(0,n.getErrorMessage)(e)}`,e)}};r.decodeSingle=(e,t)=>{const a=(0,r.decode)([e],t);return(0,s.assert)(1===a.length,new n.ParserError("Decoded value array has unexpected length.")),a[0]}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/abi.js"}],[1306,{"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ParserError=r.getErrorStack=r.getErrorMessage=void 0;const s=e("@metamask/utils");r.getErrorMessage=e=>"string"==typeof e?e:e instanceof Error||(0,s.isObject)(e)&&(0,s.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:"Unknown error.";r.getErrorStack=e=>e instanceof Error?e.stack:undefined;class n extends Error{constructor(e,t){super(e),this.name="ParserError";const s=(0,r.getErrorStack)(t);s&&(this.stack=s)}}r.ParserError=n}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/errors.js"}],[1307,{"./abi":1305,"./errors":1306,"./types":1322},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./abi"),r),n(e("./errors"),r),n(e("./types"),r)}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/index.js"}],[1308,{"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.iterate=void 0;const s=e("@metamask/utils");r.iterate=function*(e,t=32){for(let r=0;r{(0,s.assert)(e>=0,"Cannot skip a negative number of bytes."),(0,s.assert)(e%t==0,"Length must be a multiple of the size."),r+=e},a=e.subarray(r);yield{skip:n,value:a}}return{skip:()=>undefined,value:new Uint8Array}}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/iterator.js"}],[1309,{"./errors":1306,"./iterator":1308,"./parsers":1316,"./utils":1324,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.unpack=r.pack=r.isDynamicParser=r.getParser=void 0;const s=e("@metamask/utils"),n=e("./errors"),a=e("./iterator"),o=e("./parsers"),i=e("./utils");r.getParser=e=>{const t={address:o.address,array:o.array,bool:o.bool,bytes:o.bytes,fixedBytes:o.fixedBytes,function:o.fn,number:o.number,string:o.string,tuple:o.tuple},r=t[e];if(r)return r;const s=Object.values(t).find((t=>t.isType(e)));if(s)return s;throw new n.ParserError(`The type "${e}" is not supported.`)};r.isDynamicParser=(e,t)=>{const{isDynamic:r}=e;return"function"==typeof r?r(t):r};r.pack=({types:e,values:t,packed:a=!1,tight:o=!1,arrayPacked:c=!1,byteArray:l=new Uint8Array})=>{(0,s.assert)(e.length===t.length,new n.ParserError(`The number of types (${e.length}) does not match the number of values (${t.length}).`));const{staticBuffer:u,dynamicBuffer:d,pointers:m}=e.reduce((({staticBuffer:e,dynamicBuffer:n,pointers:i},l,u)=>{const d=(0,r.getParser)(l),m=t[u];if(a||c||!(0,r.isDynamicParser)(d,l))return{staticBuffer:d.encode({buffer:e,value:m,type:l,packed:a,tight:o}),dynamicBuffer:n,pointers:i};return{staticBuffer:(0,s.concatBytes)([e,new Uint8Array(32)]),dynamicBuffer:d.encode({buffer:n,value:m,type:l,packed:a,tight:o}),pointers:[...i,{position:e.length,pointer:n.length}]}}),{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,s.assert)(!a&&!c||0===d.length,new n.ParserError("Invalid pack state."));const f=u.length,h=m.reduce(((e,{pointer:t,position:r})=>{const n=(0,i.padStart)((0,s.numberToBytes)(f+t));return(0,i.set)(e,n,r)}),u);return(0,s.concatBytes)([l,h,d])};r.unpack=(e,t)=>{const o=(0,a.iterate)(t);return e.map((e=>{const{value:{value:a,skip:i},done:c}=o.next();(0,s.assert)(!c,new n.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${e}".`));const l=(0,r.getParser)(e);if((0,r.isDynamicParser)(l,e)){const r=(0,s.bytesToNumber)(a.subarray(0,32)),n=t.subarray(r);return l.decode({type:e,value:n,skip:i})}return l.decode({type:e,value:a,skip:i})}))}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/packer.js"}],[1310,{"../errors":1306,"../utils":1324,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.address=r.getAddress=void 0;const s=e("@metamask/utils"),n=e("../errors"),a=e("../utils");r.getAddress=e=>{const t=(0,s.createBytes)(e);return(0,s.assert)(t.length<=20,new n.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${t.length} bytes.`)),(0,a.padStart)(t,20)},r.address={isDynamic:!1,isType:e=>"address"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:n}){const o=(0,r.getAddress)(t);if(n)return(0,s.concatBytes)([e,o]);const i=(0,a.padStart)(o);return(0,s.concatBytes)([e,i])},decode:({value:e})=>(0,s.add0x)((0,s.bytesToHex)(e.slice(12,32)))}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/address.js"}],[1311,{"../errors":1306,"../packer":1309,"../utils":1324,"./fixed-bytes":1314,"./tuple":1320,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.array=r.getTupleType=r.getArrayType=r.isArrayType=void 0;const s=e("@metamask/utils"),n=e("../errors"),a=e("../packer"),o=e("../utils"),i=e("./fixed-bytes"),c=e("./tuple"),l=/^(?.*)\[(?\d*?)\]$/u;r.isArrayType=e=>l.test(e);r.getArrayType=e=>{const t=e.match(l);return(0,s.assert)(t?.groups?.type,new n.ParserError(`Invalid array type. Expected an array type, but received "${e}".`)),[t.groups.type,t.groups.length?parseInt(t.groups.length,10):undefined]};r.getTupleType=(e,t)=>`(${new Array(t).fill(e).join(",")})`,r.array={isDynamic(e){const[t,s]=(0,r.getArrayType)(e);return s===undefined||(0,a.isDynamicParser)((0,a.getParser)(t),t)},isType:e=>(0,r.isArrayType)(e),getByteLength(e){(0,s.assert)((0,r.isArrayType)(e),new n.ParserError(`Expected an array type, but received "${e}".`));const[t,o]=(0,r.getArrayType)(e);return(0,a.isDynamicParser)(this,e)||o===undefined?32:c.tuple.getByteLength((0,r.getTupleType)(t,o))},encode({type:e,buffer:t,value:l,packed:u,tight:d}){const[m,f]=(0,r.getArrayType)(e);if((0,s.assert)(!u||!(0,r.isArrayType)(m),new n.ParserError("Cannot pack nested arrays.")),u&&(0,a.isDynamicParser)((0,a.getParser)(m),m))return(0,a.pack)({types:new Array(l.length).fill(m),values:l,byteArray:t,packed:u,arrayPacked:!0,tight:d});if(f)return(0,s.assert)(f===l.length,new n.ParserError(`Array length does not match type length. Expected a length of ${f}, but received ${l.length}.`)),c.tuple.encode({type:(0,r.getTupleType)(m,f),buffer:t,value:l,packed:i.fixedBytes.isType(m)&&d,tight:d});if(u)return(0,a.pack)({types:new Array(l.length).fill(m),values:l,byteArray:t,packed:i.fixedBytes.isType(m)&&d,arrayPacked:!0,tight:d});const h=(0,o.padStart)((0,s.numberToBytes)(l.length));return(0,a.pack)({types:new Array(l.length).fill(m),values:l,byteArray:(0,s.concatBytes)([t,h]),packed:u,tight:d})},decode({type:e,value:t,...o}){const[i,l]=(0,r.getArrayType)(e);if(l){const e=c.tuple.decode({type:(0,r.getTupleType)(i,l),value:t,...o});return(0,s.assert)(e.length===l,new n.ParserError(`Array length does not match type length. Expected a length of ${l}, but received ${e.length}.`)),e}const u=(0,s.bytesToNumber)(t.subarray(0,32));return(0,a.unpack)(new Array(u).fill(i),t.subarray(32))}}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/array.js"}],[1312,{"../errors":1306,"./number":1317,"@metamask/superstruct":2670,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.bool=r.getBooleanValue=void 0;const s=e("@metamask/superstruct"),n=e("@metamask/utils"),a=e("../errors"),o=e("./number"),i=(0,s.coerce)((0,s.boolean)(),(0,s.union)([(0,s.literal)("true"),(0,s.literal)("false")]),(e=>"true"===e));r.getBooleanValue=e=>{try{return(0,s.create)(e,i)?BigInt(1):BigInt(0)}catch{throw new a.ParserError(`Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${e}".`)}},r.bool={isDynamic:!1,isType:e=>"bool"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:s,tight:a}){const i=(0,r.getBooleanValue)(t);return s?(0,n.concatBytes)([e,(0,n.bigIntToBytes)(i)]):o.number.encode({type:"uint256",buffer:e,value:i,packed:s,tight:a})},decode:e=>o.number.decode({...e,type:"uint256"})===BigInt(1)}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/bool.js"}],[1313,{"../utils":1324,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.bytes=void 0;const s=e("@metamask/utils"),n=e("../utils");r.bytes={isDynamic:!0,isType:e=>"bytes"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:r}){const a=(0,s.createBytes)(t);if(r)return(0,s.concatBytes)([e,a]);const o=32*Math.ceil(a.byteLength/32);return(0,s.concatBytes)([e,(0,n.padStart)((0,s.numberToBytes)(a.byteLength)),(0,n.padEnd)(a,o)])},decode({value:e}){const t=e.subarray(0,32),r=(0,s.bytesToNumber)(t);return e.slice(32,32+r)}}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/bytes.js"}],[1314,{"../errors":1306,"../utils":1324,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fixedBytes=r.getByteLength=void 0;const s=e("@metamask/utils"),n=e("../errors"),a=e("../utils"),o=/^bytes([0-9]{1,2})$/u;r.getByteLength=e=>{const t=e.match(o)?.[1];(0,s.assert)(t,`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`);const r=Number(t);return(0,s.assert)(r>0&&r<=32,new n.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`)),r},r.fixedBytes={isDynamic:!1,isType:e=>o.test(e),getByteLength:()=>32,encode({type:e,buffer:t,value:o,packed:i}){const c=(0,r.getByteLength)(e),l=(0,s.createBytes)(o);return(0,s.assert)(l.length<=c,new n.ParserError(`Expected a value of length ${c}, but received a value of length ${l.length}.`)),i?(0,s.concatBytes)([t,(0,a.padEnd)(l,c)]):(0,s.concatBytes)([t,(0,a.padEnd)(l)])},decode({type:e,value:t}){const s=(0,r.getByteLength)(e);return t.slice(0,s)}}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/fixed-bytes.js"}],[1315,{"../errors":1306,"./fixed-bytes":1314,"@metamask/superstruct":2670,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fn=r.getFunction=void 0;const s=e("@metamask/superstruct"),n=e("@metamask/utils"),a=e("../errors"),o=e("./fixed-bytes"),i=(0,s.coerce)((0,s.object)({address:n.StrictHexStruct,selector:n.StrictHexStruct}),(0,s.union)([n.StrictHexStruct,(0,s.instance)(Uint8Array)]),(e=>{const t=(0,n.createBytes)(e);return(0,n.assert)(24===t.length,new a.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${t.length} bytes.`)),{address:(0,n.bytesToHex)(t.subarray(0,20)),selector:(0,n.bytesToHex)(t.subarray(20,24))}}));r.getFunction=e=>{const t=(0,s.create)(e,i);return(0,n.concatBytes)([(0,n.hexToBytes)(t.address),(0,n.hexToBytes)(t.selector)])},r.fn={isDynamic:!1,isType:e=>"function"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:s,tight:n}){const a=(0,r.getFunction)(t);return o.fixedBytes.encode({type:"bytes24",buffer:e,value:a,packed:s,tight:n})},decode:({value:e})=>({address:(0,n.bytesToHex)(e.slice(0,20)),selector:(0,n.bytesToHex)(e.slice(20,24))})}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/function.js"}],[1316,{"./address":1310,"./array":1311,"./bool":1312,"./bytes":1313,"./fixed-bytes":1314,"./function":1315,"./number":1317,"./parser":1318,"./string":1319,"./tuple":1320},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./address"),r),n(e("./array"),r),n(e("./bool"),r),n(e("./bytes"),r),n(e("./fixed-bytes"),r),n(e("./function"),r),n(e("./number"),r),n(e("./parser"),r),n(e("./string"),r),n(e("./tuple"),r)}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/index.js"}],[1317,{"../errors":1306,"../utils":1324,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.number=r.getBigInt=r.assertNumberLength=r.getLength=r.isSigned=void 0;const s=e("@metamask/utils"),n=e("../errors"),a=e("../utils"),o=/^u?int(?[0-9]*)?$/u;r.isSigned=e=>!e.startsWith("u");r.getLength=e=>{if("int"===e||"uint"===e)return 256;const t=e.match(o);(0,s.assert)(t?.groups?.length,new n.ParserError(`Invalid number type. Expected a number type, but received "${e}".`));const r=parseInt(t.groups.length,10);return(0,s.assert)(r>=8&&r<=256,new n.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${e}".`)),(0,s.assert)(r%8==0,new n.ParserError(`Invalid number length. Expected a multiple of 8, but received "${e}".`)),r};r.assertNumberLength=(e,t)=>{const a=(0,r.getLength)(t),o=BigInt(2)**BigInt(a-((0,r.isSigned)(t)?1:0))-BigInt(1);(0,r.isSigned)(t)?(0,s.assert)(e>=-(o+BigInt(1))&&e<=o,new n.ParserError(`Number "${e}" is out of range for type "${t}".`)):(0,s.assert)(e<=o,new n.ParserError(`Number "${e}" is out of range for type "${t}".`))};r.getBigInt=e=>{try{return(0,s.createBigInt)(e)}catch{throw new n.ParserError(`Invalid number. Expected a valid number value, but received "${e}".`)}},r.number={isDynamic:!1,isType:e=>o.test(e),getByteLength:()=>32,encode({type:e,buffer:t,value:n,packed:o}){const i=(0,r.getBigInt)(n);if((0,r.assertNumberLength)(i,e),(0,r.isSigned)(e)){if(o){const n=(0,r.getLength)(e)/8;return(0,s.concatBytes)([t,(0,s.signedBigIntToBytes)(i,n)])}return(0,s.concatBytes)([t,(0,a.padStart)((0,s.signedBigIntToBytes)(i,32))])}if(o){const n=(0,r.getLength)(e)/8;return(0,s.concatBytes)([t,(0,a.padStart)((0,s.bigIntToBytes)(i),n)])}return(0,s.concatBytes)([t,(0,a.padStart)((0,s.bigIntToBytes)(i))])},decode({type:e,value:t}){const n=t.subarray(0,32);if((0,r.isSigned)(e)){const t=(0,s.bytesToSignedBigInt)(n);return(0,r.assertNumberLength)(t,e),t}const a=(0,s.bytesToBigInt)(n);return(0,r.assertNumberLength)(a,e),a}}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/number.js"}],[1318,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/parser.js"}],[1319,{"./bytes":1313,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.string=void 0;const s=e("@metamask/utils"),n=e("./bytes");r.string={isDynamic:!0,isType:e=>"string"===e,getByteLength:()=>32,encode:({buffer:e,value:t,packed:r,tight:a})=>n.bytes.encode({type:"bytes",buffer:e,value:(0,s.stringToBytes)(t),packed:r,tight:a}),decode:e=>(0,s.bytesToString)(n.bytes.decode(e))}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/string.js"}],[1320,{"../errors":1306,"../packer":1309,"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.tuple=r.getTupleElements=void 0;const s=e("@metamask/utils"),n=e("../errors"),a=e("../packer"),o=/^\((.+)\)$/u;r.getTupleElements=e=>{(0,s.assert)(e.startsWith("(")&&e.endsWith(")"),new n.ParserError(`Invalid tuple type. Expected tuple type, but received "${e}".`));const t=[];let r="",a=0;for(let s=1;s(0,r.getTupleElements)(e).some((e=>{const t=(0,a.getParser)(e);return(0,a.isDynamicParser)(t,e)})),isType:e=>(e=>o.test(e))(e),getByteLength(e){if((0,a.isDynamicParser)(this,e))return 32;return(0,r.getTupleElements)(e).reduce(((e,t)=>e+(0,a.getParser)(t).getByteLength(t)),0)},encode({type:e,buffer:t,value:s,packed:n,tight:o}){const i=(0,r.getTupleElements)(e);return(0,a.pack)({types:i,values:s,byteArray:t,packed:n,tight:o})},decode({type:e,value:t,skip:s}){const n=(0,r.getTupleElements)(e);return s(this.getByteLength(e)-32),(0,a.unpack)(n,t)}}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/parsers/tuple.js"}],[1321,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/types/abi.js"}],[1322,{"./abi":1321},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./abi"),r)}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/types/index.js"}],[1323,{"@metamask/utils":1335},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.padEnd=r.padStart=r.set=void 0;const s=e("@metamask/utils");r.set=(e,t,r)=>(0,s.concatBytes)([e.subarray(0,r),t,e.subarray(r+t.length)]);r.padStart=(e,t=32)=>{const r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,s.concatBytes)([r,e])};r.padEnd=(e,t=32)=>{const r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,s.concatBytes)([e,r])}}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/utils/buffer.js"}],[1324,{"./buffer":1323},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./buffer"),r)}}},{package:"@metamask/abi-utils",file:"node_modules/@metamask/abi-utils/dist/utils/index.js"}],[1325,{"./errors.cjs":1333,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/assert.cjs"}],[1326,{"./assert.cjs":1325,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/base64.cjs"}],[1327,{"./assert.cjs":1325,"./hex.cjs":1334,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/bytes.cjs"}],[1328,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAssetId=r.isCaipAssetType=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAssetIdStruct=r.CaipAssetTypeStruct=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ASSET_ID_REGEX=r.CAIP_ASSET_TYPE_REGEX=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),r.CaipAssetTypeStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_TYPE_REGEX),r.CaipAssetIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.isCaipAssetType=function(e){return(0,s.is)(e,r.CaipAssetTypeStruct)},r.isCaipAssetId=function(e){return(0,s.is)(e,r.CaipAssetIdStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1329,{"./base64.cjs":1326,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/checksum.cjs"}],[1330,{"./assert.cjs":1325,"./bytes.cjs":1327,"./hex.cjs":1334,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/coercers.cjs"}],[1331,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/collections.cjs"}],[1332,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1333,{"./misc.cjs":1339,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/errors.cjs"}],[1334,{"./assert.cjs":1325,"./bytes.cjs":1327,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/hex.cjs"}],[1335,{"./assert.cjs":1325,"./base64.cjs":1326,"./bytes.cjs":1327,"./caip-types.cjs":1328,"./checksum.cjs":1329,"./coercers.cjs":1330,"./collections.cjs":1331,"./encryption-types.cjs":1332,"./errors.cjs":1333,"./hex.cjs":1334,"./json.cjs":1336,"./keyring.cjs":1337,"./logging.cjs":1338,"./misc.cjs":1339,"./number.cjs":1340,"./opaque.cjs":1341,"./promise.cjs":1342,"./time.cjs":1343,"./transaction-types.cjs":1344,"./versions.cjs":1345},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/index.cjs"}],[1336,{"./assert.cjs":1325,"./misc.cjs":1339,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/json.cjs"}],[1337,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/keyring.cjs"}],[1338,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/logging.cjs"}],[1339,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/misc.cjs"}],[1340,{"./assert.cjs":1325,"./hex.cjs":1334},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/number.cjs"}],[1341,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/opaque.cjs"}],[1342,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/promise.cjs"}],[1343,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/time.cjs"}],[1344,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1345,{"./assert.cjs":1325,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/abi-utils>@metamask/utils",file:"node_modules/@metamask/abi-utils/node_modules/@metamask/utils/dist/versions.cjs"}],[135,{"../../../shared/constants/app":5248,"../../../shared/constants/network":5264,"../../../shared/lib/four-byte":5284,"../../../shared/modules/hexstring-utils":5307,"@metamask/transaction-controller":2698,"bn.js":3513,lodash:4380,url:5151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BnMultiplyByFraction=function(e,t,r){const s=new n.default(t),a=new n.default(r);return e.mul(s).div(a)},r.addHexPrefix=void 0,r.addUrlProtocolPrefix=function(e){let t=e.trim();t.length&&!s.default.parse(t).protocol&&(t=`https://${t}`);if(null!==h(t))return t;return null},r.checkAlarmExists=function(e,t){return e.some((e=>e.name===t))},r.deferredPromise=function(){let e,t;return{promise:new Promise(((r,s)=>{e=r,t=s})),resolve:e,reject:t}},r.formatTxMetaForRpcResult=function(e){const{r:t,s:r,v:s,hash:n,txReceipt:a,txParams:i}=e,{to:c,data:l,nonce:u,gas:d,from:m,value:f,gasPrice:h,accessList:p,maxFeePerGas:g,maxPriorityFeePerGas:b}=i,y={v:s,r:t,s:r,to:c,gas:d,from:m,hash:n,nonce:`${u}`,input:l||"0x",value:f||"0x0",accessList:p||null,blockHash:(null==a?void 0:a.blockHash)||null,blockNumber:(null==a?void 0:a.blockNumber)||null,transactionIndex:(null==a?void 0:a.transactionIndex)||null,type:g&&b?o.TransactionEnvelopeType.feeMarket:o.TransactionEnvelopeType.legacy};g&&b?(y.gasPrice=g,y.maxFeePerGas=g,y.maxPriorityFeePerGas=b):y.gasPrice=h;return y},r.formatValue=function(e,t){if(!p(e))return"";const r=`${e>=0?"+":""}${e.toFixed(2)}%`;return t?`(${r})`:r},r.generateRandomId=void 0,r.getChainType=function(e){if(e===c.CHAIN_IDS.MAINNET)return"mainnet";if(c.TEST_CHAINS.includes(e))return"testnet";return"custom"},r.getPlatform=r.getMethodDataName=r.getEnvironmentType=void 0,r.getValidUrl=h,r.hexToBn=function(e){return new n.default((0,l.stripHexPrefix)(e),16)},r.isValidDate=r.isValidAmount=void 0,r.isWebUrl=function(e){const t=h(e);return null!==t&&("https:"===t.protocol||"http:"===t.protocol)},r.previousValueComparator=function(e,t){let r,s=!0;return n=>{try{return s?(s=!1,e(t??n,n)):e(r,n)}finally{r=n}}},r.shouldEmitDappViewedEvent=function(e){if(null===e)return!1;const t=e.slice(-4);return parseInt(t,16)%100==0};var s=d(e("url")),n=d(e("bn.js")),a=e("lodash"),o=e("@metamask/transaction-controller"),i=e("../../../shared/constants/app"),c=e("../../../shared/constants/network"),l=e("../../../shared/modules/hexstring-utils"),u=e("../../../shared/lib/four-byte");function d(e){return e&&e.__esModule?e:{default:e}}const m=(0,a.memoize)((e=>{console.log("env type url ",e);const t=new URL(e);return console.log("env type parsedUrl ",t),"/popup.html"===t.pathname?i.ENVIRONMENT_TYPE_POPUP:["/home.html"].includes(t.pathname)?i.ENVIRONMENT_TYPE_FULLSCREEN:"/notification.html"===t.pathname?i.ENVIRONMENT_TYPE_NOTIFICATION:i.ENVIRONMENT_TYPE_BACKGROUND}));r.getEnvironmentType=(e=window.location.href)=>m(e);r.getPlatform=()=>{const{navigator:e}=window,{userAgent:t}=e;return t.includes("Firefox")?i.PLATFORM_FIREFOX:"brave"in e?i.PLATFORM_BRAVE:t.includes("Edg/")?i.PLATFORM_EDGE:t.includes("OPR")?i.PLATFORM_OPERA:i.PLATFORM_CHROME};r.addHexPrefix=e=>"string"!=typeof e||e.match(/^-?0x/u)?e:e.match(/^-?0X/u)?e.replace("0X","0x"):e.startsWith("-")?e.replace("-","-0x"):`0x${e}`;const f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";r.generateRandomId=()=>{let e="";for(let t=0;t<20;t++)e+=f.charAt(Math.floor(62*Math.random()));return e};function h(e){try{const t=new URL(e);return 0===t.hostname.length||0===t.pathname.length||t.hostname!==decodeURIComponent(t.hostname)?null:t}catch(e){return null}}r.isValidDate=e=>e instanceof Date;const p=e=>null!==e&&e!==undefined&&!Number.isNaN(e);r.isValidAmount=p;r.getMethodDataName=async(e,t,r,s,n)=>{if(!r||!t)return null;const a=r.slice(0,10);if(null!=e&&e[a])return null==e?void 0:e[a];const o=await(0,u.getMethodDataAsync)(a,t,n);return null!=o&&o.name&&s(a,o),o}}}},{package:"$root$",file:"app/scripts/lib/util.ts"}],[1359,{"./errors.cjs":1360,"@metamask/base-controller":1396,"@metamask/rpc-errors":2304,nanoid:4473},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m,f,h,p=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},g=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.ApprovalController=r.APPROVAL_TYPE_RESULT_SUCCESS=r.APPROVAL_TYPE_RESULT_ERROR=r.ORIGIN_METAMASK=void 0;const b=e("@metamask/base-controller"),y=e("@metamask/rpc-errors"),k=e("nanoid"),E=e("./errors.cjs");r.ORIGIN_METAMASK="metamask",r.APPROVAL_TYPE_RESULT_ERROR="result_error",r.APPROVAL_TYPE_RESULT_SUCCESS="result_success";const C="ApprovalController",A={pendingApprovals:{persist:!1,anonymous:!0},pendingApprovalCount:{persist:!1,anonymous:!1},approvalFlows:{persist:!1,anonymous:!1}};class S extends b.BaseController{constructor({messenger:e,showApprovalRequest:t,state:r={},typesExcludedFromRateLimiting:c=[]}){super({name:C,metadata:A,messenger:e,state:{pendingApprovals:{},pendingApprovalCount:0,approvalFlows:[],...r}}),s.add(this),n.set(this,void 0),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),p(this,n,new Map,"f"),p(this,a,new Map,"f"),p(this,o,t,"f"),p(this,i,c,"f"),this.registerMessageHandlers()}registerMessageHandlers(){this.messagingSystem.registerActionHandler(`${C}:clearRequests`,this.clear.bind(this)),this.messagingSystem.registerActionHandler(`${C}:addRequest`,((e,t)=>t?this.addAndShowApprovalRequest(e):this.add(e))),this.messagingSystem.registerActionHandler(`${C}:hasRequest`,this.has.bind(this)),this.messagingSystem.registerActionHandler(`${C}:acceptRequest`,this.accept.bind(this)),this.messagingSystem.registerActionHandler(`${C}:rejectRequest`,this.reject.bind(this)),this.messagingSystem.registerActionHandler(`${C}:updateRequestState`,this.updateRequestState.bind(this)),this.messagingSystem.registerActionHandler(`${C}:startFlow`,this.startFlow.bind(this)),this.messagingSystem.registerActionHandler(`${C}:endFlow`,this.endFlow.bind(this)),this.messagingSystem.registerActionHandler(`${C}:setFlowLoadingText`,this.setFlowLoadingText.bind(this)),this.messagingSystem.registerActionHandler(`${C}:showSuccess`,this.success.bind(this)),this.messagingSystem.registerActionHandler(`${C}:showError`,this.error.bind(this))}addAndShowApprovalRequest(e){const t=g(this,s,"m",c).call(this,e.origin,e.type,e.id,e.requestData,e.requestState,e.expectsResult);return g(this,o,"f").call(this),t}add(e){return g(this,s,"m",c).call(this,e.origin,e.type,e.id,e.requestData,e.requestState,e.expectsResult)}get(e){return this.state.pendingApprovals[e]}getApprovalCount(e={}){if(!e.origin&&!e.type)throw new Error("Must specify origin, type, or both.");const{origin:t,type:r}=e;if(t&&r)return g(this,a,"f").get(t)?.get(r)||0;if(t)return Array.from((g(this,a,"f").get(t)||new Map).values()).reduce(((e,t)=>e+t),0);let s=0;for(const e of Object.values(this.state.pendingApprovals))e.type===r&&(s+=1);return s}getTotalApprovalCount(){return this.state.pendingApprovalCount}has(e={}){const{id:t,origin:r,type:s}=e;if(t){if("string"!=typeof t)throw new Error("May not specify non-string id.");return g(this,n,"f").has(t)}if(s&&"string"!=typeof s)throw new Error("May not specify non-string type.");if(r){if("string"!=typeof r)throw new Error("May not specify non-string origin.");return s?Boolean(g(this,a,"f").get(r)?.get(s)):g(this,a,"f").has(r)}if(s){for(const e of Object.values(this.state.pendingApprovals))if(e.type===s)return!0;return!1}throw new Error("Must specify a valid combination of id, origin, and type.")}accept(e,t,r){const n=this.get(e),a=g(this,s,"m",f).call(this,e);let o=!1;return r?.deleteAfterResult&&r.waitForResult||(g(this,s,"m",m).call(this,e),o=!0),new Promise(((s,o)=>{const i={success:e=>s({value:e}),error:o};if(r?.waitForResult&&!n.expectsResult)return void o(new E.ApprovalRequestNoResultSupportError(e));const c=r?.waitForResult?i:undefined,l=n.expectsResult?{value:t,resultCallbacks:c}:t;a.resolve(l),r?.waitForResult||s({value:undefined})})).finally((()=>{o||g(this,s,"m",m).call(this,e)}))}reject(e,t){const r=g(this,s,"m",f).call(this,e);g(this,s,"m",m).call(this,e),r.reject(t)}clear(e){for(const t of g(this,n,"f").keys())this.reject(t,e);g(this,a,"f").clear(),this.update((e=>{e.pendingApprovals={},e.pendingApprovalCount=0}))}updateRequestState(e){if(!this.state.pendingApprovals[e.id])throw new E.ApprovalRequestNotFoundError(e.id);this.update((t=>{t.pendingApprovals[e.id].requestState=e.requestState}))}startFlow(e={}){const t=e.id??(0,k.nanoid)(),r=e.loadingText??null;return this.update((e=>{e.approvalFlows.push({id:t,loadingText:r})})),!1!==e.show&&g(this,o,"f").call(this),{id:t,loadingText:r}}endFlow({id:e}){if(!this.state.approvalFlows.length)throw new E.NoApprovalFlowsError;if(e!==this.state.approvalFlows.slice(-1)[0].id)throw new E.EndInvalidFlowError(e,this.state.approvalFlows.map((e=>e.id)));this.update((e=>{e.approvalFlows.pop()}))}setFlowLoadingText({id:e,loadingText:t}){const r=this.state.approvalFlows.findIndex((t=>t.id===e));if(-1===r)throw new E.MissingApprovalFlowError(e);this.update((e=>{e.approvalFlows[r].loadingText=t}))}async success(e={}){return await g(this,s,"m",h).call(this,r.APPROVAL_TYPE_RESULT_SUCCESS,e,{message:e.message,header:e.header,title:e.title,icon:e.icon}),{}}async error(e={}){return await g(this,s,"m",h).call(this,r.APPROVAL_TYPE_RESULT_ERROR,e,{error:e.error,header:e.header,title:e.title,icon:e.icon}),{}}}r.ApprovalController=S,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakSet,c=function(e,t,r=(0,k.nanoid)(),a,o,c){if(g(this,s,"m",l).call(this,r,e,t,a,o),!g(this,i,"f").includes(t)&&this.has({origin:e,type:t}))throw y.rpcErrors.resourceUnavailable(((e,t)=>`Request of type '${t}' already pending for origin ${e}. Please wait.`)(e,t));return new Promise(((i,l)=>{g(this,n,"f").set(r,{resolve:i,reject:l}),g(this,s,"m",u).call(this,e,t),g(this,s,"m",d).call(this,r,e,t,a,o,c)}))},l=function(e,t,r,s,a){let o=null;if(e&&"string"==typeof e?g(this,n,"f").has(e)?o=`Approval request with id '${e}' already exists.`:t&&"string"==typeof t?r&&"string"==typeof r?s&&("object"!=typeof s||Array.isArray(s))?o="Request data must be a plain object if specified.":a&&("object"!=typeof a||Array.isArray(a))&&(o="Request state must be a plain object if specified."):o="Must specify non-empty string type.":o="Must specify non-empty string origin.":o="Must specify non-empty string id.",o)throw y.rpcErrors.internal(o)},u=function(e,t){let r=g(this,a,"f").get(e);r||(r=new Map,g(this,a,"f").set(e,r));const s=r.get(t)||0;r.set(t,s+1)},d=function(e,t,r,s,n,a){const o={id:e,origin:t,type:r,time:Date.now(),requestData:s||null,requestState:n||null,expectsResult:a||!1};this.update((t=>{t.pendingApprovals[e]=o,t.pendingApprovalCount=Object.keys(t.pendingApprovals).length}))},m=function(e){if(!g(this,n,"f").has(e))throw new E.ApprovalRequestNotFoundError(e);g(this,n,"f").delete(e);const{origin:t,type:r}=this.state.pendingApprovals[e],s=g(this,a,"f").get(t),o=this.getApprovalCount({origin:t}),i=s.get(r);1===o?g(this,a,"f").delete(t):s.set(r,i-1),this.update((t=>{delete t.pendingApprovals[e],t.pendingApprovalCount=Object.keys(t.pendingApprovals).length}))},f=function(e){const t=g(this,n,"f").get(e);if(!t)throw new E.ApprovalRequestNotFoundError(e);return t},h=async function(e,t,s){try{await this.addAndShowApprovalRequest({origin:r.ORIGIN_METAMASK,type:e,requestData:s})}catch(e){console.info("Failed to display result page",e)}finally{if(t.flowToEnd)try{this.endFlow({id:t.flowToEnd})}catch(e){console.info("Failed to end flow",{id:t.flowToEnd,error:e})}}},r.default=S}}},{package:"@metamask/approval-controller",file:"node_modules/@metamask/approval-controller/dist/ApprovalController.cjs"}],[1360,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.MissingApprovalFlowError=r.EndInvalidFlowError=r.NoApprovalFlowsError=r.ApprovalRequestNoResultSupportError=r.ApprovalRequestNotFoundError=void 0;class s extends Error{constructor(e){super(`Approval request with id '${e}' not found.`)}}r.ApprovalRequestNotFoundError=s;class n extends Error{constructor(e){super(`Approval acceptance requested result but request with id '${e}' does not support it.`)}}r.ApprovalRequestNoResultSupportError=n;class a extends Error{constructor(){super("No approval flows found.")}}r.NoApprovalFlowsError=a;class o extends Error{constructor(e,t){super(`Attempted to end flow with id '${e}' which does not match current flow with id '${t.slice(-1)[0]}'. All Flows: ${t.join(", ")}`)}}r.EndInvalidFlowError=o;class i extends Error{constructor(e){super(`No approval flows found with id '${e}'.`)}}r.MissingApprovalFlowError=i}}},{package:"@metamask/approval-controller",file:"node_modules/@metamask/approval-controller/dist/errors.cjs"}],[1361,{"./ApprovalController.cjs":1359,"./errors.cjs":1360},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./ApprovalController.cjs"),r),n(e("./errors.cjs"),r)}}},{package:"@metamask/approval-controller",file:"node_modules/@metamask/approval-controller/dist/index.cjs"}],[1362,{"@metamask/controller-utils":1422,"@metamask/eth-query":1640,"@metamask/polling-controller":1391,"@metamask/utils":2761,"async-mutex":3450,lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},m=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccountTrackerController=void 0;const h=e("@metamask/controller-utils"),p=f(e("@metamask/eth-query")),g=e("@metamask/polling-controller"),b=e("@metamask/utils"),y=e("async-mutex"),k=e("lodash"),E={accounts:{persist:!0,anonymous:!1},accountsByChainId:{persist:!0,anonymous:!1}};class C extends((0,g.StaticIntervalPollingController)()){constructor({interval:e=1e4,state:t,messenger:r,getStakedBalanceForChain:c,includeStakedAssets:l=!1}){const{selectedNetworkClientId:u}=r.call("NetworkController:getState"),{configuration:{chainId:m}}=r.call("NetworkController:getNetworkClientById",u);super({name:"AccountTrackerController",messenger:r,state:{accounts:{},accountsByChainId:{[m]:{}},...t},metadata:E}),s.add(this),n.set(this,new y.Mutex),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),d(this,o,c,"f"),d(this,a,l,"f"),this.setIntervalLength(e),this.poll(),this.messagingSystem.subscribe("AccountsController:selectedEvmAccountChange",(()=>this.refresh()))}syncAccounts(e){const t={...this.state.accounts},r=(0,k.cloneDeep)(this.state.accountsByChainId),s=Object.keys(t);r[e]||(r[e]={},s.forEach((t=>{r[e][t]={balance:"0x0"}})));const n=Object.values(this.messagingSystem.call("AccountsController:listAccounts").map((e=>(0,h.toChecksumHexAddress)(e.address)))),a=n.filter((e=>!s.includes(e))),o=s.filter((e=>!n.includes(e)));a.forEach((e=>{t[e]={balance:"0x0"}})),Object.keys(r).forEach((e=>{a.forEach((t=>{r[e][t]={balance:"0x0"}}))})),o.forEach((e=>{delete t[e]})),Object.keys(r).forEach((e=>{o.forEach((t=>{delete r[e][t]}))})),this.update((e=>{e.accounts=t,e.accountsByChainId=r}))}async poll(e){e&&this.setIntervalLength(e),m(this,i,"f")&&clearTimeout(m(this,i,"f")),await this.refresh(),d(this,i,setTimeout((()=>{this.poll(this.getIntervalLength())}),this.getIntervalLength()),"f")}async _executePoll({networkClientId:e}){this.refresh(e)}async refresh(e){const t=this.messagingSystem.call("AccountsController:getSelectedAccount"),r=await m(this,n,"f").acquire();try{const{chainId:r,ethQuery:n}=m(this,s,"m",l).call(this,e);this.syncAccounts(r);const{accounts:i,accountsByChainId:d}=this.state,{isMultiAccountBalancesEnabled:f}=this.messagingSystem.call("PreferencesController:getState"),p=f?Object.keys(i):[(0,h.toChecksumHexAddress)(t.address)],g={...d[r]};for(const t of p){const r=await m(this,s,"m",u).call(this,t,n);if(r&&(g[t]={balance:r}),m(this,a,"f")){const r=await m(this,o,"f").call(this,t,e);r&&(g[t]={...g[t],stakedBalance:r})}}this.update((e=>{r===m(this,s,"m",c).call(this)&&(e.accounts=g),e.accountsByChainId[r]=g}))}finally{r()}}async syncBalanceWithAddresses(e,t){const{ethQuery:r}=m(this,s,"m",l).call(this,t);return await Promise.all(e.map((e=>(0,h.safelyExecuteWithTimeout)((async()=>{(0,b.assert)(r,"Provider not set.");const s=await(0,h.query)(r,"getBalance",[e]);let n;return m(this,a,"f")&&(n=await m(this,o,"f").call(this,e,t)),[e,s,n]}))))).then((e=>e.reduce(((e,t)=>{if(!t)return e;const[r,s,n]=t;return{...e,[r]:{balance:s,stakedBalance:n}}}),{})))}}r.AccountTrackerController=C,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakSet,c=function(){const{selectedNetworkClientId:e}=this.messagingSystem.call("NetworkController:getState"),{configuration:{chainId:t}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return t},l=function(e){const t=e??this.messagingSystem.call("NetworkController:getState").selectedNetworkClientId,{configuration:{chainId:r},provider:s}=this.messagingSystem.call("NetworkController:getNetworkClientById",t);return{chainId:r,ethQuery:new p.default(s)}},u=async function(e,t){return await(0,h.safelyExecuteWithTimeout)((async()=>((0,b.assert)(t,"Provider not set."),await(0,h.query)(t,"getBalance",[e]))))},r.default=C}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/AccountTrackerController.cjs"}],[1363,{"./Standards/ERC20Standard.cjs":1369,"./Standards/NftStandards/ERC1155/ERC1155Standard.cjs":1370,"./Standards/NftStandards/ERC721/ERC721Standard.cjs":1371,"./assetsUtil.cjs":1377,"@ethersproject/bignumber":514,"@ethersproject/contracts":523,"@ethersproject/providers":561,"@metamask/controller-utils":1422,"@metamask/utils":2761,"single-call-balance-checker-abi":5094},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},m=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.AssetsContractController=r.MISSING_PROVIDER_ERROR=r.STAKING_CONTRACT_ADDRESS_BY_CHAINID=r.SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID=void 0;const h=e("@ethersproject/bignumber"),p=e("@ethersproject/contracts"),g=e("@ethersproject/providers"),b=e("@metamask/controller-utils"),y=e("@metamask/utils"),k=f(e("single-call-balance-checker-abi")),E=e("./assetsUtil.cjs"),C=e("./Standards/ERC20Standard.cjs"),A=e("./Standards/NftStandards/ERC1155/ERC1155Standard.cjs"),S=e("./Standards/NftStandards/ERC721/ERC721Standard.cjs");r.SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID={[E.SupportedTokenDetectionNetworks.mainnet]:"0xb1f8e55c7f64d203c1400b9d8555d050f94adf39",[E.SupportedTokenDetectionNetworks.bsc]:"0x2352c63A83f9Fd126af8676146721Fa00924d7e4",[E.SupportedTokenDetectionNetworks.polygon]:"0x2352c63A83f9Fd126af8676146721Fa00924d7e4",[E.SupportedTokenDetectionNetworks.avax]:"0xD023D153a0DFa485130ECFdE2FAA7e612EF94818",[E.SupportedTokenDetectionNetworks.aurora]:"0x1286415D333855237f89Df27D388127181448538",[E.SupportedTokenDetectionNetworks.linea_goerli]:"0x10dAd7Ca3921471f616db788D9300DC97Db01783",[E.SupportedTokenDetectionNetworks.linea_mainnet]:"0xF62e6a41561b3650a69Bb03199C735e3E3328c0D",[E.SupportedTokenDetectionNetworks.arbitrum]:"0x151E24A486D7258dd7C33Fb67E4bB01919B7B32c",[E.SupportedTokenDetectionNetworks.optimism]:"0xB1c568e9C3E6bdaf755A60c7418C269eb11524FC",[E.SupportedTokenDetectionNetworks.base]:"0x6AA75276052D96696134252587894ef5FFA520af",[E.SupportedTokenDetectionNetworks.zksync]:"0x458fEd3144680a5b8bcfaa0F9594aa19B4Ea2D34",[E.SupportedTokenDetectionNetworks.cronos]:"0x768ca200f0fc702ac9ea502498c18f5eff176378",[E.SupportedTokenDetectionNetworks.celo]:"0x6aa75276052d96696134252587894ef5ffa520af",[E.SupportedTokenDetectionNetworks.gnosis]:"0x6aa75276052d96696134252587894ef5ffa520af",[E.SupportedTokenDetectionNetworks.fantom]:"0x6aa75276052d96696134252587894ef5ffa520af",[E.SupportedTokenDetectionNetworks.polygon_zkevm]:"0x6aa75276052d96696134252587894ef5ffa520af",[E.SupportedTokenDetectionNetworks.moonbeam]:"0x6aa75276052d96696134252587894ef5ffa520af",[E.SupportedTokenDetectionNetworks.moonriver]:"0x6aa75276052d96696134252587894ef5ffa520af"},r.STAKING_CONTRACT_ADDRESS_BY_CHAINID={[E.SupportedStakedBalanceNetworks.mainnet]:"0x4fef9d741011476750a243ac70b9789a63dd47df",[E.SupportedStakedBalanceNetworks.holesky]:"0x37bf0883c27365cffcd0c4202918df930989891f"},r.MISSING_PROVIDER_ERROR="AssetsContractController failed to set the provider correctly. A provider must be set for this method to be available";const w="AssetsContractController";class v{constructor({messenger:e,chainId:t}){s.add(this),this.name=w,n.set(this,void 0),a.set(this,void 0),o.set(this,void 0),this.messagingSystem=e,d(this,n,undefined,"f"),d(this,a,b.IPFS_DEFAULT_GATEWAY_URL,"f"),d(this,o,t,"f"),m(this,s,"m",i).call(this),m(this,s,"m",c).call(this)}setProvider(e){d(this,n,e,"f")}get ipfsGateway(){return m(this,a,"f")}get chainId(){return m(this,o,"f")}getERC20Standard(e){const t=m(this,s,"m",l).call(this,e);return new C.ERC20Standard(t)}getERC721Standard(e){const t=m(this,s,"m",l).call(this,e);return new S.ERC721Standard(t)}getERC1155Standard(e){const t=m(this,s,"m",l).call(this,e);return new A.ERC1155Standard(t)}async getERC20BalanceOf(e,t,r){return this.getERC20Standard(r).getBalanceOf(e,t)}async getERC20TokenDecimals(e,t){return this.getERC20Standard(t).getTokenDecimals(e)}async getERC20TokenName(e,t){return this.getERC20Standard(t).getTokenName(e)}async getERC721NftTokenId(e,t,r,s){return this.getERC721Standard(s).getNftTokenId(e,t,r)}async getTokenStandardAndDetails(e,t,r,n){m(this,s,"m",l).call(this,n);try{const t=this.getERC721Standard(n);return{...await t.getDetails(e,m(this,a,"f"),r)}}catch{}try{const t=this.getERC1155Standard(n);return{...await t.getDetails(e,m(this,a,"f"),r)}}catch{}try{const r=this.getERC20Standard(n);return{...await r.getDetails(e,t)}}catch{}throw new Error("Unable to determine contract standard")}async getERC721TokenURI(e,t,r){return this.getERC721Standard(r).getTokenURI(e,t)}async getERC721AssetName(e,t){return this.getERC721Standard(t).getAssetName(e)}async getERC721AssetSymbol(e,t){return this.getERC721Standard(t).getAssetSymbol(e)}async getERC721OwnerOf(e,t,r){return this.getERC721Standard(r).getOwnerOf(e,t)}async getERC1155TokenURI(e,t,r){return this.getERC1155Standard(r).getTokenURI(e,t)}async getERC1155BalanceOf(e,t,r,s){return this.getERC1155Standard(s).getBalanceOf(t,e,r)}async transferSingleERC1155(e,t,r,s,n,a){return this.getERC1155Standard(a).transferSingle(e,t,r,s,n)}async getBalancesInSingleCall(e,t,n){const a=m(this,s,"m",u).call(this,n),o=m(this,s,"m",l).call(this,n);if(!(a in r.SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID))return{};const i=r.SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID[a],c=new p.Contract(i,k.default,o),d=await c.balances([e],t),f={};return d.length>0&&t.forEach(((e,t)=>{const r=d[t];"0"!==String(r)&&(f[e]=r)})),f}async getStakedBalanceForChain(e,t){const n=m(this,s,"m",u).call(this,t),a=m(this,s,"m",l).call(this,t);let o=h.BigNumber.from(0);if(![E.SupportedStakedBalanceNetworks.mainnet,E.SupportedStakedBalanceNetworks.holesky].includes(n))return undefined;if(!(n in r.STAKING_CONTRACT_ADDRESS_BY_CHAINID))return undefined;const i=r.STAKING_CONTRACT_ADDRESS_BY_CHAINID[n],c=[{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getShares",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{internalType:"uint256",name:"assets",type:"uint256"}],stateMutability:"view",type:"function"}];try{const t=new p.Contract(i,c,a),r=await t.getShares(e);r.lte(0)||(o=await t.convertToAssets(r.toString()))}catch(e){console.error(e)}return o.toHexString()}}r.AssetsContractController=v,n=new WeakMap,a=new WeakMap,o=new WeakMap,s=new WeakSet,i=function(){const e=["constructor","messagingSystem","setProvider","provider","ipfsGateway","chainId"];(0,y.getKnownPropertyNames)(Object.getPrototypeOf(this)).forEach((t=>{(t=>!e.find((e=>e===t))&&"function"==typeof this[t])(t)&&this.messagingSystem.registerActionHandler(`${w}:${t}`,this[t].bind(this))}))},c=function(){this.messagingSystem.subscribe("PreferencesController:stateChange",(({ipfsGateway:e})=>{d(this,a,e,"f")})),this.messagingSystem.subscribe("NetworkController:networkDidChange",(({selectedNetworkClientId:e})=>{const t=m(this,s,"m",u).call(this,e);m(this,o,"f")!==t&&(d(this,o,t,"f"),d(this,n,m(this,s,"m",l).call(this),"f"))}))},l=function(e){const t=e?this.messagingSystem.call("NetworkController:getNetworkClientById",e).provider:this.messagingSystem.call("NetworkController:getSelectedNetworkClient")?.provider??m(this,n,"f");if(t===undefined)throw new Error(r.MISSING_PROVIDER_ERROR);return new g.Web3Provider(t)},u=function(e){if(e){const t=this.messagingSystem.call("NetworkController:getNetworkConfigurationByNetworkClientId",e);if(t)return t.chainId}const{selectedNetworkClientId:t}=this.messagingSystem.call("NetworkController:getState"),r=this.messagingSystem.call("NetworkController:getNetworkClientById",t);return r.configuration?.chainId??m(this,o,"f")},r.default=v}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/AssetsContractController.cjs"}],[1364,{"./crypto-compare-service/index.cjs":1380,"@metamask/controller-utils":1422,"@metamask/polling-controller":1391,"async-mutex":3450},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.CurrencyRateController=void 0;const s=e("@metamask/controller-utils"),n=e("@metamask/polling-controller"),a=e("async-mutex"),o=e("./crypto-compare-service/index.cjs"),i={currentCurrency:{persist:!0,anonymous:!0},currencyRates:{persist:!0,anonymous:!0}},c={currentCurrency:"usd",currencyRates:{ETH:{conversionDate:0,conversionRate:0,usdConversionRate:null}}};class l extends((0,n.StaticIntervalPollingController)()){constructor({includeUsdRate:e=!1,interval:t=18e4,messenger:r,state:s,fetchMultiExchangeRate:n=o.fetchMultiExchangeRate}){super({name:"CurrencyRateController",metadata:i,messenger:r,state:{...c,...s}}),this.mutex=new a.Mutex,this.includeUsdRate=e,this.setIntervalLength(t),this.fetchMultiExchangeRate=n}async setCurrentCurrency(e){const t=await this.mutex.acquire(),r=Object.keys(this.state.currencyRates);try{this.update((()=>({...c,currentCurrency:e})))}finally{t()}this.updateExchangeRate(r)}async updateExchangeRate(e){const t=await this.mutex.acquire();try{const{currentCurrency:t}=this.state,r=Object.values(s.TESTNET_TICKER_SYMBOLS),n=e.reduce(((e,t)=>(e[t]=r.includes(t)?s.FALL_BACK_VS_CURRENCY:t,e)),{}),a=await this.fetchMultiExchangeRate(t,[...new Set(Object.values(n))],this.includeUsdRate),o=Object.entries(n).reduce(((e,[r,s])=>{const n=a[s.toLowerCase()];return e[r]={conversionDate:n!==undefined?Date.now()/1e3:null,conversionRate:n?.[t.toLowerCase()]??null,usdConversionRate:n?.usd??null},e}),{});this.update((e=>{e.currencyRates={...e.currencyRates,...o}}))}catch(e){throw console.error("Failed to fetch exchange rates.",e),e}finally{t()}}destroy(){super.destroy(),this.stopAllPolling()}async _executePoll({nativeCurrencies:e}){await this.updateExchangeRate(e)}}r.CurrencyRateController=l,r.default=l}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/CurrencyRateController.cjs"}],[1365,{"./assetsUtil.cjs":1377,"./constants.cjs":1378,"@ethersproject/address":507,"@metamask/base-controller":1396,"@metamask/controller-utils":1422,"@metamask/rpc-errors":2304,"@metamask/utils":2761,"async-mutex":3450,"bn.js":3513,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m,f,h,p,g,b,y,k,E,C,A,S,w,v,x,T,_,j,R,I,B=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},P=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},D=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.NftController=r.getDefaultNftControllerState=void 0;const N=e("@ethersproject/address"),O=e("@metamask/base-controller"),F=e("@metamask/controller-utils"),M=e("@metamask/rpc-errors"),J=e("@metamask/utils"),L=e("async-mutex"),V=D(e("bn.js")),H=e("uuid"),U=e("./assetsUtil.cjs"),$=e("./constants.cjs"),z={allNftContracts:{persist:!0,anonymous:!1},allNfts:{persist:!0,anonymous:!1},ignoredNfts:{persist:!0,anonymous:!1}},G="allNfts",W="allNftContracts";r.getDefaultNftControllerState=()=>({allNftContracts:{},allNfts:{},ignoredNfts:[]});class K extends O.BaseController{constructor({chainId:e,ipfsGateway:t=F.IPFS_DEFAULT_GATEWAY_URL,openSeaEnabled:p=!1,useIpfsSubdomains:g=!0,isIpfsGatewayEnabled:b=!0,onNftAdded:y,messenger:k,state:E={}}){super({name:"NftController",metadata:z,messenger:k,state:{...(0,r.getDefaultNftControllerState)(),...E}}),s.add(this),n.set(this,new L.Mutex),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),c.set(this,void 0),l.set(this,void 0),u.set(this,void 0),d.set(this,void 0),B(this,a,this.messagingSystem.call("AccountsController:getSelectedAccount").id,"f"),B(this,o,e,"f"),B(this,i,t,"f"),B(this,c,p,"f"),B(this,l,g,"f"),B(this,u,b,"f"),B(this,d,y,"f"),this.messagingSystem.subscribe("PreferencesController:stateChange",P(this,s,"m",f).bind(this)),this.messagingSystem.subscribe("NetworkController:networkDidChange",P(this,s,"m",m).bind(this)),this.messagingSystem.subscribe("AccountsController:selectedEvmAccountChange",P(this,s,"m",h).bind(this))}getNftApi(){return`${F.NFT_API_BASE_URL}/tokens`}async watchNft(e,t,r,{networkClientId:n,userAddress:a}={}){const o=P(this,s,"m",R).call(this,a);if(!o)return;await P(this,s,"m",_).call(this,e,t,o);const i=await P(this,s,"m",E).call(this,e.address,e.tokenId,n);if(i.standard&&i.standard!==t)throw M.rpcErrors.invalidInput(`Suggested NFT of type ${i.standard} does not match received type ${t}`);const c={asset:{...e,...i},type:t,id:(0,H.v4)(),time:Date.now(),interactingAddress:o,origin:r};await this._requestApproval(c);const{address:l,tokenId:u}=e,{name:d,standard:m,description:f,image:h}=i;await this.addNft(l,u,{nftMetadata:{name:d??null,description:f??null,image:h??null,standard:m??null},userAddress:a,source:$.Source.Dapp,networkClientId:n})}setApiKey(e){this.openSeaApiKey=e}async isNftOwner(e,t,r,{networkClientId:s}={}){try{const n=await this.messagingSystem.call("AssetsContractController:getERC721OwnerOf",t,r,s);return e.toLowerCase()===n.toLowerCase()}catch{}try{return!(await this.messagingSystem.call("AssetsContractController:getERC1155BalanceOf",e,t,r,s)).isZero()}catch{}throw new Error("Unable to verify ownership. Possibly because the standard is not supported or the user's currently selected network does not match the chain of the asset in question.")}async addNftVerifyOwnership(e,t,{userAddress:r,networkClientId:n,source:a}={}){const o=P(this,s,"m",R).call(this,r);if(!await this.isNftOwner(o,e,t,{networkClientId:n}))throw new Error("This NFT is not owned by the user");await this.addNft(e,t,{networkClientId:n,userAddress:o,source:a})}async addNft(e,t,{nftMetadata:r,userAddress:n,source:a=$.Source.Custom,networkClientId:o}={}){const i=P(this,s,"m",R).call(this,n);if(!i)return;const c=(0,F.toChecksumHexAddress)(e),l=P(this,s,"m",j).call(this,{networkClientId:o});r=r||await P(this,s,"m",E).call(this,c,t,o);const u=(await P(this,s,"m",w).call(this,{tokenAddress:c,userAddress:i,networkClientId:o,source:a,nftMetadata:r})).find((e=>e.address.toLowerCase()===c.toLowerCase()));u&&await P(this,s,"m",S).call(this,c,t,r,u,l,i,a)}async updateNftMetadata({nfts:e,userAddress:t,networkClientId:r}){const a=P(this,s,"m",R).call(this,t),o=await P(this,n,"f").acquire();try{const t=P(this,s,"m",j).call(this,{networkClientId:r}),n=e.map((e=>({...e,address:(0,F.toChecksumHexAddress)(e.address)}))),o=await Promise.all(n.map((async e=>({nft:e,newMetadata:await P(this,s,"m",E).call(this,e.address,e.tokenId,r)})))),i=[],{allNfts:c}=this.state,l=c[a]?.[t]||[];o.forEach((e=>{const t=l.find((t=>t.address.toLowerCase()===e.nft.address.toLowerCase()&&t.tokenId===e.nft.tokenId));if(t){(0,U.compareNftMetadata)(e.newMetadata,t)&&i.push(e)}})),0!==i.length&&i.forEach((e=>this.updateNft(e.nft,e.newMetadata,a,t)))}finally{o()}}removeNft(e,t,{networkClientId:r,userAddress:n}={}){const a=P(this,s,"m",R).call(this,n),o=P(this,s,"m",j).call(this,{networkClientId:r}),i=(0,F.toChecksumHexAddress)(e);P(this,s,"m",x).call(this,i,t,{chainId:o,userAddress:a});const{allNfts:c}=this.state;(c[a]?.[o]||[]).find((e=>e.address.toLowerCase()===i.toLowerCase()))||P(this,s,"m",T).call(this,i,{chainId:o,userAddress:a})}removeAndIgnoreNft(e,t,{networkClientId:r,userAddress:n}={}){const a=P(this,s,"m",R).call(this,n),o=P(this,s,"m",j).call(this,{networkClientId:r}),i=(0,F.toChecksumHexAddress)(e);P(this,s,"m",v).call(this,i,t,{chainId:o,userAddress:a});const{allNfts:c}=this.state;(c[a]?.[o]||[]).find((e=>e.address.toLowerCase()===i.toLowerCase()))||P(this,s,"m",T).call(this,i,{chainId:o,userAddress:a})}clearIgnoredNfts(){this.update((e=>{e.ignoredNfts=[]}))}async checkAndUpdateSingleNftOwnershipStatus(e,t,{userAddress:r,networkClientId:n}={}){const a=P(this,s,"m",R).call(this,r),o=P(this,s,"m",j).call(this,{networkClientId:n}),{address:i,tokenId:c}=e;let l=e.isCurrentlyOwned;try{l=await this.isNftOwner(a,i,c,{networkClientId:n})}catch{}const u={...e,isCurrentlyOwned:l};if(t)return u;const{allNfts:d}=this.state,m=[...d[a]?.[o]||[]],f=m.findIndex((e=>e.tokenId===c&&e.address.toLowerCase()===i.toLowerCase()));return-1!==f&&(m[f]=u,this.update((e=>{e.allNfts[a]=Object.assign({},e.allNfts[a],{[o]:m})})),P(this,s,"m",p).call(this,m,G,{userAddress:a,chainId:o})),u}async checkAndUpdateAllNftsOwnershipStatus({networkClientId:e,userAddress:t}={}){const r=P(this,s,"m",R).call(this,t),n=P(this,s,"m",j).call(this,{networkClientId:e}),{allNfts:a}=this.state,o=a[r]?.[n]||[],i=await Promise.all(o.map((async r=>await this.checkAndUpdateSingleNftOwnershipStatus(r,!0,{networkClientId:e,userAddress:t})??r)));P(this,s,"m",p).call(this,i,G,{userAddress:r,chainId:n})}updateNftFavoriteStatus(e,t,r,{networkClientId:n,userAddress:a}={}){const o=P(this,s,"m",R).call(this,a),i=P(this,s,"m",j).call(this,{networkClientId:n}),{allNfts:c}=this.state,l=[...c[o]?.[i]||[]],u=l.findIndex((r=>r.address===e&&r.tokenId===t));if(-1===u)return;const d={...l[u],favorite:r};l[u]=d,P(this,s,"m",p).call(this,l,G,{chainId:i,userAddress:o})}findNftByAddressAndTokenId(e,t,r,s){const{allNfts:n}=this.state,a=n[r]?.[s]||[],o=a.findIndex((r=>r.address.toLowerCase()===e.toLowerCase()&&r.tokenId===t));return-1===o?null:{nft:a[o],index:o}}updateNft(e,t,r,n){const{allNfts:a}=this.state,o=a[r]?.[n]||[],i=this.findNftByAddressAndTokenId(e.address,e.tokenId,r,n);if(!i)return;const c={...e,...t},l=[...o.slice(0,i.index),c,...o.slice(i.index+1)];P(this,s,"m",p).call(this,l,G,{chainId:n,userAddress:r})}resetNftTransactionStatusByTransactionId(e,t,r){const{allNfts:n}=this.state,a=n[t]?.[r]||[],o=a.findIndex((t=>t.transactionId===e));if(-1===o)return!1;const i={...a[o],transactionId:undefined},c=[...a.slice(0,o),i,...a.slice(o+1)];return P(this,s,"m",p).call(this,c,G,{chainId:r,userAddress:t}),!0}async getNFTContractInfo(e,t){const r=new URL(P(this,s,"m",g).call(this));r.searchParams.append("chainId",t);for(const t of e)r.searchParams.append("contract",t);return await(0,F.handleFetch)(r,{headers:{Version:F.NFT_API_VERSION}})}async _requestApproval(e){return this.messagingSystem.call("ApprovalController:addRequest",{id:e.id,origin:e.origin,type:F.ApprovalType.WatchAsset,requestData:{id:e.id,interactingAddress:e.interactingAddress,asset:{address:e.asset.address,tokenId:e.asset.tokenId,name:e.asset.name,description:e.asset.description,image:e.asset.image,standard:e.asset.standard}}},!0)}resetState(){this.update((()=>(0,r.getDefaultNftControllerState)()))}}r.NftController=K,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,s=new WeakSet,m=function({selectedNetworkClientId:e}){const{configuration:{chainId:t}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);B(this,o,t,"f")},f=async function({ipfsGateway:e,openSeaEnabled:t,isIpfsGatewayEnabled:r}){const n=this.messagingSystem.call("AccountsController:getSelectedAccount");B(this,a,n.id,"f"),B(this,i,e,"f"),B(this,c,t,"f"),B(this,u,r,"f");(r&&""!==e||t)&&n&&await P(this,s,"m",I).call(this,n)},h=async function(e){const t=P(this,a,"f");B(this,a,e.id,"f");(P(this,u,"f")&&""!==P(this,i,"f")||P(this,c,"f"))&&t!==e.id&&await P(this,s,"m",I).call(this,e)},p=function(e,t,{userAddress:r,chainId:s}){r&&this.update((n=>{const a=n[t],o={...a[r]||{},[s]:e};n[t]={...a,[r]:o}}))},g=function(){return`${F.NFT_API_BASE_URL}/collections`},b=async function(e,t){const r=new URLSearchParams({chainIds:"1",tokens:`${e}:${t}`,includeTopBid:"true",includeAttributes:"true",includeLastSale:"true"}).toString(),s=await(0,F.fetchWithErrorHandling)({url:`${this.getNftApi()}?${r}`,options:{headers:{Version:F.NFT_API_VERSION}}}),n=new URLSearchParams({chainId:"1",id:`${s?.tokens[0]?.token?.collection?.id}`}).toString(),a=await(0,F.fetchWithErrorHandling)({url:`${F.NFT_API_BASE_URL}/collections?${n}`,options:{headers:{Version:F.NFT_API_VERSION}}});if(!s?.tokens?.[0]?.token)return{name:null,description:null,image:null,standard:null};const{image:o,metadata:{imageOriginal:i}={},name:c,description:l,collection:u,kind:d,rarityRank:m,rarity:f,attributes:h,lastSale:p,imageSmall:g}=s.tokens[0].token;return Object.assign({},{name:c||null},{description:l||null},{image:o||null},u?.creator&&{creator:u.creator},i&&{imageOriginal:i},g&&{imageThumbnail:g},d&&{standard:d.toUpperCase()},p&&{lastSale:p},h&&{attributes:h},s.tokens[0].market?.topBid&&{topBid:s.tokens[0].market?.topBid},m&&{rarityRank:m},f&&{rarity:f},(u||a)&&{collection:{...u||{},creator:u?.creator||a?.collections[0].creator,openseaVerificationStatus:a?.collections[0].openseaVerificationStatus,contractDeployedAt:a?.collections[0].contractDeployedAt,ownerCount:a?.collections[0].ownerCount,topBid:a?.collections[0].topBid}})},y=async function(e,t,r){const n=await P(this,s,"m",k).call(this,e,t,r);let a=n[0];const o=n[1],d=a.startsWith("ipfs://");if(d&&!P(this,u,"f"))return{image:null,name:null,description:null,standard:o||null,favorite:!1,tokenURI:a??null};const m=P(this,c,"f");if(!d&&!m)return{image:null,name:null,description:null,standard:o||null,favorite:!1,tokenURI:a??null};if(d&&(a=await(0,U.getFormattedIpfsUrl)(P(this,i,"f"),a,P(this,l,"f"))),a.startsWith("data:image/"))return{image:a,name:null,description:null,standard:o||null,favorite:!1,tokenURI:a??null};try{const e=await(0,F.handleFetch)(a);return{image:e[Object.prototype.hasOwnProperty.call(e,"image")?"image":"image_url"],name:e.name,description:e.description,standard:o,favorite:!1,tokenURI:a??null}}catch{return{image:null,name:null,description:null,standard:o||null,favorite:!1,tokenURI:a??null}}},k=async function(e,t,r){try{return[await this.messagingSystem.call("AssetsContractController:getERC721TokenURI",e,t,r),F.ERC721]}catch{}try{const s=await this.messagingSystem.call("AssetsContractController:getERC1155TokenURI",e,t,r);if(!s.includes("{id}"))return[s,F.ERC1155];const n=(0,J.remove0x)((0,F.BNToHex)(new V.default(t))).padStart(64,"0").toLowerCase();return[s.replace("{id}",n),F.ERC1155]}catch{}return["",""]},E=async function(e,t,r){const n=P(this,s,"m",j).call(this,{networkClientId:r}),[a,o]=await Promise.all([(0,F.safelyExecute)((()=>P(this,s,"m",y).call(this,e,t,r))),P(this,c,"f")&&"0x1"===n?(0,F.safelyExecute)((()=>P(this,s,"m",b).call(this,e,t))):undefined]);return{...o,name:a?.name??o?.name??null,description:a?.description??o?.description??null,image:o?.image??a?.image??null,standard:a?.standard??o?.standard??null,tokenURI:a?.tokenURI??null}},C=async function(e,t){const[r,s]=await Promise.all([this.messagingSystem.call("AssetsContractController:getERC721AssetName",e,t),this.messagingSystem.call("AssetsContractController:getERC721AssetSymbol",e,t)]);return{collection:{name:r},symbol:s,address:e}},A=async function(e,t,r){const n=await(0,F.safelyExecute)((()=>P(this,s,"m",C).call(this,e,r)));return n||!Object.values(t).every((e=>null===e))?{address:e,...n,schema_name:t?.standard??null,collection:{name:null,image_url:t?.collection?.image??t?.collection?.imageUrl??null,tokenCount:t?.collection?.tokenCount??null,...t?.collection,...n?.collection}}:{address:e,asset_contract_type:null,created_date:null,schema_name:null,symbol:null,total_supply:null,description:null,external_link:null,collection:{name:null,image_url:null}}},S=async function(e,t,r,a,o,i,c){const l=await P(this,n,"f").acquire();try{const n=(0,F.toChecksumHexAddress)(e),{allNfts:l}=this.state,u=[...l[i]?.[o]??[]],m=u.find((e=>e.address.toLowerCase()===n.toLowerCase()&&e.tokenId===t));if(m){const e=(0,U.compareNftMetadata)(r,m),s=(0,U.hasNewCollectionFields)(r,m);if(!e&&m.isCurrentlyOwned&&!s)return;const a=u.findIndex((e=>e.address.toLowerCase()===n.toLowerCase()&&e.tokenId===t));-1!==a&&(u[a]={...m,...r})}else{const e={address:n,tokenId:t,favorite:!1,isCurrentlyOwned:!0,...r};u.push(e)}P(this,s,"m",p).call(this,u,G,{chainId:o,userAddress:i}),P(this,d,"f")&&P(this,d,"f").call(this,{address:n,symbol:a.symbol,tokenId:t.toString(),standard:r.standard,source:c})}finally{l()}},w=async function({tokenAddress:e,userAddress:t,networkClientId:r,source:a,nftMetadata:o}){const i=await P(this,n,"f").acquire();try{const n=(0,F.toChecksumHexAddress)(e),{allNftContracts:i}=this.state,c=P(this,s,"m",j).call(this,{networkClientId:r}),l=i[t]?.[c]||[];if(l.find((e=>e.address.toLowerCase()===n.toLowerCase())))return l;const u=await P(this,s,"m",A).call(this,n,o,r),{asset_contract_type:d,created_date:m,symbol:f,description:h,external_link:g,schema_name:b,collection:{name:y,image_url:k,tokenCount:E}}=u;if(a===$.Source.Detected&&"address"in u&&"string"==typeof u.address&&"collection"in u&&null===u.collection.name&&"image_url"in u.collection&&null===u.collection.image_url&&Object.entries(u).every((([e,t])=>"address"===e||"collection"===e||!t)))return l;const C=Object.assign({},{address:n},h&&{description:h},y&&{name:y},k&&{logo:k},f&&{symbol:f},null!=E&&{totalSupply:E},d&&{assetContractType:d},m&&{createdDate:m},b&&{schemaName:b},g&&{externalLink:g}),S=[...l,C];return P(this,s,"m",p).call(this,S,W,{chainId:c,userAddress:t}),S}finally{i()}},v=function(e,t,{chainId:r,userAddress:n}){const a=(0,F.toChecksumHexAddress)(e),{allNfts:o,ignoredNfts:i}=this.state,c=[...i],l=(o[n]?.[r]||[]).filter((e=>{if(e.address.toLowerCase()===a.toLowerCase()&&e.tokenId===t){return!c.find((e=>e.address===a&&e.tokenId===t))&&c.push(e),!1}return!0}));P(this,s,"m",p).call(this,l,G,{userAddress:n,chainId:r}),this.update((e=>{e.ignoredNfts=c}))},x=function(e,t,{chainId:r,userAddress:n}){const a=(0,F.toChecksumHexAddress)(e),{allNfts:o}=this.state,i=(o[n]?.[r]||[]).filter((e=>!(e.address.toLowerCase()===a.toLowerCase()&&e.tokenId===t)));P(this,s,"m",p).call(this,i,G,{userAddress:n,chainId:r})},T=function(e,{chainId:t,userAddress:r}){const n=(0,F.toChecksumHexAddress)(e),{allNftContracts:a}=this.state,o=(a[r]?.[t]||[]).filter((e=>!(e.address.toLowerCase()===n.toLowerCase())));return P(this,s,"m",p).call(this,o,W,{chainId:t,userAddress:r}),o},_=async function(e,t,r,{networkClientId:s}={}){const{address:n,tokenId:a}=e;if(!t)throw M.rpcErrors.invalidParams("Asset type is required");if(t!==F.ERC721&&t!==F.ERC1155)throw M.rpcErrors.invalidParams(`Non NFT asset type ${t} not supported by watchNft`);if(!n||!a)throw M.rpcErrors.invalidParams("Both address and tokenId are required");if(!(0,N.isAddress)(n))throw M.rpcErrors.invalidParams("Invalid address");if(!/^\d+$/u.test(a))throw M.rpcErrors.invalidParams("Invalid tokenId");try{if(!await this.isNftOwner(r,n,a,{networkClientId:s}))throw M.rpcErrors.invalidInput("Suggested NFT is not owned by the selected account")}catch(e){if(e instanceof Error)throw M.rpcErrors.resourceUnavailable(e.message);throw e}},j=function({networkClientId:e}){if(e){const{configuration:{chainId:t}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return t}return P(this,o,"f")},R=function(e){if(e)return e;const t=this.messagingSystem.call("AccountsController:getAccount",P(this,a,"f"));return t?.address||""},I=async function(e){const t=(this.state.allNfts[e.address]?.[P(this,o,"f")]??[]).filter((e=>!e.name&&!e.description&&!e.image));0!==t.length&&await this.updateNftMetadata({nfts:t,userAddress:e.address})},r.default=K}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/NftController.cjs"}],[1366,{"./assetsUtil.cjs":1377,"./constants.cjs":1378,"@metamask/base-controller":1396,"@metamask/controller-utils":1422,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},m=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.NftDetectionController=r.MAX_GET_COLLECTION_BATCH_SIZE=r.BlockaidResultType=void 0;const f=e("@metamask/base-controller"),h=e("@metamask/controller-utils"),p=e("@metamask/utils"),g=e("./assetsUtil.cjs"),b=e("./constants.cjs"),y=[h.ChainId.mainnet,h.ChainId["linea-mainnet"]];var k;!function(e){e.Benign="Benign",e.Spam="Spam",e.Warning="Warning",e.Malicious="Malicious"}(k||(r.BlockaidResultType=k={})),r.MAX_GET_COLLECTION_BATCH_SIZE=20;class E extends f.BaseController{constructor({messenger:e,disabled:t=!1,addNft:r,getNftState:l}){super({name:"NftDetectionController",messenger:e,metadata:{},state:{}}),s.add(this),n.set(this,void 0),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),d(this,n,t,"f"),d(this,i,{},"f"),d(this,o,l,"f"),d(this,a,r,"f"),this.messagingSystem.subscribe("PreferencesController:stateChange",m(this,s,"m",c).bind(this))}isMainnet(){const{selectedNetworkClientId:e}=this.messagingSystem.call("NetworkController:getState"),{configuration:{chainId:t}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return t===h.ChainId.mainnet}isMainnetByNetworkClientId(e){return e.configuration.chainId===h.ChainId.mainnet}async detectNfts(e){const t=e?.userAddress??this.messagingSystem.call("AccountsController:getSelectedAccount").address,{selectedNetworkClientId:c}=this.messagingSystem.call("NetworkController:getState"),{configuration:{chainId:l}}=this.messagingSystem.call("NetworkController:getNetworkClientById",c);if(!y.includes(l)||m(this,n,"f"))return;if(!t)return;const d=`${l}:${t}`;if(d in m(this,i,"f"))return void await m(this,i,"f")[d];const{promise:f,resolve:E,reject:C}=(0,p.createDeferredPromise)({suppressUnhandledRejection:!0});let A;m(this,i,"f")[d]=f;let S,w=[];try{do{S=await m(this,s,"m",u).call(this,t,l,A),w=S.tokens.filter((e=>!1===e.token.isSpam&&(!e.blockaidResult?.result_type||e.blockaidResult?.result_type===k.Benign)));const n=w.reduce(((e,t)=>(e.includes(t.token.contract)||t.token.contract!==t?.token?.collection?.id||e.push(t.token.contract),e)),[]);if(0!==n.length){const e=await(0,g.reduceInBatchesSerially)({values:n,batchSize:r.MAX_GET_COLLECTION_BATCH_SIZE,eachBatch:async(e,t)=>{const r=new URLSearchParams(t.map((e=>["contract",e])));r.append("chainId","1");return{...e,...await(0,h.fetchWithErrorHandling)({url:`${h.NFT_API_BASE_URL}/collections?${r.toString()}`,options:{headers:{Version:h.NFT_API_VERSION}},timeout:h.NFT_API_TIMEOUT})}},initialResult:{}});e.collections?.length&&w.forEach((t=>{const r=e.collections.find((e=>e.id?.toLowerCase()===t.token.contract.toLowerCase()));r&&(t.token={...t.token,collection:{...t.token.collection??{},creator:r?.creator,openseaVerificationStatus:r?.openseaVerificationStatus,contractDeployedAt:r.contractDeployedAt,ownerCount:r.ownerCount,topBid:r.topBid}})}))}const i=w.map((async r=>{const{tokenId:s,contract:n,kind:i,image:c,imageSmall:l,metadata:{imageOriginal:u}={},name:d,description:f,attributes:p,topBid:g,lastSale:y,rarityRank:k,rarityScore:E,collection:C}=r.token;let A;const{ignoredNfts:S}=m(this,o,"f").call(this);if(S.length&&(A=S.find((e=>e.address===(0,h.toChecksumHexAddress)(n)&&e.tokenId===s))),!A){const r=Object.assign({},{name:d},f&&{description:f},c&&{image:c},l&&{imageThumbnail:l},u&&{imageOriginal:u},i&&{standard:i.toUpperCase()},y&&{lastSale:y},p&&{attributes:p},g&&{topBid:g},k&&{rarityRank:k},E&&{rarityScore:E},C&&{collection:C});await m(this,a,"f").call(this,n,s,{nftMetadata:r,userAddress:t,source:b.Source.Detected,networkClientId:e?.networkClientId})}}));await Promise.all(i)}while(A=S.continuation);E()}catch(e){throw C(e),e}finally{delete m(this,i,"f")[d]}}}r.NftDetectionController=E,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakSet,c=function({useNftDetection:e}){!e!==m(this,n,"f")&&d(this,n,!e,"f")},l=function({chainId:e,address:t,next:r}){return`${h.NFT_API_BASE_URL}/users/${t}/tokens?chainIds=${e}&limit=50&includeTopBid=true&continuation=${r??""}`},u=async function(e,t,r){const n=(0,h.convertHexToDecimal)(t).toString(),a=m(this,s,"m",l).call(this,{chainId:n,address:e,next:r});return await(0,h.handleFetch)(a,{headers:{Version:h.NFT_API_VERSION}})},r.default=E}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/NftDetectionController.cjs"}],[1367,{"../crypto-compare-service/index.cjs":1380,"@metamask/base-controller":1396,"async-mutex":3450},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},f=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.RatesController=r.Cryptocurrency=r.name=void 0;const h=e("@metamask/base-controller"),p=e("async-mutex"),g=e("../crypto-compare-service/index.cjs");var b;r.name="RatesController",function(e){e.Btc="btc",e.Solana="sol"}(b||(r.Cryptocurrency=b={}));const y={fiatCurrency:{persist:!0,anonymous:!0},rates:{persist:!0,anonymous:!0},cryptocurrencies:{persist:!0,anonymous:!0}},k={fiatCurrency:"usd",rates:{[b.Btc]:{conversionDate:0,conversionRate:0},[b.Solana]:{conversionDate:0,conversionRate:0}},cryptocurrencies:[b.Btc,b.Solana]};class E extends h.BaseController{constructor({interval:e=18e4,messenger:t,state:l,includeUsdRate:u,fetchMultiExchangeRate:d=g.fetchMultiExchangeRate}){super({name:r.name,metadata:y,messenger:t,state:{...k,...l}}),s.add(this),n.set(this,new p.Mutex),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),c.set(this,void 0),m(this,o,u,"f"),m(this,a,d,"f"),m(this,i,e,"f")}async start(){f(this,c,"f")||(this.messagingSystem.publish(`${r.name}:pollingStarted`),m(this,c,setInterval((()=>{f(this,s,"m",u).call(this).catch(console.error)}),f(this,i,"f")),"f"))}async stop(){f(this,c,"f")&&(clearInterval(f(this,c,"f")),m(this,c,undefined,"f"),this.messagingSystem.publish(`${r.name}:pollingStopped`))}getCryptocurrencyList(){const{cryptocurrencies:e}=this.state;return e}async setCryptocurrencyList(e){await f(this,s,"m",l).call(this,(()=>{this.update((t=>({...t,cryptocurrencies:e})))}))}async setFiatCurrency(e){if(""===e)throw new Error("The currency can not be an empty string");await f(this,s,"m",l).call(this,(()=>{this.update((t=>({...t,fiatCurrency:e})))})),await f(this,s,"m",d).call(this)}}r.RatesController=E,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,c=new WeakMap,s=new WeakSet,l=async function(e){const t=await f(this,n,"f").acquire();try{return e()}finally{t()}},u=async function(){await f(this,s,"m",d).call(this)},d=async function(){await f(this,s,"m",l).call(this,(async()=>{const{fiatCurrency:e,cryptocurrencies:t}=this.state,r=await f(this,a,"f").call(this,e,t,f(this,o,"f")),s={};for(const[t,n]of Object.entries(r))s[t]={conversionDate:Date.now(),conversionRate:n[e],...f(this,o,"f")&&{usdConversionRate:n.usd}};this.update((e=>({...e,rates:s})))}))}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/RatesController/RatesController.cjs"}],[1368,{"./RatesController.cjs":1367},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Cryptocurrency=r.RatesController=void 0;var s=e("./RatesController.cjs");Object.defineProperty(r,"RatesController",{enumerable:!0,get:function(){return s.RatesController}}),Object.defineProperty(r,"Cryptocurrency",{enumerable:!0,get:function(){return s.Cryptocurrency}})}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/RatesController/index.cjs"}],[1369,{"../assetsUtil.cjs":1377,"@ethereumjs/util":478,"@ethersproject/contracts":523,"@metamask/abi-utils":1307,"@metamask/controller-utils":1422,"@metamask/metamask-eth-abis":1944,"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERC20Standard=void 0;const s=e("@ethereumjs/util"),n=e("@ethersproject/contracts"),a=e("@metamask/abi-utils"),o=e("@metamask/controller-utils"),i=e("@metamask/metamask-eth-abis"),c=e("@metamask/utils"),l=e("../assetsUtil.cjs");r.ERC20Standard=class{constructor(e){this.provider=e}async getBalanceOf(e,t){const r=new n.Contract(e,i.abiERC20,this.provider),s=await r.balanceOf(t);return(0,l.ethersBigNumberToBN)(s)}async getTokenDecimals(e){const t=new n.Contract(e,i.abiERC20,this.provider);try{return(await t.decimals()).toString()}catch(e){if(e instanceof Error&&e.message.includes("call revert exception"))throw new Error("Failed to parse token decimals");throw e}}async getTokenName(e){const t=new n.Contract(e,i.abiERC20,this.provider);try{return(await t.name()).toString()}catch(e){if(e instanceof Error&&e.message.includes("call revert exception"))throw new Error("Failed to parse token name");throw e}}async getTokenSymbol(e){const t={to:e,data:"0x95d89b41"},r=await this.provider.call(t);(0,c.assertIsStrictHexString)(r);try{const e=(0,a.decodeSingle)("string",r);if(e?.length>0)return e}catch{}try{const e=(0,s.toUtf8)(r);if(e.length>0)return e}catch{}throw new Error("Failed to parse token symbol")}async getDetails(e,t){const[r,s,n]=await Promise.all([this.getTokenDecimals(e),this.getTokenSymbol(e),t?this.getBalanceOf(e,t):undefined]);return{decimals:r,symbol:s,balance:n,standard:o.ERC20}}}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/Standards/ERC20Standard.cjs"}],[1370,{"../../../assetsUtil.cjs":1377,"@ethersproject/contracts":523,"@metamask/controller-utils":1422,"@metamask/metamask-eth-abis":1944},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERC1155Standard=void 0;const s=e("@ethersproject/contracts"),n=e("@metamask/controller-utils"),a=e("@metamask/metamask-eth-abis"),o=e("../../../assetsUtil.cjs");r.ERC1155Standard=class{constructor(e){this.provider=e}async contractSupportsURIMetadataInterface(e){return this.contractSupportsInterface(e,n.ERC1155_METADATA_URI_INTERFACE_ID)}async contractSupportsTokenReceiverInterface(e){return this.contractSupportsInterface(e,n.ERC1155_TOKEN_RECEIVER_INTERFACE_ID)}async contractSupportsBase1155Interface(e){return this.contractSupportsInterface(e,n.ERC1155_INTERFACE_ID)}async getTokenURI(e,t){return new s.Contract(e,a.abiERC1155,this.provider).uri(t)}async getBalanceOf(e,t,r){const n=new s.Contract(e,a.abiERC1155,this.provider),i=await n.balanceOf(t,r);return(0,o.ethersBigNumberToBN)(i)}async transferSingle(e,t,r,n,o){const i=new s.Contract(e,a.abiERC1155,this.provider);return new Promise(((s,a)=>{i.transferSingle(e,t,r,n,o,((e,t)=>{e?a(e):s(t)}))}))}async getAssetSymbol(e){return new s.Contract(e,[{inputs:[],name:"symbol",outputs:[{name:"_symbol",type:"string"}],stateMutability:"view",type:"function",payable:!1}],this.provider).symbol()}async getAssetName(e){return new s.Contract(e,[{inputs:[],name:"name",outputs:[{name:"_name",type:"string"}],stateMutability:"view",type:"function",payable:!1}],this.provider).name()}async contractSupportsInterface(e,t){return new s.Contract(e,a.abiERC1155,this.provider).supportsInterface(t)}async getDetails(e,t,r){if(!await this.contractSupportsBase1155Interface(e))throw new Error("This isn't a valid ERC1155 contract");let s;const[a,i,c]=await Promise.all([(0,n.safelyExecute)((()=>this.getAssetSymbol(e))),(0,n.safelyExecute)((()=>this.getAssetName(e))),r?(0,n.safelyExecute)((()=>this.getTokenURI(e,r).then((e=>e.startsWith("ipfs://")?(0,o.getFormattedIpfsUrl)(t,e,!0):e)))):undefined]);if(c)try{const e=await(0,n.timeoutFetch)(c),r=await e.json();s=r?.image,s?.startsWith("ipfs://")&&(s=(0,o.getFormattedIpfsUrl)(t,s,!0))}catch{}return{standard:n.ERC1155,tokenURI:c,image:s,symbol:a,name:i}}}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/Standards/NftStandards/ERC1155/ERC1155Standard.cjs"}],[1371,{"../../../assetsUtil.cjs":1377,"@ethersproject/contracts":523,"@metamask/controller-utils":1422,"@metamask/metamask-eth-abis":1944},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERC721Standard=void 0;const s=e("@ethersproject/contracts"),n=e("@metamask/controller-utils"),a=e("@metamask/metamask-eth-abis"),o=e("../../../assetsUtil.cjs");r.ERC721Standard=class{constructor(e){this.contractSupportsMetadataInterface=async e=>this.contractSupportsInterface(e,n.ERC721_METADATA_INTERFACE_ID),this.contractSupportsEnumerableInterface=async e=>this.contractSupportsInterface(e,n.ERC721_ENUMERABLE_INTERFACE_ID),this.contractSupportsBase721Interface=async e=>this.contractSupportsInterface(e,n.ERC721_INTERFACE_ID),this.getNftTokenId=async(e,t,r)=>new s.Contract(e,a.abiERC721,this.provider).tokenOfOwnerByIndex(t,r),this.getTokenURI=async(e,t)=>{const r=new s.Contract(e,a.abiERC721,this.provider);return await this.contractSupportsMetadataInterface(e)||console.error("Contract does not support ERC721 metadata interface."),r.tokenURI(t)},this.getAssetName=async e=>new s.Contract(e,a.abiERC721,this.provider).name(),this.getAssetSymbol=async e=>new s.Contract(e,a.abiERC721,this.provider).symbol(),this.contractSupportsInterface=async(e,t)=>{const r=new s.Contract(e,a.abiERC721,this.provider);try{return await r.supportsInterface(t)}catch(e){if(e instanceof Error&&e.message.includes("call revert exception"))return!1;throw e}},this.getDetails=async(e,t,r)=>{if(!await this.contractSupportsBase721Interface(e))throw new Error("This isn't a valid ERC721 contract");const[s,a,i]=await Promise.all([(0,n.safelyExecute)((()=>this.getAssetSymbol(e))),(0,n.safelyExecute)((()=>this.getAssetName(e))),r?(0,n.safelyExecute)((()=>this.getTokenURI(e,r).then((e=>e.startsWith("ipfs://")?(0,o.getFormattedIpfsUrl)(t,e,!0):e)))):undefined]);let c;if(i)try{const e=await(0,n.timeoutFetch)(i),r=await e.json();c=r?.image,c?.startsWith("ipfs://")&&(c=(0,o.getFormattedIpfsUrl)(t,c,!0))}catch{}return{standard:n.ERC721,tokenURI:i,symbol:s,name:a,image:c}},this.provider=e}async getOwnerOf(e,t){return new s.Contract(e,a.abiERC721,this.provider).ownerOf(t)}}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/Standards/NftStandards/ERC721/ERC721Standard.cjs"}],[1372,{"./multicall.cjs":1384,"@ethersproject/contracts":523,"@ethersproject/providers":561,"@metamask/controller-utils":1422,"@metamask/metamask-eth-abis":1944,"@metamask/polling-controller":1391,lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m,f=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},h=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.TokenBalancesController=r.getDefaultTokenBalancesState=void 0;const p=e("@ethersproject/contracts"),g=e("@ethersproject/providers"),b=e("@metamask/controller-utils"),y=e("@metamask/metamask-eth-abis"),k=e("@metamask/polling-controller"),E=e("lodash"),C=e("./multicall.cjs"),A={tokenBalances:{persist:!0,anonymous:!1}};function S(){return{tokenBalances:{}}}r.getDefaultTokenBalancesState=S;class w extends((0,k.StaticIntervalPollingController)()){constructor({interval:e=18e4,messenger:t,state:r={}}){var m,p;super({name:"TokenBalancesController",metadata:A,messenger:t,state:{tokenBalances:{},...r}}),s.add(this),n.set(this,void 0),a.set(this,void 0),o.set(this,void 0),i.set(this,(({isMultiAccountBalancesEnabled:e,useMultiAccountBalanceChecker:t})=>Boolean(e||t))),c.set(this,(e=>{const t=f(this,i,"f").call(this,e),r=t&&!f(this,n,"f");h(this,n,t,"f"),r&&this.updateBalances().catch(console.error)})),l.set(this,(({allTokens:e,allDetectedTokens:t})=>{const r=f(this,d,"f").call(this,e,t).filter((r=>!(0,E.isEqual)(f(this,a,"f")[r],e[r])||!(0,E.isEqual)(f(this,o,"f")[r],t[r])));h(this,a,e,"f"),h(this,o,t,"f"),this.updateBalances({chainIds:r}).catch(console.error)})),d.set(this,((e,t)=>[...new Set([...Object.keys(e),...Object.keys(t)])])),this.setIntervalLength(e),h(this,n,f(this,i,"f").call(this,this.messagingSystem.call("PreferencesController:getState")),"f"),this.messagingSystem.subscribe("PreferencesController:stateChange",f(this,c,"f").bind(this)),m=this,p=this,({allTokens:{set value(e){h(m,a,e,"f")}}.value,allDetectedTokens:{set value(e){h(p,o,e,"f")}}.value}=this.messagingSystem.call("TokensController:getState")),this.messagingSystem.subscribe("TokensController:stateChange",f(this,l,"f").bind(this)),this.messagingSystem.subscribe("NetworkController:stateChange",f(this,s,"m",u).bind(this))}async _executePoll({chainId:e}){await this.updateBalancesByChainId({chainId:e})}async updateBalances({chainIds:e}={}){e??(e=f(this,d,"f").call(this,f(this,a,"f"),f(this,o,"f"))),await Promise.allSettled(e.map((e=>this.updateBalancesByChainId({chainId:e}))))}async updateBalancesByChainId({chainId:e}){const{address:t}=this.messagingSystem.call("AccountsController:getSelectedAccount"),r=[],i=([e,s])=>f(this,n,"f")||(e=>(0,b.toChecksumHexAddress)(e)===(0,b.toChecksumHexAddress)(t))(e)?s.forEach((t=>r.push({accountAddress:e,tokenAddress:t.address}))):undefined;Object.entries(f(this,a,"f")[e]??{}).forEach(i),Object.entries(f(this,o,"f")[e]??{}).forEach(i);let c=[];if(r.length>0){const t=new g.Web3Provider(f(this,s,"m",m).call(this,e).provider),n=r.map((({accountAddress:e,tokenAddress:r})=>({contract:new p.Contract(r,y.abiERC20,t),functionSignature:"balanceOf(address)",arguments:[e]})));c=await(0,C.multicallOrFallback)(n,e,t)}this.update((t=>{var s,n;for(const r of Object.keys(t.tokenBalances))t.tokenBalances[r][e]={};for(let a=0;a({tokenBalances:{}})))}}r.TokenBalancesController=w,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,c=new WeakMap,l=new WeakMap,d=new WeakMap,s=new WeakSet,u=function(e,t){for(const e of t)if("remove"===e.op&&"networkConfigurationsByChainId"===e.path[0]){const t=e.path[1];this.update((e=>{for(const r of Object.keys(e.tokenBalances))delete e.tokenBalances[r][t]}))}},m=function(e){const{networkConfigurationsByChainId:t}=this.messagingSystem.call("NetworkController:getState"),r=t[e];if(!r)throw new Error(`TokenBalancesController: No network configuration found for chainId ${e}`);const{networkClientId:s}=r.rpcEndpoints[r.defaultRpcEndpointIndex];return this.messagingSystem.call("NetworkController:getNetworkClientById",s)},r.default=w}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/TokenBalancesController.cjs"}],[1373,{"./assetsUtil.cjs":1377,"./multi-chain-accounts-service/index.cjs":1382,"@metamask/contract-metadata":1420,"@metamask/controller-utils":1422,"@metamask/polling-controller":1391,"@metamask/utils":2761,lodash:4380},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m,f,h,p,g,b,y,k,E,C,A,S,w,v,x,T,_,j,R,I,B,P,D=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},N=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},O=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.TokenDetectionController=r.controllerName=r.mapChainIdWithTokenListMap=r.STATIC_MAINNET_TOKEN_LIST=void 0;const F=O(e("@metamask/contract-metadata")),M=e("@metamask/controller-utils"),J=e("@metamask/polling-controller"),L=e("@metamask/utils"),V=e("lodash"),H=e("./assetsUtil.cjs"),U=e("./multi-chain-accounts-service/index.cjs"),$=18e4;function z(e){return(0,V.mapValues)(e,(e=>(0,V.isObject)(e)&&"data"in e?(0,V.get)(e,["data"]):e))}r.STATIC_MAINNET_TOKEN_LIST=Object.entries(F.default).reduce(((e,[t,r])=>{const{logo:s,erc20:n,erc721:a,...o}=r;return{...e,[t.toLowerCase()]:{...o,address:t.toLowerCase(),iconUrl:`images/contract/${s}`,aggregators:[]}}}),{}),r.mapChainIdWithTokenListMap=z,r.controllerName="TokenDetectionController";class G extends((0,J.StaticIntervalPollingController)()){constructor({interval:e=18e4,disabled:t=!0,getBalancesInSingleCall:g,trackMetaMetricsEvent:b,messenger:y,useAccountsAPI:k=!0,platform:C}){super({name:r.controllerName,messenger:y,state:{},metadata:{}}),s.add(this),n.set(this,void 0),a.set(this,void 0),o.set(this,void 0),i.set(this,{}),c.set(this,void 0),l.set(this,void 0),u.set(this,void 0),d.set(this,void 0),m.set(this,void 0),f.set(this,void 0),h.set(this,{isAccountsAPIEnabled:!0,supportedNetworksCache:null,platform:"",async getSupportedNetworks(){if(!this.isAccountsAPIEnabled)throw new Error("Accounts API Feature Switch is disabled");if(this.supportedNetworksCache)return this.supportedNetworksCache;const e=await(0,U.fetchSupportedNetworks)().catch((()=>null));return this.supportedNetworksCache=e,e},async getMultiNetworksBalances(e,t,r){const s=t.map((e=>(0,L.hexToNumber)(e)));if(!r||!s.every((e=>r.includes(e)))){const e=(r??[]).toString();throw new Error(`Unsupported Network: supported networks ${e}, requested networks: ${s.toString()}`)}return(await(0,U.fetchMultiChainBalances)(e,{networks:s},this.platform)).balances}}),D(this,c,t,"f"),this.setIntervalLength(e),D(this,a,N(this,s,"m",B).call(this).id,"f");const{chainId:A,networkClientId:S}=N(this,s,"m",E).call(this);D(this,o,S,"f");const{tokensChainsCache:w}=this.messagingSystem.call("TokenListController:getState");D(this,i,w,"f");const{useTokenDetection:v}=this.messagingSystem.call("PreferencesController:getState");D(this,u,v,"f"),D(this,d,(0,H.isTokenDetectionSupportedForNetwork)(A),"f"),D(this,m,g,"f"),D(this,f,b,"f");const{isUnlocked:x}=this.messagingSystem.call("KeyringController:getState");D(this,l,x,"f"),N(this,h,"f").isAccountsAPIEnabled=k,N(this,h,"f").platform=C,N(this,s,"m",p).call(this)}enable(){D(this,c,!1,"f")}disable(){D(this,c,!0,"f")}get isActive(){return!N(this,c,"f")&&N(this,l,"f")}async start(){this.enable(),await N(this,s,"m",b).call(this)}stop(){this.disable(),N(this,s,"m",g).call(this)}async _executePoll({chainIds:e,address:t}){this.isActive&&await this.detectTokens({chainIds:e,selectedAddress:t})}async detectTokens({chainIds:e,selectedAddress:t}={}){if(!this.isActive)return;const r=t??N(this,s,"m",P).call(this),n=N(this,s,"m",k).call(this,e);let a;N(this,h,"f").isAccountsAPIEnabled&&(a=await N(this,h,"f").getSupportedNetworks());const{chainsToDetectUsingRpc:o,chainsToDetectUsingAccountAPI:i}=N(this,s,"m",A).call(this,n,a);if(a&&i.length>0){const e=await N(this,s,"m",S).call(this,i,r,a);"failed"===e?.result&&N(this,s,"m",w).call(this,o,i,n)}o.length>0&&await N(this,s,"m",x).call(this,o,r)}}r.TokenDetectionController=G,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,m=new WeakMap,f=new WeakMap,h=new WeakMap,s=new WeakSet,p=function(){this.messagingSystem.subscribe("KeyringController:unlock",(async()=>{D(this,l,!0,"f"),await N(this,s,"m",C).call(this)})),this.messagingSystem.subscribe("KeyringController:lock",(()=>{D(this,l,!1,"f"),N(this,s,"m",g).call(this)})),this.messagingSystem.subscribe("TokenListController:stateChange",(async({tokensChainsCache:e})=>{N(this,s,"m",y).call(this,e,N(this,i,"f"))||await N(this,s,"m",C).call(this)})),this.messagingSystem.subscribe("PreferencesController:stateChange",(async({useTokenDetection:e})=>{const t=N(this,s,"m",B).call(this),r=N(this,u,"f")!==e;D(this,u,e,"f"),r&&await N(this,s,"m",C).call(this,{selectedAddress:t.address})})),this.messagingSystem.subscribe("AccountsController:selectedEvmAccountChange",(async e=>{const{networkConfigurationsByChainId:t}=this.messagingSystem.call("NetworkController:getState"),r=Object.keys(t);N(this,a,"f")!==e.id&&(D(this,a,e.id,"f"),await N(this,s,"m",C).call(this,{selectedAddress:e.address,chainIds:r}))}))},g=function(){N(this,n,"f")&&clearInterval(N(this,n,"f"))},b=async function(){this.isActive&&(N(this,s,"m",g).call(this),await this.detectTokens(),D(this,n,setInterval((async()=>{await this.detectTokens()}),this.getIntervalLength()),"f"))},y=function(e,t){const r=z(t),s=z(e);return(0,V.isEqual)(s,r)},k=function(e){const{networkConfigurationsByChainId:t,selectedNetworkClientId:r}=this.messagingSystem.call("NetworkController:getState");if(!e){const e=this.messagingSystem.call("NetworkController:getNetworkConfigurationByNetworkClientId",r);return[{chainId:e?.chainId??M.ChainId.mainnet,networkClientId:r}]}return e.map((e=>{const r=t[e];return{chainId:e,networkClientId:r.rpcEndpoints[r.defaultRpcEndpointIndex].networkClientId}}))},E=function(){const{selectedNetworkClientId:e}=this.messagingSystem.call("NetworkController:getState"),{configuration:{chainId:t}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return{chainId:t,networkClientId:e}},C=async function({selectedAddress:e,chainIds:t}={}){await this.detectTokens({chainIds:t,selectedAddress:e}),this.setIntervalLength($)},A=function(e,t){const r=[],s=[];return e.forEach((({chainId:e,networkClientId:n})=>{t?.includes((0,L.hexToNumber)(e))?r.push(e):s.push({chainId:e,networkClientId:n})})),{chainsToDetectUsingRpc:s,chainsToDetectUsingAccountAPI:r}},S=async function(e,t,r){return await N(this,s,"m",j).call(this,{chainIds:e,selectedAddress:t,supportedNetworks:r})},w=function(e,t,r){t.forEach((t=>{const s=r.find((e=>e.chainId===t));s&&e.push({chainId:s.chainId,networkClientId:s.networkClientId})}))},v=function(e){if(!(0,H.isTokenDetectionSupportedForNetwork)(e))return!1;if(!N(this,u,"f")&&e!==M.ChainId.mainnet)return!1;if(!N(this,u,"f")&&e===M.ChainId.mainnet)D(this,i,N(this,s,"m",_).call(this),"f");else{const{tokensChainsCache:e}=this.messagingSystem.call("TokenListController:getState");D(this,i,e??{},"f")}return!0},x=async function(e,t){for(const{chainId:r,networkClientId:n}of e){if(!N(this,s,"m",v).call(this,r))continue;const e=N(this,s,"m",T).call(this,{chainId:r,selectedAddress:t}).map((e=>N(this,s,"m",I).call(this,{tokensSlice:e,selectedAddress:t,networkClientId:n,chainId:r})));await Promise.all(e)}},T=function({chainId:e,selectedAddress:t}){const{allTokens:r,allDetectedTokens:s,allIgnoredTokens:n}=this.messagingSystem.call("TokensController:getState"),[a,o,c]=[r,s,n].map((r=>(r[e]?.[t]??[]).map((e=>"string"==typeof e?e:e.address)))),l=[];for(const t of Object.keys(N(this,i,"f")?.[e]?.data||{}))[a,o,c].every((e=>!e.find((e=>(0,M.isEqualCaseInsensitive)(e,t)))))&&l.push(t);const u=[];for(let e=0,t=1e3;e({...e,[t]:{name:r.name,symbol:r.symbol,decimals:r.decimals,address:r.address,aggregators:[],iconUrl:r?.iconUrl}})),{}),timestamp:0}}},j=async function({selectedAddress:e,chainIds:t,supportedNetworks:r}){return await(0,M.safelyExecute)((async()=>{const n=await N(this,h,"f").getMultiNetworksBalances(e,t,r).catch((()=>null));if(null===n)return{result:"failed"};for(const r of t){const t=!N(this,u,"f")&&r===M.ChainId.mainnet,{tokensChainsCache:a}=this.messagingSystem.call("TokenListController:getState");D(this,i,t?N(this,s,"m",_).call(this):a??{},"f");const o=N(this,s,"m",T).call(this,{chainId:r,selectedAddress:e}),c=n.filter((e=>e.chainId===(0,L.hexToNumber)(r)));if(!c||0===c.length)continue;const{tokensWithBalance:l,eventTokensDetails:d}=N(this,s,"m",R).call(this,o,c,r);l.length&&(N(this,f,"f").call(this,{event:"Token Detected",category:"Wallet",properties:{tokens:d,token_standard:M.ERC20,asset_type:M.ASSET_TYPES.TOKEN}}),await this.messagingSystem.call("TokensController:addDetectedTokens",l,{selectedAddress:e,chainId:r}))}return{result:"success"}}))},R=function(e,t,r){const s=[],n=[],a=new Set(e.flat());return t?.forEach((e=>{const t=e.address;if(!a.has(t))return;const o=N(this,i,"f")[r]?.data[t];if(!o)return;const{decimals:c,symbol:l,aggregators:u,iconUrl:d,name:m}=o;n.push(`${l} - ${t}`),s.push({address:t,decimals:c,symbol:l,aggregators:u,image:d,isERC721:!1,name:m})})),{tokensWithBalance:s,eventTokensDetails:n}},I=async function({tokensSlice:e,selectedAddress:t,networkClientId:r,chainId:s}){await(0,M.safelyExecute)((async()=>{const n=await N(this,m,"f").call(this,t,e,r),a=[],o=[];for(const e of Object.keys(n)){const{decimals:t,symbol:r,aggregators:n,iconUrl:c,name:l}=N(this,i,"f")[s].data[e];o.push(`${r} - ${e}`),a.push({address:e,decimals:t,symbol:r,aggregators:n,image:c,isERC721:!1,name:l})}a.length&&(N(this,f,"f").call(this,{event:"Token Detected",category:"Wallet",properties:{tokens:o,token_standard:M.ERC20,asset_type:M.ASSET_TYPES.TOKEN}}),await this.messagingSystem.call("TokensController:addDetectedTokens",a,{selectedAddress:t,chainId:s}))}))},B=function(){return this.messagingSystem.call("AccountsController:getSelectedAccount")},P=function(){const e=this.messagingSystem.call("AccountsController:getAccount",N(this,a,"f"));return e?.address||""},r.default=G}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/TokenDetectionController.cjs"}],[1374,{"./assetsUtil.cjs":1377,"./token-service.cjs":1387,"@metamask/controller-utils":1422,"@metamask/polling-controller":1391,"async-mutex":3450},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.TokenListController=r.getDefaultTokenListState=void 0;const c=e("@metamask/controller-utils"),l=e("@metamask/polling-controller"),u=e("async-mutex"),d=e("./assetsUtil.cjs"),m=e("./token-service.cjs"),f={tokenList:{persist:!0,anonymous:!0},tokensChainsCache:{persist:!0,anonymous:!0},preventPollingOnNetworkRestart:{persist:!0,anonymous:!0}};r.getDefaultTokenListState=()=>({tokenList:{},tokensChainsCache:{},preventPollingOnNetworkRestart:!1});class h extends((0,l.StaticIntervalPollingController)()){constructor({chainId:e,preventPollingOnNetworkRestart:t=!1,onNetworkStateChange:a,interval:o=864e5,cacheRefreshThreshold:c=864e5,messenger:l,state:d}){super({name:"TokenListController",metadata:f,messenger:l,state:{...(0,r.getDefaultTokenListState)(),...d}}),s.add(this),this.mutex=new u.Mutex,this.intervalDelay=o,this.setIntervalLength(o),this.cacheRefreshThreshold=c,this.chainId=e,this.updatePreventPollingOnNetworkRestart(t),this.abortController=new AbortController,a?a((async e=>{await i(this,s,"m",n).call(this,e)})):this.messagingSystem.subscribe("NetworkController:stateChange",(async e=>{await i(this,s,"m",n).call(this,e)}))}async start(){(0,d.isTokenListSupportedForNetwork)(this.chainId)&&await i(this,s,"m",a).call(this)}async restart(){this.stopPolling(),await i(this,s,"m",a).call(this)}stop(){this.stopPolling()}destroy(){super.destroy(),this.stopPolling()}stopPolling(){this.intervalId&&clearInterval(this.intervalId)}async _executePoll({chainId:e}){return this.fetchTokenList(e)}async fetchTokenList(e){const t=await this.mutex.acquire();try{const{tokensChainsCache:t}=this.state;let r={};const n=await(0,c.safelyExecute)((()=>i(this,s,"m",o).call(this,e)));if(n)r={...n};else{const s=await(0,c.safelyExecute)((()=>(0,m.fetchTokenListByChainId)(e,this.abortController.signal)));if(s){r={};for(const t of s)r[t.address]={...t,aggregators:(0,d.formatAggregatorNames)(t.aggregators),iconUrl:(0,d.formatIconUrlWithProxy)({chainId:e,tokenAddress:t.address})}}else r={...t[e]?.data||{}}}this.update((()=>({...this.state,tokenList:this.chainId===e?r:this.state.tokenList,tokensChainsCache:{...t,[e]:{timestamp:Date.now(),data:r}}})))}finally{t()}}clearingTokenListData(){this.update((()=>({...this.state,tokenList:{},tokensChainsCache:{}})))}updatePreventPollingOnNetworkRestart(e){this.update((()=>({...this.state,preventPollingOnNetworkRestart:e})))}}r.TokenListController=h,s=new WeakSet,n=async function(e){const t=this.messagingSystem.call("NetworkController:getNetworkClientById",e.selectedNetworkClientId),{chainId:r}=t.configuration;this.chainId!==r&&(this.abortController.abort(),this.abortController=new AbortController,this.chainId=r,this.state.preventPollingOnNetworkRestart?this.clearingTokenListData():this.update((()=>({...this.state,tokenList:this.state.tokensChainsCache[this.chainId]?.data||{}}))))},a=async function(){await(0,c.safelyExecute)((()=>this.fetchTokenList(this.chainId))),this.intervalId=setInterval((async()=>{await(0,c.safelyExecute)((()=>this.fetchTokenList(this.chainId)))}),this.intervalDelay)},o=async function(e){const{tokensChainsCache:t}=this.state,r=t[e],s=Date.now();return r?.data&&s-r?.timestamp({marketData:{}});class M extends((0,j.StaticIntervalPollingController)()){constructor({interval:e=18e4,disabled:t=!1,tokenPricesService:b,messenger:C,state:A}){super({name:r.controllerName,messenger:C,state:{...(0,r.getDefaultTokenRatesControllerState)(),...A},metadata:F}),s.add(this),n.set(this,void 0),a.set(this,N.Inactive),o.set(this,void 0),i.set(this,{}),c.set(this,void 0),l.set(this,void 0),u.set(this,void 0),d.set(this,void 0),m.set(this,void 0),f.set(this,void 0),h.set(this,void 0),this.setIntervalLength(e),x(this,o,b,"f"),x(this,l,t,"f"),x(this,m,e,"f");const{chainId:S,ticker:w}=T(this,s,"m",k).call(this);x(this,u,S,"f"),x(this,d,w,"f"),x(this,c,T(this,s,"m",y).call(this).id,"f");const{allTokens:v,allDetectedTokens:_}=T(this,s,"m",E).call(this);x(this,f,v,"f"),x(this,h,_,"f"),T(this,s,"m",p).call(this),T(this,s,"m",g).call(this)}enable(){x(this,l,!1,"f")}disable(){x(this,l,!0,"f")}async start(){T(this,s,"m",C).call(this),x(this,a,N.Active,"f"),await T(this,s,"m",A).call(this)}stop(){T(this,s,"m",C).call(this),x(this,a,N.Inactive,"f")}async updateExchangeRates(){await this.updateExchangeRatesByChainId({chainId:T(this,u,"f"),nativeCurrency:T(this,d,"f")})}async updateExchangeRatesByChainId({chainId:e,nativeCurrency:t}){if(T(this,l,"f"))return;const r=T(this,s,"m",b).call(this,e),n=`${e}:${t}`;if(n in T(this,i,"f"))return void await T(this,i,"f")[n];const{promise:a,resolve:o,reject:c}=(0,R.createDeferredPromise)({suppressUnhandledRejection:!0});T(this,i,"f")[n]=a;try{const n={[e]:{...await T(this,s,"m",S).call(this,{tokenAddresses:r,chainId:e,nativeCurrency:t})??{}}};this.update((e=>{e.marketData={...e.marketData,...n}})),o()}catch(e){throw c(e),e}finally{delete T(this,i,"f")[n]}}async _executePoll({chainId:e}){const{networkConfigurationsByChainId:t}=this.messagingSystem.call("NetworkController:getState"),r=t[e];r?await this.updateExchangeRatesByChainId({chainId:e,nativeCurrency:r.nativeCurrency}):console.error(`TokenRatesController: No network configuration found for chainId ${e}`)}resetState(){this.update((()=>(0,r.getDefaultTokenRatesControllerState)()))}}r.TokenRatesController=M,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,m=new WeakMap,f=new WeakMap,h=new WeakMap,s=new WeakSet,p=function(){this.messagingSystem.subscribe("TokensController:stateChange",(async({allTokens:e,allDetectedTokens:t})=>{if(T(this,l,"f"))return;const r=[...new Set([...Object.keys(e),...Object.keys(t)])].filter((r=>!(0,I.isEqual)(T(this,f,"f")[r],e[r])||!(0,I.isEqual)(T(this,h,"f")[r],t[r])));x(this,f,e,"f"),x(this,h,t,"f");const{networkConfigurationsByChainId:s}=this.messagingSystem.call("NetworkController:getState");await Promise.allSettled(r.map((async e=>{const t=s[e]?.nativeCurrency;t&&await this.updateExchangeRatesByChainId({chainId:e,nativeCurrency:t})})))}),(({allTokens:e,allDetectedTokens:t})=>({allTokens:e,allDetectedTokens:t})))},g=function(){this.messagingSystem.subscribe("NetworkController:stateChange",(async({selectedNetworkClientId:e},t)=>{const{configuration:{chainId:r,ticker:s}}=this.messagingSystem.call("NetworkController:getNetworkClientById",e);T(this,u,"f")===r&&T(this,d,"f")===s||(x(this,u,r,"f"),x(this,d,s,"f"),T(this,a,"f")===N.Active&&await this.updateExchangeRates());for(const e of t)if("remove"===e.op&&"networkConfigurationsByChainId"===e.path[0]){const t=e.path[1];this.update((e=>{delete e.marketData[t]}))}}))},b=function(e){const t=e=>Object.values(e??{}).flatMap((e=>e.map((({address:e})=>(0,_.toHex)((0,_.toChecksumHexAddress)(e)))))),r=t(T(this,f,"f")[e]),s=t(T(this,h,"f")[e]);return[...new Set([...r,...s])].sort()},y=function(){return this.messagingSystem.call("AccountsController:getSelectedAccount")},k=function(){const{selectedNetworkClientId:e}=this.messagingSystem.call("NetworkController:getState"),t=this.messagingSystem.call("NetworkController:getNetworkClientById",e);return{chainId:t.configuration.chainId,ticker:t.configuration.ticker}},E=function(){const{allTokens:e,allDetectedTokens:t}=this.messagingSystem.call("TokensController:getState");return{allTokens:e,allDetectedTokens:t}},C=function(){T(this,n,"f")&&clearTimeout(T(this,n,"f"))},A=async function e(){await(0,_.safelyExecute)((()=>this.updateExchangeRates())),x(this,n,setTimeout((()=>{T(this,s,"m",e).call(this)}),T(this,m,"f")),"f")},S=async function({tokenAddresses:e,chainId:t,nativeCurrency:r}){return T(this,o,"f").validateChainIdSupported(t)?T(this,o,"f").validateCurrencySupported(r)?await T(this,s,"m",w).call(this,{tokenAddresses:e,chainId:t,nativeCurrency:r}):await T(this,s,"m",v).call(this,{chainId:t,tokenAddresses:e,nativeCurrency:r}):e.reduce(((e,t)=>e={...e,[t]:undefined}),{})},w=async function({tokenAddresses:e,chainId:t,nativeCurrency:r}){let s;if(s=await(0,B.reduceInBatchesSerially)({values:[...e].sort(),batchSize:B.TOKEN_PRICES_BATCH_SIZE,eachBatch:async(e,s)=>({...e,...await T(this,o,"f").fetchTokenPrices({tokenAddresses:s,chainId:t,currency:r})}),initialResult:{}}),0===e.length){const e=await T(this,o,"f").fetchTokenPrices({tokenAddresses:[],chainId:t,currency:r});s={[(0,D.getNativeTokenAddress)(t)]:{currency:r,...e[(0,D.getNativeTokenAddress)(t)]}}}return Object.entries(s).reduce(((e,[t,r])=>e={...e,[t]:{...r}}),{})},v=async function({chainId:e,tokenAddresses:t,nativeCurrency:r}){const[n,a]=await Promise.all([T(this,s,"m",w).call(this,{tokenAddresses:t,chainId:e,nativeCurrency:_.FALL_BACK_VS_CURRENCY}),O({from:_.FALL_BACK_VS_CURRENCY,to:r})]);if(null===a)return{};const o=e=>e!==undefined&&null!==e?e*a:undefined;return Object.entries(n).reduce(((e,[t,s])=>e={...e,[t]:{...s,currency:r,price:o(s.price),marketCap:o(s.marketCap),allTimeHigh:o(s.allTimeHigh),allTimeLow:o(s.allTimeLow),totalVolume:o(s.totalVolume),high1d:o(s.high1d),low1d:o(s.low1d),dilutedMarketCap:o(s.dilutedMarketCap)}}),{})},r.default=M}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/TokenRatesController.cjs"}],[1376,{"./Standards/ERC20Standard.cjs":1369,"./Standards/NftStandards/ERC1155/ERC1155Standard.cjs":1370,"./assetsUtil.cjs":1377,"./token-service.cjs":1387,"@ethersproject/contracts":523,"@ethersproject/providers":561,"@metamask/base-controller":1396,"@metamask/contract-metadata":1420,"@metamask/controller-utils":1422,"@metamask/metamask-eth-abis":1944,"@metamask/rpc-errors":2304,"async-mutex":3450,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m,f,h,p,g,b,y,k,E,C,A,S,w=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},v=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},x=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.TokensController=r.getDefaultTokensState=void 0;const T=e("@ethersproject/contracts"),_=e("@ethersproject/providers"),j=e("@metamask/base-controller"),R=x(e("@metamask/contract-metadata")),I=e("@metamask/controller-utils"),B=e("@metamask/metamask-eth-abis"),P=e("@metamask/rpc-errors"),D=e("async-mutex"),N=e("uuid"),O=e("./assetsUtil.cjs"),F=e("./Standards/ERC20Standard.cjs"),M=e("./Standards/NftStandards/ERC1155/ERC1155Standard.cjs"),J=e("./token-service.cjs"),L={tokens:{persist:!0,anonymous:!1},ignoredTokens:{persist:!0,anonymous:!1},detectedTokens:{persist:!0,anonymous:!1},allTokens:{persist:!0,anonymous:!1},allIgnoredTokens:{persist:!0,anonymous:!1},allDetectedTokens:{persist:!0,anonymous:!1}},V="TokensController";r.getDefaultTokensState=()=>({tokens:[],ignoredTokens:[],detectedTokens:[],allTokens:{},allIgnoredTokens:{},allDetectedTokens:{}});class H extends j.BaseController{constructor({chainId:e,provider:t,state:m,messenger:h}){super({name:V,metadata:L,messenger:h,state:{...(0,r.getDefaultTokensState)(),...m}}),s.add(this),n.set(this,new D.Mutex),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),c.set(this,void 0),w(this,a,e,"f"),w(this,i,t,"f"),w(this,o,v(this,s,"m",A).call(this).id,"f"),w(this,c,new AbortController,"f"),this.messagingSystem.registerActionHandler(`${V}:addDetectedTokens`,this.addDetectedTokens.bind(this)),this.messagingSystem.subscribe("AccountsController:selectedEvmAccountChange",v(this,s,"m",d).bind(this)),this.messagingSystem.subscribe("NetworkController:networkDidChange",v(this,s,"m",l).bind(this)),this.messagingSystem.subscribe("NetworkController:stateChange",v(this,s,"m",u).bind(this)),this.messagingSystem.subscribe("TokenListController:stateChange",(({tokenList:e})=>{const{tokens:t}=this.state;t.length&&!t[0].name&&v(this,s,"m",f).call(this,e,"name")}))}async addToken({address:e,symbol:t,decimals:r,name:o,image:i,interactingAddress:c,networkClientId:l}){const u=v(this,a,"f"),d=await v(this,n,"f").acquire(),{allTokens:f,allIgnoredTokens:p,allDetectedTokens:g}=this.state;let b=u;l&&(b=this.messagingSystem.call("NetworkController:getNetworkClientById",l).configuration.chainId);const C=v(this,s,"m",k).call(this,c),A=v(this,s,"m",E).call(this,C);try{e=(0,I.toChecksumHexAddress)(e);const n=f[b]?.[C]||[],c=p[b]?.[C]||[],u=g[b]?.[C]||[],d=[...n],[k,E]=await Promise.all([v(this,s,"m",h).call(this,e,l),v(this,s,"m",m).call(this,e)]);if(!l&&b!==v(this,a,"f"))throw new Error("TokensController Error: Switched networks while adding token");const S={address:e,symbol:t,decimals:r,image:i||(0,O.formatIconUrlWithProxy)({chainId:b,tokenAddress:e}),isERC721:k,aggregators:(0,O.formatAggregatorNames)(E?.aggregators||[]),name:o},w=d.findIndex((t=>t.address.toLowerCase()===e.toLowerCase()));-1!==w?d[w]=S:d.push(S);const x=c.filter((t=>t.toLowerCase()!==e.toLowerCase())),T=u.filter((t=>t.address.toLowerCase()!==e.toLowerCase())),{newAllTokens:_,newAllIgnoredTokens:j,newAllDetectedTokens:R}=v(this,s,"m",y).call(this,{newTokens:d,newIgnoredTokens:x,newDetectedTokens:T,interactingAddress:C,interactingChainId:b});let B={allTokens:_,allIgnoredTokens:j,allDetectedTokens:R};return A&&(B={...B,tokens:d,ignoredTokens:x,detectedTokens:T}),this.update((e=>{Object.assign(e,B)})),d}finally{d()}}async addTokens(e,t){const r=await v(this,n,"f").acquire(),{allTokens:o,ignoredTokens:i,allDetectedTokens:c}=this.state,l={};let u;t&&(u=this.messagingSystem.call("NetworkController:getNetworkClientById",t).configuration.chainId);const d=[...o[u??v(this,a,"f")]?.[v(this,s,"m",A).call(this).address]||[],...e].reduce(((e,t)=>(e[t.address]=t,e)),{});try{e.forEach((e=>{const{address:t,symbol:r,decimals:s,image:n,aggregators:a,name:o}=e,i={address:(0,I.toChecksumHexAddress)(t),symbol:r,decimals:s,image:n,aggregators:a,name:o};return d[t]=i,l[t.toLowerCase()]=!0,i}));const t=Object.values(d),r=i.filter((e=>!d[e.toLowerCase()])),n=u?c?.[u]?.[v(this,s,"m",S).call(this)]:[],a=n?.filter((e=>!l[e.address.toLowerCase()])),{newAllTokens:o,newAllDetectedTokens:m,newAllIgnoredTokens:f}=v(this,s,"m",y).call(this,{newTokens:t,newDetectedTokens:a,newIgnoredTokens:r,interactingChainId:u});this.update((e=>{e.tokens=t,e.allTokens=o,e.detectedTokens=a,e.allDetectedTokens=m,e.ignoredTokens=r,e.allIgnoredTokens=f}))}finally{r()}}ignoreTokens(e,t){let r;t&&(r=this.messagingSystem.call("NetworkController:getNetworkClientById",t).configuration.chainId);const{allTokens:n,allDetectedTokens:o,allIgnoredTokens:i}=this.state,c={},l=i[r??v(this,a,"f")]?.[v(this,s,"m",S).call(this)]||[];let u=[...l];const d=n[r??v(this,a,"f")]?.[v(this,s,"m",S).call(this)]||[],m=o[r??v(this,a,"f")]?.[v(this,s,"m",S).call(this)]||[],f=e.map((e=>{const t=(0,I.toChecksumHexAddress)(e);return c[e.toLowerCase()]=!0,t}));u=[...l,...f];const h=m.filter((e=>!c[e.address.toLowerCase()])),p=d.filter((e=>!c[e.address.toLowerCase()])),{newAllIgnoredTokens:g,newAllDetectedTokens:b,newAllTokens:k}=v(this,s,"m",y).call(this,{newIgnoredTokens:u,newDetectedTokens:h,newTokens:p,interactingChainId:r});this.update((e=>{e.ignoredTokens=u,e.tokens=p,e.detectedTokens=h,e.allIgnoredTokens=g,e.allDetectedTokens=b,e.allTokens=k}))}async addDetectedTokens(e,t){const r=await v(this,n,"f").acquire(),o=t?.chainId??v(this,a,"f"),i=t?.selectedAddress??v(this,s,"m",S).call(this),{allTokens:c,allDetectedTokens:l,allIgnoredTokens:u}=this.state;let d=[...c?.[o]?.[i]??[]],m=[...l?.[o]?.[i]??[]];try{e.forEach((e=>{const{address:t,symbol:r,decimals:s,image:n,aggregators:a,isERC721:c,name:l}=e,f=(0,I.toChecksumHexAddress)(t),h={address:f,symbol:r,decimals:s,image:n,isERC721:c,aggregators:a,name:l},p=d.findIndex((e=>e.address.toLowerCase()===f.toLowerCase()));if(-1!==p)d[p]=h;else{if(-1===(u?.[o]?.[i]?.indexOf(t)??-1)){const e=m.findIndex((e=>e.address.toLowerCase()===f.toLowerCase()));-1!==e?m[e]=h:m.push(h)}}}));const{newAllTokens:t,newAllDetectedTokens:r}=v(this,s,"m",y).call(this,{newTokens:d,newDetectedTokens:m,interactingAddress:i,interactingChainId:o}),n=v(this,s,"m",S).call(this);d=t?.[v(this,a,"f")]?.[n]||[],m=r?.[v(this,a,"f")]?.[n]||[],this.update((e=>{e.tokens=d,e.allTokens=t,e.detectedTokens=m,e.allDetectedTokens=r}))}finally{r()}}async updateTokenType(e){const t=await v(this,s,"m",h).call(this,e),r=[...this.state.tokens],n=r.findIndex((t=>t.address.toLowerCase()===e.toLowerCase())),a={...r[n],isERC721:t};return r[n]=a,this.update((e=>{e.tokens=r})),a}async watchAsset({asset:e,type:t,interactingAddress:r,networkClientId:n}){if(t!==I.ERC20)throw new Error(`Asset of type ${t} not supported`);if(!e.address)throw P.rpcErrors.invalidParams("Address must be specified");if(!(0,I.isValidHexAddress)(e.address))throw P.rpcErrors.invalidParams(`Invalid address "${e.address}"`);const a=v(this,s,"m",k).call(this,r);if(await v(this,s,"m",h).call(this,e.address,n))throw P.rpcErrors.invalidParams(`Contract ${e.address} must match type ${t}, but was detected as ${I.ERC721}`);const o=v(this,s,"m",p).call(this,n);if(await(0,I.safelyExecute)((()=>new M.ERC1155Standard(o).contractSupportsBase1155Interface(e.address))))throw P.rpcErrors.invalidParams(`Contract ${e.address} must match type ${t}, but was detected as ${I.ERC1155}`);const i=new F.ERC20Standard(o),[c,l,u]=await Promise.all([(0,I.safelyExecute)((()=>i.getTokenName(e.address))),(0,I.safelyExecute)((()=>i.getTokenSymbol(e.address))),(0,I.safelyExecute)((async()=>i.getTokenDecimals(e.address)))]);if(e.name=c,!e.symbol&&!l)throw P.rpcErrors.invalidParams("A symbol is required, but was not found in either the request or contract");if(l!==undefined&&e.symbol!==undefined&&e.symbol.toUpperCase()!==l.toUpperCase())throw P.rpcErrors.invalidParams(`The symbol in the request (${e.symbol}) does not match the symbol in the contract (${l})`);if(e.symbol=l??e.symbol,"string"!=typeof e.symbol)throw P.rpcErrors.invalidParams("Invalid symbol: not a string");if(e.symbol.length>11)throw P.rpcErrors.invalidParams(`Invalid symbol "${e.symbol}": longer than 11 characters`);if(e.decimals===undefined&&u===undefined)throw P.rpcErrors.invalidParams("Decimals are required, but were not found in either the request or contract");if(u!==undefined&&e.decimals!==undefined&&String(e.decimals)!==u)throw P.rpcErrors.invalidParams(`The decimals in the request (${e.decimals}) do not match the decimals in the contract (${u})`);const d=u??e.decimals,m=parseInt(d,10);if(!Number.isInteger(m)||m>36||m<0)throw P.rpcErrors.invalidParams(`Invalid decimals "${d}": must be an integer 0 <= 36`);e.decimals=m;const f={asset:e,id:v(this,s,"m",b).call(this),time:Date.now(),type:t,interactingAddress:a};await v(this,s,"m",C).call(this,f);const{address:g,symbol:y,decimals:E,name:A,image:S}=e;await this.addToken({address:g,symbol:y,decimals:E,name:A,image:S,interactingAddress:f.interactingAddress,networkClientId:n})}clearIgnoredTokens(){this.update((e=>{e.ignoredTokens=[],e.allIgnoredTokens={}}))}resetState(){this.update((()=>(0,r.getDefaultTokensState)()))}}r.TokensController=H,n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,c=new WeakMap,s=new WeakSet,l=function({selectedNetworkClientId:e}){const t=this.messagingSystem.call("NetworkController:getNetworkClientById",e),{allTokens:r,allIgnoredTokens:n,allDetectedTokens:o}=this.state,{chainId:i}=t.configuration;v(this,c,"f").abort(),w(this,c,new AbortController,"f"),w(this,a,i,"f");const l=v(this,s,"m",S).call(this);this.update((e=>{e.tokens=r[i]?.[l]||[],e.ignoredTokens=n[i]?.[l]||[],e.detectedTokens=o[i]?.[l]||[]}))},u=function(e,t){for(const e of t)if("remove"===e.op&&"networkConfigurationsByChainId"===e.path[0]){const t=e.path[1];this.update((e=>{delete e.allTokens[t],delete e.allIgnoredTokens[t],delete e.allDetectedTokens[t]}))}},d=function(e){const{allTokens:t,allIgnoredTokens:r,allDetectedTokens:s}=this.state;w(this,o,e.id,"f"),this.update((n=>{n.tokens=t[v(this,a,"f")]?.[e.address]??[],n.ignoredTokens=r[v(this,a,"f")]?.[e.address]??[],n.detectedTokens=s[v(this,a,"f")]?.[e.address]??[]}))},m=async function(e){try{return await(0,J.fetchTokenMetadata)(v(this,a,"f"),e,v(this,c,"f").signal)}catch(e){if(e instanceof Error&&e.message.includes(J.TOKEN_METADATA_NO_SUPPORT_ERROR))return undefined;throw e}},f=function(e,t){const{tokens:r}=this.state,s=r.map((r=>{const s=e[r.address.toLowerCase()];return!r[t]&&s?.[t]?{...r,[t]:s[t]}:{...r}}));this.update((e=>{e.tokens=s}))},h=async function(e,t){const r=(0,I.toChecksumHexAddress)(e);if(!0===R.default[r]?.erc721)return Promise.resolve(!0);if(!0===R.default[r]?.erc20)return Promise.resolve(!1);const n=v(this,s,"m",g).call(this,e,B.abiERC721,t);try{return await n.supportsInterface(I.ERC721_INTERFACE_ID)}catch(e){return!1}},p=function(e){return new _.Web3Provider(e?this.messagingSystem.call("NetworkController:getNetworkClientById",e).provider:v(this,i,"f"))},g=function(e,t,r){const n=v(this,s,"m",p).call(this,r);return new T.Contract(e,t,n)},b=function(){return(0,N.v1)()},y=function(e){const{newTokens:t,newIgnoredTokens:r,newDetectedTokens:n,interactingAddress:o,interactingChainId:i}=e,{allTokens:c,allIgnoredTokens:l,allDetectedTokens:u}=this.state,d=v(this,s,"m",k).call(this,o),m=i??v(this,a,"f");let f=c;if(t?.length||t&&c&&c[m]&&c[m][d]){const e={...c[m],[d]:t};f={...c,[m]:e}}let h=l;if(r?.length||r&&l&&l[m]&&l[m][d]){const e={...l[m],[d]:r};h={...l,[m]:e}}let p=u;if(n?.length||n&&u&&u[m]&&u[m][d]){const e={...u[m],[d]:n};p={...u,[m]:e}}return{newAllTokens:f,newAllIgnoredTokens:h,newAllDetectedTokens:p}},k=function(e){return e||v(this,s,"m",S).call(this)},E=function(e){return v(this,s,"m",S).call(this)===e},C=async function(e){return this.messagingSystem.call("ApprovalController:addRequest",{id:e.id,origin:I.ORIGIN_METAMASK,type:I.ApprovalType.WatchAsset,requestData:{id:e.id,interactingAddress:e.interactingAddress,asset:{address:e.asset.address,decimals:e.asset.decimals,symbol:e.asset.symbol,image:e.asset.image||null}}},!0)},A=function(){return this.messagingSystem.call("AccountsController:getSelectedAccount")},S=function(){const e=this.messagingSystem.call("AccountsController:getAccount",v(this,o,"f"));return e?.address||""},r.default=H}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/TokensController.cjs"}],[1377,{"@metamask/controller-utils":1422,"@metamask/utils":2761,"bn.js":3513,multiformats:4463},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.fetchTokenContractExchangeRates=r.reduceInBatchesSerially=r.divideIntoBatches=r.ethersBigNumberToBN=r.addUrlProtocolPrefix=r.getFormattedIpfsUrl=r.getIpfsCIDv1AndPath=r.removeIpfsProtocolPrefix=r.isTokenListSupportedForNetwork=r.isTokenDetectionSupportedForNetwork=r.SupportedStakedBalanceNetworks=r.SupportedTokenDetectionNetworks=r.formatIconUrlWithProxy=r.formatAggregatorNames=r.hasNewCollectionFields=r.compareNftMetadata=r.TOKEN_PRICES_BATCH_SIZE=void 0;const n=e("@metamask/controller-utils"),a=e("@metamask/utils"),o=s(e("bn.js"));r.TOKEN_PRICES_BATCH_SIZE=30,r.compareNftMetadata=function(e,t){return["image","backgroundColor","imagePreview","imageThumbnail","imageOriginal","animation","animationOriginal","externalLink","tokenURI"].reduce(((r,s)=>e[s]&&e[s]!==t[s]?r+1:r),0)>0},r.hasNewCollectionFields=function(e,t){const r=Object.keys(e.collection??{}),s=new Set(Object.keys(t.collection??{}));return r.some((e=>!s.has(e)))};const i={aave:"Aave",bancor:"Bancor",cmc:"CMC",cryptocom:"Crypto.com",coinGecko:"CoinGecko",oneInch:"1inch",paraswap:"Paraswap",pmm:"PMM",zapper:"Zapper",zerion:"Zerion",zeroEx:"0x",synthetix:"Synthetix",yearn:"Yearn",apeswap:"ApeSwap",binanceDex:"BinanceDex",pancakeTop100:"PancakeTop100",pancakeExtended:"PancakeExtended",balancer:"Balancer",quickswap:"QuickSwap",matcha:"Matcha",pangolinDex:"PangolinDex",pangolinDexStableCoin:"PangolinDexStableCoin",pangolinDexAvaxBridge:"PangolinDexAvaxBridge",traderJoe:"TraderJoe",airswapLight:"AirswapLight",kleros:"Kleros"};r.formatAggregatorNames=e=>e.map((e=>i[e]||`${e[0].toUpperCase()}${e.substring(1,e.length)}`));var c,l;function u(e){return Object.values(c).includes(e)}function d(e){if(e.startsWith("ipfs://ipfs/"))return e.replace("ipfs://ipfs/","");if(e.startsWith("ipfs://"))return e.replace("ipfs://","");throw new Error("this method should not be used with non ipfs urls")}async function m(t){const r=d(t),s=r.indexOf("/"),n=-1!==s?r.substring(0,s):r,a=-1!==s?r.substring(s):undefined,{CID:o}=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("multiformats"));return{cid:o.parse(n).toV1().toString(),path:a}}function f(e){return e.match(/(^http:\/\/)|(^https:\/\/)/u)?e:`https://${e}`}function h(e,{batchSize:t}){const r=[];for(let s=0;s`https://static.cx.metamask.io/api/v1/tokenIcons/${(0,n.convertHexToDecimal)(e).toString()}/${t.toLowerCase()}.png`,function(e){e.mainnet="0x1",e.bsc="0x38",e.polygon="0x89",e.avax="0xa86a",e.aurora="0x4e454152",e.linea_goerli="0xe704",e.linea_mainnet="0xe708",e.arbitrum="0xa4b1",e.optimism="0xa",e.base="0x2105",e.zksync="0x144",e.cronos="0x19",e.celo="0xa4ec",e.gnosis="0x64",e.fantom="0xfa",e.polygon_zkevm="0x44d",e.moonbeam="0x504",e.moonriver="0x505"}(c||(r.SupportedTokenDetectionNetworks=c={})),function(e){e.mainnet="0x1",e.holesky="0x4268"}(l||(r.SupportedStakedBalanceNetworks=l={})),r.isTokenDetectionSupportedForNetwork=u,r.isTokenListSupportedForNetwork=function(e){return u(e)},r.removeIpfsProtocolPrefix=d,r.getIpfsCIDv1AndPath=m,r.getFormattedIpfsUrl=async function(e,t,r){const{host:s,protocol:n,origin:a}=new URL(f(e));if(r){const{cid:e,path:r}=await m(t);return`${n}//${e}.ipfs.${s}${r??""}`}return`${a}/ipfs/${d(t)}`},r.addUrlProtocolPrefix=f,r.ethersBigNumberToBN=function(e){return new o.default((0,a.remove0x)(e.toHexString()),"hex")},r.divideIntoBatches=h,r.reduceInBatchesSerially=p,r.fetchTokenContractExchangeRates=async function({tokenPricesService:e,nativeCurrency:t,tokenAddresses:s,chainId:a}){const o=e.validateChainIdSupported(a),i=e.validateCurrencySupported(t);if(!o||!i)return{};const c=await p({values:[...s].sort(),batchSize:r.TOKEN_PRICES_BATCH_SIZE,eachBatch:async(r,s)=>({...r,...await e.fetchTokenPrices({tokenAddresses:s,chainId:a,currency:t})}),initialResult:{}});return Object.entries(c).reduce(((e,[t,r])=>({...e,[(0,n.toChecksumHexAddress)(t)]:r?.price})),{})}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/assetsUtil.cjs"}],[1378,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s;Object.defineProperty(r,"__esModule",{value:!0}),r.Source=void 0,function(e){e.Custom="custom",e.Dapp="dapp",e.Detected="detected"}(s||(r.Source=s={}))}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/constants.cjs"}],[1379,{"@metamask/controller-utils":1422},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fetchMultiExchangeRate=r.fetchExchangeRate=void 0;const s=e("@metamask/controller-utils"),n=new Map([["MNT","MANTLE"],["OMNI","OMNINET"]]),a="https://min-api.cryptocompare.com";function o(e){if("Error"===e.Response)throw new Error(e.Message)}r.fetchExchangeRate=async function(e,t,r){const i=await(0,s.handleFetch)(function(e,t,r){t=t.toUpperCase();const s=n.get(t)??t;return`${a}/data/price?fsym=${s}&tsyms=${e.toUpperCase()}`+(r&&"USD"!==e.toUpperCase()?",USD":"")}(e,t,r));o(i);const c=Number(i[e.toUpperCase()]),l=Number(i.USD);if(!Number.isFinite(c))throw new Error(`Invalid response for ${e.toUpperCase()}: ${i[e.toUpperCase()]}`);if(r&&!Number.isFinite(l))throw new Error(`Invalid response for usdConversionRate: ${i.USD}`);return{conversionRate:c,usdConversionRate:l}},r.fetchMultiExchangeRate=async function(e,t,r){const n=function(e,t,r=!1){const s=r&&!t.some((e=>"USD"===e.toUpperCase()))?[...t,"USD"]:t,n=new URLSearchParams;n.append("fsyms",e.join(",")),n.append("tsyms",s.join(","));const o=new URL(`${a}/data/pricemulti`);return o.search=n.toString(),o.toString()}(t,[e],r),i=await(0,s.handleFetch)(n);o(i);const c={};for(const[t,s]of Object.entries(i))c[t.toLowerCase()]={[e.toLowerCase()]:s[e.toUpperCase()],...r&&{usd:s.USD}};return c}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/crypto-compare-service/crypto-compare.cjs"}],[1380,{"./crypto-compare.cjs":1379},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fetchMultiExchangeRate=r.fetchExchangeRate=void 0;var s=e("./crypto-compare.cjs");Object.defineProperty(r,"fetchExchangeRate",{enumerable:!0,get:function(){return s.fetchExchangeRate}}),Object.defineProperty(r,"fetchMultiExchangeRate",{enumerable:!0,get:function(){return s.fetchMultiExchangeRate}})}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/crypto-compare-service/index.cjs"}],[1381,{"./AccountTrackerController.cjs":1362,"./AssetsContractController.cjs":1363,"./CurrencyRateController.cjs":1364,"./NftController.cjs":1365,"./NftDetectionController.cjs":1366,"./RatesController/index.cjs":1368,"./TokenBalancesController.cjs":1372,"./TokenDetectionController.cjs":1373,"./TokenListController.cjs":1374,"./TokenRatesController.cjs":1375,"./TokensController.cjs":1376,"./assetsUtil.cjs":1377,"./token-prices-service/index.cjs":1386},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.Cryptocurrency=r.RatesController=r.getNativeTokenAddress=r.SUPPORTED_CHAIN_IDS=r.CodefiTokenPricesServiceV2=r.fetchTokenContractExchangeRates=r.getFormattedIpfsUrl=r.formatIconUrlWithProxy=r.isTokenDetectionSupportedForNetwork=r.TokensController=r.TokenRatesController=r.getDefaultTokenRatesControllerState=r.TokenListController=r.TokenDetectionController=r.TokenBalancesController=r.NftDetectionController=r.NftController=r.getDefaultNftControllerState=r.AssetsContractController=r.SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID=r.AccountTrackerController=void 0;var a=e("./AccountTrackerController.cjs");Object.defineProperty(r,"AccountTrackerController",{enumerable:!0,get:function(){return a.AccountTrackerController}});var o=e("./AssetsContractController.cjs");Object.defineProperty(r,"SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID",{enumerable:!0,get:function(){return o.SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID}}),Object.defineProperty(r,"AssetsContractController",{enumerable:!0,get:function(){return o.AssetsContractController}}),n(e("./CurrencyRateController.cjs"),r);var i=e("./NftController.cjs");Object.defineProperty(r,"getDefaultNftControllerState",{enumerable:!0,get:function(){return i.getDefaultNftControllerState}}),Object.defineProperty(r,"NftController",{enumerable:!0,get:function(){return i.NftController}});var c=e("./NftDetectionController.cjs");Object.defineProperty(r,"NftDetectionController",{enumerable:!0,get:function(){return c.NftDetectionController}});var l=e("./TokenBalancesController.cjs");Object.defineProperty(r,"TokenBalancesController",{enumerable:!0,get:function(){return l.TokenBalancesController}});var u=e("./TokenDetectionController.cjs");Object.defineProperty(r,"TokenDetectionController",{enumerable:!0,get:function(){return u.TokenDetectionController}});var d=e("./TokenListController.cjs");Object.defineProperty(r,"TokenListController",{enumerable:!0,get:function(){return d.TokenListController}});var m=e("./TokenRatesController.cjs");Object.defineProperty(r,"getDefaultTokenRatesControllerState",{enumerable:!0,get:function(){return m.getDefaultTokenRatesControllerState}}),Object.defineProperty(r,"TokenRatesController",{enumerable:!0,get:function(){return m.TokenRatesController}});var f=e("./TokensController.cjs");Object.defineProperty(r,"TokensController",{enumerable:!0,get:function(){return f.TokensController}});var h=e("./assetsUtil.cjs");Object.defineProperty(r,"isTokenDetectionSupportedForNetwork",{enumerable:!0,get:function(){return h.isTokenDetectionSupportedForNetwork}}),Object.defineProperty(r,"formatIconUrlWithProxy",{enumerable:!0,get:function(){return h.formatIconUrlWithProxy}}),Object.defineProperty(r,"getFormattedIpfsUrl",{enumerable:!0,get:function(){return h.getFormattedIpfsUrl}}),Object.defineProperty(r,"fetchTokenContractExchangeRates",{enumerable:!0,get:function(){return h.fetchTokenContractExchangeRates}});var p=e("./token-prices-service/index.cjs");Object.defineProperty(r,"CodefiTokenPricesServiceV2",{enumerable:!0,get:function(){return p.CodefiTokenPricesServiceV2}}),Object.defineProperty(r,"SUPPORTED_CHAIN_IDS",{enumerable:!0,get:function(){return p.SUPPORTED_CHAIN_IDS}}),Object.defineProperty(r,"getNativeTokenAddress",{enumerable:!0,get:function(){return p.getNativeTokenAddress}});var g=e("./RatesController/index.cjs");Object.defineProperty(r,"RatesController",{enumerable:!0,get:function(){return g.RatesController}}),Object.defineProperty(r,"Cryptocurrency",{enumerable:!0,get:function(){return g.Cryptocurrency}})}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/index.cjs"}],[1382,{"./multi-chain-accounts.cjs":1383},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fetchSupportedNetworks=r.fetchMultiChainBalances=void 0;var s=e("./multi-chain-accounts.cjs");Object.defineProperty(r,"fetchMultiChainBalances",{enumerable:!0,get:function(){return s.fetchMultiChainBalances}}),Object.defineProperty(r,"fetchSupportedNetworks",{enumerable:!0,get:function(){return s.fetchSupportedNetworks}})}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/multi-chain-accounts-service/index.cjs"}],[1383,{"@metamask/controller-utils":1422},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fetchMultiChainBalances=r.fetchSupportedNetworks=r.MULTICHAIN_ACCOUNTS_DOMAIN=void 0;const s=e("@metamask/controller-utils");r.MULTICHAIN_ACCOUNTS_DOMAIN="https://accounts.api.cx.metamask.io";r.fetchSupportedNetworks=async function(){const e=new URL(`${r.MULTICHAIN_ACCOUNTS_DOMAIN}/v1/supportedNetworks`);return(await(0,s.handleFetch)(e)).fullSupport},r.fetchMultiChainBalances=async function(e,t,n){const a=((e,t)=>{const s=new URL(`${r.MULTICHAIN_ACCOUNTS_DOMAIN}/v2/accounts/${e}/balances`);return t?.networks!==undefined&&s.searchParams.append("networks",t.networks),s})(e,{networks:t?.networks?.join()});return await(0,s.handleFetch)(a,{headers:{"x-metamask-clientproduct":`metamask-${n}`}})}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/multi-chain-accounts-service/multi-chain-accounts.cjs"}],[1384,{"./assetsUtil.cjs":1377,"@ethersproject/contracts":523},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.multicallOrFallback=void 0;const s=e("@ethersproject/contracts"),n=e("./assetsUtil.cjs"),a={"0x1":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3":"0xcA11bde05977b3631167028862bE2a173976CA11","0xaa36a7":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4268":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5e9":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1b6e6":"0xcA11bde05977b3631167028862bE2a173976CA11","0x18fc4a":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa":"0xcA11bde05977b3631167028862bE2a173976CA11","0x45":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1a4":"0xcA11bde05977b3631167028862bE2a173976CA11","0xaa37dc":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa4b1":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa4ba":"0xcA11bde05977b3631167028862bE2a173976CA11","0x66eed":"0xcA11bde05977b3631167028862bE2a173976CA11","0x66eee":"0xcA11bde05977b3631167028862bE2a173976CA11","0x66eeb":"0xcA11bde05977b3631167028862bE2a173976CA11","0x15f2249":"0xcA11bde05977b3631167028862bE2a173976CA11","0x89":"0xcA11bde05977b3631167028862bE2a173976CA11","0x13881":"0xcA11bde05977b3631167028862bE2a173976CA11","0x13882":"0xcA11bde05977b3631167028862bE2a173976CA11","0x44d":"0xca11bde05977b3631167028862be2a173976ca11","0x5a2":"0xca11bde05977b3631167028862be2a173976ca11","0x98a":"0xca11bde05977b3631167028862be2a173976ca11","0x64":"0xcA11bde05977b3631167028862bE2a173976CA11","0x27d8":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa86a":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa869":"0xcA11bde05977b3631167028862bE2a173976CA11","0xfa2":"0xcA11bde05977b3631167028862bE2a173976CA11","0xfa":"0xcA11bde05977b3631167028862bE2a173976CA11","0xfaf0":"0xca11bde05977b3631167028862be2a173976ca11","0x38":"0xcA11bde05977b3631167028862bE2a173976CA11","0x61":"0xcA11bde05977b3631167028862bE2a173976CA11","0x15eb":"0xcA11bde05977b3631167028862bE2a173976CA11","0xcc":"0xcA11bde05977b3631167028862bE2a173976CA11","0x504":"0xcA11bde05977b3631167028862bE2a173976CA11","0x505":"0xcA11bde05977b3631167028862bE2a173976CA11","0x507":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2a15c308d":"0xca11bde05977b3631167028862be2a173976ca11","0x2a15c3083":"0xca11bde05977b3631167028862be2a173976ca11","0x63564c40":"0xcA11bde05977b3631167028862bE2a173976CA11","0x19":"0xcA11bde05977b3631167028862bE2a173976CA11","0x152":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5535072":"0xcA11bde05977b3631167028862bE2a173976CA11","0x6c1":"0xcA11bde05977b3631167028862bE2a173976CA11","0x7a":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe":"0xcA11bde05977b3631167028862bE2a173976CA11","0x13":"0xcA11bde05977b3631167028862bE2a173976CA11","0x10":"0xcA11bde05977b3631167028862bE2a173976CA11","0x72":"0xcA11bde05977b3631167028862bE2a173976CA11","0x120":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4e454152":"0xcA11bde05977b3631167028862bE2a173976CA11","0x250":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5c2359":"0xcA11bde05977b3631167028862bE2a173976CA11","0xec0":"0xcA11bde05977b3631167028862bE2a173976CA11","0x42":"0xcA11bde05977b3631167028862bE2a173976CA11","0x80":"0xcA11bde05977b3631167028862bE2a173976CA11","0x440":"0xcA11bde05977b3631167028862bE2a173976CA11","0x257":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe9fe":"0xcA11bde05977b3631167028862bE2a173976CA11","0xd3a0":"0xcA11bde05977b3631167028862bE2a173976CA11","0x84444":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1e":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1f":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2329":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2328":"0xcA11bde05977b3631167028862bE2a173976CA11","0x6c":"0xcA11bde05977b3631167028862bE2a173976CA11","0x12":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa516":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5afe":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa4ec":"0xcA11bde05977b3631167028862bE2a173976CA11","0xaef3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x116ea":"0xcA11bde05977b3631167028862bE2a173976CA11","0x116e9":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2019":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3e9":"0xca11bde05977b3631167028862be2a173976ca11","0x7d1":"0xcA11bde05977b3631167028862bE2a173976CA11","0x141":"0xcA11bde05977b3631167028862bE2a173976CA11","0x6a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x28":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4d2":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1e14":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1e15":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1251":"0xcA11bde05977b3631167028862bE2a173976CA11","0x7f08":"0xcA11bde05977b3631167028862bE2a173976CA11","0x8ae":"0xcA11bde05977b3631167028862bE2a173976CA11","0x138b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1389":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1388":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1f92":"0xcA11bde05977b3631167028862bE2a173976CA11","0x14a33":"0xca11bde05977b3631167028862be2a173976ca11","0x14a34":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2105":"0xca11bde05977b3631167028862be2a173976ca11","0x936":"0xcA11bde05977b3631167028862bE2a173976CA11","0xff":"0xcA11bde05977b3631167028862bE2a173976CA11","0x46a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x46b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x8a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x14f":"0xcA11bde05977b3631167028862bE2a173976CA11","0xd2af":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe9ac0ce":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe705":"0xca11bde05977b3631167028862be2a173976ca11","0xe704":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe708":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2b6f":"0xcA11bde05977b3631167028862bE2a173976CA11","0x39":"0xcA11bde05977b3631167028862bE2a173976CA11","0x23a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1644":"0xcA11bde05977b3631167028862bE2a173976CA11","0xdea8":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3af":"0xcA11bde05977b3631167028862bE2a173976CA11","0x171":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3e7":"0xcA11bde05977b3631167028862bE2a173976CA11","0x76adf1":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3b9ac9ff":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2c":"0xca11bde05977b3631167028862be2a173976ca11","0x2e":"0xca11bde05977b3631167028862be2a173976ca11","0x15b3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x82751":"0xcA11bde05977b3631167028862bE2a173976CA11","0x8274f":"0xca11bde05977b3631167028862be2a173976ca11","0x82750":"0xcA11bde05977b3631167028862bE2a173976CA11","0x96f":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3cc5":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4571":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe99":"0xcA11bde05977b3631167028862bE2a173976CA11","0x7d0":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1297":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1d5e":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3a14269b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x561bf78b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x235ddd0":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3cd156dc":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5d456c62":"0xcA11bde05977b3631167028862bE2a173976CA11","0x79f99296":"0xcA11bde05977b3631167028862bE2a173976CA11","0x585eb4b1":"0xcA11bde05977b3631167028862bE2a173976CA11","0x507aaa2a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1fc3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x32d":"0xcA11bde05977b3631167028862bE2a173976CA11","0x8a73":"0xcA11bde05977b3631167028862bE2a173976CA11","0x8a72":"0xcA11bde05977b3631167028862bE2a173976CA11","0x8a71":"0xcA11bde05977b3631167028862bE2a173976CA11","0xe9ac0d6":"0xca11bde05977b3631167028862be2a173976ca11","0x1069":"0xcA11bde05977b3631167028862bE2a173976CA11","0x7e5":"0xcA11bde05977b3631167028862bE2a173976CA11","0x53":"0xca11bde05977b3631167028862be2a173976ca11","0x52":"0xca11bde05977b3631167028862be2a173976ca11","0xe298":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1a8":"0xcA11bde05977b3631167028862bE2a173976CA11","0x94":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2c6":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2803":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2802":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa9":"0xcA11bde05977b3631167028862bE2a173976CA11","0x28c5f":"0xcA11bde05977b3631167028862bE2a173976CA11","0x28c60":"0xcA11bde05977b3631167028862bE2a173976CA11","0x13a":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4cb2f":"0xdbfa261cd7d17bb40479a0493ad6c0fee435859e","0x7f93":"0xcA11bde05977b3631167028862bE2a173976CA11","0xb660":"0xcA11bde05977b3631167028862bE2a173976CA11","0xb02113d3f":"0xcA11bde05977b3631167028862bE2a173976CA11","0xdad":"0xcA11bde05977b3631167028862bE2a173976CA11","0xdae":"0xcA11bde05977b3631167028862bE2a173976CA11","0x15b38":"0xcA11bde05977b3631167028862bE2a173976CA11","0x15b32":"0xcA11bde05977b3631167028862bE2a173976CA11","0x45c":"0xcA11bde05977b3631167028862bE2a173976CA11","0x45b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3d":"0xcA11bde05977b3631167028862bE2a173976CA11","0x41a6ace":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa729":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1f47b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1b59":"0xca11bde05977b3631167028862be2a173976ca11","0x1b58":"0xcA11bde05977b3631167028862bE2a173976CA11","0xc3":"0xca11bde05977b3631167028862be2a173976ca11","0x16fd8":"0xcA11bde05977b3631167028862bE2a173976CA11","0xc7":"0xca11bde05977b3631167028862be2a173976ca11","0x405":"0xca11bde05977b3631167028862be2a173976ca11","0x334":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1ce":"0xca11bde05977b3631167028862be2a173976ca11","0x1cf":"0xca11bde05977b3631167028862be2a173976ca11","0xa70e":"0xcA11bde05977b3631167028862bE2a173976CA11","0x868b":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa0c71fd":"0xcA11bde05977b3631167028862bE2a173976CA11","0x13e31":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa1337":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1f2b":"0xcA11bde05977b3631167028862bE2a173976CA11","0xf63":"0xcA11bde05977b3631167028862bE2a173976CA11","0x144":"0xF9cda624FBC7e059355ce98a31693d299FACd963","0x118":"0xF9cda624FBC7e059355ce98a31693d299FACd963","0x12c":"0xF9cda624FBC7e059355ce98a31693d299FACd963","0x18995f":"0xF9cda624FBC7e059355ce98a31693d299FACd963","0x2b74":"0xF9cda624FBC7e059355ce98a31693d299FACd963","0xfc":"0xcA11bde05977b3631167028862bE2a173976CA11","0x9da":"0xcA11bde05977b3631167028862bE2a173976CA11","0x137":"0xcA11bde05977b3631167028862bE2a173976CA11","0x13ed":"0xcA11bde05977b3631167028862bE2a173976CA11","0x24b1":"0xcA11bde05977b3631167028862bE2a173976CA11","0xba9302":"0xcA11bde05977b3631167028862bE2a173976CA11","0x7c8":"0xcA11bde05977b3631167028862bE2a173976CA11","0x138d5":"0xcA11bde05977b3631167028862bE2a173976CA11","0x6d":"0xcA11bde05977b3631167028862bE2a173976CA11","0x343b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x34a1":"0xcA11bde05977b3631167028862bE2a173976CA11","0x3109":"0xcA11bde05977b3631167028862bE2a173976CA11","0x91b":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa96":"0xcA11bde05977b3631167028862bE2a173976CA11","0x22c3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2be3":"0xcA11bde05977b3631167028862bE2a173976CA11","0xbf03":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1b254":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa7b14":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2276":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1b9e":"0xcA11bde05977b3631167028862bE2a173976CA11","0x6a63bb8":"0xcA11bde05977b3631167028862bE2a173976CA11","0x15af3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x15af1":"0xcA11bde05977b3631167028862bE2a173976CA11","0xae3f3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x531":"0xcA11bde05977b3631167028862bE2a173976CA11","0x28c61":"0xcA11bde05977b3631167028862bE2a173976CA11","0x28c58":"0xca11bde05977b3631167028862be2a173976ca11","0x1d88":"0xcA11bde05977b3631167028862bE2a173976CA11","0x5b9b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4c7e1":"0xcA11bde05977b3631167028862bE2a173976CA11","0xa53b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1a2b":"0xcA11bde05977b3631167028862bE2a173976CA11","0x406":"0xca11bde05977b3631167028862be2a173976ca11","0x2cef":"0xcA11bde05977b3631167028862bE2a173976CA11","0x18b2":"0xca11bde05977b3631167028862be2a173976ca11","0x182a9":"0xcA11bde05977b3631167028862bE2a173976CA11","0xc4":"0xcA11bde05977b3631167028862bE2a173976CA11","0xfdd":"0xcA11bde05977b3631167028862bE2a173976CA11","0xfde":"0xcA11bde05977b3631167028862bE2a173976CA11","0x99c0a0f":"0xca11bde05977b3631167028862be2a173976ca11","0x22cf":"0xcA11bde05977b3631167028862bE2a173976CA11","0x310c5":"0xca11bde05977b3631167028862be2a173976ca11","0x46f":"0xcA11bde05977b3631167028862bE2a173976CA11","0x659":"0xca11bde05977b3631167028862be2a173976ca11","0x139c968f9":"0xcA11bde05977b3631167028862bE2a173976CA11","0xed88":"0xcA11bde05977b3631167028862bE2a173976CA11","0xd036":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1f3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x31bf8c3":"0xcA11bde05977b3631167028862bE2a173976CA11","0x1cbc67bfdc":"0xcA11bde05977b3631167028862bE2a173976CA11","0x98967f":"0xcA11bde05977b3631167028862bE2a173976CA11","0x4f588":"0xcA11bde05977b3631167028862bE2a173976CA11","0x16db":"0xca11bde05977b3631167028862be2a173976ca11","0x3a":"0xca11bde05977b3631167028862be2a173976ca11","0x59":"0xca11bde05977b3631167028862be2a173976ca11","0x1e0":"0xcA11bde05977b3631167028862bE2a173976CA11","0x2eb":"0xcA11bde05977b3631167028862bE2a173976CA11","0x221":"0xcA11bde05977b3631167028862bE2a173976CA11"},o=[{name:"tryAggregate",type:"function",stateMutability:"payable",inputs:[{name:"requireSuccess",type:"bool"},{name:"calls",type:"tuple[]",components:[{name:"target",type:"address"},{name:"callData",type:"bytes"}]}],outputs:[{name:"returnData",type:"tuple[]",components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}]}]}];r.multicallOrFallback=async(e,t,r,i=300,c=20)=>{if(0===e.length)return[];const l=a[t];if(l)try{return await(async(e,t,r,a)=>{const i=new s.Contract(t,o,r);return await(0,n.reduceInBatchesSerially)({values:e,batchSize:a,initialResult:[],eachBatch:async(e,t)=>{const r=t.map((e=>({target:e.contract.address,callData:e.contract.interface.encodeFunctionData(e.contract.interface.functions[e.functionSignature],e.arguments)})));return[...e,...(await i.callStatic.tryAggregate(!1,r)).map(((e,r)=>({success:e.success,value:e.success?t[r].contract.interface.decodeFunctionResult(t[r].functionSignature,e.returnData)[0]:undefined})))]}})})(e,l,r,i)}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"CALL_EXCEPTION"!==e.code)throw e}return await(async(e,t)=>await(0,n.reduceInBatchesSerially)({values:e,batchSize:t,initialResult:[],eachBatch:async(e,t)=>[...e,...(await Promise.allSettled(t.map((e=>e.contract[e.functionSignature](...e.arguments))))).map((e=>({success:"fulfilled"===e.status,value:"fulfilled"===e.status?e.value:undefined})))]}))(e,c)}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/multicall.cjs"}],[1385,{"@metamask/controller-utils":1422,"@metamask/utils":2761,cockatiel:3612},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.CodefiTokenPricesServiceV2=r.SUPPORTED_CHAIN_IDS=r.getNativeTokenAddress=r.ZERO_ADDRESS=r.SUPPORTED_CURRENCIES=void 0;const o=e("@metamask/controller-utils"),i=e("@metamask/utils"),c=e("cockatiel");r.SUPPORTED_CURRENCIES=["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","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"],r.ZERO_ADDRESS="0x0000000000000000000000000000000000000000";const l={"0x89":"0x0000000000000000000000000000000000001010"};r.getNativeTokenAddress=e=>l[e]??r.ZERO_ADDRESS,r.SUPPORTED_CHAIN_IDS=["0x1","0xa","0x19","0x38","0x39","0x42","0x46","0x52","0x58","0x64","0x6a","0x7a","0x80","0x89","0xfa","0x120","0x141","0x144","0x169","0x440","0x504","0x505","0x1388","0x2105","0x150","0x2710","0xa4b1","0xa4ec","0xa516","0xa86a","0x518af","0x4e454152","0x63564c40","0xe708"];r.CodefiTokenPricesServiceV2=class{constructor({degradedThreshold:e=5e3,retries:t=3,maximumConsecutiveFailures:r=12,onBreak:a,onDegraded:o,circuitBreakDuration:i=18e5}={}){s.set(this,void 0);const l=(0,c.retry)(c.handleAll,{maxAttempts:t,backoff:new c.ExponentialBackoff}),u=(0,c.circuitBreaker)(c.handleAll,{halfOpenAfter:i,breaker:new c.ConsecutiveBreaker(r)});a&&u.onBreak(a),o&&(l.onGiveUp((()=>{u.state===c.CircuitState.Closed&&o()})),l.onSuccess((({duration:t})=>{u.state===c.CircuitState.Closed&&t>e&&o()}))),n(this,s,(0,c.wrap)(l,u),"f")}async fetchTokenPrices({chainId:e,tokenAddresses:t,currency:n}){const c=(0,i.hexToNumber)(e),l=new URL(`https://price.api.cx.metamask.io/v2/chains/${c}/spot-prices`);l.searchParams.append("tokenAddresses",[(0,r.getNativeTokenAddress)(e),...t].join(",")),l.searchParams.append("vsCurrency",n),l.searchParams.append("includeMarketData","true");const u=await a(this,s,"f").execute((()=>(0,o.handleFetch)(l,{headers:{"Cache-Control":"no-cache"}})));return[(0,r.getNativeTokenAddress)(e),...t].reduce(((e,t)=>{const r=t.toLowerCase(),s=u[r];if(!s)return e;const a={tokenAddress:t,currency:n,...s};return{...e,[t]:a}}),{})}validateChainIdSupported(e){const t=r.SUPPORTED_CHAIN_IDS;return"string"==typeof e&&t.includes(e)}validateCurrencySupported(e){const t=r.SUPPORTED_CURRENCIES;return"string"==typeof e&&t.includes(e.toLowerCase())}},s=new WeakMap}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/token-prices-service/codefi-v2.cjs"}],[1386,{"./codefi-v2.cjs":1385},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getNativeTokenAddress=r.SUPPORTED_CHAIN_IDS=r.CodefiTokenPricesServiceV2=void 0;var s=e("./codefi-v2.cjs");Object.defineProperty(r,"CodefiTokenPricesServiceV2",{enumerable:!0,get:function(){return s.CodefiTokenPricesServiceV2}}),Object.defineProperty(r,"SUPPORTED_CHAIN_IDS",{enumerable:!0,get:function(){return s.SUPPORTED_CHAIN_IDS}}),Object.defineProperty(r,"getNativeTokenAddress",{enumerable:!0,get:function(){return s.getNativeTokenAddress}})}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/token-prices-service/index.cjs"}],[1387,{"./assetsUtil.cjs":1377,"@metamask/controller-utils":1422},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fetchTokenMetadata=r.fetchTokenListByChainId=r.TOKEN_METADATA_NO_SUPPORT_ERROR=r.TOKEN_END_POINT_API=void 0;const s=e("@metamask/controller-utils"),n=e("./assetsUtil.cjs");r.TOKEN_END_POINT_API="https://token.api.cx.metamask.io",r.TOKEN_METADATA_NO_SUPPORT_ERROR="TokenService Error: Network does not support fetchTokenMetadata";async function a(e,t,r){const n={referrer:e,referrerPolicy:"no-referrer-when-downgrade",method:"GET",mode:"cors",signal:t,cache:"default"};n.headers=new window.Headers,n.headers.set("Content-Type","application/json");try{return await(0,s.timeoutFetch)(e,n,r)}catch(e){e instanceof Error&&"AbortError"===e.name&&console.log("Request is aborted")}return undefined}async function o(e){const t=await e.json();if(t?.error)throw new Error(`TokenService Error: ${t.error}`);return t}r.fetchTokenListByChainId=async function(e,t,{timeout:n=1e4}={}){const i=function(e){const t=e===s.ChainId["linea-mainnet"]?1:3;return`${r.TOKEN_END_POINT_API}/tokens/${(0,s.convertHexToDecimal)(e)}?occurrenceFloor=${t}&includeNativeAssets=false&includeTokenFees=false&includeAssetType=false&includeERC20Permit=false&includeStorage=false`}(e),c=await a(i,t,n);if(c){const t=await o(c);return Array.isArray(t)&&e===s.ChainId["linea-mainnet"]?t.filter((e=>e.aggregators.includes("lineaTeam")||e.aggregators.length>=3)):t}return undefined},r.fetchTokenMetadata=async function(e,t,i,{timeout:c=1e4}={}){if(!(0,n.isTokenListSupportedForNetwork)(e))throw new Error(r.TOKEN_METADATA_NO_SUPPORT_ERROR);const l=function(e,t){return`${r.TOKEN_END_POINT_API}/token/${(0,s.convertHexToDecimal)(e)}?address=${t}`}(e,t),u=await a(l,i,c);return u?o(u):undefined}}}},{package:"@metamask/assets-controllers",file:"node_modules/@metamask/assets-controllers/dist/token-service.cjs"}],[1388,{"fast-json-stable-stringify":3903,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.AbstractPollingControllerBaseMixin=r.getKey=void 0;const a=n(e("fast-json-stable-stringify")),o=e("uuid");r.getKey=e=>(0,a.default)(e),r.AbstractPollingControllerBaseMixin=function(e){var t,n;return t=new WeakMap,n=new WeakMap,class extends e{constructor(){super(...arguments),t.set(this,new Map),n.set(this,new Map)}startPolling(e){const n=(0,o.v4)(),a=(0,r.getKey)(e),i=s(this,t,"f").get(a)??new Set;return i.add(n),s(this,t,"f").set(a,i),1===i.size&&this._startPolling(e),n}stopAllPolling(){s(this,t,"f").forEach(((e,t)=>{e.forEach((e=>{this.stopPollingByPollingToken(e)}))}))}stopPollingByPollingToken(e){if(!e)throw new Error("pollingToken required");let r=null;for(const[n,a]of s(this,t,"f"))if(a.delete(e)){0===a.size&&(r=n);break}if(r){this._stopPollingByPollingTokenSetId(r),s(this,t,"f").delete(r);const e=s(this,n,"f").get(r);if(e){for(const t of e)t(JSON.parse(r));e.clear()}}}onPollingComplete(e,t){const a=(0,r.getKey)(e),o=s(this,n,"f").get(a)??new Set;o.add(t),s(this,n,"f").set(a,o)}}}}}},{package:"@metamask/assets-controllers>@metamask/polling-controller",file:"node_modules/@metamask/assets-controllers/node_modules/@metamask/polling-controller/dist/AbstractPollingController.cjs"}],[1389,{"./AbstractPollingController.cjs":1388,"@metamask/base-controller":1396},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.BlockTrackerPollingControllerV1=r.BlockTrackerPollingController=r.BlockTrackerPollingControllerOnly=void 0;const n=e("@metamask/base-controller"),a=e("./AbstractPollingController.cjs");function o(e){var t;class r extends((0,a.AbstractPollingControllerBaseMixin)(e)){constructor(){super(...arguments),t.set(this,{})}_startPolling(e){const r=(0,a.getKey)(e);if(s(this,t,"f")[r])return;const n=this._getNetworkClientById(e.networkClientId);if(!n)throw new Error(`Unable to retrieve blockTracker for networkClientId ${e.networkClientId}`);{const a=this._executePoll.bind(this,e);n.blockTracker.addListener("latest",a),s(this,t,"f")[r]=a}}_stopPollingByPollingTokenSetId(e){const{networkClientId:r}=JSON.parse(e),n=this._getNetworkClientById(r);if(n&&s(this,t,"f")[e]){const r=s(this,t,"f")[e];r&&(n.blockTracker.removeListener("latest",r),delete s(this,t,"f")[e])}}}return t=new WeakMap,r}class i{}r.BlockTrackerPollingControllerOnly=()=>o(i);r.BlockTrackerPollingController=()=>o(n.BaseController);r.BlockTrackerPollingControllerV1=()=>o(n.BaseControllerV1)}}},{package:"@metamask/assets-controllers>@metamask/polling-controller",file:"node_modules/@metamask/assets-controllers/node_modules/@metamask/polling-controller/dist/BlockTrackerPollingController.cjs"}],[1390,{"./AbstractPollingController.cjs":1388,"@metamask/base-controller":1396},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},n=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.StaticIntervalPollingControllerV1=r.StaticIntervalPollingController=r.StaticIntervalPollingControllerOnly=void 0;const a=e("@metamask/base-controller"),o=e("./AbstractPollingController.cjs");function i(e){var t,r;class a extends((0,o.AbstractPollingControllerBaseMixin)(e)){constructor(){super(...arguments),t.set(this,{}),r.set(this,1e3)}setIntervalLength(e){s(this,r,e,"f")}getIntervalLength(){return n(this,r,"f")}_startPolling(e){if(!n(this,r,"f"))throw new Error("intervalLength must be defined and greater than 0");const s=(0,o.getKey)(e),a=n(this,t,"f")[s];this._stopPollingByPollingTokenSetId(s);const i=n(this,t,"f")[s]=setTimeout((async()=>{try{await this._executePoll(e)}catch(e){console.error(e)}i===n(this,t,"f")[s]&&this._startPolling(e)}),a?n(this,r,"f"):0)}_stopPollingByPollingTokenSetId(e){const r=n(this,t,"f")[e];r&&(clearTimeout(r),delete n(this,t,"f")[e])}}return t=new WeakMap,r=new WeakMap,a}class c{}r.StaticIntervalPollingControllerOnly=()=>i(c);r.StaticIntervalPollingController=()=>i(a.BaseController);r.StaticIntervalPollingControllerV1=()=>i(a.BaseControllerV1)}}},{package:"@metamask/assets-controllers>@metamask/polling-controller",file:"node_modules/@metamask/assets-controllers/node_modules/@metamask/polling-controller/dist/StaticIntervalPollingController.cjs"}],[1391,{"./BlockTrackerPollingController.cjs":1389,"./StaticIntervalPollingController.cjs":1390},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.StaticIntervalPollingControllerV1=r.StaticIntervalPollingController=r.StaticIntervalPollingControllerOnly=r.BlockTrackerPollingControllerV1=r.BlockTrackerPollingController=r.BlockTrackerPollingControllerOnly=void 0;var s=e("./BlockTrackerPollingController.cjs");Object.defineProperty(r,"BlockTrackerPollingControllerOnly",{enumerable:!0,get:function(){return s.BlockTrackerPollingControllerOnly}}),Object.defineProperty(r,"BlockTrackerPollingController",{enumerable:!0,get:function(){return s.BlockTrackerPollingController}}),Object.defineProperty(r,"BlockTrackerPollingControllerV1",{enumerable:!0,get:function(){return s.BlockTrackerPollingControllerV1}});var n=e("./StaticIntervalPollingController.cjs");Object.defineProperty(r,"StaticIntervalPollingControllerOnly",{enumerable:!0,get:function(){return n.StaticIntervalPollingControllerOnly}}),Object.defineProperty(r,"StaticIntervalPollingController",{enumerable:!0,get:function(){return n.StaticIntervalPollingController}}),Object.defineProperty(r,"StaticIntervalPollingControllerV1",{enumerable:!0,get:function(){return n.StaticIntervalPollingControllerV1}})}}},{package:"@metamask/assets-controllers>@metamask/polling-controller",file:"node_modules/@metamask/assets-controllers/node_modules/@metamask/polling-controller/dist/index.cjs"}],[1392,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BaseControllerV1=r.isBaseControllerV1=void 0,r.isBaseControllerV1=function(e){return"name"in e&&"string"==typeof e.name&&"config"in e&&"object"==typeof e.config&&"defaultConfig"in e&&"object"==typeof e.defaultConfig&&"state"in e&&"object"==typeof e.state&&"defaultState"in e&&"object"==typeof e.defaultState&&"disabled"in e&&"boolean"==typeof e.disabled&&"subscribe"in e&&"function"==typeof e.subscribe};class s{constructor(e={},t={}){this.defaultConfig={},this.defaultState={},this.disabled=!1,this.name="BaseController",this.internalConfig=this.defaultConfig,this.internalState=this.defaultState,this.internalListeners=[],this.initialState=t,this.initialConfig=e}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}get config(){return this.internalConfig}get state(){return this.internalState}configure(e,t=!1,r=!0){if(r){this.internalConfig=t?e:Object.assign(this.internalConfig,e);for(const e of Object.keys(this.internalConfig)){const t=this.internalConfig[e];t!==undefined&&(this[e]=t)}}else for(const t of Object.keys(e))if(this.internalConfig[t]!==undefined){const r=e[t];this.internalConfig[t]=r,this[t]=r}}notify(){this.disabled||this.internalListeners.forEach((e=>{e(this.internalState)}))}subscribe(e){this.internalListeners.push(e)}unsubscribe(e){const t=this.internalListeners.findIndex((t=>e===t));return t>-1&&this.internalListeners.splice(t,1),t>-1}update(e,t=!1){this.internalState=t?Object.assign({},e):Object.assign({},this.internalState,e),this.notify()}}r.BaseControllerV1=s,r.default=s}}},{package:"@metamask/base-controller",file:"node_modules/@metamask/base-controller/dist/BaseControllerV1.cjs"}],[1393,{immer:4195},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.getPersistentState=r.getAnonymizedState=r.BaseController=r.isBaseController=void 0;const o=e("immer");(0,o.enablePatches)(),r.isBaseController=function(e){return"name"in e&&"string"==typeof e.name&&"state"in e&&"object"==typeof e.state&&"metadata"in e&&"object"==typeof e.metadata};function i(e,t,r){return Object.keys(e).reduce(((s,n)=>{try{const a=t[n];if(!a)throw new Error(`No metadata found for '${String(n)}'`);const o=a[r],i=e[n];return"function"==typeof o?s[n]=o(i):o&&(s[n]=i),s}catch(e){return setTimeout((()=>{throw e})),s}}),{})}r.BaseController=class{constructor({messenger:e,metadata:t,name:r,state:a}){s.set(this,void 0),this.messagingSystem=e,this.name=r,n(this,s,(0,o.freeze)(a,!0),"f"),this.metadata=t,this.messagingSystem.registerActionHandler(`${r}:getState`,(()=>this.state)),this.messagingSystem.registerInitialEventPayload({eventType:`${r}:stateChange`,getPayload:()=>[this.state,[]]})}get state(){return a(this,s,"f")}set state(e){throw new Error("Controller state cannot be directly mutated; use 'update' method instead.")}update(e){const[t,r,i]=o.produceWithPatches(a(this,s,"f"),e);return n(this,s,t,"f"),this.messagingSystem.publish(`${this.name}:stateChange`,t,r),{nextState:t,patches:r,inversePatches:i}}applyPatches(e){const t=(0,o.applyPatches)(a(this,s,"f"),e);n(this,s,t,"f"),this.messagingSystem.publish(`${this.name}:stateChange`,t,e)}destroy(){this.messagingSystem.clearEventSubscriptions(`${this.name}:stateChange`)}},s=new WeakMap,r.getAnonymizedState=function(e,t){return i(e,t,"anonymous")},r.getPersistentState=function(e,t){return i(e,t,"persist")}}}},{package:"@metamask/base-controller",file:"node_modules/@metamask/base-controller/dist/BaseControllerV2.cjs"}],[1394,{"./RestrictedControllerMessenger.cjs":1395},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.ControllerMessenger=void 0;const c=e("./RestrictedControllerMessenger.cjs");r.ControllerMessenger=class{constructor(){s.set(this,new Map),n.set(this,new Map),a.set(this,new Map),o.set(this,new Map)}registerActionHandler(e,t){if(i(this,s,"f").has(e))throw new Error(`A handler for ${e} has already been registered`);i(this,s,"f").set(e,t)}unregisterActionHandler(e){i(this,s,"f").delete(e)}clearActions(){i(this,s,"f").clear()}call(e,...t){const r=i(this,s,"f").get(e);if(!r)throw new Error(`A handler for ${e} has not been registered`);return r(...t)}registerInitialEventPayload({eventType:e,getPayload:t}){i(this,a,"f").set(e,t)}publish(e,...t){const r=i(this,n,"f").get(e);if(r)for(const[e,s]of r.entries())try{if(s){const r=i(this,o,"f").get(e),n=s(...t);n!==r&&(i(this,o,"f").set(e,n),e(n,r))}else e(...t)}catch(e){setTimeout((()=>{throw e}))}}subscribe(e,t,r){let s=i(this,n,"f").get(e);if(s||(s=new Map,i(this,n,"f").set(e,s)),s.set(t,r),r){const s=i(this,a,"f").get(e);if(s){const e=r(...s());i(this,o,"f").set(t,e)}}}unsubscribe(e,t){const r=i(this,n,"f").get(e);if(!r||!r.has(t))throw new Error(`Subscription not found for event: ${e}`);r.get(t)&&i(this,o,"f").delete(t),r.delete(t)}clearEventSubscriptions(e){i(this,n,"f").delete(e)}clearSubscriptions(){i(this,n,"f").clear()}getRestricted({name:e,allowedActions:t,allowedEvents:r}){return new c.RestrictedControllerMessenger({controllerMessenger:this,name:e,allowedActions:t,allowedEvents:r})}},s=new WeakMap,n=new WeakMap,a=new WeakMap,o=new WeakMap}}},{package:"@metamask/base-controller",file:"node_modules/@metamask/base-controller/dist/ControllerMessenger.cjs"}],[1395,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},m=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.RestrictedControllerMessenger=void 0;r.RestrictedControllerMessenger=class{constructor({controllerMessenger:e,name:t,allowedActions:r,allowedEvents:c}){s.add(this),n.set(this,void 0),a.set(this,void 0),o.set(this,void 0),i.set(this,void 0),d(this,n,e,"f"),d(this,a,t,"f"),d(this,o,r,"f"),d(this,i,c,"f")}registerActionHandler(e,t){if(!m(this,s,"m",u).call(this,e))throw new Error(`Only allowed registering action handlers prefixed by '${m(this,a,"f")}:'`);m(this,n,"f").registerActionHandler(e,t)}unregisterActionHandler(e){if(!m(this,s,"m",u).call(this,e))throw new Error(`Only allowed unregistering action handlers prefixed by '${m(this,a,"f")}:'`);m(this,n,"f").unregisterActionHandler(e)}call(e,...t){if(!m(this,s,"m",l).call(this,e))throw new Error(`Action missing from allow list: ${e}`);return m(this,n,"f").call(e,...t)}registerInitialEventPayload({eventType:e,getPayload:t}){if(!m(this,s,"m",u).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${m(this,a,"f")}:'`);m(this,n,"f").registerInitialEventPayload({eventType:e,getPayload:t})}publish(e,...t){if(!m(this,s,"m",u).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${m(this,a,"f")}:'`);m(this,n,"f").publish(e,...t)}subscribe(e,t,r){if(!m(this,s,"m",c).call(this,e))throw new Error(`Event missing from allow list: ${e}`);return r?m(this,n,"f").subscribe(e,t,r):m(this,n,"f").subscribe(e,t)}unsubscribe(e,t){if(!m(this,s,"m",c).call(this,e))throw new Error(`Event missing from allow list: ${e}`);m(this,n,"f").unsubscribe(e,t)}clearEventSubscriptions(e){if(!m(this,s,"m",u).call(this,e))throw new Error(`Only allowed clearing events prefixed by '${m(this,a,"f")}:'`);m(this,n,"f").clearEventSubscriptions(e)}},n=new WeakMap,a=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakSet,c=function(e){const t=m(this,i,"f");return m(this,s,"m",u).call(this,e)||null!==t&&t.includes(e)},l=function(e){const t=m(this,o,"f");return m(this,s,"m",u).call(this,e)||null!==t&&t.includes(e)},u=function(e){return e.startsWith(`${m(this,a,"f")}:`)}}}},{package:"@metamask/base-controller",file:"node_modules/@metamask/base-controller/dist/RestrictedControllerMessenger.cjs"}],[1396,{"./BaseControllerV1.cjs":1392,"./BaseControllerV2.cjs":1393,"./ControllerMessenger.cjs":1394,"./RestrictedControllerMessenger.cjs":1395},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.RestrictedControllerMessenger=r.ControllerMessenger=r.isBaseController=r.getPersistentState=r.getAnonymizedState=r.BaseController=r.isBaseControllerV1=r.BaseControllerV1=void 0;var s=e("./BaseControllerV1.cjs");Object.defineProperty(r,"BaseControllerV1",{enumerable:!0,get:function(){return s.BaseControllerV1}}),Object.defineProperty(r,"isBaseControllerV1",{enumerable:!0,get:function(){return s.isBaseControllerV1}});var n=e("./BaseControllerV2.cjs");Object.defineProperty(r,"BaseController",{enumerable:!0,get:function(){return n.BaseController}}),Object.defineProperty(r,"getAnonymizedState",{enumerable:!0,get:function(){return n.getAnonymizedState}}),Object.defineProperty(r,"getPersistentState",{enumerable:!0,get:function(){return n.getPersistentState}}),Object.defineProperty(r,"isBaseController",{enumerable:!0,get:function(){return n.isBaseController}});var a=e("./ControllerMessenger.cjs");Object.defineProperty(r,"ControllerMessenger",{enumerable:!0,get:function(){return a.ControllerMessenger}});var o=e("./RestrictedControllerMessenger.cjs");Object.defineProperty(r,"RestrictedControllerMessenger",{enumerable:!0,get:function(){return o.RestrictedControllerMessenger}})}}},{package:"@metamask/base-controller",file:"node_modules/@metamask/base-controller/dist/index.cjs"}],[1397,{"@metamask/utils":1408,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.isVaultUpdated=r.updateVaultWithDetail=r.updateVault=r.generateSalt=r.serializeBufferForStorage=r.serializeBufferFromStorage=r.keyFromPassword=r.exportKey=r.importKey=r.decryptWithKey=r.decryptWithDetail=r.decrypt=r.encryptWithKey=r.encryptWithDetail=r.encrypt=void 0;const s=e("@metamask/utils"),n="jwk",a="AES-GCM",o="utf-8",i={algorithm:"PBKDF2",params:{iterations:1e4}},c={algorithm:"PBKDF2",params:{iterations:9e5}};async function l(e,t,r,s=g(),n=c){const a=r||await p(e,s,!1,n),o=await d(a,t);return o.salt=s,JSON.stringify(o)}async function u(e,t,r=g(),s=c){const n=await p(e,r,!0,s),a=await h(n);return{vault:await l(e,t,n,r),exportedKeyString:a}}async function d(e,r){const s=JSON.stringify(r),n=t.from(s,o),i=global.crypto.getRandomValues(new Uint8Array(16)),c=k(e),l=await global.crypto.subtle.encrypt({name:a,iv:i},c,n),u=new Uint8Array(l),d=t.from(i).toString("base64"),m={data:t.from(u).toString("base64"),iv:d};return b(e)&&(m.keyMetadata=e.derivationOptions),m}async function m(e,t,r){const s=JSON.parse(t),{salt:n,keyMetadata:a}=s,o=k(r||await p(e,n,!1,a));return await f(o,s)}async function f(e,r){const s=t.from(r.data,"base64"),n=t.from(r.iv,"base64"),i=k(e);let c;try{const e=await crypto.subtle.decrypt({name:a,iv:n},i,s),r=new Uint8Array(e),l=t.from(r).toString(o);c=JSON.parse(l)}catch(e){throw new Error("Incorrect password")}return c}async function h(e){return b(e)?JSON.stringify({key:await window.crypto.subtle.exportKey(n,e.key),derivationOptions:e.derivationOptions}):JSON.stringify(await window.crypto.subtle.exportKey(n,e))}async function p(e,r,s=!1,n=i){const c=t.from(e,o),l=t.from(r,"base64"),u=await global.crypto.subtle.importKey("raw",c,{name:"PBKDF2"},!1,["deriveBits","deriveKey"]),d=await global.crypto.subtle.deriveKey({name:"PBKDF2",salt:l,iterations:n.params.iterations,hash:"SHA-256"},u,{name:a,length:256},s,["encrypt","decrypt"]);return n?{key:d,derivationOptions:n}:d}function g(e=32){const t=new Uint8Array(e);global.crypto.getRandomValues(t);return btoa(String.fromCharCode.apply(null,t))}function b(e){return(0,s.isPlainObject)(e)&&(0,s.hasProperty)(e,"key")&&(0,s.hasProperty)(e,"derivationOptions")&&e.key instanceof CryptoKey&&y(e.derivationOptions)}function y(e){return(0,s.isPlainObject)(e)&&(0,s.hasProperty)(e,"algorithm")&&(0,s.hasProperty)(e,"params")}function k(e){return b(e)?e.key:e}function E(e,t=c){const{keyMetadata:r}=JSON.parse(e);return y(r)&&r.algorithm===t.algorithm&&r.params.iterations===t.params.iterations}r.encrypt=l,r.encryptWithDetail=u,r.encryptWithKey=d,r.decrypt=m,r.decryptWithDetail=async function(e,t){const r=JSON.parse(t),{salt:s,keyMetadata:n}=r,a=await p(e,s,!0,n);return{exportedKeyString:await h(a),vault:await m(e,t,a),salt:s}},r.decryptWithKey=f,r.importKey=async function(e){const t=JSON.parse(e);return r=t,(0,s.isPlainObject)(r)&&(0,s.hasProperty)(r,"key")&&(0,s.hasProperty)(r,"derivationOptions")&&y(r.derivationOptions)?{key:await window.crypto.subtle.importKey(n,t.key,a,!0,["encrypt","decrypt"]),derivationOptions:t.derivationOptions}:await window.crypto.subtle.importKey(n,t,a,!0,["encrypt","decrypt"]);var r},r.exportKey=h,r.keyFromPassword=p,r.serializeBufferFromStorage=function(e){const t="0x"===e.slice(0,2)?e.slice(2):e,r=new Uint8Array(t.length/2);for(let e=0;e{t+=function(e){let t=e.toString(16);for(;t.length<2;)t=`0${t}`;return t}(e)})),t},r.generateSalt=g,r.updateVault=async function(e,t,r=c){return E(e,r)?e:l(t,await m(t,e),undefined,undefined,r)},r.updateVaultWithDetail=async function(e,t,r=c){return E(e.vault,r)?e:u(t,await m(t,e.vault),undefined,r)},r.isVaultUpdated=E}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/browser-passworder",file:"node_modules/@metamask/browser-passworder/dist/index.js"}],[1398,{"./errors.cjs":1406,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/assert.cjs"}],[1399,{"./assert.cjs":1398,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/base64.cjs"}],[1400,{"./assert.cjs":1398,"./hex.cjs":1407,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/bytes.cjs"}],[1401,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),function(e){e.Eip155="eip155"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1402,{"./base64.cjs":1399,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/checksum.cjs"}],[1403,{"./assert.cjs":1398,"./bytes.cjs":1400,"./hex.cjs":1407,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/coercers.cjs"}],[1404,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/collections.cjs"}],[1405,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1406,{"./misc.cjs":1412,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/errors.cjs"}],[1407,{"./assert.cjs":1398,"./bytes.cjs":1400,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/hex.cjs"}],[1408,{"./assert.cjs":1398,"./base64.cjs":1399,"./bytes.cjs":1400,"./caip-types.cjs":1401,"./checksum.cjs":1402,"./coercers.cjs":1403,"./collections.cjs":1404,"./encryption-types.cjs":1405,"./errors.cjs":1406,"./hex.cjs":1407,"./json.cjs":1409,"./keyring.cjs":1410,"./logging.cjs":1411,"./misc.cjs":1412,"./number.cjs":1413,"./opaque.cjs":1414,"./promise.cjs":1415,"./time.cjs":1416,"./transaction-types.cjs":1417,"./versions.cjs":1418},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/index.cjs"}],[1409,{"./assert.cjs":1398,"./misc.cjs":1412,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/json.cjs"}],[1410,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/keyring.cjs"}],[1411,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/logging.cjs"}],[1412,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/misc.cjs"}],[1413,{"./assert.cjs":1398,"./hex.cjs":1407},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/number.cjs"}],[1414,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/opaque.cjs"}],[1415,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/promise.cjs"}],[1416,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/time.cjs"}],[1417,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1418,{"./assert.cjs":1398,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/browser-passworder>@metamask/utils",file:"node_modules/@metamask/browser-passworder/node_modules/@metamask/utils/dist/versions.cjs"}],[1419,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={"0x12652C6d93FDB6F4f37d48A8687783C782BB0d10":{name:"Entangle",logo:"NGL.svg",erc20:!0,symbol:"NGL",decimals:18},"0xB50721BCf8d664c30412Cfbc6cf7a15145234ad1":{name:"Arbitrum",logo:"Arb.svg",erc20:!0,symbol:"ARB",decimals:18},"0x4D0528598F916Fd1D8dc80e5f54a8fEEDcFd4b18":{name:"Atoshi",logo:"ATOS.svg",erc20:!0,symbol:"ATOS",decimals:18},"0x57B946008913B82E4dF85f501cbAeD910e58D26C":{name:"POND",logo:"POND.svg",erc20:!0,symbol:"POND",decimals:18},"0x5eed99d066a8CaF10f3E4327c1b3D8b673485eED":{name:"SEED",logo:"SEED.svg",erc20:!0,symbol:"SEED",decimals:18},"0x487d62468282Bd04ddf976631C23128A425555EE":{name:"UPCX",logo:"UPC.svg",erc20:!0,symbol:"UPC",decimals:5},"0xd3210F246Ae54C5a45A7b4A83315bf718F591bfc":{name:"ArkiTech",logo:"ARKI.svg",erc20:!0,symbol:"ARKI",decimals:9},"0x7d51888C5ABb7CDfa9cdd6A50673c7F8afAccD7F":{name:"DuckDAO Token",logo:"duckdao.svg",erc20:!0,symbol:"DD",decimals:18},"0x49642110B712C1FD7261Bc074105E9E44676c68F":{name:"DinoLFG",logo:"DINO.svg",erc20:!0,symbol:"DINO",decimals:18},"0xB8BAa0e4287890a5F79863aB62b7F175ceCbD433":{name:"Swerve DAO Token",logo:"swrv.svg",erc20:!0,symbol:"SWRV",decimals:18},"0x8b79656FC38a04044E495e22fAD747126ca305C4":{name:"AgaveCoin",logo:"agvc.svg",erc20:!0,symbol:"AGVC",decimals:18},"0x967da4048cD07aB37855c090aAF366e4ce1b9F48":{name:"Ocean Token",logo:"ocean.svg",erc20:!0,symbol:"OCEAN",decimals:18},"0x83e6f1E41cdd28eAcEB20Cb649155049Fac3D5Aa":{name:"PolkastarterToken",logo:"pols.svg",erc20:!0,symbol:"POLS",decimals:18},"0x08d967bb0134F2d07f7cfb6E246680c53927DD30":{name:"MATH Token",logo:"math.svg",erc20:!0,symbol:"MATH",decimals:18},"0xccC8cb5229B0ac8069C51fd58367Fd1e622aFD97":{name:"Gods Unchained",logo:"gods.svg",erc20:!0,symbol:"GODS",decimals:18},"0xF57e7e7C23978C3cAEC3C3548E3D615c346e79fF":{name:"Immutable X",logo:"imx.svg",erc20:!0,symbol:"IMX",decimals:18},"0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f":{name:"Gho Token",logo:"GHO.svg",erc20:!0,symbol:"GHO",decimals:18},"0x536381a8628dBcC8C70aC9A30A7258442eAb4c92":{name:"Pantos Token ",logo:"pan.svg",erc20:!0,symbol:"PAN",decimals:8},"0x011E128Ec62840186F4A07E85E3ACe28858c5606":{name:"Valeria",logo:"val.svg",erc20:!0,symbol:"VAL",decimals:18},"0x6c3ea9036406852006290770BEdFcAbA0e23A0e8":{name:"PayPal USD",logo:"pyusd.svg",erc20:!0,symbol:"PYUSD",decimals:6},"0x8b385Ca3592A5EFc34E0C9fE663de56897F1751F":{name:"INFibit",logo:"INFibit.svg",erc20:!0,symbol:"IBIT",decimals:18},"0x9bf1D7D63dD7a4ce167CF4866388226EEefa702E":{name:"Ben Coin",logo:"BEN.svg",erc20:!0,symbol:"BEN",decimals:18},"0xC7a2572fA8FDB0f7E81d6D3c4e3CCF78FB0DC374":{name:"Bens Finale",logo:"BensFinale.svg",erc20:!0,symbol:"FINALE",decimals:18},"0x99cFB8cBA9c821B4a343c6a1Fc630465C9708DF5":{name:"Pepe Inu",logo:"PepeInu.svg",erc20:!0,symbol:"$PEPEINU",decimals:18},"0xCEBA2a8F6Ec221AEB5f3a7bcd15Cbc7e6a387bfb":{name:"Peter Pan",logo:"PeterPan.svg",erc20:!0,symbol:"PAN",decimals:18},"0x467719aD09025FcC6cF6F8311755809d45a5E5f3":{name:"Axelar",logo:"axelar.svg",erc20:!0,symbol:"AXL",decimals:6},"0x665F77fbA5975ab40Ce61c90F28007fb5b09D7B1":{name:"Genieswap",logo:"Genieswap.svg",erc20:!0,symbol:"GENIE",decimals:18},"0x09E6d500D14D13e0528d2c0fff24E5ffF68237B4":{name:"Dohrnii",logo:"dhn.svg",erc20:!0,symbol:"DHN",decimals:18},"0xaE0585a259A3BCAB258D6EE02FB583f7B33C2a12":{name:"TempleCoin",logo:"tem.svg",erc20:!0,symbol:"TEM",decimals:18},"0xaeDf386B755465871fF874E3E37Af5976E247064":{name:"Fasttoken",logo:"ftn.svg",erc20:!0,symbol:"FTN",decimals:18},"0x7BEF710a5759d197EC0Bf621c3Df802C2D60D848":{name:"SHOPX",logo:"SHOPX.svg",erc20:!0,symbol:"SHOPX",decimals:18},"0xBa3335588D9403515223F109EdC4eB7269a9Ab5D":{name:"Gearbox",logo:"gear.svg",erc20:!0,symbol:"GEAR",decimals:18},"0x9B6B9d2468E165a02FEf69E61B6D3D6CBC0Ac409":{name:"OASISLIFE",logo:"OFE.svg",erc20:!0,symbol:"OFE",decimals:18},"0xdf0162A6B3e9fDf0302c1e949739DeeaFafd8F89":{name:"METAOASIS",logo:"MOA.svg",erc20:!0,symbol:"MOA",decimals:18},"0xe4dae00bc1c46ea2F44ae71B1BEb8b171C15d812":{name:"PREMA",logo:"PREMA.svg",erc20:!0,symbol:"PRMX",decimals:18},"0x1416946162B1C2c871A73B07E932D2fB6C932069":{name:"Energi",logo:"energi.svg",erc20:!0,symbol:"NRG",decimals:18},"0x0d88eD6E74bbFD96B831231638b66C05571e824F":{name:"Aventus",logo:"aventus.svg",erc20:!0,symbol:"AVT",decimals:18},"0x4FC15c91a9c4A9efB404174464687E8e128730C2":{name:"STAT",logo:"STAT.svg",erc20:!0,erc721:!1,symbol:"STAT",decimals:18},"0x4ad7a056191F4c9519fAcd6D75FA94CA26003aCE":{name:"GoldPesa Option",logo:"GPO.svg",erc20:!0,symbol:"GPO",decimals:18},"0x767FE9EDC9E0dF98E07454847909b5E959D7ca0E":{name:"Illuvium",logo:"illuvium.svg",erc20:!0,erc721:!1,symbol:"ILV",decimals:18},"0x85F17Cf997934a597031b2E18a9aB6ebD4B9f6a4":{name:"NEAR",logo:"NEAR.svg",erc20:!0,symbol:"NEAR",decimals:24},"0x6B3595068778DD592e39A122f4f5a5cF09C90fE2":{name:"SushiSwap",logo:"sushi.svg",erc20:!0,erc721:!1,symbol:"SUSHI",decimals:18},"0x881Ba05de1E78f549cC63a8f6Cabb1d4AD32250D":{name:"00",logo:"00.svg",erc20:!0,erc721:!1,symbol:"00",decimals:18},"0xC211477cb4098aC22a98432781f5f26a1E07a4d4":{name:"CULTURED",logo:"CULTURED.svg",erc20:!0,erc721:!1,symbol:"CULTURED",decimals:18},"0x86f2A193b116d1f9C53Ed26d97F77cDC8BcF4c2b":{name:"EHTAGA",logo:"EHTAGA.svg",erc20:!0,erc721:!1,symbol:"EHTAGA",decimals:18},"0x54b79A15b2e2c55c736A66bb0A978fb840407aC8":{name:"FEVER",logo:"FEVER.svg",erc20:!0,erc721:!1,symbol:"FEVER",decimals:18},"0x677c9fE4396D3D13A0F9013a8118eAE386C843A5":{name:"IAM",logo:"IAM.svg",erc20:!0,erc721:!1,symbol:"IAM",decimals:18},"0xf63c65E855020E4B74f0Ad842D9537dA0E6162eC":{name:"ISH",logo:"ISH.svg",erc20:!0,erc721:!1,symbol:"ISH",decimals:18},"0xc105fA46510F32c0444CCdB4e51065da95caA1B4":{name:"LITA",logo:"LITA.svg",erc20:!0,erc721:!1,symbol:"LITA",decimals:18},"0x5401F949cDfa3E5aF32538167c0314230769209C":{name:"MAHCOIN",logo:"MAHCOIN.svg",erc20:!0,erc721:!1,symbol:"MAHCOIN",decimals:18},"0x711D2C47aFf84B96AD0F36983b1c41Be2C509e18":{name:"NIKITA",logo:"NIKITA.svg",erc20:!0,erc721:!1,symbol:"NIKITA",decimals:18},"0x3C44aEc33993b6830e5C2a705ea879b9C9ba0f7c":{name:"NYELA",logo:"NYELA.svg",erc20:!0,erc721:!1,symbol:"NYELA",decimals:18},"0xfa9096c99e687ea8E0064C23DAaCFE87cc99E4Ba":{name:"RON",logo:"RON.svg",erc20:!0,erc721:!1,symbol:"RON",decimals:18},"0x287a7C95aD00bBDd48599Ad2919567fD09281f07":{name:"STEELO",logo:"STEELO.svg",erc20:!0,erc721:!1,symbol:"STEELO",decimals:18},"0x2Ec3275f7aCe4044e499823F511cd58250be8E3d":{name:"Privilege",logo:"prvg.svg",erc20:!0,symbol:"PRVG",decimals:8},"0x65BB569FAaDD324a00883FdE4c46346cc96D5c0A":{name:"Provide",logo:"prvd.svg",erc20:!0,symbol:"PRVD",decimals:8},"0xB4272071eCAdd69d933AdcD19cA99fe80664fc08":{name:"CryptoFranc",logo:"XCHF.svg",erc20:!0,symbol:"XCHF",decimals:18},"0x5aFE3855358E112B5647B952709E6165e1c1eEEe":{name:"Safe Token",logo:"safe-green-token.svg",erc20:!0,symbol:"SAFE",decimals:18},"0x9C8fF314C9Bc7F6e59A9d9225Fb22946427eDC03":{name:"Nouns",erc20:!1,erc721:!0,symbol:"NOUN",decimals:0,logo:"nouns.svg"},"0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D":{name:"BoredApeYachtClub",erc20:!1,erc721:!0,symbol:"BAYC",decimals:0,logo:"bayc.svg"},"0x08D7C0242953446436F34b4C78Fe9da38c73668d":{name:"PROOF Collective",erc20:!1,erc721:!0,symbol:"PROOF",decimals:0,logo:"proof.svg"},"0x23581767a106ae21c074b2276D25e5C3e136a68b":{name:"Moonbirds",erc20:!1,erc721:!0,symbol:"MOONBIRD",decimals:0,logo:"moonbirds.svg"},"0x60E4d786628Fea6478F785A6d7e704777c86a7c6":{name:"MutantApeYachtClub",erc20:!1,erc721:!0,symbol:"MAYC",decimals:0,logo:"mayc.svg"},"0x49cF6f5d44E70224e2E23fDcdd2C053F30aDA28B":{name:"CloneX",erc20:!1,erc721:!0,symbol:"CloneX",decimals:0,logo:"clonex.svg"},"0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e":{name:"Doodles",erc20:!1,erc721:!0,symbol:"DOODLE",decimals:0,logo:"doodles.svg"},"0xED5AF388653567Af2F388E6224dC7C4b3241C544":{name:"Azuki",erc20:!1,erc721:!0,symbol:"AZUKI",decimals:0,logo:"azuki.svg"},"0xa3AEe8BcE55BEeA1951EF834b99f3Ac60d1ABeeB":{name:"VeeFriends",erc20:!1,erc721:!0,symbol:"VFT",decimals:0,logo:"veefriends.svg"},"0x34d85c9CDeB23FA97cb08333b511ac86E1C4E258":{name:"Otherdeed",erc20:!1,erc721:!0,symbol:"OTHR",decimals:0,logo:"otherdeed.svg"},"0xBBc2AE13b23d715c30720F079fcd9B4a74093505":{name:"Ethernity Chain Token",logo:"ERN.svg",erc20:!0,symbol:"ERN",decimals:18},"0x243cACb4D5fF6814AD668C3e225246efA886AD5a":{name:"Shina Inu",logo:"shina.svg",erc20:!0,symbol:"SHI",decimals:18},"0xD057B63f5E69CF1B929b356b579Cba08D7688048":{name:"CoW Protocol Virtual Token",logo:"vCOW.svg",erc20:!0,symbol:"vCOW",decimals:18},"0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB":{name:"CoW Protocol Token",logo:"COW.svg",erc20:!0,symbol:"COW",decimals:18},"0xEd04915c23f00A313a544955524EB7DBD823143d":{name:"Alchemy Pay",logo:"ACH.svg",erc20:!0,symbol:"ACH",decimals:8},"0xeDF6568618A00C6F0908Bf7758A16F76B6E04aF9":{name:"Arianee",logo:"aria20.svg",erc20:!0,symbol:"ARIA20",decimals:18},"0x88D8DA2A8D0fA5b1f4E38030AC486aDE0AFA2798":{name:"Terrapass Coin",logo:"tpsc.svg",erc20:!0,symbol:"TPSC",decimals:18},"0x4730fB1463A6F1F44AEB45F6c5c422427f37F4D0":{name:"The 4th Pillar Token",logo:"four.svg",erc20:!0,symbol:"FOUR",decimals:18},"0x875773784Af8135eA0ef43b5a374AaD105c5D39e":{name:"Idle DAO Token",logo:"idle.svg",erc20:!0,symbol:"IDLE",decimals:18},"0x6BeA7CFEF803D1e3d5f7C0103f7ded065644e197":{name:"Gamma",logo:"Gamma.svg",erc20:!0,symbol:"GAMMA",decimals:18},"0x26805021988F1a45dC708B5FB75Fc75F21747D8c":{name:"xGamma",logo:"xGamma.svg",erc20:!0,symbol:"xGAMMA",decimals:18},"0xc7D9c108D4E1dD1484D3e2568d7f74bfD763d356":{name:"SORA Synthetic USD",logo:"sora-xstusd.svg",erc20:!0,symbol:"XSTUSD",decimals:18},"0x519C1001D550C0a1DaE7d1fC220f7d14c2A521BB":{name:"Polkaswap",logo:"sora-pswap.svg",erc20:!0,symbol:"PSWAP",decimals:18},"0x40FD72257597aA14C7231A7B1aaa29Fce868F677":{name:"SORA",logo:"sora-xor.svg",erc20:!0,symbol:"XOR",decimals:18},"0x909E34d3f6124C324ac83DccA84b74398a6fa173":{name:"$ZKP Token",logo:"ZKP.svg",erc20:!0,erc721:!1,symbol:"$ZKP",decimals:18},"0xe88f8313e61A97cEc1871EE37fBbe2a8bf3ed1E4":{name:"SORA Validator",logo:"sora-val.svg",erc20:!0,symbol:"VAL",decimals:18},"0x7A58c0Be72BE218B41C608b7Fe7C5bB630736C71":{name:"ConstitutionDAO",logo:"PEOPLE.svg",erc20:!0,symbol:"PEOPLE",decimals:18},"0x32E6C34Cd57087aBBD59B5A4AECC4cB495924356":{name:"BitBase",logo:"BTBS.svg",erc20:!0,symbol:"BTBS",decimals:18},"0x3fa400483487A489EC9b1dB29C4129063EEC4654":{name:"Cryptokek.com",logo:"cryptokek.svg",erc20:!0,symbol:"KEK",decimals:18},"0xEd3D4e446A96dC3b181B64B75c3c70dA41dC3CBe":{name:"Vodra",logo:"Vodra.svg",erc20:!0,symbol:"VDR",decimals:18},"0xb753428af26E81097e7fD17f40c88aaA3E04902c":{name:"Spice",logo:"sfi.svg",erc20:!0,symbol:"SFI",decimals:18},"0xd084944d3c05CD115C09d072B9F44bA3E0E45921":{name:"Manifold Finance",logo:"Manifold.svg",erc20:!0,symbol:"FOLD",decimals:18},"0x9a0242b7a33DAcbe40eDb927834F96eB39f8fBCB":{name:"BABB",logo:"bax.svg",erc20:!0,symbol:"BAX",decimals:18},"0x4Cf89ca06ad997bC732Dc876ed2A7F26a9E7f361":{name:"Mysterium",logo:"MYST.svg",erc20:!0,symbol:"MYST",decimals:18},"0x697eF32B4a3F5a4C39dE1cB7563f24CA7BfC5947":{name:"Insula Token",logo:"Insula.svg",erc20:!0,symbol:"ISLA",decimals:18},"0x62Dc4817588d53a056cBbD18231d91ffCcd34b2A":{name:"DeHive",logo:"dehive.svg",erc20:!0,erc721:!1,symbol:"DHV",decimals:18},"0x8400D94A5cb0fa0D041a3788e395285d61c9ee5e":{name:"Unibright",logo:"ubt.svg",erc20:!0,symbol:"UBT",decimals:8},"0xfAd45E47083e4607302aa43c65fB3106F1cd7607":{name:"Hoge Finance",logo:"HogeFinanceLogo.svg",erc20:!0,symbol:"HOGE",decimals:9},"0xBB0E17EF65F82Ab018d8EDd776e8DD940327B28b":{name:"Axie Infinity Shard",logo:"AXS.svg",erc20:!0,symbol:"AXS",decimals:18},"0xCC8Fa225D80b9c7D42F96e9570156c65D6cAAa25":{name:"Smooth Love Potion",logo:"SLP.svg",erc20:!0,symbol:"SLP",decimals:0},"0x10633216E7E8281e33c86F02Bf8e565a635D9770":{name:"Dvision Network",logo:"dvision.svg",erc20:!0,symbol:"DVI",decimals:18},"0x898BAD2774EB97cF6b94605677F43b41871410B1":{name:"vEth2",logo:"vEth2.svg",erc20:!0,symbol:"vEth2",decimals:18},"0x321C2fE4446C7c963dc41Dd58879AF648838f98D":{name:"Cryptex Finance",logo:"ctx.svg",erc20:!0,symbol:"CTX",decimals:18},"0x16c52CeeCE2ed57dAd87319D91B5e3637d50aFa4":{name:"TCAP Token",logo:"tcap.svg",erc20:!0,symbol:"TCAP",decimals:18},"0xE94B97b6b43639E238c851A7e693F50033EfD75C":{name:"Rainbow Token",logo:"halodao-rnbw.svg",erc20:!0,symbol:"RNBW",decimals:18},"0x47BE779De87de6580d0548cde80710a93c502405":{name:"Rainbow Pool",logo:"halodao-xrnbw.svg",erc20:!0,symbol:"xRNBW",decimals:18},"0xe7aE6D0C56CACaf007b7e4d312f9af686a9E9a04":{name:"Vabble",logo:"VAB.svg",erc20:!0,symbol:"VAB",decimals:18},"0x853d955aCEf822Db058eb8505911ED77F175b99e":{name:"Frax",logo:"frax.svg",erc20:!0,symbol:"FRAX",decimals:18},"0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0":{name:"Frax Share",logo:"fxs.svg",erc20:!0,symbol:"FXS",decimals:18},"0x84810bcF08744d5862B8181f12d17bfd57d3b078":{name:"SharedStake",logo:"sharedstake.svg",erc20:!0,symbol:"SGT",decimals:18},"0x75387e1287Dd85482aB66102DA9f6577E027f609":{name:"MindsyncAI",logo:"MAI.svg",erc20:!0,symbol:"MAI",decimals:18},"0x196f4727526eA7FB1e17b2071B3d8eAA38486988":{name:"Reserve",logo:"rsv.svg",erc20:!0,symbol:"RSV",decimals:18},"0x320623b8E4fF03373931769A31Fc52A4E78B5d70":{name:"Reserve Rights",logo:"rsr.svg",erc20:!0,symbol:"RSR",decimals:18},"0x1cF4592ebfFd730c7dc92c1bdFFDfc3B9EfCf29a":{name:"WAVES",logo:"waves.svg",erc20:!0,symbol:"WAVES",decimals:18},"0x252739487C1fa66eaeaE7CED41d6358aB2a6bCa9":{name:"ArCoin",logo:"ArCoin.svg",erc20:!0,symbol:"RCOIN",decimals:8},"0x18aAA7115705e8be94bfFEBDE57Af9BFc265B998":{name:"Audius",logo:"audius.svg",erc20:!0,symbol:"AUDIO",decimals:18},"0x8E3BCC334657560253B83f08331d85267316e08a":{name:"Rubic",logo:"brbc.svg",erc20:!0,symbol:"BRBC",decimals:18},"0xca1207647Ff814039530D7d35df0e1Dd2e91Fa84":{name:"dHEDGE DAO Token",logo:"DHT.svg",erc20:!0,symbol:"DHT",decimals:18},"0x6243d8CEA23066d098a15582d81a598b4e8391F4":{name:"Reflexer Ungovernance Token",logo:"flx.svg",erc20:!0,symbol:"FLX",decimals:18},"0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919":{name:"Rai Reflex Index",logo:"rai.svg",erc20:!0,symbol:"RAI",decimals:18},"0xF25c91C87e0B1fd9B4064Af0F427157AaB0193A7":{name:"BASIC Token",logo:"basic.svg",erc20:!0,symbol:"BASIC",decimals:18},"0x53C8395465A84955c95159814461466053DedEDE":{name:"DeGate Token",logo:"DG.svg",erc20:!0,symbol:"DG",decimals:18},"0xBCf9dBf8B14eD096B2BA08b7269356197fDd1b5D":{name:"Avaluse",logo:"avaluse.svg",erc20:!0,symbol:"AVAL",decimals:18},"0x6E765D26388A17A6e86c49A8E41DF3F58aBcd337":{name:"Kangal",logo:"kangal.svg",erc20:!0,symbol:"KANGAL",decimals:18},"0x9AF4f26941677C706cfEcf6D3379FF01bB85D5Ab":{name:"DomRaiderToken",logo:"drt.svg",erc20:!0,symbol:"DRT",decimals:8},"0x06B179e292f080871825beD5D722162fD96B4c95":{name:"10x.gg",logo:"xgg.svg",erc20:!0,symbol:"XGG",decimals:18},"0xF29992D7b589A0A6bD2de7Be29a97A6EB73EaF85":{name:"DMScript",logo:"dmst.svg",erc20:!0,symbol:"DMST",decimals:18},"0x64aa3364F17a4D01c6f1751Fd97C2BD3D7e7f1D5":{name:"Olympus",logo:"OHM.svg",erc20:!0,symbol:"OHM",decimals:9},"0x0ab87046fBb341D058F17CBC4c1133F25a20a52f":{name:"Governance OHM",logo:"gOHM.svg",erc20:!0,symbol:"gOHM",decimals:18},"0xDd1Ad9A21Ce722C151A836373baBe42c868cE9a4":{name:"Universal Basic Income",logo:"ubi.svg",erc20:!0,symbol:"UBI",decimals:18},"0xf293d23BF2CDc05411Ca0edDD588eb1977e8dcd4":{name:"Sylo",logo:"SYLO.svg",erc20:!0,symbol:"SYLO",decimals:18},"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84":{name:"Liquid staked Ether 2.0",logo:"stETH.svg",erc20:!0,symbol:"stETH",decimals:18},"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0":{name:"Wrapped liquid staked Ether 2.0",logo:"wstETH.svg",erc20:!0,symbol:"wstETH",decimals:18},"0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32":{name:"Lido DAO Token",logo:"LDO.svg",erc20:!0,symbol:"LDO",decimals:18},"0xbd31EA8212119f94A611FA969881CBa3EA06Fa3d":{name:"LUNA Token",logo:"Luna.svg",erc20:!0,symbol:"LUNA",decimals:6},"0xa693B19d2931d498c5B318dF961919BB4aee87a5":{name:"UST Token",logo:"UST.svg",erc20:!0,symbol:"UST",decimals:6},"0xd2877702675e6cEb975b4A1dFf9fb7BAF4C91ea9":{name:"LUNA Token - Shuttle",logo:"lunc.svg",erc20:!0,symbol:"LUNC",decimals:18},"0xa47c8bf37f92aBed4A126BDA807A7b7498661acD":{name:"UST Token - Shuttle",logo:"ustc.svg",erc20:!0,symbol:"USTC",decimals:18},"0xcAAfF72A8CbBfc5Cf343BA4e26f65a257065bFF1":{name:"KRT Token - Shuttle",logo:"KRT.svg",erc20:!0,symbol:"KRT-S",decimals:18},"0x676Ad1b33ae6423c6618C1AEcf53BAa29cf39EE5":{name:"SDT Token - Shuttle",logo:"SDT.svg",erc20:!0,symbol:"SDT-S",decimals:18},"0x156B36ec68FdBF84a925230BA96cb1Ca4c4bdE45":{name:"MNT Token - Shuttle",logo:"MNT.svg",erc20:!0,symbol:"MNT-S",decimals:18},"0x09a3EcAFa817268f77BE1283176B946C4ff2E608":{name:"MIR Token - Shuttle",logo:"MIR.svg",erc20:!0,symbol:"MIR-S",decimals:18},"0xd36932143F6eBDEDD872D5Fb0651f4B72Fd15a84":{name:"Mirror AAPL Token - Shuttle",logo:"mAAPL.svg",erc20:!0,symbol:"mAAPL-S",decimals:18},"0x59A921Db27Dd6d4d974745B7FfC5c33932653442":{name:"Mirror GOOGL Token - Shuttle",logo:"mGOOGL.svg",erc20:!0,symbol:"mGOGL-S",decimals:18},"0x21cA39943E91d704678F5D00b6616650F066fD63":{name:"Mirror TSLA Token - Shuttle",logo:"mTSLA.svg",erc20:!0,symbol:"mTSLA-S",decimals:18},"0xC8d674114bac90148d11D3C1d33C61835a0F9DCD":{name:"Mirror NFLX Token - Shuttle",logo:"mNFLX.svg",erc20:!0,symbol:"mNFLX-S",decimals:18},"0x13B02c8dE71680e71F0820c996E4bE43c2F57d15":{name:"Mirror QQQ Token - Shuttle",logo:"mQQQ.svg",erc20:!0,symbol:"mQQQ-S",decimals:18},"0xEdb0414627E6f1e3F082DE65cD4F9C693D78CCA9":{name:"Mirror TWTR Token - Shuttle",logo:"mTWTR.svg",erc20:!0,symbol:"mTWTR-S",decimals:18},"0x41BbEDd7286dAab5910a1f15d12CBda839852BD7":{name:"Mirror MSFT Token - Shuttle",logo:"mMSFT.svg",erc20:!0,symbol:"mMSFT-S",decimals:18},"0x0cae9e4d663793c2a2A0b211c1Cf4bBca2B9cAa7":{name:"Mirror AMZN Token - Shuttle",logo:"mAMZN.svg",erc20:!0,symbol:"mAMZN-S",decimals:18},"0x56aA298a19C93c6801FDde870fA63EF75Cc0aF72":{name:"Mirror BABA Token - Shuttle",logo:"mBABA.svg",erc20:!0,symbol:"mBABA-S",decimals:18},"0x1d350417d9787E000cc1b95d70E9536DcD91F373":{name:"Mirror IAU Token - Shuttle",logo:"mIAU.svg",erc20:!0,symbol:"mIAU-S",decimals:18},"0x9d1555d8cB3C846Bb4f7D5B1B1080872c3166676":{name:"Mirror SLV Token - Shuttle",logo:"mSLV.svg",erc20:!0,symbol:"mSLV-S",decimals:18},"0x31c63146a635EB7465e5853020b39713AC356991":{name:"Mirror USO Token - Shuttle",logo:"mUSO.svg",erc20:!0,symbol:"mUSO-S",decimals:18},"0xf72FCd9DCF0190923Fadd44811E240Ef4533fc86":{name:"Mirror VIXY Token - Shuttle",logo:"mVIXY.svg",erc20:!0,symbol:"mVIXY-S",decimals:18},"0x21BfBDa47A0B4B5b1248c767Ee49F7caA9B23697":{name:"OVR",logo:"OVR.svg",erc20:!0,symbol:"OVR",decimals:18},"0x4691937a7508860F876c9c0a2a617E7d9E945D4B":{name:"Wootrade Network",logo:"wootrade.svg",erc20:!0,symbol:"WOO",decimals:18},"0xaf9f549774ecEDbD0966C52f250aCc548D3F36E5":{name:"RFUEL",logo:"RFUEL.svg",erc20:!0,symbol:"RFUEL",decimals:18},"0x7420B4b9a0110cdC71fB720908340C03F9Bc03EC":{name:"JasmyCoin",logo:"JASMY.svg",erc20:!0,symbol:"JASMY",decimals:18},"0x947AEb02304391f8fbE5B25D7D98D649b57b1788":{name:"Mandala Exchange Token",logo:"mandala.svg",erc20:!0,symbol:"MDX",decimals:18},"0xCdeee767beD58c5325f68500115d4B722b3724EE":{name:"Carbon",logo:"CRBN.svg",erc20:!0,symbol:"CRBN",decimals:18},"0xA4EED63db85311E22dF4473f87CcfC3DaDCFA3E3":{name:"Rubic",logo:"Rubic.svg",erc20:!0,symbol:"RBC",decimals:18},"0x3A880652F47bFaa771908C07Dd8673A787dAEd3A":{name:"DerivaDAO",logo:"DDX.svg",erc20:!0,symbol:"DDX",decimals:18},"0xbC396689893D065F41bc2C6EcbeE5e0085233447":{name:"Perpetual",logo:"PERP.svg",erc20:!0,symbol:"PERP",decimals:18},"0xeca82185adCE47f39c684352B0439f030f860318":{name:"Perlin",logo:"PERL.svg",erc20:!0,symbol:"PERL",decimals:18},"0xA1AFFfE3F4D611d252010E3EAf6f4D77088b0cd7":{name:"Reflect Finance",logo:"RFI.svg",erc20:!0,symbol:"RFI",decimals:9},"0xC0bA369c8Db6eB3924965e5c4FD0b4C1B91e305F":{name:"DLP Duck Token",logo:"dlpducktoken.svg",erc20:!0,symbol:"DUCK",decimals:18},"0xFbEEa1C75E4c4465CB2FCCc9c6d6afe984558E20":{name:"DuckDaoDime",logo:"ddim.svg",erc20:!0,symbol:"DDIM",decimals:18},"0x745407c86DF8DB893011912d3aB28e68B62E49B0":{name:"MahaDAO",logo:"MAHA.svg",erc20:!0,symbol:"MAHA",decimals:18},"0x8CC0F052fff7eaD7f2EdCCcaC895502E884a8a71":{name:"ARTH Valuecoin",logo:"ARTH.svg",erc20:!0,symbol:"ARTH",decimals:18},"0x3231Cb76718CDeF2155FC47b5286d82e6eDA273f":{name:"Monerium EUR",logo:"EURe.svg",erc20:!0,symbol:"EURe",decimals:18},"0x7ba92741Bf2A568abC6f1D3413c58c6e0244F8fD":{name:"Monerium GBP",logo:"GBPe.svg",erc20:!0,symbol:"GBPe",decimals:18},"0xBc5142e0CC5eB16b47c63B0f033d4c2480853a52":{name:"Monerium USD",logo:"USDe.svg",erc20:!0,symbol:"USDe",decimals:18},"0xC642549743A93674cf38D6431f75d6443F88E3E2":{name:"Monerium ISK",logo:"ISKe.svg",erc20:!0,symbol:"ISKe",decimals:18},"0x66a0f676479Cee1d7373f3DC2e2952778BfF5bd6":{name:"WISE Token",logo:"wise.svg",erc20:!0,symbol:"WISE",decimals:18},"0x72F020f8f3E8fd9382705723Cd26380f8D0c66Bb":{name:"PlotX",logo:"plotx.svg",erc20:!0,symbol:"PLOT",decimals:18},"0x44197A4c44D6A059297cAf6be4F7e172BD56Caaf":{name:"ELTCOIN",logo:"ELTCOIN.svg",erc20:!0,symbol:"ELT",decimals:8},"0x6781a0F84c7E9e846DCb84A9a5bd49333067b104":{name:"ZAP TOKEN",logo:"zapicon.svg",erc20:!0,symbol:"ZAP",decimals:18},"0x00c83aeCC790e8a4453e5dD3B0B4b3680501a7A7":{name:"SKALE",logo:"skl.svg",erc20:!0,symbol:"SKL",decimals:18},"0x674C6Ad92Fd080e4004b2312b45f796a192D27a0":{name:"Neutrino USD",logo:"usdn.svg",erc20:!0,symbol:"USDN",decimals:18},"0xE5CAeF4Af8780E59Df925470b050Fb23C43CA68C":{name:"Ferrum Network Token",logo:"frm.svg",erc20:!0,symbol:"FRM",decimals:6},"0x998FFE1E43fAcffb941dc337dD0468d52bA5b48A":{name:"Rupiah Token",logo:"idrt.svg",erc20:!0,symbol:"IDRT",decimals:2},"0x4E15361FD6b4BB609Fa63C81A2be19d873717870":{name:"Fantom",logo:"ftm.svg",erc20:!0,symbol:"FTM",decimals:18},"0x557B933a7C2c45672B610F8954A3deB39a51A8Ca":{name:"REVV",logo:"revv.svg",erc20:!0,symbol:"REVV",decimals:18},"0xFFC97d72E13E01096502Cb8Eb52dEe56f74DAD7B":{name:"Aave AAVE",logo:"aAAVE.svg",erc20:!0,symbol:"aAAVE",decimals:18},"0x05Ec93c0365baAeAbF7AefFb0972ea7ECdD39CF1":{name:"Aave BAT",logo:"aBAT.svg",erc20:!0,symbol:"aBAT",decimals:18},"0xA361718326c15715591c299427c62086F69923D9":{name:"Aave BUSD",logo:"aBUSD.svg",erc20:!0,symbol:"aBUSD",decimals:18},"0x028171bCA77440897B824Ca71D1c56caC55b68A3":{name:"Aave DAI",logo:"aDAI.svg",erc20:!0,symbol:"aDAI",decimals:18},"0xaC6Df26a590F08dcC95D5a4705ae8abbc88509Ef":{name:"Aave ENJ",logo:"aENJ.svg",erc20:!0,symbol:"aENJ",decimals:18},"0xD37EE7e4f452C6638c96536e68090De8cBcdb583":{name:"Aave GUSD",logo:"aGUSD.svg",erc20:!0,symbol:"aGUSD",decimals:2},"0x39C6b3e42d6A679d7D776778Fe880BC9487C2EDA":{name:"Aave KNC",logo:"aKNC.svg",erc20:!0,symbol:"aKNC",decimals:18},"0xa06bC25B5805d5F8d82847D191Cb4Af5A3e873E0":{name:"Aave LINK",logo:"aLINK.svg",erc20:!0,symbol:"aLINK",decimals:18},"0xa685a61171bb30d4072B338c80Cb7b2c865c873E":{name:"Aave MANA",logo:"aMANA.svg",erc20:!0,symbol:"aMANA",decimals:18},"0xc713e5E149D5D0715DcD1c156a020976e7E56B88":{name:"Aave MKR",logo:"aMKR.svg",erc20:!0,symbol:"aMKR",decimals:18},"0xCC12AbE4ff81c9378D670De1b57F8e0Dd228D77a":{name:"Aave REN",logo:"aREN.svg",erc20:!0,symbol:"aREN",decimals:18},"0x35f6B052C598d933D69A4EEC4D04c73A191fE6c2":{name:"Aave SNX",logo:"aSNX.svg",erc20:!0,symbol:"aSNX",decimals:18},"0x6C5024Cd4F8A59110119C56f8933403A539555EB":{name:"Aave SUSD",logo:"aSUSD.svg",erc20:!0,symbol:"aSUSD",decimals:18},"0x101cc05f4A51C0319f570d5E146a8C625198e636":{name:"Aave TUSD",logo:"aTUSD.svg",erc20:!0,symbol:"aTUSD",decimals:18},"0xB9D7CB55f463405CDfBe4E90a6D2Df01C2B92BF1":{name:"Aave UNI",logo:"aUNI.svg",erc20:!0,symbol:"aUNI",decimals:18},"0xBcca60bB61934080951369a648Fb03DF4F96263C":{name:"Aave USDC",logo:"aUSDC.svg",erc20:!0,symbol:"aUSDC",decimals:6},"0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811":{name:"Aave USDT",logo:"aUSDT.svg",erc20:!0,symbol:"aUSDT",decimals:6},"0x9ff58f4fFB29fA2266Ab25e75e2A8b3503311656":{name:"Aave WBTC",logo:"aWBTC.svg",erc20:!0,symbol:"aWBTC",decimals:8},"0x030bA81f1c18d280636F32af80b9AAd02Cf0854e":{name:"Aave WETH",logo:"aWETH.svg",erc20:!0,symbol:"aWETH",decimals:18},"0x5165d24277cD063F5ac44Efd447B27025e888f37":{name:"Aave YFI",logo:"aYFI.svg",erc20:!0,symbol:"aYFI",decimals:18},"0xdef1fac7Bf08f173D286BbBDcBeeADe695129840":{name:"Defi Factory Token",logo:"DEFT.svg",erc20:!0,symbol:"DEFT",decimals:18},"0xDf7FF54aAcAcbFf42dfe29DD6144A69b629f8C9e":{name:"Aave ZRX",logo:"aZRX.svg",erc20:!0,symbol:"aZRX",decimals:18},"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9":{name:"Aave",logo:"AAVE.svg",erc20:!0,symbol:"AAVE",decimals:18},"0x44e2deC86B9F0e0266E9AA66e10323A2bd69CF9A":{name:"Attrace",logo:"attr.svg",erc20:!0,symbol:"ATTR",decimals:18},"0x1Da87b114f35E1DC91F72bF57fc07A768Ad40Bb0":{name:"Equalizer",logo:"EQZ.svg",erc20:!0,symbol:"EQZ",decimals:18},"0x4da27a545c0c5B758a6BA100e3a049001de870f5":{name:"Staked Aave",logo:"stkAAVE.svg",erc20:!0,symbol:"stAAVE",decimals:18},"0xba9d4199faB4f26eFE3551D490E3821486f135Ba":{name:"SwissBorg",logo:"chsb.svg",erc20:!0,symbol:"CHSB",decimals:8},"0x7DD9c5Cba05E151C895FDe1CF355C9A1D5DA6429":{name:"Golem Network Token",logo:"glm.svg",erc20:!0,symbol:"GLM",decimals:18},"0x7240aC91f01233BaAf8b064248E80feaA5912BA3":{name:"OctoFi",logo:"octo.svg",erc20:!0,symbol:"OCTO",decimals:18},"0xff56Cc6b1E6dEd347aA0B7676C85AB0B3D08B0FA":{name:"Orbs",logo:"orbs.svg",erc20:!0,symbol:"ORBS",decimals:18},"0x63f88A2298a5c4AEE3c216Aa6D926B184a4b2437":{name:"GAME Credits",logo:"GAMECreditsLogo.svg",erc20:!0,symbol:"GAME",decimals:18},"0x5150956E082C748Ca837a5dFa0a7C10CA4697f9c":{name:"Zeedex",logo:"zdex.svg",erc20:!0,symbol:"ZDEX",decimals:18},"0x84cA8bc7997272c7CfB4D0Cd3D55cd942B3c9419":{name:"DIAdata",logo:"dia.svg",erc20:!0,symbol:"DIA",decimals:18},"0xb78B3320493a4EFaa1028130C5Ba26f0B6085Ef8":{name:"Dracula",logo:"dracula.svg",erc20:!0,symbol:"DRC",decimals:18},"0xF433089366899D83a9f26A773D59ec7eCF30355e":{name:"Metal",logo:"mtl.svg",erc20:!0,symbol:"MTL",decimals:8},"0x85Eee30c52B0b379b046Fb0F85F4f3Dc3009aFEC":{name:"KEEP",logo:"keep.svg",erc20:!0,symbol:"KEEP",decimals:18},"0x8dAEBADE922dF735c38C80C7eBD708Af50815fAa":{name:"tBTC",logo:"tbtc.svg",erc20:!0,symbol:"TBTC",decimals:18},"0xD7EFB00d12C2c13131FD319336Fdf952525dA2af":{name:"Proton",logo:"proton.svg",erc20:!0,symbol:"XPR",decimals:4},"0x178c820f862B14f316509ec36b13123DA19A6054":{name:"Energy Web Token Bridged",logo:"ewtb.svg",erc20:!0,symbol:"EWTB",decimals:18},"0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39":{name:"HEX",logo:"hex.svg",erc20:!0,symbol:"HEX",decimals:8},"0xFca59Cd816aB1eaD66534D82bc21E7515cE441CF":{name:"Rarible",logo:"rari.svg",erc20:!0,symbol:"RARI",decimals:18},"0x7865af71cf0b288b4E7F654f4F7851EB46a2B7F8":{name:"Sentivate",logo:"sentivate.svg",erc20:!0,symbol:"SNTVT",decimals:18},"0xa3d58c4E56fedCae3a7c43A725aeE9A71F0ece4e":{name:"Metronome",logo:"metronome.svg",erc20:!0,symbol:"MET",decimals:18},"0x49d716DFe60b37379010A75329ae09428f17118d":{name:"PoolTogether Dai",logo:"pldai.svg",erc20:!0,symbol:"PLDAI",decimals:18},"0xfE6892654CBB05eB73d28DCc1Ff938f59666Fe9f":{name:"PoolTogether Sai",logo:"plsai.svg",erc20:!0,symbol:"PLSAI",decimals:18},"0x5732046A883704404F284Ce41FfADd5b007FD668":{name:"Bluzelle Token",logo:"Bluzelle.svg",erc20:!0,symbol:"BLZ",decimals:18},"0xBD87447F48ad729C5c4b8bcb503e1395F62e8B98":{name:"PoolTogether USDC",logo:"plusdc.svg",erc20:!0,symbol:"PLUSDC",decimals:6},"0x69A95185ee2a045CDC4bCd1b1Df10710395e4e23":{name:"$Poolz Finance",logo:"Poolz.svg",erc20:!0,symbol:"POOLZ",decimals:18},"0x0adA190c81b814548ddC2F6AdC4a689ce7C1FE73":{name:"yAxis",logo:"yaxis.svg",erc20:!0,symbol:"YAXIS",decimals:18},"0xb1dC9124c395c1e97773ab855d66E879f053A289":{name:"yAxis",logo:"yaxis.svg",erc20:!0,symbol:"YAX",decimals:18},"0xeF31Cb88048416E301Fee1eA13e7664b887BA7e8":{name:"Staked yAxis",logo:"yaxis.svg",erc20:!0,symbol:"sYAX",decimals:18},"0x28cb7e841ee97947a86B06fA4090C8451f64c0be":{name:"YF Link",logo:"YFL.svg",erc20:!0,symbol:"YFL",decimals:18},"0x75D1aA733920b14fC74c9F6e6faB7ac1EcE8482E":{name:"YFLink Staking Share",logo:"YFL.svg",erc20:!0,symbol:"yYFL",decimals:18},"0x7b760D06E401f85545F3B50c44bf5B05308b7b62":{name:"YFLink USD",logo:"YFLUSD.svg",erc20:!0,symbol:"YFLUSD",decimals:18},"0x8282df223AC402d04B2097d16f758Af4F70e7Db0":{name:"YFLink Synthetic",logo:"sYFL.svg",erc20:!0,symbol:"sYFL",decimals:18},"0x008377EB0C62cE8e0BA3D7Bb4A5638591f21588E":{name:"YFLink Bond",logo:"bYFL.svg",erc20:!0,symbol:"bYFL",decimals:18},"0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e":{name:"yearn.finance",logo:"yfi.svg",erc20:!0,symbol:"YFI",decimals:18},"0x261b45D85cCFeAbb11F022eBa346ee8D1cd488c0":{name:"rDAI",logo:"rdai.svg",erc20:!0,symbol:"rDAI",decimals:18},"0xea8b224eDD3e342DEb514C4176c2E72Bcce6fFF9":{name:"rSAI",logo:"rsai.svg",erc20:!0,symbol:"rSAI",decimals:18},"0x12B19D3e2ccc14Da04FAe33e63652ce469b3F2FD":{name:"GridPlus",logo:"GridPlus.svg",erc20:!0,symbol:"GRID",decimals:12},"0xDb05EA0877A2622883941b939f0bb11d1ac7c400":{name:"Opacity",logo:"opct.svg",erc20:!0,symbol:"OPCT",decimals:18},"0x4575f41308EC1483f3d399aa9a2826d74Da13Deb":{name:"Orchid",logo:"OXT.svg",erc20:!0,symbol:"OXT",decimals:18},"0x4CC19356f2D37338b9802aa8E8fc58B0373296E7":{name:"Selfkey",logo:"KEY.svg",erc20:!0,symbol:"KEY",decimals:18},"0x92A5B04D0ED5D94D7a193d1d334D3D16996f4E13":{name:"Eristica",logo:"Eristica.svg",erc20:!0,symbol:"ERT",decimals:18},"0xdAC17F958D2ee523a2206206994597C13D831ec7":{name:"Tether USD",logo:"usdt.svg",erc20:!0,symbol:"USDT",decimals:6},"0x06AF07097C9Eeb7fD685c692751D5C66dB49c215":{name:"Chai",logo:"CHAI.svg",erc20:!0,symbol:"CHAI",decimals:18},"0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828":{name:"UMA",logo:"uma.svg",erc20:!0,symbol:"UMA",decimals:18},"0x5f778ec4B31a506c1Dfd8b06F131E9B451a61D39":{name:"UPX Token",logo:"UPX.svg",erc20:!0,symbol:"UPX",decimals:18},"0xb1CD6e4153B2a390Cf00A6556b0fC1458C4A5533":{name:"ETHBNT Liquidity Pool",logo:"ETHBNT.svg",erc20:!0,symbol:"ETHBNT",decimals:18},"0xf0Ee6b27b759C9893Ce4f094b49ad28fd15A23e4":{name:"Enigma",logo:"enigma.svg",erc20:!0,symbol:"ENG",decimals:8},"0xaaAEBE6Fe48E54f431b0C390CfaF0b017d09D42d":{name:"Celsius",logo:"celsius.svg",erc20:!0,symbol:"CEL",decimals:4},"0xb683D83a532e2Cb7DFa5275eED3698436371cc9f":{name:"BTU",logo:"BTU.svg",erc20:!0,symbol:"BTU",decimals:18},"0x746DdA2ea243400D5a63e0700F190aB79f06489e":{name:"BOSAGORA",logo:"BOA.svg",erc20:!0,symbol:"BOA",decimals:7},"0x5D858bcd53E085920620549214a8b27CE2f04670":{name:"POP Network Token",logo:"POP.svg",erc20:!0,symbol:"POP",decimals:18},"0x048Fe49BE32adfC9ED68C37D32B5ec9Df17b3603":{name:"Skrumble Network V2",logo:"skm.svg",erc20:!0,symbol:"SKM",decimals:18},"0x16EA01aCB4b0Bca2000ee5473348B6937ee6f72F":{name:"Enecuum",logo:"ENQ-logo.svg",erc20:!0,symbol:"ENQ",decimals:10},"0xE5B826Ca2Ca02F09c1725e9bd98d9a8874C30532":{name:"ZEON Network",logo:"ZEON_logo.png",erc20:!0,symbol:"ZEON",decimals:18},"0x13cb85823f78Cff38f0B0E90D3e975b8CB3AAd64":{name:"REMIIT REMI Token",logo:"remi.svg",erc20:!0,symbol:"REMI",decimals:18},"0x93a7174dafd31d13400cD9fa01f4e5B5BAa00D39":{name:"Shaka",logo:"hak.svg",erc20:!0,symbol:"HAK",decimals:18},"0x6fB3e0A217407EFFf7Ca062D46c26E5d60a14d69":{name:"IoTeX",logo:"iotex.svg",erc20:!0,symbol:"IOTX",decimals:18},"0xE5a3229CCb22b6484594973A03a3851dCd948756":{name:"RAE Token",logo:"rae.svg",erc20:!0,symbol:"RAE",decimals:18},"0x4470BB87d77b963A013DB939BE332f927f2b992e":{name:"AdEx Legacy Token",logo:"adex.svg",erc20:!0,symbol:"ADXL",decimals:4},"0xADE00C28244d5CE17D72E40330B1c318cD12B7c3":{name:"AdEx Token",logo:"adex.svg",erc20:!0,symbol:"ADX",decimals:18},"0xDc5864eDe28BD4405aa04d93E05A0531797D9D59":{name:"Falcon",logo:"fnt.svg",erc20:!0,symbol:"FNT",decimals:6},"0x1966d718A565566e8E202792658D7b5Ff4ECe469":{name:"nDEX",logo:"nDEX.png",erc20:!0,symbol:"NDX",decimals:18},"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599":{name:"Wrapped BTC",logo:"wbtc.svg",erc20:!0,symbol:"WBTC",decimals:8},"0x150b0b96933B75Ce27af8b92441F8fB683bF9739":{name:"Dragonereum Gold",logo:"gold.svg",erc20:!0,symbol:"GOLD",decimals:18},"0x82f4dED9Cec9B5750FBFf5C2185AEe35AfC16587":{name:"DreamTeam Token",logo:"dream.svg",erc20:!0,symbol:"DREAM",decimals:6},"0x5d60d8d7eF6d37E16EBABc324de3bE57f135e0BC":{name:"MyBit",logo:"MYB.svg",erc20:!0,symbol:"MYB",decimals:18},"0x01FA555c97D7958Fa6f771f3BbD5CCD508f81e22":{name:"Civil Token",logo:"CVL_token.svg",erc20:!0,symbol:"CVL",decimals:18},"0x5adc961D6AC3f7062D2eA45FEFB8D8167d44b190":{name:"Dether",logo:"dether.svg",erc20:!0,symbol:"DTH",decimals:18},"0x3F17Dd476faF0a4855572F0B6ed5115D9bBA22AD":{name:"Wibson",logo:"wibson-logo.png",erc20:!0,symbol:"WIB",decimals:9},"0xDF347911910b6c9A4286bA8E2EE5ea4a39eB2134":{name:"Bob's Repair",logo:"bobsrepair.png",erc20:!0,symbol:"BOB",decimals:18},"0x3505F494c3f0fed0B594E01Fa41Dd3967645ca39":{name:"SWARM",logo:"swarm.svg",erc20:!0,symbol:"SWM",decimals:18},"0x6863bE0e7CF7ce860A574760e9020D519a8bDC47":{name:"On.Live",logo:"onlive.svg",erc20:!0,symbol:"ONL",decimals:18},"0xea5f88E54d982Cbb0c441cde4E79bC305e5b43Bc":{name:"Pareto",logo:"ParetoLogo.png",erc20:!0,symbol:"PARETO",decimals:18},"0x2e91E3e54C5788e9FdD6A181497FDcEa1De1bcc1":{name:"Hercules",logo:"herc.png",erc20:!0,symbol:"HERC",decimals:18},"0x4946Fcea7C692606e8908002e55A582af44AC121":{name:"FOAM",logo:"FOAM.svg",erc20:!0,symbol:"FOAM",decimals:18},"0x4D807509aECe24C0fa5A102b6a3B059Ec6E14392":{name:"Menlo One",logo:"Menlo_One.png",erc20:!0,symbol:"ONE",decimals:18},"0x27054b13b1B798B345b591a4d22e6562d47eA75a":{name:"AirSwap Token",logo:"AirSwapLogo.svg",erc20:!0,symbol:"AST",decimals:4},"0x8D5682941cE456900b12d47ac06a88b47C764CE1":{name:"RightMesh Token",logo:"Rmesh.png",erc20:!0,symbol:"RMESH",decimals:18},"0xDDe12a12A6f67156e0DA672be05c374e1B0a3e57":{name:"JOYSO",logo:"JOY.png",erc20:!0,symbol:"JOY",decimals:6},"0x0D262e5dC4A06a0F1c90cE79C7a60C09DfC884E4":{name:"JET8 Token",logo:"J8T.svg",erc20:!0,symbol:"J8T",decimals:8},"0x4a220E6096B25EADb88358cb44068A3248254675":{name:"Quant Network",logo:"quant-network.svg",erc20:!0,symbol:"QNT",decimals:18},"0xBC86727E770de68B1060C91f6BB6945c73e10388":{name:"Ink Protocol",logo:"ink_protocol.svg",erc20:!0,symbol:"XNK",decimals:18},"0xa95592DCFfA3C080B4B40E459c5f5692F67DB7F8":{name:"ELY Token",logo:"ely.png",erc20:!0,symbol:"ELY",decimals:18},"0x9E46A38F5DaaBe8683E10793b06749EEF7D733d1":{name:"PolySwarm Nectar",logo:"polyswarm_nectar.svg",erc20:!0,symbol:"NCT",decimals:18},"0xe1A178B681BD05964d3e3Ed33AE731577d9d96dD":{name:"BOX Token",logo:"box_token.png",erc20:!0,symbol:"BOX",decimals:18},"0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf":{name:"DAOstack",logo:"gen.svg",erc20:!0,symbol:"GEN",decimals:18},"0x6aEDbF8dFF31437220dF351950Ba2a3362168d1b":{name:"Dragonglass",logo:"dragonglass.svg",erc20:!0,symbol:"DGS",decimals:8},"0xd26114cd6EE289AccF82350c8d8487fedB8A0C07":{name:"OmiseGO",logo:"omg.svg",erc20:!0,symbol:"OMG",decimals:18},"0x99ea4dB9EE77ACD40B119BD1dC4E33e1C070b80d":{name:"Quantstamp",logo:"qsp.svg",erc20:!0,symbol:"QSP",decimals:18},"0xB64ef51C888972c908CFacf59B47C1AfBC0Ab8aC":{name:"Storj",logo:"storj.svg",erc20:!0,symbol:"STORJ",decimals:8},"0xD8E3FB3b08eBA982F2754988d70D57eDc0055ae6":{name:"Zoracles",logo:"zora.svg",erc20:!0,symbol:"ZORA",decimals:9},"0xF938424F7210f31dF2Aee3011291b658f872e91e":{name:"VISOR",logo:"VISR.svg",erc20:!0,symbol:"VISR",decimals:18},"0x0F5D2fB29fb7d3CFeE444a200298f468908cC942":{name:"Decentraland",logo:"mana.svg",erc20:!0,symbol:"MANA",decimals:18},"0x0F513fFb4926ff82D7F60A05069047AcA295C413":{name:"CrowdstartCoin",logo:"XSC_Logo.svg",erc20:!0,symbol:"XSC",decimals:18},"0x5BC7e5f0Ab8b2E10D2D0a3F21739FCe62459aeF3":{name:"Hut34 Entropy Token",logo:"ENTRP.png",symbol:"ENTRP",erc20:!0,decimals:18},"0x946112efaB61C3636CBD52DE2E1392D7A75A6f01":{name:"HYDRO TOKEN",logo:"hydro.svg",erc20:!0,symbol:"HYDRO",decimals:18},"0x2604FA406Be957E542BEb89E6754fCdE6815e83f":{name:"Playkey Token",logo:"playkey.svg",erc20:!0,symbol:"PKT",decimals:18},"0xE41d2489571d322189246DaFA5ebDe1F4699F498":{name:"0x",logo:"zrx.svg",erc20:!0,symbol:"ZRX",decimals:18},"0x957c30aB0426e0C93CD8241E2c60392d08c6aC8e":{name:"Modum Token",logo:"modum.svg",erc20:!0,symbol:"MOD",decimals:0},"0x1a7a8BD9106F2B8D977E08582DC7d24c723ab0DB":{name:"AppCoins",logo:"appc.svg",erc20:!0,decimals:18,symbol:"APPC"},"0xdB25f211AB05b1c97D595516F45794528a807ad8":{name:"STASIS EURS Token",logo:"stasis-eurs.svg",erc20:!0,decimals:2,symbol:"EURS"},"0xCA0e7269600d353F70b14Ad118A49575455C0f2f":{name:"AMLT",logo:"amlt.png",erc20:!0,decimals:18,symbol:"AMLT"},"0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F":{name:"Synthetix Network Token",logo:"synthetix.svg",erc20:!0,decimals:18,symbol:"SNX"},"0x57Ab1ec28D129707052df4dF418D58a2D46d5f51":{name:"Synth sUSD",logo:"synthetix_susd.svg",erc20:!0,decimals:18,symbol:"SUSD"},"0x5e74C9036fb86BD7eCdcb084a0673EFc32eA31cb":{name:"Synth sETH",logo:"synthetix_seth.svg",erc20:!0,decimals:18,symbol:"SETH"},"0xfE18be6b3Bd88A2D2A7f928d00292E7a9963CfC6":{name:"Synth sBTC",logo:"synthetix_sbtc.svg",erc20:!0,decimals:18,symbol:"SBTC"},"0x0DB8D8b76BC361bAcbB72E2C491E06085A97Ab31":{name:"IQeon",logo:"iqeon.svg",erc20:!0,decimals:18,symbol:"IQN"},"0x000C100050E98C91f9114fa5Dd75CE6869Bf4F53":{name:"CRYPTO10 Hedged",logo:"c10.svg",erc20:!0,symbol:"C10",decimals:18},"0x26E75307Fc0C021472fEb8F727839531F112f317":{name:"Crypto20",logo:"c20.svg",erc20:!0,symbol:"C20",decimals:18},"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d":{name:"Crypto Kitties",logo:"ck.svg",erc20:!1,erc721:!0,symbol:"CK",decimals:0},"0xE477292f1B3268687A29376116B0ED27A9c76170":{name:"Herocoin",logo:"herocoin_logo.png",erc20:!0,symbol:"PLAY",decimals:18},"0x4F4f0Db4de903B88f2B1a2847971E231D54F8fd3":{name:"Geens Platform Token",logo:"gee-icon.svg",erc20:!0,symbol:"GEE",decimals:8},"0xec67005c4E498Ec7f55E092bd1d35cbC47C91892":{name:"Enzyme Finance",logo:"mln.svg",erc20:!0,symbol:"MLN",decimals:18},"0xba2184520A1cC49a6159c57e61E1844E085615B6":{name:"HelloGold Token",logo:"hgt.png",erc20:!0,symbol:"HGT",decimals:8},"0xba358B6f5b4c0215650444B8C30D870B55050D2D":{name:"Hub Token",logo:"hub.svg",erc20:!0,symbol:"HUB",decimals:18},"0x8727c112C712c4a03371AC87a74dD6aB104Af768":{name:"Jetcoin Institute Token",logo:"JETCOIN28.png",erc20:!0,symbol:"JET",decimals:18},"0xf8e386EDa857484f5a12e4B5DAa9984E06E73705":{name:"Indorse Token",logo:"indorseLogo.jpg",erc20:!0,symbol:"IND",decimals:18},"0xA54ddC7B3CcE7FC8b1E3Fa0256D0DB80D2c10970":{name:"NEVERDIE Coin",logo:"ndc.png",erc20:!0,symbol:"NDC",decimals:18},"0x1c4481750daa5Ff521A2a7490d9981eD46465Dbd":{name:"BlockMason Credit Protocol Token",logo:"bcpt.svg",erc20:!0,symbol:"BCPT",decimals:18},"0x20F7A3DdF244dc9299975b4Da1C39F8D5D75f05A":{name:"Sapien Network Token",logo:"spn.svg",erc20:!0,symbol:"SPN",decimals:6},"0xA4e8C3Ec456107eA67d3075bF9e3DF3A75823DB0":{name:"Loom Token",logo:"loom.svg",erc20:!0,symbol:"LOOM",decimals:18},"0x42476F744292107e34519F9c357927074Ea3F75D":{name:"Loom",logo:"loom.svg",erc20:!0,symbol:"LOOM",decimals:18},"0x4F9254C83EB525f9FCf346490bbb3ed28a81C667":{name:"Celer Network Token",logo:"CELR.svg",erc20:!0,symbol:"CELR",decimals:18},"0x71D01dB8d6a2fBEa7f8d434599C237980C234e4C":{name:"Gladius",logo:"gladius.svg",erc20:!0,symbol:"GLA",decimals:8},"0xdd974D5C2e2928deA5F71b9825b8b646686BD200":{name:"Kyber Network Crystal",logo:"kyber.svg",erc20:!0,symbol:"KNC",decimals:18},"0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C":{name:"Bancor Network Token",logo:"bnt.svg",erc20:!0,symbol:"BNT",decimals:18},"0xfa05A73FfE78ef8f1a739473e462c54bae6567D9":{name:"Lunyr Token",logo:"lun.svg",erc20:!0,symbol:"LUN",decimals:18},"0xC741f06082AA47F93729070aD0dD95E223Bda091":{name:"LEDU Token",logo:"edu.svg",erc20:!0,symbol:"LEDU",decimals:8},"0x5c543e7AE0A1104f78406C340E9C64FD9fCE5170":{name:"vSlice",logo:"vslice.png",erc20:!0,symbol:"VSL",decimals:18},"0x1f41E42D0a9e3c0Dd3BA15B527342783B43200A9":{name:"Blockchain Capital",logo:"bcap.svg",erc20:!0,symbol:"BCAP",decimals:0},"0x6531f133e6DeeBe7F2dcE5A0441aA7ef330B4e53":{name:"Chronobank TIME",logo:"chronobank.png",erc20:!0,symbol:"TIME",decimals:8},"0xaAAf91D9b90dF800Df4F55c205fd6989c977E73a":{name:"Monolith TKN",logo:"tkn.svg",erc20:!0,symbol:"TKN",decimals:8},"0x08711D3B02C8758F2FB3ab4e80228418a7F8e39c":{name:"Edgeless",logo:"edg.svg",erc20:!0,symbol:"EDG",decimals:0},"0xf7B098298f7C69Fc14610bf71d5e02c60792894C":{name:"Guppy",logo:"guppy.png",erc20:!0,symbol:"GUP",decimals:3},"0x4DF812F6064def1e5e029f1ca858777CC98D2D81":{name:"Xaurum",logo:"xaurum_logo.svg",erc20:!0,symbol:"XAUR",decimals:8},"0xB9e7F8568e08d5659f5D29C4997173d84CdF2607":{name:"Swarm City Token",logo:"swt.svg",erc20:!0,symbol:"SWT",decimals:18},"0xCb94be6f13A1182E4A4B6140cb7bf2025d28e41B":{name:"Trustcoin",logo:"trst.svg",erc20:!0,symbol:"TRST",decimals:6},"0xCB56b52316041A62B6b5D0583DcE4A8AE7a3C629":{name:"Cigarettes",logo:"cig.svg",erc20:!0,symbol:"CIG",decimals:18},"0x960b236A07cf122663c4303350609A66A7B288C0":{name:"Aragon Network Token v1",logo:"antv1.svg",erc20:!0,symbol:"ANTv1",decimals:18},"0x667088b212ce3d06a1b553a7221E1fD19000d9aF":{name:"WINGS",logo:"wings_logo.svg",erc20:!0,symbol:"WINGS",decimals:18},"0x16484d73Ac08d2355F466d448D2b79D2039F6EBB":{name:"FortKnoxster",logo:"FortKnoxster.svg",erc20:!0,symbol:"FKX",decimals:18},"0xAf30D2a7E90d7DC361c8C4585e9BB7D2F6f15bc7":{name:"FirstBlood Token",logo:"1st.svg",erc20:!0,symbol:"1ST",decimals:18},"0x607F4C5BB672230e8672085532f7e901544a7375":{name:"iExec RLC Token",logo:"rlc.svg",erc20:!0,symbol:"RLC",decimals:9},"0xaeC2E87E0A235266D9C5ADc9DEb4b2E29b54D009":{name:"SingularDTV",logo:"singulardtv.svg",erc20:!0,symbol:"SNGLS",decimals:0},"0x888666CA69E0f178DED6D75b5726Cee99A87D698":{name:"ICONOMI",logo:"iconomi.png",erc20:!0,symbol:"ICN",decimals:18},"0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2":{name:"Maker",logo:"mkr.svg",erc20:!0,symbol:"MKR",decimals:18},"0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359":{name:"Sai Stablecoin v1.0",logo:"sai.svg",erc20:!0,symbol:"SAI",decimals:18},"0x6B175474E89094C44Da98b954EedeAC495271d0F":{name:"Dai Stablecoin",logo:"dai.svg",erc20:!0,symbol:"DAI",decimals:18},"0xC477D038d5420C6A9e0b031712f61c5120090de9":{name:"Boson Token",logo:"boson.svg",erc20:!0,symbol:"BOSON",decimals:18},"0xD46bA6D942050d489DBd938a2C909A5d5039A161":{name:"Ampleforth",logo:"ampl.svg",erc20:!0,symbol:"AMPL",decimals:9},"0x4b9278b94a1112cAD404048903b8d343a810B07e":{name:"Hifi Finance",logo:"hifi.svg",erc20:!0,symbol:"HIFI",decimals:18},"0x0D8775F648430679A709E98d2b0Cb6250d2887EF":{name:"Basic Attention Token",logo:"bat.svg",erc20:!0,symbol:"BAT",decimals:18},"0x4D8fc1453a0F359e99c9675954e656D80d996FbF":{name:"BEE Token",logo:"bee_token.svg",erc20:!0,symbol:"BEE",decimals:18},"0x6810e776880C02933D47DB1b9fc05908e5386b96":{name:"Gnosis Token",logo:"gnosis.svg",erc20:!0,symbol:"GNO",decimals:18},"0x514910771AF9Ca656af840dff83E8264EcF986CA":{name:"Chainlink Token",logo:"chainlink.svg",erc20:!0,symbol:"LINK",decimals:18},"0xD8912C10681D8B21Fd3742244f44658dBA12264E":{name:"Pluton",logo:"plutus-god.svg",erc20:!0,symbol:"PLU",decimals:18},"0x1985365e9f78359a9B6AD760e32412f4a445E862":{name:"Reputation Old",logo:"rep.svg",erc20:!0,symbol:"REP",decimals:18},"0x221657776846890989a759BA2973e427DfF5C9bB":{name:"Reputation",logo:"repv2.svg",erc20:!0,symbol:"REPv2",decimals:18},"0xd0929d411954c47438dc1d871dd6081F5C5e149c":{name:"Refereum",logo:"rfr.svg",erc20:!0,symbol:"RFR",decimals:4},"0xb0866289e870D2efc282406cF4123Df6E5BcB652":{name:"NoFakeCoin",logo:"nfticon.png",erc20:!0,symbol:"NFC",decimals:18},"0x2C4e8f2D746113d0696cE89B35F0d8bF88E0AEcA":{name:"Open Simple Token",logo:"OST.svg",erc20:!0,symbol:"OST",decimals:18},"0x408e41876cCCDC0F92210600ef50372656052a38":{name:"Republic Token",logo:"ren.svg",erc20:!0,symbol:"REN",decimals:18},"0xEB4C2781e4ebA804CE9a9803C67d0893436bB27D":{name:"renBTC",logo:"renBTC.svg",erc20:!0,symbol:"renBTC",decimals:8},"0x1C5db575E2Ff833E46a2E9864C22F4B22E0B37C2":{name:"renZEC",logo:"renZEC.svg",erc20:!0,symbol:"renZEC",decimals:8},"0x459086F2376525BdCebA5bDDA135e4E9d3FeF5bf":{name:"renBCH",logo:"renBCH.svg",erc20:!0,symbol:"renBCH",decimals:8},"0xD5147bc8e386d91Cc5DBE72099DAC6C9b99276F5":{name:"renFIL",logo:"renFIL.svg",erc20:!0,symbol:"renFIL",decimals:18},"0xa74476443119A942dE498590Fe1f2454d7D4aC0d":{name:"Golem Network Token",logo:"golem.svg",erc20:!0,symbol:"GNT",decimals:18},"0x6888a16eA9792c15A4DCF2f6C623D055c8eDe792":{name:"Spectiv Signal Token",logo:"spectiv.svg",erc20:!0,symbol:"SIG",decimals:18},"0x9a642d6b3368ddc662CA244bAdf32cDA716005BC":{name:"Qtum",logo:"qtum.svg",erc20:!0,decimals:18,symbol:"QTUM"},"0x1234567461d3f8Db7496581774Bd869C83D51c93":{name:"BitClave",logo:"bitclave.svg",erc20:!0,decimals:18,symbol:"CAT"},"0x7d4b8Cce0591C9044a22ee543533b72E976E36C3":{name:"Change",logo:"change.svg",erc20:!0,decimals:18,symbol:"CAG"},"0x1d462414fe14cf489c7A21CaC78509f4bF8CD7c0":{name:"CanYaCoin",logo:"CanYa.svg",erc20:!0,decimals:6,symbol:"CAN"},"0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72":{name:"Ethereum Name Service",logo:"ens.svg",erc20:!0,decimals:18,symbol:"ENS"},"0x3d1BA9be9f66B8ee101911bC36D3fB562eaC2244":{name:"Rivetz",logo:"rivetz.png",erc20:!0,decimals:18,symbol:"RVT"},"0x056017c55aE7AE32d12AeF7C679dF83A85ca75Ff":{name:"Project Wyvern Token",logo:"wyvern-logo.svg",erc20:!0,symbol:"WYV",decimals:18},"0xfec0cF7fE078a500abf15F1284958F22049c2C7e":{name:"Maecenas ART Token",logo:"art.svg",erc20:!0,symbol:"ART",decimals:18},"0x05f4a42e251f2d52b8ed15E9FEdAacFcEF1FAD27":{name:"Zilliqa",logo:"zilliqa.svg",erc20:!0,symbol:"ZIL",decimals:12},"0x986EE2B944c42D017F52Af21c4c69B84DBeA35d8":{name:"BitMartToken",logo:"bitmart.png",erc20:!0,symbol:"BMX",decimals:18},"0xF03f8D65BaFA598611C3495124093c56e8F638f0":{name:"Viewly",logo:"viewly.svg",erc20:!0,symbol:"VIEW",decimals:18},"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2":{name:"Wrapped Ether",logo:"weth.svg",erc20:!0,symbol:"WETH",decimals:18},"0xba5BDe662c17e2aDFF1075610382B9B691296350":{name:"SuperRare Token",logo:"rare.svg",erc20:!0,symbol:"RARE",decimals:18},"0x6C8c6b02E7b2BE14d4fA6022Dfd6d75921D90E4E":{name:"Compound Basic Attention Token",logo:"ctoken-bat.svg",erc20:!0,symbol:"cBAT",decimals:8},"0x70e36f6BF80a52b3B46b3aF8e106CC0ed743E8e4":{name:"Compound Collateral",logo:"ctoken-comp.svg",erc20:!0,symbol:"cCOMP",decimals:8},"0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643":{name:"Compound Dai",logo:"ctoken-dai.svg",erc20:!0,symbol:"cDAI",decimals:8},"0xF5DCe57282A584D2746FaF1593d3121Fcac444dC":{name:"Compound Sai (Legacy Dai)",logo:"ctoken-sai.svg",erc20:!0,symbol:"cSAI",decimals:8},"0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5":{name:"Compound Ether",logo:"ctoken-eth.svg",erc20:!0,symbol:"cETH",decimals:8},"0x158079Ee67Fce2f58472A96584A73C7Ab9AC95c1":{name:"Compound Augur",logo:"ctoken-rep.svg",erc20:!0,symbol:"cREP",decimals:8},"0x39AA39c021dfbaE8faC545936693aC917d5E7563":{name:"Compound USD Coin",logo:"ctoken-usdc.svg",erc20:!0,symbol:"cUSDC",decimals:8},"0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9":{name:"Compound Tether",logo:"ctoken-usdt.svg",erc20:!0,symbol:"cUSDT",decimals:8},"0xC11b1268C1A384e55C48c2391d8d480264A3A7F4":{name:"Compound Wrapped BTC",logo:"ctoken-wbtc.svg",erc20:!0,symbol:"cWBTC",decimals:8},"0xB3319f5D18Bc0D84dD1b4825Dcde5d5f7266d407":{name:"Compound 0x",logo:"ctoken-zrx.svg",erc20:!0,symbol:"cZRX",decimals:8},"0xc00e94Cb662C3520282E6f5717214004A7f26888":{name:"Compound",logo:"comp.svg",erc20:!0,symbol:"COMP",decimals:18},"0xFFE02ee4C69eDf1b340fCaD64fbd6b37a7b9e265":{name:"NANJCOIN",logo:"nanjcoin.svg",erc20:!0,symbol:"NANJ",decimals:8},"0xB6eD7644C69416d67B522e20bC294A9a9B405B31":{name:"0xBitcoin Token",logo:"0xbitcoin.svg",erc20:!0,symbol:"0xBTC",decimals:8},"0x744d70FDBE2Ba4CF95131626614a1763DF805B9E":{name:"Status Network Token",logo:"snt.svg",erc20:!0,symbol:"SNT",decimals:18},"0x42d6622deCe394b54999Fbd73D108123806f6a18":{name:"SPANK",logo:"spank.svg",erc20:!0,symbol:"SPANK",decimals:18},"0x6B01c3170ae1EFEBEe1a3159172CB3F7A5ECf9E5":{name:"BOOTY",logo:"booty.png",erc20:!0,symbol:"BOOTY",decimals:18},"0x4a6058666cf1057eaC3CD3A5a614620547559fc9":{name:"Brickblock",logo:"Brickblock.svg",erc20:!0,symbol:"BBK",decimals:18},"0x80fB784B7eD66730e8b1DBd9820aFD29931aab03":{name:"ETHLend Token",logo:"lend.svg",erc20:!0,symbol:"LEND",decimals:18},"0x48FF53777F747cFB694101222a944dE070c15D36":{name:"Ether Kingdoms Token",logo:"IMP.svg",erc20:!0,symbol:"IMP",decimals:7},"0x02F61Fd266DA6E8B102D4121f5CE7b992640CF98":{name:"LikeCoin",logo:"like.svg",erc20:!0,symbol:"LIKE",decimals:18},"0xB8c77482e45F1F44dE1745F52C74426C631bDD52":{name:"Binance Coin",logo:"bnb.png",erc20:!0,symbol:"BNB",decimals:18},"0xD850942eF8811f2A866692A623011bDE52a462C1":{name:"VeChain",logo:"ven.svg",erc20:!0,symbol:"VEN",decimals:18},"0x91Af0fBB28ABA7E31403Cb457106Ce79397FD4E6":{name:"Aergo",logo:"Aergo.svg",erc20:!0,symbol:"AERGO",decimals:18},"0x5CA9a71B1d01849C0a95490Cc00559717fCF0D1d":{name:"Aeternity",logo:"aeternity.svg",erc20:!0,symbol:"AE",decimals:18},"0xd4fa1460F537bb9085d22C7bcCB5DD450Ef28e3a":{name:"Populous",logo:"ppt.svg",erc20:!0,symbol:"PPT",decimals:8},"0xFA1a856Cfa3409CFa145Fa4e20Eb270dF3EB21ab":{name:"IOST",logo:"iost.png",erc20:!0,symbol:"IOST",decimals:18},"0x039B5649A59967e3e936D7471f9c3700100Ee1ab":{name:"Kucoin Shares",logo:"kucoin.svg",erc20:!0,symbol:"KCS",decimals:6},"0x3893b9422Cd5D70a81eDeFfe3d5A1c6A978310BB":{name:"Mithril",logo:"mith.svg",erc20:!0,symbol:"MITH",decimals:18},"0xb7cB1C96dB6B22b0D3d9536E0108d062BD488F74":{name:"Walton Token",logo:"wtc.svg",erc20:!0,symbol:"WTC",decimals:18},"0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671":{name:"Numeraire",logo:"nmr.png",erc20:!0,symbol:"NMR",decimals:18},"0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd":{name:"Gemini Dollar",logo:"gusd.svg",erc20:!0,symbol:"GUSD",decimals:2},"0xA4Bdb11dc0a2bEC88d24A3aa1E6Bb17201112eBe":{name:"StableUSD",logo:"usds.svg",erc20:!0,symbol:"USDS",decimals:6},"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48":{name:"USDC",logo:"usdc.svg",erc20:!0,symbol:"USDC",decimals:6},"0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c":{name:"EURC",logo:"eurc.svg",erc20:!0,symbol:"EURC",decimals:6},"0x93ED3FBe21207Ec2E8f2d3c3de6e058Cb73Bc04d":{name:"Pinakion Token",logo:"pinakion.svg",erc20:!0,symbol:"PNK",decimals:18},"0x419D0d8BdD9aF5e606Ae2232ed285Aff190E711b":{name:"FunFair",logo:"fun.svg",erc20:!0,symbol:"FUN",decimals:8},"0xcA2796F9F61dc7b238Aab043971e49c6164DF375":{name:"YGGDRASH YEED Token",logo:"yggdrash.svg",erc20:!0,symbol:"YEED",decimals:18},"0x03e3f0c25965f13DbbC58246738C183E27b26a56":{name:"Disciplina Token",logo:"disciplina.svg",erc20:!0,symbol:"DSCP",decimals:18},"0xE814aeE960a85208C3dB542C53E7D4a6C8D5f60F":{name:"Chronologic DAY Token",logo:"DAY.png",erc20:!0,symbol:"DAY",decimals:18},"0x7E43581b19ab509BCF9397a2eFd1ab10233f27dE":{name:"PLATINUM",logo:"plat.png",erc20:!0,symbol:"PLAT",decimals:18},"0x8E870D67F660D95d5be530380D0eC0bd388289E1":{name:"Pax Dollar",logo:"usdp.svg",erc20:!0,symbol:"USDP",decimals:18},"0x45804880De22913dAFE09f4980848ECE6EcbAf78":{name:"PAX Gold",logo:"paxg.svg",erc20:!0,symbol:"PAXG",decimals:18},"0x0000000000085d4780B73119b644AE5ecd22b376":{name:"TrueUSD",logo:"TUSD.svg",erc20:!0,symbol:"TUSD",decimals:18},"0x00000000441378008EA67F4284A57932B1c000a5":{name:"TrueGBP",logo:"TGBP.svg",erc20:!0,symbol:"TGBP",decimals:18},"0x00006100F7090010005F1bd7aE6122c3C2CF0090":{name:"TrueAUD",logo:"TAUD.svg",erc20:!0,symbol:"TAUD",decimals:18},"0x00000100F2A2bd000715001920eB70D229700085":{name:"TrueCAD",logo:"TCAD.svg",erc20:!0,symbol:"TCAD",decimals:18},"0x0000852600CEB001E08e00bC008be620d60031F2":{name:"TrueHKD",logo:"THKD.svg",erc20:!0,symbol:"THKD",decimals:18},"0x4Fabb145d64652a948d72533023f6E7A623C7C53":{name:"Binance USD",logo:"busd.svg",erc20:!0,symbol:"BUSD",decimals:18},"0x23Ccc43365D9dD3882eab88F43d515208f832430":{name:"MidasProtocol",logo:"MAS.png",erc20:!0,symbol:"MAS",decimals:18},"0xC16b542ff490e01fcc0DC58a60e1EFdc3e357cA6":{name:"ICE ROCK MINING",logo:"rock2.png",erc20:!0,symbol:"ROCK2",decimals:0},"0x6758B7d441a9739b98552B373703d8d3d14f9e62":{name:"POA20 Token",logo:"POA20.png",erc20:!0,symbol:"POA20",decimals:18},"0x3DB6Ba6ab6F95efed1a6E794caD492fAAabF294D":{name:"LTO Network Token (old)",logo:"LTO.svg",erc20:!0,symbol:"LTOOLD",decimals:8},"0xd01409314aCb3b245CEa9500eCE3F6Fd4d70ea30":{name:"LTO Network Token",logo:"LTO.svg",erc20:!0,symbol:"LTO",decimals:8},"0xfeF4185594457050cC9c23980d301908FE057Bb1":{name:"VIDT Datalink",logo:"VIDT.svg",erc20:!0,symbol:"VIDT-OLD",decimals:18},"0x3BE7bF1A5F23BD8336787D0289B70602f1940875":{name:"VIDT DAO",logo:"VIDT.svg",erc20:!0,symbol:"VIDT",decimals:18},"0x7064aAb39A0Fcf7221c3396719D0917a65E35515":{name:"Cpollo",logo:"Cpollo.svg",erc20:!0,symbol:"CPLO",decimals:18},"0xd8446236FA95b9b5f9fd0f8E7Df1a944823c683d":{name:"NEEO",logo:"neeo.png",erc20:!0,symbol:"NEEO",decimals:18},"0xA823E6722006afe99E91c30FF5295052fe6b8E32":{name:"Neumark",logo:"neu.svg",erc20:!0,symbol:"NEU",decimals:18},"0x8f693ca8D21b157107184d29D398A8D082b38b76":{name:"Streamr",logo:"streamr.svg",erc20:!0,symbol:"DATA",decimals:18},"0x0Cf0Ee63788A0849fE5297F3407f701E122cC023":{name:"Streamr (old)",logo:"streamr_old.svg",erc20:!0,symbol:"XDATA",decimals:18},"0xA0b73E1Ff0B80914AB6fe0444E65848C4C34450b":{name:"Cronos",logo:"cro.svg",erc20:!0,symbol:"CRO",decimals:8},"0xF70a642bD387F94380fFb90451C2c81d4Eb82CBc":{name:"STAR",logo:"starbase.png",erc20:!0,symbol:"STAR",decimals:18},"0x7C5A0CE9267ED19B22F8cae653F198e3E8daf098":{name:"Santiment",logo:"santiment.svg",erc20:!0,symbol:"SAN",decimals:18},"0x58b6A8A3302369DAEc383334672404Ee733aB239":{name:"Livepeer",logo:"lpt.svg",erc20:!0,symbol:"LPT",decimals:18},"0x6fe56C0bcdD471359019FcBC48863d6c3e9d4F41":{name:"Props",logo:"props.png",erc20:!0,symbol:"PROPS",decimals:18},"0x6c6EE5e31d828De241282B9606C8e98Ea48526E2":{name:"HoloToken",logo:"hot.svg",erc20:!0,symbol:"HOT",decimals:18},"0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c":{name:"Enjin Coin",logo:"enj.svg",erc20:!0,symbol:"ENJ",decimals:18},"0xbf2179859fc6D5BEE9Bf9158632Dc51678a4100e":{name:"AELF",logo:"elf.svg",erc20:!0,symbol:"ELF",decimals:18},"0x39Bb259F66E1C59d5ABEF88375979b4D20D98022":{name:"WAX Token",logo:"wax.svg",erc20:!0,symbol:"WAX",decimals:8},"0x595832F8FC6BF59c85C527fEC3740A1b7a361269":{name:"PowerLedger",logo:"powr.svg",erc20:!0,symbol:"POWR",decimals:6},"0x28dee01D53FED0Edf5f6E310BF8Ef9311513Ae40":{name:"BlitzPredict",logo:"blitzpredict.svg",erc20:!0,symbol:"XBP",decimals:18},"0x33349B282065b0284d756F0577FB39c158F935e6":{name:"Maple Finance",logo:"maple-finance.svg",erc20:!0,erc721:!1,symbol:"MPL",decimals:18},"0xFBeef911Dc5821886e1dda71586d90eD28174B7d":{name:"KnownOrigin",logo:"knownorigin.svg",erc20:!0,symbol:"KODA",decimals:0},"0x8207c1FfC5B6804F6024322CcF34F29c3541Ae26":{name:"Origin Protocol",logo:"ogn.svg",erc20:!0,symbol:"OGN",decimals:18},"0x2A8e1E676Ec238d8A992307B495b45B3fEAa5e86":{name:"Origin Dollar",logo:"ousd.svg",erc20:!0,symbol:"OUSD",decimals:18},"0x856c4Efb76C1D1AE02e20CEB03A2A6a08b0b8dC3":{name:"Origin Ether",logo:"oeth.svg",erc20:!0,symbol:"OETH",decimals:18},"0x9c354503C38481a7A7a51629142963F98eCC12D0":{name:"Origin DeFi Governance",logo:"ogv.svg",erc20:!0,symbol:"OGV",decimals:18},"0x0C4576Ca1c365868E162554AF8e385dc3e7C66D9":{name:"Vote Escrowed Origin DeFi Governance",logo:"veogv.svg",erc20:!0,symbol:"veOGV",decimals:18},"0x8f8221aFbB33998d8584A2B05749bA73c37a938a":{name:"Request",logo:"request.svg",erc20:!0,symbol:"REQ",decimals:18},"0x2aEa4Add166EBf38b63d09a75dE1a7b94Aa24163":{name:"Kudos",logo:"kudos.svg",erc20:!1,erc721:!0,symbol:"KDO",decimals:0},"0x14C926F2290044B647e1Bf2072e67B495eff1905":{name:"Bethereum",logo:"bether.jpg",erc20:!0,symbol:"BETHER",decimals:18},"0x9AAb071B4129B083B01cB5A0Cb513Ce7ecA26fa5":{name:"Hunt Token",logo:"hunt.png",erc20:!0,symbol:"HUNT",decimals:18},"0xFEF3884b603C33EF8eD4183346E093A173C94da6":{name:"Metamorph",logo:"metamorph.svg",erc20:!0,symbol:"METM",decimals:18},"0x0AbdAce70D3790235af448C88547603b945604ea":{name:"district0x",logo:"district0x.svg",erc20:!0,symbol:"DNT",decimals:18},"0xB26631c6dda06aD89B93C71400D25692de89c068":{name:"Minds",logo:"minds.svg",erc20:!0,symbol:"MINDS",decimals:18},"0xBb1f24C0c1554b9990222f036b0AaD6Ee4CAec29":{name:"CryptoSoul",logo:"SOUL.svg",erc20:!0,symbol:"SOUL",decimals:18},"0xFF0E5e014cf97e0615cb50F6f39Da6388E2FaE6E":{name:"Origo",logo:"origo.svg",erc20:!0,symbol:"OGO",decimals:18},"0x0cB8D0B37C7487b11d57F1f33dEfA2B1d3cFccfE":{name:"DANKToken",logo:"dank-logo.svg",erc20:!0,symbol:"DANK",decimals:18},"0x3a4f40631a4f906c2BaD353Ed06De7A5D3fCb430":{name:"PlayDapp Token",logo:"playdapp.svg",erc20:!0,symbol:"PLA",decimals:18},"0xE9e3F9cfc1A64DFca53614a0182CFAD56c10624F":{name:"Su Squares",logo:"Su-Squares.svg",erc20:!1,erc721:!0,symbol:"SU",decimals:0},"0xfA5047c9c78B8877af97BDcb85Db743fD7313d4a":{name:"ROOK",logo:"Rook.svg",erc20:!0,symbol:"ROOK",decimals:18},"0xa62cc35625B0C8dc1fAEA39d33625Bb4C15bD71C":{name:"StormX",logo:"stormx.svg",erc20:!0,symbol:"STMX",decimals:18},"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0":{name:"Matic Network Token",logo:"matic.svg",erc20:!0,symbol:"MATIC",decimals:18},"0x9992eC3cF6A55b00978cdDF2b27BC6882d88D1eC":{name:"Polymath",logo:"poly.svg",erc20:!0,symbol:"POLY",decimals:18},"0x0a50C93c762fDD6E56D86215C24AaAD43aB629aa":{name:"LGO Token",logo:"lgo.png",erc20:!0,symbol:"LGO",decimals:8},"0xc8Cac7672f4669685817cF332a33Eb249F085475":{name:"LivenCoin",logo:"LVN.svg",erc20:!0,symbol:"LVN",decimals:18},"0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD":{name:"Loopring",logo:"LRC.svg",erc20:!0,symbol:"LRC",decimals:18},"0x255Aa6DF07540Cb5d3d297f0D0D4D84cb52bc8e6":{name:"Raiden Network Token",logo:"raiden.svg",erc20:!0,symbol:"RDN",decimals:18},"0x66fD97a78d8854fEc445cd1C80a07896B0b4851f":{name:"Lunch Money",logo:"LMY.svg",erc20:!0,symbol:"LMY",decimals:18},"0x679131F591B4f369acB8cd8c51E68596806c3916":{name:"Trustlines Network Token",logo:"TLN128.png",erc20:!0,symbol:"TLN",decimals:18},"0xdcD85914b8aE28c1E62f1C488E1D968D5aaFfE2b":{name:"TOP Network Token",logo:"TOP.svg",erc20:!0,symbol:"TOP",decimals:18},"0xaea46A60368A7bD060eec7DF8CBa43b7EF41Ad85":{name:"Fetch",logo:"fetch.svg",erc20:!0,symbol:"FET",decimals:18},"0x2e1E15C44Ffe4Df6a0cb7371CD00d5028e571d14":{name:"Mettalex",logo:"mettalex.svg",erc20:!0,symbol:"MTLX",decimals:18},"0xf21661D0D1d76d3ECb8e1B9F1c923DBfffAe4097":{name:"Realio Network",logo:"rio.svg",erc20:!0,symbol:"RIO",decimals:18},"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984":{name:"Uniswap",logo:"uni.svg",erc20:!0,symbol:"UNI",decimals:18},"0x2e6539edc3b76f1E21B71d214527FAbA875F70F3":{name:"Yearn Finance Dot",logo:"YFDOT.svg",erc20:!0,symbol:"YFDOT",decimals:18},"0x9F284E1337A815fe77D2Ff4aE46544645B20c5ff":{name:"Darwinia Commitment Token",logo:"kton.svg",erc20:!0,symbol:"KTON",decimals:18},"0xE48972fCd82a274411c01834e2f031D4377Fa2c0":{name:"TwoKeyEconomy",logo:"2key.svg",erc20:!0,symbol:"2KEY",decimals:18},"0x970B9bB2C0444F5E81e9d0eFb84C8ccdcdcAf84d":{name:"Fuse Token",logo:"fuse.svg",erc20:!0,symbol:"FUSE",decimals:18},"0x0Ae055097C6d159879521C384F1D2123D1f195e6":{name:"STAKE Token",logo:"stake.svg",erc20:!0,symbol:"STAKE",decimals:18},"0x5dc60C4D5e75D22588FA17fFEB90A63E535efCE0":{name:"dKargo",logo:"DKA.svg",erc20:!0,symbol:"DKA",decimals:18},"0x9469D013805bFfB7D3DEBe5E7839237e535ec483":{name:"Darwinia Network Native Token",logo:"ring.svg",erc20:!0,symbol:"RING",decimals:18},"0xA31B1767e09f842ECFd4bc471Fe44F830E3891AA":{name:"ROOBEE",logo:"ROOBEE.svg",erc20:!0,symbol:"ROOBEE",decimals:18},"0xC7e43A1c8E118aA2965F5EAbe0e718D83DB7A63C":{name:"ZCore Token",logo:"zcrt.svg",erc20:!0,symbol:"ZCRT",decimals:18},"0x08d32b0da63e2C3bcF8019c9c5d849d7a9d791e6":{name:"Dentacoin Token",logo:"dcn.svg",erc20:!0,symbol:"DCN",decimals:0},"0xe2f2a5C287993345a840Db3B0845fbC70f5935a5":{name:"mStable USD",logo:"mUSD.svg",erc20:!0,symbol:"mUSD",decimals:18},"0xa3BeD4E1c75D00fa6f4E5E6922DB7261B5E9AcD2":{name:"Meta",logo:"MTA.svg",erc20:!0,symbol:"MTA",decimals:18},"0xe3818504c1B32bF1557b16C238B2E01Fd3149C17":{name:"Pillar",logo:"plr.svg",erc20:!0,symbol:"PLR",decimals:18},"0xba100000625a3754423978a60c9317c58a424e3D":{name:"Balancer (BAL)",logo:"balancer.svg",erc20:!0,symbol:"BAL",decimals:18},"0x8a854288a5976036A725879164Ca3e91d30c6A1B":{name:"Guaranteed Entrance Token",logo:"get-logo.svg",erc20:!0,symbol:"GET",decimals:18},"0x2781246fe707bB15CeE3e5ea354e2154a2877B16":{name:"Elysia",logo:"el.svg",erc20:!0,symbol:"EL",decimals:18},"0x4dA34f8264CB33A5c9F17081B9EF5Ff6091116f4":{name:"Elyfi",logo:"elyfi.svg",erc20:!0,symbol:"ELFI",decimals:18},"0xc12d099be31567add4e4e4d0D45691C3F58f5663":{name:"Auctus",logo:"auc.svg",erc20:!0,symbol:"AUC",decimals:18},"0xdF574c24545E5FfEcb9a659c229253D4111d87e1":{name:"HUSD",logo:"HUSD.svg",erc20:!0,symbol:"HUSD",decimals:8},"0x2ecB13A8c458c379c4d9a7259e202De03c8F3D19":{name:"Block-Chain.com Token",logo:"block-chain.svg",erc20:!0,symbol:"BC",decimals:18},"0x38e4adB44ef08F22F5B5b76A8f0c2d0dCbE7DcA1":{name:"Concentrated Voting Power",logo:"PowerPool.svg",erc20:!0,symbol:"CVP",decimals:18},"0xa117000000f279D81A1D3cc75430fAA017FA5A2e":{name:"Aragon Network Token",logo:"antv2.svg",erc20:!0,symbol:"ANT",decimals:18},"0xDecade1c6Bf2cD9fb89aFad73e4a519C867adcF5":{name:"Experty Wisdom Token",logo:"wisdom-token.svg",erc20:!0,symbol:"WIS",decimals:18},"0x7D85e23014F84E6E21d5663aCD8751bEF3562352":{name:"Axion Old",logo:"obsolete.svg",erc20:!0,symbol:"AXNv1",decimals:18},"0x358AA737e033F34df7c54306960a38d09AaBd523":{name:"Ares Token",logo:"ares.svg",erc20:!0,symbol:"ARES",decimals:18},"0xB62132e35a6c13ee1EE0f84dC5d40bad8d815206":{name:"NEXO",logo:"NEXO.svg",erc20:!0,symbol:"NEXO",decimals:18},"0x4612021C75809160Be60DB21fBc9D6adD0B32deF":{name:"BCP Coin",logo:"BCP.svg",erc20:!0,symbol:"BCP",decimals:18},"0xE9E73E1aE76D17A16cC53E3e87a9a7dA78834d37":{name:"Camp",logo:"Camp.svg",erc20:!0,symbol:"CAMP",decimals:18},"0xdacD69347dE42baBfAEcD09dC88958378780FB62":{name:"Atari Token",logo:"atrilast.svg",erc20:!0,symbol:"ATRI",decimals:0},"0x71F85B2E46976bD21302B64329868fd15eb0D127":{name:"Axion",logo:"axion.svg",erc20:!0,symbol:"AXN",decimals:18},"0xc944E90C64B2c07662A292be6244BDf05Cda44a7":{name:"Graph Token",logo:"graphToken.svg",erc20:!0,symbol:"GRT",decimals:18},"0xFE3E6a25e6b192A42a44ecDDCd13796471735ACf":{name:"Reef Finance",logo:"reef.svg",erc20:!0,symbol:"REEF",decimals:18},"0x43Dfc4159D86F3A37A5A4B3D4580b888ad7d4DDd":{name:"DODO bird",logo:"DODO.svg",erc20:!0,symbol:"DODO",decimals:18},"0x4a615bB7166210CCe20E6642a6f8Fb5d4D044496":{name:"NAOS Finance",logo:"naos.svg",erc20:!0,symbol:"NAOS",decimals:18},"0x111111111117dC0aa78b770fA6A738034120C302":{name:"1INCH Token",logo:"1inch.svg",erc20:!0,symbol:"1INCH",decimals:18},"0x27702a26126e0B3702af63Ee09aC4d1A084EF628":{name:"Aleph.im Token",logo:"aleph.svg",erc20:!0,symbol:"ALEPH",decimals:18},"0x32a7C02e79c4ea1008dD6564b35F131428673c41":{name:"CRUST",logo:"crust.svg",erc20:!0,symbol:"CRU",decimals:18},"0x3472A5A71965499acd81997a54BBA8D852C6E53d":{name:"BADGER",logo:"badger.svg",erc20:!0,symbol:"BADGER",decimals:18},"0x65Def5029A0e7591e46B38742bFEdd1Fb7b24436":{name:"Kanpeki",logo:"kanpeki-green.svg",erc20:!0,symbol:"KAE",decimals:18},"0xF94b5C5651c888d928439aB6514B93944eEE6F48":{name:"Yield App",logo:"yield-app.svg",erc20:!0,symbol:"YLD",decimals:18},"0xDcB01cc464238396E213a6fDd933E36796eAfF9f":{name:"Yield",logo:"yield-logo.svg",erc20:!0,symbol:"YLD",decimals:18},"0x968F6f898a6Df937fC1859b323aC2F14643e3fED":{name:"Newscrypto",logo:"NWC.svg",erc20:!0,symbol:"NWC",decimals:18},"0xeb269732ab75A6fD61Ea60b06fE994cD32a83549":{name:"dForce USDx",logo:"USDx.svg",erc20:!0,symbol:"USDx",decimals:18},"0x6e0daDE58D2d89eBBe7aFc384e3E4f15b70b14D8":{name:"QuiverX",logo:"quiverx.svg",erc20:!0,symbol:"QRX",decimals:18},"0x0beAD9a1bcc1b84D06E3f2df67E3549Fd55aB054":{name:"EURxb",logo:"eurxb.svg",erc20:!0,symbol:"EURxb",decimals:18},"0x9F9c8ec3534c3cE16F928381372BfbFBFb9F4D24":{name:"GraphLinq",logo:"glq.svg",erc20:!0,symbol:"GLQ",decimals:18},"0xEB58343b36C7528F23CAAe63a150240241310049":{name:"NBU",logo:"NBU.svg",erc20:!0,symbol:"NBU",decimals:18},"0x16ECCfDbb4eE1A85A33f3A9B21175Cd7Ae753dB4":{name:"Route",logo:"route.svg",erc20:!0,symbol:"ROUTE",decimals:18},"0x75739d5944534115d7C54ee8C73F186D793BAE02":{name:"Collective",logo:"CO2.svg",erc20:!0,symbol:"CO2",decimals:18},"0x35bD01FC9d6D5D81CA9E055Db88Dc49aa2c699A8":{name:"FWB Pro",logo:"FWB.svg",erc20:!0,symbol:"FWB",decimals:18},"0x9B99CcA871Be05119B2012fd4474731dd653FEBe":{name:"Antimatter",logo:"antimatter.svg",erc20:!0,symbol:"MATTER",decimals:18},"0x6De037ef9aD2725EB40118Bb1702EBb27e4Aeb24":{name:"Render Token",logo:"RNDR.svg",erc20:!0,symbol:"RNDR",decimals:18},"0xDf49C9f599A0A9049D97CFF34D0C30E468987389":{name:"SaTT",logo:"SaTT.svg",erc20:!0,symbol:"SATT",decimals:18},"0x431ad2ff6a9C365805eBaD47Ee021148d6f7DBe0":{name:"dForce",logo:"DF.svg",erc20:!0,symbol:"DF",decimals:18},"0x6e1A19F235bE7ED8E3369eF73b196C07257494DE":{name:"Wrapped Filecoin",logo:"WFIL.svg",erc20:!0,symbol:"WFIL",decimals:18},"0xE452E6Ea2dDeB012e20dB73bf5d3863A3Ac8d77a":{name:"Wrapped Celo",logo:"WCELO.svg",erc20:!0,symbol:"wCELO",decimals:18},"0x4A64515E5E1d1073e83f30cB97BEd20400b66E10":{name:"Wrapped ZEC",logo:"WZEC.svg",erc20:!0,symbol:"WZEC",decimals:18},"0xA3865E64121537b5b59B5e239Db4aCBe6F36aa74":{name:"Wrapped Tezos",logo:"WXTZ.svg",erc20:!0,symbol:"WXTZ",decimals:18},"0x53c4871322Bb47e7A24136fce291a6dcC832a294":{name:"Wrapped Litecoin",logo:"WLTC.svg",erc20:!0,symbol:"WLTC",decimals:18},"0xad3E3Fc59dff318BecEaAb7D00EB4F68b1EcF195":{name:"Wrapped Celo USD",logo:"WCUSD.svg",erc20:!0,symbol:"wCUSD",decimals:18},"0x85D7bdfc9c3426b33A684241eEEE70385Bc42820":{name:"Wrapped Kadena",logo:"WKDA.svg",erc20:!0,symbol:"WKDA",decimals:18},"0x39fBBABf11738317a448031930706cd3e612e1B9":{name:"Wrapped XRP",logo:"WXRP.svg",erc20:!0,symbol:"WXRP",decimals:18},"0xBBC7f7A6AADAc103769C66CBC69AB720f7F9Eae3":{name:"INX Token",logo:"INX.svg",erc20:!0,symbol:"INX",decimals:18},"0x1b40183EFB4Dd766f11bDa7A7c3AD8982e998421":{name:"Vesper",logo:"vsp.svg",erc20:!0,symbol:"VSP",decimals:18},"0x544c42fBB96B39B21DF61cf322b5EDC285EE7429":{name:"InsurAce",logo:"INSUR.svg",erc20:!0,symbol:"INSUR",decimals:18},"0xcC665390b03c5D324D8fAF81C15eCee29A73bCB4":{name:"ChainSwap.com Governance Token",logo:"chainswap.svg",erc20:!0,symbol:"ASAP",decimals:18},"0x182F4c4C97cd1c24E1Df8FC4c053E5C47bf53Bef":{name:"keyTango Token",logo:"keyTango.svg",erc20:!0,symbol:"TANGO",decimals:18},"0x0275E1001e293C46CFe158B3702AADe0B99f88a5":{name:"Oiler",logo:"oiler.svg",erc20:!0,symbol:"OIL",decimals:18},"0xDe30da39c46104798bB5aA3fe8B9e0e1F348163F":{name:"Gitcoin",logo:"gtc.svg",erc20:!0,symbol:"GTC",decimals:18},"0x1796ae0b0fa4862485106a0de9b654eFE301D0b2":{name:"Polychain Monsters",logo:"PMON.svg",erc20:!0,symbol:"PMON",decimals:18},"0x8eEF5a82E6Aa222a60F009ac18c24EE12dBf4b41":{name:"Tixl",logo:"TXL.svg",erc20:!0,symbol:"TXL",decimals:18},"0x5218E472cFCFE0b64A064F055B43b4cdC9EfD3A6":{name:"unFederalReserve Token",logo:"eRSDL.svg",erc20:!0,symbol:"eRSDL",decimals:18},"0xE4cC5A22B39fFB0A56d67F94f9300db20D786a5F":{name:"unFederal eRSDL",logo:"uneRSDL.svg",erc20:!0,symbol:"uneRSDL",decimals:8},"0x2dbA05B51eF5A7DE3E7c3327201CA2F8a25C2414":{name:"unFederal DAI",logo:"unDAI.svg",erc20:!0,symbol:"unDAI",decimals:8},"0xFaCecE87e14B50eafc85C44C01702F5f485CA460":{name:"unFederal ETH",logo:"unETH.svg",erc20:!0,symbol:"unETH",decimals:8},"0x6b576972de33BebDe3A703BfF52a091e79f8c87A":{name:"unFederal USDC",logo:"unUSDC.svg",erc20:!0,symbol:"unUSDC",decimals:8},"0x6e2aA5bB90ac37D9006685AFc651ef067E1c7b44":{name:"unFederal USDT",logo:"unUSDT.svg",erc20:!0,symbol:"unUSDT",decimals:8},"0x5D446FC8DBd10EBAcfE9A427aB5402586af98cD4":{name:"unFederal WBTC",logo:"unWBTC.svg",erc20:!0,symbol:"unWBTC",decimals:8},"0xD837eCa6C91c67D98461A411BA2f00bdA9960a9D":{name:"unFederal AAVE",logo:"unAAVE.svg",erc20:!0,symbol:"unAAVE",decimals:8},"0x9e29Ce9cD25F4141dF6BB85b27Ef6933a16A5824":{name:"unFederal YFI",logo:"unYFI.svg",erc20:!0,symbol:"unYFI",decimals:8},"0x031002d15B0D0Cd7c9129d6F644446368deaE391":{name:"unFederal LINK",logo:"unLINK.svg",erc20:!0,symbol:"unLINK",decimals:8},"0xB8E2e2101eD11e9138803cd3e06e16dd19910647":{name:"ArdCoin",logo:"ardcoin.svg",erc20:!0,symbol:"ARDX",decimals:2},"0x6D0F5149c502faf215C89ab306ec3E50b15e2892":{name:"Portion Token",logo:"PRT.svg",erc20:!0,symbol:"PRT",decimals:18},"0xcc7ab8d78dBA187dC95bF3bB86e65E0C26d0041f":{name:"3SPACE ART",logo:"3SPACE.svg",erc20:!0,symbol:"PACE",decimals:18},"0x3845badAde8e6dFF049820680d1F14bD3903a5d0":{name:"SAND",logo:"SAND.svg",erc20:!0,symbol:"SAND",decimals:18},"0xcc7ab8d78dBA187dC95bF3bB86e65E0C26d0041f":{name:"Spacelens",logo:"SPACE.svg",erc20:!0,symbol:"SPACE",decimals:18},"0x50f5474724e0Ee42D9a4e711ccFB275809Fd6d4a":{name:"Sandbox's LANDs",logo:"SAND.svg",erc20:!1,erc721:!0,symbol:"LAND",decimals:0},"0x362bc847A3a9637d3af6624EeC853618a43ed7D2":{name:"PARSIQ",logo:"parsiq.svg",erc20:!0,symbol:"PRQ",decimals:18},"0x21381e026Ad6d8266244f2A583b35F9E4413FA2a":{name:"Formation Finance",logo:"form.svg",erc20:!0,symbol:"FORM",decimals:18},"0x2ba592F78dB6436527729929AAf6c908497cB200":{name:"Cream",logo:"cream.svg",erc20:!0,symbol:"CREAM",decimals:18},"0x46576e20EC5F25586A6Fa2E0d6B6058354B72E72":{name:"Cryptomind",logo:"CR.svg",erc20:!0,erc721:!1,symbol:"CR",decimals:8},"0x5ab21Ec0bfa0B29545230395e3Adaca7d552C948":{name:"PUNKS Comic",logo:"punks-comic.svg",erc20:!1,erc721:!0,symbol:"COMIC",decimals:0},"0x9C2dc0c3CC2BADdE84B0025Cf4df1c5aF288D835":{name:"Coreto",logo:"coreto.svg",erc20:!0,symbol:"COR",decimals:18},"0x0De05F6447ab4D22c8827449EE4bA2D5C288379B":{name:"OOKI",logo:"ooki.svg",erc20:!0,symbol:"OOKI",decimals:18},"0x6B4c7A5e3f0B99FCD83e9c089BDDD6c7FCe5c611":{name:"Million",logo:"million.svg",erc20:!0,symbol:"MM",decimals:18},"0x56d811088235F11C8920698a204A5010a788f4b3":{name:"bZx Protocol Token (BZRX)",logo:"ic_token_bzrx.svg",erc20:!0,symbol:"BZRX",decimals:18},"0xB72B31907C1C95F3650b64b2469e08EdACeE5e8F":{name:"bZx Vesting Token (vBZRX)",logo:"ic_token_vbzrx.svg",erc20:!0,symbol:"vBZRX",decimals:18},"0x3085154623F51b00Dedfc6Ceeb5197277A66B17B":{name:"NIFTY",logo:"nfty.svg",erc20:!0,symbol:"NFTY",decimals:18},"0xB983E01458529665007fF7E0CDdeCDB74B967Eb6":{name:"Fulcrum ETH iToken (iETH)",logo:"ic_token_ieth.svg",erc20:!0,symbol:"iETH",decimals:18},"0x32E4c68B3A4a813b710595AebA7f6B7604Ab9c15":{name:"Fulcrum USDC iToken (iUSDC)",logo:"ic_token_iusdc.svg",erc20:!0,symbol:"iUSDC",decimals:6},"0x2ffa85f655752fB2aCB210287c60b9ef335f5b6E":{name:"Fulcrum WBTC iToken (iWBTC)",logo:"ic_token_ibtc.svg",erc20:!0,symbol:"iWBTC",decimals:8},"0x687642347a9282Be8FD809d8309910A3f984Ac5a":{name:"Fulcrum KNC iToken (iKNC)",logo:"ic_token_iknc.svg",erc20:!0,symbol:"iKNC",decimals:18},"0x463538705E7d22aA7f03Ebf8ab09B067e1001B54":{name:"Fulcrum LINK iToken (iLINK)",logo:"ic_token_ilink.svg",erc20:!0,symbol:"iLINK",decimals:18},"0x6b093998D36f2C7F0cc359441FBB24CC629D5FF0":{name:"Fulcrum DAI iToken (iDAI)",logo:"ic_token_idai.svg",erc20:!0,symbol:"iDAI",decimals:18},"0x7e9997a38A439b2be7ed9c9C4628391d3e055D48":{name:"Fulcrum USDT iToken (iUSDT)",logo:"ic_token_iusdt.svg",erc20:!0,symbol:"iUSDT",decimals:6},"0x9189c499727f88F8eCC7dC4EEA22c828E6AaC015":{name:"Fulcrum MKR iToken (iMKR)",logo:"ic_token_imkr.svg",erc20:!0,symbol:"iMKR",decimals:18},"0x18240BD9C07fA6156Ce3F3f61921cC82b2619157":{name:"Fulcrum BZRX iToken (iBZRX)",logo:"ic_token_ibzrx.svg",erc20:!0,symbol:"iBZRX",decimals:18},"0x7F3Fe9D492A9a60aEBb06d82cBa23c6F32CAd10b":{name:"Fulcrum YFI iToken (iYFI)",logo:"ic_token_iyfi.svg",erc20:!0,symbol:"iYFI",decimals:18},"0x0a625FceC657053Fe2D9FFFdeb1DBb4e412Cf8A8":{name:"Fulcrum UNI iToken (iUNI)",logo:"ic_token_iuni.svg",erc20:!0,symbol:"iUNI",decimals:18},"0x0cae8d91E0b1b7Bd00D906E990C3625b2c220db1":{name:"Fulcrum AAVE iToken (iAAVE)",logo:"ic_token_iaave.svg",erc20:!0,symbol:"iAAVE",decimals:18},"0x3dA0e01472Dee3746b4D324a65D7EdFaECa9Aa4f":{name:"Fulcrum LRC iToken (iLRC)",logo:"ic_token_ilrc.svg",erc20:!0,symbol:"iLRC",decimals:18},"0x6d29903BC2c4318b59B35d97Ab98ab9eC08Ed70D":{name:"Fulcrum COMP iToken (iCOMP)",logo:"ic_token_icomp.svg",erc20:!0,symbol:"iCOMP",decimals:18},"0x08c32b0726C5684024ea6e141C50aDe9690bBdcc":{name:"Stratos Token",logo:"stos.svg",erc20:!0,symbol:"STOS",decimals:18},"0xe28b3B32B6c345A34Ff64674606124Dd5Aceca30":{name:"Injective",logo:"inj.svg",erc20:!0,symbol:"INJ",decimals:18},"0xe516D78d784C77D479977BE58905B3f2b1111126":{name:"Bitspawn",logo:"spwn.svg",erc20:!0,symbol:"SPWN",decimals:18},"0xB16e967ff83DE3F1e9FCeAfbc2C28c1c5c56eF91":{name:"Polkadog",logo:"polkadog.svg",erc20:!0,symbol:"PDOG",decimals:18},"0x07c52c2537D84e532a9F15d32E152C8B94D2b232":{name:"ZkTube",logo:"ZKT.svg",erc20:!0,symbol:"ZKT",decimals:18},"0xF4d861575ecC9493420A3f5a14F85B13f0b50EB3":{name:"Fractal Protocol",logo:"fractal.svg",erc20:!0,symbol:"FCL",decimals:18},"0x3af33bEF05C2dCb3C7288b77fe1C8d2AeBA4d789":{name:"Kromatika",logo:"krom.svg",erc20:!0,symbol:"KROM",decimals:18},"0xA130E3a33a4d84b04c3918c4E5762223Ae252F80":{name:"Swash Token",logo:"swash.svg",erc20:!0,symbol:"SWASH",decimals:18},"0xea7Cc765eBC94C4805e3BFf28D7E4aE48D06468A":{name:"NearPad Token",logo:"nearpad.svg",erc20:!0,symbol:"PAD",decimals:18},"0x87C22615435998D69ACA34889D03155B694a94fc":{name:"DiemLibre",logo:"DLB.svg",erc20:!0,symbol:"DLB",decimals:18},"0x4d224452801ACEd8B2F0aebE155379bb5D594381":{name:"ApeCoin",logo:"APE.svg",erc20:!0,symbol:"APE",decimals:18},"0xCd1fAFf6e578Fa5cAC469d2418C95671bA1a62Fe":{name:"Torum Token",logo:"torum.svg",erc20:!0,symbol:"XTM",decimals:18},"0xcf0C122c6b73ff809C693DB761e7BaeBe62b6a2E":{name:"FLOKI",logo:"floki.svg",erc20:!0,symbol:"FLOKI",decimals:9},"0xe831F96A7a1DcE1aa2EB760b1e296c6A74CaA9d5":{name:"Nexum Coin",logo:"nexum.svg",erc20:!0,symbol:"Nexm",decimals:8},"0x6710c63432A2De02954fc0f851db07146a6c0312":{name:"MFG",logo:"mfg.svg",erc20:!0,symbol:"MFG",decimals:18},"0xae78736Cd615f374D3085123A210448E74Fc6393":{name:"Rocket Pool ETH",logo:"rETH.svg",erc20:!0,symbol:"rETH",decimals:18},"0x0C10bF8FcB7Bf5412187A595ab97a3609160b5c6":{name:"Decentralized USD",logo:"USDD.svg",erc20:!0,symbol:"USDD",decimals:18},"0xD33526068D116cE69F19A9ee46F0bd304F21A51f":{name:"Rocket Pool",logo:"rpl.svg",erc20:!0,symbol:"RPL",decimals:18},"0x9d38F670D15C14716BE1F109a4F453E966A2B6D4":{name:"Quid Ika",logo:"QuidIka.svg",erc20:!0,symbol:"QUID",decimals:9},"0xD3c625F54dec647DB8780dBBe0E880eF21BA4329":{name:"HollaEx Token",logo:"xht.svg",erc20:!0,symbol:"XHT",decimals:18},"0x01e0E2e61f554eCAaeC0cC933E739Ad90f24a86d":{name:"GTON",logo:"gton.svg",erc20:!0,symbol:"GTON",decimals:18},"0xeFF66B4A84C8a6b69b99EB1C5e39aF8fc35d13db":{name:"sGTON",logo:"sgton.svg",erc20:!0,symbol:"sGTON",decimals:18},"0x7659CE147D0e714454073a5dd7003544234b6Aa0":{name:"XCAD Token",logo:"xcad.svg",erc20:!0,symbol:"XCAD",decimals:18},"0x88dF592F8eb5D7Bd38bFeF7dEb0fBc02cf3778a0":{name:"Tellor Tributes",logo:"TRB.svg",erc20:!0,symbol:"TRB",decimals:18},"0x8d96B4ab6C741a4C8679AE323a100d74f085BA8F":{name:"Bazaars",logo:"BZR.svg",erc20:!0,symbol:"BZR",decimals:18},"0x9ee91F9f426fA633d227f7a9b000E28b9dfd8599":{name:"Liquid staked MATIC",logo:"stMATIC.svg",erc20:!0,symbol:"stMATIC",decimals:18},"0x0d02755a5700414B26FF040e1dE35D337DF56218":{name:"Bend Token",logo:"BendDAO.svg",erc20:!0,symbol:"BEND",decimals:18},"0x1A4b46696b2bB4794Eb3D4c26f1c55F9170fa4C5":{name:"BitDAO",logo:"BitDAO.svg",erc20:!0,erc721:!1,symbol:"BIT",decimals:18},"0xb8919522331C59f5C16bDfAA6A121a6E03A91F62":{name:"Home",logo:"home.svg",erc20:!0,erc721:!1,symbol:"HOME",decimals:6},"0xa54d2EBfD977ad836203c85F18db2F0a0cF88854":{name:"Bacon",logo:"bacon.svg",erc20:!0,erc721:!1,symbol:"BACON",decimals:18},"0x249cA82617eC3DfB2589c4c17ab7EC9765350a18":{name:"Verse",logo:"VERSE.svg",erc20:!0,erc721:!1,symbol:"VERSE",decimals:18},"0x317eb4ad9cfaC6232f0046831322E895507bcBeb":{name:"Tidex Token",logo:"tidex.svg",erc20:!0,symbol:"TDX",decimals:18},"0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE":{name:"SHIBA INU",logo:"shib.svg",erc20:!0,symbol:"SHIB",decimals:18},"0x3506424F91fD33084466F402d5D97f05F8e3b4AF":{name:"chiliZ",logo:"chz.svg",erc20:!0,symbol:"CHZ",decimals:18},"0x15D4c048F83bd7e37d49eA4C83a07267Ec4203dA":{name:"Gala",logo:"gala.svg",erc20:!0,symbol:"GALA",decimals:8},"0x69af81e73A73B40adF4f3d4223Cd9b1ECE623074":{name:"Mask Network",logo:"mask.svg",erc20:!0,symbol:"MASK",decimals:18},"0xD533a949740bb3306d119CC777fa900bA034cd52":{name:"Curve DAO Token",logo:"crv.svg",erc20:!0,symbol:"CRV",decimals:18},"0x92D6C1e31e14520e676a687F0a93788B716BEff5":{name:"dYdX",logo:"dydx.svg",erc20:!0,symbol:"DYDX",decimals:18},"0x60bE1e1fE41c1370ADaF5d8e66f07Cf1C2Df2268":{name:"Perion Credits",logo:"perc.svg",erc20:!0,symbol:"PERC",decimals:18},"0x8971f9fd7196e5cEE2C1032B50F656855af7Dd26":{name:"Lambda",logo:"LAMB.svg",erc20:!0,symbol:"LAMB",decimals:18},"0x65514b352d1d4a17DE97f95C7faB177C625Bd6ff":{name:"KIBBLE Token",logo:"kibble.svg",erc20:!0,erc721:!1,symbol:"KBLE",decimals:18},"0xd9Fcd98c322942075A5C3860693e9f4f03AAE07b":{name:"Euler",logo:"eul.svg",erc20:!0,erc721:!1,symbol:"EUL",decimals:18},"0x777fD20c983d6658c1D50b3958B3A1733d1cd1E1":{name:"PUBLISH",logo:"publish.svg",erc20:!0,symbol:"NEWS",decimals:9},"0x19062190B1925b5b6689D7073fDfC8c2976EF8Cb":{name:"Swarm",logo:"ethswarm.svg",erc20:!0,symbol:"BZZ",decimals:16},"0x6aA030a9710CAD6E719A4EC0a85260Eb3F4F86c1":{name:"Real World Asset",logo:"rwa.svg",erc20:!0,symbol:"RWA",decimals:18},"0xde16Ce60804a881e9F8c4eBB3824646EDecd478D":{name:"MagicCraft",logo:"magiccraft.svg",erc20:!0,symbol:"MCRT",decimals:9},"0x7163436b8EfFfB469F6BB81cc908b1661d4795e6":{name:"Esco coin",logo:"escocoin.svg",erc20:!0,symbol:"ESCO",decimals:18},"0x9625cE7753ace1fa1865A47aAe2c5C2Ce4418569":{name:"KAP Games",logo:"kap-games.svg",erc20:!0,symbol:"KAP",decimals:18},"0x4FbB350052Bca5417566f188eB2EBCE5b19BC964":{name:"Rigo",logo:"grg.svg",erc20:!0,symbol:"GRG",decimals:18},"0xD8E163967FED76806Df0097B704bA721B9b37656":{name:"Cope",logo:"cope.svg",erc20:!0,symbol:"COPE",decimals:18},"0xdfbc9050F5B01DF53512DCC39B4f2B2BBaCD517A":{name:"Jobchain",logo:"job.svg",erc20:!0,symbol:"JOB",decimals:8},"0x083D41d6DD21EE938f0c055CA4fb12268DF0EfaC":{name:"GogolCoin",logo:"gol.svg",erc20:!0,symbol:"GOL",decimals:4},"0x9B4a69dE6CA0deFDD02c0c4ce6Cb84de5202944E":{name:"PROOF Platform",erc20:!0,symbol:"PROOF",decimals:9,logo:"proof-platform.svg"},"0x4507cEf57C46789eF8d1a19EA45f4216bae2B528":{name:"TokenFi",logo:"tokenfi.svg",erc20:!0,symbol:"TOKEN",decimals:9},"0x8B39B70E39Aa811b69365398e0aACe9bee238AEb":{name:"PolkaFoundry",logo:"pkf.svg",erc20:!0,symbol:"PKF",decimals:18},"0x2c95D751DA37A5C1d9c5a7Fd465c1d50F3d96160":{name:"WASSIE",logo:"wassie.svg",erc20:!0,symbol:"WASSIE",decimals:18},"0x06325440D014e39736583c165C2963BA99fAf14E":{name:"Curve.fi",logo:"steCRV.png",erc20:!0,symbol:"steCRV",decimals:18},"0x4E241A9EC66832a16bceaeB9156E524487f061D7":{name:"ETF Rocks",logo:"etf.svg",erc20:!0,symbol:"ETF",decimals:18},"0xA849EaaE994fb86Afa73382e9Bd88c2B6b18Dc71":{name:"Mass Vehicle Ledger",logo:"mvl.svg",erc20:!0,symbol:"MVL",decimals:18},"0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa":{name:"Mantle Staked Ether",logo:"mETH.svg",erc20:!0,erc721:!1,symbol:"mETH",decimals:18}}}}},{package:"@metamask/contract-metadata",file:"node_modules/@metamask/contract-metadata/contract-map.json"}],[1420,{"./contract-map.json":1419},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("./contract-map.json")}}},{package:"@metamask/contract-metadata",file:"node_modules/@metamask/contract-metadata/index.js"}],[1421,{"./types.cjs":1425},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP=r.ApprovalType=r.ORIGIN_METAMASK=r.NFT_API_TIMEOUT=r.NFT_API_VERSION=r.NFT_API_BASE_URL=r.OPENSEA_PROXY_URL=r.BUILT_IN_NETWORKS=r.TESTNET_TICKER_SYMBOLS=r.ASSET_TYPES=r.GWEI=r.ERC1155_TOKEN_RECEIVER_INTERFACE_ID=r.ERC1155_METADATA_URI_INTERFACE_ID=r.ERC1155_INTERFACE_ID=r.ERC721_ENUMERABLE_INTERFACE_ID=r.ERC721_METADATA_INTERFACE_ID=r.ERC721_INTERFACE_ID=r.ERC20=r.ERC1155=r.ERC721=r.MAX_SAFE_CHAIN_ID=r.GANACHE_CHAIN_ID=r.IPFS_DEFAULT_GATEWAY_URL=r.FALL_BACK_VS_CURRENCY=r.RPC=void 0;const s=e("./types.cjs");var n;r.RPC="rpc",r.FALL_BACK_VS_CURRENCY="ETH",r.IPFS_DEFAULT_GATEWAY_URL="https://cloudflare-ipfs.com/ipfs/",r.GANACHE_CHAIN_ID="0x539",r.MAX_SAFE_CHAIN_ID=0xfffffffffffec,r.ERC721="ERC721",r.ERC1155="ERC1155",r.ERC20="ERC20",r.ERC721_INTERFACE_ID="0x80ac58cd",r.ERC721_METADATA_INTERFACE_ID="0x5b5e139f",r.ERC721_ENUMERABLE_INTERFACE_ID="0x780e9d63",r.ERC1155_INTERFACE_ID="0xd9b67a26",r.ERC1155_METADATA_URI_INTERFACE_ID="0x0e89341c",r.ERC1155_TOKEN_RECEIVER_INTERFACE_ID="0x4e2312e0",r.GWEI="gwei",r.ASSET_TYPES={NATIVE:"NATIVE",TOKEN:"TOKEN",NFT:"NFT",UNKNOWN:"UNKNOWN"},r.TESTNET_TICKER_SYMBOLS={GOERLI:"GoerliETH",SEPOLIA:"SepoliaETH",LINEA_GOERLI:"LineaETH",LINEA_SEPOLIA:"LineaETH"},r.BUILT_IN_NETWORKS={[s.NetworkType.goerli]:{chainId:s.ChainId.goerli,ticker:s.NetworksTicker.goerli,rpcPrefs:{blockExplorerUrl:`https://${s.NetworkType.goerli}.etherscan.io`}},[s.NetworkType.sepolia]:{chainId:s.ChainId.sepolia,ticker:s.NetworksTicker.sepolia,rpcPrefs:{blockExplorerUrl:`https://${s.NetworkType.sepolia}.etherscan.io`}},[s.NetworkType.mainnet]:{chainId:s.ChainId.mainnet,ticker:s.NetworksTicker.mainnet,rpcPrefs:{blockExplorerUrl:"https://etherscan.io"}},[s.NetworkType["linea-goerli"]]:{chainId:s.ChainId["linea-goerli"],ticker:s.NetworksTicker["linea-goerli"],rpcPrefs:{blockExplorerUrl:"https://goerli.lineascan.build"}},[s.NetworkType["linea-sepolia"]]:{chainId:s.ChainId["linea-sepolia"],ticker:s.NetworksTicker["linea-sepolia"],rpcPrefs:{blockExplorerUrl:"https://sepolia.lineascan.build"}},[s.NetworkType["linea-mainnet"]]:{chainId:s.ChainId["linea-mainnet"],ticker:s.NetworksTicker["linea-mainnet"],rpcPrefs:{blockExplorerUrl:"https://lineascan.build"}},[s.NetworkType.rpc]:{chainId:undefined,blockExplorerUrl:undefined,ticker:undefined,rpcPrefs:undefined}},r.OPENSEA_PROXY_URL="https://proxy.api.cx.metamask.io/opensea/v1/api/v2",r.NFT_API_BASE_URL="https://nft.api.cx.metamask.io",r.NFT_API_VERSION="1",r.NFT_API_TIMEOUT=15e3,r.ORIGIN_METAMASK="metamask",function(e){e.AddEthereumChain="wallet_addEthereumChain",e.ConnectAccounts="connect_accounts",e.EthDecrypt="eth_decrypt",e.EthGetEncryptionPublicKey="eth_getEncryptionPublicKey",e.EthSignTypedData="eth_signTypedData",e.PersonalSign="personal_sign",e.ResultError="result_error",e.ResultSuccess="result_success",e.SnapDialogAlert="snap_dialog:alert",e.SnapDialogConfirmation="snap_dialog:confirmation",e.SnapDialogPrompt="snap_dialog:prompt",e.SnapDialogDefault="snap_dialog",e.SwitchEthereumChain="wallet_switchEthereumChain",e.Transaction="transaction",e.Unlock="unlock",e.WalletConnect="wallet_connect",e.WalletRequestPermissions="wallet_requestPermissions",e.WatchAsset="wallet_watchAsset"}(n||(r.ApprovalType=n={})),r.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP={[s.ChainId.goerli]:s.BuiltInNetworkName.Goerli,[s.ChainId.sepolia]:s.BuiltInNetworkName.Sepolia,[s.ChainId.mainnet]:s.BuiltInNetworkName.Mainnet,[s.ChainId["linea-goerli"]]:s.BuiltInNetworkName.LineaGoerli,[s.ChainId["linea-sepolia"]]:s.BuiltInNetworkName.LineaSepolia,[s.ChainId["linea-mainnet"]]:s.BuiltInNetworkName.LineaMainnet,[s.ChainId.aurora]:s.BuiltInNetworkName.Aurora}}}},{package:"@metamask/controller-utils",file:"node_modules/@metamask/controller-utils/dist/constants.cjs"}],[1422,{"./constants.cjs":1421,"./siwe.cjs":1424,"./types.cjs":1425,"./util.cjs":1426},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.isEqualCaseInsensitive=r.weiHexToGweiDec=r.toHex=r.toChecksumHexAddress=r.timeoutFetch=r.successfulFetch=r.safelyExecuteWithTimeout=r.safelyExecute=r.query=r.normalizeEnsName=r.isValidHexAddress=r.isValidJson=r.isSmartContractCode=r.isSafeDynamicKey=r.isSafeChainId=r.isPlainObject=r.isNonEmptyArray=r.hexToText=r.hexToBN=r.handleFetch=r.gweiDecToWEIBN=r.getBuyURL=r.fromHex=r.fractionBN=r.fetchWithErrorHandling=r.convertHexToDecimal=r.BNToHex=void 0,n(e("./constants.cjs"),r);var a=e("./util.cjs");Object.defineProperty(r,"BNToHex",{enumerable:!0,get:function(){return a.BNToHex}}),Object.defineProperty(r,"convertHexToDecimal",{enumerable:!0,get:function(){return a.convertHexToDecimal}}),Object.defineProperty(r,"fetchWithErrorHandling",{enumerable:!0,get:function(){return a.fetchWithErrorHandling}}),Object.defineProperty(r,"fractionBN",{enumerable:!0,get:function(){return a.fractionBN}}),Object.defineProperty(r,"fromHex",{enumerable:!0,get:function(){return a.fromHex}}),Object.defineProperty(r,"getBuyURL",{enumerable:!0,get:function(){return a.getBuyURL}}),Object.defineProperty(r,"gweiDecToWEIBN",{enumerable:!0,get:function(){return a.gweiDecToWEIBN}}),Object.defineProperty(r,"handleFetch",{enumerable:!0,get:function(){return a.handleFetch}}),Object.defineProperty(r,"hexToBN",{enumerable:!0,get:function(){return a.hexToBN}}),Object.defineProperty(r,"hexToText",{enumerable:!0,get:function(){return a.hexToText}}),Object.defineProperty(r,"isNonEmptyArray",{enumerable:!0,get:function(){return a.isNonEmptyArray}}),Object.defineProperty(r,"isPlainObject",{enumerable:!0,get:function(){return a.isPlainObject}}),Object.defineProperty(r,"isSafeChainId",{enumerable:!0,get:function(){return a.isSafeChainId}}),Object.defineProperty(r,"isSafeDynamicKey",{enumerable:!0,get:function(){return a.isSafeDynamicKey}}),Object.defineProperty(r,"isSmartContractCode",{enumerable:!0,get:function(){return a.isSmartContractCode}}),Object.defineProperty(r,"isValidJson",{enumerable:!0,get:function(){return a.isValidJson}}),Object.defineProperty(r,"isValidHexAddress",{enumerable:!0,get:function(){return a.isValidHexAddress}}),Object.defineProperty(r,"normalizeEnsName",{enumerable:!0,get:function(){return a.normalizeEnsName}}),Object.defineProperty(r,"query",{enumerable:!0,get:function(){return a.query}}),Object.defineProperty(r,"safelyExecute",{enumerable:!0,get:function(){return a.safelyExecute}}),Object.defineProperty(r,"safelyExecuteWithTimeout",{enumerable:!0,get:function(){return a.safelyExecuteWithTimeout}}),Object.defineProperty(r,"successfulFetch",{enumerable:!0,get:function(){return a.successfulFetch}}),Object.defineProperty(r,"timeoutFetch",{enumerable:!0,get:function(){return a.timeoutFetch}}),Object.defineProperty(r,"toChecksumHexAddress",{enumerable:!0,get:function(){return a.toChecksumHexAddress}}),Object.defineProperty(r,"toHex",{enumerable:!0,get:function(){return a.toHex}}),Object.defineProperty(r,"weiHexToGweiDec",{enumerable:!0,get:function(){return a.weiHexToGweiDec}}),Object.defineProperty(r,"isEqualCaseInsensitive",{enumerable:!0,get:function(){return a.isEqualCaseInsensitive}}),n(e("./types.cjs"),r),n(e("./siwe.cjs"),r)}}},{package:"@metamask/controller-utils",file:"node_modules/@metamask/controller-utils/dist/index.cjs"}],[1423,{"@metamask/utils":2761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.projectLogger=void 0;const s=e("@metamask/utils");Object.defineProperty(r,"createModuleLogger",{enumerable:!0,get:function(){return s.createModuleLogger}}),r.projectLogger=(0,s.createProjectLogger)("controller-utils")}}},{package:"@metamask/controller-utils",file:"node_modules/@metamask/controller-utils/dist/logger.cjs"}],[1424,{"./logger.cjs":1423,"@metamask/utils":2761,"@spruceid/siwe-parser":3031,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.detectSIWE=r.isValidSIWEOrigin=r.parseDomainParts=void 0;const s=e("@metamask/utils"),n=e("@spruceid/siwe-parser"),a=e("./logger.cjs"),o=(0,a.createModuleLogger)(a.projectLogger,"detect-siwe");function i(e){try{const n="string"!=typeof(r=e)?r:(0,s.remove0x)(r),a=t.from(n,"hex");return 32===a.length?e:a.toString("utf8")}catch(t){return o(t),e}var r}const c={"http:":"80","https:":"443"};r.parseDomainParts=(e,t)=>e.match(/^[^/:]*:\/\//u)?new URL(e):new URL(`${t}//${e}`);r.isValidSIWEOrigin=e=>{try{const{origin:t,siwe:s}=e;if(t.startsWith("file://"))return!0;if(!t||!s?.parsedMessage?.domain)return!1;const n=new URL(t),a=(0,r.parseDomainParts)(s.parsedMessage.domain,n.protocol);return 0===a.hostname.localeCompare(n.hostname,undefined,{sensitivity:"accent"})&&(""!==a.port&&a.port!==n.port?""===n.port&&a.port===c[n.protocol]:""===a.username||a.username===n.username)}catch(e){return o(e),!1}};r.detectSIWE=e=>{try{const{data:t}=e,r=i(t);return{isSIWEMessage:!0,parsedMessage:new n.ParsedMessage(r)}}catch(e){return{isSIWEMessage:!1,parsedMessage:null}}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/controller-utils",file:"node_modules/@metamask/controller-utils/dist/siwe.cjs"}],[1425,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n;Object.defineProperty(r,"__esModule",{value:!0}),r.NetworkNickname=r.BlockExplorerUrl=r.NetworksTicker=r.ChainId=r.BuiltInNetworkName=r.isInfuraNetworkType=r.isNetworkType=r.NetworkType=r.InfuraNetworkType=void 0,r.InfuraNetworkType={mainnet:"mainnet",goerli:"goerli",sepolia:"sepolia","linea-goerli":"linea-goerli","linea-sepolia":"linea-sepolia","linea-mainnet":"linea-mainnet"},r.NetworkType={...r.InfuraNetworkType,rpc:"rpc"},r.isNetworkType=function(e){return Object.values(r.NetworkType).includes(e)},r.isInfuraNetworkType=function(e){return Object.keys(r.InfuraNetworkType).includes(e)},function(e){e.Mainnet="mainnet",e.Goerli="goerli",e.Sepolia="sepolia",e.LineaGoerli="linea-goerli",e.LineaSepolia="linea-sepolia",e.LineaMainnet="linea-mainnet",e.Aurora="aurora"}(s||(r.BuiltInNetworkName=s={})),r.ChainId={[s.Mainnet]:"0x1",[s.Goerli]:"0x5",[s.Sepolia]:"0xaa36a7",[s.Aurora]:"0x4e454152",[s.LineaGoerli]:"0xe704",[s.LineaSepolia]:"0xe705",[s.LineaMainnet]:"0xe708"},function(e){e.mainnet="ETH",e.goerli="GoerliETH",e.sepolia="SepoliaETH",e["linea-goerli"]="LineaETH",e["linea-sepolia"]="LineaETH",e["linea-mainnet"]="ETH",e.rpc=""}(n||(r.NetworksTicker=n={})),r.BlockExplorerUrl={[s.Mainnet]:"https://etherscan.io",[s.Goerli]:"https://goerli.etherscan.io",[s.Sepolia]:"https://sepolia.etherscan.io",[s.LineaGoerli]:"https://goerli.lineascan.build",[s.LineaSepolia]:"https://sepolia.lineascan.build",[s.LineaMainnet]:"https://lineascan.build"},r.NetworkNickname={[s.Mainnet]:"Ethereum Mainnet",[s.Goerli]:"Goerli",[s.Sepolia]:"Sepolia",[s.LineaGoerli]:"Linea Goerli",[s.LineaSepolia]:"Linea Sepolia",[s.LineaMainnet]:"Linea"}}}},{package:"@metamask/controller-utils",file:"node_modules/@metamask/controller-utils/dist/types.cjs"}],[1426,{"./constants.cjs":1421,"@ethereumjs/util":478,"@metamask/ethjs-unit":1764,"@metamask/utils":2761,"bn.js":3513,buffer:3561,"eth-ens-namehash":3755,"fast-deep-equal":3896},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.isEqualCaseInsensitive=r.isValidJson=r.isNonEmptyArray=r.isPlainObject=r.convertHexToDecimal=r.query=r.normalizeEnsName=r.timeoutFetch=r.fetchWithErrorHandling=r.handleFetch=r.successfulFetch=r.isSmartContractCode=r.isValidHexAddress=r.toChecksumHexAddress=r.safelyExecuteWithTimeout=r.safelyExecute=r.toHex=r.fromHex=r.hexToText=r.hexToBN=r.getBuyURL=r.weiHexToGweiDec=r.gweiDecToWEIBN=r.fractionBN=r.BNToHex=r.isSafeChainId=r.isSafeDynamicKey=r.PROTOTYPE_POLLUTION_BLOCKLIST=void 0;const n=e("@ethereumjs/util"),a=e("@metamask/ethjs-unit"),o=e("@metamask/utils"),i=s(e("bn.js")),c=s(e("eth-ens-namehash")),l=s(e("fast-deep-equal")),u=e("./constants.cjs"),d=new Error("timeout");function m(e){return e?new i.default((0,o.remove0x)(e),16):new i.default(0)}async function f(e,t){const r=await fetch(e,t);if(!r.ok)throw new Error(`Fetch failed with status '${r.status}' for request '${String(e)}'`);return r}async function h(e,t){const r=await f(e,t);return await r.json()}r.PROTOTYPE_POLLUTION_BLOCKLIST=["__proto__","constructor","prototype"],r.isSafeDynamicKey=function(e){return"string"==typeof e&&!r.PROTOTYPE_POLLUTION_BLOCKLIST.some((t=>e===t))},r.isSafeChainId=function(e){if(!(0,o.isHexString)(e))return!1;const t=Number.parseInt(e,(0,o.isStrictHexString)(e)?16:10);return Number.isSafeInteger(t)&&t>0&&t<=u.MAX_SAFE_CHAIN_ID},r.BNToHex=function(e){return(0,o.add0x)(e.toString(16))},r.fractionBN=function(e,t,r){const s=new i.default(t),n=new i.default(r);return e.mul(s).div(n)},r.gweiDecToWEIBN=function(e){if(Number.isNaN(e))return new i.default(0);const t=e.toString().split("."),r=t[0]||"0";let s=t[1]||"";if(!s)return(0,a.toWei)(r,"gwei");if(s.length<=9)return(0,a.toWei)(`${r}.${s}`,"gwei");const n=s.slice(9)[0];s=s.slice(0,9);let o=(0,a.toWei)(`${r}.${s}`,"gwei");return Number(n)>=5&&(o=o.add(new i.default(1))),o},r.weiHexToGweiDec=function(e){const t=new i.default((0,o.remove0x)(e),16);return(0,a.fromWei)(t,"gwei")},r.getBuyURL=function(e="1",t,r=5){switch(e){case"1":return`https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${r}&address=${t}&crypto_currency=ETH`;case"5":return"https://goerli-faucet.slock.it/";case"11155111":return"https://sepoliafaucet.net/";default:return undefined}},r.hexToBN=m,r.hexToText=function(e){try{const r=(0,o.remove0x)(e);return t.from(r,"hex").toString("utf8")}catch(t){return e}},r.fromHex=function(e){return i.default.isBN(e)?e:new i.default(m(e).toString(10))},r.toHex=function(e){return"string"==typeof e&&(0,o.isStrictHexString)(e)?e:`0x${i.default.isBN(e)||"bigint"==typeof e?e.toString(16):new i.default(e.toString(),10).toString(16)}`},r.safelyExecute=async function(e,t=!1){try{return await e()}catch(e){return t&&console.error(e),undefined}},r.safelyExecuteWithTimeout=async function(e,t=!1,r=500){try{return await Promise.race([e(),new Promise(((e,t)=>setTimeout((()=>{t(d)}),r)))])}catch(e){return t&&console.error(e),undefined}},r.toChecksumHexAddress=function(e){if("string"!=typeof e)return e;const t=(0,o.add0x)(e);return(0,o.isHexString)(t)?(0,n.toChecksumAddress)(t):t},r.isValidHexAddress=function(e,{allowNonPrefixed:t=!0}={}){const r=t?(0,o.add0x)(e):e;return!!(0,o.isStrictHexString)(r)&&(0,n.isValidAddress)(r)},r.isSmartContractCode=function(e){return!!e&&("0x"!==e&&"0x0"!==e)},r.successfulFetch=f,r.handleFetch=h,r.fetchWithErrorHandling=async function({url:e,options:t,timeout:r,errorCodesToCatch:s}){let n;try{n=r?Promise.race([await h(e,t),new Promise(((e,t)=>setTimeout((()=>{t(d)}),r)))]):await h(e,t)}catch(e){!function(e,t=[]){if(!e)return;if(!(e instanceof Error))throw e;if(!t.some((t=>e.message.includes(`Fetch failed with status '${t}'`)))&&!e.message.includes("Failed to fetch")&&e!==d)throw e;console.error(e)}(e,s)}return n},r.timeoutFetch=async function(e,t,r=500){return Promise.race([f(e,t),new Promise(((e,t)=>setTimeout((()=>{t(d)}),r)))])},r.normalizeEnsName=function(e){if("."===e)return e;if(e&&"string"==typeof e)try{const t=c.default.normalize(e.trim());if(t.match(/^(([\w\d-]+)\.)*[\w\d-]{7,}\.(eth|test)$/u))return t}catch(e){}return null},r.query=function(e,t,r=[]){return new Promise(((s,n)=>{const a=(e,t)=>{e?n(e):s(t)};t in e&&"function"==typeof e[t]?e[t](...r,a):e.sendAsync({method:t,params:r},a)}))};r.convertHexToDecimal=(e="0x0")=>(0,o.isStrictHexString)(e)?parseInt(e,16):Number(e)?Number(e):0,r.isPlainObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isValidJson=function(e){try{return(0,l.default)(e,JSON.parse(JSON.stringify(e)))}catch(e){return!1}},r.isEqualCaseInsensitive=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/controller-utils",file:"node_modules/@metamask/controller-utils/dist/util.cjs"}],[1473,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker",file:"node_modules/@metamask/eth-block-tracker/dist/BlockTracker.js"}],[1474,{"./logging-utils":1477,"@metamask/safe-event-emitter":2306,"json-rpc-random-id":4230,pify:4517},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.PollingBlockTracker=void 0;const n=s(e("@metamask/safe-event-emitter")),a=s(e("json-rpc-random-id")),o=s(e("pify")),i=e("./logging-utils"),c=(0,i.createModuleLogger)(i.projectLogger,"polling-block-tracker"),l=(0,a.default)(),u=(e,t)=>e+t,d=["sync","latest"];class m extends n.default{constructor(e={}){if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super(),this._blockResetDuration=e.blockResetDuration||2e4,this._usePastBlocks=e.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents(),this._provider=e.provider,this._pollingInterval=e.pollingInterval||2e4,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===undefined||e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async destroy(){this._cancelBlockResetTimeout(),this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){if(this._currentBlock)return this._currentBlock;return await new Promise((e=>this.once("latest",e)))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){d.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start(),this.emit("_started"))}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return d.map((e=>this.listenerCount(e))).reduce(u)}_shouldUseNewBlock(e){const t=this._currentBlock;if(!t)return!0;const r=f(e),s=f(t);return this._usePastBlocks&&rs}_newPotentialLatest(e){this._shouldUseNewBlock(e)&&this._setCurrentBlock(e)}_setCurrentBlock(e){const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._updateAndQueue()}_end(){this._clearPollingTimeout()}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:l(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),c("Making request",e);const t=await(0,o.default)((t=>this._provider.sendAsync(e,t)))();if(c("Got response",t),t.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n${t.error.message}`);return t.result}async _updateAndQueue(){var e;let t=this._pollingInterval;try{await this._updateLatestBlock()}catch(r){const s=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${null!==(e=r.stack)&&void 0!==e?e:r}`);try{this.emit("error",s)}catch(e){console.error(s)}t=this._retryTimeout}if(!this._isRunning)return;this._clearPollingTimeout();const r=setTimeout((()=>{this._updateAndQueue()}),t);r.unref&&!this._keepEventLoopActive&&r.unref(),this._pollingTimeout=r,this.emit("_waitingForNextIteration")}_clearPollingTimeout(){this._pollingTimeout&&(clearTimeout(this._pollingTimeout),this._pollingTimeout=undefined)}}function f(e){return Number.parseInt(e,16)}r.PollingBlockTracker=m}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker",file:"node_modules/@metamask/eth-block-tracker/dist/PollingBlockTracker.js"}],[1475,{"@metamask/safe-event-emitter":2306,"json-rpc-random-id":4230},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.SubscribeBlockTracker=void 0;const n=s(e("@metamask/safe-event-emitter")),a=(0,s(e("json-rpc-random-id")).default)(),o=(e,t)=>e+t,i=["sync","latest"];class c extends n.default{constructor(e={}){if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(),this._blockResetDuration=e.blockResetDuration||2e4,this._usePastBlocks=e.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents(),this._provider=e.provider,this._subscriptionId=null}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){if(this._currentBlock)return this._currentBlock;return await new Promise((e=>this.once("latest",e)))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){i.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return i.map((e=>this.listenerCount(e))).reduce(o)}_shouldUseNewBlock(e){const t=this._currentBlock;if(!t)return!0;const r=l(e),s=l(t);return this._usePastBlocks&&rs}_newPotentialLatest(e){this._shouldUseNewBlock(e)&&this._setCurrentBlock(e)}_setCurrentBlock(e){const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===undefined||null===this._subscriptionId)try{const e=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}}async _end(){if(null!==this._subscriptionId&&this._subscriptionId!==undefined)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit("error",e)}}async _call(e,...t){return new Promise(((r,s)=>{this._provider.sendAsync({id:a(),method:e,params:t,jsonrpc:"2.0"},((e,t)=>{e?s(e):r(t.result)}))}))}_handleSubData(e,t){var r;"eth_subscription"===t.method&&(null===(r=t.params)||void 0===r?void 0:r.subscription)===this._subscriptionId&&this._newPotentialLatest(t.params.result.number)}}function l(e){return Number.parseInt(e,16)}r.SubscribeBlockTracker=c}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker",file:"node_modules/@metamask/eth-block-tracker/dist/SubscribeBlockTracker.js"}],[1476,{"./BlockTracker":1473,"./PollingBlockTracker":1474,"./SubscribeBlockTracker":1475},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./PollingBlockTracker"),r),n(e("./SubscribeBlockTracker"),r),n(e("./BlockTracker"),r)}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker",file:"node_modules/@metamask/eth-block-tracker/dist/index.js"}],[1477,{"@metamask/utils":1488},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.projectLogger=void 0;const s=e("@metamask/utils");Object.defineProperty(r,"createModuleLogger",{enumerable:!0,get:function(){return s.createModuleLogger}}),r.projectLogger=(0,s.createProjectLogger)("eth-block-tracker")}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker",file:"node_modules/@metamask/eth-block-tracker/dist/logging-utils.js"}],[1478,{"./errors.cjs":1486,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/assert.cjs"}],[1479,{"./assert.cjs":1478,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/base64.cjs"}],[1480,{"./assert.cjs":1478,"./hex.cjs":1487,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/bytes.cjs"}],[1481,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),function(e){e.Eip155="eip155"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1482,{"./base64.cjs":1479,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/checksum.cjs"}],[1483,{"./assert.cjs":1478,"./bytes.cjs":1480,"./hex.cjs":1487,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/coercers.cjs"}],[1484,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/collections.cjs"}],[1485,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1486,{"./misc.cjs":1492,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/errors.cjs"}],[1487,{"./assert.cjs":1478,"./bytes.cjs":1480,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/hex.cjs"}],[1488,{"./assert.cjs":1478,"./base64.cjs":1479,"./bytes.cjs":1480,"./caip-types.cjs":1481,"./checksum.cjs":1482,"./coercers.cjs":1483,"./collections.cjs":1484,"./encryption-types.cjs":1485,"./errors.cjs":1486,"./hex.cjs":1487,"./json.cjs":1489,"./keyring.cjs":1490,"./logging.cjs":1491,"./misc.cjs":1492,"./number.cjs":1493,"./opaque.cjs":1494,"./promise.cjs":1495,"./time.cjs":1496,"./transaction-types.cjs":1497,"./versions.cjs":1498},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/index.cjs"}],[1489,{"./assert.cjs":1478,"./misc.cjs":1492,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/json.cjs"}],[1490,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/keyring.cjs"}],[1491,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/logging.cjs"}],[1492,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/misc.cjs"}],[1493,{"./assert.cjs":1478,"./hex.cjs":1487},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/number.cjs"}],[1494,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/opaque.cjs"}],[1495,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/promise.cjs"}],[1496,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/time.cjs"}],[1497,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1498,{"./assert.cjs":1478,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils",file:"node_modules/@metamask/eth-block-tracker/node_modules/@metamask/utils/dist/versions.cjs"}],[1499,{"@ethereumjs/util":478,"@metamask/eth-sig-util":1642,"@metamask/scure-bip39":2307,"@metamask/scure-bip39/dist/wordlists/english":2308,"@metamask/utils":1510,buffer:3561,"ethereum-cryptography/hdkey":3783,"ethereum-cryptography/keccak":3784,"ethereum-cryptography/utils":3788},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){const{HDKey:s}=e("ethereum-cryptography/hdkey"),{keccak256:n}=e("ethereum-cryptography/keccak"),{bytesToHex:a}=e("ethereum-cryptography/utils"),{privateToPublic:o,publicToAddress:i,ecsign:c,arrToBufArr:l,bufferToHex:u}=e("@ethereumjs/util"),d=e("@metamask/scure-bip39"),{wordlist:m}=e("@metamask/scure-bip39/dist/wordlists/english"),{concatSig:f,decrypt:h,getEncryptionPublicKey:p,normalize:g,personalSign:b,signTypedData:y,SignTypedDataVersion:k}=e("@metamask/eth-sig-util"),{assertIsHexString:E,remove0x:C}=e("@metamask/utils"),A="HD Key Tree";class S{constructor(e={}){this.type=A,this._wallets=[],this.deserialize(e)}generateRandomMnemonic(){this._initFromMnemonic(d.generateMnemonic(m))}_uint8ArrayToString(e){return Array.from(new Uint16Array(new Uint8Array(e).buffer)).map((e=>m[e])).join(" ")}_stringToUint8Array(e){const t=e.split(" ").map((e=>m.indexOf(e)));return new Uint8Array(new Uint16Array(t).buffer)}_mnemonicToUint8Array(e){let t=e;if(e&&e.type&&"Buffer"===e.type&&(t=e.data),"string"==typeof t||r.isBuffer(t)||Array.isArray(t)){let e=t;return Array.isArray(t)?e=r.from(t).toString():r.isBuffer(t)&&(e=t.toString()),this._stringToUint8Array(e)}return t instanceof Object&&!(t instanceof Uint8Array)?Uint8Array.from(Object.values(t)):t}serialize(){const e=this._uint8ArrayToString(this.mnemonic),t=new TextEncoder("utf-8").encode(e);return Promise.resolve({mnemonic:Array.from(t),numberOfAccounts:this._wallets.length,hdPath:this.hdPath})}deserialize(e={}){if(e.numberOfAccounts&&!e.mnemonic)throw new Error("Eth-Hd-Keyring: Deserialize method cannot be called with an opts value for numberOfAccounts and no menmonic");if(this.root)throw new Error("Eth-Hd-Keyring: Secret recovery phrase already provided");return this.opts=e,this._wallets=[],this.mnemonic=null,this.root=null,this.hdPath=e.hdPath||"m/44'/60'/0'/0",e.mnemonic&&this._initFromMnemonic(e.mnemonic),e.numberOfAccounts?this.addAccounts(e.numberOfAccounts):Promise.resolve([])}addAccounts(e=1){if(!this.root)throw new Error("Eth-Hd-Keyring: No secret recovery phrase provided");const t=this._wallets.length,r=[];for(let s=t;sthis._addressfromPublicKey(e.publicKey)));return Promise.resolve(s)}getAccounts(){return this._wallets.map((e=>this._addressfromPublicKey(e.publicKey)))}async getAppKeyAddress(e,t){if(!t||"string"!=typeof t)throw new Error("'origin' must be a non-empty string");const r=this._getWalletForAccount(e,{withAppKeyOrigin:t});return g(i(r.publicKey).toString("hex"))}async exportAccount(e,t={}){const r=this._getWalletForAccount(e,t);return a(r.privateKey)}async signTransaction(e,t,r={}){const s=this._getPrivateKeyFor(e,r),n=t.sign(s);return n===undefined?t:n}async signMessage(e,t,s={}){E(t);const n=C(t),a=this._getPrivateKeyFor(e,s),o=c(r.from(n,"hex"),a);return f(o.v,o.r,o.s)}async signPersonalMessage(e,t,s={}){const n=this._getPrivateKeyFor(e,s),a=r.from(n,"hex");return b({privateKey:a,data:t})}async decryptMessage(e,t){const s=this._getWalletForAccount(e),{privateKey:n}=s,a=r.from(n).toString("hex");return h({privateKey:a,encryptedData:t})}async signTypedData(e,t,r={version:k.V1}){const s=Object.keys(k).includes(r.version)?r.version:k.V1,n=this._getPrivateKeyFor(e,r);return y({privateKey:n,data:t,version:s})}removeAccount(e){const t=g(e);if(!this._wallets.map((({publicKey:e})=>this._addressfromPublicKey(e))).includes(t))throw new Error(`Address ${t} not found in this keyring`);this._wallets=this._wallets.filter((({publicKey:e})=>this._addressfromPublicKey(e)!==t))}async getEncryptionPublicKey(e,t={}){const r=this._getPrivateKeyFor(e,t);return p(r)}_getPrivateKeyFor(e,t={}){if(!e)throw new Error("Must specify address.");return this._getWalletForAccount(e,t).privateKey}_getWalletForAccount(e,t={}){const s=g(e);let a=this._wallets.find((({publicKey:e})=>this._addressfromPublicKey(e)===s));if(!a)throw new Error("HD Keyring - Unable to find matching address.");if(t.withAppKeyOrigin){const{privateKey:e}=a,s=r.from(t.withAppKeyOrigin,"utf8"),i=r.concat([e,s]),c=l(n(i,256));a={privateKey:c,publicKey:o(c)}}return a}_initFromMnemonic(e){if(this.root)throw new Error("Eth-Hd-Keyring: Secret recovery phrase already provided");this.mnemonic=this._mnemonicToUint8Array(e);if(!d.validateMnemonic(this.mnemonic,m))throw new Error("Eth-Hd-Keyring: Invalid secret recovery phrase provided");const t=d.mnemonicToSeedSync(this.mnemonic,m);this.hdWallet=s.fromMasterSeed(t),this.root=this.hdWallet.derive(this.hdPath)}_addressfromPublicKey(e){return u(i(r.from(e),!0)).toLowerCase()}}S.type=A,t.exports=S}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring",file:"node_modules/@metamask/eth-hd-keyring/index.js"}],[1500,{"./errors.cjs":1508,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/assert.cjs"}],[1501,{"./assert.cjs":1500,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/base64.cjs"}],[1502,{"./assert.cjs":1500,"./hex.cjs":1509,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/bytes.cjs"}],[1503,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAssetId=r.isCaipAssetType=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAssetIdStruct=r.CaipAssetTypeStruct=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ASSET_ID_REGEX=r.CAIP_ASSET_TYPE_REGEX=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),r.CaipAssetTypeStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_TYPE_REGEX),r.CaipAssetIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.isCaipAssetType=function(e){return(0,s.is)(e,r.CaipAssetTypeStruct)},r.isCaipAssetId=function(e){return(0,s.is)(e,r.CaipAssetIdStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1504,{"./base64.cjs":1501,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/checksum.cjs"}],[1505,{"./assert.cjs":1500,"./bytes.cjs":1502,"./hex.cjs":1509,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/coercers.cjs"}],[1506,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/collections.cjs"}],[1507,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1508,{"./misc.cjs":1514,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/errors.cjs"}],[1509,{"./assert.cjs":1500,"./bytes.cjs":1502,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/hex.cjs"}],[1510,{"./assert.cjs":1500,"./base64.cjs":1501,"./bytes.cjs":1502,"./caip-types.cjs":1503,"./checksum.cjs":1504,"./coercers.cjs":1505,"./collections.cjs":1506,"./encryption-types.cjs":1507,"./errors.cjs":1508,"./hex.cjs":1509,"./json.cjs":1511,"./keyring.cjs":1512,"./logging.cjs":1513,"./misc.cjs":1514,"./number.cjs":1515,"./opaque.cjs":1516,"./promise.cjs":1517,"./time.cjs":1518,"./transaction-types.cjs":1519,"./versions.cjs":1520},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/index.cjs"}],[1511,{"./assert.cjs":1500,"./misc.cjs":1514,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/json.cjs"}],[1512,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/keyring.cjs"}],[1513,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/logging.cjs"}],[1514,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/misc.cjs"}],[1515,{"./assert.cjs":1500,"./hex.cjs":1509},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/number.cjs"}],[1516,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/opaque.cjs"}],[1517,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/promise.cjs"}],[1518,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/time.cjs"}],[1519,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1520,{"./assert.cjs":1500,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils",file:"node_modules/@metamask/eth-hd-keyring/node_modules/@metamask/utils/dist/versions.cjs"}],[1530,{"./fetch-config-from-req":1532,"./logging-utils":1534,"@metamask/json-rpc-engine":1544,"@metamask/rpc-errors":1549,"node-fetch":4475},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createInfuraMiddleware=void 0;const n=e("@metamask/json-rpc-engine"),a=e("@metamask/rpc-errors"),o=s(e("node-fetch")),i=e("./fetch-config-from-req"),c=e("./logging-utils"),l=(0,c.createModuleLogger)(c.projectLogger,"create-infura-middleware"),u=["Gateway timeout","ETIMEDOUT","ECONNRESET","SyntaxError"];async function d(e,t,r,s,n,c){const{fetchUrl:l,fetchParams:u}=(0,i.fetchConfigFromReq)({network:e,projectId:t,extraHeaders:r,req:s,source:c}),d=await(0,o.default)(l,u),f=await d.text();if(!d.ok)switch(d.status){case 405:throw a.rpcErrors.methodNotFound();case 429:throw m("Request is being rate limited.");case 503:case 504:throw function(){let e="Gateway timeout. The request took too long to process. ";return e+="This can happen when querying logs over too wide a block range.",m(e)}();default:throw m(f)}if("eth_getBlockByNumber"===s.method&&"Not Found"===f)return void(n.result=null);const h=JSON.parse(f);n.result=h.result,n.error=h.error}function m(e){return a.rpcErrors.internal(e)}function f(e){const t=e.toString();return u.some((e=>t.includes(e)))}async function h(e){return new Promise((t=>{setTimeout(t,e)}))}r.createInfuraMiddleware=function({network:e="mainnet",maxAttempts:t=5,source:r,projectId:s,headers:a={}}){if(!s||"string"!=typeof s)throw new Error(`Invalid value for 'projectId': "${s}"`);if(!a||"object"!=typeof a)throw new Error(`Invalid value for 'headers': "${a}"`);if(!t)throw new Error(`Invalid value for 'maxAttempts': "${t}" (${typeof t})`);return(0,n.createAsyncMiddleware)((async(n,o)=>{for(let i=1;i<=t;i++)try{l("Attempting request to Infura. network = %o, projectId = %s, headers = %o, req = %o",e,s,a,n),await d(e,s,a,n,o,r);break}catch(e){if(!f(e))throw l("Non-retriable request error encountered. req = %o, res = %o, error = %o",n,o,e),e;if(!(t-i)){l("Retriable request error encountered, but exceeded max attempts. req = %o, res = %o, error = %o",n,o,e);const t=`InfuraProvider - cannot complete request. All retries exhausted.\nOriginal Error:\n${e.toString()}\n\n`;throw new Error(t)}l("Retriable request error encountered. req = %o, res = %o, error = %o",n,o,e),l("Waiting 1 second to try again..."),await h(1e3)}}))}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura",file:"node_modules/@metamask/eth-json-rpc-infura/dist/create-infura-middleware.js"}],[1531,{"./create-infura-middleware":1530,"@metamask/eth-json-rpc-provider":1535,"@metamask/json-rpc-engine":1544},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createProvider=void 0;const s=e("@metamask/eth-json-rpc-provider"),n=e("@metamask/json-rpc-engine"),a=e("./create-infura-middleware");r.createProvider=function(e){const t=new n.JsonRpcEngine;return t.push((0,a.createInfuraMiddleware)(e)),(0,s.providerFromEngine)(t)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura",file:"node_modules/@metamask/eth-json-rpc-infura/dist/create-provider.js"}],[1532,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function s(e){return{id:e.id,jsonrpc:e.jsonrpc,method:e.method,params:e.params}}Object.defineProperty(r,"__esModule",{value:!0}),r.fetchConfigFromReq=void 0,r.fetchConfigFromReq=function({network:e,projectId:t,extraHeaders:r={},req:n,source:a}){const o=n.origin||"internal",i=Object.assign({},r,{Accept:"application/json","Content-Type":"application/json"});return a&&(i["Infura-Source"]=`${a}/${o}`),{fetchUrl:`https://${e}.infura.io/v3/${t}`,fetchParams:{method:"POST",headers:i,body:JSON.stringify(s(n))}}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura",file:"node_modules/@metamask/eth-json-rpc-infura/dist/fetch-config-from-req.js"}],[1533,{"./create-infura-middleware":1530,"./create-provider":1531,"./fetch-config-from-req":1532},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./create-infura-middleware"),r),n(e("./fetch-config-from-req"),r),n(e("./create-provider"),r)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura",file:"node_modules/@metamask/eth-json-rpc-infura/dist/index.js"}],[1534,{"@metamask/utils":1582},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.projectLogger=void 0;const s=e("@metamask/utils");Object.defineProperty(r,"createModuleLogger",{enumerable:!0,get:function(){return s.createModuleLogger}}),r.projectLogger=(0,s.createProjectLogger)("eth-json-rpc-infura")}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura",file:"node_modules/@metamask/eth-json-rpc-infura/dist/logging-utils.js"}],[1535,{"./provider-from-engine":1536,"./provider-from-middleware":1537,"./safe-event-emitter-provider":1538},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.SafeEventEmitterProvider=void 0,n(e("./provider-from-engine"),r),n(e("./provider-from-middleware"),r);var a=e("./safe-event-emitter-provider");Object.defineProperty(r,"SafeEventEmitterProvider",{enumerable:!0,get:function(){return a.SafeEventEmitterProvider}})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/eth-json-rpc-provider/dist/index.js"}],[1536,{"./safe-event-emitter-provider":1538},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerFromEngine=void 0;const s=e("./safe-event-emitter-provider");r.providerFromEngine=function(e){return new s.SafeEventEmitterProvider({engine:e})}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/eth-json-rpc-provider/dist/provider-from-engine.js"}],[1537,{"./provider-from-engine":1536,"@metamask/json-rpc-engine":1544},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerFromMiddleware=void 0;const s=e("@metamask/json-rpc-engine"),n=e("./provider-from-engine");r.providerFromMiddleware=function(e){const t=new s.JsonRpcEngine;return t.push(e),(0,n.providerFromEngine)(t)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/eth-json-rpc-provider/dist/provider-from-middleware.js"}],[1538,{"@metamask/safe-event-emitter":2306},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.SafeEventEmitterProvider=void 0;const i=o(e("@metamask/safe-event-emitter"));class c extends i.default{constructor({engine:e}){super(),s.set(this,void 0),this.sendAsync=(e,t)=>{a(this,s,"f").handle(e,t)},this.send=(e,t)=>{if("function"!=typeof t)throw new Error('Must provide callback to "send" method.');a(this,s,"f").handle(e,t)},n(this,s,e,"f"),e.on&&e.on("notification",(e=>{this.emit("data",null,e)}))}}r.SafeEventEmitterProvider=c,s=new WeakMap}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/eth-json-rpc-provider/dist/safe-event-emitter-provider.js"}],[1539,{"@metamask/rpc-errors":1549,"@metamask/safe-event-emitter":2306,"@metamask/utils":1582},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a,o,i,c,l,u,d,m,f,h,p,g=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))((function(n,a){function o(e){try{c(s.next(e))}catch(e){a(e)}}function i(e){try{c(s.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,i)}c((s=s.apply(e,t||[])).next())}))},b=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},y=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},k=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.JsonRpcEngine=void 0;const E=e("@metamask/rpc-errors"),C=k(e("@metamask/safe-event-emitter")),A=e("@metamask/utils");class S extends C.default{constructor({notificationHandler:e}={}){super(),s.add(this),a.set(this,!1),o.set(this,void 0),i.set(this,void 0),b(this,o,[],"f"),b(this,i,e,"f")}destroy(){y(this,o,"f").forEach((e=>{"destroy"in e&&"function"==typeof e.destroy&&e.destroy()})),b(this,o,[],"f"),b(this,a,!0,"f")}push(e){y(this,s,"m",c).call(this),y(this,o,"f").push(e)}handle(e,t){if(y(this,s,"m",c).call(this),t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?y(this,s,"m",l).call(this,e,t):y(this,s,"m",l).call(this,e):t?y(this,s,"m",u).call(this,e,t):this._promiseHandle(e)}asMiddleware(){return y(this,s,"m",c).call(this),(e,t,r,s)=>g(this,void 0,void 0,(function*(){try{const[a,i,c]=yield y(S,n,"m",m).call(S,e,t,y(this,o,"f"));return i?(yield y(S,n,"m",h).call(S,c),s(a)):r((e=>g(this,void 0,void 0,(function*(){try{yield y(S,n,"m",h).call(S,c)}catch(t){return e(t)}return e()}))))}catch(e){return s(e)}}))}_promiseHandle(e){return g(this,void 0,void 0,(function*(){return new Promise(((t,r)=>{y(this,s,"m",u).call(this,e,((e,s)=>{e&&s===undefined?r(e):t(s)})).catch(r)}))}))}}function w(e){return JSON.stringify(e,null,2)}r.JsonRpcEngine=S,n=S,a=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakSet,c=function(){if(y(this,a,"f"))throw new Error("This engine is destroyed and can no longer be used.")},l=function(e,t){return g(this,void 0,void 0,(function*(){try{if(0===e.length){const e=[{id:null,jsonrpc:"2.0",error:new E.JsonRpcError(E.errorCodes.rpc.invalidRequest,"Request batch must contain plain objects. Received an empty array")}];return t?t(null,e):e}const r=(yield Promise.all(e.map(this._promiseHandle.bind(this)))).filter((e=>e!==undefined));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}))},u=function(e,t){var r;return g(this,void 0,void 0,(function*(){if(!e||Array.isArray(e)||"object"!=typeof e){const r=new E.JsonRpcError(E.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:null,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const s=new E.JsonRpcError(E.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return y(this,i,"f")&&!(0,A.isJsonRpcRequest)(e)?t(null):t(s,{id:null!==(r=e.id)&&void 0!==r?r:null,jsonrpc:"2.0",error:s})}if(y(this,i,"f")&&!(0,A.isJsonRpcRequest)(e)){try{yield y(this,i,"f").call(this,e)}catch(s){return t(s)}return t(null)}let s=null;const a=Object.assign({},e),c={id:a.id,jsonrpc:a.jsonrpc};try{yield y(S,n,"m",d).call(S,a,c,y(this,o,"f"))}catch(e){s=e}return s&&(delete c.result,c.error||(c.error=(0,E.serializeError)(s))),t(s,c)}))},d=function(e,t,r){return g(this,void 0,void 0,(function*(){const[s,a,o]=yield y(S,n,"m",m).call(S,e,t,r);if(y(S,n,"m",p).call(S,e,t,a),yield y(S,n,"m",h).call(S,o),s)throw s}))},m=function(e,t,r){return g(this,void 0,void 0,(function*(){const s=[];let a=null,o=!1;for(const i of r)if([a,o]=yield y(S,n,"m",f).call(S,e,t,i,s),o)break;return[a,o,s.reverse()]}))},f=function(e,t,r,s){return g(this,void 0,void 0,(function*(){return new Promise((n=>{const a=e=>{const r=e||t.error;r&&(t.error=(0,E.serializeError)(r)),n([r,!0])},o=r=>{t.error?a(t.error):(r&&("function"!=typeof r&&a(new E.JsonRpcError(E.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${w(e)}`,{request:e})),s.push(r)),n([null,!1]))};try{r(e,t,o,a)}catch(e){a(e)}}))}))},h=function(e){return g(this,void 0,void 0,(function*(){for(const t of e)yield new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}))},p=function(e,t,r){if(!(0,A.hasProperty)(t,"result")&&!(0,A.hasProperty)(t,"error"))throw new E.JsonRpcError(E.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${w(e)}`,{request:e});if(!r)throw new E.JsonRpcError(E.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${w(e)}`,{request:e})}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/JsonRpcEngine.js"}],[1540,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))((function(n,a){function o(e){try{c(s.next(e))}catch(e){a(e)}}function i(e){try{c(s.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,i)}c((s=s.apply(e,t||[])).next())}))};Object.defineProperty(r,"__esModule",{value:!0}),r.createAsyncMiddleware=void 0,r.createAsyncMiddleware=function(e){return(t,r,n,a)=>s(this,void 0,void 0,(function*(){let o;const i=new Promise((e=>{o=e}));let c=null,l=!1;const u=()=>s(this,void 0,void 0,(function*(){return l=!0,n((e=>{c=e,o()})),i}));try{yield e(t,r,u),l?(yield i,c(null)):a(null)}catch(e){c?c(e):a(e)}}))}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/createAsyncMiddleware.js"}],[1541,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createScaffoldMiddleware=void 0,r.createScaffoldMiddleware=function(e){return(t,r,s,n)=>{const a=e[t.method];return a===undefined?s():"function"==typeof a?a(t,r,s,n):(r.result=a,n())}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/createScaffoldMiddleware.js"}],[1542,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getUniqueId=void 0;const s=4294967295;let n=Math.floor(Math.random()*s);r.getUniqueId=function(){return n=(n+1)%s,n}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/getUniqueId.js"}],[1543,{"./getUniqueId":1542},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createIdRemapMiddleware=void 0;const s=e("./getUniqueId");r.createIdRemapMiddleware=function(){return(e,t,r,n)=>{const a=e.id,o=(0,s.getUniqueId)();e.id=o,t.id=o,r((r=>{e.id=a,t.id=a,r()}))}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/idRemapMiddleware.js"}],[1544,{"./JsonRpcEngine":1539,"./createAsyncMiddleware":1540,"./createScaffoldMiddleware":1541,"./getUniqueId":1542,"./idRemapMiddleware":1543,"./mergeMiddleware":1545},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./createAsyncMiddleware"),r),n(e("./createScaffoldMiddleware"),r),n(e("./getUniqueId"),r),n(e("./idRemapMiddleware"),r),n(e("./JsonRpcEngine"),r),n(e("./mergeMiddleware"),r)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/index.js"}],[1545,{"./JsonRpcEngine":1539},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.mergeMiddleware=void 0;const s=e("./JsonRpcEngine");r.mergeMiddleware=function(e){const t=new s.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/json-rpc-engine/dist/mergeMiddleware.js"}],[1546,{"./utils.cjs":1550,"@metamask/utils":1561,"fast-safe-stringify":3904},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.EthereumProviderError=r.JsonRpcError=void 0;const n=e("@metamask/utils"),a=s(e("fast-safe-stringify")),o=e("./utils.cjs");class i 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.');(0,o.dataHasCause)(r)?(super(t,{cause:r.cause}),(0,n.hasProperty)(this,"cause")||Object.assign(this,{cause:r.cause})):super(t),r!==undefined&&(this.data=r),this.code=e}serialize(){const e={code:this.code,message:this.message};return this.data!==undefined&&(e.data=this.data,(0,n.isPlainObject)(this.data)&&(e.data.cause=(0,o.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,a.default)(this.serialize(),c,2)}}r.JsonRpcError=i;function c(e,t){return"[Circular]"===t?undefined:t}r.EthereumProviderError=class extends i{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)}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/dist/classes.cjs"}],[1547,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorValues=r.errorCodes=void 0,r.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},r.errorValues={"-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."}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/dist/error-constants.cjs"}],[1548,{"./classes.cjs":1546,"./error-constants.cjs":1547,"./utils.cjs":1550},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerErrors=r.rpcErrors=void 0;const s=e("./classes.cjs"),n=e("./error-constants.cjs"),a=e("./utils.cjs");function o(e,t){const[r,n]=c(t);return new s.JsonRpcError(e,r??(0,a.getMessageFromCode)(e),n)}function i(e,t){const[r,n]=c(t);return new s.EthereumProviderError(e,r??(0,a.getMessageFromCode)(e),n)}function c(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??undefined,r]}}return[]}r.rpcErrors={parse:e=>o(n.errorCodes.rpc.parse,e),invalidRequest:e=>o(n.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(n.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(n.errorCodes.rpc.methodNotFound,e),internal:e=>o(n.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(t,e)},invalidInput:e=>o(n.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(n.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(n.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(n.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(n.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(n.errorCodes.rpc.limitExceeded,e)},r.providerErrors={userRejectedRequest:e=>i(n.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>i(n.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>i(n.errorCodes.provider.unsupportedMethod,e),disconnected:e=>i(n.errorCodes.provider.disconnected,e),chainDisconnected:e=>i(n.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new s.EthereumProviderError(t,r,n)}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/dist/errors.cjs"}],[1549,{"./classes.cjs":1546,"./error-constants.cjs":1547,"./errors.cjs":1548,"./utils.cjs":1550},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorCodes=r.providerErrors=r.rpcErrors=r.getMessageFromCode=r.serializeError=r.serializeCause=r.dataHasCause=r.EthereumProviderError=r.JsonRpcError=void 0;var s=e("./classes.cjs");Object.defineProperty(r,"JsonRpcError",{enumerable:!0,get:function(){return s.JsonRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return s.EthereumProviderError}});var n=e("./utils.cjs");Object.defineProperty(r,"dataHasCause",{enumerable:!0,get:function(){return n.dataHasCause}}),Object.defineProperty(r,"serializeCause",{enumerable:!0,get:function(){return n.serializeCause}}),Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});var a=e("./errors.cjs");Object.defineProperty(r,"rpcErrors",{enumerable:!0,get:function(){return a.rpcErrors}}),Object.defineProperty(r,"providerErrors",{enumerable:!0,get:function(){return a.providerErrors}});var o=e("./error-constants.cjs");Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/dist/index.cjs"}],[1550,{"./error-constants.cjs":1547,"@metamask/utils":1561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.dataHasCause=r.serializeCause=r.serializeError=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const s=e("@metamask/utils"),n=e("./error-constants.cjs"),a=n.errorCodes.rpc.internal,o={code:a,message:i(a)};function i(e,t="Unspecified error message. This is a bug, please report it."){if(c(e)){const t=e.toString();if((0,s.hasProperty)(n.errorValues,t))return n.errorValues[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function c(e){return Number.isInteger(e)}function l(e){return Array.isArray(e)?e.map((e=>(0,s.isValidJson)(e)?e:(0,s.isObject)(e)?u(e):null)):(0,s.isObject)(e)?u(e):(0,s.isValidJson)(e)?e:null}function u(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const n=e[r];return(0,s.isValidJson)(n)&&(t[r]=n),t}),{})}r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",r.getMessageFromCode=i,r.isValidCode=c,r.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:r=!0}={}){if(!(0,s.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const n=function(e,t){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if((0,s.isJsonRpcError)(e))return e;const r=l(e),n={...t,data:{cause:r}};return n}(e,t);return r||delete n.stack,n},r.serializeCause=l,r.dataHasCause=function(e){return(0,s.isObject)(e)&&(0,s.hasProperty)(e,"cause")&&(0,s.isObject)(e.cause)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/dist/utils.cjs"}],[1551,{"./errors.cjs":1559,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/assert.cjs"}],[1552,{"./assert.cjs":1551,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/base64.cjs"}],[1553,{"./assert.cjs":1551,"./hex.cjs":1560,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/bytes.cjs"}],[1554,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAssetId=r.isCaipAssetType=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAssetIdStruct=r.CaipAssetTypeStruct=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ASSET_ID_REGEX=r.CAIP_ASSET_TYPE_REGEX=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),r.CaipAssetTypeStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_TYPE_REGEX),r.CaipAssetIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.isCaipAssetType=function(e){return(0,s.is)(e,r.CaipAssetTypeStruct)},r.isCaipAssetId=function(e){return(0,s.is)(e,r.CaipAssetIdStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1555,{"./base64.cjs":1552,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/checksum.cjs"}],[1556,{"./assert.cjs":1551,"./bytes.cjs":1553,"./hex.cjs":1560,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/coercers.cjs"}],[1557,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/collections.cjs"}],[1558,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1559,{"./misc.cjs":1565,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/errors.cjs"}],[1560,{"./assert.cjs":1551,"./bytes.cjs":1553,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/hex.cjs"}],[1561,{"./assert.cjs":1551,"./base64.cjs":1552,"./bytes.cjs":1553,"./caip-types.cjs":1554,"./checksum.cjs":1555,"./coercers.cjs":1556,"./collections.cjs":1557,"./encryption-types.cjs":1558,"./errors.cjs":1559,"./hex.cjs":1560,"./json.cjs":1562,"./keyring.cjs":1563,"./logging.cjs":1564,"./misc.cjs":1565,"./number.cjs":1566,"./opaque.cjs":1567,"./promise.cjs":1568,"./time.cjs":1569,"./transaction-types.cjs":1570,"./versions.cjs":1571},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/index.cjs"}],[1562,{"./assert.cjs":1551,"./misc.cjs":1565,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/json.cjs"}],[1563,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/keyring.cjs"}],[1564,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/logging.cjs"}],[1565,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/misc.cjs"}],[1566,{"./assert.cjs":1551,"./hex.cjs":1560},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/number.cjs"}],[1567,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/opaque.cjs"}],[1568,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/promise.cjs"}],[1569,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/time.cjs"}],[1570,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1571,{"./assert.cjs":1551,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils/dist/versions.cjs"}],[1572,{"./errors.cjs":1580,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/assert.cjs"}],[1573,{"./assert.cjs":1572,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/base64.cjs"}],[1574,{"./assert.cjs":1572,"./hex.cjs":1581,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/bytes.cjs"}],[1575,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),function(e){e.Eip155="eip155"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1576,{"./base64.cjs":1573,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/checksum.cjs"}],[1577,{"./assert.cjs":1572,"./bytes.cjs":1574,"./hex.cjs":1581,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/coercers.cjs"}],[1578,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/collections.cjs"}],[1579,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1580,{"./misc.cjs":1586,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/errors.cjs"}],[1581,{"./assert.cjs":1572,"./bytes.cjs":1574,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/hex.cjs"}],[1582,{"./assert.cjs":1572,"./base64.cjs":1573,"./bytes.cjs":1574,"./caip-types.cjs":1575,"./checksum.cjs":1576,"./coercers.cjs":1577,"./collections.cjs":1578,"./encryption-types.cjs":1579,"./errors.cjs":1580,"./hex.cjs":1581,"./json.cjs":1583,"./keyring.cjs":1584,"./logging.cjs":1585,"./misc.cjs":1586,"./number.cjs":1587,"./opaque.cjs":1588,"./promise.cjs":1589,"./time.cjs":1590,"./transaction-types.cjs":1591,"./versions.cjs":1592},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/index.cjs"}],[1583,{"./assert.cjs":1572,"./misc.cjs":1586,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/json.cjs"}],[1584,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/keyring.cjs"}],[1585,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/logging.cjs"}],[1586,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/misc.cjs"}],[1587,{"./assert.cjs":1572,"./hex.cjs":1581},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/number.cjs"}],[1588,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/opaque.cjs"}],[1589,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/promise.cjs"}],[1590,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/time.cjs"}],[1591,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1592,{"./assert.cjs":1572,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils",file:"node_modules/@metamask/eth-json-rpc-infura/node_modules/@metamask/utils/dist/versions.cjs"}],[1629,{"./provider-from-engine.cjs":1630,"./provider-from-middleware.cjs":1631,"./safe-event-emitter-provider.cjs":1632},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.SafeEventEmitterProvider=void 0,n(e("./provider-from-engine.cjs"),r),n(e("./provider-from-middleware.cjs"),r);var a=e("./safe-event-emitter-provider.cjs");Object.defineProperty(r,"SafeEventEmitterProvider",{enumerable:!0,get:function(){return a.SafeEventEmitterProvider}})}}},{package:"@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-provider/dist/index.cjs"}],[1630,{"./safe-event-emitter-provider.cjs":1632},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerFromEngine=void 0;const s=e("./safe-event-emitter-provider.cjs");r.providerFromEngine=function(e){return new s.SafeEventEmitterProvider({engine:e})}}}},{package:"@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-provider/dist/provider-from-engine.cjs"}],[1631,{"./provider-from-engine.cjs":1630,"@metamask/json-rpc-engine":1780},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerFromMiddleware=void 0;const s=e("@metamask/json-rpc-engine"),n=e("./provider-from-engine.cjs");r.providerFromMiddleware=function(e){const t=new s.JsonRpcEngine;return t.push(e),(0,n.providerFromEngine)(t)}}}},{package:"@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-provider/dist/provider-from-middleware.cjs"}],[1632,{"@metamask/rpc-errors":2304,"@metamask/safe-event-emitter":2306,uuid:5175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.SafeEventEmitterProvider=r.convertEip1193RequestToJsonRpcRequest=void 0;const i=e("@metamask/rpc-errors"),c=o(e("@metamask/safe-event-emitter")),l=e("uuid");function u(e){const{id:t=(0,l.v4)(),jsonrpc:r="2.0",method:s,params:n}=e;return n?{id:t,jsonrpc:r,method:s,params:n}:{id:t,jsonrpc:r,method:s}}r.convertEip1193RequestToJsonRpcRequest=u;class d extends c.default{constructor({engine:e}){super(),s.set(this,void 0),this.sendAsync=(e,t)=>{const r=u(e);a(this,s,"f").handle(r,t)},this.send=(e,t)=>{if("function"!=typeof t)throw new Error('Must provide callback to "send" method.');const r=u(e);a(this,s,"f").handle(r,t)},n(this,s,e,"f"),e.on&&e.on("notification",(e=>{this.emit("data",null,e)}))}async request(e){const t=u(e),r=await a(this,s,"f").handle(t);if("result"in r)return r.result;const n=new i.JsonRpcError(r.error.code,r.error.message,r.error.data);throw"stack"in r.error&&(n.stack=r.error.stack),n}}r.SafeEventEmitterProvider=d,s=new WeakMap}}},{package:"@metamask/eth-json-rpc-provider",file:"node_modules/@metamask/eth-json-rpc-provider/dist/safe-event-emitter-provider.cjs"}],[1640,{"json-rpc-random-id":4230,xtend:5231},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const s=e("json-rpc-random-id")(),n=e("xtend");function a(e){this.currentProvider=e}function o(e){return function(...t){const r=t.pop();this.sendAsync({method:e,params:t},r)}}function i(e,t){return function(...r){const s=r.pop();r.length0&&(o=2048-a-16),n.padding="0".repeat(o),l({publicKey:e,data:JSON.stringify(n),version:s})},r.decrypt=u,r.decryptSafely=function({encryptedData:e,privateKey:t}){if((0,c.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,c.isNullish)(t))throw new Error("Missing privateKey parameter");return JSON.parse(u({encryptedData:e,privateKey:t})).data},r.getEncryptionPublicKey=function(e){const r=t.from(e,"hex"),s=i.box.keyPair.fromSecretKey(r).publicKey;return o.base64.encode(s)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-sig-util",file:"node_modules/@metamask/eth-sig-util/dist/encryption.js"}],[1642,{"./encryption":1641,"./personal-sign":1643,"./sign-typed-data":1644,"./utils":1645},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.normalize=r.concatSig=void 0,n(e("./personal-sign"),r),n(e("./sign-typed-data"),r),n(e("./encryption"),r);var a=e("./utils");Object.defineProperty(r,"concatSig",{enumerable:!0,get:function(){return a.concatSig}}),Object.defineProperty(r,"normalize",{enumerable:!0,get:function(){return a.normalize}})}}},{package:"@metamask/eth-sig-util",file:"node_modules/@metamask/eth-sig-util/dist/index.js"}],[1643,{"./utils":1645,"@ethereumjs/util":478},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.extractPublicKey=r.recoverPersonalSignature=r.personalSign=void 0;const s=e("@ethereumjs/util"),n=e("./utils");function a(e,t){const r=(0,s.hashPersonalMessage)((0,n.legacyToBuffer)(e));return(0,n.recoverPublicKey)(r,t)}r.personalSign=function({privateKey:e,data:t}){if((0,n.isNullish)(t))throw new Error("Missing data parameter");if((0,n.isNullish)(e))throw new Error("Missing privateKey parameter");const r=(0,n.legacyToBuffer)(t),a=(0,s.hashPersonalMessage)(r),o=(0,s.ecsign)(a,e);return(0,n.concatSig)((0,s.toBuffer)(o.v),o.r,o.s)},r.recoverPersonalSignature=function({data:e,signature:t}){if((0,n.isNullish)(e))throw new Error("Missing data parameter");if((0,n.isNullish)(t))throw new Error("Missing signature parameter");const r=a(e,t),o=(0,s.publicToAddress)(r);return(0,s.bufferToHex)(o)},r.extractPublicKey=function({data:e,signature:t}){if((0,n.isNullish)(e))throw new Error("Missing data parameter");if((0,n.isNullish)(t))throw new Error("Missing signature parameter");return`0x${a(e,t).toString("hex")}`}}}},{package:"@metamask/eth-sig-util",file:"node_modules/@metamask/eth-sig-util/dist/personal-sign.js"}],[1644,{"./utils":1645,"@ethereumjs/util":478,"@metamask/abi-utils":1307,"@metamask/abi-utils/dist/parsers":1316,"@metamask/abi-utils/dist/utils":1324,"@metamask/utils":1656,"ethereum-cryptography/keccak":3784},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.recoverTypedSignature=r.signTypedData=r.typedSignatureHash=r.TypedDataUtils=r.TYPED_MESSAGE_SCHEMA=r.SignTypedDataVersion=void 0;const s=e("@ethereumjs/util"),n=e("@metamask/abi-utils"),a=e("@metamask/abi-utils/dist/parsers"),o=e("@metamask/abi-utils/dist/utils"),i=e("@metamask/utils"),c=e("ethereum-cryptography/keccak"),l=e("./utils");var u;function d(e,t){if(!Object.keys(u).includes(e))throw new Error(`Invalid version: '${e}'`);if(t&&!t.includes(e))throw new Error(`SignTypedDataVersion not allowed: '${e}'. Allowed versions are: ${t.join(", ")}`)}function m(e,t){(0,i.assert)(null!==t,`Unable to encode value: Invalid number. Expected a valid number value, but received "${t}".`);const r=BigInt(t),s=(0,a.getLength)(e),n=BigInt(2)**BigInt(s)-BigInt(1);return(0,i.assert)(r>=-n&&r<=n,`Unable to encode value: Number "${t}" is out of range for type "${e}".`),r}function f(e){let t=BigInt(0);for(let r=0;r=49?s-BigInt(49)+BigInt(10):s>=17?s-BigInt(17)+BigInt(10):s}return(0,o.padStart)((0,i.bigIntToBytes)(t),20)}function h(e,t,r,a,l){if(d(l,[u.V3,u.V4]),e[r]!==undefined)return["bytes32",l===u.V4&&null==a?"0x0000000000000000000000000000000000000000000000000000000000000000":(0,s.arrToBufArr)((0,c.keccak256)(p(r,a,e,l)))];if("function"===r)throw new Error('Unsupported or invalid type: "function"');if(a===undefined)throw new Error(`missing value for field ${t} of type ${r}`);if("address"===r){if("number"==typeof a)return["address",(0,o.padStart)((0,i.numberToBytes)(a),20)];if((0,i.isStrictHexString)(a))return["address",(0,i.add0x)(a)];if("string"==typeof a)return["address",f(a).subarray(0,20)]}if("bool"===r)return["bool",Boolean(a)];if("bytes"===r)return"number"==typeof a?a=(0,i.numberToBytes)(a):(0,i.isStrictHexString)(a)||"0x"===a?a=(0,i.hexToBytes)(a):"string"==typeof a&&(a=(0,i.stringToBytes)(a)),["bytes32",(0,s.arrToBufArr)((0,c.keccak256)(a))];if(r.startsWith("bytes")&&"bytes"!==r&&!r.includes("["))return"number"==typeof a?a<0?["bytes32",new Uint8Array(32)]:["bytes32",(0,i.bigIntToBytes)(BigInt(a))]:(0,i.isStrictHexString)(a)?["bytes32",(0,i.hexToBytes)(a)]:["bytes32",a];if(r.startsWith("int")&&!r.includes("[")){const e=m(r,a);return e>=BigInt(0)?["uint256",e]:["int256",e]}if("string"===r)return a="number"==typeof a?(0,i.numberToBytes)(a):(0,i.stringToBytes)(null!=a?a:""),["bytes32",(0,s.arrToBufArr)((0,c.keccak256)(a))];if(r.endsWith("]")){if(l===u.V3)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");const o=r.slice(0,r.lastIndexOf("[")),i=a.map((r=>h(e,t,o,r,l)));return["bytes32",(0,s.arrToBufArr)((0,c.keccak256)((0,n.encode)(i.map((([e])=>e)),i.map((([,e])=>e)))))]}return[r,a]}function p(e,t,r,a){d(a,[u.V3,u.V4]);const o=["bytes32"],i=[k(e,r)];for(const s of r[e]){if(a===u.V3&&t[s.name]===undefined)continue;const[e,n]=h(r,s.name,s.type,t[s.name],a);o.push(e),i.push(n)}return(0,s.arrToBufArr)((0,n.encode)(o,i))}function g(e,t){let r="";const s=b(e,t);s.delete(e);const n=[e,...Array.from(s).sort()];for(const e of n){if(!t[e])throw new Error(`No type definition specified: ${e}`);r+=`${e}(${t[e].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`}return r}function b(e,t,r=new Set){if("string"!=typeof e)throw new Error(`Invalid findTypeDependencies input ${JSON.stringify(e)}`);const s=e.match(/^\w*/u);if([e]=s,r.has(e)||t[e]===undefined)return r;r.add(e);for(const s of t[e])b(s.type,t,r);return r}function y(e,t,r,n){d(n,[u.V3,u.V4]);const a=p(e,t,r,n),o=(0,c.keccak256)(a);return(0,s.arrToBufArr)(o)}function k(e,t){const r=(0,i.stringToBytes)(g(e,t));return(0,s.arrToBufArr)((0,c.keccak256)(r))}function E(e){const t={};for(const s in r.TYPED_MESSAGE_SCHEMA.properties)e[s]&&(t[s]=e[s]);return"types"in t&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t}function C(e,t){d(t,[u.V3,u.V4]);const r=E(e),{domain:s}=r;return y("EIP712Domain",s,{EIP712Domain:r.types.EIP712Domain},t)}function A(e,t){if((0,a.isArrayType)(e)&&Array.isArray(t)){const[r]=(0,a.getArrayType)(e);return t.map((e=>A(r,e)))}if("address"===e){if("number"==typeof t)return(0,o.padStart)((0,i.numberToBytes)(t),20);if((0,i.isStrictHexString)(t))return(0,o.padStart)((0,i.hexToBytes)(t).subarray(0,20),20);if(t instanceof Uint8Array)return(0,o.padStart)(t.subarray(0,20),20)}if("bool"===e)return Boolean(t);if(e.startsWith("bytes")&&"bytes"!==e){const r=(0,a.getByteLength)(e);if("number"==typeof t)return t<0?new Uint8Array:(0,i.numberToBytes)(t).subarray(0,r);if((0,i.isStrictHexString)(t))return(0,i.hexToBytes)(t).subarray(0,r);if(t instanceof Uint8Array)return t.subarray(0,r)}if(e.startsWith("uint")&&"number"==typeof t)return Math.abs(t);if(e.startsWith("int")&&"number"==typeof t){const r=(0,a.getLength)(e);return BigInt.asIntN(r,BigInt(t))}return t}function S(e,t){return t.map((t=>{if("string"==typeof t||"number"==typeof t||"bigint"==typeof t){const r=m(e,t);if(r>=BigInt(0))return(0,o.padStart)((0,i.bigIntToBytes)(r),32);const s=(0,a.getLength)(e),n=BigInt.asIntN(s,r);return(0,i.signedBigIntToBytes)(n,32)}return t}))}function w(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!("length"in e)||!e.length)throw t;const r=e.map((({name:e,type:t,value:r})=>{if("address[]"===t)return{name:e,type:"bytes32[]",value:(s=r,s.map((e=>"number"==typeof e?(0,o.padStart)((0,i.numberToBytes)(e),32):(0,i.isStrictHexString)(e)?(0,o.padStart)((0,i.hexToBytes)(e).subarray(0,32),32):e instanceof Uint8Array?(0,o.padStart)(e.subarray(0,32),32):e)))};var s;if(t.startsWith("int")&&(0,a.isArrayType)(t)){const[s,n]=(0,a.getArrayType)(t);return{name:e,type:`bytes32[${null!=n?n:""}]`,value:S(s,r)}}return{name:e,type:t,value:A(t,r)}})),u=r.map((e=>"bytes"!==e.type?e.value:(0,l.legacyToBuffer)(e.value))),d=r.map((e=>{if("function"===e.type)throw new Error('Unsupported or invalid type: "function"');return e.type})),m=e.map((e=>{if(!e.name)throw t;return`${e.type} ${e.name}`}));return(0,s.arrToBufArr)((0,c.keccak256)((0,n.encodePacked)(["bytes32","bytes32"],[(0,c.keccak256)((0,n.encodePacked)(["string[]"],[m],!0)),(0,c.keccak256)((0,n.encodePacked)(d,u,!0))])))}!function(e){e.V1="V1",e.V3="V3",e.V4="V4"}(u=r.SignTypedDataVersion||(r.SignTypedDataVersion={})),r.TYPED_MESSAGE_SCHEMA={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},r.TypedDataUtils={encodeData:p,encodeType:g,findTypeDependencies:b,hashStruct:y,hashType:k,sanitizeData:E,eip712Hash:function(e,t){d(t,[u.V3,u.V4]);const r=E(e),n=[(0,i.hexToBytes)("1901")];return n.push(C(e,t)),"EIP712Domain"!==r.primaryType&&n.push(y(r.primaryType,r.message,r.types,t)),(0,s.arrToBufArr)((0,c.keccak256)((0,i.concatBytes)(n)))},eip712DomainHash:C},r.typedSignatureHash=function(e){const t=w(e);return(0,i.bytesToHex)(t)},r.signTypedData=function({privateKey:e,data:t,version:n}){if(d(n),(0,l.isNullish)(t))throw new Error("Missing data parameter");if((0,l.isNullish)(e))throw new Error("Missing private key parameter");const a=n===u.V1?w(t):r.TypedDataUtils.eip712Hash(t,n),o=(0,s.ecsign)(a,e);return(0,l.concatSig)((0,s.arrToBufArr)((0,i.bigIntToBytes)(o.v)),o.r,o.s)},r.recoverTypedSignature=function({data:e,signature:t,version:n}){if(d(n),(0,l.isNullish)(e))throw new Error("Missing data parameter");if((0,l.isNullish)(t))throw new Error("Missing signature parameter");const a=n===u.V1?w(e):r.TypedDataUtils.eip712Hash(e,n),o=(0,l.recoverPublicKey)(a,t),c=(0,s.publicToAddress)(o);return(0,i.bytesToHex)(c)}}}},{package:"@metamask/eth-sig-util",file:"node_modules/@metamask/eth-sig-util/dist/sign-typed-data.js"}],[1645,{"@ethereumjs/util":478,"@metamask/utils":1656,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.normalize=r.recoverPublicKey=r.concatSig=r.legacyToBuffer=r.isNullish=r.padWithZeroes=void 0;const s=e("@ethereumjs/util"),n=e("@metamask/utils");function a(e,t){if(""!==e&&!/^[a-f0-9]+$/iu.test(e))throw new Error(`Expected an unprefixed hex string. Received: ${e}`);if(t<0)throw new Error(`Expected a non-negative integer target length. Received: ${t}`);return String.prototype.padStart.call(e,t,"0")}function o(e){return null===e||e===undefined}r.padWithZeroes=a,r.isNullish=o,r.legacyToBuffer=function(e){return"string"!=typeof e||(0,s.isHexString)(e)?(0,s.toBuffer)(e):t.from(e)},r.concatSig=function(e,t,r){const o=(0,s.fromSigned)(t),i=(0,s.fromSigned)(r),c=(0,s.bufferToInt)(e),l=a((0,s.toUnsigned)(o).toString("hex"),64),u=a((0,s.toUnsigned)(i).toString("hex"),64),d=(0,n.remove0x)((0,n.numberToHex)(c));return(0,n.add0x)(l.concat(u,d))},r.recoverPublicKey=function(e,t){const r=(0,s.fromRpcSig)(t);return(0,s.ecrecover)(e,r.v,r.r,r.s)},r.normalize=function(e){if(o(e))return undefined;if("number"==typeof e){if(e<0)return"0x";const t=(0,n.numberToBytes)(e);e=(0,n.bytesToHex)(t)}if("string"!=typeof e){let t="eth-sig-util.normalize() requires hex string or integer input.";throw t+=` received ${typeof e}: ${e}`,new Error(t)}return(0,n.add0x)(e.toLowerCase())}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/eth-sig-util",file:"node_modules/@metamask/eth-sig-util/dist/utils.js"}],[1646,{"./errors.cjs":1654,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/assert.cjs"}],[1647,{"./assert.cjs":1646,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/base64.cjs"}],[1648,{"./assert.cjs":1646,"./hex.cjs":1655,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/bytes.cjs"}],[1649,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAssetId=r.isCaipAssetType=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAssetIdStruct=r.CaipAssetTypeStruct=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ASSET_ID_REGEX=r.CAIP_ASSET_TYPE_REGEX=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),r.CaipAssetTypeStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_TYPE_REGEX),r.CaipAssetIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.isCaipAssetType=function(e){return(0,s.is)(e,r.CaipAssetTypeStruct)},r.isCaipAssetId=function(e){return(0,s.is)(e,r.CaipAssetIdStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1650,{"./base64.cjs":1647,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/checksum.cjs"}],[1651,{"./assert.cjs":1646,"./bytes.cjs":1648,"./hex.cjs":1655,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/coercers.cjs"}],[1652,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/collections.cjs"}],[1653,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1654,{"./misc.cjs":1660,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/errors.cjs"}],[1655,{"./assert.cjs":1646,"./bytes.cjs":1648,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/hex.cjs"}],[1656,{"./assert.cjs":1646,"./base64.cjs":1647,"./bytes.cjs":1648,"./caip-types.cjs":1649,"./checksum.cjs":1650,"./coercers.cjs":1651,"./collections.cjs":1652,"./encryption-types.cjs":1653,"./errors.cjs":1654,"./hex.cjs":1655,"./json.cjs":1657,"./keyring.cjs":1658,"./logging.cjs":1659,"./misc.cjs":1660,"./number.cjs":1661,"./opaque.cjs":1662,"./promise.cjs":1663,"./time.cjs":1664,"./transaction-types.cjs":1665,"./versions.cjs":1666},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/index.cjs"}],[1657,{"./assert.cjs":1646,"./misc.cjs":1660,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/json.cjs"}],[1658,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/keyring.cjs"}],[1659,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/logging.cjs"}],[1660,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/misc.cjs"}],[1661,{"./assert.cjs":1646,"./hex.cjs":1655},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/number.cjs"}],[1662,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/opaque.cjs"}],[1663,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/promise.cjs"}],[1664,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/time.cjs"}],[1665,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1666,{"./assert.cjs":1646,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/eth-sig-util>@metamask/utils",file:"node_modules/@metamask/eth-sig-util/node_modules/@metamask/utils/dist/versions.cjs"}],[1667,{"./simple-keyring":1668},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("./simple-keyring");Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s(n).default}})}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring",file:"node_modules/@metamask/eth-simple-keyring/dist/index.js"}],[1668,{"@ethereumjs/util":478,"@metamask/eth-sig-util":1642,"@metamask/utils":1679,buffer:3561,"ethereum-cryptography/keccak":3784,randombytes:4596},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var s,n,a,o,i=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},c=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const u=e("@ethereumjs/util"),d=e("@metamask/eth-sig-util"),m=e("@metamask/utils"),f=e("ethereum-cryptography/keccak"),h=l(e("randombytes")),p="Simple Key Pair";class g{constructor(e=[]){s.add(this),n.set(this,void 0),this.type=p,i(this,n,[],"f"),this.deserialize(e).catch((e=>{throw new Error(`Problem deserializing SimpleKeyring ${e.message}`)}))}async serialize(){return c(this,n,"f").map((e=>e.privateKey.toString("hex")))}async deserialize(e=[]){i(this,n,e.map((e=>{const r=(0,u.stripHexPrefix)(e),s=t.from(r,"hex");return{privateKey:s,publicKey:(0,u.privateToPublic)(s)}})),"f")}async addAccounts(e=1){const t=[];for(let r=0;r(0,m.add0x)((0,u.bufferToHex)((0,u.publicToAddress)(e)))))}async getAccounts(){return c(this,n,"f").map((({publicKey:e})=>(0,m.add0x)((0,u.bufferToHex)((0,u.publicToAddress)(e)))))}async signTransaction(e,t,r={}){const n=c(this,s,"m",a).call(this,e,r),o=t.sign(n);return o===undefined?t:o}async signMessage(e,r,n={withAppKeyOrigin:"",validateMessage:!0}){const o=(0,u.stripHexPrefix)(r);if(n.validateMessage&&(0===o.length||!o.match(/^[a-fA-F0-9]*$/u)))throw new Error("Cannot sign invalid message");const i=c(this,s,"m",a).call(this,e,n),l=(0,u.ecsign)(t.from(o,"hex"),i);return(0,d.concatSig)((0,u.toBuffer)(l.v),l.r,l.s)}async signPersonalMessage(e,t,r={withAppKeyOrigin:""}){const n=c(this,s,"m",a).call(this,e,r);return(0,d.personalSign)({privateKey:n,data:t})}async decryptMessage(e,t){const r=c(this,s,"m",o).call(this,e).privateKey.toString("hex");return(0,d.decrypt)({privateKey:r,encryptedData:t})}async signTypedData(e,t,r={version:d.SignTypedDataVersion.V1}){let n=d.SignTypedDataVersion.V1;r.version&&function(e){return e in d.SignTypedDataVersion}(r.version)&&(n=d.SignTypedDataVersion[r.version]);const o=c(this,s,"m",a).call(this,e,r);return(0,d.signTypedData)({privateKey:o,data:t,version:n})}async getEncryptionPublicKey(e,t){const r=c(this,s,"m",a).call(this,e,t);return(0,d.getEncryptionPublicKey)(r.toString("hex"))}async getAppKeyAddress(e,t){if(!t||"string"!=typeof t)throw new Error("'origin' must be a non-empty string");const r=c(this,s,"m",o).call(this,e,{withAppKeyOrigin:t});return(0,m.add0x)((0,u.bufferToHex)((0,u.publicToAddress)(r.publicKey)))}async exportAccount(e,t={withAppKeyOrigin:""}){return c(this,s,"m",o).call(this,e,t).privateKey.toString("hex")}removeAccount(e){if(!c(this,n,"f").map((({publicKey:e})=>(0,u.bufferToHex)((0,u.publicToAddress)(e)).toLowerCase())).includes(e.toLowerCase()))throw new Error(`Address ${e} not found in this keyring`);i(this,n,c(this,n,"f").filter((({publicKey:t})=>(0,u.bufferToHex)((0,u.publicToAddress)(t)).toLowerCase()!==e.toLowerCase())),"f")}}function b(){const e=(0,h.default)(32);if(!(0,u.isValidPrivate)(e))throw new Error("Private key does not satisfy the curve requirements (ie. it is invalid)");return e}r.default=g,n=new WeakMap,s=new WeakSet,a=function(e,t={withAppKeyOrigin:""}){if(!e)throw new Error("Must specify address.");return c(this,s,"m",o).call(this,e,t).privateKey},o=function(e,r={}){const s=(0,d.normalize)(e);let a=c(this,n,"f").find((({publicKey:e})=>(0,u.bufferToHex)((0,u.publicToAddress)(e))===s));if(!a)throw new Error("Simple Keyring - Unable to find matching address.");if(r.withAppKeyOrigin){const{privateKey:e}=a,s=t.from(r.withAppKeyOrigin,"utf8"),n=t.concat([e,s]),o=(0,u.arrToBufArr)((0,f.keccak256)(n));a={privateKey:o,publicKey:(0,u.privateToPublic)(o)}}return a},g.type=p}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring",file:"node_modules/@metamask/eth-simple-keyring/dist/simple-keyring.js"}],[1669,{"./errors.cjs":1677,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const s=e("@metamask/superstruct"),n=e("./errors.cjs");function a(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=o,r.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw a(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",i=o){try{(0,s.assert)(e,t)}catch(e){throw a(i,`${r}: ${function(e){return(0,n.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/assert.cjs"}],[1670,{"./assert.cjs":1669,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,a=t.characterSet??"base64";let o,i;return"base64"===a?o=String.raw`[A-Za-z0-9+\/]`:((0,n.assert)("base64url"===a),o=String.raw`[-_A-Za-z0-9]`),i=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,s.pattern)(e,i)}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/base64.cjs"}],[1671,{"./assert.cjs":1669,"./hex.cjs":1678,"@scure/base":2830,buffer:3561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.base64ToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToBase64=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const s=e("@scure/base"),n=e("./assert.cjs"),a=e("./hex.cjs"),o=48,i=58,c=87;const l=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 u(e){return e instanceof Uint8Array}function d(e){(0,n.assert)(u(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let s=0;s=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function b(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):b(e);if(u(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=u,r.assertIsBytes=d,r.bytesToHex=m,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e>=BigInt(8);return s.reverse()},r.numberToBytes=g,r.stringToBytes=b,r.base64ToBytes=function(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},r.valueToBytes=y,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let s=0;s@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/bytes.cjs"}],[1672,{"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.toCaipChainId=r.parseCaipAccountId=r.parseCaipChainId=r.isCaipAssetId=r.isCaipAssetType=r.isCaipAccountAddress=r.isCaipAccountId=r.isCaipReference=r.isCaipNamespace=r.isCaipChainId=r.KnownCaipNamespace=r.CaipAssetIdStruct=r.CaipAssetTypeStruct=r.CaipAccountAddressStruct=r.CaipAccountIdStruct=r.CaipReferenceStruct=r.CaipNamespaceStruct=r.CaipChainIdStruct=r.CAIP_ASSET_ID_REGEX=r.CAIP_ASSET_TYPE_REGEX=r.CAIP_ACCOUNT_ADDRESS_REGEX=r.CAIP_ACCOUNT_ID_REGEX=r.CAIP_REFERENCE_REGEX=r.CAIP_NAMESPACE_REGEX=r.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function n(e){return(0,s.is)(e,r.CaipNamespaceStruct)}function a(e){return(0,s.is)(e,r.CaipReferenceStruct)}r.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,r.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,r.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,r.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,r.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,r.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,r.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_CHAIN_ID_REGEX),r.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_NAMESPACE_REGEX),r.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),r.CAIP_REFERENCE_REGEX),r.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ID_REGEX),r.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ACCOUNT_ADDRESS_REGEX),r.CaipAssetTypeStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_TYPE_REGEX),r.CaipAssetIdStruct=(0,s.pattern)((0,s.string)(),r.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(r.KnownCaipNamespace||(r.KnownCaipNamespace={})),r.isCaipChainId=function(e){return(0,s.is)(e,r.CaipChainIdStruct)},r.isCaipNamespace=n,r.isCaipReference=a,r.isCaipAccountId=function(e){return(0,s.is)(e,r.CaipAccountIdStruct)},r.isCaipAccountAddress=function(e){return(0,s.is)(e,r.CaipAccountAddressStruct)},r.isCaipAssetType=function(e){return(0,s.is)(e,r.CaipAssetTypeStruct)},r.isCaipAssetId=function(e){return(0,s.is)(e,r.CaipAssetIdStruct)},r.parseCaipChainId=function(e){const t=r.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},r.parseCaipAccountId=function(e){const t=r.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.toCaipChainId=function(e,t){if(!n(e))throw new Error(`Invalid "namespace", must match: ${r.CAIP_NAMESPACE_REGEX.toString()}`);if(!a(t))throw new Error(`Invalid "reference", must match: ${r.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/caip-types.cjs"}],[1673,{"./base64.cjs":1670,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),n=e("./base64.cjs");r.ChecksumStruct=(0,s.size)((0,n.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/checksum.cjs"}],[1674,{"./assert.cjs":1669,"./bytes.cjs":1671,"./hex.cjs":1678,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./bytes.cjs"),o=e("./hex.cjs"),i=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),o.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),i,Number),l=(0,s.coerce)((0,s.bigint)(),i,BigInt),u=((0,s.union)([o.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([o.StrictHexStruct]),a.hexToBytes)),d=(0,s.coerce)(o.StrictHexStruct,(0,s.instance)(Uint8Array),a.bytesToHex);r.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,n.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/coercers.cjs"}],[1675,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s,n,a=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class i{get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),o(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}get(e){return a(this,s,"f").get(e)}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=i;class c{get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,s,n)=>e.call(t,r,s,this)))}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=c,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/collections.cjs"}],[1676,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[1677,{"./misc.cjs":1683,"pony-cause":4518},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapError=r.getErrorMessage=r.isErrorWithStack=r.isErrorWithMessage=r.isErrorWithCode=void 0;const s=e("pony-cause"),n=e("./misc.cjs");function a(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}r.isErrorWithCode=a,r.isErrorWithMessage=o,r.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},r.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,n.isNullOrUndefined)(e)?"":String(e)},r.wrapError=function(e,t){if((r=e)instanceof Error||(0,n.isObject)(r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),a(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/errors.cjs"}],[1678,{"./assert.cjs":1669,"./bytes.cjs":1671,"@metamask/superstruct":2670,"@noble/hashes/sha3":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.isValidChecksumAddress=r.getChecksumAddress=r.isValidHexAddress=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.HexChecksumAddressStruct=r.HexAddressStruct=r.StrictHexStruct=r.HexStruct=void 0;const s=e("@metamask/superstruct"),n=e("@noble/hashes/sha3"),a=e("./assert.cjs"),o=e("./bytes.cjs");function i(e){return(0,s.is)(e,r.HexStruct)}function c(e){return(0,s.is)(e,r.StrictHexStruct)}function l(e){(0,a.assert)((0,s.is)(e,r.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),i=d((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const r=i[t];return(0,a.assert)((0,s.is)(r,(0,s.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e})).join("")}`}function u(e){return!!(0,s.is)(e,r.HexChecksumAddressStruct)&&l(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),r.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),r.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),r.isHexString=i,r.isStrictHexString=c,r.assertIsHexString=function(e){(0,a.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,a.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},r.isValidHexAddress=function(e){return(0,s.is)(e,r.HexAddressStruct)||u(e)},r.getChecksumAddress=l,r.isValidChecksumAddress=u,r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=d}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/hex.cjs"}],[1679,{"./assert.cjs":1669,"./base64.cjs":1670,"./bytes.cjs":1671,"./caip-types.cjs":1672,"./checksum.cjs":1673,"./coercers.cjs":1674,"./collections.cjs":1675,"./encryption-types.cjs":1676,"./errors.cjs":1677,"./hex.cjs":1678,"./json.cjs":1680,"./keyring.cjs":1681,"./logging.cjs":1682,"./misc.cjs":1683,"./number.cjs":1684,"./opaque.cjs":1685,"./promise.cjs":1686,"./time.cjs":1687,"./transaction-types.cjs":1688,"./versions.cjs":1689},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){s===undefined&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){s===undefined&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert.cjs"),r),n(e("./base64.cjs"),r),n(e("./bytes.cjs"),r),n(e("./caip-types.cjs"),r),n(e("./checksum.cjs"),r),n(e("./coercers.cjs"),r),n(e("./collections.cjs"),r),n(e("./encryption-types.cjs"),r),n(e("./errors.cjs"),r),n(e("./hex.cjs"),r),n(e("./json.cjs"),r),n(e("./keyring.cjs"),r),n(e("./logging.cjs"),r),n(e("./misc.cjs"),r),n(e("./number.cjs"),r),n(e("./opaque.cjs"),r),n(e("./promise.cjs"),r),n(e("./time.cjs"),r),n(e("./transaction-types.cjs"),r),n(e("./versions.cjs"),r)}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/index.cjs"}],[1680,{"./assert.cjs":1669,"./misc.cjs":1683,"@metamask/superstruct":2670},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=r.exactOptional=r.object=void 0;const s=e("@metamask/superstruct"),n=e("./assert.cjs"),a=e("./misc.cjs");function o({path:e,branch:t}){const r=e[e.length-1];return(0,a.hasProperty)(t[t.length-2],r)}function i(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!o(r)||e.validator(t,r),refiner:(t,r)=>!o(r)||e.refiner(t,r)})}r.object=e=>(0,s.object)(e),r.exactOptional=i;function c(e){return(0,s.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",(e=>(0,s.is)(e,(0,s.number)())&&Number.isFinite(e))),(0,s.string)(),(0,s.array)((0,s.lazy)((()=>r.UnsafeJsonStruct))),(0,s.record)((0,s.string)(),(0,s.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,s.coerce)(r.UnsafeJsonStruct,(0,s.any)(),(e=>((0,n.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return c(e),!0}catch{return!1}},r.getSafeJson=c,r.getJsonSize=function(e){(0,n.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,s.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),r.JsonRpcErrorStruct=(0,r.object)({code:(0,s.integer)(),message:(0,s.string)(),data:i(r.JsonStruct),stack:i((0,s.string)())}),r.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),r.JsonStruct),(0,s.array)(r.JsonStruct)]),r.JsonRpcRequestStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.JsonRpcNotificationStruct=(0,r.object)({jsonrpc:r.JsonRpcVersionStruct,method:(0,s.string)(),params:i(r.JsonRpcParamsStruct)}),r.isJsonRpcNotification=function(e){return(0,s.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,n.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,s.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,n.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,s.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,r.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,s.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,s.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,n.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,s.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,n.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,s.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,n.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,s.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,n.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/json.cjs"}],[1681,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/keyring.cjs"}],[1682,{debug:3705},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const n=(0,s(e("debug")).default)("metamask");r.createProjectLogger=function(e){return n.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/logging.cjs"}],[1683,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.getKnownPropertyNames=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),r.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(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}},r.isASCII=s,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/misc.cjs"}],[1684,{"./assert.cjs":1669,"./hex.cjs":1678},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const s=e("./assert.cjs"),n=e("./hex.cjs");r.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,n.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,n.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,n.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,n.assertIsHexString)(e),BigInt((0,n.add0x)(e)))}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/number.cjs"}],[1685,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/opaque.cjs"}],[1686,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeferredPromise=void 0,r.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const s=new Promise(((e,s)=>{t=e,r=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:r}}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/promise.cjs"}],[1687,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,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"}(r.Duration||(r.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return s(e,"count"),e*t},r.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/time.cjs"}],[1688,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[1689,{"./assert.cjs":1669,"@metamask/superstruct":2670,semver:5064},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const s=e("@metamask/superstruct"),n=e("semver"),a=e("./assert.cjs");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,a.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,a.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils",file:"node_modules/@metamask/eth-simple-keyring/node_modules/@metamask/utils/dist/versions.cjs"}],[1749,{"./helpers":1751,"./prefix-for-chain":1753,"./prefix-for-network":1754},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getAccountLink=r.createCustomAccountLink=r.createAccountLinkForChain=r.createAccountLink=void 0;const n=e("./helpers"),a=s(e("./prefix-for-chain")),o=s(e("./prefix-for-network"));function i(e,t){const r=o.default(t);return null===r?"":`https://${r}etherscan.io/address/${e}`}function c(e,t){const r=a.default(t);return null===r?"":`https://${r}etherscan.io/address/${e}`}function l(e,t){return n.addPathToUrl(t,"address",e)}r.createAccountLink=i,r.createAccountLinkForChain=c,r.createCustomAccountLink=l,r.getAccountLink=function(e,t,r={},s=""){return r.blockExplorerUrl?l(e,r.blockExplorerUrl):s?i(e,s):c(e,t)}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/account-link.js"}],[1750,{"./helpers":1751,"./prefix-for-chain":1753,"./prefix-for-network":1754},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getBlockExplorerLink=r.createExplorerLinkForChain=r.createExplorerLink=r.createCustomExplorerLink=void 0;const n=e("./helpers"),a=s(e("./prefix-for-chain")),o=s(e("./prefix-for-network"));function i(e,t){return n.addPathToUrl(t,"tx",e)}function c(e,t){const r=o.default(t);return null===r?"":`https://${r}etherscan.io/tx/${e}`}function l(e,t){const r=a.default(t);return null===r?"":`https://${r}etherscan.io/tx/${e}`}r.createCustomExplorerLink=i,r.createExplorerLink=c,r.createExplorerLinkForChain=l,r.getBlockExplorerLink=function(e,t={}){return t.blockExplorerUrl?i(e.hash,t.blockExplorerUrl):e.chainId?l(e.hash,e.chainId):c(e.hash,e.metamaskNetworkId)}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/explorer-link.js"}],[1751,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.addPathToUrl=void 0,r.addPathToUrl=(e,t,r)=>{const{username:s,password:n,protocol:a,host:o,pathname:i,search:c,hash:l}=new URL(e),u=i.endsWith("/")?`${i}${t}/${r}`:`${i}/${t}/${r}`;return new URL(`${a}//${s?`${s}:${n}`:""}${o}${u}${c}${l}`).toString()}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/helpers.js"}],[1752,{"./account-link":1749,"./explorer-link":1750,"./token-tracker-link":1755},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const s=e("./account-link"),n=e("./explorer-link"),a=e("./token-tracker-link");t.exports={createExplorerLink:n.createExplorerLink,createCustomExplorerLink:n.createCustomExplorerLink,createExplorerLinkForChain:n.createExplorerLinkForChain,createAccountLink:s.createAccountLink,createCustomAccountLink:s.createCustomAccountLink,createAccountLinkForChain:s.createAccountLinkForChain,createTokenTrackerLink:a.createTokenTrackerLink,createCustomTokenTrackerLink:a.createCustomTokenTrackerLink,createTokenTrackerLinkForChain:a.createTokenTrackerLinkForChain,getBlockExplorerLink:n.getBlockExplorerLink,getAccountLink:s.getAccountLink,getTokenTrackerLink:a.getTokenTrackerLink}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/index.js"}],[1753,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){let t;switch(e){case"0x1":t="";break;case"0x5":t="goerli.";break;case"0xaa36a7":t="sepolia.";break;default:t=null}return t}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/prefix-for-chain.js"}],[1754,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){let t;switch(parseInt(e)){case 1:t="";break;case 5:t="goerli.";break;case 11155111:t="sepolia.";break;default:t=null}return t}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/prefix-for-network.js"}],[1755,{"./helpers":1751,"./prefix-for-chain":1753,"./prefix-for-network":1754},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getTokenTrackerLink=r.createTokenTrackerLinkForChain=r.createCustomTokenTrackerLink=r.createTokenTrackerLink=void 0;const n=e("./helpers"),a=s(e("./prefix-for-chain")),o=s(e("./prefix-for-network"));function i(e,t,r){const s=o.default(t);return null===s?"":`https://${s}etherscan.io/token/${e}${r?`?a=${r}`:""}`}function c(e,t){return n.addPathToUrl(t,"token",e)}function l(e,t,r){const s=a.default(t);return null===s?"":`https://${s}etherscan.io/token/${e}${r?`?a=${r}`:""}`}r.createTokenTrackerLink=i,r.createCustomTokenTrackerLink=c,r.createTokenTrackerLinkForChain=l,r.getTokenTrackerLink=function(e,t,r,s,n={}){return n.blockExplorerUrl?c(e,n.blockExplorerUrl):r?i(e,r,s):l(e,t,s)}}}},{package:"@metamask/etherscan-link",file:"node_modules/@metamask/etherscan-link/dist/token-tracker-link.js"}],[1756,{"./has-tx-object":1757,"@babel/runtime/helpers/asyncToGenerator":303,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/regenerator":330,"@metamask/ethjs-filter":1759,"@metamask/ethjs-util":1765,"ethjs-abi":3865,"js-sha3":4228,"promise-to-callback":4524},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=e("@babel/runtime/helpers/interopRequireDefault"),n=s(e("@babel/runtime/regenerator")),a=s(e("@babel/runtime/helpers/asyncToGenerator")),o=e("ethjs-abi"),i=e("@metamask/ethjs-filter"),c=e("@metamask/ethjs-util").getKeys,l=e("js-sha3").keccak_256,u=e("promise-to-callback"),d=e("./has-tx-object");t.exports=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},t=this;function r(e){return function(){var t,r=[].slice.call(arguments);"function"==typeof r[r.length-1]&&(t=r.pop());var n=function(e){return s.apply(this,arguments)}({methodObject:e,methodArgs:r});return t?u(n)(t):n}}function s(){return(s=(0,a.default)(n.default.mark((function e(r){var s,a,i,c,l,u,m;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=r.methodObject,a=r.methodArgs,i="call",c={},d(a)&&(c=a.pop()),(l=Object.assign({},t.defaultTxObject,c,{to:t.address})).data=o.encodeMethod(s,a),!1===s.constant&&(i="sendTransaction"),e.next=9,t.query[i](l);case 9:if(u=e.sent,"call"!==i){e.next=20;break}return e.prev=11,m=o.decodeMethod(s,u),e.abrupt("return",m);case 16:throw e.prev=16,e.t0=e.catch(11),new Error("[ethjs-contract] while formatting incoming raw call data "+JSON.stringify(u)+" "+e.t0);case 20:return e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,null,[[11,16]])})))).apply(this,arguments)}t.abi=e.contractABI||[],t.query=e.query,t.address=e.address||"0x",t.bytecode=e.contractBytecode||"0x",t.defaultTxObject=e.contractDefaultTxObject||{},t.filters=new i(t.query),(m=t.abi,m.filter((function(e){return("function"===e.type||"event"===e.type)&&e.name.length>0}))).forEach((function(e){"function"===e.type?t[e.name]=r(e):"event"===e.type&&(t[e.name]=function(e){return function(){var r=[].slice.call(arguments),s=c(e.inputs,"type",!1),n=["0x"+l(e.name+"("+s.join(",")+")")],a=Object.assign({},r[0])||{},i=Object.assign({},r[0]||{},{to:t.address,topics:n}),u=Object.assign({},a,{decoder:function(t){return o.decodeEvent(e,t,n)},defaultFilterObject:i});return new t.filters.Filter(u)}}(e))}));var m}}}},{package:"@metamask/ethjs-contract",file:"node_modules/@metamask/ethjs-contract/lib/contract.js"}],[1757,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=["from","to","data","value","gasPrice","gas"];t.exports=function(e){if(!Array.isArray(e)||0===e.length)return!1;var t=e[e.length-1];if(!t)return!1;if("object"!=typeof t)return!1;if(0===Object.keys(t).length)return!0;var r=Object.keys(t);if(s.some((function(e){return r.includes(e)})))return!0;return!1}}}},{package:"@metamask/ethjs-contract",file:"node_modules/@metamask/ethjs-contract/lib/has-tx-object.js"}],[1758,{"./contract":1756,"./has-tx-object":1757,"@metamask/ethjs-filter":1759,"@metamask/ethjs-util":1765,"ethjs-abi":3865,"js-sha3":4228},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=e("ethjs-abi"),n=(e("js-sha3").keccak_256,e("@metamask/ethjs-filter"),e("@metamask/ethjs-util").getKeys),a=e("./contract"),o=e("./has-tx-object");t.exports=function(e){return function(t,r,i){if(!Array.isArray(t))throw new Error("[ethjs-contract] Contract ABI must be type Array, got type "+typeof t);if(void 0!==r&&"string"!=typeof r)throw new Error("[ethjs-contract] Contract bytecode must be type String, got type "+typeof r);if(void 0!==i&&"object"!=typeof i)throw new Error("[ethjs-contract] Contract default tx object must be type Object, got type "+typeof t);var c={at:function(s){return new a({address:s,query:e,contractBytecode:r,contractDefaultTxObject:i,contractABI:t})},new:function(){var a={},c=null,l=[].slice.call(arguments);"function"==typeof l[l.length-1]&&(c=l.pop()),o(l)&&(a=l.pop());var u=function(e){return e.filter((function(e){return"constructor"===e.type}))[0]}(t),d=Object.assign({},i,a);if(r&&(d.data=r),u){var m=s.encodeParams(n(u.inputs,"type"),l).substring(2);d.data=""+d.data+m}return c?e.sendTransaction(d,c):e.sendTransaction(d)}};return c}}}}},{package:"@metamask/ethjs-contract",file:"node_modules/@metamask/ethjs-contract/lib/index.js"}],[1759,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function s(e,t){function r(e){var r=this;r.filterId=null,r.options=Object.assign({delay:300,decoder:function(e){return e},defaultFilterObject:{}},e||{}),r.watchers={},r.interval=setInterval((function(){null!==r.filterId&&Object.keys(r.watchers).length>0&&t.getFilterChanges(r.filterId,(function(e,t){var s=[],n=null;if(!e)try{t.forEach((function(e,n){s[n]=t[n],"object"==typeof t[n]&&(s[n].data=r.options.decoder(s[n].data))}))}catch(e){n=new Error("[ethjs-filter] while decoding filter change event data from RPC '"+JSON.stringify(s)+"': "+e)}Object.keys(r.watchers).forEach((function(a){var o=r.watchers[a];!0!==o.stop?n?o.callback(n,null):e?o.callback(e,null):Array.isArray(s)&&t.length>0&&o.callback(e,s):delete r.watchers[a]}))}))}),r.options.delay)}return r.prototype.at=function(e){this.filterId=e},r.prototype.watch=function(e){var t=e||function(){},r=this,s=Math.random().toString(36).substring(7);return r.watchers[s]={callback:t,stop:!1,stopWatching:function(){r.watchers[s].stop=!0}},r.watchers[s]},r.prototype.uninstall=function(e){var r=this,s=e||null;r.watchers=Object.assign({}),clearInterval(r.interval);var n=new Promise((function(e,s){t.uninstallFilter(r.filterId,(function(t,r){t?s(t):e(r)}))}));return s&&n.then((function(e){return s(null,e)})).catch((function(e){return s(e,null)})),s?null:n},r.prototype.new=function(){var r=null,s=this,n=[],a=[].slice.call(arguments);"function"==typeof a[a.length-1]&&(r=a.pop()),"Filter"===e&&n.push(Object.assign(s.options.defaultFilterObject,a[a.length-1]||{}));var o=new Promise((function(r,a){n.push((function(e,t){e?a(e):(s.filterId=t,r(t))})),t["new"+e].apply(t,n)}));return r&&o.then((function(e){return r(null,e)})).catch((function(e){return r(e,null)})),r?null:o},r}t.exports=function e(t){var r=this;if(!(r instanceof e))throw new Error("the EthFilter object must be instantiated with `new` flag.. (e.g. `const filters = new EthFilter(query);`)");if("object"!=typeof t)throw new Error("the EthFilter object must be instantiated with an EthQuery instance (e.g. `const filters = new EthFilter(new EthQuery(provider));`). See github.com/ethjs/ethjs-query for more details..");r.Filter=s("Filter",t),r.BlockFilter=s("BlockFilter",t),r.PendingTransactionFilter=s("PendingTransactionFilter",t)}}}},{package:"@metamask/ethjs>@metamask/ethjs-filter",file:"node_modules/@metamask/ethjs-filter/lib/index.js"}],[1760,{"@metamask/ethjs-util":1765,"@metamask/number-to-bn":2118,"ethjs-schema":3867,"strip-hex-prefix":5112},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=e("@metamask/number-to-bn"),n=e("ethjs-schema"),a=e("@metamask/ethjs-util"),o=a.arrayContainsArray,i=a.getBinarySize,c=a.padToEven,l=e("strip-hex-prefix");function u(e,t,r){if(-1===["string","number","object"].indexOf(typeof e)||null===e)return e;var n=s(e),a=r&&n.toString(16).length%2?"0":"";if(s(e).isNeg())throw new Error("[ethjs-format] while formatting quantity '"+n.toString(10)+"', invalid negative number. Number must be positive or zero.");return t?"0x"+a+n.toString(16):n}function d(e,t){var r=e;return-1===n.tags.indexOf(e)&&(r=u(e,t)),r}function m(e,t){var r=e,s=0;if("string"==typeof e&&(r="0x"+c(l(e)),s=i(r)),"0x00"===r&&(r="0x0"),"number"==typeof t&&null!==e&&"0x"!==r&&"0x0"!==r&&(!/^[0-9A-Fa-f]+$/.test(l(r))||s!==2+2*t))throw new Error("[ethjs-format] hex string '"+r+"' must be an alphanumeric "+(2+2*t)+" utf8 byte hex (chars: a-fA-F) string, is "+s+" bytes");return r}function f(e,t,r){var s=Object.assign({},t),a=null;if("string"==typeof e&&(a="Boolean|EthSyncing"===e?Object.assign({},n.objects.EthSyncing):"DATA|Transaction"===e?Object.assign({},n.objects.Transaction):Object.assign({},n.objects[e])),!o(Object.keys(t),a.__required))throw new Error("[ethjs-format] object "+JSON.stringify(t)+" must contain properties: "+a.__required.join(", "));return Object.keys(a).forEach((function(e){"__required"!==e&&void 0!==t[e]&&(s[e]=p(a[e],t[e],r))})),s}function h(e,t,r,s){var n=t.slice(),a=e;if("Array|DATA"===e&&(a=["D"]),"FilterChange"===e&&"string"==typeof t[0]&&(a=["D32"]),!0===r&&"number"==typeof s&&t.length1&&(s=t),n[t]=p(a[s],e,r)})),n}function p(e,t,r,s){var n=t;return"Q"===e?n=u(t,r):"QP"===e?n=u(t,r,!0):"Q|T"===e?n=d(t,r):"D"===e?n=m(t):"D20"===e?n=m(t,20):"D32"===e?n=m(t,32):"object"==typeof t&&null!==t&&!1===Array.isArray(t)?n=f(e,t,r):Array.isArray(t)&&(n=h(e,t,r,s)),n}t.exports={schema:n,formatQuantity:u,formatQuantityOrTag:d,formatObject:f,formatArray:h,format:p,formatInputs:function(e,t){return p(n.methods[e][0],t,!0,n.methods[e][2])},formatOutputs:function(e,t){return p(n.methods[e][1],t,!1)}}}}},{package:"@metamask/ethjs-query>@metamask/ethjs-format",file:"node_modules/@metamask/ethjs-format/lib/index.js"}],[1762,{"@metamask/ethjs-format":1760,"@metamask/ethjs-rpc":1763,"promise-to-callback":4524},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=e("@metamask/ethjs-format"),n=e("@metamask/ethjs-rpc"),a=e("promise-to-callback");function o(e,t){var r=this,s=t||{};if(!(this instanceof o))throw new Error('[ethjs-query] the Eth object requires the "new" flag in order to function normally (i.e. `const eth = new Eth(provider);`).');if("object"!=typeof e)throw new Error("[ethjs-query] the Eth object requires that the first input 'provider' must be an object, got '"+typeof e+"' (i.e. 'const eth = new Eth(provider);')");r.options=Object.assign({debug:s.debug||!1,logger:s.logger||console,jsonSpace:s.jsonSpace||0}),r.rpc=new n(e),r.setProvider=r.rpc.setProvider}function i(e,t){return function(){var r=null,n=null,o=this,i=[].slice.call(arguments),c=e.replace("eth_","");i.length>0&&"function"==typeof i[i.length-1]&&(r=i.pop());var l=function(){var r=this;return new Promise((function(a,l){if(i.lengtht[0].length)l(new Error("[ethjs-query] method '"+c+"' requires at most "+t[0].length+" params, "+i.length+" provided '"+JSON.stringify(i,null,o.options.jsonSpace)+"'. For more information visit: https://github.com/ethereum/wiki/wiki/JSON-RPC#"+e.toLowerCase()));else{t[3]&&i.length@metamask/ethjs-rpc",file:"node_modules/@metamask/ethjs-rpc/lib/index.js"}],[1764,{"@metamask/number-to-bn":2118,"bn.js":3513},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var s=e("bn.js"),n=e("@metamask/number-to-bn"),a=new s(0),o=new s(-1),i={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function c(e){var t=e?e.toLowerCase():"ether",r=i[t];if("string"!=typeof r)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(i,null,2));return new s(r,10)}function l(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"==typeof e&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+typeof e+".")}t.exports={unitMap:i,numberToString:l,getValueOfUnit:c,fromWei:function(e,t,r){var s=n(e),l=s.lt(a),u=c(t),d=i[t].length-1||1,m=r||{};l&&(s=s.mul(o));for(var f=s.mod(u).toString(10);f.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var m=d[0],f=d[1];if(m||(m="0"),f||(f="0"),f.length>a)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;f.length@metamask/ethjs-unit",file:"node_modules/@metamask/ethjs-unit/lib/index.js"}]],[],{}); \ No newline at end of file diff --git a/public/extensions/MetaMask_v10.22.2/content-script-0.js b/public/extensions/MetaMask_v10.22.2/content-script-0.js index 473188a52..2cfa363c8 100644 --- a/public/extensions/MetaMask_v10.22.2/content-script-0.js +++ b/public/extensions/MetaMask_v10.22.2/content-script-0.js @@ -1 +1 @@ -LavaPack.loadBundle([[296,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,n,o){console.log("app/vendor/trezor/content-script.js chrome.runtime.connect called at ",Date.now());let t=chrome.runtime.connect({name:"trezor-connect"});t.onMessage.addListener((e=>{window.postMessage(e,window.location.origin)})),t.onDisconnect.addListener((e=>{console.log("trezor-connect disconnect called"),t=null})),window.addEventListener("message",(e=>{t&&e.source===window&&e.data&&t.postMessage({data:e.data})}))}}},{package:"$root$",file:"app/vendor/trezor/content-script.js"}]],[296],{}); \ No newline at end of file +LavaPack.loadBundle([[296,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,n,o){console.log("app/vendor/trezor/content-script.js chrome.runtime.connect called at ",Date.now()," name trezor-connect ");let t=chrome.runtime.connect({name:"trezor-connect"});t.onMessage.addListener((e=>{window.postMessage(e,window.location.origin)})),t.onDisconnect.addListener((e=>{console.log("trezor-connect disconnect called"),t=null})),window.addEventListener("message",(e=>{t&&e.source===window&&e.data&&t.postMessage({data:e.data})}))}}},{package:"$root$",file:"app/vendor/trezor/content-script.js"}]],[296],{}); \ No newline at end of file diff --git a/public/extensions/MetaMask_v10.22.2/manifest.json b/public/extensions/MetaMask_v10.22.2/manifest.json index 6f6148360..f0b682005 100644 --- a/public/extensions/MetaMask_v10.22.2/manifest.json +++ b/public/extensions/MetaMask_v10.22.2/manifest.json @@ -66,7 +66,7 @@ } ], "default_locale": "en", - "description": "other build from git id: ccf166e1", + "description": "other build from git id: 51569f20", "host_permissions": [ "http://localhost:8545/", "file://*/*", diff --git a/public/extensions/MetaMask_v10.22.2/scripts/contentscript.js b/public/extensions/MetaMask_v10.22.2/scripts/contentscript.js index 2c9d97acf..078465b77 100644 --- a/public/extensions/MetaMask_v10.22.2/scripts/contentscript.js +++ b/public/extensions/MetaMask_v10.22.2/scripts/contentscript.js @@ -1,4 +1,4 @@ -!function e(t,n,r){function i(o,a){if(!n[o]){if(!t[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(s)return s(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[o]={exports:{}};t[o][0].call(l.exports,(function(e){return i(t[o][1][e]||e)}),l,l.exports,e,t,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;onew URL(e).origin))},{}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PHISHING_WARNING_PAGE=n.PHISHING_STREAM=n.PHISHING_SAFELIST=n.METAMASK_PROVIDER=n.METAMASK_INPAGE=n.METAMASK_COOKIE_HANDLER=n.LEGACY_PUBLIC_CONFIG=n.LEGACY_PROVIDER=n.LEGACY_INPAGE=n.LEGACY_CONTENT_SCRIPT=n.CONTENT_SCRIPT=void 0;n.CONTENT_SCRIPT="metamask-contentscript",n.METAMASK_INPAGE="metamask-inpage",n.PHISHING_WARNING_PAGE="metamask-phishing-warning-page",n.METAMASK_COOKIE_HANDLER="metamask-cookie-handler",n.METAMASK_PROVIDER="metamask-provider",n.PHISHING_SAFELIST="metamask-phishing-safelist",n.PHISHING_STREAM="phishing",n.LEGACY_CONTENT_SCRIPT="contentscript",n.LEGACY_INPAGE="inpage",n.LEGACY_PROVIDER="provider",n.LEGACY_PUBLIC_CONFIG="publicConfig"},{}],3:[function(e,t,n){"use strict";var r,i=e("../../shared/modules/browser-runtime.utils"),s=(r=e("../../shared/modules/provider-injection"))&&r.__esModule?r:{default:r},o=e("./streams/provider-stream"),a=e("./streams/phishing-stream"),c=e("./streams/cookie-handler-stream");a.isDetectedPhishingSite?(0,a.initPhishingStreams)():(c.isDetectedCookieMarketingSite&&(0,c.initializeCookieHandlerSteam)(),(0,s.default)()&&((0,o.initStreams)(),document.prerendering&&(0,i.getIsBrowserPrerenderBroken)()&&document.addEventListener("prerenderingchange",(()=>{(0,o.onDisconnectDestroyStreams)(new Error("Prerendered page has become active."))})),window.addEventListener("pageshow",(e=>{e.persisted&&(console.warn("BFCached page has become active. Restoring the streams."),(0,o.setupExtensionStreams)())})),window.addEventListener("pagehide",(e=>{e.persisted&&(console.warn("Page may become BFCached. Destroying the streams."),(0,o.destroyStreams)())}))))},{"../../shared/modules/browser-runtime.utils":659,"../../shared/modules/provider-injection":660,"./streams/cookie-handler-stream":4,"./streams/phishing-stream":5,"./streams/provider-stream":6}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setupCookieHandlerExtStreams=n.isDetectedCookieMarketingSite=n.initializeCookieHandlerSteam=void 0;var r=f(e("webextension-polyfill")),i=e("@metamask/post-message-stream"),s=f(e("@metamask/object-multiplex")),o=e("readable-stream"),a=f(e("extension-port-stream")),c=e("../../../shared/constants/app"),u=e("../constants/marketing-site-whitelist"),l=e("../../../shared/modules/browser-runtime.utils"),d=e("../constants/stream"),h=e("./stream-utils");function f(e){return e&&e.__esModule?e:{default:e}}n.isDetectedCookieMarketingSite=u.COOKIE_ID_MARKETING_WHITELIST_ORIGINS.some((e=>e===window.location.origin));let p,m,y,g,b,v;const x=()=>{console.log("app/scripts/streams/cookie-handler-stream.ts setupCookieHandlerExtStreams browser.runtime.connect called at ",Date.now()),y=r.default.runtime.connect({name:d.CONTENT_SCRIPT}),g=new a.default(y),b=new s.default,b.setMaxListeners(25),(0,o.pipeline)(b,g,b,(e=>{(0,h.logStreamDisconnectWarning)("MetaMask Background Multiplex",e),window.postMessage({target:"CookieHandlerPage",data:{name:d.METAMASK_COOKIE_HANDLER,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)})),v=b.createStream(d.METAMASK_COOKIE_HANDLER),b.ignoreStream(d.LEGACY_PUBLIC_CONFIG),b.ignoreStream(d.LEGACY_PROVIDER),b.ignoreStream(d.METAMASK_PROVIDER),b.ignoreStream(d.PHISHING_SAFELIST),b.ignoreStream(d.PHISHING_STREAM),(0,o.pipeline)(m,v,m,(e=>console.debug(`MetaMask: Muxed traffic for channel "${d.METAMASK_COOKIE_HANDLER}" failed.`,e))),y.onDisconnect.addListener(w)};n.setupCookieHandlerExtStreams=x;const w=()=>{console.log("onDisconnectDestroyCookieStreams called");const e=(0,l.checkForLastError)();y.onDisconnect.removeListener(w),m.removeAllListeners(),b.removeAllListeners(),b.destroy(),v.removeAllListeners(),v.destroy(),g=null,e&&(console.warn(`${e} Resetting the phishing streams.`),setTimeout(x,1e3))},S=e=>{if(e.name===c.EXTENSION_MESSAGES.READY)return g||x(),Promise.resolve(`MetaMask: handled "${c.EXTENSION_MESSAGES.READY}" for phishing streams`)};n.initializeCookieHandlerSteam=()=>{const{origin:e}=window.location;!function(e){const t=new i.WindowPostMessageStream({name:d.CONTENT_SCRIPT,target:"CookieHandlerPage",targetWindow:window,targetOrigin:e});p=new s.default,p.setMaxListeners(25),(0,o.pipeline)(p,t,p,(e=>(0,h.logStreamDisconnectWarning)("MetaMask Inpage Multiplex",e))),m=p.createStream(d.METAMASK_COOKIE_HANDLER),p.ignoreStream(d.LEGACY_PUBLIC_CONFIG),p.ignoreStream(d.LEGACY_PROVIDER),p.ignoreStream(d.METAMASK_PROVIDER),p.ignoreStream(d.PHISHING_SAFELIST),p.ignoreStream(d.PHISHING_STREAM)}(e),x(),r.default.runtime.onMessage.addListener(S)}},{"../../../shared/constants/app":656,"../../../shared/modules/browser-runtime.utils":659,"../constants/marketing-site-whitelist":1,"../constants/stream":2,"./stream-utils":7,"@metamask/object-multiplex":86,"@metamask/post-message-stream":102,"extension-port-stream":479,"readable-stream":588,"webextension-polyfill":652}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.connectPhishingChannelToWarningSystem=function(e){x=e.createStream(l.PHISHING_STREAM),e.ignoreStream(l.METAMASK_COOKIE_HANDLER),e.ignoreStream(l.LEGACY_PROVIDER),e.ignoreStream(l.PHISHING_SAFELIST),x.once("data",_)},n.isDetectedPhishingSite=n.initPhishingStreams=void 0,n.redirectToPhishingWarning=_,n.setupPhishingExtStreams=void 0;var r=e("@metamask/post-message-stream"),i=h(e("@metamask/object-multiplex")),s=e("readable-stream"),o=h(e("webextension-polyfill")),a=h(e("extension-port-stream")),c=e("../../../shared/modules/browser-runtime.utils"),u=e("../../../shared/constants/app"),l=e("../constants/stream"),d=e("./stream-utils");function h(e){return e&&e.__esModule?e:{default:e}}const f=new URL("https://metamask.github.io/phishing-warning/v4.1.0/");let p,m,y,g,b,v,x;const w=()=>{console.log("app/scripts/streams/phishing-stream.ts setupPhishingExtStreams browser.runtime.connect called at ",Date.now()),y=o.default.runtime.connect({name:l.CONTENT_SCRIPT}),g=new a.default(y),m=new i.default,m.setMaxListeners(25),(0,s.pipeline)(m,g,m,(e=>{(0,d.logStreamDisconnectWarning)("MetaMask Background Multiplex",e),window.postMessage({target:l.PHISHING_WARNING_PAGE,data:{name:l.PHISHING_SAFELIST,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)})),p=m.createStream(l.PHISHING_SAFELIST),(0,s.pipeline)(b,p,b,(e=>console.debug(`MetaMask: Muxed traffic for channel "${l.PHISHING_SAFELIST}" failed.`,e))),m.ignoreStream(l.METAMASK_COOKIE_HANDLER),m.ignoreStream(l.LEGACY_PUBLIC_CONFIG),m.ignoreStream(l.LEGACY_PROVIDER),m.ignoreStream(l.METAMASK_PROVIDER),m.ignoreStream(l.PHISHING_STREAM),y.onDisconnect.addListener(S)};n.setupPhishingExtStreams=w;const S=()=>{console.log("onDisconnectDestroyPhishingStreams called");const e=(0,c.checkForLastError)();y.onDisconnect.removeListener(S),b.removeAllListeners(),m.removeAllListeners(),m.destroy(),p.removeAllListeners(),p.destroy(),g=null,e&&(console.warn(`${e} Resetting the phishing streams.`),setTimeout(w,1e3))},E=e=>{if(e.name===u.EXTENSION_MESSAGES.READY)return g||w(),Promise.resolve(`MetaMask: handled "${u.EXTENSION_MESSAGES.READY}" for phishing streams`)};n.isDetectedPhishingSite=window.location.origin===f.origin&&window.location.pathname===f.pathname;function _(){console.debug("MetaMask: Routing to Phishing Warning page.");const{hostname:e,href:t}=window.location,n=new URLSearchParams({hostname:e,href:t});for(window.location.href=`https://metamask.github.io/phishing-warning/v4.1.0/#${n}`;;)console.log("MetaMask: Locking js execution, redirection will complete shortly")}n.initPhishingStreams=()=>{!function(){const e=new r.WindowPostMessageStream({name:l.CONTENT_SCRIPT,target:l.PHISHING_WARNING_PAGE});v=new i.default,v.setMaxListeners(25),(0,s.pipeline)(v,e,v,(e=>(0,d.logStreamDisconnectWarning)("MetaMask Inpage Multiplex",e))),b=v.createStream(l.PHISHING_SAFELIST),v.ignoreStream(l.METAMASK_COOKIE_HANDLER),v.ignoreStream(l.LEGACY_PUBLIC_CONFIG),v.ignoreStream(l.LEGACY_PROVIDER),v.ignoreStream(l.METAMASK_PROVIDER),v.ignoreStream(l.PHISHING_STREAM)}(),w(),o.default.runtime.onMessage.addListener(E)}},{"../../../shared/constants/app":656,"../../../shared/modules/browser-runtime.utils":659,"../constants/stream":2,"./stream-utils":7,"@metamask/object-multiplex":86,"@metamask/post-message-stream":102,"extension-port-stream":479,"readable-stream":588,"webextension-polyfill":652}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.destroyStreams=I,n.initStreams=void 0,n.onDisconnectDestroyStreams=R,n.setupExtensionStreams=void 0;var r=f(e("@metamask/object-multiplex")),i=e("@metamask/post-message-stream"),s=f(e("extension-port-stream")),o=e("readable-stream"),a=f(e("webextension-polyfill")),c=e("../constants/stream"),u=e("../../../shared/constants/app"),l=e("../../../shared/modules/browser-runtime.utils"),d=e("./stream-utils"),h=e("./phishing-stream");function f(e){return e&&e.__esModule?e:{default:e}}let p,m,y,g,b,v,x,w,S,E,_,A,T;let k=!1;const C=()=>{k=!0,console.log("app/scripts/streams/provider-stream.ts setupExtensionStreams browser.runtime.connect called at ",Date.now()),E=a.default.runtime.connect({name:c.CONTENT_SCRIPT}),_=new s.default(E),_.on("data",N),w=new r.default,w.setMaxListeners(25),w.ignoreStream(c.LEGACY_PUBLIC_CONFIG),(0,o.pipeline)(w,_,w,(e=>{(0,d.logStreamDisconnectWarning)("MetaMask Background Multiplex",e),B()})),S=w.createStream(c.METAMASK_PROVIDER),(0,o.pipeline)(T,S,T,(e=>console.debug(`MetaMask: Muxed traffic for channel "${c.METAMASK_PROVIDER}" failed.`,e))),(0,h.connectPhishingChannelToWarningSystem)(w),E.onDisconnect.addListener(R)};n.setupExtensionStreams=C;const O=()=>{T.removeAllListeners(),w.removeAllListeners(),w.destroy(),S.removeAllListeners(),S.destroy(),_=null},P=()=>{p=new r.default,p.setMaxListeners(25),x=new o.Transform({highWaterMark:16,objectMode:!0,transform:(e,t,n)=>{var r;(null==e?void 0:e.name)===c.METAMASK_PROVIDER&&"metamask_accountsChanged"===(null===(r=e.data)||void 0===r?void 0:r.method)&&(e.data.method="wallet_accountsChanged",e.data.result=e.data.params,delete e.data.params),n(null,e)}}),(0,o.pipeline)(p,_,x,p,(e=>{(0,d.logStreamDisconnectWarning)("MetaMask Background Legacy Multiplex",e),B()})),m=p.createStream(c.METAMASK_PROVIDER),(0,o.pipeline)(b,m,b,(e=>console.debug(`MetaMask: Muxed traffic between channels "${c.LEGACY_PROVIDER}" and "${c.METAMASK_PROVIDER}" failed.`,e))),y=p.createStream(c.LEGACY_PUBLIC_CONFIG),(0,o.pipeline)(v,y,v,(e=>console.debug(`MetaMask: Muxed traffic for channel "${c.LEGACY_PUBLIC_CONFIG}" failed.`,e))),p.ignoreStream(c.METAMASK_COOKIE_HANDLER),p.ignoreStream(c.LEGACY_PROVIDER),p.ignoreStream(c.PHISHING_SAFELIST),p.ignoreStream(c.PHISHING_STREAM)},j=()=>{b.removeAllListeners(),v.removeAllListeners(),p.removeAllListeners(),p.destroy(),m.removeAllListeners(),m.destroy(),y.removeAllListeners(),y.destroy()},M=e=>{if(e.name===u.EXTENSION_MESSAGES.READY)return _||(C(),P()),Promise.resolve(`MetaMask: handled ${u.EXTENSION_MESSAGES.READY}`)};function I(){E&&(E.onDisconnect.removeListener(R),O(),j(),E.disconnect(),E=null,k=!1)}function R(e){console.log("onDisconnectDestroyStreams called");const t=e||(0,l.checkForLastError)();I(),t&&(console.warn(`${t} Resetting the streams.`),setTimeout(C,1e3))}function N(e){k&&"metamask_chainChanged"===e.data.method&&(k=!1,window.postMessage({target:c.METAMASK_INPAGE,data:{name:c.METAMASK_PROVIDER,data:{jsonrpc:"2.0",method:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}}},window.location.origin))}function B(){window.postMessage({target:c.METAMASK_INPAGE,data:{name:c.METAMASK_PROVIDER,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)}n.initStreams=()=>{(()=>{const e=new i.WindowPostMessageStream({name:c.CONTENT_SCRIPT,target:c.METAMASK_INPAGE});A=new r.default,A.setMaxListeners(25),(0,o.pipeline)(A,e,A,(e=>(0,d.logStreamDisconnectWarning)("MetaMask Inpage Multiplex",e))),T=A.createStream(c.METAMASK_PROVIDER),A.ignoreStream(c.METAMASK_COOKIE_HANDLER),A.ignoreStream(c.LEGACY_PROVIDER),A.ignoreStream(c.LEGACY_PUBLIC_CONFIG),A.ignoreStream(c.PHISHING_SAFELIST),A.ignoreStream(c.PHISHING_STREAM)})(),(()=>{const e=new i.WindowPostMessageStream({name:c.LEGACY_CONTENT_SCRIPT,target:c.LEGACY_INPAGE});g=new r.default,g.setMaxListeners(25),(0,o.pipeline)(g,e,g,(e=>(0,d.logStreamDisconnectWarning)("MetaMask Legacy Inpage Multiplex",e))),b=g.createStream(c.LEGACY_PROVIDER),v=g.createStream(c.LEGACY_PUBLIC_CONFIG),g.ignoreStream(c.METAMASK_COOKIE_HANDLER),g.ignoreStream(c.METAMASK_PROVIDER),g.ignoreStream(c.PHISHING_SAFELIST),g.ignoreStream(c.PHISHING_STREAM)})(),C(),P(),a.default.runtime.onMessage.addListener(M)}},{"../../../shared/constants/app":656,"../../../shared/modules/browser-runtime.utils":659,"../constants/stream":2,"./phishing-stream":5,"./stream-utils":7,"@metamask/object-multiplex":86,"@metamask/post-message-stream":102,"extension-port-stream":479,"readable-stream":588,"webextension-polyfill":652}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logStreamDisconnectWarning=function(e,t){console.debug(`MetaMask: Content script lost connection to "${e}".`,t)}},{}],8:[function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){const t=[];let n=0;for(let i=0;ie.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function s(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return d(l(e))}function o(e,t){if(e<56)return Uint8Array.from([e+t]);const n=m(e),r=m(t+55+n.length/2);return Uint8Array.from(h(r+n))}function a(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);const n=c(g(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function c(e){let t,n,r,o,a;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,r=128===l?Uint8Array.from([]):i(e,1,t),2===t&&r[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:r,remainder:e.slice(t)}}if(l<=191){if(n=l-182,e.length-1e.length)throw new Error("invalid RLP: total length is larger than the data");for(o=i(e,n,r);o.length;)a=c(o),u.push(a.data),o=a.remainder;return{data:u,remainder:e.slice(r)}}}Object.defineProperty(n,"__esModule",{value:!0}),n.RLP=n.utils=n.decode=n.encode=void 0,n.encode=r,n.decode=a;const u=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function l(e){let t="";for(let n=0;ne+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t=2&&"0"===e[0]&&"x"===e[1]}function g(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return y(e)?h((t="string"!=typeof(n=e)?n:y(n)?n.slice(2):n).length%2?`0${t}`:t):p(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?h(m(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}n.utils={bytesToHex:l,concatBytes:f,hexToBytes:h,utf8ToBytes:p},n.RLP={encode:r,decode:a}},{}],9:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.accountBodyToRLP=n.accountBodyToSlim=n.accountBodyFromSlim=n.isZeroAddress=n.zeroAddress=n.importPublic=n.privateToAddress=n.privateToPublic=n.publicToAddress=n.pubToAddress=n.isValidPublic=n.isValidPrivate=n.generateAddress2=n.generateAddress=n.isValidChecksumAddress=n.toChecksumAddress=n.isValidAddress=n.Account=void 0;const r=e("@ethereumjs/rlp"),i=e("ethereum-cryptography/keccak"),s=e("ethereum-cryptography/secp256k1"),o=e("ethereum-cryptography/utils"),a=e("./bytes"),c=e("./constants"),u=e("./helpers"),l=e("./internal"),d=BigInt(0);class h{constructor(e=d,t=d,n=c.KECCAK256_RLP,r=c.KECCAK256_NULL){this.nonce=e,this.balance=t,this.storageRoot=n,this.codeHash=r,this._validate()}static fromAccountData(e){const{nonce:t,balance:n,storageRoot:r,codeHash:i}=e;return new h(void 0!==t?(0,a.bufferToBigInt)((0,a.toBuffer)(t)):void 0,void 0!==n?(0,a.bufferToBigInt)((0,a.toBuffer)(n)):void 0,void 0!==r?(0,a.toBuffer)(r):void 0,void 0!==i?(0,a.toBuffer)(i):void 0)}static fromRlpSerializedAccount(e){const t=(0,a.arrToBufArr)(r.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,n,r,i]=e;return new h((0,a.bufferToBigInt)(t),(0,a.bufferToBigInt)(n),r,i)}_validate(){if(this.nonce=8?h+=r[e].toUpperCase():h+=r[e];return h};n.isValidChecksumAddress=function(e,t){return(0,n.isValidAddress)(e)&&(0,n.toChecksumAddress)(e,t)===e};n.generateAddress=function(e,n){return(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(n),(0,a.bufferToBigInt)(n)===BigInt(0)?t.from((0,i.keccak256)(r.RLP.encode((0,a.bufArrToArr)([e,null])))).slice(-20):t.from((0,i.keccak256)(r.RLP.encode((0,a.bufArrToArr)([e,n])))).slice(-20)};n.generateAddress2=function(e,n,r){if((0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(n),(0,u.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==n.length)throw new Error("Expected salt to be of length 32");const s=(0,i.keccak256)(t.concat([t.from("ff","hex"),e,n,(0,i.keccak256)(r)]));return(0,a.toBuffer)(s).slice(-20)};n.isValidPrivate=function(e){return s.secp256k1.utils.isValidPrivateKey(e)};n.isValidPublic=function(e,n=!1){if((0,u.assertIsBuffer)(e),64===e.length)try{return s.secp256k1.ProjectivePoint.fromHex(t.concat([t.from([4]),e])),!0}catch(e){return!1}if(!n)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}};n.pubToAddress=function(e,n=!1){if((0,u.assertIsBuffer)(e),n&&64!==e.length&&(e=t.from(s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return t.from((0,i.keccak256)(e)).slice(-20)},n.publicToAddress=n.pubToAddress;n.privateToPublic=function(e){return(0,u.assertIsBuffer)(e),t.from(s.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))};n.privateToAddress=function(e){return(0,n.publicToAddress)((0,n.privateToPublic)(e))};n.importPublic=function(e){return(0,u.assertIsBuffer)(e),64!==e.length&&(e=t.from(s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e};n.zeroAddress=function(){const e=(0,a.zeros)(20);return(0,a.bufferToHex)(e)};function f(e){const[t,n,r,i]=e;return[t,n,0===(0,a.arrToBufArr)(r).length?c.KECCAK256_RLP:r,0===(0,a.arrToBufArr)(i).length?c.KECCAK256_NULL:i]}n.isZeroAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return(0,n.zeroAddress)()===e},n.accountBodyFromSlim=f;const p=new Uint8Array(0);n.accountBodyToSlim=function(e){const[t,n,r,i]=e;return[t,n,(0,a.arrToBufArr)(r).equals(c.KECCAK256_RLP)?p:r,(0,a.arrToBufArr)(i).equals(c.KECCAK256_NULL)?p:i]},n.accountBodyToRLP=function(e,t=!0){const n=t?f(e):e;return(0,a.arrToBufArr)(r.RLP.encode(n))}}).call(this)}).call(this,e("buffer").Buffer)},{"./bytes":12,"./constants":13,"./helpers":15,"./internal":17,"@ethereumjs/rlp":8,buffer:445,"ethereum-cryptography/keccak":475,"ethereum-cryptography/secp256k1":476,"ethereum-cryptography/utils":477}],10:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Address=void 0;const r=e("./account"),i=e("./bytes");class s{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.buf=e}static zero(){return new s((0,i.zeros)(20))}static fromString(e){if(!(0,r.isValidAddress)(e))throw new Error("Invalid address");return new s((0,i.toBuffer)(e))}static fromPublicKey(e){if(!t.isBuffer(e))throw new Error("Public key should be Buffer");const n=(0,r.pubToAddress)(e);return new s(n)}static fromPrivateKey(e){if(!t.isBuffer(e))throw new Error("Private key should be Buffer");const n=(0,r.privateToAddress)(e);return new s(n)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new s((0,r.generateAddress)(e.buf,(0,i.bigIntToBuffer)(t)))}static generate2(e,n,i){if(!t.isBuffer(n))throw new Error("Expected salt to be a Buffer");if(!t.isBuffer(i))throw new Error("Expected initCode to be a Buffer");return new s((0,r.generateAddress2)(e.buf,n,i))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const e=(0,i.bufferToBigInt)(this.buf),t=BigInt(0),n=BigInt("0xffff");return e>=t&&e<=n}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return t.from(this.buf)}}n.Address=s}).call(this)}).call(this,e("buffer").Buffer)},{"./account":9,"./bytes":12,buffer:445}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AsyncEventEmitter=void 0;const r=e("events");class i extends r.EventEmitter{emit(e,...t){let[n,r]=t;const i=this;let s=i._events[e]??[];return void 0===r&&"function"==typeof n&&(r=n,n=void 0),"newListener"!==e&&"removeListener"!==e||(n={event:n,fn:r},r=void 0),s=Array.isArray(s)?s:[s],async function(e,t,n){let r;for await(const i of t)try{i.length<2?i.call(e,n):await new Promise(((t,r)=>{i.call(e,n,(e=>{e?r(e):t()}))}))}catch(e){r=e}if(r)throw r}(i,s.slice(),n).then(r).catch(r),i.listenerCount(e)>0}once(e,t){const n=this;let r;if("function"!=typeof t)throw new TypeError("listener must be a function");return r=t.length>=2?function(i,s){n.removeListener(e,r),t(i,s)}:function(i){n.removeListener(e,r),t(i,r)},n.on(e,r),n}first(e,t){let n=this._events[e]??[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(n)||(this._events[e]=n=[n]),n.unshift(t),this}before(e,t,n){return this.beforeOrAfter(e,t,n)}after(e,t,n){return this.beforeOrAfter(e,t,n,"after")}beforeOrAfter(e,t,n,r){let i,s,o=this._events[e]??[];const a="after"===r?1:0;if("function"!=typeof n)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(o)||(this._events[e]=o=[o]),s=o.length,i=o.length;i--;)if(o[i]===t){s=i+a;break}return o.splice(s,0,n),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}n.AsyncEventEmitter=i},{events:478}],12:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.intToUnpaddedBuffer=n.bigIntToUnpaddedBuffer=n.bigIntToHex=n.bufArrToArr=n.arrToBufArr=n.validateNoLeadingZeroes=n.baToJSON=n.toUtf8=n.short=n.addHexPrefix=n.toUnsigned=n.fromSigned=n.bufferToInt=n.bigIntToBuffer=n.bufferToBigInt=n.bufferToHex=n.toBuffer=n.unpadHexString=n.unpadArray=n.unpadBuffer=n.setLengthRight=n.setLengthLeft=n.zeros=n.intToBuffer=n.intToHex=void 0;const r=e("./helpers"),i=e("./internal");n.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`};n.intToBuffer=function(e){const r=(0,n.intToHex)(e);return t.from((0,i.padToEven)(r.slice(2)),"hex")};n.zeros=function(e){return t.allocUnsafe(e).fill(0)};const s=function(e,t,r){const i=(0,n.zeros)(t);return r?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};n.unpadBuffer=function(e){return(0,r.assertIsBuffer)(e),o(e)};n.unpadArray=function(e){return(0,r.assertIsArray)(e),o(e)};n.unpadHexString=function(e){return(0,r.assertIsHexString)(e),e=(0,i.stripHexPrefix)(e),"0x"+o(e)};n.toBuffer=function(e){if(null==e)return t.allocUnsafe(0);if(t.isBuffer(e))return t.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return t.from(e);if("string"==typeof e){if(!(0,i.isHexString)(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return t.from((0,i.padToEven)((0,i.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,n.intToBuffer)(e);if("bigint"==typeof e){if(e0&&0===n[0])throw new Error(`${t} cannot have leading zeroes, received: ${n.toString("hex")}`)},n.arrToBufArr=function e(n){return Array.isArray(n)?n.map((t=>e(t))):t.from(n)},n.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(t??[])};n.bigIntToHex=e=>"0x"+e.toString(16),n.bigIntToUnpaddedBuffer=function(e){return(0,n.unpadBuffer)(c(e))},n.intToUnpaddedBuffer=function(e){return(0,n.unpadBuffer)((0,n.intToBuffer)(e))}}).call(this)}).call(this,e("buffer").Buffer)},{"./helpers":15,"./internal":17,buffer:445}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MAX_WITHDRAWALS_PER_PAYLOAD=n.RLP_EMPTY_STRING=n.KECCAK256_RLP=n.KECCAK256_RLP_S=n.KECCAK256_RLP_ARRAY=n.KECCAK256_RLP_ARRAY_S=n.KECCAK256_NULL=n.KECCAK256_NULL_S=n.TWO_POW256=n.SECP256K1_ORDER_DIV_2=n.SECP256K1_ORDER=n.MAX_INTEGER_BIGINT=n.MAX_INTEGER=n.MAX_UINT64=void 0;const r=e("buffer"),i=e("ethereum-cryptography/secp256k1");n.MAX_UINT64=BigInt("0xffffffffffffffff"),n.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),n.SECP256K1_ORDER=i.secp256k1.CURVE.n,n.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),n.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),n.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",n.KECCAK256_NULL=r.Buffer.from(n.KECCAK256_NULL_S,"hex"),n.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",n.KECCAK256_RLP_ARRAY=r.Buffer.from(n.KECCAK256_RLP_ARRAY_S,"hex"),n.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",n.KECCAK256_RLP=r.Buffer.from(n.KECCAK256_RLP_S,"hex"),n.RLP_EMPTY_STRING=r.Buffer.from([128]),n.MAX_WITHDRAWALS_PER_PAYLOAD=16},{buffer:445,"ethereum-cryptography/secp256k1":476}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compactBytesToNibbles=n.bytesToNibbles=n.nibblesToCompactBytes=n.nibblesToBytes=n.hasTerminator=void 0;n.hasTerminator=e=>e.length>0&&16===e[e.length-1];n.nibblesToBytes=(e,t)=>{for(let n=0,r=0;r{let t=0;(0,n.hasTerminator)(e)&&(t=1,e=e.subarray(0,e.length-1));const r=new Uint8Array(e.length/2+1);return r[0]=t<<5,1&~e.length||(r[0]|=16,r[0]|=e[0],e=e.subarray(1)),(0,n.nibblesToBytes)(e,r.subarray(1)),r};n.bytesToNibbles=e=>{const t=2*e.length+1,n=new Uint8Array(t);for(let t=0;t{if(0===e.length)return e;let t=(0,n.bytesToNibbles)(e);t[0]<2&&(t=t.subarray(0,t.length-1));const r=2-(1&t[0]);return t.subarray(r)}},{}],15:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsString=n.assertIsArray=n.assertIsBuffer=n.assertIsHexString=void 0;const r=e("./internal");n.assertIsHexString=function(e){if(!(0,r.isHexString)(e)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)}};n.assertIsBuffer=function(e){if(!t.isBuffer(e)){throw new Error(`This method only supports Buffer but input was: ${e}`)}};n.assertIsArray=function(e){if(!Array.isArray(e)){throw new Error(`This method only supports number arrays but input was: ${e}`)}};n.assertIsString=function(e){if("string"!=typeof e){throw new Error(`This method only supports strings but input was: ${e}`)}}}).call(this)}).call(this,{isBuffer:e("../../../is-buffer/index.js")})},{"../../../is-buffer/index.js":538,"./internal":17}],16:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.toAscii=n.stripHexPrefix=n.padToEven=n.isHexString=n.isHexPrefixed=n.getKeys=n.getBinarySize=n.fromUtf8=n.fromAscii=n.arrayContainsArray=void 0,i(e("./constants"),n),i(e("./units"),n),i(e("./account"),n),i(e("./address"),n),i(e("./withdrawal"),n),i(e("./signature"),n),i(e("./bytes"),n),i(e("./types"),n),i(e("./encoding"),n),i(e("./asyncEventEmitter"),n);var s=e("./internal");Object.defineProperty(n,"arrayContainsArray",{enumerable:!0,get:function(){return s.arrayContainsArray}}),Object.defineProperty(n,"fromAscii",{enumerable:!0,get:function(){return s.fromAscii}}),Object.defineProperty(n,"fromUtf8",{enumerable:!0,get:function(){return s.fromUtf8}}),Object.defineProperty(n,"getBinarySize",{enumerable:!0,get:function(){return s.getBinarySize}}),Object.defineProperty(n,"getKeys",{enumerable:!0,get:function(){return s.getKeys}}),Object.defineProperty(n,"isHexPrefixed",{enumerable:!0,get:function(){return s.isHexPrefixed}}),Object.defineProperty(n,"isHexString",{enumerable:!0,get:function(){return s.isHexString}}),Object.defineProperty(n,"padToEven",{enumerable:!0,get:function(){return s.padToEven}}),Object.defineProperty(n,"stripHexPrefix",{enumerable:!0,get:function(){return s.stripHexPrefix}}),Object.defineProperty(n,"toAscii",{enumerable:!0,get:function(){return s.toAscii}}),i(e("./lock"),n),i(e("./provider"),n)},{"./account":9,"./address":10,"./asyncEventEmitter":11,"./bytes":12,"./constants":13,"./encoding":14,"./internal":17,"./lock":18,"./provider":19,"./signature":20,"./types":21,"./units":22,"./withdrawal":23}],17:[function(e,t,n){(function(e){(function(){"use strict";function t(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}Object.defineProperty(n,"__esModule",{value:!0}),n.isHexString=n.getKeys=n.fromAscii=n.fromUtf8=n.toAscii=n.arrayContainsArray=n.getBinarySize=n.padToEven=n.stripHexPrefix=n.isHexPrefixed=void 0,n.isHexPrefixed=t;function r(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}n.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return t(e)?e.slice(2):e},n.padToEven=r,n.getBinarySize=function(t){if("string"!=typeof t)throw new Error("[getBinarySize] method requires input type 'string', received "+typeof t);return e.byteLength(t,"utf8")},n.arrayContainsArray=function(e,t,n){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===n?"some":"every"]((t=>e.indexOf(t)>=0))},n.toAscii=function(e){let t="",n=0;const r=e.length;for("0x"===e.substring(0,2)&&(n=2);n0&&e.length!==2+2*t)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:445}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Lock=void 0;n.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((e=>this.promiseResolverQueue.push(e)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}}},{}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getProvider=n.fetchFromProvider=void 0;const r=e("micro-ftch");n.fetchFromProvider=async(e,t)=>(await(0,r.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result;n.getProvider=e=>{if("string"==typeof e)return e;if(void 0!==e?.connection?.url)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},{"micro-ftch":547}],20:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hashPersonalMessage=n.isValidSignature=n.fromRpcSig=n.toCompactSig=n.toRpcSig=n.ecrecover=n.ecsign=void 0;const r=e("ethereum-cryptography/keccak"),i=e("ethereum-cryptography/secp256k1"),s=e("./bytes"),o=e("./constants"),a=e("./helpers");function c(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function u(e){return e===BigInt(0)||e===BigInt(1)}n.ecsign=function(e,n,r){const s=i.secp256k1.sign(e,n),o=s.toCompactRawBytes();return{r:t.from(o.slice(0,32)),s:t.from(o.slice(32,64)),v:void 0===r?BigInt(s.recovery+27):BigInt(s.recovery+35)+BigInt(r)*BigInt(2)}};n.ecrecover=function(e,n,r,o,a){const l=t.concat([(0,s.setLengthLeft)(r,32),(0,s.setLengthLeft)(o,32)],64),d=c(n,a);if(!u(d))throw new Error("Invalid signature v value");const h=i.secp256k1.Signature.fromCompact(l).addRecoveryBit(Number(d)).recoverPublicKey(e);return t.from(h.toRawBytes(!1).slice(1))};n.toRpcSig=function(e,n,r,i){if(!u(c(e,i)))throw new Error("Invalid signature v value");return(0,s.bufferToHex)(t.concat([(0,s.setLengthLeft)(n,32),(0,s.setLengthLeft)(r,32),(0,s.toBuffer)(e)]))};n.toCompactSig=function(e,n,r,i){if(!u(c(e,i)))throw new Error("Invalid signature v value");let o=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(o=t.from(r),o[0]|=128),(0,s.bufferToHex)(t.concat([(0,s.setLengthLeft)(n,32),(0,s.setLengthLeft)(o,32)]))};n.fromRpcSig=function(e){const t=(0,s.toBuffer)(e);let n,r,i;if(t.length>=65)n=t.slice(0,32),r=t.slice(32,64),i=(0,s.bufferToBigInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");n=t.slice(0,32),r=t.slice(32,64),i=BigInt((0,s.bufferToInt)(t.slice(32,33))>>7),r[0]&=127}return i<27&&(i+=BigInt(27)),{v:i,r:n,s:r}};n.isValidSignature=function(e,t,n,r=!0,i){if(32!==t.length||32!==n.length)return!1;if(!u(c(e,i)))return!1;const a=(0,s.bufferToBigInt)(t),l=(0,s.bufferToBigInt)(n);return!(a===BigInt(0)||a>=o.SECP256K1_ORDER||l===BigInt(0)||l>=o.SECP256K1_ORDER)&&!(r&&l>=o.SECP256K1_ORDER_DIV_2)};n.hashPersonalMessage=function(e){(0,a.assertIsBuffer)(e);const n=t.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return t.from((0,r.keccak256)(t.concat([n,e])))}}).call(this)}).call(this,e("buffer").Buffer)},{"./bytes":12,"./constants":13,"./helpers":15,buffer:445,"ethereum-cryptography/keccak":475,"ethereum-cryptography/secp256k1":476}],21:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toType=n.TypeOutput=void 0;const r=e("./bytes"),i=e("./internal");var s;!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(s=n.TypeOutput||(n.TypeOutput={})),n.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,i.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const n=(0,r.toBuffer)(e);switch(t){case s.Buffer:return n;case s.BigInt:return(0,r.bufferToBigInt)(n);case s.Number:{const e=(0,r.bufferToBigInt)(n);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case s.PrefixedHexString:return(0,r.bufferToHex)(n);default:throw new Error("unknown outputType")}}},{"./bytes":12,"./internal":17}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GWEI_TO_WEI=void 0,n.GWEI_TO_WEI=BigInt(1e9)},{}],23:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Withdrawal=void 0;const r=e("./address"),i=e("./bytes"),s=e("./types");class o{constructor(e,t,n,r){this.index=e,this.validatorIndex=t,this.address=n,this.amount=r}static fromWithdrawalData(e){const{index:t,validatorIndex:n,address:i,amount:a}=e,c=(0,s.toType)(t,s.TypeOutput.BigInt),u=(0,s.toType)(n,s.TypeOutput.BigInt),l=new r.Address((0,s.toType)(i,s.TypeOutput.Buffer)),d=(0,s.toType)(a,s.TypeOutput.BigInt);return new o(c,u,l,d)}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);const[t,n,r,i]=e;return o.fromWithdrawalData({index:t,validatorIndex:n,address:r,amount:i})}static toBufferArray(e){const{index:n,validatorIndex:i,address:o,amount:a}=e,c=(0,s.toType)(n,s.TypeOutput.BigInt)===BigInt(0)?t.alloc(0):(0,s.toType)(n,s.TypeOutput.Buffer),u=(0,s.toType)(i,s.TypeOutput.BigInt)===BigInt(0)?t.alloc(0):(0,s.toType)(i,s.TypeOutput.Buffer);let l;l=o instanceof r.Address?o.buf:(0,s.toType)(o,s.TypeOutput.Buffer);return[c,u,l,(0,s.toType)(a,s.TypeOutput.BigInt)===BigInt(0)?t.alloc(0):(0,s.toType)(a,s.TypeOutput.Buffer)]}raw(){return o.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,i.bigIntToHex)(this.index),validatorIndex:(0,i.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,i.bigIntToHex)(this.amount)}}}n.Withdrawal=o}).call(this)}).call(this,e("buffer").Buffer)},{"./address":10,"./bytes":12,"./types":21,buffer:445}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BaseControllerV1=n.isBaseControllerV1=void 0,n.isBaseControllerV1=function(e){return"name"in e&&"string"==typeof e.name&&"config"in e&&"object"==typeof e.config&&"defaultConfig"in e&&"object"==typeof e.defaultConfig&&"state"in e&&"object"==typeof e.state&&"defaultState"in e&&"object"==typeof e.defaultState&&"disabled"in e&&"boolean"==typeof e.disabled&&"subscribe"in e&&"function"==typeof e.subscribe};class r{constructor(e={},t={}){this.defaultConfig={},this.defaultState={},this.disabled=!1,this.name="BaseController",this.internalConfig=this.defaultConfig,this.internalState=this.defaultState,this.internalListeners=[],this.initialState=t,this.initialConfig=e}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}get config(){return this.internalConfig}get state(){return this.internalState}configure(e,t=!1,n=!0){if(n){this.internalConfig=t?e:Object.assign(this.internalConfig,e);for(const e of Object.keys(this.internalConfig)){const t=this.internalConfig[e];void 0!==t&&(this[e]=t)}}else for(const t of Object.keys(e))if(void 0!==this.internalConfig[t]){const n=e[t];this.internalConfig[t]=n,this[t]=n}}notify(){this.disabled||this.internalListeners.forEach((e=>{e(this.internalState)}))}subscribe(e){this.internalListeners.push(e)}unsubscribe(e){const t=this.internalListeners.findIndex((t=>e===t));return t>-1&&this.internalListeners.splice(t,1),t>-1}update(e,t=!1){this.internalState=t?Object.assign({},e):Object.assign({},this.internalState,e),this.notify()}}n.BaseControllerV1=r,n.default=r},{}],25:[function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.getPersistentState=n.getAnonymizedState=n.BaseController=n.isBaseController=void 0;const o=e("immer");(0,o.enablePatches)(),n.isBaseController=function(e){return"name"in e&&"string"==typeof e.name&&"state"in e&&"object"==typeof e.state&&"metadata"in e&&"object"==typeof e.metadata};function a(e,t,n){return Object.keys(e).reduce(((r,i)=>{try{const s=t[i];if(!s)throw new Error(`No metadata found for '${String(i)}'`);const o=s[n],a=e[i];return"function"==typeof o?r[i]=o(a):o&&(r[i]=a),r}catch(e){return setTimeout((()=>{throw e})),r}}),{})}n.BaseController=class{constructor({messenger:e,metadata:t,name:n,state:s}){r.set(this,void 0),this.messagingSystem=e,this.name=n,i(this,r,(0,o.freeze)(s,!0),"f"),this.metadata=t,this.messagingSystem.registerActionHandler(`${n}:getState`,(()=>this.state)),this.messagingSystem.registerInitialEventPayload({eventType:`${n}:stateChange`,getPayload:()=>[this.state,[]]})}get state(){return s(this,r,"f")}set state(e){throw new Error("Controller state cannot be directly mutated; use 'update' method instead.")}update(e){const[t,n,a]=o.produceWithPatches(s(this,r,"f"),e);return i(this,r,t,"f"),this.messagingSystem.publish(`${this.name}:stateChange`,t,n),{nextState:t,patches:n,inversePatches:a}}applyPatches(e){const t=(0,o.applyPatches)(s(this,r,"f"),e);i(this,r,t,"f"),this.messagingSystem.publish(`${this.name}:stateChange`,t,e)}destroy(){this.messagingSystem.clearEventSubscriptions(`${this.name}:stateChange`)}},r=new WeakMap,n.getAnonymizedState=function(e,t){return a(e,t,"anonymous")},n.getPersistentState=function(e,t){return a(e,t,"persist")}},{immer:535}],26:[function(e,t,n){"use strict";var r,i,s,o,a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.ControllerMessenger=void 0;const c=e("./RestrictedControllerMessenger.cjs");n.ControllerMessenger=class{constructor(){r.set(this,new Map),i.set(this,new Map),s.set(this,new Map),o.set(this,new Map)}registerActionHandler(e,t){if(a(this,r,"f").has(e))throw new Error(`A handler for ${e} has already been registered`);a(this,r,"f").set(e,t)}unregisterActionHandler(e){a(this,r,"f").delete(e)}clearActions(){a(this,r,"f").clear()}call(e,...t){const n=a(this,r,"f").get(e);if(!n)throw new Error(`A handler for ${e} has not been registered`);return n(...t)}registerInitialEventPayload({eventType:e,getPayload:t}){a(this,s,"f").set(e,t)}publish(e,...t){const n=a(this,i,"f").get(e);if(n)for(const[e,r]of n.entries())try{if(r){const n=a(this,o,"f").get(e),i=r(...t);i!==n&&(a(this,o,"f").set(e,i),e(i,n))}else e(...t)}catch(e){setTimeout((()=>{throw e}))}}subscribe(e,t,n){let r=a(this,i,"f").get(e);if(r||(r=new Map,a(this,i,"f").set(e,r)),r.set(t,n),n){const r=a(this,s,"f").get(e);if(r){const e=n(...r());a(this,o,"f").set(t,e)}}}unsubscribe(e,t){const n=a(this,i,"f").get(e);if(!n||!n.has(t))throw new Error(`Subscription not found for event: ${e}`);n.get(t)&&a(this,o,"f").delete(t),n.delete(t)}clearEventSubscriptions(e){a(this,i,"f").delete(e)}clearSubscriptions(){a(this,i,"f").clear()}getRestricted({name:e,allowedActions:t,allowedEvents:n}){return new c.RestrictedControllerMessenger({controllerMessenger:this,name:e,allowedActions:t,allowedEvents:n})}},r=new WeakMap,i=new WeakMap,s=new WeakMap,o=new WeakMap},{"./RestrictedControllerMessenger.cjs":27}],27:[function(e,t,n){"use strict";var r,i,s,o,a,c,u,l,d=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},h=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.RestrictedControllerMessenger=void 0;n.RestrictedControllerMessenger=class{constructor({controllerMessenger:e,name:t,allowedActions:n,allowedEvents:c}){r.add(this),i.set(this,void 0),s.set(this,void 0),o.set(this,void 0),a.set(this,void 0),d(this,i,e,"f"),d(this,s,t,"f"),d(this,o,n,"f"),d(this,a,c,"f")}registerActionHandler(e,t){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed registering action handlers prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").registerActionHandler(e,t)}unregisterActionHandler(e){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed unregistering action handlers prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").unregisterActionHandler(e)}call(e,...t){if(!h(this,r,"m",u).call(this,e))throw new Error(`Action missing from allow list: ${e}`);return h(this,i,"f").call(e,...t)}registerInitialEventPayload({eventType:e,getPayload:t}){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").registerInitialEventPayload({eventType:e,getPayload:t})}publish(e,...t){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").publish(e,...t)}subscribe(e,t,n){if(!h(this,r,"m",c).call(this,e))throw new Error(`Event missing from allow list: ${e}`);return n?h(this,i,"f").subscribe(e,t,n):h(this,i,"f").subscribe(e,t)}unsubscribe(e,t){if(!h(this,r,"m",c).call(this,e))throw new Error(`Event missing from allow list: ${e}`);h(this,i,"f").unsubscribe(e,t)}clearEventSubscriptions(e){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed clearing events prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").clearEventSubscriptions(e)}},i=new WeakMap,s=new WeakMap,o=new WeakMap,a=new WeakMap,r=new WeakSet,c=function(e){const t=h(this,a,"f");return h(this,r,"m",l).call(this,e)||null!==t&&t.includes(e)},u=function(e){const t=h(this,o,"f");return h(this,r,"m",l).call(this,e)||null!==t&&t.includes(e)},l=function(e){return e.startsWith(`${h(this,s,"f")}:`)}},{}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RestrictedControllerMessenger=n.ControllerMessenger=n.isBaseController=n.getPersistentState=n.getAnonymizedState=n.BaseController=n.isBaseControllerV1=n.BaseControllerV1=void 0;var r=e("./BaseControllerV1.cjs");Object.defineProperty(n,"BaseControllerV1",{enumerable:!0,get:function(){return r.BaseControllerV1}}),Object.defineProperty(n,"isBaseControllerV1",{enumerable:!0,get:function(){return r.isBaseControllerV1}});var i=e("./BaseControllerV2.cjs");Object.defineProperty(n,"BaseController",{enumerable:!0,get:function(){return i.BaseController}}),Object.defineProperty(n,"getAnonymizedState",{enumerable:!0,get:function(){return i.getAnonymizedState}}),Object.defineProperty(n,"getPersistentState",{enumerable:!0,get:function(){return i.getPersistentState}}),Object.defineProperty(n,"isBaseController",{enumerable:!0,get:function(){return i.isBaseController}});var s=e("./ControllerMessenger.cjs");Object.defineProperty(n,"ControllerMessenger",{enumerable:!0,get:function(){return s.ControllerMessenger}});var o=e("./RestrictedControllerMessenger.cjs");Object.defineProperty(n,"RestrictedControllerMessenger",{enumerable:!0,get:function(){return o.RestrictedControllerMessenger}})},{"./BaseControllerV1.cjs":24,"./BaseControllerV2.cjs":25,"./ControllerMessenger.cjs":26,"./RestrictedControllerMessenger.cjs":27}],29:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP=n.ApprovalType=n.ORIGIN_METAMASK=n.NFT_API_TIMEOUT=n.NFT_API_VERSION=n.NFT_API_BASE_URL=n.OPENSEA_PROXY_URL=n.BUILT_IN_NETWORKS=n.TESTNET_TICKER_SYMBOLS=n.ASSET_TYPES=n.GWEI=n.ERC1155_TOKEN_RECEIVER_INTERFACE_ID=n.ERC1155_METADATA_URI_INTERFACE_ID=n.ERC1155_INTERFACE_ID=n.ERC721_ENUMERABLE_INTERFACE_ID=n.ERC721_METADATA_INTERFACE_ID=n.ERC721_INTERFACE_ID=n.ERC20=n.ERC1155=n.ERC721=n.MAX_SAFE_CHAIN_ID=n.GANACHE_CHAIN_ID=n.IPFS_DEFAULT_GATEWAY_URL=n.FALL_BACK_VS_CURRENCY=n.RPC=void 0;const r=e("./types.cjs");var i;n.RPC="rpc",n.FALL_BACK_VS_CURRENCY="ETH",n.IPFS_DEFAULT_GATEWAY_URL="https://cloudflare-ipfs.com/ipfs/",n.GANACHE_CHAIN_ID="0x539",n.MAX_SAFE_CHAIN_ID=0xfffffffffffec,n.ERC721="ERC721",n.ERC1155="ERC1155",n.ERC20="ERC20",n.ERC721_INTERFACE_ID="0x80ac58cd",n.ERC721_METADATA_INTERFACE_ID="0x5b5e139f",n.ERC721_ENUMERABLE_INTERFACE_ID="0x780e9d63",n.ERC1155_INTERFACE_ID="0xd9b67a26",n.ERC1155_METADATA_URI_INTERFACE_ID="0x0e89341c",n.ERC1155_TOKEN_RECEIVER_INTERFACE_ID="0x4e2312e0",n.GWEI="gwei",n.ASSET_TYPES={NATIVE:"NATIVE",TOKEN:"TOKEN",NFT:"NFT",UNKNOWN:"UNKNOWN"},n.TESTNET_TICKER_SYMBOLS={GOERLI:"GoerliETH",SEPOLIA:"SepoliaETH",LINEA_GOERLI:"LineaETH",LINEA_SEPOLIA:"LineaETH"},n.BUILT_IN_NETWORKS={[r.NetworkType.goerli]:{chainId:r.ChainId.goerli,ticker:r.NetworksTicker.goerli,rpcPrefs:{blockExplorerUrl:`https://${r.NetworkType.goerli}.etherscan.io`}},[r.NetworkType.sepolia]:{chainId:r.ChainId.sepolia,ticker:r.NetworksTicker.sepolia,rpcPrefs:{blockExplorerUrl:`https://${r.NetworkType.sepolia}.etherscan.io`}},[r.NetworkType.mainnet]:{chainId:r.ChainId.mainnet,ticker:r.NetworksTicker.mainnet,rpcPrefs:{blockExplorerUrl:"https://etherscan.io"}},[r.NetworkType["linea-goerli"]]:{chainId:r.ChainId["linea-goerli"],ticker:r.NetworksTicker["linea-goerli"],rpcPrefs:{blockExplorerUrl:"https://goerli.lineascan.build"}},[r.NetworkType["linea-sepolia"]]:{chainId:r.ChainId["linea-sepolia"],ticker:r.NetworksTicker["linea-sepolia"],rpcPrefs:{blockExplorerUrl:"https://sepolia.lineascan.build"}},[r.NetworkType["linea-mainnet"]]:{chainId:r.ChainId["linea-mainnet"],ticker:r.NetworksTicker["linea-mainnet"],rpcPrefs:{blockExplorerUrl:"https://lineascan.build"}},[r.NetworkType.rpc]:{chainId:void 0,blockExplorerUrl:void 0,ticker:void 0,rpcPrefs:void 0}},n.OPENSEA_PROXY_URL="https://proxy.api.cx.metamask.io/opensea/v1/api/v2",n.NFT_API_BASE_URL="https://nft.api.cx.metamask.io",n.NFT_API_VERSION="1",n.NFT_API_TIMEOUT=15e3,n.ORIGIN_METAMASK="metamask",function(e){e.AddEthereumChain="wallet_addEthereumChain",e.ConnectAccounts="connect_accounts",e.EthDecrypt="eth_decrypt",e.EthGetEncryptionPublicKey="eth_getEncryptionPublicKey",e.EthSignTypedData="eth_signTypedData",e.PersonalSign="personal_sign",e.ResultError="result_error",e.ResultSuccess="result_success",e.SnapDialogAlert="snap_dialog:alert",e.SnapDialogConfirmation="snap_dialog:confirmation",e.SnapDialogPrompt="snap_dialog:prompt",e.SnapDialogDefault="snap_dialog",e.SwitchEthereumChain="wallet_switchEthereumChain",e.Transaction="transaction",e.Unlock="unlock",e.WalletConnect="wallet_connect",e.WalletRequestPermissions="wallet_requestPermissions",e.WatchAsset="wallet_watchAsset"}(i||(n.ApprovalType=i={})),n.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP={[r.ChainId.goerli]:r.BuiltInNetworkName.Goerli,[r.ChainId.sepolia]:r.BuiltInNetworkName.Sepolia,[r.ChainId.mainnet]:r.BuiltInNetworkName.Mainnet,[r.ChainId["linea-goerli"]]:r.BuiltInNetworkName.LineaGoerli,[r.ChainId["linea-sepolia"]]:r.BuiltInNetworkName.LineaSepolia,[r.ChainId["linea-mainnet"]]:r.BuiltInNetworkName.LineaMainnet,[r.ChainId.aurora]:r.BuiltInNetworkName.Aurora}},{"./types.cjs":33}],30:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.isEqualCaseInsensitive=n.weiHexToGweiDec=n.toHex=n.toChecksumHexAddress=n.timeoutFetch=n.successfulFetch=n.safelyExecuteWithTimeout=n.safelyExecute=n.query=n.normalizeEnsName=n.isValidHexAddress=n.isValidJson=n.isSmartContractCode=n.isSafeDynamicKey=n.isSafeChainId=n.isPlainObject=n.isNonEmptyArray=n.hexToText=n.hexToBN=n.handleFetch=n.gweiDecToWEIBN=n.getBuyURL=n.fromHex=n.fractionBN=n.fetchWithErrorHandling=n.convertHexToDecimal=n.BNToHex=void 0,i(e("./constants.cjs"),n);var s=e("./util.cjs");Object.defineProperty(n,"BNToHex",{enumerable:!0,get:function(){return s.BNToHex}}),Object.defineProperty(n,"convertHexToDecimal",{enumerable:!0,get:function(){return s.convertHexToDecimal}}),Object.defineProperty(n,"fetchWithErrorHandling",{enumerable:!0,get:function(){return s.fetchWithErrorHandling}}),Object.defineProperty(n,"fractionBN",{enumerable:!0,get:function(){return s.fractionBN}}),Object.defineProperty(n,"fromHex",{enumerable:!0,get:function(){return s.fromHex}}),Object.defineProperty(n,"getBuyURL",{enumerable:!0,get:function(){return s.getBuyURL}}),Object.defineProperty(n,"gweiDecToWEIBN",{enumerable:!0,get:function(){return s.gweiDecToWEIBN}}),Object.defineProperty(n,"handleFetch",{enumerable:!0,get:function(){return s.handleFetch}}),Object.defineProperty(n,"hexToBN",{enumerable:!0,get:function(){return s.hexToBN}}),Object.defineProperty(n,"hexToText",{enumerable:!0,get:function(){return s.hexToText}}),Object.defineProperty(n,"isNonEmptyArray",{enumerable:!0,get:function(){return s.isNonEmptyArray}}),Object.defineProperty(n,"isPlainObject",{enumerable:!0,get:function(){return s.isPlainObject}}),Object.defineProperty(n,"isSafeChainId",{enumerable:!0,get:function(){return s.isSafeChainId}}),Object.defineProperty(n,"isSafeDynamicKey",{enumerable:!0,get:function(){return s.isSafeDynamicKey}}),Object.defineProperty(n,"isSmartContractCode",{enumerable:!0,get:function(){return s.isSmartContractCode}}),Object.defineProperty(n,"isValidJson",{enumerable:!0,get:function(){return s.isValidJson}}),Object.defineProperty(n,"isValidHexAddress",{enumerable:!0,get:function(){return s.isValidHexAddress}}),Object.defineProperty(n,"normalizeEnsName",{enumerable:!0,get:function(){return s.normalizeEnsName}}),Object.defineProperty(n,"query",{enumerable:!0,get:function(){return s.query}}),Object.defineProperty(n,"safelyExecute",{enumerable:!0,get:function(){return s.safelyExecute}}),Object.defineProperty(n,"safelyExecuteWithTimeout",{enumerable:!0,get:function(){return s.safelyExecuteWithTimeout}}),Object.defineProperty(n,"successfulFetch",{enumerable:!0,get:function(){return s.successfulFetch}}),Object.defineProperty(n,"timeoutFetch",{enumerable:!0,get:function(){return s.timeoutFetch}}),Object.defineProperty(n,"toChecksumHexAddress",{enumerable:!0,get:function(){return s.toChecksumHexAddress}}),Object.defineProperty(n,"toHex",{enumerable:!0,get:function(){return s.toHex}}),Object.defineProperty(n,"weiHexToGweiDec",{enumerable:!0,get:function(){return s.weiHexToGweiDec}}),Object.defineProperty(n,"isEqualCaseInsensitive",{enumerable:!0,get:function(){return s.isEqualCaseInsensitive}}),i(e("./types.cjs"),n),i(e("./siwe.cjs"),n)},{"./constants.cjs":29,"./siwe.cjs":32,"./types.cjs":33,"./util.cjs":34}],31:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.projectLogger=void 0;const r=e("@metamask/utils");Object.defineProperty(n,"createModuleLogger",{enumerable:!0,get:function(){return r.createModuleLogger}}),n.projectLogger=(0,r.createProjectLogger)("controller-utils")},{"@metamask/utils":369}],32:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.detectSIWE=n.isValidSIWEOrigin=n.parseDomainParts=void 0;const r=e("@metamask/utils"),i=e("@spruceid/siwe-parser"),s=e("./logger.cjs"),o=(0,s.createModuleLogger)(s.projectLogger,"detect-siwe");function a(e){try{const i="string"!=typeof(n=e)?n:(0,r.remove0x)(n),s=t.from(i,"hex");return 32===s.length?e:s.toString("utf8")}catch(t){return o(t),e}var n}const c={"http:":"80","https:":"443"};n.parseDomainParts=(e,t)=>e.match(/^[^/:]*:\/\//u)?new URL(e):new URL(`${t}//${e}`);n.isValidSIWEOrigin=e=>{try{const{origin:t,siwe:r}=e;if(t.startsWith("file://"))return!0;if(!t||!r?.parsedMessage?.domain)return!1;const i=new URL(t),s=(0,n.parseDomainParts)(r.parsedMessage.domain,i.protocol);return 0===s.hostname.localeCompare(i.hostname,void 0,{sensitivity:"accent"})&&(""!==s.port&&s.port!==i.port?""===i.port&&s.port===c[i.protocol]:""===s.username||s.username===i.username)}catch(e){return o(e),!1}};n.detectSIWE=e=>{try{const{data:t}=e,n=a(t);return{isSIWEMessage:!0,parsedMessage:new i.ParsedMessage(n)}}catch(e){return{isSIWEMessage:!1,parsedMessage:null}}}}).call(this)}).call(this,e("buffer").Buffer)},{"./logger.cjs":31,"@metamask/utils":369,"@spruceid/siwe-parser":403,buffer:445}],33:[function(e,t,n){"use strict";var r,i;Object.defineProperty(n,"__esModule",{value:!0}),n.NetworkNickname=n.BlockExplorerUrl=n.NetworksTicker=n.ChainId=n.BuiltInNetworkName=n.isInfuraNetworkType=n.isNetworkType=n.NetworkType=n.InfuraNetworkType=void 0,n.InfuraNetworkType={mainnet:"mainnet",goerli:"goerli",sepolia:"sepolia","linea-goerli":"linea-goerli","linea-sepolia":"linea-sepolia","linea-mainnet":"linea-mainnet"},n.NetworkType={...n.InfuraNetworkType,rpc:"rpc"},n.isNetworkType=function(e){return Object.values(n.NetworkType).includes(e)},n.isInfuraNetworkType=function(e){return Object.keys(n.InfuraNetworkType).includes(e)},function(e){e.Mainnet="mainnet",e.Goerli="goerli",e.Sepolia="sepolia",e.LineaGoerli="linea-goerli",e.LineaSepolia="linea-sepolia",e.LineaMainnet="linea-mainnet",e.Aurora="aurora"}(r||(n.BuiltInNetworkName=r={})),n.ChainId={[r.Mainnet]:"0x1",[r.Goerli]:"0x5",[r.Sepolia]:"0xaa36a7",[r.Aurora]:"0x4e454152",[r.LineaGoerli]:"0xe704",[r.LineaSepolia]:"0xe705",[r.LineaMainnet]:"0xe708"},function(e){e.mainnet="ETH",e.goerli="GoerliETH",e.sepolia="SepoliaETH",e["linea-goerli"]="LineaETH",e["linea-sepolia"]="LineaETH",e["linea-mainnet"]="ETH",e.rpc=""}(i||(n.NetworksTicker=i={})),n.BlockExplorerUrl={[r.Mainnet]:"https://etherscan.io",[r.Goerli]:"https://goerli.etherscan.io",[r.Sepolia]:"https://sepolia.etherscan.io",[r.LineaGoerli]:"https://goerli.lineascan.build",[r.LineaSepolia]:"https://sepolia.lineascan.build",[r.LineaMainnet]:"https://lineascan.build"},n.NetworkNickname={[r.Mainnet]:"Ethereum Mainnet",[r.Goerli]:"Goerli",[r.Sepolia]:"Sepolia",[r.LineaGoerli]:"Linea Goerli",[r.LineaSepolia]:"Linea Sepolia",[r.LineaMainnet]:"Linea"}},{}],34:[function(e,t,n){(function(t){(function(){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.isEqualCaseInsensitive=n.isValidJson=n.isNonEmptyArray=n.isPlainObject=n.convertHexToDecimal=n.query=n.normalizeEnsName=n.timeoutFetch=n.fetchWithErrorHandling=n.handleFetch=n.successfulFetch=n.isSmartContractCode=n.isValidHexAddress=n.toChecksumHexAddress=n.safelyExecuteWithTimeout=n.safelyExecute=n.toHex=n.fromHex=n.hexToText=n.hexToBN=n.getBuyURL=n.weiHexToGweiDec=n.gweiDecToWEIBN=n.fractionBN=n.BNToHex=n.isSafeChainId=n.isSafeDynamicKey=n.PROTOTYPE_POLLUTION_BLOCKLIST=void 0;const i=e("@ethereumjs/util"),s=e("@metamask/ethjs-unit"),o=e("@metamask/utils"),a=r(e("bn.js")),c=r(e("eth-ens-namehash")),u=r(e("fast-deep-equal")),l=e("./constants.cjs"),d=new Error("timeout");function h(e){return e?new a.default((0,o.remove0x)(e),16):new a.default(0)}async function f(e,t){const n=await fetch(e,t);if(!n.ok)throw new Error(`Fetch failed with status '${n.status}' for request '${String(e)}'`);return n}async function p(e,t){const n=await f(e,t);return await n.json()}n.PROTOTYPE_POLLUTION_BLOCKLIST=["__proto__","constructor","prototype"],n.isSafeDynamicKey=function(e){return"string"==typeof e&&!n.PROTOTYPE_POLLUTION_BLOCKLIST.some((t=>e===t))},n.isSafeChainId=function(e){if(!(0,o.isHexString)(e))return!1;const t=Number.parseInt(e,(0,o.isStrictHexString)(e)?16:10);return Number.isSafeInteger(t)&&t>0&&t<=l.MAX_SAFE_CHAIN_ID},n.BNToHex=function(e){return(0,o.add0x)(e.toString(16))},n.fractionBN=function(e,t,n){const r=new a.default(t),i=new a.default(n);return e.mul(r).div(i)},n.gweiDecToWEIBN=function(e){if(Number.isNaN(e))return new a.default(0);const t=e.toString().split("."),n=t[0]||"0";let r=t[1]||"";if(!r)return(0,s.toWei)(n,"gwei");if(r.length<=9)return(0,s.toWei)(`${n}.${r}`,"gwei");const i=r.slice(9)[0];r=r.slice(0,9);let o=(0,s.toWei)(`${n}.${r}`,"gwei");return Number(i)>=5&&(o=o.add(new a.default(1))),o},n.weiHexToGweiDec=function(e){const t=new a.default((0,o.remove0x)(e),16);return(0,s.fromWei)(t,"gwei")},n.getBuyURL=function(e="1",t,n=5){switch(e){case"1":return`https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${n}&address=${t}&crypto_currency=ETH`;case"5":return"https://goerli-faucet.slock.it/";case"11155111":return"https://sepoliafaucet.net/";default:return}},n.hexToBN=h,n.hexToText=function(e){try{const n=(0,o.remove0x)(e);return t.from(n,"hex").toString("utf8")}catch(t){return e}},n.fromHex=function(e){return a.default.isBN(e)?e:new a.default(h(e).toString(10))},n.toHex=function(e){return"string"==typeof e&&(0,o.isStrictHexString)(e)?e:`0x${a.default.isBN(e)||"bigint"==typeof e?e.toString(16):new a.default(e.toString(),10).toString(16)}`},n.safelyExecute=async function(e,t=!1){try{return await e()}catch(e){return void(t&&console.error(e))}},n.safelyExecuteWithTimeout=async function(e,t=!1,n=500){try{return await Promise.race([e(),new Promise(((e,t)=>setTimeout((()=>{t(d)}),n)))])}catch(e){return void(t&&console.error(e))}},n.toChecksumHexAddress=function(e){if("string"!=typeof e)return e;const t=(0,o.add0x)(e);return(0,o.isHexString)(t)?(0,i.toChecksumAddress)(t):t},n.isValidHexAddress=function(e,{allowNonPrefixed:t=!0}={}){const n=t?(0,o.add0x)(e):e;return!!(0,o.isStrictHexString)(n)&&(0,i.isValidAddress)(n)},n.isSmartContractCode=function(e){return!!e&&("0x"!==e&&"0x0"!==e)},n.successfulFetch=f,n.handleFetch=p,n.fetchWithErrorHandling=async function({url:e,options:t,timeout:n,errorCodesToCatch:r}){let i;try{i=n?Promise.race([await p(e,t),new Promise(((e,t)=>setTimeout((()=>{t(d)}),n)))]):await p(e,t)}catch(e){!function(e,t=[]){if(!e)return;if(!(e instanceof Error))throw e;if(!t.some((t=>e.message.includes(`Fetch failed with status '${t}'`)))&&!e.message.includes("Failed to fetch")&&e!==d)throw e;console.error(e)}(e,r)}return i},n.timeoutFetch=async function(e,t,n=500){return Promise.race([f(e,t),new Promise(((e,t)=>setTimeout((()=>{t(d)}),n)))])},n.normalizeEnsName=function(e){if("."===e)return e;if(e&&"string"==typeof e)try{const t=c.default.normalize(e.trim());if(t.match(/^(([\w\d-]+)\.)*[\w\d-]{7,}\.(eth|test)$/u))return t}catch(e){}return null},n.query=function(e,t,n=[]){return new Promise(((r,i)=>{const s=(e,t)=>{e?i(e):r(t)};t in e&&"function"==typeof e[t]?e[t](...n,s):e.sendAsync({method:t,params:n},s)}))};n.convertHexToDecimal=(e="0x0")=>(0,o.isStrictHexString)(e)?parseInt(e,16):Number(e)?Number(e):0,n.isPlainObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},n.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},n.isValidJson=function(e){try{return(0,u.default)(e,JSON.parse(JSON.stringify(e)))}catch(e){return!1}},n.isEqualCaseInsensitive=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()}}).call(this)}).call(this,e("buffer").Buffer)},{"./constants.cjs":29,"@ethereumjs/util":16,"@metamask/ethjs-unit":35,"@metamask/utils":369,"bn.js":436,buffer:445,"eth-ens-namehash":474,"fast-deep-equal":504}],35:[function(e,t,n){"use strict";var r=e("bn.js"),i=e("@metamask/number-to-bn"),s=new r(0),o=new r(-1),a={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function c(e){var t=e?e.toLowerCase():"ether",n=a[t];if("string"!=typeof n)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(a,null,2));return new r(n,10)}function u(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"==typeof e&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+typeof e+".")}t.exports={unitMap:a,numberToString:u,getValueOfUnit:c,fromWei:function(e,t,n){var r=i(e),u=r.lt(s),l=c(t),d=a[t].length-1||1,h=n||{};u&&(r=r.mul(o));for(var f=r.mod(l).toString(10);f.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var h=d[0],f=d[1];if(h||(h="0"),f||(f="0"),f.length>s)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;f.length{"destroy"in e&&"function"==typeof e.destroy&&e.destroy()})),y(this,o,[],"f"),y(this,s,!0,"f")}push(e){g(this,r,"m",c).call(this),g(this,o,"f").push(e)}handle(e,t){if(g(this,r,"m",c).call(this),t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?g(this,r,"m",u).call(this,e,t):g(this,r,"m",u).call(this,e):t?g(this,r,"m",l).call(this,e,t):this._promiseHandle(e)}asMiddleware(){return g(this,r,"m",c).call(this),async(e,t,n,r)=>{try{const[s,a,c]=await g(i,i,"m",h).call(i,e,t,g(this,o,"f"));return a?(await g(i,i,"m",p).call(i,c),r(s)):n((async e=>{try{await g(i,i,"m",p).call(i,c)}catch(t){return e(t)}return e()}))}catch(e){return r(e)}}}async _promiseHandle(e){return new Promise(((t,n)=>{g(this,r,"m",l).call(this,e,((e,r)=>{e&&void 0===r?n(e):t(r)})).catch(n)}))}}function E(e){return JSON.stringify(e,null,2)}n.JsonRpcEngine=S,i=S,s=new WeakMap,o=new WeakMap,a=new WeakMap,r=new WeakSet,c=function(){if(g(this,s,"f"))throw new Error("This engine is destroyed and can no longer be used.")},u=async function(e,t){try{if(0===e.length){const e=[{id:null,jsonrpc:"2.0",error:new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Request batch must contain plain objects. Received an empty array")}];return t?t(null,e):e}const n=(await Promise.all(e.map(this._promiseHandle.bind(this)))).filter((e=>void 0!==e));return t?t(null,n):n}catch(e){if(t)return t(e);throw e}},l=async function(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const n=new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(n,{id:null,jsonrpc:"2.0",error:n})}if("string"!=typeof e.method){const n=new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return g(this,a,"f")&&!(0,w.isJsonRpcRequest)(e)?t(null):t(n,{id:e.id??null,jsonrpc:"2.0",error:n})}if(g(this,a,"f")&&(0,w.isJsonRpcNotification)(e)&&!(0,w.isJsonRpcRequest)(e)){try{await g(this,a,"f").call(this,e)}catch(n){return t(n)}return t(null)}let n=null;const r={...e},s={id:r.id,jsonrpc:r.jsonrpc};try{await g(i,i,"m",d).call(i,r,s,g(this,o,"f"))}catch(e){n=e}return n&&(delete s.result,s.error||(s.error=(0,v.serializeError)(n))),t(n,s)},d=async function(e,t,n){const[r,s,o]=await g(i,i,"m",h).call(i,e,t,n);if(g(i,i,"m",m).call(i,e,t,s),await g(i,i,"m",p).call(i,o),r)throw r},h=async function(e,t,n){const r=[];let s=null,o=!1;for(const a of n)if([s,o]=await g(i,i,"m",f).call(i,e,t,a,r),o)break;return[s,o,r.reverse()]},f=async function(e,t,n,r){return new Promise((i=>{const s=e=>{const n=e||t.error;n&&(t.error=(0,v.serializeError)(n)),i([n,!0])},o=n=>{t.error?s(t.error):(n&&("function"!=typeof n&&s(new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${E(e)}`,{request:e})),r.push(n)),i([null,!1]))};try{n(e,t,o,s)}catch(e){s(e)}}))},p=async function(e){for(const t of e)await new Promise(((e,n)=>{t((t=>t?n(t):e()))}))},m=function(e,t,n){if(!(0,w.hasProperty)(t,"result")&&!(0,w.hasProperty)(t,"error"))throw new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${E(e)}`,{request:e});if(!n)throw new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${E(e)}`,{request:e})}},{"@metamask/rpc-errors":130,"@metamask/safe-event-emitter":132,"@metamask/utils":369}],37:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createAsyncMiddleware=void 0,n.createAsyncMiddleware=function(e){return async(t,n,r,i)=>{let s;const o=new Promise((e=>{s=e}));let a=null,c=!1;const u=async()=>(c=!0,r((e=>{a=e,s()})),o);try{await e(t,n,u),c?(await o,a(null)):i(null)}catch(e){a?a(e):i(e)}}}},{}],38:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createScaffoldMiddleware=void 0,n.createScaffoldMiddleware=function(e){return(t,n,r,i)=>{const s=e[t.method];return void 0===s?r():"function"==typeof s?s(t,n,r,i):(n.result=s,i())}}},{}],39:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getUniqueId=void 0;const r=4294967295;let i=Math.floor(Math.random()*r);n.getUniqueId=function(){return i=(i+1)%r,i}},{}],40:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createIdRemapMiddleware=void 0;const r=e("./getUniqueId.cjs");n.createIdRemapMiddleware=function(){return(e,t,n,i)=>{const s=e.id,o=(0,r.getUniqueId)();e.id=o,t.id=o,n((n=>{e.id=s,t.id=s,n()}))}}},{"./getUniqueId.cjs":39}],41:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeMiddleware=n.JsonRpcEngine=n.createIdRemapMiddleware=n.getUniqueId=n.createScaffoldMiddleware=n.createAsyncMiddleware=void 0;var r=e("./createAsyncMiddleware.cjs");Object.defineProperty(n,"createAsyncMiddleware",{enumerable:!0,get:function(){return r.createAsyncMiddleware}});var i=e("./createScaffoldMiddleware.cjs");Object.defineProperty(n,"createScaffoldMiddleware",{enumerable:!0,get:function(){return i.createScaffoldMiddleware}});var s=e("./getUniqueId.cjs");Object.defineProperty(n,"getUniqueId",{enumerable:!0,get:function(){return s.getUniqueId}});var o=e("./idRemapMiddleware.cjs");Object.defineProperty(n,"createIdRemapMiddleware",{enumerable:!0,get:function(){return o.createIdRemapMiddleware}});var a=e("./JsonRpcEngine.cjs");Object.defineProperty(n,"JsonRpcEngine",{enumerable:!0,get:function(){return a.JsonRpcEngine}});var c=e("./mergeMiddleware.cjs");Object.defineProperty(n,"mergeMiddleware",{enumerable:!0,get:function(){return c.mergeMiddleware}})},{"./JsonRpcEngine.cjs":36,"./createAsyncMiddleware.cjs":37,"./createScaffoldMiddleware.cjs":38,"./getUniqueId.cjs":39,"./idRemapMiddleware.cjs":40,"./mergeMiddleware.cjs":42}],42:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeMiddleware=void 0;const r=e("./JsonRpcEngine.cjs");n.mergeMiddleware=function(e){const t=new r.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}},{"./JsonRpcEngine.cjs":36}],43:[function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.getBIP44AddressKeyDeriver=n.deriveBIP44AddressKey=n.BIP44CoinTypeNode=n.BIP_44_COIN_TYPE_DEPTH=void 0;const o=e("@metamask/utils"),a=e("./BIP44Node.cjs"),c=e("./constants.cjs"),u=e("./SLIP10Node.cjs"),l=e("./utils.cjs");n.BIP_44_COIN_TYPE_DEPTH=2;class d{constructor(e,t){r.set(this,void 0),i(this,r,e,"f"),this.coin_type=t,this.path=(0,l.getBIP44CoinTypePathString)(t),Object.freeze(this)}static async fromJSON(e,t){f(t),h(e.depth);const n=await a.BIP44Node.fromExtendedKey({depth:e.depth,index:e.index,parentFingerprint:e.parentFingerprint,chainCode:(0,l.hexStringToBytes)(e.chainCode),privateKey:(0,l.nullableHexStringToBytes)(e.privateKey),publicKey:(0,l.hexStringToBytes)(e.publicKey)});return new d(n,t)}static async fromDerivationPath(e){h(e.length-1);const t=await a.BIP44Node.fromDerivationPath({derivationPath:e}),r=e[n.BIP_44_COIN_TYPE_DEPTH].split(":")[1]?.replace("'","");(0,o.assert)(r,"Invalid derivation path.");const i=Number.parseInt(r,10);return new d(t,i)}static async fromNode(e,t){if(!(e instanceof a.BIP44Node))throw new Error("Invalid node: Expected an instance of BIP44Node.");return f(t),h(e.depth),Promise.resolve(new d(e,t))}get depth(){return s(this,r,"f").depth}get privateKeyBytes(){return s(this,r,"f").privateKeyBytes}get publicKeyBytes(){return s(this,r,"f").publicKeyBytes}get chainCodeBytes(){return s(this,r,"f").chainCodeBytes}get privateKey(){return s(this,r,"f").privateKey}get publicKey(){return s(this,r,"f").publicKey}get compressedPublicKey(){return s(this,r,"f").compressedPublicKey}get compressedPublicKeyBytes(){return s(this,r,"f").compressedPublicKeyBytes}get chainCode(){return s(this,r,"f").chainCode}get address(){return s(this,r,"f").address}get masterFingerprint(){return s(this,r,"f").masterFingerprint}get parentFingerprint(){return s(this,r,"f").parentFingerprint}get fingerprint(){return s(this,r,"f").fingerprint}get index(){return s(this,r,"f").index}get curve(){return s(this,r,"f").curve}get extendedKey(){return s(this,r,"f").extendedKey}async deriveBIP44AddressKey({account:e=0,change:t=0,address_index:n}){return await s(this,r,"f").derive((0,l.getBIP44CoinTypeToAddressPathTuple)({account:e,change:t,address_index:n}))}toJSON(){return{...s(this,r,"f").toJSON(),coin_type:this.coin_type,path:this.path}}}function h(e){if(e!==n.BIP_44_COIN_TYPE_DEPTH)throw new Error(`Invalid depth: Coin type nodes must be of depth ${n.BIP_44_COIN_TYPE_DEPTH}. Received: "${e}"`)}function f(e){if("number"!=typeof e||!Number.isInteger(e)||e<0)throw new Error("Invalid coin type: The specified coin type must be a non-negative integer number.")}async function p(e){if(e instanceof d)return h(e.depth),e;if("string"==typeof e){const t=await a.BIP44Node.fromExtendedKey(e),n=await d.fromNode(t,t.index-c.BIP_32_HARDENED_OFFSET);return h(n.depth),n}return d.fromJSON(e,e.coin_type)}n.BIP44CoinTypeNode=d,r=new WeakMap,n.deriveBIP44AddressKey=async function(e,{account:t=0,change:n=0,address_index:r}){const i=(0,l.getBIP44CoinTypeToAddressPathTuple)({account:t,change:n,address_index:r}),s=await p(e),o=await(0,u.deriveChildNode)({path:i,node:s});return new a.BIP44Node(o)},n.getBIP44AddressKeyDeriver=async function(e,t){const{account:n=0,change:r=0}=t??{},i=await p(e),s=(0,l.getHardenedBIP32NodeToken)(n),o=(0,l.getBIP32NodeToken)(r),c=async(e,t=!1)=>{const n=await(0,u.deriveChildNode)({path:[s,o,t?(0,l.getHardenedBIP32NodeToken)(e):(0,l.getUnhardenedBIP32NodeToken)(e)],node:i});return new a.BIP44Node(n)};return c.coin_type=i.coin_type,c.path=(0,l.getBIP44ChangePathString)(i.path,{account:n,change:r}),Object.freeze(c),c}},{"./BIP44Node.cjs":44,"./SLIP10Node.cjs":45,"./constants.cjs":46,"./utils.cjs":61,"@metamask/utils":72}],44:[function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.validateBIP44Depth=n.BIP44Node=void 0;const o=e("@metamask/utils"),a=e("./constants.cjs"),c=e("./extended-keys.cjs"),u=e("./SLIP10Node.cjs"),l=e("./utils.cjs");class d{constructor(e){r.set(this,void 0),i(this,r,e,"f"),Object.freeze(this)}static async fromJSON(e){return d.fromExtendedKey(e)}static async fromExtendedKey(e){if("string"==typeof e){const t=(0,c.decodeExtendedKey)(e),{chainCode:n,depth:r,parentFingerprint:i,index:s}=t;if(t.version===c.PRIVATE_KEY_VERSION){const{privateKey:e}=t;return d.fromExtendedKey({depth:r,parentFingerprint:i,index:s,privateKey:e,chainCode:n})}const{publicKey:o}=t;return d.fromExtendedKey({depth:r,parentFingerprint:i,index:s,publicKey:o,chainCode:n})}const{privateKey:t,publicKey:n,chainCode:r,depth:i,parentFingerprint:s,index:o}=e;h(i);const a=await u.SLIP10Node.fromExtendedKey({privateKey:t,publicKey:n,chainCode:r,depth:i,parentFingerprint:s,index:o,curve:"secp256k1"});return new d(a)}static async fromDerivationPath({derivationPath:e}){h(e.length-1),f(e,a.MIN_BIP_44_DEPTH);const t=await u.SLIP10Node.fromDerivationPath({derivationPath:e,curve:"secp256k1"});return new d(t)}get depth(){return s(this,r,"f").depth}get privateKeyBytes(){return s(this,r,"f").privateKeyBytes}get publicKeyBytes(){return s(this,r,"f").publicKeyBytes}get chainCodeBytes(){return s(this,r,"f").chainCodeBytes}get privateKey(){return s(this,r,"f").privateKey}get publicKey(){return s(this,r,"f").publicKey}get compressedPublicKey(){return s(this,r,"f").compressedPublicKey}get compressedPublicKeyBytes(){return s(this,r,"f").compressedPublicKeyBytes}get chainCode(){return s(this,r,"f").chainCode}get address(){return s(this,r,"f").address}get masterFingerprint(){return s(this,r,"f").masterFingerprint}get parentFingerprint(){return s(this,r,"f").parentFingerprint}get fingerprint(){return s(this,r,"f").fingerprint}get index(){return s(this,r,"f").index}get extendedKey(){const e={depth:this.depth,parentFingerprint:this.parentFingerprint,index:this.index,chainCode:this.chainCodeBytes};return this.privateKeyBytes?(0,c.encodeExtendedKey)({...e,version:c.PRIVATE_KEY_VERSION,privateKey:this.privateKeyBytes}):(0,c.encodeExtendedKey)({...e,version:c.PUBLIC_KEY_VERSION,publicKey:this.publicKeyBytes})}get curve(){return s(this,r,"f").curve}neuter(){const e=s(this,r,"f").neuter();return new d(e)}async derive(e){if(this.depth===a.MAX_BIP_44_DEPTH)throw new Error("Illegal operation: This HD tree node is already a leaf node.");h(this.depth+e.length),f(e,this.depth+1);const t=await s(this,r,"f").derive(e);return new d(t)}toJSON(){return{depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,privateKey:this.privateKey,publicKey:this.publicKey,chainCode:this.chainCode}}}function h(e){if((0,u.validateBIP32Depth)(e),ea.MAX_BIP_44_DEPTH)throw new Error(`Invalid HD tree path depth: The depth must be a positive integer N such that 0 <= N <= 5. Received: "${e}"`)}function f(e,t){e.forEach(((e,n)=>{const r=t+n;if(r!==a.MIN_BIP_44_DEPTH)switch((0,o.assert)("string"==typeof e),r){case 1:if(e!==a.BIP44PurposeNodeToken)throw new Error(`Invalid derivation path: The "purpose" node (depth 1) must be the string "${a.BIP44PurposeNodeToken}".`);break;case 2:if(!a.BIP_32_PATH_REGEX.test(e)||!(0,l.isHardened)(e))throw new Error('Invalid derivation path: The "coin_type" node (depth 2) must be a hardened BIP-32 node.');break;case 3:if(!a.BIP_32_PATH_REGEX.test(e)||!(0,l.isHardened)(e))throw new Error('Invalid derivation path: The "account" node (depth 3) must be a hardened BIP-32 node.');break;case 4:if(!a.BIP_32_PATH_REGEX.test(e))throw new Error('Invalid derivation path: The "change" node (depth 4) must be a BIP-32 node.');break;case a.MAX_BIP_44_DEPTH:if(!a.BIP_32_PATH_REGEX.test(e))throw new Error('Invalid derivation path: The "address_index" node (depth 5) must be a BIP-32 node.')}else if(!(e instanceof Uint8Array||a.BIP_39_PATH_REGEX.test(e)))throw new Error('Invalid derivation path: The "m" / seed node (depth 0) must be a BIP-39 node.')}))}n.BIP44Node=d,r=new WeakMap,n.validateBIP44Depth=h},{"./SLIP10Node.cjs":45,"./constants.cjs":46,"./extended-keys.cjs":59,"./utils.cjs":61,"@metamask/utils":72}],45:[function(e,t,n){"use strict";var r,i,s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildNode=n.validateRootIndex=n.validateMasterParentFingerprint=n.validateParentFingerprint=n.validateBIP32Depth=n.SLIP10Node=void 0;const o=e("@metamask/utils"),a=e("./constants.cjs"),c=e("./curves/index.cjs"),u=e("./derivation.cjs"),l=e("./derivers/bip32.cjs"),d=e("./utils.cjs");class h{constructor({depth:e,masterFingerprint:t,parentFingerprint:n,index:a,chainCode:c,privateKey:u,publicKey:l,curve:d},f){(0,o.assert)(f===s(h,r,"f",i),"SLIP10Node can only be constructed using `SLIP10Node.fromJSON`, `SLIP10Node.fromExtendedKey`, or `SLIP10Node.fromDerivationPath`."),this.depth=e,this.masterFingerprint=t,this.parentFingerprint=n,this.index=a,this.chainCodeBytes=c,this.privateKeyBytes=u,this.publicKeyBytes=l,this.curve=d,Object.freeze(this)}static async fromJSON(e){return h.fromExtendedKey(e)}static async fromExtendedKey({depth:e,masterFingerprint:t,parentFingerprint:n,index:u,privateKey:l,publicKey:g,chainCode:b,curve:v}){const x=(0,d.getBytes)(b,a.BYTES_KEY_LENGTH);(0,d.validateCurve)(v),f(e),(0,d.validateBIP32Index)(u),y(u,e),p(n,e),m(t,n,e);const w=(0,c.getCurveByName)(v);if(l){const a=(0,d.getBytesUnsafe)(l,w.privateKeyLength);return(0,o.assert)(w.isValidPrivateKey(a),`Invalid private key: Value is not a valid ${v} private key.`),new h({depth:e,masterFingerprint:t,parentFingerprint:n,index:u,chainCode:x,privateKey:a,publicKey:await w.getPublicKey(a),curve:v},s(this,r,"f",i))}if(g){const o=(0,d.getBytes)(g,w.publicKeyLength);return new h({depth:e,masterFingerprint:t,parentFingerprint:n,index:u,chainCode:x,publicKey:o,curve:v},s(this,r,"f",i))}throw new Error("Invalid options: Must provide either a private key or a public key.")}static async fromDerivationPath({derivationPath:e,curve:t}){if((0,d.validateCurve)(t),!e)throw new Error("Invalid options: Must provide a derivation path.");if(0===e.length)throw new Error("Invalid derivation path: May not specify an empty derivation path.");return await(0,u.deriveKeyFromPath)({path:e,depth:e.length-1,curve:t})}get chainCode(){return(0,o.bytesToHex)(this.chainCodeBytes)}get privateKey(){if(this.privateKeyBytes)return(0,o.bytesToHex)(this.privateKeyBytes)}get publicKey(){return(0,o.bytesToHex)(this.publicKeyBytes)}get compressedPublicKeyBytes(){return(0,c.getCurveByName)(this.curve).compressPublicKey(this.publicKeyBytes)}get compressedPublicKey(){return(0,o.bytesToHex)(this.compressedPublicKeyBytes)}get address(){if("secp256k1"!==this.curve)throw new Error("Unable to get address for this node: Only secp256k1 is supported.");return(0,o.bytesToHex)((0,l.publicKeyToEthAddress)(this.publicKeyBytes))}get fingerprint(){return(0,d.getFingerprint)(this.compressedPublicKeyBytes,(0,c.getCurveByName)(this.curve).compressedPublicKeyLength)}neuter(){return new h({depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,chainCode:this.chainCodeBytes,publicKey:this.publicKeyBytes,curve:this.curve},s(h,r,"f",i))}async derive(e){return await g({path:e,node:this})}toJSON(){return{depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,curve:this.curve,privateKey:this.privateKey,publicKey:this.publicKey,chainCode:this.chainCode}}}function f(e){if(!(0,d.isValidInteger)(e))throw new Error(`Invalid HD tree path depth: The depth must be a positive integer. Received: "${String(e)}".`)}function p(e,t){if(!(0,d.isValidInteger)(e))throw new Error(`Invalid parent fingerprint: The fingerprint must be a positive integer. Received: "${String(e)}".`);if(0===t&&0!==e)throw new Error(`Invalid parent fingerprint: The fingerprint of the root node must be 0. Received: "${String(e)}".`);if(t>0&&0===e)throw new Error(`Invalid parent fingerprint: The fingerprint of a child node must not be 0. Received: "${String(e)}".`)}function m(e,t,n){if(e&&n>=2&&e===t)throw new Error(`Invalid parent fingerprint: The fingerprint of a child node cannot be equal to the master fingerprint. Received: "${String(t)}".`)}function y(e,t){if(0===t&&0!==e)throw new Error(`Invalid index: The index of the root node must be 0. Received: "${String(e)}".`)}async function g({path:e,node:t}){if(0===e.length)throw new Error("Invalid HD tree derivation path: Deriving a path of length 0 is not defined.");const n=t.depth+e.length;return f(n),await(0,u.deriveKeyFromPath)({path:e,node:t,depth:n})}n.SLIP10Node=h,r=h,i={value:Symbol("SLIP10Node.constructor")},n.validateBIP32Depth=f,n.validateParentFingerprint=p,n.validateMasterParentFingerprint=m,n.validateRootIndex=y,n.deriveChildNode=g},{"./constants.cjs":46,"./curves/index.cjs":50,"./derivation.cjs":52,"./derivers/bip32.cjs":53,"./utils.cjs":61,"@metamask/utils":72}],46:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BIP_32_HARDENED_OFFSET=n.BIP_39_PATH_REGEX=n.CIP_3_PATH_REGEX=n.SLIP_10_PATH_REGEX=n.BIP_32_PATH_REGEX=n.UNPREFIXED_BIP_32_PATH_REGEX=n.UNPREFIXED_PATH_REGEX=n.BIP44PurposeNodeToken=n.MAX_BIP_32_INDEX=n.MAX_UNHARDENED_BIP_32_INDEX=n.MAX_BIP_44_DEPTH=n.MIN_BIP_44_DEPTH=n.BYTES_KEY_LENGTH=void 0,n.BYTES_KEY_LENGTH=32,n.MIN_BIP_44_DEPTH=0,n.MAX_BIP_44_DEPTH=5,n.MAX_UNHARDENED_BIP_32_INDEX=2147483647,n.MAX_BIP_32_INDEX=4294967295,n.BIP44PurposeNodeToken="bip32:44'",n.UNPREFIXED_PATH_REGEX=/^\d+$/u,n.UNPREFIXED_BIP_32_PATH_REGEX=/^(?\d+)'?$/u,n.BIP_32_PATH_REGEX=/^bip32:\d+'?$/u,n.SLIP_10_PATH_REGEX=/^slip10:\d+'?$/u,n.CIP_3_PATH_REGEX=/^cip3:\d+'?$/u,n.BIP_39_PATH_REGEX=/^bip39:([a-z]+){1}( [a-z]+){11,23}$/u,n.BIP_32_HARDENED_OFFSET=2147483648},{}],47:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.mod=n.getCurveByName=n.curves=void 0;const o=s(e("./ed25519.cjs")),a=s(e("./ed25519Bip32.cjs")),c=s(e("./secp256k1.cjs"));n.curves={secp256k1:c,ed25519:o,ed25519Bip32:a},n.getCurveByName=function(e){return n.curves[e]};var u=e("@noble/curves/abstract/modular");Object.defineProperty(n,"mod",{enumerable:!0,get:function(){return u.mod}})},{"./ed25519.cjs":48,"./ed25519Bip32.cjs":49,"./secp256k1.cjs":51,"@noble/curves/abstract/modular":384}],48:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressedPublicKeyLength=n.masterNodeGenerationSpec=n.privateKeyLength=n.decompressPublicKey=n.compressPublicKey=n.publicAdd=n.getPublicKey=n.publicKeyLength=n.deriveUnhardenedKeys=n.isValidPrivateKey=n.secret=n.name=n.curve=void 0;const r=e("@metamask/utils"),i=e("@noble/curves/ed25519");n.curve=i.ed25519.CURVE,n.name="ed25519",n.secret=(0,r.stringToBytes)("ed25519 seed");n.isValidPrivateKey=e=>!0,n.deriveUnhardenedKeys=!1,n.publicKeyLength=33;n.getPublicKey=(e,t)=>{const n=i.ed25519.getPublicKey(e);return(0,r.concatBytes)([new Uint8Array([0]),n])};n.publicAdd=(e,t)=>{throw new Error("Ed25519 does not support public key derivation.")};n.compressPublicKey=e=>e;n.decompressPublicKey=e=>e,n.privateKeyLength=32,n.masterNodeGenerationSpec="slip10",n.compressedPublicKeyLength=33},{"@metamask/utils":72,"@noble/curves/ed25519":388}],49:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressedPublicKeyLength=n.masterNodeGenerationSpec=n.privateKeyLength=n.decompressPublicKey=n.compressPublicKey=n.publicAdd=n.getPublicKey=n.multiplyWithBase=n.bytesToNumberLE=n.publicKeyLength=n.deriveUnhardenedKeys=n.isValidPrivateKey=n.secret=n.name=n.curve=void 0;const r=e("@metamask/utils"),i=e("@noble/curves/abstract/modular"),s=e("@noble/curves/ed25519");function o(e,t){const n=e[t];return(0,r.assert)(void 0!==n,"Private key is too short."),n}n.curve=s.ed25519.CURVE,n.name="ed25519Bip32",n.secret=(0,r.stringToBytes)("");n.isValidPrivateKey=e=>!(7&o(e,0))&&(!(128&o(e,31))&&!(64&~o(e,31))),n.deriveUnhardenedKeys=!0,n.publicKeyLength=32;n.bytesToNumberLE=e=>(0,r.hexToBigInt)((0,r.bytesToHex)(Uint8Array.from(e).reverse()));n.multiplyWithBase=e=>{const t=(0,i.mod)((0,n.bytesToNumberLE)(e),n.curve.n);return s.ed25519.ExtendedPoint.BASE.multiply(t).toRawBytes()};n.getPublicKey=async(e,t)=>(0,n.multiplyWithBase)(e.slice(0,32));n.publicAdd=(e,t)=>s.ed25519.ExtendedPoint.fromHex((0,r.remove0x)((0,r.bytesToHex)(e))).add(s.ed25519.ExtendedPoint.fromHex((0,r.remove0x)((0,r.bytesToHex)(t)))).toRawBytes();n.compressPublicKey=e=>e;n.decompressPublicKey=e=>e,n.privateKeyLength=64,n.masterNodeGenerationSpec="cip3",n.compressedPublicKeyLength=32},{"@metamask/utils":72,"@noble/curves/abstract/modular":384,"@noble/curves/ed25519":388}],50:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.ed25519Bip32=n.ed25519=n.secp256k1=void 0,s(e("./curve.cjs"),n),n.secp256k1=o(e("./secp256k1.cjs")),n.ed25519=o(e("./ed25519.cjs")),n.ed25519Bip32=o(e("./ed25519Bip32.cjs"))},{"./curve.cjs":47,"./ed25519.cjs":48,"./ed25519Bip32.cjs":49,"./secp256k1.cjs":51}],51:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressedPublicKeyLength=n.masterNodeGenerationSpec=n.privateKeyLength=n.decompressPublicKey=n.compressPublicKey=n.publicAdd=n.getPublicKey=n.isValidPrivateKey=n.publicKeyLength=n.deriveUnhardenedKeys=n.secret=n.name=n.curve=void 0;const r=e("@metamask/utils"),i=e("@noble/curves/secp256k1"),s=e("../utils.cjs");n.curve=i.secp256k1.CURVE,n.name="secp256k1",n.secret=(0,r.stringToBytes)("Bitcoin seed"),n.deriveUnhardenedKeys=!0,n.publicKeyLength=65;n.isValidPrivateKey=e=>i.secp256k1.utils.isValidPrivateKey(e);n.getPublicKey=(e,t=!1)=>i.secp256k1.getPublicKey(e,t);n.publicAdd=(e,t)=>{(0,r.assert)((0,s.isValidBytesKey)(t,32),"Invalid tweak: Tweak must be a non-zero 32-byte Uint8Array.");const n=i.secp256k1.ProjectivePoint.fromHex(e).add(i.secp256k1.ProjectivePoint.fromPrivateKey(t));return n.assertValidity(),n.toRawBytes(!1)};n.compressPublicKey=e=>i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!0);n.decompressPublicKey=e=>i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1),n.privateKeyLength=32,n.masterNodeGenerationSpec="slip10",n.compressedPublicKeyLength=33},{"../utils.cjs":61,"@metamask/utils":72,"@noble/curves/secp256k1":389}],52:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validatePathSegment=n.deriveKeyFromPath=void 0;const r=e("@metamask/utils"),i=e("./BIP44CoinTypeNode.cjs"),s=e("./BIP44Node.cjs"),o=e("./constants.cjs"),a=e("./curves/index.cjs"),c=e("./derivers/index.cjs"),u=e("./SLIP10Node.cjs");function l(e,t,n){if(0===e.length)throw new Error("Invalid HD path segment: The segment must not be empty.");let i=!1;if(e.forEach(((e,t)=>{if(0===t){if(i=e instanceof Uint8Array||o.BIP_39_PATH_REGEX.test(e),!(e instanceof Uint8Array||i||o.BIP_32_PATH_REGEX.test(e)||o.SLIP_10_PATH_REGEX.test(e)||o.CIP_3_PATH_REGEX.test(e)))throw d()}else if(e instanceof Uint8Array||!o.BIP_32_PATH_REGEX.test(e)&&!o.SLIP_10_PATH_REGEX.test(e)&&!o.CIP_3_PATH_REGEX.test(e))throw d()})),n===o.MIN_BIP_44_DEPTH&&(!i||1!==e.length))throw new Error(`Invalid HD path segment: The segment must consist of a single BIP-39 node for depths of ${o.MIN_BIP_44_DEPTH}. Received: "${String(e)}".`);if(!t&&!i)throw new Error("Invalid derivation parameters: Must specify parent key if the first node of the path segment is not a BIP-39 node.");if(t&&i)throw new Error("Invalid derivation parameters: May not specify parent key if the path segment starts with a BIP-39 node.");const s=i?e.slice(1):e;if(s.length>0){const e=s[0]?.split(":")[0];(0,r.assert)(e),(0,r.assert)(s.every((t=>t.startsWith(`${e}:`))),"Invalid HD path segment: Cannot mix 'bip32' and 'slip10' path segments.")}}function d(){return new Error("Invalid HD path segment: The path segment is malformed.")}n.deriveKeyFromPath=async function(e){const{path:t,depth:n=t.length}=e,o="node"in e?e.node:void 0,h="curve"in e?e.curve:o?.curve;if(o&&!(o instanceof u.SLIP10Node)&&!(o instanceof s.BIP44Node)&&!(o instanceof i.BIP44CoinTypeNode))throw new Error("Invalid arguments: Node must be a SLIP-10 node or a BIP-44 node when provided.");if(!h)throw new Error("Invalid arguments: Must specify either a parent node or curve.");return l(t,Boolean(o?.privateKey)||Boolean(o?.publicKey),n),await t.reduce((async(e,t,n)=>{const i=await e;if("string"==typeof t){const[e,n]=t.split(":");(0,r.assert)(e),(0,r.assert)(n),(0,r.assert)(function(e){return e in c.derivers}(e),`Unknown derivation type: "${e}".`);const s=c.derivers[e];return await s.deriveChildKey({path:n,node:i,curve:(0,a.getCurveByName)(h)})}return(0,r.assert)(0===n,d()),await c.derivers.bip39.deriveChildKey({path:t,node:i,curve:(0,a.getCurveByName)(h)})}),Promise.resolve(o))},n.validatePathSegment=l},{"./BIP44CoinTypeNode.cjs":43,"./BIP44Node.cjs":44,"./SLIP10Node.cjs":45,"./constants.cjs":46,"./curves/index.cjs":50,"./derivers/index.cjs":56,"@metamask/utils":72}],53:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildKey=n.publicKeyToEthAddress=n.privateKeyToEthAddress=void 0;const r=e("@metamask/utils"),i=e("@noble/hashes/sha3"),s=e("../constants.cjs"),o=e("../curves/index.cjs"),a=e("../utils.cjs"),c=e("./shared.cjs");function u(e){return(0,r.assert)(e instanceof Uint8Array&&(0,a.isValidBytesKey)(e,o.secp256k1.publicKeyLength),"Invalid key: The key must be a 65-byte, non-zero Uint8Array."),(0,i.keccak_256)(e.slice(1)).slice(-20)}async function l(e,t){const{childIndex:n,privateKey:r,publicKey:i,isHardened:s,curve:o,chainCode:u}=t;if((0,a.validateBIP32Index)(n+1),r){const e=await(0,c.deriveSecretExtension)({privateKey:r,childIndex:n+1,isHardened:s,curve:o}),i=(0,c.generateEntropy)({chainCode:u,extension:e});return{...t,childIndex:n+1,entropy:i}}const l=(0,c.derivePublicExtension)({parentPublicKey:i,childIndex:n+1}),d=(0,c.generateEntropy)({chainCode:u,extension:l});return{...t,childIndex:n+1,entropy:d}}n.privateKeyToEthAddress=function(e){return(0,r.assert)(e instanceof Uint8Array&&(0,a.isValidBytesKey)(e,s.BYTES_KEY_LENGTH),"Invalid key: The key must be a 32-byte, non-zero Uint8Array."),u(o.secp256k1.getPublicKey(e,!1))},n.publicKeyToEthAddress=u,n.deriveChildKey=async function(e){return(0,r.assert)("secp256k1"===e.curve.name,"Invalid curve: Only secp256k1 is supported by BIP-32."),(0,c.deriveChildKey)(e,l)}},{"../constants.cjs":46,"../curves/index.cjs":50,"../utils.cjs":61,"./shared.cjs":57,"@metamask/utils":72,"@noble/hashes/sha3":398}],54:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.entropyToCip3MasterNode=n.createBip39KeyFromSeed=n.deriveChildKey=n.bip39MnemonicToMultipath=void 0;const r=e("@metamask/scure-bip39"),i=e("@metamask/scure-bip39/dist/wordlists/english.js"),s=e("@metamask/utils"),o=e("@noble/hashes/hmac"),a=e("@noble/hashes/pbkdf2"),c=e("@noble/hashes/sha512"),u=e("../constants.cjs"),l=e("../SLIP10Node.cjs"),d=e("../utils.cjs");async function h(e,t){(0,s.assert)(e.length>=16&&e.length<=64,"Invalid seed: The seed must be between 16 and 64 bytes long.");const n=(0,o.hmac)(c.sha512,t.secret,e),r=n.slice(0,u.BYTES_KEY_LENGTH),i=n.slice(u.BYTES_KEY_LENGTH);(0,s.assert)(t.isValidPrivateKey(r),"Invalid private key: The private key must greater than 0 and less than the curve order.");const a=(0,d.getFingerprint)(await t.getPublicKey(r,!0),t.compressedPublicKeyLength);return l.SLIP10Node.fromExtendedKey({privateKey:r,chainCode:i,masterFingerprint:a,depth:0,parentFingerprint:0,index:0,curve:t.name})}async function f(e,t){(0,s.assert)(e.length>=16&&e.length<=64,"Invalid entropy: The entropy must be between 16 and 64 bytes long.");const n=(0,a.pbkdf2)(c.sha512,t.secret,e,{c:4096,dkLen:96});n[0]&=248,n[31]&=31,n[31]|=64;const r=n.slice(0,t.privateKeyLength),i=n.slice(t.privateKeyLength);(0,s.assert)(t.isValidPrivateKey(r),"Invalid private key.");const o=(0,d.getFingerprint)(await t.getPublicKey(r),t.compressedPublicKeyLength);return l.SLIP10Node.fromExtendedKey({privateKey:r,chainCode:i,masterFingerprint:o,depth:0,parentFingerprint:0,index:0,curve:t.name})}n.bip39MnemonicToMultipath=function(e){return`bip39:${e.toLowerCase().trim()}`},n.deriveChildKey=async function({path:e,curve:t}){switch(t.masterNodeGenerationSpec){case"slip10":return h(await(0,r.mnemonicToSeed)(e,i.wordlist),t);case"cip3":return f((0,r.mnemonicToEntropy)(e,i.wordlist),t);default:throw new Error("Unsupported master node generation spec.")}},n.createBip39KeyFromSeed=h,n.entropyToCip3MasterNode=f},{"../SLIP10Node.cjs":45,"../constants.cjs":46,"../utils.cjs":61,"@metamask/scure-bip39":133,"@metamask/scure-bip39/dist/wordlists/english.js":134,"@metamask/utils":72,"@noble/hashes/hmac":394,"@noble/hashes/pbkdf2":395,"@noble/hashes/sha512":399}],55:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildKey=n.derivePublicKey=n.deriveChainCode=n.derivePrivateKey=n.getKeyExtension=n.add=n.mod2Pow256=n.trunc28Mul8=n.padEnd32Bytes=n.bigIntToBytes=n.bytesToBigInt=n.toReversed=void 0;const r=e("@metamask/utils"),i=e("../constants.cjs"),s=e("../curves/index.cjs"),o=e("../SLIP10Node.cjs"),a=e("../utils.cjs"),c=e("./shared.cjs");n.toReversed=e=>e.slice().reverse();n.bytesToBigInt=e=>{const t=(0,n.toReversed)(e),i=(0,r.bytesToHex)(t);return BigInt(i)};n.bigIntToBytes=e=>{const t=e.toString(16);return(0,n.toReversed)((0,r.hexToBytes)(t))};n.padEnd32Bytes=e=>(0,r.concatBytes)([e,new Uint8Array(Math.max(32-e.length,0)).fill(0)]);n.trunc28Mul8=e=>{const t=(0,n.bytesToBigInt)(e.slice(0,28))*BigInt(8);return(0,n.padEnd32Bytes)((0,n.bigIntToBytes)(t))};n.mod2Pow256=e=>(0,n.padEnd32Bytes)((0,n.bigIntToBytes)((0,s.mod)((0,n.bytesToBigInt)(e),BigInt(2)**BigInt(256))));n.add=(e,t)=>{const r=(0,n.bytesToBigInt)(e)+(0,n.bytesToBigInt)(t);return(0,n.padEnd32Bytes)((0,n.bigIntToBytes)(r)).slice(0,32)};n.getKeyExtension=(e,t,n)=>(0,r.concatBytes)([new Uint8Array([e]),t,(0,a.numberToUint32)(n,!0)]);const u=2,l=0;n.derivePrivateKey=async({parentNode:e,childIndex:t,isHardened:s})=>{const o=s?(0,n.getKeyExtension)(l,e.privateKeyBytes,t+i.BIP_32_HARDENED_OFFSET):(0,n.getKeyExtension)(u,e.publicKeyBytes,t),a=(0,c.generateEntropy)({chainCode:e.chainCodeBytes,extension:o}),d=a.subarray(0,32),h=a.subarray(32),f=e.privateKeyBytes.subarray(0,32),p=e.privateKeyBytes.subarray(32),m=(0,n.add)((0,n.trunc28Mul8)(d),f),y=(0,n.add)(h,p);return(0,r.concatBytes)([m,y])};const d=3,h=1;n.deriveChainCode=async({parentNode:e,childIndex:t,isHardened:r})=>{const s=r?(0,n.getKeyExtension)(h,e.privateKeyBytes,t+i.BIP_32_HARDENED_OFFSET):(0,n.getKeyExtension)(d,e.publicKeyBytes,t);return(0,c.generateEntropy)({chainCode:e.chainCodeBytes,extension:s}).subarray(32)};const f=2;n.derivePublicKey=async({parentNode:e,childIndex:t,curve:r})=>{const i=(0,n.getKeyExtension)(f,e.publicKeyBytes,t),s=(0,c.generateEntropy)({chainCode:e.chainCodeBytes,extension:i}).slice(0,32),o=await r.getPublicKey((0,n.trunc28Mul8)(s));return r.publicAdd(e.publicKeyBytes,o)},n.deriveChildKey=async function(e){const{curve:t,node:s,path:a}=e;(0,c.validateNode)(s);const{childIndex:u,isHardened:l}=(0,c.getValidatedPath)(a,s,t);if("ed25519Bip32"!==t.name||!s)throw new Error("Unsupported curve: Only ed25519Bip32 is supported by CIP3.");const d=u+(l?i.BIP_32_HARDENED_OFFSET:0),{privateKeyBytes:h,chainCodeBytes:f,publicKeyBytes:p,masterFingerprint:m,depth:y,fingerprint:g}=s;if(h){const e={privateKeyBytes:h,chainCodeBytes:f,publicKeyBytes:p},i=await(0,n.derivePrivateKey)({parentNode:e,childIndex:u,isHardened:l}),s=await(0,n.deriveChainCode)({parentNode:e,childIndex:u,isHardened:l});return o.SLIP10Node.fromExtendedKey({privateKey:(0,r.bytesToHex)(i),chainCode:(0,r.bytesToHex)(s),masterFingerprint:m,depth:y+1,parentFingerprint:g,index:d,curve:t.name})}(0,r.assert)(!l,"Invalid parameters: Cannot derive hardened child keys without a private key.");const b={chainCodeBytes:f,publicKeyBytes:p},v=await(0,n.derivePublicKey)({parentNode:b,childIndex:u,isHardened:!1,curve:t}),x=await(0,n.deriveChainCode)({parentNode:b,childIndex:u,isHardened:!1});return o.SLIP10Node.fromExtendedKey({publicKey:(0,r.bytesToHex)(v),chainCode:(0,r.bytesToHex)(x),masterFingerprint:m,depth:y+1,parentFingerprint:g,index:d,curve:t.name})}},{"../SLIP10Node.cjs":45,"../constants.cjs":46,"../curves/index.cjs":50,"../utils.cjs":61,"./shared.cjs":57,"@metamask/utils":72}],56:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.createBip39KeyFromSeed=n.derivers=void 0;const o=s(e("./bip32.cjs")),a=s(e("./bip39.cjs")),c=s(e("./cip3.cjs")),u=s(e("./slip10.cjs"));n.derivers={bip32:o,bip39:a,slip10:u,cip3:c};var l=e("./bip39.cjs");Object.defineProperty(n,"createBip39KeyFromSeed",{enumerable:!0,get:function(){return l.createBip39KeyFromSeed}})},{"./bip32.cjs":53,"./bip39.cjs":54,"./cip3.cjs":55,"./slip10.cjs":58}],57:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedPath=n.validateNode=n.generateEntropy=n.privateAdd=n.derivePublicChildKey=n.derivePublicExtension=n.deriveSecretExtension=n.deriveChildKey=void 0;const r=e("@metamask/utils"),i=e("@noble/hashes/hmac"),s=e("@noble/hashes/sha512"),o=e("../constants.cjs"),a=e("../curves/index.cjs"),c=e("../SLIP10Node.cjs"),u=e("../utils.cjs");async function l(e,t){const{privateKey:n,publicKey:r,entropy:i,childIndex:s,isHardened:a,depth:u,parentFingerprint:d,masterFingerprint:h,curve:m}=e;try{return n?await async function({entropy:e,privateKey:t,depth:n,masterFingerprint:r,parentFingerprint:i,childIndex:s,isHardened:a,curve:u}){const l=s+(a?o.BIP_32_HARDENED_OFFSET:0),{privateKey:d,chainCode:h}=await async function({privateKey:e,entropy:t,curve:n}){const r=t.slice(0,32),i=t.slice(32);if("ed25519"===n.name){return{privateKey:r,publicKey:await n.getPublicKey(r),chainCode:i}}const s=p(e,r,n),o=await n.getPublicKey(s);return{privateKey:s,publicKey:o,chainCode:i}}({privateKey:t,entropy:e,curve:u});return await c.SLIP10Node.fromExtendedKey({privateKey:d,chainCode:h,depth:n+1,masterFingerprint:r,parentFingerprint:i,index:l,curve:u.name})}({entropy:i,privateKey:n,depth:u,masterFingerprint:h,parentFingerprint:d,childIndex:s,isHardened:a,curve:m}):await f({entropy:i,publicKey:r,depth:u,masterFingerprint:h,parentFingerprint:d,childIndex:s,curve:m})}catch(n){return await l(await t(n,e),t)}}async function d({privateKey:e,childIndex:t,isHardened:n,curve:i}){if(n)return(0,r.concatBytes)([new Uint8Array([0]),e,(0,u.numberToUint32)(t+o.BIP_32_HARDENED_OFFSET)]);return h({parentPublicKey:await i.getPublicKey(e,!0),childIndex:t})}function h({parentPublicKey:e,childIndex:t}){return(0,r.concatBytes)([e,(0,u.numberToUint32)(t)])}async function f({entropy:e,publicKey:t,depth:n,masterFingerprint:r,parentFingerprint:i,childIndex:s,curve:o}){const{publicKey:a,chainCode:u}=function({publicKey:e,entropy:t,curve:n}){const r=t.slice(0,32),i=t.slice(32);return{publicKey:n.publicAdd(e,r),chainCode:i}}({publicKey:t,entropy:e,curve:o});return await c.SLIP10Node.fromExtendedKey({publicKey:a,chainCode:u,depth:n+1,masterFingerprint:r,parentFingerprint:i,index:s,curve:o.name})}function p(e,t,n){(0,r.assert)((0,u.isValidBytesKey)(t,32),"Invalid tweak: Tweak must be a non-zero 32-byte Uint8Array.");const i=(0,r.bytesToBigInt)(e),s=(0,r.bytesToBigInt)(t);if(s>=n.curve.n)throw new Error("Invalid tweak: Tweak is larger than the curve order.");const o=(0,a.mod)(i+s,n.curve.n),c=(0,r.hexToBytes)(o.toString(16).padStart(64,"0"));if(!n.isValidPrivateKey(c))throw new Error("Invalid private key or tweak: The resulting private key is invalid.");return c}function m({chainCode:e,extension:t}){return(0,i.hmac)(s.sha512,e,t)}function y(e){(0,r.assert)(e,"Invalid parameters: Must specify a node to derive from.")}function g(e,t,n){!function(e,t,n){(0,r.assert)("string"==typeof e,"Invalid path: Must be a string.");const i=e.endsWith("'");(0,r.assert)(!i||t.privateKey,"Invalid parameters: Cannot derive hardened child keys without a private key."),(0,r.assert)(i||n.deriveUnhardenedKeys,`Invalid path: Cannot derive unhardened child keys with ${n.name}.`)}(e,t,n);const i=e.split("'")[0];(0,r.assert)(i);const s=parseInt(i,10);if(!o.UNPREFIXED_PATH_REGEX.test(i)||!Number.isInteger(s)||s<0||s>=o.BIP_32_HARDENED_OFFSET)throw new Error(`Invalid path: The index must be a non-negative decimal integer less than ${o.BIP_32_HARDENED_OFFSET}.`);return{childIndex:s,isHardened:e.includes("'")}}n.deriveChildKey=async function({path:e,node:t,curve:n},r){y(t);const{childIndex:i,isHardened:s}=g(e,t,n),o={chainCode:t.chainCodeBytes,childIndex:i,isHardened:s,depth:t.depth,parentFingerprint:t.fingerprint,masterFingerprint:t.masterFingerprint,curve:n};if(t.privateKeyBytes){const e=await d({privateKey:t.privateKeyBytes,childIndex:i,isHardened:s,curve:n}),a=m({chainCode:t.chainCodeBytes,extension:e});return await l({privateKey:t.privateKeyBytes,entropy:a,...o},r)}const a=h({parentPublicKey:t.compressedPublicKeyBytes,childIndex:i}),c=m({chainCode:t.chainCodeBytes,extension:a});return await l({publicKey:t.compressedPublicKeyBytes,entropy:c,...o},r)},n.deriveSecretExtension=d,n.derivePublicExtension=h,n.derivePublicChildKey=f,n.privateAdd=p,n.generateEntropy=m,n.validateNode=y,n.getValidatedPath=g},{"../SLIP10Node.cjs":45,"../constants.cjs":46,"../curves/index.cjs":50,"../utils.cjs":61,"@metamask/utils":72,"@noble/hashes/hmac":394,"@noble/hashes/sha512":399}],58:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildKey=void 0;const r=e("@metamask/utils"),i=e("../constants.cjs"),s=e("../utils.cjs"),o=e("./shared.cjs");async function a(e,t){const{curve:n,isHardened:a,childIndex:c,entropy:u,chainCode:l}=t;if("ed25519"===n.name)throw e;const d=a?c+i.BIP_32_HARDENED_OFFSET:c,h=(0,o.generateEntropy)({chainCode:l,extension:(0,r.concatBytes)([1,u.slice(32,64),(0,s.numberToUint32)(d)])});return{...t,entropy:h}}n.deriveChildKey=async function(e){return await(0,o.deriveChildKey)(e,a)}},{"../constants.cjs":46,"../utils.cjs":61,"./shared.cjs":57,"@metamask/utils":72}],59:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.encodeExtendedKey=n.decodeExtendedKey=n.PRIVATE_KEY_VERSION=n.PUBLIC_KEY_VERSION=void 0;const r=e("@metamask/utils"),i=e("./BIP44Node.cjs"),s=e("./curves/secp256k1.cjs"),o=e("./utils.cjs");n.PUBLIC_KEY_VERSION=76067358,n.PRIVATE_KEY_VERSION=76066276;n.decodeExtendedKey=e=>{const t=(0,o.decodeBase58check)(e);if(78!==t.length)throw new Error(`Invalid extended key: Expected a length of 78, got ${t.length}.`);const a=(0,r.createDataView)(t),c=a.getUint32(0,!1),u=a.getUint8(4);(0,i.validateBIP44Depth)(u);const l=a.getUint32(5,!1),d=a.getUint32(9,!1),h=t.slice(13,45);if(!(0,o.isValidBytesKey)(h,32))throw new Error("Invalid extended key: Chain code must be a 32-byte non-zero byte array.");const f=t.slice(45,78);if(!(0,o.isValidBytesKey)(f,33))throw new Error("Invalid extended key: Key must be a 33-byte non-zero byte array.");const p=(0,r.createDataView)(f);if(c===n.PUBLIC_KEY_VERSION){if(2!==p.getUint8(0)&&3!==p.getUint8(0))throw new Error("Invalid extended key: Public key must start with 0x02 or 0x03.");return{version:c,depth:u,parentFingerprint:l,index:d,chainCode:h,publicKey:(0,s.decompressPublicKey)(f)}}if(c===n.PRIVATE_KEY_VERSION){if(0!==p.getUint8(0))throw new Error("Invalid extended key: Private key must start with 0x00.");return{version:c,depth:u,parentFingerprint:l,index:d,chainCode:h,privateKey:f.slice(1)}}throw new Error("Invalid extended key: Expected a public (xpub) or private key (xprv) version.")};n.encodeExtendedKey=e=>{const{version:t,depth:i,parentFingerprint:a,index:c,chainCode:u}=e,l=new Uint8Array(78),d=(0,r.createDataView)(l);if(d.setUint32(0,t,!1),d.setUint8(4,i),d.setUint32(5,a,!1),d.setUint32(9,c,!1),l.set(u,13),e.version===n.PUBLIC_KEY_VERSION){const{publicKey:t}=e,n=(0,s.compressPublicKey)(t);l.set(n,45)}if(e.version===n.PRIVATE_KEY_VERSION){const{privateKey:t}=e;l.set(t,46)}return(0,o.encodeBase58check)(l)}},{"./BIP44Node.cjs":44,"./curves/secp256k1.cjs":51,"./utils.cjs":61,"@metamask/utils":72}],60:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.createBip39KeyFromSeed=n.mnemonicPhraseToBytes=n.isValidBIP32PathSegment=n.getBIP44CoinTypeToAddressPathTuple=n.getBIP44AddressKeyDeriver=n.deriveBIP44AddressKey=n.BIP_44_COIN_TYPE_DEPTH=n.BIP44CoinTypeNode=n.ed25519Bip32=n.ed25519=n.secp256k1=n.SLIP10Node=n.BIP44Node=void 0;var s=e("./BIP44Node.cjs");Object.defineProperty(n,"BIP44Node",{enumerable:!0,get:function(){return s.BIP44Node}});var o=e("./SLIP10Node.cjs");Object.defineProperty(n,"SLIP10Node",{enumerable:!0,get:function(){return o.SLIP10Node}});var a=e("./curves/index.cjs");Object.defineProperty(n,"secp256k1",{enumerable:!0,get:function(){return a.secp256k1}}),Object.defineProperty(n,"ed25519",{enumerable:!0,get:function(){return a.ed25519}}),Object.defineProperty(n,"ed25519Bip32",{enumerable:!0,get:function(){return a.ed25519Bip32}});var c=e("./BIP44CoinTypeNode.cjs");Object.defineProperty(n,"BIP44CoinTypeNode",{enumerable:!0,get:function(){return c.BIP44CoinTypeNode}}),Object.defineProperty(n,"BIP_44_COIN_TYPE_DEPTH",{enumerable:!0,get:function(){return c.BIP_44_COIN_TYPE_DEPTH}}),Object.defineProperty(n,"deriveBIP44AddressKey",{enumerable:!0,get:function(){return c.deriveBIP44AddressKey}}),Object.defineProperty(n,"getBIP44AddressKeyDeriver",{enumerable:!0,get:function(){return c.getBIP44AddressKeyDeriver}}),i(e("./constants.cjs"),n);var u=e("./utils.cjs");Object.defineProperty(n,"getBIP44CoinTypeToAddressPathTuple",{enumerable:!0,get:function(){return u.getBIP44CoinTypeToAddressPathTuple}}),Object.defineProperty(n,"isValidBIP32PathSegment",{enumerable:!0,get:function(){return u.isValidBIP32PathSegment}}),Object.defineProperty(n,"mnemonicPhraseToBytes",{enumerable:!0,get:function(){return u.mnemonicPhraseToBytes}});var l=e("./derivers/index.cjs");Object.defineProperty(n,"createBip39KeyFromSeed",{enumerable:!0,get:function(){return l.createBip39KeyFromSeed}})},{"./BIP44CoinTypeNode.cjs":43,"./BIP44Node.cjs":44,"./SLIP10Node.cjs":45,"./constants.cjs":46,"./curves/index.cjs":50,"./derivers/index.cjs":56,"./utils.cjs":61}],61:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.numberToUint32=n.validateCurve=n.mnemonicPhraseToBytes=n.getFingerprint=n.encodeBase58check=n.decodeBase58check=n.getBytesUnsafe=n.getBytes=n.isValidInteger=n.isValidBytesKey=n.nullableHexStringToBytes=n.hexStringToBytes=n.isHardened=n.isValidBIP32PathSegment=n.isValidBIP32Index=n.validateBIP32Index=n.getBIP32NodeToken=n.getUnhardenedBIP32NodeToken=n.getHardenedBIP32NodeToken=n.getBIP44CoinTypeToAddressPathTuple=n.getBIP44ChangePathString=n.getBIP44CoinTypePathString=void 0;const r=e("@metamask/scure-bip39/dist/wordlists/english.js"),i=e("@metamask/utils"),s=e("@noble/hashes/ripemd160"),o=e("@noble/hashes/sha256"),a=e("@scure/base"),c=e("./constants.cjs"),u=e("./curves/index.cjs");function l(e){return f(e),`${d(e)}'`}function d(e){return f(e),`bip32:${e}`}function h(e){if("number"==typeof e)return d(e);if(!e||!Number.isInteger(e.index)||"boolean"!=typeof e.hardened)throw new Error("Invalid BIP-32 index: Must be an object containing the index and whether it is hardened.");return e.hardened?l(e.index):d(e.index)}function f(e){if(!p(e))throw new Error("Invalid BIP-32 index: Must be a non-negative integer.")}function p(e){return g(e)&&e<=c.MAX_BIP_32_INDEX}function m(e){return e instanceof Uint8Array?e:(0,i.hexToBytes)(e)}function y(e,t){if(e.length!==t)return!1;for(const t of e)if(0!==t)return!0;return!1}function g(e){return"number"==typeof e&&Number.isInteger(e)&&e>=0}function b(e,t){if(!y(e,t))throw new Error(`Invalid value: Must be a non-zero ${t}-byte byte array.`)}n.getBIP44CoinTypePathString=function(e){return`m / ${c.BIP44PurposeNodeToken} / ${l(e)}`},n.getBIP44ChangePathString=function(e,t){return`${e} / ${l(t.account??0)} / ${h(t.change??0)}`},n.getBIP44CoinTypeToAddressPathTuple=function({account:e=0,change:t=0,address_index:n}){return[l(e),h(t),h(n)]},n.getHardenedBIP32NodeToken=l,n.getUnhardenedBIP32NodeToken=d,n.getBIP32NodeToken=h,n.validateBIP32Index=f,n.isValidBIP32Index=p,n.isValidBIP32PathSegment=function(e){if("string"!=typeof e)return!1;const t=e.match(c.UNPREFIXED_BIP_32_PATH_REGEX);if(void 0===t?.groups?.index)return!1;const n=parseInt(t.groups.index,10);return g(n)&&n<=c.MAX_UNHARDENED_BIP_32_INDEX},n.isHardened=function(e){return e.endsWith("'")},n.hexStringToBytes=m,n.nullableHexStringToBytes=function(e){if(void 0!==e)return m(e)},n.isValidBytesKey=y,n.isValidInteger=g,n.getBytes=function(e,t){if(e instanceof Uint8Array)return b(e,t),e;if("string"==typeof e){const n=(0,i.hexToBytes)(e);return b(n,t),n}throw new Error("Invalid value: Expected an instance of Uint8Array or hexadecimal string.")},n.getBytesUnsafe=function e(t,n){if(t instanceof Uint8Array)return(0,i.assert)(t.length===n,`Invalid value: Must be a ${n}-byte byte array.`),t;if("string"==typeof t)return e((0,i.hexToBytes)(t),n);throw new Error("Invalid value: Expected an instance of Uint8Array or hexadecimal string.")};n.decodeBase58check=e=>{const t=(0,a.base58check)(o.sha256);try{return t.decode(e)}catch{throw new Error("Invalid extended key: Value is not base58-encoded, or the checksum is invalid.")}};n.encodeBase58check=e=>(0,a.base58check)(o.sha256).encode(e);n.getFingerprint=(e,t)=>{if(!y(e,t))throw new Error(`Invalid public key: The key must be a ${t}-byte, non-zero byte array.`);const n=(0,s.ripemd160)((0,o.sha256)(e));return(0,i.createDataView)(n).getUint32(0,!1)},n.mnemonicPhraseToBytes=function(e){const t=e.split(" ").map((e=>{const t=r.wordlist.indexOf(e);return(0,i.assert)(-1!==t,`Invalid mnemonic phrase: Unknown word "${e}".`),t}));return new Uint8Array(new Uint16Array(t).buffer)},n.validateCurve=function(e){if(!e||"string"!=typeof e)throw new Error("Invalid curve: Must specify a curve.");if(!Object.keys(u.curves).includes(e))throw new Error(`Invalid curve: Only the following curves are supported: ${Object.keys(u.curves).join(", ")}.`)},n.numberToUint32=function(e,t=!1){const n=new Uint8Array(4);return(0,i.createDataView)(n).setUint32(0,e,t),n}},{"./constants.cjs":46,"./curves/index.cjs":50,"@metamask/scure-bip39/dist/wordlists/english.js":134,"@metamask/utils":72,"@noble/hashes/ripemd160":396,"@noble/hashes/sha256":397,"@scure/base":401}],62:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertExhaustive=n.assertStruct=n.assert=n.AssertionError=void 0;const r=e("@metamask/superstruct"),i=e("./errors.cjs");function s(e,t){return n=e,Boolean("string"==typeof n?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var n}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}n.AssertionError=o,n.assert=function(e,t="Assertion failed.",n=o){if(!e){if(t instanceof Error)throw t;throw s(n,t)}},n.assertStruct=function(e,t,n="Assertion failed",a=o){try{(0,r.assert)(e,t)}catch(e){throw s(a,`${n}: ${function(e){return(0,i.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},n.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},{"./errors.cjs":70,"@metamask/superstruct":352}],63:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.base64=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs");n.base64=(e,t={})=>{const n=t.paddingRequired??!1,s=t.characterSet??"base64";let o,a;return"base64"===s?o=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===s),o=String.raw`[-_A-Za-z0-9]`),a=n?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,r.pattern)(e,a)}},{"./assert.cjs":62,"@metamask/superstruct":352}],64:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDataView=n.concatBytes=n.valueToBytes=n.base64ToBytes=n.stringToBytes=n.numberToBytes=n.signedBigIntToBytes=n.bigIntToBytes=n.hexToBytes=n.bytesToBase64=n.bytesToString=n.bytesToNumber=n.bytesToSignedBigInt=n.bytesToBigInt=n.bytesToHex=n.assertIsBytes=n.isBytes=void 0;const r=e("@scure/base"),i=e("./assert.cjs"),s=e("./hex.cjs"),o=48,a=58,c=87;const u=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 l(e){return e instanceof Uint8Array}function d(e){(0,i.assert)(l(e),"Value must be a Uint8Array.")}function h(e){if(d(e),0===e.length)return"0x";const t=u(),n=new Array(e.length);for(let r=0;r=BigInt(0),"Value must be a non-negative bigint.");return p(e.toString(16))}function y(e){(0,i.assert)("number"==typeof e,"Value must be a number."),(0,i.assert)(e>=0,"Value must be a non-negative number."),(0,i.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return p(e.toString(16))}function g(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return m(e);if("number"==typeof e)return y(e);if("string"==typeof e)return e.startsWith("0x")?p(e):g(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}n.isBytes=l,n.assertIsBytes=d,n.bytesToHex=h,n.bytesToBigInt=f,n.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const n of e)t=(t<0,"Byte length must be greater than 0."),(0,i.assert)(function(e,t){(0,i.assert)(t>0);const n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let n=e;const r=new Uint8Array(t);for(let e=0;e>=BigInt(8);return r.reverse()},n.numberToBytes=y,n.stringToBytes=g,n.base64ToBytes=function(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),r.base64.decode(e)},n.valueToBytes=b,n.concatBytes=function(e){const t=new Array(e.length);let n=0;for(let r=0;r[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,n.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,n.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,n.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,n.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,n.CaipChainIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_CHAIN_ID_REGEX),n.CaipNamespaceStruct=(0,r.pattern)((0,r.string)(),n.CAIP_NAMESPACE_REGEX),n.CaipReferenceStruct=(0,r.pattern)((0,r.string)(),n.CAIP_REFERENCE_REGEX),n.CaipAccountIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ACCOUNT_ID_REGEX),n.CaipAccountAddressStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ACCOUNT_ADDRESS_REGEX),n.CaipAssetTypeStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ASSET_TYPE_REGEX),n.CaipAssetIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(n.KnownCaipNamespace||(n.KnownCaipNamespace={})),n.isCaipChainId=function(e){return(0,r.is)(e,n.CaipChainIdStruct)},n.isCaipNamespace=i,n.isCaipReference=s,n.isCaipAccountId=function(e){return(0,r.is)(e,n.CaipAccountIdStruct)},n.isCaipAccountAddress=function(e){return(0,r.is)(e,n.CaipAccountAddressStruct)},n.isCaipAssetType=function(e){return(0,r.is)(e,n.CaipAssetTypeStruct)},n.isCaipAssetId=function(e){return(0,r.is)(e,n.CaipAssetIdStruct)},n.parseCaipChainId=function(e){const t=n.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},n.parseCaipAccountId=function(e){const t=n.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.toCaipChainId=function(e,t){if(!i(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!s(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}},{"@metamask/superstruct":352}],66:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ChecksumStruct=void 0;const r=e("@metamask/superstruct"),i=e("./base64.cjs");n.ChecksumStruct=(0,r.size)((0,i.base64)((0,r.string)(),{paddingRequired:!0}),44,44)},{"./base64.cjs":63,"@metamask/superstruct":352}],67:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createHex=n.createBytes=n.createBigInt=n.createNumber=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs"),s=e("./bytes.cjs"),o=e("./hex.cjs"),a=(0,r.union)([(0,r.number)(),(0,r.bigint)(),(0,r.string)(),o.StrictHexStruct]),c=(0,r.coerce)((0,r.number)(),a,Number),u=(0,r.coerce)((0,r.bigint)(),a,BigInt),l=((0,r.union)([o.StrictHexStruct,(0,r.instance)(Uint8Array)]),(0,r.coerce)((0,r.instance)(Uint8Array),(0,r.union)([o.StrictHexStruct]),s.hexToBytes)),d=(0,r.coerce)(o.StrictHexStruct,(0,r.instance)(Uint8Array),s.bytesToHex);n.createNumber=function(e){try{const t=(0,r.create)(e,c);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof r.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},n.createBigInt=function(e){try{return(0,r.create)(e,u)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},n.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,r.create)(e,l)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},n.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,r.create)(e,d)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},{"./assert.cjs":62,"./bytes.cjs":64,"./hex.cjs":71,"@metamask/superstruct":352}],68:[function(e,t,n){"use strict";var r,i,s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.FrozenSet=n.FrozenMap=void 0;class a{get size(){return s(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return s(this,r,"f")[Symbol.iterator]()}constructor(e){r.set(this,void 0),o(this,r,new Map(e),"f"),Object.freeze(this)}entries(){return s(this,r,"f").entries()}forEach(e,t){return s(this,r,"f").forEach(((n,r,i)=>e.call(t,n,r,this)))}get(e){return s(this,r,"f").get(e)}has(e){return s(this,r,"f").has(e)}keys(){return s(this,r,"f").keys()}values(){return s(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}n.FrozenMap=a;class c{get size(){return s(this,i,"f").size}[(i=new WeakMap,Symbol.iterator)](){return s(this,i,"f")[Symbol.iterator]()}constructor(e){i.set(this,void 0),o(this,i,new Set(e),"f"),Object.freeze(this)}entries(){return s(this,i,"f").entries()}forEach(e,t){return s(this,i,"f").forEach(((n,r,i)=>e.call(t,n,r,this)))}has(e){return s(this,i,"f").has(e)}keys(){return s(this,i,"f").keys()}values(){return s(this,i,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}n.FrozenSet=c,Object.freeze(a),Object.freeze(a.prototype),Object.freeze(c),Object.freeze(c.prototype)},{}],69:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],70:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.wrapError=n.getErrorMessage=n.isErrorWithStack=n.isErrorWithMessage=n.isErrorWithCode=void 0;const r=e("pony-cause"),i=e("./misc.cjs");function s(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}n.isErrorWithCode=s,n.isErrorWithMessage=o,n.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},n.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,i.isNullOrUndefined)(e)?"":String(e)},n.wrapError=function(e,t){if((n=e)instanceof Error||(0,i.isObject)(n)&&"Error"===n.constructor.name){let n;return n=2===Error.length?new Error(t,{cause:e}):new r.ErrorWithCause(t,{cause:e}),s(e)&&(n.code=e.code),n}var n;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}},{"./misc.cjs":76,"pony-cause":564}],71:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.remove0x=n.add0x=n.isValidChecksumAddress=n.getChecksumAddress=n.isValidHexAddress=n.assertIsStrictHexString=n.assertIsHexString=n.isStrictHexString=n.isHexString=n.HexChecksumAddressStruct=n.HexAddressStruct=n.StrictHexStruct=n.HexStruct=void 0;const r=e("@metamask/superstruct"),i=e("@noble/hashes/sha3"),s=e("./assert.cjs"),o=e("./bytes.cjs");function a(e){return(0,r.is)(e,n.HexStruct)}function c(e){return(0,r.is)(e,n.StrictHexStruct)}function u(e){(0,s.assert)((0,r.is)(e,n.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),a=d((0,o.bytesToHex)((0,i.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const n=a[t];return(0,s.assert)((0,r.is)(n,(0,r.string)()),"Hash shorter than address."),parseInt(n,16)>7?e.toUpperCase():e})).join("")}`}function l(e){return!!(0,r.is)(e,n.HexChecksumAddressStruct)&&u(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}n.HexStruct=(0,r.pattern)((0,r.string)(),/^(?:0x)?[0-9a-f]+$/iu),n.StrictHexStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]+$/iu),n.HexAddressStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]{40}$/u),n.HexChecksumAddressStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-fA-F]{40}$/u),n.isHexString=a,n.isStrictHexString=c,n.assertIsHexString=function(e){(0,s.assert)(a(e),"Value must be a hexadecimal string.")},n.assertIsStrictHexString=function(e){(0,s.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},n.isValidHexAddress=function(e){return(0,r.is)(e,n.HexAddressStruct)||l(e)},n.getChecksumAddress=u,n.isValidChecksumAddress=l,n.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},n.remove0x=d},{"./assert.cjs":62,"./bytes.cjs":64,"@metamask/superstruct":352,"@noble/hashes/sha3":398}],72:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./assert.cjs"),n),i(e("./base64.cjs"),n),i(e("./bytes.cjs"),n),i(e("./caip-types.cjs"),n),i(e("./checksum.cjs"),n),i(e("./coercers.cjs"),n),i(e("./collections.cjs"),n),i(e("./encryption-types.cjs"),n),i(e("./errors.cjs"),n),i(e("./hex.cjs"),n),i(e("./json.cjs"),n),i(e("./keyring.cjs"),n),i(e("./logging.cjs"),n),i(e("./misc.cjs"),n),i(e("./number.cjs"),n),i(e("./opaque.cjs"),n),i(e("./promise.cjs"),n),i(e("./time.cjs"),n),i(e("./transaction-types.cjs"),n),i(e("./versions.cjs"),n)},{"./assert.cjs":62,"./base64.cjs":63,"./bytes.cjs":64,"./caip-types.cjs":65,"./checksum.cjs":66,"./coercers.cjs":67,"./collections.cjs":68,"./encryption-types.cjs":69,"./errors.cjs":70,"./hex.cjs":71,"./json.cjs":73,"./keyring.cjs":74,"./logging.cjs":75,"./misc.cjs":76,"./number.cjs":77,"./opaque.cjs":78,"./promise.cjs":79,"./time.cjs":80,"./transaction-types.cjs":81,"./versions.cjs":82}],73:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonRpcIdValidator=n.assertIsJsonRpcError=n.isJsonRpcError=n.assertIsJsonRpcFailure=n.isJsonRpcFailure=n.assertIsJsonRpcSuccess=n.isJsonRpcSuccess=n.assertIsJsonRpcResponse=n.isJsonRpcResponse=n.assertIsPendingJsonRpcResponse=n.isPendingJsonRpcResponse=n.JsonRpcResponseStruct=n.JsonRpcFailureStruct=n.JsonRpcSuccessStruct=n.PendingJsonRpcResponseStruct=n.assertIsJsonRpcRequest=n.isJsonRpcRequest=n.assertIsJsonRpcNotification=n.isJsonRpcNotification=n.JsonRpcNotificationStruct=n.JsonRpcRequestStruct=n.JsonRpcParamsStruct=n.JsonRpcErrorStruct=n.JsonRpcIdStruct=n.JsonRpcVersionStruct=n.jsonrpc2=n.getJsonSize=n.getSafeJson=n.isValidJson=n.JsonStruct=n.UnsafeJsonStruct=n.exactOptional=n.object=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs"),s=e("./misc.cjs");function o({path:e,branch:t}){const n=e[e.length-1];return(0,s.hasProperty)(t[t.length-2],n)}function a(e){return new r.Struct({...e,type:`optional ${e.type}`,validator:(t,n)=>!o(n)||e.validator(t,n),refiner:(t,n)=>!o(n)||e.refiner(t,n)})}n.object=e=>(0,r.object)(e),n.exactOptional=a;function c(e){return(0,r.create)(e,n.JsonStruct)}n.UnsafeJsonStruct=(0,r.union)([(0,r.literal)(null),(0,r.boolean)(),(0,r.define)("finite number",(e=>(0,r.is)(e,(0,r.number)())&&Number.isFinite(e))),(0,r.string)(),(0,r.array)((0,r.lazy)((()=>n.UnsafeJsonStruct))),(0,r.record)((0,r.string)(),(0,r.lazy)((()=>n.UnsafeJsonStruct)))]),n.JsonStruct=(0,r.coerce)(n.UnsafeJsonStruct,(0,r.any)(),(e=>((0,i.assertStruct)(e,n.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))))),n.isValidJson=function(e){try{return c(e),!0}catch{return!1}},n.getSafeJson=c,n.getJsonSize=function(e){(0,i.assertStruct)(e,n.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},n.jsonrpc2="2.0",n.JsonRpcVersionStruct=(0,r.literal)(n.jsonrpc2),n.JsonRpcIdStruct=(0,r.nullable)((0,r.union)([(0,r.number)(),(0,r.string)()])),n.JsonRpcErrorStruct=(0,n.object)({code:(0,r.integer)(),message:(0,r.string)(),data:a(n.JsonStruct),stack:a((0,r.string)())}),n.JsonRpcParamsStruct=(0,r.union)([(0,r.record)((0,r.string)(),n.JsonStruct),(0,r.array)(n.JsonStruct)]),n.JsonRpcRequestStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:a(n.JsonRpcParamsStruct)}),n.JsonRpcNotificationStruct=(0,n.object)({jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:a(n.JsonRpcParamsStruct)}),n.isJsonRpcNotification=function(e){return(0,r.is)(e,n.JsonRpcNotificationStruct)},n.assertIsJsonRpcNotification=function(e,t){(0,i.assertStruct)(e,n.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},n.isJsonRpcRequest=function(e){return(0,r.is)(e,n.JsonRpcRequestStruct)},n.assertIsJsonRpcRequest=function(e,t){(0,i.assertStruct)(e,n.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},n.PendingJsonRpcResponseStruct=(0,r.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:(0,r.optional)((0,r.unknown)()),error:(0,r.optional)(n.JsonRpcErrorStruct)}),n.JsonRpcSuccessStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:n.JsonStruct}),n.JsonRpcFailureStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,error:n.JsonRpcErrorStruct}),n.JsonRpcResponseStruct=(0,r.union)([n.JsonRpcSuccessStruct,n.JsonRpcFailureStruct]),n.isPendingJsonRpcResponse=function(e){return(0,r.is)(e,n.PendingJsonRpcResponseStruct)},n.assertIsPendingJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,n.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},n.isJsonRpcResponse=function(e){return(0,r.is)(e,n.JsonRpcResponseStruct)},n.assertIsJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,n.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},n.isJsonRpcSuccess=function(e){return(0,r.is)(e,n.JsonRpcSuccessStruct)},n.assertIsJsonRpcSuccess=function(e,t){(0,i.assertStruct)(e,n.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},n.isJsonRpcFailure=function(e){return(0,r.is)(e,n.JsonRpcFailureStruct)},n.assertIsJsonRpcFailure=function(e,t){(0,i.assertStruct)(e,n.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},n.isJsonRpcError=function(e){return(0,r.is)(e,n.JsonRpcErrorStruct)},n.assertIsJsonRpcError=function(e,t){(0,i.assertStruct)(e,n.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},n.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:n,permitNull:r}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(n||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||r&&null===e)}},{"./assert.cjs":62,"./misc.cjs":76,"@metamask/superstruct":352}],74:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],75:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.createProjectLogger=void 0;const i=(0,r(e("debug")).default)("metamask");n.createProjectLogger=function(e){return i.extend(e)},n.createModuleLogger=function(e,t){return e.extend(t)}},{debug:462}],76:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.calculateNumberSize=n.calculateStringSize=n.isASCII=n.isPlainObject=n.ESCAPE_CHARACTERS_REGEXP=n.JsonSize=n.getKnownPropertyNames=n.hasProperty=n.isObject=n.isNullOrUndefined=n.isNonEmptyArray=void 0,n.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},n.isNullOrUndefined=function(e){return null==e},n.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function r(e){return e.charCodeAt(0)<=127}n.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),n.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(n.JsonSize||(n.JsonSize={})),n.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,n.isPlainObject=function(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}},n.isASCII=r,n.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(e.match(n.ESCAPE_CHARACTERS_REGEXP)??[]).length},n.calculateNumberSize=function(e){return e.toString().length}},{}],77:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hexToBigInt=n.hexToNumber=n.bigIntToHex=n.numberToHex=void 0;const r=e("./assert.cjs"),i=e("./hex.cjs");n.numberToHex=e=>((0,r.assert)("number"==typeof e,"Value must be a number."),(0,r.assert)(e>=0,"Value must be a non-negative number."),(0,r.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16)));n.bigIntToHex=e=>((0,r.assert)("bigint"==typeof e,"Value must be a bigint."),(0,r.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16)));n.hexToNumber=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,r.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};n.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))},{"./assert.cjs":62,"./hex.cjs":71}],78:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],79:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDeferredPromise=void 0,n.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,n;const r=new Promise(((e,r)=>{t=e,n=r}));return e&&r.catch((e=>{})),{promise:r,resolve:t,reject:n}}},{}],80:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.timeSince=n.inMilliseconds=n.Duration=void 0,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"}(n.Duration||(n.Duration={}));const r=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};n.inMilliseconds=function(e,t){return r(e,"count"),e*t},n.timeSince=function(e){return r(e,"timestamp"),Date.now()-e}},{}],81:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],82:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.satisfiesVersionRange=n.gtRange=n.gtVersion=n.assertIsSemVerRange=n.assertIsSemVerVersion=n.isValidSemVerRange=n.isValidSemVerVersion=n.VersionRangeStruct=n.VersionStruct=void 0;const r=e("@metamask/superstruct"),i=e("semver"),s=e("./assert.cjs");n.VersionStruct=(0,r.refine)((0,r.string)(),"Version",(e=>null!==(0,i.valid)(e)||`Expected SemVer version, got "${e}"`)),n.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",(e=>null!==(0,i.validRange)(e)||`Expected SemVer range, got "${e}"`)),n.isValidSemVerVersion=function(e){return(0,r.is)(e,n.VersionStruct)},n.isValidSemVerRange=function(e){return(0,r.is)(e,n.VersionRangeStruct)},n.assertIsSemVerVersion=function(e){(0,s.assertStruct)(e,n.VersionStruct)},n.assertIsSemVerRange=function(e){(0,s.assertStruct)(e,n.VersionRangeStruct)},n.gtVersion=function(e,t){return(0,i.gt)(e,t)},n.gtRange=function(e,t){return(0,i.gtr)(e,t)},n.satisfiesVersionRange=function(e,t){return(0,i.satisfies)(e,t,{includePrerelease:!0})}},{"./assert.cjs":62,"@metamask/superstruct":352,semver:618}],83:[function(e,t,n){var r=e("bn.js"),i=e("strip-hex-prefix");t.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new r(1),n=String(e).toLowerCase().trim(),s="0x"===n.substr(0,2)||"-0x"===n.substr(0,3),o=i(n);if("-"===o.substr(0,1)&&(o=i(o.slice(1)),t=new r(-1,10)),!(o=""===o?"0":o).match(/^-?[0-9]+$/)&&o.match(/^[0-9A-Fa-f]+$/)||o.match(/^[a-fA-F]+$/)||!0===s&&o.match(/^[0-9A-Fa-f]+$/))return new r(o,16).mul(t);if((o.match(/^-?[0-9]+$/)||""===o)&&!1===s)return new r(o,10).mul(t)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new r(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},{"bn.js":436,"strip-hex-prefix":644}],84:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.ObjectMultiplex=void 0;const i=e("readable-stream"),s=r(e("once")),o=e("./Substream"),a=Symbol("IGNORE_SUBSTREAM");class c extends i.Duplex{constructor(e={}){super(Object.assign(Object.assign({},e),{objectMode:!0})),this._substreams={}}createStream(e){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new o.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const n=(0,s.default)(t);(0,i.finished)(e,{readable:!1},n),(0,i.finished)(e,{writable:!1},n)}(this,(e=>t.destroy(e||void 0))),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=a}_read(){}_write(e,t,n){const{name:r,data:i}=e;if(!r)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),n();const s=this._substreams[r];return s?(s!==a&&s.push(i),n()):(console.warn(`ObjectMultiplex - orphaned data for stream "${r}"`),n())}}n.ObjectMultiplex=c},{"./Substream":85,once:552,"readable-stream":588}],85:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Substream=void 0;const r=e("readable-stream");class i extends r.Duplex{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){}_write(e,t,n){this._parent.push({name:this._name,data:e}),n()}}n.Substream=i},{"readable-stream":588}],86:[function(e,t,n){"use strict";const r=e("./ObjectMultiplex");t.exports=r.ObjectMultiplex},{"./ObjectMultiplex":84}],87:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decorateWithCaveats=n.isRestrictedMethodCaveatSpecification=void 0;const r=e("@metamask/utils"),i=e("./errors.cjs"),s=e("./Permission.cjs");function o(e){return(0,r.hasProperty)(e,"decorator")}n.isRestrictedMethodCaveatSpecification=o,n.decorateWithCaveats=function(e,t,n){const{caveats:r}=t;if(!r)return e;let a=async t=>e(t);for(const e of r){const t=n[e.type];if(!t)throw new i.UnrecognizedCaveatTypeError(e.type);if(!o(t))throw new i.CaveatSpecificationMismatchError(t,s.PermissionType.RestrictedMethod);a=t.decorator(a,e)}return a}},{"./Permission.cjs":88,"./errors.cjs":91,"@metamask/utils":369}],88:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hasSpecificationType=n.PermissionType=n.findCaveat=n.constructPermission=void 0;const r=e("nanoid");var i;n.constructPermission=function(e){const{caveats:t=null,invoker:n,target:i}=e;return{id:(0,r.nanoid)(),parentCapability:i,invoker:n,caveats:t,date:(new Date).getTime()}},n.findCaveat=function(e,t){return e.caveats?.find((e=>e.type===t))},function(e){e.RestrictedMethod="RestrictedMethod",e.Endowment="Endowment"}(i||(n.PermissionType=i={})),n.hasSpecificationType=function(e,t){return e.permissionType===t}},{nanoid:548}],89:[function(e,t,n){"use strict";var r,i,s,o,a,c,u,l=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.PermissionController=n.CaveatMutatorOperation=void 0;const h=e("@metamask/base-controller"),f=e("@metamask/controller-utils"),p=e("@metamask/rpc-errors"),m=e("@metamask/utils"),y=d(e("deep-freeze-strict")),g=e("immer"),b=e("nanoid"),v=e("./Caveat.cjs"),x=e("./errors.cjs"),w=e("./Permission.cjs"),S=e("./permission-middleware.cjs"),E=e("./utils.cjs"),_="PermissionController";var A;!function(e){e[e.Noop=0]="Noop",e[e.UpdateValue=1]="UpdateValue",e[e.DeleteCaveat=2]="DeleteCaveat",e[e.RevokePermission=3]="RevokePermission"}(A||(n.CaveatMutatorOperation=A={}));class T extends h.BaseController{get unrestrictedMethods(){return this._unrestrictedMethods}constructor(e){const{caveatSpecifications:t,permissionSpecifications:n,unrestrictedMethods:i,messenger:s,state:o={}}=e;super({name:_,metadata:{subjects:{anonymous:!0,persist:!0}},messenger:s,state:{subjects:{},...o}}),r.add(this),this._unrestrictedMethods=new Set(i),this._caveatSpecifications=(0,y.default)({...t}),this.validatePermissionSpecifications(n,this._caveatSpecifications),this._permissionSpecifications=(0,y.default)({...n}),this.registerMessageHandlers(),this.createPermissionMiddleware=(0,S.getPermissionMiddlewareFactory)({executeRestrictedMethod:this._executeRestrictedMethod.bind(this),getRestrictedMethod:this.getRestrictedMethod.bind(this),isUnrestrictedMethod:this.unrestrictedMethods.has.bind(this.unrestrictedMethods)})}getPermissionSpecification(e){return this._permissionSpecifications[e]}getCaveatSpecification(e){return this._caveatSpecifications[e]}validatePermissionSpecifications(e,t){Object.entries(e).forEach((([e,{permissionType:n,targetName:r,allowedCaveats:i}])=>{if(!n||!(0,m.hasProperty)(w.PermissionType,n))throw new Error(`Invalid permission type: "${n}"`);if(!e)throw new Error(`Invalid permission target name: "${e}"`);if(e!==r)throw new Error(`Invalid permission specification: target name "${e}" must match specification.targetName value "${r}".`);i&&i.forEach((e=>{if(!(0,m.hasProperty)(t,e))throw new x.UnrecognizedCaveatTypeError(e);const r=t[e],i=(0,v.isRestrictedMethodCaveatSpecification)(r);if(n===w.PermissionType.RestrictedMethod&&!i||n===w.PermissionType.Endowment&&i)throw new x.CaveatSpecificationMismatchError(r,n)}))}))}registerMessageHandlers(){this.messagingSystem.registerActionHandler(`${_}:clearPermissions`,(()=>this.clearState())),this.messagingSystem.registerActionHandler(`${_}:getEndowments`,((e,t,n)=>this.getEndowments(e,t,n))),this.messagingSystem.registerActionHandler(`${_}:getSubjectNames`,(()=>this.getSubjectNames())),this.messagingSystem.registerActionHandler(`${_}:getPermissions`,(e=>this.getPermissions(e))),this.messagingSystem.registerActionHandler(`${_}:hasPermission`,((e,t)=>this.hasPermission(e,t))),this.messagingSystem.registerActionHandler(`${_}:hasPermissions`,(e=>this.hasPermissions(e))),this.messagingSystem.registerActionHandler(`${_}:grantPermissions`,this.grantPermissions.bind(this)),this.messagingSystem.registerActionHandler(`${_}:grantPermissionsIncremental`,this.grantPermissionsIncremental.bind(this)),this.messagingSystem.registerActionHandler(`${_}:requestPermissions`,((e,t)=>this.requestPermissions(e,t))),this.messagingSystem.registerActionHandler(`${_}:requestPermissionsIncremental`,((e,t)=>this.requestPermissionsIncremental(e,t))),this.messagingSystem.registerActionHandler(`${_}:revokeAllPermissions`,(e=>this.revokeAllPermissions(e))),this.messagingSystem.registerActionHandler(`${_}:revokePermissionForAllSubjects`,(e=>this.revokePermissionForAllSubjects(e))),this.messagingSystem.registerActionHandler(`${_}:revokePermissions`,this.revokePermissions.bind(this)),this.messagingSystem.registerActionHandler(`${_}:updateCaveat`,((e,t,n,r)=>{this.updateCaveat(e,t,n,r)}))}clearState(){this.update((e=>({subjects:{}})))}getTypedPermissionSpecification(e,t,n){const r=e===w.PermissionType.RestrictedMethod?(0,x.methodNotFound)(t,n?{origin:n}:void 0):new x.EndowmentPermissionDoesNotExistError(t,n);if(!this.targetExists(t))throw r;const i=this.getPermissionSpecification(t);if(!(0,w.hasSpecificationType)(i,e))throw r;return i}getRestrictedMethod(e,t){return this.getTypedPermissionSpecification(w.PermissionType.RestrictedMethod,e,t).methodImplementation}getSubjectNames(){return Object.keys(this.state.subjects)}getPermission(e,t){return this.state.subjects[e]?.permissions[t]}getPermissions(e){return this.state.subjects[e]?.permissions}hasPermission(e,t){return Boolean(this.getPermission(e,t))}hasPermissions(e){return Boolean(this.state.subjects[e])}revokeAllPermissions(e){this.update((t=>{if(!t.subjects[e])throw new x.UnrecognizedSubjectError(e);delete t.subjects[e]}))}revokePermission(e,t){this.revokePermissions({[e]:[t]})}revokePermissions(e){this.update((t=>{Object.keys(e).forEach((n=>{if(!(0,m.hasProperty)(t.subjects,n))throw new x.UnrecognizedSubjectError(n);e[n].forEach((e=>{const{permissions:r}=t.subjects[n];if(!(0,m.hasProperty)(r,e))throw new x.PermissionDoesNotExistError(n,e);this.deletePermission(t.subjects,n,e)}))}))}))}revokePermissionForAllSubjects(e){0!==this.getSubjectNames().length&&this.update((t=>{Object.entries(t.subjects).forEach((([n,r])=>{const{permissions:i}=r;(0,m.hasProperty)(i,e)&&this.deletePermission(t.subjects,n,e)}))}))}deletePermission(e,t,n){const{permissions:r}=e[t];Object.keys(r).length>1?delete r[n]:delete e[t]}hasCaveat(e,t,n){return Boolean(this.getCaveat(e,t,n))}getCaveat(e,t,n){const r=this.getPermission(e,t);if(!r)throw new x.PermissionDoesNotExistError(e,t);return(0,w.findCaveat)(r,n)}addCaveat(e,t,n,r){if(this.hasCaveat(e,t,n))throw new x.CaveatAlreadyExistsError(e,t,n);this.setCaveat(e,t,n,r)}updateCaveat(e,t,n,r){if(!this.hasCaveat(e,t,n))throw new x.CaveatDoesNotExistError(e,t,n);this.setCaveat(e,t,n,r)}setCaveat(e,t,n,r){this.update((i=>{const s=i.subjects[e];if(!s)throw new x.UnrecognizedSubjectError(e);const o=s.permissions[t];if(!o)throw new x.PermissionDoesNotExistError(e,t);const a={type:n,value:r};if(this.validateCaveat(a,e,t),o.caveats){const e=o.caveats.findIndex((e=>e.type===a.type));-1===e?o.caveats.push(a):o.caveats.splice(e,1,a)}else o.caveats=[a];this.validateModifiedPermission(o,e)}))}updatePermissionsByCaveat(e,t){0!==Object.keys(this.state.subjects).length&&this.update((n=>{Object.values(n.subjects).forEach((r=>{Object.values(r.permissions).forEach((i=>{const{caveats:s}=i,o=s?.find((({type:t})=>t===e));if(!o)return;const a=t(o.value),{operation:c}=a;switch(c){case A.Noop:break;case A.UpdateValue:o.value=a.value,this.validateCaveat(o,r.origin,i.parentCapability);break;case A.DeleteCaveat:this.deleteCaveat(i,e,r.origin);break;case A.RevokePermission:this.deletePermission(n.subjects,r.origin,i.parentCapability);break;default:throw new Error(`Unrecognized mutation result: "${c}"`)}}))}))}))}removeCaveat(e,t,n){this.update((r=>{const i=r.subjects[e]?.permissions[t];if(!i)throw new x.PermissionDoesNotExistError(e,t);if(!i.caveats)throw new x.CaveatDoesNotExistError(e,t,n);this.deleteCaveat(i,n,e)}))}deleteCaveat(e,t,n){if(!e.caveats)throw new x.CaveatDoesNotExistError(n,e.parentCapability,t);const r=e.caveats.findIndex((e=>e.type===t));if(-1===r)throw new x.CaveatDoesNotExistError(n,e.parentCapability,t);1===e.caveats.length?e.caveats=null:e.caveats.splice(r,1),this.validateModifiedPermission(e,n)}validateModifiedPermission(e,t){if(!this.targetExists(e.parentCapability))throw new Error(`Fatal: Existing permission target "${e.parentCapability}" has no specification.`);this.validatePermission(this.getPermissionSpecification(e.parentCapability),e,t)}targetExists(e){return(0,m.hasProperty)(this._permissionSpecifications,e)}grantPermissions({approvedPermissions:e,requestData:t,preserveExistingPermissions:n=!0,subject:i}){return l(this,r,"m",s).call(this,{approvedPermissions:e,subject:i,mergePermissions:!1,preserveExistingPermissions:n,requestData:t})}grantPermissionsIncremental({approvedPermissions:e,requestData:t,subject:n}){return l(this,r,"m",s).call(this,{approvedPermissions:e,subject:n,mergePermissions:!0,preserveExistingPermissions:!0,requestData:t})}validatePermission(e,t,n,{invokePermissionValidator:r,performCaveatValidation:i}={invokePermissionValidator:!0,performCaveatValidation:!0}){const{allowedCaveats:s,validator:o,targetName:a}=e;if(e.subjectTypes?.length&&e.subjectTypes.length>0){const t=this.messagingSystem.call("SubjectMetadataController:getSubjectMetadata",n);if(!t||null===t.subjectType||!e.subjectTypes.includes(t.subjectType))throw e.permissionType===w.PermissionType.RestrictedMethod?(0,x.methodNotFound)(a,{origin:n}):new x.EndowmentPermissionDoesNotExistError(a,n)}if((0,m.hasProperty)(t,"caveats")){const{caveats:e}=t;if(null!==e&&!(Array.isArray(e)&&e.length>0))throw new x.InvalidCaveatsPropertyError(n,a,e);const r=new Set;e?.forEach((e=>{if(i&&this.validateCaveat(e,n,a),!s?.includes(e.type))throw new x.ForbiddenCaveatError(e.type,n,a);if(r.has(e.type))throw new x.DuplicateCaveatError(e.type,n,a);r.add(e.type)}))}r&&o&&o(t,n,a)}setValidatedPermissions(e,t){this.update((n=>{n.subjects[e]||(n.subjects[e]={origin:e,permissions:{}}),n.subjects[e].permissions=(0,g.castDraft)(t)}))}constructCaveats(e,t,n){const r=n?.map((n=>{this.validateCaveat(n,e,t);const{type:r,value:i}=n;return{type:r,value:i}}));return r&&(0,f.isNonEmptyArray)(r)?r:void 0}validateCaveat(e,t,n){if(!(0,f.isPlainObject)(e))throw new x.InvalidCaveatError(e,t,n);if(2!==Object.keys(e).length)throw new x.InvalidCaveatFieldsError(e,t,n);if("string"!=typeof e.type)throw new x.InvalidCaveatTypeError(e,t,n);const r=this.getCaveatSpecification(e.type);if(!r)throw new x.UnrecognizedCaveatTypeError(e.type,t,n);if(!(0,m.hasProperty)(e,"value")||void 0===e.value)throw new x.CaveatMissingValueError(e,t,n);if(!(0,f.isValidJson)(e.value))throw new x.CaveatInvalidJsonError(e,t,n);r.validator?.(e,t,n)}async requestPermissions(e,t,n={}){const{origin:i}=e,{id:s=(0,b.nanoid)(),preserveExistingPermissions:o=!0}=n;this.validateRequestedPermissions(i,t);const a={...n.metadata,id:s,origin:i},c={metadata:a,permissions:t},d=await this.requestUserApproval(c);return await l(this,r,"m",u).call(this,{subject:e,metadata:a,preserveExistingPermissions:o,approvedRequest:d})}async requestPermissionsIncremental(e,t,n={}){const{origin:i}=e,{id:s=(0,b.nanoid)()}=n;this.validateRequestedPermissions(i,t);const a=this.getPermissions(i)??{},[c,d]=l(this,r,"m",o).call(this,a,t);if(void 0===c||void 0===d)return[];try{this.validateRequestedPermissions(i,c)}catch(e){if(e instanceof Error)throw new x.InvalidMergedPermissionsError(i,e,d);throw(0,x.internalError)("Unrecognized error type",{error:e})}const h={...n.metadata,id:s,origin:i},f={metadata:h,permissions:c,diff:{currentPermissions:a,permissionDiffMap:d}},p=await this.requestUserApproval(f);return await l(this,r,"m",u).call(this,{subject:e,metadata:h,preserveExistingPermissions:!1,approvedRequest:p})}validateRequestedPermissions(e,t){if(!(0,f.isPlainObject)(t))throw(0,x.invalidParams)({message:`Requested permissions for origin "${e}" is not a plain object.`,data:{origin:e,requestedPermissions:t}});if(0===Object.keys(t).length)throw(0,x.invalidParams)({message:`Permissions request for origin "${e}" contains no permissions.`,data:{requestedPermissions:t}});for(const n of Object.keys(t)){const r=t[n];if(!this.targetExists(n))throw(0,x.methodNotFound)(n,{origin:e,requestedPermissions:t});if(!(0,f.isPlainObject)(r)||void 0!==r.parentCapability&&n!==r.parentCapability)throw(0,x.invalidParams)({message:`Permissions request for origin "${e}" contains invalid requested permission(s).`,data:{origin:e,requestedPermissions:t}});this.validatePermission(this.getPermissionSpecification(n),r,e,{invokePermissionValidator:!1,performCaveatValidation:!0})}}async requestUserApproval(e){const{origin:t,id:n}=e.metadata,r=await this.messagingSystem.call("ApprovalController:addRequest",{id:n,origin:t,requestData:e,type:E.MethodNames.RequestPermissions},!0);return this.validateApprovedPermissions(r,{id:n,origin:t}),r}getSideEffects(e){return Object.keys(e).reduce(((e,t)=>{if(this.targetExists(t)){const n=this.getPermissionSpecification(t);n.sideEffect&&(e.permittedHandlers[t]=n.sideEffect.onPermitted,n.sideEffect.onFailure&&(e.failureHandlers[t]=n.sideEffect.onFailure))}return e}),{permittedHandlers:{},failureHandlers:{}})}async executeSideEffects(e,t){const{permittedHandlers:n,failureHandlers:r}=e,i={requestData:t,messagingSystem:this.messagingSystem},s=await Promise.allSettled(Object.values(n).map((e=>e(i)))),o=s.filter((e=>"rejected"===e.status));if(o.length>0){const e=Object.values(r);if(e.length>0)try{await Promise.all(e.map((e=>e(i))))}catch(e){throw(0,x.internalError)("Unexpected error in side-effects",{error:e})}const t=o.map((e=>e.reason));throw t.forEach((e=>{console.error(e)})),t.length>1?(0,x.internalError)("Multiple errors occurred during side-effects execution",{errors:t}):t[0]}return s.map((({value:e})=>e))}validateApprovedPermissions(e,t){const{id:n,origin:r}=t;if(!(0,f.isPlainObject)(e)||!(0,f.isPlainObject)(e.metadata))throw(0,x.internalError)(`Approved permissions request for subject "${r}" is invalid.`,{data:{approvedRequest:e}});const{metadata:{id:i,origin:s},permissions:o}=e;if(i!==n)throw(0,x.internalError)(`Approved permissions request for subject "${r}" mutated its id.`,{originalId:n,mutatedId:i});if(s!==r)throw(0,x.internalError)(`Approved permissions request for subject "${r}" mutated its origin.`,{originalOrigin:r,mutatedOrigin:s});try{this.validateRequestedPermissions(r,o)}catch(e){if(e instanceof Error)throw(0,x.internalError)(`Invalid approved permissions request: ${e.message}`,e instanceof p.JsonRpcError?e.data:void 0);throw(0,x.internalError)("Unrecognized error type",{error:e})}}async acceptPermissionsRequest(e){const{id:t}=e.metadata;if(!this.hasApprovalRequest({id:t}))throw new x.PermissionsRequestNotFoundError(t);if(0!==Object.keys(e.permissions).length)try{await this.messagingSystem.call("ApprovalController:acceptRequest",t,e)}catch(e){throw this._rejectPermissionsRequest(t,e),e}else this._rejectPermissionsRequest(t,(0,x.invalidParams)({message:"Must request at least one permission."}))}async rejectPermissionsRequest(e){if(!this.hasApprovalRequest({id:e}))throw new x.PermissionsRequestNotFoundError(e);this._rejectPermissionsRequest(e,(0,x.userRejectedRequest)())}hasApprovalRequest(e){return this.messagingSystem.call("ApprovalController:hasRequest",e)}_rejectPermissionsRequest(e,t){return this.messagingSystem.call("ApprovalController:rejectRequest",e,t)}async getEndowments(e,t,n){if(!this.hasPermission(e,t))throw(0,x.unauthorized)({data:{origin:e,targetName:t}});return this.getTypedPermissionSpecification(w.PermissionType.Endowment,t,e).endowmentGetter({origin:e,requestData:n})}async executeRestrictedMethod(e,t,n){const r=this.getRestrictedMethod(t,e),i=await this._executeRestrictedMethod(r,{origin:e},t,n);if(void 0===i)throw new Error(`Internal request for method "${t}" as origin "${e}" returned no result.`);return i}_executeRestrictedMethod(e,t,n,r=[]){const{origin:i}=t,s=this.getPermission(i,n);if(!s)throw(0,x.unauthorized)({data:{origin:i,method:n}});return(0,v.decorateWithCaveats)(e,s,this._caveatSpecifications)({method:n,params:r,context:{origin:i}})}}n.PermissionController=T,r=new WeakSet,i=function(e){const{merger:t}=this.getCaveatSpecification(e);if(void 0===t)throw new x.CaveatMergerDoesNotExistError(e);return t},s=function({approvedPermissions:e,subject:t,mergePermissions:n,preserveExistingPermissions:i,requestData:s}){const{origin:o}=t;if(!o||"string"!=typeof o)throw new x.InvalidSubjectIdentifierError(o);const c=i?{...this.getPermissions(o)}:{};for(const[t,i]of Object.entries(e)){if(!this.targetExists(t))throw(0,x.methodNotFound)(t);if(void 0!==i.parentCapability&&t!==i.parentCapability)throw new x.InvalidApprovedPermissionError(o,t,i);const e=t,u=this.getPermissionSpecification(e),d={caveats:this.constructCaveats(o,e,i.caveats),invoker:o,target:e};let h,f=!0;u.factory?h=u.factory(d,s):(h=(0,w.constructPermission)(d),f=!1),n&&(h=l(this,r,"m",a).call(this,c[e],h)[0]),this.validatePermission(u,h,o,{invokePermissionValidator:!0,performCaveatValidation:f}),c[e]=h}return this.setValidatedPermissions(o,c),c},o=function(e,t){const n={},i=(0,g.produce)(e,(e=>{const i=e;Object.entries(t).forEach((([e,t])=>{const s=i[e],[o,c]=l(this,r,"m",a).call(this,s??{},t);(void 0===s||Object.keys(c).length>0)&&(i[e]=o,n[e]=c)}))}));return 0===Object.keys(n).length?[]:[i,n]},a=function(e,t){const{caveatPairs:n,leftUniqueCaveats:i,rightUniqueCaveats:s}=(0,E.collectUniqueAndPairedCaveats)(e,t),[o,a]=n.reduce((([e,t],[n,i])=>{const[s,o]=l(this,r,"m",c).call(this,n,i);return void 0!==s&&void 0!==o?(e.push(s),t[s.type]=o):e.push(n),[e,t]}),[[],{}]),u=[...o,...i,...s.map((e=>{const[t,n]=l(this,r,"m",c).call(this,void 0,e);return a[t.type]=n,t}))];return[{...e,...t,...u.length>0?{caveats:u}:{}},a]},c=function(e,t){if(void 0!==e&&e.type!==t.type)throw new x.CaveatMergeTypeMismatchError(e.type,t.type);const n=l(this,r,"m",i).call(this,t.type);if(void 0===e)return[{...t},t.value];const[s,o]=n(e.value,t.value);return void 0!==s&&void 0!==o?[{type:t.type,value:s},o]:[]},u=async function({subject:e,metadata:t,preserveExistingPermissions:n,approvedRequest:r}){const{permissions:i,...s}=r,o={...t},a=this.getSideEffects(i);if(Object.values(a.permittedHandlers).length>0){const e=await this.executeSideEffects(a,r);o.data=Object.keys(a.permittedHandlers).reduce(((t,n,r)=>({[n]:e[r],...t})),{})}return[this.grantPermissions({subject:e,approvedPermissions:i,preserveExistingPermissions:n,requestData:s}),o]}},{"./Caveat.cjs":87,"./Permission.cjs":88,"./errors.cjs":91,"./permission-middleware.cjs":93,"./utils.cjs":98,"@metamask/base-controller":28,"@metamask/controller-utils":30,"@metamask/rpc-errors":130,"@metamask/utils":369,"deep-freeze-strict":464,immer:535,nanoid:548}],90:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SubjectMetadataController=n.SubjectType=void 0;const r=e("@metamask/base-controller");var i;!function(e){e.Extension="extension",e.Internal="internal",e.Unknown="unknown",e.Website="website",e.Snap="snap"}(i||(n.SubjectType=i={}));const s={subjectMetadata:{persist:!0,anonymous:!1}},o={subjectMetadata:{}};class a extends r.BaseController{constructor({messenger:e,subjectCacheLimit:t,state:n={}}){if(!Number.isInteger(t)||t<1)throw new Error(`subjectCacheLimit must be a positive integer. Received: "${t}"`);const r=t=>e.call("PermissionController:hasPermissions",t);super({name:"SubjectMetadataController",metadata:s,messenger:e,state:{...a.getTrimmedState(n,r)}}),this.subjectHasPermissions=r,this.subjectCacheLimit=t,this.subjectsWithoutPermissionsEncounteredSinceStartup=new Set,this.messagingSystem.registerActionHandler(`${this.name}:getSubjectMetadata`,this.getSubjectMetadata.bind(this)),this.messagingSystem.registerActionHandler(`${this.name}:addSubjectMetadata`,this.addSubjectMetadata.bind(this))}clearState(){this.subjectsWithoutPermissionsEncounteredSinceStartup.clear(),this.update((e=>({...o})))}addSubjectMetadata(e){const{origin:t}=e,n={...e,extensionId:e.extensionId||null,iconUrl:e.iconUrl||null,name:e.name||null,subjectType:e.subjectType||null};let r=null;if(this.subjectsWithoutPermissionsEncounteredSinceStartup.size>=this.subjectCacheLimit){const e=this.subjectsWithoutPermissionsEncounteredSinceStartup.values().next().value;this.subjectsWithoutPermissionsEncounteredSinceStartup.delete(e),this.subjectHasPermissions(e)||(r=e)}this.subjectsWithoutPermissionsEncounteredSinceStartup.add(t),this.update((e=>{e.subjectMetadata[t]=n,"string"==typeof r&&delete e.subjectMetadata[r]}))}getSubjectMetadata(e){return this.state.subjectMetadata[e]}trimMetadataState(){this.update((e=>a.getTrimmedState(e,this.subjectHasPermissions)))}static getTrimmedState(e,t){const{subjectMetadata:n={}}=e;return{subjectMetadata:Object.keys(n).reduce(((e,r)=>(t(r)&&(e[r]=n[r]),e)),{})}}}n.SubjectMetadataController=a},{"@metamask/base-controller":28}],91:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PermissionsRequestNotFoundError=n.CaveatSpecificationMismatchError=n.CaveatMergeTypeMismatchError=n.DuplicateCaveatError=n.ForbiddenCaveatError=n.InvalidCaveatFieldsError=n.CaveatInvalidJsonError=n.CaveatMissingValueError=n.InvalidCaveatTypeError=n.InvalidCaveatError=n.CaveatAlreadyExistsError=n.CaveatDoesNotExistError=n.InvalidCaveatsPropertyError=n.UnrecognizedCaveatTypeError=n.EndowmentPermissionDoesNotExistError=n.PermissionDoesNotExistError=n.InvalidApprovedPermissionError=n.InvalidMergedPermissionsError=n.CaveatMergerDoesNotExistError=n.UnrecognizedSubjectError=n.InvalidSubjectIdentifierError=n.internalError=n.userRejectedRequest=n.invalidParams=n.methodNotFound=n.unauthorized=void 0;const r=e("@metamask/rpc-errors");n.unauthorized=function(e){return r.providerErrors.unauthorized({message:"Unauthorized to perform action. Try requesting the required permission(s) first. For more information, see: https://docs.metamask.io/guide/rpc-api.html#permissions",data:e.data})},n.methodNotFound=function(e,t){const n={message:`The method "${e}" does not exist / is not available.`};return void 0!==t&&(n.data=t),r.rpcErrors.methodNotFound(n)},n.invalidParams=function(e){return r.rpcErrors.invalidParams({data:e.data,message:e.message})},n.userRejectedRequest=function(e){return r.providerErrors.userRejectedRequest({data:e})},n.internalError=function(e,t){return r.rpcErrors.internal({message:e,data:t})};class i extends Error{constructor(e){super(`Invalid subject identifier: "${"string"==typeof e?e:typeof e}"`)}}n.InvalidSubjectIdentifierError=i;class s extends Error{constructor(e){super(`Unrecognized subject: "${e}" has no permissions.`)}}n.UnrecognizedSubjectError=s;class o extends Error{constructor(e){super(`Caveat value merger does not exist for type: "${e}"`)}}n.CaveatMergerDoesNotExistError=o;class a extends Error{constructor(e,t,n){super(`Invalid merged permissions for subject "${e}":\n${t.message}`),this.cause=t,this.data={diff:n}}}n.InvalidMergedPermissionsError=a;class c extends Error{constructor(e,t,n){super(`Invalid approved permission for origin "${e}" and target "${t}".`),this.data={origin:e,target:t,approvedPermission:n}}}n.InvalidApprovedPermissionError=c;class u extends Error{constructor(e,t){super(`Subject "${e}" has no permission for "${t}".`)}}n.PermissionDoesNotExistError=u;class l extends Error{constructor(e,t){super(`${t?`Subject "${t}"`:"Unknown subject"} has no permission for "${e}".`),t&&(this.data={origin:t})}}n.EndowmentPermissionDoesNotExistError=l;class d extends Error{constructor(e,t,n){super(`Unrecognized caveat type: "${e}"`),this.data={caveatType:e},void 0!==t&&(this.data.origin=t),void 0!==n&&(this.data.target=n)}}n.UnrecognizedCaveatTypeError=d;class h extends Error{constructor(e,t,n){super(`The "caveats" property of permission for "${t}" of subject "${e}" is invalid. It must be a non-empty array if specified.`),this.data={origin:e,target:t,caveatsProperty:n}}}n.InvalidCaveatsPropertyError=h;class f extends Error{constructor(e,t,n){super(`Permission for "${t}" of subject "${e}" has no caveat of type "${n}".`)}}n.CaveatDoesNotExistError=f;class p extends Error{constructor(e,t,n){super(`Permission for "${t}" of subject "${e}" already has a caveat of type "${n}".`)}}n.CaveatAlreadyExistsError=p;class m extends r.JsonRpcError{constructor(e,t,n){super(r.errorCodes.rpc.invalidParams,"Invalid caveat. Caveats must be plain objects.",{receivedCaveat:e}),this.data={origin:t,target:n}}}n.InvalidCaveatError=m;class y extends Error{constructor(e,t,n){super(`Caveat types must be strings. Received: "${typeof e.type}"`),this.data={caveat:e,origin:t,target:n}}}n.InvalidCaveatTypeError=y;class g extends Error{constructor(e,t,n){super('Caveat is missing "value" field.'),this.data={caveat:e,origin:t,target:n}}}n.CaveatMissingValueError=g;class b extends Error{constructor(e,t,n){super('Caveat "value" is invalid JSON.'),this.data={caveat:e,origin:t,target:n}}}n.CaveatInvalidJsonError=b;class v extends Error{constructor(e,t,n){super(`Caveat has unexpected number of fields: "${Object.keys(e).length}"`),this.data={caveat:e,origin:t,target:n}}}n.InvalidCaveatFieldsError=v;class x extends Error{constructor(e,t,n){super(`Permissions for target "${n}" may not have caveats of type "${e}".`),this.data={caveatType:e,origin:t,target:n}}}n.ForbiddenCaveatError=x;class w extends Error{constructor(e,t,n){super(`Permissions for target "${n}" contains multiple caveats of type "${e}".`),this.data={caveatType:e,origin:t,target:n}}}n.DuplicateCaveatError=w;class S extends Error{constructor(e,t){super(`Cannot merge caveats of different types: "${e}" and "${t}".`),this.data={leftCaveatType:e,rightCaveatType:t}}}n.CaveatMergeTypeMismatchError=S;class E extends Error{constructor(e,t){super(`Caveat specification uses a mismatched type. Expected caveats for ${t}`),this.data={caveatSpec:e,permissionType:t}}}n.CaveatSpecificationMismatchError=E;class _ extends Error{constructor(e){super(`Permissions request with id "${e}" not found.`)}}n.PermissionsRequestNotFoundError=_},{"@metamask/rpc-errors":130}],92:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.permissionRpcMethods=n.MethodNames=void 0,s(e("./Caveat.cjs"),n),s(e("./errors.cjs"),n),s(e("./Permission.cjs"),n),s(e("./PermissionController.cjs"),n);var a=e("./utils.cjs");Object.defineProperty(n,"MethodNames",{enumerable:!0,get:function(){return a.MethodNames}}),n.permissionRpcMethods=o(e("./rpc-methods/index.cjs")),s(e("./SubjectMetadataController.cjs"),n)},{"./Caveat.cjs":87,"./Permission.cjs":88,"./PermissionController.cjs":89,"./SubjectMetadataController.cjs":90,"./errors.cjs":91,"./rpc-methods/index.cjs":95,"./utils.cjs":98}],93:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getPermissionMiddlewareFactory=void 0;const r=e("@metamask/json-rpc-engine"),i=e("./errors.cjs");n.getPermissionMiddlewareFactory=function({executeRestrictedMethod:e,getRestrictedMethod:t,isUnrestrictedMethod:n}){return function(s){const{origin:o}=s;if("string"!=typeof o||!o)throw new Error('The subject "origin" must be a non-empty string.');return(0,r.createAsyncMiddleware)((async(r,a,c)=>{const{method:u,params:l}=r;if(n(u))return c();const d=t(u,o),h=await e(d,s,u,l);void 0!==h?a.result=h:a.error=(0,i.internalError)(`Request for method "${r.method}" returned undefined result.`,{request:r})}))}}},{"./errors.cjs":91,"@metamask/json-rpc-engine":41}],94:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getPermissionsHandler=void 0;const r=e("../utils.cjs");n.getPermissionsHandler={methodNames:[r.MethodNames.GetPermissions],implementation:async function(e,t,n,r,{getPermissionsForOrigin:i}){return t.result=Object.values(i()||{}),r()},hookNames:{getPermissionsForOrigin:!0}}},{"../utils.cjs":98}],95:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.handlers=void 0;const r=e("./getPermissions.cjs"),i=e("./requestPermissions.cjs"),s=e("./revokePermissions.cjs");n.handlers=[i.requestPermissionsHandler,r.getPermissionsHandler,s.revokePermissionsHandler]},{"./getPermissions.cjs":94,"./requestPermissions.cjs":96,"./revokePermissions.cjs":97}],96:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.requestPermissionsHandler=void 0;const r=e("@metamask/controller-utils"),i=e("../errors.cjs"),s=e("../utils.cjs");n.requestPermissionsHandler={methodNames:[s.MethodNames.RequestPermissions],implementation:async function(e,t,n,s,{requestPermissionsForOrigin:o}){const{params:a}=e;if(!Array.isArray(a)||!(0,r.isPlainObject)(a[0]))return s((0,i.invalidParams)({data:{request:e}}));const[c]=a,[u]=await o(c);return t.result=Object.values(u),s()},hookNames:{requestPermissionsForOrigin:!0}}},{"../errors.cjs":91,"../utils.cjs":98,"@metamask/controller-utils":30}],97:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.revokePermissionsHandler=void 0;const r=e("@metamask/utils"),i=e("../errors.cjs"),s=e("../utils.cjs");n.revokePermissionsHandler={methodNames:[s.MethodNames.RevokePermissions],implementation:async function(e,t,n,s,{revokePermissionsForOrigin:o}){const{params:a}=e,c=a?.[0];if(!c)return s((0,i.invalidParams)({data:{request:e}}));const u=Object.keys(c);if(!(0,r.isNonEmptyArray)(u))return s((0,i.invalidParams)({data:{request:e}}));return o(u),t.result=null,s()},hookNames:{revokePermissionsForOrigin:!0}}},{"../errors.cjs":91,"../utils.cjs":98,"@metamask/utils":369}],98:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.collectUniqueAndPairedCaveats=n.MethodNames=void 0,function(e){e.RequestPermissions="wallet_requestPermissions",e.GetPermissions="wallet_getPermissions",e.RevokePermissions="wallet_revokePermissions"}(r||(n.MethodNames=r={})),n.collectUniqueAndPairedCaveats=function(e,t){const n=e?.caveats?.slice()??[],r=t.caveats?.slice()??[],i=[],s=[];return n.forEach((e=>{const t=r.findIndex((t=>t.type===e.type));-1===t?i.push(e):(s.push([e,r[t]]),r.splice(t,1))})),{caveatPairs:s,leftUniqueCaveats:i,rightUniqueCaveats:[...r]}}},{}],99:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BasePostMessageStream=void 0;const r=e("readable-stream"),i=()=>{},s="SYN",o="ACK";class a extends r.Duplex{constructor(e){super(Object.assign({objectMode:!0},e)),this._init=!1,this._haveSyn=!1,this._log=()=>null}_handshake(){this._write(s,null,i),this.cork()}_onData(e){if(this._init)try{this.push(e),this._log(e,!1)}catch(e){this.emit("error",e)}else e===s?(this._haveSyn=!0,this._write(o,null,i)):e===o&&(this._init=!0,this._haveSyn||this._write(o,null,i),this.uncork())}_read(){}_write(e,t,n){e!==o&&e!==s&&this._log(e,!0),this._postMessage(e),n()}_setLogger(e){this._log=e}}n.BasePostMessageStream=a},{"readable-stream":588}],100:[function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function l(e){return e instanceof Uint8Array}function d(e){(0,i.assert)(l(e),"Value must be a Uint8Array.")}function h(e){if(d(e),0===e.length)return"0x";const t=u(),n=new Array(e.length);for(let r=0;r=BigInt(0),"Value must be a non-negative bigint.");return p(e.toString(16))}function y(e){(0,i.assert)("number"==typeof e,"Value must be a number."),(0,i.assert)(e>=0,"Value must be a non-negative number."),(0,i.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return p(e.toString(16))}function g(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return m(e);if("number"==typeof e)return y(e);if("string"==typeof e)return e.startsWith("0x")?p(e):g(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}n.isBytes=l,n.assertIsBytes=d,n.bytesToHex=h,n.bytesToBigInt=f,n.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const n of e)t=(t<0,"Byte length must be greater than 0."),(0,i.assert)(function(e,t){(0,i.assert)(t>0);const n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let n=e;const r=new Uint8Array(t);for(let e=0;e>=BigInt(8);return r.reverse()},n.numberToBytes=y,n.stringToBytes=g,n.base64ToBytes=function(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),r.base64.decode(e)},n.valueToBytes=b,n.concatBytes=function(e){const t=new Array(e.length);let n=0;for(let r=0;r=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}},{"./utils.cjs":131,"@metamask/utils":369,"fast-safe-stringify":506}],128:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.errorValues=n.errorCodes=void 0,n.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},n.errorValues={"-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."}}},{}],129:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.providerErrors=n.rpcErrors=void 0;const r=e("./classes.cjs"),i=e("./error-constants.cjs"),s=e("./utils.cjs");function o(e,t){const[n,i]=c(t);return new r.JsonRpcError(e,n??(0,s.getMessageFromCode)(e),i)}function a(e,t){const[n,i]=c(t);return new r.EthereumProviderError(e,n??(0,s.getMessageFromCode)(e),i)}function c(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,n]}}return[]}n.rpcErrors={parse:e=>o(i.errorCodes.rpc.parse,e),invalidRequest:e=>o(i.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(i.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(i.errorCodes.rpc.methodNotFound,e),internal:e=>o(i.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(t,e)},invalidInput:e=>o(i.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(i.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(i.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(i.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(i.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(i.errorCodes.rpc.limitExceeded,e)},n.providerErrors={userRejectedRequest:e=>a(i.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(i.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(i.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(i.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(i.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:i}=e;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(t,n,i)}}},{"./classes.cjs":127,"./error-constants.cjs":128,"./utils.cjs":131}],130:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.errorCodes=n.providerErrors=n.rpcErrors=n.getMessageFromCode=n.serializeError=n.serializeCause=n.dataHasCause=n.EthereumProviderError=n.JsonRpcError=void 0;var r=e("./classes.cjs");Object.defineProperty(n,"JsonRpcError",{enumerable:!0,get:function(){return r.JsonRpcError}}),Object.defineProperty(n,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});var i=e("./utils.cjs");Object.defineProperty(n,"dataHasCause",{enumerable:!0,get:function(){return i.dataHasCause}}),Object.defineProperty(n,"serializeCause",{enumerable:!0,get:function(){return i.serializeCause}}),Object.defineProperty(n,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(n,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});var s=e("./errors.cjs");Object.defineProperty(n,"rpcErrors",{enumerable:!0,get:function(){return s.rpcErrors}}),Object.defineProperty(n,"providerErrors",{enumerable:!0,get:function(){return s.providerErrors}});var o=e("./error-constants.cjs");Object.defineProperty(n,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},{"./classes.cjs":127,"./error-constants.cjs":128,"./errors.cjs":129,"./utils.cjs":131}],131:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dataHasCause=n.serializeCause=n.serializeError=n.isValidCode=n.getMessageFromCode=n.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=e("@metamask/utils"),i=e("./error-constants.cjs"),s=i.errorCodes.rpc.internal,o={code:s,message:a(s)};function a(e,t="Unspecified error message. This is a bug, please report it."){if(c(e)){const t=e.toString();if((0,r.hasProperty)(i.errorValues,t))return i.errorValues[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return n.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function c(e){return Number.isInteger(e)}function u(e){return Array.isArray(e)?e.map((e=>(0,r.isValidJson)(e)?e:(0,r.isObject)(e)?l(e):null)):(0,r.isObject)(e)?l(e):(0,r.isValidJson)(e)?e:null}function l(e){return Object.getOwnPropertyNames(e).reduce(((t,n)=>{const i=e[n];return(0,r.isValidJson)(i)&&(t[n]=i),t}),{})}n.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",n.getMessageFromCode=a,n.isValidCode=c,n.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:n=!0,shouldPreserveMessage:i=!0}={}){if(!(0,r.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const s=function(e,t,n){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if((0,r.isJsonRpcError)(e))return e;const i=function(e){if((0,r.isObject)(e)&&(0,r.hasProperty)(e,"message")&&"string"==typeof e.message&&e.message.length>0)return e.message;return}(e),s=u(e),o={...t,...n&&i&&{message:i},data:{cause:s}};return o}(e,t,i);return n||delete s.stack,s},n.serializeCause=u,n.dataHasCause=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"cause")&&(0,r.isObject)(e.cause)}},{"./error-constants.cjs":128,"@metamask/utils":369}],132:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("events");function i(e,t,n){try{Reflect.apply(e,t,n)}catch(e){setTimeout((()=>{throw e}))}}class s extends r.EventEmitter{emit(e,...t){let n="error"===e;const r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const n=new Error("Unhandled error."+(e?` (${e.message})`:""));throw n.context=e,n}const s=r[e];if(void 0===s)return!1;if("function"==typeof s)i(s,this,t);else{const e=s.length,n=function(e){const t=e.length,n=new Array(t);for(let r=0;rnew URL(e).origin))},{}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PHISHING_WARNING_PAGE=n.PHISHING_STREAM=n.PHISHING_SAFELIST=n.METAMASK_PROVIDER=n.METAMASK_INPAGE=n.METAMASK_COOKIE_HANDLER=n.LEGACY_PUBLIC_CONFIG=n.LEGACY_PROVIDER=n.LEGACY_INPAGE=n.LEGACY_CONTENT_SCRIPT=n.CONTENT_SCRIPT=void 0;n.CONTENT_SCRIPT="metamask-contentscript",n.METAMASK_INPAGE="metamask-inpage",n.PHISHING_WARNING_PAGE="metamask-phishing-warning-page",n.METAMASK_COOKIE_HANDLER="metamask-cookie-handler",n.METAMASK_PROVIDER="metamask-provider",n.PHISHING_SAFELIST="metamask-phishing-safelist",n.PHISHING_STREAM="phishing",n.LEGACY_CONTENT_SCRIPT="contentscript",n.LEGACY_INPAGE="inpage",n.LEGACY_PROVIDER="provider",n.LEGACY_PUBLIC_CONFIG="publicConfig"},{}],3:[function(e,t,n){"use strict";var r,i=e("../../shared/modules/browser-runtime.utils"),s=(r=e("../../shared/modules/provider-injection"))&&r.__esModule?r:{default:r},o=e("./streams/provider-stream"),a=e("./streams/phishing-stream"),c=e("./streams/cookie-handler-stream");a.isDetectedPhishingSite?(0,a.initPhishingStreams)():(c.isDetectedCookieMarketingSite&&(0,c.initializeCookieHandlerSteam)(),(0,s.default)()&&((0,o.initStreams)(),document.prerendering&&(0,i.getIsBrowserPrerenderBroken)()&&document.addEventListener("prerenderingchange",(()=>{(0,o.onDisconnectDestroyStreams)(new Error("Prerendered page has become active."))})),window.addEventListener("pageshow",(e=>{e.persisted&&(console.warn("BFCached page has become active. Restoring the streams."),(0,o.setupExtensionStreams)())})),window.addEventListener("pagehide",(e=>{e.persisted&&(console.warn("Page may become BFCached. Destroying the streams."),(0,o.destroyStreams)())}))))},{"../../shared/modules/browser-runtime.utils":659,"../../shared/modules/provider-injection":660,"./streams/cookie-handler-stream":4,"./streams/phishing-stream":5,"./streams/provider-stream":6}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setupCookieHandlerExtStreams=n.isDetectedCookieMarketingSite=n.initializeCookieHandlerSteam=void 0;var r=f(e("webextension-polyfill")),i=e("@metamask/post-message-stream"),s=f(e("@metamask/object-multiplex")),o=e("readable-stream"),a=f(e("extension-port-stream")),c=e("../../../shared/constants/app"),u=e("../constants/marketing-site-whitelist"),l=e("../../../shared/modules/browser-runtime.utils"),d=e("../constants/stream"),h=e("./stream-utils");function f(e){return e&&e.__esModule?e:{default:e}}n.isDetectedCookieMarketingSite=u.COOKIE_ID_MARKETING_WHITELIST_ORIGINS.some((e=>e===window.location.origin));let p,m,y,g,b,v;const x=()=>{console.log("app/scripts/streams/cookie-handler-stream.ts setupCookieHandlerExtStreams browser.runtime.connect called at ",Date.now()," name ",d.CONTENT_SCRIPT),y=r.default.runtime.connect({name:d.CONTENT_SCRIPT}),g=new a.default(y),b=new s.default,b.setMaxListeners(25),(0,o.pipeline)(b,g,b,(e=>{(0,h.logStreamDisconnectWarning)("MetaMask Background Multiplex",e),window.postMessage({target:"CookieHandlerPage",data:{name:d.METAMASK_COOKIE_HANDLER,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)})),v=b.createStream(d.METAMASK_COOKIE_HANDLER),b.ignoreStream(d.LEGACY_PUBLIC_CONFIG),b.ignoreStream(d.LEGACY_PROVIDER),b.ignoreStream(d.METAMASK_PROVIDER),b.ignoreStream(d.PHISHING_SAFELIST),b.ignoreStream(d.PHISHING_STREAM),(0,o.pipeline)(m,v,m,(e=>console.debug(`MetaMask: Muxed traffic for channel "${d.METAMASK_COOKIE_HANDLER}" failed.`,e))),y.onDisconnect.addListener(w)};n.setupCookieHandlerExtStreams=x;const w=()=>{console.log("onDisconnectDestroyCookieStreams called");const e=(0,l.checkForLastError)();y.onDisconnect.removeListener(w),m.removeAllListeners(),b.removeAllListeners(),b.destroy(),v.removeAllListeners(),v.destroy(),g=null,e&&(console.warn(`${e} Resetting the phishing streams.`),setTimeout(x,1e3))},S=e=>{if(e.name===c.EXTENSION_MESSAGES.READY)return g||x(),Promise.resolve(`MetaMask: handled "${c.EXTENSION_MESSAGES.READY}" for phishing streams`)};n.initializeCookieHandlerSteam=()=>{const{origin:e}=window.location;!function(e){const t=new i.WindowPostMessageStream({name:d.CONTENT_SCRIPT,target:"CookieHandlerPage",targetWindow:window,targetOrigin:e});p=new s.default,p.setMaxListeners(25),(0,o.pipeline)(p,t,p,(e=>(0,h.logStreamDisconnectWarning)("MetaMask Inpage Multiplex",e))),m=p.createStream(d.METAMASK_COOKIE_HANDLER),p.ignoreStream(d.LEGACY_PUBLIC_CONFIG),p.ignoreStream(d.LEGACY_PROVIDER),p.ignoreStream(d.METAMASK_PROVIDER),p.ignoreStream(d.PHISHING_SAFELIST),p.ignoreStream(d.PHISHING_STREAM)}(e),x(),r.default.runtime.onMessage.addListener(S)}},{"../../../shared/constants/app":656,"../../../shared/modules/browser-runtime.utils":659,"../constants/marketing-site-whitelist":1,"../constants/stream":2,"./stream-utils":7,"@metamask/object-multiplex":86,"@metamask/post-message-stream":102,"extension-port-stream":479,"readable-stream":588,"webextension-polyfill":652}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.connectPhishingChannelToWarningSystem=function(e){x=e.createStream(l.PHISHING_STREAM),e.ignoreStream(l.METAMASK_COOKIE_HANDLER),e.ignoreStream(l.LEGACY_PROVIDER),e.ignoreStream(l.PHISHING_SAFELIST),x.once("data",_)},n.isDetectedPhishingSite=n.initPhishingStreams=void 0,n.redirectToPhishingWarning=_,n.setupPhishingExtStreams=void 0;var r=e("@metamask/post-message-stream"),i=h(e("@metamask/object-multiplex")),s=e("readable-stream"),o=h(e("webextension-polyfill")),a=h(e("extension-port-stream")),c=e("../../../shared/modules/browser-runtime.utils"),u=e("../../../shared/constants/app"),l=e("../constants/stream"),d=e("./stream-utils");function h(e){return e&&e.__esModule?e:{default:e}}const f=new URL("https://metamask.github.io/phishing-warning/v4.1.0/");let p,m,y,g,b,v,x;const w=()=>{console.log("app/scripts/streams/phishing-stream.ts setupPhishingExtStreams browser.runtime.connect called at ",Date.now()," name ",l.CONTENT_SCRIPT),y=o.default.runtime.connect({name:l.CONTENT_SCRIPT}),g=new a.default(y),m=new i.default,m.setMaxListeners(25),(0,s.pipeline)(m,g,m,(e=>{(0,d.logStreamDisconnectWarning)("MetaMask Background Multiplex",e),window.postMessage({target:l.PHISHING_WARNING_PAGE,data:{name:l.PHISHING_SAFELIST,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)})),p=m.createStream(l.PHISHING_SAFELIST),(0,s.pipeline)(b,p,b,(e=>console.debug(`MetaMask: Muxed traffic for channel "${l.PHISHING_SAFELIST}" failed.`,e))),m.ignoreStream(l.METAMASK_COOKIE_HANDLER),m.ignoreStream(l.LEGACY_PUBLIC_CONFIG),m.ignoreStream(l.LEGACY_PROVIDER),m.ignoreStream(l.METAMASK_PROVIDER),m.ignoreStream(l.PHISHING_STREAM),y.onDisconnect.addListener(S)};n.setupPhishingExtStreams=w;const S=()=>{console.log("onDisconnectDestroyPhishingStreams called");const e=(0,c.checkForLastError)();y.onDisconnect.removeListener(S),b.removeAllListeners(),m.removeAllListeners(),m.destroy(),p.removeAllListeners(),p.destroy(),g=null,e&&(console.warn(`${e} Resetting the phishing streams.`),setTimeout(w,1e3))},E=e=>{if(e.name===u.EXTENSION_MESSAGES.READY)return g||w(),Promise.resolve(`MetaMask: handled "${u.EXTENSION_MESSAGES.READY}" for phishing streams`)};n.isDetectedPhishingSite=window.location.origin===f.origin&&window.location.pathname===f.pathname;function _(){console.debug("MetaMask: Routing to Phishing Warning page.");const{hostname:e,href:t}=window.location,n=new URLSearchParams({hostname:e,href:t});for(window.location.href=`https://metamask.github.io/phishing-warning/v4.1.0/#${n}`;;)console.log("MetaMask: Locking js execution, redirection will complete shortly")}n.initPhishingStreams=()=>{!function(){const e=new r.WindowPostMessageStream({name:l.CONTENT_SCRIPT,target:l.PHISHING_WARNING_PAGE});v=new i.default,v.setMaxListeners(25),(0,s.pipeline)(v,e,v,(e=>(0,d.logStreamDisconnectWarning)("MetaMask Inpage Multiplex",e))),b=v.createStream(l.PHISHING_SAFELIST),v.ignoreStream(l.METAMASK_COOKIE_HANDLER),v.ignoreStream(l.LEGACY_PUBLIC_CONFIG),v.ignoreStream(l.LEGACY_PROVIDER),v.ignoreStream(l.METAMASK_PROVIDER),v.ignoreStream(l.PHISHING_STREAM)}(),w(),o.default.runtime.onMessage.addListener(E)}},{"../../../shared/constants/app":656,"../../../shared/modules/browser-runtime.utils":659,"../constants/stream":2,"./stream-utils":7,"@metamask/object-multiplex":86,"@metamask/post-message-stream":102,"extension-port-stream":479,"readable-stream":588,"webextension-polyfill":652}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.destroyStreams=I,n.initStreams=void 0,n.onDisconnectDestroyStreams=R,n.setupExtensionStreams=void 0;var r=f(e("@metamask/object-multiplex")),i=e("@metamask/post-message-stream"),s=f(e("extension-port-stream")),o=e("readable-stream"),a=f(e("webextension-polyfill")),c=e("../constants/stream"),u=e("../../../shared/constants/app"),l=e("../../../shared/modules/browser-runtime.utils"),d=e("./stream-utils"),h=e("./phishing-stream");function f(e){return e&&e.__esModule?e:{default:e}}let p,m,y,g,b,v,x,w,S,E,_,A,T;let k=!1;const C=()=>{k=!0,console.log("app/scripts/streams/provider-stream.ts setupExtensionStreams browser.runtime.connect called at ",Date.now()," name ",c.CONTENT_SCRIPT),E=a.default.runtime.connect({name:c.CONTENT_SCRIPT}),_=new s.default(E),_.on("data",N),w=new r.default,w.setMaxListeners(25),w.ignoreStream(c.LEGACY_PUBLIC_CONFIG),(0,o.pipeline)(w,_,w,(e=>{(0,d.logStreamDisconnectWarning)("MetaMask Background Multiplex",e),B()})),S=w.createStream(c.METAMASK_PROVIDER),(0,o.pipeline)(T,S,T,(e=>console.debug(`MetaMask: Muxed traffic for channel "${c.METAMASK_PROVIDER}" failed.`,e))),(0,h.connectPhishingChannelToWarningSystem)(w),E.onDisconnect.addListener(R)};n.setupExtensionStreams=C;const O=()=>{T.removeAllListeners(),w.removeAllListeners(),w.destroy(),S.removeAllListeners(),S.destroy(),_=null},P=()=>{p=new r.default,p.setMaxListeners(25),x=new o.Transform({highWaterMark:16,objectMode:!0,transform:(e,t,n)=>{var r;(null==e?void 0:e.name)===c.METAMASK_PROVIDER&&"metamask_accountsChanged"===(null===(r=e.data)||void 0===r?void 0:r.method)&&(e.data.method="wallet_accountsChanged",e.data.result=e.data.params,delete e.data.params),n(null,e)}}),(0,o.pipeline)(p,_,x,p,(e=>{(0,d.logStreamDisconnectWarning)("MetaMask Background Legacy Multiplex",e),B()})),m=p.createStream(c.METAMASK_PROVIDER),(0,o.pipeline)(b,m,b,(e=>console.debug(`MetaMask: Muxed traffic between channels "${c.LEGACY_PROVIDER}" and "${c.METAMASK_PROVIDER}" failed.`,e))),y=p.createStream(c.LEGACY_PUBLIC_CONFIG),(0,o.pipeline)(v,y,v,(e=>console.debug(`MetaMask: Muxed traffic for channel "${c.LEGACY_PUBLIC_CONFIG}" failed.`,e))),p.ignoreStream(c.METAMASK_COOKIE_HANDLER),p.ignoreStream(c.LEGACY_PROVIDER),p.ignoreStream(c.PHISHING_SAFELIST),p.ignoreStream(c.PHISHING_STREAM)},j=()=>{b.removeAllListeners(),v.removeAllListeners(),p.removeAllListeners(),p.destroy(),m.removeAllListeners(),m.destroy(),y.removeAllListeners(),y.destroy()},M=e=>{if(e.name===u.EXTENSION_MESSAGES.READY)return _||(C(),P()),Promise.resolve(`MetaMask: handled ${u.EXTENSION_MESSAGES.READY}`)};function I(){E&&(E.onDisconnect.removeListener(R),O(),j(),E.disconnect(),E=null,k=!1)}function R(e){console.log("onDisconnectDestroyStreams called");const t=e||(0,l.checkForLastError)();I(),t&&(console.warn(`${t} Resetting the streams.`),setTimeout(C,1e3))}function N(e){k&&"metamask_chainChanged"===e.data.method&&(k=!1,window.postMessage({target:c.METAMASK_INPAGE,data:{name:c.METAMASK_PROVIDER,data:{jsonrpc:"2.0",method:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}}},window.location.origin))}function B(){window.postMessage({target:c.METAMASK_INPAGE,data:{name:c.METAMASK_PROVIDER,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)}n.initStreams=()=>{(()=>{const e=new i.WindowPostMessageStream({name:c.CONTENT_SCRIPT,target:c.METAMASK_INPAGE});A=new r.default,A.setMaxListeners(25),(0,o.pipeline)(A,e,A,(e=>(0,d.logStreamDisconnectWarning)("MetaMask Inpage Multiplex",e))),T=A.createStream(c.METAMASK_PROVIDER),A.ignoreStream(c.METAMASK_COOKIE_HANDLER),A.ignoreStream(c.LEGACY_PROVIDER),A.ignoreStream(c.LEGACY_PUBLIC_CONFIG),A.ignoreStream(c.PHISHING_SAFELIST),A.ignoreStream(c.PHISHING_STREAM)})(),(()=>{const e=new i.WindowPostMessageStream({name:c.LEGACY_CONTENT_SCRIPT,target:c.LEGACY_INPAGE});g=new r.default,g.setMaxListeners(25),(0,o.pipeline)(g,e,g,(e=>(0,d.logStreamDisconnectWarning)("MetaMask Legacy Inpage Multiplex",e))),b=g.createStream(c.LEGACY_PROVIDER),v=g.createStream(c.LEGACY_PUBLIC_CONFIG),g.ignoreStream(c.METAMASK_COOKIE_HANDLER),g.ignoreStream(c.METAMASK_PROVIDER),g.ignoreStream(c.PHISHING_SAFELIST),g.ignoreStream(c.PHISHING_STREAM)})(),C(),P(),a.default.runtime.onMessage.addListener(M)}},{"../../../shared/constants/app":656,"../../../shared/modules/browser-runtime.utils":659,"../constants/stream":2,"./phishing-stream":5,"./stream-utils":7,"@metamask/object-multiplex":86,"@metamask/post-message-stream":102,"extension-port-stream":479,"readable-stream":588,"webextension-polyfill":652}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logStreamDisconnectWarning=function(e,t){console.debug(`MetaMask: Content script lost connection to "${e}".`,t)}},{}],8:[function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){const t=[];let n=0;for(let i=0;ie.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function s(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return d(l(e))}function o(e,t){if(e<56)return Uint8Array.from([e+t]);const n=m(e),r=m(t+55+n.length/2);return Uint8Array.from(h(r+n))}function a(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);const n=c(g(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function c(e){let t,n,r,o,a;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,r=128===l?Uint8Array.from([]):i(e,1,t),2===t&&r[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:r,remainder:e.slice(t)}}if(l<=191){if(n=l-182,e.length-1e.length)throw new Error("invalid RLP: total length is larger than the data");for(o=i(e,n,r);o.length;)a=c(o),u.push(a.data),o=a.remainder;return{data:u,remainder:e.slice(r)}}}Object.defineProperty(n,"__esModule",{value:!0}),n.RLP=n.utils=n.decode=n.encode=void 0,n.encode=r,n.decode=a;const u=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function l(e){let t="";for(let n=0;ne+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t=2&&"0"===e[0]&&"x"===e[1]}function g(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return y(e)?h((t="string"!=typeof(n=e)?n:y(n)?n.slice(2):n).length%2?`0${t}`:t):p(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?h(m(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}n.utils={bytesToHex:l,concatBytes:f,hexToBytes:h,utf8ToBytes:p},n.RLP={encode:r,decode:a}},{}],9:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.accountBodyToRLP=n.accountBodyToSlim=n.accountBodyFromSlim=n.isZeroAddress=n.zeroAddress=n.importPublic=n.privateToAddress=n.privateToPublic=n.publicToAddress=n.pubToAddress=n.isValidPublic=n.isValidPrivate=n.generateAddress2=n.generateAddress=n.isValidChecksumAddress=n.toChecksumAddress=n.isValidAddress=n.Account=void 0;const r=e("@ethereumjs/rlp"),i=e("ethereum-cryptography/keccak"),s=e("ethereum-cryptography/secp256k1"),o=e("ethereum-cryptography/utils"),a=e("./bytes"),c=e("./constants"),u=e("./helpers"),l=e("./internal"),d=BigInt(0);class h{constructor(e=d,t=d,n=c.KECCAK256_RLP,r=c.KECCAK256_NULL){this.nonce=e,this.balance=t,this.storageRoot=n,this.codeHash=r,this._validate()}static fromAccountData(e){const{nonce:t,balance:n,storageRoot:r,codeHash:i}=e;return new h(void 0!==t?(0,a.bufferToBigInt)((0,a.toBuffer)(t)):void 0,void 0!==n?(0,a.bufferToBigInt)((0,a.toBuffer)(n)):void 0,void 0!==r?(0,a.toBuffer)(r):void 0,void 0!==i?(0,a.toBuffer)(i):void 0)}static fromRlpSerializedAccount(e){const t=(0,a.arrToBufArr)(r.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,n,r,i]=e;return new h((0,a.bufferToBigInt)(t),(0,a.bufferToBigInt)(n),r,i)}_validate(){if(this.nonce=8?h+=r[e].toUpperCase():h+=r[e];return h};n.isValidChecksumAddress=function(e,t){return(0,n.isValidAddress)(e)&&(0,n.toChecksumAddress)(e,t)===e};n.generateAddress=function(e,n){return(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(n),(0,a.bufferToBigInt)(n)===BigInt(0)?t.from((0,i.keccak256)(r.RLP.encode((0,a.bufArrToArr)([e,null])))).slice(-20):t.from((0,i.keccak256)(r.RLP.encode((0,a.bufArrToArr)([e,n])))).slice(-20)};n.generateAddress2=function(e,n,r){if((0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(n),(0,u.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==n.length)throw new Error("Expected salt to be of length 32");const s=(0,i.keccak256)(t.concat([t.from("ff","hex"),e,n,(0,i.keccak256)(r)]));return(0,a.toBuffer)(s).slice(-20)};n.isValidPrivate=function(e){return s.secp256k1.utils.isValidPrivateKey(e)};n.isValidPublic=function(e,n=!1){if((0,u.assertIsBuffer)(e),64===e.length)try{return s.secp256k1.ProjectivePoint.fromHex(t.concat([t.from([4]),e])),!0}catch(e){return!1}if(!n)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}};n.pubToAddress=function(e,n=!1){if((0,u.assertIsBuffer)(e),n&&64!==e.length&&(e=t.from(s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return t.from((0,i.keccak256)(e)).slice(-20)},n.publicToAddress=n.pubToAddress;n.privateToPublic=function(e){return(0,u.assertIsBuffer)(e),t.from(s.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))};n.privateToAddress=function(e){return(0,n.publicToAddress)((0,n.privateToPublic)(e))};n.importPublic=function(e){return(0,u.assertIsBuffer)(e),64!==e.length&&(e=t.from(s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e};n.zeroAddress=function(){const e=(0,a.zeros)(20);return(0,a.bufferToHex)(e)};function f(e){const[t,n,r,i]=e;return[t,n,0===(0,a.arrToBufArr)(r).length?c.KECCAK256_RLP:r,0===(0,a.arrToBufArr)(i).length?c.KECCAK256_NULL:i]}n.isZeroAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return(0,n.zeroAddress)()===e},n.accountBodyFromSlim=f;const p=new Uint8Array(0);n.accountBodyToSlim=function(e){const[t,n,r,i]=e;return[t,n,(0,a.arrToBufArr)(r).equals(c.KECCAK256_RLP)?p:r,(0,a.arrToBufArr)(i).equals(c.KECCAK256_NULL)?p:i]},n.accountBodyToRLP=function(e,t=!0){const n=t?f(e):e;return(0,a.arrToBufArr)(r.RLP.encode(n))}}).call(this)}).call(this,e("buffer").Buffer)},{"./bytes":12,"./constants":13,"./helpers":15,"./internal":17,"@ethereumjs/rlp":8,buffer:445,"ethereum-cryptography/keccak":475,"ethereum-cryptography/secp256k1":476,"ethereum-cryptography/utils":477}],10:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Address=void 0;const r=e("./account"),i=e("./bytes");class s{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.buf=e}static zero(){return new s((0,i.zeros)(20))}static fromString(e){if(!(0,r.isValidAddress)(e))throw new Error("Invalid address");return new s((0,i.toBuffer)(e))}static fromPublicKey(e){if(!t.isBuffer(e))throw new Error("Public key should be Buffer");const n=(0,r.pubToAddress)(e);return new s(n)}static fromPrivateKey(e){if(!t.isBuffer(e))throw new Error("Private key should be Buffer");const n=(0,r.privateToAddress)(e);return new s(n)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new s((0,r.generateAddress)(e.buf,(0,i.bigIntToBuffer)(t)))}static generate2(e,n,i){if(!t.isBuffer(n))throw new Error("Expected salt to be a Buffer");if(!t.isBuffer(i))throw new Error("Expected initCode to be a Buffer");return new s((0,r.generateAddress2)(e.buf,n,i))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const e=(0,i.bufferToBigInt)(this.buf),t=BigInt(0),n=BigInt("0xffff");return e>=t&&e<=n}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return t.from(this.buf)}}n.Address=s}).call(this)}).call(this,e("buffer").Buffer)},{"./account":9,"./bytes":12,buffer:445}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AsyncEventEmitter=void 0;const r=e("events");class i extends r.EventEmitter{emit(e,...t){let[n,r]=t;const i=this;let s=i._events[e]??[];return void 0===r&&"function"==typeof n&&(r=n,n=void 0),"newListener"!==e&&"removeListener"!==e||(n={event:n,fn:r},r=void 0),s=Array.isArray(s)?s:[s],async function(e,t,n){let r;for await(const i of t)try{i.length<2?i.call(e,n):await new Promise(((t,r)=>{i.call(e,n,(e=>{e?r(e):t()}))}))}catch(e){r=e}if(r)throw r}(i,s.slice(),n).then(r).catch(r),i.listenerCount(e)>0}once(e,t){const n=this;let r;if("function"!=typeof t)throw new TypeError("listener must be a function");return r=t.length>=2?function(i,s){n.removeListener(e,r),t(i,s)}:function(i){n.removeListener(e,r),t(i,r)},n.on(e,r),n}first(e,t){let n=this._events[e]??[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(n)||(this._events[e]=n=[n]),n.unshift(t),this}before(e,t,n){return this.beforeOrAfter(e,t,n)}after(e,t,n){return this.beforeOrAfter(e,t,n,"after")}beforeOrAfter(e,t,n,r){let i,s,o=this._events[e]??[];const a="after"===r?1:0;if("function"!=typeof n)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(o)||(this._events[e]=o=[o]),s=o.length,i=o.length;i--;)if(o[i]===t){s=i+a;break}return o.splice(s,0,n),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}n.AsyncEventEmitter=i},{events:478}],12:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.intToUnpaddedBuffer=n.bigIntToUnpaddedBuffer=n.bigIntToHex=n.bufArrToArr=n.arrToBufArr=n.validateNoLeadingZeroes=n.baToJSON=n.toUtf8=n.short=n.addHexPrefix=n.toUnsigned=n.fromSigned=n.bufferToInt=n.bigIntToBuffer=n.bufferToBigInt=n.bufferToHex=n.toBuffer=n.unpadHexString=n.unpadArray=n.unpadBuffer=n.setLengthRight=n.setLengthLeft=n.zeros=n.intToBuffer=n.intToHex=void 0;const r=e("./helpers"),i=e("./internal");n.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`};n.intToBuffer=function(e){const r=(0,n.intToHex)(e);return t.from((0,i.padToEven)(r.slice(2)),"hex")};n.zeros=function(e){return t.allocUnsafe(e).fill(0)};const s=function(e,t,r){const i=(0,n.zeros)(t);return r?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};n.unpadBuffer=function(e){return(0,r.assertIsBuffer)(e),o(e)};n.unpadArray=function(e){return(0,r.assertIsArray)(e),o(e)};n.unpadHexString=function(e){return(0,r.assertIsHexString)(e),e=(0,i.stripHexPrefix)(e),"0x"+o(e)};n.toBuffer=function(e){if(null==e)return t.allocUnsafe(0);if(t.isBuffer(e))return t.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return t.from(e);if("string"==typeof e){if(!(0,i.isHexString)(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return t.from((0,i.padToEven)((0,i.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,n.intToBuffer)(e);if("bigint"==typeof e){if(e0&&0===n[0])throw new Error(`${t} cannot have leading zeroes, received: ${n.toString("hex")}`)},n.arrToBufArr=function e(n){return Array.isArray(n)?n.map((t=>e(t))):t.from(n)},n.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(t??[])};n.bigIntToHex=e=>"0x"+e.toString(16),n.bigIntToUnpaddedBuffer=function(e){return(0,n.unpadBuffer)(c(e))},n.intToUnpaddedBuffer=function(e){return(0,n.unpadBuffer)((0,n.intToBuffer)(e))}}).call(this)}).call(this,e("buffer").Buffer)},{"./helpers":15,"./internal":17,buffer:445}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MAX_WITHDRAWALS_PER_PAYLOAD=n.RLP_EMPTY_STRING=n.KECCAK256_RLP=n.KECCAK256_RLP_S=n.KECCAK256_RLP_ARRAY=n.KECCAK256_RLP_ARRAY_S=n.KECCAK256_NULL=n.KECCAK256_NULL_S=n.TWO_POW256=n.SECP256K1_ORDER_DIV_2=n.SECP256K1_ORDER=n.MAX_INTEGER_BIGINT=n.MAX_INTEGER=n.MAX_UINT64=void 0;const r=e("buffer"),i=e("ethereum-cryptography/secp256k1");n.MAX_UINT64=BigInt("0xffffffffffffffff"),n.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),n.SECP256K1_ORDER=i.secp256k1.CURVE.n,n.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),n.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),n.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",n.KECCAK256_NULL=r.Buffer.from(n.KECCAK256_NULL_S,"hex"),n.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",n.KECCAK256_RLP_ARRAY=r.Buffer.from(n.KECCAK256_RLP_ARRAY_S,"hex"),n.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",n.KECCAK256_RLP=r.Buffer.from(n.KECCAK256_RLP_S,"hex"),n.RLP_EMPTY_STRING=r.Buffer.from([128]),n.MAX_WITHDRAWALS_PER_PAYLOAD=16},{buffer:445,"ethereum-cryptography/secp256k1":476}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compactBytesToNibbles=n.bytesToNibbles=n.nibblesToCompactBytes=n.nibblesToBytes=n.hasTerminator=void 0;n.hasTerminator=e=>e.length>0&&16===e[e.length-1];n.nibblesToBytes=(e,t)=>{for(let n=0,r=0;r{let t=0;(0,n.hasTerminator)(e)&&(t=1,e=e.subarray(0,e.length-1));const r=new Uint8Array(e.length/2+1);return r[0]=t<<5,1&~e.length||(r[0]|=16,r[0]|=e[0],e=e.subarray(1)),(0,n.nibblesToBytes)(e,r.subarray(1)),r};n.bytesToNibbles=e=>{const t=2*e.length+1,n=new Uint8Array(t);for(let t=0;t{if(0===e.length)return e;let t=(0,n.bytesToNibbles)(e);t[0]<2&&(t=t.subarray(0,t.length-1));const r=2-(1&t[0]);return t.subarray(r)}},{}],15:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsString=n.assertIsArray=n.assertIsBuffer=n.assertIsHexString=void 0;const r=e("./internal");n.assertIsHexString=function(e){if(!(0,r.isHexString)(e)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)}};n.assertIsBuffer=function(e){if(!t.isBuffer(e)){throw new Error(`This method only supports Buffer but input was: ${e}`)}};n.assertIsArray=function(e){if(!Array.isArray(e)){throw new Error(`This method only supports number arrays but input was: ${e}`)}};n.assertIsString=function(e){if("string"!=typeof e){throw new Error(`This method only supports strings but input was: ${e}`)}}}).call(this)}).call(this,{isBuffer:e("../../../is-buffer/index.js")})},{"../../../is-buffer/index.js":538,"./internal":17}],16:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.toAscii=n.stripHexPrefix=n.padToEven=n.isHexString=n.isHexPrefixed=n.getKeys=n.getBinarySize=n.fromUtf8=n.fromAscii=n.arrayContainsArray=void 0,i(e("./constants"),n),i(e("./units"),n),i(e("./account"),n),i(e("./address"),n),i(e("./withdrawal"),n),i(e("./signature"),n),i(e("./bytes"),n),i(e("./types"),n),i(e("./encoding"),n),i(e("./asyncEventEmitter"),n);var s=e("./internal");Object.defineProperty(n,"arrayContainsArray",{enumerable:!0,get:function(){return s.arrayContainsArray}}),Object.defineProperty(n,"fromAscii",{enumerable:!0,get:function(){return s.fromAscii}}),Object.defineProperty(n,"fromUtf8",{enumerable:!0,get:function(){return s.fromUtf8}}),Object.defineProperty(n,"getBinarySize",{enumerable:!0,get:function(){return s.getBinarySize}}),Object.defineProperty(n,"getKeys",{enumerable:!0,get:function(){return s.getKeys}}),Object.defineProperty(n,"isHexPrefixed",{enumerable:!0,get:function(){return s.isHexPrefixed}}),Object.defineProperty(n,"isHexString",{enumerable:!0,get:function(){return s.isHexString}}),Object.defineProperty(n,"padToEven",{enumerable:!0,get:function(){return s.padToEven}}),Object.defineProperty(n,"stripHexPrefix",{enumerable:!0,get:function(){return s.stripHexPrefix}}),Object.defineProperty(n,"toAscii",{enumerable:!0,get:function(){return s.toAscii}}),i(e("./lock"),n),i(e("./provider"),n)},{"./account":9,"./address":10,"./asyncEventEmitter":11,"./bytes":12,"./constants":13,"./encoding":14,"./internal":17,"./lock":18,"./provider":19,"./signature":20,"./types":21,"./units":22,"./withdrawal":23}],17:[function(e,t,n){(function(e){(function(){"use strict";function t(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}Object.defineProperty(n,"__esModule",{value:!0}),n.isHexString=n.getKeys=n.fromAscii=n.fromUtf8=n.toAscii=n.arrayContainsArray=n.getBinarySize=n.padToEven=n.stripHexPrefix=n.isHexPrefixed=void 0,n.isHexPrefixed=t;function r(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}n.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return t(e)?e.slice(2):e},n.padToEven=r,n.getBinarySize=function(t){if("string"!=typeof t)throw new Error("[getBinarySize] method requires input type 'string', received "+typeof t);return e.byteLength(t,"utf8")},n.arrayContainsArray=function(e,t,n){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===n?"some":"every"]((t=>e.indexOf(t)>=0))},n.toAscii=function(e){let t="",n=0;const r=e.length;for("0x"===e.substring(0,2)&&(n=2);n0&&e.length!==2+2*t)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:445}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Lock=void 0;n.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((e=>this.promiseResolverQueue.push(e)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}}},{}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getProvider=n.fetchFromProvider=void 0;const r=e("micro-ftch");n.fetchFromProvider=async(e,t)=>(await(0,r.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result;n.getProvider=e=>{if("string"==typeof e)return e;if(void 0!==e?.connection?.url)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},{"micro-ftch":547}],20:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hashPersonalMessage=n.isValidSignature=n.fromRpcSig=n.toCompactSig=n.toRpcSig=n.ecrecover=n.ecsign=void 0;const r=e("ethereum-cryptography/keccak"),i=e("ethereum-cryptography/secp256k1"),s=e("./bytes"),o=e("./constants"),a=e("./helpers");function c(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function u(e){return e===BigInt(0)||e===BigInt(1)}n.ecsign=function(e,n,r){const s=i.secp256k1.sign(e,n),o=s.toCompactRawBytes();return{r:t.from(o.slice(0,32)),s:t.from(o.slice(32,64)),v:void 0===r?BigInt(s.recovery+27):BigInt(s.recovery+35)+BigInt(r)*BigInt(2)}};n.ecrecover=function(e,n,r,o,a){const l=t.concat([(0,s.setLengthLeft)(r,32),(0,s.setLengthLeft)(o,32)],64),d=c(n,a);if(!u(d))throw new Error("Invalid signature v value");const h=i.secp256k1.Signature.fromCompact(l).addRecoveryBit(Number(d)).recoverPublicKey(e);return t.from(h.toRawBytes(!1).slice(1))};n.toRpcSig=function(e,n,r,i){if(!u(c(e,i)))throw new Error("Invalid signature v value");return(0,s.bufferToHex)(t.concat([(0,s.setLengthLeft)(n,32),(0,s.setLengthLeft)(r,32),(0,s.toBuffer)(e)]))};n.toCompactSig=function(e,n,r,i){if(!u(c(e,i)))throw new Error("Invalid signature v value");let o=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(o=t.from(r),o[0]|=128),(0,s.bufferToHex)(t.concat([(0,s.setLengthLeft)(n,32),(0,s.setLengthLeft)(o,32)]))};n.fromRpcSig=function(e){const t=(0,s.toBuffer)(e);let n,r,i;if(t.length>=65)n=t.slice(0,32),r=t.slice(32,64),i=(0,s.bufferToBigInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");n=t.slice(0,32),r=t.slice(32,64),i=BigInt((0,s.bufferToInt)(t.slice(32,33))>>7),r[0]&=127}return i<27&&(i+=BigInt(27)),{v:i,r:n,s:r}};n.isValidSignature=function(e,t,n,r=!0,i){if(32!==t.length||32!==n.length)return!1;if(!u(c(e,i)))return!1;const a=(0,s.bufferToBigInt)(t),l=(0,s.bufferToBigInt)(n);return!(a===BigInt(0)||a>=o.SECP256K1_ORDER||l===BigInt(0)||l>=o.SECP256K1_ORDER)&&!(r&&l>=o.SECP256K1_ORDER_DIV_2)};n.hashPersonalMessage=function(e){(0,a.assertIsBuffer)(e);const n=t.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return t.from((0,r.keccak256)(t.concat([n,e])))}}).call(this)}).call(this,e("buffer").Buffer)},{"./bytes":12,"./constants":13,"./helpers":15,buffer:445,"ethereum-cryptography/keccak":475,"ethereum-cryptography/secp256k1":476}],21:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toType=n.TypeOutput=void 0;const r=e("./bytes"),i=e("./internal");var s;!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(s=n.TypeOutput||(n.TypeOutput={})),n.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,i.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const n=(0,r.toBuffer)(e);switch(t){case s.Buffer:return n;case s.BigInt:return(0,r.bufferToBigInt)(n);case s.Number:{const e=(0,r.bufferToBigInt)(n);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case s.PrefixedHexString:return(0,r.bufferToHex)(n);default:throw new Error("unknown outputType")}}},{"./bytes":12,"./internal":17}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GWEI_TO_WEI=void 0,n.GWEI_TO_WEI=BigInt(1e9)},{}],23:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Withdrawal=void 0;const r=e("./address"),i=e("./bytes"),s=e("./types");class o{constructor(e,t,n,r){this.index=e,this.validatorIndex=t,this.address=n,this.amount=r}static fromWithdrawalData(e){const{index:t,validatorIndex:n,address:i,amount:a}=e,c=(0,s.toType)(t,s.TypeOutput.BigInt),u=(0,s.toType)(n,s.TypeOutput.BigInt),l=new r.Address((0,s.toType)(i,s.TypeOutput.Buffer)),d=(0,s.toType)(a,s.TypeOutput.BigInt);return new o(c,u,l,d)}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);const[t,n,r,i]=e;return o.fromWithdrawalData({index:t,validatorIndex:n,address:r,amount:i})}static toBufferArray(e){const{index:n,validatorIndex:i,address:o,amount:a}=e,c=(0,s.toType)(n,s.TypeOutput.BigInt)===BigInt(0)?t.alloc(0):(0,s.toType)(n,s.TypeOutput.Buffer),u=(0,s.toType)(i,s.TypeOutput.BigInt)===BigInt(0)?t.alloc(0):(0,s.toType)(i,s.TypeOutput.Buffer);let l;l=o instanceof r.Address?o.buf:(0,s.toType)(o,s.TypeOutput.Buffer);return[c,u,l,(0,s.toType)(a,s.TypeOutput.BigInt)===BigInt(0)?t.alloc(0):(0,s.toType)(a,s.TypeOutput.Buffer)]}raw(){return o.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,i.bigIntToHex)(this.index),validatorIndex:(0,i.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,i.bigIntToHex)(this.amount)}}}n.Withdrawal=o}).call(this)}).call(this,e("buffer").Buffer)},{"./address":10,"./bytes":12,"./types":21,buffer:445}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BaseControllerV1=n.isBaseControllerV1=void 0,n.isBaseControllerV1=function(e){return"name"in e&&"string"==typeof e.name&&"config"in e&&"object"==typeof e.config&&"defaultConfig"in e&&"object"==typeof e.defaultConfig&&"state"in e&&"object"==typeof e.state&&"defaultState"in e&&"object"==typeof e.defaultState&&"disabled"in e&&"boolean"==typeof e.disabled&&"subscribe"in e&&"function"==typeof e.subscribe};class r{constructor(e={},t={}){this.defaultConfig={},this.defaultState={},this.disabled=!1,this.name="BaseController",this.internalConfig=this.defaultConfig,this.internalState=this.defaultState,this.internalListeners=[],this.initialState=t,this.initialConfig=e}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}get config(){return this.internalConfig}get state(){return this.internalState}configure(e,t=!1,n=!0){if(n){this.internalConfig=t?e:Object.assign(this.internalConfig,e);for(const e of Object.keys(this.internalConfig)){const t=this.internalConfig[e];void 0!==t&&(this[e]=t)}}else for(const t of Object.keys(e))if(void 0!==this.internalConfig[t]){const n=e[t];this.internalConfig[t]=n,this[t]=n}}notify(){this.disabled||this.internalListeners.forEach((e=>{e(this.internalState)}))}subscribe(e){this.internalListeners.push(e)}unsubscribe(e){const t=this.internalListeners.findIndex((t=>e===t));return t>-1&&this.internalListeners.splice(t,1),t>-1}update(e,t=!1){this.internalState=t?Object.assign({},e):Object.assign({},this.internalState,e),this.notify()}}n.BaseControllerV1=r,n.default=r},{}],25:[function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.getPersistentState=n.getAnonymizedState=n.BaseController=n.isBaseController=void 0;const o=e("immer");(0,o.enablePatches)(),n.isBaseController=function(e){return"name"in e&&"string"==typeof e.name&&"state"in e&&"object"==typeof e.state&&"metadata"in e&&"object"==typeof e.metadata};function a(e,t,n){return Object.keys(e).reduce(((r,i)=>{try{const s=t[i];if(!s)throw new Error(`No metadata found for '${String(i)}'`);const o=s[n],a=e[i];return"function"==typeof o?r[i]=o(a):o&&(r[i]=a),r}catch(e){return setTimeout((()=>{throw e})),r}}),{})}n.BaseController=class{constructor({messenger:e,metadata:t,name:n,state:s}){r.set(this,void 0),this.messagingSystem=e,this.name=n,i(this,r,(0,o.freeze)(s,!0),"f"),this.metadata=t,this.messagingSystem.registerActionHandler(`${n}:getState`,(()=>this.state)),this.messagingSystem.registerInitialEventPayload({eventType:`${n}:stateChange`,getPayload:()=>[this.state,[]]})}get state(){return s(this,r,"f")}set state(e){throw new Error("Controller state cannot be directly mutated; use 'update' method instead.")}update(e){const[t,n,a]=o.produceWithPatches(s(this,r,"f"),e);return i(this,r,t,"f"),this.messagingSystem.publish(`${this.name}:stateChange`,t,n),{nextState:t,patches:n,inversePatches:a}}applyPatches(e){const t=(0,o.applyPatches)(s(this,r,"f"),e);i(this,r,t,"f"),this.messagingSystem.publish(`${this.name}:stateChange`,t,e)}destroy(){this.messagingSystem.clearEventSubscriptions(`${this.name}:stateChange`)}},r=new WeakMap,n.getAnonymizedState=function(e,t){return a(e,t,"anonymous")},n.getPersistentState=function(e,t){return a(e,t,"persist")}},{immer:535}],26:[function(e,t,n){"use strict";var r,i,s,o,a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.ControllerMessenger=void 0;const c=e("./RestrictedControllerMessenger.cjs");n.ControllerMessenger=class{constructor(){r.set(this,new Map),i.set(this,new Map),s.set(this,new Map),o.set(this,new Map)}registerActionHandler(e,t){if(a(this,r,"f").has(e))throw new Error(`A handler for ${e} has already been registered`);a(this,r,"f").set(e,t)}unregisterActionHandler(e){a(this,r,"f").delete(e)}clearActions(){a(this,r,"f").clear()}call(e,...t){const n=a(this,r,"f").get(e);if(!n)throw new Error(`A handler for ${e} has not been registered`);return n(...t)}registerInitialEventPayload({eventType:e,getPayload:t}){a(this,s,"f").set(e,t)}publish(e,...t){const n=a(this,i,"f").get(e);if(n)for(const[e,r]of n.entries())try{if(r){const n=a(this,o,"f").get(e),i=r(...t);i!==n&&(a(this,o,"f").set(e,i),e(i,n))}else e(...t)}catch(e){setTimeout((()=>{throw e}))}}subscribe(e,t,n){let r=a(this,i,"f").get(e);if(r||(r=new Map,a(this,i,"f").set(e,r)),r.set(t,n),n){const r=a(this,s,"f").get(e);if(r){const e=n(...r());a(this,o,"f").set(t,e)}}}unsubscribe(e,t){const n=a(this,i,"f").get(e);if(!n||!n.has(t))throw new Error(`Subscription not found for event: ${e}`);n.get(t)&&a(this,o,"f").delete(t),n.delete(t)}clearEventSubscriptions(e){a(this,i,"f").delete(e)}clearSubscriptions(){a(this,i,"f").clear()}getRestricted({name:e,allowedActions:t,allowedEvents:n}){return new c.RestrictedControllerMessenger({controllerMessenger:this,name:e,allowedActions:t,allowedEvents:n})}},r=new WeakMap,i=new WeakMap,s=new WeakMap,o=new WeakMap},{"./RestrictedControllerMessenger.cjs":27}],27:[function(e,t,n){"use strict";var r,i,s,o,a,c,u,l,d=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},h=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.RestrictedControllerMessenger=void 0;n.RestrictedControllerMessenger=class{constructor({controllerMessenger:e,name:t,allowedActions:n,allowedEvents:c}){r.add(this),i.set(this,void 0),s.set(this,void 0),o.set(this,void 0),a.set(this,void 0),d(this,i,e,"f"),d(this,s,t,"f"),d(this,o,n,"f"),d(this,a,c,"f")}registerActionHandler(e,t){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed registering action handlers prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").registerActionHandler(e,t)}unregisterActionHandler(e){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed unregistering action handlers prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").unregisterActionHandler(e)}call(e,...t){if(!h(this,r,"m",u).call(this,e))throw new Error(`Action missing from allow list: ${e}`);return h(this,i,"f").call(e,...t)}registerInitialEventPayload({eventType:e,getPayload:t}){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").registerInitialEventPayload({eventType:e,getPayload:t})}publish(e,...t){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").publish(e,...t)}subscribe(e,t,n){if(!h(this,r,"m",c).call(this,e))throw new Error(`Event missing from allow list: ${e}`);return n?h(this,i,"f").subscribe(e,t,n):h(this,i,"f").subscribe(e,t)}unsubscribe(e,t){if(!h(this,r,"m",c).call(this,e))throw new Error(`Event missing from allow list: ${e}`);h(this,i,"f").unsubscribe(e,t)}clearEventSubscriptions(e){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed clearing events prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").clearEventSubscriptions(e)}},i=new WeakMap,s=new WeakMap,o=new WeakMap,a=new WeakMap,r=new WeakSet,c=function(e){const t=h(this,a,"f");return h(this,r,"m",l).call(this,e)||null!==t&&t.includes(e)},u=function(e){const t=h(this,o,"f");return h(this,r,"m",l).call(this,e)||null!==t&&t.includes(e)},l=function(e){return e.startsWith(`${h(this,s,"f")}:`)}},{}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RestrictedControllerMessenger=n.ControllerMessenger=n.isBaseController=n.getPersistentState=n.getAnonymizedState=n.BaseController=n.isBaseControllerV1=n.BaseControllerV1=void 0;var r=e("./BaseControllerV1.cjs");Object.defineProperty(n,"BaseControllerV1",{enumerable:!0,get:function(){return r.BaseControllerV1}}),Object.defineProperty(n,"isBaseControllerV1",{enumerable:!0,get:function(){return r.isBaseControllerV1}});var i=e("./BaseControllerV2.cjs");Object.defineProperty(n,"BaseController",{enumerable:!0,get:function(){return i.BaseController}}),Object.defineProperty(n,"getAnonymizedState",{enumerable:!0,get:function(){return i.getAnonymizedState}}),Object.defineProperty(n,"getPersistentState",{enumerable:!0,get:function(){return i.getPersistentState}}),Object.defineProperty(n,"isBaseController",{enumerable:!0,get:function(){return i.isBaseController}});var s=e("./ControllerMessenger.cjs");Object.defineProperty(n,"ControllerMessenger",{enumerable:!0,get:function(){return s.ControllerMessenger}});var o=e("./RestrictedControllerMessenger.cjs");Object.defineProperty(n,"RestrictedControllerMessenger",{enumerable:!0,get:function(){return o.RestrictedControllerMessenger}})},{"./BaseControllerV1.cjs":24,"./BaseControllerV2.cjs":25,"./ControllerMessenger.cjs":26,"./RestrictedControllerMessenger.cjs":27}],29:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP=n.ApprovalType=n.ORIGIN_METAMASK=n.NFT_API_TIMEOUT=n.NFT_API_VERSION=n.NFT_API_BASE_URL=n.OPENSEA_PROXY_URL=n.BUILT_IN_NETWORKS=n.TESTNET_TICKER_SYMBOLS=n.ASSET_TYPES=n.GWEI=n.ERC1155_TOKEN_RECEIVER_INTERFACE_ID=n.ERC1155_METADATA_URI_INTERFACE_ID=n.ERC1155_INTERFACE_ID=n.ERC721_ENUMERABLE_INTERFACE_ID=n.ERC721_METADATA_INTERFACE_ID=n.ERC721_INTERFACE_ID=n.ERC20=n.ERC1155=n.ERC721=n.MAX_SAFE_CHAIN_ID=n.GANACHE_CHAIN_ID=n.IPFS_DEFAULT_GATEWAY_URL=n.FALL_BACK_VS_CURRENCY=n.RPC=void 0;const r=e("./types.cjs");var i;n.RPC="rpc",n.FALL_BACK_VS_CURRENCY="ETH",n.IPFS_DEFAULT_GATEWAY_URL="https://cloudflare-ipfs.com/ipfs/",n.GANACHE_CHAIN_ID="0x539",n.MAX_SAFE_CHAIN_ID=0xfffffffffffec,n.ERC721="ERC721",n.ERC1155="ERC1155",n.ERC20="ERC20",n.ERC721_INTERFACE_ID="0x80ac58cd",n.ERC721_METADATA_INTERFACE_ID="0x5b5e139f",n.ERC721_ENUMERABLE_INTERFACE_ID="0x780e9d63",n.ERC1155_INTERFACE_ID="0xd9b67a26",n.ERC1155_METADATA_URI_INTERFACE_ID="0x0e89341c",n.ERC1155_TOKEN_RECEIVER_INTERFACE_ID="0x4e2312e0",n.GWEI="gwei",n.ASSET_TYPES={NATIVE:"NATIVE",TOKEN:"TOKEN",NFT:"NFT",UNKNOWN:"UNKNOWN"},n.TESTNET_TICKER_SYMBOLS={GOERLI:"GoerliETH",SEPOLIA:"SepoliaETH",LINEA_GOERLI:"LineaETH",LINEA_SEPOLIA:"LineaETH"},n.BUILT_IN_NETWORKS={[r.NetworkType.goerli]:{chainId:r.ChainId.goerli,ticker:r.NetworksTicker.goerli,rpcPrefs:{blockExplorerUrl:`https://${r.NetworkType.goerli}.etherscan.io`}},[r.NetworkType.sepolia]:{chainId:r.ChainId.sepolia,ticker:r.NetworksTicker.sepolia,rpcPrefs:{blockExplorerUrl:`https://${r.NetworkType.sepolia}.etherscan.io`}},[r.NetworkType.mainnet]:{chainId:r.ChainId.mainnet,ticker:r.NetworksTicker.mainnet,rpcPrefs:{blockExplorerUrl:"https://etherscan.io"}},[r.NetworkType["linea-goerli"]]:{chainId:r.ChainId["linea-goerli"],ticker:r.NetworksTicker["linea-goerli"],rpcPrefs:{blockExplorerUrl:"https://goerli.lineascan.build"}},[r.NetworkType["linea-sepolia"]]:{chainId:r.ChainId["linea-sepolia"],ticker:r.NetworksTicker["linea-sepolia"],rpcPrefs:{blockExplorerUrl:"https://sepolia.lineascan.build"}},[r.NetworkType["linea-mainnet"]]:{chainId:r.ChainId["linea-mainnet"],ticker:r.NetworksTicker["linea-mainnet"],rpcPrefs:{blockExplorerUrl:"https://lineascan.build"}},[r.NetworkType.rpc]:{chainId:void 0,blockExplorerUrl:void 0,ticker:void 0,rpcPrefs:void 0}},n.OPENSEA_PROXY_URL="https://proxy.api.cx.metamask.io/opensea/v1/api/v2",n.NFT_API_BASE_URL="https://nft.api.cx.metamask.io",n.NFT_API_VERSION="1",n.NFT_API_TIMEOUT=15e3,n.ORIGIN_METAMASK="metamask",function(e){e.AddEthereumChain="wallet_addEthereumChain",e.ConnectAccounts="connect_accounts",e.EthDecrypt="eth_decrypt",e.EthGetEncryptionPublicKey="eth_getEncryptionPublicKey",e.EthSignTypedData="eth_signTypedData",e.PersonalSign="personal_sign",e.ResultError="result_error",e.ResultSuccess="result_success",e.SnapDialogAlert="snap_dialog:alert",e.SnapDialogConfirmation="snap_dialog:confirmation",e.SnapDialogPrompt="snap_dialog:prompt",e.SnapDialogDefault="snap_dialog",e.SwitchEthereumChain="wallet_switchEthereumChain",e.Transaction="transaction",e.Unlock="unlock",e.WalletConnect="wallet_connect",e.WalletRequestPermissions="wallet_requestPermissions",e.WatchAsset="wallet_watchAsset"}(i||(n.ApprovalType=i={})),n.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP={[r.ChainId.goerli]:r.BuiltInNetworkName.Goerli,[r.ChainId.sepolia]:r.BuiltInNetworkName.Sepolia,[r.ChainId.mainnet]:r.BuiltInNetworkName.Mainnet,[r.ChainId["linea-goerli"]]:r.BuiltInNetworkName.LineaGoerli,[r.ChainId["linea-sepolia"]]:r.BuiltInNetworkName.LineaSepolia,[r.ChainId["linea-mainnet"]]:r.BuiltInNetworkName.LineaMainnet,[r.ChainId.aurora]:r.BuiltInNetworkName.Aurora}},{"./types.cjs":33}],30:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.isEqualCaseInsensitive=n.weiHexToGweiDec=n.toHex=n.toChecksumHexAddress=n.timeoutFetch=n.successfulFetch=n.safelyExecuteWithTimeout=n.safelyExecute=n.query=n.normalizeEnsName=n.isValidHexAddress=n.isValidJson=n.isSmartContractCode=n.isSafeDynamicKey=n.isSafeChainId=n.isPlainObject=n.isNonEmptyArray=n.hexToText=n.hexToBN=n.handleFetch=n.gweiDecToWEIBN=n.getBuyURL=n.fromHex=n.fractionBN=n.fetchWithErrorHandling=n.convertHexToDecimal=n.BNToHex=void 0,i(e("./constants.cjs"),n);var s=e("./util.cjs");Object.defineProperty(n,"BNToHex",{enumerable:!0,get:function(){return s.BNToHex}}),Object.defineProperty(n,"convertHexToDecimal",{enumerable:!0,get:function(){return s.convertHexToDecimal}}),Object.defineProperty(n,"fetchWithErrorHandling",{enumerable:!0,get:function(){return s.fetchWithErrorHandling}}),Object.defineProperty(n,"fractionBN",{enumerable:!0,get:function(){return s.fractionBN}}),Object.defineProperty(n,"fromHex",{enumerable:!0,get:function(){return s.fromHex}}),Object.defineProperty(n,"getBuyURL",{enumerable:!0,get:function(){return s.getBuyURL}}),Object.defineProperty(n,"gweiDecToWEIBN",{enumerable:!0,get:function(){return s.gweiDecToWEIBN}}),Object.defineProperty(n,"handleFetch",{enumerable:!0,get:function(){return s.handleFetch}}),Object.defineProperty(n,"hexToBN",{enumerable:!0,get:function(){return s.hexToBN}}),Object.defineProperty(n,"hexToText",{enumerable:!0,get:function(){return s.hexToText}}),Object.defineProperty(n,"isNonEmptyArray",{enumerable:!0,get:function(){return s.isNonEmptyArray}}),Object.defineProperty(n,"isPlainObject",{enumerable:!0,get:function(){return s.isPlainObject}}),Object.defineProperty(n,"isSafeChainId",{enumerable:!0,get:function(){return s.isSafeChainId}}),Object.defineProperty(n,"isSafeDynamicKey",{enumerable:!0,get:function(){return s.isSafeDynamicKey}}),Object.defineProperty(n,"isSmartContractCode",{enumerable:!0,get:function(){return s.isSmartContractCode}}),Object.defineProperty(n,"isValidJson",{enumerable:!0,get:function(){return s.isValidJson}}),Object.defineProperty(n,"isValidHexAddress",{enumerable:!0,get:function(){return s.isValidHexAddress}}),Object.defineProperty(n,"normalizeEnsName",{enumerable:!0,get:function(){return s.normalizeEnsName}}),Object.defineProperty(n,"query",{enumerable:!0,get:function(){return s.query}}),Object.defineProperty(n,"safelyExecute",{enumerable:!0,get:function(){return s.safelyExecute}}),Object.defineProperty(n,"safelyExecuteWithTimeout",{enumerable:!0,get:function(){return s.safelyExecuteWithTimeout}}),Object.defineProperty(n,"successfulFetch",{enumerable:!0,get:function(){return s.successfulFetch}}),Object.defineProperty(n,"timeoutFetch",{enumerable:!0,get:function(){return s.timeoutFetch}}),Object.defineProperty(n,"toChecksumHexAddress",{enumerable:!0,get:function(){return s.toChecksumHexAddress}}),Object.defineProperty(n,"toHex",{enumerable:!0,get:function(){return s.toHex}}),Object.defineProperty(n,"weiHexToGweiDec",{enumerable:!0,get:function(){return s.weiHexToGweiDec}}),Object.defineProperty(n,"isEqualCaseInsensitive",{enumerable:!0,get:function(){return s.isEqualCaseInsensitive}}),i(e("./types.cjs"),n),i(e("./siwe.cjs"),n)},{"./constants.cjs":29,"./siwe.cjs":32,"./types.cjs":33,"./util.cjs":34}],31:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.projectLogger=void 0;const r=e("@metamask/utils");Object.defineProperty(n,"createModuleLogger",{enumerable:!0,get:function(){return r.createModuleLogger}}),n.projectLogger=(0,r.createProjectLogger)("controller-utils")},{"@metamask/utils":369}],32:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.detectSIWE=n.isValidSIWEOrigin=n.parseDomainParts=void 0;const r=e("@metamask/utils"),i=e("@spruceid/siwe-parser"),s=e("./logger.cjs"),o=(0,s.createModuleLogger)(s.projectLogger,"detect-siwe");function a(e){try{const i="string"!=typeof(n=e)?n:(0,r.remove0x)(n),s=t.from(i,"hex");return 32===s.length?e:s.toString("utf8")}catch(t){return o(t),e}var n}const c={"http:":"80","https:":"443"};n.parseDomainParts=(e,t)=>e.match(/^[^/:]*:\/\//u)?new URL(e):new URL(`${t}//${e}`);n.isValidSIWEOrigin=e=>{try{const{origin:t,siwe:r}=e;if(t.startsWith("file://"))return!0;if(!t||!r?.parsedMessage?.domain)return!1;const i=new URL(t),s=(0,n.parseDomainParts)(r.parsedMessage.domain,i.protocol);return 0===s.hostname.localeCompare(i.hostname,void 0,{sensitivity:"accent"})&&(""!==s.port&&s.port!==i.port?""===i.port&&s.port===c[i.protocol]:""===s.username||s.username===i.username)}catch(e){return o(e),!1}};n.detectSIWE=e=>{try{const{data:t}=e,n=a(t);return{isSIWEMessage:!0,parsedMessage:new i.ParsedMessage(n)}}catch(e){return{isSIWEMessage:!1,parsedMessage:null}}}}).call(this)}).call(this,e("buffer").Buffer)},{"./logger.cjs":31,"@metamask/utils":369,"@spruceid/siwe-parser":403,buffer:445}],33:[function(e,t,n){"use strict";var r,i;Object.defineProperty(n,"__esModule",{value:!0}),n.NetworkNickname=n.BlockExplorerUrl=n.NetworksTicker=n.ChainId=n.BuiltInNetworkName=n.isInfuraNetworkType=n.isNetworkType=n.NetworkType=n.InfuraNetworkType=void 0,n.InfuraNetworkType={mainnet:"mainnet",goerli:"goerli",sepolia:"sepolia","linea-goerli":"linea-goerli","linea-sepolia":"linea-sepolia","linea-mainnet":"linea-mainnet"},n.NetworkType={...n.InfuraNetworkType,rpc:"rpc"},n.isNetworkType=function(e){return Object.values(n.NetworkType).includes(e)},n.isInfuraNetworkType=function(e){return Object.keys(n.InfuraNetworkType).includes(e)},function(e){e.Mainnet="mainnet",e.Goerli="goerli",e.Sepolia="sepolia",e.LineaGoerli="linea-goerli",e.LineaSepolia="linea-sepolia",e.LineaMainnet="linea-mainnet",e.Aurora="aurora"}(r||(n.BuiltInNetworkName=r={})),n.ChainId={[r.Mainnet]:"0x1",[r.Goerli]:"0x5",[r.Sepolia]:"0xaa36a7",[r.Aurora]:"0x4e454152",[r.LineaGoerli]:"0xe704",[r.LineaSepolia]:"0xe705",[r.LineaMainnet]:"0xe708"},function(e){e.mainnet="ETH",e.goerli="GoerliETH",e.sepolia="SepoliaETH",e["linea-goerli"]="LineaETH",e["linea-sepolia"]="LineaETH",e["linea-mainnet"]="ETH",e.rpc=""}(i||(n.NetworksTicker=i={})),n.BlockExplorerUrl={[r.Mainnet]:"https://etherscan.io",[r.Goerli]:"https://goerli.etherscan.io",[r.Sepolia]:"https://sepolia.etherscan.io",[r.LineaGoerli]:"https://goerli.lineascan.build",[r.LineaSepolia]:"https://sepolia.lineascan.build",[r.LineaMainnet]:"https://lineascan.build"},n.NetworkNickname={[r.Mainnet]:"Ethereum Mainnet",[r.Goerli]:"Goerli",[r.Sepolia]:"Sepolia",[r.LineaGoerli]:"Linea Goerli",[r.LineaSepolia]:"Linea Sepolia",[r.LineaMainnet]:"Linea"}},{}],34:[function(e,t,n){(function(t){(function(){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.isEqualCaseInsensitive=n.isValidJson=n.isNonEmptyArray=n.isPlainObject=n.convertHexToDecimal=n.query=n.normalizeEnsName=n.timeoutFetch=n.fetchWithErrorHandling=n.handleFetch=n.successfulFetch=n.isSmartContractCode=n.isValidHexAddress=n.toChecksumHexAddress=n.safelyExecuteWithTimeout=n.safelyExecute=n.toHex=n.fromHex=n.hexToText=n.hexToBN=n.getBuyURL=n.weiHexToGweiDec=n.gweiDecToWEIBN=n.fractionBN=n.BNToHex=n.isSafeChainId=n.isSafeDynamicKey=n.PROTOTYPE_POLLUTION_BLOCKLIST=void 0;const i=e("@ethereumjs/util"),s=e("@metamask/ethjs-unit"),o=e("@metamask/utils"),a=r(e("bn.js")),c=r(e("eth-ens-namehash")),u=r(e("fast-deep-equal")),l=e("./constants.cjs"),d=new Error("timeout");function h(e){return e?new a.default((0,o.remove0x)(e),16):new a.default(0)}async function f(e,t){const n=await fetch(e,t);if(!n.ok)throw new Error(`Fetch failed with status '${n.status}' for request '${String(e)}'`);return n}async function p(e,t){const n=await f(e,t);return await n.json()}n.PROTOTYPE_POLLUTION_BLOCKLIST=["__proto__","constructor","prototype"],n.isSafeDynamicKey=function(e){return"string"==typeof e&&!n.PROTOTYPE_POLLUTION_BLOCKLIST.some((t=>e===t))},n.isSafeChainId=function(e){if(!(0,o.isHexString)(e))return!1;const t=Number.parseInt(e,(0,o.isStrictHexString)(e)?16:10);return Number.isSafeInteger(t)&&t>0&&t<=l.MAX_SAFE_CHAIN_ID},n.BNToHex=function(e){return(0,o.add0x)(e.toString(16))},n.fractionBN=function(e,t,n){const r=new a.default(t),i=new a.default(n);return e.mul(r).div(i)},n.gweiDecToWEIBN=function(e){if(Number.isNaN(e))return new a.default(0);const t=e.toString().split("."),n=t[0]||"0";let r=t[1]||"";if(!r)return(0,s.toWei)(n,"gwei");if(r.length<=9)return(0,s.toWei)(`${n}.${r}`,"gwei");const i=r.slice(9)[0];r=r.slice(0,9);let o=(0,s.toWei)(`${n}.${r}`,"gwei");return Number(i)>=5&&(o=o.add(new a.default(1))),o},n.weiHexToGweiDec=function(e){const t=new a.default((0,o.remove0x)(e),16);return(0,s.fromWei)(t,"gwei")},n.getBuyURL=function(e="1",t,n=5){switch(e){case"1":return`https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${n}&address=${t}&crypto_currency=ETH`;case"5":return"https://goerli-faucet.slock.it/";case"11155111":return"https://sepoliafaucet.net/";default:return}},n.hexToBN=h,n.hexToText=function(e){try{const n=(0,o.remove0x)(e);return t.from(n,"hex").toString("utf8")}catch(t){return e}},n.fromHex=function(e){return a.default.isBN(e)?e:new a.default(h(e).toString(10))},n.toHex=function(e){return"string"==typeof e&&(0,o.isStrictHexString)(e)?e:`0x${a.default.isBN(e)||"bigint"==typeof e?e.toString(16):new a.default(e.toString(),10).toString(16)}`},n.safelyExecute=async function(e,t=!1){try{return await e()}catch(e){return void(t&&console.error(e))}},n.safelyExecuteWithTimeout=async function(e,t=!1,n=500){try{return await Promise.race([e(),new Promise(((e,t)=>setTimeout((()=>{t(d)}),n)))])}catch(e){return void(t&&console.error(e))}},n.toChecksumHexAddress=function(e){if("string"!=typeof e)return e;const t=(0,o.add0x)(e);return(0,o.isHexString)(t)?(0,i.toChecksumAddress)(t):t},n.isValidHexAddress=function(e,{allowNonPrefixed:t=!0}={}){const n=t?(0,o.add0x)(e):e;return!!(0,o.isStrictHexString)(n)&&(0,i.isValidAddress)(n)},n.isSmartContractCode=function(e){return!!e&&("0x"!==e&&"0x0"!==e)},n.successfulFetch=f,n.handleFetch=p,n.fetchWithErrorHandling=async function({url:e,options:t,timeout:n,errorCodesToCatch:r}){let i;try{i=n?Promise.race([await p(e,t),new Promise(((e,t)=>setTimeout((()=>{t(d)}),n)))]):await p(e,t)}catch(e){!function(e,t=[]){if(!e)return;if(!(e instanceof Error))throw e;if(!t.some((t=>e.message.includes(`Fetch failed with status '${t}'`)))&&!e.message.includes("Failed to fetch")&&e!==d)throw e;console.error(e)}(e,r)}return i},n.timeoutFetch=async function(e,t,n=500){return Promise.race([f(e,t),new Promise(((e,t)=>setTimeout((()=>{t(d)}),n)))])},n.normalizeEnsName=function(e){if("."===e)return e;if(e&&"string"==typeof e)try{const t=c.default.normalize(e.trim());if(t.match(/^(([\w\d-]+)\.)*[\w\d-]{7,}\.(eth|test)$/u))return t}catch(e){}return null},n.query=function(e,t,n=[]){return new Promise(((r,i)=>{const s=(e,t)=>{e?i(e):r(t)};t in e&&"function"==typeof e[t]?e[t](...n,s):e.sendAsync({method:t,params:n},s)}))};n.convertHexToDecimal=(e="0x0")=>(0,o.isStrictHexString)(e)?parseInt(e,16):Number(e)?Number(e):0,n.isPlainObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},n.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},n.isValidJson=function(e){try{return(0,u.default)(e,JSON.parse(JSON.stringify(e)))}catch(e){return!1}},n.isEqualCaseInsensitive=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()}}).call(this)}).call(this,e("buffer").Buffer)},{"./constants.cjs":29,"@ethereumjs/util":16,"@metamask/ethjs-unit":35,"@metamask/utils":369,"bn.js":436,buffer:445,"eth-ens-namehash":474,"fast-deep-equal":504}],35:[function(e,t,n){"use strict";var r=e("bn.js"),i=e("@metamask/number-to-bn"),s=new r(0),o=new r(-1),a={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function c(e){var t=e?e.toLowerCase():"ether",n=a[t];if("string"!=typeof n)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(a,null,2));return new r(n,10)}function u(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"==typeof e&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+typeof e+".")}t.exports={unitMap:a,numberToString:u,getValueOfUnit:c,fromWei:function(e,t,n){var r=i(e),u=r.lt(s),l=c(t),d=a[t].length-1||1,h=n||{};u&&(r=r.mul(o));for(var f=r.mod(l).toString(10);f.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var h=d[0],f=d[1];if(h||(h="0"),f||(f="0"),f.length>s)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;f.length{"destroy"in e&&"function"==typeof e.destroy&&e.destroy()})),y(this,o,[],"f"),y(this,s,!0,"f")}push(e){g(this,r,"m",c).call(this),g(this,o,"f").push(e)}handle(e,t){if(g(this,r,"m",c).call(this),t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?g(this,r,"m",u).call(this,e,t):g(this,r,"m",u).call(this,e):t?g(this,r,"m",l).call(this,e,t):this._promiseHandle(e)}asMiddleware(){return g(this,r,"m",c).call(this),async(e,t,n,r)=>{try{const[s,a,c]=await g(i,i,"m",h).call(i,e,t,g(this,o,"f"));return a?(await g(i,i,"m",p).call(i,c),r(s)):n((async e=>{try{await g(i,i,"m",p).call(i,c)}catch(t){return e(t)}return e()}))}catch(e){return r(e)}}}async _promiseHandle(e){return new Promise(((t,n)=>{g(this,r,"m",l).call(this,e,((e,r)=>{e&&void 0===r?n(e):t(r)})).catch(n)}))}}function E(e){return JSON.stringify(e,null,2)}n.JsonRpcEngine=S,i=S,s=new WeakMap,o=new WeakMap,a=new WeakMap,r=new WeakSet,c=function(){if(g(this,s,"f"))throw new Error("This engine is destroyed and can no longer be used.")},u=async function(e,t){try{if(0===e.length){const e=[{id:null,jsonrpc:"2.0",error:new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Request batch must contain plain objects. Received an empty array")}];return t?t(null,e):e}const n=(await Promise.all(e.map(this._promiseHandle.bind(this)))).filter((e=>void 0!==e));return t?t(null,n):n}catch(e){if(t)return t(e);throw e}},l=async function(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const n=new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(n,{id:null,jsonrpc:"2.0",error:n})}if("string"!=typeof e.method){const n=new v.JsonRpcError(v.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return g(this,a,"f")&&!(0,w.isJsonRpcRequest)(e)?t(null):t(n,{id:e.id??null,jsonrpc:"2.0",error:n})}if(g(this,a,"f")&&(0,w.isJsonRpcNotification)(e)&&!(0,w.isJsonRpcRequest)(e)){try{await g(this,a,"f").call(this,e)}catch(n){return t(n)}return t(null)}let n=null;const r={...e},s={id:r.id,jsonrpc:r.jsonrpc};try{await g(i,i,"m",d).call(i,r,s,g(this,o,"f"))}catch(e){n=e}return n&&(delete s.result,s.error||(s.error=(0,v.serializeError)(n))),t(n,s)},d=async function(e,t,n){const[r,s,o]=await g(i,i,"m",h).call(i,e,t,n);if(g(i,i,"m",m).call(i,e,t,s),await g(i,i,"m",p).call(i,o),r)throw r},h=async function(e,t,n){const r=[];let s=null,o=!1;for(const a of n)if([s,o]=await g(i,i,"m",f).call(i,e,t,a,r),o)break;return[s,o,r.reverse()]},f=async function(e,t,n,r){return new Promise((i=>{const s=e=>{const n=e||t.error;n&&(t.error=(0,v.serializeError)(n)),i([n,!0])},o=n=>{t.error?s(t.error):(n&&("function"!=typeof n&&s(new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${E(e)}`,{request:e})),r.push(n)),i([null,!1]))};try{n(e,t,o,s)}catch(e){s(e)}}))},p=async function(e){for(const t of e)await new Promise(((e,n)=>{t((t=>t?n(t):e()))}))},m=function(e,t,n){if(!(0,w.hasProperty)(t,"result")&&!(0,w.hasProperty)(t,"error"))throw new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${E(e)}`,{request:e});if(!n)throw new v.JsonRpcError(v.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${E(e)}`,{request:e})}},{"@metamask/rpc-errors":130,"@metamask/safe-event-emitter":132,"@metamask/utils":369}],37:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createAsyncMiddleware=void 0,n.createAsyncMiddleware=function(e){return async(t,n,r,i)=>{let s;const o=new Promise((e=>{s=e}));let a=null,c=!1;const u=async()=>(c=!0,r((e=>{a=e,s()})),o);try{await e(t,n,u),c?(await o,a(null)):i(null)}catch(e){a?a(e):i(e)}}}},{}],38:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createScaffoldMiddleware=void 0,n.createScaffoldMiddleware=function(e){return(t,n,r,i)=>{const s=e[t.method];return void 0===s?r():"function"==typeof s?s(t,n,r,i):(n.result=s,i())}}},{}],39:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getUniqueId=void 0;const r=4294967295;let i=Math.floor(Math.random()*r);n.getUniqueId=function(){return i=(i+1)%r,i}},{}],40:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createIdRemapMiddleware=void 0;const r=e("./getUniqueId.cjs");n.createIdRemapMiddleware=function(){return(e,t,n,i)=>{const s=e.id,o=(0,r.getUniqueId)();e.id=o,t.id=o,n((n=>{e.id=s,t.id=s,n()}))}}},{"./getUniqueId.cjs":39}],41:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeMiddleware=n.JsonRpcEngine=n.createIdRemapMiddleware=n.getUniqueId=n.createScaffoldMiddleware=n.createAsyncMiddleware=void 0;var r=e("./createAsyncMiddleware.cjs");Object.defineProperty(n,"createAsyncMiddleware",{enumerable:!0,get:function(){return r.createAsyncMiddleware}});var i=e("./createScaffoldMiddleware.cjs");Object.defineProperty(n,"createScaffoldMiddleware",{enumerable:!0,get:function(){return i.createScaffoldMiddleware}});var s=e("./getUniqueId.cjs");Object.defineProperty(n,"getUniqueId",{enumerable:!0,get:function(){return s.getUniqueId}});var o=e("./idRemapMiddleware.cjs");Object.defineProperty(n,"createIdRemapMiddleware",{enumerable:!0,get:function(){return o.createIdRemapMiddleware}});var a=e("./JsonRpcEngine.cjs");Object.defineProperty(n,"JsonRpcEngine",{enumerable:!0,get:function(){return a.JsonRpcEngine}});var c=e("./mergeMiddleware.cjs");Object.defineProperty(n,"mergeMiddleware",{enumerable:!0,get:function(){return c.mergeMiddleware}})},{"./JsonRpcEngine.cjs":36,"./createAsyncMiddleware.cjs":37,"./createScaffoldMiddleware.cjs":38,"./getUniqueId.cjs":39,"./idRemapMiddleware.cjs":40,"./mergeMiddleware.cjs":42}],42:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeMiddleware=void 0;const r=e("./JsonRpcEngine.cjs");n.mergeMiddleware=function(e){const t=new r.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}},{"./JsonRpcEngine.cjs":36}],43:[function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.getBIP44AddressKeyDeriver=n.deriveBIP44AddressKey=n.BIP44CoinTypeNode=n.BIP_44_COIN_TYPE_DEPTH=void 0;const o=e("@metamask/utils"),a=e("./BIP44Node.cjs"),c=e("./constants.cjs"),u=e("./SLIP10Node.cjs"),l=e("./utils.cjs");n.BIP_44_COIN_TYPE_DEPTH=2;class d{constructor(e,t){r.set(this,void 0),i(this,r,e,"f"),this.coin_type=t,this.path=(0,l.getBIP44CoinTypePathString)(t),Object.freeze(this)}static async fromJSON(e,t){f(t),h(e.depth);const n=await a.BIP44Node.fromExtendedKey({depth:e.depth,index:e.index,parentFingerprint:e.parentFingerprint,chainCode:(0,l.hexStringToBytes)(e.chainCode),privateKey:(0,l.nullableHexStringToBytes)(e.privateKey),publicKey:(0,l.hexStringToBytes)(e.publicKey)});return new d(n,t)}static async fromDerivationPath(e){h(e.length-1);const t=await a.BIP44Node.fromDerivationPath({derivationPath:e}),r=e[n.BIP_44_COIN_TYPE_DEPTH].split(":")[1]?.replace("'","");(0,o.assert)(r,"Invalid derivation path.");const i=Number.parseInt(r,10);return new d(t,i)}static async fromNode(e,t){if(!(e instanceof a.BIP44Node))throw new Error("Invalid node: Expected an instance of BIP44Node.");return f(t),h(e.depth),Promise.resolve(new d(e,t))}get depth(){return s(this,r,"f").depth}get privateKeyBytes(){return s(this,r,"f").privateKeyBytes}get publicKeyBytes(){return s(this,r,"f").publicKeyBytes}get chainCodeBytes(){return s(this,r,"f").chainCodeBytes}get privateKey(){return s(this,r,"f").privateKey}get publicKey(){return s(this,r,"f").publicKey}get compressedPublicKey(){return s(this,r,"f").compressedPublicKey}get compressedPublicKeyBytes(){return s(this,r,"f").compressedPublicKeyBytes}get chainCode(){return s(this,r,"f").chainCode}get address(){return s(this,r,"f").address}get masterFingerprint(){return s(this,r,"f").masterFingerprint}get parentFingerprint(){return s(this,r,"f").parentFingerprint}get fingerprint(){return s(this,r,"f").fingerprint}get index(){return s(this,r,"f").index}get curve(){return s(this,r,"f").curve}get extendedKey(){return s(this,r,"f").extendedKey}async deriveBIP44AddressKey({account:e=0,change:t=0,address_index:n}){return await s(this,r,"f").derive((0,l.getBIP44CoinTypeToAddressPathTuple)({account:e,change:t,address_index:n}))}toJSON(){return{...s(this,r,"f").toJSON(),coin_type:this.coin_type,path:this.path}}}function h(e){if(e!==n.BIP_44_COIN_TYPE_DEPTH)throw new Error(`Invalid depth: Coin type nodes must be of depth ${n.BIP_44_COIN_TYPE_DEPTH}. Received: "${e}"`)}function f(e){if("number"!=typeof e||!Number.isInteger(e)||e<0)throw new Error("Invalid coin type: The specified coin type must be a non-negative integer number.")}async function p(e){if(e instanceof d)return h(e.depth),e;if("string"==typeof e){const t=await a.BIP44Node.fromExtendedKey(e),n=await d.fromNode(t,t.index-c.BIP_32_HARDENED_OFFSET);return h(n.depth),n}return d.fromJSON(e,e.coin_type)}n.BIP44CoinTypeNode=d,r=new WeakMap,n.deriveBIP44AddressKey=async function(e,{account:t=0,change:n=0,address_index:r}){const i=(0,l.getBIP44CoinTypeToAddressPathTuple)({account:t,change:n,address_index:r}),s=await p(e),o=await(0,u.deriveChildNode)({path:i,node:s});return new a.BIP44Node(o)},n.getBIP44AddressKeyDeriver=async function(e,t){const{account:n=0,change:r=0}=t??{},i=await p(e),s=(0,l.getHardenedBIP32NodeToken)(n),o=(0,l.getBIP32NodeToken)(r),c=async(e,t=!1)=>{const n=await(0,u.deriveChildNode)({path:[s,o,t?(0,l.getHardenedBIP32NodeToken)(e):(0,l.getUnhardenedBIP32NodeToken)(e)],node:i});return new a.BIP44Node(n)};return c.coin_type=i.coin_type,c.path=(0,l.getBIP44ChangePathString)(i.path,{account:n,change:r}),Object.freeze(c),c}},{"./BIP44Node.cjs":44,"./SLIP10Node.cjs":45,"./constants.cjs":46,"./utils.cjs":61,"@metamask/utils":72}],44:[function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.validateBIP44Depth=n.BIP44Node=void 0;const o=e("@metamask/utils"),a=e("./constants.cjs"),c=e("./extended-keys.cjs"),u=e("./SLIP10Node.cjs"),l=e("./utils.cjs");class d{constructor(e){r.set(this,void 0),i(this,r,e,"f"),Object.freeze(this)}static async fromJSON(e){return d.fromExtendedKey(e)}static async fromExtendedKey(e){if("string"==typeof e){const t=(0,c.decodeExtendedKey)(e),{chainCode:n,depth:r,parentFingerprint:i,index:s}=t;if(t.version===c.PRIVATE_KEY_VERSION){const{privateKey:e}=t;return d.fromExtendedKey({depth:r,parentFingerprint:i,index:s,privateKey:e,chainCode:n})}const{publicKey:o}=t;return d.fromExtendedKey({depth:r,parentFingerprint:i,index:s,publicKey:o,chainCode:n})}const{privateKey:t,publicKey:n,chainCode:r,depth:i,parentFingerprint:s,index:o}=e;h(i);const a=await u.SLIP10Node.fromExtendedKey({privateKey:t,publicKey:n,chainCode:r,depth:i,parentFingerprint:s,index:o,curve:"secp256k1"});return new d(a)}static async fromDerivationPath({derivationPath:e}){h(e.length-1),f(e,a.MIN_BIP_44_DEPTH);const t=await u.SLIP10Node.fromDerivationPath({derivationPath:e,curve:"secp256k1"});return new d(t)}get depth(){return s(this,r,"f").depth}get privateKeyBytes(){return s(this,r,"f").privateKeyBytes}get publicKeyBytes(){return s(this,r,"f").publicKeyBytes}get chainCodeBytes(){return s(this,r,"f").chainCodeBytes}get privateKey(){return s(this,r,"f").privateKey}get publicKey(){return s(this,r,"f").publicKey}get compressedPublicKey(){return s(this,r,"f").compressedPublicKey}get compressedPublicKeyBytes(){return s(this,r,"f").compressedPublicKeyBytes}get chainCode(){return s(this,r,"f").chainCode}get address(){return s(this,r,"f").address}get masterFingerprint(){return s(this,r,"f").masterFingerprint}get parentFingerprint(){return s(this,r,"f").parentFingerprint}get fingerprint(){return s(this,r,"f").fingerprint}get index(){return s(this,r,"f").index}get extendedKey(){const e={depth:this.depth,parentFingerprint:this.parentFingerprint,index:this.index,chainCode:this.chainCodeBytes};return this.privateKeyBytes?(0,c.encodeExtendedKey)({...e,version:c.PRIVATE_KEY_VERSION,privateKey:this.privateKeyBytes}):(0,c.encodeExtendedKey)({...e,version:c.PUBLIC_KEY_VERSION,publicKey:this.publicKeyBytes})}get curve(){return s(this,r,"f").curve}neuter(){const e=s(this,r,"f").neuter();return new d(e)}async derive(e){if(this.depth===a.MAX_BIP_44_DEPTH)throw new Error("Illegal operation: This HD tree node is already a leaf node.");h(this.depth+e.length),f(e,this.depth+1);const t=await s(this,r,"f").derive(e);return new d(t)}toJSON(){return{depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,privateKey:this.privateKey,publicKey:this.publicKey,chainCode:this.chainCode}}}function h(e){if((0,u.validateBIP32Depth)(e),ea.MAX_BIP_44_DEPTH)throw new Error(`Invalid HD tree path depth: The depth must be a positive integer N such that 0 <= N <= 5. Received: "${e}"`)}function f(e,t){e.forEach(((e,n)=>{const r=t+n;if(r!==a.MIN_BIP_44_DEPTH)switch((0,o.assert)("string"==typeof e),r){case 1:if(e!==a.BIP44PurposeNodeToken)throw new Error(`Invalid derivation path: The "purpose" node (depth 1) must be the string "${a.BIP44PurposeNodeToken}".`);break;case 2:if(!a.BIP_32_PATH_REGEX.test(e)||!(0,l.isHardened)(e))throw new Error('Invalid derivation path: The "coin_type" node (depth 2) must be a hardened BIP-32 node.');break;case 3:if(!a.BIP_32_PATH_REGEX.test(e)||!(0,l.isHardened)(e))throw new Error('Invalid derivation path: The "account" node (depth 3) must be a hardened BIP-32 node.');break;case 4:if(!a.BIP_32_PATH_REGEX.test(e))throw new Error('Invalid derivation path: The "change" node (depth 4) must be a BIP-32 node.');break;case a.MAX_BIP_44_DEPTH:if(!a.BIP_32_PATH_REGEX.test(e))throw new Error('Invalid derivation path: The "address_index" node (depth 5) must be a BIP-32 node.')}else if(!(e instanceof Uint8Array||a.BIP_39_PATH_REGEX.test(e)))throw new Error('Invalid derivation path: The "m" / seed node (depth 0) must be a BIP-39 node.')}))}n.BIP44Node=d,r=new WeakMap,n.validateBIP44Depth=h},{"./SLIP10Node.cjs":45,"./constants.cjs":46,"./extended-keys.cjs":59,"./utils.cjs":61,"@metamask/utils":72}],45:[function(e,t,n){"use strict";var r,i,s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildNode=n.validateRootIndex=n.validateMasterParentFingerprint=n.validateParentFingerprint=n.validateBIP32Depth=n.SLIP10Node=void 0;const o=e("@metamask/utils"),a=e("./constants.cjs"),c=e("./curves/index.cjs"),u=e("./derivation.cjs"),l=e("./derivers/bip32.cjs"),d=e("./utils.cjs");class h{constructor({depth:e,masterFingerprint:t,parentFingerprint:n,index:a,chainCode:c,privateKey:u,publicKey:l,curve:d},f){(0,o.assert)(f===s(h,r,"f",i),"SLIP10Node can only be constructed using `SLIP10Node.fromJSON`, `SLIP10Node.fromExtendedKey`, or `SLIP10Node.fromDerivationPath`."),this.depth=e,this.masterFingerprint=t,this.parentFingerprint=n,this.index=a,this.chainCodeBytes=c,this.privateKeyBytes=u,this.publicKeyBytes=l,this.curve=d,Object.freeze(this)}static async fromJSON(e){return h.fromExtendedKey(e)}static async fromExtendedKey({depth:e,masterFingerprint:t,parentFingerprint:n,index:u,privateKey:l,publicKey:g,chainCode:b,curve:v}){const x=(0,d.getBytes)(b,a.BYTES_KEY_LENGTH);(0,d.validateCurve)(v),f(e),(0,d.validateBIP32Index)(u),y(u,e),p(n,e),m(t,n,e);const w=(0,c.getCurveByName)(v);if(l){const a=(0,d.getBytesUnsafe)(l,w.privateKeyLength);return(0,o.assert)(w.isValidPrivateKey(a),`Invalid private key: Value is not a valid ${v} private key.`),new h({depth:e,masterFingerprint:t,parentFingerprint:n,index:u,chainCode:x,privateKey:a,publicKey:await w.getPublicKey(a),curve:v},s(this,r,"f",i))}if(g){const o=(0,d.getBytes)(g,w.publicKeyLength);return new h({depth:e,masterFingerprint:t,parentFingerprint:n,index:u,chainCode:x,publicKey:o,curve:v},s(this,r,"f",i))}throw new Error("Invalid options: Must provide either a private key or a public key.")}static async fromDerivationPath({derivationPath:e,curve:t}){if((0,d.validateCurve)(t),!e)throw new Error("Invalid options: Must provide a derivation path.");if(0===e.length)throw new Error("Invalid derivation path: May not specify an empty derivation path.");return await(0,u.deriveKeyFromPath)({path:e,depth:e.length-1,curve:t})}get chainCode(){return(0,o.bytesToHex)(this.chainCodeBytes)}get privateKey(){if(this.privateKeyBytes)return(0,o.bytesToHex)(this.privateKeyBytes)}get publicKey(){return(0,o.bytesToHex)(this.publicKeyBytes)}get compressedPublicKeyBytes(){return(0,c.getCurveByName)(this.curve).compressPublicKey(this.publicKeyBytes)}get compressedPublicKey(){return(0,o.bytesToHex)(this.compressedPublicKeyBytes)}get address(){if("secp256k1"!==this.curve)throw new Error("Unable to get address for this node: Only secp256k1 is supported.");return(0,o.bytesToHex)((0,l.publicKeyToEthAddress)(this.publicKeyBytes))}get fingerprint(){return(0,d.getFingerprint)(this.compressedPublicKeyBytes,(0,c.getCurveByName)(this.curve).compressedPublicKeyLength)}neuter(){return new h({depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,chainCode:this.chainCodeBytes,publicKey:this.publicKeyBytes,curve:this.curve},s(h,r,"f",i))}async derive(e){return await g({path:e,node:this})}toJSON(){return{depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,curve:this.curve,privateKey:this.privateKey,publicKey:this.publicKey,chainCode:this.chainCode}}}function f(e){if(!(0,d.isValidInteger)(e))throw new Error(`Invalid HD tree path depth: The depth must be a positive integer. Received: "${String(e)}".`)}function p(e,t){if(!(0,d.isValidInteger)(e))throw new Error(`Invalid parent fingerprint: The fingerprint must be a positive integer. Received: "${String(e)}".`);if(0===t&&0!==e)throw new Error(`Invalid parent fingerprint: The fingerprint of the root node must be 0. Received: "${String(e)}".`);if(t>0&&0===e)throw new Error(`Invalid parent fingerprint: The fingerprint of a child node must not be 0. Received: "${String(e)}".`)}function m(e,t,n){if(e&&n>=2&&e===t)throw new Error(`Invalid parent fingerprint: The fingerprint of a child node cannot be equal to the master fingerprint. Received: "${String(t)}".`)}function y(e,t){if(0===t&&0!==e)throw new Error(`Invalid index: The index of the root node must be 0. Received: "${String(e)}".`)}async function g({path:e,node:t}){if(0===e.length)throw new Error("Invalid HD tree derivation path: Deriving a path of length 0 is not defined.");const n=t.depth+e.length;return f(n),await(0,u.deriveKeyFromPath)({path:e,node:t,depth:n})}n.SLIP10Node=h,r=h,i={value:Symbol("SLIP10Node.constructor")},n.validateBIP32Depth=f,n.validateParentFingerprint=p,n.validateMasterParentFingerprint=m,n.validateRootIndex=y,n.deriveChildNode=g},{"./constants.cjs":46,"./curves/index.cjs":50,"./derivation.cjs":52,"./derivers/bip32.cjs":53,"./utils.cjs":61,"@metamask/utils":72}],46:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BIP_32_HARDENED_OFFSET=n.BIP_39_PATH_REGEX=n.CIP_3_PATH_REGEX=n.SLIP_10_PATH_REGEX=n.BIP_32_PATH_REGEX=n.UNPREFIXED_BIP_32_PATH_REGEX=n.UNPREFIXED_PATH_REGEX=n.BIP44PurposeNodeToken=n.MAX_BIP_32_INDEX=n.MAX_UNHARDENED_BIP_32_INDEX=n.MAX_BIP_44_DEPTH=n.MIN_BIP_44_DEPTH=n.BYTES_KEY_LENGTH=void 0,n.BYTES_KEY_LENGTH=32,n.MIN_BIP_44_DEPTH=0,n.MAX_BIP_44_DEPTH=5,n.MAX_UNHARDENED_BIP_32_INDEX=2147483647,n.MAX_BIP_32_INDEX=4294967295,n.BIP44PurposeNodeToken="bip32:44'",n.UNPREFIXED_PATH_REGEX=/^\d+$/u,n.UNPREFIXED_BIP_32_PATH_REGEX=/^(?\d+)'?$/u,n.BIP_32_PATH_REGEX=/^bip32:\d+'?$/u,n.SLIP_10_PATH_REGEX=/^slip10:\d+'?$/u,n.CIP_3_PATH_REGEX=/^cip3:\d+'?$/u,n.BIP_39_PATH_REGEX=/^bip39:([a-z]+){1}( [a-z]+){11,23}$/u,n.BIP_32_HARDENED_OFFSET=2147483648},{}],47:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.mod=n.getCurveByName=n.curves=void 0;const o=s(e("./ed25519.cjs")),a=s(e("./ed25519Bip32.cjs")),c=s(e("./secp256k1.cjs"));n.curves={secp256k1:c,ed25519:o,ed25519Bip32:a},n.getCurveByName=function(e){return n.curves[e]};var u=e("@noble/curves/abstract/modular");Object.defineProperty(n,"mod",{enumerable:!0,get:function(){return u.mod}})},{"./ed25519.cjs":48,"./ed25519Bip32.cjs":49,"./secp256k1.cjs":51,"@noble/curves/abstract/modular":384}],48:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressedPublicKeyLength=n.masterNodeGenerationSpec=n.privateKeyLength=n.decompressPublicKey=n.compressPublicKey=n.publicAdd=n.getPublicKey=n.publicKeyLength=n.deriveUnhardenedKeys=n.isValidPrivateKey=n.secret=n.name=n.curve=void 0;const r=e("@metamask/utils"),i=e("@noble/curves/ed25519");n.curve=i.ed25519.CURVE,n.name="ed25519",n.secret=(0,r.stringToBytes)("ed25519 seed");n.isValidPrivateKey=e=>!0,n.deriveUnhardenedKeys=!1,n.publicKeyLength=33;n.getPublicKey=(e,t)=>{const n=i.ed25519.getPublicKey(e);return(0,r.concatBytes)([new Uint8Array([0]),n])};n.publicAdd=(e,t)=>{throw new Error("Ed25519 does not support public key derivation.")};n.compressPublicKey=e=>e;n.decompressPublicKey=e=>e,n.privateKeyLength=32,n.masterNodeGenerationSpec="slip10",n.compressedPublicKeyLength=33},{"@metamask/utils":72,"@noble/curves/ed25519":388}],49:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressedPublicKeyLength=n.masterNodeGenerationSpec=n.privateKeyLength=n.decompressPublicKey=n.compressPublicKey=n.publicAdd=n.getPublicKey=n.multiplyWithBase=n.bytesToNumberLE=n.publicKeyLength=n.deriveUnhardenedKeys=n.isValidPrivateKey=n.secret=n.name=n.curve=void 0;const r=e("@metamask/utils"),i=e("@noble/curves/abstract/modular"),s=e("@noble/curves/ed25519");function o(e,t){const n=e[t];return(0,r.assert)(void 0!==n,"Private key is too short."),n}n.curve=s.ed25519.CURVE,n.name="ed25519Bip32",n.secret=(0,r.stringToBytes)("");n.isValidPrivateKey=e=>!(7&o(e,0))&&(!(128&o(e,31))&&!(64&~o(e,31))),n.deriveUnhardenedKeys=!0,n.publicKeyLength=32;n.bytesToNumberLE=e=>(0,r.hexToBigInt)((0,r.bytesToHex)(Uint8Array.from(e).reverse()));n.multiplyWithBase=e=>{const t=(0,i.mod)((0,n.bytesToNumberLE)(e),n.curve.n);return s.ed25519.ExtendedPoint.BASE.multiply(t).toRawBytes()};n.getPublicKey=async(e,t)=>(0,n.multiplyWithBase)(e.slice(0,32));n.publicAdd=(e,t)=>s.ed25519.ExtendedPoint.fromHex((0,r.remove0x)((0,r.bytesToHex)(e))).add(s.ed25519.ExtendedPoint.fromHex((0,r.remove0x)((0,r.bytesToHex)(t)))).toRawBytes();n.compressPublicKey=e=>e;n.decompressPublicKey=e=>e,n.privateKeyLength=64,n.masterNodeGenerationSpec="cip3",n.compressedPublicKeyLength=32},{"@metamask/utils":72,"@noble/curves/abstract/modular":384,"@noble/curves/ed25519":388}],50:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.ed25519Bip32=n.ed25519=n.secp256k1=void 0,s(e("./curve.cjs"),n),n.secp256k1=o(e("./secp256k1.cjs")),n.ed25519=o(e("./ed25519.cjs")),n.ed25519Bip32=o(e("./ed25519Bip32.cjs"))},{"./curve.cjs":47,"./ed25519.cjs":48,"./ed25519Bip32.cjs":49,"./secp256k1.cjs":51}],51:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressedPublicKeyLength=n.masterNodeGenerationSpec=n.privateKeyLength=n.decompressPublicKey=n.compressPublicKey=n.publicAdd=n.getPublicKey=n.isValidPrivateKey=n.publicKeyLength=n.deriveUnhardenedKeys=n.secret=n.name=n.curve=void 0;const r=e("@metamask/utils"),i=e("@noble/curves/secp256k1"),s=e("../utils.cjs");n.curve=i.secp256k1.CURVE,n.name="secp256k1",n.secret=(0,r.stringToBytes)("Bitcoin seed"),n.deriveUnhardenedKeys=!0,n.publicKeyLength=65;n.isValidPrivateKey=e=>i.secp256k1.utils.isValidPrivateKey(e);n.getPublicKey=(e,t=!1)=>i.secp256k1.getPublicKey(e,t);n.publicAdd=(e,t)=>{(0,r.assert)((0,s.isValidBytesKey)(t,32),"Invalid tweak: Tweak must be a non-zero 32-byte Uint8Array.");const n=i.secp256k1.ProjectivePoint.fromHex(e).add(i.secp256k1.ProjectivePoint.fromPrivateKey(t));return n.assertValidity(),n.toRawBytes(!1)};n.compressPublicKey=e=>i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!0);n.decompressPublicKey=e=>i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1),n.privateKeyLength=32,n.masterNodeGenerationSpec="slip10",n.compressedPublicKeyLength=33},{"../utils.cjs":61,"@metamask/utils":72,"@noble/curves/secp256k1":389}],52:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validatePathSegment=n.deriveKeyFromPath=void 0;const r=e("@metamask/utils"),i=e("./BIP44CoinTypeNode.cjs"),s=e("./BIP44Node.cjs"),o=e("./constants.cjs"),a=e("./curves/index.cjs"),c=e("./derivers/index.cjs"),u=e("./SLIP10Node.cjs");function l(e,t,n){if(0===e.length)throw new Error("Invalid HD path segment: The segment must not be empty.");let i=!1;if(e.forEach(((e,t)=>{if(0===t){if(i=e instanceof Uint8Array||o.BIP_39_PATH_REGEX.test(e),!(e instanceof Uint8Array||i||o.BIP_32_PATH_REGEX.test(e)||o.SLIP_10_PATH_REGEX.test(e)||o.CIP_3_PATH_REGEX.test(e)))throw d()}else if(e instanceof Uint8Array||!o.BIP_32_PATH_REGEX.test(e)&&!o.SLIP_10_PATH_REGEX.test(e)&&!o.CIP_3_PATH_REGEX.test(e))throw d()})),n===o.MIN_BIP_44_DEPTH&&(!i||1!==e.length))throw new Error(`Invalid HD path segment: The segment must consist of a single BIP-39 node for depths of ${o.MIN_BIP_44_DEPTH}. Received: "${String(e)}".`);if(!t&&!i)throw new Error("Invalid derivation parameters: Must specify parent key if the first node of the path segment is not a BIP-39 node.");if(t&&i)throw new Error("Invalid derivation parameters: May not specify parent key if the path segment starts with a BIP-39 node.");const s=i?e.slice(1):e;if(s.length>0){const e=s[0]?.split(":")[0];(0,r.assert)(e),(0,r.assert)(s.every((t=>t.startsWith(`${e}:`))),"Invalid HD path segment: Cannot mix 'bip32' and 'slip10' path segments.")}}function d(){return new Error("Invalid HD path segment: The path segment is malformed.")}n.deriveKeyFromPath=async function(e){const{path:t,depth:n=t.length}=e,o="node"in e?e.node:void 0,h="curve"in e?e.curve:o?.curve;if(o&&!(o instanceof u.SLIP10Node)&&!(o instanceof s.BIP44Node)&&!(o instanceof i.BIP44CoinTypeNode))throw new Error("Invalid arguments: Node must be a SLIP-10 node or a BIP-44 node when provided.");if(!h)throw new Error("Invalid arguments: Must specify either a parent node or curve.");return l(t,Boolean(o?.privateKey)||Boolean(o?.publicKey),n),await t.reduce((async(e,t,n)=>{const i=await e;if("string"==typeof t){const[e,n]=t.split(":");(0,r.assert)(e),(0,r.assert)(n),(0,r.assert)(function(e){return e in c.derivers}(e),`Unknown derivation type: "${e}".`);const s=c.derivers[e];return await s.deriveChildKey({path:n,node:i,curve:(0,a.getCurveByName)(h)})}return(0,r.assert)(0===n,d()),await c.derivers.bip39.deriveChildKey({path:t,node:i,curve:(0,a.getCurveByName)(h)})}),Promise.resolve(o))},n.validatePathSegment=l},{"./BIP44CoinTypeNode.cjs":43,"./BIP44Node.cjs":44,"./SLIP10Node.cjs":45,"./constants.cjs":46,"./curves/index.cjs":50,"./derivers/index.cjs":56,"@metamask/utils":72}],53:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildKey=n.publicKeyToEthAddress=n.privateKeyToEthAddress=void 0;const r=e("@metamask/utils"),i=e("@noble/hashes/sha3"),s=e("../constants.cjs"),o=e("../curves/index.cjs"),a=e("../utils.cjs"),c=e("./shared.cjs");function u(e){return(0,r.assert)(e instanceof Uint8Array&&(0,a.isValidBytesKey)(e,o.secp256k1.publicKeyLength),"Invalid key: The key must be a 65-byte, non-zero Uint8Array."),(0,i.keccak_256)(e.slice(1)).slice(-20)}async function l(e,t){const{childIndex:n,privateKey:r,publicKey:i,isHardened:s,curve:o,chainCode:u}=t;if((0,a.validateBIP32Index)(n+1),r){const e=await(0,c.deriveSecretExtension)({privateKey:r,childIndex:n+1,isHardened:s,curve:o}),i=(0,c.generateEntropy)({chainCode:u,extension:e});return{...t,childIndex:n+1,entropy:i}}const l=(0,c.derivePublicExtension)({parentPublicKey:i,childIndex:n+1}),d=(0,c.generateEntropy)({chainCode:u,extension:l});return{...t,childIndex:n+1,entropy:d}}n.privateKeyToEthAddress=function(e){return(0,r.assert)(e instanceof Uint8Array&&(0,a.isValidBytesKey)(e,s.BYTES_KEY_LENGTH),"Invalid key: The key must be a 32-byte, non-zero Uint8Array."),u(o.secp256k1.getPublicKey(e,!1))},n.publicKeyToEthAddress=u,n.deriveChildKey=async function(e){return(0,r.assert)("secp256k1"===e.curve.name,"Invalid curve: Only secp256k1 is supported by BIP-32."),(0,c.deriveChildKey)(e,l)}},{"../constants.cjs":46,"../curves/index.cjs":50,"../utils.cjs":61,"./shared.cjs":57,"@metamask/utils":72,"@noble/hashes/sha3":398}],54:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.entropyToCip3MasterNode=n.createBip39KeyFromSeed=n.deriveChildKey=n.bip39MnemonicToMultipath=void 0;const r=e("@metamask/scure-bip39"),i=e("@metamask/scure-bip39/dist/wordlists/english.js"),s=e("@metamask/utils"),o=e("@noble/hashes/hmac"),a=e("@noble/hashes/pbkdf2"),c=e("@noble/hashes/sha512"),u=e("../constants.cjs"),l=e("../SLIP10Node.cjs"),d=e("../utils.cjs");async function h(e,t){(0,s.assert)(e.length>=16&&e.length<=64,"Invalid seed: The seed must be between 16 and 64 bytes long.");const n=(0,o.hmac)(c.sha512,t.secret,e),r=n.slice(0,u.BYTES_KEY_LENGTH),i=n.slice(u.BYTES_KEY_LENGTH);(0,s.assert)(t.isValidPrivateKey(r),"Invalid private key: The private key must greater than 0 and less than the curve order.");const a=(0,d.getFingerprint)(await t.getPublicKey(r,!0),t.compressedPublicKeyLength);return l.SLIP10Node.fromExtendedKey({privateKey:r,chainCode:i,masterFingerprint:a,depth:0,parentFingerprint:0,index:0,curve:t.name})}async function f(e,t){(0,s.assert)(e.length>=16&&e.length<=64,"Invalid entropy: The entropy must be between 16 and 64 bytes long.");const n=(0,a.pbkdf2)(c.sha512,t.secret,e,{c:4096,dkLen:96});n[0]&=248,n[31]&=31,n[31]|=64;const r=n.slice(0,t.privateKeyLength),i=n.slice(t.privateKeyLength);(0,s.assert)(t.isValidPrivateKey(r),"Invalid private key.");const o=(0,d.getFingerprint)(await t.getPublicKey(r),t.compressedPublicKeyLength);return l.SLIP10Node.fromExtendedKey({privateKey:r,chainCode:i,masterFingerprint:o,depth:0,parentFingerprint:0,index:0,curve:t.name})}n.bip39MnemonicToMultipath=function(e){return`bip39:${e.toLowerCase().trim()}`},n.deriveChildKey=async function({path:e,curve:t}){switch(t.masterNodeGenerationSpec){case"slip10":return h(await(0,r.mnemonicToSeed)(e,i.wordlist),t);case"cip3":return f((0,r.mnemonicToEntropy)(e,i.wordlist),t);default:throw new Error("Unsupported master node generation spec.")}},n.createBip39KeyFromSeed=h,n.entropyToCip3MasterNode=f},{"../SLIP10Node.cjs":45,"../constants.cjs":46,"../utils.cjs":61,"@metamask/scure-bip39":133,"@metamask/scure-bip39/dist/wordlists/english.js":134,"@metamask/utils":72,"@noble/hashes/hmac":394,"@noble/hashes/pbkdf2":395,"@noble/hashes/sha512":399}],55:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildKey=n.derivePublicKey=n.deriveChainCode=n.derivePrivateKey=n.getKeyExtension=n.add=n.mod2Pow256=n.trunc28Mul8=n.padEnd32Bytes=n.bigIntToBytes=n.bytesToBigInt=n.toReversed=void 0;const r=e("@metamask/utils"),i=e("../constants.cjs"),s=e("../curves/index.cjs"),o=e("../SLIP10Node.cjs"),a=e("../utils.cjs"),c=e("./shared.cjs");n.toReversed=e=>e.slice().reverse();n.bytesToBigInt=e=>{const t=(0,n.toReversed)(e),i=(0,r.bytesToHex)(t);return BigInt(i)};n.bigIntToBytes=e=>{const t=e.toString(16);return(0,n.toReversed)((0,r.hexToBytes)(t))};n.padEnd32Bytes=e=>(0,r.concatBytes)([e,new Uint8Array(Math.max(32-e.length,0)).fill(0)]);n.trunc28Mul8=e=>{const t=(0,n.bytesToBigInt)(e.slice(0,28))*BigInt(8);return(0,n.padEnd32Bytes)((0,n.bigIntToBytes)(t))};n.mod2Pow256=e=>(0,n.padEnd32Bytes)((0,n.bigIntToBytes)((0,s.mod)((0,n.bytesToBigInt)(e),BigInt(2)**BigInt(256))));n.add=(e,t)=>{const r=(0,n.bytesToBigInt)(e)+(0,n.bytesToBigInt)(t);return(0,n.padEnd32Bytes)((0,n.bigIntToBytes)(r)).slice(0,32)};n.getKeyExtension=(e,t,n)=>(0,r.concatBytes)([new Uint8Array([e]),t,(0,a.numberToUint32)(n,!0)]);const u=2,l=0;n.derivePrivateKey=async({parentNode:e,childIndex:t,isHardened:s})=>{const o=s?(0,n.getKeyExtension)(l,e.privateKeyBytes,t+i.BIP_32_HARDENED_OFFSET):(0,n.getKeyExtension)(u,e.publicKeyBytes,t),a=(0,c.generateEntropy)({chainCode:e.chainCodeBytes,extension:o}),d=a.subarray(0,32),h=a.subarray(32),f=e.privateKeyBytes.subarray(0,32),p=e.privateKeyBytes.subarray(32),m=(0,n.add)((0,n.trunc28Mul8)(d),f),y=(0,n.add)(h,p);return(0,r.concatBytes)([m,y])};const d=3,h=1;n.deriveChainCode=async({parentNode:e,childIndex:t,isHardened:r})=>{const s=r?(0,n.getKeyExtension)(h,e.privateKeyBytes,t+i.BIP_32_HARDENED_OFFSET):(0,n.getKeyExtension)(d,e.publicKeyBytes,t);return(0,c.generateEntropy)({chainCode:e.chainCodeBytes,extension:s}).subarray(32)};const f=2;n.derivePublicKey=async({parentNode:e,childIndex:t,curve:r})=>{const i=(0,n.getKeyExtension)(f,e.publicKeyBytes,t),s=(0,c.generateEntropy)({chainCode:e.chainCodeBytes,extension:i}).slice(0,32),o=await r.getPublicKey((0,n.trunc28Mul8)(s));return r.publicAdd(e.publicKeyBytes,o)},n.deriveChildKey=async function(e){const{curve:t,node:s,path:a}=e;(0,c.validateNode)(s);const{childIndex:u,isHardened:l}=(0,c.getValidatedPath)(a,s,t);if("ed25519Bip32"!==t.name||!s)throw new Error("Unsupported curve: Only ed25519Bip32 is supported by CIP3.");const d=u+(l?i.BIP_32_HARDENED_OFFSET:0),{privateKeyBytes:h,chainCodeBytes:f,publicKeyBytes:p,masterFingerprint:m,depth:y,fingerprint:g}=s;if(h){const e={privateKeyBytes:h,chainCodeBytes:f,publicKeyBytes:p},i=await(0,n.derivePrivateKey)({parentNode:e,childIndex:u,isHardened:l}),s=await(0,n.deriveChainCode)({parentNode:e,childIndex:u,isHardened:l});return o.SLIP10Node.fromExtendedKey({privateKey:(0,r.bytesToHex)(i),chainCode:(0,r.bytesToHex)(s),masterFingerprint:m,depth:y+1,parentFingerprint:g,index:d,curve:t.name})}(0,r.assert)(!l,"Invalid parameters: Cannot derive hardened child keys without a private key.");const b={chainCodeBytes:f,publicKeyBytes:p},v=await(0,n.derivePublicKey)({parentNode:b,childIndex:u,isHardened:!1,curve:t}),x=await(0,n.deriveChainCode)({parentNode:b,childIndex:u,isHardened:!1});return o.SLIP10Node.fromExtendedKey({publicKey:(0,r.bytesToHex)(v),chainCode:(0,r.bytesToHex)(x),masterFingerprint:m,depth:y+1,parentFingerprint:g,index:d,curve:t.name})}},{"../SLIP10Node.cjs":45,"../constants.cjs":46,"../curves/index.cjs":50,"../utils.cjs":61,"./shared.cjs":57,"@metamask/utils":72}],56:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.createBip39KeyFromSeed=n.derivers=void 0;const o=s(e("./bip32.cjs")),a=s(e("./bip39.cjs")),c=s(e("./cip3.cjs")),u=s(e("./slip10.cjs"));n.derivers={bip32:o,bip39:a,slip10:u,cip3:c};var l=e("./bip39.cjs");Object.defineProperty(n,"createBip39KeyFromSeed",{enumerable:!0,get:function(){return l.createBip39KeyFromSeed}})},{"./bip32.cjs":53,"./bip39.cjs":54,"./cip3.cjs":55,"./slip10.cjs":58}],57:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedPath=n.validateNode=n.generateEntropy=n.privateAdd=n.derivePublicChildKey=n.derivePublicExtension=n.deriveSecretExtension=n.deriveChildKey=void 0;const r=e("@metamask/utils"),i=e("@noble/hashes/hmac"),s=e("@noble/hashes/sha512"),o=e("../constants.cjs"),a=e("../curves/index.cjs"),c=e("../SLIP10Node.cjs"),u=e("../utils.cjs");async function l(e,t){const{privateKey:n,publicKey:r,entropy:i,childIndex:s,isHardened:a,depth:u,parentFingerprint:d,masterFingerprint:h,curve:m}=e;try{return n?await async function({entropy:e,privateKey:t,depth:n,masterFingerprint:r,parentFingerprint:i,childIndex:s,isHardened:a,curve:u}){const l=s+(a?o.BIP_32_HARDENED_OFFSET:0),{privateKey:d,chainCode:h}=await async function({privateKey:e,entropy:t,curve:n}){const r=t.slice(0,32),i=t.slice(32);if("ed25519"===n.name){return{privateKey:r,publicKey:await n.getPublicKey(r),chainCode:i}}const s=p(e,r,n),o=await n.getPublicKey(s);return{privateKey:s,publicKey:o,chainCode:i}}({privateKey:t,entropy:e,curve:u});return await c.SLIP10Node.fromExtendedKey({privateKey:d,chainCode:h,depth:n+1,masterFingerprint:r,parentFingerprint:i,index:l,curve:u.name})}({entropy:i,privateKey:n,depth:u,masterFingerprint:h,parentFingerprint:d,childIndex:s,isHardened:a,curve:m}):await f({entropy:i,publicKey:r,depth:u,masterFingerprint:h,parentFingerprint:d,childIndex:s,curve:m})}catch(n){return await l(await t(n,e),t)}}async function d({privateKey:e,childIndex:t,isHardened:n,curve:i}){if(n)return(0,r.concatBytes)([new Uint8Array([0]),e,(0,u.numberToUint32)(t+o.BIP_32_HARDENED_OFFSET)]);return h({parentPublicKey:await i.getPublicKey(e,!0),childIndex:t})}function h({parentPublicKey:e,childIndex:t}){return(0,r.concatBytes)([e,(0,u.numberToUint32)(t)])}async function f({entropy:e,publicKey:t,depth:n,masterFingerprint:r,parentFingerprint:i,childIndex:s,curve:o}){const{publicKey:a,chainCode:u}=function({publicKey:e,entropy:t,curve:n}){const r=t.slice(0,32),i=t.slice(32);return{publicKey:n.publicAdd(e,r),chainCode:i}}({publicKey:t,entropy:e,curve:o});return await c.SLIP10Node.fromExtendedKey({publicKey:a,chainCode:u,depth:n+1,masterFingerprint:r,parentFingerprint:i,index:s,curve:o.name})}function p(e,t,n){(0,r.assert)((0,u.isValidBytesKey)(t,32),"Invalid tweak: Tweak must be a non-zero 32-byte Uint8Array.");const i=(0,r.bytesToBigInt)(e),s=(0,r.bytesToBigInt)(t);if(s>=n.curve.n)throw new Error("Invalid tweak: Tweak is larger than the curve order.");const o=(0,a.mod)(i+s,n.curve.n),c=(0,r.hexToBytes)(o.toString(16).padStart(64,"0"));if(!n.isValidPrivateKey(c))throw new Error("Invalid private key or tweak: The resulting private key is invalid.");return c}function m({chainCode:e,extension:t}){return(0,i.hmac)(s.sha512,e,t)}function y(e){(0,r.assert)(e,"Invalid parameters: Must specify a node to derive from.")}function g(e,t,n){!function(e,t,n){(0,r.assert)("string"==typeof e,"Invalid path: Must be a string.");const i=e.endsWith("'");(0,r.assert)(!i||t.privateKey,"Invalid parameters: Cannot derive hardened child keys without a private key."),(0,r.assert)(i||n.deriveUnhardenedKeys,`Invalid path: Cannot derive unhardened child keys with ${n.name}.`)}(e,t,n);const i=e.split("'")[0];(0,r.assert)(i);const s=parseInt(i,10);if(!o.UNPREFIXED_PATH_REGEX.test(i)||!Number.isInteger(s)||s<0||s>=o.BIP_32_HARDENED_OFFSET)throw new Error(`Invalid path: The index must be a non-negative decimal integer less than ${o.BIP_32_HARDENED_OFFSET}.`);return{childIndex:s,isHardened:e.includes("'")}}n.deriveChildKey=async function({path:e,node:t,curve:n},r){y(t);const{childIndex:i,isHardened:s}=g(e,t,n),o={chainCode:t.chainCodeBytes,childIndex:i,isHardened:s,depth:t.depth,parentFingerprint:t.fingerprint,masterFingerprint:t.masterFingerprint,curve:n};if(t.privateKeyBytes){const e=await d({privateKey:t.privateKeyBytes,childIndex:i,isHardened:s,curve:n}),a=m({chainCode:t.chainCodeBytes,extension:e});return await l({privateKey:t.privateKeyBytes,entropy:a,...o},r)}const a=h({parentPublicKey:t.compressedPublicKeyBytes,childIndex:i}),c=m({chainCode:t.chainCodeBytes,extension:a});return await l({publicKey:t.compressedPublicKeyBytes,entropy:c,...o},r)},n.deriveSecretExtension=d,n.derivePublicExtension=h,n.derivePublicChildKey=f,n.privateAdd=p,n.generateEntropy=m,n.validateNode=y,n.getValidatedPath=g},{"../SLIP10Node.cjs":45,"../constants.cjs":46,"../curves/index.cjs":50,"../utils.cjs":61,"@metamask/utils":72,"@noble/hashes/hmac":394,"@noble/hashes/sha512":399}],58:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildKey=void 0;const r=e("@metamask/utils"),i=e("../constants.cjs"),s=e("../utils.cjs"),o=e("./shared.cjs");async function a(e,t){const{curve:n,isHardened:a,childIndex:c,entropy:u,chainCode:l}=t;if("ed25519"===n.name)throw e;const d=a?c+i.BIP_32_HARDENED_OFFSET:c,h=(0,o.generateEntropy)({chainCode:l,extension:(0,r.concatBytes)([1,u.slice(32,64),(0,s.numberToUint32)(d)])});return{...t,entropy:h}}n.deriveChildKey=async function(e){return await(0,o.deriveChildKey)(e,a)}},{"../constants.cjs":46,"../utils.cjs":61,"./shared.cjs":57,"@metamask/utils":72}],59:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.encodeExtendedKey=n.decodeExtendedKey=n.PRIVATE_KEY_VERSION=n.PUBLIC_KEY_VERSION=void 0;const r=e("@metamask/utils"),i=e("./BIP44Node.cjs"),s=e("./curves/secp256k1.cjs"),o=e("./utils.cjs");n.PUBLIC_KEY_VERSION=76067358,n.PRIVATE_KEY_VERSION=76066276;n.decodeExtendedKey=e=>{const t=(0,o.decodeBase58check)(e);if(78!==t.length)throw new Error(`Invalid extended key: Expected a length of 78, got ${t.length}.`);const a=(0,r.createDataView)(t),c=a.getUint32(0,!1),u=a.getUint8(4);(0,i.validateBIP44Depth)(u);const l=a.getUint32(5,!1),d=a.getUint32(9,!1),h=t.slice(13,45);if(!(0,o.isValidBytesKey)(h,32))throw new Error("Invalid extended key: Chain code must be a 32-byte non-zero byte array.");const f=t.slice(45,78);if(!(0,o.isValidBytesKey)(f,33))throw new Error("Invalid extended key: Key must be a 33-byte non-zero byte array.");const p=(0,r.createDataView)(f);if(c===n.PUBLIC_KEY_VERSION){if(2!==p.getUint8(0)&&3!==p.getUint8(0))throw new Error("Invalid extended key: Public key must start with 0x02 or 0x03.");return{version:c,depth:u,parentFingerprint:l,index:d,chainCode:h,publicKey:(0,s.decompressPublicKey)(f)}}if(c===n.PRIVATE_KEY_VERSION){if(0!==p.getUint8(0))throw new Error("Invalid extended key: Private key must start with 0x00.");return{version:c,depth:u,parentFingerprint:l,index:d,chainCode:h,privateKey:f.slice(1)}}throw new Error("Invalid extended key: Expected a public (xpub) or private key (xprv) version.")};n.encodeExtendedKey=e=>{const{version:t,depth:i,parentFingerprint:a,index:c,chainCode:u}=e,l=new Uint8Array(78),d=(0,r.createDataView)(l);if(d.setUint32(0,t,!1),d.setUint8(4,i),d.setUint32(5,a,!1),d.setUint32(9,c,!1),l.set(u,13),e.version===n.PUBLIC_KEY_VERSION){const{publicKey:t}=e,n=(0,s.compressPublicKey)(t);l.set(n,45)}if(e.version===n.PRIVATE_KEY_VERSION){const{privateKey:t}=e;l.set(t,46)}return(0,o.encodeBase58check)(l)}},{"./BIP44Node.cjs":44,"./curves/secp256k1.cjs":51,"./utils.cjs":61,"@metamask/utils":72}],60:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.createBip39KeyFromSeed=n.mnemonicPhraseToBytes=n.isValidBIP32PathSegment=n.getBIP44CoinTypeToAddressPathTuple=n.getBIP44AddressKeyDeriver=n.deriveBIP44AddressKey=n.BIP_44_COIN_TYPE_DEPTH=n.BIP44CoinTypeNode=n.ed25519Bip32=n.ed25519=n.secp256k1=n.SLIP10Node=n.BIP44Node=void 0;var s=e("./BIP44Node.cjs");Object.defineProperty(n,"BIP44Node",{enumerable:!0,get:function(){return s.BIP44Node}});var o=e("./SLIP10Node.cjs");Object.defineProperty(n,"SLIP10Node",{enumerable:!0,get:function(){return o.SLIP10Node}});var a=e("./curves/index.cjs");Object.defineProperty(n,"secp256k1",{enumerable:!0,get:function(){return a.secp256k1}}),Object.defineProperty(n,"ed25519",{enumerable:!0,get:function(){return a.ed25519}}),Object.defineProperty(n,"ed25519Bip32",{enumerable:!0,get:function(){return a.ed25519Bip32}});var c=e("./BIP44CoinTypeNode.cjs");Object.defineProperty(n,"BIP44CoinTypeNode",{enumerable:!0,get:function(){return c.BIP44CoinTypeNode}}),Object.defineProperty(n,"BIP_44_COIN_TYPE_DEPTH",{enumerable:!0,get:function(){return c.BIP_44_COIN_TYPE_DEPTH}}),Object.defineProperty(n,"deriveBIP44AddressKey",{enumerable:!0,get:function(){return c.deriveBIP44AddressKey}}),Object.defineProperty(n,"getBIP44AddressKeyDeriver",{enumerable:!0,get:function(){return c.getBIP44AddressKeyDeriver}}),i(e("./constants.cjs"),n);var u=e("./utils.cjs");Object.defineProperty(n,"getBIP44CoinTypeToAddressPathTuple",{enumerable:!0,get:function(){return u.getBIP44CoinTypeToAddressPathTuple}}),Object.defineProperty(n,"isValidBIP32PathSegment",{enumerable:!0,get:function(){return u.isValidBIP32PathSegment}}),Object.defineProperty(n,"mnemonicPhraseToBytes",{enumerable:!0,get:function(){return u.mnemonicPhraseToBytes}});var l=e("./derivers/index.cjs");Object.defineProperty(n,"createBip39KeyFromSeed",{enumerable:!0,get:function(){return l.createBip39KeyFromSeed}})},{"./BIP44CoinTypeNode.cjs":43,"./BIP44Node.cjs":44,"./SLIP10Node.cjs":45,"./constants.cjs":46,"./curves/index.cjs":50,"./derivers/index.cjs":56,"./utils.cjs":61}],61:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.numberToUint32=n.validateCurve=n.mnemonicPhraseToBytes=n.getFingerprint=n.encodeBase58check=n.decodeBase58check=n.getBytesUnsafe=n.getBytes=n.isValidInteger=n.isValidBytesKey=n.nullableHexStringToBytes=n.hexStringToBytes=n.isHardened=n.isValidBIP32PathSegment=n.isValidBIP32Index=n.validateBIP32Index=n.getBIP32NodeToken=n.getUnhardenedBIP32NodeToken=n.getHardenedBIP32NodeToken=n.getBIP44CoinTypeToAddressPathTuple=n.getBIP44ChangePathString=n.getBIP44CoinTypePathString=void 0;const r=e("@metamask/scure-bip39/dist/wordlists/english.js"),i=e("@metamask/utils"),s=e("@noble/hashes/ripemd160"),o=e("@noble/hashes/sha256"),a=e("@scure/base"),c=e("./constants.cjs"),u=e("./curves/index.cjs");function l(e){return f(e),`${d(e)}'`}function d(e){return f(e),`bip32:${e}`}function h(e){if("number"==typeof e)return d(e);if(!e||!Number.isInteger(e.index)||"boolean"!=typeof e.hardened)throw new Error("Invalid BIP-32 index: Must be an object containing the index and whether it is hardened.");return e.hardened?l(e.index):d(e.index)}function f(e){if(!p(e))throw new Error("Invalid BIP-32 index: Must be a non-negative integer.")}function p(e){return g(e)&&e<=c.MAX_BIP_32_INDEX}function m(e){return e instanceof Uint8Array?e:(0,i.hexToBytes)(e)}function y(e,t){if(e.length!==t)return!1;for(const t of e)if(0!==t)return!0;return!1}function g(e){return"number"==typeof e&&Number.isInteger(e)&&e>=0}function b(e,t){if(!y(e,t))throw new Error(`Invalid value: Must be a non-zero ${t}-byte byte array.`)}n.getBIP44CoinTypePathString=function(e){return`m / ${c.BIP44PurposeNodeToken} / ${l(e)}`},n.getBIP44ChangePathString=function(e,t){return`${e} / ${l(t.account??0)} / ${h(t.change??0)}`},n.getBIP44CoinTypeToAddressPathTuple=function({account:e=0,change:t=0,address_index:n}){return[l(e),h(t),h(n)]},n.getHardenedBIP32NodeToken=l,n.getUnhardenedBIP32NodeToken=d,n.getBIP32NodeToken=h,n.validateBIP32Index=f,n.isValidBIP32Index=p,n.isValidBIP32PathSegment=function(e){if("string"!=typeof e)return!1;const t=e.match(c.UNPREFIXED_BIP_32_PATH_REGEX);if(void 0===t?.groups?.index)return!1;const n=parseInt(t.groups.index,10);return g(n)&&n<=c.MAX_UNHARDENED_BIP_32_INDEX},n.isHardened=function(e){return e.endsWith("'")},n.hexStringToBytes=m,n.nullableHexStringToBytes=function(e){if(void 0!==e)return m(e)},n.isValidBytesKey=y,n.isValidInteger=g,n.getBytes=function(e,t){if(e instanceof Uint8Array)return b(e,t),e;if("string"==typeof e){const n=(0,i.hexToBytes)(e);return b(n,t),n}throw new Error("Invalid value: Expected an instance of Uint8Array or hexadecimal string.")},n.getBytesUnsafe=function e(t,n){if(t instanceof Uint8Array)return(0,i.assert)(t.length===n,`Invalid value: Must be a ${n}-byte byte array.`),t;if("string"==typeof t)return e((0,i.hexToBytes)(t),n);throw new Error("Invalid value: Expected an instance of Uint8Array or hexadecimal string.")};n.decodeBase58check=e=>{const t=(0,a.base58check)(o.sha256);try{return t.decode(e)}catch{throw new Error("Invalid extended key: Value is not base58-encoded, or the checksum is invalid.")}};n.encodeBase58check=e=>(0,a.base58check)(o.sha256).encode(e);n.getFingerprint=(e,t)=>{if(!y(e,t))throw new Error(`Invalid public key: The key must be a ${t}-byte, non-zero byte array.`);const n=(0,s.ripemd160)((0,o.sha256)(e));return(0,i.createDataView)(n).getUint32(0,!1)},n.mnemonicPhraseToBytes=function(e){const t=e.split(" ").map((e=>{const t=r.wordlist.indexOf(e);return(0,i.assert)(-1!==t,`Invalid mnemonic phrase: Unknown word "${e}".`),t}));return new Uint8Array(new Uint16Array(t).buffer)},n.validateCurve=function(e){if(!e||"string"!=typeof e)throw new Error("Invalid curve: Must specify a curve.");if(!Object.keys(u.curves).includes(e))throw new Error(`Invalid curve: Only the following curves are supported: ${Object.keys(u.curves).join(", ")}.`)},n.numberToUint32=function(e,t=!1){const n=new Uint8Array(4);return(0,i.createDataView)(n).setUint32(0,e,t),n}},{"./constants.cjs":46,"./curves/index.cjs":50,"@metamask/scure-bip39/dist/wordlists/english.js":134,"@metamask/utils":72,"@noble/hashes/ripemd160":396,"@noble/hashes/sha256":397,"@scure/base":401}],62:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertExhaustive=n.assertStruct=n.assert=n.AssertionError=void 0;const r=e("@metamask/superstruct"),i=e("./errors.cjs");function s(e,t){return n=e,Boolean("string"==typeof n?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var n}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}n.AssertionError=o,n.assert=function(e,t="Assertion failed.",n=o){if(!e){if(t instanceof Error)throw t;throw s(n,t)}},n.assertStruct=function(e,t,n="Assertion failed",a=o){try{(0,r.assert)(e,t)}catch(e){throw s(a,`${n}: ${function(e){return(0,i.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},n.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},{"./errors.cjs":70,"@metamask/superstruct":352}],63:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.base64=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs");n.base64=(e,t={})=>{const n=t.paddingRequired??!1,s=t.characterSet??"base64";let o,a;return"base64"===s?o=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===s),o=String.raw`[-_A-Za-z0-9]`),a=n?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,r.pattern)(e,a)}},{"./assert.cjs":62,"@metamask/superstruct":352}],64:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDataView=n.concatBytes=n.valueToBytes=n.base64ToBytes=n.stringToBytes=n.numberToBytes=n.signedBigIntToBytes=n.bigIntToBytes=n.hexToBytes=n.bytesToBase64=n.bytesToString=n.bytesToNumber=n.bytesToSignedBigInt=n.bytesToBigInt=n.bytesToHex=n.assertIsBytes=n.isBytes=void 0;const r=e("@scure/base"),i=e("./assert.cjs"),s=e("./hex.cjs"),o=48,a=58,c=87;const u=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 l(e){return e instanceof Uint8Array}function d(e){(0,i.assert)(l(e),"Value must be a Uint8Array.")}function h(e){if(d(e),0===e.length)return"0x";const t=u(),n=new Array(e.length);for(let r=0;r=BigInt(0),"Value must be a non-negative bigint.");return p(e.toString(16))}function y(e){(0,i.assert)("number"==typeof e,"Value must be a number."),(0,i.assert)(e>=0,"Value must be a non-negative number."),(0,i.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return p(e.toString(16))}function g(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return m(e);if("number"==typeof e)return y(e);if("string"==typeof e)return e.startsWith("0x")?p(e):g(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}n.isBytes=l,n.assertIsBytes=d,n.bytesToHex=h,n.bytesToBigInt=f,n.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const n of e)t=(t<0,"Byte length must be greater than 0."),(0,i.assert)(function(e,t){(0,i.assert)(t>0);const n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let n=e;const r=new Uint8Array(t);for(let e=0;e>=BigInt(8);return r.reverse()},n.numberToBytes=y,n.stringToBytes=g,n.base64ToBytes=function(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),r.base64.decode(e)},n.valueToBytes=b,n.concatBytes=function(e){const t=new Array(e.length);let n=0;for(let r=0;r[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,n.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,n.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,n.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,n.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,n.CaipChainIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_CHAIN_ID_REGEX),n.CaipNamespaceStruct=(0,r.pattern)((0,r.string)(),n.CAIP_NAMESPACE_REGEX),n.CaipReferenceStruct=(0,r.pattern)((0,r.string)(),n.CAIP_REFERENCE_REGEX),n.CaipAccountIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ACCOUNT_ID_REGEX),n.CaipAccountAddressStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ACCOUNT_ADDRESS_REGEX),n.CaipAssetTypeStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ASSET_TYPE_REGEX),n.CaipAssetIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Eip155="eip155",e.Wallet="wallet"}(n.KnownCaipNamespace||(n.KnownCaipNamespace={})),n.isCaipChainId=function(e){return(0,r.is)(e,n.CaipChainIdStruct)},n.isCaipNamespace=i,n.isCaipReference=s,n.isCaipAccountId=function(e){return(0,r.is)(e,n.CaipAccountIdStruct)},n.isCaipAccountAddress=function(e){return(0,r.is)(e,n.CaipAccountAddressStruct)},n.isCaipAssetType=function(e){return(0,r.is)(e,n.CaipAssetTypeStruct)},n.isCaipAssetId=function(e){return(0,r.is)(e,n.CaipAssetIdStruct)},n.parseCaipChainId=function(e){const t=n.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},n.parseCaipAccountId=function(e){const t=n.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.toCaipChainId=function(e,t){if(!i(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!s(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}},{"@metamask/superstruct":352}],66:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ChecksumStruct=void 0;const r=e("@metamask/superstruct"),i=e("./base64.cjs");n.ChecksumStruct=(0,r.size)((0,i.base64)((0,r.string)(),{paddingRequired:!0}),44,44)},{"./base64.cjs":63,"@metamask/superstruct":352}],67:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createHex=n.createBytes=n.createBigInt=n.createNumber=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs"),s=e("./bytes.cjs"),o=e("./hex.cjs"),a=(0,r.union)([(0,r.number)(),(0,r.bigint)(),(0,r.string)(),o.StrictHexStruct]),c=(0,r.coerce)((0,r.number)(),a,Number),u=(0,r.coerce)((0,r.bigint)(),a,BigInt),l=((0,r.union)([o.StrictHexStruct,(0,r.instance)(Uint8Array)]),(0,r.coerce)((0,r.instance)(Uint8Array),(0,r.union)([o.StrictHexStruct]),s.hexToBytes)),d=(0,r.coerce)(o.StrictHexStruct,(0,r.instance)(Uint8Array),s.bytesToHex);n.createNumber=function(e){try{const t=(0,r.create)(e,c);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof r.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},n.createBigInt=function(e){try{return(0,r.create)(e,u)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},n.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,r.create)(e,l)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},n.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,r.create)(e,d)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},{"./assert.cjs":62,"./bytes.cjs":64,"./hex.cjs":71,"@metamask/superstruct":352}],68:[function(e,t,n){"use strict";var r,i,s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.FrozenSet=n.FrozenMap=void 0;class a{get size(){return s(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return s(this,r,"f")[Symbol.iterator]()}constructor(e){r.set(this,void 0),o(this,r,new Map(e),"f"),Object.freeze(this)}entries(){return s(this,r,"f").entries()}forEach(e,t){return s(this,r,"f").forEach(((n,r,i)=>e.call(t,n,r,this)))}get(e){return s(this,r,"f").get(e)}has(e){return s(this,r,"f").has(e)}keys(){return s(this,r,"f").keys()}values(){return s(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}n.FrozenMap=a;class c{get size(){return s(this,i,"f").size}[(i=new WeakMap,Symbol.iterator)](){return s(this,i,"f")[Symbol.iterator]()}constructor(e){i.set(this,void 0),o(this,i,new Set(e),"f"),Object.freeze(this)}entries(){return s(this,i,"f").entries()}forEach(e,t){return s(this,i,"f").forEach(((n,r,i)=>e.call(t,n,r,this)))}has(e){return s(this,i,"f").has(e)}keys(){return s(this,i,"f").keys()}values(){return s(this,i,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}n.FrozenSet=c,Object.freeze(a),Object.freeze(a.prototype),Object.freeze(c),Object.freeze(c.prototype)},{}],69:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],70:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.wrapError=n.getErrorMessage=n.isErrorWithStack=n.isErrorWithMessage=n.isErrorWithCode=void 0;const r=e("pony-cause"),i=e("./misc.cjs");function s(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}n.isErrorWithCode=s,n.isErrorWithMessage=o,n.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},n.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,i.isNullOrUndefined)(e)?"":String(e)},n.wrapError=function(e,t){if((n=e)instanceof Error||(0,i.isObject)(n)&&"Error"===n.constructor.name){let n;return n=2===Error.length?new Error(t,{cause:e}):new r.ErrorWithCause(t,{cause:e}),s(e)&&(n.code=e.code),n}var n;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}},{"./misc.cjs":76,"pony-cause":564}],71:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.remove0x=n.add0x=n.isValidChecksumAddress=n.getChecksumAddress=n.isValidHexAddress=n.assertIsStrictHexString=n.assertIsHexString=n.isStrictHexString=n.isHexString=n.HexChecksumAddressStruct=n.HexAddressStruct=n.StrictHexStruct=n.HexStruct=void 0;const r=e("@metamask/superstruct"),i=e("@noble/hashes/sha3"),s=e("./assert.cjs"),o=e("./bytes.cjs");function a(e){return(0,r.is)(e,n.HexStruct)}function c(e){return(0,r.is)(e,n.StrictHexStruct)}function u(e){(0,s.assert)((0,r.is)(e,n.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),a=d((0,o.bytesToHex)((0,i.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const n=a[t];return(0,s.assert)((0,r.is)(n,(0,r.string)()),"Hash shorter than address."),parseInt(n,16)>7?e.toUpperCase():e})).join("")}`}function l(e){return!!(0,r.is)(e,n.HexChecksumAddressStruct)&&u(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}n.HexStruct=(0,r.pattern)((0,r.string)(),/^(?:0x)?[0-9a-f]+$/iu),n.StrictHexStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]+$/iu),n.HexAddressStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]{40}$/u),n.HexChecksumAddressStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-fA-F]{40}$/u),n.isHexString=a,n.isStrictHexString=c,n.assertIsHexString=function(e){(0,s.assert)(a(e),"Value must be a hexadecimal string.")},n.assertIsStrictHexString=function(e){(0,s.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},n.isValidHexAddress=function(e){return(0,r.is)(e,n.HexAddressStruct)||l(e)},n.getChecksumAddress=u,n.isValidChecksumAddress=l,n.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},n.remove0x=d},{"./assert.cjs":62,"./bytes.cjs":64,"@metamask/superstruct":352,"@noble/hashes/sha3":398}],72:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./assert.cjs"),n),i(e("./base64.cjs"),n),i(e("./bytes.cjs"),n),i(e("./caip-types.cjs"),n),i(e("./checksum.cjs"),n),i(e("./coercers.cjs"),n),i(e("./collections.cjs"),n),i(e("./encryption-types.cjs"),n),i(e("./errors.cjs"),n),i(e("./hex.cjs"),n),i(e("./json.cjs"),n),i(e("./keyring.cjs"),n),i(e("./logging.cjs"),n),i(e("./misc.cjs"),n),i(e("./number.cjs"),n),i(e("./opaque.cjs"),n),i(e("./promise.cjs"),n),i(e("./time.cjs"),n),i(e("./transaction-types.cjs"),n),i(e("./versions.cjs"),n)},{"./assert.cjs":62,"./base64.cjs":63,"./bytes.cjs":64,"./caip-types.cjs":65,"./checksum.cjs":66,"./coercers.cjs":67,"./collections.cjs":68,"./encryption-types.cjs":69,"./errors.cjs":70,"./hex.cjs":71,"./json.cjs":73,"./keyring.cjs":74,"./logging.cjs":75,"./misc.cjs":76,"./number.cjs":77,"./opaque.cjs":78,"./promise.cjs":79,"./time.cjs":80,"./transaction-types.cjs":81,"./versions.cjs":82}],73:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonRpcIdValidator=n.assertIsJsonRpcError=n.isJsonRpcError=n.assertIsJsonRpcFailure=n.isJsonRpcFailure=n.assertIsJsonRpcSuccess=n.isJsonRpcSuccess=n.assertIsJsonRpcResponse=n.isJsonRpcResponse=n.assertIsPendingJsonRpcResponse=n.isPendingJsonRpcResponse=n.JsonRpcResponseStruct=n.JsonRpcFailureStruct=n.JsonRpcSuccessStruct=n.PendingJsonRpcResponseStruct=n.assertIsJsonRpcRequest=n.isJsonRpcRequest=n.assertIsJsonRpcNotification=n.isJsonRpcNotification=n.JsonRpcNotificationStruct=n.JsonRpcRequestStruct=n.JsonRpcParamsStruct=n.JsonRpcErrorStruct=n.JsonRpcIdStruct=n.JsonRpcVersionStruct=n.jsonrpc2=n.getJsonSize=n.getSafeJson=n.isValidJson=n.JsonStruct=n.UnsafeJsonStruct=n.exactOptional=n.object=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs"),s=e("./misc.cjs");function o({path:e,branch:t}){const n=e[e.length-1];return(0,s.hasProperty)(t[t.length-2],n)}function a(e){return new r.Struct({...e,type:`optional ${e.type}`,validator:(t,n)=>!o(n)||e.validator(t,n),refiner:(t,n)=>!o(n)||e.refiner(t,n)})}n.object=e=>(0,r.object)(e),n.exactOptional=a;function c(e){return(0,r.create)(e,n.JsonStruct)}n.UnsafeJsonStruct=(0,r.union)([(0,r.literal)(null),(0,r.boolean)(),(0,r.define)("finite number",(e=>(0,r.is)(e,(0,r.number)())&&Number.isFinite(e))),(0,r.string)(),(0,r.array)((0,r.lazy)((()=>n.UnsafeJsonStruct))),(0,r.record)((0,r.string)(),(0,r.lazy)((()=>n.UnsafeJsonStruct)))]),n.JsonStruct=(0,r.coerce)(n.UnsafeJsonStruct,(0,r.any)(),(e=>((0,i.assertStruct)(e,n.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))))),n.isValidJson=function(e){try{return c(e),!0}catch{return!1}},n.getSafeJson=c,n.getJsonSize=function(e){(0,i.assertStruct)(e,n.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},n.jsonrpc2="2.0",n.JsonRpcVersionStruct=(0,r.literal)(n.jsonrpc2),n.JsonRpcIdStruct=(0,r.nullable)((0,r.union)([(0,r.number)(),(0,r.string)()])),n.JsonRpcErrorStruct=(0,n.object)({code:(0,r.integer)(),message:(0,r.string)(),data:a(n.JsonStruct),stack:a((0,r.string)())}),n.JsonRpcParamsStruct=(0,r.union)([(0,r.record)((0,r.string)(),n.JsonStruct),(0,r.array)(n.JsonStruct)]),n.JsonRpcRequestStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:a(n.JsonRpcParamsStruct)}),n.JsonRpcNotificationStruct=(0,n.object)({jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:a(n.JsonRpcParamsStruct)}),n.isJsonRpcNotification=function(e){return(0,r.is)(e,n.JsonRpcNotificationStruct)},n.assertIsJsonRpcNotification=function(e,t){(0,i.assertStruct)(e,n.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},n.isJsonRpcRequest=function(e){return(0,r.is)(e,n.JsonRpcRequestStruct)},n.assertIsJsonRpcRequest=function(e,t){(0,i.assertStruct)(e,n.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},n.PendingJsonRpcResponseStruct=(0,r.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:(0,r.optional)((0,r.unknown)()),error:(0,r.optional)(n.JsonRpcErrorStruct)}),n.JsonRpcSuccessStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:n.JsonStruct}),n.JsonRpcFailureStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,error:n.JsonRpcErrorStruct}),n.JsonRpcResponseStruct=(0,r.union)([n.JsonRpcSuccessStruct,n.JsonRpcFailureStruct]),n.isPendingJsonRpcResponse=function(e){return(0,r.is)(e,n.PendingJsonRpcResponseStruct)},n.assertIsPendingJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,n.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},n.isJsonRpcResponse=function(e){return(0,r.is)(e,n.JsonRpcResponseStruct)},n.assertIsJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,n.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},n.isJsonRpcSuccess=function(e){return(0,r.is)(e,n.JsonRpcSuccessStruct)},n.assertIsJsonRpcSuccess=function(e,t){(0,i.assertStruct)(e,n.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},n.isJsonRpcFailure=function(e){return(0,r.is)(e,n.JsonRpcFailureStruct)},n.assertIsJsonRpcFailure=function(e,t){(0,i.assertStruct)(e,n.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},n.isJsonRpcError=function(e){return(0,r.is)(e,n.JsonRpcErrorStruct)},n.assertIsJsonRpcError=function(e,t){(0,i.assertStruct)(e,n.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},n.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:n,permitNull:r}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(n||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||r&&null===e)}},{"./assert.cjs":62,"./misc.cjs":76,"@metamask/superstruct":352}],74:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],75:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.createProjectLogger=void 0;const i=(0,r(e("debug")).default)("metamask");n.createProjectLogger=function(e){return i.extend(e)},n.createModuleLogger=function(e,t){return e.extend(t)}},{debug:462}],76:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.calculateNumberSize=n.calculateStringSize=n.isASCII=n.isPlainObject=n.ESCAPE_CHARACTERS_REGEXP=n.JsonSize=n.getKnownPropertyNames=n.hasProperty=n.isObject=n.isNullOrUndefined=n.isNonEmptyArray=void 0,n.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},n.isNullOrUndefined=function(e){return null==e},n.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function r(e){return e.charCodeAt(0)<=127}n.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),n.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},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"}(n.JsonSize||(n.JsonSize={})),n.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,n.isPlainObject=function(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}},n.isASCII=r,n.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(e.match(n.ESCAPE_CHARACTERS_REGEXP)??[]).length},n.calculateNumberSize=function(e){return e.toString().length}},{}],77:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hexToBigInt=n.hexToNumber=n.bigIntToHex=n.numberToHex=void 0;const r=e("./assert.cjs"),i=e("./hex.cjs");n.numberToHex=e=>((0,r.assert)("number"==typeof e,"Value must be a number."),(0,r.assert)(e>=0,"Value must be a non-negative number."),(0,r.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16)));n.bigIntToHex=e=>((0,r.assert)("bigint"==typeof e,"Value must be a bigint."),(0,r.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16)));n.hexToNumber=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,r.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};n.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))},{"./assert.cjs":62,"./hex.cjs":71}],78:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],79:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDeferredPromise=void 0,n.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,n;const r=new Promise(((e,r)=>{t=e,n=r}));return e&&r.catch((e=>{})),{promise:r,resolve:t,reject:n}}},{}],80:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.timeSince=n.inMilliseconds=n.Duration=void 0,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"}(n.Duration||(n.Duration={}));const r=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};n.inMilliseconds=function(e,t){return r(e,"count"),e*t},n.timeSince=function(e){return r(e,"timestamp"),Date.now()-e}},{}],81:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],82:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.satisfiesVersionRange=n.gtRange=n.gtVersion=n.assertIsSemVerRange=n.assertIsSemVerVersion=n.isValidSemVerRange=n.isValidSemVerVersion=n.VersionRangeStruct=n.VersionStruct=void 0;const r=e("@metamask/superstruct"),i=e("semver"),s=e("./assert.cjs");n.VersionStruct=(0,r.refine)((0,r.string)(),"Version",(e=>null!==(0,i.valid)(e)||`Expected SemVer version, got "${e}"`)),n.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",(e=>null!==(0,i.validRange)(e)||`Expected SemVer range, got "${e}"`)),n.isValidSemVerVersion=function(e){return(0,r.is)(e,n.VersionStruct)},n.isValidSemVerRange=function(e){return(0,r.is)(e,n.VersionRangeStruct)},n.assertIsSemVerVersion=function(e){(0,s.assertStruct)(e,n.VersionStruct)},n.assertIsSemVerRange=function(e){(0,s.assertStruct)(e,n.VersionRangeStruct)},n.gtVersion=function(e,t){return(0,i.gt)(e,t)},n.gtRange=function(e,t){return(0,i.gtr)(e,t)},n.satisfiesVersionRange=function(e,t){return(0,i.satisfies)(e,t,{includePrerelease:!0})}},{"./assert.cjs":62,"@metamask/superstruct":352,semver:618}],83:[function(e,t,n){var r=e("bn.js"),i=e("strip-hex-prefix");t.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new r(1),n=String(e).toLowerCase().trim(),s="0x"===n.substr(0,2)||"-0x"===n.substr(0,3),o=i(n);if("-"===o.substr(0,1)&&(o=i(o.slice(1)),t=new r(-1,10)),!(o=""===o?"0":o).match(/^-?[0-9]+$/)&&o.match(/^[0-9A-Fa-f]+$/)||o.match(/^[a-fA-F]+$/)||!0===s&&o.match(/^[0-9A-Fa-f]+$/))return new r(o,16).mul(t);if((o.match(/^-?[0-9]+$/)||""===o)&&!1===s)return new r(o,10).mul(t)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new r(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},{"bn.js":436,"strip-hex-prefix":644}],84:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.ObjectMultiplex=void 0;const i=e("readable-stream"),s=r(e("once")),o=e("./Substream"),a=Symbol("IGNORE_SUBSTREAM");class c extends i.Duplex{constructor(e={}){super(Object.assign(Object.assign({},e),{objectMode:!0})),this._substreams={}}createStream(e){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new o.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const n=(0,s.default)(t);(0,i.finished)(e,{readable:!1},n),(0,i.finished)(e,{writable:!1},n)}(this,(e=>t.destroy(e||void 0))),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=a}_read(){}_write(e,t,n){const{name:r,data:i}=e;if(!r)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),n();const s=this._substreams[r];return s?(s!==a&&s.push(i),n()):(console.warn(`ObjectMultiplex - orphaned data for stream "${r}"`),n())}}n.ObjectMultiplex=c},{"./Substream":85,once:552,"readable-stream":588}],85:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Substream=void 0;const r=e("readable-stream");class i extends r.Duplex{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){}_write(e,t,n){this._parent.push({name:this._name,data:e}),n()}}n.Substream=i},{"readable-stream":588}],86:[function(e,t,n){"use strict";const r=e("./ObjectMultiplex");t.exports=r.ObjectMultiplex},{"./ObjectMultiplex":84}],87:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decorateWithCaveats=n.isRestrictedMethodCaveatSpecification=void 0;const r=e("@metamask/utils"),i=e("./errors.cjs"),s=e("./Permission.cjs");function o(e){return(0,r.hasProperty)(e,"decorator")}n.isRestrictedMethodCaveatSpecification=o,n.decorateWithCaveats=function(e,t,n){const{caveats:r}=t;if(!r)return e;let a=async t=>e(t);for(const e of r){const t=n[e.type];if(!t)throw new i.UnrecognizedCaveatTypeError(e.type);if(!o(t))throw new i.CaveatSpecificationMismatchError(t,s.PermissionType.RestrictedMethod);a=t.decorator(a,e)}return a}},{"./Permission.cjs":88,"./errors.cjs":91,"@metamask/utils":369}],88:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hasSpecificationType=n.PermissionType=n.findCaveat=n.constructPermission=void 0;const r=e("nanoid");var i;n.constructPermission=function(e){const{caveats:t=null,invoker:n,target:i}=e;return{id:(0,r.nanoid)(),parentCapability:i,invoker:n,caveats:t,date:(new Date).getTime()}},n.findCaveat=function(e,t){return e.caveats?.find((e=>e.type===t))},function(e){e.RestrictedMethod="RestrictedMethod",e.Endowment="Endowment"}(i||(n.PermissionType=i={})),n.hasSpecificationType=function(e,t){return e.permissionType===t}},{nanoid:548}],89:[function(e,t,n){"use strict";var r,i,s,o,a,c,u,l=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.PermissionController=n.CaveatMutatorOperation=void 0;const h=e("@metamask/base-controller"),f=e("@metamask/controller-utils"),p=e("@metamask/rpc-errors"),m=e("@metamask/utils"),y=d(e("deep-freeze-strict")),g=e("immer"),b=e("nanoid"),v=e("./Caveat.cjs"),x=e("./errors.cjs"),w=e("./Permission.cjs"),S=e("./permission-middleware.cjs"),E=e("./utils.cjs"),_="PermissionController";var A;!function(e){e[e.Noop=0]="Noop",e[e.UpdateValue=1]="UpdateValue",e[e.DeleteCaveat=2]="DeleteCaveat",e[e.RevokePermission=3]="RevokePermission"}(A||(n.CaveatMutatorOperation=A={}));class T extends h.BaseController{get unrestrictedMethods(){return this._unrestrictedMethods}constructor(e){const{caveatSpecifications:t,permissionSpecifications:n,unrestrictedMethods:i,messenger:s,state:o={}}=e;super({name:_,metadata:{subjects:{anonymous:!0,persist:!0}},messenger:s,state:{subjects:{},...o}}),r.add(this),this._unrestrictedMethods=new Set(i),this._caveatSpecifications=(0,y.default)({...t}),this.validatePermissionSpecifications(n,this._caveatSpecifications),this._permissionSpecifications=(0,y.default)({...n}),this.registerMessageHandlers(),this.createPermissionMiddleware=(0,S.getPermissionMiddlewareFactory)({executeRestrictedMethod:this._executeRestrictedMethod.bind(this),getRestrictedMethod:this.getRestrictedMethod.bind(this),isUnrestrictedMethod:this.unrestrictedMethods.has.bind(this.unrestrictedMethods)})}getPermissionSpecification(e){return this._permissionSpecifications[e]}getCaveatSpecification(e){return this._caveatSpecifications[e]}validatePermissionSpecifications(e,t){Object.entries(e).forEach((([e,{permissionType:n,targetName:r,allowedCaveats:i}])=>{if(!n||!(0,m.hasProperty)(w.PermissionType,n))throw new Error(`Invalid permission type: "${n}"`);if(!e)throw new Error(`Invalid permission target name: "${e}"`);if(e!==r)throw new Error(`Invalid permission specification: target name "${e}" must match specification.targetName value "${r}".`);i&&i.forEach((e=>{if(!(0,m.hasProperty)(t,e))throw new x.UnrecognizedCaveatTypeError(e);const r=t[e],i=(0,v.isRestrictedMethodCaveatSpecification)(r);if(n===w.PermissionType.RestrictedMethod&&!i||n===w.PermissionType.Endowment&&i)throw new x.CaveatSpecificationMismatchError(r,n)}))}))}registerMessageHandlers(){this.messagingSystem.registerActionHandler(`${_}:clearPermissions`,(()=>this.clearState())),this.messagingSystem.registerActionHandler(`${_}:getEndowments`,((e,t,n)=>this.getEndowments(e,t,n))),this.messagingSystem.registerActionHandler(`${_}:getSubjectNames`,(()=>this.getSubjectNames())),this.messagingSystem.registerActionHandler(`${_}:getPermissions`,(e=>this.getPermissions(e))),this.messagingSystem.registerActionHandler(`${_}:hasPermission`,((e,t)=>this.hasPermission(e,t))),this.messagingSystem.registerActionHandler(`${_}:hasPermissions`,(e=>this.hasPermissions(e))),this.messagingSystem.registerActionHandler(`${_}:grantPermissions`,this.grantPermissions.bind(this)),this.messagingSystem.registerActionHandler(`${_}:grantPermissionsIncremental`,this.grantPermissionsIncremental.bind(this)),this.messagingSystem.registerActionHandler(`${_}:requestPermissions`,((e,t)=>this.requestPermissions(e,t))),this.messagingSystem.registerActionHandler(`${_}:requestPermissionsIncremental`,((e,t)=>this.requestPermissionsIncremental(e,t))),this.messagingSystem.registerActionHandler(`${_}:revokeAllPermissions`,(e=>this.revokeAllPermissions(e))),this.messagingSystem.registerActionHandler(`${_}:revokePermissionForAllSubjects`,(e=>this.revokePermissionForAllSubjects(e))),this.messagingSystem.registerActionHandler(`${_}:revokePermissions`,this.revokePermissions.bind(this)),this.messagingSystem.registerActionHandler(`${_}:updateCaveat`,((e,t,n,r)=>{this.updateCaveat(e,t,n,r)}))}clearState(){this.update((e=>({subjects:{}})))}getTypedPermissionSpecification(e,t,n){const r=e===w.PermissionType.RestrictedMethod?(0,x.methodNotFound)(t,n?{origin:n}:void 0):new x.EndowmentPermissionDoesNotExistError(t,n);if(!this.targetExists(t))throw r;const i=this.getPermissionSpecification(t);if(!(0,w.hasSpecificationType)(i,e))throw r;return i}getRestrictedMethod(e,t){return this.getTypedPermissionSpecification(w.PermissionType.RestrictedMethod,e,t).methodImplementation}getSubjectNames(){return Object.keys(this.state.subjects)}getPermission(e,t){return this.state.subjects[e]?.permissions[t]}getPermissions(e){return this.state.subjects[e]?.permissions}hasPermission(e,t){return Boolean(this.getPermission(e,t))}hasPermissions(e){return Boolean(this.state.subjects[e])}revokeAllPermissions(e){this.update((t=>{if(!t.subjects[e])throw new x.UnrecognizedSubjectError(e);delete t.subjects[e]}))}revokePermission(e,t){this.revokePermissions({[e]:[t]})}revokePermissions(e){this.update((t=>{Object.keys(e).forEach((n=>{if(!(0,m.hasProperty)(t.subjects,n))throw new x.UnrecognizedSubjectError(n);e[n].forEach((e=>{const{permissions:r}=t.subjects[n];if(!(0,m.hasProperty)(r,e))throw new x.PermissionDoesNotExistError(n,e);this.deletePermission(t.subjects,n,e)}))}))}))}revokePermissionForAllSubjects(e){0!==this.getSubjectNames().length&&this.update((t=>{Object.entries(t.subjects).forEach((([n,r])=>{const{permissions:i}=r;(0,m.hasProperty)(i,e)&&this.deletePermission(t.subjects,n,e)}))}))}deletePermission(e,t,n){const{permissions:r}=e[t];Object.keys(r).length>1?delete r[n]:delete e[t]}hasCaveat(e,t,n){return Boolean(this.getCaveat(e,t,n))}getCaveat(e,t,n){const r=this.getPermission(e,t);if(!r)throw new x.PermissionDoesNotExistError(e,t);return(0,w.findCaveat)(r,n)}addCaveat(e,t,n,r){if(this.hasCaveat(e,t,n))throw new x.CaveatAlreadyExistsError(e,t,n);this.setCaveat(e,t,n,r)}updateCaveat(e,t,n,r){if(!this.hasCaveat(e,t,n))throw new x.CaveatDoesNotExistError(e,t,n);this.setCaveat(e,t,n,r)}setCaveat(e,t,n,r){this.update((i=>{const s=i.subjects[e];if(!s)throw new x.UnrecognizedSubjectError(e);const o=s.permissions[t];if(!o)throw new x.PermissionDoesNotExistError(e,t);const a={type:n,value:r};if(this.validateCaveat(a,e,t),o.caveats){const e=o.caveats.findIndex((e=>e.type===a.type));-1===e?o.caveats.push(a):o.caveats.splice(e,1,a)}else o.caveats=[a];this.validateModifiedPermission(o,e)}))}updatePermissionsByCaveat(e,t){0!==Object.keys(this.state.subjects).length&&this.update((n=>{Object.values(n.subjects).forEach((r=>{Object.values(r.permissions).forEach((i=>{const{caveats:s}=i,o=s?.find((({type:t})=>t===e));if(!o)return;const a=t(o.value),{operation:c}=a;switch(c){case A.Noop:break;case A.UpdateValue:o.value=a.value,this.validateCaveat(o,r.origin,i.parentCapability);break;case A.DeleteCaveat:this.deleteCaveat(i,e,r.origin);break;case A.RevokePermission:this.deletePermission(n.subjects,r.origin,i.parentCapability);break;default:throw new Error(`Unrecognized mutation result: "${c}"`)}}))}))}))}removeCaveat(e,t,n){this.update((r=>{const i=r.subjects[e]?.permissions[t];if(!i)throw new x.PermissionDoesNotExistError(e,t);if(!i.caveats)throw new x.CaveatDoesNotExistError(e,t,n);this.deleteCaveat(i,n,e)}))}deleteCaveat(e,t,n){if(!e.caveats)throw new x.CaveatDoesNotExistError(n,e.parentCapability,t);const r=e.caveats.findIndex((e=>e.type===t));if(-1===r)throw new x.CaveatDoesNotExistError(n,e.parentCapability,t);1===e.caveats.length?e.caveats=null:e.caveats.splice(r,1),this.validateModifiedPermission(e,n)}validateModifiedPermission(e,t){if(!this.targetExists(e.parentCapability))throw new Error(`Fatal: Existing permission target "${e.parentCapability}" has no specification.`);this.validatePermission(this.getPermissionSpecification(e.parentCapability),e,t)}targetExists(e){return(0,m.hasProperty)(this._permissionSpecifications,e)}grantPermissions({approvedPermissions:e,requestData:t,preserveExistingPermissions:n=!0,subject:i}){return l(this,r,"m",s).call(this,{approvedPermissions:e,subject:i,mergePermissions:!1,preserveExistingPermissions:n,requestData:t})}grantPermissionsIncremental({approvedPermissions:e,requestData:t,subject:n}){return l(this,r,"m",s).call(this,{approvedPermissions:e,subject:n,mergePermissions:!0,preserveExistingPermissions:!0,requestData:t})}validatePermission(e,t,n,{invokePermissionValidator:r,performCaveatValidation:i}={invokePermissionValidator:!0,performCaveatValidation:!0}){const{allowedCaveats:s,validator:o,targetName:a}=e;if(e.subjectTypes?.length&&e.subjectTypes.length>0){const t=this.messagingSystem.call("SubjectMetadataController:getSubjectMetadata",n);if(!t||null===t.subjectType||!e.subjectTypes.includes(t.subjectType))throw e.permissionType===w.PermissionType.RestrictedMethod?(0,x.methodNotFound)(a,{origin:n}):new x.EndowmentPermissionDoesNotExistError(a,n)}if((0,m.hasProperty)(t,"caveats")){const{caveats:e}=t;if(null!==e&&!(Array.isArray(e)&&e.length>0))throw new x.InvalidCaveatsPropertyError(n,a,e);const r=new Set;e?.forEach((e=>{if(i&&this.validateCaveat(e,n,a),!s?.includes(e.type))throw new x.ForbiddenCaveatError(e.type,n,a);if(r.has(e.type))throw new x.DuplicateCaveatError(e.type,n,a);r.add(e.type)}))}r&&o&&o(t,n,a)}setValidatedPermissions(e,t){this.update((n=>{n.subjects[e]||(n.subjects[e]={origin:e,permissions:{}}),n.subjects[e].permissions=(0,g.castDraft)(t)}))}constructCaveats(e,t,n){const r=n?.map((n=>{this.validateCaveat(n,e,t);const{type:r,value:i}=n;return{type:r,value:i}}));return r&&(0,f.isNonEmptyArray)(r)?r:void 0}validateCaveat(e,t,n){if(!(0,f.isPlainObject)(e))throw new x.InvalidCaveatError(e,t,n);if(2!==Object.keys(e).length)throw new x.InvalidCaveatFieldsError(e,t,n);if("string"!=typeof e.type)throw new x.InvalidCaveatTypeError(e,t,n);const r=this.getCaveatSpecification(e.type);if(!r)throw new x.UnrecognizedCaveatTypeError(e.type,t,n);if(!(0,m.hasProperty)(e,"value")||void 0===e.value)throw new x.CaveatMissingValueError(e,t,n);if(!(0,f.isValidJson)(e.value))throw new x.CaveatInvalidJsonError(e,t,n);r.validator?.(e,t,n)}async requestPermissions(e,t,n={}){const{origin:i}=e,{id:s=(0,b.nanoid)(),preserveExistingPermissions:o=!0}=n;this.validateRequestedPermissions(i,t);const a={...n.metadata,id:s,origin:i},c={metadata:a,permissions:t},d=await this.requestUserApproval(c);return await l(this,r,"m",u).call(this,{subject:e,metadata:a,preserveExistingPermissions:o,approvedRequest:d})}async requestPermissionsIncremental(e,t,n={}){const{origin:i}=e,{id:s=(0,b.nanoid)()}=n;this.validateRequestedPermissions(i,t);const a=this.getPermissions(i)??{},[c,d]=l(this,r,"m",o).call(this,a,t);if(void 0===c||void 0===d)return[];try{this.validateRequestedPermissions(i,c)}catch(e){if(e instanceof Error)throw new x.InvalidMergedPermissionsError(i,e,d);throw(0,x.internalError)("Unrecognized error type",{error:e})}const h={...n.metadata,id:s,origin:i},f={metadata:h,permissions:c,diff:{currentPermissions:a,permissionDiffMap:d}},p=await this.requestUserApproval(f);return await l(this,r,"m",u).call(this,{subject:e,metadata:h,preserveExistingPermissions:!1,approvedRequest:p})}validateRequestedPermissions(e,t){if(!(0,f.isPlainObject)(t))throw(0,x.invalidParams)({message:`Requested permissions for origin "${e}" is not a plain object.`,data:{origin:e,requestedPermissions:t}});if(0===Object.keys(t).length)throw(0,x.invalidParams)({message:`Permissions request for origin "${e}" contains no permissions.`,data:{requestedPermissions:t}});for(const n of Object.keys(t)){const r=t[n];if(!this.targetExists(n))throw(0,x.methodNotFound)(n,{origin:e,requestedPermissions:t});if(!(0,f.isPlainObject)(r)||void 0!==r.parentCapability&&n!==r.parentCapability)throw(0,x.invalidParams)({message:`Permissions request for origin "${e}" contains invalid requested permission(s).`,data:{origin:e,requestedPermissions:t}});this.validatePermission(this.getPermissionSpecification(n),r,e,{invokePermissionValidator:!1,performCaveatValidation:!0})}}async requestUserApproval(e){const{origin:t,id:n}=e.metadata,r=await this.messagingSystem.call("ApprovalController:addRequest",{id:n,origin:t,requestData:e,type:E.MethodNames.RequestPermissions},!0);return this.validateApprovedPermissions(r,{id:n,origin:t}),r}getSideEffects(e){return Object.keys(e).reduce(((e,t)=>{if(this.targetExists(t)){const n=this.getPermissionSpecification(t);n.sideEffect&&(e.permittedHandlers[t]=n.sideEffect.onPermitted,n.sideEffect.onFailure&&(e.failureHandlers[t]=n.sideEffect.onFailure))}return e}),{permittedHandlers:{},failureHandlers:{}})}async executeSideEffects(e,t){const{permittedHandlers:n,failureHandlers:r}=e,i={requestData:t,messagingSystem:this.messagingSystem},s=await Promise.allSettled(Object.values(n).map((e=>e(i)))),o=s.filter((e=>"rejected"===e.status));if(o.length>0){const e=Object.values(r);if(e.length>0)try{await Promise.all(e.map((e=>e(i))))}catch(e){throw(0,x.internalError)("Unexpected error in side-effects",{error:e})}const t=o.map((e=>e.reason));throw t.forEach((e=>{console.error(e)})),t.length>1?(0,x.internalError)("Multiple errors occurred during side-effects execution",{errors:t}):t[0]}return s.map((({value:e})=>e))}validateApprovedPermissions(e,t){const{id:n,origin:r}=t;if(!(0,f.isPlainObject)(e)||!(0,f.isPlainObject)(e.metadata))throw(0,x.internalError)(`Approved permissions request for subject "${r}" is invalid.`,{data:{approvedRequest:e}});const{metadata:{id:i,origin:s},permissions:o}=e;if(i!==n)throw(0,x.internalError)(`Approved permissions request for subject "${r}" mutated its id.`,{originalId:n,mutatedId:i});if(s!==r)throw(0,x.internalError)(`Approved permissions request for subject "${r}" mutated its origin.`,{originalOrigin:r,mutatedOrigin:s});try{this.validateRequestedPermissions(r,o)}catch(e){if(e instanceof Error)throw(0,x.internalError)(`Invalid approved permissions request: ${e.message}`,e instanceof p.JsonRpcError?e.data:void 0);throw(0,x.internalError)("Unrecognized error type",{error:e})}}async acceptPermissionsRequest(e){const{id:t}=e.metadata;if(!this.hasApprovalRequest({id:t}))throw new x.PermissionsRequestNotFoundError(t);if(0!==Object.keys(e.permissions).length)try{await this.messagingSystem.call("ApprovalController:acceptRequest",t,e)}catch(e){throw this._rejectPermissionsRequest(t,e),e}else this._rejectPermissionsRequest(t,(0,x.invalidParams)({message:"Must request at least one permission."}))}async rejectPermissionsRequest(e){if(!this.hasApprovalRequest({id:e}))throw new x.PermissionsRequestNotFoundError(e);this._rejectPermissionsRequest(e,(0,x.userRejectedRequest)())}hasApprovalRequest(e){return this.messagingSystem.call("ApprovalController:hasRequest",e)}_rejectPermissionsRequest(e,t){return this.messagingSystem.call("ApprovalController:rejectRequest",e,t)}async getEndowments(e,t,n){if(!this.hasPermission(e,t))throw(0,x.unauthorized)({data:{origin:e,targetName:t}});return this.getTypedPermissionSpecification(w.PermissionType.Endowment,t,e).endowmentGetter({origin:e,requestData:n})}async executeRestrictedMethod(e,t,n){const r=this.getRestrictedMethod(t,e),i=await this._executeRestrictedMethod(r,{origin:e},t,n);if(void 0===i)throw new Error(`Internal request for method "${t}" as origin "${e}" returned no result.`);return i}_executeRestrictedMethod(e,t,n,r=[]){const{origin:i}=t,s=this.getPermission(i,n);if(!s)throw(0,x.unauthorized)({data:{origin:i,method:n}});return(0,v.decorateWithCaveats)(e,s,this._caveatSpecifications)({method:n,params:r,context:{origin:i}})}}n.PermissionController=T,r=new WeakSet,i=function(e){const{merger:t}=this.getCaveatSpecification(e);if(void 0===t)throw new x.CaveatMergerDoesNotExistError(e);return t},s=function({approvedPermissions:e,subject:t,mergePermissions:n,preserveExistingPermissions:i,requestData:s}){const{origin:o}=t;if(!o||"string"!=typeof o)throw new x.InvalidSubjectIdentifierError(o);const c=i?{...this.getPermissions(o)}:{};for(const[t,i]of Object.entries(e)){if(!this.targetExists(t))throw(0,x.methodNotFound)(t);if(void 0!==i.parentCapability&&t!==i.parentCapability)throw new x.InvalidApprovedPermissionError(o,t,i);const e=t,u=this.getPermissionSpecification(e),d={caveats:this.constructCaveats(o,e,i.caveats),invoker:o,target:e};let h,f=!0;u.factory?h=u.factory(d,s):(h=(0,w.constructPermission)(d),f=!1),n&&(h=l(this,r,"m",a).call(this,c[e],h)[0]),this.validatePermission(u,h,o,{invokePermissionValidator:!0,performCaveatValidation:f}),c[e]=h}return this.setValidatedPermissions(o,c),c},o=function(e,t){const n={},i=(0,g.produce)(e,(e=>{const i=e;Object.entries(t).forEach((([e,t])=>{const s=i[e],[o,c]=l(this,r,"m",a).call(this,s??{},t);(void 0===s||Object.keys(c).length>0)&&(i[e]=o,n[e]=c)}))}));return 0===Object.keys(n).length?[]:[i,n]},a=function(e,t){const{caveatPairs:n,leftUniqueCaveats:i,rightUniqueCaveats:s}=(0,E.collectUniqueAndPairedCaveats)(e,t),[o,a]=n.reduce((([e,t],[n,i])=>{const[s,o]=l(this,r,"m",c).call(this,n,i);return void 0!==s&&void 0!==o?(e.push(s),t[s.type]=o):e.push(n),[e,t]}),[[],{}]),u=[...o,...i,...s.map((e=>{const[t,n]=l(this,r,"m",c).call(this,void 0,e);return a[t.type]=n,t}))];return[{...e,...t,...u.length>0?{caveats:u}:{}},a]},c=function(e,t){if(void 0!==e&&e.type!==t.type)throw new x.CaveatMergeTypeMismatchError(e.type,t.type);const n=l(this,r,"m",i).call(this,t.type);if(void 0===e)return[{...t},t.value];const[s,o]=n(e.value,t.value);return void 0!==s&&void 0!==o?[{type:t.type,value:s},o]:[]},u=async function({subject:e,metadata:t,preserveExistingPermissions:n,approvedRequest:r}){const{permissions:i,...s}=r,o={...t},a=this.getSideEffects(i);if(Object.values(a.permittedHandlers).length>0){const e=await this.executeSideEffects(a,r);o.data=Object.keys(a.permittedHandlers).reduce(((t,n,r)=>({[n]:e[r],...t})),{})}return[this.grantPermissions({subject:e,approvedPermissions:i,preserveExistingPermissions:n,requestData:s}),o]}},{"./Caveat.cjs":87,"./Permission.cjs":88,"./errors.cjs":91,"./permission-middleware.cjs":93,"./utils.cjs":98,"@metamask/base-controller":28,"@metamask/controller-utils":30,"@metamask/rpc-errors":130,"@metamask/utils":369,"deep-freeze-strict":464,immer:535,nanoid:548}],90:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SubjectMetadataController=n.SubjectType=void 0;const r=e("@metamask/base-controller");var i;!function(e){e.Extension="extension",e.Internal="internal",e.Unknown="unknown",e.Website="website",e.Snap="snap"}(i||(n.SubjectType=i={}));const s={subjectMetadata:{persist:!0,anonymous:!1}},o={subjectMetadata:{}};class a extends r.BaseController{constructor({messenger:e,subjectCacheLimit:t,state:n={}}){if(!Number.isInteger(t)||t<1)throw new Error(`subjectCacheLimit must be a positive integer. Received: "${t}"`);const r=t=>e.call("PermissionController:hasPermissions",t);super({name:"SubjectMetadataController",metadata:s,messenger:e,state:{...a.getTrimmedState(n,r)}}),this.subjectHasPermissions=r,this.subjectCacheLimit=t,this.subjectsWithoutPermissionsEncounteredSinceStartup=new Set,this.messagingSystem.registerActionHandler(`${this.name}:getSubjectMetadata`,this.getSubjectMetadata.bind(this)),this.messagingSystem.registerActionHandler(`${this.name}:addSubjectMetadata`,this.addSubjectMetadata.bind(this))}clearState(){this.subjectsWithoutPermissionsEncounteredSinceStartup.clear(),this.update((e=>({...o})))}addSubjectMetadata(e){const{origin:t}=e,n={...e,extensionId:e.extensionId||null,iconUrl:e.iconUrl||null,name:e.name||null,subjectType:e.subjectType||null};let r=null;if(this.subjectsWithoutPermissionsEncounteredSinceStartup.size>=this.subjectCacheLimit){const e=this.subjectsWithoutPermissionsEncounteredSinceStartup.values().next().value;this.subjectsWithoutPermissionsEncounteredSinceStartup.delete(e),this.subjectHasPermissions(e)||(r=e)}this.subjectsWithoutPermissionsEncounteredSinceStartup.add(t),this.update((e=>{e.subjectMetadata[t]=n,"string"==typeof r&&delete e.subjectMetadata[r]}))}getSubjectMetadata(e){return this.state.subjectMetadata[e]}trimMetadataState(){this.update((e=>a.getTrimmedState(e,this.subjectHasPermissions)))}static getTrimmedState(e,t){const{subjectMetadata:n={}}=e;return{subjectMetadata:Object.keys(n).reduce(((e,r)=>(t(r)&&(e[r]=n[r]),e)),{})}}}n.SubjectMetadataController=a},{"@metamask/base-controller":28}],91:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PermissionsRequestNotFoundError=n.CaveatSpecificationMismatchError=n.CaveatMergeTypeMismatchError=n.DuplicateCaveatError=n.ForbiddenCaveatError=n.InvalidCaveatFieldsError=n.CaveatInvalidJsonError=n.CaveatMissingValueError=n.InvalidCaveatTypeError=n.InvalidCaveatError=n.CaveatAlreadyExistsError=n.CaveatDoesNotExistError=n.InvalidCaveatsPropertyError=n.UnrecognizedCaveatTypeError=n.EndowmentPermissionDoesNotExistError=n.PermissionDoesNotExistError=n.InvalidApprovedPermissionError=n.InvalidMergedPermissionsError=n.CaveatMergerDoesNotExistError=n.UnrecognizedSubjectError=n.InvalidSubjectIdentifierError=n.internalError=n.userRejectedRequest=n.invalidParams=n.methodNotFound=n.unauthorized=void 0;const r=e("@metamask/rpc-errors");n.unauthorized=function(e){return r.providerErrors.unauthorized({message:"Unauthorized to perform action. Try requesting the required permission(s) first. For more information, see: https://docs.metamask.io/guide/rpc-api.html#permissions",data:e.data})},n.methodNotFound=function(e,t){const n={message:`The method "${e}" does not exist / is not available.`};return void 0!==t&&(n.data=t),r.rpcErrors.methodNotFound(n)},n.invalidParams=function(e){return r.rpcErrors.invalidParams({data:e.data,message:e.message})},n.userRejectedRequest=function(e){return r.providerErrors.userRejectedRequest({data:e})},n.internalError=function(e,t){return r.rpcErrors.internal({message:e,data:t})};class i extends Error{constructor(e){super(`Invalid subject identifier: "${"string"==typeof e?e:typeof e}"`)}}n.InvalidSubjectIdentifierError=i;class s extends Error{constructor(e){super(`Unrecognized subject: "${e}" has no permissions.`)}}n.UnrecognizedSubjectError=s;class o extends Error{constructor(e){super(`Caveat value merger does not exist for type: "${e}"`)}}n.CaveatMergerDoesNotExistError=o;class a extends Error{constructor(e,t,n){super(`Invalid merged permissions for subject "${e}":\n${t.message}`),this.cause=t,this.data={diff:n}}}n.InvalidMergedPermissionsError=a;class c extends Error{constructor(e,t,n){super(`Invalid approved permission for origin "${e}" and target "${t}".`),this.data={origin:e,target:t,approvedPermission:n}}}n.InvalidApprovedPermissionError=c;class u extends Error{constructor(e,t){super(`Subject "${e}" has no permission for "${t}".`)}}n.PermissionDoesNotExistError=u;class l extends Error{constructor(e,t){super(`${t?`Subject "${t}"`:"Unknown subject"} has no permission for "${e}".`),t&&(this.data={origin:t})}}n.EndowmentPermissionDoesNotExistError=l;class d extends Error{constructor(e,t,n){super(`Unrecognized caveat type: "${e}"`),this.data={caveatType:e},void 0!==t&&(this.data.origin=t),void 0!==n&&(this.data.target=n)}}n.UnrecognizedCaveatTypeError=d;class h extends Error{constructor(e,t,n){super(`The "caveats" property of permission for "${t}" of subject "${e}" is invalid. It must be a non-empty array if specified.`),this.data={origin:e,target:t,caveatsProperty:n}}}n.InvalidCaveatsPropertyError=h;class f extends Error{constructor(e,t,n){super(`Permission for "${t}" of subject "${e}" has no caveat of type "${n}".`)}}n.CaveatDoesNotExistError=f;class p extends Error{constructor(e,t,n){super(`Permission for "${t}" of subject "${e}" already has a caveat of type "${n}".`)}}n.CaveatAlreadyExistsError=p;class m extends r.JsonRpcError{constructor(e,t,n){super(r.errorCodes.rpc.invalidParams,"Invalid caveat. Caveats must be plain objects.",{receivedCaveat:e}),this.data={origin:t,target:n}}}n.InvalidCaveatError=m;class y extends Error{constructor(e,t,n){super(`Caveat types must be strings. Received: "${typeof e.type}"`),this.data={caveat:e,origin:t,target:n}}}n.InvalidCaveatTypeError=y;class g extends Error{constructor(e,t,n){super('Caveat is missing "value" field.'),this.data={caveat:e,origin:t,target:n}}}n.CaveatMissingValueError=g;class b extends Error{constructor(e,t,n){super('Caveat "value" is invalid JSON.'),this.data={caveat:e,origin:t,target:n}}}n.CaveatInvalidJsonError=b;class v extends Error{constructor(e,t,n){super(`Caveat has unexpected number of fields: "${Object.keys(e).length}"`),this.data={caveat:e,origin:t,target:n}}}n.InvalidCaveatFieldsError=v;class x extends Error{constructor(e,t,n){super(`Permissions for target "${n}" may not have caveats of type "${e}".`),this.data={caveatType:e,origin:t,target:n}}}n.ForbiddenCaveatError=x;class w extends Error{constructor(e,t,n){super(`Permissions for target "${n}" contains multiple caveats of type "${e}".`),this.data={caveatType:e,origin:t,target:n}}}n.DuplicateCaveatError=w;class S extends Error{constructor(e,t){super(`Cannot merge caveats of different types: "${e}" and "${t}".`),this.data={leftCaveatType:e,rightCaveatType:t}}}n.CaveatMergeTypeMismatchError=S;class E extends Error{constructor(e,t){super(`Caveat specification uses a mismatched type. Expected caveats for ${t}`),this.data={caveatSpec:e,permissionType:t}}}n.CaveatSpecificationMismatchError=E;class _ extends Error{constructor(e){super(`Permissions request with id "${e}" not found.`)}}n.PermissionsRequestNotFoundError=_},{"@metamask/rpc-errors":130}],92:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.permissionRpcMethods=n.MethodNames=void 0,s(e("./Caveat.cjs"),n),s(e("./errors.cjs"),n),s(e("./Permission.cjs"),n),s(e("./PermissionController.cjs"),n);var a=e("./utils.cjs");Object.defineProperty(n,"MethodNames",{enumerable:!0,get:function(){return a.MethodNames}}),n.permissionRpcMethods=o(e("./rpc-methods/index.cjs")),s(e("./SubjectMetadataController.cjs"),n)},{"./Caveat.cjs":87,"./Permission.cjs":88,"./PermissionController.cjs":89,"./SubjectMetadataController.cjs":90,"./errors.cjs":91,"./rpc-methods/index.cjs":95,"./utils.cjs":98}],93:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getPermissionMiddlewareFactory=void 0;const r=e("@metamask/json-rpc-engine"),i=e("./errors.cjs");n.getPermissionMiddlewareFactory=function({executeRestrictedMethod:e,getRestrictedMethod:t,isUnrestrictedMethod:n}){return function(s){const{origin:o}=s;if("string"!=typeof o||!o)throw new Error('The subject "origin" must be a non-empty string.');return(0,r.createAsyncMiddleware)((async(r,a,c)=>{const{method:u,params:l}=r;if(n(u))return c();const d=t(u,o),h=await e(d,s,u,l);void 0!==h?a.result=h:a.error=(0,i.internalError)(`Request for method "${r.method}" returned undefined result.`,{request:r})}))}}},{"./errors.cjs":91,"@metamask/json-rpc-engine":41}],94:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getPermissionsHandler=void 0;const r=e("../utils.cjs");n.getPermissionsHandler={methodNames:[r.MethodNames.GetPermissions],implementation:async function(e,t,n,r,{getPermissionsForOrigin:i}){return t.result=Object.values(i()||{}),r()},hookNames:{getPermissionsForOrigin:!0}}},{"../utils.cjs":98}],95:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.handlers=void 0;const r=e("./getPermissions.cjs"),i=e("./requestPermissions.cjs"),s=e("./revokePermissions.cjs");n.handlers=[i.requestPermissionsHandler,r.getPermissionsHandler,s.revokePermissionsHandler]},{"./getPermissions.cjs":94,"./requestPermissions.cjs":96,"./revokePermissions.cjs":97}],96:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.requestPermissionsHandler=void 0;const r=e("@metamask/controller-utils"),i=e("../errors.cjs"),s=e("../utils.cjs");n.requestPermissionsHandler={methodNames:[s.MethodNames.RequestPermissions],implementation:async function(e,t,n,s,{requestPermissionsForOrigin:o}){const{params:a}=e;if(!Array.isArray(a)||!(0,r.isPlainObject)(a[0]))return s((0,i.invalidParams)({data:{request:e}}));const[c]=a,[u]=await o(c);return t.result=Object.values(u),s()},hookNames:{requestPermissionsForOrigin:!0}}},{"../errors.cjs":91,"../utils.cjs":98,"@metamask/controller-utils":30}],97:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.revokePermissionsHandler=void 0;const r=e("@metamask/utils"),i=e("../errors.cjs"),s=e("../utils.cjs");n.revokePermissionsHandler={methodNames:[s.MethodNames.RevokePermissions],implementation:async function(e,t,n,s,{revokePermissionsForOrigin:o}){const{params:a}=e,c=a?.[0];if(!c)return s((0,i.invalidParams)({data:{request:e}}));const u=Object.keys(c);if(!(0,r.isNonEmptyArray)(u))return s((0,i.invalidParams)({data:{request:e}}));return o(u),t.result=null,s()},hookNames:{revokePermissionsForOrigin:!0}}},{"../errors.cjs":91,"../utils.cjs":98,"@metamask/utils":369}],98:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.collectUniqueAndPairedCaveats=n.MethodNames=void 0,function(e){e.RequestPermissions="wallet_requestPermissions",e.GetPermissions="wallet_getPermissions",e.RevokePermissions="wallet_revokePermissions"}(r||(n.MethodNames=r={})),n.collectUniqueAndPairedCaveats=function(e,t){const n=e?.caveats?.slice()??[],r=t.caveats?.slice()??[],i=[],s=[];return n.forEach((e=>{const t=r.findIndex((t=>t.type===e.type));-1===t?i.push(e):(s.push([e,r[t]]),r.splice(t,1))})),{caveatPairs:s,leftUniqueCaveats:i,rightUniqueCaveats:[...r]}}},{}],99:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BasePostMessageStream=void 0;const r=e("readable-stream"),i=()=>{},s="SYN",o="ACK";class a extends r.Duplex{constructor(e){super(Object.assign({objectMode:!0},e)),this._init=!1,this._haveSyn=!1,this._log=()=>null}_handshake(){this._write(s,null,i),this.cork()}_onData(e){if(this._init)try{this.push(e),this._log(e,!1)}catch(e){this.emit("error",e)}else e===s?(this._haveSyn=!0,this._write(o,null,i)):e===o&&(this._init=!0,this._haveSyn||this._write(o,null,i),this.uncork())}_read(){}_write(e,t,n){e!==o&&e!==s&&this._log(e,!0),this._postMessage(e),n()}_setLogger(e){this._log=e}}n.BasePostMessageStream=a},{"readable-stream":588}],100:[function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function l(e){return e instanceof Uint8Array}function d(e){(0,i.assert)(l(e),"Value must be a Uint8Array.")}function h(e){if(d(e),0===e.length)return"0x";const t=u(),n=new Array(e.length);for(let r=0;r=BigInt(0),"Value must be a non-negative bigint.");return p(e.toString(16))}function y(e){(0,i.assert)("number"==typeof e,"Value must be a number."),(0,i.assert)(e>=0,"Value must be a non-negative number."),(0,i.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return p(e.toString(16))}function g(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return m(e);if("number"==typeof e)return y(e);if("string"==typeof e)return e.startsWith("0x")?p(e):g(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}n.isBytes=l,n.assertIsBytes=d,n.bytesToHex=h,n.bytesToBigInt=f,n.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const n of e)t=(t<0,"Byte length must be greater than 0."),(0,i.assert)(function(e,t){(0,i.assert)(t>0);const n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let n=e;const r=new Uint8Array(t);for(let e=0;e>=BigInt(8);return r.reverse()},n.numberToBytes=y,n.stringToBytes=g,n.base64ToBytes=function(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),r.base64.decode(e)},n.valueToBytes=b,n.concatBytes=function(e){const t=new Array(e.length);let n=0;for(let r=0;r=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}},{"./utils.cjs":131,"@metamask/utils":369,"fast-safe-stringify":506}],128:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.errorValues=n.errorCodes=void 0,n.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},n.errorValues={"-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."}}},{}],129:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.providerErrors=n.rpcErrors=void 0;const r=e("./classes.cjs"),i=e("./error-constants.cjs"),s=e("./utils.cjs");function o(e,t){const[n,i]=c(t);return new r.JsonRpcError(e,n??(0,s.getMessageFromCode)(e),i)}function a(e,t){const[n,i]=c(t);return new r.EthereumProviderError(e,n??(0,s.getMessageFromCode)(e),i)}function c(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,n]}}return[]}n.rpcErrors={parse:e=>o(i.errorCodes.rpc.parse,e),invalidRequest:e=>o(i.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(i.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(i.errorCodes.rpc.methodNotFound,e),internal:e=>o(i.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(t,e)},invalidInput:e=>o(i.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(i.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(i.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(i.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(i.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(i.errorCodes.rpc.limitExceeded,e)},n.providerErrors={userRejectedRequest:e=>a(i.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(i.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(i.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(i.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(i.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:i}=e;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(t,n,i)}}},{"./classes.cjs":127,"./error-constants.cjs":128,"./utils.cjs":131}],130:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.errorCodes=n.providerErrors=n.rpcErrors=n.getMessageFromCode=n.serializeError=n.serializeCause=n.dataHasCause=n.EthereumProviderError=n.JsonRpcError=void 0;var r=e("./classes.cjs");Object.defineProperty(n,"JsonRpcError",{enumerable:!0,get:function(){return r.JsonRpcError}}),Object.defineProperty(n,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});var i=e("./utils.cjs");Object.defineProperty(n,"dataHasCause",{enumerable:!0,get:function(){return i.dataHasCause}}),Object.defineProperty(n,"serializeCause",{enumerable:!0,get:function(){return i.serializeCause}}),Object.defineProperty(n,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(n,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});var s=e("./errors.cjs");Object.defineProperty(n,"rpcErrors",{enumerable:!0,get:function(){return s.rpcErrors}}),Object.defineProperty(n,"providerErrors",{enumerable:!0,get:function(){return s.providerErrors}});var o=e("./error-constants.cjs");Object.defineProperty(n,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},{"./classes.cjs":127,"./error-constants.cjs":128,"./errors.cjs":129,"./utils.cjs":131}],131:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dataHasCause=n.serializeCause=n.serializeError=n.isValidCode=n.getMessageFromCode=n.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=e("@metamask/utils"),i=e("./error-constants.cjs"),s=i.errorCodes.rpc.internal,o={code:s,message:a(s)};function a(e,t="Unspecified error message. This is a bug, please report it."){if(c(e)){const t=e.toString();if((0,r.hasProperty)(i.errorValues,t))return i.errorValues[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return n.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function c(e){return Number.isInteger(e)}function u(e){return Array.isArray(e)?e.map((e=>(0,r.isValidJson)(e)?e:(0,r.isObject)(e)?l(e):null)):(0,r.isObject)(e)?l(e):(0,r.isValidJson)(e)?e:null}function l(e){return Object.getOwnPropertyNames(e).reduce(((t,n)=>{const i=e[n];return(0,r.isValidJson)(i)&&(t[n]=i),t}),{})}n.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",n.getMessageFromCode=a,n.isValidCode=c,n.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:n=!0,shouldPreserveMessage:i=!0}={}){if(!(0,r.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const s=function(e,t,n){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if((0,r.isJsonRpcError)(e))return e;const i=function(e){if((0,r.isObject)(e)&&(0,r.hasProperty)(e,"message")&&"string"==typeof e.message&&e.message.length>0)return e.message;return}(e),s=u(e),o={...t,...n&&i&&{message:i},data:{cause:s}};return o}(e,t,i);return n||delete s.stack,s},n.serializeCause=u,n.dataHasCause=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"cause")&&(0,r.isObject)(e.cause)}},{"./error-constants.cjs":128,"@metamask/utils":369}],132:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("events");function i(e,t,n){try{Reflect.apply(e,t,n)}catch(e){setTimeout((()=>{throw e}))}}class s extends r.EventEmitter{emit(e,...t){let n="error"===e;const r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const n=new Error("Unhandled error."+(e?` (${e.message})`:""));throw n.context=e,n}const s=r[e];if(void 0===s)return!1;if("function"==typeof s)i(s,this,t);else{const e=s.length,n=function(e){const t=e.length,n=new Array(t);for(let r=0;r256)throw new TypeError("Invalid entropy");return m((0,a.randomBytes)(t/8),e)};const h=e=>{const t=8-e.length/4;return new Uint8Array([(0,s.sha256)(e)[0]>>t<{if("string"!=typeof e)throw new Error(`Wordlist: non-string element: ${e}`)})),c.utils.chain(c.utils.checksum(1,h),c.utils.radix2(11,!0),c.utils.alphabet(e))}function p(e,t){let n;if("string"==typeof e){const{words:r}=l(e);n=f(t).decode(r)}else n=f(t).decode(Array.from(new Uint16Array(e.buffer)).map((e=>t[e])));return d(n),n}function m(e,t){d(e);const n=f(t).encode(e).map((e=>t.indexOf(e)));return new Uint8Array(new Uint16Array(n).buffer)}n.mnemonicToEntropy=p,n.entropyToMnemonic=m,n.validateMnemonic=function(e,t){try{p(e,t)}catch(e){return!1}return!0};const y=e=>u(`mnemonic${e}`);function g(e,t){let n;return n="string"==typeof e?(new TextEncoder).encode(l(e).nfkd):(new TextEncoder).encode(Array.from(new Uint16Array(e.buffer)).map((e=>t[e])).join(" ")),n}n.mnemonicToSeed=function(e,t,n=""){const r=g(e,t);return(0,i.pbkdf2Async)(o.sha512,r,y(n),{c:2048,dkLen:64})},n.mnemonicToSeedSync=function(e,t,n=""){const r=g(e,t);return(0,i.pbkdf2)(o.sha512,r,y(n),{c:2048,dkLen:64})}},{"@noble/hashes/_assert":135,"@noble/hashes/pbkdf2":140,"@noble/hashes/sha256":141,"@noble/hashes/sha512":142,"@noble/hashes/utils":143,"@scure/base":401}],134:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.wordlist=void 0,n.wordlist="abandon\nability\nable\nabout\nabove\nabsent\nabsorb\nabstract\nabsurd\nabuse\naccess\naccident\naccount\naccuse\nachieve\nacid\nacoustic\nacquire\nacross\nact\naction\nactor\nactress\nactual\nadapt\nadd\naddict\naddress\nadjust\nadmit\nadult\nadvance\nadvice\naerobic\naffair\nafford\nafraid\nagain\nage\nagent\nagree\nahead\naim\nair\nairport\naisle\nalarm\nalbum\nalcohol\nalert\nalien\nall\nalley\nallow\nalmost\nalone\nalpha\nalready\nalso\nalter\nalways\namateur\namazing\namong\namount\namused\nanalyst\nanchor\nancient\nanger\nangle\nangry\nanimal\nankle\nannounce\nannual\nanother\nanswer\nantenna\nantique\nanxiety\nany\napart\napology\nappear\napple\napprove\napril\narch\narctic\narea\narena\nargue\narm\narmed\narmor\narmy\naround\narrange\narrest\narrive\narrow\nart\nartefact\nartist\nartwork\nask\naspect\nassault\nasset\nassist\nassume\nasthma\nathlete\natom\nattack\nattend\nattitude\nattract\nauction\naudit\naugust\naunt\nauthor\nauto\nautumn\naverage\navocado\navoid\nawake\naware\naway\nawesome\nawful\nawkward\naxis\nbaby\nbachelor\nbacon\nbadge\nbag\nbalance\nbalcony\nball\nbamboo\nbanana\nbanner\nbar\nbarely\nbargain\nbarrel\nbase\nbasic\nbasket\nbattle\nbeach\nbean\nbeauty\nbecause\nbecome\nbeef\nbefore\nbegin\nbehave\nbehind\nbelieve\nbelow\nbelt\nbench\nbenefit\nbest\nbetray\nbetter\nbetween\nbeyond\nbicycle\nbid\nbike\nbind\nbiology\nbird\nbirth\nbitter\nblack\nblade\nblame\nblanket\nblast\nbleak\nbless\nblind\nblood\nblossom\nblouse\nblue\nblur\nblush\nboard\nboat\nbody\nboil\nbomb\nbone\nbonus\nbook\nboost\nborder\nboring\nborrow\nboss\nbottom\nbounce\nbox\nboy\nbracket\nbrain\nbrand\nbrass\nbrave\nbread\nbreeze\nbrick\nbridge\nbrief\nbright\nbring\nbrisk\nbroccoli\nbroken\nbronze\nbroom\nbrother\nbrown\nbrush\nbubble\nbuddy\nbudget\nbuffalo\nbuild\nbulb\nbulk\nbullet\nbundle\nbunker\nburden\nburger\nburst\nbus\nbusiness\nbusy\nbutter\nbuyer\nbuzz\ncabbage\ncabin\ncable\ncactus\ncage\ncake\ncall\ncalm\ncamera\ncamp\ncan\ncanal\ncancel\ncandy\ncannon\ncanoe\ncanvas\ncanyon\ncapable\ncapital\ncaptain\ncar\ncarbon\ncard\ncargo\ncarpet\ncarry\ncart\ncase\ncash\ncasino\ncastle\ncasual\ncat\ncatalog\ncatch\ncategory\ncattle\ncaught\ncause\ncaution\ncave\nceiling\ncelery\ncement\ncensus\ncentury\ncereal\ncertain\nchair\nchalk\nchampion\nchange\nchaos\nchapter\ncharge\nchase\nchat\ncheap\ncheck\ncheese\nchef\ncherry\nchest\nchicken\nchief\nchild\nchimney\nchoice\nchoose\nchronic\nchuckle\nchunk\nchurn\ncigar\ncinnamon\ncircle\ncitizen\ncity\ncivil\nclaim\nclap\nclarify\nclaw\nclay\nclean\nclerk\nclever\nclick\nclient\ncliff\nclimb\nclinic\nclip\nclock\nclog\nclose\ncloth\ncloud\nclown\nclub\nclump\ncluster\nclutch\ncoach\ncoast\ncoconut\ncode\ncoffee\ncoil\ncoin\ncollect\ncolor\ncolumn\ncombine\ncome\ncomfort\ncomic\ncommon\ncompany\nconcert\nconduct\nconfirm\ncongress\nconnect\nconsider\ncontrol\nconvince\ncook\ncool\ncopper\ncopy\ncoral\ncore\ncorn\ncorrect\ncost\ncotton\ncouch\ncountry\ncouple\ncourse\ncousin\ncover\ncoyote\ncrack\ncradle\ncraft\ncram\ncrane\ncrash\ncrater\ncrawl\ncrazy\ncream\ncredit\ncreek\ncrew\ncricket\ncrime\ncrisp\ncritic\ncrop\ncross\ncrouch\ncrowd\ncrucial\ncruel\ncruise\ncrumble\ncrunch\ncrush\ncry\ncrystal\ncube\nculture\ncup\ncupboard\ncurious\ncurrent\ncurtain\ncurve\ncushion\ncustom\ncute\ncycle\ndad\ndamage\ndamp\ndance\ndanger\ndaring\ndash\ndaughter\ndawn\nday\ndeal\ndebate\ndebris\ndecade\ndecember\ndecide\ndecline\ndecorate\ndecrease\ndeer\ndefense\ndefine\ndefy\ndegree\ndelay\ndeliver\ndemand\ndemise\ndenial\ndentist\ndeny\ndepart\ndepend\ndeposit\ndepth\ndeputy\nderive\ndescribe\ndesert\ndesign\ndesk\ndespair\ndestroy\ndetail\ndetect\ndevelop\ndevice\ndevote\ndiagram\ndial\ndiamond\ndiary\ndice\ndiesel\ndiet\ndiffer\ndigital\ndignity\ndilemma\ndinner\ndinosaur\ndirect\ndirt\ndisagree\ndiscover\ndisease\ndish\ndismiss\ndisorder\ndisplay\ndistance\ndivert\ndivide\ndivorce\ndizzy\ndoctor\ndocument\ndog\ndoll\ndolphin\ndomain\ndonate\ndonkey\ndonor\ndoor\ndose\ndouble\ndove\ndraft\ndragon\ndrama\ndrastic\ndraw\ndream\ndress\ndrift\ndrill\ndrink\ndrip\ndrive\ndrop\ndrum\ndry\nduck\ndumb\ndune\nduring\ndust\ndutch\nduty\ndwarf\ndynamic\neager\neagle\nearly\nearn\nearth\neasily\neast\neasy\necho\necology\neconomy\nedge\nedit\neducate\neffort\negg\neight\neither\nelbow\nelder\nelectric\nelegant\nelement\nelephant\nelevator\nelite\nelse\nembark\nembody\nembrace\nemerge\nemotion\nemploy\nempower\nempty\nenable\nenact\nend\nendless\nendorse\nenemy\nenergy\nenforce\nengage\nengine\nenhance\nenjoy\nenlist\nenough\nenrich\nenroll\nensure\nenter\nentire\nentry\nenvelope\nepisode\nequal\nequip\nera\nerase\nerode\nerosion\nerror\nerupt\nescape\nessay\nessence\nestate\neternal\nethics\nevidence\nevil\nevoke\nevolve\nexact\nexample\nexcess\nexchange\nexcite\nexclude\nexcuse\nexecute\nexercise\nexhaust\nexhibit\nexile\nexist\nexit\nexotic\nexpand\nexpect\nexpire\nexplain\nexpose\nexpress\nextend\nextra\neye\neyebrow\nfabric\nface\nfaculty\nfade\nfaint\nfaith\nfall\nfalse\nfame\nfamily\nfamous\nfan\nfancy\nfantasy\nfarm\nfashion\nfat\nfatal\nfather\nfatigue\nfault\nfavorite\nfeature\nfebruary\nfederal\nfee\nfeed\nfeel\nfemale\nfence\nfestival\nfetch\nfever\nfew\nfiber\nfiction\nfield\nfigure\nfile\nfilm\nfilter\nfinal\nfind\nfine\nfinger\nfinish\nfire\nfirm\nfirst\nfiscal\nfish\nfit\nfitness\nfix\nflag\nflame\nflash\nflat\nflavor\nflee\nflight\nflip\nfloat\nflock\nfloor\nflower\nfluid\nflush\nfly\nfoam\nfocus\nfog\nfoil\nfold\nfollow\nfood\nfoot\nforce\nforest\nforget\nfork\nfortune\nforum\nforward\nfossil\nfoster\nfound\nfox\nfragile\nframe\nfrequent\nfresh\nfriend\nfringe\nfrog\nfront\nfrost\nfrown\nfrozen\nfruit\nfuel\nfun\nfunny\nfurnace\nfury\nfuture\ngadget\ngain\ngalaxy\ngallery\ngame\ngap\ngarage\ngarbage\ngarden\ngarlic\ngarment\ngas\ngasp\ngate\ngather\ngauge\ngaze\ngeneral\ngenius\ngenre\ngentle\ngenuine\ngesture\nghost\ngiant\ngift\ngiggle\nginger\ngiraffe\ngirl\ngive\nglad\nglance\nglare\nglass\nglide\nglimpse\nglobe\ngloom\nglory\nglove\nglow\nglue\ngoat\ngoddess\ngold\ngood\ngoose\ngorilla\ngospel\ngossip\ngovern\ngown\ngrab\ngrace\ngrain\ngrant\ngrape\ngrass\ngravity\ngreat\ngreen\ngrid\ngrief\ngrit\ngrocery\ngroup\ngrow\ngrunt\nguard\nguess\nguide\nguilt\nguitar\ngun\ngym\nhabit\nhair\nhalf\nhammer\nhamster\nhand\nhappy\nharbor\nhard\nharsh\nharvest\nhat\nhave\nhawk\nhazard\nhead\nhealth\nheart\nheavy\nhedgehog\nheight\nhello\nhelmet\nhelp\nhen\nhero\nhidden\nhigh\nhill\nhint\nhip\nhire\nhistory\nhobby\nhockey\nhold\nhole\nholiday\nhollow\nhome\nhoney\nhood\nhope\nhorn\nhorror\nhorse\nhospital\nhost\nhotel\nhour\nhover\nhub\nhuge\nhuman\nhumble\nhumor\nhundred\nhungry\nhunt\nhurdle\nhurry\nhurt\nhusband\nhybrid\nice\nicon\nidea\nidentify\nidle\nignore\nill\nillegal\nillness\nimage\nimitate\nimmense\nimmune\nimpact\nimpose\nimprove\nimpulse\ninch\ninclude\nincome\nincrease\nindex\nindicate\nindoor\nindustry\ninfant\ninflict\ninform\ninhale\ninherit\ninitial\ninject\ninjury\ninmate\ninner\ninnocent\ninput\ninquiry\ninsane\ninsect\ninside\ninspire\ninstall\nintact\ninterest\ninto\ninvest\ninvite\ninvolve\niron\nisland\nisolate\nissue\nitem\nivory\njacket\njaguar\njar\njazz\njealous\njeans\njelly\njewel\njob\njoin\njoke\njourney\njoy\njudge\njuice\njump\njungle\njunior\njunk\njust\nkangaroo\nkeen\nkeep\nketchup\nkey\nkick\nkid\nkidney\nkind\nkingdom\nkiss\nkit\nkitchen\nkite\nkitten\nkiwi\nknee\nknife\nknock\nknow\nlab\nlabel\nlabor\nladder\nlady\nlake\nlamp\nlanguage\nlaptop\nlarge\nlater\nlatin\nlaugh\nlaundry\nlava\nlaw\nlawn\nlawsuit\nlayer\nlazy\nleader\nleaf\nlearn\nleave\nlecture\nleft\nleg\nlegal\nlegend\nleisure\nlemon\nlend\nlength\nlens\nleopard\nlesson\nletter\nlevel\nliar\nliberty\nlibrary\nlicense\nlife\nlift\nlight\nlike\nlimb\nlimit\nlink\nlion\nliquid\nlist\nlittle\nlive\nlizard\nload\nloan\nlobster\nlocal\nlock\nlogic\nlonely\nlong\nloop\nlottery\nloud\nlounge\nlove\nloyal\nlucky\nluggage\nlumber\nlunar\nlunch\nluxury\nlyrics\nmachine\nmad\nmagic\nmagnet\nmaid\nmail\nmain\nmajor\nmake\nmammal\nman\nmanage\nmandate\nmango\nmansion\nmanual\nmaple\nmarble\nmarch\nmargin\nmarine\nmarket\nmarriage\nmask\nmass\nmaster\nmatch\nmaterial\nmath\nmatrix\nmatter\nmaximum\nmaze\nmeadow\nmean\nmeasure\nmeat\nmechanic\nmedal\nmedia\nmelody\nmelt\nmember\nmemory\nmention\nmenu\nmercy\nmerge\nmerit\nmerry\nmesh\nmessage\nmetal\nmethod\nmiddle\nmidnight\nmilk\nmillion\nmimic\nmind\nminimum\nminor\nminute\nmiracle\nmirror\nmisery\nmiss\nmistake\nmix\nmixed\nmixture\nmobile\nmodel\nmodify\nmom\nmoment\nmonitor\nmonkey\nmonster\nmonth\nmoon\nmoral\nmore\nmorning\nmosquito\nmother\nmotion\nmotor\nmountain\nmouse\nmove\nmovie\nmuch\nmuffin\nmule\nmultiply\nmuscle\nmuseum\nmushroom\nmusic\nmust\nmutual\nmyself\nmystery\nmyth\nnaive\nname\nnapkin\nnarrow\nnasty\nnation\nnature\nnear\nneck\nneed\nnegative\nneglect\nneither\nnephew\nnerve\nnest\nnet\nnetwork\nneutral\nnever\nnews\nnext\nnice\nnight\nnoble\nnoise\nnominee\nnoodle\nnormal\nnorth\nnose\nnotable\nnote\nnothing\nnotice\nnovel\nnow\nnuclear\nnumber\nnurse\nnut\noak\nobey\nobject\noblige\nobscure\nobserve\nobtain\nobvious\noccur\nocean\noctober\nodor\noff\noffer\noffice\noften\noil\nokay\nold\nolive\nolympic\nomit\nonce\none\nonion\nonline\nonly\nopen\nopera\nopinion\noppose\noption\norange\norbit\norchard\norder\nordinary\norgan\norient\noriginal\norphan\nostrich\nother\noutdoor\nouter\noutput\noutside\noval\noven\nover\nown\nowner\noxygen\noyster\nozone\npact\npaddle\npage\npair\npalace\npalm\npanda\npanel\npanic\npanther\npaper\nparade\nparent\npark\nparrot\nparty\npass\npatch\npath\npatient\npatrol\npattern\npause\npave\npayment\npeace\npeanut\npear\npeasant\npelican\npen\npenalty\npencil\npeople\npepper\nperfect\npermit\nperson\npet\nphone\nphoto\nphrase\nphysical\npiano\npicnic\npicture\npiece\npig\npigeon\npill\npilot\npink\npioneer\npipe\npistol\npitch\npizza\nplace\nplanet\nplastic\nplate\nplay\nplease\npledge\npluck\nplug\nplunge\npoem\npoet\npoint\npolar\npole\npolice\npond\npony\npool\npopular\nportion\nposition\npossible\npost\npotato\npottery\npoverty\npowder\npower\npractice\npraise\npredict\nprefer\nprepare\npresent\npretty\nprevent\nprice\npride\nprimary\nprint\npriority\nprison\nprivate\nprize\nproblem\nprocess\nproduce\nprofit\nprogram\nproject\npromote\nproof\nproperty\nprosper\nprotect\nproud\nprovide\npublic\npudding\npull\npulp\npulse\npumpkin\npunch\npupil\npuppy\npurchase\npurity\npurpose\npurse\npush\nput\npuzzle\npyramid\nquality\nquantum\nquarter\nquestion\nquick\nquit\nquiz\nquote\nrabbit\nraccoon\nrace\nrack\nradar\nradio\nrail\nrain\nraise\nrally\nramp\nranch\nrandom\nrange\nrapid\nrare\nrate\nrather\nraven\nraw\nrazor\nready\nreal\nreason\nrebel\nrebuild\nrecall\nreceive\nrecipe\nrecord\nrecycle\nreduce\nreflect\nreform\nrefuse\nregion\nregret\nregular\nreject\nrelax\nrelease\nrelief\nrely\nremain\nremember\nremind\nremove\nrender\nrenew\nrent\nreopen\nrepair\nrepeat\nreplace\nreport\nrequire\nrescue\nresemble\nresist\nresource\nresponse\nresult\nretire\nretreat\nreturn\nreunion\nreveal\nreview\nreward\nrhythm\nrib\nribbon\nrice\nrich\nride\nridge\nrifle\nright\nrigid\nring\nriot\nripple\nrisk\nritual\nrival\nriver\nroad\nroast\nrobot\nrobust\nrocket\nromance\nroof\nrookie\nroom\nrose\nrotate\nrough\nround\nroute\nroyal\nrubber\nrude\nrug\nrule\nrun\nrunway\nrural\nsad\nsaddle\nsadness\nsafe\nsail\nsalad\nsalmon\nsalon\nsalt\nsalute\nsame\nsample\nsand\nsatisfy\nsatoshi\nsauce\nsausage\nsave\nsay\nscale\nscan\nscare\nscatter\nscene\nscheme\nschool\nscience\nscissors\nscorpion\nscout\nscrap\nscreen\nscript\nscrub\nsea\nsearch\nseason\nseat\nsecond\nsecret\nsection\nsecurity\nseed\nseek\nsegment\nselect\nsell\nseminar\nsenior\nsense\nsentence\nseries\nservice\nsession\nsettle\nsetup\nseven\nshadow\nshaft\nshallow\nshare\nshed\nshell\nsheriff\nshield\nshift\nshine\nship\nshiver\nshock\nshoe\nshoot\nshop\nshort\nshoulder\nshove\nshrimp\nshrug\nshuffle\nshy\nsibling\nsick\nside\nsiege\nsight\nsign\nsilent\nsilk\nsilly\nsilver\nsimilar\nsimple\nsince\nsing\nsiren\nsister\nsituate\nsix\nsize\nskate\nsketch\nski\nskill\nskin\nskirt\nskull\nslab\nslam\nsleep\nslender\nslice\nslide\nslight\nslim\nslogan\nslot\nslow\nslush\nsmall\nsmart\nsmile\nsmoke\nsmooth\nsnack\nsnake\nsnap\nsniff\nsnow\nsoap\nsoccer\nsocial\nsock\nsoda\nsoft\nsolar\nsoldier\nsolid\nsolution\nsolve\nsomeone\nsong\nsoon\nsorry\nsort\nsoul\nsound\nsoup\nsource\nsouth\nspace\nspare\nspatial\nspawn\nspeak\nspecial\nspeed\nspell\nspend\nsphere\nspice\nspider\nspike\nspin\nspirit\nsplit\nspoil\nsponsor\nspoon\nsport\nspot\nspray\nspread\nspring\nspy\nsquare\nsqueeze\nsquirrel\nstable\nstadium\nstaff\nstage\nstairs\nstamp\nstand\nstart\nstate\nstay\nsteak\nsteel\nstem\nstep\nstereo\nstick\nstill\nsting\nstock\nstomach\nstone\nstool\nstory\nstove\nstrategy\nstreet\nstrike\nstrong\nstruggle\nstudent\nstuff\nstumble\nstyle\nsubject\nsubmit\nsubway\nsuccess\nsuch\nsudden\nsuffer\nsugar\nsuggest\nsuit\nsummer\nsun\nsunny\nsunset\nsuper\nsupply\nsupreme\nsure\nsurface\nsurge\nsurprise\nsurround\nsurvey\nsuspect\nsustain\nswallow\nswamp\nswap\nswarm\nswear\nsweet\nswift\nswim\nswing\nswitch\nsword\nsymbol\nsymptom\nsyrup\nsystem\ntable\ntackle\ntag\ntail\ntalent\ntalk\ntank\ntape\ntarget\ntask\ntaste\ntattoo\ntaxi\nteach\nteam\ntell\nten\ntenant\ntennis\ntent\nterm\ntest\ntext\nthank\nthat\ntheme\nthen\ntheory\nthere\nthey\nthing\nthis\nthought\nthree\nthrive\nthrow\nthumb\nthunder\nticket\ntide\ntiger\ntilt\ntimber\ntime\ntiny\ntip\ntired\ntissue\ntitle\ntoast\ntobacco\ntoday\ntoddler\ntoe\ntogether\ntoilet\ntoken\ntomato\ntomorrow\ntone\ntongue\ntonight\ntool\ntooth\ntop\ntopic\ntopple\ntorch\ntornado\ntortoise\ntoss\ntotal\ntourist\ntoward\ntower\ntown\ntoy\ntrack\ntrade\ntraffic\ntragic\ntrain\ntransfer\ntrap\ntrash\ntravel\ntray\ntreat\ntree\ntrend\ntrial\ntribe\ntrick\ntrigger\ntrim\ntrip\ntrophy\ntrouble\ntruck\ntrue\ntruly\ntrumpet\ntrust\ntruth\ntry\ntube\ntuition\ntumble\ntuna\ntunnel\nturkey\nturn\nturtle\ntwelve\ntwenty\ntwice\ntwin\ntwist\ntwo\ntype\ntypical\nugly\numbrella\nunable\nunaware\nuncle\nuncover\nunder\nundo\nunfair\nunfold\nunhappy\nuniform\nunique\nunit\nuniverse\nunknown\nunlock\nuntil\nunusual\nunveil\nupdate\nupgrade\nuphold\nupon\nupper\nupset\nurban\nurge\nusage\nuse\nused\nuseful\nuseless\nusual\nutility\nvacant\nvacuum\nvague\nvalid\nvalley\nvalve\nvan\nvanish\nvapor\nvarious\nvast\nvault\nvehicle\nvelvet\nvendor\nventure\nvenue\nverb\nverify\nversion\nvery\nvessel\nveteran\nviable\nvibrant\nvicious\nvictory\nvideo\nview\nvillage\nvintage\nviolin\nvirtual\nvirus\nvisa\nvisit\nvisual\nvital\nvivid\nvocal\nvoice\nvoid\nvolcano\nvolume\nvote\nvoyage\nwage\nwagon\nwait\nwalk\nwall\nwalnut\nwant\nwarfare\nwarm\nwarrior\nwash\nwasp\nwaste\nwater\nwave\nway\nwealth\nweapon\nwear\nweasel\nweather\nweb\nwedding\nweekend\nweird\nwelcome\nwest\nwet\nwhale\nwhat\nwheat\nwheel\nwhen\nwhere\nwhip\nwhisper\nwide\nwidth\nwife\nwild\nwill\nwin\nwindow\nwine\nwing\nwink\nwinner\nwinter\nwire\nwisdom\nwise\nwish\nwitness\nwolf\nwoman\nwonder\nwood\nwool\nword\nwork\nworld\nworry\nworth\nwrap\nwreck\nwrestle\nwrist\nwrite\nwrong\nyard\nyear\nyellow\nyou\nyoung\nyouth\nzebra\nzero\nzone\nzoo".split("\n")},{}],135:[function(e,t,n){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function i(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function s(e,...t){if(!((n=e)instanceof Uint8Array||null!=n&&"object"==typeof n&&"Uint8Array"===n.constructor.name))throw new Error("Expected Uint8Array");var n;if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(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 c(e,t){s(e);const n=t.outputLen;if(e.lengths-a&&(this.process(n,0),a=0);for(let e=a;e>i&s),a=Number(n&s),c=r?4:0,u=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+u,a,r)}(n,s-8,BigInt(8*this.length),o),this.process(n,0);const c=(0,i.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e>i&r)}:{h:0|Number(e>>i&r),l:0|Number(e&r)}}function o(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);n.toBig=a;const c=(e,t,n)=>e>>>n;n.shrSH=c;const u=(e,t,n)=>e<<32-n|t>>>n;n.shrSL=u;const l=(e,t,n)=>e>>>n|t<<32-n;n.rotrSH=l;const d=(e,t,n)=>e<<32-n|t>>>n;n.rotrSL=d;const h=(e,t,n)=>e<<64-n|t>>>n-32;n.rotrBH=h;const f=(e,t,n)=>e>>>n-32|t<<64-n;n.rotrBL=f;const p=(e,t)=>t;n.rotr32H=p;const m=(e,t)=>e;n.rotr32L=m;const y=(e,t,n)=>e<>>32-n;n.rotlSH=y;const g=(e,t,n)=>t<>>32-n;n.rotlSL=g;const b=(e,t,n)=>t<>>64-n;n.rotlBH=b;const v=(e,t,n)=>e<>>64-n;function x(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}n.rotlBL=v,n.add=x;const w=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);n.add3L=w;const S=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;n.add3H=S;const E=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);n.add4L=E;const _=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;n.add4H=_;const A=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);n.add5L=A;const T=(e,t,n,r,i,s)=>t+n+r+i+s+(e/2**32|0)|0;n.add5H=T;const k={fromBig:s,split:o,toBig:a,shrSH:c,shrSL:u,rotrSH:l,rotrSL:d,rotrBH:h,rotrBL:f,rotr32H:p,rotr32L:m,rotlSH:y,rotlSL:g,rotlBH:b,rotlBL:v,add:x,add3L:w,add3H:S,add4L:E,add4H:_,add5H:T,add5L:A};n.default=k},{}],138:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.crypto=void 0,n.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},{}],139:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hmac=n.HMAC=void 0;const r=e("./_assert.js"),i=e("./utils.js");class s extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.hash)(e);const n=(0,i.toBytes)(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 s=this.blockLen,o=new Uint8Array(s);o.set(n.length>s?e.create().update(n).digest():n);for(let e=0;enew s(e,t).update(n).digest(),n.hmac.create=(e,t)=>new s(e,t)},{"./_assert.js":135,"./utils.js":143}],140:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.pbkdf2Async=n.pbkdf2=void 0;const r=e("./_assert.js"),i=e("./hmac.js"),s=e("./utils.js");function o(e,t,n,o){(0,r.hash)(e);const a=(0,s.checkOpts)({dkLen:32,asyncTick:10},o),{c:c,dkLen:u,asyncTick:l}=a;if((0,r.number)(c),(0,r.number)(u),(0,r.number)(l),c<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const d=(0,s.toBytes)(t),h=(0,s.toBytes)(n),f=new Uint8Array(u),p=i.hmac.create(e,d),m=p._cloneInto().update(h);return{c:c,dkLen:u,asyncTick:l,DK:f,PRF:p,PRFSalt:m}}function a(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}n.pbkdf2=function(e,t,n,r){const{c:i,dkLen:c,DK:u,PRF:l,PRFSalt:d}=o(e,t,n,r);let h;const f=new Uint8Array(4),p=(0,s.createView)(f),m=new Uint8Array(l.outputLen);for(let e=1,t=0;t{d._cloneInto(f).update(y).digestInto(y);for(let e=0;ee&t^e&n^t&n,o=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]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class u extends r.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:s,G:o,H:a}=this;return[e,t,n,r,i,s,o,a]}set(e,t,n,r,i,s,o,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|s,this.G=0|o,this.H=0|a}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=c[e-15],n=c[e-2],r=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,s=(0,i.rotr)(n,17)^(0,i.rotr)(n,19)^n>>>10;c[e]=s+c[e-7]+r+c[e-16]|0}let{A:n,B:r,C:a,D:u,E:l,F:d,G:h,H:f}=this;for(let e=0;e<64;e++){const t=f+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&d^~p&h)+o[e]+c[e]|0,m=((0,i.rotr)(n,2)^(0,i.rotr)(n,13)^(0,i.rotr)(n,22))+s(n,r,a)|0;f=h,h=d,d=l,l=u+t|0,u=a,a=r,r=n,n=t+m|0}var p;n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,h=h+this.G|0,f=f+this.H|0,this.set(n,r,a,u,l,d,h,f)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}n.sha256=(0,i.wrapConstructor)((()=>new u)),n.sha224=(0,i.wrapConstructor)((()=>new l))},{"./_sha2.js":136,"./utils.js":143}],142:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha384=n.sha512_256=n.sha512_224=n.sha512=n.SHA512=void 0;const r=e("./_sha2.js"),i=e("./_u64.js"),s=e("./utils.js"),[o,a]=(()=>i.default.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)))))(),c=new Uint32Array(80),u=new Uint32Array(80);class l extends r.SHA2{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:n,Bl:r,Ch:i,Cl:s,Dh:o,Dl:a,Eh:c,El:u,Fh:l,Fl:d,Gh:h,Gl:f,Hh:p,Hl:m}=this;return[e,t,n,r,i,s,o,a,c,u,l,d,h,f,p,m]}set(e,t,n,r,i,s,o,a,c,u,l,d,h,f,p,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|s,this.Dh=0|o,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|h,this.Gl=0|f,this.Hh=0|p,this.Hl=0|m}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t),u[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|c[e-15],n=0|u[e-15],r=i.default.rotrSH(t,n,1)^i.default.rotrSH(t,n,8)^i.default.shrSH(t,n,7),s=i.default.rotrSL(t,n,1)^i.default.rotrSL(t,n,8)^i.default.shrSL(t,n,7),o=0|c[e-2],a=0|u[e-2],l=i.default.rotrSH(o,a,19)^i.default.rotrBH(o,a,61)^i.default.shrSH(o,a,6),d=i.default.rotrSL(o,a,19)^i.default.rotrBL(o,a,61)^i.default.shrSL(o,a,6),h=i.default.add4L(s,d,u[e-7],u[e-16]),f=i.default.add4H(h,r,l,c[e-7],c[e-16]);c[e]=0|f,u[e]=0|h}let{Ah:n,Al:r,Bh:s,Bl:l,Ch:d,Cl:h,Dh:f,Dl:p,Eh:m,El:y,Fh:g,Fl:b,Gh:v,Gl:x,Hh:w,Hl:S}=this;for(let e=0;e<80;e++){const t=i.default.rotrSH(m,y,14)^i.default.rotrSH(m,y,18)^i.default.rotrBH(m,y,41),E=i.default.rotrSL(m,y,14)^i.default.rotrSL(m,y,18)^i.default.rotrBL(m,y,41),_=m&g^~m&v,A=y&b^~y&x,T=i.default.add5L(S,E,A,a[e],u[e]),k=i.default.add5H(T,w,t,_,o[e],c[e]),C=0|T,O=i.default.rotrSH(n,r,28)^i.default.rotrBH(n,r,34)^i.default.rotrBH(n,r,39),P=i.default.rotrSL(n,r,28)^i.default.rotrBL(n,r,34)^i.default.rotrBL(n,r,39),j=n&s^n&d^s&d,M=r&l^r&h^l&h;w=0|v,S=0|x,v=0|g,x=0|b,g=0|m,b=0|y,({h:m,l:y}=i.default.add(0|f,0|p,0|k,0|C)),f=0|d,p=0|h,d=0|s,h=0|l,s=0|n,l=0|r;const I=i.default.add3L(C,P,M);n=i.default.add3H(I,k,O,j),r=0|I}({h:n,l:r}=i.default.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:s,l:l}=i.default.add(0|this.Bh,0|this.Bl,0|s,0|l)),({h:d,l:h}=i.default.add(0|this.Ch,0|this.Cl,0|d,0|h)),({h:f,l:p}=i.default.add(0|this.Dh,0|this.Dl,0|f,0|p)),({h:m,l:y}=i.default.add(0|this.Eh,0|this.El,0|m,0|y)),({h:g,l:b}=i.default.add(0|this.Fh,0|this.Fl,0|g,0|b)),({h:v,l:x}=i.default.add(0|this.Gh,0|this.Gl,0|v,0|x)),({h:w,l:S}=i.default.add(0|this.Hh,0|this.Hl,0|w,0|S)),this.set(n,r,s,l,d,h,f,p,m,y,g,b,v,x,w,S)}roundClean(){c.fill(0),u.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)}}n.SHA512=l;class d extends l{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class h extends l{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class f extends l{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}n.sha512=(0,s.wrapConstructor)((()=>new l)),n.sha512_224=(0,s.wrapConstructor)((()=>new d)),n.sha512_256=(0,s.wrapConstructor)((()=>new h)),n.sha384=(0,s.wrapConstructor)((()=>new f))},{"./_sha2.js":136,"./_u64.js":137,"./utils.js":143}],143:[function(e,t,n){"use strict"; /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(n,"__esModule",{value:!0}),n.randomBytes=n.wrapXOFConstructorWithOpts=n.wrapConstructorWithOpts=n.wrapConstructor=n.checkOpts=n.Hash=n.concatBytes=n.toBytes=n.utf8ToBytes=n.asyncLoop=n.nextTick=n.hexToBytes=n.bytesToHex=n.isLE=n.rotr=n.createView=n.u32=n.u8=void 0;const r=e("@noble/hashes/crypto");n.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}n.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));n.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(n.rotr=(e,t)=>e<<32-t|e>>>t,n.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!n.isLE)throw new Error("Non little-endian hardware is not supported");const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));n.bytesToHex=function(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n=o._0&&e<=o._9?e-o._0:e>=o._A&&e<=o._F?e-(o._A-10):e>=o._a&&e<=o._f?e-(o._a-10):void 0}n.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t{},n.asyncLoop=async function(e,t,r){let i=Date.now();for(let s=0;s=0&&ee().update(u(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},n.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(u(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},n.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(u(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},n.randomBytes=function(e=32){if(r.crypto&&"function"==typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},{"@noble/hashes/crypto":138}],144:[function(e,t,n){t.exports={0:{index:"0",hex:"0x80000000",symbol:"BTC",name:"Bitcoin"},1:{index:"1",hex:"0x80000001",symbol:"",name:"Testnet (all coins)"},2:{index:"2",hex:"0x80000002",symbol:"LTC",name:"Litecoin"},3:{index:"3",hex:"0x80000003",symbol:"DOGE",name:"Dogecoin"},4:{index:"4",hex:"0x80000004",symbol:"RDD",name:"Reddcoin"},5:{index:"5",hex:"0x80000005",symbol:"DASH",name:"Dash"},6:{index:"6",hex:"0x80000006",symbol:"PPC",name:"Peercoin"},7:{index:"7",hex:"0x80000007",symbol:"NMC",name:"Namecoin"},8:{index:"8",hex:"0x80000008",symbol:"FTC",name:"Feathercoin"},9:{index:"9",hex:"0x80000009",symbol:"XCP",name:"Counterparty"},10:{index:"10",hex:"0x8000000a",symbol:"BLK",name:"Blackcoin"},11:{index:"11",hex:"0x8000000b",symbol:"NSR",name:"NuShares"},12:{index:"12",hex:"0x8000000c",symbol:"NBT",name:"NuBits"},13:{index:"13",hex:"0x8000000d",symbol:"MZC",name:"Mazacoin"},14:{index:"14",hex:"0x8000000e",symbol:"VIA",name:"Viacoin"},15:{index:"15",hex:"0x8000000f",symbol:"XCH",name:"ClearingHouse"},16:{index:"16",hex:"0x80000010",symbol:"RBY",name:"Rubycoin"},17:{index:"17",hex:"0x80000011",symbol:"GRS",name:"Groestlcoin"},18:{index:"18",hex:"0x80000012",symbol:"DGC",name:"Digitalcoin"},19:{index:"19",hex:"0x80000013",symbol:"CCN",name:"Cannacoin"},20:{index:"20",hex:"0x80000014",symbol:"DGB",name:"DigiByte"},21:{index:"21",hex:"0x80000015",symbol:"",name:"Open Assets"},22:{index:"22",hex:"0x80000016",symbol:"MONA",name:"Monacoin"},23:{index:"23",hex:"0x80000017",symbol:"CLAM",name:"Clams"},24:{index:"24",hex:"0x80000018",symbol:"XPM",name:"Primecoin"},25:{index:"25",hex:"0x80000019",symbol:"NEOS",name:"Neoscoin"},26:{index:"26",hex:"0x8000001a",symbol:"JBS",name:"Jumbucks"},27:{index:"27",hex:"0x8000001b",symbol:"ZRC",name:"ziftrCOIN"},28:{index:"28",hex:"0x8000001c",symbol:"VTC",name:"Vertcoin"},29:{index:"29",hex:"0x8000001d",symbol:"NXT",name:"NXT"},30:{index:"30",hex:"0x8000001e",symbol:"BURST",name:"Burst"},31:{index:"31",hex:"0x8000001f",symbol:"MUE",name:"MonetaryUnit"},32:{index:"32",hex:"0x80000020",symbol:"ZOOM",name:"Zoom"},33:{index:"33",hex:"0x80000021",symbol:"VASH",name:"Virtual Cash"},34:{index:"34",hex:"0x80000022",symbol:"CDN",name:"Canada eCoin"},35:{index:"35",hex:"0x80000023",symbol:"SDC",name:"ShadowCash"},36:{index:"36",hex:"0x80000024",symbol:"PKB",name:"ParkByte"},37:{index:"37",hex:"0x80000025",symbol:"PND",name:"Pandacoin"},38:{index:"38",hex:"0x80000026",symbol:"START",name:"StartCOIN"},39:{index:"39",hex:"0x80000027",symbol:"MOIN",name:"MOIN"},40:{index:"40",hex:"0x80000028",symbol:"EXP",name:"Expanse"},41:{index:"41",hex:"0x80000029",symbol:"EMC2",name:"Einsteinium"},42:{index:"42",hex:"0x8000002a",symbol:"DCR",name:"Decred"},43:{index:"43",hex:"0x8000002b",symbol:"XEM",name:"NEM"},44:{index:"44",hex:"0x8000002c",symbol:"PART",name:"Particl"},45:{index:"45",hex:"0x8000002d",symbol:"ARG",name:"Argentum (dead)"},46:{index:"46",hex:"0x8000002e",symbol:"",name:"Libertas"},47:{index:"47",hex:"0x8000002f",symbol:"",name:"Posw coin"},48:{index:"48",hex:"0x80000030",symbol:"SHR",name:"Shreeji"},49:{index:"49",hex:"0x80000031",symbol:"GCR",name:"Global Currency Reserve (GCRcoin)"},50:{index:"50",hex:"0x80000032",symbol:"NVC",name:"Novacoin"},51:{index:"51",hex:"0x80000033",symbol:"AC",name:"Asiacoin"},52:{index:"52",hex:"0x80000034",symbol:"BTCD",name:"BitcoinDark"},53:{index:"53",hex:"0x80000035",symbol:"DOPE",name:"Dopecoin"},54:{index:"54",hex:"0x80000036",symbol:"TPC",name:"Templecoin"},55:{index:"55",hex:"0x80000037",symbol:"AIB",name:"AIB"},56:{index:"56",hex:"0x80000038",symbol:"EDRC",name:"EDRCoin"},57:{index:"57",hex:"0x80000039",symbol:"SYS",name:"Syscoin"},58:{index:"58",hex:"0x8000003a",symbol:"SLR",name:"Solarcoin"},59:{index:"59",hex:"0x8000003b",symbol:"SMLY",name:"Smileycoin"},60:{index:"60",hex:"0x8000003c",symbol:"ETH",name:"Ethereum"},61:{index:"61",hex:"0x8000003d",symbol:"ETC",name:"Ether Classic"},62:{index:"62",hex:"0x8000003e",symbol:"PSB",name:"Pesobit"},63:{index:"63",hex:"0x8000003f",symbol:"LDCN",name:"Landcoin (dead)"},64:{index:"64",hex:"0x80000040",symbol:"",name:"Open Chain"},65:{index:"65",hex:"0x80000041",symbol:"XBC",name:"Bitcoinplus"},66:{index:"66",hex:"0x80000042",symbol:"IOP",name:"Internet of People"},67:{index:"67",hex:"0x80000043",symbol:"NXS",name:"Nexus"},68:{index:"68",hex:"0x80000044",symbol:"INSN",name:"InsaneCoin"},69:{index:"69",hex:"0x80000045",symbol:"OK",name:"OKCash"},70:{index:"70",hex:"0x80000046",symbol:"BRIT",name:"BritCoin"},71:{index:"71",hex:"0x80000047",symbol:"CMP",name:"Compcoin"},72:{index:"72",hex:"0x80000048",symbol:"CRW",name:"Crown"},73:{index:"73",hex:"0x80000049",symbol:"BELA",name:"BelaCoin"},74:{index:"74",hex:"0x8000004a",symbol:"ICX",name:"ICON"},75:{index:"75",hex:"0x8000004b",symbol:"FJC",name:"FujiCoin"},76:{index:"76",hex:"0x8000004c",symbol:"MIX",name:"MIX"},77:{index:"77",hex:"0x8000004d",symbol:"XVG",name:"Verge Currency"},78:{index:"78",hex:"0x8000004e",symbol:"EFL",name:"Electronic Gulden"},79:{index:"79",hex:"0x8000004f",symbol:"CLUB",name:"ClubCoin"},80:{index:"80",hex:"0x80000050",symbol:"RICHX",name:"RichCoin"},81:{index:"81",hex:"0x80000051",symbol:"POT",name:"Potcoin"},82:{index:"82",hex:"0x80000052",symbol:"QRK",name:"Quarkcoin"},83:{index:"83",hex:"0x80000053",symbol:"TRC",name:"Terracoin"},84:{index:"84",hex:"0x80000054",symbol:"GRC",name:"Gridcoin"},85:{index:"85",hex:"0x80000055",symbol:"AUR",name:"Auroracoin"},86:{index:"86",hex:"0x80000056",symbol:"IXC",name:"IXCoin"},87:{index:"87",hex:"0x80000057",symbol:"NLG",name:"Gulden"},88:{index:"88",hex:"0x80000058",symbol:"BITB",name:"BitBean"},89:{index:"89",hex:"0x80000059",symbol:"BTA",name:"Bata"},90:{index:"90",hex:"0x8000005a",symbol:"XMY",name:"Myriadcoin"},91:{index:"91",hex:"0x8000005b",symbol:"BSD",name:"BitSend"},92:{index:"92",hex:"0x8000005c",symbol:"UNO",name:"Unobtanium"},93:{index:"93",hex:"0x8000005d",symbol:"MTR",name:"MasterTrader"},94:{index:"94",hex:"0x8000005e",symbol:"GB",name:"GoldBlocks"},95:{index:"95",hex:"0x8000005f",symbol:"SHM",name:"Saham"},96:{index:"96",hex:"0x80000060",symbol:"CRX",name:"Chronos"},97:{index:"97",hex:"0x80000061",symbol:"BIQ",name:"Ubiquoin"},98:{index:"98",hex:"0x80000062",symbol:"EVO",name:"Evotion"},99:{index:"99",hex:"0x80000063",symbol:"STO",name:"SaveTheOcean"},100:{index:"100",hex:"0x80000064",symbol:"BIGUP",name:"BigUp"},101:{index:"101",hex:"0x80000065",symbol:"GAME",name:"GameCredits"},102:{index:"102",hex:"0x80000066",symbol:"DLC",name:"Dollarcoins"},103:{index:"103",hex:"0x80000067",symbol:"ZYD",name:"Zayedcoin"},104:{index:"104",hex:"0x80000068",symbol:"DBIC",name:"Dubaicoin"},105:{index:"105",hex:"0x80000069",symbol:"STRAT",name:"Stratis"},106:{index:"106",hex:"0x8000006a",symbol:"SH",name:"Shilling"},107:{index:"107",hex:"0x8000006b",symbol:"MARS",name:"MarsCoin"},108:{index:"108",hex:"0x8000006c",symbol:"UBQ",name:"Ubiq"},109:{index:"109",hex:"0x8000006d",symbol:"PTC",name:"Pesetacoin"},110:{index:"110",hex:"0x8000006e",symbol:"NRO",name:"Neurocoin"},111:{index:"111",hex:"0x8000006f",symbol:"ARK",name:"ARK"},112:{index:"112",hex:"0x80000070",symbol:"USC",name:"UltimateSecureCashMain"},113:{index:"113",hex:"0x80000071",symbol:"THC",name:"Hempcoin"},114:{index:"114",hex:"0x80000072",symbol:"LINX",name:"Linx"},115:{index:"115",hex:"0x80000073",symbol:"ECN",name:"Ecoin"},116:{index:"116",hex:"0x80000074",symbol:"DNR",name:"Denarius"},117:{index:"117",hex:"0x80000075",symbol:"PINK",name:"Pinkcoin"},118:{index:"118",hex:"0x80000076",symbol:"ATOM",name:"Atom"},119:{index:"119",hex:"0x80000077",symbol:"PIVX",name:"Pivx"},120:{index:"120",hex:"0x80000078",symbol:"FLASH",name:"Flashcoin"},121:{index:"121",hex:"0x80000079",symbol:"ZEN",name:"Zencash"},122:{index:"122",hex:"0x8000007a",symbol:"PUT",name:"Putincoin"},123:{index:"123",hex:"0x8000007b",symbol:"ZNY",name:"BitZeny"},124:{index:"124",hex:"0x8000007c",symbol:"UNIFY",name:"Unify"},125:{index:"125",hex:"0x8000007d",symbol:"XST",name:"StealthCoin"},126:{index:"126",hex:"0x8000007e",symbol:"BRK",name:"Breakout Coin"},127:{index:"127",hex:"0x8000007f",symbol:"VC",name:"Vcash"},128:{index:"128",hex:"0x80000080",symbol:"XMR",name:"Monero"},129:{index:"129",hex:"0x80000081",symbol:"VOX",name:"Voxels"},130:{index:"130",hex:"0x80000082",symbol:"NAV",name:"NavCoin"},131:{index:"131",hex:"0x80000083",symbol:"FCT",name:"Factom Factoids"},132:{index:"132",hex:"0x80000084",symbol:"EC",name:"Factom Entry Credits"},133:{index:"133",hex:"0x80000085",symbol:"ZEC",name:"Zcash"},134:{index:"134",hex:"0x80000086",symbol:"LSK",name:"Lisk"},135:{index:"135",hex:"0x80000087",symbol:"STEEM",name:"Steem"},136:{index:"136",hex:"0x80000088",symbol:"XZC",name:"ZCoin"},137:{index:"137",hex:"0x80000089",symbol:"RBTC",name:"Rootstock"},138:{index:"138",hex:"0x8000008a",symbol:"",name:"Giftblock"},139:{index:"139",hex:"0x8000008b",symbol:"RPT",name:"RealPointCoin"},140:{index:"140",hex:"0x8000008c",symbol:"LBC",name:"LBRY Credits"},141:{index:"141",hex:"0x8000008d",symbol:"KMD",name:"Komodo"},142:{index:"142",hex:"0x8000008e",symbol:"BSQ",name:"bisq Token"},143:{index:"143",hex:"0x8000008f",symbol:"RIC",name:"Riecoin"},144:{index:"144",hex:"0x80000090",symbol:"XRP",name:"XRP"},145:{index:"145",hex:"0x80000091",symbol:"BCH",name:"Bitcoin Cash"},146:{index:"146",hex:"0x80000092",symbol:"NEBL",name:"Neblio"},147:{index:"147",hex:"0x80000093",symbol:"ZCL",name:"ZClassic"},148:{index:"148",hex:"0x80000094",symbol:"XLM",name:"Stellar Lumens"},149:{index:"149",hex:"0x80000095",symbol:"NLC2",name:"NoLimitCoin2"},150:{index:"150",hex:"0x80000096",symbol:"WHL",name:"WhaleCoin"},151:{index:"151",hex:"0x80000097",symbol:"ERC",name:"EuropeCoin"},152:{index:"152",hex:"0x80000098",symbol:"DMD",name:"Diamond"},153:{index:"153",hex:"0x80000099",symbol:"BTM",name:"Bytom"},154:{index:"154",hex:"0x8000009a",symbol:"BIO",name:"Biocoin"},155:{index:"155",hex:"0x8000009b",symbol:"XWCC",name:"Whitecoin Classic"},156:{index:"156",hex:"0x8000009c",symbol:"BTG",name:"Bitcoin Gold"},157:{index:"157",hex:"0x8000009d",symbol:"BTC2X",name:"Bitcoin 2x"},158:{index:"158",hex:"0x8000009e",symbol:"SSN",name:"SuperSkynet"},159:{index:"159",hex:"0x8000009f",symbol:"TOA",name:"TOACoin"},160:{index:"160",hex:"0x800000a0",symbol:"BTX",name:"Bitcore"},161:{index:"161",hex:"0x800000a1",symbol:"ACC",name:"Adcoin"},162:{index:"162",hex:"0x800000a2",symbol:"BCO",name:"Bridgecoin"},163:{index:"163",hex:"0x800000a3",symbol:"ELLA",name:"Ellaism"},164:{index:"164",hex:"0x800000a4",symbol:"PIRL",name:"Pirl"},165:{index:"165",hex:"0x800000a5",symbol:"XNO",name:"Nano"},166:{index:"166",hex:"0x800000a6",symbol:"VIVO",name:"Vivo"},167:{index:"167",hex:"0x800000a7",symbol:"FRST",name:"Firstcoin"},168:{index:"168",hex:"0x800000a8",symbol:"HNC",name:"Helleniccoin"},169:{index:"169",hex:"0x800000a9",symbol:"BUZZ",name:"BUZZ"},170:{index:"170",hex:"0x800000aa",symbol:"MBRS",name:"Ember"},171:{index:"171",hex:"0x800000ab",symbol:"HC",name:"Hcash"},172:{index:"172",hex:"0x800000ac",symbol:"HTML",name:"HTMLCOIN"},173:{index:"173",hex:"0x800000ad",symbol:"ODN",name:"Obsidian"},174:{index:"174",hex:"0x800000ae",symbol:"ONX",name:"OnixCoin"},175:{index:"175",hex:"0x800000af",symbol:"RVN",name:"Ravencoin"},176:{index:"176",hex:"0x800000b0",symbol:"GBX",name:"GoByte"},177:{index:"177",hex:"0x800000b1",symbol:"BTCZ",name:"BitcoinZ"},178:{index:"178",hex:"0x800000b2",symbol:"POA",name:"Poa"},179:{index:"179",hex:"0x800000b3",symbol:"NYC",name:"NewYorkCoin"},180:{index:"180",hex:"0x800000b4",symbol:"MXT",name:"MarteXcoin"},181:{index:"181",hex:"0x800000b5",symbol:"WC",name:"Wincoin"},182:{index:"182",hex:"0x800000b6",symbol:"MNX",name:"Minexcoin"},183:{index:"183",hex:"0x800000b7",symbol:"BTCP",name:"Bitcoin Private"},184:{index:"184",hex:"0x800000b8",symbol:"MUSIC",name:"Musicoin"},185:{index:"185",hex:"0x800000b9",symbol:"BCA",name:"Bitcoin Atom"},186:{index:"186",hex:"0x800000ba",symbol:"CRAVE",name:"Crave"},187:{index:"187",hex:"0x800000bb",symbol:"STAK",name:"STRAKS"},188:{index:"188",hex:"0x800000bc",symbol:"WBTC",name:"World Bitcoin"},189:{index:"189",hex:"0x800000bd",symbol:"LCH",name:"LiteCash"},190:{index:"190",hex:"0x800000be",symbol:"EXCL",name:"ExclusiveCoin"},191:{index:"191",hex:"0x800000bf",symbol:"",name:"Lynx"},192:{index:"192",hex:"0x800000c0",symbol:"LCC",name:"LitecoinCash"},193:{index:"193",hex:"0x800000c1",symbol:"XFE",name:"Feirm"},194:{index:"194",hex:"0x800000c2",symbol:"EOS",name:"EOS"},195:{index:"195",hex:"0x800000c3",symbol:"TRX",name:"Tron"},196:{index:"196",hex:"0x800000c4",symbol:"KOBO",name:"Kobocoin"},197:{index:"197",hex:"0x800000c5",symbol:"HUSH",name:"HUSH"},198:{index:"198",hex:"0x800000c6",symbol:"BAN",name:"Banano"},199:{index:"199",hex:"0x800000c7",symbol:"ETF",name:"ETF"},200:{index:"200",hex:"0x800000c8",symbol:"OMNI",name:"Omni"},201:{index:"201",hex:"0x800000c9",symbol:"BIFI",name:"BitcoinFile"},202:{index:"202",hex:"0x800000ca",symbol:"UFO",name:"Uniform Fiscal Object"},203:{index:"203",hex:"0x800000cb",symbol:"CNMC",name:"Cryptonodes"},204:{index:"204",hex:"0x800000cc",symbol:"BCN",name:"Bytecoin"},205:{index:"205",hex:"0x800000cd",symbol:"RIN",name:"Ringo"},206:{index:"206",hex:"0x800000ce",symbol:"ATP",name:"Alaya"},207:{index:"207",hex:"0x800000cf",symbol:"EVT",name:"everiToken"},208:{index:"208",hex:"0x800000d0",symbol:"ATN",name:"ATN"},209:{index:"209",hex:"0x800000d1",symbol:"BIS",name:"Bismuth"},210:{index:"210",hex:"0x800000d2",symbol:"NEET",name:"NEETCOIN"},211:{index:"211",hex:"0x800000d3",symbol:"BOPO",name:"BopoChain"},212:{index:"212",hex:"0x800000d4",symbol:"OOT",name:"Utrum"},213:{index:"213",hex:"0x800000d5",symbol:"ALIAS",name:"Alias"},214:{index:"214",hex:"0x800000d6",symbol:"MONK",name:"Monkey Project"},215:{index:"215",hex:"0x800000d7",symbol:"BOXY",name:"BoxyCoin"},216:{index:"216",hex:"0x800000d8",symbol:"FLO",name:"Flo"},217:{index:"217",hex:"0x800000d9",symbol:"MEC",name:"Megacoin"},218:{index:"218",hex:"0x800000da",symbol:"BTDX",name:"BitCloud"},219:{index:"219",hex:"0x800000db",symbol:"XAX",name:"Artax"},220:{index:"220",hex:"0x800000dc",symbol:"ANON",name:"ANON"},221:{index:"221",hex:"0x800000dd",symbol:"LTZ",name:"LitecoinZ"},222:{index:"222",hex:"0x800000de",symbol:"BITG",name:"Bitcoin Green"},223:{index:"223",hex:"0x800000df",symbol:"ICP",name:"Internet Computer (DFINITY)"},224:{index:"224",hex:"0x800000e0",symbol:"SMART",name:"Smartcash"},225:{index:"225",hex:"0x800000e1",symbol:"XUEZ",name:"XUEZ"},226:{index:"226",hex:"0x800000e2",symbol:"HLM",name:"Helium"},227:{index:"227",hex:"0x800000e3",symbol:"WEB",name:"Webchain"},228:{index:"228",hex:"0x800000e4",symbol:"ACM",name:"Actinium"},229:{index:"229",hex:"0x800000e5",symbol:"NOS",name:"NOS Stable Coins"},230:{index:"230",hex:"0x800000e6",symbol:"BITC",name:"BitCash"},231:{index:"231",hex:"0x800000e7",symbol:"HTH",name:"Help The Homeless Coin"},232:{index:"232",hex:"0x800000e8",symbol:"TZC",name:"Trezarcoin"},233:{index:"233",hex:"0x800000e9",symbol:"VAR",name:"Varda"},234:{index:"234",hex:"0x800000ea",symbol:"IOV",name:"IOV"},235:{index:"235",hex:"0x800000eb",symbol:"FIO",name:"FIO"},236:{index:"236",hex:"0x800000ec",symbol:"BSV",name:"BitcoinSV"},237:{index:"237",hex:"0x800000ed",symbol:"DXN",name:"DEXON"},238:{index:"238",hex:"0x800000ee",symbol:"QRL",name:"Quantum Resistant Ledger"},239:{index:"239",hex:"0x800000ef",symbol:"PCX",name:"ChainX"},240:{index:"240",hex:"0x800000f0",symbol:"LOKI",name:"Loki"},241:{index:"241",hex:"0x800000f1",symbol:"",name:"Imagewallet"},242:{index:"242",hex:"0x800000f2",symbol:"NIM",name:"Nimiq"},243:{index:"243",hex:"0x800000f3",symbol:"SOV",name:"Sovereign Coin"},244:{index:"244",hex:"0x800000f4",symbol:"JCT",name:"Jibital Coin"},245:{index:"245",hex:"0x800000f5",symbol:"SLP",name:"Simple Ledger Protocol"},246:{index:"246",hex:"0x800000f6",symbol:"EWT",name:"Energy Web"},247:{index:"247",hex:"0x800000f7",symbol:"UC",name:"Ulord"},248:{index:"248",hex:"0x800000f8",symbol:"EXOS",name:"EXOS"},249:{index:"249",hex:"0x800000f9",symbol:"ECA",name:"Electra"},250:{index:"250",hex:"0x800000fa",symbol:"SOOM",name:"Soom"},251:{index:"251",hex:"0x800000fb",symbol:"XRD",name:"Redstone"},252:{index:"252",hex:"0x800000fc",symbol:"FREE",name:"FreeCoin"},253:{index:"253",hex:"0x800000fd",symbol:"NPW",name:"NewPowerCoin"},254:{index:"254",hex:"0x800000fe",symbol:"BST",name:"BlockStamp"},255:{index:"255",hex:"0x800000ff",symbol:"",name:"SmartHoldem"},256:{index:"256",hex:"0x80000100",symbol:"NANO",name:"Bitcoin Nano"},257:{index:"257",hex:"0x80000101",symbol:"BTCC",name:"Bitcoin Core"},258:{index:"258",hex:"0x80000102",symbol:"",name:"Zen Protocol"},259:{index:"259",hex:"0x80000103",symbol:"ZEST",name:"Zest"},260:{index:"260",hex:"0x80000104",symbol:"ABT",name:"ArcBlock"},261:{index:"261",hex:"0x80000105",symbol:"PION",name:"Pion"},262:{index:"262",hex:"0x80000106",symbol:"DT3",name:"DreamTeam3"},263:{index:"263",hex:"0x80000107",symbol:"ZBUX",name:"Zbux"},264:{index:"264",hex:"0x80000108",symbol:"KPL",name:"Kepler"},265:{index:"265",hex:"0x80000109",symbol:"TPAY",name:"TokenPay"},266:{index:"266",hex:"0x8000010a",symbol:"ZILLA",name:"ChainZilla"},267:{index:"267",hex:"0x8000010b",symbol:"ANK",name:"Anker"},268:{index:"268",hex:"0x8000010c",symbol:"BCC",name:"BCChain"},269:{index:"269",hex:"0x8000010d",symbol:"HPB",name:"HPB"},270:{index:"270",hex:"0x8000010e",symbol:"ONE",name:"ONE"},271:{index:"271",hex:"0x8000010f",symbol:"SBC",name:"SBC"},272:{index:"272",hex:"0x80000110",symbol:"IPC",name:"IPChain"},273:{index:"273",hex:"0x80000111",symbol:"DMTC",name:"Dominantchain"},274:{index:"274",hex:"0x80000112",symbol:"OGC",name:"Onegram"},275:{index:"275",hex:"0x80000113",symbol:"SHIT",name:"Shitcoin"},276:{index:"276",hex:"0x80000114",symbol:"ANDES",name:"Andescoin"},277:{index:"277",hex:"0x80000115",symbol:"AREPA",name:"Arepacoin"},278:{index:"278",hex:"0x80000116",symbol:"BOLI",name:"Bolivarcoin"},279:{index:"279",hex:"0x80000117",symbol:"RIL",name:"Rilcoin"},280:{index:"280",hex:"0x80000118",symbol:"HTR",name:"Hathor Network"},281:{index:"281",hex:"0x80000119",symbol:"ACME",name:"Accumulate"},282:{index:"282",hex:"0x8000011a",symbol:"BRAVO",name:"BRAVO"},283:{index:"283",hex:"0x8000011b",symbol:"ALGO",name:"Algorand"},284:{index:"284",hex:"0x8000011c",symbol:"BZX",name:"Bitcoinzero"},285:{index:"285",hex:"0x8000011d",symbol:"GXX",name:"GravityCoin"},286:{index:"286",hex:"0x8000011e",symbol:"HEAT",name:"HEAT"},287:{index:"287",hex:"0x8000011f",symbol:"XDN",name:"DigitalNote"},288:{index:"288",hex:"0x80000120",symbol:"FSN",name:"FUSION"},289:{index:"289",hex:"0x80000121",symbol:"CPC",name:"Capricoin"},290:{index:"290",hex:"0x80000122",symbol:"BOLD",name:"Bold"},291:{index:"291",hex:"0x80000123",symbol:"IOST",name:"IOST"},292:{index:"292",hex:"0x80000124",symbol:"TKEY",name:"Tkeycoin"},293:{index:"293",hex:"0x80000125",symbol:"USE",name:"Usechain"},294:{index:"294",hex:"0x80000126",symbol:"BCZ",name:"BitcoinCZ"},295:{index:"295",hex:"0x80000127",symbol:"IOC",name:"Iocoin"},296:{index:"296",hex:"0x80000128",symbol:"ASF",name:"Asofe"},297:{index:"297",hex:"0x80000129",symbol:"MASS",name:"MASS"},298:{index:"298",hex:"0x8000012a",symbol:"FAIR",name:"FairCoin"},299:{index:"299",hex:"0x8000012b",symbol:"NUKO",name:"Nekonium"},300:{index:"300",hex:"0x8000012c",symbol:"GNX",name:"Genaro Network"},301:{index:"301",hex:"0x8000012d",symbol:"DIVI",name:"Divi Project"},302:{index:"302",hex:"0x8000012e",symbol:"CMT",name:"Community"},303:{index:"303",hex:"0x8000012f",symbol:"EUNO",name:"EUNO"},304:{index:"304",hex:"0x80000130",symbol:"IOTX",name:"IoTeX"},305:{index:"305",hex:"0x80000131",symbol:"ONION",name:"DeepOnion"},306:{index:"306",hex:"0x80000132",symbol:"8BIT",name:"8Bit"},307:{index:"307",hex:"0x80000133",symbol:"ATC",name:"AToken Coin"},308:{index:"308",hex:"0x80000134",symbol:"BTS",name:"Bitshares"},309:{index:"309",hex:"0x80000135",symbol:"CKB",name:"Nervos CKB"},310:{index:"310",hex:"0x80000136",symbol:"UGAS",name:"Ultrain"},311:{index:"311",hex:"0x80000137",symbol:"ADS",name:"Adshares"},312:{index:"312",hex:"0x80000138",symbol:"ARA",name:"Aura"},313:{index:"313",hex:"0x80000139",symbol:"ZIL",name:"Zilliqa"},314:{index:"314",hex:"0x8000013a",symbol:"MOAC",name:"MOAC"},315:{index:"315",hex:"0x8000013b",symbol:"SWTC",name:"SWTC"},316:{index:"316",hex:"0x8000013c",symbol:"VNSC",name:"vnscoin"},317:{index:"317",hex:"0x8000013d",symbol:"PLUG",name:"Pl^g"},318:{index:"318",hex:"0x8000013e",symbol:"MAN",name:"Matrix AI Network"},319:{index:"319",hex:"0x8000013f",symbol:"ECC",name:"ECCoin"},320:{index:"320",hex:"0x80000140",symbol:"RPD",name:"Rapids"},321:{index:"321",hex:"0x80000141",symbol:"RAP",name:"Rapture"},322:{index:"322",hex:"0x80000142",symbol:"GARD",name:"Hashgard"},323:{index:"323",hex:"0x80000143",symbol:"ZER",name:"Zero"},324:{index:"324",hex:"0x80000144",symbol:"EBST",name:"eBoost"},325:{index:"325",hex:"0x80000145",symbol:"SHARD",name:"Shard"},326:{index:"326",hex:"0x80000146",symbol:"MRX",name:"Metrix Coin"},327:{index:"327",hex:"0x80000147",symbol:"CMM",name:"Commercium"},328:{index:"328",hex:"0x80000148",symbol:"BLOCK",name:"Blocknet"},329:{index:"329",hex:"0x80000149",symbol:"AUDAX",name:"AUDAX"},330:{index:"330",hex:"0x8000014a",symbol:"LUNA",name:"Terra"},331:{index:"331",hex:"0x8000014b",symbol:"ZPM",name:"zPrime"},332:{index:"332",hex:"0x8000014c",symbol:"KUVA",name:"Kuva Utility Note"},333:{index:"333",hex:"0x8000014d",symbol:"MEM",name:"MemCoin"},334:{index:"334",hex:"0x8000014e",symbol:"CS",name:"Credits"},335:{index:"335",hex:"0x8000014f",symbol:"SWIFT",name:"SwiftCash"},336:{index:"336",hex:"0x80000150",symbol:"FIX",name:"FIX"},337:{index:"337",hex:"0x80000151",symbol:"CPC",name:"CPChain"},338:{index:"338",hex:"0x80000152",symbol:"VGO",name:"VirtualGoodsToken"},339:{index:"339",hex:"0x80000153",symbol:"DVT",name:"DeVault"},340:{index:"340",hex:"0x80000154",symbol:"N8V",name:"N8VCoin"},341:{index:"341",hex:"0x80000155",symbol:"MTNS",name:"OmotenashiCoin"},342:{index:"342",hex:"0x80000156",symbol:"BLAST",name:"BLAST"},343:{index:"343",hex:"0x80000157",symbol:"DCT",name:"DECENT"},344:{index:"344",hex:"0x80000158",symbol:"AUX",name:"Auxilium"},345:{index:"345",hex:"0x80000159",symbol:"USDP",name:"USDP"},346:{index:"346",hex:"0x8000015a",symbol:"HTDF",name:"HTDF"},347:{index:"347",hex:"0x8000015b",symbol:"YEC",name:"Ycash"},348:{index:"348",hex:"0x8000015c",symbol:"QLC",name:"QLC Chain"},349:{index:"349",hex:"0x8000015d",symbol:"TEA",name:"Icetea Blockchain"},350:{index:"350",hex:"0x8000015e",symbol:"ARW",name:"ArrowChain"},351:{index:"351",hex:"0x8000015f",symbol:"MDM",name:"Medium"},352:{index:"352",hex:"0x80000160",symbol:"CYB",name:"Cybex"},353:{index:"353",hex:"0x80000161",symbol:"LTO",name:"LTO Network"},354:{index:"354",hex:"0x80000162",symbol:"DOT",name:"Polkadot"},355:{index:"355",hex:"0x80000163",symbol:"AEON",name:"Aeon"},356:{index:"356",hex:"0x80000164",symbol:"RES",name:"Resistance"},357:{index:"357",hex:"0x80000165",symbol:"AYA",name:"Aryacoin"},358:{index:"358",hex:"0x80000166",symbol:"DAPS",name:"Dapscoin"},359:{index:"359",hex:"0x80000167",symbol:"CSC",name:"CasinoCoin"},360:{index:"360",hex:"0x80000168",symbol:"VSYS",name:"V Systems"},361:{index:"361",hex:"0x80000169",symbol:"NOLLAR",name:"Nollar"},362:{index:"362",hex:"0x8000016a",symbol:"XNOS",name:"NOS"},363:{index:"363",hex:"0x8000016b",symbol:"CPU",name:"CPUchain"},364:{index:"364",hex:"0x8000016c",symbol:"LAMB",name:"Lambda Storage Chain"},365:{index:"365",hex:"0x8000016d",symbol:"VCT",name:"ValueCyber"},366:{index:"366",hex:"0x8000016e",symbol:"CZR",name:"Canonchain"},367:{index:"367",hex:"0x8000016f",symbol:"ABBC",name:"ABBC"},368:{index:"368",hex:"0x80000170",symbol:"HET",name:"HET"},369:{index:"369",hex:"0x80000171",symbol:"XAS",name:"Asch"},370:{index:"370",hex:"0x80000172",symbol:"VDL",name:"Vidulum"},371:{index:"371",hex:"0x80000173",symbol:"MED",name:"MediBloc"},372:{index:"372",hex:"0x80000174",symbol:"ZVC",name:"ZVChain"},373:{index:"373",hex:"0x80000175",symbol:"VESTX",name:"Vestx"},374:{index:"374",hex:"0x80000176",symbol:"DBT",name:"DarkBit"},375:{index:"375",hex:"0x80000177",symbol:"SEOS",name:"SuperEOS"},376:{index:"376",hex:"0x80000178",symbol:"MXW",name:"Maxonrow"},377:{index:"377",hex:"0x80000179",symbol:"ZNZ",name:"ZENZO"},378:{index:"378",hex:"0x8000017a",symbol:"XCX",name:"XChain"},379:{index:"379",hex:"0x8000017b",symbol:"SOX",name:"SonicX"},380:{index:"380",hex:"0x8000017c",symbol:"NYZO",name:"Nyzo"},381:{index:"381",hex:"0x8000017d",symbol:"ULC",name:"ULCoin"},382:{index:"382",hex:"0x8000017e",symbol:"RYO",name:"Ryo Currency"},383:{index:"383",hex:"0x8000017f",symbol:"KAL",name:"Kaleidochain"},384:{index:"384",hex:"0x80000180",symbol:"XSN",name:"Stakenet"},385:{index:"385",hex:"0x80000181",symbol:"DOGEC",name:"DogeCash"},386:{index:"386",hex:"0x80000182",symbol:"BMV",name:"Bitcoin Matteo's Vision"},387:{index:"387",hex:"0x80000183",symbol:"QBC",name:"Quebecoin"},388:{index:"388",hex:"0x80000184",symbol:"IMG",name:"ImageCoin"},389:{index:"389",hex:"0x80000185",symbol:"QOS",name:"QOS"},390:{index:"390",hex:"0x80000186",symbol:"PKT",name:"PKT"},391:{index:"391",hex:"0x80000187",symbol:"LHD",name:"LitecoinHD"},392:{index:"392",hex:"0x80000188",symbol:"CENNZ",name:"CENNZnet"},393:{index:"393",hex:"0x80000189",symbol:"HSN",name:"Hyper Speed Network"},394:{index:"394",hex:"0x8000018a",symbol:"CRO",name:"Crypto Chain"},395:{index:"395",hex:"0x8000018b",symbol:"UMBRU",name:"Umbru"},396:{index:"396",hex:"0x8000018c",symbol:"EVER",name:"Everscale"},397:{index:"397",hex:"0x8000018d",symbol:"NEAR",name:"NEAR Protocol"},398:{index:"398",hex:"0x8000018e",symbol:"XPC",name:"XPChain"},399:{index:"399",hex:"0x8000018f",symbol:"ZOC",name:"01coin"},400:{index:"400",hex:"0x80000190",symbol:"NIX",name:"NIX"},401:{index:"401",hex:"0x80000191",symbol:"UC",name:"Utopiacoin"},402:{index:"402",hex:"0x80000192",symbol:"GALI",name:"Galilel"},403:{index:"403",hex:"0x80000193",symbol:"OLT",name:"Oneledger"},404:{index:"404",hex:"0x80000194",symbol:"XBI",name:"XBI"},405:{index:"405",hex:"0x80000195",symbol:"DONU",name:"DONU"},406:{index:"406",hex:"0x80000196",symbol:"EARTHS",name:"Earths"},407:{index:"407",hex:"0x80000197",symbol:"HDD",name:"HDDCash"},408:{index:"408",hex:"0x80000198",symbol:"SUGAR",name:"Sugarchain"},409:{index:"409",hex:"0x80000199",symbol:"AILE",name:"AileCoin"},410:{index:"410",hex:"0x8000019a",symbol:"TENT",name:"TENT"},411:{index:"411",hex:"0x8000019b",symbol:"TAN",name:"Tangerine Network"},412:{index:"412",hex:"0x8000019c",symbol:"AIN",name:"AIN"},413:{index:"413",hex:"0x8000019d",symbol:"MSR",name:"Masari"},414:{index:"414",hex:"0x8000019e",symbol:"SUMO",name:"Sumokoin"},415:{index:"415",hex:"0x8000019f",symbol:"ETN",name:"Electroneum"},416:{index:"416",hex:"0x800001a0",symbol:"BYTZ",name:"BYTZ"},417:{index:"417",hex:"0x800001a1",symbol:"WOW",name:"Wownero"},418:{index:"418",hex:"0x800001a2",symbol:"XTNC",name:"XtendCash"},419:{index:"419",hex:"0x800001a3",symbol:"LTHN",name:"Lethean"},420:{index:"420",hex:"0x800001a4",symbol:"NODE",name:"NodeHost"},421:{index:"421",hex:"0x800001a5",symbol:"AGM",name:"Argoneum"},422:{index:"422",hex:"0x800001a6",symbol:"CCX",name:"Conceal Network"},423:{index:"423",hex:"0x800001a7",symbol:"TNET",name:"Title Network"},424:{index:"424",hex:"0x800001a8",symbol:"TELOS",name:"TelosCoin"},425:{index:"425",hex:"0x800001a9",symbol:"AION",name:"Aion"},426:{index:"426",hex:"0x800001aa",symbol:"BC",name:"Bitcoin Confidential"},427:{index:"427",hex:"0x800001ab",symbol:"KTV",name:"KmushiCoin"},428:{index:"428",hex:"0x800001ac",symbol:"ZCR",name:"ZCore"},429:{index:"429",hex:"0x800001ad",symbol:"ERG",name:"Ergo"},430:{index:"430",hex:"0x800001ae",symbol:"PESO",name:"Criptopeso"},431:{index:"431",hex:"0x800001af",symbol:"BTC2",name:"Bitcoin 2"},432:{index:"432",hex:"0x800001b0",symbol:"XRPHD",name:"XRPHD"},433:{index:"433",hex:"0x800001b1",symbol:"WE",name:"WE Coin"},434:{index:"434",hex:"0x800001b2",symbol:"KSM",name:"Kusama"},435:{index:"435",hex:"0x800001b3",symbol:"PCN",name:"Peepcoin"},436:{index:"436",hex:"0x800001b4",symbol:"NCH",name:"NetCloth"},437:{index:"437",hex:"0x800001b5",symbol:"ICU",name:"CHIPO"},438:{index:"438",hex:"0x800001b6",symbol:"FNSA",name:"FINSCHIA"},439:{index:"439",hex:"0x800001b7",symbol:"DTP",name:"DeVault Token Protocol"},440:{index:"440",hex:"0x800001b8",symbol:"BTCR",name:"Bitcoin Royale"},441:{index:"441",hex:"0x800001b9",symbol:"AERGO",name:"AERGO"},442:{index:"442",hex:"0x800001ba",symbol:"XTH",name:"Dothereum"},443:{index:"443",hex:"0x800001bb",symbol:"LV",name:"Lava"},444:{index:"444",hex:"0x800001bc",symbol:"PHR",name:"Phore"},445:{index:"445",hex:"0x800001bd",symbol:"VITAE",name:"Vitae"},446:{index:"446",hex:"0x800001be",symbol:"COCOS",name:"Cocos-BCX"},447:{index:"447",hex:"0x800001bf",symbol:"DIN",name:"Dinero"},448:{index:"448",hex:"0x800001c0",symbol:"SPL",name:"Simplicity"},449:{index:"449",hex:"0x800001c1",symbol:"YCE",name:"MYCE"},450:{index:"450",hex:"0x800001c2",symbol:"XLR",name:"Solaris"},451:{index:"451",hex:"0x800001c3",symbol:"KTS",name:"Klimatas"},452:{index:"452",hex:"0x800001c4",symbol:"DGLD",name:"DGLD"},453:{index:"453",hex:"0x800001c5",symbol:"XNS",name:"Insolar"},454:{index:"454",hex:"0x800001c6",symbol:"EM",name:"EMPOW"},455:{index:"455",hex:"0x800001c7",symbol:"SHN",name:"ShineBlocks"},456:{index:"456",hex:"0x800001c8",symbol:"SEELE",name:"Seele"},457:{index:"457",hex:"0x800001c9",symbol:"AE",name:"æternity"},458:{index:"458",hex:"0x800001ca",symbol:"ODX",name:"ObsidianX"},459:{index:"459",hex:"0x800001cb",symbol:"KAVA",name:"Kava"},460:{index:"460",hex:"0x800001cc",symbol:"GLEEC",name:"GLEEC"},461:{index:"461",hex:"0x800001cd",symbol:"FIL",name:"Filecoin"},462:{index:"462",hex:"0x800001ce",symbol:"RUTA",name:"Rutanio"},463:{index:"463",hex:"0x800001cf",symbol:"CSDT",name:"CSDT"},464:{index:"464",hex:"0x800001d0",symbol:"ETI",name:"EtherInc"},465:{index:"465",hex:"0x800001d1",symbol:"ZSLP",name:"Zclassic Simple Ledger Protocol"},466:{index:"466",hex:"0x800001d2",symbol:"ERE",name:"EtherCore"},467:{index:"467",hex:"0x800001d3",symbol:"DX",name:"DxChain Token"},468:{index:"468",hex:"0x800001d4",symbol:"CPS",name:"Capricoin+"},469:{index:"469",hex:"0x800001d5",symbol:"BTH",name:"Bithereum"},470:{index:"470",hex:"0x800001d6",symbol:"MESG",name:"MESG"},471:{index:"471",hex:"0x800001d7",symbol:"FIMK",name:"FIMK"},472:{index:"472",hex:"0x800001d8",symbol:"AR",name:"Arweave"},473:{index:"473",hex:"0x800001d9",symbol:"OGO",name:"Origo"},474:{index:"474",hex:"0x800001da",symbol:"ROSE",name:"Oasis Network"},475:{index:"475",hex:"0x800001db",symbol:"BARE",name:"BARE Network"},476:{index:"476",hex:"0x800001dc",symbol:"GLEEC",name:"GleecBTC"},477:{index:"477",hex:"0x800001dd",symbol:"CLR",name:"Color Coin"},478:{index:"478",hex:"0x800001de",symbol:"RNG",name:"Ring"},479:{index:"479",hex:"0x800001df",symbol:"OLO",name:"Tool Global"},480:{index:"480",hex:"0x800001e0",symbol:"PEXA",name:"Pexa"},481:{index:"481",hex:"0x800001e1",symbol:"MOON",name:"Mooncoin"},482:{index:"482",hex:"0x800001e2",symbol:"OCEAN",name:"Ocean Protocol"},483:{index:"483",hex:"0x800001e3",symbol:"BNT",name:"Bluzelle Native"},484:{index:"484",hex:"0x800001e4",symbol:"AMO",name:"AMO Blockchain"},485:{index:"485",hex:"0x800001e5",symbol:"FCH",name:"FreeCash"},486:{index:"486",hex:"0x800001e6",symbol:"LAT",name:"PlatON"},487:{index:"487",hex:"0x800001e7",symbol:"COIN",name:"Bitcoin Bank"},488:{index:"488",hex:"0x800001e8",symbol:"VEO",name:"Amoveo"},489:{index:"489",hex:"0x800001e9",symbol:"CCA",name:"Counos Coin"},490:{index:"490",hex:"0x800001ea",symbol:"GFN",name:"Graphene"},491:{index:"491",hex:"0x800001eb",symbol:"BIP",name:"Minter Network"},492:{index:"492",hex:"0x800001ec",symbol:"KPG",name:"Kunpeng Network"},493:{index:"493",hex:"0x800001ed",symbol:"FIN",name:"FINL Chain"},494:{index:"494",hex:"0x800001ee",symbol:"BAND",name:"Band"},495:{index:"495",hex:"0x800001ef",symbol:"DROP",name:"Dropil"},496:{index:"496",hex:"0x800001f0",symbol:"BHT",name:"Bluehelix Chain"},497:{index:"497",hex:"0x800001f1",symbol:"LYRA",name:"Scrypta"},498:{index:"498",hex:"0x800001f2",symbol:"CS",name:"Credits"},499:{index:"499",hex:"0x800001f3",symbol:"RUPX",name:"Rupaya"},500:{index:"500",hex:"0x800001f4",symbol:"THETA",name:"Theta"},501:{index:"501",hex:"0x800001f5",symbol:"SOL",name:"Solana"},502:{index:"502",hex:"0x800001f6",symbol:"THT",name:"ThoughtAI"},503:{index:"503",hex:"0x800001f7",symbol:"CFX",name:"Conflux"},504:{index:"504",hex:"0x800001f8",symbol:"KUMA",name:"Kumacoin"},505:{index:"505",hex:"0x800001f9",symbol:"HASH",name:"Provenance"},506:{index:"506",hex:"0x800001fa",symbol:"CSPR",name:"Casper"},507:{index:"507",hex:"0x800001fb",symbol:"EARTH",name:"EARTH"},508:{index:"508",hex:"0x800001fc",symbol:"EGLD",name:"MultiversX"},509:{index:"509",hex:"0x800001fd",symbol:"CHI",name:"Xaya"},510:{index:"510",hex:"0x800001fe",symbol:"KOTO",name:"Koto"},511:{index:"511",hex:"0x800001ff",symbol:"OTC",name:"θ"},512:{index:"512",hex:"0x80000200",symbol:"RXD",name:"Radiant"},513:{index:"513",hex:"0x80000201",symbol:"SEELEN",name:"Seele-N"},514:{index:"514",hex:"0x80000202",symbol:"AETH",name:"AETH"},515:{index:"515",hex:"0x80000203",symbol:"DNA",name:"Idena"},516:{index:"516",hex:"0x80000204",symbol:"VEE",name:"Virtual Economy Era"},517:{index:"517",hex:"0x80000205",symbol:"SIERRA",name:"SierraCoin"},518:{index:"518",hex:"0x80000206",symbol:"LET",name:"Linkeye"},519:{index:"519",hex:"0x80000207",symbol:"BSC",name:"Bitcoin Smart Contract"},520:{index:"520",hex:"0x80000208",symbol:"BTCV",name:"BitcoinVIP"},521:{index:"521",hex:"0x80000209",symbol:"ABA",name:"Dabacus"},522:{index:"522",hex:"0x8000020a",symbol:"SCC",name:"StakeCubeCoin"},523:{index:"523",hex:"0x8000020b",symbol:"EDG",name:"Edgeware"},524:{index:"524",hex:"0x8000020c",symbol:"AMS",name:"AmsterdamCoin"},525:{index:"525",hex:"0x8000020d",symbol:"GOSS",name:"GOSSIP Coin"},526:{index:"526",hex:"0x8000020e",symbol:"BU",name:"BUMO"},527:{index:"527",hex:"0x8000020f",symbol:"GRAM",name:"GRAM"},528:{index:"528",hex:"0x80000210",symbol:"YAP",name:"Yapstone"},529:{index:"529",hex:"0x80000211",symbol:"SCRT",name:"Secret Network"},530:{index:"530",hex:"0x80000212",symbol:"NOVO",name:"Novo"},531:{index:"531",hex:"0x80000213",symbol:"GHOST",name:"Ghost"},532:{index:"532",hex:"0x80000214",symbol:"HST",name:"HST"},533:{index:"533",hex:"0x80000215",symbol:"PRJ",name:"ProjectCoin"},534:{index:"534",hex:"0x80000216",symbol:"YOU",name:"YOUChain"},535:{index:"535",hex:"0x80000217",symbol:"XHV",name:"Haven Protocol"},536:{index:"536",hex:"0x80000218",symbol:"BYND",name:"Beyondcoin"},537:{index:"537",hex:"0x80000219",symbol:"JOYS",name:"Joys Digital"},538:{index:"538",hex:"0x8000021a",symbol:"VAL",name:"Valorbit"},539:{index:"539",hex:"0x8000021b",symbol:"FLOW",name:"Flow"},540:{index:"540",hex:"0x8000021c",symbol:"SMESH",name:"Spacemesh Coin"},541:{index:"541",hex:"0x8000021d",symbol:"SCDO",name:"SCDO"},542:{index:"542",hex:"0x8000021e",symbol:"IQS",name:"IQ-Cash"},543:{index:"543",hex:"0x8000021f",symbol:"BIND",name:"Compendia"},544:{index:"544",hex:"0x80000220",symbol:"COINEVO",name:"Coinevo"},545:{index:"545",hex:"0x80000221",symbol:"SCRIBE",name:"Scribe"},546:{index:"546",hex:"0x80000222",symbol:"HYN",name:"Hyperion"},547:{index:"547",hex:"0x80000223",symbol:"BHP",name:"BHP"},548:{index:"548",hex:"0x80000224",symbol:"BBC",name:"BigBang Core"},549:{index:"549",hex:"0x80000225",symbol:"MKF",name:"MarketFinance"},550:{index:"550",hex:"0x80000226",symbol:"XDC",name:"XinFin"},551:{index:"551",hex:"0x80000227",symbol:"STR",name:"Straightedge"},552:{index:"552",hex:"0x80000228",symbol:"SUM",name:"Sumcoin"},553:{index:"553",hex:"0x80000229",symbol:"HBC",name:"HuobiChain"},555:{index:"555",hex:"0x8000022b",symbol:"BCS",name:"Bitcoin Smart"},556:{index:"556",hex:"0x8000022c",symbol:"KTS",name:"Kratos"},557:{index:"557",hex:"0x8000022d",symbol:"LKR",name:"Lkrcoin"},558:{index:"558",hex:"0x8000022e",symbol:"TAO",name:"Tao"},559:{index:"559",hex:"0x8000022f",symbol:"XWC",name:"Whitecoin"},560:{index:"560",hex:"0x80000230",symbol:"DEAL",name:"DEAL"},561:{index:"561",hex:"0x80000231",symbol:"NTY",name:"Nexty"},562:{index:"562",hex:"0x80000232",symbol:"TOP",name:"TOP NetWork"},564:{index:"564",hex:"0x80000234",symbol:"AG",name:"Agoric"},565:{index:"565",hex:"0x80000235",symbol:"CICO",name:"Coinicles"},566:{index:"566",hex:"0x80000236",symbol:"IRIS",name:"Irisnet"},567:{index:"567",hex:"0x80000237",symbol:"NCG",name:"Nine Chronicles"},568:{index:"568",hex:"0x80000238",symbol:"LRG",name:"Large Coin"},569:{index:"569",hex:"0x80000239",symbol:"SERO",name:"Super Zero Protocol"},570:{index:"570",hex:"0x8000023a",symbol:"BDX",name:"Beldex"},571:{index:"571",hex:"0x8000023b",symbol:"CCXX",name:"Counos X"},572:{index:"572",hex:"0x8000023c",symbol:"SLS",name:"Saluscoin"},573:{index:"573",hex:"0x8000023d",symbol:"SRM",name:"Serum"},575:{index:"575",hex:"0x8000023f",symbol:"VIVT",name:"VIDT Datalink"},576:{index:"576",hex:"0x80000240",symbol:"BPS",name:"BitcoinPoS"},577:{index:"577",hex:"0x80000241",symbol:"NKN",name:"NKN"},578:{index:"578",hex:"0x80000242",symbol:"ICL",name:"ILCOIN"},579:{index:"579",hex:"0x80000243",symbol:"BONO",name:"Bonorum"},580:{index:"580",hex:"0x80000244",symbol:"PLC",name:"PLATINCOIN"},581:{index:"581",hex:"0x80000245",symbol:"DUN",name:"Dune"},582:{index:"582",hex:"0x80000246",symbol:"DMCH",name:"Darmacash"},583:{index:"583",hex:"0x80000247",symbol:"CTC",name:"Creditcoin"},584:{index:"584",hex:"0x80000248",symbol:"KELP",name:"Haidai Network"},585:{index:"585",hex:"0x80000249",symbol:"GBCR",name:"GoldBCR"},586:{index:"586",hex:"0x8000024a",symbol:"XDAG",name:"XDAG"},587:{index:"587",hex:"0x8000024b",symbol:"PRV",name:"Incognito Privacy"},588:{index:"588",hex:"0x8000024c",symbol:"SCAP",name:"SafeCapital"},589:{index:"589",hex:"0x8000024d",symbol:"TFUEL",name:"Theta Fuel"},590:{index:"590",hex:"0x8000024e",symbol:"GTM",name:"Gentarium"},591:{index:"591",hex:"0x8000024f",symbol:"RNL",name:"RentalChain"},592:{index:"592",hex:"0x80000250",symbol:"GRIN",name:"Grin"},593:{index:"593",hex:"0x80000251",symbol:"MWC",name:"MimbleWimbleCoin"},594:{index:"594",hex:"0x80000252",symbol:"DOCK",name:"Dock"},595:{index:"595",hex:"0x80000253",symbol:"POLYX",name:"Polymesh"},596:{index:"596",hex:"0x80000254",symbol:"DIVER",name:"Divergenti"},597:{index:"597",hex:"0x80000255",symbol:"XEP",name:"Electra Protocol"},598:{index:"598",hex:"0x80000256",symbol:"APN",name:"Apron"},599:{index:"599",hex:"0x80000257",symbol:"TFC",name:"Turbo File Coin"},600:{index:"600",hex:"0x80000258",symbol:"UTE",name:"Unit-e"},601:{index:"601",hex:"0x80000259",symbol:"MTC",name:"Metacoin"},602:{index:"602",hex:"0x8000025a",symbol:"NC",name:"NobodyCash"},603:{index:"603",hex:"0x8000025b",symbol:"XINY",name:"Xinyuehu"},604:{index:"604",hex:"0x8000025c",symbol:"DYN",name:"Dynamo"},605:{index:"605",hex:"0x8000025d",symbol:"BUFS",name:"Buffer"},606:{index:"606",hex:"0x8000025e",symbol:"STOS",name:"Stratos"},607:{index:"607",hex:"0x8000025f",symbol:"TON",name:"TON"},608:{index:"608",hex:"0x80000260",symbol:"TAFT",name:"TAFT"},609:{index:"609",hex:"0x80000261",symbol:"HYDRA",name:"HYDRA"},610:{index:"610",hex:"0x80000262",symbol:"NOR",name:"Noir"},611:{index:"611",hex:"0x80000263",symbol:"",name:"Manta Network Private Asset"},612:{index:"612",hex:"0x80000264",symbol:"",name:"Calamari Network Private Asset"},613:{index:"613",hex:"0x80000265",symbol:"WCN",name:"Widecoin"},614:{index:"614",hex:"0x80000266",symbol:"OPT",name:"Optimistic Ethereum"},615:{index:"615",hex:"0x80000267",symbol:"PSWAP",name:"PolkaSwap"},616:{index:"616",hex:"0x80000268",symbol:"VAL",name:"Validator"},617:{index:"617",hex:"0x80000269",symbol:"XOR",name:"Sora"},618:{index:"618",hex:"0x8000026a",symbol:"SSP",name:"SmartShare"},619:{index:"619",hex:"0x8000026b",symbol:"DEI",name:"DeimosX"},621:{index:"621",hex:"0x8000026d",symbol:"ZERO",name:"Singularity"},622:{index:"622",hex:"0x8000026e",symbol:"ALPHA",name:"AlphaDAO"},623:{index:"623",hex:"0x8000026f",symbol:"BDECO",name:"BDCashProtocol Ecosystem"},624:{index:"624",hex:"0x80000270",symbol:"NOBL",name:"Nobility"},625:{index:"625",hex:"0x80000271",symbol:"EAST",name:"Eastcoin"},626:{index:"626",hex:"0x80000272",symbol:"KDA",name:"Kadena"},627:{index:"627",hex:"0x80000273",symbol:"SOUL",name:"Phantasma"},628:{index:"628",hex:"0x80000274",symbol:"LORE",name:"Gitopia"},629:{index:"629",hex:"0x80000275",symbol:"FNR",name:"Fincor"},630:{index:"630",hex:"0x80000276",symbol:"NEXUS",name:"Nexus"},631:{index:"631",hex:"0x80000277",symbol:"QTZ",name:"Quartz"},632:{index:"632",hex:"0x80000278",symbol:"MAS",name:"Massa"},633:{index:"633",hex:"0x80000279",symbol:"CALL",name:"Callchain"},634:{index:"634",hex:"0x8000027a",symbol:"VAL",name:"Validity"},635:{index:"635",hex:"0x8000027b",symbol:"POKT",name:"Pocket Network"},636:{index:"636",hex:"0x8000027c",symbol:"EMIT",name:"EMIT"},637:{index:"637",hex:"0x8000027d",symbol:"APTOS",name:"Aptos"},638:{index:"638",hex:"0x8000027e",symbol:"ADON",name:"ADON"},639:{index:"639",hex:"0x8000027f",symbol:"BTSG",name:"BitSong"},640:{index:"640",hex:"0x80000280",symbol:"LFC",name:"Leofcoin"},641:{index:"641",hex:"0x80000281",symbol:"KCS",name:"KuCoin Shares"},642:{index:"642",hex:"0x80000282",symbol:"KCC",name:"KuCoin Community Chain"},643:{index:"643",hex:"0x80000283",symbol:"AZERO",name:"Aleph Zero"},644:{index:"644",hex:"0x80000284",symbol:"TREE",name:"Tree"},645:{index:"645",hex:"0x80000285",symbol:"LX",name:"Lynx"},646:{index:"646",hex:"0x80000286",symbol:"XLN",name:"Lunarium"},647:{index:"647",hex:"0x80000287",symbol:"CIC",name:"CIC Chain"},648:{index:"648",hex:"0x80000288",symbol:"ZRB",name:"Zarb"},650:{index:"650",hex:"0x8000028a",symbol:"UCO",name:"Archethic"},651:{index:"651",hex:"0x8000028b",symbol:"SFX",name:"Safex Cash"},652:{index:"652",hex:"0x8000028c",symbol:"SFT",name:"Safex Token"},653:{index:"653",hex:"0x8000028d",symbol:"WSFX",name:"Wrapped Safex Cash"},654:{index:"654",hex:"0x8000028e",symbol:"USDG",name:"US Digital Gold"},655:{index:"655",hex:"0x8000028f",symbol:"WMP",name:"WAMP"},656:{index:"656",hex:"0x80000290",symbol:"EKTA",name:"Ekta"},657:{index:"657",hex:"0x80000291",symbol:"YDA",name:"YadaCoin"},658:{index:"658",hex:"0x80000292",symbol:"WHIVE",name:"Whive"},659:{index:"659",hex:"0x80000293",symbol:"KOIN",name:"Koinos"},660:{index:"660",hex:"0x80000294",symbol:"PIRATE",name:"PirateCash"},661:{index:"661",hex:"0x80000295",symbol:"UNQ",name:"Unique"},662:{index:"662",hex:"0x80000296",symbol:"ULM",name:"UltonSmartchain"},663:{index:"663",hex:"0x80000297",symbol:"SFRX",name:"EtherGem Sapphire"},664:{index:"664",hex:"0x80000298",symbol:"BSTY",name:"GlobalBoost-Y"},665:{index:"665",hex:"0x80000299",symbol:"IMP",name:"Impact Protocol"},666:{index:"666",hex:"0x8000029a",symbol:"ACT",name:"Achain"},667:{index:"667",hex:"0x8000029b",symbol:"PRKL",name:"Perkle"},668:{index:"668",hex:"0x8000029c",symbol:"SSC",name:"SelfSell"},669:{index:"669",hex:"0x8000029d",symbol:"GC",name:"GateChain"},670:{index:"670",hex:"0x8000029e",symbol:"PLGR",name:"Pledger"},671:{index:"671",hex:"0x8000029f",symbol:"MPLGR",name:"Pledger"},672:{index:"672",hex:"0x800002a0",symbol:"KNOX",name:"Knox"},673:{index:"673",hex:"0x800002a1",symbol:"ZED",name:"ZED"},674:{index:"674",hex:"0x800002a2",symbol:"CNDL",name:"Candle"},675:{index:"675",hex:"0x800002a3",symbol:"WLKR",name:"Walker Crypto Innovation Index"},676:{index:"676",hex:"0x800002a4",symbol:"WLKRR",name:"Walker"},677:{index:"677",hex:"0x800002a5",symbol:"YUNGE",name:"Yunge"},678:{index:"678",hex:"0x800002a6",symbol:"Voken",name:"Voken"},679:{index:"679",hex:"0x800002a7",symbol:"APL",name:"Apollo"},680:{index:"680",hex:"0x800002a8",symbol:"Evrynet",name:"Evrynet"},681:{index:"681",hex:"0x800002a9",symbol:"NENG",name:"Nengcoin"},682:{index:"682",hex:"0x800002aa",symbol:"CHTA",name:"Cheetahcoin"},683:{index:"683",hex:"0x800002ab",symbol:"ALEO",name:"Aleo Network"},684:{index:"684",hex:"0x800002ac",symbol:"HMS",name:"Hemis"},685:{index:"685",hex:"0x800002ad",symbol:"OAS",name:"Oasys"},686:{index:"686",hex:"0x800002ae",symbol:"KAR",name:"Karura Network"},687:{index:"687",hex:"0x800002af",symbol:"FLON",name:"FullOn Network"},688:{index:"688",hex:"0x800002b0",symbol:"CET",name:"CoinEx Chain"},689:{index:"689",hex:"0x800002b1",symbol:"XLINK",name:"XLink Chain"},690:{index:"690",hex:"0x800002b2",symbol:"KLV",name:"KleverChain"},694:{index:"694",hex:"0x800002b6",symbol:"VTBC",name:"VTB Community"},696:{index:"696",hex:"0x800002b8",symbol:"LUM",name:"Lumos"},698:{index:"698",hex:"0x800002ba",symbol:"VEIL",name:"Veil"},699:{index:"699",hex:"0x800002bb",symbol:"GTB",name:"GotaBit"},700:{index:"700",hex:"0x800002bc",symbol:"XDAI",name:"xDai"},701:{index:"701",hex:"0x800002bd",symbol:"COM",name:"Commercio"},702:{index:"702",hex:"0x800002be",symbol:"CCC",name:"Commercio Cash Credit"},703:{index:"703",hex:"0x800002bf",symbol:"SNR",name:"Sonr"},704:{index:"704",hex:"0x800002c0",symbol:"RAQ",name:"Ra Quantum"},705:{index:"705",hex:"0x800002c1",symbol:"PEG",name:"Pegasus Token"},706:{index:"706",hex:"0x800002c2",symbol:"LKG",name:"Lionking"},707:{index:"707",hex:"0x800002c3",symbol:"MCOIN",name:"Moneta Coin"},709:{index:"709",hex:"0x800002c5",symbol:"AVAIL",name:"Avail"},710:{index:"710",hex:"0x800002c6",symbol:"FURY",name:"Highbury"},711:{index:"711",hex:"0x800002c7",symbol:"CHC",name:"Chaincoin"},712:{index:"712",hex:"0x800002c8",symbol:"SERF",name:"Serfnet"},713:{index:"713",hex:"0x800002c9",symbol:"XTL",name:"Katal Chain"},714:{index:"714",hex:"0x800002ca",symbol:"BNB",name:"Binance"},715:{index:"715",hex:"0x800002cb",symbol:"SIN",name:"Sinovate"},716:{index:"716",hex:"0x800002cc",symbol:"DLN",name:"Delion"},717:{index:"717",hex:"0x800002cd",symbol:"BONTE",name:"Bontecoin"},718:{index:"718",hex:"0x800002ce",symbol:"PEER",name:"Peer"},719:{index:"719",hex:"0x800002cf",symbol:"ZET",name:"Zetacoin"},720:{index:"720",hex:"0x800002d0",symbol:"ABY",name:"Artbyte"},721:{index:"721",hex:"0x800002d1",symbol:"PGX",name:"Mirai Chain"},722:{index:"722",hex:"0x800002d2",symbol:"IL8P",name:"InfiniLooP"},723:{index:"723",hex:"0x800002d3",symbol:"VOI",name:"Voi"},724:{index:"724",hex:"0x800002d4",symbol:"XVC",name:"Vanillacash"},725:{index:"725",hex:"0x800002d5",symbol:"MCX",name:"MultiCash"},727:{index:"727",hex:"0x800002d7",symbol:"BLU",name:"BluCrates"},728:{index:"728",hex:"0x800002d8",symbol:"BFC",name:"BFC"},730:{index:"730",hex:"0x800002da",symbol:"HEALIOS",name:"Tenacity"},731:{index:"731",hex:"0x800002db",symbol:"BMK",name:"Bitmark"},734:{index:"734",hex:"0x800002de",symbol:"DENTX",name:"DENTNet"},737:{index:"737",hex:"0x800002e1",symbol:"ATOP",name:"Financial Blockchain"},738:{index:"738",hex:"0x800002e2",symbol:"BTE",name:"Bitweb"},739:{index:"739",hex:"0x800002e3",symbol:"DPC",name:"Dpowcoin (DualPowCoin)"},747:{index:"747",hex:"0x800002eb",symbol:"CFG",name:"Centrifuge"},750:{index:"750",hex:"0x800002ee",symbol:"XPRT",name:"Persistence"},753:{index:"753",hex:"0x800002f1",symbol:"",name:"Age X25519 Encryption"},754:{index:"754",hex:"0x800002f2",symbol:"",name:"Age NIST Encryption"},757:{index:"757",hex:"0x800002f5",symbol:"HONEY",name:"HoneyWood"},765:{index:"765",hex:"0x800002fd",symbol:"TGN",name:"Tagion"},768:{index:"768",hex:"0x80000300",symbol:"BALLZ",name:"Ballzcoin"},770:{index:"770",hex:"0x80000302",symbol:"COSA",name:"Cosanta"},771:{index:"771",hex:"0x80000303",symbol:"BR",name:"BR"},773:{index:"773",hex:"0x80000305",symbol:"CSB",name:"CosmoBliss"},775:{index:"775",hex:"0x80000307",symbol:"PLSR",name:"Pulsar Coin"},776:{index:"776",hex:"0x80000308",symbol:"KEY",name:"Keymaker Coin"},777:{index:"777",hex:"0x80000309",symbol:"BTW",name:"Bitcoin World"},780:{index:"780",hex:"0x8000030c",symbol:"PLCUC",name:"PLC Ultima Classic"},781:{index:"781",hex:"0x8000030d",symbol:"PLCUX",name:"PLC Ultima X"},782:{index:"782",hex:"0x8000030e",symbol:"PLCU",name:"PLC Ultima"},783:{index:"783",hex:"0x8000030f",symbol:"SMARTBC",name:"SMART Blockchain"},784:{index:"784",hex:"0x80000310",symbol:"SUI",name:"Sui"},786:{index:"786",hex:"0x80000312",symbol:"UIDD",name:"UIDD"},787:{index:"787",hex:"0x80000313",symbol:"ACA",name:"Acala"},788:{index:"788",hex:"0x80000314",symbol:"BNC",name:"Bifrost"},789:{index:"789",hex:"0x80000315",symbol:"TAU",name:"Lamden"},794:{index:"794",hex:"0x8000031a",symbol:"INTR",name:"Interlay"},795:{index:"795",hex:"0x8000031b",symbol:"KINT",name:"Kintsugi"},799:{index:"799",hex:"0x8000031f",symbol:"PDEX",name:"Polkadex"},800:{index:"800",hex:"0x80000320",symbol:"BEET",name:"Beetle Coin"},801:{index:"801",hex:"0x80000321",symbol:"DST",name:"DSTRA"},802:{index:"802",hex:"0x80000322",symbol:"CY",name:"Cyberyen"},803:{index:"803",hex:"0x80000323",symbol:"RYME",name:"Ryme Network"},804:{index:"804",hex:"0x80000324",symbol:"ZKS",name:"zkSync"},805:{index:"805",hex:"0x80000325",symbol:"SCASH",name:"Scash"},808:{index:"808",hex:"0x80000328",symbol:"QVT",name:"Qvolta"},809:{index:"809",hex:"0x80000329",symbol:"SDN",name:"Shiden Network"},810:{index:"810",hex:"0x8000032a",symbol:"ASTR",name:"Astar Network"},813:{index:"813",hex:"0x8000032d",symbol:"MEER",name:"Qitmeer"},815:{index:"815",hex:"0x8000032f",symbol:"FACT",name:"ImFACT"},816:{index:"816",hex:"0x80000330",symbol:"FSC",name:"FSC"},818:{index:"818",hex:"0x80000332",symbol:"VET",name:"VeChain Token"},819:{index:"819",hex:"0x80000333",symbol:"REEF",name:"Reef"},820:{index:"820",hex:"0x80000334",symbol:"CLO",name:"Callisto"},822:{index:"822",hex:"0x80000336",symbol:"BDB",name:"BigchainDB"},824:{index:"824",hex:"0x80000338",symbol:"RBNT",name:"Redbelly Network"},827:{index:"827",hex:"0x8000033b",symbol:"ACE",name:"Endurance"},828:{index:"828",hex:"0x8000033c",symbol:"CCN",name:"ComputeCoin"},829:{index:"829",hex:"0x8000033d",symbol:"BBA",name:"BBACHAIN"},831:{index:"831",hex:"0x8000033f",symbol:"CRUZ",name:"cruzbit"},832:{index:"832",hex:"0x80000340",symbol:"SAPP",name:"Sapphire"},833:{index:"833",hex:"0x80000341",symbol:"777",name:"Jackpot"},834:{index:"834",hex:"0x80000342",symbol:"KYAN",name:"Kyanite"},835:{index:"835",hex:"0x80000343",symbol:"AZR",name:"Azzure"},836:{index:"836",hex:"0x80000344",symbol:"CFL",name:"CryptoFlow"},837:{index:"837",hex:"0x80000345",symbol:"DASHD",name:"Dash Diamond"},838:{index:"838",hex:"0x80000346",symbol:"TRTT",name:"Trittium"},839:{index:"839",hex:"0x80000347",symbol:"UCR",name:"Ultra Clear"},840:{index:"840",hex:"0x80000348",symbol:"PNY",name:"Peony"},841:{index:"841",hex:"0x80000349",symbol:"BECN",name:"Beacon"},842:{index:"842",hex:"0x8000034a",symbol:"MONK",name:"Monk"},843:{index:"843",hex:"0x8000034b",symbol:"SAGA",name:"CryptoSaga"},844:{index:"844",hex:"0x8000034c",symbol:"SUV",name:"Suvereno"},845:{index:"845",hex:"0x8000034d",symbol:"ESK",name:"EskaCoin"},846:{index:"846",hex:"0x8000034e",symbol:"OWO",name:"OneWorld Coin"},847:{index:"847",hex:"0x8000034f",symbol:"PEPS",name:"PEPS Coin"},848:{index:"848",hex:"0x80000350",symbol:"BIR",name:"Birake"},849:{index:"849",hex:"0x80000351",symbol:"MOBIC",name:"MobilityCoin"},850:{index:"850",hex:"0x80000352",symbol:"FLS",name:"Flits"},851:{index:"851",hex:"0x80000353",symbol:"FRECO",name:"Freco"},852:{index:"852",hex:"0x80000354",symbol:"DSM",name:"Desmos"},853:{index:"853",hex:"0x80000355",symbol:"PRCY",name:"PRCY Coin"},858:{index:"858",hex:"0x8000035a",symbol:"HVH",name:"HAVAH"},866:{index:"866",hex:"0x80000362",symbol:"MOB",name:"MobileCoin"},868:{index:"868",hex:"0x80000364",symbol:"IF",name:"Infinitefuture"},877:{index:"877",hex:"0x8000036d",symbol:"NAM",name:"Namada"},878:{index:"878",hex:"0x8000036e",symbol:"SCR",name:"Scorum Network"},880:{index:"880",hex:"0x80000370",symbol:"LUM",name:"Lum Network"},883:{index:"883",hex:"0x80000373",symbol:"ZBC",name:"ZooBC"},886:{index:"886",hex:"0x80000376",symbol:"ADF",name:"AD Token"},888:{index:"888",hex:"0x80000378",symbol:"NEO",name:"NEO"},889:{index:"889",hex:"0x80000379",symbol:"TOMO",name:"TOMO"},890:{index:"890",hex:"0x8000037a",symbol:"XSEL",name:"Seln"},896:{index:"896",hex:"0x80000380",symbol:"LKSC",name:"LKSCoin"},898:{index:"898",hex:"0x80000382",symbol:"AS",name:"Assetchain"},899:{index:"899",hex:"0x80000383",symbol:"XEC",name:"eCash"},900:{index:"900",hex:"0x80000384",symbol:"LMO",name:"Lumeneo"},901:{index:"901",hex:"0x80000385",symbol:"NXT",name:"NxtMeta"},904:{index:"904",hex:"0x80000388",symbol:"HNT",name:"Helium"},907:{index:"907",hex:"0x8000038b",symbol:"FIS",name:"StaFi"},909:{index:"909",hex:"0x8000038d",symbol:"SGE",name:"Saage"},911:{index:"911",hex:"0x8000038f",symbol:"GERT",name:"Gert"},913:{index:"913",hex:"0x80000391",symbol:"VARA",name:"Vara Network"},916:{index:"916",hex:"0x80000394",symbol:"META",name:"Metadium"},917:{index:"917",hex:"0x80000395",symbol:"FRA",name:"Findora"},919:{index:"919",hex:"0x80000397",symbol:"CCD",name:"Concordium"},921:{index:"921",hex:"0x80000399",symbol:"AVN",name:"Avian Network"},925:{index:"925",hex:"0x8000039d",symbol:"DIP",name:"Dipper Network"},928:{index:"928",hex:"0x800003a0",symbol:"GHM",name:"HermitMatrixNetwork"},931:{index:"931",hex:"0x800003a3",symbol:"RUNE",name:"THORChain (RUNE)"},938:{index:"938",hex:"0x800003aa",symbol:"MGO",name:"Mango Network"},939:{index:"939",hex:"0x800003ab",symbol:"AB",name:"Argot Protocol"},942:{index:"942",hex:"0x800003ae",symbol:"KCN",name:"Kylacoin"},943:{index:"943",hex:"0x800003af",symbol:"LCN",name:"Lyncoin"},945:{index:"945",hex:"0x800003b1",symbol:"UNLOCK",name:"Jasiri protocol"},955:{index:"955",hex:"0x800003bb",symbol:"LTP",name:"LifetionCoin"},958:{index:"958",hex:"0x800003be",symbol:"",name:"KickSoccer"},960:{index:"960",hex:"0x800003c0",symbol:"VKAX",name:"Vkax"},966:{index:"966",hex:"0x800003c6",symbol:"MATIC",name:"Matic"},968:{index:"968",hex:"0x800003c8",symbol:"UNW",name:"UNW"},969:{index:"969",hex:"0x800003c9",symbol:"QI",name:"Quai Network"},970:{index:"970",hex:"0x800003ca",symbol:"TWINS",name:"TWINS"},977:{index:"977",hex:"0x800003d1",symbol:"TLOS",name:"Telos"},981:{index:"981",hex:"0x800003d5",symbol:"TAFECO",name:"Taf ECO Chain"},985:{index:"985",hex:"0x800003d9",symbol:"AU",name:"Autonomy"},987:{index:"987",hex:"0x800003db",symbol:"VCG",name:"VipCoin"},988:{index:"988",hex:"0x800003dc",symbol:"XAZAB",name:"Xazab core"},989:{index:"989",hex:"0x800003dd",symbol:"AIOZ",name:"AIOZ"},990:{index:"990",hex:"0x800003de",symbol:"CORE",name:"Coreum"},991:{index:"991",hex:"0x800003df",symbol:"PEC",name:"Phoenix"},992:{index:"992",hex:"0x800003e0",symbol:"UNT",name:"Unit"},993:{index:"993",hex:"0x800003e1",symbol:"XRB",name:"X Currency"},994:{index:"994",hex:"0x800003e2",symbol:"QUAI",name:"Quai Network"},995:{index:"995",hex:"0x800003e3",symbol:"CAPS",name:"Ternoa"},996:{index:"996",hex:"0x800003e4",symbol:"OKT",name:"OKChain Token"},997:{index:"997",hex:"0x800003e5",symbol:"SUM",name:"Solidum"},998:{index:"998",hex:"0x800003e6",symbol:"LBTC",name:"Lightning Bitcoin"},999:{index:"999",hex:"0x800003e7",symbol:"BCD",name:"Bitcoin Diamond"},1e3:{index:"1000",hex:"0x800003e8",symbol:"BTN",name:"Bitcoin New"},1001:{index:"1001",hex:"0x800003e9",symbol:"TT",name:"ThunderCore"},1002:{index:"1002",hex:"0x800003ea",symbol:"BKT",name:"BanKitt"},1003:{index:"1003",hex:"0x800003eb",symbol:"NODL",name:"Nodle"},1004:{index:"1004",hex:"0x800003ec",symbol:"PCOIN",name:"PCOIN"},1005:{index:"1005",hex:"0x800003ed",symbol:"TAO",name:"Bittensor"},1006:{index:"1006",hex:"0x800003ee",symbol:"HSK",name:"HashKey Chain"},1007:{index:"1007",hex:"0x800003ef",symbol:"FTM",name:"Fantom"},1008:{index:"1008",hex:"0x800003f0",symbol:"RPG",name:"RPG"},1009:{index:"1009",hex:"0x800003f1",symbol:"LAKE",name:"iconLake"},1010:{index:"1010",hex:"0x800003f2",symbol:"HT",name:"Huobi ECO Chain"},1011:{index:"1011",hex:"0x800003f3",symbol:"ELV",name:"Eluvio"},1012:{index:"1012",hex:"0x800003f4",symbol:"JOC",name:"Japan Open Chain"},1013:{index:"1013",hex:"0x800003f5",symbol:"BIC",name:"Beincrypto"},1014:{index:"1014",hex:"0x800003f6",symbol:"JOY",name:"Joystream"},1015:{index:"1015",hex:"0x800003f7",symbol:"ZCX",name:"ZEN Exchange Token"},1020:{index:"1020",hex:"0x800003fc",symbol:"EVC",name:"Evrice"},1022:{index:"1022",hex:"0x800003fe",symbol:"XRD",name:"Radix DLT"},1023:{index:"1023",hex:"0x800003ff",symbol:"ONE",name:"HARMONY-ONE (Legacy)"},1024:{index:"1024",hex:"0x80000400",symbol:"ONT",name:"Ontology"},1025:{index:"1025",hex:"0x80000401",symbol:"CZZ",name:"Classzz"},1026:{index:"1026",hex:"0x80000402",symbol:"KEX",name:"Kira Exchange Token"},1027:{index:"1027",hex:"0x80000403",symbol:"MCM",name:"Mochimo"},1028:{index:"1028",hex:"0x80000404",symbol:"PLS",name:"Pulse Coin"},1032:{index:"1032",hex:"0x80000408",symbol:"BTCR",name:"BTCR"},1042:{index:"1042",hex:"0x80000412",symbol:"MFID",name:"Moonfish ID"},1111:{index:"1111",hex:"0x80000457",symbol:"BBC",name:"Big Bitcoin"},1116:{index:"1116",hex:"0x8000045c",symbol:"CORE",name:"Core"},1120:{index:"1120",hex:"0x80000460",symbol:"RISE",name:"RISE"},1122:{index:"1122",hex:"0x80000462",symbol:"CMT",name:"CyberMiles Token"},1128:{index:"1128",hex:"0x80000468",symbol:"ETSC",name:"Ethereum Social"},1129:{index:"1129",hex:"0x80000469",symbol:"DFI",name:"DeFiChain"},1130:{index:"1130",hex:"0x8000046a",symbol:"DFI",name:"DeFiChain EVM Network"},1137:{index:"1137",hex:"0x80000471",symbol:"$DAG",name:"Constellation Labs"},1145:{index:"1145",hex:"0x80000479",symbol:"CDY",name:"Bitcoin Candy"},1155:{index:"1155",hex:"0x80000483",symbol:"ENJ",name:"Enjin Coin"},1170:{index:"1170",hex:"0x80000492",symbol:"HOO",name:"Hoo Smart Chain"},1234:{index:"1234",hex:"0x800004d2",symbol:"ALPH",name:"Alephium"},1236:{index:"1236",hex:"0x800004d4",symbol:"",name:"Masca"},1237:{index:"1237",hex:"0x800004d5",symbol:"",name:"Nostr"},1280:{index:"1280",hex:"0x80000500",symbol:"",name:"Kudos Setler"},1284:{index:"1284",hex:"0x80000504",symbol:"GLMR",name:"Moonbeam"},1285:{index:"1285",hex:"0x80000505",symbol:"MOVR",name:"Moonriver"},1286:{index:"1286",hex:"0x80000506",symbol:"DSG",name:"Dessage Social Protocol"},1298:{index:"1298",hex:"0x80000512",symbol:"WPC",name:"Wpc"},1308:{index:"1308",hex:"0x8000051c",symbol:"WEI",name:"WEI"},1312:{index:"1312",hex:"0x80000520",symbol:"BITS",name:"Entropy"},1337:{index:"1337",hex:"0x80000539",symbol:"DFC",name:"Defcoin"},1338:{index:"1338",hex:"0x8000053a",symbol:"IRON",name:"Iron Fish"},1348:{index:"1348",hex:"0x80000544",symbol:"ISLM",name:"IslamicCoin"},1397:{index:"1397",hex:"0x80000575",symbol:"HYC",name:"Hycon"},1410:{index:"1410",hex:"0x80000582",symbol:"TENTSLP",name:"TENT Simple Ledger Protocol"},1510:{index:"1510",hex:"0x800005e6",symbol:"XSC",name:"XT Smart Chain"},1512:{index:"1512",hex:"0x800005e8",symbol:"AAC",name:"Double-A Chain"},1524:{index:"1524",hex:"0x800005f4",symbol:"",name:"Taler"},1533:{index:"1533",hex:"0x800005fd",symbol:"BEAM",name:"Beam"},1536:{index:"1536",hex:"0x80000600",symbol:"GAS",name:"BubiChain"},1540:{index:"1540",hex:"0x80000604",symbol:"ATHENA",name:"Athena"},1551:{index:"1551",hex:"0x8000060f",symbol:"SDK",name:"Sovereign SDK"},1555:{index:"1555",hex:"0x80000613",symbol:"APC",name:"Apc Chain"},1616:{index:"1616",hex:"0x80000650",symbol:"ELF",name:"AELF"},1618:{index:"1618",hex:"0x80000652",symbol:"AUDL",name:"AUDL"},1620:{index:"1620",hex:"0x80000654",symbol:"ATH",name:"Atheios"},1627:{index:"1627",hex:"0x8000065b",symbol:"LUME",name:"Lume Web"},1642:{index:"1642",hex:"0x8000066a",symbol:"NEW",name:"Newton"},1657:{index:"1657",hex:"0x80000679",symbol:"BTA",name:"Btachain"},1668:{index:"1668",hex:"0x80000684",symbol:"NEOX",name:"Neoxa"},1669:{index:"1669",hex:"0x80000685",symbol:"MEWC",name:"Meowcoin"},1688:{index:"1688",hex:"0x80000698",symbol:"BCX",name:"BitcoinX"},1729:{index:"1729",hex:"0x800006c1",symbol:"XTZ",name:"Tezos"},1776:{index:"1776",hex:"0x800006f0",symbol:"LBTC",name:"Liquid BTC"},1777:{index:"1777",hex:"0x800006f1",symbol:"BBP",name:"Biblepay"},1784:{index:"1784",hex:"0x800006f8",symbol:"JPYS",name:"JPY Stablecoin"},1789:{index:"1789",hex:"0x800006fd",symbol:"VEGA",name:"Vega Protocol"},1815:{index:"1815",hex:"0x80000717",symbol:"ADA",name:"Cardano"},1818:{index:"1818",hex:"0x8000071a",symbol:"CUBE",name:"Cube Chain Native Token"},1856:{index:"1856",hex:"0x80000743",symbol:"TES",name:"Teslacoin"},1888:{index:"1888",hex:"0x80000760",symbol:"ZTX",name:"Zetrix"},1899:{index:"1899",hex:"0x8000076b",symbol:"XEC",name:"eCash token"},1900:{index:"1900",hex:"0x8000076c",symbol:"XNA",name:"Neurai"},1901:{index:"1901",hex:"0x8000076d",symbol:"CLC",name:"Classica"},1907:{index:"1907",hex:"0x80000773",symbol:"BITCI",name:"Bitcicoin"},1919:{index:"1919",hex:"0x8000077f",symbol:"VIPS",name:"VIPSTARCOIN"},1926:{index:"1926",hex:"0x80000786",symbol:"CITY",name:"City Coin"},1951:{index:"1951",hex:"0x8000079f",symbol:"ESA",name:"Esa"},1952:{index:"1952",hex:"0x800007a0",symbol:"ESC",name:"EsaCoin"},1955:{index:"1955",hex:"0x800007a3",symbol:"XX",name:"xx coin"},1977:{index:"1977",hex:"0x800007b9",symbol:"XMX",name:"Xuma"},1984:{index:"1984",hex:"0x800007c0",symbol:"TRTL",name:"TurtleCoin"},1985:{index:"1985",hex:"0x800007c1",symbol:"SLRT",name:"Solarti Chain"},1986:{index:"1986",hex:"0x800007c2",symbol:"QTH",name:"Qing Tong Horizon"},1987:{index:"1987",hex:"0x800007c3",symbol:"EGEM",name:"EtherGem"},1988:{index:"1988",hex:"0x800007c4",symbol:"MIRA",name:"Mira Chain"},1989:{index:"1989",hex:"0x800007c5",symbol:"HODL",name:"HOdlcoin"},1990:{index:"1990",hex:"0x800007c6",symbol:"PHL",name:"Placeholders"},1991:{index:"1991",hex:"0x800007c7",symbol:"SC",name:"Sia"},1996:{index:"1996",hex:"0x800007cc",symbol:"MYT",name:"Mineyourtime"},1997:{index:"1997",hex:"0x800007cd",symbol:"POLIS",name:"Polis"},1998:{index:"1998",hex:"0x800007ce",symbol:"XMCC",name:"Monoeci"},1999:{index:"1999",hex:"0x800007cf",symbol:"COLX",name:"ColossusXT"},2e3:{index:"2000",hex:"0x800007d0",symbol:"GIN",name:"GinCoin"},2001:{index:"2001",hex:"0x800007d1",symbol:"MNP",name:"MNPCoin"},2002:{index:"2002",hex:"0x800007d2",symbol:"MLN",name:"Miraland"},2015:{index:"2015",hex:"0x800007df",symbol:"TEER",name:"Integritee"},2017:{index:"2017",hex:"0x800007e1",symbol:"KIN",name:"Kin"},2018:{index:"2018",hex:"0x800007e2",symbol:"EOSC",name:"EOSClassic"},2019:{index:"2019",hex:"0x800007e3",symbol:"GBT",name:"GoldBean Token"},2020:{index:"2020",hex:"0x800007e4",symbol:"PKC",name:"PKC"},2021:{index:"2021",hex:"0x800007e5",symbol:"SKT",name:"Sukhavati"},2022:{index:"2022",hex:"0x800007e6",symbol:"XHT",name:"Xinghuo Token"},2023:{index:"2023",hex:"0x800007e7",symbol:"COC",name:"Chat On Chain"},2024:{index:"2024",hex:"0x800007e8",symbol:"USBC",name:"Universal Ledger USBC"},2025:{index:"2025",hex:"0x800007e9",symbol:"ROCK",name:"Zenrock Labs"},2026:{index:"2026",hex:"0x800007ea",symbol:"ASTRON",name:"ASTRON Token"},2046:{index:"2046",hex:"0x800007fe",symbol:"ANY",name:"Any"},2048:{index:"2048",hex:"0x80000800",symbol:"MCASH",name:"MCashChain"},2049:{index:"2049",hex:"0x80000801",symbol:"TRUE",name:"TrueChain"},2050:{index:"2050",hex:"0x80000802",symbol:"MOVO",name:"Movo Smart Chain"},2086:{index:"2086",hex:"0x80000826",symbol:"KILT",name:"KILT Spiritnet"},2091:{index:"2091",hex:"0x8000082b",symbol:"FRQCY",name:"Frequency"},2109:{index:"2109",hex:"0x8000083d",symbol:"SAMA",name:"Exosama Network"},2112:{index:"2112",hex:"0x80000840",symbol:"IoTE",name:"IoTE"},2125:{index:"2125",hex:"0x8000084d",symbol:"BAY",name:"BitBay"},2137:{index:"2137",hex:"0x80000859",symbol:"XRG",name:"Ergon"},2199:{index:"2199",hex:"0x80000897",symbol:"SAMA",name:"Moonsama Network"},2221:{index:"2221",hex:"0x800008ad",symbol:"ASK",name:"ASK"},2222:{index:"2222",hex:"0x800008ae",symbol:"CWEB",name:"Coinweb"},2285:{index:"2285",hex:"0x800008ed",symbol:"",name:"Qiyi Chain"},2301:{index:"2301",hex:"0x800008fd",symbol:"QTUM",name:"QTUM"},2302:{index:"2302",hex:"0x800008fe",symbol:"ETP",name:"Metaverse"},2303:{index:"2303",hex:"0x800008ff",symbol:"GXC",name:"GXChain"},2304:{index:"2304",hex:"0x80000900",symbol:"CRP",name:"CranePay"},2305:{index:"2305",hex:"0x80000901",symbol:"ELA",name:"Elastos"},2338:{index:"2338",hex:"0x80000922",symbol:"SNOW",name:"Snowblossom"},2365:{index:"2365",hex:"0x8000093d",symbol:"XIN",name:"Mixin"},2500:{index:"2500",hex:"0x800009c4",symbol:"NEXI",name:"Nexi"},2570:{index:"2570",hex:"0x80000a0a",symbol:"AOA",name:"Aurora"},2686:{index:"2686",hex:"0x80000a7e",symbol:"AIPG",name:"AIPowerGrid"},2718:{index:"2718",hex:"0x80000a9e",symbol:"NAS",name:"Nebulas"},2809:{index:"2809",hex:"0x80000af9",symbol:"LAN",name:"Lanify"},2894:{index:"2894",hex:"0x80000b4e",symbol:"REOSC",name:"REOSC Ecosystem"},2941:{index:"2941",hex:"0x80000b7d",symbol:"BND",name:"Blocknode"},3e3:{index:"3000",hex:"0x80000bb8",symbol:"SM",name:"Stealth Message"},3003:{index:"3003",hex:"0x80000bbb",symbol:"LUX",name:"LUX"},3030:{index:"3030",hex:"0x80000bd6",symbol:"HBAR",name:"Hedera HBAR"},3077:{index:"3077",hex:"0x80000c05",symbol:"COS",name:"Contentos"},3276:{index:"3276",hex:"0x80000ccc",symbol:"CCC",name:"CodeChain"},3333:{index:"3333",hex:"0x80000d05",symbol:"SXP",name:"Solar"},3338:{index:"3338",hex:"0x80000d0a",symbol:"PEAQ",name:"peaq"},3344:{index:"3344",hex:"0x80000d10",symbol:"PLMC",name:"Polimec"},3377:{index:"3377",hex:"0x80000d31",symbol:"ROI",name:"ROIcoin"},3381:{index:"3381",hex:"0x80000d35",symbol:"DYN",name:"Dynamic"},3383:{index:"3383",hex:"0x80000d37",symbol:"SEQ",name:"Sequence"},3434:{index:"3434",hex:"0x80000d6a",symbol:"PEPE",name:"Pepecoin Core"},3501:{index:"3501",hex:"0x80000dad",symbol:"JFIN",name:"JFIN Coin"},3552:{index:"3552",hex:"0x80000de0",symbol:"DEO",name:"Destocoin"},3564:{index:"3564",hex:"0x80000dec",symbol:"DST",name:"DeStream"},3601:{index:"3601",hex:"0x80000e11",symbol:"CY",name:"Cybits"},3757:{index:"3757",hex:"0x80000ead",symbol:"MPC",name:"Partisia Blockchain"},3840:{index:"3840",hex:"0x80000f00",symbol:"RED",name:"ReDeFi RED"},4040:{index:"4040",hex:"0x80000fc8",symbol:"FC8",name:"FCH Network"},4096:{index:"4096",hex:"0x80001000",symbol:"YEE",name:"YeeCo"},4218:{index:"4218",hex:"0x8000107a",symbol:"IOTA",name:"IOTA"},4219:{index:"4219",hex:"0x8000107b",symbol:"SMR",name:"Shimmer"},4242:{index:"4242",hex:"0x80001092",symbol:"AXE",name:"Axe"},4343:{index:"4343",hex:"0x800010f7",symbol:"XYM",name:"Symbol"},4444:{index:"4444",hex:"0x8000115c",symbol:"C4E",name:"Chain4Energy"},4919:{index:"4919",hex:"0x80001337",symbol:"XVM",name:"Venidium"},4999:{index:"4999",hex:"0x80001387",symbol:"BXN",name:"BlackFort Exchange Network"},5e3:{index:"5000",hex:"0x80001388",symbol:"V12",name:"Vet The Vote"},5006:{index:"5006",hex:"0x8000138e",symbol:"SBC",name:"Senior Blockchain"},5248:{index:"5248",hex:"0x80001480",symbol:"FIC",name:"FIC"},5353:{index:"5353",hex:"0x800014e9",symbol:"HNS",name:"Handshake"},5404:{index:"5404",hex:"0x8000151c",symbol:"ISK",name:"ISKRA"},5467:{index:"5467",hex:"0x8000155b",symbol:"ALTME",name:"ALTME"},5555:{index:"5555",hex:"0x800015b3",symbol:"FUND",name:"Unification"},5757:{index:"5757",hex:"0x8000167d",symbol:"STX",name:"Stacks"},5895:{index:"5895",hex:"0x80001707",symbol:"VOW",name:"VowChain VOW"},5920:{index:"5920",hex:"0x80001720",symbol:"SLU",name:"SILUBIUM"},5995:{index:"5995",hex:"0x8000176B",symbol:"DUSK",name:"Dusk Network"},6060:{index:"6060",hex:"0x800017ac",symbol:"GO",name:"GoChain GO"},6144:{index:"6144",hex:"0x80001800",symbol:"DTS",name:"Datos"},6174:{index:"6174",hex:"0x8000181e",symbol:"MOI",name:"My Own Internet"},6278:{index:"6278",hex:"0x80001886",symbol:"STEAMX",name:"Rails Network Mainnet"},6532:{index:"6532",hex:"0x80001984",symbol:"UM",name:"Penumbra"},6599:{index:"6599",hex:"0x800019c7",symbol:"RSC",name:"Royal Sports City"},6666:{index:"6666",hex:"0x80001a0a",symbol:"BPA",name:"Bitcoin Pizza"},6688:{index:"6688",hex:"0x80001a20",symbol:"SAFE",name:"SAFE"},6779:{index:"6779",hex:"0x80001a7b",symbol:"COTI",name:"COTI"},6969:{index:"6969",hex:"0x80001b39",symbol:"ROGER",name:"TheHolyrogerCoin"},7e3:{index:"7000",hex:"0x80001b58",symbol:"ZETA",name:"ZetaChain"},7027:{index:"7027",hex:"0x80001b73",symbol:"ELLA",name:"Ella the heart"},7028:{index:"7028",hex:"0x80001b74",symbol:"AA",name:"Arthera"},7091:{index:"7091",hex:"0x80001bb3",symbol:"TOPL",name:"Topl"},7331:{index:"7331",hex:"0x80001ca3",symbol:"KLY",name:"KLYNTAR"},7341:{index:"7341",hex:"0x80001cad",symbol:"SHFT",name:"Shyft"},7518:{index:"7518",hex:"0x80001d5e",symbol:"MEV",name:"MEVerse"},7576:{index:"7576",hex:"0x80001d98",symbol:"ADIL",name:"ADIL Chain"},7777:{index:"7777",hex:"0x80001e61",symbol:"BTV",name:"Bitvote"},7779:{index:"7779",hex:"0x80001e63",symbol:"CPV",name:"Compverse"},8e3:{index:"8000",hex:"0x80001f40",symbol:"SKY",name:"Skycoin"},8017:{index:"8017",hex:"0x80001f51",symbol:"ISC",name:"iSunCoin"},8080:{index:"8080",hex:"0x80001f90",symbol:"",name:"DSRV"},8181:{index:"8181",hex:"0x80001ff5",symbol:"BOC",name:"BeOne Chain"},8192:{index:"8192",hex:"0x80002000",symbol:"PAC",name:"pacprotocol"},8217:{index:"8217",hex:"0x80002019",symbol:"KLAY",name:"KLAY"},8339:{index:"8339",hex:"0x80002093",symbol:"BTQ",name:"BitcoinQuark"},8444:{index:"8444",hex:"0x800020fc",symbol:"XCH",name:"Chia"},8453:{index:"8453",hex:"0x80002105",symbol:"",name:"Base"},8680:{index:"8680",hex:"0x800021e8",symbol:"PLMNT",name:"Planetmint"},8732:{index:"8732",hex:"0x8000221c",symbol:"BLN",name:"Bullions"},8866:{index:"8866",hex:"0x800022a2",symbol:"GGX",name:"Golden Gate"},8886:{index:"8886",hex:"0x800022b6",symbol:"GGXT",name:"Golden Gate Sydney"},8888:{index:"8888",hex:"0x800022b8",symbol:"SBTC",name:"Super Bitcoin"},8964:{index:"8964",hex:"0x80002304",symbol:"NULS",name:"NULS"},8997:{index:"8997",hex:"0x80002325",symbol:"BBC",name:"Babacoin"},8998:{index:"8998",hex:"0x80002326",symbol:"JGC",name:"JagoanCoin"},8999:{index:"8999",hex:"0x80002327",symbol:"BTP",name:"Bitcoin Pay"},9e3:{index:"9000",hex:"0x80002328",symbol:"AVAX",name:"Avalanche"},9001:{index:"9001",hex:"0x80002329",symbol:"ARB1",name:"Arbitrum"},9002:{index:"9002",hex:"0x8000232a",symbol:"BOBA",name:"Boba"},9003:{index:"9003",hex:"0x8000232b",symbol:"LOOP",name:"Loopring"},9004:{index:"9004",hex:"0x8000232c",symbol:"STRK",name:"StarkNet"},9005:{index:"9005",hex:"0x8000232d",symbol:"AVAXC",name:"Avalanche C-Chain"},9006:{index:"9006",hex:"0x8000232e",symbol:"BSC",name:"Binance Smart Chain"},9797:{index:"9797",hex:"0x80002645",symbol:"NRG",name:"Energi"},9888:{index:"9888",hex:"0x800026a0",symbol:"BTF",name:"Bitcoin Faith"},9999:{index:"9999",hex:"0x8000270f",symbol:"GOD",name:"Bitcoin God"},1e4:{index:"10000",hex:"0x80002710",symbol:"FO",name:"FIBOS"},10001:{index:"10001",hex:"0x80002711",symbol:"SPACE",name:"Space"},10111:{index:"10111",hex:"0x8000277f",symbol:"DHP",name:"dHealth"},10226:{index:"10226",hex:"0x800027f2",symbol:"RTM",name:"Raptoreum"},10242:{index:"10242",hex:"0x80002802",symbol:"AA",name:"Arthera"},10291:{index:"10291",hex:"0x80002833",symbol:"XRC",name:"XRhodium"},10507:{index:"10507",hex:"0x8000290b",symbol:"NUM",name:"Numbers Protocol"},10605:{index:"10605",hex:"0x8000296d",symbol:"XPI",name:"Lotus"},11111:{index:"11111",hex:"0x80002b67",symbol:"ESS",name:"Essentia One"},11742:{index:"11742",hex:"0x80002dde",symbol:"VARCH",name:"InvArch"},11743:{index:"11743",hex:"0x80002ddf",symbol:"TNKR",name:"Tinkernet"},12345:{index:"12345",hex:"0x80003039",symbol:"IPOS",name:"IPOS"},12586:{index:"12586",hex:"0x8000312a",symbol:"MINA",name:"Mina"},13107:{index:"13107",hex:"0x80003333",symbol:"BTY",name:"BitYuan"},13108:{index:"13108",hex:"0x80003334",symbol:"YCC",name:"Yuan Chain Coin"},13381:{index:"13381",hex:"0x80003445",symbol:"PHX",name:"Phoenix"},14001:{index:"14001",hex:"0x800036b1",symbol:"WAX",name:"Worldwide Asset Exchange"},15845:{index:"15845",hex:"0x80003de5",symbol:"SDGO",name:"SanDeGo"},16181:{index:"16181",hex:"0x80003f35",symbol:"XTX",name:"Totem Live Network"},16754:{index:"16754",hex:"0x80004172",symbol:"ARDR",name:"Ardor"},18e3:{index:"18000",hex:"0x80004650",symbol:"MTR",name:"Meter"},19165:{index:"19165",hex:"0x80004add",symbol:"SAFE",name:"Safecoin"},19167:{index:"19167",hex:"0x80004adf",symbol:"FLUX",name:"Flux"},19169:{index:"19169",hex:"0x80004ae1",symbol:"RITO",name:"Ritocoin"},19788:{index:"19788",hex:"0x80004d4c",symbol:"ML",name:"Mintlayer"},20036:{index:"20036",hex:"0x80004e44",symbol:"XND",name:"ndau"},21004:{index:"21004",hex:"0x8000520c",symbol:"C4EI",name:"c4ei"},21337:{index:"21337",hex:"0x80005359",symbol:"XAH",name:"Xahau"},21888:{index:"21888",hex:"0x80005580",symbol:"PAC",name:"Pactus"},22504:{index:"22504",hex:"0x800057e8",symbol:"PWR",name:"PWRcoin"},23e3:{index:"23000",hex:"0x800059d8",symbol:"EPIC",name:"Epic Cash"},25252:{index:"25252",hex:"0x800062a4",symbol:"BELL",name:"Bellcoin"},25718:{index:"25718",hex:"0x80006476",symbol:"CHX",name:"Own"},26417:{index:"26417",hex:"0x80006731",symbol:"G1",name:"Ğ1"},29223:{index:"29223",hex:"0x80007227",symbol:"NEXA",name:"Nexa"},31102:{index:"31102",hex:"0x8000797e",symbol:"ESN",name:"EtherSocial Network"},31337:{index:"31337",hex:"0x80007a69",symbol:"",name:"ThePower"},33416:{index:"33416",hex:"0x80008288",symbol:"TEO",name:"Trust Eth reOrigin"},33878:{index:"33878",hex:"0x80008456",symbol:"BTCS",name:"Bitcoin Stake"},34952:{index:"34952",hex:"0x80008888",symbol:"BTT",name:"ByteTrade"},37992:{index:"37992",hex:"0x80009468",symbol:"FXTC",name:"FixedTradeCoin"},39321:{index:"39321",hex:"0x80009999",symbol:"AMA",name:"Amabig"},42069:{index:"42069",hex:"0x8000a455",symbol:"FACT",name:"FACT0RN"},43028:{index:"43028",hex:"0x8000a814",symbol:"AXIV",name:"AXIV"},47803:{index:"47803",hex:"0x8000babb",symbol:"BAX",name:"BAX"},49262:{index:"49262",hex:"0x8000c06e",symbol:"EVE",name:"evan"},49344:{index:"49344",hex:"0x8000c0c0",symbol:"STASH",name:"STASH"},52752:{index:"52752",hex:"0x8000ce10",symbol:"CELO",name:"Celo"},54176:{index:"54176",hex:"0x8000d3a0",symbol:"OVER",name:"OverProtocol"},61616:{index:"61616",hex:"0x8000f0b0",symbol:"TH",name:"TianHe"},65536:{index:"65536",hex:"0x80010000",symbol:"KETH",name:"Krypton World"},69420:{index:"69420",hex:"0x80010f2c",symbol:"GRLC",name:"Garlicoin"},70007:{index:"70007",hex:"0x80011177",symbol:"GWL",name:"Gewel"},77777:{index:"77777",hex:"0x80012fd1",symbol:"ZYN",name:"Wethio"},83293:{index:"83293",hex:"0x8001455d",symbol:"QUBIC",name:"Qubic"},88888:{index:"88888",hex:"0x80015b38",symbol:"RYO",name:"c0ban"},99999:{index:"99999",hex:"0x8001869f",symbol:"WICC",name:"Waykichain"},100500:{index:"100500",hex:"0x80018894",symbol:"HOME",name:"HomeCoin"},101010:{index:"101010",hex:"0x80018a92",symbol:"STC",name:"Starcoin"},104109:{index:"104109",hex:"0x800196ad",symbol:"",name:"Seed Hypermedia"},105105:{index:"105105",hex:"0x80019a91",symbol:"STRAX",name:"Strax"},111111:{index:"111111",hex:"0x8001b207",symbol:"KAS",name:"Kaspa"},121337:{index:"121337",hex:"0x8001d9f9",symbol:"KLS",name:"Karlsen"},123456:{index:"123456",hex:"0x8001e240",symbol:"SPR",name:"Spectre"},130822:{index:"130822",hex:"0x8001ff06",symbol:"WBT",name:"WhiteBIT Coin"},161803:{index:"161803",hex:"0x8002780b",symbol:"APTA",name:"Bloqs4Good"},200625:{index:"200625",hex:"0x80030fb1",symbol:"AKA",name:"Akroma"},200901:{index:"200901",hex:"0x800310c5",symbol:"BTR",name:"Bitlayer"},224433:{index:"224433",hex:"0x80036cb1",symbol:"CONET",name:"CONET Holesky Network"},246529:{index:"246529",hex:"0x8003c301",symbol:"ATS",name:"ARTIS sigma1"},261131:{index:"261131",hex:"0x8003fc0b",symbol:"ZAMA",name:"Zama"},314159:{index:"314159",hex:"0x8004cb2f",symbol:"PI",name:"Pi Network"},333332:{index:"333332",hex:"0x80051614",symbol:"VALUE",name:"Value Chain"},333333:{index:"333333",hex:"0x80051615",symbol:"3333",name:"Pi Value Consensus"},424242:{index:"424242",hex:"0x80067932",symbol:"X42",name:"x42"},534352:{index:"534352",hex:"0x80082750",symbol:"SCR",name:"Scroll"},666666:{index:"666666",hex:"0x800a2c2a",symbol:"VITE",name:"Vite"},696365:{index:"696365",hex:"0x800b3206",symbol:"ICE",name:"Ice Network"},888888:{index:"888888",hex:"0x800d9038",symbol:"SEA",name:"Second Exchange Alliance"},999999:{index:"999999",hex:"0x800c9061",symbol:"WTC",name:"WaltonChain"},1048576:{index:"1048576",hex:"0x80100000",symbol:"AMAX",name:"Armonia Meta Chain"},1171337:{index:"1171337",hex:"0x8011df89",symbol:"ILT",name:"iOlite"},1313114:{index:"1313114",hex:"0x8014095a",symbol:"ETHO",name:"Etho Protocol"},1313500:{index:"1313500",hex:"0x80140adc",symbol:"XERO",name:"Xerom"},1712144:{index:"1712144",hex:"0x801a2010",symbol:"LAX",name:"LAPO"},3924011:{index:"3924011",hex:"0x803be02b",symbol:"EPK",name:"EPIK Protocol"},4741444:{index:"4741444",hex:"0x80485944",symbol:"HYD",name:"Hydra Token"},5249353:{index:"5249353",hex:"0x80501949",symbol:"BCO",name:"BitcoinOre"},5249354:{index:"5249354",hex:"0x8050194a",symbol:"BHD",name:"BitcoinHD"},5264462:{index:"5264462",hex:"0x8050544e",symbol:"PTN",name:"PalletOne"},5655640:{index:"5655640",hex:"0x80564c58",symbol:"VLX",name:"Velas"},5718350:{index:"5718350",hex:"0x8057414e",symbol:"WAN",name:"Wanchain"},5741564:{index:"5741564",hex:"0x80579bfc",symbol:"WAVES",name:"Waves"},5741565:{index:"5741565",hex:"0x80579bfd",symbol:"WEST",name:"Waves Enterprise"},6382179:{index:"6382179",hex:"0x80616263",symbol:"ABC",name:"Abcmint"},6517357:{index:"6517357",hex:"0x8063726d",symbol:"CRM",name:"Creamcoin"},7171666:{index:"7171666",hex:"0x806d6e52",symbol:"BROCK",name:"Bitrock"},7562605:{index:"7562605",hex:"0x8073656d",symbol:"SEM",name:"Semux"},7567736:{index:"7567736",hex:"0x80737978",symbol:"ION",name:"ION"},7777777:{index:"7777777",hex:"0x8076adf1",symbol:"FCT",name:"FirmaChain"},7825266:{index:"7825266",hex:"0x80776772",symbol:"WGR",name:"WGR"},7825267:{index:"7825267",hex:"0x80776773",symbol:"OBSR",name:"OBServer"},8163271:{index:"8163271",hex:"0x807c8fc7",symbol:"AFS",name:"ANFS"},11259375:{index:"11259375",hex:"0x80abcdef",symbol:"LBR",name:"0L"},15118976:{index:"15118976",hex:"0x80e6b280",symbol:"XDS",name:"XDS"},20230101:{index:"20230101",hex:"0x8134afd5",symbol:"ROH",name:"Rooch"},20240430:{index:"20240430",hex:"0x8134d82e",symbol:"NLK",name:"NuLinkCoin"},61717561:{index:"61717561",hex:"0x83adbc39",symbol:"AQUA",name:"Aquachain"},77777777:{index:"77777777",hex:"0x84a2cb71",symbol:"AZT",name:"Aztecoin"},88888888:{index:"88888888",hex:"0x854c5638",symbol:"HATCH",name:"Hatch"},91927009:{index:"91927009",hex:"0x857ab1e1",symbol:"kUSD",name:"kUSD"},99999996:{index:"99999996",hex:"0x85f5e0fc",symbol:"GENS",name:"GENS"},99999997:{index:"99999997",hex:"0x85f5e0fd",symbol:"EQ",name:"EQ"},99999998:{index:"99999998",hex:"0x85f5e0fe",symbol:"FLUID",name:"Fluid Chains"},99999999:{index:"99999999",hex:"0x85f5e0ff",symbol:"QKC",name:"QuarkChain"},608589380:{index:"608589380",hex:"0xa4465644",symbol:"FVDC",name:"ForumCoin"},1179993420:{index:"1179993420",hex:"0xc655454c",symbol:"",name:"Fuel"},1179993421:{index:"1179993421",hex:"0xc655454d",symbol:"TTNC",name:"TakeTitan"},1179993431:{index:"1179993431",hex:"0xc6554557",symbol:"MTGBP",name:"MTGBP"},1179993441:{index:"1179993441",hex:"0xc6554561",symbol:"QFS",name:"Qfs"},1179993451:{index:"1179993451",hex:"0xc655456b",symbol:"RWA",name:"Asset Chain"}}},{}],145:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createGenericPermissionValidator=void 0;const r=e("@metamask/rpc-errors");n.createGenericPermissionValidator=function(e){const t=new Set(e.map((e=>e.type))),n=e.filter((e=>!e.optional));return function({caveats:i}){const s=i??[],o=s.map((e=>e.type)),a=new Set(o);if(a.size!==o.length)throw r.rpcErrors.invalidParams({message:"Duplicate caveats are not allowed."});if(!s.every((e=>t.has(e.type))))throw r.rpcErrors.invalidParams({message:`Expected the following caveats: ${e.map((e=>`"${e.type}"`)).join(", ")}, received ${s.map((e=>`"${e.type}"`)).join(", ")}.`});if(!n.every((e=>a.has(e.type))))throw r.rpcErrors.invalidParams({message:`Expected the following caveats: ${n.map((e=>`"${e.type}"`)).join(", ")}.`})}}},{"@metamask/rpc-errors":130}],146:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./generic.cjs"),n),i(e("./requestTime.cjs"),n)},{"./generic.cjs":145,"./requestTime.cjs":147}],147:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.maxRequestTimeCaveatSpecifications=n.getMaxRequestTimeCaveat=n.createMaxRequestTimeMapper=n.getMaxRequestTimeCaveatMapper=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils");function o(e){if(!(0,s.hasProperty)(e,"value"))throw r.rpcErrors.invalidParams({message:"Invalid maxRequestTime caveat."});const{value:t}=e;!function(e,t){(0,s.assertStruct)(e,i.MaxRequestTimeStruct,"Invalid maxRequestTime",t)}(t,r.rpcErrors.invalidParams)}n.getMaxRequestTimeCaveatMapper=function(e){return!e||!(0,s.isObject)(e)||(0,s.isObject)(e)&&!(0,s.hasProperty)(e,"maxRequestTime")?{caveats:null}:{caveats:[{type:i.SnapCaveatType.MaxRequestTime,value:e.maxRequestTime}]}},n.createMaxRequestTimeMapper=function(e){return function(t){const{maxRequestTime:n,...r}=t,s=e(r);return n?{...s,caveats:[...s.caveats??[],{type:i.SnapCaveatType.MaxRequestTime,value:n}]}:s}},n.getMaxRequestTimeCaveat=function(e){const t=e?.caveats?.find((e=>e.type===i.SnapCaveatType.MaxRequestTime));return t?.value??null},n.maxRequestTimeCaveatSpecifications={[i.SnapCaveatType.MaxRequestTime]:Object.freeze({type:i.SnapCaveatType.MaxRequestTime,validator:e=>o(e)})}},{"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/utils":369}],148:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.cronjobCaveatSpecifications=n.validateCronjobCaveat=n.getCronjobCaveatJobs=n.getCronjobCaveatMapper=n.cronjobEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./enum.cjs").SnapEndowments.Cronjob;function c(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e.value))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;if(!(0,o.hasProperty)(t,"jobs")||!(0,o.isPlainObject)(t))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});if(!(0,s.isCronjobSpecificationArray)(t.jobs))throw i.rpcErrors.invalidParams({message:"Expected a valid cronjob specification array."})}n.cronjobEndowmentBuilder=Object.freeze({targetName:a,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:a,allowedCaveats:[s.SnapCaveatType.SnapCronjob],endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap]})}),n.getCronjobCaveatMapper=function(e){return{caveats:[{type:s.SnapCaveatType.SnapCronjob,value:e}]}},n.getCronjobCaveatJobs=function(e){if(!e?.caveats)return null;(0,o.assert)(1===e.caveats.length),(0,o.assert)(e.caveats[0].type===s.SnapCaveatType.SnapCronjob);const t=e.caveats[0];return t.value?.jobs??null},n.validateCronjobCaveat=c,n.cronjobCaveatSpecifications={[s.SnapCaveatType.SnapCronjob]:Object.freeze({type:s.SnapCaveatType.SnapCronjob,validator:e=>c(e)})}},{"./enum.cjs":149,"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/utils":369}],149:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.SnapEndowments=void 0,function(e){e.NetworkAccess="endowment:network-access",e.SignatureInsight="endowment:signature-insight",e.TransactionInsight="endowment:transaction-insight",e.Cronjob="endowment:cronjob",e.EthereumProvider="endowment:ethereum-provider",e.Rpc="endowment:rpc",e.WebAssemblyAccess="endowment:webassembly",e.NameLookup="endowment:name-lookup",e.LifecycleHooks="endowment:lifecycle-hooks",e.Keyring="endowment:keyring",e.HomePage="endowment:page-home"}(r||(n.SnapEndowments=r={}))},{}],150:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ethereumProviderEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.EthereumProvider;n.ethereumProviderEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>["ethereum"],subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":149,"@metamask/permission-controller":92}],151:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.homePageEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.HomePage;n.homePageEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":149,"@metamask/permission-controller":92}],152:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.getCronjobCaveatJobs=n.getMaxRequestTimeCaveat=n.getKeyringCaveatOrigins=n.getLookupMatchersCaveat=n.getChainIdsCaveat=n.getTransactionOriginCaveat=n.getSignatureOriginCaveat=n.getRpcCaveatOrigins=n.handlerEndowments=n.endowmentCaveatMappers=n.endowmentCaveatSpecifications=n.endowmentPermissionBuilders=void 0;const s=e("@metamask/snaps-utils"),o=e("./caveats/index.cjs"),a=e("./cronjob.cjs"),c=e("./ethereum-provider.cjs"),u=e("./home-page.cjs"),l=e("./keyring.cjs"),d=e("./lifecycle-hooks.cjs"),h=e("./name-lookup.cjs"),f=e("./network-access.cjs"),p=e("./rpc.cjs"),m=e("./signature-insight.cjs"),y=e("./transaction-insight.cjs"),g=e("./web-assembly.cjs");n.endowmentPermissionBuilders={[f.networkAccessEndowmentBuilder.targetName]:f.networkAccessEndowmentBuilder,[y.transactionInsightEndowmentBuilder.targetName]:y.transactionInsightEndowmentBuilder,[a.cronjobEndowmentBuilder.targetName]:a.cronjobEndowmentBuilder,[c.ethereumProviderEndowmentBuilder.targetName]:c.ethereumProviderEndowmentBuilder,[p.rpcEndowmentBuilder.targetName]:p.rpcEndowmentBuilder,[g.webAssemblyEndowmentBuilder.targetName]:g.webAssemblyEndowmentBuilder,[h.nameLookupEndowmentBuilder.targetName]:h.nameLookupEndowmentBuilder,[d.lifecycleHooksEndowmentBuilder.targetName]:d.lifecycleHooksEndowmentBuilder,[l.keyringEndowmentBuilder.targetName]:l.keyringEndowmentBuilder,[u.homePageEndowmentBuilder.targetName]:u.homePageEndowmentBuilder,[m.signatureInsightEndowmentBuilder.targetName]:m.signatureInsightEndowmentBuilder},n.endowmentCaveatSpecifications={...a.cronjobCaveatSpecifications,...y.transactionInsightCaveatSpecifications,...p.rpcCaveatSpecifications,...h.nameLookupCaveatSpecifications,...l.keyringCaveatSpecifications,...m.signatureInsightCaveatSpecifications,...o.maxRequestTimeCaveatSpecifications},n.endowmentCaveatMappers={[a.cronjobEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(a.getCronjobCaveatMapper),[y.transactionInsightEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(y.getTransactionInsightCaveatMapper),[p.rpcEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(p.getRpcCaveatMapper),[h.nameLookupEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(h.getNameLookupCaveatMapper),[l.keyringEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(l.getKeyringCaveatMapper),[m.signatureInsightEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(m.getSignatureInsightCaveatMapper),[d.lifecycleHooksEndowmentBuilder.targetName]:o.getMaxRequestTimeCaveatMapper,[u.homePageEndowmentBuilder.targetName]:o.getMaxRequestTimeCaveatMapper},n.handlerEndowments={[s.HandlerType.OnRpcRequest]:p.rpcEndowmentBuilder.targetName,[s.HandlerType.OnTransaction]:y.transactionInsightEndowmentBuilder.targetName,[s.HandlerType.OnCronjob]:a.cronjobEndowmentBuilder.targetName,[s.HandlerType.OnNameLookup]:h.nameLookupEndowmentBuilder.targetName,[s.HandlerType.OnInstall]:d.lifecycleHooksEndowmentBuilder.targetName,[s.HandlerType.OnUpdate]:d.lifecycleHooksEndowmentBuilder.targetName,[s.HandlerType.OnKeyringRequest]:l.keyringEndowmentBuilder.targetName,[s.HandlerType.OnHomePage]:u.homePageEndowmentBuilder.targetName,[s.HandlerType.OnSignature]:m.signatureInsightEndowmentBuilder.targetName,[s.HandlerType.OnUserInput]:null},i(e("./enum.cjs"),n);var b=e("./rpc.cjs");Object.defineProperty(n,"getRpcCaveatOrigins",{enumerable:!0,get:function(){return b.getRpcCaveatOrigins}});var v=e("./signature-insight.cjs");Object.defineProperty(n,"getSignatureOriginCaveat",{enumerable:!0,get:function(){return v.getSignatureOriginCaveat}});var x=e("./transaction-insight.cjs");Object.defineProperty(n,"getTransactionOriginCaveat",{enumerable:!0,get:function(){return x.getTransactionOriginCaveat}});var w=e("./name-lookup.cjs");Object.defineProperty(n,"getChainIdsCaveat",{enumerable:!0,get:function(){return w.getChainIdsCaveat}}),Object.defineProperty(n,"getLookupMatchersCaveat",{enumerable:!0,get:function(){return w.getLookupMatchersCaveat}});var S=e("./keyring.cjs");Object.defineProperty(n,"getKeyringCaveatOrigins",{enumerable:!0,get:function(){return S.getKeyringCaveatOrigins}});var E=e("./caveats/index.cjs");Object.defineProperty(n,"getMaxRequestTimeCaveat",{enumerable:!0,get:function(){return E.getMaxRequestTimeCaveat}});var _=e("./cronjob.cjs");Object.defineProperty(n,"getCronjobCaveatJobs",{enumerable:!0,get:function(){return _.getCronjobCaveatJobs}})},{"./caveats/index.cjs":146,"./cronjob.cjs":148,"./enum.cjs":149,"./ethereum-provider.cjs":150,"./home-page.cjs":151,"./keyring.cjs":153,"./lifecycle-hooks.cjs":154,"./name-lookup.cjs":155,"./network-access.cjs":156,"./rpc.cjs":157,"./signature-insight.cjs":158,"./transaction-insight.cjs":159,"./web-assembly.cjs":160,"@metamask/snaps-utils":329}],153:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.keyringCaveatSpecifications=n.getKeyringCaveatOrigins=n.getKeyringCaveatMapper=n.keyringEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Keyring;n.keyringEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.KeyringOrigin,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.KeyringOrigin},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getKeyringCaveatMapper=function(e){return{caveats:[{type:s.SnapCaveatType.KeyringOrigin,value:e}]}},n.getKeyringCaveatOrigins=function(e){return(0,o.assert)(e?.caveats),(0,o.assert)(1===e.caveats.length),(0,o.assert)(e.caveats[0].type===s.SnapCaveatType.KeyringOrigin),e.caveats[0].value},n.keyringCaveatSpecifications={[s.SnapCaveatType.KeyringOrigin]:Object.freeze({type:s.SnapCaveatType.KeyringOrigin,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e.value))throw i.rpcErrors.invalidParams({message:"Invalid keyring origins: Expected a plain object."});const{value:t}=e;(0,s.assertIsKeyringOrigins)(t,i.rpcErrors.invalidParams)}(e)})}},{"./caveats/index.cjs":146,"./enum.cjs":149,"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/utils":369}],154:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.lifecycleHooksEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.LifecycleHooks;n.lifecycleHooksEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":149,"@metamask/permission-controller":92}],155:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.nameLookupCaveatSpecifications=n.getLookupMatchersCaveat=n.getChainIdsCaveat=n.getNameLookupCaveatMapper=n.nameLookupEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.NameLookup;function u(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;switch(e.type){case s.SnapCaveatType.ChainIds:(0,o.assertStruct)(t,s.ChainIdsStruct);break;case s.SnapCaveatType.LookupMatchers:(0,o.assertStruct)(t,s.LookupMatchersStruct);break;default:throw i.rpcErrors.invalidParams({message:'Invalid caveat type, must be one of the following: "chainIds", "matchers".'})}}n.nameLookupEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.ChainIds,s.SnapCaveatType.LookupMatchers,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.ChainIds,optional:!0},{type:s.SnapCaveatType.LookupMatchers,optional:!0},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getNameLookupCaveatMapper=function(e){if(!e||!(0,o.isObject)(e)||0===Object.keys(e).length)return{caveats:null};const t=[];return e.chains&&t.push({type:s.SnapCaveatType.ChainIds,value:e.chains}),e.matchers&&t.push({type:s.SnapCaveatType.LookupMatchers,value:e.matchers}),(0,o.assert)(t.length>0),{caveats:t}},n.getChainIdsCaveat=function(e){if(!e?.caveats)return null;const t=e.caveats.find((e=>e.type===s.SnapCaveatType.ChainIds));return t?t.value:null},n.getLookupMatchersCaveat=function(e){if(!e?.caveats)return null;const t=e.caveats.find((e=>e.type===s.SnapCaveatType.LookupMatchers));return t?t.value:null},n.nameLookupCaveatSpecifications={[s.SnapCaveatType.ChainIds]:Object.freeze({type:s.SnapCaveatType.ChainIds,validator:e=>u(e)}),[s.SnapCaveatType.LookupMatchers]:Object.freeze({type:s.SnapCaveatType.LookupMatchers,validator:e=>u(e)})}},{"./caveats/index.cjs":146,"./enum.cjs":149,"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/utils":369}],156:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.networkAccessEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.NetworkAccess;n.networkAccessEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>["fetch","Request","Headers","Response"],subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":149,"@metamask/permission-controller":92}],157:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.rpcCaveatSpecifications=n.getRpcCaveatOrigins=n.getRpcCaveatMapper=n.rpcEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Rpc;n.rpcEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.RpcOrigin,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.RpcOrigin},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getRpcCaveatMapper=function(e){return{caveats:[{type:s.SnapCaveatType.RpcOrigin,value:e}]}},n.getRpcCaveatOrigins=function(e){const t=e?.caveats?.filter((e=>e.type===s.SnapCaveatType.RpcOrigin));return(0,o.assert)(t),(0,o.assert)(1===t.length),t[0].value},n.rpcCaveatSpecifications={[s.SnapCaveatType.RpcOrigin]:Object.freeze({type:s.SnapCaveatType.RpcOrigin,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e.value))throw i.rpcErrors.invalidParams({message:"Invalid JSON-RPC origins: Expected a plain object."});const{value:t}=e;(0,s.assertIsRpcOrigins)(t,i.rpcErrors.invalidParams)}(e)})}},{"./caveats/index.cjs":146,"./enum.cjs":149,"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/utils":369}],158:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.signatureInsightCaveatSpecifications=n.getSignatureOriginCaveat=n.getSignatureInsightCaveatMapper=n.signatureInsightEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.SignatureInsight;n.signatureInsightEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.SignatureOrigin],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.SignatureOrigin,optional:!0},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getSignatureInsightCaveatMapper=function(e){return!e||!(0,o.isObject)(e)||(0,o.isObject)(e)&&0===Object.keys(e).length?{caveats:null}:{caveats:[{type:s.SnapCaveatType.SignatureOrigin,value:(0,o.hasProperty)(e,"allowSignatureOrigin")&&e.allowSignatureOrigin}]}},n.getSignatureOriginCaveat=function(e){return e?.caveats?((0,o.assert)(1===e.caveats.length),(0,o.assert)(e.caveats[0].type===s.SnapCaveatType.SignatureOrigin),e.caveats[0].value??null):null},n.signatureInsightCaveatSpecifications={[s.SnapCaveatType.SignatureOrigin]:Object.freeze({type:s.SnapCaveatType.SignatureOrigin,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;(0,o.assert)("boolean"==typeof t,'Expected caveat value to have type "boolean"')}(e)})}},{"./caveats/index.cjs":146,"./enum.cjs":149,"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/utils":369}],159:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.transactionInsightCaveatSpecifications=n.getTransactionOriginCaveat=n.getTransactionInsightCaveatMapper=n.transactionInsightEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.TransactionInsight;n.transactionInsightEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.TransactionOrigin,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.TransactionOrigin,optional:!0},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getTransactionInsightCaveatMapper=function(e){return!e||!(0,o.isObject)(e)||(0,o.isObject)(e)&&0===Object.keys(e).length?{caveats:null}:{caveats:[{type:s.SnapCaveatType.TransactionOrigin,value:(0,o.hasProperty)(e,"allowTransactionOrigin")&&e.allowTransactionOrigin}]}},n.getTransactionOriginCaveat=function(e){return e?.caveats?((0,o.assert)(1===e.caveats.length),(0,o.assert)(e.caveats[0].type===s.SnapCaveatType.TransactionOrigin),e.caveats[0].value??null):null},n.transactionInsightCaveatSpecifications={[s.SnapCaveatType.TransactionOrigin]:Object.freeze({type:s.SnapCaveatType.TransactionOrigin,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;(0,o.assert)("boolean"==typeof t,'Expected caveat value to have type "boolean"')}(e)})}},{"./caveats/index.cjs":146,"./enum.cjs":149,"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/utils":369}],160:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.webAssemblyEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.WebAssemblyAccess;n.webAssemblyEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>["WebAssembly"],subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":149,"@metamask/permission-controller":92}],161:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.selectHooks=n.SnapCaveatType=n.createSnapsMethodMiddleware=n.permittedMethods=void 0;var s=e("./permitted/index.cjs");Object.defineProperty(n,"permittedMethods",{enumerable:!0,get:function(){return s.handlers}}),Object.defineProperty(n,"createSnapsMethodMiddleware",{enumerable:!0,get:function(){return s.createSnapsMethodMiddleware}});var o=e("@metamask/snaps-utils");Object.defineProperty(n,"SnapCaveatType",{enumerable:!0,get:function(){return o.SnapCaveatType}});var a=e("./utils.cjs");Object.defineProperty(n,"selectHooks",{enumerable:!0,get:function(){return a.selectHooks}}),i(e("./endowments/index.cjs"),n),i(e("./permissions.cjs"),n),i(e("./restricted/index.cjs"),n)},{"./endowments/index.cjs":152,"./permissions.cjs":162,"./permitted/index.cjs":173,"./restricted/index.cjs":191,"./utils.cjs":196,"@metamask/snaps-utils":329}],162:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.buildSnapRestrictedMethodSpecifications=n.buildSnapEndowmentSpecifications=n.processSnapPermissions=void 0;const r=e("@metamask/utils"),i=e("./endowments/index.cjs"),s=e("./restricted/index.cjs"),o=e("./utils.cjs");n.processSnapPermissions=function(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>(0,r.hasProperty)(s.caveatMappers,e)?[e,s.caveatMappers[e](t)]:(0,r.hasProperty)(i.endowmentCaveatMappers,e)?[e,i.endowmentCaveatMappers[e](t)]:[e,t])))};n.buildSnapEndowmentSpecifications=e=>Object.values(i.endowmentPermissionBuilders).reduce(((t,{targetName:n,specificationBuilder:r})=>(e.includes(n)||(t[n]=r({})),t)),{});n.buildSnapRestrictedMethodSpecifications=(e,t)=>Object.values(s.restrictedMethodPermissionBuilders).reduce(((n,{targetName:r,specificationBuilder:i,methodHooks:s})=>(e.includes(r)||(n[r]=i({methodHooks:(0,o.selectHooks)(t,s)})),n)),{})},{"./endowments/index.cjs":152,"./restricted/index.cjs":191,"./utils.cjs":196,"@metamask/utils":369}],163:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createInterfaceHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),s=e("@metamask/superstruct");n.createInterfaceHandler={methodNames:["snap_createInterface"],implementation:async function(e,t,n,i,{createInterface:a}){const{params:c}=e;try{const e=function(e){try{return(0,s.create)(e,o)}catch(e){if(e instanceof s.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{ui:n,context:i}=e;t.result=await a(n,i)}catch(e){return i(e)}return i()},hookNames:{createInterface:!0}};const o=(0,s.object)({ui:i.ComponentOrElementStruct,context:(0,s.optional)(i.InterfaceContextStruct)})},{"@metamask/rpc-errors":130,"@metamask/snaps-sdk":200,"@metamask/superstruct":352}],164:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.providerRequestHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("../endowments/index.cjs"),a=Object.freeze(["eth_blockNumber","eth_call","eth_chainId","eth_coinbase","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getWork","eth_hashrate","eth_mining","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_protocolVersion","eth_sendRawTransaction","eth_submitHashrate","eth_submitWork","eth_syncing","eth_uninstallFilter","net_listening","net_peerCount","net_version","web3_clientVersion","web3_sha3"]);n.providerRequestHandler={methodNames:["snap_experimentalProviderRequest"],implementation:async function(e,t,n,u,{hasPermission:l,getNetworkConfigurationByChainId:d,getNetworkClientById:h}){if(!l(o.SnapEndowments.EthereumProvider))return u(r.rpcErrors.methodNotFound());const{params:f}=e;try{const{chainId:e,request:n}=function(e){try{return(0,i.create)(e,c)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(f);if(!a.includes(n.method))return u(r.rpcErrors.methodNotFound());const o=(0,s.parseCaipChainId)(e);if("eip155"!==o.namespace)return u(r.rpcErrors.invalidParams({message:"Only EVM networks are currently supported."}));const l=BigInt(o.reference),p=d((0,s.bigIntToHex)(l));if(!p)return u(r.rpcErrors.invalidParams({message:"The requested network is not available."}));const m=h(p.rpcEndpoints[p.defaultRpcEndpointIndex].networkClientId),{provider:y}=m;t.result=await y.request(n)}catch(e){return u(e)}return u()},hookNames:{hasPermission:!0,getNetworkConfigurationByChainId:!0,getNetworkClientById:!0}};const c=(0,i.object)({chainId:s.CaipChainIdStruct,request:(0,i.type)({method:(0,i.string)(),params:(0,i.optional)(s.JsonRpcParamsStruct)})})},{"../endowments/index.cjs":152,"@metamask/rpc-errors":130,"@metamask/superstruct":352,"@metamask/utils":369}],165:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAllSnapsHandler=void 0;const r=e("@metamask/rpc-errors");n.getAllSnapsHandler={methodNames:["wallet_getAllSnaps"],implementation:async function(e,t,n,i,{getAllSnaps:s}){const{origin:o}=e;if("https://snaps.metamask.io"!==o)return i(r.rpcErrors.methodNotFound());return t.result=await s(),i()},hookNames:{getAllSnaps:!0}}},{"@metamask/rpc-errors":130}],166:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getClientStatusHandler=void 0;n.getClientStatusHandler={methodNames:["snap_getClientStatus"],implementation:async function(e,t,n,r,{getIsLocked:i}){return t.result={locked:i()},r()},hookNames:{getIsLocked:!0}}},{}],167:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCurrencyRateHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/superstruct");n.getCurrencyRateHandler={methodNames:["snap_getCurrencyRate"],implementation:function(e,t,n,i,{getCurrencyRate:a}){const{params:c}=e;try{const e=function(e){try{return(0,s.create)(e,o)}catch(e){if(e instanceof s.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{currency:n}=e;t.result=a(n)??null}catch(e){return i(e)}return i()},hookNames:{getCurrencyRate:!0}};const o=(0,s.object)({currency:(0,s.union)([(0,i.currency)("btc")])})},{"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/superstruct":352}],168:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getFileHandler=n.GetFileArgsStruct=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),s=e("@metamask/superstruct"),o=e("@metamask/utils");n.GetFileArgsStruct=(0,s.object)({path:(0,s.string)(),encoding:(0,s.optional)((0,s.union)([(0,i.enumValue)(i.AuxiliaryFileEncoding.Base64),(0,i.enumValue)(i.AuxiliaryFileEncoding.Hex),(0,i.enumValue)(i.AuxiliaryFileEncoding.Utf8)]))});n.getFileHandler={methodNames:["snap_getFile"],implementation:async function(e,t,s,a,{getSnapFile:c}){const{params:u}=e;(0,o.assertStruct)(u,n.GetFileArgsStruct,'Invalid "snap_getFile" parameters',r.rpcErrors.invalidParams);try{t.result=await c(u.path,u.encoding??i.AuxiliaryFileEncoding.Base64)}catch(e){return a(e)}return a()},hookNames:{getSnapFile:!0}}},{"@metamask/rpc-errors":130,"@metamask/snaps-sdk":200,"@metamask/superstruct":352,"@metamask/utils":369}],169:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getInterfaceContextHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct");n.getInterfaceContextHandler={methodNames:["snap_getInterfaceContext"],implementation:function(e,t,n,o,{getInterfaceContext:a}){const{params:c}=e;try{const e=function(e){try{return(0,i.create)(e,s)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{id:n}=e;t.result=a(n)}catch(e){return o(e)}return o()},hookNames:{getInterfaceContext:!0}};const s=(0,i.object)({id:(0,i.string)()})},{"@metamask/rpc-errors":130,"@metamask/superstruct":352}],170:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getInterfaceStateHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct");n.getInterfaceStateHandler={methodNames:["snap_getInterfaceState"],implementation:function(e,t,n,o,{getInterfaceState:a}){const{params:c}=e;try{const e=function(e){try{return(0,i.create)(e,s)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{id:n}=e;t.result=a(n)}catch(e){return o(e)}return o()},hookNames:{getInterfaceState:!0}};const s=(0,i.object)({id:(0,i.string)()})},{"@metamask/rpc-errors":130,"@metamask/superstruct":352}],171:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSnapsHandler=void 0;n.getSnapsHandler={methodNames:["wallet_getSnaps"],implementation:async function(e,t,n,r,{getSnaps:i}){return t.result=await i(),r()},hookNames:{getSnaps:!0}}},{}],172:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.handlers=n.methodHandlers=void 0;const r=e("./createInterface.cjs"),i=e("./experimentalProviderRequest.cjs"),s=e("./getAllSnaps.cjs"),o=e("./getClientStatus.cjs"),a=e("./getCurrencyRate.cjs"),c=e("./getFile.cjs"),u=e("./getInterfaceContext.cjs"),l=e("./getInterfaceState.cjs"),d=e("./getSnaps.cjs"),h=e("./invokeKeyring.cjs"),f=e("./invokeSnapSugar.cjs"),p=e("./requestSnaps.cjs"),m=e("./resolveInterface.cjs"),y=e("./updateInterface.cjs");n.methodHandlers={wallet_getAllSnaps:s.getAllSnapsHandler,wallet_getSnaps:d.getSnapsHandler,wallet_requestSnaps:p.requestSnapsHandler,wallet_invokeSnap:f.invokeSnapSugarHandler,wallet_invokeKeyring:h.invokeKeyringHandler,snap_getClientStatus:o.getClientStatusHandler,snap_getFile:c.getFileHandler,snap_createInterface:r.createInterfaceHandler,snap_updateInterface:y.updateInterfaceHandler,snap_getInterfaceState:l.getInterfaceStateHandler,snap_getInterfaceContext:u.getInterfaceContextHandler,snap_resolveInterface:m.resolveInterfaceHandler,snap_getCurrencyRate:a.getCurrencyRateHandler,snap_experimentalProviderRequest:i.providerRequestHandler},n.handlers=Object.values(n.methodHandlers)},{"./createInterface.cjs":163,"./experimentalProviderRequest.cjs":164,"./getAllSnaps.cjs":165,"./getClientStatus.cjs":166,"./getCurrencyRate.cjs":167,"./getFile.cjs":168,"./getInterfaceContext.cjs":169,"./getInterfaceState.cjs":170,"./getSnaps.cjs":171,"./invokeKeyring.cjs":174,"./invokeSnapSugar.cjs":175,"./requestSnaps.cjs":177,"./resolveInterface.cjs":178,"./updateInterface.cjs":179}],173:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./handlers.cjs"),n),i(e("./middleware.cjs"),n)},{"./handlers.cjs":172,"./middleware.cjs":176}],174:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.invokeKeyringHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils"),o=e("./invokeSnapSugar.cjs");n.invokeKeyringHandler={methodNames:["wallet_invokeKeyring"],implementation:async function(e,t,n,a,{handleSnapRpcRequest:c,hasPermission:u,getSnap:l,getAllowedKeyringMethods:d}){let h;try{h=(0,o.getValidatedParams)(e.params)}catch(e){return a(e)}const{origin:f}=e,{snapId:p,request:m}=h;if(!f||!u(i.WALLET_SNAP_PERMISSION_KEY))return a(r.rpcErrors.invalidRequest({message:`The snap "${p}" is not connected to "${f}". Please connect before invoking the snap.`}));if(!l(p))return a(r.rpcErrors.invalidRequest({message:`The snap "${p}" is not installed. Please install it first, before invoking the snap.`}));if(!(0,s.hasProperty)(m,"method")||"string"!=typeof m.method)return a(r.rpcErrors.invalidRequest({message:"The request must have a method."}));if(!d().includes(m.method))return a(r.rpcErrors.invalidRequest({message:`The origin "${f}" is not allowed to invoke the method "${m.method}".`}));try{t.result=await c({snapId:p,request:m,handler:i.HandlerType.OnKeyringRequest})}catch(e){return a(e)}return a()},hookNames:{hasPermission:!0,handleSnapRpcRequest:!0,getSnap:!0,getAllowedKeyringMethods:!0}}},{"./invokeSnapSugar.cjs":175,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/utils":369}],175:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedParams=n.invokeSnapSugar=n.invokeSnapSugarHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/utils");async function s(e,t,n,r,{invokeSnap:i}){try{const n=o(e.params);t.result=await i(n)}catch(e){return r(e)}return r()}function o(e){if(!(0,i.isObject)(e))throw r.rpcErrors.invalidParams({message:"Expected params to be a single object."});const{snapId:t,request:n}=e;if(!t||"string"!=typeof t||""===t)throw r.rpcErrors.invalidParams({message:"Must specify a valid snap ID."});if(!(0,i.isObject)(n))throw r.rpcErrors.invalidParams({message:"Expected request to be a single object."});return e}n.invokeSnapSugarHandler={methodNames:["wallet_invokeSnap"],implementation:s,hookNames:{invokeSnap:!0}},n.invokeSnapSugar=s,n.getValidatedParams=o},{"@metamask/rpc-errors":130,"@metamask/utils":369}],176:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapsMethodMiddleware=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("../utils.cjs"),o=e("./handlers.cjs");n.createSnapsMethodMiddleware=function(e,t){return async function(n,a,c,u){const l=o.methodHandlers[n.method];if(l){if(String.prototype.startsWith.call(n.method,"snap_")&&!e)return u(r.rpcErrors.methodNotFound());const{implementation:o,hookNames:d}=l;try{return await o(n,a,c,u,(0,s.selectHooks)(t,d))}catch(e){return(0,i.logError)(e),u(e)}}return c()}}},{"../utils.cjs":196,"./handlers.cjs":172,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329}],177:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSnapPermissionsRequest=n.hasRequestedSnaps=n.requestSnapsHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils"),o=e("../restricted/invokeSnap.cjs");function a(e,t){const n=e[o.WALLET_SNAP_PERMISSION_KEY]?.caveats?.find((e=>e.type===i.SnapCaveatType.SnapIds)),r=n?.value;return!!(0,s.isObject)(r)&&Object.keys(t).every((e=>(0,s.hasProperty)(r,e)))}function c(e,t){if((0,i.verifyRequestedSnapPermissions)(t),!e[o.WALLET_SNAP_PERMISSION_KEY])return t;const n=e[o.WALLET_SNAP_PERMISSION_KEY].caveats?.find((e=>e.type===i.SnapCaveatType.SnapIds)),r=n?.value??{},s=t[o.WALLET_SNAP_PERMISSION_KEY].caveats[0].value,a=[...new Set([...Object.keys(r),...Object.keys(s)])].reduce(((e,t)=>(e[t]=s[t]??r[t],e)),{});return t[o.WALLET_SNAP_PERMISSION_KEY].caveats[0].value=a,t}n.requestSnapsHandler={methodNames:["wallet_requestSnaps"],implementation:async function(e,t,n,u,{installSnaps:l,requestPermissions:d,getPermissions:h}){const f=e.params;if(!(0,s.isObject)(f))return u(r.rpcErrors.invalidParams({message:'"params" must be an object.'}));try{if(0===Object.keys(f).length)return u(r.rpcErrors.invalidParams({message:"Request must have at least one requested snap."}));const e={[o.WALLET_SNAP_PERMISSION_KEY]:{caveats:[{type:i.SnapCaveatType.SnapIds,value:f}]}},n=await h();if(n)if(a(n,f))t.result=await l(f);else{const r=c(n,e),[,i]=await d(r);t.result=i.data[o.WALLET_SNAP_PERMISSION_KEY]}else{const[,n]=await d(e);t.result=n.data[o.WALLET_SNAP_PERMISSION_KEY]}}catch(e){t.error=e}return u()},hookNames:{installSnaps:!0,requestPermissions:!0,getPermissions:!0}},n.hasRequestedSnaps=a,n.getSnapPermissionsRequest=c},{"../restricted/invokeSnap.cjs":192,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/utils":369}],178:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.resolveInterfaceHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("@metamask/utils");n.resolveInterfaceHandler={methodNames:["snap_resolveInterface"],implementation:async function(e,t,n,s,{resolveInterface:a}){const{params:c}=e;try{const e=function(e){try{return(0,i.create)(e,o)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{id:n,value:s}=e;await a(n,s),t.result=null}catch(e){return s(e)}return s()},hookNames:{resolveInterface:!0}};const o=(0,i.object)({id:(0,i.string)(),value:s.JsonStruct})},{"@metamask/rpc-errors":130,"@metamask/superstruct":352,"@metamask/utils":369}],179:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.updateInterfaceHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),s=e("@metamask/superstruct");n.updateInterfaceHandler={methodNames:["snap_updateInterface"],implementation:async function(e,t,n,i,{updateInterface:a}){const{params:c}=e;try{const e=function(e){try{return(0,s.create)(e,o)}catch(e){if(e instanceof s.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{id:n,ui:i,context:u}=e;await a(n,i,u),t.result=null}catch(e){return i(e)}return i()},hookNames:{updateInterface:!0}};const o=(0,s.object)({id:(0,s.string)(),ui:i.ComponentOrElementStruct,context:(0,s.optional)(i.InterfaceContextStruct)})},{"@metamask/rpc-errors":130,"@metamask/snaps-sdk":200,"@metamask/superstruct":352}],180:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.caveatMappers=n.caveatSpecifications=void 0;const r=e("../getBip32Entropy.cjs"),i=e("../getBip32PublicKey.cjs"),s=e("../getBip44Entropy.cjs"),o=e("../invokeSnap.cjs"),a=e("./permittedCoinTypes.cjs"),c=e("./permittedDerivationPaths.cjs"),u=e("./snapIds.cjs");n.caveatSpecifications={...c.PermittedDerivationPathsCaveatSpecification,...a.PermittedCoinTypesCaveatSpecification,...u.SnapIdsCaveatSpecification},n.caveatMappers={[r.getBip32EntropyBuilder.targetName]:c.permittedDerivationPathsCaveatMapper,[i.getBip32PublicKeyBuilder.targetName]:c.permittedDerivationPathsCaveatMapper,[s.getBip44EntropyBuilder.targetName]:a.permittedCoinTypesCaveatMapper,[o.invokeSnapBuilder.targetName]:u.snapIdsCaveatMapper}},{"../getBip32Entropy.cjs":185,"../getBip32PublicKey.cjs":186,"../getBip44Entropy.cjs":187,"../invokeSnap.cjs":192,"./permittedCoinTypes.cjs":181,"./permittedDerivationPaths.cjs":182,"./snapIds.cjs":183}],181:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PermittedCoinTypesCaveatSpecification=n.validateBIP44Caveat=n.validateBIP44Params=n.permittedCoinTypesCaveatMapper=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils");function o(e){if(!(0,s.isPlainObject)(e)||!(0,s.hasProperty)(e,"coinType"))throw r.rpcErrors.invalidParams({message:"Expected a plain object containing a coin type."});if("number"!=typeof e.coinType||!Number.isInteger(e.coinType)||e.coinType<0||e.coinType>2147483647)throw r.rpcErrors.invalidParams({message:'Invalid "coinType" parameter. Coin type must be a non-negative integer.'});if(i.FORBIDDEN_COIN_TYPES.includes(e.coinType))throw r.rpcErrors.invalidParams({message:`Coin type ${e.coinType} is forbidden.`})}function a(e){if(!(0,s.hasProperty)(e,"value")||!Array.isArray(e.value)||0===e.value.length)throw r.rpcErrors.invalidParams({message:"Expected non-empty array of coin types."});e.value.forEach(o)}n.permittedCoinTypesCaveatMapper=function(e){return{caveats:[{type:i.SnapCaveatType.PermittedCoinTypes,value:e}]}},n.validateBIP44Params=o,n.validateBIP44Caveat=a,n.PermittedCoinTypesCaveatSpecification={[i.SnapCaveatType.PermittedCoinTypes]:Object.freeze({type:i.SnapCaveatType.PermittedCoinTypes,decorator:(e,t)=>async n=>{const{params:i}=n;o(i);if(!t.value.find((e=>e.coinType===i.coinType)))throw r.providerErrors.unauthorized({message:"The requested coin type is not permitted. Allowed coin types must be specified in the snap manifest."});return await e(n)},validator:e=>a(e)})}},{"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/utils":369}],182:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PermittedDerivationPathsCaveatSpecification=n.validateBIP32CaveatPaths=n.validateBIP32Path=n.permittedDerivationPathsCaveatMapper=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/superstruct"),o=e("@metamask/utils");function a(e){(0,o.assertStruct)(e,i.Bip32EntropyStruct,"Invalid BIP-32 entropy path definition",r.rpcErrors.invalidParams)}function c(e){(0,o.assertStruct)(e,(0,s.type)({value:(0,s.size)((0,s.array)(i.Bip32EntropyStruct),1,1/0)}),"Invalid BIP-32 entropy caveat",r.rpcErrors.internal)}n.permittedDerivationPathsCaveatMapper=function(e){return{caveats:[{type:i.SnapCaveatType.PermittedDerivationPaths,value:e}]}},n.validateBIP32Path=a,n.validateBIP32CaveatPaths=c,n.PermittedDerivationPathsCaveatSpecification={[i.SnapCaveatType.PermittedDerivationPaths]:Object.freeze({type:i.SnapCaveatType.PermittedDerivationPaths,decorator:(e,t)=>async n=>{const{params:s}=n;a(s);if(!t.value.find((e=>(0,i.isEqual)(s.path.slice(0,e.path.length),e.path)&&e.curve===s.curve)))throw r.providerErrors.unauthorized({message:"The requested path is not permitted. Allowed paths must be specified in the snap manifest."});return await e(n)},validator:e=>c(e)})}},{"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/superstruct":352,"@metamask/utils":369}],183:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SnapIdsCaveatSpecification=n.validateSnapIdsCaveat=n.snapIdsCaveatMapper=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/superstruct"),o=e("@metamask/utils");function a(e){(0,o.assertStruct)(e,(0,s.type)({value:i.SnapIdsStruct}),"Expected caveat to have a value property of a non-empty object of snap IDs.",r.rpcErrors.invalidParams)}n.snapIdsCaveatMapper=function(e){return{caveats:[{type:i.SnapCaveatType.SnapIds,value:e}]}},n.validateSnapIdsCaveat=a,n.SnapIdsCaveatSpecification={[i.SnapCaveatType.SnapIds]:Object.freeze({type:i.SnapCaveatType.SnapIds,validator:e=>a(e),decorator:(e,t)=>async n=>{const{params:r,context:{origin:i}}=n,s=t.value,{snapId:a}=r;if(!(0,o.hasProperty)(s,a))throw new Error(`${i} does not have permission to invoke ${a} snap.`);return await e(n)}})}},{"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/superstruct":352,"@metamask/utils":369}],184:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getDialogImplementation=n.dialogBuilder=n.DIALOG_APPROVAL_TYPES=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-sdk"),o=e("@metamask/superstruct"),a=e("@metamask/utils"),c="snap_dialog";n.DIALOG_APPROVAL_TYPES={[s.DialogType.Alert]:`${c}:alert`,[s.DialogType.Confirmation]:`${c}:confirmation`,[s.DialogType.Prompt]:`${c}:prompt`,default:c};const u=(0,o.optional)((0,o.size)((0,o.string)(),1,40));n.dialogBuilder=Object.freeze({targetName:c,specificationBuilder:({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:c,allowedCaveats:e,methodImplementation:E(t),subjectTypes:[r.SubjectType.Snap]}),methodHooks:{requestUserApproval:!0,createInterface:!0,getInterface:!0}});const l=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Alert),content:s.ComponentOrElementStruct}),d=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Alert),id:(0,o.string)()}),h=(0,s.selectiveUnion)((e=>(0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"id")?d:l)),f=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Confirmation),content:s.ComponentOrElementStruct}),p=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Confirmation),id:(0,o.string)()}),m=(0,s.selectiveUnion)((e=>(0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"id")?p:f)),y=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Prompt),content:s.ComponentOrElementStruct,placeholder:u}),g=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Prompt),id:(0,o.string)(),placeholder:u}),b=(0,s.selectiveUnion)((e=>(0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"id")?g:y)),v=(0,o.object)({content:s.ComponentOrElementStruct}),x=(0,o.object)({id:(0,o.string)()}),w=(0,s.selectiveUnion)((e=>(0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"id")?x:v)),S=(0,s.selectiveUnion)((e=>{if((0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"type"))switch(e.type){case s.DialogType.Alert:return h;case s.DialogType.Confirmation:return m;case s.DialogType.Prompt:return b;default:throw new Error(`The "type" property must be one of: ${Object.values(s.DialogType).join(", ")}.`)}return w}));function E({requestUserApproval:e,createInterface:t,getInterface:r}){return async function(c){const{params:u,context:{origin:l}}=c;if(!(0,a.isObject)(u))throw i.rpcErrors.invalidParams({message:"Invalid params: Expected params to be a single object."});const d=function(e){try{return(0,o.create)(e,S)}catch(e){throw i.rpcErrors.invalidParams({message:`Invalid params: ${e.message}`})}}(u),h=function(e){return function(e){return(0,a.hasProperty)(e,"type")?e.type:void 0}(e)===s.DialogType.Prompt}(d)?d.placeholder:void 0,f=(0,a.hasProperty)(d,"type")?d.type:"default",p=n.DIALOG_APPROVAL_TYPES[f];if((0,a.hasProperty)(d,"content")){const r=await t(l,d.content);return e({id:p===n.DIALOG_APPROVAL_TYPES.default?r:void 0,origin:l,type:p,requestData:{id:r,placeholder:h}})}return function(e,t,n){try{n(e,t)}catch(e){throw i.rpcErrors.invalidParams({message:`Invalid params: ${e.message}`})}}(l,d.id,r),e({id:p===n.DIALOG_APPROVAL_TYPES.default?d.id:void 0,origin:l,type:p,requestData:{id:d.id,placeholder:h}})}}n.getDialogImplementation=E},{"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-sdk":200,"@metamask/superstruct":352,"@metamask/utils":369}],185:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBip32EntropyImplementation=n.getBip32EntropyBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("../utils.cjs"),c="snap_getBip32Entropy";function u({getMnemonic:e,getUnlockPromise:t}){return async function(n){await t(!0);const{params:r}=n;(0,o.assert)(r);return(await(0,a.getNode)({curve:r.curve,path:r.path,secretRecoveryPhrase:await e()})).toJSON()}}n.getBip32EntropyBuilder=Object.freeze({targetName:c,specificationBuilder:({methodHooks:e})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:c,allowedCaveats:[s.SnapCaveatType.PermittedDerivationPaths],methodImplementation:u(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==s.SnapCaveatType.PermittedDerivationPaths)throw i.rpcErrors.invalidParams({message:`Expected a single "${s.SnapCaveatType.PermittedDerivationPaths}" caveat.`})},subjectTypes:[r.SubjectType.Snap]}),methodHooks:{getMnemonic:!0,getUnlockPromise:!0}}),n.getBip32EntropyImplementation=u},{"../utils.cjs":196,"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/utils":369}],186:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBip32PublicKeyImplementation=n.getBip32PublicKeyBuilder=n.Bip32PublicKeyArgsStruct=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/superstruct"),a=e("@metamask/utils"),c=e("../utils.cjs"),u="snap_getBip32PublicKey";n.Bip32PublicKeyArgsStruct=(0,s.bip32entropy)((0,o.object)({path:s.Bip32PathStruct,curve:s.CurveStruct,compressed:(0,o.optional)((0,o.boolean)())}));function l({getMnemonic:e,getUnlockPromise:t}){return async function(r){await t(!0),(0,a.assertStruct)(r.params,n.Bip32PublicKeyArgsStruct,"Invalid BIP-32 public key params",i.rpcErrors.invalidParams);const{params:s}=r,o=await(0,c.getNode)({curve:s.curve,path:s.path,secretRecoveryPhrase:await e()});return s.compressed?o.compressedPublicKey:o.publicKey}}n.getBip32PublicKeyBuilder=Object.freeze({targetName:u,specificationBuilder:({methodHooks:e})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:[s.SnapCaveatType.PermittedDerivationPaths],methodImplementation:l(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==s.SnapCaveatType.PermittedDerivationPaths)throw i.rpcErrors.invalidParams({message:`Expected a single "${s.SnapCaveatType.PermittedDerivationPaths}" caveat.`})},subjectTypes:[r.SubjectType.Snap]}),methodHooks:{getMnemonic:!0,getUnlockPromise:!0}}),n.getBip32PublicKeyImplementation=l},{"../utils.cjs":196,"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/superstruct":352,"@metamask/utils":369}],187:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBip44EntropyImplementation=n.getBip44EntropyBuilder=void 0;const r=e("@metamask/key-tree"),i=e("@metamask/permission-controller"),s=e("@metamask/rpc-errors"),o=e("@metamask/snaps-utils"),a="snap_getBip44Entropy";function c({getMnemonic:e,getUnlockPromise:t}){return async function(n){await t(!0);const i=n.params;return(await r.BIP44CoinTypeNode.fromDerivationPath([await e(),"bip32:44'",`bip32:${i.coinType}'`])).toJSON()}}n.getBip44EntropyBuilder=Object.freeze({targetName:a,specificationBuilder:({methodHooks:e})=>({permissionType:i.PermissionType.RestrictedMethod,targetName:a,allowedCaveats:[o.SnapCaveatType.PermittedCoinTypes],methodImplementation:c(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==o.SnapCaveatType.PermittedCoinTypes)throw s.rpcErrors.invalidParams({message:`Expected a single "${o.SnapCaveatType.PermittedCoinTypes}" caveat.`})},subjectTypes:[i.SubjectType.Snap]}),methodHooks:{getMnemonic:!0,getUnlockPromise:!0}}),n.getBip44EntropyImplementation=c},{"@metamask/key-tree":60,"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329}],188:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getEntropyBuilder=n.GetEntropyArgsStruct=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/superstruct"),a=e("@metamask/utils"),c=e("../utils.cjs"),u="snap_getEntropy";n.GetEntropyArgsStruct=(0,o.object)({version:(0,o.literal)(1),salt:(0,o.optional)((0,o.string)())});function l({getMnemonic:e,getUnlockPromise:t}){return async function(r){const{params:o,context:{origin:u}}=r;(0,a.assertStruct)(o,n.GetEntropyArgsStruct,'Invalid "snap_getEntropy" parameters',i.rpcErrors.invalidParams),await t(!0);const l=await e();return(0,c.deriveEntropy)({input:u,salt:o.salt,mnemonicPhrase:l,magic:s.SIP_6_MAGIC_VALUE})}}n.getEntropyBuilder=Object.freeze({targetName:u,specificationBuilder:({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:e,methodImplementation:l(t),subjectTypes:[r.SubjectType.Snap]}),methodHooks:{getMnemonic:!0,getUnlockPromise:!0}})},{"../utils.cjs":196,"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329,"@metamask/superstruct":352,"@metamask/utils":369}],189:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getImplementation=n.getLocaleBuilder=n.specificationBuilder=void 0;const r=e("@metamask/permission-controller"),i="snap_getLocale";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:i,allowedCaveats:e,methodImplementation:s(t),subjectTypes:[r.SubjectType.Snap]});function s({getPreferences:e}){return async function(t){return e().locale}}n.getLocaleBuilder=Object.freeze({targetName:i,specificationBuilder:n.specificationBuilder,methodHooks:{getPreferences:!0}}),n.getImplementation=s},{"@metamask/permission-controller":92}],190:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getImplementation=n.getPreferencesBuilder=n.specificationBuilder=void 0;const r=e("@metamask/permission-controller"),i="snap_getPreferences";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:i,allowedCaveats:e,methodImplementation:s(t),subjectTypes:[r.SubjectType.Snap]});function s({getPreferences:e}){return async function(t){return e()}}n.getPreferencesBuilder=Object.freeze({targetName:i,specificationBuilder:n.specificationBuilder,methodHooks:{getPreferences:!0}}),n.getImplementation=s},{"@metamask/permission-controller":92}],191:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.DIALOG_APPROVAL_TYPES=n.restrictedMethodPermissionBuilders=n.getEncryptionEntropy=n.WALLET_SNAP_PERMISSION_KEY=void 0;const s=e("./dialog.cjs"),o=e("./getBip32Entropy.cjs"),a=e("./getBip32PublicKey.cjs"),c=e("./getBip44Entropy.cjs"),u=e("./getEntropy.cjs"),l=e("./getLocale.cjs"),d=e("./getPreferences.cjs"),h=e("./invokeSnap.cjs"),f=e("./manageAccounts.cjs"),p=e("./manageState.cjs"),m=e("./notify.cjs");var y=e("./invokeSnap.cjs");Object.defineProperty(n,"WALLET_SNAP_PERMISSION_KEY",{enumerable:!0,get:function(){return y.WALLET_SNAP_PERMISSION_KEY}});var g=e("./manageState.cjs");Object.defineProperty(n,"getEncryptionEntropy",{enumerable:!0,get:function(){return g.getEncryptionEntropy}}),n.restrictedMethodPermissionBuilders={[s.dialogBuilder.targetName]:s.dialogBuilder,[o.getBip32EntropyBuilder.targetName]:o.getBip32EntropyBuilder,[a.getBip32PublicKeyBuilder.targetName]:a.getBip32PublicKeyBuilder,[c.getBip44EntropyBuilder.targetName]:c.getBip44EntropyBuilder,[u.getEntropyBuilder.targetName]:u.getEntropyBuilder,[h.invokeSnapBuilder.targetName]:h.invokeSnapBuilder,[p.manageStateBuilder.targetName]:p.manageStateBuilder,[m.notifyBuilder.targetName]:m.notifyBuilder,[f.manageAccountsBuilder.targetName]:f.manageAccountsBuilder,[l.getLocaleBuilder.targetName]:l.getLocaleBuilder,[d.getPreferencesBuilder.targetName]:d.getPreferencesBuilder},i(e("./caveats/index.cjs"),n);var b=e("./dialog.cjs");Object.defineProperty(n,"DIALOG_APPROVAL_TYPES",{enumerable:!0,get:function(){return b.DIALOG_APPROVAL_TYPES}})},{"./caveats/index.cjs":180,"./dialog.cjs":184,"./getBip32Entropy.cjs":185,"./getBip32PublicKey.cjs":186,"./getBip44Entropy.cjs":187,"./getEntropy.cjs":188,"./getLocale.cjs":189,"./getPreferences.cjs":190,"./invokeSnap.cjs":192,"./manageAccounts.cjs":193,"./manageState.cjs":194,"./notify.cjs":195}],192:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getInvokeSnapImplementation=n.invokeSnapBuilder=n.handleSnapInstall=n.WALLET_SNAP_PERMISSION_KEY=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils");n.WALLET_SNAP_PERMISSION_KEY="wallet_snap";n.handleSnapInstall=async({requestData:e,messagingSystem:t})=>{const r=e.permissions[n.WALLET_SNAP_PERMISSION_KEY].caveats?.[0].value,i=t.call("SnapController:getPermitted",e.metadata.origin),s=Object.keys(r).reduce(((e,t)=>(i[t]||(e[t]=r[t]),e)),{});return t.call("SnapController:install",e.metadata.origin,s)};function o({getSnap:e,handleSnapRpcRequest:t}){return async function(n){const{params:r={},context:o}=n,{snapId:a,request:c}=r;if(!e(a))throw i.rpcErrors.invalidRequest({message:`The snap "${a}" is not installed. Please install it first, before invoking the snap.`});const{origin:u}=o;return await t({snapId:a,origin:u,request:c,handler:s.HandlerType.OnRpcRequest})}}n.invokeSnapBuilder=Object.freeze({targetName:n.WALLET_SNAP_PERMISSION_KEY,specificationBuilder:({methodHooks:e})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:n.WALLET_SNAP_PERMISSION_KEY,allowedCaveats:[s.SnapCaveatType.SnapIds],methodImplementation:o(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==s.SnapCaveatType.SnapIds)throw i.rpcErrors.invalidParams({message:`Expected a single "${s.SnapCaveatType.SnapIds}" caveat.`})},sideEffect:{onPermitted:n.handleSnapInstall}}),methodHooks:{getSnap:!0,handleSnapRpcRequest:!0}}),n.getInvokeSnapImplementation=o},{"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-utils":329}],193:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.manageAccountsBuilder=n.manageAccountsImplementation=n.specificationBuilder=n.methodName=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=(0,i.union)([(0,i.object)({method:(0,i.string)()}),(0,i.object)({method:(0,i.string)(),params:(0,i.union)([(0,i.array)(s.JsonStruct),(0,i.record)((0,i.string)(),s.JsonStruct)])})]);n.methodName="snap_manageAccounts";function a({getSnapKeyring:e}){return async function(t){const{context:{origin:n},params:r}=t;(0,i.assert)(r,o);const s=await e(n);return await s.handleKeyringSnapMessage(n,r)}}n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:n.methodName,allowedCaveats:e,methodImplementation:a(t),subjectTypes:[r.SubjectType.Snap]}),n.manageAccountsImplementation=a,n.manageAccountsBuilder=Object.freeze({targetName:n.methodName,specificationBuilder:n.specificationBuilder,methodHooks:{getSnapKeyring:!0}})},{"@metamask/permission-controller":92,"@metamask/superstruct":352,"@metamask/utils":369}],194:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedParams=n.getManageStateImplementation=n.getEncryptionEntropy=n.STORAGE_SIZE_LIMIT=n.manageStateBuilder=n.specificationBuilder=n.STATE_ENCRYPTION_SALT=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-sdk"),o=e("@metamask/snaps-utils"),a=e("@metamask/utils"),c=e("../utils.cjs");n.STATE_ENCRYPTION_SALT="snap_manageState encryption";const u="snap_manageState";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:e,methodImplementation:l(t),subjectTypes:[r.SubjectType.Snap]});function l({getUnlockPromise:e,clearSnapState:t,getSnapState:n,updateSnapState:r}){return async function(o){const{params:a={},method:c,context:{origin:u}}=o,l=d(a,c),h=l.encrypted??!0;switch(h&&l.operation!==s.ManageStateOperation.ClearState&&await e(!0),l.operation){case s.ManageStateOperation.ClearState:return t(u,h),null;case s.ManageStateOperation.GetState:return await n(u,h);case s.ManageStateOperation.UpdateState:return await r(u,l.newState,h),null;default:throw i.rpcErrors.invalidParams(`Invalid ${c} operation: "${l.operation}"`)}}}function d(e,t,r=n.STORAGE_SIZE_LIMIT){if(!(0,a.isObject)(e))throw i.rpcErrors.invalidParams({message:"Expected params to be a single object."});const{operation:o,newState:c,encrypted:u}=e;if(!o||"string"!=typeof o||!Object.values(s.ManageStateOperation).includes(o))throw i.rpcErrors.invalidParams({message:'Must specify a valid manage state "operation".'});if(void 0!==u&&"boolean"!=typeof u)throw i.rpcErrors.invalidParams({message:'"encrypted" parameter must be a boolean if specified.'});if(o===s.ManageStateOperation.UpdateState){if(!(0,a.isObject)(c))throw i.rpcErrors.invalidParams({message:`Invalid ${t} "updateState" parameter: The new state must be a plain object.`,data:{receivedNewState:void 0===c?"undefined":c}});let e;try{e=(0,a.getJsonSize)(c)}catch{throw i.rpcErrors.invalidParams({message:`Invalid ${t} "updateState" parameter: The new state must be JSON serializable.`,data:{receivedNewState:void 0===c?"undefined":c}})}if(e>r)throw i.rpcErrors.invalidParams({message:`Invalid ${t} "updateState" parameter: The new state must not exceed ${r} bytes in size.`,data:{receivedNewState:void 0===c?"undefined":c}})}return e}n.manageStateBuilder=Object.freeze({targetName:u,specificationBuilder:n.specificationBuilder,methodHooks:{getUnlockPromise:!0,clearSnapState:!0,getSnapState:!0,updateSnapState:!0}}),n.STORAGE_SIZE_LIMIT=104857600,n.getEncryptionEntropy=async function({mnemonicPhrase:e,snapId:t}){return await(0,c.deriveEntropy)({mnemonicPhrase:e,input:t,salt:n.STATE_ENCRYPTION_SALT,magic:o.STATE_ENCRYPTION_MAGIC_VALUE})},n.getManageStateImplementation=l,n.getValidatedParams=d},{"../utils.cjs":196,"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-sdk":200,"@metamask/snaps-utils":329,"@metamask/utils":369}],195:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedParams=n.getImplementation=n.notifyBuilder=n.specificationBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-sdk"),o=e("@metamask/snaps-utils"),a=e("@metamask/utils"),c="snap_notify";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:c,allowedCaveats:e,methodImplementation:u(t),subjectTypes:[r.SubjectType.Snap]});function u({showNativeNotification:e,showInAppNotification:t,isOnPhishingList:n,maybeUpdatePhishingList:r,getSnap:a}){return async function(c){const{params:u,context:{origin:d}}=c,h=l(u);switch(await r(),(0,o.validateTextLinks)(h.message,n,a),h.type){case s.NotificationType.Native:return await e(d,h);case s.NotificationType.InApp:return await t(d,h);default:throw i.rpcErrors.invalidParams({message:'Must specify a valid notification "type".'})}}}function l(e){if(!(0,a.isObject)(e))throw i.rpcErrors.invalidParams({message:"Expected params to be a single object."});const{type:t,message:n}=e;if(!t||"string"!=typeof t||!Object.values(s.NotificationType).includes(t))throw i.rpcErrors.invalidParams({message:'Must specify a valid notification "type".'});const r=!n||"string"!=typeof n;if(t===s.NotificationType.Native&&(r||n.length>=50))throw i.rpcErrors.invalidParams({message:'Must specify a non-empty string "message" less than 50 characters long.'});if(t===s.NotificationType.InApp&&(r||n.length>=500))throw i.rpcErrors.invalidParams({message:'Must specify a non-empty string "message" less than 500 characters long.'});return e}n.notifyBuilder=Object.freeze({targetName:c,specificationBuilder:n.specificationBuilder,methodHooks:{showNativeNotification:!0,showInAppNotification:!0,isOnPhishingList:!0,maybeUpdatePhishingList:!0,getSnap:!0}}),n.getImplementation=u,n.getValidatedParams=l},{"@metamask/permission-controller":92,"@metamask/rpc-errors":130,"@metamask/snaps-sdk":200,"@metamask/snaps-utils":329,"@metamask/utils":369}],196:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getNode=n.getPathPrefix=n.deriveEntropy=n.selectHooks=void 0;const r=e("@metamask/key-tree"),i=e("@metamask/utils"),s=e("@noble/hashes/sha3"),o=2147483648;function a(e){switch(e){case"secp256k1":return"bip32";case"ed25519":return"slip10";case"ed25519Bip32":return"cip3";default:return(0,i.assertExhaustive)(e)}}n.selectHooks=function(e,t){if(t)return Object.keys(t).reduce(((t,n)=>{const r=n;return t[r]=e[r],t}),{})},n.deriveEntropy=async function({input:e,salt:t="",mnemonicPhrase:n,magic:a}){const c=(0,i.stringToBytes)(e),u=(0,i.stringToBytes)(t),l=function(e){const t=[],n=(0,i.createDataView)(e);for(let e=0;e<8;e++){const r=(n.getUint32(4*e)|o)>>>0;t.push(`bip32:${r-o}'`)}return t}((0,s.keccak_256)((0,i.concatBytes)([c,(0,s.keccak_256)(u)]))),{privateKey:d}=await r.SLIP10Node.fromDerivationPath({derivationPath:[n,`bip32:${a}`,...l],curve:"secp256k1"});return(0,i.assert)(d,"Failed to derive the entropy."),(0,i.add0x)(d)},n.getPathPrefix=a,n.getNode=async function({curve:e,secretRecoveryPhrase:t,path:n}){const i=a(e);return await r.SLIP10Node.fromDerivationPath({curve:e,derivationPath:[t,...n.slice(1).map((e=>`${i}:${e}`))]})}},{"@metamask/key-tree":60,"@metamask/utils":369,"@noble/hashes/sha3":398}],197:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UserRejectedRequestError=n.UnsupportedMethodError=n.UnauthorizedError=n.DisconnectedError=n.ChainDisconnectedError=n.TransactionRejected=n.ResourceUnavailableError=n.ResourceNotFoundError=n.ParseError=n.MethodNotSupportedError=n.MethodNotFoundError=n.LimitExceededError=n.InvalidRequestError=n.InvalidParamsError=n.InvalidInputError=n.InternalError=void 0;const r=e("@metamask/rpc-errors"),i=e("./internals/index.cjs");n.InternalError=(0,i.createSnapError)(r.rpcErrors.internal),n.InvalidInputError=(0,i.createSnapError)(r.rpcErrors.invalidInput),n.InvalidParamsError=(0,i.createSnapError)(r.rpcErrors.invalidParams),n.InvalidRequestError=(0,i.createSnapError)(r.rpcErrors.invalidRequest),n.LimitExceededError=(0,i.createSnapError)(r.rpcErrors.limitExceeded),n.MethodNotFoundError=(0,i.createSnapError)(r.rpcErrors.methodNotFound),n.MethodNotSupportedError=(0,i.createSnapError)(r.rpcErrors.methodNotSupported),n.ParseError=(0,i.createSnapError)(r.rpcErrors.parse),n.ResourceNotFoundError=(0,i.createSnapError)(r.rpcErrors.resourceNotFound),n.ResourceUnavailableError=(0,i.createSnapError)(r.rpcErrors.resourceUnavailable),n.TransactionRejected=(0,i.createSnapError)(r.rpcErrors.transactionRejected),n.ChainDisconnectedError=(0,i.createSnapError)(r.providerErrors.chainDisconnected),n.DisconnectedError=(0,i.createSnapError)(r.providerErrors.disconnected),n.UnauthorizedError=(0,i.createSnapError)(r.providerErrors.unauthorized),n.UnsupportedMethodError=(0,i.createSnapError)(r.providerErrors.unsupportedMethod),n.UserRejectedRequestError=(0,i.createSnapError)(r.providerErrors.userRejectedRequest)},{"./internals/index.cjs":204,"@metamask/rpc-errors":130}],198:[function(e,t,n){"use strict";var r,i,s,o,a=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},c=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.SnapError=void 0;const u=e("./internals/index.cjs");class l extends Error{constructor(e,t={}){const n=(0,u.getErrorMessage)(e);super(n),r.set(this,void 0),i.set(this,void 0),s.set(this,void 0),o.set(this,void 0),a(this,i,n,"f"),a(this,r,(0,u.getErrorCode)(e),"f");const c={...(0,u.getErrorData)(e),...t};Object.keys(c).length>0&&a(this,s,c,"f"),a(this,o,super.stack,"f")}get name(){return"SnapError"}get code(){return c(this,r,"f")}get message(){return c(this,i,"f")}get data(){return c(this,s,"f")}get stack(){return c(this,o,"f")}toJSON(){return{code:u.SNAP_ERROR_CODE,message:u.SNAP_ERROR_MESSAGE,data:{cause:{code:this.code,message:this.message,stack:this.stack,...this.data?{data:this.data}:{}}}}}serialize(){return this.toJSON()}}n.SnapError=l,r=new WeakMap,i=new WeakMap,s=new WeakMap,o=new WeakMap},{"./internals/index.cjs":204}],199:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getImageComponent=n.getImageData=void 0;const r=e("@metamask/utils"),i=e("./ui/index.cjs");async function s(e,t){const n=await async function(e,t){if("function"!=typeof fetch)throw new Error(`Failed to fetch image data from "${e}": Using this function requires the "endowment:network-access" permission.`);return fetch(e,t).then((async t=>{if(!t.ok)throw new Error(`Failed to fetch image data from "${e}": ${t.status} ${t.statusText}`);const n=await t.blob();return(0,r.assert)("image/jpeg"===n.type||"image/png"===n.type,"Expected image data to be a JPEG or PNG image."),n}))}(e,t),i=new Uint8Array(await n.arrayBuffer());return`data:${n.type};base64,${(0,r.bytesToBase64)(i)}`}n.getImageData=s,n.getImageComponent=async function(e,{width:t,height:n=t,request:o}){(0,r.assert)("number"==typeof t&&t>0,"Expected width to be a number greater than 0."),(0,r.assert)("number"==typeof n&&n>0,"Expected height to be a number greater than 0.");const a=await s(e,o),c=`width="${t}" height="${n}"`;return(0,i.image)(``)}},{"./ui/index.cjs":306,"@metamask/utils":369}],200:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.assert=n.selectiveUnion=n.typedUnion=n.enumValue=n.union=n.literal=n.SNAP_ERROR_MESSAGE=n.SNAP_ERROR_CODE=n.getErrorStack=n.getErrorMessage=n.getErrorData=void 0;var s=e("./internals/index.cjs");Object.defineProperty(n,"getErrorData",{enumerable:!0,get:function(){return s.getErrorData}}),Object.defineProperty(n,"getErrorMessage",{enumerable:!0,get:function(){return s.getErrorMessage}}),Object.defineProperty(n,"getErrorStack",{enumerable:!0,get:function(){return s.getErrorStack}}),Object.defineProperty(n,"SNAP_ERROR_CODE",{enumerable:!0,get:function(){return s.SNAP_ERROR_CODE}}),Object.defineProperty(n,"SNAP_ERROR_MESSAGE",{enumerable:!0,get:function(){return s.SNAP_ERROR_MESSAGE}}),Object.defineProperty(n,"literal",{enumerable:!0,get:function(){return s.literal}}),Object.defineProperty(n,"union",{enumerable:!0,get:function(){return s.union}}),Object.defineProperty(n,"enumValue",{enumerable:!0,get:function(){return s.enumValue}}),Object.defineProperty(n,"typedUnion",{enumerable:!0,get:function(){return s.typedUnion}}),Object.defineProperty(n,"selectiveUnion",{enumerable:!0,get:function(){return s.selectiveUnion}});var o=e("@metamask/utils");Object.defineProperty(n,"assert",{enumerable:!0,get:function(){return o.assert}}),i(e("./errors.cjs"),n),i(e("./error-wrappers.cjs"),n),i(e("./images.cjs"),n),i(e("./types/index.cjs"),n),i(e("./ui/index.cjs"),n)},{"./error-wrappers.cjs":197,"./errors.cjs":198,"./images.cjs":199,"./internals/index.cjs":204,"./types/index.cjs":261,"./ui/index.cjs":306,"@metamask/utils":369}],201:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapError=void 0;const r=e("../errors.cjs");n.createSnapError=function(e){return class extends r.SnapError{constructor(t,n){if("object"==typeof t){const n=e();return void super({code:n.code,message:n.message,data:t})}const r=e(t);super({code:r.code,message:r.message,data:n})}}}},{"../errors.cjs":198}],202:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorData=n.getErrorCode=n.getErrorStack=n.getErrorMessage=n.SNAP_ERROR_MESSAGE=n.SNAP_ERROR_CODE=void 0;const r=e("@metamask/utils");n.SNAP_ERROR_CODE=-31002,n.SNAP_ERROR_MESSAGE="Snap Error",n.getErrorMessage=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:String(e)},n.getErrorStack=function(e){if((0,r.isObject)(e)&&(0,r.hasProperty)(e,"stack")&&"string"==typeof e.stack)return e.stack},n.getErrorCode=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"code")&&"number"==typeof e.code&&Number.isInteger(e.code)?e.code:-32603},n.getErrorData=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"data")&&"object"==typeof e.data&&null!==e.data&&(0,r.isValidJson)(e.data)&&!Array.isArray(e.data)?e.data:{}}},{"@metamask/utils":369}],203:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],204:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./error-wrappers.cjs"),n),i(e("./errors.cjs"),n),i(e("./helpers.cjs"),n),i(e("./structs.cjs"),n),i(e("./jsx.cjs"),n),i(e("./svg.cjs"),n)},{"./error-wrappers.cjs":201,"./errors.cjs":202,"./helpers.cjs":203,"./jsx.cjs":205,"./structs.cjs":206,"./svg.cjs":207}],205:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.nullUnion=void 0;const r=e("./structs.cjs");n.nullUnion=function(e){return(0,r.union)(e)}},{"./structs.cjs":206}],206:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.selectiveUnion=n.typedUnion=n.enumValue=n.union=n.literal=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");function s(e){return(0,r.define)(JSON.stringify(e),(0,r.literal)(e).validator)}n.literal=s,n.union=function([e,...t]){const n=(0,r.union)([e,...t]);return new r.Struct({...n,schema:[e,...t]})},n.enumValue=function(e){return s(e)},n.typedUnion=function(e){const t=e.map((e=>"union"===e.type&&Array.isArray(e.schema)?e.schema:e)).flat(1/0),n=t.map((({schema:e})=>e.type.type));return new r.Struct({type:"union",schema:t,*entries(e,n){if(!(0,i.isPlainObject)(e)||!(0,i.hasProperty)(e,"type"))return;const{type:s}=e,o=t.find((({schema:e})=>(0,r.is)(s,e.type)));if(o)for(const t of o.entries(e,n))yield t},coercer(e,n){if(!(0,i.isPlainObject)(e)||!(0,i.hasProperty)(e,"type"))return e;const{type:s}=e,o=t.find((({schema:e})=>(0,r.is)(s,e.type)));return o?o.coercer(e,n):e},*refiner(e,n){const i=t.find((({schema:t})=>(0,r.is)(e.type,t.type)));yield*i.refiner(e,n)},validator(e,s){if(!(0,i.isPlainObject)(e)||!(0,i.hasProperty)(e,"type")||"string"!=typeof e.type)return`Expected type to be one of: ${n.join(", ")}, but received: undefined`;const{type:o}=e,a=t.find((({schema:e})=>(0,r.is)(o,e.type)));return a?a.validator(e,s):`Expected type to be one of: ${n.join(", ")}, but received: "${o}"`}})},n.selectiveUnion=function(e){return new r.Struct({type:"union",schema:null,*entries(t,n){const r=e(t);for(const e of r.entries(t,n))yield e},*refiner(t,n){const r=e(t);yield*r.refiner(t,n)},coercer:(t,n)=>e(t).coercer(t,n),validator:(t,n)=>e(t).validator(t,n)})}},{"@metamask/superstruct":352,"@metamask/utils":369}],207:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.svg=void 0;const r=e("@metamask/superstruct");n.svg=function(){return(0,r.refine)((0,r.string)(),"SVG",(e=>!!e.includes("void 0!==e)))}Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapComponent=void 0,n.createSnapComponent=function(e){return t=>{const{key:n=null,...i}=t;return{type:e,props:r(i),key:n}}}},{}],209:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Address=void 0;const r=e("../component.cjs");n.Address=(0,r.createSnapComponent)("Address")},{"../component.cjs":208}],210:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Avatar=void 0;const r=e("../component.cjs");n.Avatar=(0,r.createSnapComponent)("Avatar")},{"../component.cjs":208}],211:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Box=void 0;const r=e("../component.cjs");n.Box=(0,r.createSnapComponent)("Box")},{"../component.cjs":208}],212:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Card=void 0;const r=e("../component.cjs");n.Card=(0,r.createSnapComponent)("Card")},{"../component.cjs":208}],213:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Container=void 0;const r=e("../component.cjs");n.Container=(0,r.createSnapComponent)("Container")},{"../component.cjs":208}],214:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Copyable=void 0;const r=e("../component.cjs");n.Copyable=(0,r.createSnapComponent)("Copyable")},{"../component.cjs":208}],215:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Divider=void 0;const r=e("../component.cjs");n.Divider=(0,r.createSnapComponent)("Divider")},{"../component.cjs":208}],216:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Footer=void 0;const r=e("../component.cjs");n.Footer=(0,r.createSnapComponent)("Footer")},{"../component.cjs":208}],217:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Heading=void 0;const r=e("../component.cjs");n.Heading=(0,r.createSnapComponent)("Heading")},{"../component.cjs":208}],218:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Icon=n.IconName=void 0;const r=e("../component.cjs");var i;!function(e){e.AddSquare="add-square",e.Add="add",e.Arrow2Down="arrow-2-down",e.Arrow2Left="arrow-2-left",e.Arrow2Right="arrow-2-right",e.Arrow2Up="arrow-2-up",e.Arrow2UpRight="arrow-2-up-right",e.ArrowDoubleLeft="arrow-double-left",e.ArrowDoubleRight="arrow-double-right",e.ArrowDown="arrow-down",e.ArrowLeft="arrow-left",e.ArrowRight="arrow-right",e.ArrowUp="arrow-up",e.BankToken="bank-token",e.Bank="bank",e.Book="book",e.Bookmark="bookmark",e.Bridge="bridge",e.Calculator="calculator",e.CardPos="card-pos",e.CardToken="card-token",e.Card="card",e.Category="category",e.Chart="chart",e.CheckBold="check-bold",e.Check="check",e.Clock="clock",e.Close="close",e.CodeCircle="code-circle",e.Coin="coin",e.Confirmation="confirmation",e.Connect="connect",e.CopySuccess="copy-success",e.Copy="copy",e.Customize="customize",e.Danger="danger",e.Dark="dark",e.Data="data",e.Diagram="diagram",e.DocumentCode="document-code",e.DragDrop="drag-drop",e.DraggingAnimation="dragging-animation",e.PinningAnimation="pinning-animation",e.Edit="edit",e.Eraser="eraser",e.Ethereum="ethereum",e.Expand="expand",e.Explore="explore",e.Export="export",e.EyeSlash="eye-slash",e.Eye="eye",e.Filter="filter",e.Flag="flag",e.FlashSlash="flash-slash",e.Flash="flash",e.FullCircle="full-circle",e.Gas="gas",e.GlobalSearch="global-search",e.Global="global",e.Graph="graph",e.Hardware="hardware",e.Heart="heart",e.Hierarchy="hierarchy",e.Home="home",e.Import="import",e.Info="info",e.Key="key",e.Light="light",e.Link="link",e.Loading="loading",e.LockCircle="lock-circle",e.LockSlash="lock-slash",e.Lock="lock",e.Login="login",e.Logout="logout",e.Menu="menu",e.MessageQuestion="message-question",e.Messages="messages",e.MinusBold="minus-bold",e.MinusSquare="minus-square",e.Minus="minus",e.Mobile="mobile",e.Money="money",e.Monitor="monitor",e.MoreHorizontal="more-horizontal",e.MoreVertical="more-vertical",e.NotificationCircle="notification-circle",e.Notification="notification",e.PasswordCheck="password-check",e.People="people",e.Pin="pin",e.ProgrammingArrows="programming-arrows",e.Custody="custody",e.Question="question",e.Received="received",e.Refresh="refresh",e.Save="save",e.ScanBarcode="scan-barcode",e.ScanFocus="scan-focus",e.Scan="scan",e.Scroll="scroll",e.Search="search",e.SecurityCard="security-card",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.Send1="send-1",e.Send2="send-2",e.Setting="setting",e.Slash="slash",e.SnapsMobile="snaps-mobile",e.SnapsPlus="snaps-plus",e.Snaps="snaps",e.Speedometer="speedometer",e.Star="star",e.Stake="stake",e.Student="student",e.SwapHorizontal="swap-horizontal",e.SwapVertical="swap-vertical",e.Tag="tag",e.Tilde="tilde",e.Timer="timer",e.Trash="trash",e.TrendDown="trend-down",e.TrendUp="trend-up",e.UserCircleAdd="user-circle-add",e.UserCircleLink="user-circle-link",e.UserCircleRemove="user-circle-remove",e.UserCircle="user-circle",e.User="user",e.WalletCard="wallet-card",e.WalletMoney="wallet-money",e.Wallet="wallet",e.Warning="warning",e.Twitter="twitter",e.QrCode="qr-code",e.UserCheck="user-check",e.Unpin="unpin",e.Ban="ban",e.Bold="bold",e.CircleX="circle-x",e.Download="download",e.FileIcon="file",e.Flask="flask",e.Plug="plug",e.Share="share",e.Square="square",e.Tint="tint",e.Upload="upload",e.Usb="usb",e.Wifi="wifi",e.PlusMinus="plus-minus"}(i||(n.IconName=i={}));n.Icon=(0,r.createSnapComponent)("Icon")},{"../component.cjs":208}],219:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Image=void 0;const r=e("../component.cjs");n.Image=(0,r.createSnapComponent)("Image")},{"../component.cjs":208}],220:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Link=void 0;const r=e("../component.cjs");n.Link=(0,r.createSnapComponent)("Link")},{"../component.cjs":208}],221:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Row=void 0;const r=e("../component.cjs");n.Row=(0,r.createSnapComponent)("Row")},{"../component.cjs":208}],222:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Section=void 0;const r=e("../component.cjs");n.Section=(0,r.createSnapComponent)("Section")},{"../component.cjs":208}],223:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Spinner=void 0;const r=e("../component.cjs");n.Spinner=(0,r.createSnapComponent)("Spinner")},{"../component.cjs":208}],224:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Text=void 0;const r=e("../component.cjs");n.Text=(0,r.createSnapComponent)("Text")},{"../component.cjs":208}],225:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Tooltip=void 0;const r=e("../component.cjs");n.Tooltip=(0,r.createSnapComponent)("Tooltip")},{"../component.cjs":208}],226:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Value=void 0;const r=e("../component.cjs");n.Value=(0,r.createSnapComponent)("Value")},{"../component.cjs":208}],227:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Button=void 0;const r=e("../../component.cjs");n.Button=(0,r.createSnapComponent)("Button")},{"../../component.cjs":208}],228:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Checkbox=void 0;const r=e("../../component.cjs");n.Checkbox=(0,r.createSnapComponent)("Checkbox")},{"../../component.cjs":208}],229:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Dropdown=void 0;const r=e("../../component.cjs");n.Dropdown=(0,r.createSnapComponent)("Dropdown")},{"../../component.cjs":208}],230:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Field=void 0;const r=e("../../component.cjs");n.Field=(0,r.createSnapComponent)("Field")},{"../../component.cjs":208}],231:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FileInput=void 0;const r=e("../../component.cjs");n.FileInput=(0,r.createSnapComponent)("FileInput")},{"../../component.cjs":208}],232:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Form=void 0;const r=e("../../component.cjs");n.Form=(0,r.createSnapComponent)("Form")},{"../../component.cjs":208}],233:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Input=void 0;const r=e("../../component.cjs");n.Input=(0,r.createSnapComponent)("Input")},{"../../component.cjs":208}],234:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Option=void 0;const r=e("../../component.cjs");e("./Dropdown.cjs");n.Option=(0,r.createSnapComponent)("Option")},{"../../component.cjs":208,"./Dropdown.cjs":229}],235:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Radio=void 0;const r=e("../../component.cjs");n.Radio=(0,r.createSnapComponent)("Radio")},{"../../component.cjs":208}],236:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RadioGroup=void 0;const r=e("../../component.cjs");n.RadioGroup=(0,r.createSnapComponent)("RadioGroup")},{"../../component.cjs":208}],237:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Selector=void 0;const r=e("../../component.cjs");n.Selector=(0,r.createSnapComponent)("Selector")},{"../../component.cjs":208}],238:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SelectorOption=void 0;const r=e("../../component.cjs");n.SelectorOption=(0,r.createSnapComponent)("SelectorOption")},{"../../component.cjs":208}],239:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./Button.cjs"),n),i(e("./Checkbox.cjs"),n),i(e("./Dropdown.cjs"),n),i(e("./Option.cjs"),n),i(e("./Radio.cjs"),n),i(e("./RadioGroup.cjs"),n),i(e("./Field.cjs"),n),i(e("./FileInput.cjs"),n),i(e("./Form.cjs"),n),i(e("./Input.cjs"),n),i(e("./Selector.cjs"),n),i(e("./SelectorOption.cjs"),n)},{"./Button.cjs":227,"./Checkbox.cjs":228,"./Dropdown.cjs":229,"./Field.cjs":230,"./FileInput.cjs":231,"./Form.cjs":232,"./Input.cjs":233,"./Option.cjs":234,"./Radio.cjs":235,"./RadioGroup.cjs":236,"./Selector.cjs":237,"./SelectorOption.cjs":238}],240:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Bold=void 0;const r=e("../../component.cjs");e("../Text.cjs");n.Bold=(0,r.createSnapComponent)("Bold")},{"../../component.cjs":208,"../Text.cjs":224}],241:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Italic=void 0;const r=e("../../component.cjs");n.Italic=(0,r.createSnapComponent)("Italic")},{"../../component.cjs":208}],242:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./Bold.cjs"),n),i(e("./Italic.cjs"),n)},{"./Bold.cjs":240,"./Italic.cjs":241}],243:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./form/index.cjs"),n),i(e("./formatting/index.cjs"),n),i(e("./Address.cjs"),n),i(e("./Avatar.cjs"),n),i(e("./Box.cjs"),n),i(e("./Card.cjs"),n),i(e("./Copyable.cjs"),n),i(e("./Divider.cjs"),n),i(e("./Value.cjs"),n),i(e("./Heading.cjs"),n),i(e("./Icon.cjs"),n),i(e("./Image.cjs"),n),i(e("./Link.cjs"),n),i(e("./Row.cjs"),n),i(e("./Spinner.cjs"),n),i(e("./Text.cjs"),n),i(e("./Tooltip.cjs"),n),i(e("./Footer.cjs"),n),i(e("./Container.cjs"),n),i(e("./Section.cjs"),n)},{"./Address.cjs":209,"./Avatar.cjs":210,"./Box.cjs":211,"./Card.cjs":212,"./Container.cjs":213,"./Copyable.cjs":214,"./Divider.cjs":215,"./Footer.cjs":216,"./Heading.cjs":217,"./Icon.cjs":218,"./Image.cjs":219,"./Link.cjs":220,"./Row.cjs":221,"./Section.cjs":222,"./Spinner.cjs":223,"./Text.cjs":224,"./Tooltip.cjs":225,"./Value.cjs":226,"./form/index.cjs":239,"./formatting/index.cjs":242}],244:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.FieldChildUnionStruct=n.FormChildStruct=n.BoxChildStruct=n.assertJSXElement=n.isJSXElementUnsafe=n.isJSXElement=n.RootJSXElementStruct=n.JSXElementStruct=void 0,i(e("./component.cjs"),n),i(e("./components/index.cjs"),n),i(e("./jsx-runtime.cjs"),n),i(e("./jsx-dev-runtime.cjs"),n);var s=e("./validation.cjs");Object.defineProperty(n,"JSXElementStruct",{enumerable:!0,get:function(){return s.JSXElementStruct}}),Object.defineProperty(n,"RootJSXElementStruct",{enumerable:!0,get:function(){return s.RootJSXElementStruct}}),Object.defineProperty(n,"isJSXElement",{enumerable:!0,get:function(){return s.isJSXElement}}),Object.defineProperty(n,"isJSXElementUnsafe",{enumerable:!0,get:function(){return s.isJSXElementUnsafe}}),Object.defineProperty(n,"assertJSXElement",{enumerable:!0,get:function(){return s.assertJSXElement}}),Object.defineProperty(n,"BoxChildStruct",{enumerable:!0,get:function(){return s.BoxChildStruct}}),Object.defineProperty(n,"FormChildStruct",{enumerable:!0,get:function(){return s.FormChildStruct}}),Object.defineProperty(n,"FieldChildUnionStruct",{enumerable:!0,get:function(){return s.FieldChildUnionStruct}})},{"./component.cjs":208,"./components/index.cjs":243,"./jsx-dev-runtime.cjs":245,"./jsx-runtime.cjs":246,"./validation.cjs":247}],245:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jsxDEV=void 0;const r=e("./jsx-runtime.cjs"),i=e("./validation.cjs");n.jsxDEV=function(e,t,n){const s=(0,r.jsx)(e,t,n);return(0,i.assertJSXElement)(s),s}},{"./jsx-runtime.cjs":246,"./validation.cjs":247}],246:[function(e,t,n){"use strict";function r(e,t,n){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:n})}Object.defineProperty(n,"__esModule",{value:!0}),n.jsxs=n.jsx=void 0,n.jsx=r,n.jsxs=function(e,t,n){return r(e,t,n)}},{}],247:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isJSXElement=n.JSXElementStruct=n.RootJSXElementStruct=n.ContainerStruct=n.BoxChildStruct=n.SpinnerStruct=n.RowStruct=n.TooltipStruct=n.TooltipContentStruct=n.TooltipChildStruct=n.TextStruct=n.LinkStruct=n.HeadingStruct=n.ValueStruct=n.DividerStruct=n.CopyableStruct=n.FooterStruct=n.FooterChildStruct=n.SectionStruct=n.BoxStruct=n.BoxChildrenStruct=n.AvatarStruct=n.FormattingStruct=n.ItalicStruct=n.BoldStruct=n.FormStruct=n.FormChildStruct=n.FieldStruct=n.FieldChildUnionStruct=n.FileInputStruct=n.RadioGroupStruct=n.RadioStruct=n.SelectorStruct=n.SelectorOptionStruct=n.CardStruct=n.AddressStruct=n.DropdownStruct=n.OptionStruct=n.InputStruct=n.NumberInputPropsStruct=n.PasswordInputPropsStruct=n.TextInputPropsStruct=n.GenericInputPropsStruct=n.CheckboxStruct=n.ButtonStruct=n.IconStruct=n.ImageStruct=n.ElementStruct=n.StringElementStruct=n.KeyStruct=void 0,n.assertJSXElement=n.isJSXElementUnsafe=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("../internals/index.cjs"),o=e("./components/index.cjs");function a(e){return function(e){const t=(0,s.selectiveUnion)((n=>Array.isArray(n)?(0,r.array)((0,r.lazy)((()=>t))):e));return t}((0,r.nullable)((0,s.selectiveUnion)((t=>"boolean"==typeof t?(0,r.boolean)():1===e.length?e[0]:(0,s.nullUnion)(e)))))}function c(e){return(0,r.nullable)((0,s.selectiveUnion)((t=>"boolean"==typeof t?(0,r.boolean)():e)))}function u(e,t={}){return(0,r.object)({type:(0,s.literal)(e),props:(0,r.object)(t),key:(0,r.nullable)(n.KeyStruct)})}n.KeyStruct=(0,s.nullUnion)([(0,r.string)(),(0,r.number)()]),n.StringElementStruct=a([(0,r.string)()]),n.ElementStruct=(0,r.object)({type:(0,r.string)(),props:(0,r.record)((0,r.string)(),i.JsonStruct),key:(0,r.nullable)(n.KeyStruct)}),n.ImageStruct=u("Image",{src:(0,s.svg)(),alt:(0,r.optional)((0,r.string)())});const l=(0,s.nullUnion)(Object.values(o.IconName).map((e=>(0,s.literal)(e))));n.IconStruct=u("Icon",{name:l,color:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("default"),(0,s.literal)("primary"),(0,s.literal)("muted")])),size:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("md"),(0,s.literal)("inherit")]))}),n.ButtonStruct=u("Button",{children:a([n.StringElementStruct,n.ImageStruct,n.IconStruct]),name:(0,r.optional)((0,r.string)()),type:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("button"),(0,s.literal)("submit")])),variant:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("primary"),(0,s.literal)("destructive")])),disabled:(0,r.optional)((0,r.boolean)()),form:(0,r.optional)((0,r.string)())}),n.CheckboxStruct=u("Checkbox",{name:(0,r.string)(),checked:(0,r.optional)((0,r.boolean)()),label:(0,r.optional)((0,r.string)()),variant:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("default"),(0,s.literal)("toggle")]))}),n.GenericInputPropsStruct=(0,r.object)({name:(0,r.string)(),value:(0,r.optional)((0,r.string)()),placeholder:(0,r.optional)((0,r.string)())}),n.TextInputPropsStruct=(0,r.assign)(n.GenericInputPropsStruct,(0,r.object)({type:(0,s.literal)("text")})),n.PasswordInputPropsStruct=(0,r.assign)(n.GenericInputPropsStruct,(0,r.object)({type:(0,s.literal)("password")})),n.NumberInputPropsStruct=(0,r.assign)(n.GenericInputPropsStruct,(0,r.object)({type:(0,s.literal)("number"),min:(0,r.optional)((0,r.number)()),max:(0,r.optional)((0,r.number)()),step:(0,r.optional)((0,r.number)())})),n.InputStruct=function(e,t){return(0,r.object)({type:(0,s.literal)(e),props:(0,s.selectiveUnion)(t),key:(0,r.nullable)(n.KeyStruct)})}("Input",(e=>{if((0,i.isPlainObject)(e)&&(0,i.hasProperty)(e,"type"))switch(e.type){case"text":return n.TextInputPropsStruct;case"password":return n.PasswordInputPropsStruct;case"number":return n.NumberInputPropsStruct;default:return n.GenericInputPropsStruct}return n.GenericInputPropsStruct})),n.OptionStruct=u("Option",{value:(0,r.string)(),children:(0,r.string)()}),n.DropdownStruct=u("Dropdown",{name:(0,r.string)(),value:(0,r.optional)((0,r.string)()),children:a([n.OptionStruct])}),n.AddressStruct=u("Address",{address:(0,s.nullUnion)([i.HexChecksumAddressStruct,i.CaipAccountIdStruct]),truncate:(0,r.optional)((0,r.boolean)()),displayName:(0,r.optional)((0,r.boolean)()),avatar:(0,r.optional)((0,r.boolean)())}),n.CardStruct=u("Card",{image:(0,r.optional)((0,r.string)()),title:(0,s.selectiveUnion)((e=>"object"==typeof e?n.AddressStruct:(0,r.string)())),description:(0,r.optional)((0,r.string)()),value:(0,r.string)(),extra:(0,r.optional)((0,r.string)())}),n.SelectorOptionStruct=u("SelectorOption",{value:(0,r.string)(),children:n.CardStruct}),n.SelectorStruct=u("Selector",{name:(0,r.string)(),title:(0,r.string)(),value:(0,r.optional)((0,r.string)()),children:a([n.SelectorOptionStruct])}),n.RadioStruct=u("Radio",{value:(0,r.string)(),children:(0,r.string)()}),n.RadioGroupStruct=u("RadioGroup",{name:(0,r.string)(),value:(0,r.optional)((0,r.string)()),children:a([n.RadioStruct])}),n.FileInputStruct=u("FileInput",{name:(0,r.string)(),accept:(0,s.nullUnion)([(0,r.optional)((0,r.array)((0,r.string)()))]),compact:(0,r.optional)((0,r.boolean)())});const d=[c((0,r.lazy)((()=>n.BoxChildStruct))),n.InputStruct],h=[n.InputStruct,c((0,r.lazy)((()=>n.BoxChildStruct)))],f=[c((0,r.lazy)((()=>n.BoxChildStruct))),n.InputStruct,c((0,r.lazy)((()=>n.BoxChildStruct)))],p=[n.InputStruct,n.DropdownStruct,n.RadioGroupStruct,n.FileInputStruct,n.CheckboxStruct,n.SelectorStruct];n.FieldChildUnionStruct=(0,s.nullUnion)([...p,...d,...h,...f]);const m=(0,s.nullUnion)([(0,r.tuple)(d),(0,r.tuple)(h),(0,r.tuple)(f),...p]);n.FieldStruct=u("Field",{label:(0,r.optional)((0,r.string)()),error:(0,r.optional)((0,r.string)()),children:m}),n.FormChildStruct=a([n.FieldStruct,(0,r.lazy)((()=>n.BoxChildStruct))]),n.FormStruct=u("Form",{children:n.FormChildStruct,name:(0,r.string)()}),n.BoldStruct=u("Bold",{children:a([(0,r.string)(),(0,r.lazy)((()=>n.ItalicStruct))])}),n.ItalicStruct=u("Italic",{children:a([(0,r.string)(),(0,r.lazy)((()=>n.BoldStruct))])}),n.FormattingStruct=(0,s.typedUnion)([n.BoldStruct,n.ItalicStruct]),n.AvatarStruct=u("Avatar",{address:i.CaipAccountIdStruct,size:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("sm"),(0,s.literal)("md"),(0,s.literal)("lg")]))}),n.BoxChildrenStruct=a([(0,r.lazy)((()=>n.BoxChildStruct))]),n.BoxStruct=u("Box",{children:n.BoxChildrenStruct,direction:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("horizontal"),(0,s.literal)("vertical")])),alignment:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("start"),(0,s.literal)("center"),(0,s.literal)("end"),(0,s.literal)("space-between"),(0,s.literal)("space-around")])),center:(0,r.optional)((0,r.boolean)())});const y=(0,r.refine)(n.ButtonStruct,"FooterButton",(e=>{if("string"==typeof e.props.children||"boolean"==typeof e.props.children||null===e.props.children)return!0;if(Array.isArray(e.props.children)){if(!e.props.children.some((e=>"string"!=typeof e&&"boolean"!=typeof e&&null!==e)))return!0}return"Footer buttons may only contain text."}));function g(e){return(0,r.is)(e,n.JSXElementStruct)}n.SectionStruct=u("Section",{children:n.BoxChildrenStruct,direction:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("horizontal"),(0,s.literal)("vertical")])),alignment:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("start"),(0,s.literal)("center"),(0,s.literal)("end"),(0,s.literal)("space-between"),(0,s.literal)("space-around")]))}),n.FooterChildStruct=(0,s.selectiveUnion)((e=>Array.isArray(e)?(0,r.tuple)([y,y]):y)),n.FooterStruct=u("Footer",{children:n.FooterChildStruct}),n.CopyableStruct=u("Copyable",{value:(0,r.string)(),sensitive:(0,r.optional)((0,r.boolean)())}),n.DividerStruct=u("Divider"),n.ValueStruct=u("Value",{value:(0,r.string)(),extra:(0,r.string)()}),n.HeadingStruct=u("Heading",{children:n.StringElementStruct,size:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("sm"),(0,s.literal)("md"),(0,s.literal)("lg")]))}),n.LinkStruct=u("Link",{href:(0,r.string)(),children:a([n.FormattingStruct,(0,r.string)(),n.IconStruct,n.ImageStruct,n.AddressStruct])}),n.TextStruct=u("Text",{children:a([(0,s.selectiveUnion)((e=>"string"==typeof e?(0,r.string)():(0,s.typedUnion)([n.BoldStruct,n.ItalicStruct,n.LinkStruct,n.IconStruct])))]),alignment:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("start"),(0,s.literal)("center"),(0,s.literal)("end")])),color:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("default"),(0,s.literal)("alternative"),(0,s.literal)("muted"),(0,s.literal)("error"),(0,s.literal)("success"),(0,s.literal)("warning")]))}),n.TooltipChildStruct=(0,s.selectiveUnion)((e=>"boolean"==typeof e?(0,r.boolean)():(0,s.typedUnion)([n.TextStruct,n.BoldStruct,n.ItalicStruct,n.LinkStruct,n.ImageStruct,n.IconStruct]))),n.TooltipContentStruct=(0,s.selectiveUnion)((e=>"string"==typeof e?(0,r.string)():(0,s.typedUnion)([n.TextStruct,n.BoldStruct,n.ItalicStruct,n.LinkStruct,n.IconStruct]))),n.TooltipStruct=u("Tooltip",{children:(0,r.nullable)(n.TooltipChildStruct),content:n.TooltipContentStruct}),n.RowStruct=u("Row",{label:(0,r.string)(),children:(0,s.typedUnion)([n.AddressStruct,n.ImageStruct,n.TextStruct,n.ValueStruct,n.LinkStruct]),variant:(0,r.optional)((0,s.nullUnion)([(0,s.literal)("default"),(0,s.literal)("warning"),(0,s.literal)("critical")])),tooltip:(0,r.optional)((0,r.string)())}),n.SpinnerStruct=u("Spinner"),n.BoxChildStruct=(0,s.typedUnion)([n.AddressStruct,n.BoldStruct,n.BoxStruct,n.ButtonStruct,n.CopyableStruct,n.DividerStruct,n.DropdownStruct,n.RadioGroupStruct,n.FileInputStruct,n.FormStruct,n.HeadingStruct,n.InputStruct,n.ImageStruct,n.ItalicStruct,n.LinkStruct,n.RowStruct,n.SpinnerStruct,n.TextStruct,n.TooltipStruct,n.CheckboxStruct,n.CardStruct,n.IconStruct,n.SelectorStruct,n.SectionStruct,n.AvatarStruct]),n.ContainerStruct=u("Container",{children:(0,s.selectiveUnion)((e=>Array.isArray(e)?(0,r.tuple)([n.BoxChildStruct,n.FooterStruct]):n.BoxChildStruct))}),n.RootJSXElementStruct=(0,s.typedUnion)([n.BoxChildStruct,n.ContainerStruct]),n.JSXElementStruct=(0,s.typedUnion)([n.ButtonStruct,n.InputStruct,n.FileInputStruct,n.FieldStruct,n.FormStruct,n.BoldStruct,n.ItalicStruct,n.AddressStruct,n.BoxStruct,n.CopyableStruct,n.DividerStruct,n.HeadingStruct,n.ImageStruct,n.LinkStruct,n.RowStruct,n.SpinnerStruct,n.TextStruct,n.DropdownStruct,n.OptionStruct,n.RadioGroupStruct,n.RadioStruct,n.ValueStruct,n.TooltipStruct,n.CheckboxStruct,n.FooterStruct,n.ContainerStruct,n.CardStruct,n.IconStruct,n.SelectorStruct,n.SelectorOptionStruct,n.SectionStruct,n.AvatarStruct]),n.isJSXElement=g,n.isJSXElementUnsafe=function(e){return(0,i.isPlainObject)(e)&&(0,i.hasProperty)(e,"type")&&(0,i.hasProperty)(e,"props")&&(0,i.hasProperty)(e,"key")},n.assertJSXElement=function(e){if(!g(e))throw new Error(`Expected a JSX element, but received ${JSON.stringify(e)}. Please refer to the documentation for the supported JSX elements and their props.`)}},{"../internals/index.cjs":204,"./components/index.cjs":243,"@metamask/superstruct":352,"@metamask/utils":369}],248:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],249:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],250:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],251:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],252:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./cronjob.cjs"),n),i(e("./home-page.cjs"),n),i(e("./keyring.cjs"),n),i(e("./lifecycle.cjs"),n),i(e("./name-lookup.cjs"),n),i(e("./rpc-request.cjs"),n),i(e("./transaction.cjs"),n),i(e("./signature.cjs"),n),i(e("./user-input.cjs"),n)},{"./cronjob.cjs":250,"./home-page.cjs":251,"./keyring.cjs":253,"./lifecycle.cjs":254,"./name-lookup.cjs":255,"./rpc-request.cjs":256,"./signature.cjs":257,"./transaction.cjs":258,"./user-input.cjs":259}],253:[function(e,t,n){arguments[4][74][0].apply(n,arguments)},{dup:74}],254:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],255:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],256:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],257:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],258:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.SeverityLevel=void 0,function(e){e.Critical="critical"}(r||(n.SeverityLevel=r={}))},{}],259:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UserInputEventStruct=n.FileUploadEventStruct=n.InputChangeEventStruct=n.FormSubmitEventStruct=n.FileStruct=n.ButtonClickEventStruct=n.GenericEventStruct=n.UserInputEventType=void 0;const r=e("@metamask/superstruct");var i;!function(e){e.ButtonClickEvent="ButtonClickEvent",e.FormSubmitEvent="FormSubmitEvent",e.InputChangeEvent="InputChangeEvent",e.FileUploadEvent="FileUploadEvent"}(i||(n.UserInputEventType=i={})),n.GenericEventStruct=(0,r.object)({type:(0,r.string)(),name:(0,r.optional)((0,r.string)())}),n.ButtonClickEventStruct=(0,r.assign)(n.GenericEventStruct,(0,r.object)({type:(0,r.literal)(i.ButtonClickEvent),name:(0,r.optional)((0,r.string)())})),n.FileStruct=(0,r.object)({name:(0,r.string)(),size:(0,r.number)(),contentType:(0,r.string)(),contents:(0,r.string)()}),n.FormSubmitEventStruct=(0,r.assign)(n.GenericEventStruct,(0,r.object)({type:(0,r.literal)(i.FormSubmitEvent),value:(0,r.record)((0,r.string)(),(0,r.nullable)((0,r.union)([(0,r.string)(),n.FileStruct,(0,r.boolean)()]))),name:(0,r.string)()})),n.InputChangeEventStruct=(0,r.assign)(n.GenericEventStruct,(0,r.object)({type:(0,r.literal)(i.InputChangeEvent),name:(0,r.string)(),value:(0,r.union)([(0,r.string)(),(0,r.boolean)()])})),n.FileUploadEventStruct=(0,r.assign)(n.GenericEventStruct,(0,r.object)({type:(0,r.literal)(i.FileUploadEvent),name:(0,r.string)(),file:(0,r.nullable)(n.FileStruct)})),n.UserInputEventStruct=(0,r.union)([n.ButtonClickEventStruct,n.FormSubmitEventStruct,n.InputChangeEventStruct,n.FileUploadEventStruct])},{"@metamask/superstruct":352}],260:[function(e,t,n){},{}],261:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),e("./global.cjs"),e("./images.cjs"),i(e("./caip.cjs"),n),i(e("./handlers/index.cjs"),n),i(e("./methods/index.cjs"),n),i(e("./permissions.cjs"),n),i(e("./provider.cjs"),n),i(e("./snap.cjs"),n),i(e("./interface.cjs"),n)},{"./caip.cjs":248,"./global.cjs":249,"./handlers/index.cjs":252,"./images.cjs":260,"./interface.cjs":262,"./methods/index.cjs":277,"./permissions.cjs":288,"./provider.cjs":289,"./snap.cjs":290}],262:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContentType=n.InterfaceContextStruct=n.ComponentOrElementStruct=n.InterfaceStateStruct=n.FormStateStruct=n.StateStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("../internals/index.cjs"),o=e("../jsx/index.cjs"),a=e("../ui/index.cjs"),c=e("./handlers/index.cjs");var u;n.StateStruct=(0,r.union)([c.FileStruct,(0,r.string)(),(0,r.boolean)()]),n.FormStateStruct=(0,r.record)((0,r.string)(),(0,r.nullable)(n.StateStruct)),n.InterfaceStateStruct=(0,r.record)((0,r.string)(),(0,r.union)([n.FormStateStruct,(0,r.nullable)(n.StateStruct)])),n.ComponentOrElementStruct=(0,s.selectiveUnion)((e=>(0,i.isObject)(e)&&!(0,i.hasProperty)(e,"props")?a.ComponentStruct:o.RootJSXElementStruct)),n.InterfaceContextStruct=(0,r.record)((0,r.string)(),i.JsonStruct),function(e){e.Insight="Insight",e.Dialog="Dialog",e.Notification="Notification",e.HomePage="HomePage"}(u||(n.ContentType=u={}))},{"../internals/index.cjs":204,"../jsx/index.cjs":244,"../ui/index.cjs":306,"./handlers/index.cjs":252,"@metamask/superstruct":352,"@metamask/utils":369}],263:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],264:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.DialogType=void 0,function(e){e.Alert="alert",e.Confirmation="confirmation",e.Prompt="prompt"}(r||(n.DialogType=r={}))},{}],265:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],266:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],267:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],268:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],269:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],270:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],271:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.AuxiliaryFileEncoding=void 0,function(e){e.Base64="base64",e.Hex="hex",e.Utf8="utf8"}(r||(n.AuxiliaryFileEncoding=r={}))},{}],272:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],273:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],274:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],275:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],276:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],277:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./create-interface.cjs"),n),i(e("./dialog.cjs"),n),i(e("./get-bip32-entropy.cjs"),n),i(e("./get-bip32-public-key.cjs"),n),i(e("./get-bip44-entropy.cjs"),n),i(e("./get-client-status.cjs"),n),i(e("./get-entropy.cjs"),n),i(e("./get-file.cjs"),n),i(e("./get-interface-context.cjs"),n),i(e("./get-interface-state.cjs"),n),i(e("./get-locale.cjs"),n),i(e("./get-preferences.cjs"),n),i(e("./get-snaps.cjs"),n),i(e("./invoke-keyring.cjs"),n),i(e("./invoke-snap.cjs"),n),i(e("./manage-accounts.cjs"),n),i(e("./manage-state.cjs"),n),i(e("./methods.cjs"),n),i(e("./notify.cjs"),n),i(e("./request-snaps.cjs"),n),i(e("./update-interface.cjs"),n),i(e("./resolve-interface.cjs"),n),i(e("./get-currency-rate.cjs"),n),i(e("./provider-request.cjs"),n)},{"./create-interface.cjs":263,"./dialog.cjs":264,"./get-bip32-entropy.cjs":265,"./get-bip32-public-key.cjs":266,"./get-bip44-entropy.cjs":267,"./get-client-status.cjs":268,"./get-currency-rate.cjs":269,"./get-entropy.cjs":270,"./get-file.cjs":271,"./get-interface-context.cjs":272,"./get-interface-state.cjs":273,"./get-locale.cjs":274,"./get-preferences.cjs":275,"./get-snaps.cjs":276,"./invoke-keyring.cjs":278,"./invoke-snap.cjs":279,"./manage-accounts.cjs":280,"./manage-state.cjs":281,"./methods.cjs":282,"./notify.cjs":283,"./provider-request.cjs":284,"./request-snaps.cjs":285,"./resolve-interface.cjs":286,"./update-interface.cjs":287}],278:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],279:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],280:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],281:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.ManageStateOperation=void 0,function(e){e.ClearState="clear",e.GetState="get",e.UpdateState="update"}(r||(n.ManageStateOperation=r={}))},{}],282:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],283:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.NotificationType=void 0,function(e){e.InApp="inApp",e.Native="native"}(r||(n.NotificationType=r={}))},{}],284:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],285:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],286:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],287:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],288:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],289:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],290:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],291:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createBuilder=void 0;const r=e("@metamask/utils");n.createBuilder=function(e,t,n=[]){return(...i)=>{if(1===i.length&&(0,r.isPlainObject)(i[0])){const n={...i[0],type:e};return(0,r.assertStruct)(n,t,`Invalid ${e} component`),n}const s=n.reduce(((e,t,n)=>void 0!==i[n]?{...e,[t]:i[n]}:e),{type:e});return(0,r.assertStruct)(s,t,`Invalid ${e} component`),s}}},{"@metamask/utils":369}],292:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsComponent=n.isComponent=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("./components/index.cjs");n.isComponent=function(e){return(0,r.is)(e,s.ComponentStruct)},n.assertIsComponent=function(e){(0,i.assertStruct)(e,s.ComponentStruct,"Invalid component")}},{"./components/index.cjs":300,"@metamask/superstruct":352,"@metamask/utils":369}],293:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.address=n.AddressStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("../builder.cjs"),o=e("../nodes.cjs");n.AddressStruct=(0,r.assign)(o.LiteralStruct,(0,r.object)({type:(0,r.literal)(o.NodeType.Address),value:i.HexChecksumAddressStruct})),n.address=(0,s.createBuilder)(o.NodeType.Address,n.AddressStruct,["value"])},{"../builder.cjs":291,"../nodes.cjs":307,"@metamask/superstruct":352,"@metamask/utils":369}],294:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.button=n.ButtonStruct=n.ButtonType=n.ButtonVariant=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");var a,c;!function(e){e.Primary="primary",e.Secondary="secondary"}(a||(n.ButtonVariant=a={})),function(e){e.Button="button",e.Submit="submit"}(c||(n.ButtonType=c={})),n.ButtonStruct=(0,r.assign)(o.LiteralStruct,(0,r.object)({type:(0,r.literal)(o.NodeType.Button),value:(0,r.string)(),variant:(0,r.optional)((0,r.union)([(0,i.enumValue)(a.Primary),(0,i.enumValue)(a.Secondary)])),buttonType:(0,r.optional)((0,r.union)([(0,i.enumValue)(c.Button),(0,i.enumValue)(c.Submit)])),name:(0,r.optional)((0,r.string)())})),n.button=(0,s.createBuilder)(o.NodeType.Button,n.ButtonStruct,["value","buttonType","name","variant"])},{"../../internals/index.cjs":204,"../builder.cjs":291,"../nodes.cjs":307,"@metamask/superstruct":352}],295:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.copyable=n.CopyableStruct=void 0;const r=e("@metamask/superstruct"),i=e("../builder.cjs"),s=e("../nodes.cjs");n.CopyableStruct=(0,r.assign)(s.LiteralStruct,(0,r.object)({type:(0,r.literal)(s.NodeType.Copyable),value:(0,r.string)(),sensitive:(0,r.optional)((0,r.boolean)())})),n.copyable=(0,i.createBuilder)(s.NodeType.Copyable,n.CopyableStruct,["value","sensitive"])},{"../builder.cjs":291,"../nodes.cjs":307,"@metamask/superstruct":352}],296:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.divider=n.DividerStruct=void 0;const r=e("@metamask/superstruct"),i=e("../builder.cjs"),s=e("../nodes.cjs");n.DividerStruct=(0,r.assign)(s.NodeStruct,(0,r.object)({type:(0,r.literal)(s.NodeType.Divider)})),n.divider=(0,i.createBuilder)(s.NodeType.Divider,n.DividerStruct)},{"../builder.cjs":291,"../nodes.cjs":307,"@metamask/superstruct":352}],297:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.form=n.FormStruct=n.FormComponentStruct=void 0;const r=e("@metamask/superstruct"),i=e("../builder.cjs"),s=e("../nodes.cjs"),o=e("./button.cjs"),a=e("./input.cjs");n.FormComponentStruct=(0,r.union)([a.InputStruct,o.ButtonStruct]),n.FormStruct=(0,r.assign)(s.NodeStruct,(0,r.object)({type:(0,r.literal)(s.NodeType.Form),children:(0,r.array)(n.FormComponentStruct),name:(0,r.string)()})),n.form=(0,i.createBuilder)(s.NodeType.Form,n.FormStruct,["name","children"])},{"../builder.cjs":291,"../nodes.cjs":307,"./button.cjs":294,"./input.cjs":301,"@metamask/superstruct":352}],298:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.heading=n.HeadingStruct=void 0;const r=e("@metamask/superstruct"),i=e("../builder.cjs"),s=e("../nodes.cjs");n.HeadingStruct=(0,r.assign)(s.LiteralStruct,(0,r.object)({type:(0,r.literal)(s.NodeType.Heading),value:(0,r.string)()})),n.heading=(0,i.createBuilder)(s.NodeType.Heading,n.HeadingStruct,["value"])},{"../builder.cjs":291,"../nodes.cjs":307,"@metamask/superstruct":352}],299:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.image=n.ImageStruct=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");n.ImageStruct=(0,r.assign)(o.NodeStruct,(0,r.object)({type:(0,r.literal)(o.NodeType.Image),value:(0,i.svg)()})),n.image=(0,s.createBuilder)(o.NodeType.Image,n.ImageStruct,["value"])},{"../../internals/index.cjs":204,"../builder.cjs":291,"../nodes.cjs":307,"@metamask/superstruct":352}],300:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.PanelStruct=n.panel=n.ComponentStruct=n.ImageStruct=n.image=void 0,i(e("./address.cjs"),n),i(e("./copyable.cjs"),n),i(e("./divider.cjs"),n),i(e("./heading.cjs"),n);var s=e("./image.cjs");Object.defineProperty(n,"image",{enumerable:!0,get:function(){return s.image}}),Object.defineProperty(n,"ImageStruct",{enumerable:!0,get:function(){return s.ImageStruct}});var o=e("./panel.cjs");Object.defineProperty(n,"ComponentStruct",{enumerable:!0,get:function(){return o.ComponentStruct}}),Object.defineProperty(n,"panel",{enumerable:!0,get:function(){return o.panel}}),Object.defineProperty(n,"PanelStruct",{enumerable:!0,get:function(){return o.PanelStruct}}),i(e("./spinner.cjs"),n),i(e("./text.cjs"),n),i(e("./row.cjs"),n),i(e("./button.cjs"),n),i(e("./input.cjs"),n),i(e("./form.cjs"),n)},{"./address.cjs":293,"./button.cjs":294,"./copyable.cjs":295,"./divider.cjs":296,"./form.cjs":297,"./heading.cjs":298,"./image.cjs":299,"./input.cjs":301,"./panel.cjs":302,"./row.cjs":303,"./spinner.cjs":304,"./text.cjs":305}],301:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.input=n.InputStruct=n.InputType=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");var a;!function(e){e.Text="text",e.Number="number",e.Password="password"}(a||(n.InputType=a={})),n.InputStruct=(0,r.assign)(o.LiteralStruct,(0,r.object)({type:(0,r.literal)(o.NodeType.Input),value:(0,r.optional)((0,r.string)()),name:(0,r.string)(),inputType:(0,r.optional)((0,r.union)([(0,i.enumValue)(a.Text),(0,i.enumValue)(a.Password),(0,i.enumValue)(a.Number)])),placeholder:(0,r.optional)((0,r.string)()),label:(0,r.optional)((0,r.string)()),error:(0,r.optional)((0,r.string)())})),n.input=(0,s.createBuilder)(o.NodeType.Input,n.InputStruct,["name","inputType","placeholder","value","label"])},{"../../internals/index.cjs":204,"../builder.cjs":291,"../nodes.cjs":307,"@metamask/superstruct":352}],302:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ComponentStruct=n.panel=n.PanelStruct=n.ParentStruct=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs"),a=e("./address.cjs"),c=e("./button.cjs"),u=e("./copyable.cjs"),l=e("./divider.cjs"),d=e("./form.cjs"),h=e("./heading.cjs"),f=e("./image.cjs"),p=e("./input.cjs"),m=e("./row.cjs"),y=e("./spinner.cjs"),g=e("./text.cjs");n.ParentStruct=(0,r.assign)(o.NodeStruct,(0,r.object)({children:(0,r.array)((0,r.lazy)((()=>n.ComponentStruct)))})),n.PanelStruct=(0,r.assign)(n.ParentStruct,(0,r.object)({type:(0,r.literal)(o.NodeType.Panel)})),n.panel=(0,s.createBuilder)(o.NodeType.Panel,n.PanelStruct,["children"]),n.ComponentStruct=(0,i.typedUnion)([u.CopyableStruct,l.DividerStruct,h.HeadingStruct,f.ImageStruct,n.PanelStruct,y.SpinnerStruct,g.TextStruct,m.RowStruct,a.AddressStruct,p.InputStruct,d.FormStruct,c.ButtonStruct])},{"../../internals/index.cjs":204,"../builder.cjs":291,"../nodes.cjs":307,"./address.cjs":293,"./button.cjs":294,"./copyable.cjs":295,"./divider.cjs":296,"./form.cjs":297,"./heading.cjs":298,"./image.cjs":299,"./input.cjs":301,"./row.cjs":303,"./spinner.cjs":304,"./text.cjs":305,"@metamask/superstruct":352}],303:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.row=n.RowStruct=n.RowVariant=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs"),a=e("./address.cjs"),c=e("./image.cjs"),u=e("./text.cjs");var l;!function(e){e.Default="default",e.Critical="critical",e.Warning="warning"}(l||(n.RowVariant=l={}));const d=(0,r.union)([c.ImageStruct,u.TextStruct,a.AddressStruct]);n.RowStruct=(0,r.assign)(o.LiteralStruct,(0,r.object)({type:(0,r.literal)(o.NodeType.Row),variant:(0,r.optional)((0,r.union)([(0,i.enumValue)(l.Default),(0,i.enumValue)(l.Critical),(0,i.enumValue)(l.Warning)])),label:(0,r.string)(),value:d})),n.row=(0,s.createBuilder)(o.NodeType.Row,n.RowStruct,["label","value","variant"])},{"../../internals/index.cjs":204,"../builder.cjs":291,"../nodes.cjs":307,"./address.cjs":293,"./image.cjs":299,"./text.cjs":305,"@metamask/superstruct":352}],304:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.spinner=n.SpinnerStruct=void 0;const r=e("@metamask/superstruct"),i=e("../builder.cjs"),s=e("../nodes.cjs");n.SpinnerStruct=(0,r.assign)(s.NodeStruct,(0,r.object)({type:(0,r.literal)(s.NodeType.Spinner)})),n.spinner=(0,i.createBuilder)(s.NodeType.Spinner,n.SpinnerStruct)},{"../builder.cjs":291,"../nodes.cjs":307,"@metamask/superstruct":352}],305:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.text=n.TextStruct=void 0;const r=e("@metamask/superstruct"),i=e("../builder.cjs"),s=e("../nodes.cjs");n.TextStruct=(0,r.assign)(s.LiteralStruct,(0,r.object)({type:(0,r.literal)(s.NodeType.Text),value:(0,r.string)(),markdown:(0,r.optional)((0,r.boolean)())})),n.text=(0,i.createBuilder)(s.NodeType.Text,n.TextStruct,["value","markdown"])},{"../builder.cjs":291,"../nodes.cjs":307,"@metamask/superstruct":352}],306:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.NodeType=void 0,i(e("./components/index.cjs"),n),i(e("./component.cjs"),n);var s=e("./nodes.cjs");Object.defineProperty(n,"NodeType",{enumerable:!0,get:function(){return s.NodeType}})},{"./component.cjs":292,"./components/index.cjs":300,"./nodes.cjs":307}],307:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LiteralStruct=n.NodeStruct=n.NodeType=void 0;const r=e("@metamask/superstruct");var i;!function(e){e.Copyable="copyable",e.Divider="divider",e.Heading="heading",e.Panel="panel",e.Spinner="spinner",e.Text="text",e.Image="image",e.Row="row",e.Address="address",e.Button="button",e.Input="input",e.Form="form"}(i||(n.NodeType=i={})),n.NodeStruct=(0,r.object)({type:(0,r.string)()}),n.LiteralStruct=(0,r.assign)(n.NodeStruct,(0,r.object)({value:(0,r.unknown)()}))},{"@metamask/superstruct":352}],308:[function(e,t,n){t.exports=e("./dist/jsx/jsx-runtime.cjs")},{"./dist/jsx/jsx-runtime.cjs":246}],309:[function(e,t,n){t.exports=e("./dist/jsx/index.cjs")},{"./dist/jsx/index.cjs":244}],310:[function(e,t,n){t.exports={name:"@metamask/snaps-sdk",version:"6.12.0",description:"A library containing the core functionality for building MetaMask Snaps",keywords:["MetaMask","Snaps","Ethereum"],homepage:"https://github.com/MetaMask/snaps/tree/main/packages/snaps-sdk#readme",bugs:{url:"https://github.com/MetaMask/snaps/issues"},repository:{type:"git",url:"https://github.com/MetaMask/snaps.git"},license:"ISC",sideEffects:!1,exports:{".":{import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"},require:{types:"./dist/index.d.cts",default:"./dist/index.cjs"}},"./jsx":{import:{types:"./dist/jsx/index.d.mts",default:"./dist/jsx/index.mjs"},require:{types:"./dist/jsx/index.d.cts",default:"./dist/jsx/index.cjs"}},"./jsx-runtime":{import:{types:"./dist/jsx/jsx-runtime.d.mts",default:"./dist/jsx/jsx-runtime.mjs"},require:{types:"./dist/jsx/jsx-runtime.d.cts",default:"./dist/jsx/jsx-runtime.cjs"}},"./jsx-dev-runtime":{import:{types:"./dist/jsx/jsx-dev-runtime.d.mts",default:"./dist/jsx/jsx-dev-runtime.mjs"},require:{types:"./dist/jsx/jsx-dev-runtime.d.cts",default:"./dist/jsx/jsx-dev-runtime.cjs"}},"./package.json":"./package.json"},main:"./dist/index.cjs",module:"./dist/index.mjs",types:"./dist/index.d.cts",files:["dist","jsx.js","jsx-dev-runtime.js","jsx-runtime.js","jsx.d.ts","jsx-dev-runtime.d.ts","jsx-runtime.d.ts"],scripts:{build:"ts-bridge --project tsconfig.build.json --verbose --clean --no-references","changelog:update":"../../scripts/update-changelog.sh @metamask/snaps-sdk","changelog:validate":"../../scripts/validate-changelog.sh @metamask/snaps-sdk",lint:"yarn lint:eslint && yarn lint:misc --check && yarn changelog:validate && yarn lint:dependencies","lint:ci":"yarn lint","lint:dependencies":"depcheck","lint:eslint":"eslint . --cache --ext js,ts,jsx,tsx","lint:fix":"yarn lint:eslint --fix && yarn lint:misc --write","lint:misc":'prettier --no-error-on-unmatched-pattern --loglevel warn "**/*.json" "**/*.md" "**/*.html" "!CHANGELOG.md" --ignore-path ../../.gitignore',"publish:preview":"yarn npm publish --tag preview","since-latest-release":"../../scripts/since-latest-release.sh",test:"jest --reporters=jest-silent-reporter","test:clean":"jest --clearCache","test:post":"jest-it-up","test:verbose":"jest --verbose","test:watch":"jest --watch"},dependencies:{"@metamask/key-tree":"^9.1.2","@metamask/providers":"^18.1.1","@metamask/rpc-errors":"^7.0.1","@metamask/superstruct":"^3.1.0","@metamask/utils":"^10.0.0"},devDependencies:{"@lavamoat/allow-scripts":"^3.0.4","@metamask/auto-changelog":"^3.4.4","@metamask/eslint-config":"^12.1.0","@metamask/eslint-config-jest":"^12.1.0","@metamask/eslint-config-nodejs":"^12.1.0","@metamask/eslint-config-typescript":"^12.1.0","@ts-bridge/cli":"^0.6.0","@types/jest":"^27.5.1","@typescript-eslint/eslint-plugin":"^5.42.1","@typescript-eslint/parser":"^6.21.0",deepmerge:"^4.2.2",depcheck:"^1.4.7",eslint:"^8.27.0","eslint-config-prettier":"^8.5.0","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^27.1.5","eslint-plugin-jsdoc":"^41.1.2","eslint-plugin-n":"^15.7.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-promise":"^6.1.1","expect-type":"^0.17.3",jest:"^29.0.2","jest-fetch-mock":"^3.0.3","jest-it-up":"^2.0.0","jest-silent-reporter":"^0.6.0",prettier:"^2.8.8","prettier-plugin-packagejson":"^2.5.2","ts-jest":"^29.1.1",typescript:"~5.3.3"},engines:{node:"^18.16 || >=20"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"}}},{}],311:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isEqual=void 0,n.isEqual=function(e,t){return e.length===t.length&&e.every(((e,n)=>e===t[n]))}},{}],312:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateAuxiliaryFiles=n.encodeAuxiliaryFile=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/utils"),s=e("./base64.cjs"),o=e("./constants.cjs");n.encodeAuxiliaryFile=async function(e,t){if(t===r.AuxiliaryFileEncoding.Base64)return e;const n=await(0,s.decodeBase64)(e);return t===r.AuxiliaryFileEncoding.Utf8?(0,i.bytesToString)(n):(0,i.bytesToHex)(n)},n.validateAuxiliaryFiles=function(e){for(const t of e)(0,i.assert)(t.size{const r=Object.assign(new FileReader,{onload:()=>e(r.result.replace("data:application/octet-stream;base64,","")),onerror:()=>n(r.error)});r.readAsDataURL(new File([t],"",{type:"application/octet-stream"}))})):(0,r.bytesToBase64)(t)},n.decodeBase64=async function(e){const t=await fetch(`data:application/octet-stream;base64,${e}`);return new Uint8Array(await t.arrayBuffer())}},{"./bytes.cjs":314,"@metamask/utils":369}],314:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBytes=void 0;const r=e("@metamask/utils"),i=e("./virtual-file/VirtualFile.cjs");n.getBytes=function(e){const t=e instanceof i.VirtualFile?e.value:e;return"string"==typeof t?(0,r.stringToBytes)(t):t}},{"./virtual-file/VirtualFile.cjs":349,"@metamask/utils":369}],315:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.SnapCaveatType=void 0,function(e){e.PermittedDerivationPaths="permittedDerivationPaths",e.PermittedCoinTypes="permittedCoinTypes",e.SnapCronjob="snapCronjob",e.TransactionOrigin="transactionOrigin",e.SignatureOrigin="signatureOrigin",e.RpcOrigin="rpcOrigin",e.KeyringOrigin="keyringOrigin",e.SnapIds="snapIds",e.ChainIds="chainIds",e.LookupMatchers="lookupMatchers",e.MaxRequestTime="maxRequestTime"}(r||(n.SnapCaveatType=r={}))},{}],316:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checksumFiles=n.checksum=void 0;const r=e("@metamask/utils"),i=e("@noble/hashes/sha256"),s=e("./bytes.cjs");async function o(e){const t=(0,s.getBytes)(e);return"crypto"in globalThis&&"object"==typeof globalThis.crypto&&crypto.subtle?.digest?new Uint8Array(await crypto.subtle.digest("SHA-256",t)):(0,i.sha256)(t)}n.checksum=o,n.checksumFiles=async function(e){const t=await Promise.all([...e].sort(((e,t)=>((0,r.assert)(e.path!==t.path,"Tried to sort files with non-unique paths."),e.patho(e))));return o((0,r.concatBytes)(t))}},{"./bytes.cjs":314,"@metamask/utils":369,"@noble/hashes/sha256":397}],317:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MAX_FILE_SIZE=void 0,n.MAX_FILE_SIZE=64e6},{}],318:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isCronjobSpecificationArray=n.CronjobSpecificationArrayStruct=n.isCronjobSpecification=n.CronjobSpecificationStruct=n.parseCronExpression=n.CronExpressionStruct=n.CronjobRpcRequestStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("cron-parser");n.CronjobRpcRequestStruct=(0,r.object)({jsonrpc:(0,r.optional)(i.JsonRpcVersionStruct),id:(0,r.optional)(i.JsonRpcIdStruct),method:(0,r.string)(),params:(0,r.optional)(i.JsonRpcParamsStruct)}),n.CronExpressionStruct=(0,r.refine)((0,r.string)(),"CronExpression",(e=>{try{return(0,s.parseExpression)(e),!0}catch{return!1}})),n.parseCronExpression=function(e){const t=(0,r.create)(e,n.CronExpressionStruct);return(0,s.parseExpression)(t)},n.CronjobSpecificationStruct=(0,r.object)({expression:n.CronExpressionStruct,request:n.CronjobRpcRequestStruct}),n.isCronjobSpecification=function(e){try{return(0,r.create)(e,n.CronjobSpecificationStruct),!0}catch{return!1}},n.CronjobSpecificationArrayStruct=(0,r.array)(n.CronjobSpecificationStruct),n.isCronjobSpecificationArray=function(e){try{return(0,r.create)(e,n.CronjobSpecificationArrayStruct),!0}catch{return!1}}},{"@metamask/superstruct":352,"@metamask/utils":369,"cron-parser":460}],319:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.currency=void 0;const r=e("@metamask/superstruct");n.currency=function(e){const t=e.toLowerCase();return(0,r.coerce)((0,r.literal)(t),(0,r.literal)(e.toUpperCase()),(e=>(0,r.create)(e.toLowerCase(),(0,r.literal)(t))))}},{"@metamask/superstruct":352}],320:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.deepClone=void 0;const i=r(e("rfdc"));n.deepClone=(0,i.default)({proto:!1,circles:!1})},{rfdc:589}],321:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_ENDOWMENTS=void 0,n.DEFAULT_ENDOWMENTS=Object.freeze(["atob","btoa","BigInt","console","crypto","Date","Math","setTimeout","clearTimeout","SubtleCrypto","TextDecoder","TextEncoder","URL","setInterval","clearInterval","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","isSecureContext","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","DataView","ArrayBuffer","AbortController","AbortSignal"])},{}],322:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.getSlip44ProtocolName=n.getSnapDerivationPathName=n.SNAPS_DERIVATION_PATHS=void 0;const i=r(e("@metamask/slip44")),s=e("./array.cjs");function o(e){return"1"===String(e)?"Test Networks":i.default[e]?.name??null}n.SNAPS_DERIVATION_PATHS=[{path:["m","44'","0'"],curve:"ed25519",name:"Test BIP-32 Path (ed25519)"},{path:["m","44'","1'"],curve:"secp256k1",name:"Testnet"},{path:["m","44'","0'"],curve:"secp256k1",name:"Bitcoin Legacy"},{path:["m","49'","0'"],curve:"secp256k1",name:"Bitcoin Nested SegWit"},{path:["m","49'","1'"],curve:"secp256k1",name:"Bitcoin Testnet Nested SegWit"},{path:["m","84'","0'"],curve:"secp256k1",name:"Bitcoin Native SegWit"},{path:["m","84'","1'"],curve:"secp256k1",name:"Bitcoin Testnet Native SegWit"},{path:["m","86'","0'"],curve:"secp256k1",name:"Bitcoin Taproot"},{path:["m","86'","1'"],curve:"secp256k1",name:"Bitcoin Testnet Taproot"},{path:["m","44'","501'"],curve:"ed25519",name:"Solana"},{path:["m","44'","501'","0'","0'"],curve:"ed25519",name:"Solana"},{path:["m","44'","2'"],curve:"secp256k1",name:"Litecoin"},{path:["m","44'","3'"],curve:"secp256k1",name:"Dogecoin"},{path:["m","44'","60'"],curve:"secp256k1",name:"Ethereum"},{path:["m","44'","118'"],curve:"secp256k1",name:"Atom"},{path:["m","44'","145'"],curve:"secp256k1",name:"Bitcoin Cash"},{path:["m","44'","637'"],curve:"ed25519",name:"Aptos"},{path:["m","44'","714'"],curve:"secp256k1",name:"Binance (BNB)"},{path:["m","44'","784'"],curve:"ed25519",name:"Sui"},{path:["m","44'","931'"],curve:"secp256k1",name:"THORChain (RUNE)"},{path:["m","44'","330'"],curve:"secp256k1",name:"Terra (LUNA)"},{path:["m","44'","459'"],curve:"secp256k1",name:"Kava"},{path:["m","44'","529'"],curve:"secp256k1",name:"Secret Network"},{path:["m","44'","397'","0'"],curve:"ed25519",name:"NEAR Protocol"},{path:["m","44'","1'","0'"],curve:"ed25519",name:"Testnet"},{path:["m","44'","472'"],curve:"ed25519",name:"Arweave"},{path:["m","44'","12586'"],curve:"secp256k1",name:"Mina"},{path:["m","44'","242'"],curve:"ed25519",name:"Nimiq"},{path:["m","44'","1729'","0'","0'"],curve:"ed25519",name:"Tezos"},{path:["m","1789'","0'"],curve:"ed25519",name:"Vega"},{path:["m","1852'","1815'"],curve:"ed25519Bip32",name:"Cardano"},{path:["m","44'","508'","0'","0'","0'"],curve:"ed25519",name:"MultiversX"},{path:["m","44'","709'"],curve:"secp256k1",name:"Avail"},{path:["m","44'","626'"],curve:"ed25519",name:"Kadena"}],n.getSnapDerivationPathName=function(e,t){const r=n.SNAPS_DERIVATION_PATHS.find((n=>n.curve===t&&(0,s.isEqual)(n.path,e)));if(r)return r.name;if("secp256k1"===t&&"m"===e[0]&&"44'"===e[1]&&e[2].endsWith("'")){return o(e[2].slice(0,-1))??null}return null},n.getSlip44ProtocolName=o},{"./array.cjs":311,"@metamask/slip44":144}],323:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.STATE_ENCRYPTION_MAGIC_VALUE=n.SIP_6_MAGIC_VALUE=void 0,n.SIP_6_MAGIC_VALUE="1399742832'",n.STATE_ENCRYPTION_MAGIC_VALUE="572232532'"},{}],324:[function(e,t,n){"use strict";var r,i,s,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.unwrapError=n.isWrappedSnapError=n.isSerializedSnapError=n.isSnapError=n.WrappedSnapError=n.SNAP_ERROR_WRAPPER_MESSAGE=n.SNAP_ERROR_WRAPPER_CODE=void 0;const c=e("@metamask/rpc-errors"),u=e("@metamask/snaps-sdk"),l=e("@metamask/utils");n.SNAP_ERROR_WRAPPER_CODE=-31001,n.SNAP_ERROR_WRAPPER_MESSAGE="Wrapped Snap Error";class d extends Error{constructor(e){const t=(0,u.getErrorMessage)(e);super(t),r.set(this,void 0),i.set(this,void 0),s.set(this,void 0),o(this,r,e,"f"),o(this,i,t,"f"),o(this,s,(0,u.getErrorStack)(e),"f")}get name(){return"WrappedSnapError"}get message(){return a(this,i,"f")}get stack(){return a(this,s,"f")}toJSON(){const e=h(a(this,r,"f"))?a(this,r,"f").serialize():(0,c.serializeCause)(a(this,r,"f"));return{code:n.SNAP_ERROR_WRAPPER_CODE,message:n.SNAP_ERROR_WRAPPER_MESSAGE,data:{cause:e}}}serialize(){return this.toJSON()}}function h(e){if((0,l.isObject)(e)&&"serialize"in e&&"function"==typeof e.serialize){const t=e.serialize();return(0,l.isJsonRpcError)(t)&&f(t)}return!1}function f(e){return e.code===u.SNAP_ERROR_CODE&&e.message===u.SNAP_ERROR_MESSAGE}function p(e){return(0,l.isJsonRpcError)(e)&&e.code===n.SNAP_ERROR_WRAPPER_CODE&&e.message===n.SNAP_ERROR_WRAPPER_MESSAGE}function m(e,t,n,r){const i=new c.JsonRpcError(e,t,r);return i.stack=n,i}n.WrappedSnapError=d,r=new WeakMap,i=new WeakMap,s=new WeakMap,n.isSnapError=h,n.isSerializedSnapError=f,n.isWrappedSnapError=p,n.unwrapError=function(e){if(p(e)){if((0,l.isJsonRpcError)(e.data.cause)){if(f(e.data.cause)){const{code:t,message:n,stack:r,data:i}=e.data.cause.data.cause;return[m(t,n,r,i),!0]}const{code:t,message:n,stack:r,data:i}=e.data.cause;return[m(t,n,r,i),!1]}return[m(c.errorCodes.rpc.internal,(0,u.getErrorMessage)(e.data.cause),(0,u.getErrorStack)(e.data.cause)),!1]}if((0,l.isJsonRpcError)(e)){const{code:t,message:n,stack:r,data:i}=e;return[m(t,n,r,i),!1]}return[m(c.errorCodes.rpc.internal,(0,u.getErrorMessage)(e),(0,u.getErrorStack)(e)),!1]}},{"@metamask/rpc-errors":130,"@metamask/snaps-sdk":200,"@metamask/utils":369}],325:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.SNAP_EXPORT_NAMES=n.HandlerType=void 0,function(e){e.OnRpcRequest="onRpcRequest",e.OnSignature="onSignature",e.OnTransaction="onTransaction",e.OnCronjob="onCronjob",e.OnInstall="onInstall",e.OnUpdate="onUpdate",e.OnNameLookup="onNameLookup",e.OnKeyringRequest="onKeyringRequest",e.OnHomePage="onHomePage",e.OnUserInput="onUserInput"}(r||(n.HandlerType=r={})),n.SNAP_EXPORT_NAMES=Object.values(r)},{}],326:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OnNameLookupResponseStruct=n.DomainResolutionResponseStruct=n.AddressResolutionResponseStruct=n.DomainResolutionStruct=n.AddressResolutionStruct=n.OnHomePageResponseStruct=n.OnHomePageResponseWithIdStruct=n.OnHomePageResponseWithContentStruct=n.OnSignatureResponseStruct=n.OnTransactionResponseStruct=n.OnTransactionResponseWithContentStruct=n.OnTransactionResponseWithIdStruct=n.OnTransactionSeverityResponseStruct=n.SNAP_EXPORTS=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct"),s=e("./handler-types.cjs");n.SNAP_EXPORTS={[s.HandlerType.OnRpcRequest]:{type:s.HandlerType.OnRpcRequest,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnTransaction]:{type:s.HandlerType.OnTransaction,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnCronjob]:{type:s.HandlerType.OnCronjob,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnNameLookup]:{type:s.HandlerType.OnNameLookup,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnInstall]:{type:s.HandlerType.OnInstall,required:!1,validator:e=>"function"==typeof e},[s.HandlerType.OnUpdate]:{type:s.HandlerType.OnUpdate,required:!1,validator:e=>"function"==typeof e},[s.HandlerType.OnKeyringRequest]:{type:s.HandlerType.OnKeyringRequest,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnHomePage]:{type:s.HandlerType.OnHomePage,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnSignature]:{type:s.HandlerType.OnSignature,required:!0,validator:e=>"function"==typeof e},[s.HandlerType.OnUserInput]:{type:s.HandlerType.OnUserInput,required:!1,validator:e=>"function"==typeof e}},n.OnTransactionSeverityResponseStruct=(0,i.object)({severity:(0,i.optional)((0,i.literal)(r.SeverityLevel.Critical))}),n.OnTransactionResponseWithIdStruct=(0,i.assign)(n.OnTransactionSeverityResponseStruct,(0,i.object)({id:(0,i.string)()})),n.OnTransactionResponseWithContentStruct=(0,i.assign)(n.OnTransactionSeverityResponseStruct,(0,i.object)({content:r.ComponentOrElementStruct})),n.OnTransactionResponseStruct=(0,i.nullable)((0,i.union)([n.OnTransactionResponseWithContentStruct,n.OnTransactionResponseWithIdStruct])),n.OnSignatureResponseStruct=n.OnTransactionResponseStruct,n.OnHomePageResponseWithContentStruct=(0,i.object)({content:r.ComponentOrElementStruct}),n.OnHomePageResponseWithIdStruct=(0,i.object)({id:(0,i.string)()}),n.OnHomePageResponseStruct=(0,i.union)([n.OnHomePageResponseWithContentStruct,n.OnHomePageResponseWithIdStruct]),n.AddressResolutionStruct=(0,i.object)({protocol:(0,i.string)(),resolvedDomain:(0,i.string)()}),n.DomainResolutionStruct=(0,i.object)({protocol:(0,i.string)(),resolvedAddress:(0,i.string)(),domainName:(0,i.string)()}),n.AddressResolutionResponseStruct=(0,i.object)({resolvedDomains:(0,i.size)((0,i.array)(n.AddressResolutionStruct),1,1/0)}),n.DomainResolutionResponseStruct=(0,i.object)({resolvedAddresses:(0,i.size)((0,i.array)(n.DomainResolutionStruct),1,1/0)}),n.OnNameLookupResponseStruct=(0,i.nullable)((0,i.union)([n.AddressResolutionResponseStruct,n.DomainResolutionResponseStruct]))},{"./handler-types.cjs":325,"@metamask/snaps-sdk":200,"@metamask/superstruct":352}],327:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSvgDimensions=n.assertIsSnapIcon=n.SVG_MAX_BYTE_SIZE_TEXT=n.SVG_MAX_BYTE_SIZE=void 0;const r=e("@metamask/utils"),i=e("./svg.cjs");n.SVG_MAX_BYTE_SIZE=1e5,n.SVG_MAX_BYTE_SIZE_TEXT=`${Math.floor(n.SVG_MAX_BYTE_SIZE/1e3)}kb`,n.assertIsSnapIcon=function(e){(0,r.assert)(e.path.endsWith(".svg"),'Expected snap icon to end in ".svg".');const t="string"==typeof e.value?(0,r.stringToBytes)(e.value).byteLength:e.value.byteLength;(0,r.assert)(t<=n.SVG_MAX_BYTE_SIZE,`The specified SVG icon exceeds the maximum size of ${n.SVG_MAX_BYTE_SIZE_TEXT}.`),(0,r.assert)((0,i.isSvg)(e.toString()),"Snap icon must be a valid SVG.")},n.getSvgDimensions=function(e){try{const t=(0,i.parseSvg)(e),n=t["@_height"],s=t["@_width"];if(n&&s)return{height:n,width:s};const o=t["@_viewBox"];if(o){const[e,t,n,i]=o.split(" ");if(n&&i){const e=parseInt(n,10),t=parseInt(i,10);return(0,r.assert)(Number.isInteger(e)&&e>0),(0,r.assert)(Number.isInteger(t)&&t>0),{width:e,height:t}}}}catch{throw new Error("Snap icon must be a valid SVG.")}return null}},{"./svg.cjs":343,"@metamask/utils":369}],328:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createWindow=void 0,n.createWindow=async function({uri:e,id:t,sandbox:n=!0,testId:r="snaps-iframe"}){return await new Promise(((i,s)=>{const o=document.createElement("iframe");o.setAttribute("id",t),o.setAttribute("data-testid",r),n&&o.setAttribute("sandbox","allow-scripts"),o.setAttribute("src",e),document.body.appendChild(o),o.addEventListener("load",(()=>{o.contentWindow?i(o.contentWindow):s(new Error(`iframe.contentWindow not present on load for job "${t}".`))}))}))}},{}],329:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./array.cjs"),n),i(e("./auxiliary-files.cjs"),n),i(e("./base64.cjs"),n),i(e("./bytes.cjs"),n),i(e("./caveats.cjs"),n),i(e("./checksum.cjs"),n),i(e("./constants.cjs"),n),i(e("./cronjob.cjs"),n),i(e("./currency.cjs"),n),i(e("./deep-clone.cjs"),n),i(e("./default-endowments.cjs"),n),i(e("./derivation-paths.cjs"),n),i(e("./entropy.cjs"),n),i(e("./errors.cjs"),n),i(e("./handlers.cjs"),n),i(e("./handler-types.cjs"),n),i(e("./iframe.cjs"),n),i(e("./json.cjs"),n),i(e("./json-rpc.cjs"),n),i(e("./localization.cjs"),n),i(e("./logging.cjs"),n),i(e("./manifest/index.cjs"),n),i(e("./namespace.cjs"),n),i(e("./path.cjs"),n),i(e("./platform-version.cjs"),n),i(e("./snaps.cjs"),n),i(e("./strings.cjs"),n),i(e("./structs.cjs"),n),i(e("./types.cjs"),n),i(e("./ui.cjs"),n),i(e("./url.cjs"),n),i(e("./validation.cjs"),n),i(e("./versions.cjs"),n),i(e("./virtual-file/index.cjs"),n),i(e("./promise.cjs"),n)},{"./array.cjs":311,"./auxiliary-files.cjs":312,"./base64.cjs":313,"./bytes.cjs":314,"./caveats.cjs":315,"./checksum.cjs":316,"./constants.cjs":317,"./cronjob.cjs":318,"./currency.cjs":319,"./deep-clone.cjs":320,"./default-endowments.cjs":321,"./derivation-paths.cjs":322,"./entropy.cjs":323,"./errors.cjs":324,"./handler-types.cjs":325,"./handlers.cjs":326,"./iframe.cjs":328,"./json-rpc.cjs":330,"./json.cjs":331,"./localization.cjs":332,"./logging.cjs":333,"./manifest/index.cjs":334,"./namespace.cjs":336,"./path.cjs":337,"./platform-version.cjs":338,"./promise.cjs":339,"./snaps.cjs":340,"./strings.cjs":341,"./structs.cjs":342,"./types.cjs":344,"./ui.cjs":345,"./url.cjs":346,"./validation.cjs":347,"./versions.cjs":348,"./virtual-file/index.cjs":350}],330:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsJsonRpcSuccess=n.isOriginAllowed=n.assertIsKeyringOrigins=n.KeyringOriginsStruct=n.assertIsRpcOrigins=n.RpcOriginsStruct=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=(0,i.array)((0,i.refine)((0,i.string)(),"Allowed origin",(e=>!(e.split("*").length-1>2)||'No more than two wildcards ("*") are allowed in an origin specifier.')));function a(e,t){if("*"===e||e===t)return!0;const n=function(e){const t=e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&").replace(/\\\*/gu,".*");return RegExp(`^${t}$`,"u")}(e);return n.test(t)}n.RpcOriginsStruct=(0,i.refine)((0,i.object)({dapps:(0,i.optional)((0,i.boolean)()),snaps:(0,i.optional)((0,i.boolean)()),allowedOrigins:(0,i.optional)(o)}),"RPC origins",(e=>!!Boolean(!0===e.snaps||!0===e.dapps||e.allowedOrigins&&e.allowedOrigins.length>0)||"Must specify at least one JSON-RPC origin.")),n.assertIsRpcOrigins=function(e,t){(0,s.assertStruct)(e,n.RpcOriginsStruct,"Invalid JSON-RPC origins",t)},n.KeyringOriginsStruct=(0,i.object)({allowedOrigins:(0,i.optional)(o)}),n.assertIsKeyringOrigins=function(e,t){(0,s.assertStruct)(e,n.KeyringOriginsStruct,"Invalid keyring origins",t)},n.isOriginAllowed=function(e,t,n){return"metamask"===n||(!!e.allowedOrigins?.some((e=>a(e,n)))||(!(t!==r.SubjectType.Website||!e.dapps)||Boolean(t===r.SubjectType.Snap&&e.snaps)))},n.assertIsJsonRpcSuccess=function(e){if(!(0,s.isJsonRpcSuccess)(e)){if((0,s.isJsonRpcFailure)(e))throw new Error(`JSON-RPC request failed: ${e.error.message}`);throw new Error("Invalid JSON-RPC response.")}}},{"@metamask/permission-controller":92,"@metamask/superstruct":352,"@metamask/utils":369}],331:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonSizeUnsafe=n.parseJson=void 0;const r=e("@metamask/utils");n.parseJson=function(e){return(0,r.getSafeJson)(JSON.parse(e))},n.getJsonSizeUnsafe=function(e){const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength}},{"@metamask/utils":369}],332:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateSnapManifestLocalizations=n.getLocalizedSnapManifest=n.translate=n.TRANSLATION_REGEX=n.getLocalizationFile=n.getValidatedLocalizationFiles=n.LocalizationFileStruct=n.LOCALIZABLE_FIELDS=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct"),s=e("./json.cjs");function o(e,t){const n=t.find((t=>t.locale===e));return n||t.find((e=>"en"===e.locale))}function a(e,t){const r=e.matchAll(n.TRANSLATION_REGEX);return Array.from(r).reduce(((n,[r,i])=>{if(!t)throw new Error(`Failed to translate "${e}": No localization file found.`);const s=t.messages[i.trim()];if(!s)throw new Error(`Failed to translate "${e}": No translation found for "${i.trim()}" in "${t.locale}" file.`);return n.replace(r,s.message)}),e)}function c(e,t,r){const i=o(t,r);return n.LOCALIZABLE_FIELDS.reduce(((e,t)=>{const n=a(e[t],i);return{...e,[t]:n}}),e)}n.LOCALIZABLE_FIELDS=["description","proposedName"],n.LocalizationFileStruct=(0,i.object)({locale:(0,i.string)(),messages:(0,i.record)((0,i.string)(),(0,i.object)({message:(0,i.string)(),description:(0,i.optional)((0,i.string)())}))}),n.getValidatedLocalizationFiles=function(e){for(const t of e)try{t.result=(0,i.create)((0,s.parseJson)(t.toString()),n.LocalizationFileStruct)}catch(e){if(e instanceof i.StructError)throw new Error(`Failed to validate localization file "${t.path}": ${e.message}.`);if(e instanceof SyntaxError)throw new Error(`Failed to parse localization file "${t.path}" as JSON.`);throw e}return e},n.getLocalizationFile=o,n.TRANSLATION_REGEX=/\{\{\s?([a-zA-Z0-9-_\s]+)\s?\}\}/gu,n.translate=a,n.getLocalizedSnapManifest=c,n.validateSnapManifestLocalizations=function(e,t){try{t.filter((e=>"en"!==e.locale)).forEach((n=>{c(e,n.locale,t)})),c(e,"en",t)}catch(e){throw new Error(`Failed to localize Snap manifest: ${(0,r.getErrorMessage)(e)}`)}}},{"./json.cjs":331,"@metamask/snaps-sdk":200,"@metamask/superstruct":352}],333:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=n.logError=n.logInfo=n.snapsLogger=void 0;const r=e("@metamask/utils");n.snapsLogger=(0,r.createProjectLogger)("snaps"),n.logInfo=function(e,...t){console.log(e,...t)},n.logError=function(e,...t){console.error(e,...t)},n.logWarning=function(e,...t){console.warn(e,...t)}},{"@metamask/utils":369}],334:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./validation.cjs"),n)},{"./validation.cjs":335}],335:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapManifest=n.assertIsSnapManifest=n.isSnapManifest=n.SnapManifestStruct=n.InitialConnectionsStruct=n.SnapAuxilaryFilesStruct=n.PermissionsStruct=n.EmptyObjectStruct=n.HandlerCaveatsStruct=n.MaxRequestTimeStruct=n.MAXIMUM_REQUEST_TIMEOUT=n.MINIMUM_REQUEST_TIMEOUT=n.LookupMatchersStruct=n.ChainIdsStruct=n.SnapIdsStruct=n.SemVerRangeStruct=n.SnapGetBip32EntropyPermissionsStruct=n.Bip32EntropyStruct=n.CurveStruct=n.bip32entropy=n.Bip32PathStruct=n.FORBIDDEN_COIN_TYPES=void 0;const r=e("@metamask/key-tree"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("../array.cjs"),a=e("../cronjob.cjs"),c=e("../entropy.cjs"),u=e("../json-rpc.cjs"),l=e("../namespace.cjs"),d=e("../snaps.cjs"),h=e("../structs.cjs"),f=e("../types.cjs"),p=[c.SIP_6_MAGIC_VALUE,c.STATE_ENCRYPTION_MAGIC_VALUE];n.FORBIDDEN_COIN_TYPES=[60];const m=n.FORBIDDEN_COIN_TYPES.map((e=>["m","44'",`${e}'`]));n.Bip32PathStruct=(0,i.refine)((0,i.array)((0,i.string)()),"BIP-32 path",(e=>0===e.length?"Path must be a non-empty BIP-32 derivation path array":"m"!==e[0]?'Path must start with "m".':e.length<3?"Paths must have a length of at least three.":e.slice(1).some((e=>!(0,r.isValidBIP32PathSegment)(e)))?"Path must be a valid BIP-32 derivation path array.":p.includes(e[1])?`The purpose "${e[1]}" is not allowed for entropy derivation.`:!m.some((t=>(0,o.isEqual)(e.slice(0,t.length),t)))||`The path "${e.join("/")}" is not allowed for entropy derivation.`));n.bip32entropy=e=>(0,i.refine)(e,"BIP-32 entropy",(e=>"ed25519"!==e.curve||!e.path.slice(1).some((e=>!e.endsWith("'")))||"Ed25519 does not support unhardened paths.")),n.CurveStruct=(0,i.enums)(["ed25519","secp256k1","ed25519Bip32"]),n.Bip32EntropyStruct=(0,n.bip32entropy)((0,i.type)({path:n.Bip32PathStruct,curve:n.CurveStruct})),n.SnapGetBip32EntropyPermissionsStruct=(0,i.size)((0,i.array)(n.Bip32EntropyStruct),1,1/0),n.SemVerRangeStruct=(0,i.refine)((0,i.string)(),"SemVer range",(e=>!!(0,s.isValidSemVerRange)(e)||"Expected a valid SemVer range.")),n.SnapIdsStruct=(0,i.refine)((0,i.record)(d.SnapIdStruct,(0,i.object)({version:(0,i.optional)(n.SemVerRangeStruct)})),"SnapIds",(e=>0!==Object.keys(e).length)),n.ChainIdsStruct=(0,i.size)((0,i.array)(l.ChainIdStruct),1,1/0),n.LookupMatchersStruct=(0,i.union)([(0,i.object)({tlds:(0,i.size)((0,i.array)((0,i.string)()),1,1/0)}),(0,i.object)({schemes:(0,i.size)((0,i.array)((0,i.string)()),1,1/0)}),(0,i.object)({tlds:(0,i.size)((0,i.array)((0,i.string)()),1,1/0),schemes:(0,i.size)((0,i.array)((0,i.string)()),1,1/0)})]),n.MINIMUM_REQUEST_TIMEOUT=(0,s.inMilliseconds)(5,s.Duration.Second),n.MAXIMUM_REQUEST_TIMEOUT=(0,s.inMilliseconds)(3,s.Duration.Minute),n.MaxRequestTimeStruct=(0,i.size)((0,i.integer)(),n.MINIMUM_REQUEST_TIMEOUT,n.MAXIMUM_REQUEST_TIMEOUT),n.HandlerCaveatsStruct=(0,i.object)({maxRequestTime:(0,i.optional)(n.MaxRequestTimeStruct)}),n.EmptyObjectStruct=(0,i.object)({}),n.PermissionsStruct=(0,i.type)({"endowment:cronjob":(0,i.optional)((0,h.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({jobs:a.CronjobSpecificationArrayStruct}))),"endowment:ethereum-provider":(0,i.optional)(n.EmptyObjectStruct),"endowment:keyring":(0,i.optional)((0,h.mergeStructs)(n.HandlerCaveatsStruct,u.KeyringOriginsStruct)),"endowment:lifecycle-hooks":(0,i.optional)(n.HandlerCaveatsStruct),"endowment:name-lookup":(0,i.optional)((0,h.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({chains:(0,i.optional)(n.ChainIdsStruct),matchers:(0,i.optional)(n.LookupMatchersStruct)}))),"endowment:network-access":(0,i.optional)(n.EmptyObjectStruct),"endowment:page-home":(0,i.optional)(n.HandlerCaveatsStruct),"endowment:rpc":(0,i.optional)((0,h.mergeStructs)(n.HandlerCaveatsStruct,u.RpcOriginsStruct)),"endowment:signature-insight":(0,i.optional)((0,h.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({allowSignatureOrigin:(0,i.optional)((0,i.boolean)())}))),"endowment:transaction-insight":(0,i.optional)((0,h.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({allowTransactionOrigin:(0,i.optional)((0,i.boolean)())}))),"endowment:webassembly":(0,i.optional)(n.EmptyObjectStruct),snap_dialog:(0,i.optional)(n.EmptyObjectStruct),snap_manageState:(0,i.optional)(n.EmptyObjectStruct),snap_manageAccounts:(0,i.optional)(n.EmptyObjectStruct),snap_notify:(0,i.optional)(n.EmptyObjectStruct),snap_getBip32Entropy:(0,i.optional)(n.SnapGetBip32EntropyPermissionsStruct),snap_getBip32PublicKey:(0,i.optional)(n.SnapGetBip32EntropyPermissionsStruct),snap_getBip44Entropy:(0,i.optional)((0,i.size)((0,i.array)((0,i.object)({coinType:(0,i.size)((0,i.integer)(),0,2**32-1)})),1,1/0)),snap_getEntropy:(0,i.optional)(n.EmptyObjectStruct),snap_getLocale:(0,i.optional)(n.EmptyObjectStruct),wallet_snap:(0,i.optional)(n.SnapIdsStruct)}),n.SnapAuxilaryFilesStruct=(0,i.array)((0,i.string)()),n.InitialConnectionsStruct=(0,i.record)((0,i.intersection)([(0,i.string)(),(0,f.uri)()]),(0,i.object)({})),n.SnapManifestStruct=(0,i.object)({version:s.VersionStruct,description:(0,i.size)((0,i.string)(),1,280),proposedName:(0,i.size)((0,i.string)(),1,214),repository:(0,i.optional)((0,i.type)({type:(0,i.size)((0,i.string)(),1,1/0),url:(0,i.size)((0,i.string)(),1,1/0)})),source:(0,i.object)({shasum:s.ChecksumStruct,location:(0,i.object)({npm:(0,i.object)({filePath:(0,i.size)((0,i.string)(),1,1/0),iconPath:(0,i.optional)((0,i.size)((0,i.string)(),1,1/0)),packageName:f.NameStruct,registry:(0,i.union)([(0,i.literal)("https://registry.npmjs.org"),(0,i.literal)("https://registry.npmjs.org/")])})}),files:(0,i.optional)(n.SnapAuxilaryFilesStruct),locales:(0,i.optional)(n.SnapAuxilaryFilesStruct)}),initialConnections:(0,i.optional)(n.InitialConnectionsStruct),initialPermissions:n.PermissionsStruct,manifestVersion:(0,i.literal)("0.1"),platformVersion:(0,i.optional)(s.VersionStruct),$schema:(0,i.optional)((0,i.string)())}),n.isSnapManifest=function(e){return(0,i.is)(e,n.SnapManifestStruct)},n.assertIsSnapManifest=function(e){(0,s.assertStruct)(e,n.SnapManifestStruct,`"${f.NpmSnapFileNames.Manifest}" is invalid`)},n.createSnapManifest=function(e){return(0,i.create)(e,n.SnapManifestStruct)}},{"../array.cjs":311,"../cronjob.cjs":318,"../entropy.cjs":323,"../json-rpc.cjs":330,"../namespace.cjs":336,"../snaps.cjs":340,"../structs.cjs":342,"../types.cjs":344,"@metamask/key-tree":60,"@metamask/superstruct":352,"@metamask/utils":369}],336:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isNamespace=n.isAccountIdArray=n.isAccountId=n.isChainId=n.isNamespaceId=n.NamespaceIdStruct=n.NamespaceStruct=n.ChainStruct=n.AccountAddressStruct=n.AccountIdArrayStruct=n.AccountIdStruct=n.ChainIdStruct=n.ChainIdStringStruct=n.LimitedString=n.parseAccountId=n.parseChainId=n.ACCOUNT_ADDRESS_REGEX=n.ACCOUNT_ID_REGEX=n.CHAIN_ID_REGEX=void 0;const r=e("@metamask/superstruct");n.CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-a-zA-Z0-9]{1,32})$/u,n.ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-a-zA-Z0-9]{1,32})):(?[a-zA-Z0-9]{1,64})$/u,n.ACCOUNT_ADDRESS_REGEX=/^(?[a-zA-Z0-9]{1,64})$/u,n.parseChainId=function(e){const t=n.CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},n.parseAccountId=function(e){const t=n.ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.LimitedString=(0,r.size)((0,r.string)(),1,40),n.ChainIdStringStruct=(0,r.define)("Chain ID",(0,r.string)().validator),n.ChainIdStruct=(0,r.pattern)(n.ChainIdStringStruct,n.CHAIN_ID_REGEX),n.AccountIdStruct=(0,r.pattern)((0,r.string)(),n.ACCOUNT_ID_REGEX),n.AccountIdArrayStruct=(0,r.array)(n.AccountIdStruct),n.AccountAddressStruct=(0,r.pattern)((0,r.string)(),n.ACCOUNT_ADDRESS_REGEX),n.ChainStruct=(0,r.object)({id:n.ChainIdStruct,name:n.LimitedString}),n.NamespaceStruct=(0,r.object)({chains:(0,r.array)(n.ChainStruct),methods:(0,r.optional)((0,r.array)(n.LimitedString)),events:(0,r.optional)((0,r.array)(n.LimitedString))}),n.NamespaceIdStruct=(0,r.pattern)((0,r.string)(),/^[-a-z0-9]{3,8}$/u),n.isNamespaceId=function(e){return(0,r.is)(e,n.NamespaceIdStruct)},n.isChainId=function(e){return(0,r.is)(e,n.ChainIdStruct)},n.isAccountId=function(e){return(0,r.is)(e,n.AccountIdStruct)},n.isAccountIdArray=function(e){return(0,r.is)(e,n.AccountIdArrayStruct)},n.isNamespace=function(e){return(0,r.is)(e,n.NamespaceStruct)}},{"@metamask/superstruct":352}],337:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.normalizeRelative=void 0;const r=e("@metamask/utils");n.normalizeRelative=function(e){return(0,r.assert)(!e.startsWith("/")),(0,r.assert)(-1===e.search(/:|\/\//u),`Path "${e}" potentially an URI instead of local relative`),e.startsWith("./")?e.slice(2):e}},{"@metamask/utils":369}],338:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.getPlatformVersion=void 0;const i=r(e("@metamask/snaps-sdk/package.json"));n.getPlatformVersion=function(){return i.default.version}},{"@metamask/snaps-sdk/package.json":310}],339:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],340:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.verifyRequestedSnapPermissions=n.isSnapPermitted=n.isCaipChainId=n.assertIsValidSnapId=n.isSnapId=n.stripSnapPrefix=n.getSnapPrefix=n.SnapIdStruct=n.HttpSnapIdStruct=n.NpmSnapIdStruct=n.LocalSnapIdStruct=n.BaseSnapIdStruct=n.LOCALHOST_HOSTNAMES=n.validateSnapShasum=n.getSnapChecksum=n.SnapStatusEvents=n.SnapStatus=n.PROPOSED_NAME_REGEX=void 0;const i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("@scure/base"),a=r(e("fast-json-stable-stringify")),c=r(e("validate-npm-package-name")),u=e("./caveats.cjs"),l=e("./checksum.cjs"),d=e("./types.cjs");var h,f;function p(e){const t=e.clone();return delete t.result.source.shasum,t.value=(0,a.default)(t.result),t}async function m(e){const{manifest:t,sourceCode:n,svgIcon:r,auxiliaryFiles:i,localizationFiles:s}=e,a=[p(t),n,r,...i,...s].filter((e=>void 0!==e));return o.base64.encode(await(0,l.checksumFiles)(a))}n.PROPOSED_NAME_REGEX=/^(?:[A-Za-z0-9-_]+( [A-Za-z0-9-_]+)*)|(?:(?:@[A-Za-z0-9-*~][A-Za-z0-9-*._~]*\/)?[A-Za-z0-9-~][A-Za-z0-9-._~]*)$/u,function(e){e.Installing="installing",e.Updating="updating",e.Running="running",e.Stopped="stopped",e.Crashed="crashed"}(h||(n.SnapStatus=h={})),function(e){e.Start="START",e.Stop="STOP",e.Crash="CRASH",e.Update="UPDATE"}(f||(n.SnapStatusEvents=f={})),n.getSnapChecksum=m,n.validateSnapShasum=async function(e,t="Invalid Snap manifest: manifest shasum does not match computed shasum."){if(e.manifest.result.source.shasum!==await m(e))throw new Error(t)},n.LOCALHOST_HOSTNAMES=["localhost","127.0.0.1","[::1]"],n.BaseSnapIdStruct=(0,i.pattern)((0,i.string)(),/^[\x21-\x7E]*$/u);const y=(0,d.uri)({protocol:(0,i.enums)(["http:","https:"]),hostname:(0,i.enums)(n.LOCALHOST_HOSTNAMES),hash:(0,i.empty)((0,i.string)()),search:(0,i.empty)((0,i.string)())});function g(e){const t=Object.values(d.SnapIdPrefixes).find((t=>e.startsWith(t)));if(void 0!==t)return t;throw new Error(`Invalid or no prefix found for "${e}"`)}n.LocalSnapIdStruct=(0,i.refine)(n.BaseSnapIdStruct,"local Snap Id",(e=>{if(!e.startsWith(d.SnapIdPrefixes.local))return`Expected local snap ID, got "${e}".`;const[t]=(0,i.validate)(e.slice(d.SnapIdPrefixes.local.length),y);return t??!0})),n.NpmSnapIdStruct=(0,i.intersection)([n.BaseSnapIdStruct,(0,d.uri)({protocol:(0,i.literal)(d.SnapIdPrefixes.npm),pathname:(0,i.refine)((0,i.string)(),"package name",(function*(e){const t=e.startsWith("/")?e.slice(1):e,{errors:n,validForNewPackages:r,warnings:i}=(0,c.default)(t);return r||(void 0===n?((0,s.assert)(void 0!==i),yield*i):yield*n),!0})),search:(0,i.empty)((0,i.string)()),hash:(0,i.empty)((0,i.string)())})]),n.HttpSnapIdStruct=(0,i.intersection)([n.BaseSnapIdStruct,(0,d.uri)({protocol:(0,i.enums)(["http:","https:"]),search:(0,i.empty)((0,i.string)()),hash:(0,i.empty)((0,i.string)())})]),n.SnapIdStruct=(0,i.union)([n.NpmSnapIdStruct,n.LocalSnapIdStruct]),n.getSnapPrefix=g,n.stripSnapPrefix=function(e){return e.replace(g(e),"")},n.isSnapId=function(e){return(0,i.is)(e,n.SnapIdStruct)},n.assertIsValidSnapId=function(e){(0,s.assertStruct)(e,n.SnapIdStruct,"Invalid snap ID")},n.isCaipChainId=function(e){return"string"==typeof e&&/^(?[-a-z0-9]{3,8}):(?[-a-zA-Z0-9]{1,32})$/u.test(e)},n.isSnapPermitted=function(e,t){return Boolean((e?.wallet_snap?.caveats?.find((e=>e.type===u.SnapCaveatType.SnapIds))??{}).value?.[t])},n.verifyRequestedSnapPermissions=function(e){(0,s.assert)((0,s.isObject)(e),"Requested permissions must be an object.");const{wallet_snap:t}=e;(0,s.assert)((0,s.isObject)(t),"wallet_snap is missing from the requested permissions.");const{caveats:n}=t;(0,s.assert)(Array.isArray(n)&&1===n.length,"wallet_snap must have a caveat property with a single-item array value.");const[r]=n;(0,s.assert)((0,s.isObject)(r)&&r.type===u.SnapCaveatType.SnapIds&&(0,s.isObject)(r.value),`The requested permissions do not have a valid ${u.SnapCaveatType.SnapIds} caveat.`)}},{"./caveats.cjs":315,"./checksum.cjs":316,"./types.cjs":344,"@metamask/superstruct":352,"@metamask/utils":369,"@scure/base":401,"fast-json-stable-stringify":505,"validate-npm-package-name":651}],341:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.indent=void 0,n.indent=function(e,t=2){return e.replace(/^/gmu," ".repeat(t))}},{}],342:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeStructs=n.createUnion=n.validateUnion=n.getStructErrorMessage=n.getStructFailureMessage=n.getStructErrorPrefix=n.getUnionStructNames=n.getStructFromPath=n.createFromStruct=n.getError=n.arrayToGenerator=n.SnapsStructError=n.named=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("chalk"),a=e("./strings.cjs");function c(e,t,n){return n?t(e):e}n.named=function(e,t){return new i.Struct({...t,type:e})};class u extends i.StructError{constructor(e,t,n,r,i,s=!0){super(r,i),this.name="SnapsStructError",this.message=`${t}.\n\n${y(e,[...i()],s)}${n?`\n\n${n}`:""}`}}function*l(e){for(const t of e)yield t}function d({struct:e,prefix:t,suffix:n="",error:r,colorize:i}){return new u(e,t,n,r,(()=>l(r.failures())),i)}function h(e,t){return t.reduce(((t,n)=>(0,s.isObject)(e.schema)&&e.schema[n]?e.schema[n]:t),e)}function f(e,t=!0){return Array.isArray(e.schema)?e.schema.map((({type:e})=>c(e,o.green,t))):null}function p(e,t=!0){return"never"===e.type||0===e.path.length?"":`At path: ${c(e.path.join("."),o.bold,t)} — `}function m(e,t,n=!0){const r=c(JSON.stringify(t.value),o.red,n),i=p(t,n);if("union"===t.type){const s=f(h(e,t.path),n);return s?`${i}Expected the value to be one of: ${s.join(", ")}, but received: ${r}.`:`${i}${t.message}.`}if("literal"===t.type){return`${i}${t.message.replace(/the literal `(.+)`,/u,`the value to be \`${c("$1",o.green,n)}\`,`).replace(/, but received: (.+)/u,`, but received: ${c("$1",o.red,n)}`)}.`}if("never"===t.type)return`Unknown key: ${c(t.path.join("."),o.bold,n)}, received: ${r}.`;if("size"===t.refinement){return`${i}${t.message.replace(/length between `(\d+)` and `(\d+)`/u,`length between ${c("$1",o.green,n)} and ${c("$2",o.green,n)},`).replace(/length of `(\d+)`/u,`length of ${c("$1",o.red,n)}`).replace(/a array/u,"an array")}.`}return void 0!==t.refinement?`${i}${t.message}.`:`${i}Expected a value of type ${c(t.type,o.green,n)}, but received: ${r}.`}function y(e,t,n=!0){return t.map((t=>(0,a.indent)(`• ${m(e,t,n)}`))).join("\n")}function g(e,t,n,o=!1){(0,s.assert)(t.schema,"Expected a struct with a schema. Make sure to use `union` from `@metamask/snaps-sdk`."),(0,s.assert)(t.schema.length>0,"Expected a non-empty array of structs.");const a=t.schema.map((e=>e.schema[n])),c=(0,i.type)({[n]:(0,r.union)(a)}),[u]=(0,i.validate)(e,c,{coerce:o});if(u)throw new Error(m(c,u.failures()[0],!1));const l=e,d=t.schema.filter((e=>(0,i.is)(l[n],e.schema[n])));(0,s.assert)(d.length>0,"Expected a struct to match the value.");const h=d.map((e=>(0,i.validate)(l,e,{coerce:o}))),f=h.find((([e])=>!e));if(f)return f[1];(0,s.assert)(h[0][0],"Expected at least one error.");const p=h.reduce(((e,[t])=>((0,s.assert)(t,"Expected an error."),t.failures().length0);const n=new i.XMLParser({ignoreAttributes:!1,parseAttributeValue:!0}).parse(t,!0);return(0,r.assert)((0,r.hasProperty)(n,"svg")),(0,r.isObject)(n.svg)?n.svg:{}}catch{throw new Error("Snap icon must be a valid SVG.")}}n.parseSvg=s,n.isSvg=function(e){try{return s(e),!0}catch{return!1}}},{"@metamask/utils":369,"fast-xml-parser":507}],344:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WALLET_SNAP_PERMISSION_KEY=n.isValidUrl=n.uri=n.SNAP_STREAM_NAMES=n.SnapIdPrefixes=n.NpmSnapPackageJsonStruct=n.NameStruct=n.NpmSnapFileNames=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");var s,o,a;!function(e){e.PackageJson="package.json",e.Manifest="snap.manifest.json"}(s||(n.NpmSnapFileNames=s={})),n.NameStruct=(0,r.size)((0,r.pattern)((0,r.string)(),/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214),n.NpmSnapPackageJsonStruct=(0,r.type)({version:i.VersionStruct,name:n.NameStruct,main:(0,r.optional)((0,r.size)((0,r.string)(),1,1/0)),repository:(0,r.optional)((0,r.type)({type:(0,r.size)((0,r.string)(),1,1/0),url:(0,r.size)((0,r.string)(),1,1/0)}))}),function(e){e.npm="npm:",e.local="local:"}(o||(n.SnapIdPrefixes=o={})),function(e){e.JSON_RPC="jsonRpc",e.COMMAND="command"}(a||(n.SNAP_STREAM_NAMES=a={}));n.uri=(e={})=>(0,r.refine)((0,r.union)([(0,r.string)(),(0,r.instance)(URL)]),"uri",(t=>{try{const n=new URL(t),i=(0,r.type)(e);return(0,r.assert)(n,i),!0}catch{return`Expected URL, got "${t.toString()}".`}})),n.isValidUrl=function(e,t={}){return(0,r.is)(e,(0,n.uri)(t))},n.WALLET_SNAP_PERMISSION_KEY="wallet_snap"},{"@metamask/superstruct":352,"@metamask/utils":369}],345:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.serialiseJsx=n.walkJsx=n.getJsxChildren=n.hasChildren=n.getTotalTextLength=n.validateJsxLinks=n.validateTextLinks=n.validateLink=n.getJsxElementFromComponent=n.getTextChildren=void 0;const r=e("@metamask/snaps-sdk/jsx-runtime"),i=e("@metamask/snaps-sdk"),s=e("@metamask/snaps-sdk/jsx"),o=e("@metamask/utils"),a=e("marked"),c=e("./url.cjs"),u=5e4,l=["https:","mailto:","metamask:"];function d(e){switch(e){case"primary":return"primary";case"secondary":return"destructive";default:return}}function h(e){return 1===e.length?e[0]:e}function f(e){return e.tokens&&e.tokens.length>0?h(e.tokens.flatMap(m)):e.href}function p(e){return h(e.flatMap(m))}function m(e){switch(e.type){case"link":return(0,r.jsx)(s.Link,{href:e.href,children:f(e)});case"text":return e.text;case"strong":return(0,r.jsx)(s.Bold,{children:p(e.tokens)});case"em":return(0,r.jsx)(s.Italic,{children:p(e.tokens)});default:return null}}function y(e){const t=(0,a.lexer)(e,{gfm:!1}),n=[];return(0,a.walkTokens)(t,(e=>{if("paragraph"===e.type){n.length>0&&n.push("\n\n");const{tokens:t}=e;n.push(...t.flatMap(m))}})),n.filter((e=>null!==e))}function g(e,t,n){try{const r=new URL(e);if((0,o.assert)(l.includes(r.protocol),`Protocol must be one of: ${l.join(", ")}.`),"metamask:"===r.protocol){const t=(0,c.parseMetaMaskUrl)(e);t.snapId&&(0,o.assert)(n(t.snapId),"The Snap being navigated to is not installed.")}else if("mailto:"===r.protocol){const e=r.pathname.split(",");for(const n of e){const e=n.split("@")[1];(0,o.assert)(!e.includes(":"));const r=`https://${e}`;(0,o.assert)(!t(r),"The specified URL is not allowed.")}return}(0,o.assert)(!t(r.href),"The specified URL is not allowed.")}catch(e){throw new Error(`Invalid URL: ${"ERR_ASSERTION"===e?.code?e.message:"Unable to parse URL."}`)}}function b(e){const{type:t}=e;switch(t){case i.NodeType.Panel:return e.children.reduce(((e,t)=>e+b(t)),0);case i.NodeType.Row:return b(e.value);case i.NodeType.Text:return e.value.length;default:return 0}}function v(e){return(0,o.hasProperty)(e.props,"children")}function x(e){return Boolean(e)&&!0!==e}function w(e){if(v(e)){if(Array.isArray(e.props.children))return e.props.children.filter(x).flat(1/0);if(e.props.children)return[e.props.children]}return[]}function S(e,t,n=0){if(Array.isArray(e)){for(const r of e){const e=S(r,t,n);if(void 0!==e)return e}return}const r=t(e,n);if(void 0!==r)return r;if((0,o.hasProperty)(e,"props")&&(0,o.isPlainObject)(e.props)&&(0,o.hasProperty)(e.props,"children")){const r=w(e);for(const e of r)if((0,o.isPlainObject)(e)){const r=S(e,t,n+1);if(void 0!==r)return r}}}function E(e){return Object.entries(e).filter((([e])=>"children"!==e)).sort((([e],[t])=>e.localeCompare(t))).map((([e,t])=>{return` ${e}=${n=t,"string"==typeof n?`"${n}"`:`{${JSON.stringify(n)}}`}`;var n})).join("")}n.getTextChildren=y,n.getJsxElementFromComponent=function(e){return function(e){const t=b(e);(0,o.assert)(t<=u,`The text in a Snap UI may not be larger than ${u/1e3} kB.`)}(e),function e(t){switch(t.type){case i.NodeType.Address:return(0,r.jsx)(s.Address,{address:t.value});case i.NodeType.Button:return(0,r.jsx)(s.Button,{name:t.name,variant:d(t.variant),type:t.buttonType,children:t.value});case i.NodeType.Copyable:return(0,r.jsx)(s.Copyable,{value:t.value,sensitive:t.sensitive});case i.NodeType.Divider:return(0,r.jsx)(s.Divider,{});case i.NodeType.Form:return(0,r.jsx)(s.Form,{name:t.name,children:h(t.children.map(e))});case i.NodeType.Heading:return(0,r.jsx)(s.Heading,{children:t.value});case i.NodeType.Image:return(0,r.jsx)(s.Image,{src:t.value});case i.NodeType.Input:return(0,r.jsx)(s.Field,{label:t.label,error:t.error,children:(0,r.jsx)(s.Input,{name:t.name,type:t.inputType,value:t.value,placeholder:t.placeholder})});case i.NodeType.Panel:return(0,r.jsx)(s.Box,{children:h(t.children.map(e))});case i.NodeType.Row:return(0,r.jsx)(s.Row,{label:t.label,variant:t.variant,children:e(t.value)});case i.NodeType.Spinner:return(0,r.jsx)(s.Spinner,{});case i.NodeType.Text:return(0,r.jsx)(s.Text,{children:h(y(t.value))});default:return(0,o.assertExhaustive)(t)}}(e)},n.validateLink=g,n.validateTextLinks=function(e,t,n){const r=function(e){const t=(0,a.lexer)(e,{gfm:!1}),n=[];return(0,a.walkTokens)(t,(e=>{"link"===e.type&&n.push(e)})),n}(e);for(const e of r)g(e.href,t,n)},n.validateJsxLinks=function(e,t,n){S(e,(e=>{"Link"===e.type&&g(e.props.href,t,n)}))},n.getTotalTextLength=b,n.hasChildren=v,n.getJsxChildren=w,n.walkJsx=S,n.serialiseJsx=function e(t,n=0){if(Array.isArray(t))return t.map((t=>e(t,n))).join("");const r=" ".repeat(n);if("string"==typeof t)return`${r}${t}\n`;if(!t)return"";const{type:i,props:s}=t,a=n>0?"\n":"";if((0,o.hasProperty)(s,"children")){const t=e(s.children,n+1);return`${r}<${i}${E(s)}>\n${t}${r}${a}`}return`${r}<${i}${E(s)} />${a}`}},{"./url.cjs":346,"@metamask/snaps-sdk":200,"@metamask/snaps-sdk/jsx":309,"@metamask/snaps-sdk/jsx-runtime":308,"@metamask/utils":369,marked:546}],346:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseMetaMaskUrl=n.SNAP_PATHS=n.CLIENT_PATHS=void 0;const r=e("@metamask/utils"),i=e("./snaps.cjs");n.CLIENT_PATHS=["/"],n.SNAP_PATHS=["/home"],n.parseMetaMaskUrl=function(e){const t=new URL(e),{protocol:s}=t;if("metamask:"!==s)throw new Error(`Unable to parse URL. Expected the protocol to be "metamask:", but received "${s}".`);const[o,...a]=t.href.replace("metamask://","").split("/"),c=`/${a.join("/")}`;switch(o){case"client":return(0,r.assert)(n.CLIENT_PATHS.includes(c),`Unable to navigate to "${c}". The provided path is not allowed.`),{authority:o,path:c};case"snap":return function(e){const t="Invalid MetaMask url:",s=(0,i.stripSnapPrefix)(e.slice(1)),o=e.slice(1).startsWith("npm:")?"npm:":"local:",a=s.startsWith("@"),c=s.split("/"),u=`/${c[c.length-1]}`;let l;if("local:"===o){const[e,,...i]=c.slice(0,-1);l=`${e}//${i.join("/")}`,(0,r.assert)(n.SNAP_PATHS.includes(u),`${t} invalid snap path.`)}else l=a?`${c[0]}/${c[1]}`:c[0],(0,r.assert)(a?3===c.length&&n.SNAP_PATHS.includes(u):2===c.length&&n.SNAP_PATHS.includes(u),`${t} invalid snap path.`);const d=`${o}${l}`;return(0,i.assertIsValidSnapId)(d),{authority:"snap",snapId:d,path:u}}(c);default:throw new Error(`Expected "metamask:" URL to start with "client" or "snap", but received "${o}".`)}}},{"./snaps.cjs":340,"@metamask/utils":369}],347:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateFetchedSnap=void 0;const r=e("./icon.cjs"),i=e("./localization.cjs"),s=e("./manifest/validation.cjs"),o=e("./snaps.cjs");n.validateFetchedSnap=async function(e){(0,s.assertIsSnapManifest)(e.manifest.result),await(0,o.validateSnapShasum)(e),(0,i.validateSnapManifestLocalizations)(e.manifest.result,e.localizationFiles.map((e=>e.result))),e.svgIcon&&(0,r.assertIsSnapIcon)(e.svgIcon)}},{"./icon.cjs":327,"./localization.cjs":332,"./manifest/validation.cjs":335,"./snaps.cjs":340}],348:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.resolveVersionRange=n.getTargetVersion=n.DEFAULT_REQUESTED_SNAP_VERSION=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("semver");n.DEFAULT_REQUESTED_SNAP_VERSION="*",n.getTargetVersion=function(e,t){const n=(0,s.maxSatisfying)(e,t);return n||(0,s.maxSatisfying)(e,t,{includePrerelease:!0})},n.resolveVersionRange=function(e){return void 0===e||"latest"===e?[void 0,n.DEFAULT_REQUESTED_SNAP_VERSION]:(0,r.validate)(e,i.VersionRangeStruct)}},{"@metamask/superstruct":352,"@metamask/utils":369,semver:618}],349:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.VirtualFile=void 0;const r=e("@metamask/utils"),i=e("@scure/base"),s=e("../deep-clone.cjs");class o{constructor(e){let t;t="string"==typeof e||e instanceof Uint8Array?{value:e}:e,this.value=t?.value??"",this.result=t?.result??void 0,this.data=t?.data??{},this.path=t?.path??"/"}get size(){return"string"==typeof this.value?this.value.length:this.value.byteLength}toString(e){if("string"==typeof this.value)return(0,r.assert)(void 0===e,"Tried to encode string."),this.value;if(this.value instanceof Uint8Array&&"hex"===e)return(0,r.bytesToHex)(this.value);if(this.value instanceof Uint8Array&&"base64"===e)return i.base64.encode(this.value);return new TextDecoder(e).decode(this.value)}clone(){const e=new o;return"string"==typeof this.value?e.value=this.value:e.value=this.value.slice(0),e.result=(0,s.deepClone)(this.result),e.data=(0,s.deepClone)(this.data),e.path=this.path,e}}n.VirtualFile=o},{"../deep-clone.cjs":320,"@metamask/utils":369,"@scure/base":401}],350:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./VirtualFile.cjs"),n)},{"./VirtualFile.cjs":349}],351:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.StructError=void 0;class r extends TypeError{constructor(e,t){let n;const{message:r,explanation:i,...s}=e,{path:o}=e,a=0===o.length?r:`At path: ${o.join(".")} -- ${r}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}n.StructError=r},{}],352:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./error.cjs"),n),i(e("./struct.cjs"),n),i(e("./structs/coercions.cjs"),n),i(e("./structs/refinements.cjs"),n),i(e("./structs/types.cjs"),n),i(e("./structs/utilities.cjs"),n)},{"./error.cjs":351,"./struct.cjs":353,"./structs/coercions.cjs":354,"./structs/refinements.cjs":355,"./structs/types.cjs":356,"./structs/utilities.cjs":357}],353:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validate=n.is=n.mask=n.create=n.assert=n.Struct=void 0;const r=e("./error.cjs"),i=e("./utils.cjs");function s(e,t,n){const r=u(e,t,{message:n});if(r[0])throw r[0]}function o(e,t,n){const r=u(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function a(e,t,n){const r=u(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}function c(e,t){return!u(e,t)[0]}function u(e,t,n={}){const s=(0,i.run)(e,t,n),o=(0,i.shiftIterator)(s);if(o[0]){return[new r.StructError(o[0],(function*(){for(const e of s)e[0]&&(yield e[0])})),void 0]}return[void 0,o[1]]}n.Struct=class{constructor(e){const{type:t,schema:n,validator:r,refiner:s,coercer:o=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=o,this.validator=r?(e,t)=>{const n=r(e,t);return(0,i.toFailures)(n,t,this,e)}:()=>[],this.refiner=s?(e,t)=>{const n=s(e,t);return(0,i.toFailures)(n,t,this,e)}:()=>[]}assert(e,t){return s(e,this,t)}create(e,t){return o(e,this,t)}is(e){return c(e,this)}mask(e,t){return a(e,this,t)}validate(e,t={}){return u(e,this,t)}},n.assert=s,n.create=o,n.mask=a,n.is=c,n.validate=u},{"./error.cjs":351,"./utils.cjs":358}],354:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.trimmed=n.defaulted=n.coerce=void 0;const r=e("../struct.cjs"),i=e("../utils.cjs"),s=e("./types.cjs");function o(e,t,n){return new r.Struct({...e,coercer:(i,s)=>(0,r.is)(i,t)?e.coercer(n(i,s),s):e.coercer(i,s)})}n.coerce=o,n.defaulted=function(e,t,n={}){return o(e,(0,s.unknown)(),(e=>{const r="function"==typeof t?t():t;if(void 0===e)return r;if(!n.strict&&(0,i.isPlainObject)(e)&&(0,i.isPlainObject)(r)){const t={...e};let n=!1;for(const e in r)void 0===t[e]&&(t[e]=r[e],n=!0);if(n)return t}return e}))},n.trimmed=function(e){return o(e,(0,s.string)(),(e=>e.trim()))}},{"../struct.cjs":353,"../utils.cjs":358,"./types.cjs":356}],355:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.refine=n.size=n.pattern=n.nonempty=n.min=n.max=n.empty=void 0;const r=e("../struct.cjs"),i=e("../utils.cjs");function s(e){return e instanceof Map||e instanceof Set?e.size:e.length}function o(e,t,n){return new r.Struct({...e,*refiner(r,s){yield*e.refiner(r,s);const o=n(r,s),a=(0,i.toFailures)(o,s,e,r);for(const e of a)yield{...e,refinement:t}}})}n.empty=function(e){return o(e,"empty",(t=>{const n=s(t);return 0===n||`Expected an empty ${e.type} but received one with a size of \`${n}\``}))},n.max=function(e,t,n={}){const{exclusive:r}=n;return o(e,"max",(n=>r?nr?n>t:n>=t||`Expected a ${e.type} greater than ${r?"":"or equal to "}${t} but received \`${n}\``))},n.nonempty=function(e){return o(e,"nonempty",(t=>s(t)>0||`Expected a nonempty ${e.type} but received an empty one`))},n.pattern=function(e,t){return o(e,"pattern",(n=>t.test(n)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${n}"`))},n.size=function(e,t,n=t){const r=`Expected a ${e.type}`,i=t===n?`of \`${t}\``:`between \`${t}\` and \`${n}\``;return o(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=n||`${r} ${i} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:s}=e;return t<=s&&s<=n||`${r} with a size ${i} but received one with a size of \`${s}\``}const{length:s}=e;return t<=s&&s<=n||`${r} with a length ${i} but received one with a length of \`${s}\``}))},n.refine=o},{"../struct.cjs":353,"../utils.cjs":358}],356:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.unknown=n.union=n.type=n.tuple=n.string=n.set=n.regexp=n.record=n.optional=n.object=n.number=n.nullable=n.never=n.map=n.literal=n.intersection=n.integer=n.instance=n.func=n.enums=n.date=n.boolean=n.bigint=n.array=n.any=void 0;const r=e("../struct.cjs"),i=e("../utils.cjs"),s=e("./utilities.cjs");function o(){return(0,s.define)("never",(()=>!1))}n.any=function(){return(0,s.define)("any",(()=>!0))},n.array=function(e){return new r.Struct({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${(0,i.print)(e)}`})},n.bigint=function(){return(0,s.define)("bigint",(e=>"bigint"==typeof e))},n.boolean=function(){return(0,s.define)("boolean",(e=>"boolean"==typeof e))},n.date=function(){return(0,s.define)("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${(0,i.print)(e)}`))},n.enums=function(e){const t={},n=e.map((e=>(0,i.print)(e))).join();for(const n of e)t[n]=n;return new r.Struct({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${n}\`, but received: ${(0,i.print)(t)}`})},n.func=function(){return(0,s.define)("func",(e=>"function"==typeof e||`Expected a function, but received: ${(0,i.print)(e)}`))},n.instance=function(e){return(0,s.define)("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${(0,i.print)(t)}`))},n.integer=function(){return(0,s.define)("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${(0,i.print)(e)}`))},n.intersection=function(e){return new r.Struct({type:"intersection",schema:null,*entries(t,n){for(const{entries:r}of e)yield*r(t,n)},*validator(t,n){for(const{validator:r}of e)yield*r(t,n)},*refiner(t,n){for(const{refiner:r}of e)yield*r(t,n)}})},n.literal=function(e){const t=(0,i.print)(e),n=typeof e;return new r.Struct({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${(0,i.print)(n)}`})},n.map=function(e,t){return new r.Struct({type:"map",schema:null,*entries(n){if(e&&t&&n instanceof Map)for(const[r,i]of n.entries())yield[r,r,e],yield[r,i,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${(0,i.print)(e)}`})},n.never=o,n.nullable=function(e){return new r.Struct({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})},n.number=function(){return(0,s.define)("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${(0,i.print)(e)}`))},n.object=function(e){const t=e?Object.keys(e):[],n=o();return new r.Struct({type:"object",schema:e??null,*entries(r){if(e&&(0,i.isObject)(r)){const i=new Set(Object.keys(r));for(const n of t)i.delete(n),yield[n,r[n],e[n]];for(const e of i)yield[e,r[e],n]}},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`,coercer:e=>(0,i.isObject)(e)?{...e}:e})},n.optional=function(e){return new r.Struct({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})},n.record=function(e,t){return new r.Struct({type:"record",schema:null,*entries(n){if((0,i.isObject)(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`})},n.regexp=function(){return(0,s.define)("regexp",(e=>e instanceof RegExp))},n.set=function(e){return new r.Struct({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const n of t)yield[n,n,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${(0,i.print)(e)}`})},n.string=function(){return(0,s.define)("string",(e=>"string"==typeof e||`Expected a string, but received: ${(0,i.print)(e)}`))},n.tuple=function(e){const t=o();return new r.Struct({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let i=0;iArray.isArray(e)||`Expected an array, but received: ${(0,i.print)(e)}`})},n.type=function(e){const t=Object.keys(e);return new r.Struct({type:"type",schema:e,*entries(n){if((0,i.isObject)(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`,coercer:e=>(0,i.isObject)(e)?{...e}:e})},n.union=function(e){const t=e.map((e=>e.type)).join(" | ");return new r.Struct({type:"union",schema:null,coercer(t){for(const n of e){const[e,r]=n.validate(t,{coerce:!0});if(!e)return r}return t},validator(n,r){const s=[];for(const t of e){const[...e]=(0,i.run)(n,t,r),[o]=e;if(!o?.[0])return[];for(const[t]of e)t&&s.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${(0,i.print)(n)}`,...s]}})},n.unknown=function(){return(0,s.define)("unknown",(()=>!0))}},{"../struct.cjs":353,"../utils.cjs":358,"./utilities.cjs":357}],357:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.pick=n.partial=n.omit=n.lazy=n.dynamic=n.deprecated=n.define=n.assign=void 0;const r=e("../struct.cjs"),i=e("./types.cjs");n.assign=function(...e){const t="type"===e[0]?.type,n=e.map((({schema:e})=>e)),r=Object.assign({},...n);return t?(0,i.type)(r):(0,i.object)(r)},n.define=function(e,t){return new r.Struct({type:e,schema:null,validator:t})},n.deprecated=function(e,t){return new r.Struct({...e,refiner:(t,n)=>void 0===t||e.refiner(t,n),validator:(n,r)=>void 0===n||(t(n,r),e.validator(n,r))})},n.dynamic=function(e){return new r.Struct({type:"dynamic",schema:null,*entries(t,n){const r=e(t,n);yield*r.entries(t,n)},validator:(t,n)=>e(t,n).validator(t,n),coercer:(t,n)=>e(t,n).coercer(t,n),refiner:(t,n)=>e(t,n).refiner(t,n)})},n.lazy=function(e){let t;return new r.Struct({type:"lazy",schema:null,*entries(n,r){t??(t=e()),yield*t.entries(n,r)},validator:(n,r)=>(t??(t=e()),t.validator(n,r)),coercer:(n,r)=>(t??(t=e()),t.coercer(n,r)),refiner:(n,r)=>(t??(t=e()),t.refiner(n,r))})},n.omit=function(e,t){const{schema:n}=e,r={...n};for(const e of t)delete r[e];return"type"===e.type?(0,i.type)(r):(0,i.object)(r)},n.partial=function(e){const t=e instanceof r.Struct,n=t?{...e.schema}:{...e};for(const e in n)n[e]=(0,i.optional)(n[e]);return t&&"type"===e.type?(0,i.type)(n):(0,i.object)(n)},n.pick=function(e,t){const{schema:n}=e,r={};for(const e of t)r[e]=n[e];return"type"===e.type?(0,i.type)(r):(0,i.object)(r)}},{"../struct.cjs":353,"./types.cjs":356}],358:[function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!==e}function i(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function s(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:s,branch:o}=t,{type:a}=n,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${i(r)}\``}=e;return{value:r,type:a,refinement:c,key:s[s.length-1],path:s,branch:o,...e,message:u}}Object.defineProperty(n,"__esModule",{value:!0}),n.run=n.toFailures=n.toFailure=n.shiftIterator=n.print=n.isPlainObject=n.isObject=void 0,n.isObject=r,n.isPlainObject=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},n.print=i,n.shiftIterator=function(e){const{done:t,value:n}=e.next();return t?void 0:n},n.toFailure=s,n.toFailures=function*(e,t,n,i){(function(e){return r(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const r of e){const e=s(r,t,n,i);e&&(yield e)}},n.run=function*e(t,n,i={}){const{path:s=[],branch:o=[t],coerce:a=!1,mask:c=!1}=i,u={path:s,branch:o};if(a&&(t=n.coercer(t,u),c&&"type"!==n.type&&r(n.schema)&&r(t)&&!Array.isArray(t)))for(const e in t)void 0===n.schema[e]&&delete t[e];let l="valid";for(const e of n.validator(t,u))e.explanation=i.message,l="not_valid",yield[e,void 0];for(let[d,h,f]of n.entries(t,u)){const n=e(h,f,{path:void 0===d?s:[...s,d],branch:void 0===d?o:[...o,h],coerce:a,mask:c,message:i.message});for(const e of n)e[0]?(l=null===e[0].refinement||void 0===e[0].refinement?"not_valid":"not_refined",yield[e[0],void 0]):a&&(h=e[1],void 0===d?t=h:t instanceof Map?t.set(d,h):t instanceof Set?t.add(h):r(t)&&(void 0!==h||d in t)&&(t[d]=h))}if("not_valid"!==l)for(const e of n.refiner(t,u))e.explanation=i.message,l="not_refined",yield[e,void 0];"valid"===l&&(yield[void 0,t])}},{}],359:[function(e,t,n){arguments[4][62][0].apply(n,arguments)},{"./errors.cjs":367,"@metamask/superstruct":352,dup:62}],360:[function(e,t,n){arguments[4][63][0].apply(n,arguments)},{"./assert.cjs":359,"@metamask/superstruct":352,dup:63}],361:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDataView=n.concatBytes=n.valueToBytes=n.base64ToBytes=n.stringToBytes=n.numberToBytes=n.signedBigIntToBytes=n.bigIntToBytes=n.hexToBytes=n.bytesToBase64=n.bytesToString=n.bytesToNumber=n.bytesToSignedBigInt=n.bytesToBigInt=n.bytesToHex=n.assertIsBytes=n.isBytes=void 0;const r=e("@scure/base"),i=e("./assert.cjs"),s=e("./hex.cjs"),o=48,a=58,c=87;const u=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 l(e){return e instanceof Uint8Array}function d(e){(0,i.assert)(l(e),"Value must be a Uint8Array.")}function h(e){if(d(e),0===e.length)return"0x";const t=u(),n=new Array(e.length);for(let r=0;r=BigInt(0),"Value must be a non-negative bigint.");return p(e.toString(16))}function y(e){(0,i.assert)("number"==typeof e,"Value must be a number."),(0,i.assert)(e>=0,"Value must be a non-negative number."),(0,i.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return p(e.toString(16))}function g(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return m(e);if("number"==typeof e)return y(e);if("string"==typeof e)return e.startsWith("0x")?p(e):g(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}n.isBytes=l,n.assertIsBytes=d,n.bytesToHex=h,n.bytesToBigInt=f,n.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const n of e)t=(t<0,"Byte length must be greater than 0."),(0,i.assert)(function(e,t){(0,i.assert)(t>0);const n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let n=e;const r=new Uint8Array(t);for(let e=0;e>=BigInt(8);return r.reverse()},n.numberToBytes=y,n.stringToBytes=g,n.base64ToBytes=function(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),r.base64.decode(e)},n.valueToBytes=b,n.concatBytes=function(e){const t=new Array(e.length);let n=0;for(let r=0;r[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,n.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,n.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,n.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,n.CAIP_ASSET_TYPE_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ASSET_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32}))\/(?[-a-z0-9]{3,8}):(?[-.%a-zA-Z0-9]{1,128})\/(?[-.%a-zA-Z0-9]{1,78})$/u,n.CaipChainIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_CHAIN_ID_REGEX),n.CaipNamespaceStruct=(0,r.pattern)((0,r.string)(),n.CAIP_NAMESPACE_REGEX),n.CaipReferenceStruct=(0,r.pattern)((0,r.string)(),n.CAIP_REFERENCE_REGEX),n.CaipAccountIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ACCOUNT_ID_REGEX),n.CaipAccountAddressStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ACCOUNT_ADDRESS_REGEX),n.CaipAssetTypeStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ASSET_TYPE_REGEX),n.CaipAssetIdStruct=(0,r.pattern)((0,r.string)(),n.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Solana="solana",e.Eip155="eip155",e.Wallet="wallet"}(n.KnownCaipNamespace||(n.KnownCaipNamespace={})),n.isCaipChainId=function(e){return(0,r.is)(e,n.CaipChainIdStruct)},n.isCaipNamespace=i,n.isCaipReference=s,n.isCaipAccountId=function(e){return(0,r.is)(e,n.CaipAccountIdStruct)},n.isCaipAccountAddress=function(e){return(0,r.is)(e,n.CaipAccountAddressStruct)},n.isCaipAssetType=function(e){return(0,r.is)(e,n.CaipAssetTypeStruct)},n.isCaipAssetId=function(e){return(0,r.is)(e,n.CaipAssetIdStruct)},n.parseCaipChainId=function(e){const t=n.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},n.parseCaipAccountId=function(e){const t=n.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.toCaipChainId=function(e,t){if(!i(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!s(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}},{"@metamask/superstruct":352}],363:[function(e,t,n){arguments[4][66][0].apply(n,arguments)},{"./base64.cjs":360,"@metamask/superstruct":352,dup:66}],364:[function(e,t,n){arguments[4][67][0].apply(n,arguments)},{"./assert.cjs":359,"./bytes.cjs":361,"./hex.cjs":368,"@metamask/superstruct":352,dup:67}],365:[function(e,t,n){arguments[4][68][0].apply(n,arguments)},{dup:68}],366:[function(e,t,n){arguments[4][69][0].apply(n,arguments)},{dup:69}],367:[function(e,t,n){arguments[4][70][0].apply(n,arguments)},{"./misc.cjs":373,dup:70,"pony-cause":564}],368:[function(e,t,n){arguments[4][71][0].apply(n,arguments)},{"./assert.cjs":359,"./bytes.cjs":361,"@metamask/superstruct":352,"@noble/hashes/sha3":398,dup:71}],369:[function(e,t,n){arguments[4][72][0].apply(n,arguments)},{"./assert.cjs":359,"./base64.cjs":360,"./bytes.cjs":361,"./caip-types.cjs":362,"./checksum.cjs":363,"./coercers.cjs":364,"./collections.cjs":365,"./encryption-types.cjs":366,"./errors.cjs":367,"./hex.cjs":368,"./json.cjs":370,"./keyring.cjs":371,"./logging.cjs":372,"./misc.cjs":373,"./number.cjs":374,"./opaque.cjs":375,"./promise.cjs":376,"./time.cjs":377,"./transaction-types.cjs":378,"./versions.cjs":379,dup:72}],370:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonRpcIdValidator=n.assertIsJsonRpcError=n.isJsonRpcError=n.assertIsJsonRpcFailure=n.isJsonRpcFailure=n.assertIsJsonRpcSuccess=n.isJsonRpcSuccess=n.assertIsJsonRpcResponse=n.isJsonRpcResponse=n.assertIsPendingJsonRpcResponse=n.isPendingJsonRpcResponse=n.JsonRpcResponseStruct=n.JsonRpcFailureStruct=n.JsonRpcSuccessStruct=n.PendingJsonRpcResponseStruct=n.assertIsJsonRpcRequest=n.isJsonRpcRequest=n.assertIsJsonRpcNotification=n.isJsonRpcNotification=n.JsonRpcNotificationStruct=n.JsonRpcRequestStruct=n.JsonRpcParamsStruct=n.JsonRpcErrorStruct=n.JsonRpcIdStruct=n.JsonRpcVersionStruct=n.jsonrpc2=n.getJsonSize=n.getSafeJson=n.isValidJson=n.JsonStruct=n.UnsafeJsonStruct=n.exactOptional=n.object=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs"),s=e("./misc.cjs");function o({path:e,branch:t}){const n=e[e.length-1];return(0,s.hasProperty)(t[t.length-2],n)}function a(e){return new r.Struct({...e,type:`optional ${e.type}`,validator:(t,n)=>!o(n)||e.validator(t,n),refiner:(t,n)=>!o(n)||e.refiner(t,n)})}function c(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 n=0;n(0,r.object)(e),n.exactOptional=a,n.UnsafeJsonStruct=(0,r.define)("JSON",(e=>c(e))),n.JsonStruct=(0,r.coerce)(n.UnsafeJsonStruct,(0,r.any)(),(e=>((0,i.assertStruct)(e,n.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))))),n.isValidJson=function(e){try{return u(e),!0}catch{return!1}},n.getSafeJson=u,n.getJsonSize=function(e){(0,i.assertStruct)(e,n.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},n.jsonrpc2="2.0",n.JsonRpcVersionStruct=(0,r.literal)(n.jsonrpc2),n.JsonRpcIdStruct=(0,r.nullable)((0,r.union)([(0,r.number)(),(0,r.string)()])),n.JsonRpcErrorStruct=(0,n.object)({code:(0,r.integer)(),message:(0,r.string)(),data:a(n.JsonStruct),stack:a((0,r.string)())}),n.JsonRpcParamsStruct=(0,r.union)([(0,r.record)((0,r.string)(),n.JsonStruct),(0,r.array)(n.JsonStruct)]),n.JsonRpcRequestStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:a(n.JsonRpcParamsStruct)}),n.JsonRpcNotificationStruct=(0,n.object)({jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:a(n.JsonRpcParamsStruct)}),n.isJsonRpcNotification=function(e){return(0,r.is)(e,n.JsonRpcNotificationStruct)},n.assertIsJsonRpcNotification=function(e,t){(0,i.assertStruct)(e,n.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},n.isJsonRpcRequest=function(e){return(0,r.is)(e,n.JsonRpcRequestStruct)},n.assertIsJsonRpcRequest=function(e,t){(0,i.assertStruct)(e,n.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},n.PendingJsonRpcResponseStruct=(0,r.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:(0,r.optional)((0,r.unknown)()),error:(0,r.optional)(n.JsonRpcErrorStruct)}),n.JsonRpcSuccessStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:n.JsonStruct}),n.JsonRpcFailureStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,error:n.JsonRpcErrorStruct}),n.JsonRpcResponseStruct=(0,r.union)([n.JsonRpcSuccessStruct,n.JsonRpcFailureStruct]),n.isPendingJsonRpcResponse=function(e){return(0,r.is)(e,n.PendingJsonRpcResponseStruct)},n.assertIsPendingJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,n.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},n.isJsonRpcResponse=function(e){return(0,r.is)(e,n.JsonRpcResponseStruct)},n.assertIsJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,n.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},n.isJsonRpcSuccess=function(e){return(0,r.is)(e,n.JsonRpcSuccessStruct)},n.assertIsJsonRpcSuccess=function(e,t){(0,i.assertStruct)(e,n.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},n.isJsonRpcFailure=function(e){return(0,r.is)(e,n.JsonRpcFailureStruct)},n.assertIsJsonRpcFailure=function(e,t){(0,i.assertStruct)(e,n.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},n.isJsonRpcError=function(e){return(0,r.is)(e,n.JsonRpcErrorStruct)},n.assertIsJsonRpcError=function(e,t){(0,i.assertStruct)(e,n.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},n.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:n,permitNull:r}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(n||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||r&&null===e)}},{"./assert.cjs":359,"./misc.cjs":373,"@metamask/superstruct":352}],371:[function(e,t,n){arguments[4][74][0].apply(n,arguments)},{dup:74}],372:[function(e,t,n){arguments[4][75][0].apply(n,arguments)},{debug:462,dup:75}],373:[function(e,t,n){arguments[4][76][0].apply(n,arguments)},{dup:76}],374:[function(e,t,n){arguments[4][77][0].apply(n,arguments)},{"./assert.cjs":359,"./hex.cjs":368,dup:77}],375:[function(e,t,n){arguments[4][78][0].apply(n,arguments)},{dup:78}],376:[function(e,t,n){arguments[4][79][0].apply(n,arguments)},{dup:79}],377:[function(e,t,n){arguments[4][80][0].apply(n,arguments)},{dup:80}],378:[function(e,t,n){arguments[4][81][0].apply(n,arguments)},{dup:81}],379:[function(e,t,n){arguments[4][82][0].apply(n,arguments)},{"./assert.cjs":359,"@metamask/superstruct":352,dup:82,semver:618}],380:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getHash=o,n.createCurve=function(e,t){const n=t=>(0,s.weierstrass)({...e,...o(t)});return Object.freeze({...n(t),create:n})}; diff --git a/public/extensions/MetaMask_v10.22.2/ui-12.js b/public/extensions/MetaMask_v10.22.2/ui-12.js index 248275e79..1f9b669df 100644 --- a/public/extensions/MetaMask_v10.22.2/ui-12.js +++ b/public/extensions/MetaMask_v10.22.2/ui-12.js @@ -1 +1 @@ -LavaPack.loadBundle([[6937,{"../../../shared/constants/metametrics":5260,"../../../shared/constants/swaps":5274,"../../../shared/lib/transactions-controller-utils":5292,"../../../shared/modules/selectors":5319,"../../../shared/modules/selectors/networks":5320,"../../components/component-library":5806,"../../components/ui/box":6079,"../../contexts/i18n":6211,"../../contexts/metametrics":6214,"../../ducks/swaps/swaps":6244,"../../helpers/constants/design-system":6248,"../../helpers/constants/routes":6254,"../../helpers/higher-order-components/feature-toggled-route":6265,"../../hooks/useGasFeeEstimates":6331,"../../selectors":6985,"../../selectors/selectors":6993,"../../store/actions":7e3,"./awaiting-signatures":6920,"./awaiting-swap":6923,"./hooks/useUpdateSwapsState":6934,"./loading-swaps-quotes":6940,"./notification-page/notification-page":6943,"./prepare-swap-page/prepare-swap-page":6944,"./smart-transaction-status":6961,"@metamask/transaction-controller":2698,lodash:4380,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){var e,t,r,D;const j=(0,a.useContext)(s.I18nContext),A=(0,o.useHistory)(),I=(0,n.useDispatch)(),q=(0,a.useContext)(w.MetaMetricsContext),{pathname:N}=(0,o.useLocation)(),L=N===m.AWAITING_SWAP_ROUTE,F=N===m.AWAITING_SIGNATURES_ROUTE,W=N===m.SWAPS_ERROR_ROUTE,B=N===m.LOADING_QUOTES_ROUTE,U=N===m.SMART_TRANSACTION_STATUS_ROUTE,$=N===m.PREPARE_SWAP_ROUTE,[z,G]=(0,a.useState)(!1),H=(0,n.useSelector)(d.getFetchParams,i.isEqual),{destinationTokenInfo:V={}}=(null==H?void 0:H.metaData)||{},Q=(0,n.useSelector)(d.getBackgroundSwapRouteState),X=(0,n.useSelector)(u.getSelectedAccount,n.shallowEqual),Y=(0,n.useSelector)(d.getQuotes,i.isEqual),Z=(0,n.useSelector)(d.getLatestAddedTokenTo,i.isEqual),K=(0,n.useSelector)(p.getCurrentNetworkTransactions,n.shallowEqual),J=(0,n.useSelector)(d.getTradeTxId),ee=(0,n.useSelector)(d.getApproveTxId),te=(0,n.useSelector)(d.getAggregatorMetadata,n.shallowEqual),re=(0,n.useSelector)(d.getFetchingQuotes);let ae=(0,n.useSelector)(d.getSwapsErrorKey);const ne=(0,n.useSelector)(d.getSwapsFeatureIsLive),oe=(0,n.useSelector)(c.getCurrentChainId),ie=(0,n.useSelector)(u.getIsSwapsChain),le=(0,n.useSelector)(u.getTokenList,i.isEqual),se=(0,i.shuffle)(Object.values(le)),ue=(0,n.useSelector)(d.getReviewSwapClickedTimestamp),ce=Boolean(ue),de=(0,n.useSelector)(f.getSmartTransactionsOptInStatusForMetrics),pe=(0,n.useSelector)(f.getSmartTransactionsEnabled),fe=(0,n.useSelector)(d.getCurrentSmartTransactionsEnabled),me=(0,n.useSelector)(d.getCurrentSmartTransactionsError);(0,a.useEffect)((()=>{ie||(async()=>{await I((0,d.prepareToLeaveSwaps)()),A.push(m.DEFAULT_ROUTE)})()}),[ie,I,A]),(0,g.useGasFeeEstimates)();const{balance:he,address:be}=X,ge=ee&&K.find((({id:e})=>ee===e)),ye=J&&K.find((({id:e})=>J===e)),ve=(null==ye?void 0:ye.txReceipt)&&(0,x.getSwapsTokensReceivedFromTxMeta)(null==V?void 0:V.symbol,ye,null==V?void 0:V.address,be,null==V?void 0:V.decimals,ge,oe),we=(null==ye?void 0:ye.status)===l.TransactionStatus.confirmed,xe=(null==ge?void 0:ge.status)===l.TransactionStatus.failed||"0x0"===(null==ge||null===(e=ge.txReceipt)||void 0===e?void 0:e.status),Ee=(null==ye?void 0:ye.status)===l.TransactionStatus.failed||"0x0"===(null==ye||null===(t=ye.txReceipt)||void 0===t?void 0:t.status),_e=xe||Ee;_e&&ae!==h.CONTRACT_DATA_DISABLED_ERROR&&(ae=h.SWAP_FAILED_ERROR);const Ce=(0,a.useRef)();(0,a.useEffect)((()=>{Ce.current=()=>{!Z||L&&!_e||I((0,b.ignoreTokens)({tokensToIgnore:Z,dontShowLoadingIndicator:!0}))}}),[_e,I,Z,V,H,L]),(0,a.useEffect)((()=>()=>{Ce.current()}),[]),(0,T.default)();const Te=(0,n.useSelector)(u.isHardwareWallet),ke=(0,n.useSelector)(u.getHardwareWalletType),Se=(0,a.useRef)();(0,a.useEffect)((()=>{Se.current=()=>{var e,t;q({event:"Exited Swaps",category:v.MetaMetricsEventCategory.Swaps,sensitiveProperties:{token_from:null==H||null===(e=H.sourceTokenInfo)||void 0===e?void 0:e.symbol,token_from_amount:null==H?void 0:H.value,request_type:null==H?void 0:H.balanceError,token_to:null==H||null===(t=H.destinationTokenInfo)||void 0===t?void 0:t.symbol,slippage:null==H?void 0:H.slippage,custom_slippage:2!==(null==H?void 0:H.slippage),current_screen:N.match(/\/swaps\/(.+)/u)[1],is_hardware_wallet:Te,hardware_wallet_type:ke,stx_enabled:pe,current_stx_enabled:fe,stx_user_opt_in:de}})}})),(0,a.useEffect)((()=>((async()=>{await I((0,d.fetchSwapsLivenessAndFeatureFlags)())})(),()=>{Se.current()})),[I]),(0,a.useEffect)((()=>{ae&&!W&&ce&&A.push(m.SWAPS_ERROR_ROUTE)}),[A,ae,W,ce]);const Re=(0,a.useRef)();(0,a.useEffect)((()=>{const e=()=>(Ce.current(),B&&I((0,d.prepareToLeaveSwaps)()),null);return B&&!Re.current&&(Re.current=!0,window.addEventListener("beforeunload",e)),()=>window.removeEventListener("beforeunload",e)}),[I,B]);const Pe=(0,a.useCallback)((()=>{var e,t;q({event:"Error Smart Transactions",category:v.MetaMetricsEventCategory.Swaps,sensitiveProperties:{token_from:null==H||null===(e=H.sourceTokenInfo)||void 0===e?void 0:e.symbol,token_from_amount:null==H?void 0:H.value,request_type:null==H?void 0:H.balanceError,token_to:null==H||null===(t=H.destinationTokenInfo)||void 0===t?void 0:t.symbol,slippage:null==H?void 0:H.slippage,custom_slippage:2!==(null==H?void 0:H.slippage),current_screen:N.match(/\/swaps\/(.+)/u)[1],is_hardware_wallet:Te,hardware_wallet_type:ke,stx_enabled:pe,current_stx_enabled:fe,stx_user_opt_in:de,stx_error:me}})}),[me,fe,q,null==H?void 0:H.balanceError,null==H||null===(r=H.destinationTokenInfo)||void 0===r?void 0:r.symbol,null==H?void 0:H.slippage,null==H||null===(D=H.sourceTokenInfo)||void 0===D?void 0:D.symbol,null==H?void 0:H.value,ke,Te,N,pe,de]);if((0,a.useEffect)((()=>{me&&!z&&(G(!0),Pe())}),[me,Pe,z]),!ie)return a.default.createElement(a.default.Fragment,null);const Me=async()=>{Ce.current(),A.push({pathname:m.DEFAULT_ROUTE,state:{stayOnHomePage:!0}}),I((0,d.clearSwapsState)()),await I((0,b.resetBackgroundSwapsState)())};return a.default.createElement("div",{className:"swaps"},a.default.createElement("div",{className:"swaps__container"},a.default.createElement("div",{className:"swaps__header"},a.default.createElement(_.default,{display:C.DISPLAY.FLEX,justifyContent:C.JustifyContent.center,marginLeft:4,width:C.FRACTIONS.ONE_TWELFTH,tabIndex:"0",onKeyUp:e=>{"Enter"===e.key&&Me()}},!L&&!F&&!U&&a.default.createElement(E.Icon,{name:E.IconName.Arrow2Left,size:E.IconSize.Lg,color:C.IconColor.iconAlternative,onClick:Me,style:{cursor:"pointer"},title:j("cancel")})),a.default.createElement("div",{className:"swaps__title"},j("swap")),a.default.createElement(_.default,{display:C.DISPLAY.FLEX,justifyContent:C.JustifyContent.center,marginRight:4,width:C.FRACTIONS.ONE_TWELFTH,tabIndex:"0",onKeyUp:e=>{"Enter"===e.key&&I((0,d.setTransactionSettingsOpened)(!0))}},$&&a.default.createElement(E.Icon,{name:E.IconName.Setting,size:E.IconSize.Lg,color:C.IconColor.iconAlternative,onClick:()=>{I((0,d.setTransactionSettingsOpened)(!0))},style:{cursor:"pointer"},title:j("transactionSettings")}))),a.default.createElement("div",{className:"swaps__content"},a.default.createElement(o.Switch,null,a.default.createElement(y.default,{redirectRoute:m.SWAPS_MAINTENANCE_ROUTE,flag:ne,path:m.PREPARE_SWAP_ROUTE,exact:!0,render:()=>a.default.createElement(M.default,{ethBalance:he,selectedAccountAddress:be,shuffledTokensList:se})}),a.default.createElement(o.Route,{path:m.SWAPS_ERROR_ROUTE,exact:!0,render:()=>ae?a.default.createElement(R.default,{swapComplete:!1,errorKey:ae,txHash:null==ye?void 0:ye.hash,txId:null==ye?void 0:ye.id,submittedTime:null==ye?void 0:ye.submittedTime}):a.default.createElement(o.Redirect,{to:{pathname:m.PREPARE_SWAP_ROUTE}})}),a.default.createElement(o.Route,{path:m.SWAPS_NOTIFICATION_ROUTE,exact:!0,render:()=>ae?a.default.createElement(O.default,{notificationKey:ae}):a.default.createElement(o.Redirect,{to:{pathname:m.PREPARE_SWAP_ROUTE}})}),a.default.createElement(y.default,{redirectRoute:m.SWAPS_MAINTENANCE_ROUTE,flag:ne,path:m.LOADING_QUOTES_ROUTE,exact:!0,render:()=>te?a.default.createElement(P.default,{loadingComplete:!re&&Boolean(Object.values(Y).length),onDone:async()=>{await I((0,b.setBackgroundSwapRouteState)("")),ae===h.ERROR_FETCHING_QUOTES||ae===h.QUOTES_NOT_AVAILABLE_ERROR?(I((0,b.setSwapsErrorKey)(h.QUOTES_NOT_AVAILABLE_ERROR)),A.push(m.SWAPS_ERROR_ROUTE)):A.push(m.PREPARE_SWAP_ROUTE)},aggregatorMetadata:te}):a.default.createElement(o.Redirect,{to:{pathname:m.PREPARE_SWAP_ROUTE}})}),a.default.createElement(o.Route,{path:m.SWAPS_MAINTENANCE_ROUTE,exact:!0,render:()=>!1===ne?a.default.createElement(R.default,{errorKey:h.OFFLINE_FOR_MAINTENANCE}):a.default.createElement(o.Redirect,{to:{pathname:m.PREPARE_SWAP_ROUTE}})}),a.default.createElement(o.Route,{path:m.AWAITING_SIGNATURES_ROUTE,exact:!0,render:()=>a.default.createElement(k.default,null)}),a.default.createElement(o.Route,{path:m.SMART_TRANSACTION_STATUS_ROUTE,exact:!0,render:()=>a.default.createElement(S.default,{txId:null==ye?void 0:ye.id})}),a.default.createElement(o.Route,{path:m.AWAITING_SWAP_ROUTE,exact:!0,render:()=>"awaiting"===Q||ye?a.default.createElement(R.default,{swapComplete:we,txHash:null==ye?void 0:ye.hash,tokensReceived:ve,txId:null==ye?void 0:ye.id,submittingSwap:"awaiting"===Q&&!(ee||J)}):a.default.createElement(o.Redirect,{to:{pathname:m.DEFAULT_ROUTE}})})))))};var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=j(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=e("react-router-dom"),i=e("lodash"),l=e("@metamask/transaction-controller"),s=e("../../contexts/i18n"),u=e("../../selectors/selectors"),c=e("../../../shared/modules/selectors/networks"),d=e("../../ducks/swaps/swaps"),p=e("../../selectors"),f=e("../../../shared/modules/selectors"),m=e("../../helpers/constants/routes"),h=e("../../../shared/constants/swaps"),b=e("../../store/actions"),g=e("../../hooks/useGasFeeEstimates"),y=D(e("../../helpers/higher-order-components/feature-toggled-route")),v=e("../../../shared/constants/metametrics"),w=e("../../contexts/metametrics"),x=e("../../../shared/lib/transactions-controller-utils"),E=e("../../components/component-library"),_=D(e("../../components/ui/box")),C=e("../../helpers/constants/design-system"),T=D(e("./hooks/useUpdateSwapsState")),k=D(e("./awaiting-signatures")),S=D(e("./smart-transaction-status")),R=D(e("./awaiting-swap")),P=D(e("./loading-swaps-quotes")),M=D(e("./prepare-swap-page/prepare-swap-page")),O=D(e("./notification-page/notification-page"));function D(e){return e&&e.__esModule?e:{default:e}}function j(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(j=function(e){return e?r:t})(e)}}}},{package:"$root$",file:"ui/pages/swaps/index.js"}],[6938,{"../../../../shared/modules/hexstring-utils":5307,"../../../../shared/modules/selectors/networks":5320,"../../../components/component-library":5806,"../../../components/component-library/text-field-search/deprecated":5856,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,"../searchable-item-list/item-list":6949,"../swaps.util":6970,lodash:4380,loglevel:4386,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=w;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=y(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=g(e("prop-types")),i=e("lodash"),l=g(e("loglevel")),s=g(e("../../../components/ui/box")),u=e("../../../helpers/constants/design-system"),c=e("../../../components/component-library"),d=e("../../../components/component-library/text-field-search/deprecated"),p=g(e("../searchable-item-list/item-list")),f=e("../../../../shared/modules/hexstring-utils"),m=e("../../../contexts/i18n"),h=e("../swaps.util"),b=e("../../../../shared/modules/selectors/networks");function g(e){return e&&e.__esModule?e:{default:e}}function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(y=function(e){return e?r:t})(e)}let v;function w({itemsToSearch:e=[],listTitle:t,maxListItems:r,onClickItem:o,onOpenImportTokenModalClick:g,shouldSearchForImports:y,Placeholder:w,hideRightLabels:x,hideItemIf:E,listContainerClassName:_,searchQuery:C,setSearchQuery:T}){const k=(0,a.useRef)(),S=(0,a.useContext)(m.I18nContext),[R,P]=(0,a.useState)(e),M=(0,n.useSelector)(b.getCurrentChainId),O=async t=>{T(t),v&&clearTimeout(v),v=setTimeout((async()=>{v=null;const r=t.trim(),a=r.toUpperCase(),n=r.toLowerCase();if(!r)return void P(e);const o=(0,f.isValidHexAddress)(r);let s=[];if(o){const t=e.find((e=>e.address===n));t&&s.push(t)}else s=(0,i.filter)(e,(function(e){return e.symbol.includes(a)}));const u=""===t?e:s;y&&0===u.length&&o?await(async e=>{try{const t=await(0,h.fetchToken)(e,M);if(t)return t.primaryLabel=t.symbol,t.secondaryLabel=t.name,t.notImported=!0,void P([t])}catch(e){l.default.error("Token not found, show 0 results.",e)}P([])})(r):P(u)}),350)};(0,a.useEffect)((()=>{O(C)}),[C]);return a.default.createElement(s.default,{className:"list-with-search",width:u.BlockSize.Full,tabIndex:"0"},a.default.createElement(s.default,{style:{gridColumnStart:1,gridColumnEnd:3},display:u.Display.Flex,flexDirection:u.FlexDirection.Column},a.default.createElement(d.TextFieldSearch,{id:"list-with-search__text-search",marginBottom:4,onChange:e=>O(e.target.value),clearButtonOnClick:()=>{T("")},value:C,placeholder:S("enterTokenNameOrAddress"),inputProps:{marginRight:0},className:"list-with-search__text-search",autoFocus:!0,tabIndex:"0"})),(null==R?void 0:R.length)>0&&a.default.createElement(p.default,{searchQuery:C,results:R,onClickItem:o,onOpenImportTokenModalClick:g,Placeholder:w,listTitle:t,maxListItems:r,containerRef:k,hideRightLabels:x,hideItemIf:E,listContainerClassName:_}),0===(null==R?void 0:R.length)&&a.default.createElement(s.default,{marginTop:1,marginBottom:5,display:u.Display.Flex,justifyContent:u.JustifyContent.center,alignItems:u.AlignItems.center},a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},S("swapNoTokensAvailable",[C]))))}w.propTypes={itemsToSearch:o.default.array,onClickItem:o.default.func,onOpenImportTokenModalClick:o.default.func,Placeholder:o.default.func,listTitle:o.default.string,maxListItems:o.default.number,hideRightLabels:o.default.bool,shouldSearchForImports:o.default.bool,hideItemIf:o.default.func,listContainerClassName:o.default.string,searchQuery:o.default.string,setSearchQuery:o.default.func}}}},{package:"$root$",file:"ui/pages/swaps/list-with-search/list-with-search.js"}],[6939,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement(n.default.Fragment,null,n.default.createElement("div",{className:"loading-swaps-quotes__background-1","data-testid":"loading-swaps-quotes-background-1"},n.default.createElement("svg",{width:"193",height:"190",viewBox:"0 0 193 190",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M153.753 53.876C153.595 53.9493 153.419 54.0161 153.25 54.0651C151.081 54.7451 148.777 53.538 148.086 51.3768C147.763 50.3298 147.851 49.2109 148.361 48.2363C148.87 47.2618 149.732 46.5374 150.78 46.2144C151.828 45.8913 152.948 45.9781 153.923 46.4865C154.898 46.9949 155.622 47.8557 155.944 48.9027C156.567 50.918 155.592 53.0243 153.753 53.876ZM150.817 47.5708C150.245 47.8359 149.782 48.2721 149.495 48.8334C149.144 49.5127 149.073 50.2843 149.303 51.0047C149.774 52.4998 151.375 53.3384 152.877 52.8787C154.374 52.4069 155.215 50.8063 154.756 49.3056C154.526 48.5852 154.027 47.9888 153.36 47.6334C152.68 47.2836 151.908 47.213 151.187 47.4437C151.049 47.4636 150.927 47.52 150.817 47.5708Z",fill:"#86E29B"}),n.default.createElement("path",{d:"M18.3624 73.9241C18.3015 73.9523 18.2407 73.9805 18.1798 74.0087C17.0495 74.4733 15.8073 74.4728 14.6751 74.0078C12.3517 73.0461 11.2387 70.3567 12.2031 68.0341C13.1676 65.7115 15.8598 64.5971 18.1833 65.5589C19.3155 66.0239 20.1951 66.9013 20.6591 68.0304C21.123 69.1595 21.1215 70.4008 20.6552 71.5326C20.2207 72.6053 19.4093 73.4391 18.3624 73.9241ZM15.0433 66.7921C14.3129 67.1305 13.713 67.7186 13.3766 68.5243C12.6776 70.207 13.4834 72.1377 15.1666 72.8348C15.9849 73.1647 16.8786 73.1789 17.6933 72.831C18.5136 72.4952 19.1388 71.8659 19.4818 71.0424C19.8126 70.2245 19.8276 69.3313 19.4801 68.5175C19.1448 67.6981 18.5155 67.0739 17.6917 66.7319C16.8144 66.3703 15.8589 66.4142 15.0433 66.7921Z",fill:"#FFB0EB"}),n.default.createElement("path",{d:"M116.617 37.3839C117.397 37.0226 117.736 36.0982 117.375 35.3192C117.015 34.5402 116.09 34.2016 115.31 34.5629C114.53 34.9243 114.19 35.8487 114.551 36.6277C114.912 37.4067 115.837 37.7453 116.617 37.3839Z",fill:"url(#paint0_linear)"}),n.default.createElement("path",{d:"M55.1317 91.7213C55.9116 91.36 56.2512 90.4356 55.8903 89.6566C55.5294 88.8776 54.6046 88.539 53.8247 88.9003C53.0448 89.2617 52.7052 90.1861 53.0661 90.9651C53.427 91.7441 54.3518 92.0827 55.1317 91.7213Z",fill:"url(#paint1_linear)"}),n.default.createElement("path",{d:"M31.9932 126.235C32.7731 125.874 33.1127 124.95 32.7518 124.171C32.3909 123.392 31.4661 123.053 30.6863 123.414C29.9064 123.776 29.5667 124.7 29.9277 125.479C30.2886 126.258 31.2134 126.597 31.9932 126.235Z",fill:"url(#paint2_linear)"}),n.default.createElement("path",{d:"M119.43 132.589C120.21 132.228 120.55 131.304 120.189 130.525C119.828 129.746 118.903 129.407 118.123 129.768C117.344 130.13 117.004 131.054 117.365 131.833C117.726 132.612 118.651 132.951 119.43 132.589Z",fill:"url(#paint3_linear)"}),n.default.createElement("path",{d:"M44.7469 47.3835C46.0108 46.7979 46.5612 45.2997 45.9763 44.0372C45.3914 42.7747 43.8926 42.2259 42.6286 42.8115C41.3647 43.3971 40.8143 44.8953 41.3992 46.1578C41.9841 47.4203 43.4829 47.9691 44.7469 47.3835Z",fill:"url(#paint4_linear)"}),n.default.createElement("path",{d:"M105.107 90.7857C106.371 90.2001 106.922 88.702 106.337 87.4394C105.752 86.1769 104.253 85.6282 102.989 86.2137C101.725 86.7993 101.175 88.2975 101.76 89.56C102.344 90.8226 103.843 91.3713 105.107 90.7857Z",fill:"url(#paint5_linear)"}),n.default.createElement("path",{d:"M95.5179 172.376C96.7818 171.791 97.3322 170.293 96.7473 169.03C96.1624 167.767 94.6636 167.219 93.3996 167.804C92.1357 168.39 91.5853 169.888 92.1702 171.151C92.7551 172.413 94.2539 172.962 95.5179 172.376Z",fill:"url(#paint6_linear)"}),n.default.createElement("path",{d:"M165.098 102.367C166.362 101.781 166.912 100.283 166.327 99.0205C165.742 97.758 164.244 97.2092 162.98 97.7948C161.716 98.3804 161.165 99.8786 161.75 101.141C162.335 102.404 163.834 102.952 165.098 102.367Z",fill:"url(#paint7_linear)"}),n.default.createElement("defs",null,n.default.createElement("linearGradient",{id:"paint0_linear",x1:"114.554",y1:"36.6326",x2:"117.379",y2:"35.3237",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint1_linear",x1:"53.0688",y1:"90.97",x2:"55.8937",y2:"89.6611",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint2_linear",x1:"29.9283",y1:"125.483",x2:"32.7532",y2:"124.174",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint3_linear",x1:"117.365",y1:"131.837",x2:"120.19",y2:"130.528",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint4_linear",x1:"41.4394",y1:"46.2402",x2:"45.947",y2:"43.9537",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint5_linear",x1:"101.8",y1:"89.6425",x2:"106.307",y2:"87.356",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint6_linear",x1:"92.2104",y1:"171.233",x2:"96.718",y2:"168.947",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint7_linear",x1:"161.79",y1:"101.224",x2:"166.298",y2:"98.937",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"}))))),n.default.createElement("div",{className:"loading-swaps-quotes__background-2","data-testid":"loading-swaps-quotes-background-2"},n.default.createElement("svg",{width:"195",height:"205",viewBox:"0 0 195 205",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M29.84 121.982C30.0408 121.969 30.245 122.01 30.4258 122.106L46.4233 130.275C46.8125 130.478 47.0536 130.893 47.0402 131.324C47.0143 131.768 46.7423 132.148 46.3356 132.308L24.5484 140.937C24.1417 141.097 23.6789 141.005 23.3642 140.702C23.0495 140.4 22.9398 139.937 23.0753 139.525L28.8651 122.727C28.9671 122.426 29.2065 122.169 29.5086 122.056C29.614 122.023 29.7194 121.989 29.84 121.982ZM43.1981 131.148L30.5607 124.689L25.9884 137.96L43.1981 131.148Z",fill:"#75C4FD"}),n.default.createElement("path",{d:"M168.214 54.3381C168.442 54.3238 168.674 54.3764 168.869 54.485C169.217 54.6781 169.44 55.0266 169.465 55.4145L170.59 68.4358C170.631 68.8763 170.416 69.3061 170.041 69.5444C169.666 69.7827 169.182 69.7862 168.805 69.5681L156.14 62.2246C155.763 62.0065 155.535 61.5911 155.548 61.1472C155.56 60.7033 155.818 60.3112 156.209 60.1122L167.75 54.4343C167.908 54.3841 168.067 54.3473 168.214 54.3381ZM168.027 66.3674L167.248 57.3661L159.267 61.2902L168.027 66.3674Z",fill:"#FFB0EB"}),n.default.createElement("path",{d:"M88.6283 16.6885C88.8694 16.6734 89.1154 16.7385 89.3255 16.873L100.21 24.1133C100.561 24.3464 100.762 24.7635 100.708 25.1832C100.653 25.6028 100.381 25.969 99.9864 26.1146L86.3391 31.4276C85.9449 31.5731 85.5106 31.5064 85.1842 31.2314C84.8712 30.9556 84.7239 30.5352 84.8192 30.1264L87.5815 17.5731C87.666 17.2053 87.9162 16.9076 88.2702 16.7646C88.3882 16.7169 88.5078 16.696 88.6283 16.6885ZM97.1342 24.7894L89.4471 19.6718L87.5021 28.5349L97.1342 24.7894Z",fill:"url(#paint0_linear)"}),n.default.createElement("path",{d:"M117.145 183.156C116.944 183.289 116.698 183.356 116.449 183.344L103.402 182.517C102.982 182.49 102.6 182.229 102.437 181.839C102.274 181.448 102.327 180.995 102.596 180.671L111.758 169.247C112.027 168.923 112.436 168.764 112.856 168.839C113.265 168.921 113.603 169.212 113.725 169.614L117.609 181.866C117.72 182.227 117.652 182.61 117.417 182.911C117.339 183.011 117.246 183.089 117.145 183.156ZM105.728 180.393L114.944 180.981L112.197 172.333L105.728 180.393Z",fill:"url(#paint1_linear)"}),n.default.createElement("path",{d:"M38.0816 74.0208C38.1217 74.0183 38.1485 74.0166 38.1887 74.0141C42.3831 73.805 45.9744 77.0577 46.1831 81.2474C46.3919 85.4371 43.1484 89.0241 38.9407 89.234C34.7463 89.4431 31.1549 86.1904 30.9462 82.0007C30.7391 77.8377 33.9307 74.2809 38.0816 74.0208ZM38.9104 87.2486C41.9767 87.0565 44.3523 84.4236 44.1997 81.3448C44.0455 78.2393 41.3949 75.8407 38.2859 75.9952C35.1761 76.1364 32.7753 78.7977 32.9296 81.9033C33.0838 85.0088 35.7344 87.4073 38.8434 87.2528C38.8568 87.252 38.8836 87.2503 38.9104 87.2486Z",fill:"#86E29B"}),n.default.createElement("path",{d:"M162.178 97.8401C162.218 97.8376 162.245 97.8359 162.285 97.8334C166.48 97.6243 170.071 100.877 170.28 105.067C170.489 109.256 167.245 112.843 163.037 113.053C158.843 113.262 155.252 110.01 155.043 105.82C154.836 101.657 158.027 98.1002 162.178 97.8401ZM163.007 111.068C166.073 110.876 168.449 108.243 168.296 105.164C168.142 102.059 165.492 99.6601 162.383 99.8146C159.273 99.9557 156.872 102.617 157.026 105.723C157.181 108.828 159.831 111.227 162.94 111.072C162.953 111.071 162.98 111.07 163.007 111.068Z",fill:"#86E29B"}),n.default.createElement("defs",null,n.default.createElement("linearGradient",{id:"paint0_linear",x1:"100.609",y1:"23.2611",x2:"84.4152",y2:"24.2757",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#FFE466"}),n.default.createElement("stop",{offset:"1",stopColor:"#FFAFEA"})),n.default.createElement("linearGradient",{id:"paint1_linear",x1:"103.812",y1:"183.939",x2:"116.959",y2:"174.66",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"0.0928503",stopColor:"#81C2F6"}),n.default.createElement("stop",{offset:"1",stopColor:"#F0B8BD"}))))))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/loading-swaps-quotes/background-animation.js"}],[6940,{"./loading-swaps-quotes":6941},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./loading-swaps-quotes"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/loading-swaps-quotes/index.js"}],[6941,{"../../../../shared/constants/metametrics":5260,"../../../../shared/modules/selectors":5319,"../../../components/component-library":5806,"../../../components/ui/mascot":6148,"../../../contexts/i18n":6211,"../../../contexts/metametrics":6214,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"../../../selectors/selectors":6993,"../swaps-footer":6968,"./background-animation":6939,events:3868,lodash:4380,"lodash/isEqual":4368,"prop-types":4528,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=_;var a=E(e("events")),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=x(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),o=e("react-redux"),i=E(e("prop-types")),l=e("lodash"),s=e("react-router-dom"),u=E(e("lodash/isEqual")),c=e("../../../ducks/swaps/swaps"),d=e("../../../selectors/selectors"),p=e("../../../../shared/modules/selectors"),f=e("../../../contexts/i18n"),m=e("../../../contexts/metametrics"),h=E(e("../../../components/ui/mascot")),b=e("../../../../shared/constants/metametrics"),g=E(e("../swaps-footer")),y=e("../../../components/component-library"),v=e("../../../helpers/constants/design-system"),w=E(e("./background-animation"));function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(x=function(e){return e?r:t})(e)}function E(e){return e&&e.__esModule?e:{default:e}}function _({aggregatorMetadata:e,loadingComplete:t,onDone:r}){var i,x;const E=(0,n.useContext)(f.I18nContext),_=(0,n.useContext)(m.MetaMetricsContext),C=(0,o.useDispatch)(),T=(0,s.useHistory)(),k=(0,n.useRef)(new a.default),S=(0,o.useSelector)(c.getFetchParams,u.default),R=(0,o.useSelector)(c.getQuotesFetchStartTime),P=(0,o.useSelector)(d.isHardwareWallet),M=(0,o.useSelector)(d.getHardwareWalletType),O=(0,o.useSelector)(p.getSmartTransactionsOptInStatusForMetrics),D=(0,o.useSelector)(p.getSmartTransactionsEnabled),j=(0,o.useSelector)(c.getCurrentSmartTransactionsEnabled),A={event:"Quotes Request Cancelled",category:b.MetaMetricsEventCategory.Swaps,sensitiveProperties:{token_from:null==S||null===(i=S.sourceTokenInfo)||void 0===i?void 0:i.symbol,token_from_amount:null==S?void 0:S.value,request_type:null==S?void 0:S.balanceError,token_to:null==S||null===(x=S.destinationTokenInfo)||void 0===x?void 0:x.symbol,slippage:null==S?void 0:S.slippage,custom_slippage:2!==(null==S?void 0:S.slippage),response_time:Date.now()-R,is_hardware_wallet:P,hardware_wallet_type:M,stx_enabled:D,current_stx_enabled:j,stx_user_opt_in:O}},[I]=(0,n.useState)((()=>(0,l.shuffle)(Object.keys(e)))),q=I.length,N=(0,n.useRef)(),L=N.current,[F,W]=(0,n.useState)(0),[B,U]=(0,n.useState)(null);return(0,n.useEffect)((()=>{let e;e=t?20:500+Math.floor(1500*Math.random());const a=setTimeout((()=>{F{if(L){const{top:e,left:t,width:r,height:a}=L.getBoundingClientRect();U({x:t+r/2,y:e+a/2})}}),[L]),n.default.createElement("div",{className:"loading-swaps-quotes"},n.default.createElement("div",{className:"loading-swaps-quotes__content"},n.default.createElement(n.default.Fragment,null,n.default.createElement(y.Text,{variant:v.TextVariant.bodyXs,"data-testid":"loading-swaps-quotes-quote-counter",color:v.TextColor.textAlternative,marginTop:1,display:v.Display.Flex,justifyContent:v.JustifyContent.center,width:v.BlockSize.Full,marginBottom:1},n.default.createElement("span",null,E("swapFetchingQuoteNofN",[Math.min(F+1,q),q]))),n.default.createElement(y.Text,{variant:v.TextVariant.headingSm,"data-testid":"loading-swaps-quotes-quote-name-check",color:v.TextColor.textDefault,display:v.Display.Flex,justifyContent:v.JustifyContent.center,width:v.BlockSize.Full,textTransform:v.TextTransform.Capitalize},n.default.createElement("span",null,E("swapFetchingQuotes"))),n.default.createElement("div",{className:"loading-swaps-quotes__loading-bar-container"},n.default.createElement("div",{className:"loading-swaps-quotes__loading-bar",style:{width:100/q*F+"%"}}))),n.default.createElement("div",{className:"loading-swaps-quotes__animation"},n.default.createElement(w.default,null),n.default.createElement("div",{className:"loading-swaps-quotes__mascot-container",ref:N},n.default.createElement(h.default,{animationEventEmitter:k.current,width:"90",height:"90",lookAtTarget:B})))),n.default.createElement(g.default,{submitText:E("back"),onSubmit:async()=>{_(A),await C((0,c.navigateBackToPrepareSwap)(T))},hideCancel:!0}))}_.propTypes={loadingComplete:i.default.bool.isRequired,onDone:i.default.func.isRequired,aggregatorMetadata:i.default.objectOf(i.default.shape({title:i.default.string,color:i.default.string,icon:i.default.string}))}}}},{package:"$root$",file:"ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js"}],[6942,{"../../../components/ui/mascot":6148,events:3868,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){const e=(0,n.useRef)(new a.default);return n.default.createElement("div",{className:"mascot-background-animation__animation"},n.default.createElement("div",{className:"mascot-background-animation__background-1","data-testid":"mascot-background-animation-background-1"},n.default.createElement("svg",{width:"193",height:"190",viewBox:"0 0 193 190",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M153.753 53.876C153.595 53.9493 153.419 54.0161 153.25 54.0651C151.081 54.7451 148.777 53.538 148.086 51.3768C147.763 50.3298 147.851 49.2109 148.361 48.2363C148.87 47.2618 149.732 46.5374 150.78 46.2144C151.828 45.8913 152.948 45.9781 153.923 46.4865C154.898 46.9949 155.622 47.8557 155.944 48.9027C156.567 50.918 155.592 53.0243 153.753 53.876ZM150.817 47.5708C150.245 47.8359 149.782 48.2721 149.495 48.8334C149.144 49.5127 149.073 50.2843 149.303 51.0047C149.774 52.4998 151.375 53.3384 152.877 52.8787C154.374 52.4069 155.215 50.8063 154.756 49.3056C154.526 48.5852 154.027 47.9888 153.36 47.6334C152.68 47.2836 151.908 47.213 151.187 47.4437C151.049 47.4636 150.927 47.52 150.817 47.5708Z",fill:"#86E29B"}),n.default.createElement("path",{d:"M18.3624 73.9241C18.3015 73.9523 18.2407 73.9805 18.1798 74.0087C17.0495 74.4733 15.8073 74.4728 14.6751 74.0078C12.3517 73.0461 11.2387 70.3567 12.2031 68.0341C13.1676 65.7115 15.8598 64.5971 18.1833 65.5589C19.3155 66.0239 20.1951 66.9013 20.6591 68.0304C21.123 69.1595 21.1215 70.4008 20.6552 71.5326C20.2207 72.6053 19.4093 73.4391 18.3624 73.9241ZM15.0433 66.7921C14.3129 67.1305 13.713 67.7186 13.3766 68.5243C12.6776 70.207 13.4834 72.1377 15.1666 72.8348C15.9849 73.1647 16.8786 73.1789 17.6933 72.831C18.5136 72.4952 19.1388 71.8659 19.4818 71.0424C19.8126 70.2245 19.8276 69.3313 19.4801 68.5175C19.1448 67.6981 18.5155 67.0739 17.6917 66.7319C16.8144 66.3703 15.8589 66.4142 15.0433 66.7921Z",fill:"#FFB0EB"}),n.default.createElement("path",{d:"M116.617 37.3839C117.397 37.0226 117.736 36.0982 117.375 35.3192C117.015 34.5402 116.09 34.2016 115.31 34.5629C114.53 34.9243 114.19 35.8487 114.551 36.6277C114.912 37.4067 115.837 37.7453 116.617 37.3839Z",fill:"url(#paint0_linear)"}),n.default.createElement("path",{d:"M55.1317 91.7213C55.9116 91.36 56.2512 90.4356 55.8903 89.6566C55.5294 88.8776 54.6046 88.539 53.8247 88.9003C53.0448 89.2617 52.7052 90.1861 53.0661 90.9651C53.427 91.7441 54.3518 92.0827 55.1317 91.7213Z",fill:"url(#paint1_linear)"}),n.default.createElement("path",{d:"M31.9932 126.235C32.7731 125.874 33.1127 124.95 32.7518 124.171C32.3909 123.392 31.4661 123.053 30.6863 123.414C29.9064 123.776 29.5667 124.7 29.9277 125.479C30.2886 126.258 31.2134 126.597 31.9932 126.235Z",fill:"url(#paint2_linear)"}),n.default.createElement("path",{d:"M119.43 132.589C120.21 132.228 120.55 131.304 120.189 130.525C119.828 129.746 118.903 129.407 118.123 129.768C117.344 130.13 117.004 131.054 117.365 131.833C117.726 132.612 118.651 132.951 119.43 132.589Z",fill:"url(#paint3_linear)"}),n.default.createElement("path",{d:"M44.7469 47.3835C46.0108 46.7979 46.5612 45.2997 45.9763 44.0372C45.3914 42.7747 43.8926 42.2259 42.6286 42.8115C41.3647 43.3971 40.8143 44.8953 41.3992 46.1578C41.9841 47.4203 43.4829 47.9691 44.7469 47.3835Z",fill:"url(#paint4_linear)"}),n.default.createElement("path",{d:"M105.107 90.7857C106.371 90.2001 106.922 88.702 106.337 87.4394C105.752 86.1769 104.253 85.6282 102.989 86.2137C101.725 86.7993 101.175 88.2975 101.76 89.56C102.344 90.8226 103.843 91.3713 105.107 90.7857Z",fill:"url(#paint5_linear)"}),n.default.createElement("path",{d:"M95.5179 172.376C96.7818 171.791 97.3322 170.293 96.7473 169.03C96.1624 167.767 94.6636 167.219 93.3996 167.804C92.1357 168.39 91.5853 169.888 92.1702 171.151C92.7551 172.413 94.2539 172.962 95.5179 172.376Z",fill:"url(#paint6_linear)"}),n.default.createElement("path",{d:"M165.098 102.367C166.362 101.781 166.912 100.283 166.327 99.0205C165.742 97.758 164.244 97.2092 162.98 97.7948C161.716 98.3804 161.165 99.8786 161.75 101.141C162.335 102.404 163.834 102.952 165.098 102.367Z",fill:"url(#paint7_linear)"}),n.default.createElement("defs",null,n.default.createElement("linearGradient",{id:"paint0_linear",x1:"114.554",y1:"36.6326",x2:"117.379",y2:"35.3237",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint1_linear",x1:"53.0688",y1:"90.97",x2:"55.8937",y2:"89.6611",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint2_linear",x1:"29.9283",y1:"125.483",x2:"32.7532",y2:"124.174",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint3_linear",x1:"117.365",y1:"131.837",x2:"120.19",y2:"130.528",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint4_linear",x1:"41.4394",y1:"46.2402",x2:"45.947",y2:"43.9537",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint5_linear",x1:"101.8",y1:"89.6425",x2:"106.307",y2:"87.356",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint6_linear",x1:"92.2104",y1:"171.233",x2:"96.718",y2:"168.947",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint7_linear",x1:"161.79",y1:"101.224",x2:"166.298",y2:"98.937",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"}))))),n.default.createElement("div",{className:"mascot-background-animation__background-2","data-testid":"mascot-background-animation-background-2"},n.default.createElement("svg",{width:"195",height:"205",viewBox:"0 0 195 205",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M29.84 121.982C30.0408 121.969 30.245 122.01 30.4258 122.106L46.4233 130.275C46.8125 130.478 47.0536 130.893 47.0402 131.324C47.0143 131.768 46.7423 132.148 46.3356 132.308L24.5484 140.937C24.1417 141.097 23.6789 141.005 23.3642 140.702C23.0495 140.4 22.9398 139.937 23.0753 139.525L28.8651 122.727C28.9671 122.426 29.2065 122.169 29.5086 122.056C29.614 122.023 29.7194 121.989 29.84 121.982ZM43.1981 131.148L30.5607 124.689L25.9884 137.96L43.1981 131.148Z",fill:"#75C4FD"}),n.default.createElement("path",{d:"M168.214 54.3381C168.442 54.3238 168.674 54.3764 168.869 54.485C169.217 54.6781 169.44 55.0266 169.465 55.4145L170.59 68.4358C170.631 68.8763 170.416 69.3061 170.041 69.5444C169.666 69.7827 169.182 69.7862 168.805 69.5681L156.14 62.2246C155.763 62.0065 155.535 61.5911 155.548 61.1472C155.56 60.7033 155.818 60.3112 156.209 60.1122L167.75 54.4343C167.908 54.3841 168.067 54.3473 168.214 54.3381ZM168.027 66.3674L167.248 57.3661L159.267 61.2902L168.027 66.3674Z",fill:"#FFB0EB"}),n.default.createElement("path",{d:"M88.6283 16.6885C88.8694 16.6734 89.1154 16.7385 89.3255 16.873L100.21 24.1133C100.561 24.3464 100.762 24.7635 100.708 25.1832C100.653 25.6028 100.381 25.969 99.9864 26.1146L86.3391 31.4276C85.9449 31.5731 85.5106 31.5064 85.1842 31.2314C84.8712 30.9556 84.7239 30.5352 84.8192 30.1264L87.5815 17.5731C87.666 17.2053 87.9162 16.9076 88.2702 16.7646C88.3882 16.7169 88.5078 16.696 88.6283 16.6885ZM97.1342 24.7894L89.4471 19.6718L87.5021 28.5349L97.1342 24.7894Z",fill:"url(#paint0_linear)"}),n.default.createElement("path",{d:"M117.145 183.156C116.944 183.289 116.698 183.356 116.449 183.344L103.402 182.517C102.982 182.49 102.6 182.229 102.437 181.839C102.274 181.448 102.327 180.995 102.596 180.671L111.758 169.247C112.027 168.923 112.436 168.764 112.856 168.839C113.265 168.921 113.603 169.212 113.725 169.614L117.609 181.866C117.72 182.227 117.652 182.61 117.417 182.911C117.339 183.011 117.246 183.089 117.145 183.156ZM105.728 180.393L114.944 180.981L112.197 172.333L105.728 180.393Z",fill:"url(#paint1_linear)"}),n.default.createElement("path",{d:"M38.0816 74.0208C38.1217 74.0183 38.1485 74.0166 38.1887 74.0141C42.3831 73.805 45.9744 77.0577 46.1831 81.2474C46.3919 85.4371 43.1484 89.0241 38.9407 89.234C34.7463 89.4431 31.1549 86.1904 30.9462 82.0007C30.7391 77.8377 33.9307 74.2809 38.0816 74.0208ZM38.9104 87.2486C41.9767 87.0565 44.3523 84.4236 44.1997 81.3448C44.0455 78.2393 41.3949 75.8407 38.2859 75.9952C35.1761 76.1364 32.7753 78.7977 32.9296 81.9033C33.0838 85.0088 35.7344 87.4073 38.8434 87.2528C38.8568 87.252 38.8836 87.2503 38.9104 87.2486Z",fill:"#86E29B"}),n.default.createElement("path",{d:"M162.178 97.8401C162.218 97.8376 162.245 97.8359 162.285 97.8334C166.48 97.6243 170.071 100.877 170.28 105.067C170.489 109.256 167.245 112.843 163.037 113.053C158.843 113.262 155.252 110.01 155.043 105.82C154.836 101.657 158.027 98.1002 162.178 97.8401ZM163.007 111.068C166.073 110.876 168.449 108.243 168.296 105.164C168.142 102.059 165.492 99.6601 162.383 99.8146C159.273 99.9557 156.872 102.617 157.026 105.723C157.181 108.828 159.831 111.227 162.94 111.072C162.953 111.071 162.98 111.07 163.007 111.068Z",fill:"#86E29B"}),n.default.createElement("defs",null,n.default.createElement("linearGradient",{id:"paint0_linear",x1:"100.609",y1:"23.2611",x2:"84.4152",y2:"24.2757",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#FFE466"}),n.default.createElement("stop",{offset:"1",stopColor:"#FFAFEA"})),n.default.createElement("linearGradient",{id:"paint1_linear",x1:"103.812",y1:"183.939",x2:"116.959",y2:"174.66",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"0.0928503",stopColor:"#81C2F6"}),n.default.createElement("stop",{offset:"1",stopColor:"#F0B8BD"}))))),n.default.createElement("div",{className:"mascot-background-animation__mascot-container","data-testid":"mascot-background-animation-mascot-container"},n.default.createElement(o.default,{animationEventEmitter:e.current,width:"42",height:"42",followMouse:!1})))};var a=l(e("events")),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),o=l(e("../../../components/ui/mascot"));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}function l(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/pages/swaps/mascot-background-animation/mascot-background-animation.js"}],[6943,{"../../../../shared/constants/swaps":5274,"../../../components/component-library":5806,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/routes":6254,"../../../store/actions":7e3,"../swaps-footer":6968,"prop-types":4528,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=g;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=b(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=e("react-router-dom"),i=h(e("prop-types")),l=e("../../../contexts/i18n"),s=e("../../../store/actions"),u=h(e("../../../components/ui/box")),c=e("../../../helpers/constants/design-system"),d=e("../../../components/component-library"),p=e("../../../helpers/constants/routes"),f=h(e("../swaps-footer")),m=e("../../../../shared/constants/swaps");function h(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(b=function(e){return e?r:t})(e)}function g({notificationKey:e}){const t=(0,a.useContext)(l.I18nContext),r=(0,o.useHistory)(),i=(0,n.useDispatch)();let h="",b="",g="";return e===m.QUOTES_EXPIRED_ERROR&&(h=t("swapAreYouStillThere"),b=t("swapAreYouStillThereDescription"),g=t("swapShowLatestQuotes")),a.default.createElement("div",{className:"notification-page"},a.default.createElement(u.default,{alignItems:c.AlignItems.center,display:c.DISPLAY.FLEX,flexDirection:c.FLEX_DIRECTION.COLUMN,marginTop:10,marginLeft:4,marginRight:4,textAlign:c.TEXT_ALIGN.CENTER,className:"notification-page__content"},a.default.createElement(u.default,{marginTop:8,marginBottom:4},a.default.createElement(d.Icon,{name:d.IconName.Warning,color:c.IconColor.iconMuted,className:"notification-page__warning-icon"})),a.default.createElement(d.Text,{variant:c.TextVariant.bodyLgMedium,as:"h2"},h),a.default.createElement(d.Text,{variant:c.TextVariant.bodyMd,as:"h6"},b)),a.default.createElement(f.default,{onSubmit:async()=>{await i((0,s.setSwapsErrorKey)("")),r.push(p.PREPARE_SWAP_ROUTE)},submitText:g,hideCancel:!0,showTermsOfService:!0}))}g.propTypes={notificationKey:i.default.oneOf([m.QUOTES_EXPIRED_ERROR])}}}},{package:"$root$",file:"ui/pages/swaps/notification-page/notification-page.js"}],[6944,{"../../../../shared/constants/common":5250,"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/network":5264,"../../../../shared/constants/swaps":5274,"../../../../shared/lib/swaps-utils":5288,"../../../../shared/lib/token-util":5290,"../../../../shared/lib/transactions-controller-utils":5292,"../../../../shared/modules/conversion.utils":5301,"../../../../shared/modules/selectors":5319,"../../../../shared/modules/selectors/networks":5320,"../../../../shared/modules/string-utils":5324,"../../../../shared/modules/swaps.utils":5325,"../../../components/component-library":5806,"../../../components/component-library/modal-content/deprecated":5816,"../../../components/component-library/modal-header/deprecated":5825,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../contexts/metametrics":6214,"../../../ducks/metamask/metamask":6236,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/routes":6254,"../../../helpers/utils/portfolio":6290,"../../../helpers/utils/util":6297,"../../../hooks/useEqualityCheck":6328,"../../../hooks/useEthFiatAmount":6329,"../../../hooks/usePrevious":6348,"../../../hooks/useTokenFiatAmount":6360,"../../../hooks/useTokenTracker":6363,"../../../hooks/useTokensToSearch":6364,"../../../selectors":6985,"../../../store/actionConstants":6999,"../../../store/actions":7e3,"../import-token":6936,"../list-with-search/list-with-search":6938,"../selected-token/selected-token":6958,"../swaps-banner-alert/swaps-banner-alert":6967,"../swaps-footer":6968,"../swaps.util":6970,"../transaction-settings/transaction-settings":6971,"./quotes-loading-animation":6945,"./review-quote":6946,"@metamask/etherscan-link":1752,"bignumber.js":3465,classnames:3584,lodash:4380,"prop-types":4528,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=ae;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=ee(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=J(e("bignumber.js")),o=J(e("prop-types")),i=e("react-redux"),l=e("lodash"),s=e("react-router-dom"),u=e("@metamask/etherscan-link"),c=J(e("classnames")),d=e("../../../contexts/metametrics"),p=e("../../../hooks/useTokensToSearch"),f=e("../../../hooks/useEqualityCheck"),m=e("../../../contexts/i18n"),h=e("../../../ducks/metamask/metamask"),b=J(e("../../../components/ui/box")),g=e("../../../helpers/constants/design-system"),y=e("../../../ducks/swaps/swaps"),v=e("../../../../shared/modules/selectors/networks"),w=e("../../../selectors"),x=e("../../../../shared/modules/selectors"),E=e("../../../../shared/modules/conversion.utils"),_=e("../../../helpers/utils/util"),C=e("../../../helpers/utils/portfolio"),T=e("../../../hooks/usePrevious"),k=e("../../../hooks/useTokenTracker"),S=e("../../../hooks/useTokenFiatAmount"),R=e("../../../hooks/useEthFiatAmount"),P=e("../../../../shared/modules/swaps.utils"),M=e("../../../../shared/constants/metametrics"),O=e("../../../../shared/constants/swaps"),D=e("../../../../shared/constants/common"),j=e("../../../store/actions"),A=e("../../../store/actionConstants"),I=e("../swaps.util"),q=e("../../../../shared/lib/token-util"),N=e("../../../../shared/modules/string-utils"),L=e("../../../../shared/lib/transactions-controller-utils"),F=e("../../../../shared/lib/swaps-utils"),W=e("../../../components/component-library"),B=e("../../../components/component-library/modal-content/deprecated"),U=e("../../../components/component-library/modal-header/deprecated"),$=e("../../../helpers/constants/routes"),z=J(e("../import-token")),G=J(e("../transaction-settings/transaction-settings")),H=J(e("../swaps-banner-alert/swaps-banner-alert")),V=J(e("../swaps-footer")),Q=J(e("../selected-token/selected-token")),X=J(e("../list-with-search/list-with-search")),Y=e("../../../../shared/constants/network"),Z=J(e("./quotes-loading-animation")),K=J(e("./review-quote"));function J(e){return e&&e.__esModule?e:{default:e}}function ee(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(ee=function(e){return e?r:t})(e)}function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;tde(!1),[fe,me]=(0,a.useState)(!1),he=()=>me(!1),[be,ge]=(0,a.useState)(!1),[ye,ve]=(0,a.useState)(null),[we,xe]=(0,a.useState)(""),[Ee,_e]=(0,a.useState)(""),[Ce,Te]=(0,a.useState)(0),[ke,Se]=(0,a.useState)(!1),[Re,Pe]=(0,a.useState)(!1),Me=(0,i.useSelector)(y.getIsFeatureFlagLoaded),Oe=(0,i.useSelector)(y.getBalanceError),De=(0,i.useSelector)(y.getFetchParams,l.isEqual),{sourceTokenInfo:je={},destinationTokenInfo:Ae={}}=(null==De?void 0:De.metaData)||{},Ie=(0,i.useSelector)(h.getTokens,l.isEqual),qe=(0,i.useSelector)(y.getTopAssets,l.isEqual),Ne=(0,i.useSelector)(y.getFromToken,l.isEqual),Le=(0,i.useSelector)(y.getFromTokenInputValue),Fe=(0,i.useSelector)(y.getFromTokenError),We=(0,i.useSelector)(y.getMaxSlippage),Be=(0,i.useSelector)(y.getToToken,l.isEqual)||Ae,Ue=(0,i.useSelector)(w.getSwapsDefaultToken,l.isEqual),$e=(0,i.useSelector)(v.getCurrentChainId),ze=(0,i.useSelector)(w.getRpcPrefsForCurrentProvider,i.shallowEqual),Ge=(0,i.useSelector)(w.getTokenList,l.isEqual),He=(0,i.useSelector)(y.getQuotes,l.isEqual),Ve=(0,i.useSelector)(y.getUsedQuote,l.isEqual),Qe=(0,i.useSelector)(y.getLatestAddedTokenTo,l.isEqual),Xe=Object.keys(He).length,Ye=Xe>0&&Ve,Ze=(0,i.useSelector)(y.getSwapsErrorKey),Ke=(0,i.useSelector)(y.getAggregatorMetadata,i.shallowEqual),Je=(0,i.useSelector)(y.getTransactionSettingsOpened,i.shallowEqual),et=Ke?Object.keys(Ke).length:0,tt=(0,i.useSelector)(w.getIsBridgeChain),rt=(0,i.useSelector)(w.getMetaMetricsId),at=(0,i.useSelector)(w.getTokenExchangeRates,l.isEqual),nt=(0,i.useSelector)(h.getConversionRate),ot=(0,i.useSelector)(w.isHardwareWallet),it=(0,i.useSelector)(w.getHardwareWalletType),lt=(0,i.useSelector)(x.getSmartTransactionsOptInStatusForMetrics),st=(0,i.useSelector)(x.getSmartTransactionsEnabled),ut=(0,i.useSelector)(y.getCurrentSmartTransactionsEnabled),ct=(0,i.useSelector)(x.getSmartTransactionsPreferenceEnabled)&&ut,dt=(0,i.useSelector)(w.getCurrentCurrency),pt=(0,i.useSelector)(y.getFetchingQuotes),ft=!pt&&Ye,mt=(0,i.useSelector)(w.getParticipateInMetaMetrics),ht=(0,i.useSelector)(w.getDataCollectionForMarketing),bt=(0,P.isSwapsDefaultTokenAddress)(null==je?void 0:je.address,$e)?Ue:je,{tokensWithBalances:gt}=(0,k.useTokenTracker)({tokens:Ie}),yt=!(0,P.isSwapsDefaultTokenAddress)(null==Ne?void 0:Ne.address,$e)&&null!=Ne&&Ne.balance?[Ne]:[],vt=(0,l.uniqBy)([...gt,...Ie,...yt],"address"),wt=(0,f.useEqualityCheck)(vt),xt=(0,p.getRenderableTokenData)(Ne||bt,at,nt,dt,$e,Ge),Et=(0,p.useTokensToSearch)({usersTokens:wt,topTokens:qe,shuffledTokensList:r,tokenBucketPriority:O.TokenBucketPriority.owned}),_t=(0,p.useTokensToSearch)({usersTokens:wt,topTokens:qe,shuffledTokensList:r,tokenBucketPriority:O.TokenBucketPriority.top}),Ct=Et.find((({address:e})=>(0,N.isEqualCaseInsensitive)(e,null==Be?void 0:Be.address)))||Be,Tt=(null==Ct?void 0:Ct.address)&&!(0,P.isSwapsDefaultTokenAddress)(null==Ct?void 0:Ct.address,$e),kt=Number((null==Ct?void 0:Ct.occurances)||(null==Ct?void 0:Ct.occurrences)||0),{address:St,symbol:Rt,string:Pt,decimals:Mt,balance:Ot}=xt||{},{address:Dt}=Ct||{},jt=Ot&&(0,L.calcTokenAmount)(Ot,Mt).toString(10),At=(0,T.usePrevious)(jt),It=(0,S.useTokenFiatAmount)(St,Le||0,Rt,{showFiat:!0},!0),qt=(0,R.useEthFiatAmount)(Le||0,{showFiat:!0},!0),Nt=(0,P.isSwapsDefaultTokenAddress)(St,$e)?qt:It,Lt=(0,a.useCallback)(((e,t)=>{J((0,y.setFromTokenInputValue)(e));const r=new n.default(e||0).gt(t||0);Oe!==r&&J((0,y.setBalanceError)(r)),J((0,y.setFromTokenError)(Ne&&(0,I.countDecimals)(e)>Ne.decimals?"tooManyDecimals":null))}),[J,Ne,Oe]);(0,a.useEffect)((()=>{let e;if(!ke)return void Te(0);e=ft?20:500+Math.floor(1500*Math.random());const t=setTimeout((()=>{Ce{await J((0,j.setBackgroundSwapRouteState)("")),Se(!1),Ze!==O.ERROR_FETCHING_QUOTES&&Ze!==O.QUOTES_NOT_AVAILABLE_ERROR||J((0,j.setSwapsErrorKey)(O.QUOTES_NOT_AVAILABLE_ERROR))})()}),e);return function(){clearTimeout(t)}}),[pt,Ce,ft,Xe,J,ee,Ze,et,ke]);const Ft=e=>{null!=e&&e.address&&!Nt&&null!==ne?(0,I.fetchTokenPrice)(e.address).then((e=>{null!==e&&e!==undefined&&oe(e)})):oe(null),null!=e&&e.address&&!wt.find((t=>(0,N.isEqualCaseInsensitive)(t.address,e.address)))&&(0,q.fetchTokenBalance)(e.address,t,global.ethereumProvider).then((t=>{if(null!=t&&t.balance){const r=t.balance.toString(10),a=(0,L.calcTokenAmount)(r,e.decimals);J((0,y.setSwapsFromToken)({...e,string:a.toString(10),balance:r}))}})),J((0,y.setSwapsFromToken)(e)),Lt(Le,e.string,e.decimals)},Wt=$e===Y.CHAIN_IDS.ZKSYNC_ERA?(0,u.getAccountLink)(Ct.address,$e,{blockExplorerUrl:D.CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[$e]??null}):(0,u.getTokenTrackerLink)(Ct.address,$e,null,null,{blockExplorerUrl:D.CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[$e]??null}),Bt=ze.blockExplorerUrl?D.CHAINID_DEFAULT_BLOCK_EXPLORER_HUMAN_READABLE_URL_MAP[$e]??o("etherscan"):o("etherscan"),{address:Ut}=Be||{},$t=(0,a.useCallback)((e=>{Qe&&e.address!==Ut&&J((0,j.ignoreTokens)({tokensToIgnore:Ut,dontShowLoadingIndicator:!0})),J((0,y.setSwapToToken)(e)),le(!1)}),[J,Qe,Ut]),zt=gt.find((e=>(0,N.isEqualCaseInsensitive)(e.address,null==Ne?void 0:Ne.address))),Gt=(0,T.usePrevious)(zt);(0,a.useEffect)((()=>{const e=!(0,P.isSwapsDefaultTokenAddress)(null==zt?void 0:zt.address,$e),t=(0,N.isEqualCaseInsensitive)(null==zt?void 0:zt.address,null==Gt?void 0:Gt.address),r=(null==zt?void 0:zt.balance)!==(null==Gt?void 0:Gt.balance);e&&t&&r&&J((0,y.setSwapsFromToken)({...Ne,balance:null==zt?void 0:zt.balance,string:null==zt?void 0:zt.string}))}),[J,zt,Gt,Ne,$e]),(0,a.useEffect)((()=>{(0,P.isSwapsDefaultTokenAddress)(null==Ne?void 0:Ne.address,$e)&&(null==Ne?void 0:Ne.balance)!==(0,E.hexToDecimal)(e)&&J((0,y.setSwapsFromToken)({...Ne,balance:(0,E.hexToDecimal)(e),string:(0,E.getValueFromWeiHex)({value:e,numberOfDecimals:4,toDenomination:"ETH"})}))}),[J,Ne,e,$e]),(0,a.useEffect)((()=>{null!=Ne&&Ne.symbol||null!=bt&&bt.symbol||J((0,y.setSwapsFromToken)(Ue))}),[]),(0,a.useEffect)((()=>{At!==jt&&Lt(Le,jt)}),[Lt,At,Le,jt]);const Ht=(0,a.useCallback)((()=>{ae({event:"Prepare Swap Page Loaded",category:M.MetaMetricsEventCategory.Swaps,sensitiveProperties:{is_hardware_wallet:ot,hardware_wallet_type:it,stx_enabled:st,current_stx_enabled:ut,stx_user_opt_in:lt}})}),[ae,ot,it,st,ut,lt]);(0,a.useEffect)((()=>{J((0,j.resetSwapsPostFetchState)()),J((0,y.setReviewSwapClickedTimestamp)()),Ht()}),[J,Ht]);const Vt=()=>a.default.createElement("a",{className:"prepare-swap-page__token-etherscan-link",key:"prepare-swap-page-etherscan-link",onClick:()=>{ae({event:M.MetaMetricsEventName.ExternalLinkClicked,category:M.MetaMetricsEventCategory.Swaps,properties:{link_type:M.MetaMetricsEventLinkType.TokenTracker,location:"Swaps Confirmation",url_domain:(0,_.getURLHostName)(Wt)}}),global.platform.openTab({url:Wt})},target:"_blank",rel:"noopener noreferrer"},Bt),Qt=`${o("balance")}: ${Pt||"0"}`,Xt=`${o("balance")}: ${(null==Ct?void 0:Ct.string)||"0"}`,Yt=(0,F.shouldEnableDirectWrapping)($e,St,Ct.address),Zt=Fe||!Me||!Number(Le)||!(null!=Ct&&Ct.address)||!St||Number(We)<0||Number(We)>O.MAX_ALLOWED_SLIPPAGE||Tt&&kt<2&&!ie;let Kt;(0,a.useEffect)((()=>{J((0,j.clearSwapsQuotes)()),J((0,j.stopPollingForQuotes)());return re=setTimeout((()=>{re=null,Zt||(ct&&((0,j.clearSmartTransactionFees)(),J({type:A.SET_SMART_TRANSACTIONS_ERROR,payload:null})),(async()=>{Se(!0),await J((0,y.fetchQuotesAndSetQuoteState)(ee,Le,We,ae,!0))})())}),1e3),()=>clearTimeout(re)}),[J,ee,We,ae,Zt,Le,St,Dt,lt,ct]),Kt=Ze&&Ze===O.QUOTES_NOT_AVAILABLE_ERROR?o("swapQuotesNotAvailableErrorTitle"):Zt?null!=Ct&&Ct.address&&St?o("swapEnterAmount"):o("swapSelectToken"):o("swapFetchingQuotes");const Jt=(0,a.useCallback)((e=>(0,N.isEqualCaseInsensitive)(e.address,St)),[St]),er=(0,a.useCallback)((e=>(0,N.isEqualCaseInsensitive)(e.address,null==Ct?void 0:Ct.address)),[null==Ct?void 0:Ct.address]),tr=!Ze&&!Zt&&Ye,rr=!Ze&&!Zt&&!Ye,ar=!Fe&&Oe&&Rt,nr=tt&&!tr&&!rr&&!Ye,or=1===kt;(0,a.useEffect)((()=>{Ze===O.QUOTES_EXPIRED_ERROR&&ee.push($.SWAPS_NOTIFICATION_ROUTE)}),[Ze,ee]),(0,a.useEffect)((()=>{rr&&ue("")}),[rr]);const ir={onImportTokenCloseClick:()=>{ge(!1)},onImportTokenClick:()=>{ae({event:"Token Imported",category:M.MetaMetricsEventCategory.Swaps,sensitiveProperties:{symbol:null==ye?void 0:ye.symbol,address:null==ye?void 0:ye.address,chain_id:$e,is_hardware_wallet:ot,hardware_wallet_type:it,stx_enabled:st,current_stx_enabled:ut,stx_user_opt_in:lt}}),null==$t||$t(ye),ve(null)},setIsImportTokenModalOpen:ge,tokenForImport:ye};let lr,sr,ur;se&&!Zt&&(lr=(0,I.formatSwapsValueForDisplay)(se),sr=(0,I.getClassNameForCharLength)(lr,"prepare-swap-page__receive-amount")),Le&&(ur=(0,I.getClassNameForCharLength)(Le,"prepare-swap-page__from-token-amount"));const cr=!(0,P.isSwapsDefaultTokenAddress)(St,$e),dr=Rt&&(ct||!ct&&cr)&&Ot>0,pr=!(0,P.isSwapsDefaultTokenAddress)(Ct.address,$e);return a.default.createElement("div",{className:"prepare-swap-page"},a.default.createElement("div",{className:"prepare-swap-page__content"},ye&&be&&a.default.createElement(z.default,te({isOpen:!0},ir)),a.default.createElement(W.Modal,{onClose:pe,isOpen:ce,isClosedOnOutsideClick:!0,isClosedOnEscapeKey:!0,className:"mm-modal__custom-scrollbar"},a.default.createElement(W.ModalOverlay,null),a.default.createElement(B.ModalContent,null,a.default.createElement(U.ModalHeader,{onClose:pe},o("swapSwapTo")),a.default.createElement(b.default,{paddingTop:10,paddingRight:0,paddingBottom:0,paddingLeft:0,display:g.DISPLAY.FLEX},a.default.createElement(X.default,{selectedItem:Ct,itemsToSearch:_t,onClickItem:e=>{null==$t||$t(e),pe()},maxListItems:30,searchQuery:Ee,setSearchQuery:_e,hideItemIf:Jt,shouldSearchForImports:!0,onOpenImportTokenModalClick:e=>{ve(e),ge(!0),pe(),_e("")}})))),a.default.createElement(W.Modal,{onClose:he,isOpen:fe,isClosedOnOutsideClick:!0,isClosedOnEscapeKey:!0,className:"mm-modal__custom-scrollbar"},a.default.createElement(W.ModalOverlay,null),a.default.createElement(B.ModalContent,null,a.default.createElement(U.ModalHeader,{onClose:he},o("swapSwapFrom")),a.default.createElement(b.default,{paddingTop:10,paddingRight:0,paddingBottom:0,paddingLeft:0,display:g.DISPLAY.FLEX},a.default.createElement(X.default,{selectedItem:xt,itemsToSearch:Et,onClickItem:e=>{null==Ft||Ft(e),he()},maxListItems:30,searchQuery:we,setSearchQuery:xe,hideItemIf:er})))),a.default.createElement("div",{className:"prepare-swap-page__swap-from-content"},a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.spaceBetween,alignItems:g.AlignItems.center},a.default.createElement(Q.default,{onClick:()=>me(!0),onClose:he,selectedToken:xt,testId:"prepare-swap-page-swap-from"}),a.default.createElement(b.default,{display:g.DISPLAY.FLEX,alignItems:g.AlignItems.center},a.default.createElement(W.TextField,{className:(0,c.default)("prepare-swap-page__from-token-amount",{[ur]:ur}),size:W.TextFieldSize.Sm,placeholder:"0",onChange:e=>{e.stopPropagation();const t="."===e.target.value?"0.":e.target.value;""===t||/^(\.\d+|\d+(\.\d+)?|\d+\.)$/u.test(t)?Lt(t,jt):Lt(Le||"",jt)},value:Le,truncate:!1,testId:"prepare-swap-page-from-token-amount"}))),a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.spaceBetween,alignItems:g.AlignItems.stretch},a.default.createElement("div",{className:"prepare-swap-page__balance-message"},Rt&&Qt,dr&&a.default.createElement("div",{className:"prepare-swap-page__max-balance","data-testid":"prepare-swap-page-max-balance",onClick:()=>Lt(jt||"0",jt)},o("max"))),Le&&Nt&&a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.flexEnd,alignItems:g.AlignItems.flexEnd},a.default.createElement(W.Text,{variant:g.TextVariant.bodySm,color:g.TextColor.textAlternative},Nt))),ar&&a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.flexStart},a.default.createElement(W.Text,{variant:g.TextVariant.bodySmBold,color:g.TextColor.textAlternative,marginTop:0},o("swapsNotEnoughToken",[Rt]))),Fe&&a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.flexStart},a.default.createElement(W.Text,{variant:g.TextVariant.bodySmBold,color:g.TextColor.textAlternative,marginTop:0},o("swapTooManyDecimalsError",[Rt,Mt]))),a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.center},a.default.createElement("div",{className:(0,c.default)("prepare-swap-page__switch-tokens",{"prepare-swap-page__switch-tokens--rotate":Re,"prepare-swap-page__switch-tokens--disabled":rr}),"data-testid":"prepare-swap-page-switch-tokens",onClick:()=>{rr||($t(xt),Ft(Ct),Pe(!Re))},title:o("swapSwapSwitch")},a.default.createElement(W.Icon,{name:W.IconName.Arrow2Down,size:W.IconSize.Lg})))),a.default.createElement("div",{className:"prepare-swap-page__swap-to-content"},a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.spaceBetween,alignItems:g.AlignItems.center},a.default.createElement(Q.default,{onClick:()=>de(!0),onClose:pe,selectedToken:Ct,testId:"prepare-swap-page-swap-to"}),a.default.createElement(b.default,{display:g.DISPLAY.FLEX,alignItems:g.AlignItems.center,marginLeft:2,className:"prepare-swap-page__receive-amount-container"},a.default.createElement(W.Text,{as:"h6","data-testid":"prepare-swap-page-receive-amount",className:(0,c.default)("prepare-swap-page__receive-amount",{[sr]:sr})},lr))),a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.spaceBetween,alignItems:g.AlignItems.stretch},a.default.createElement("div",{className:"prepare-swap-page__balance-message"},(null==Ct?void 0:Ct.string)&&Xt)),a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.spaceBetween,alignItems:g.AlignItems.stretch},a.default.createElement("div",{className:"prepare-swap-page__balance-message"},Ct&&!(0,l.isEmpty)(Ct)&&pr&&o("swapTokenVerifiedSources",[kt,a.default.createElement(Vt,{key:"block-explorer-link"})])))),nr&&a.default.createElement(W.ButtonLink,{endIconName:W.IconName.Export,endIconProps:{size:W.IconSize.Xs},variant:g.TextVariant.bodySm,marginTop:2,fontWeight:g.FontWeight.Normal,onClick:()=>{const e=(0,C.getPortfolioUrl)("bridge","ext_bridge_prepare_swap_link",rt,mt,ht);global.platform.openTab({url:`${e}&token=${St}`}),ae({category:M.MetaMetricsEventCategory.Swaps,event:M.MetaMetricsEventName.BridgeLinkClicked,properties:{location:"Swaps",text:"Swap across networks with MetaMask Portfolio",chain_id:$e,token_symbol:Rt}})},target:"_blank","data-testid":"prepare-swap-page-cross-chain-swaps-link"},o("crossChainSwapsLink")),!tr&&Tt&&kt<2&&a.default.createElement(b.default,{display:g.DISPLAY.FLEX,marginTop:2},a.default.createElement(W.BannerAlert,{severity:or?g.SEVERITIES.WARNING:g.SEVERITIES.DANGER,title:o(or?"swapTokenVerifiedOn1SourceTitle":"swapTokenAddedManuallyTitle"),titleProps:{"data-testid":"swaps-banner-title"},width:g.BLOCK_SIZES.FULL},a.default.createElement(b.default,null,a.default.createElement(W.Text,{variant:g.TextVariant.bodyMd,as:"h6","data-testid":"mm-banner-alert-notification-text"},or?o("swapTokenVerifiedOn1SourceDescription",[null==Ct?void 0:Ct.symbol,a.default.createElement(Vt,{key:"block-explorer-link"})]):o("swapTokenAddedManuallyDescription",[a.default.createElement(Vt,{key:"block-explorer-link"})])),!ie&&a.default.createElement(W.ButtonLink,{size:W.ButtonLinkSize.Inherit,textProps:{variant:g.TextVariant.bodyMd,alignItems:g.AlignItems.flexStart},onClick:e=>{e.preventDefault(),le(!0)}},o("swapContinueSwapping"))))),Ze&&a.default.createElement(b.default,{display:g.DISPLAY.FLEX,marginTop:2},a.default.createElement(H.default,{swapsErrorKey:Ze,currentSlippage:We})),Je&&!Yt&&a.default.createElement(G.default,{onSelect:e=>{J((0,y.setMaxSlippage)(e))},maxAllowedSlippage:O.MAX_ALLOWED_SLIPPAGE,currentSlippage:We,isDirectWrappingEnabled:Yt,onModalClose:()=>{J((0,y.setTransactionSettingsOpened)(!1))}}),rr&&a.default.createElement(Z.default,{quoteCount:Ce,numberOfAggregators:et}),tr&&a.default.createElement(K.default,{setReceiveToAmount:ue})),!Ye&&a.default.createElement(V.default,{submitText:Kt,disabled:!0,hideCancel:!0,showTermsOfService:!0}))}ae.propTypes={ethBalance:o.default.string,selectedAccountAddress:o.default.string,shuffledTokensList:o.default.array}}}},{package:"$root$",file:"ui/pages/swaps/prepare-swap-page/prepare-swap-page.js"}],[6945,{"../../../components/component-library":5806,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,"../mascot-background-animation/mascot-background-animation":6942,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=p;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=c(e("prop-types")),o=e("../../../contexts/i18n"),i=c(e("../../../components/ui/box")),l=e("../../../helpers/constants/design-system"),s=e("../../../components/component-library"),u=c(e("../mascot-background-animation/mascot-background-animation"));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function p(e){const{quoteCount:t,numberOfAggregators:r}=e,n=(0,a.useContext)(o.I18nContext);return a.default.createElement(i.default,{marginTop:4,display:l.DISPLAY.FLEX,justifyContent:l.JustifyContent.center,alignItems:l.AlignItems.center,flexDirection:l.FLEX_DIRECTION.COLUMN},a.default.createElement(i.default,{display:l.DISPLAY.FLEX,justifyContent:l.JustifyContent.center,alignItems:l.AlignItems.center},a.default.createElement(s.Text,{variant:l.TextVariant.bodyMd,as:"h6",color:l.TextColor.textAlternative,marginLeft:1,marginRight:1},n("swapFetchingQuote")),a.default.createElement(s.Text,{variant:l.TextVariant.bodyMdBold,as:"h6",color:l.TextColor.textAlternative},n("swapQuoteNofM",[Math.min(t+1,r),r]))),a.default.createElement(u.default,null))}p.propTypes={quoteCount:n.default.number.isRequired,numberOfAggregators:n.default.number.isRequired}}}},{package:"$root$",file:"ui/pages/swaps/prepare-swap-page/quotes-loading-animation.js"}],[6946,{"../../../../app/scripts/lib/util":135,"../../../../shared/constants/gas":5255,"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/swaps":5274,"../../../../shared/lib/metamask-controller-utils":5285,"../../../../shared/lib/swaps-utils":5288,"../../../../shared/lib/transactions-controller-utils":5292,"../../../../shared/modules/conversion.utils":5301,"../../../../shared/modules/hexstring-utils":5307,"../../../../shared/modules/selectors":5319,"../../../../shared/modules/selectors/networks":5320,"../../../../shared/modules/string-utils":5324,"../../../../shared/modules/transaction.utils":5326,"../../../components/component-library":5806,"../../../components/ui/box":6079,"../../../components/ui/info-tooltip":6134,"../../../contexts/i18n":6211,"../../../contexts/metametrics":6214,"../../../ducks/metamask/metamask":6236,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/routes":6254,"../../../helpers/constants/zendesk-url":6261,"../../../helpers/utils/token-util":6294,"../../../hooks/ramps/useRamps/useRamps":6311,"../../../hooks/useAsyncResult":6322,"../../../hooks/useEqualityCheck":6328,"../../../hooks/useEthFiatAmount":6329,"../../../hooks/useGasFeeEstimates":6331,"../../../hooks/usePrevious":6348,"../../../hooks/useTokenTracker":6363,"../../../selectors":6985,"../../../store/actions":7e3,"../../confirmations/confirm-approve/confirm-approve.util":6642,"../countdown-timer":6928,"../exchange-rate-display":6932,"../select-quote-popover":6951,"../swaps-footer":6968,"../swaps.util":6970,"./slippage-notification-modal":6947,"./view-quote-price-difference":6948,"@sentry/browser":2871,"bignumber.js":3465,classnames:3584,lodash:4380,"prop-types":4528,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=re;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=J(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=e("react-router-dom"),i=K(e("bignumber.js")),l=e("lodash"),s=K(e("classnames")),u=e("@sentry/browser"),c=K(e("prop-types")),d=K(e("../../../helpers/constants/zendesk-url")),p=e("../../../contexts/i18n"),f=K(e("../select-quote-popover")),m=e("../../../hooks/useEthFiatAmount"),h=e("../../../hooks/useEqualityCheck"),b=e("../../../hooks/usePrevious"),g=e("../../../contexts/metametrics"),y=e("../../../ducks/swaps/swaps"),v=e("../../../../shared/modules/selectors/networks"),w=e("../../../selectors"),x=e("../../../../shared/modules/selectors"),E=e("../../../ducks/metamask/metamask"),_=e("../../../store/actions"),C=e("../../../helpers/constants/routes"),T=e("../../../../shared/modules/conversion.utils"),k=e("../../confirmations/confirm-approve/confirm-approve.util"),S=e("../swaps.util"),R=e("../../../hooks/useTokenTracker"),P=e("../../../../shared/constants/swaps"),M=e("../../../../shared/constants/gas"),O=K(e("../countdown-timer")),D=K(e("../swaps-footer")),j=K(e("../../../components/ui/box")),A=e("../../../helpers/constants/design-system"),I=e("../../../components/component-library"),q=e("../../../../shared/constants/metametrics"),N=e("../../../../shared/modules/string-utils"),L=e("../../../../shared/modules/transaction.utils"),F=e("../../../../shared/lib/metamask-controller-utils"),W=e("../../../../shared/lib/transactions-controller-utils"),B=e("../../../../app/scripts/lib/util"),U=e("../../../../shared/lib/swaps-utils"),$=K(e("../exchange-rate-display")),z=K(e("../../../components/ui/info-tooltip")),G=K(e("../../../hooks/ramps/useRamps/useRamps")),H=e("../../../helpers/utils/token-util"),V=e("../../../../shared/modules/hexstring-utils"),Q=e("../../../hooks/useAsyncResult"),X=e("../../../hooks/useGasFeeEstimates"),Y=K(e("./view-quote-price-difference")),Z=K(e("./slippage-notification-modal"));function K(e){return e&&e.__esModule?e:{default:e}}function J(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(J=function(e){return e?r:t})(e)}let ee;const te=a.default.memo((function({trackAllAvailableQuotesOpened:e,setSelectQuotePopoverShown:t,t:r}){const n=(0,a.useCallback)((()=>{e(),t(!0)}),[e,t]);return a.default.createElement(I.ButtonLink,{key:"view-all-quotes","data-testid":"review-quote-view-all-quotes",onClick:n,size:A.Size.inherit},r("viewAllQuotes"))}));function re({setReceiveToAmount:e}){var t,r,c,K,J,re,ae,ne;const oe=(0,o.useHistory)(),ie=(0,n.useDispatch)(),le=(0,a.useContext)(p.I18nContext),se=(0,a.useContext)(g.MetaMetricsContext),[ue,ce]=(0,a.useState)(!1),[de,pe]=(0,a.useState)(!1),[fe]=(0,a.useState)(!1),[me,he]=(0,a.useState)(null),[be,ge]=(0,a.useState)(null),[ye,ve]=(0,a.useState)(null),[we]=(0,a.useState)(Date.now()),{openBuyCryptoInPdapp:xe}=(0,G.default)(),[Ee,_e]=(0,a.useState)(!1),[Ce,Te]=(0,a.useState)(!1),ke=[M.GasRecommendations.high,M.GasRecommendations.medium],Se=(0,n.useSelector)(y.getBackgroundSwapRouteState),Re=(0,n.useSelector)(y.getQuotes,l.isEqual);(0,a.useEffect)((()=>{Object.values(Re).length?"awaiting"===Se&&oe.push(C.AWAITING_SWAP_ROUTE):oe.push(C.PREPARE_SWAP_ROUTE)}),[oe,Re,Se]);const Pe=(0,n.useSelector)(y.getQuotesLastFetched),Me=(0,b.usePrevious)(Pe),Oe=(0,n.useSelector)(y.getUsedSwapsGasPrice),De=(0,n.useSelector)(y.getCustomSwapsGas),je=(0,n.useSelector)(w.getTokenExchangeRates,l.isEqual),Ae=(0,h.useEqualityCheck)(je),{balance:Ie}=(0,n.useSelector)(w.getSelectedAccount,n.shallowEqual),qe=(0,n.useSelector)(w.conversionRateSelector),Ne=(0,n.useSelector)(w.getUSDConversionRate),Le=(0,n.useSelector)(w.getCurrentCurrency),Fe=(0,n.useSelector)(E.getTokens,l.isEqual),We=(0,n.useSelector)(w.checkNetworkAndAccountSupports1559),Be=(0,n.useSelector)(y.getBalanceError),Ue=(0,n.useSelector)(y.getFetchParams,l.isEqual),$e=(0,n.useSelector)(y.getApproveTxParams,l.isEqual),ze=(0,n.useSelector)(y.getTopQuote,l.isEqual),Ge=(0,n.useSelector)(y.getUsedQuote,l.isEqual),He=(null==Ge||null===(t=Ge.trade)||void 0===t?void 0:t.value)??"0x0",Ve=(0,n.useSelector)(w.getSwapsDefaultToken,l.isEqual),Qe=(0,n.useSelector)(v.getCurrentChainId),Xe=(0,n.useSelector)(E.getNativeCurrency),Ye=(0,n.useSelector)(y.getReviewSwapClickedTimestamp),Ze=(0,n.useSelector)(x.getSmartTransactionsOptInStatusForMetrics),Ke=(0,n.useSelector)(x.getSmartTransactionsPreferenceEnabled),Je=(0,n.useSelector)(x.getSmartTransactionsEnabled),et=(0,n.useSelector)(y.getSwapsSTXLoading),tt=(0,n.useSelector)(y.getCurrentSmartTransactionsError),rt=(0,n.useSelector)(y.getSmartTransactionsError),at=(0,n.useSelector)(y.getCurrentSmartTransactionsEnabled),nt=(0,n.useSelector)(y.getSmartTransactionFees,l.isEqual),ot=(0,n.useSelector)(y.getSwapsNetworkConfig,n.shallowEqual),{gasFeeEstimates:it}=(0,X.useGasFeeEstimates)(),{estimatedBaseFee:lt="0"}=it??{},st=(0,Q.useAsyncResult)((async()=>We?await(0,S.getSwap1559GasFeeEstimates)(Ge.trade,$e,lt,Qe):undefined),[Ge.trade,$e,lt,Qe,We]),ut=null===(r=st.value)||void 0===r?void 0:r.tradeGasFeeEstimates,ct=null===(c=st.value)||void 0===c?void 0:c.approveGasFeeEstimates,dt=Ge.trade,{isGasIncludedTrade:pt}=Ge,ft=(0,n.useSelector)(x.getSmartTransactionsPreferenceEnabled)&&at,[mt]=(0,a.useState)((()=>{const e=Number(null==Ue?void 0:Ue.slippage);return e>0&&e<=1?P.SLIPPAGE_LOW_ERROR:e>=5&&e<=P.MAX_ALLOWED_SLIPPAGE?P.SLIPPAGE_HIGH_ERROR:""})),ht=null==Ue?void 0:Ue.sourceToken,bt={reg_tx_fee_in_usd:undefined,reg_tx_fee_in_eth:undefined,reg_tx_max_fee_in_usd:undefined,reg_tx_max_fee_in_eth:undefined,stx_fee_in_usd:undefined,stx_fee_in_eth:undefined,stx_max_fee_in_usd:undefined,stx_max_fee_in_eth:undefined},gt=(null==Ge?void 0:Ge.gasEstimateWithRefund)||`0x${(0,T.decimalToHex)((null==Ge?void 0:Ge.averageGas)||0)}`,yt=(0,U.calculateMaxGasLimit)(null==Ge?void 0:Ge.gasEstimate,null==Ge?void 0:Ge.gasMultiplier,null==Ge?void 0:Ge.maxGas,De);let vt=(0,W.calcGasTotal)(yt,(null==ut?void 0:ut.maxFeePerGas)||Oe);null!==be&&(vt=(0,T.sumHexes)(vt||"0x0",be||"0x0"));const{tokensWithBalances:wt}=(0,R.useTokenTracker)({tokens:Fe,includeFailedTokens:!0}),xt=ht===Ve.address?Ve:wt.find((({address:e})=>(0,N.isEqualCaseInsensitive)(e,ht))),Et=xt||Ge.sourceTokenInfo,_t=(null==wt?void 0:wt.length)&&(0,W.calcTokenAmount)(Et.balance||"0x0",Et.decimals).toFixed(9),Ct=wt&&xt===undefined,Tt=(0,L.parseStandardTokenTransactionData)(null==$e?void 0:$e.data),kt=Tt&&(0,F.getTokenValueParam)(Tt),St=kt&&(null==Et?void 0:Et.decimals)!==undefined&&(0,W.calcTokenAmount)(kt,Et.decimals).toFixed(9),Rt=null==$e?void 0:$e.gas,Pt=We?null==ut?void 0:ut.baseAndPriorityFeePerGas:Oe,Mt=We?null==ct?void 0:ct.baseAndPriorityFeePerGas:Oe,Ot=(0,a.useMemo)((()=>(0,S.quotesToRenderableData)({quotes:Re,gasPriceTrade:Pt,gasPriceApprove:Mt,conversionRate:qe,currentCurrency:Le,approveGas:Rt,tokenConversionRates:Ae,chainId:Qe,smartTransactionEstimatedGas:Je&&Ke&&(null==nt?void 0:nt.tradeTxFees),nativeCurrencySymbol:Xe,multiLayerL1ApprovalFeeTotal:ye})),[Re,Pt,Mt,qe,Le,Rt,Ae,Qe,null==nt?void 0:nt.tradeTxFees,Xe,Je,Ke,ye]),Dt=Ot.find((e=>e.aggId===Ge.aggregator)),{destinationTokenDecimals:jt,destinationTokenSymbol:At,destinationTokenValue:It,sourceTokenDecimals:qt,sourceTokenSymbol:Nt,sourceTokenValue:Lt}=Dt;let{feeInFiat:Ft,feeInEth:Wt,rawEthFee:Bt,feeInUsd:Ut}=(0,S.getRenderableNetworkFeesForQuote)({tradeGas:gt,approveGas:Rt,gasPriceTrade:Pt,gasPriceApprove:Mt,currentCurrency:Le,conversionRate:qe,USDConversionRate:Ne,tradeValue:He,sourceSymbol:Nt,sourceAmount:Ge.sourceAmount,chainId:Qe,nativeCurrencySymbol:Xe,multiLayerL1FeeTotal:be});bt.reg_tx_fee_in_usd=Number(Ut),bt.reg_tx_fee_in_eth=Number(Bt);const $t=(0,S.getRenderableNetworkFeesForQuote)({tradeGas:yt,approveGas:Rt,gasPriceTrade:Pt,gasPriceApprove:Mt,currentCurrency:Le,conversionRate:qe,USDConversionRate:Ne,tradeValue:He,sourceSymbol:Nt,sourceAmount:Ge.sourceAmount,chainId:Qe,nativeCurrencySymbol:Xe,multiLayerL1FeeTotal:be});let{feeInFiat:zt,feeInEth:Gt,rawEthFee:Ht,feeInUsd:Vt}=$t;if(bt.reg_tx_max_fee_in_usd=Number(Vt),bt.reg_tx_max_fee_in_eth=Number(Ht),ft&&null!=nt&&nt.tradeTxFees){var Qt,Xt;const e=(null==nt?void 0:nt.tradeTxFees.feeEstimate)+((null==nt||null===(Qt=nt.approvalTxFees)||void 0===Qt?void 0:Qt.feeEstimate)||0),t=(null==nt?void 0:nt.tradeTxFees.maxFeeEstimate)+((null==nt||null===(Xt=nt.approvalTxFees)||void 0===Xt?void 0:Xt.maxFeeEstimate)||0);({feeInFiat:Ft,feeInEth:Wt,rawEthFee:Bt,feeInUsd:Ut}=(0,S.getFeeForSmartTransaction)({chainId:Qe,currentCurrency:Le,conversionRate:qe,USDConversionRate:Ne,nativeCurrencySymbol:Xe,feeInWeiDec:e})),bt.stx_fee_in_usd=Number(Ut),bt.stx_fee_in_eth=Number(Bt),bt.estimated_gas=null==nt?void 0:nt.tradeTxFees.gasLimit,({feeInFiat:zt,feeInEth:Gt,rawEthFee:Ht,feeInUsd:Vt}=(0,S.getFeeForSmartTransaction)({chainId:Qe,currentCurrency:Le,conversionRate:qe,USDConversionRate:Ne,nativeCurrencySymbol:Xe,feeInWeiDec:t})),bt.stx_max_fee_in_usd=Number(Vt),bt.stx_max_fee_in_eth=Number(Ht)}const Yt=new i.default(Ge.sourceAmount),Zt=new i.default(Ge.trade.value||0,10).plus(new i.default(vt,16)),Kt=((null==wt?void 0:wt.length)||Be)&&Yt.gt(new i.default(Et.balance||"0x0")),Jt=Zt.gt(new i.default(Ie||"0x0")),er=Kt?(0,W.toPrecisionWithoutTrailingZeros)((0,W.calcTokenAmount)(Yt,Et.decimals).minus(_t).toString(10),6):null,tr=Jt?(0,W.toPrecisionWithoutTrailingZeros)(Zt.minus(Ie,16).div("1000000000000000000",10).toString(10),6):null;let rr;ft&&null!=rt&&rt.balanceNeededWei&&(rr=(0,T.decWEIToDecETH)(rt.balanceNeededWei-rt.currentBalanceWei));const ar=(0,b.usePrevious)(rr),nr=(0,n.useSelector)(y.getDestinationTokenInfo,l.isEqual);(0,a.useEffect)((()=>{ft?Kt?ie((0,y.setBalanceError)(!0)):Be&&!Kt&&ie((0,y.setBalanceError)(!1)):Kt||Jt?ie((0,y.setBalanceError)(!0)):!Be||Kt||Jt||ie((0,y.setBalanceError)(!1))}),[Kt,Jt,ie,ft,Be]),(0,a.useEffect)((()=>{!me&&St&&he(St)}),[me,St]);const or=(Be||er||!ft&&tr||ft&&rr)&&!fe,ir=(0,n.useSelector)(w.isHardwareWallet),lr=(0,n.useSelector)(w.getHardwareWalletType),sr=Object.values(Re).length,ur=(0,a.useRef)(),cr=(0,a.useMemo)((()=>({token_from:Nt,token_from_amount:Lt,token_to:At,token_to_amount:It,request_type:null==Ue?void 0:Ue.balanceError,slippage:null==Ue?void 0:Ue.slippage,custom_slippage:2!==(null==Ue?void 0:Ue.slippage),response_time:null==Ue?void 0:Ue.responseTime,best_quote_source:null==ze?void 0:ze.aggregator,available_quotes:sr,is_hardware_wallet:ir,hardware_wallet_type:lr,stx_enabled:Je,current_stx_enabled:at,stx_user_opt_in:Ze})),[Nt,Lt,At,It,null==Ue?void 0:Ue.balanceError,null==Ue?void 0:Ue.slippage,null==Ue?void 0:Ue.responseTime,null==ze?void 0:ze.aggregator,sr,ir,lr,Je,at,Ze]),dr=()=>{se({event:"All Available Quotes Opened",category:q.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...cr,other_quote_selected:(null==Ge?void 0:Ge.aggregator)!==(null==ze?void 0:ze.aggregator),other_quote_selected_source:(null==Ge?void 0:Ge.aggregator)===(null==ze?void 0:ze.aggregator)?null:null==Ge?void 0:Ge.aggregator}})},pr=(0,a.useCallback)((()=>{se({event:"Best Quote Reviewed",category:q.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...cr,network_fees:Ft}})}),[se,cr,Ft]),fr=(0,a.useCallback)((()=>{se({event:"Review Quote Component Loaded",category:q.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...cr,response_time:we-Ye}})}),[se,cr,we,Ye]);(0,a.useEffect)((()=>{!ur.current&&[Nt,Lt,At,It,Ue,ze,sr,Ft].every((e=>null!==e&&e!==undefined))&&(ur.current=!0,pr())}),[Ue,ze,sr,Ft,At,It,Nt,Lt,pr]),(0,a.useEffect)((()=>{if((ft&&ar||!ft)&&Pe===Me)return;let e;if(ft&&rr)e=rr;else{if(ft||!tr)return;e=tr}se({event:q.MetaMetricsEventName.SwapError,category:q.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...cr,error_type:q.MetaMetricsEventErrorType.InsufficientGas,additional_balance_needed:e}})}),[Pe,Me,rr,ft,se,ar,tr,cr]);const mr=Ge.fee,hr=()=>{se({event:"Edit Spend Limit Opened",category:q.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...cr,custom_spend_limit_set:me===St,custom_spend_limit_amount:me===St?null:St}}),ie((0,_.showModal)({name:"EDIT_APPROVAL_PERMISSION",decimals:Et.decimals,origin:"MetaMask",setCustomAmount:e=>{const t=""===e?me:e,r=(0,k.getCustomTxParamsData)($e.data,{customPermissionAmount:t,decimals:Et.decimals});null!=t&&t.length&&$e.data!==r&&ie((0,_.setCustomApproveTxData)(r))},tokenAmount:me,customTokenAmount:me===St?null:St,tokenBalance:_t,tokenSymbol:Et.symbol,requiredMinimum:(0,W.calcTokenAmount)(Ge.sourceAmount,Et.decimals)}))},br=Boolean(rr||tr),gr=Ct?le("swapTokenBalanceUnavailable",[Nt]):le("swapApproveNeedMoreTokens",[a.default.createElement("span",{key:"swapApproveNeedMoreTokens-1"},er||rr||tr),er&&Nt!==Ve.symbol?Nt:Ve.symbol]),yr=null==Ge||null===(K=Ge.priceSlippage)||void 0===K?void 0:K.bucket,vr=(0,b.usePrevious)(yr);(0,a.useEffect)((()=>{Ee&&vr===M.GasRecommendations.medium&&yr===M.GasRecommendations.high&&_e(!1)}),[yr,Ee,vr]);let wr=null;const xr=(0,m.useEthFiatAmount)((null==Ge||null===(J=Ge.priceSlippage)||void 0===J?void 0:J.sourceAmountInETH)||0,{showFiat:!0}),Er=(0,m.useEthFiatAmount)((null==Ge||null===(re=Ge.priceSlippage)||void 0===re?void 0:re.destinationAmountInETH)||0,{showFiat:!0}),_r=!xr||!Er||Boolean(null==Ge||null===(ae=Ge.priceSlippage)||void 0===ae?void 0:ae.calculationError);let Cr=0;null!=Ge&&null!==(ne=Ge.priceSlippage)&&void 0!==ne&&ne.ratio&&(Cr=parseFloat(new i.default(Ge.priceSlippage.ratio,10).minus(1,10).times(100,10).toFixed(2),10));const Tr=(0,b.usePrevious)(Cr),kr=!Ct&&!or&&Ge&&(ke.includes(yr)||_r);kr&&(wr=a.default.createElement(Y.default,{usedQuote:Ge,sourceTokenValue:Lt,destinationTokenValue:It,priceSlippageFromSource:xr,priceSlippageFromDestination:Er,priceDifferencePercentage:Cr,priceSlippageUnknownFiatValue:_r,onAcknowledgementClick:()=>{_e(!0)},acknowledged:Ee}));const Sr=or||kr,Rr=Boolean(ue||Be||Ct||kr&&!Ee||We&&(null==ut?void 0:ut.baseAndPriorityFeePerGas)===undefined||!We&&(null===Oe||Oe===undefined)||at&&(tt||rt)||at&&Ke&&!(null!=nt&&nt.tradeTxFees));(0,a.useEffect)((()=>{kr&&Ee&&Pe!==Me&&Cr!==Tr&&_e(!1)}),[Ee,Me,Pe,kr,Cr,Tr]),(0,a.useEffect)((()=>{if(!ft||Kt||pt)ee&&clearInterval(ee);else{const e={from:dt.from,to:dt.to,value:dt.value,data:dt.data,gas:dt.gas,chainId:Qe};ee=setInterval((()=>{et||ie((0,y.fetchSwapsSmartTransactionFees)({unsignedTransaction:e,approveTxParams:$e,fallbackOnNotEnoughFunds:!1}))}),ot.stxGetTransactionsRefreshTime),ie((0,y.fetchSwapsSmartTransactionFees)({unsignedTransaction:e,approveTxParams:$e,fallbackOnNotEnoughFunds:!1}))}return()=>clearInterval(ee)}),[ie,ft,dt.data,dt.from,dt.value,dt.gas,dt.to,Qe,ot.stxGetTransactionsRefreshTime,Kt,pt]),(0,a.useEffect)((()=>{ie((0,_.setSwapsQuotesPollingLimitEnabled)(!0)),Ye&&fr()}),[ie,fr,Ye]),(0,a.useEffect)((()=>{(!at&&tt&&ue||ft&&!et&&ue)&&ce(!1)}),[at,tt,ft,et,ue]),(0,a.useEffect)((()=>{if(null==Ge||!Ge.multiLayerL1TradeFeeTotal)return;(async()=>{try{let e="0x0";$e&&(e=await ie((0,_.getLayer1GasFee)({transactionParams:{...$e,gasPrice:(0,B.addHexPrefix)($e.gasPrice),value:"0x0"},chainId:Qe})),ve(e));const t=(0,T.sumHexes)(Ge.multiLayerL1TradeFeeTotal,e);ge(t)}catch(e){(0,u.captureException)(e),ge(null),ve(null)}})()}),[dt,$e,Qe,Ge]);const Pr=(0,U.calcTokenValue)(It,jt),Mr=(0,W.calcTokenAmount)(Pr,jt),Or=(0,S.formatSwapsValueForDisplay)(Mr),Dr=Or.match(/\d+/gu).join("").length;let jr=Or;Dr>20&&(jr=`${Or.slice(0,20)}...`),(0,a.useEffect)((()=>{e(jr)}),[jr,e]);const Ar=!$e||Be&&!fe,Ir=a.default.createElement("span",{key:"fee-card-approve-symbol",className:"fee-card__bold"},le("enableToken",[Nt])),qr=({acknowledgedSlippage:e=!1})=>{!mt||e?(ce(!0),Be?nr.symbol===Ve.symbol?oe.push(C.DEFAULT_ROUTE):oe.push(`${C.ASSET_ROUTE}/${nr.address}`):ft&&null!=nt&&nt.tradeTxFees?ie((0,y.signAndSendSwapsSmartTransaction)({unsignedTransaction:dt,trackEvent:se,history:oe,additionalTrackingParams:bt})):ie((0,y.signAndSendTransactions)(oe,se,bt))):Te(!0)},Nr=(0,a.useMemo)((()=>{var e;if(!pt)return undefined;const t=null==nt||null===(e=nt.tradeTxFees)||void 0===e||null===(e=e.fees)||void 0===e||null===(e=e[0])||void 0===e||null===(e=e.tokenFees)||void 0===e?void 0:e[0];if(!t)return undefined;const{token:{address:r,decimals:a,symbol:n}={},balanceNeededToken:o}=t,i=(0,V.toChecksumHexAddress)(r),l=Ae[i],s=(0,W.calcTokenAmount)((0,T.hexToDecimal)(o),a).toString(10);return(0,H.getTokenFiatAmount)(l,qe,Le,s,n,!0,!0)}),[pt,nt,Ae,qe,Le]);return a.default.createElement("div",{className:"review-quote"},a.default.createElement("div",{className:"review-quote__content"},a.default.createElement(Z.default,{isOpen:Ce,setSlippageNotificationModalOpened:Te,slippageErrorKey:mt,onSwapSubmit:qr,currentSlippage:null==Ue?void 0:Ue.slippage}),de&&a.default.createElement(f.default,{quoteDataRows:Ot,onClose:()=>pe(!1),onSubmit:e=>ie((0,y.swapsQuoteSelected)(e)),swapToSymbol:At,initialAggId:Ge.aggregator,onQuoteDetailsIsOpened:()=>{se({event:"Quote Details Opened",category:q.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...cr,other_quote_selected:(null==Ge?void 0:Ge.aggregator)!==(null==ze?void 0:ze.aggregator),other_quote_selected_source:(null==Ge?void 0:Ge.aggregator)===(null==ze?void 0:ze.aggregator)?null:null==Ge?void 0:Ge.aggregator}})},hideEstimatedGasFee:Je&&Ke}),Sr&&a.default.createElement(a.default.Fragment,null,wr,(or||Ct)&&a.default.createElement(I.BannerAlert,{title:le("notEnoughBalance"),titleProps:{"data-testid":"swaps-banner-title"},severity:A.Severity.Info,description:gr,descriptionProps:{"data-testid":"mm-banner-alert-notification-text"},actionButtonLabel:br?le("buyMoreAsset",[Xe]):undefined,actionButtonOnClick:br?()=>xe():undefined,marginTop:2})),a.default.createElement("div",{className:"review-quote__countdown-timer-container"},a.default.createElement(O.default,{timeStarted:Pe,warningTime:"0:10",labelKey:"swapNewQuoteIn"})),a.default.createElement(j.default,{marginTop:1,marginBottom:0,display:A.DISPLAY.FLEX,flexDirection:A.FlexDirection.Column,className:"review-quote__overview"},a.default.createElement(j.default,{display:A.DISPLAY.FLEX,justifyContent:A.JustifyContent.spaceBetween,alignItems:A.AlignItems.center},a.default.createElement(I.Text,{variant:A.TextVariant.bodyMd,marginRight:1,color:A.TextColor.textDefault},le("quoteRate"),"*"),a.default.createElement($.default,{primaryTokenValue:(0,U.calcTokenValue)(Lt,qt),primaryTokenDecimals:qt,primaryTokenSymbol:Nt,secondaryTokenValue:Pr,secondaryTokenDecimals:jt,secondaryTokenSymbol:At,boldSymbols:!1,className:"review-quote__exchange-rate-display",showIconForSwappingTokens:!1})),pt&&a.default.createElement(j.default,{display:A.DISPLAY.FLEX,justifyContent:A.JustifyContent.spaceBetween,alignItems:A.AlignItems.stretch},a.default.createElement(j.default,{display:A.DISPLAY.FLEX,alignItems:A.AlignItems.center,width:A.FRACTIONS.SIX_TWELFTHS},a.default.createElement(I.Text,{variant:A.TextVariant.bodyMd,as:"h6",color:A.TextColor.textDefault,marginRight:1},le("gasFee")),a.default.createElement(z.default,{position:"left",contentText:a.default.createElement(a.default.Fragment,null,a.default.createElement("p",{className:"fee-card__info-tooltip-paragraph"},le("swapGasIncludedTooltipExplanation")),a.default.createElement(I.ButtonLink,{key:"learn-more-about-gas-included-link",size:I.ButtonLinkSize.Inherit,href:d.default.SWAPS_GAS_FEES,target:"_blank",rel:"noopener noreferrer",externalLink:!0,onClick:()=>{se({event:'Clicked "GasIncluded tooltip: Learn More" Link',category:q.MetaMetricsEventCategory.Swaps})}},le("swapGasIncludedTooltipExplanationLinkText")))})),a.default.createElement(j.default,{display:A.DISPLAY.FLEX,justifyContent:A.JustifyContent.flexEnd,alignItems:A.AlignItems.flexEnd,width:A.FRACTIONS.SIX_TWELFTHS},a.default.createElement(I.Text,{variant:A.TextVariant.bodyMd,as:"h6",color:A.TextColor.textDefault,"data-testid":"review-quote-gas-fee-in-fiat",textAlign:A.TEXT_ALIGN.RIGHT,style:{textDecoration:"line-through"},marginRight:1},Nr),a.default.createElement(I.Text,{variant:A.TextVariant.bodySm,as:"h6",color:A.TextColor.textDefault,textAlign:A.TEXT_ALIGN.RIGHT,fontStyle:A.FontStyle.Italic},le("included")))),!pt&&a.default.createElement(j.default,{display:A.DISPLAY.FLEX,justifyContent:A.JustifyContent.spaceBetween,alignItems:A.AlignItems.stretch},a.default.createElement(j.default,{display:A.DISPLAY.FLEX,alignItems:A.AlignItems.center,width:A.FRACTIONS.SIX_TWELFTHS},a.default.createElement(I.Text,{variant:A.TextVariant.bodyMd,as:"h6",color:A.TextColor.textDefault,marginRight:1},le("transactionDetailGasHeading")),a.default.createElement(z.default,{position:"left",contentText:a.default.createElement("p",{className:"fee-card__info-tooltip-paragraph"},le("swapGasFeesExplanation",[a.default.createElement(I.ButtonLink,{key:"learn-more-gas-link",size:I.ButtonLinkSize.Inherit,href:d.default.GAS_FEES,target:"_blank",rel:"noopener noreferrer",externalLink:!0,onClick:()=>{se({event:'Clicked "Gas Fees: Learn More" Link',category:q.MetaMetricsEventCategory.Swaps})}},le("swapGasFeesExplanationLinkText"))]))})),a.default.createElement(j.default,{display:A.DISPLAY.FLEX,alignItems:A.AlignItems.flexEnd,width:A.FRACTIONS.SIX_TWELFTHS},a.default.createElement(I.Text,{variant:A.TextVariant.bodyMd,as:"h6",color:A.TextColor.textDefault,width:A.FRACTIONS.EIGHT_TWELFTHS,textAlign:A.TEXT_ALIGN.RIGHT,paddingRight:1},Wt),a.default.createElement(I.Text,{variant:A.TextVariant.bodyMdBold,as:"h6",color:A.TextColor.textDefault,"data-testid":"review-quote-gas-fee-in-fiat",width:A.FRACTIONS.FOUR_TWELFTHS,textAlign:A.TEXT_ALIGN.RIGHT},` ${Ft}`))),!pt&&(zt||Gt)&&a.default.createElement(j.default,{display:A.DISPLAY.FLEX},a.default.createElement(j.default,{display:A.DISPLAY.FLEX,width:A.FRACTIONS.SIX_TWELFTHS}),a.default.createElement(j.default,{display:A.DISPLAY.FLEX,justifyContent:A.JustifyContent.flexEnd,width:A.FRACTIONS.SIX_TWELFTHS},a.default.createElement(I.Text,{variant:A.TextVariant.bodySm,color:A.TextColor.textDefault,width:A.FRACTIONS.EIGHT_TWELFTHS,paddingRight:1,textAlign:A.TEXT_ALIGN.RIGHT},`${le("maxFee")}: `),a.default.createElement(I.Text,{variant:A.TextVariant.bodySm,color:A.TextColor.textDefault,width:A.FRACTIONS.FOUR_TWELFTHS,textAlign:A.TEXT_ALIGN.RIGHT},zt||Gt))),!Ar&&a.default.createElement(j.default,{display:A.DISPLAY.FLEX,justifyContent:A.JustifyContent.spaceBetween},a.default.createElement(I.Text,{variant:A.TextVariant.bodyMd,as:"h6",color:A.TextColor.textDefault,marginRight:1},le("swapEnableTokenForSwapping",[Ir])),a.default.createElement(I.Text,{variant:A.TextVariant.bodyMd},a.default.createElement(I.ButtonLink,{onClick:()=>hr(),size:A.Size.inherit,className:"review-quote__edit-limit"},le("swapEditLimit")))),pt&&a.default.createElement(j.default,{display:A.DISPLAY.FLEX,marginTop:3,justifyContent:A.JustifyContent.center,alignItems:A.AlignItems.center,flexDirection:A.FlexDirection.Column},a.default.createElement(I.Text,{variant:A.TextVariant.bodySm,color:A.TextColor.textAlternative},"* ",le("swapIncludesGasAndMetaMaskFee",[mr])),a.default.createElement(I.Text,{variant:A.TextVariant.bodySm,color:A.TextColor.textDefault},a.default.createElement(te,{trackAllAvailableQuotesOpened:dr,setSelectQuotePopoverShown:pe,t:le}))),!pt&&a.default.createElement(j.default,{display:A.DISPLAY.FLEX,marginTop:3,justifyContent:A.JustifyContent.center,alignItems:A.AlignItems.center},a.default.createElement(I.Text,{variant:A.TextVariant.bodySm,color:A.TextColor.textAlternative},"*",le("swapIncludesMetaMaskFeeViewAllQuotes",[mr,a.default.createElement(te,{key:"view-all-quotes",trackAllAvailableQuotesOpened:dr,setSelectQuotePopoverShown:pe,t:le})]))))),a.default.createElement(D.default,{onSubmit:qr,submitText:le(ft&&et?"preparingSwap":"swap"),hideCancel:!0,disabled:Rr,className:(0,s.default)("review-quote__footer",{"review-quote__thin-swaps-footer":Sr}),showTopBorder:!0,showTermsOfService:!0}))}te.propTypes={trackAllAvailableQuotesOpened:c.default.func.isRequired,setSelectQuotePopoverShown:c.default.func.isRequired,t:c.default.func.isRequired},re.propTypes={setReceiveToAmount:c.default.func.isRequired}}}},{package:"$root$",file:"ui/pages/swaps/prepare-swap-page/review-quote.js"}],[6947,{"../../../../shared/constants/swaps":5274,"../../../components/component-library":5806,"../../../components/component-library/modal-content/deprecated":5816,"../../../components/component-library/modal-header/deprecated":5825,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,"../swaps-banner-alert/swaps-banner-alert":6967,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function({isOpen:e,slippageErrorKey:t,setSlippageNotificationModalOpened:r,onSwapSubmit:a,currentSlippage:p}){const f=(0,n.useContext)(o.I18nContext),[m,h]=(0,n.useState)(!1),b=f(m?"preparingSwap":"swapAnyway");return n.default.createElement(l.Modal,{onClose:()=>r(!1),isOpen:e,isClosedOnOutsideClick:!0,isClosedOnEscapeKey:!0,className:"mm-modal__custom-scrollbar"},n.default.createElement(l.ModalOverlay,null),n.default.createElement(s.ModalContent,null,n.default.createElement(u.ModalHeader,{onClose:()=>r(!1)},t===c.SLIPPAGE_HIGH_ERROR?f("swapHighSlippage"):t===c.SLIPPAGE_LOW_ERROR?f("swapLowSlippage"):""),n.default.createElement(l.Box,{display:i.Display.Flex,flexDirection:i.FlexDirection.Column,justifyContent:i.JustifyContent.spaceBetween,alignItems:i.AlignItems.stretch,className:"high-slippage__content",marginTop:7},n.default.createElement(d.default,{swapsErrorKey:t,showTransactionSettingsLink:!0,currentSlippage:p}),n.default.createElement(l.Box,{marginTop:5},n.default.createElement(l.ButtonPrimary,{onClick:()=>{h(!0),a({acknowledgedSlippage:!0})},block:!0,"data-testid":"high-slippage-continue-anyway",disabled:m},b)))))};var a,n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),o=e("../../../contexts/i18n"),i=e("../../../helpers/constants/design-system"),l=e("../../../components/component-library"),s=e("../../../components/component-library/modal-content/deprecated"),u=e("../../../components/component-library/modal-header/deprecated"),c=e("../../../../shared/constants/swaps"),d=(a=e("../swaps-banner-alert/swaps-banner-alert"))&&a.__esModule?a:{default:a};function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}}}},{package:"$root$",file:"ui/pages/swaps/prepare-swap-page/slippage-notification-modal.tsx"}],[6948,{"../../../../shared/constants/gas":5255,"../../../components/component-library":5806,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=p;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=c(e("prop-types")),o=e("../../../contexts/i18n"),i=c(e("../../../components/ui/box")),l=e("../../../helpers/constants/design-system"),s=e("../../../../shared/constants/gas"),u=e("../../../components/component-library");function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function p(e){const{usedQuote:t,sourceTokenValue:r,destinationTokenValue:n,onAcknowledgementClick:c,acknowledged:d,priceSlippageFromSource:p,priceSlippageFromDestination:f,priceDifferencePercentage:m,priceSlippageUnknownFiatValue:h}=e,b=(0,a.useContext)(o.I18nContext);let g=b("swapPriceUnavailableTitle"),y=b("swapPriceUnavailableDescription"),v=s.GasRecommendations.high;h||(g=b("swapPriceDifferenceTitle",[m]),y=b("swapPriceDifference",[r,t.sourceTokenInfo.symbol,p,n,t.destinationTokenInfo.symbol,f]),v=t.priceSlippage.bucket);const w=v===s.GasRecommendations.high?l.SEVERITIES.DANGER:l.SEVERITIES.WARNING;return a.default.createElement(i.default,{display:l.DISPLAY.FLEX,marginTop:2},a.default.createElement(u.BannerAlert,{title:g,titleProps:{"data-testid":"swaps-banner-title"},severity:w,width:l.BLOCK_SIZES.FULL,"data-testid":"mm-banner-alert"},a.default.createElement(i.default,null,a.default.createElement(u.Text,{variant:l.TextVariant.bodyMd,as:"h6","data-testid":"mm-banner-alert-notification-text"},y),!d&&a.default.createElement(u.ButtonLink,{size:u.ButtonLinkSize.Inherit,textProps:{variant:l.TextVariant.bodyMd,alignItems:l.AlignItems.flexStart},onClick:c},b("swapAnyway")))))}p.propTypes={usedQuote:n.default.object,sourceTokenValue:n.default.string,destinationTokenValue:n.default.string,onAcknowledgementClick:n.default.func,acknowledged:n.default.bool,priceSlippageFromSource:n.default.string,priceSlippageFromDestination:n.default.string,priceDifferencePercentage:n.default.number,priceSlippageUnknownFiatValue:n.default.bool}}}},{package:"$root$",file:"ui/pages/swaps/prepare-swap-page/view-quote-price-difference.js"}],[6949,{"./item-list.component":6950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./item-list.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/searchable-item-list/item-list/index.js"}],[6950,{"../../../../../shared/constants/common":5250,"../../../../../shared/constants/metametrics":5260,"../../../../../shared/modules/selectors/networks":5320,"../../../../components/ui/actionable-message/actionable-message":6075,"../../../../components/ui/button":6083,"../../../../components/ui/identicon":6133,"../../../../components/ui/url-icon":6206,"../../../../contexts/i18n":6211,"../../../../contexts/metametrics":6214,"../../../../helpers/utils/util":6297,"../../../../selectors":6985,classnames:3584,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=w;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=v(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=y(e("prop-types")),i=y(e("classnames")),l=y(e("../../../../components/ui/identicon")),s=y(e("../../../../components/ui/url-icon")),u=y(e("../../../../components/ui/button")),c=y(e("../../../../components/ui/actionable-message/actionable-message")),d=e("../../../../contexts/i18n"),p=e("../../../../../shared/modules/selectors/networks"),f=e("../../../../selectors"),m=e("../../../../../shared/constants/metametrics"),h=e("../../../../../shared/constants/common"),b=e("../../../../helpers/utils/util"),g=e("../../../../contexts/metametrics");function y(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(v=function(e){return e?r:t})(e)}function w({results:e=[],onClickItem:t,onOpenImportTokenModalClick:r,Placeholder:o,listTitle:y,maxListItems:v=6,searchQuery:w="",containerRef:x,hideRightLabels:E,hideItemIf:_,listContainerClassName:C}){const T=(0,a.useContext)(d.I18nContext),k=(0,n.useSelector)(p.getCurrentChainId),S=(0,n.useSelector)(f.getRpcPrefsForCurrentProvider).blockExplorerUrl??h.CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[k]??null,R=(0,n.useSelector)(f.getUseCurrencyRateCheck),P=(0,b.getURLHostName)(S),M=(0,a.useContext)(g.MetaMetricsContext),O=1===e.length&&e[0].notImported,D=o?a.default.createElement(o,{searchQuery:w}):null;return 0===e.length?D:a.default.createElement("div",{className:"searchable-item-list"},y?a.default.createElement("div",{className:"searchable-item-list__title"},y):null,a.default.createElement("div",{className:(0,i.default)("searchable-item-list__list-container",C),ref:x,"data-testid":"searchable-item-list-list-container"},e.slice(0,v).map(((e,n)=>{if(null!=_&&_(e))return null;const o=e.balance>0;if(e.blocked&&!o&&!w)return null;const c=()=>{e.blocked||(e.notImported?r(e):null==t||t(e))},{iconUrl:d,identiconAddress:p,selected:f,blocked:m,primaryLabel:h,secondaryLabel:b,rightPrimaryLabel:g,rightSecondaryLabel:y,IconComponent:v}=e;return a.default.createElement("div",{tabIndex:"0",className:(0,i.default)("searchable-item-list__item",{"searchable-item-list__item--selected":f,"searchable-item-list__item--disabled":m}),"data-testid":"searchable-item-list__item",onClick:c,onKeyUp:e=>"Enter"===e.key&&c(),key:`searchable-item-list-item-${n}`,title:m?T("swapTokenNotAvailable"):null},d||h?a.default.createElement(s.default,{url:d,name:h}):null,d||h||!p?null:a.default.createElement("div",{className:"searchable-item-list__identicon"},a.default.createElement(l.default,{address:p,diameter:24})),v?a.default.createElement(v,null):null,a.default.createElement("div",{className:"searchable-item-list__labels"},a.default.createElement("div",{className:"searchable-item-list__item-labels"},h?a.default.createElement("span",{className:"searchable-item-list__primary-label","data-testid":"searchable-item-list-primary-label"},h):null,b?a.default.createElement("span",{className:"searchable-item-list__secondary-label"},b):null),E||!g&&!y?null:a.default.createElement("div",{className:"searchable-item-list__right-labels"},g?a.default.createElement("span",{className:"searchable-item-list__right-primary-label"},g):null,y&&R?a.default.createElement("span",{className:"searchable-item-list__right-secondary-label"},y):null)),e.notImported&&a.default.createElement(u.default,{type:"primary",onClick:c,"data-testid":"searchable-item-list-import-button"},T("import")))})),!O&&S&&a.default.createElement("div",{tabIndex:"0",className:"searchable-item-list__item searchable-item-list__item--add-token",key:"searchable-item-list-item-last"},a.default.createElement(c.default,{message:T("addTokenByContractAddress",[a.default.createElement("a",{key:"searchable-item-list__etherscan-link",onClick:()=>{M({event:"Clicked Block Explorer Link",category:m.MetaMetricsEventCategory.Swaps,properties:{link_type:"Token Tracker",action:"Verify Contract Address",block_explorer_domain:P}}),global.platform.openTab({url:S})},target:"_blank",rel:"noopener noreferrer"},P)])}))))}w.propTypes={results:o.default.arrayOf(o.default.shape({iconUrl:o.default.string,selected:o.default.bool,blocked:o.default.bool,primaryLabel:o.default.string,secondaryLabel:o.default.string,rightPrimaryLabel:o.default.string,rightSecondaryLabel:o.default.string})),onClickItem:o.default.func,onOpenImportTokenModalClick:o.default.func,Placeholder:o.default.func,listTitle:o.default.string,maxListItems:o.default.number,searchQuery:o.default.string,containerRef:o.default.shape({current:o.default.instanceOf(window.Element)}),hideRightLabels:o.default.bool,hideItemIf:o.default.func,listContainerClassName:o.default.string}}}},{package:"$root$",file:"ui/pages/swaps/searchable-item-list/item-list/item-list.component.js"}],[6951,{"./select-quote-popover":6955},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./select-quote-popover"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/index.js"}],[6952,{"./quote-details":6953},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./quote-details"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/quote-details/index.js"}],[6953,{"../../../../components/ui/info-tooltip":6134,"../../../../contexts/i18n":6211,"../../../../selectors":6985,"../../exchange-rate-display":6932,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=c(e("prop-types")),i=e("../../../../contexts/i18n"),l=c(e("../../../../components/ui/info-tooltip")),s=c(e("../../exchange-rate-display")),u=e("../../../../selectors");function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}const p=({slippage:e,sourceTokenValue:t,sourceTokenSymbol:r,destinationTokenValue:o,destinationTokenSymbol:c,liquiditySourceKey:d,minimumAmountReceived:p,feeInEth:f,networkFees:m,metaMaskFee:h,hideEstimatedGasFee:b})=>{const g=(0,a.useContext)(i.I18nContext),y=(0,n.useSelector)(u.getUseCurrencyRateCheck);return a.default.createElement("div",{className:"quote-details"},a.default.createElement("div",{className:"quote-details__row"},a.default.createElement("div",{className:"quote-details__detail-header"},g("swapRate")),a.default.createElement("div",{className:"quote-details__detail-content"},a.default.createElement(s.default,{primaryTokenValue:t,primaryTokenDecimals:1,primaryTokenSymbol:r,secondaryTokenValue:o,secondaryTokenDecimals:1,secondaryTokenSymbol:c}))),a.default.createElement("div",{className:"quote-details__row"},a.default.createElement("div",{className:"quote-details__detail-header"},g("swapMaxSlippage"),a.default.createElement(l.default,{position:"bottom",contentText:g("swapSlippageTooltip")})),a.default.createElement("div",{className:"quote-details__detail-content"},`${e}%`)),a.default.createElement("div",{className:"quote-details__row"},a.default.createElement("div",{className:"quote-details__detail-header"},g("swapAmountReceived"),a.default.createElement(l.default,{position:"bottom",contentText:g("swapAmountReceivedInfo")})),a.default.createElement("div",{className:"quote-details__detail-content"},a.default.createElement("span",null,p),a.default.createElement("span",{className:"quote-details__bold"},` ${c}`))),!b&&a.default.createElement("div",{className:"quote-details__row"},a.default.createElement("div",{className:"quote-details__detail-header"},g("swapEstimatedNetworkFees"),a.default.createElement(l.default,{position:"bottom",contentText:g("swapEstimatedNetworkFeesInfo")})),a.default.createElement("div",{className:"quote-details__detail-content"},a.default.createElement("span",null,f),a.default.createElement("span",{className:"quote-details__light-grey"},y&&` (${m})`))),a.default.createElement("div",{className:"quote-details__row"},a.default.createElement("div",{className:"quote-details__detail-header"},g("swapSource"),a.default.createElement(l.default,{position:"bottom",contentText:g("swapLiquiditySourceInfo")})),a.default.createElement("div",{className:"quote-details__detail-content"},g(d))),a.default.createElement("div",{className:"quote-details__row quote-details__row--high"},a.default.createElement("div",{className:"quote-details__detail-header"},a.default.createElement("img",{src:"./images/logo/metamask-fox.svg",className:"quote-details__metafox-logo",alt:""}),g("swapMetaMaskFee")),a.default.createElement("div",{className:"quote-details__detail-content"},g("swapMetaMaskFeeDescription",[h]))))};p.propTypes={slippage:o.default.number.isRequired,sourceTokenValue:o.default.string.isRequired,sourceTokenSymbol:o.default.string.isRequired,destinationTokenValue:o.default.string.isRequired,destinationTokenSymbol:o.default.string.isRequired,liquiditySourceKey:o.default.string.isRequired,minimumAmountReceived:o.default.string.isRequired,feeInEth:o.default.string.isRequired,networkFees:o.default.string.isRequired,metaMaskFee:o.default.number.isRequired,hideEstimatedGasFee:o.default.bool};r.default=p}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/quote-details/quote-details.js"}],[6954,{"prop-types":4528},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.QUOTE_DATA_ROWS_PROPTYPES_SHAPE=void 0;var a,n=(a=e("prop-types"))&&a.__esModule?a:{default:a};r.QUOTE_DATA_ROWS_PROPTYPES_SHAPE=n.default.shape({aggId:n.default.string.isRequired,amountReceiving:n.default.string.isRequired,destinationTokenDecimals:n.default.number.isRequired,destinationTokenSymbol:n.default.string.isRequired,destinationTokenValue:n.default.string.isRequired,isBestQuote:n.default.bool,networkFees:n.default.string.isRequired,quoteSource:n.default.string.isRequired,rawNetworkFees:n.default.string.isRequired,slippage:n.default.number.isRequired,sourceTokenDecimals:n.default.number.isRequired,sourceTokenSymbol:n.default.string.isRequired,sourceTokenValue:n.default.string.isRequired})}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/select-quote-popover-constants.js"}],[6955,{"../../../components/ui/button":6083,"../../../components/ui/popover":6166,"../../../contexts/i18n":6211,"./quote-details":6952,"./select-quote-popover-constants":6954,"./sort-list":6956,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=d(e("prop-types")),o=e("../../../contexts/i18n"),i=d(e("../../../components/ui/popover")),l=d(e("../../../components/ui/button")),s=d(e("./quote-details")),u=d(e("./sort-list")),c=e("./select-quote-popover-constants");function d(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const m=(0,a.useContext)(o.I18nContext),[h,b]=(0,a.useState)(1),[g,y]=(0,a.useState)(null),[v,w]=(0,a.useState)(c),[x,E]=(0,a.useState)("sortList"),[_,C]=(0,a.useState)(null),T=(0,a.useCallback)((()=>{r(v),t()}),[v,t,r]),k=(0,a.useCallback)((()=>{C(null),E("sortList")}),[]),S=(0,a.useCallback)((e=>w(e)),[w]),R=(0,a.useCallback)((t=>{const r=e.find((e=>e.aggId===t));E("quoteDetails"),d(),C(r)}),[e,d]),P=(0,a.useCallback)((()=>a.default.createElement("div",{className:"select-quote-popover__popover-bg",onClick:t})),[t]),M=a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,{type:"secondary",className:"page-container__footer-button select-quote-popover__button",onClick:t},m("close")),a.default.createElement(l.default,{type:"primary",className:"page-container__footer-button select-quote-popover__button",onClick:T},m("swapSelect")));return a.default.createElement("div",{className:"select-quote-popover"},a.default.createElement(i.default,{title:m("quoteDetails"===x?"swapSelectAQuote":"swapQuoteDetails"),subtitle:"sortList"===x?m("swapSelectQuotePopoverDescription"):null,onClose:t,CustomBackground:P,className:"select-quote-popover__popover-wrap",footerClassName:"swaps__footer",footer:"quoteDetails"===x?null:M,onBack:"quoteDetails"===x?k:null},"sortList"===x&&a.default.createElement(u.default,{quoteDataRows:e,selectedAggId:v,onSelect:S,onCaretClick:R,swapToSymbol:n,sortDirection:h,setSortDirection:b,sortColumn:g,setSortColumn:y,hideEstimatedGasFee:p}),"quoteDetails"===x&&_&&a.default.createElement(s.default,f({},_,{hideEstimatedGasFee:p}))))};m.propTypes={onClose:n.default.func,onSubmit:n.default.func,swapToSymbol:n.default.string,quoteDataRows:n.default.arrayOf(c.QUOTE_DATA_ROWS_PROPTYPES_SHAPE),initialAggId:n.default.string,onQuoteDetailsIsOpened:n.default.func,hideEstimatedGasFee:n.default.bool.isRequired};r.default=m}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/select-quote-popover.js"}],[6956,{"./sort-list":6957},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./sort-list"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/sort-list/index.js"}],[6957,{"../../../../components/ui/icon/sun-check-icon.component":6128,"../../../../components/ui/info-tooltip":6134,"../../../../contexts/i18n":6211,"../../../../selectors":6985,"../select-quote-popover-constants":6954,"bignumber.js":3465,classnames:3584,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=b;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=f(e("prop-types")),i=f(e("classnames")),l=f(e("bignumber.js")),s=f(e("../../../../components/ui/icon/sun-check-icon.component")),u=e("../../../../contexts/i18n"),c=e("../select-quote-popover-constants"),d=f(e("../../../../components/ui/info-tooltip")),p=e("../../../../selectors");function f(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}const h=()=>a.default.createElement("svg",{width:"6",height:"9",viewBox:"0 0 6 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.default.createElement("path",{d:"M0.7948 4.96973C0.365112 4.96973 0.150269 5.47754 0.462769 5.77051L2.78699 8.09473C2.96277 8.29004 3.25574 8.29004 3.45105 8.09473L5.77527 5.77051C6.06824 5.47754 5.85339 4.96973 5.44324 4.96973H0.7948ZM5.77527 2.91895L3.45105 0.594727C3.25574 0.418945 2.96277 0.418945 2.78699 0.594727L0.462769 2.91895C0.150269 3.23145 0.365112 3.71973 0.7948 3.71973H5.44324C5.85339 3.71973 6.06824 3.23145 5.77527 2.91895Z",fill:"var(--color-primary-default)"}));function b({quoteDataRows:e,selectedAggId:t,onSelect:r,onCaretClick:o,swapToSymbol:c,sortDirection:f,setSortDirection:m,sortColumn:b=null,setSortColumn:g,hideEstimatedGasFee:y}){const v=(0,a.useContext)(u.I18nContext),[w,x]=(0,a.useState)(!1),E=(0,n.useSelector)(p.getUseCurrencyRateCheck),_=e=>{e===b?m(-1*f):g(e)},C=(0,a.useMemo)((()=>[...e].sort(((e,t)=>{if(null===b&&e.isBestQuote)return-1;if(null===b&&t.isBestQuote)return 1;if(null===b){const r=new l.default(e.destinationTokenValue).toString(16),a=new l.default(t.destinationTokenValue).toString(16);return r[r.length-1]t[b]?-1*f:f:new l.default(e[b]).gt(t[b])?-1*f:f}))),[e,b,f]),T=C.findIndex((({aggId:e})=>t===e));return a.default.createElement("div",{className:"select-quote-popover__sort-list"},a.default.createElement("div",{className:"select-quote-popover__column-headers"},a.default.createElement("div",{className:"select-quote-popover__column-header select-quote-popover__receiving","data-testid":"select-quote-popover__receiving",onClick:()=>_("destinationTokenValue")},a.default.createElement("span",{className:"select-quote-popover__receiving-symbol"},c),a.default.createElement("div",{className:"select-quote-popover__receiving-label"},a.default.createElement("span",null,v("swapReceiving")),a.default.createElement(d.default,{position:"bottom",contentText:v("swapReceivingInfoTooltip")}),a.default.createElement(h,null))),a.default.createElement("div",{className:"select-quote-popover__column-header select-quote-popover__network-fees select-quote-popover__network-fees-header","data-testid":"select-quote-popover__network-fees-header",onClick:()=>_("rawNetworkFees")},!y&&E&&a.default.createElement(a.default.Fragment,null,a.default.createElement("span",null,v("swapEstimatedNetworkFees")),a.default.createElement(d.default,{position:"bottom",contentText:v("swapEstimatedNetworkFeesInfo")}),a.default.createElement(h,null))),a.default.createElement("div",{className:"select-quote-popover__column-header select-quote-popover__quote-source","data-testid":"select-quote-popover__quote-source",onClick:()=>_("quoteSource")},v("swapQuoteSource"),a.default.createElement("div",{className:"select-quote-popover__quote-source-toggle"},a.default.createElement(h,null)))),C.map((({destinationTokenValue:e,networkFees:t,isBestQuote:n,quoteSource:l,aggId:u},c)=>a.default.createElement("div",{className:(0,i.default)("select-quote-popover__row",{"select-quote-popover__row--selected":T===c,"select-quote-popover__row--no-hover":w}),onClick:()=>r(u),key:`select-quote-popover-row-${c}`,"data-testid":`select-quote-popover-row-${c}`},a.default.createElement("div",{className:"select-quote-popover__receiving"},a.default.createElement("div",{className:"select-quote-popover__receiving-value"},n&&a.default.createElement(s.default,{reverseColors:T!==c}),a.default.createElement("div",{className:"select-quote-popover__receiving-value-text",title:e},e)),"RFQ"===l&&a.default.createElement("span",{className:"select-quote-popover__zero-slippage"},v("swapZeroSlippage"))),a.default.createElement("div",{className:"select-quote-popover__network-fees"},!y&&E&&t),a.default.createElement("div",{className:"select-quote-popover__quote-source"},a.default.createElement("div",{className:(0,i.default)("select-quote-popover__quote-source-label",{"select-quote-popover__quote-source-label--green":"AGG"===l,"select-quote-popover__quote-source-label--orange":"RFQ"===l,"select-quote-popover__quote-source-label--blue":"DEX"===l})},l)),a.default.createElement("div",{className:"select-quote-popover__caret-right","data-testid":`select-quote-popover__caret-right-${c}`,onClick:e=>{e.stopPropagation(),o(u)},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},a.default.createElement("i",{className:"fa fa-angle-up"}))))))}b.propTypes={selectedAggId:o.default.string.isRequired,onSelect:o.default.func.isRequired,onCaretClick:o.default.func.isRequired,swapToSymbol:o.default.string.isRequired,quoteDataRows:o.default.arrayOf(c.QUOTE_DATA_ROWS_PROPTYPES_SHAPE).isRequired,sortDirection:o.default.number.isRequired,setSortDirection:o.default.func.isRequired,sortColumn:o.default.string,setSortColumn:o.default.func.isRequired,hideEstimatedGasFee:o.default.bool.isRequired}}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/sort-list/sort-list.js"}],[6958,{"../../../components/component-library":5806,"../../../components/ui/url-icon":6206,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,classnames:3584,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=p;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=c(e("prop-types")),o=c(e("classnames")),i=e("../../../components/component-library"),l=e("../../../helpers/constants/design-system"),s=c(e("../../../components/ui/url-icon")),u=e("../../../contexts/i18n");function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function p({onClick:e,onClose:t,selectedToken:r,testId:n}){const c=(0,a.useContext)(u.I18nContext),d=(null==r?void 0:r.iconUrl)&&(null==r?void 0:r.symbol);return a.default.createElement("div",{className:"selected-token"},a.default.createElement("div",{className:(0,o.default)("selected-token-list","selected-token-list__selector-closed-container","selected-token-input-pair__selector--closed"),"data-testid":"selected-token-list",tabIndex:"0",onClick:e,onKeyUp:r=>{"Escape"===r.key?t():"Enter"===r.key&&e(r)}},a.default.createElement("div",{className:"selected-token-list__selector-closed"},d&&a.default.createElement(s.default,{url:r.iconUrl,className:"selected-token-list__selector-closed-icon",name:null==r?void 0:r.symbol}),a.default.createElement("div",{className:(0,o.default)("selected-token-list__labels",{"selected-token-list__labels--with-icon":d})},a.default.createElement("div",{className:"selected-token-list__item-labels"},a.default.createElement("span",{"data-testid":n,className:(0,o.default)("selected-token-list__closed-primary-label",{"selected-token-list__select-default":!(null!=r&&r.symbol)})},(null==r?void 0:r.symbol)||c("swapSelectAToken"))))),a.default.createElement(i.Icon,{name:i.IconName.ArrowDown,size:i.IconSize.Xs,marginRight:3,color:l.IconColor.iconAlternative})))}p.propTypes={onClick:n.default.func.isRequired,onClose:n.default.func.isRequired,selectedToken:n.default.object.isRequired,testId:n.default.string}}}},{package:"$root$",file:"ui/pages/swaps/selected-token/selected-token.js"}],[6959,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement("svg",{width:"15",height:"13",viewBox:"0 0 15 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M14.4946 6.14779C14.4863 5.93594 14.3991 5.69108 14.2539 5.53666L9.51334 0.49958C9.1921 0.21091 8.57613 0.0917437 8.21709 0.425509C7.86344 0.754237 7.87396 1.39178 8.22627 1.72181L11.5595 5.25889L1.1618 5.25889C0.670919 5.25889 0.272949 5.65687 0.272949 6.14779C0.272949 6.6387 0.670919 7.03668 1.1618 7.03668L11.5595 7.03668L8.22627 10.5738C7.92297 10.8776 7.86691 11.5376 8.21709 11.8701C8.56718 12.2025 9.20529 12.0963 9.51334 11.796L14.2539 6.75891C14.4161 6.58653 14.4952 6.38428 14.4946 6.14779Z",fill:"var(--color-text-muted)"}))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/arrow-icon.js"}],[6960,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement("svg",{width:"41",height:"39",viewBox:"0 0 41 39",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M34.5805 6.55143C36.1394 8.11033 37.3994 9.91222 38.3237 11.8681C38.7066 12.6782 39.0318 13.5148 39.2968 14.3714L39.3242 14.4606C39.4816 14.9785 39.6171 15.5037 39.73 16.0347C40.6511 20.3654 40.0335 24.9029 37.9511 28.8509C35.6001 33.308 31.5749 36.6487 26.7609 38.138C24.3773 38.8754 21.8717 39.1361 19.3873 38.9052C16.9029 38.6743 14.4883 37.9563 12.2813 36.7922C10.2608 35.7264 8.52045 34.3588 7.08333 32.7636C5.61245 31.1448 4.43054 29.2824 3.59178 27.2574C3.32329 26.6092 2.89685 25.2767 2.89685 25.2767H6.89583C7.68667 27.4068 8.96033 29.362 10.6288 30.9609L10.6318 30.96C11.5096 31.8005 12.501 32.5516 13.595 33.1786C15.8742 34.483 18.4736 35.1864 21.1455 35.1864C25.1768 35.1864 29.0429 33.585 31.8935 30.7345C34.744 27.8839 36.3455 24.0177 36.3455 19.9865C36.3455 18.7267 36.1891 17.483 35.8871 16.2814C35.8206 16.017 35.7471 15.7546 35.6666 15.4945C34.4752 11.6432 31.8027 8.42306 28.237 6.54231C24.6713 4.66156 20.5045 4.27429 16.6533 5.46571C12.8837 6.63189 9.71868 9.21706 7.82253 12.6699L12.8961 15.307L3.28331 18.3447L0.245605 8.73191L4.45005 10.9171C6.81537 6.56278 10.7905 3.30177 15.5303 1.83546C17.3658 1.26761 19.2587 0.986653 21.1455 0.986694C26.1846 0.986694 31.0173 2.98824 34.5805 6.55143Z",fill:"var(--color-primary-default)"}),n.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.1252 22.1036L14.7107 18.689L12.0926 21.3257L18.1252 27.3584L30.2322 15.2515L27.614 12.6148L18.1252 22.1036Z",fill:"var(--color-primary-default)"}))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/canceled-icon.js"}],[6961,{"./smart-transaction-status":6963},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./smart-transaction-status"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/index.js"}],[6962,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement("svg",{width:"41",height:"39",viewBox:"0 0 41 39",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M34.6806 6.55143C36.2395 8.11033 37.4995 9.91222 38.4238 11.8681C38.8067 12.6782 39.1319 13.5148 39.3969 14.3714L39.4243 14.4606C39.5817 14.9785 39.7172 15.5037 39.8301 16.0347C40.7512 20.3654 40.1336 24.9029 38.0512 28.8509C35.7002 33.308 31.675 36.6487 26.861 38.138C24.4773 38.8754 21.9718 39.1361 19.4874 38.9052C17.003 38.6743 14.5884 37.9563 12.3814 36.7922C10.3609 35.7264 8.62055 34.3588 7.18343 32.7636C5.71254 31.1448 4.53064 29.2824 3.69188 27.2574C3.42339 26.6092 2.99695 25.2767 2.99695 25.2767H6.99592C7.78677 27.4068 9.06042 29.362 10.7289 30.9609L10.7319 30.96C11.6097 31.8005 12.6011 32.5516 13.6951 33.1786C15.9743 34.483 18.5737 35.1864 21.2456 35.1864C25.2769 35.1864 29.143 33.585 31.9936 30.7345C34.8441 27.8839 36.4456 24.0177 36.4456 19.9865C36.4456 18.7267 36.2892 17.483 35.9872 16.2814C35.9207 16.017 35.8471 15.7546 35.7667 15.4945C34.5753 11.6432 31.9028 8.42306 28.3371 6.54231C24.7714 4.66156 20.6046 4.27429 16.7534 5.46571C12.9838 6.63189 9.81878 9.21706 7.92263 12.6699L12.9962 15.307L3.3834 18.3447L0.345703 8.73191L4.55015 10.9171C6.91547 6.56278 10.8906 3.30177 15.6304 1.83546C17.4659 1.26761 19.3588 0.986653 21.2456 0.986694C26.2847 0.986694 31.1174 2.98824 34.6806 6.55143Z",fill:"var(--color-error-default)"}),n.default.createElement("path",{d:"M18.5849 19.9869L15.1454 23.4264L17.9845 26.2655L21.424 22.826L24.8635 26.2655L27.7026 23.4264L24.2631 19.9869L27.7026 16.5473L24.8635 13.7082L21.424 17.1478L17.9845 13.7082L15.1454 16.5473L18.5849 19.9869Z",fill:"var(--color-error-default)"}))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/reverted-icon.js"}],[6963,{"../../../../shared/constants/common":5250,"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/transaction":5278,"../../../../shared/lib/transactions-controller-utils":5292,"../../../../shared/modules/selectors":5319,"../../../../shared/modules/selectors/networks":5320,"../../../components/component-library":5806,"../../../components/ui/box":6079,"../../../components/ui/url-icon":6206,"../../../contexts/i18n":6211,"../../../contexts/metametrics":6214,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/routes":6254,"../../../selectors":6985,"../../../store/actions":7e3,"../create-new-swap":6930,"../swaps-footer":6968,"../swaps.util":6970,"../view-on-block-explorer":6972,"./arrow-icon":6959,"./canceled-icon":6960,"./reverted-icon":6962,"./success-icon":6964,"./timer-icon":6965,"./unknown-icon":6966,"@metamask/etherscan-link":1752,lodash:4380,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){var e,t,r,A,I,q,N,L,F;const[W,B]=(0,a.useState)(!1),U=(0,a.useContext)(s.I18nContext),$=(0,o.useHistory)(),z=(0,n.useDispatch)(),G=(0,n.useSelector)(u.getFetchParams,l.isEqual)||{},{destinationTokenInfo:H={},sourceTokenInfo:V={}}=(null==G?void 0:G.metaData)||{},Q=(0,n.useSelector)(d.isHardwareWallet),X=(0,n.useSelector)(d.getHardwareWalletType),Y=(0,n.useSelector)(u.getUsedQuote,l.isEqual),Z=(0,n.useSelector)(u.getCurrentSmartTransactions,l.isEqual),K=(0,n.useSelector)(c.getCurrentChainId),J=(0,n.useSelector)(d.getRpcPrefsForCurrentProvider,n.shallowEqual),ee=(0,n.useSelector)(u.getSwapsNetworkConfig,n.shallowEqual),te=(0,n.useSelector)(p.getSmartTransactionsEnabled),re=(0,n.useSelector)(u.getCurrentSmartTransactionsEnabled),ae=J.blockExplorerUrl??f.CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[K]??null;let ne,oe,ie=x.SmartTransactionStatus.pending,le={};if(Z&&Z.length>0){var se,ue,ce;le=Z[Z.length-1],ne=null===(se=le)||void 0===se?void 0:se.uuid,ie=(null===(ue=le)||void 0===ue?void 0:ue.status)||x.SmartTransactionStatus.pending,oe=null===(ce=le)||void 0===ce||null===(ce=ce.statusMetadata)||void 0===ce?void 0:ce.cancellationFeeWei}const[de,pe]=(0,a.useState)(ee.stxStatusDeadline),fe={needs_two_confirmations:!0,token_from:V.symbol??(null===(e=le)||void 0===e?void 0:e.sourceTokenSymbol),token_from_amount:(null==G?void 0:G.value)??(null===(t=le)||void 0===t?void 0:t.swapTokenValue),token_to:H.symbol??(null===(r=le)||void 0===r?void 0:r.destinationTokenSymbol),request_type:null!=G&&G.balanceError?"Quote":"Order",slippage:null==G?void 0:G.slippage,custom_slippage:2===(null==G?void 0:G.slippage),is_hardware_wallet:Q,hardware_wallet_type:X,stx_enabled:te,current_stx_enabled:re,stx_user_opt_in:(0,n.useSelector)(p.getSmartTransactionsOptInStatusForMetrics)};let me;var he;null!=Y&&Y.destinationAmount&&(me=(0,S.calcTokenAmount)(null==Y?void 0:Y.destinationAmount,H.decimals??(null===(he=le)||void 0===he?void 0:he.destinationTokenDecimals)).toPrecision(8));const be=(0,a.useContext)(C.MetaMetricsContext),ge=ie===x.SmartTransactionStatus.pending,ye=ge||ie===x.SmartTransactionStatus.success,ve=null===(A=le)||void 0===A||null===(A=A.statusMetadata)||void 0===A?void 0:A.minedHash;(0,a.useEffect)((()=>{be({event:"STX Status Page Loaded",category:w.MetaMetricsEventCategory.Swaps,sensitiveProperties:fe})}),[]),(0,a.useEffect)((()=>{let e;if(ge&&ne){const t=()=>{const t=Math.round((Date.now()-le.time)/1e3);if(t>ee.stxStatusDeadline)return pe(0),void clearInterval(e);pe(ee.stxStatusDeadline-t)};e=setInterval(t,1e3),t()}return()=>clearInterval(e)}),[z,ge,ne,le.time,ee.stxStatusDeadline]),(0,a.useEffect)((()=>{z((0,v.setBackgroundSwapRouteState)("smartTransactionStatus")),setTimeout((()=>{z((0,v.stopPollingForQuotes)())}),1e3)}),[z]);let we,xe,Ee,_e,Ce=U("stxPendingPrivatelySubmittingSwap");ge&&(W?Ce=U("stxTryingToCancel"):oe>0&&(Ce=U("stxPendingPubliclySubmittingSwap")));if(ie===x.SmartTransactionStatus.success){var Te,ke;if(Ce=U("stxSuccess"),H.symbol||null!==(Te=le)&&void 0!==Te&&Te.destinationTokenSymbol)we=U("stxSuccessDescription",[H.symbol??(null===(ke=le)||void 0===ke?void 0:ke.destinationTokenSymbol)]);Ee=a.default.createElement(R.default,null)}else"cancelled_user_cancelled"===ie||(null===(I=le)||void 0===I||null===(I=I.statusMetadata)||void 0===I?void 0:I.minedTx)===x.SmartTransactionStatus.cancelled?(Ce=U("stxUserCancelled"),we=U("stxUserCancelledDescription"),Ee=a.default.createElement(M.default,null)):ie.startsWith("cancelled")||ie.includes("deadline_missed")?(Ce=U("stxCancelled"),we=U("stxCancelledDescription"),xe=U("stxCancelledSubDescription"),Ee=a.default.createElement(M.default,null)):"unknown"===ie?(Ce=U("stxUnknown"),we=U("stxUnknownDescription"),Ee=a.default.createElement(O.default,null)):"reverted"===ie&&(Ce=U("stxFailure"),we=U("stxFailureDescription",[a.default.createElement("a",{className:"smart-transaction-status__support-link",key:"smart-transaction-status-support-link",href:"https://support.metamask.io",target:"_blank",rel:"noopener noreferrer"},U("customerSupport"))]),Ee=a.default.createElement(P.default,null));ve&&ne&&(_e=(0,i.getBlockExplorerLink)({hash:ve,chainId:K},{blockExplorerUrl:ae}));const Se=le.cancellable&&!W,Re=()=>a.default.createElement(b.default,{marginBottom:0},a.default.createElement("a",{className:"smart-transaction-status__cancel-swap-link",href:"#",onClick:e=>{null==e||e.preventDefault(),B(!0),be({event:"Cancel STX",category:w.MetaMetricsEventCategory.Swaps,sensitiveProperties:fe}),z((0,u.cancelSwapsSmartTransaction)(ne))}},U("attemptToCancelSwapForFree")));return a.default.createElement("div",{className:"smart-transaction-status"},a.default.createElement(b.default,{paddingLeft:8,paddingRight:8,height:y.BLOCK_SIZES.FULL,justifyContent:y.JustifyContent.flexStart,display:y.DISPLAY.FLEX,className:"smart-transaction-status__content"},a.default.createElement(b.default,{marginTop:10,marginBottom:0,display:y.DISPLAY.FLEX,justifyContent:y.JustifyContent.center,alignItems:y.AlignItems.center},a.default.createElement(h.Text,{color:y.TextColor.textAlternative,variant:y.TextVariant.bodySm,as:"h6"},`${(null==G?void 0:G.value)&&Number(G.value).toFixed(5)} `),a.default.createElement(h.Text,{color:y.TextColor.textAlternative,variant:y.TextVariant.bodySmBold,as:"h6",marginLeft:1,marginRight:2},V.symbol??(null===(q=le)||void 0===q?void 0:q.sourceTokenSymbol)),V.iconUrl?a.default.createElement(g.default,{url:V.iconUrl,className:"smart-transactions-status-summary__icon",name:V.symbol??(null===(N=le)||void 0===N?void 0:N.destinationTokenSymbol),fallbackClassName:"smart-transactions-status-summary__icon-fallback"}):null,a.default.createElement(b.default,{display:y.DISPLAY.BLOCK,marginLeft:2,marginRight:2},a.default.createElement(D.default,null)),H.iconUrl?a.default.createElement(g.default,{url:H.iconUrl,className:"smart-transactions-status-summary__icon",name:H.symbol??(null===(L=le)||void 0===L?void 0:L.destinationTokenSymbol),fallbackClassName:"smart-transactions-status-summary__icon-fallback"}):null,a.default.createElement(h.Text,{color:y.TextColor.textAlternative,variant:y.TextVariant.bodySm,as:"h6",marginLeft:2},`~${me&&Number(me).toFixed(5)} `),a.default.createElement(h.Text,{color:y.TextColor.textAlternative,variant:y.TextVariant.bodySmBold,as:"h6",marginLeft:1},H.symbol??(null===(F=le)||void 0===F?void 0:F.destinationTokenSymbol))),a.default.createElement(b.default,{marginTop:3,className:"smart-transaction-status__spacer-box--top"}),Ee&&a.default.createElement(b.default,{marginTop:3,marginBottom:2},Ee),ge&&a.default.createElement(b.default,{marginTop:7,marginBottom:1,display:y.DISPLAY.FLEX,justifyContent:y.JustifyContent.center,alignItems:y.AlignItems.center},a.default.createElement(j.default,null),a.default.createElement(h.Text,{color:y.TextColor.textAlternative,variant:y.TextVariant.bodySm,as:"h6",marginLeft:1},`${U("stxSwapCompleteIn")} `),a.default.createElement(h.Text,{color:y.TextColor.textAlternative,variant:y.TextVariant.bodySmBold,as:"h6",marginLeft:1,className:"smart-transaction-status__remaining-time"},(0,_.showRemainingTimeInMinAndSec)(de))),a.default.createElement(h.Text,{"data-testid":"swap-smart-transaction-status-header",color:y.TextColor.textDefault,variant:y.TextVariant.headingSm,as:"h4",fontWeight:y.FontWeight.Bold},Ce),ge&&a.default.createElement("div",{className:"smart-transaction-status__loading-bar-container"},a.default.createElement("div",{className:"smart-transaction-status__loading-bar",style:{width:100/ee.stxStatusDeadline*(ee.stxStatusDeadline-de)+"%"}})),we&&a.default.createElement(h.Text,{"data-testid":"swap-smart-transaction-status-description",variant:y.TextVariant.bodySm,as:"h6",marginTop:_e&&1,color:y.TextColor.textAlternative},we),_e&&a.default.createElement(k.default,{blockExplorerUrl:_e,sensitiveTrackingProperties:fe}),a.default.createElement(b.default,{marginTop:3,className:"smart-transaction-status__spacer-box--bottom"}),xe&&a.default.createElement(h.Text,{variant:y.TextVariant.bodySm,as:"h6",marginTop:8,color:y.TextColor.textAlternative},xe)),Se&&ne&&ge&&a.default.createElement(Re,null),ie===x.SmartTransactionStatus.success?a.default.createElement(T.default,{sensitiveTrackingProperties:fe}):null,a.default.createElement(E.default,{onSubmit:async()=>{ye?(await z((0,u.prepareToLeaveSwaps)()),$.push(m.DEFAULT_ROUTE)):$.push(m.PREPARE_SWAP_ROUTE)},onCancel:async()=>{await z((0,u.prepareToLeaveSwaps)()),$.push(m.DEFAULT_ROUTE)},submitText:U(ye?"close":"tryAgain"),hideCancel:ye,cancelText:U("close"),className:"smart-transaction-status__swaps-footer"}))};var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=I(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=e("react-router-dom"),i=e("@metamask/etherscan-link"),l=e("lodash"),s=e("../../../contexts/i18n"),u=e("../../../ducks/swaps/swaps"),c=e("../../../../shared/modules/selectors/networks"),d=e("../../../selectors"),p=e("../../../../shared/modules/selectors"),f=e("../../../../shared/constants/common"),m=e("../../../helpers/constants/routes"),h=e("../../../components/component-library"),b=A(e("../../../components/ui/box")),g=A(e("../../../components/ui/url-icon")),y=e("../../../helpers/constants/design-system"),v=e("../../../store/actions"),w=e("../../../../shared/constants/metametrics"),x=e("../../../../shared/constants/transaction"),E=A(e("../swaps-footer")),_=e("../swaps.util"),C=e("../../../contexts/metametrics"),T=A(e("../create-new-swap")),k=A(e("../view-on-block-explorer")),S=e("../../../../shared/lib/transactions-controller-utils"),R=A(e("./success-icon")),P=A(e("./reverted-icon")),M=A(e("./canceled-icon")),O=A(e("./unknown-icon")),D=A(e("./arrow-icon")),j=A(e("./timer-icon"));function A(e){return e&&e.__esModule?e:{default:e}}function I(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(I=function(e){return e?r:t})(e)}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/smart-transaction-status.js"}],[6964,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement("svg",{width:"39",height:"39",viewBox:"0 0 39 39",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M34.5457 19.8983C34.5457 23.9296 32.9443 27.7958 30.0937 30.6463C27.2432 33.4969 23.377 35.0983 19.3457 35.0983C15.3144 35.0983 11.4482 33.4969 8.59768 30.6463C5.74713 27.7958 4.1457 23.9296 4.1457 19.8983C4.1457 15.867 5.74713 12.0008 8.59768 9.15029C11.4482 6.29974 15.3144 4.69832 19.3457 4.69832C20.7897 4.69832 22.1957 4.90732 23.5257 5.28732L26.5087 2.30432C24.3047 1.39232 21.8917 0.898315 19.3457 0.898315C16.8506 0.898315 14.3799 1.38977 12.0747 2.3446C9.76953 3.29944 7.67499 4.69897 5.91067 6.46329C2.34748 10.0265 0.345703 14.8592 0.345703 19.8983C0.345703 24.9374 2.34748 29.7702 5.91067 33.3333C7.67499 35.0977 9.76953 36.4972 12.0747 37.452C14.3799 38.4069 16.8506 38.8983 19.3457 38.8983C24.3848 38.8983 29.2175 36.8965 32.7807 33.3333C36.3439 29.7702 38.3457 24.9374 38.3457 19.8983H34.5457ZM11.5747 16.2503L8.8957 18.9483L17.4457 27.4983L36.4457 8.49832L33.7667 5.80032L17.4457 22.1213L11.5747 16.2503Z",fill:"var(--color-success-default)"}))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/success-icon.js"}],[6965,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M7.36621 0.0810547C3.62012 0.0810547 0.584961 3.11621 0.584961 6.8623C0.584961 10.6084 3.62012 13.6436 7.36621 13.6436C11.1123 13.6436 14.1475 10.6084 14.1475 6.8623C14.1475 3.11621 11.1123 0.0810547 7.36621 0.0810547ZM7.36621 12.3311C4.33105 12.3311 1.89746 9.89746 1.89746 6.8623C1.89746 3.85449 4.33105 1.39355 7.36621 1.39355C10.374 1.39355 12.835 3.85449 12.835 6.8623C12.835 9.89746 10.374 12.3311 7.36621 12.3311ZM9.03418 9.4873C9.19824 9.59668 9.38965 9.56934 9.49902 9.40527L10.0186 8.72168C10.1279 8.55762 10.1006 8.36621 9.93652 8.25684L8.13184 6.91699V3.03418C8.13184 2.87012 7.96777 2.70605 7.80371 2.70605H6.92871C6.7373 2.70605 6.60059 2.87012 6.60059 3.03418V7.5459C6.60059 7.62793 6.62793 7.7373 6.70996 7.79199L9.03418 9.4873Z",fill:"var(--color-primary-default)"}))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/timer-icon.js"}],[6966,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement("svg",{width:"39",height:"39",viewBox:"0 0 39 39",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("circle",{cx:"19.1533",cy:"19.2715",r:"17.1",stroke:"var(--color-primary-default)",strokeWidth:"3.8"}),n.default.createElement("path",{d:"M16.712 21.5034C16.712 20.7834 16.88 20.1834 17.216 19.7034C17.568 19.2074 18.08 18.7274 18.752 18.2634C19.008 18.0874 19.264 17.9274 19.52 17.7834C19.776 17.6394 20 17.4874 20.192 17.3274C20.4 17.1514 20.56 16.9674 20.672 16.7754C20.8 16.5674 20.864 16.3194 20.864 16.0314C20.864 15.5354 20.688 15.1594 20.336 14.9034C20 14.6474 19.592 14.5194 19.112 14.5194C18.616 14.5194 18.16 14.6794 17.744 14.9994C17.344 15.3034 17.144 15.7674 17.144 16.3914H13.52C13.52 15.6394 13.664 14.9354 13.952 14.2794C14.24 13.6074 14.632 13.0314 15.128 12.5514C15.64 12.0554 16.232 11.6634 16.904 11.3754C17.592 11.0874 18.328 10.9434 19.112 10.9434C19.896 10.9434 20.616 11.0794 21.272 11.3514C21.944 11.6234 22.512 11.9834 22.976 12.4314C23.456 12.8794 23.824 13.3994 24.08 13.9914C24.352 14.5674 24.488 15.1754 24.488 15.8154C24.488 16.2314 24.456 16.6234 24.392 16.9914C24.344 17.3594 24.24 17.7114 24.08 18.0474C23.936 18.3834 23.728 18.7114 23.456 19.0314C23.184 19.3514 22.84 19.6634 22.424 19.9674C21.784 20.4474 21.272 20.8234 20.888 21.0954C20.52 21.3674 20.336 21.6474 20.336 21.9354V21.9594H16.712V21.5034ZM18.512 28.4634C18.16 28.4634 17.824 28.3994 17.504 28.2714C17.2 28.1274 16.928 27.9434 16.688 27.7194C16.464 27.4794 16.28 27.2074 16.136 26.9034C16.008 26.5834 15.944 26.2474 15.944 25.8954C15.944 25.5434 16.008 25.2154 16.136 24.9114C16.28 24.5914 16.464 24.3194 16.688 24.0954C16.928 23.8554 17.2 23.6714 17.504 23.5434C17.824 23.3994 18.16 23.3274 18.512 23.3274C18.864 23.3274 19.192 23.3994 19.496 23.5434C19.816 23.6714 20.088 23.8554 20.312 24.0954C20.552 24.3194 20.736 24.5914 20.864 24.9114C21.008 25.2154 21.08 25.5434 21.08 25.8954C21.08 26.2474 21.008 26.5834 20.864 26.9034C20.736 27.2074 20.552 27.4794 20.312 27.7194C20.088 27.9434 19.816 28.1274 19.496 28.2714C19.192 28.3994 18.864 28.4634 18.512 28.4634Z",fill:"var(--color-primary-default)"}))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/unknown-icon.js"}],[6967,{"../../../../shared/constants/swaps":5274,"../../../components/component-library":5806,"../../../components/component-library/banner-alert":5762,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=h;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=f(e("prop-types")),i=e("../../../contexts/i18n"),l=e("../../../components/component-library/banner-alert"),s=f(e("../../../components/ui/box")),u=e("../../../helpers/constants/design-system"),c=e("../../../components/component-library"),d=e("../../../../shared/constants/swaps"),p=e("../../../ducks/swaps/swaps");function f(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}function h({swapsErrorKey:e,showTransactionSettingsLink:t,currentSlippage:r}){const o=(0,a.useContext)(i.I18nContext),f=(0,n.useDispatch)();let m,h,b=u.SEVERITIES.DANGER;const g=a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd},a.default.createElement(c.ButtonLink,{onClick:e=>{e.preventDefault(),f((0,p.setTransactionSettingsOpened)(!0))},size:c.ButtonLinkSize.Inherit},o("swapAdjustSlippage")));switch(e){case d.SLIPPAGE_VERY_HIGH_ERROR:m=o("swapSlippageOverLimitTitle"),h=a.default.createElement(s.default,null,a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapSlippageOverLimitDescription")),g);break;case d.SLIPPAGE_HIGH_ERROR:b=u.SEVERITIES.WARNING,m=o("swapSlippageHighTitle"),h=a.default.createElement(s.default,null,a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapSlippageHighDescription",[r])),t&&g);break;case d.SLIPPAGE_LOW_ERROR:b=u.SEVERITIES.WARNING,m=o("swapSlippageLowTitle"),h=a.default.createElement(s.default,null,a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapSlippageLowDescription",[r])),t&&g);break;case d.SLIPPAGE_NEGATIVE_ERROR:m=o("swapSlippageNegativeTitle"),h=a.default.createElement(s.default,null,a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapSlippageNegativeDescription")),g);break;case d.QUOTES_NOT_AVAILABLE_ERROR:m=o("swapQuotesNotAvailableErrorTitle"),h=a.default.createElement(s.default,null,a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapQuotesNotAvailableDescription")),a.default.createElement(c.ButtonLink,{size:c.ButtonLinkSize.Inherit,textProps:{variant:u.TextVariant.bodyMd,alignItems:u.AlignItems.flexStart},as:"a",href:"https://support.metamask.io/token-swaps/user-guide-swaps/",target:"_blank",rel:"noopener noreferrer"},o("swapLearnMore")));break;case d.ERROR_FETCHING_QUOTES:m=o("swapFetchingQuotesErrorTitle"),h=a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapFetchingQuotesErrorDescription"));break;case d.CONTRACT_DATA_DISABLED_ERROR:m=o("swapContractDataDisabledErrorTitle"),h=a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapContractDataDisabledErrorDescription"));break;case d.QUOTES_EXPIRED_ERROR:m=o("swapQuotesExpiredErrorTitle"),h=a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapQuotesExpiredErrorDescription"));break;case d.OFFLINE_FOR_MAINTENANCE:m=o("offlineForMaintenance"),h=a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("metamaskSwapsOfflineDescription"));break;case d.SWAP_FAILED_ERROR:m=o("swapFailedErrorTitle")}return a.default.createElement(l.BannerAlert,{severity:b,title:m,titleProps:{"data-testid":"swaps-banner-title"}},h)}h.propTypes={swapsErrorKey:o.default.string,showTransactionSettingsLink:o.default.bool,currentSlippage:o.default.number}}}},{package:"$root$",file:"ui/pages/swaps/swaps-banner-alert/swaps-banner-alert.js"}],[6968,{"./swaps-footer":6969},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./swaps-footer"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/swaps-footer/index.js"}],[6969,{"../../../components/ui/page-container/page-container-footer":6161,"../../../contexts/i18n":6211,classnames:3584,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=c;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=s(e("prop-types")),o=s(e("classnames")),i=e("../../../contexts/i18n"),l=s(e("../../../components/ui/page-container/page-container-footer"));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c({onCancel:e,hideCancel:t,onSubmit:r,submitText:n,disabled:s,showTermsOfService:u,showTopBorder:c,className:d="",cancelText:p}){const f=(0,a.useContext)(i.I18nContext);return a.default.createElement("div",{className:"swaps-footer"},a.default.createElement("div",{className:(0,o.default)("swaps-footer__buttons",d,{"swaps-footer__buttons--border":c})},a.default.createElement(l.default,{onCancel:e,hideCancel:t,cancelText:p||f("back"),onSubmit:r,submitText:n,footerClassName:(0,o.default)("swaps-footer__custom-page-container-footer-class",d),footerButtonClassName:(0,o.default)("swaps-footer__custom-page-container-footer-button-class",{"swaps-footer__custom-page-container-footer-button-class--single":t}),disabled:s})),u&&a.default.createElement("div",{className:"swaps-footer__bottom-text",onClick:()=>global.platform.openTab({url:"https://metamask.io/terms.html"})},f("termsOfService")))}c.propTypes={onCancel:n.default.func,hideCancel:n.default.bool,onSubmit:n.default.func,submitText:n.default.string,disabled:n.default.bool,showTermsOfService:n.default.bool,showTopBorder:n.default.bool,className:n.default.string,cancelText:n.default.string}}}},{package:"$root$",file:"ui/pages/swaps/swaps-footer/swaps-footer.js"}],[6971,{"../../../../shared/constants/swaps":5274,"../../../components/component-library":5806,"../../../components/component-library/modal-content/deprecated":5816,"../../../components/component-library/modal-header/deprecated":5825,"../../../components/ui/box":6079,"../../../components/ui/button":6083,"../../../components/ui/button-group":6081,"../../../components/ui/info-tooltip":6134,"../../../components/ui/typography":6201,"../../../contexts/i18n":6211,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"../../../store/actions":7e3,classnames:3584,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=E;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=x(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=w(e("prop-types")),i=w(e("classnames")),l=e("../../../contexts/i18n"),s=w(e("../../../components/ui/button-group")),u=w(e("../../../components/ui/button")),c=w(e("../../../components/ui/info-tooltip")),d=w(e("../../../components/ui/box")),p=w(e("../../../components/ui/typography")),f=e("../../../helpers/constants/design-system"),m=e("../../../../shared/constants/swaps"),h=e("../../../components/component-library"),b=e("../../../components/component-library/modal-content/deprecated"),g=e("../../../components/component-library/modal-header/deprecated"),y=e("../../../store/actions"),v=e("../../../ducks/swaps/swaps");function w(e){return e&&e.__esModule?e:{default:e}}function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(x=function(e){return e?r:t})(e)}function E({onSelect:e,onModalClose:t,maxAllowedSlippage:r,currentSlippage:o,isDirectWrappingEnabled:w}){const x=(0,a.useContext)(l.I18nContext),E=(0,n.useDispatch)(),_=(0,n.useSelector)(v.getSwapsErrorKey),[C,T]=(0,a.useState)((()=>"number"!=typeof o||Object.values(m.Slippage).includes(o)?"":o.toString())),[k,S]=(0,a.useState)(!1),[R,P]=(0,a.useState)((()=>o===m.Slippage.high?1:o===m.Slippage.default?0:"number"==typeof o?2:0)),[M,O]=(0,a.useState)(null),[D,j]=(0,a.useState)(o),A=D!==o;let I="",q="",N=f.SEVERITIES.INFO;C&&(Number(C)<0?(N=f.SEVERITIES.DANGER,I=x("swapSlippageNegativeDescription"),q=x("swapSlippageNegativeTitle"),E((0,y.setSwapsErrorKey)(m.SLIPPAGE_NEGATIVE_ERROR))):Number(C)>0&&Number(C)<=1?(N=f.SEVERITIES.WARNING,I=x("swapSlippageLowDescription",[D]),q=x("swapSlippageLowTitle")):Number(C)>=5&&Number(C)<=r?(N=f.SEVERITIES.WARNING,I=x("swapSlippageHighDescription",[D]),q=x("swapSlippageHighTitle")):Number(C)>r?(N=f.SEVERITIES.DANGER,I=x("swapSlippageOverLimitDescription"),q=x("swapSlippageOverLimitTitle"),E((0,y.setSwapsErrorKey)(m.SLIPPAGE_VERY_HIGH_ERROR))):0===Number(C)?(N=f.SEVERITIES.INFO,I=x("swapSlippageZeroDescription"),q=x("swapSlippageZeroTitle")):_&&E((0,y.setSwapsErrorKey)("")));const L=N===f.SEVERITIES.DANGER,F=C||x("swapCustom");return(0,a.useEffect)((()=>{M&&k&&window.document.activeElement!==M&&M.focus()}),[M,k]),(0,a.useEffect)((()=>{2!==R&&E((0,y.setSwapsErrorKey)(""))}),[E,R]),a.default.createElement(h.Modal,{onClose:t,isOpen:!0,isClosedOnOutsideClick:!1,isClosedOnEscapeKey:!0,className:"mm-modal__custom-scrollbar"},a.default.createElement(h.ModalOverlay,null),a.default.createElement(b.ModalContent,null,a.default.createElement(g.ModalHeader,{onClose:t},x("transactionSettings")),a.default.createElement(d.default,{display:f.DISPLAY.FLEX,flexDirection:f.FlexDirection.Column,justifyContent:f.JustifyContent.spaceBetween,alignItems:f.AlignItems.stretch,className:"transaction-settings__content"},a.default.createElement(d.default,{marginTop:7,marginBottom:5},a.default.createElement(a.default.Fragment,null,!w&&a.default.createElement(a.default.Fragment,null,a.default.createElement(d.default,{display:f.DISPLAY.FLEX,alignItems:f.AlignItems.center},a.default.createElement(p.default,{variant:f.TypographyVariant.H6,boxProps:{paddingRight:2}},x("swapsMaxSlippage")),a.default.createElement(c.default,{position:"top",iconFillColor:"var(--color-icon-muted)",contentText:x("swapSlippageTooltip")})),a.default.createElement(d.default,{display:f.DISPLAY.FLEX},a.default.createElement(s.default,{defaultActiveButtonIndex:2!==R||C?R:1,variant:"radiogroup",newActiveButtonIndex:R,className:(0,i.default)("button-group","transaction-settings__button-group")},a.default.createElement(u.default,{onClick:()=>{T(""),S(!1),P(0),j(m.Slippage.default)}},x("swapSlippagePercent",[m.Slippage.default])),a.default.createElement(u.default,{onClick:()=>{T(""),S(!1),P(1),j(m.Slippage.high)}},x("swapSlippagePercent",[m.Slippage.high])),a.default.createElement(u.default,{className:(0,i.default)("transaction-settings__button-group-custom-button",{"radio-button--danger":L}),onClick:()=>{P(2),S(!0)}},k?a.default.createElement("div",{className:(0,i.default)("transaction-settings__custom-input",{"transaction-settings__custom-input--danger":L})},a.default.createElement("input",{"data-testid":"transaction-settings-custom-slippage",onChange:e=>{const{value:t}=e.target;!isNaN(Number(t))&&(T(t),j(Number(t)))},type:"text",maxLength:"4",ref:O,onBlur:()=>{S(!1)},onKeyDown:e=>{"Enter"===e.key&&S(!1)},value:C||""})):F,(C||k)&&a.default.createElement("div",{className:"transaction-settings__percentage-suffix"},"%")))))),I&&a.default.createElement(d.default,{marginTop:5},a.default.createElement(h.BannerAlert,{severity:N,title:q,titleProps:{"data-testid":"swaps-banner-title"}},a.default.createElement(p.default,{variant:f.TypographyVariant.H6,testId:"mm-banner-alert-notification-text"},I)))),a.default.createElement(d.default,{marginTop:5},a.default.createElement(h.ButtonPrimary,{onClick:()=>{D!==o&&e(D),t()},block:!0,disabled:!A,"data-testid":"update-transaction-settings-button"},x("update"))))))}E.propTypes={onSelect:o.default.func.isRequired,onModalClose:o.default.func.isRequired,maxAllowedSlippage:o.default.number.isRequired,currentSlippage:o.default.number,isDirectWrappingEnabled:o.default.bool}}}},{package:"$root$",file:"ui/pages/swaps/transaction-settings/transaction-settings.js"}],[6972,{"./view-on-block-explorer":6973},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./view-on-block-explorer"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/view-on-block-explorer/index.js"}],[6973,{"../../../../shared/constants/metametrics":5260,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../contexts/metametrics":6214,"../../../helpers/utils/util":6297,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=p;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=c(e("prop-types")),o=c(e("../../../components/ui/box")),i=e("../../../contexts/i18n"),l=e("../../../helpers/utils/util"),s=e("../../../contexts/metametrics"),u=e("../../../../shared/constants/metametrics");function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function p({blockExplorerUrl:e,sensitiveTrackingProperties:t}){const r=(0,a.useContext)(i.I18nContext),n=(0,a.useContext)(s.MetaMetricsContext),c=(0,l.getURLHostName)(e);return a.default.createElement(o.default,{marginTop:6,className:"view-on-block-explorer"},a.default.createElement("button",{onClick:()=>{n({event:u.MetaMetricsEventName.ExternalLinkClicked,category:u.MetaMetricsEventCategory.Swaps,sensitiveProperties:t,properties:{link_type:u.MetaMetricsEventLinkType.TransactionBlockExplorer,location:"Swap Transaction",url_domain:c}}),global.platform.openTab({url:e})}},r("viewOnCustomBlockExplorer",[r("blockExplorerSwapAction"),c])))}p.propTypes={blockExplorerUrl:n.default.string.isRequired,sensitiveTrackingProperties:n.default.object.isRequired}}}},{package:"$root$",file:"ui/pages/swaps/view-on-block-explorer/view-on-block-explorer.js"}],[6974,{"./unlock-page.container":6976},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a,n=(a=e("./unlock-page.container"))&&a.__esModule?a:{default:a};r.default=n.default}}},{package:"$root$",file:"ui/pages/unlock-page/index.js"}],[6975,{"../../../shared/constants/metametrics":5260,"../../../shared/lib/ui-utils":5293,"../../components/component-library":5806,"../../components/ui/button":6083,"../../components/ui/mascot":6148,"../../components/ui/text-field":6189,"../../helpers/constants/design-system":6248,"../../helpers/constants/routes":6254,"../../helpers/utils/build-types":6273,"./unlock-page.util":6977,events:3868,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=e("events"),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=g(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),o=b(e("prop-types")),i=e("../../components/component-library"),l=e("../../helpers/constants/design-system"),s=b(e("../../components/ui/button")),u=b(e("../../components/ui/text-field")),c=b(e("../../components/ui/mascot")),d=e("../../helpers/constants/routes"),p=e("../../../shared/constants/metametrics"),f=e("../../../shared/lib/ui-utils"),m=e("../../helpers/utils/build-types"),h=e("./unlock-page.util");function b(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(g=function(e){return e?r:t})(e)}function y(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 a=r.call(e,t||"default");if("object"!=typeof a)return a;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}class v extends n.Component{constructor(...e){super(...e),y(this,"state",{password:"",error:null}),y(this,"submitting",!1),y(this,"failed_attempts",0),y(this,"animationEventEmitter",new a.EventEmitter),y(this,"handleSubmit",(async e=>{e.preventDefault(),e.stopPropagation();const{password:t}=this.state,{onSubmit:r,forceUpdateMetamaskState:a}=this.props;if(""!==t&&!this.submitting){this.setState({error:null}),this.submitting=!0;try{await r(t),this.context.trackEvent({category:p.MetaMetricsEventCategory.Navigation,event:p.MetaMetricsEventName.AppUnlocked,properties:{failed_attempts:this.failed_attempts}},{isNewVisit:!0})}catch({message:e}){this.failed_attempts+=1,"Incorrect password"===e&&(await a(),this.context.trackEvent({category:p.MetaMetricsEventCategory.Navigation,event:p.MetaMetricsEventName.AppUnlockedFailed,properties:{reason:"incorrect_password",failed_attempts:this.failed_attempts}})),this.setState({error:e}),this.submitting=!1}}}))}UNSAFE_componentWillMount(){const{isUnlocked:e,history:t}=this.props;e&&t.push(d.DEFAULT_ROUTE)}handleInputChange({target:e}){if(this.setState({password:e.value,error:null}),e.getBoundingClientRect){const t=e,r=t.getBoundingClientRect(),a=(0,h.getCaretCoordinates)(t,t.selectionEnd);this.animationEventEmitter.emit("point",{x:r.left+a.left-t.scrollLeft,y:r.top+a.top-t.scrollTop})}}renderSubmitButton(){return n.default.createElement(s.default,{type:"submit","data-testid":"unlock-submit",style:{backgroundColor:"var(--color-primary-default)",color:"var(--color-primary-inverse)",marginTop:"20px",height:"60px",fontWeight:"400",boxShadow:"none",borderRadius:"100px"},disabled:!this.state.password,variant:"contained",size:"large",onClick:this.handleSubmit},this.context.t("unlock"))}render(){const{password:e,error:t}=this.state,{t:r}=this.context,{onRestore:a}=this.props;let o=r("appNameMmi");return o=r("needHelpLinkText"),n.default.createElement("div",{className:"unlock-page__container"},n.default.createElement("div",{className:"unlock-page","data-testid":"unlock-page"},n.default.createElement("div",{className:"unlock-page__mascot-container"},n.default.createElement(c.default,{animationEventEmitter:this.animationEventEmitter,width:"120",height:"120"}),(0,m.isBeta)()?n.default.createElement("div",{className:"unlock-page__mascot-container__beta"},r("beta")):null),n.default.createElement(i.Text,{"data-testid":"unlock-page-title",as:"h1",variant:l.TextVariant.headingLg,marginTop:1,color:l.TextColor.textAlternative},r("welcomeBack")),n.default.createElement("div",null,r("unlockMessage")),n.default.createElement("form",{className:"unlock-page__form",onSubmit:this.handleSubmit},n.default.createElement(u.default,{id:"password","data-testid":"unlock-password",label:r("password"),type:"password",value:e,onChange:e=>this.handleInputChange(e),error:t,autoFocus:!0,autoComplete:"current-password",theme:"material",fullWidth:!0})),this.renderSubmitButton(),n.default.createElement("div",{className:"unlock-page__links"},n.default.createElement(s.default,{type:"link",key:"import-account",className:"unlock-page__link",onClick:()=>a()},r("forgotPassword"))),n.default.createElement("div",{className:"unlock-page__support"},r("needHelp",[n.default.createElement("a",{href:f.SUPPORT_LINK,target:"_blank",rel:"noopener noreferrer",key:"need-help-link",onClick:()=>{this.context.trackEvent({category:p.MetaMetricsEventCategory.Navigation,event:p.MetaMetricsEventName.SupportLinkClicked,properties:{url:f.SUPPORT_LINK}},{contextPropsIntoEventProperties:[p.MetaMetricsContextProp.PageTitle]})}},o)]))))}}r.default=v,y(v,"contextTypes",{trackEvent:o.default.func,t:o.default.func}),y(v,"propTypes",{history:o.default.object.isRequired,isUnlocked:o.default.bool,onRestore:o.default.func,onSubmit:o.default.func,forceUpdateMetamaskState:o.default.func})}}},{package:"$root$",file:"ui/pages/unlock-page/unlock-page.component.js"}],[6976,{"../../../app/scripts/lib/util":135,"../../../shared/constants/app":5248,"../../helpers/constants/routes":6254,"../../store/actions":7e3,"./unlock-page.component":6975,"react-redux":4734,"react-router-dom":4761,redux:4794},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a,n=e("react-redux"),o=e("react-router-dom"),i=e("redux"),l=e("../../../app/scripts/lib/util"),s=e("../../../shared/constants/app"),u=e("../../helpers/constants/routes"),c=e("../../store/actions"),d=(a=e("./unlock-page.component"))&&a.__esModule?a:{default:a};r.default=(0,i.compose)(o.withRouter,(0,n.connect)((e=>{const{metamask:{isUnlocked:t}}=e;return{isUnlocked:t}}),(e=>({tryUnlockMetamask:t=>e((0,c.tryUnlockMetamask)(t)),markPasswordForgotten:()=>e((0,c.markPasswordForgotten)()),forceUpdateMetamaskState:()=>(0,c.forceUpdateMetamaskState)(e)})),((e,t,r)=>{const{markPasswordForgotten:a,tryUnlockMetamask:n,...o}=t,{history:i,onSubmit:c,...d}=r;return{...e,...o,...d,onRestore:async()=>{await a(),i.push(u.RESTORE_VAULT_ROUTE),(0,l.getEnvironmentType)()!==s.ENVIRONMENT_TYPE_POPUP&&(0,l.getEnvironmentType)()!==s.ENVIRONMENT_TYPE_NOTIFICATION||global.platform.openExtensionInBrowser(u.RESTORE_VAULT_ROUTE)},onSubmit:c||(async e=>{await n(e),i.push(u.DEFAULT_ROUTE)}),history:i}})))(d.default)}}},{package:"$root$",file:"ui/pages/unlock-page/unlock-page.container.js"}],[6977,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getCaretCoordinates=function(e,t){const r=document.createElement("div");r.id="password-mirror-div",document.body.appendChild(r);const a=window.getComputedStyle(e);r.textContent=new Array(t+1).join("•");const n=document.createElement("span");n.textContent="•",r.appendChild(n);const o={top:n.offsetTop+parseInt(a.borderTopWidth,10),left:n.offsetLeft+parseInt(a.borderLeftWidth,10)};return document.body.removeChild(r),o}}}},{package:"$root$",file:"ui/pages/unlock-page/unlock-page.util.js"}],[6978,{reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getIsUsingPaymaster=function(e){var t;const r=i(e);if(!r)return!1;const a=null===(t=r.userOperation)||void 0===t?void 0:t.paymasterAndData;return Boolean(null==a?void 0:a.length)&&"0x"!==a},r.getUserOperation=i,r.getUserOperations=n,r.selectUserOperationMetadata=r.selectPaymasterData=r.selectPaymasterAddress=void 0;var a=e("reselect");function n(e){return e.metamask.userOperations||{}}const o=r.selectUserOperationMetadata=(0,a.createSelector)(n,((e,t)=>t),((e,t)=>e[t]));function i(e){var t;const r=null===(t=e.confirmTransaction)||void 0===t?void 0:t.txData;if(!r)return undefined;const{id:a,isUserOperation:o}=r;if(!o)return undefined;return n(e)[a]}const l=r.selectPaymasterData=(0,a.createSelector)(o,(e=>{var t;const r=null==e||null===(t=e.userOperation)||void 0===t?void 0:t.paymasterAndData;return"0x"===r?undefined:r}));r.selectPaymasterAddress=(0,a.createSelector)(l,(e=>null==e?void 0:e.slice(0,42)))}}},{package:"$root$",file:"ui/selectors/account-abstraction.ts"}],[6980,{reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectAlerts=n,r.selectConfirmedAlertKeys=function(e,t){const{confirmed:r}=e.confirmAlerts,a=r[t]||{};return Object.keys(a).filter((e=>a[e]))},r.selectGeneralAlerts=r.selectFieldAlerts=void 0;var a=e("reselect");function n(e,t){return e.confirmAlerts.alerts[t]??[]}r.selectGeneralAlerts=(0,a.createSelector)(((e,t)=>n(e,t)),(e=>e.filter((e=>!e.field)))),r.selectFieldAlerts=(0,a.createSelector)(((e,t)=>n(e,t)),(e=>e.filter((e=>e.field))))}}},{package:"$root$",file:"ui/selectors/alerts.ts"}],[6986,{reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectSessionData=r.selectParticipateInMetaMetrics=r.selectIsSignedIn=void 0;var a=e("reselect");const n=e=>e.metamask;r.selectIsSignedIn=(0,a.createSelector)([n],(e=>e.isSignedIn)),r.selectParticipateInMetaMetrics=(0,a.createSelector)([n],(e=>e.participateInMetaMetrics)),r.selectSessionData=(0,a.createSelector)([n],(e=>e.sessionData))}}},{package:"$root$",file:"ui/selectors/metamask-notifications/authentication.ts"}],[6987,{"../../../shared/modules/selectors/util":5322,"@metamask/notification-services-controller":2115,reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectIsMetamaskNotificationsFeatureSeen=r.selectIsMetamaskNotificationsEnabled=r.selectIsFeatureAnnouncementsEnabled=r.isFetchingMetamaskNotifications=r.getSnapNotificationsUnreadCount=r.getSnapNotificationsReadCount=r.getOnChainMetamaskNotificationsUnreadCount=r.getOnChainMetamaskNotificationsReadCount=r.getMetamaskNotificationsUnreadCount=r.getMetamaskNotificationsReadList=r.getMetamaskNotifications=r.getMetamaskNotificationById=r.getIsUpdatingMetamaskNotificationsAccount=r.getIsUpdatingMetamaskNotifications=r.getIsCheckingAccountsPresence=r.getFeatureAnnouncementsUnreadCount=r.getFeatureAnnouncementsReadCount=void 0;var a=e("reselect"),n=e("@metamask/notification-services-controller"),o=e("../../../shared/modules/selectors/util");const{TRIGGER_TYPES:i}=n.NotificationServicesController.Constants,l=e=>e.metamask,s=r.getMetamaskNotifications=(0,a.createSelector)([l],(e=>e.metamaskNotificationsList));r.getMetamaskNotificationById=e=>(0,o.createDeepEqualSelector)([s],(t=>t.find((t=>t.id===e))));r.getMetamaskNotificationsReadList=(0,a.createSelector)([l],(e=>e.metamaskNotificationsReadList)),r.getMetamaskNotificationsUnreadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>!e.isRead)).length:0)),r.getFeatureAnnouncementsUnreadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>!e.isRead&&e.type===i.FEATURES_ANNOUNCEMENT)).length:0)),r.getFeatureAnnouncementsReadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>e.isRead&&e.type===i.FEATURES_ANNOUNCEMENT)).length:0)),r.getSnapNotificationsUnreadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>!e.isRead&&e.type===i.SNAP)).length:0)),r.getSnapNotificationsReadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>e.isRead&&e.type===i.SNAP)).length:0)),r.getOnChainMetamaskNotificationsUnreadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>!e.isRead&&e.type!==i.FEATURES_ANNOUNCEMENT&&e.type!==i.SNAP)).length:0)),r.getOnChainMetamaskNotificationsReadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>e.isRead&&e.type!==i.FEATURES_ANNOUNCEMENT&&e.type!==i.SNAP)).length:0)),r.selectIsMetamaskNotificationsFeatureSeen=(0,a.createSelector)([l],(e=>e.isMetamaskNotificationsFeatureSeen)),r.selectIsMetamaskNotificationsEnabled=(0,a.createSelector)([l],(e=>e.isNotificationServicesEnabled)),r.selectIsFeatureAnnouncementsEnabled=(0,a.createSelector)([l],(e=>e.isFeatureAnnouncementsEnabled)),r.getIsUpdatingMetamaskNotifications=(0,a.createSelector)([l],(e=>e.isUpdatingMetamaskNotifications)),r.isFetchingMetamaskNotifications=(0,a.createSelector)([l],(e=>e.isFetchingMetamaskNotifications)),r.getIsUpdatingMetamaskNotificationsAccount=(0,a.createSelector)([l],(e=>e.isUpdatingMetamaskNotificationsAccount)),r.getIsCheckingAccountsPresence=(0,a.createSelector)([l],(e=>e.isCheckingAccountsPresence))}}},{package:"$root$",file:"ui/selectors/metamask-notifications/metamask-notifications.ts"}],[6988,{reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectIsProfileSyncingUpdateLoading=r.selectIsProfileSyncingEnabled=r.selectIsAccountSyncingReadyToBeDispatched=void 0;var a=e("reselect");const n=e=>e.metamask;r.selectIsProfileSyncingEnabled=(0,a.createSelector)([n],(e=>e.isProfileSyncingEnabled)),r.selectIsProfileSyncingUpdateLoading=(0,a.createSelector)([n],(e=>e.isProfileSyncingUpdateLoading)),r.selectIsAccountSyncingReadyToBeDispatched=(0,a.createSelector)([n],(e=>e.isAccountSyncingReadyToBeDispatched))}}},{package:"$root$",file:"ui/selectors/metamask-notifications/profile-syncing.ts"}],[6991,{"./selectors":6993,reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectAllNftsFlat=r.getNftContractsByAddressOnCurrentChain=r.getNftContractsByAddressByChain=void 0;var a=e("reselect"),n=e("./selectors");const o=r.getNftContractsByAddressByChain=(0,a.createSelector)((function(e){return e.metamask.allNftContracts??{}}),(e=>Object.keys(e).map((t=>Object.keys(e[t]).map((r=>e[t][r].map((e=>({...e,chainId:r}))))))).flat().flat().reduce(((e,t)=>{const{chainId:r,...a}=t,n=e[r]??{};return e[r]=n,n[a.address.toLowerCase()]=a,e}),{})));r.getNftContractsByAddressOnCurrentChain=(0,a.createSelector)((e=>(0,n.getMemoizedCurrentChainId)(e)),o,((e,t)=>t[e]??{})),r.selectAllNftsFlat=(0,a.createSelector)((function(e){return e.metamask.allNfts??{}}),(e=>Object.values(e).reduce(((e,t)=>{const r=Object.values(t);return e.concat(...r)}),[])))}}},{package:"$root$",file:"ui/selectors/nft.ts"}],[6994,{"../../shared/modules/selectors/util":5322,"./transactions":6998,reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectUnapprovedMessages=r.selectUnapprovedMessage=void 0;var a=e("reselect"),n=e("../../shared/modules/selectors/util"),o=e("./transactions");const i=r.selectUnapprovedMessages=(0,a.createSelector)(o.unapprovedPersonalMsgsSelector,o.unapprovedTypedMessagesSelector,((e,t)=>({...e,...t}))),l=(0,a.createSelector)(i,((e,t)=>t),((e,t)=>e[t]));r.selectUnapprovedMessage=(0,n.createDeepEqualSelector)(l,(e=>e))}}},{package:"$root$",file:"ui/selectors/signatures.ts"}],[6995,{"../../../shared/modules/selectors/util":5322,"../accounts":6979,"../selectors":6993,reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getMemoizedAccountName=r.getAccountNameFromState=void 0;var a=e("reselect"),n=e("../selectors"),o=e("../accounts"),i=e("../../../shared/modules/selectors/util");const l=r.getAccountNameFromState=(0,a.createSelector)([o.getInternalAccounts,(e,t)=>t],n.getAccountName);r.getMemoizedAccountName=(0,i.createDeepEqualSelector)([l],(e=>e))}}},{package:"$root$",file:"ui/selectors/snaps/accounts.ts"}],[6996,{"../../../shared/modules/selectors/util":5322,"../../../shared/modules/string-utils":5324},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getMemoizedFullAddressBook=r.getFullAddressBook=r.getAddressBookEntryByNetwork=r.getAddressBookByNetwork=void 0;var a=e("../../../shared/modules/selectors/util"),n=e("../../../shared/modules/string-utils");const o=e=>e.metamask.addressBook;r.getFullAddressBook=o;const i=r.getMemoizedFullAddressBook=(0,a.createDeepEqualSelector)([o],(e=>e)),l=r.getAddressBookByNetwork=(0,a.createDeepEqualSelector)([i,(e,t)=>t],((e,t)=>e[t]?Object.values(e[t]):[]));r.getAddressBookEntryByNetwork=(0,a.createDeepEqualSelector)([(e,t,r)=>l(e,r),(e,t)=>t],((e,t)=>e.find((e=>(0,n.isEqualCaseInsensitive)(e.address,t)))))}}},{package:"$root$",file:"ui/selectors/snaps/address-book.ts"}],[6997,{"./accounts":6995,"./address-book":6996},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var a=e("./address-book");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var n=e("./accounts");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}))}}},{package:"$root$",file:"ui/selectors/snaps/index.ts"}],[7002,{"../ducks":6234,"@reduxjs/toolkit":2825,"remote-redux-devtools":3556},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){const t=Boolean(!1),r=[];t&&r.push((0,n.default)({name:"MetaMask",hostname:"localhost",port:8e3,realtime:!0}));return(0,a.configureStore)({reducer:o.default,middleware:e=>e({serializableCheck:!1,immutableCheck:!1}),devTools:!1,enhancers:r,preloadedState:e})};var a=e("@reduxjs/toolkit"),n=i(e("remote-redux-devtools")),o=i(e("../ducks"));function i(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/store/store.ts"}],[84,{"../../../shared/lib/transactions-controller-utils":5292,"../../../shared/modules/random-id":5314,"@metamask/rpc-errors":2304,"@metamask/safe-event-emitter":2306},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=e("@metamask/rpc-errors"),n=l(e("@metamask/safe-event-emitter")),o=l(e("../../../shared/modules/random-id")),i=e("../../../shared/lib/transactions-controller-utils");function l(e){return e&&e.__esModule?e:{default:e}}class s extends Error{}class u{constructor(e){this.connectionStream=e,this.notificationChannel=new n.default,this.uncaughtErrorChannel=new n.default,this.requests=new Map,this.connectionStream.on("data",this.handleResponse.bind(this)),this.connectionStream.on("end",this.close.bind(this)),this.responseHandled={},this.DisconnectError=s}send(e,t,r){this.requests.set(e,r),this.connectionStream.write(t),this.responseHandled[e]=!1,"getState"===t.method&&setTimeout((()=>!this.responseHandled[e]&&r?(delete this.responseHandled[e],r(new Error("No response from RPC"),null)):(delete this.responseHandled[e],!0)),i.TEN_SECONDS_IN_MILLISECONDS)}onNotification(e){this.notificationChannel.addListener("notification",(t=>{e(t)}))}onUncaughtError(e){this.uncaughtErrorChannel.addListener("error",(t=>{e(t)}))}close(){this.notificationChannel.removeAllListeners(),this.uncaughtErrorChannel.removeAllListeners();for(const[e,t]of this.requests)this.responseHandled[e]||(this.responseHandled[e]=!0,t(new s("disconnected")))}handleResponse(e){const{id:t,result:r,error:n,method:o,params:i}=e,l=t===undefined&&n===undefined,s=this.requests.get(t);if(this.responseHandled[t]=!0,!o||!i||l)if(o&&i&&l)this.notificationChannel.emit("notification",e);else{if(n){const e=new a.JsonRpcError(n.code,n.message,n.data);return e.stack=n.stack,s?(this.requests.delete(t),void s(e)):void this.uncaughtErrorChannel.emit("error",e)}s&&(this.requests.delete(t),s(null,r))}}}r.default=e=>{const t=new u(e);return new Proxy(t,{get:(e,t)=>e[t]?e[t]:(...r)=>{const a=r[r.length-1],n=r.slice(0,-1),i=(0,o.default)(),l={jsonrpc:"2.0",method:t,params:n,id:i};e.send(i,l,a)}})}}}},{package:"$root$",file:"app/scripts/lib/metaRPCClientFactory.js"}],[882,{"../Collapse":937,"../Paper":1051,"../styles/withStyles":1211,"../utils/useControlled":1234,"./AccordionContext":883,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/slicedToArray":323,"@babel/runtime/helpers/toArray":324,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776,"react-is":4629},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/toArray")),l=n(e("@babel/runtime/helpers/slicedToArray")),s=n(e("@babel/runtime/helpers/objectWithoutProperties")),u=a(e("react")),c=(e("react-is"),n(e("prop-types")),n(e("clsx"))),d=(e("@material-ui/utils"),n(e("../Collapse"))),p=n(e("../Paper")),f=n(e("../styles/withStyles")),m=n(e("./AccordionContext")),h=n(e("../utils/useControlled")),b=function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}};r.styles=b;var g=u.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,f=e.defaultExpanded,b=void 0!==f&&f,g=e.disabled,y=void 0!==g&&g,v=e.expanded,w=e.onChange,x=e.square,E=void 0!==x&&x,_=e.TransitionComponent,C=void 0===_?d.default:_,T=e.TransitionProps,k=(0,s.default)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),S=(0,h.default)({controlled:v,default:b,name:"Accordion",state:"expanded"}),R=(0,l.default)(S,2),P=R[0],M=R[1],O=u.useCallback((function(e){M(!P),w&&w(e,!P)}),[P,w,M]),D=u.Children.toArray(r),j=(0,i.default)(D),A=j[0],I=j.slice(1),q=u.useMemo((function(){return{expanded:P,disabled:y,toggle:O}}),[P,y,O]);return u.createElement(p.default,(0,o.default)({className:(0,c.default)(a.root,n,P&&a.expanded,y&&a.disabled,!E&&a.rounded),ref:t,square:E},k),u.createElement(m.default.Provider,{value:q},A),u.createElement(C,(0,o.default)({in:P,timeout:"auto"},T),u.createElement("div",{"aria-labelledby":A.props.id,id:A.props["aria-controls"],role:"region"},I)))})),y=(0,f.default)(b,{name:"MuiAccordion"})(g);r.default=y}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Accordion/Accordion.js"}],[883,{"@babel/runtime/helpers/interopRequireWildcard":312,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=a(e("react")).createContext({});var o=n;r.default=o}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Accordion/AccordionContext.js"}],[884,{"./Accordion":882,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Accordion"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Accordion/index.js"}],[885,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},spacing:{"& > :not(:first-child)":{marginLeft:8}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.disableSpacing,u=void 0!==n&&n,c=(0,i.default)(e,["classes","className","disableSpacing"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(r.root,a,!u&&r.spacing),ref:t},c))})),p=(0,u.default)(c,{name:"MuiAccordionActions"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AccordionActions/AccordionActions.js"}],[886,{"./AccordionActions":885,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./AccordionActions"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AccordionActions/index.js"}],[887,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=(0,i.default)(e,["classes","className"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(r.root,a),ref:t},n))})),p=(0,u.default)(c,{name:"MuiAccordionDetails"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AccordionDetails/AccordionDetails.js"}],[888,{"./AccordionDetails":887,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./AccordionDetails"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AccordionDetails/index.js"}],[889,{"../Accordion/AccordionContext":883,"../ButtonBase":913,"../IconButton":1001,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../ButtonBase")),c=n(e("../IconButton")),d=n(e("../styles/withStyles")),p=n(e("../Accordion/AccordionContext")),f=function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:e.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.action.focus},"&$disabled":{opacity:e.palette.action.disabledOpacity}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}};r.styles=f;var m=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,d=e.expandIcon,f=e.IconButtonProps,m=e.onBlur,h=e.onClick,b=e.onFocusVisible,g=(0,i.default)(e,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),y=l.useState(!1),v=y[0],w=y[1],x=l.useContext(p.default),E=x.disabled,_=void 0!==E&&E,C=x.expanded,T=x.toggle;return l.createElement(u.default,(0,o.default)({focusRipple:!1,disableRipple:!0,disabled:_,component:"div","aria-expanded":C,className:(0,s.default)(a.root,n,_&&a.disabled,C&&a.expanded,v&&a.focused),onFocusVisible:function(e){w(!0),b&&b(e)},onBlur:function(e){w(!1),m&&m(e)},onClick:function(e){T&&T(e),h&&h(e)},ref:t},g),l.createElement("div",{className:(0,s.default)(a.content,C&&a.expanded)},r),d&&l.createElement(c.default,(0,o.default)({className:(0,s.default)(a.expandIcon,C&&a.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},f),d))})),h=(0,d.default)(f,{name:"MuiAccordionSummary"})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AccordionSummary/AccordionSummary.js"}],[890,{"./AccordionSummary":889,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./AccordionSummary"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AccordionSummary/index.js"}],[891,{"../Paper":1051,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../utils/capitalize")),d=n(e("../Paper")),p=function(e){var t="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:t,color:e.palette.getContrastText(t)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}};r.styles=p;var f=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.color,u=void 0===n?"primary":n,p=e.position,f=void 0===p?"fixed":p,m=(0,i.default)(e,["classes","className","color","position"]);return l.createElement(d.default,(0,o.default)({square:!0,component:"header",elevation:4,className:(0,s.default)(r.root,r["position".concat((0,c.default)(f))],r["color".concat((0,c.default)(u))],a,"fixed"===f&&"mui-fixed"),ref:t},m))})),m=(0,u.default)(p,{name:"MuiAppBar"})(f);r.default=m}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AppBar/AppBar.js"}],[892,{"./AppBar":891,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./AppBar"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AppBar/index.js"}],[893,{"../internal/svg-icons/Person":1177,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../internal/svg-icons/Person")),d=function(e){return{root:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},colorDefault:{color:e.palette.background.default,backgroundColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},circle:{},rounded:{borderRadius:e.shape.borderRadius},square:{borderRadius:0},img:{width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4},fallback:{width:"75%",height:"75%"}}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.alt,a=e.children,n=e.classes,u=e.className,d=e.component,p=void 0===d?"div":d,f=e.imgProps,m=e.sizes,h=e.src,b=e.srcSet,g=e.variant,y=void 0===g?"circle":g,v=(0,i.default)(e,["alt","children","classes","className","component","imgProps","sizes","src","srcSet","variant"]),w=null,x=function(e){var t=e.src,r=e.srcSet,a=l.useState(!1),n=a[0],o=a[1];return l.useEffect((function(){if(!t&&!r)return undefined;o(!1);var e=!0,a=new Image;return a.src=t,a.srcSet=r,a.onload=function(){e&&o("loaded")},a.onerror=function(){e&&o("error")},function(){e=!1}}),[t,r]),n}({src:h,srcSet:b}),E=h||b,_=E&&"error"!==x;return w=_?l.createElement("img",(0,o.default)({alt:r,src:h,srcSet:b,sizes:m,className:n.img},f)):null!=a?a:E&&r?r[0]:l.createElement(c.default,{className:n.fallback}),l.createElement(p,(0,o.default)({className:(0,s.default)(n.root,n.system,n[y],u,!_&&n.colorDefault),ref:t},v),w)})),f=(0,u.default)(d,{name:"MuiAvatar"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Avatar/Avatar.js"}],[894,{"./Avatar":893,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Avatar"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Avatar/index.js"}],[895,{"../Fade":968,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../Fade")),d={root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.invisible,d=void 0!==u&&u,p=e.open,f=e.transitionDuration,m=e.TransitionComponent,h=void 0===m?c.default:m,b=(0,i.default)(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return l.createElement(h,(0,o.default)({in:p,timeout:f},b),l.createElement("div",{className:(0,s.default)(a.root,n,d&&a.invisible),"aria-hidden":!0,ref:t},r))})),f=(0,u.default)(d,{name:"MuiBackdrop"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Backdrop/Backdrop.js"}],[896,{"./Backdrop":895,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Backdrop"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Backdrop/index.js"}],[897,{"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../utils/capitalize")),d=function(e){return{root:{position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0},badge:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorError:{backgroundColor:e.palette.error.main,color:e.palette.error.contrastText},dot:{borderRadius:4,height:8,minWidth:8,padding:0},anchorOriginTopRightRectangle:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightRectangle:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftRectangle:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftRectangle:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginTopRightCircle:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightCircle:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftCircle:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftCircle:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},invisible:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.anchorOrigin,a=void 0===r?{vertical:"top",horizontal:"right"}:r,n=e.badgeContent,u=e.children,d=e.classes,p=e.className,f=e.color,m=void 0===f?"default":f,h=e.component,b=void 0===h?"span":h,g=e.invisible,y=e.max,v=void 0===y?99:y,w=e.overlap,x=void 0===w?"rectangle":w,E=e.showZero,_=void 0!==E&&E,C=e.variant,T=void 0===C?"standard":C,k=(0,i.default)(e,["anchorOrigin","badgeContent","children","classes","className","color","component","invisible","max","overlap","showZero","variant"]),S=g;null==g&&(0===n&&!_||null==n&&"dot"!==T)&&(S=!0);var R="";return"dot"!==T&&(R=n>v?"".concat(v,"+"):n),l.createElement(b,(0,o.default)({className:(0,s.default)(d.root,p),ref:t},k),u,l.createElement("span",{className:(0,s.default)(d.badge,d["".concat(a.horizontal).concat((0,c.default)(a.vertical),"}")],d["anchorOrigin".concat((0,c.default)(a.vertical)).concat((0,c.default)(a.horizontal)).concat((0,c.default)(x))],"default"!==m&&d["color".concat((0,c.default)(m))],S&&d.invisible,"dot"===T&&d.dot)},R))})),f=(0,u.default)(d,{name:"MuiBadge"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Badge/Badge.js"}],[898,{"./Badge":897,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Badge"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Badge/index.js"}],[899,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776,"react-is":4629},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(e("react-is"),n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=function(e){return{root:{display:"flex",justifyContent:"center",height:56,backgroundColor:e.palette.background.paper}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.component,c=void 0===u?"div":u,d=e.onChange,p=e.showLabels,f=void 0!==p&&p,m=e.value,h=(0,i.default)(e,["children","classes","className","component","onChange","showLabels","value"]);return l.createElement(c,(0,o.default)({className:(0,s.default)(a.root,n),ref:t},h),l.Children.map(r,(function(e,t){if(!l.isValidElement(e))return null;var r=e.props.value===undefined?t:e.props.value;return l.cloneElement(e,{selected:r===m,showLabel:e.props.showLabel!==undefined?e.props.showLabel:f,value:r,onChange:d})})))})),p=(0,u.default)(c,{name:"MuiBottomNavigation"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/BottomNavigation/BottomNavigation.js"}],[900,{"./BottomNavigation":899,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./BottomNavigation"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/BottomNavigation/index.js"}],[901,{"../ButtonBase":913,"../styles/withStyles":1211,"../utils/unsupportedProp":1233,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../ButtonBase")),d=(n(e("../utils/unsupportedProp")),function(e){return{root:{transition:e.transitions.create(["color","padding-top"],{duration:e.transitions.duration.short}),padding:"6px 12px 8px",minWidth:80,maxWidth:168,color:e.palette.text.secondary,flex:"1","&$iconOnly":{paddingTop:16},"&$selected":{paddingTop:6,color:e.palette.primary.main}},selected:{},iconOnly:{},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"},label:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(12),opacity:1,transition:"font-size 0.2s, opacity 0.2s",transitionDelay:"0.1s","&$iconOnly":{opacity:0,transitionDelay:"0s"},"&$selected":{fontSize:e.typography.pxToRem(14)}}}});r.styles=d;var p=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.icon,u=e.label,d=e.onChange,p=e.onClick,f=e.selected,m=e.showLabel,h=e.value,b=(0,i.default)(e,["classes","className","icon","label","onChange","onClick","selected","showLabel","value"]);return l.createElement(c.default,(0,o.default)({ref:t,className:(0,s.default)(r.root,a,f?r.selected:!m&&r.iconOnly),focusRipple:!0,onClick:function(e){d&&d(e,h),p&&p(e)}},b),l.createElement("span",{className:r.wrapper},n,l.createElement("span",{className:(0,s.default)(r.label,f?r.selected:!m&&r.iconOnly)},u)))})),f=(0,u.default)(d,{name:"MuiBottomNavigationAction"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/BottomNavigationAction/BottomNavigationAction.js"}],[902,{"./BottomNavigationAction":901,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./BottomNavigationAction"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/BottomNavigationAction/index.js"}],[903,{"../styles/styled":1208,"@babel/runtime/helpers/interopRequireDefault":311,"@material-ui/system":1283},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styleFunction=void 0;var n=e("@material-ui/system"),o=a(e("../styles/styled")),i=(0,n.css)((0,n.compose)(n.borders,n.display,n.flexbox,n.grid,n.positions,n.palette,n.shadows,n.sizing,n.spacing,n.typography));r.styleFunction=i;var l=(0,o.default)("div")(i,{name:"MuiBox"});r.default=l}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Box/Box.js"}],[904,{"./Box":903,"@babel/runtime/helpers/interopRequireWildcard":312},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"styleFunction",{enumerable:!0,get:function(){return n.styleFunction}});var n=a(e("./Box"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Box/index.js"}],[905,{"../ButtonBase":913,"../internal/svg-icons/MoreHoriz":1176,"../styles/colorManipulator":1192,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("../styles/withStyles"))),u=e("../styles/colorManipulator"),c=n(e("../internal/svg-icons/MoreHoriz")),d=n(e("../ButtonBase"));function p(e){var t=e.classes,r=(0,i.default)(e,["classes"]);return l.createElement(d.default,(0,o.default)({component:"li",className:t.root,focusRipple:!0},r),l.createElement(c.default,{className:t.icon}))}var f=(0,s.default)((function(e){return{root:{display:"flex",marginLeft:e.spacing(.5),marginRight:e.spacing(.5),backgroundColor:e.palette.grey[100],color:e.palette.grey[700],borderRadius:2,cursor:"pointer","&:hover, &:focus":{backgroundColor:e.palette.grey[200]},"&:active":{boxShadow:e.shadows[0],backgroundColor:(0,u.emphasize)(e.palette.grey[200],.12)}},icon:{width:24,height:16}}}),{name:"PrivateBreadcrumbCollapsed"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Breadcrumbs/BreadcrumbCollapsed.js"}],[906,{"../Typography":1138,"../styles/withStyles":1211,"./BreadcrumbCollapsed":905,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/toConsumableArray":325,clsx:3586,"prop-types":4528,react:4776,"react-is":4629},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/toConsumableArray")),l=n(e("@babel/runtime/helpers/objectWithoutProperties")),s=a(e("react")),u=(e("react-is"),n(e("prop-types")),n(e("clsx"))),c=n(e("../styles/withStyles")),d=n(e("../Typography")),p=n(e("./BreadcrumbCollapsed")),f={root:{},ol:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"},li:{},separator:{display:"flex",userSelect:"none",marginLeft:8,marginRight:8}};r.styles=f;var m=s.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,c=e.component,f=void 0===c?"nav":c,m=e.expandText,h=void 0===m?"Show path":m,b=e.itemsAfterCollapse,g=void 0===b?1:b,y=e.itemsBeforeCollapse,v=void 0===y?1:y,w=e.maxItems,x=void 0===w?8:w,E=e.separator,_=void 0===E?"/":E,C=(0,l.default)(e,["children","classes","className","component","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),T=s.useState(!1),k=T[0],S=T[1],R=s.Children.toArray(r).filter((function(e){return s.isValidElement(e)})).map((function(e,t){return s.createElement("li",{className:a.li,key:"child-".concat(t)},e)}));return s.createElement(d.default,(0,o.default)({ref:t,component:f,color:"textSecondary",className:(0,u.default)(a.root,n)},C),s.createElement("ol",{className:a.ol},function(e,t,r){return e.reduce((function(a,n,o){return o=e.length?e:[].concat((0,i.default)(e.slice(0,v)),[s.createElement(p.default,{"aria-label":h,key:"ellipsis",onClick:function(e){S(!0);var t=e.currentTarget.parentNode.querySelector("a[href],button,[tabindex]");t&&t.focus()}})],(0,i.default)(e.slice(e.length-g,e.length)))}(R),a.separator,_)))})),h=(0,c.default)(f,{name:"MuiBreadcrumbs"})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Breadcrumbs/Breadcrumbs.js"}],[907,{"./Breadcrumbs":906,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Breadcrumbs"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Breadcrumbs/index.js"}],[908,{"../ButtonBase":913,"../styles/colorManipulator":1192,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/objectWithoutProperties")),i=n(e("@babel/runtime/helpers/extends")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=e("../styles/colorManipulator"),d=n(e("../ButtonBase")),p=n(e("../utils/capitalize")),f=function(e){return{root:(0,i.default)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,c.fade)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,c.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,c.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat((0,c.fade)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:(0,c.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat((0,c.fade)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:(0,c.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}};r.styles=f;var m=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.color,c=void 0===u?"default":u,f=e.component,m=void 0===f?"button":f,h=e.disabled,b=void 0!==h&&h,g=e.disableElevation,y=void 0!==g&&g,v=e.disableFocusRipple,w=void 0!==v&&v,x=e.endIcon,E=e.focusVisibleClassName,_=e.fullWidth,C=void 0!==_&&_,T=e.size,k=void 0===T?"medium":T,S=e.startIcon,R=e.type,P=void 0===R?"button":R,M=e.variant,O=void 0===M?"text":M,D=(0,o.default)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),j=S&&l.createElement("span",{className:(0,s.default)(a.startIcon,a["iconSize".concat((0,p.default)(k))])},S),A=x&&l.createElement("span",{className:(0,s.default)(a.endIcon,a["iconSize".concat((0,p.default)(k))])},x);return l.createElement(d.default,(0,i.default)({className:(0,s.default)(a.root,a[O],n,"inherit"===c?a.colorInherit:"default"!==c&&a["".concat(O).concat((0,p.default)(c))],"medium"!==k&&[a["".concat(O,"Size").concat((0,p.default)(k))],a["size".concat((0,p.default)(k))]],y&&a.disableElevation,b&&a.disabled,C&&a.fullWidth),component:m,disabled:b,focusRipple:!w,focusVisibleClassName:(0,s.default)(a.focusVisible,E),ref:t,type:P},D),l.createElement("span",{className:a.label},j,r,A))})),h=(0,u.default)(f,{name:"MuiButton"})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Button/Button.js"}],[909,{"./Button":908,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Button"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Button/index.js"}],[910,{"../styles/withStyles":1211,"../utils/useEventCallback":1235,"../utils/useForkRef":1236,"../utils/useIsFocusVisible":1237,"./TouchRipple":912,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776,"react-dom":4604},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),a(e("react-dom"))),u=n(e("clsx")),c=(e("@material-ui/utils"),n(e("../utils/useForkRef"))),d=n(e("../utils/useEventCallback")),p=n(e("../styles/withStyles")),f=n(e("../utils/useIsFocusVisible")),m=n(e("./TouchRipple")),h={root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}};r.styles=h;var b=l.forwardRef((function(e,t){var r=e.action,a=e.buttonRef,n=e.centerRipple,p=void 0!==n&&n,h=e.children,b=e.classes,g=e.className,y=e.component,v=void 0===y?"button":y,w=e.disabled,x=void 0!==w&&w,E=e.disableRipple,_=void 0!==E&&E,C=e.disableTouchRipple,T=void 0!==C&&C,k=e.focusRipple,S=void 0!==k&&k,R=e.focusVisibleClassName,P=e.onBlur,M=e.onClick,O=e.onFocus,D=e.onFocusVisible,j=e.onKeyDown,A=e.onKeyUp,I=e.onMouseDown,q=e.onMouseLeave,N=e.onMouseUp,L=e.onTouchEnd,F=e.onTouchMove,W=e.onTouchStart,B=e.onDragLeave,U=e.tabIndex,$=void 0===U?0:U,z=e.TouchRippleProps,G=e.type,H=void 0===G?"button":G,V=(0,i.default)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),Q=l.useRef(null);var X=l.useRef(null),Y=l.useState(!1),Z=Y[0],K=Y[1];x&&Z&&K(!1);var J=(0,f.default)(),ee=J.isFocusVisible,te=J.onBlurVisible,re=J.ref;function ae(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:T;return(0,d.default)((function(a){return t&&t(a),!r&&X.current&&X.current[e](a),!0}))}l.useImperativeHandle(r,(function(){return{focusVisible:function(){K(!0),Q.current.focus()}}}),[]),l.useEffect((function(){Z&&S&&!_&&X.current.pulsate()}),[_,S,Z]);var ne=ae("start",I),oe=ae("stop",B),ie=ae("stop",N),le=ae("stop",(function(e){Z&&e.preventDefault(),q&&q(e)})),se=ae("start",W),ue=ae("stop",L),ce=ae("stop",F),de=ae("stop",(function(e){Z&&(te(e),K(!1)),P&&P(e)}),!1),pe=(0,d.default)((function(e){Q.current||(Q.current=e.currentTarget),ee(e)&&(K(!0),D&&D(e)),O&&O(e)})),fe=function(){var e=s.findDOMNode(Q.current);return v&&"button"!==v&&!("A"===e.tagName&&e.href)},me=l.useRef(!1),he=(0,d.default)((function(e){S&&!me.current&&Z&&X.current&&" "===e.key&&(me.current=!0,e.persist(),X.current.stop(e,(function(){X.current.start(e)}))),e.target===e.currentTarget&&fe()&&" "===e.key&&e.preventDefault(),j&&j(e),e.target===e.currentTarget&&fe()&&"Enter"===e.key&&!x&&(e.preventDefault(),M&&M(e))})),be=(0,d.default)((function(e){S&&" "===e.key&&X.current&&Z&&!e.defaultPrevented&&(me.current=!1,e.persist(),X.current.stop(e,(function(){X.current.pulsate(e)}))),A&&A(e),M&&e.target===e.currentTarget&&fe()&&" "===e.key&&!e.defaultPrevented&&M(e)})),ge=v;"button"===ge&&V.href&&(ge="a");var ye={};"button"===ge?(ye.type=H,ye.disabled=x):("a"===ge&&V.href||(ye.role="button"),ye["aria-disabled"]=x);var ve=(0,c.default)(a,t),we=(0,c.default)(re,Q),xe=(0,c.default)(ve,we),Ee=l.useState(!1),_e=Ee[0],Ce=Ee[1];l.useEffect((function(){Ce(!0)}),[]);var Te=_e&&!_&&!x;return l.createElement(ge,(0,o.default)({className:(0,u.default)(b.root,g,Z&&[b.focusVisible,R],x&&b.disabled),onBlur:de,onClick:M,onFocus:pe,onKeyDown:he,onKeyUp:be,onMouseDown:ne,onMouseLeave:le,onMouseUp:ie,onDragLeave:oe,onTouchEnd:ue,onTouchMove:ce,onTouchStart:se,ref:xe,tabIndex:x?-1:$},ye,V),h,Te?l.createElement(m.default,(0,o.default)({ref:X,center:p},z)):null)})),g=(0,p.default)(h,{name:"MuiButtonBase"})(b);r.default=g}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ButtonBase/ButtonBase.js"}],[911,{"../utils/useEventCallback":1235,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault"),n=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("react")),i=(a(e("prop-types")),a(e("clsx"))),l=a(e("../utils/useEventCallback")),s="undefined"==typeof window?o.useEffect:o.useLayoutEffect;function u(e){var t=e.classes,r=e.pulsate,a=void 0!==r&&r,n=e.rippleX,u=e.rippleY,c=e.rippleSize,d=e.in,p=e.onExited,f=void 0===p?function(){}:p,m=e.timeout,h=o.useState(!1),b=h[0],g=h[1],y=(0,i.default)(t.ripple,t.rippleVisible,a&&t.ripplePulsate),v={width:c,height:c,top:-c/2+u,left:-c/2+n},w=(0,i.default)(t.child,b&&t.childLeaving,a&&t.childPulsate),x=(0,l.default)(f);return s((function(){if(!d){g(!0);var e=setTimeout(x,m);return function(){clearTimeout(e)}}return undefined}),[x,d,m]),o.createElement("span",{className:y,style:v},o.createElement("span",{className:w}))}var c=u;r.default=c}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ButtonBase/Ripple.js"}],[912,{"../styles/withStyles":1211,"./Ripple":911,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/toConsumableArray":325,clsx:3586,"prop-types":4528,react:4776,"react-transition-group":1189},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=r.DELAY_RIPPLE=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/toConsumableArray")),l=n(e("@babel/runtime/helpers/objectWithoutProperties")),s=a(e("react")),u=(n(e("prop-types")),e("react-transition-group")),c=n(e("clsx")),d=n(e("../styles/withStyles")),p=n(e("./Ripple"));r.DELAY_RIPPLE=80;var f=function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}};r.styles=f;var m=s.forwardRef((function(e,t){var r=e.center,a=void 0!==r&&r,n=e.classes,d=e.className,f=(0,l.default)(e,["center","classes","className"]),m=s.useState([]),h=m[0],b=m[1],g=s.useRef(0),y=s.useRef(null);s.useEffect((function(){y.current&&(y.current(),y.current=null)}),[h]);var v=s.useRef(!1),w=s.useRef(null),x=s.useRef(null),E=s.useRef(null);s.useEffect((function(){return function(){clearTimeout(w.current)}}),[]);var _=s.useCallback((function(e){var t=e.pulsate,r=e.rippleX,a=e.rippleY,o=e.rippleSize,l=e.cb;b((function(e){return[].concat((0,i.default)(e),[s.createElement(p.default,{key:g.current,classes:n,timeout:550,pulsate:t,rippleX:r,rippleY:a,rippleSize:o})])})),g.current+=1,y.current=l}),[n]),C=s.useCallback((function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=arguments.length>2?arguments[2]:undefined,n=t.pulsate,o=void 0!==n&&n,i=t.center,l=void 0===i?a||t.pulsate:i,s=t.fakeElement,u=void 0!==s&&s;if("mousedown"===e.type&&v.current)v.current=!1;else{"touchstart"===e.type&&(v.current=!0);var c,d,p,f=u?null:E.current,m=f?f.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(l||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(m.width/2),d=Math.round(m.height/2);else{var h=e.touches?e.touches[0]:e,b=h.clientX,g=h.clientY;c=Math.round(b-m.left),d=Math.round(g-m.top)}if(l)(p=Math.sqrt((2*Math.pow(m.width,2)+Math.pow(m.height,2))/3))%2==0&&(p+=1);else{var y=2*Math.max(Math.abs((f?f.clientWidth:0)-c),c)+2,C=2*Math.max(Math.abs((f?f.clientHeight:0)-d),d)+2;p=Math.sqrt(Math.pow(y,2)+Math.pow(C,2))}e.touches?null===x.current&&(x.current=function(){_({pulsate:o,rippleX:c,rippleY:d,rippleSize:p,cb:r})},w.current=setTimeout((function(){x.current&&(x.current(),x.current=null)}),80)):_({pulsate:o,rippleX:c,rippleY:d,rippleSize:p,cb:r})}}),[a,_]),T=s.useCallback((function(){C({},{pulsate:!0})}),[C]),k=s.useCallback((function(e,t){if(clearTimeout(w.current),"touchend"===e.type&&x.current)return e.persist(),x.current(),x.current=null,void(w.current=setTimeout((function(){k(e,t)})));x.current=null,b((function(e){return e.length>0?e.slice(1):e})),y.current=t}),[]);return s.useImperativeHandle(t,(function(){return{pulsate:T,start:C,stop:k}}),[T,C,k]),s.createElement("span",(0,o.default)({className:(0,c.default)(n.root,d),ref:E},f),s.createElement(u.TransitionGroup,{component:null,exit:!0},h))})),h=(0,d.default)(f,{flip:!1,name:"MuiTouchRipple"})(s.memo(m));r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ButtonBase/TouchRipple.js"}],[913,{"./ButtonBase":910,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ButtonBase"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ButtonBase/index.js"}],[914,{"../Button":909,"../styles/colorManipulator":1192,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776,"react-is":4629},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(e("react-is"),n(e("prop-types")),n(e("clsx"))),u=n(e("../utils/capitalize")),c=e("../styles/colorManipulator"),d=n(e("../styles/withStyles"));n(e("../Button")).default.styles;var p=function(e){return{root:{display:"inline-flex",borderRadius:e.shape.borderRadius},contained:{boxShadow:e.shadows[2]},disableElevation:{boxShadow:"none"},disabled:{},fullWidth:{width:"100%"},vertical:{flexDirection:"column"},grouped:{minWidth:40},groupedHorizontal:{"&:not(:first-child)":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0}},groupedVertical:{"&:not(:first-child)":{borderTopRightRadius:0,borderTopLeftRadius:0},"&:not(:last-child)":{borderBottomRightRadius:0,borderBottomLeftRadius:0}},groupedText:{},groupedTextHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextPrimary:{"&:not(:last-child)":{borderColor:(0,c.fade)(e.palette.primary.main,.5)}},groupedTextSecondary:{"&:not(:last-child)":{borderColor:(0,c.fade)(e.palette.secondary.main,.5)}},groupedOutlined:{},groupedOutlinedHorizontal:{"&:not(:first-child)":{marginLeft:-1},"&:not(:last-child)":{borderRightColor:"transparent"}},groupedOutlinedVertical:{"&:not(:first-child)":{marginTop:-1},"&:not(:last-child)":{borderBottomColor:"transparent"}},groupedOutlinedPrimary:{"&:hover":{borderColor:e.palette.primary.main}},groupedOutlinedSecondary:{"&:hover":{borderColor:e.palette.secondary.main}},groupedContained:{boxShadow:"none"},groupedContainedHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderRight:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderBottom:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedPrimary:{"&:not(:last-child)":{borderColor:e.palette.primary.dark}},groupedContainedSecondary:{"&:not(:last-child)":{borderColor:e.palette.secondary.dark}}}};r.styles=p;var f=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,c=e.color,d=void 0===c?"default":c,p=e.component,f=void 0===p?"div":p,m=e.disabled,h=void 0!==m&&m,b=e.disableElevation,g=void 0!==b&&b,y=e.disableFocusRipple,v=void 0!==y&&y,w=e.disableRipple,x=void 0!==w&&w,E=e.fullWidth,_=void 0!==E&&E,C=e.orientation,T=void 0===C?"horizontal":C,k=e.size,S=void 0===k?"medium":k,R=e.variant,P=void 0===R?"outlined":R,M=(0,i.default)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"]),O=(0,s.default)(a.grouped,a["grouped".concat((0,u.default)(T))],a["grouped".concat((0,u.default)(P))],a["grouped".concat((0,u.default)(P)).concat((0,u.default)(T))],a["grouped".concat((0,u.default)(P)).concat("default"!==d?(0,u.default)(d):"")],h&&a.disabled);return l.createElement(f,(0,o.default)({role:"group",className:(0,s.default)(a.root,n,_&&a.fullWidth,g&&a.disableElevation,"contained"===P&&a.contained,"vertical"===T&&a.vertical),ref:t},M),l.Children.map(r,(function(e){return l.isValidElement(e)?l.cloneElement(e,{className:(0,s.default)(O,e.props.className),color:e.props.color||d,disabled:e.props.disabled||h,disableElevation:e.props.disableElevation||g,disableFocusRipple:v,disableRipple:x,fullWidth:_,size:e.props.size||S,variant:e.props.variant||P}):null})))})),m=(0,d.default)(p,{name:"MuiButtonGroup"})(f);r.default=m}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ButtonGroup/ButtonGroup.js"}],[915,{"./ButtonGroup":914,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ButtonGroup"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ButtonGroup/index.js"}],[916,{"../Paper":1051,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../Paper")),c=n(e("../styles/withStyles")),d={root:{overflow:"hidden"}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.raised,c=void 0!==n&&n,d=(0,i.default)(e,["classes","className","raised"]);return l.createElement(u.default,(0,o.default)({className:(0,s.default)(r.root,a),elevation:c?8:1,ref:t},d))})),f=(0,c.default)(d,{name:"MuiCard"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Card/Card.js"}],[917,{"./Card":916,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Card"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Card/index.js"}],[918,{"../ButtonBase":913,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../ButtonBase")),d=function(e){return{root:{display:"block",textAlign:"inherit",width:"100%","&:hover $focusHighlight":{opacity:e.palette.action.hoverOpacity},"&$focusVisible $focusHighlight":{opacity:.12}},focusVisible:{},focusHighlight:{overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.focusVisibleClassName,d=(0,i.default)(e,["children","classes","className","focusVisibleClassName"]);return l.createElement(c.default,(0,o.default)({className:(0,s.default)(a.root,n),focusVisibleClassName:(0,s.default)(u,a.focusVisible),ref:t},d),r,l.createElement("span",{className:a.focusHighlight}))})),f=(0,u.default)(d,{name:"MuiCardActionArea"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardActionArea/CardActionArea.js"}],[919,{"./CardActionArea":918,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CardActionArea"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardActionArea/index.js"}],[920,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{display:"flex",alignItems:"center",padding:8},spacing:{"& > :not(:first-child)":{marginLeft:8}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.disableSpacing,a=void 0!==r&&r,n=e.classes,u=e.className,c=(0,i.default)(e,["disableSpacing","classes","className"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(n.root,u,!a&&n.spacing),ref:t},c))})),p=(0,u.default)(c,{name:"MuiCardActions"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardActions/CardActions.js"}],[921,{"./CardActions":920,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CardActions"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardActions/index.js"}],[922,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{padding:16,"&:last-child":{paddingBottom:24}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.component,u=void 0===n?"div":n,c=(0,i.default)(e,["classes","className","component"]);return l.createElement(u,(0,o.default)({className:(0,s.default)(r.root,a),ref:t},c))})),p=(0,u.default)(c,{name:"MuiCardContent"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardContent/CardContent.js"}],[923,{"./CardContent":922,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CardContent"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardContent/index.js"}],[924,{"../Typography":1138,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../Typography")),d={root:{display:"flex",alignItems:"center",padding:16},avatar:{flex:"0 0 auto",marginRight:16},action:{flex:"0 0 auto",alignSelf:"flex-start",marginTop:-8,marginRight:-8},content:{flex:"1 1 auto"},title:{},subheader:{}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.action,a=e.avatar,n=e.classes,u=e.className,d=e.component,p=void 0===d?"div":d,f=e.disableTypography,m=void 0!==f&&f,h=e.subheader,b=e.subheaderTypographyProps,g=e.title,y=e.titleTypographyProps,v=(0,i.default)(e,["action","avatar","classes","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"]),w=g;null==w||w.type===c.default||m||(w=l.createElement(c.default,(0,o.default)({variant:a?"body2":"h5",className:n.title,component:"span",display:"block"},y),w));var x=h;return null==x||x.type===c.default||m||(x=l.createElement(c.default,(0,o.default)({variant:a?"body2":"body1",className:n.subheader,color:"textSecondary",component:"span",display:"block"},b),x)),l.createElement(p,(0,o.default)({className:(0,s.default)(n.root,u),ref:t},v),a&&l.createElement("div",{className:n.avatar},a),l.createElement("div",{className:n.content},w,x),r&&l.createElement("div",{className:n.action},r))})),f=(0,u.default)(d,{name:"MuiCardHeader"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardHeader/CardHeader.js"}],[925,{"./CardHeader":924,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CardHeader"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardHeader/index.js"}],[926,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=(e("@material-ui/utils"),{root:{display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},media:{width:"100%"},img:{objectFit:"cover"}});r.styles=c;var d=["video","audio","picture","iframe","img"],p=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.component,c=void 0===u?"div":u,p=e.image,f=e.src,m=e.style,h=(0,i.default)(e,["children","classes","className","component","image","src","style"]),b=-1!==d.indexOf(c),g=!b&&p?(0,o.default)({backgroundImage:'url("'.concat(p,'")')},m):m;return l.createElement(c,(0,o.default)({className:(0,s.default)(a.root,n,b&&a.media,-1!=="picture img".indexOf(c)&&a.img),ref:t,style:g,src:b?p||f:undefined},h),r)})),f=(0,u.default)(c,{name:"MuiCardMedia"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardMedia/CardMedia.js"}],[927,{"./CardMedia":926,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CardMedia"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardMedia/index.js"}],[928,{"../internal/SwitchBase":1165,"../internal/svg-icons/CheckBox":1170,"../internal/svg-icons/CheckBoxOutlineBlank":1171,"../internal/svg-icons/IndeterminateCheckBox":1173,"../styles/colorManipulator":1192,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=(e("@material-ui/utils"),n(e("../internal/SwitchBase"))),c=n(e("../internal/svg-icons/CheckBoxOutlineBlank")),d=n(e("../internal/svg-icons/CheckBox")),p=e("../styles/colorManipulator"),f=n(e("../internal/svg-icons/IndeterminateCheckBox")),m=n(e("../utils/capitalize")),h=n(e("../styles/withStyles")),b=function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,p.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,p.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}};r.styles=b;var g=l.createElement(d.default,null),y=l.createElement(c.default,null),v=l.createElement(f.default,null),w=l.forwardRef((function(e,t){var r=e.checkedIcon,a=void 0===r?g:r,n=e.classes,c=e.color,d=void 0===c?"secondary":c,p=e.icon,f=void 0===p?y:p,h=e.indeterminate,b=void 0!==h&&h,w=e.indeterminateIcon,x=void 0===w?v:w,E=e.inputProps,_=e.size,C=void 0===_?"medium":_,T=(0,i.default)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),k=b?x:f,S=b?x:a;return l.createElement(u.default,(0,o.default)({type:"checkbox",classes:{root:(0,s.default)(n.root,n["color".concat((0,m.default)(d))],b&&n.indeterminate),checked:n.checked,disabled:n.disabled},color:d,inputProps:(0,o.default)({"data-indeterminate":b},E),icon:l.cloneElement(k,{fontSize:k.props.fontSize===undefined&&"small"===C?C:k.props.fontSize}),checkedIcon:l.cloneElement(S,{fontSize:S.props.fontSize===undefined&&"small"===C?C:S.props.fontSize}),ref:t},T))})),x=(0,h.default)(b,{name:"MuiCheckbox"})(w);r.default=x}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Checkbox/Checkbox.js"}],[929,{"./Checkbox":928,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Checkbox"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Checkbox/index.js"}],[930,{"../ButtonBase":913,"../internal/svg-icons/Cancel":1169,"../styles/colorManipulator":1192,"../styles/withStyles":1211,"../utils/capitalize":1219,"../utils/unsupportedProp":1233,"../utils/useForkRef":1236,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../internal/svg-icons/Cancel")),c=n(e("../styles/withStyles")),d=e("../styles/colorManipulator"),p=n(e("../utils/useForkRef")),f=(n(e("../utils/unsupportedProp")),n(e("../utils/capitalize"))),m=n(e("../ButtonBase")),h=function(e){var t="light"===e.palette.type?e.palette.grey[300]:e.palette.grey[700],r=(0,d.fade)(e.palette.text.primary,.26);return{root:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:e.palette.getContrastText(t),backgroundColor:t,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"},"& $avatar":{marginLeft:5,marginRight:-6,width:24,height:24,color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],fontSize:e.typography.pxToRem(12)},"& $avatarColorPrimary":{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark},"& $avatarColorSecondary":{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:(0,d.emphasize)(t,.08)},"&:active":{boxShadow:e.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:(0,d.emphasize)(e.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:(0,d.emphasize)(e.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:(0,d.emphasize)(t,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:(0,d.emphasize)(e.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:(0,d.emphasize)(e.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,d.fade)(e.palette.text.primary,e.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(e.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,d.fade)(e.palette.primary.main,e.palette.action.hoverOpacity)}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(e.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,d.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:r,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:(0,d.fade)(r,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:(0,d.fade)(e.palette.primary.contrastText,.7),"&:hover, &:active":{color:e.palette.primary.contrastText}},deleteIconColorSecondary:{color:(0,d.fade)(e.palette.secondary.contrastText,.7),"&:hover, &:active":{color:e.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:(0,d.fade)(e.palette.primary.main,.7),"&:hover, &:active":{color:e.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:(0,d.fade)(e.palette.secondary.main,.7),"&:hover, &:active":{color:e.palette.secondary.main}}}};function b(e){return"Backspace"===e.key||"Delete"===e.key}r.styles=h;var g=l.forwardRef((function(e,t){var r=e.avatar,a=e.classes,n=e.className,c=e.clickable,d=e.color,h=void 0===d?"default":d,g=e.component,y=e.deleteIcon,v=e.disabled,w=void 0!==v&&v,x=e.icon,E=e.label,_=e.onClick,C=e.onDelete,T=e.onKeyDown,k=e.onKeyUp,S=e.size,R=void 0===S?"medium":S,P=e.variant,M=void 0===P?"default":P,O=(0,i.default)(e,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),D=l.useRef(null),j=(0,p.default)(D,t),A=function(e){e.stopPropagation(),C&&C(e)},I=!(!1===c||!_)||c,q="small"===R,N=g||(I?m.default:"div"),L=N===m.default?{component:"div"}:{},F=null;if(C){var W=(0,s.default)("default"!==h&&("default"===M?a["deleteIconColor".concat((0,f.default)(h))]:a["deleteIconOutlinedColor".concat((0,f.default)(h))]),q&&a.deleteIconSmall);F=y&&l.isValidElement(y)?l.cloneElement(y,{className:(0,s.default)(y.props.className,a.deleteIcon,W),onClick:A}):l.createElement(u.default,{className:(0,s.default)(a.deleteIcon,W),onClick:A})}var B=null;r&&l.isValidElement(r)&&(B=l.cloneElement(r,{className:(0,s.default)(a.avatar,r.props.className,q&&a.avatarSmall,"default"!==h&&a["avatarColor".concat((0,f.default)(h))])}));var U=null;return x&&l.isValidElement(x)&&(U=l.cloneElement(x,{className:(0,s.default)(a.icon,x.props.className,q&&a.iconSmall,"default"!==h&&a["iconColor".concat((0,f.default)(h))])})),l.createElement(N,(0,o.default)({role:I||C?"button":undefined,className:(0,s.default)(a.root,n,"default"!==h&&[a["color".concat((0,f.default)(h))],I&&a["clickableColor".concat((0,f.default)(h))],C&&a["deletableColor".concat((0,f.default)(h))]],"default"!==M&&[a.outlined,{primary:a.outlinedPrimary,secondary:a.outlinedSecondary}[h]],w&&a.disabled,q&&a.sizeSmall,I&&a.clickable,C&&a.deletable),"aria-disabled":!!w||undefined,tabIndex:I||C?0:undefined,onClick:_,onKeyDown:function(e){e.currentTarget===e.target&&b(e)&&e.preventDefault(),T&&T(e)},onKeyUp:function(e){e.currentTarget===e.target&&(C&&b(e)?C(e):"Escape"===e.key&&D.current&&D.current.blur()),k&&k(e)},ref:j},L,O),B||U,l.createElement("span",{className:(0,s.default)(a.label,q&&a.labelSmall)},E),F)})),y=(0,c.default)(h,{name:"MuiChip"})(g);r.default=y}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Chip/Chip.js"}],[931,{"./Chip":930,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Chip"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Chip/index.js"}],[932,{"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=(e("@material-ui/utils"),n(e("../styles/withStyles"))),c=n(e("../utils/capitalize")),d=44;function p(e){var t,r,a;return t=e,r=0,a=1,e=(Math.min(Math.max(r,t),a)-r)/(a-r),e=(e-=1)*e*e+1}var f=function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}};r.styles=f;var m=l.forwardRef((function(e,t){var r,a=e.classes,n=e.className,u=e.color,f=void 0===u?"primary":u,m=e.disableShrink,h=void 0!==m&&m,b=e.size,g=void 0===b?40:b,y=e.style,v=e.thickness,w=void 0===v?3.6:v,x=e.value,E=void 0===x?0:x,_=e.variant,C=void 0===_?"indeterminate":_,T=(0,i.default)(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),k={},S={},R={};if("determinate"===C||"static"===C){var P=2*Math.PI*((d-w)/2);k.strokeDasharray=P.toFixed(3),R["aria-valuenow"]=Math.round(E),"static"===C?(k.strokeDashoffset="".concat(((100-E)/100*P).toFixed(3),"px"),S.transform="rotate(-90deg)"):(k.strokeDashoffset="".concat((r=(100-E)/100,r*r*P).toFixed(3),"px"),S.transform="rotate(".concat((270*p(E/70)).toFixed(3),"deg)"))}return l.createElement("div",(0,o.default)({className:(0,s.default)(a.root,n,"inherit"!==f&&a["color".concat((0,c.default)(f))],{indeterminate:a.indeterminate,static:a.static}[C]),style:(0,o.default)({width:g,height:g},S,y),ref:t,role:"progressbar"},R,T),l.createElement("svg",{className:a.svg,viewBox:"".concat(22," ").concat(22," ").concat(d," ").concat(d)},l.createElement("circle",{className:(0,s.default)(a.circle,h&&a.circleDisableShrink,{indeterminate:a.circleIndeterminate,static:a.circleStatic}[C]),style:k,cx:d,cy:d,r:(d-w)/2,fill:"none",strokeWidth:w})))})),h=(0,u.default)(f,{name:"MuiCircularProgress",flip:!1})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CircularProgress/CircularProgress.js"}],[933,{"./CircularProgress":932,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CircularProgress"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CircularProgress/index.js"}],[934,{"../utils/ownerDocument":1227,"../utils/useEventCallback":1235,"../utils/useForkRef":1236,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@material-ui/utils":1302,"prop-types":4528,react:4776,"react-dom":4604},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault"),n=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("react")),i=n(e("react-dom")),l=(a(e("prop-types")),a(e("../utils/ownerDocument"))),s=a(e("../utils/useForkRef")),u=a(e("../utils/useEventCallback"));e("@material-ui/utils");function c(e){return e.substring(2).toLowerCase()}function d(e){var t=e.children,r=e.disableReactTree,a=void 0!==r&&r,n=e.mouseEvent,d=void 0===n?"onClick":n,p=e.onClickAway,f=e.touchEvent,m=void 0===f?"onTouchEnd":f,h=o.useRef(!1),b=o.useRef(null),g=o.useRef(!1),y=o.useRef(!1);o.useEffect((function(){return g.current=!0,function(){g.current=!1}}),[]);var v=o.useCallback((function(e){b.current=i.findDOMNode(e)}),[]),w=(0,s.default)(t.ref,v),x=(0,u.default)((function(e){var t=y.current;if(y.current=!1,g.current&&b.current&&!function(e){return document.documentElement.clientWidth-1;else r=!(0,l.default)(b.current).documentElement.contains(e.target)||b.current.contains(e.target);r||!a&&t||p(e)}})),E=function(e){return function(r){y.current=!0;var a=t.props[e];a&&a(r)}},_={ref:w};return!1!==m&&(_[m]=E(m)),o.useEffect((function(){if(!1!==m){var e=c(m),t=(0,l.default)(b.current),r=function(){h.current=!0};return t.addEventListener(e,x),t.addEventListener("touchmove",r),function(){t.removeEventListener(e,x),t.removeEventListener("touchmove",r)}}return undefined}),[x,m]),!1!==d&&(_[d]=E(d)),o.useEffect((function(){if(!1!==d){var e=c(d),t=(0,l.default)(b.current);return t.addEventListener(e,x),function(){t.removeEventListener(e,x)}}return undefined}),[x,d]),o.createElement(o.Fragment,null,o.cloneElement(t,_))}var p=d;r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ClickAwayListener/ClickAwayListener.js"}],[935,{"./ClickAwayListener":934,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ClickAwayListener"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ClickAwayListener/index.js"}],[936,{"../styles/transitions":1209,"../styles/useTheme":1210,"../styles/withStyles":1211,"../transitions/utils":1214,"../utils":1225,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/slicedToArray":323,clsx:3586,"prop-types":4528,react:4776,"react-transition-group":1189},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/slicedToArray")),l=n(e("@babel/runtime/helpers/objectWithoutProperties")),s=a(e("react")),u=n(e("clsx")),c=(n(e("prop-types")),e("react-transition-group")),d=n(e("../styles/withStyles")),p=e("../styles/transitions"),f=e("../transitions/utils"),m=n(e("../styles/useTheme")),h=e("../utils"),b=function(e){return{container:{height:0,overflow:"hidden",transition:e.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}};r.styles=b;var g=s.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,d=e.collapsedHeight,b=void 0===d?"0px":d,g=e.component,y=void 0===g?"div":g,v=e.disableStrictModeCompat,w=void 0!==v&&v,x=e.in,E=e.onEnter,_=e.onEntered,C=e.onEntering,T=e.onExit,k=e.onExited,S=e.onExiting,R=e.style,P=e.timeout,M=void 0===P?p.duration.standard:P,O=e.TransitionComponent,D=void 0===O?c.Transition:O,j=(0,l.default)(e,["children","classes","className","collapsedHeight","component","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),A=(0,m.default)(),I=s.useRef(),q=s.useRef(null),N=s.useRef(),L="number"==typeof b?"".concat(b,"px"):b;s.useEffect((function(){return function(){clearTimeout(I.current)}}),[]);var F=A.unstable_strictMode&&!w,W=s.useRef(null),B=(0,h.useForkRef)(t,F?W:undefined),U=function(e){return function(t,r){if(e){var a=F?[W.current,t]:[t,r],n=(0,i.default)(a,2),o=n[0],l=n[1];l===undefined?e(o):e(o,l)}}},$=U((function(e,t){e.style.height=L,E&&E(e,t)})),z=U((function(e,t){var r=q.current?q.current.clientHeight:0,a=(0,f.getTransitionProps)({style:R,timeout:M},{mode:"enter"}).duration;if("auto"===M){var n=A.transitions.getAutoHeightDuration(r);e.style.transitionDuration="".concat(n,"ms"),N.current=n}else e.style.transitionDuration="string"==typeof a?a:"".concat(a,"ms");e.style.height="".concat(r,"px"),C&&C(e,t)})),G=U((function(e,t){e.style.height="auto",_&&_(e,t)})),H=U((function(e){var t=q.current?q.current.clientHeight:0;e.style.height="".concat(t,"px"),T&&T(e)})),V=U(k),Q=U((function(e){var t=q.current?q.current.clientHeight:0,r=(0,f.getTransitionProps)({style:R,timeout:M},{mode:"exit"}).duration;if("auto"===M){var a=A.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(a,"ms"),N.current=a}else e.style.transitionDuration="string"==typeof r?r:"".concat(r,"ms");e.style.height=L,S&&S(e)}));return s.createElement(D,(0,o.default)({in:x,onEnter:$,onEntered:G,onEntering:z,onExit:H,onExited:V,onExiting:Q,addEndListener:function(e,t){var r=F?e:t;"auto"===M&&(I.current=setTimeout(r,N.current||0))},nodeRef:F?W:undefined,timeout:"auto"===M?null:M},j),(function(e,t){return s.createElement(y,(0,o.default)({className:(0,u.default)(a.container,n,{entered:a.entered,exited:!x&&"0px"===L&&a.hidden}[e]),style:(0,o.default)({minHeight:L},R),ref:B},t),s.createElement("div",{className:a.wrapper,ref:q},s.createElement("div",{className:a.wrapperInner},r)))}))}));g.muiSupportAuto=!0;var y=(0,d.default)(b,{name:"MuiCollapse"})(g);r.default=y}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Collapse/Collapse.js"}],[937,{"./Collapse":936,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Collapse"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Collapse/index.js"}],[938,{"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/defineProperty":306,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=n(e("@babel/runtime/helpers/defineProperty")),s=a(e("react")),u=(n(e("prop-types")),n(e("clsx"))),c=n(e("../styles/withStyles")),d=n(e("../utils/capitalize")),p=function(e){return{root:(0,l.default)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),display:"block"},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),disableGutters:{paddingLeft:0,paddingRight:0},fixed:Object.keys(e.breakpoints.values).reduce((function(t,r){var a=e.breakpoints.values[r];return 0!==a&&(t[e.breakpoints.up(r)]={maxWidth:a}),t}),{}),maxWidthXs:(0,l.default)({},e.breakpoints.up("xs"),{maxWidth:Math.max(e.breakpoints.values.xs,444)}),maxWidthSm:(0,l.default)({},e.breakpoints.up("sm"),{maxWidth:e.breakpoints.values.sm}),maxWidthMd:(0,l.default)({},e.breakpoints.up("md"),{maxWidth:e.breakpoints.values.md}),maxWidthLg:(0,l.default)({},e.breakpoints.up("lg"),{maxWidth:e.breakpoints.values.lg}),maxWidthXl:(0,l.default)({},e.breakpoints.up("xl"),{maxWidth:e.breakpoints.values.xl})}};r.styles=p;var f=s.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.component,l=void 0===n?"div":n,c=e.disableGutters,p=void 0!==c&&c,f=e.fixed,m=void 0!==f&&f,h=e.maxWidth,b=void 0===h?"lg":h,g=(0,i.default)(e,["classes","className","component","disableGutters","fixed","maxWidth"]);return s.createElement(l,(0,o.default)({className:(0,u.default)(r.root,a,m&&r.fixed,p&&r.disableGutters,!1!==b&&r["maxWidth".concat((0,d.default)(String(b)))]),ref:t},g))})),m=(0,c.default)(p,{name:"MuiContainer"})(f);r.default=m}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Container/Container.js"}],[939,{"./Container":938,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Container"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Container/index.js"}],[940,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@material-ui/utils":1302,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=r.body=r.html=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=a(e("react")),l=(n(e("prop-types")),n(e("../styles/withStyles"))),s=(e("@material-ui/utils"),{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box"});r.html=s;var u=function(e){return(0,o.default)({color:e.palette.text.primary},e.typography.body2,{backgroundColor:e.palette.background.default,"@media print":{backgroundColor:e.palette.common.white}})};r.body=u;var c=function(e){return{"@global":{html:s,"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,o.default)({margin:0},u(e),{"&::backdrop":{backgroundColor:e.palette.background.default}})}}};function d(e){var t=e.children,r=void 0===t?null:t;e.classes;return i.createElement(i.Fragment,null,r)}r.styles=c;var p=(0,l.default)(c,{name:"MuiCssBaseline"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CssBaseline/CssBaseline.js"}],[941,{"./CssBaseline":940,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CssBaseline"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CssBaseline/index.js"}],[942,{"../Backdrop":896,"../Fade":968,"../Modal":1041,"../Paper":1051,"../styles/transitions":1209,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/defineProperty":306,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=n(e("@babel/runtime/helpers/defineProperty")),s=a(e("react")),u=(n(e("prop-types")),n(e("clsx"))),c=n(e("../styles/withStyles")),d=n(e("../utils/capitalize")),p=n(e("../Modal")),f=n(e("../Backdrop")),m=n(e("../Fade")),h=e("../styles/transitions"),b=n(e("../Paper")),g=function(e){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,444),"&$paperScrollBody":(0,l.default)({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":(0,l.default)({},e.breakpoints.down(e.breakpoints.values.sm+64),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":(0,l.default)({},e.breakpoints.down(e.breakpoints.values.md+64),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":(0,l.default)({},e.breakpoints.down(e.breakpoints.values.lg+64),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":(0,l.default)({},e.breakpoints.down(e.breakpoints.values.xl+64),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}};r.styles=g;var y={enter:h.duration.enteringScreen,exit:h.duration.leavingScreen},v=s.forwardRef((function(e,t){var r=e.BackdropProps,a=e.children,n=e.classes,l=e.className,c=e.disableBackdropClick,h=void 0!==c&&c,g=e.disableEscapeKeyDown,v=void 0!==g&&g,w=e.fullScreen,x=void 0!==w&&w,E=e.fullWidth,_=void 0!==E&&E,C=e.maxWidth,T=void 0===C?"sm":C,k=e.onBackdropClick,S=e.onClose,R=e.onEnter,P=e.onEntered,M=e.onEntering,O=e.onEscapeKeyDown,D=e.onExit,j=e.onExited,A=e.onExiting,I=e.open,q=e.PaperComponent,N=void 0===q?b.default:q,L=e.PaperProps,F=void 0===L?{}:L,W=e.scroll,B=void 0===W?"paper":W,U=e.TransitionComponent,$=void 0===U?m.default:U,z=e.transitionDuration,G=void 0===z?y:z,H=e.TransitionProps,V=e["aria-describedby"],Q=e["aria-labelledby"],X=(0,i.default)(e,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),Y=s.useRef();return s.createElement(p.default,(0,o.default)({className:(0,u.default)(n.root,l),BackdropComponent:f.default,BackdropProps:(0,o.default)({transitionDuration:G},r),closeAfterTransition:!0,disableBackdropClick:h,disableEscapeKeyDown:v,onEscapeKeyDown:O,onClose:S,open:I,ref:t},X),s.createElement($,(0,o.default)({appear:!0,in:I,timeout:G,onEnter:R,onEntering:M,onEntered:P,onExit:D,onExiting:A,onExited:j,role:"none presentation"},H),s.createElement("div",{className:(0,u.default)(n.container,n["scroll".concat((0,d.default)(B))]),onMouseUp:function(e){e.target===e.currentTarget&&e.target===Y.current&&(Y.current=null,k&&k(e),!h&&S&&S(e,"backdropClick"))},onMouseDown:function(e){Y.current=e.target}},s.createElement(N,(0,o.default)({elevation:24,role:"dialog","aria-describedby":V,"aria-labelledby":Q},F,{className:(0,u.default)(n.paper,n["paperScroll".concat((0,d.default)(B))],n["paperWidth".concat((0,d.default)(String(T)))],F.className,x&&n.paperFullScreen,_&&n.paperFullWidth)}),a))))})),w=(0,c.default)(g,{name:"MuiDialog"})(v);r.default=w}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Dialog/Dialog.js"}],[943,{"./Dialog":942,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Dialog"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Dialog/index.js"}],[944,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.disableSpacing,a=void 0!==r&&r,n=e.classes,u=e.className,c=(0,i.default)(e,["disableSpacing","classes","className"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(n.root,u,!a&&n.spacing),ref:t},c))})),p=(0,u.default)(c,{name:"MuiDialogActions"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogActions/DialogActions.js"}],[945,{"./DialogActions":944,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./DialogActions"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogActions/index.js"}],[946,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=function(e){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider)}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.dividers,u=void 0!==n&&n,c=(0,i.default)(e,["classes","className","dividers"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(r.root,a,u&&r.dividers),ref:t},c))})),p=(0,u.default)(c,{name:"MuiDialogContent"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogContent/DialogContent.js"}],[947,{"./DialogContent":946,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./DialogContent"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogContent/index.js"}],[948,{"../Typography":1138,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=a(e("react")),l=(n(e("prop-types")),n(e("../styles/withStyles"))),s=n(e("../Typography")),u={root:{marginBottom:12}};r.styles=u;var c=i.forwardRef((function(e,t){return i.createElement(s.default,(0,o.default)({component:"p",variant:"body1",color:"textSecondary",ref:t},e))})),d=(0,l.default)(u,{name:"MuiDialogContentText"})(c);r.default=d}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogContentText/DialogContentText.js"}],[949,{"./DialogContentText":948,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./DialogContentText"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogContentText/index.js"}],[950,{"../Typography":1138,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../Typography")),d={root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.disableTypography,d=void 0!==u&&u,p=(0,i.default)(e,["children","classes","className","disableTypography"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(a.root,n),ref:t},p),d?r:l.createElement(c.default,{component:"h2",variant:"h6"},r))})),f=(0,u.default)(d,{name:"MuiDialogTitle"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogTitle/DialogTitle.js"}],[951,{"./DialogTitle":950,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./DialogTitle"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogTitle/index.js"}],[952,{"../styles/colorManipulator":1192,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=e("../styles/colorManipulator"),d=function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:(0,c.fade)(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.absolute,a=void 0!==r&&r,n=e.classes,u=e.className,c=e.component,d=void 0===c?"hr":c,p=e.flexItem,f=void 0!==p&&p,m=e.light,h=void 0!==m&&m,b=e.orientation,g=void 0===b?"horizontal":b,y=e.role,v=void 0===y?"hr"!==d?"separator":undefined:y,w=e.variant,x=void 0===w?"fullWidth":w,E=(0,i.default)(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return l.createElement(d,(0,o.default)({className:(0,s.default)(n.root,u,"fullWidth"!==x&&n[x],a&&n.absolute,f&&n.flexItem,h&&n.light,"vertical"===g&&n.vertical),role:v,ref:t},E))})),f=(0,u.default)(d,{name:"MuiDivider"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Divider/Divider.js"}],[953,{"./Divider":952,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Divider"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Divider/index.js"}],[954,{"../Backdrop":896,"../Modal":1041,"../Paper":1051,"../Slide":1071,"../styles/transitions":1209,"../styles/useTheme":1210,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.isHorizontal=v,r.getAnchor=w,r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../Modal")),c=n(e("../Backdrop")),d=n(e("../styles/withStyles")),p=n(e("../Slide")),f=n(e("../Paper")),m=n(e("../utils/capitalize")),h=e("../styles/transitions"),b=n(e("../styles/useTheme")),g=function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}};r.styles=g;var y={left:"right",right:"left",top:"down",bottom:"up"};function v(e){return-1!==["left","right"].indexOf(e)}function w(e,t){return"rtl"===e.direction&&v(t)?y[t]:t}var x={enter:h.duration.enteringScreen,exit:h.duration.leavingScreen},E=l.forwardRef((function(e,t){var r=e.anchor,a=void 0===r?"left":r,n=e.BackdropProps,d=e.children,h=e.classes,g=e.className,v=e.elevation,E=void 0===v?16:v,_=e.ModalProps,C=(_=void 0===_?{}:_).BackdropProps,T=(0,i.default)(_,["BackdropProps"]),k=e.onClose,S=e.open,R=void 0!==S&&S,P=e.PaperProps,M=void 0===P?{}:P,O=e.SlideProps,D=e.TransitionComponent,j=void 0===D?p.default:D,A=e.transitionDuration,I=void 0===A?x:A,q=e.variant,N=void 0===q?"temporary":q,L=(0,i.default)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),F=(0,b.default)(),W=l.useRef(!1);l.useEffect((function(){W.current=!0}),[]);var B=w(F,a),U=l.createElement(f.default,(0,o.default)({elevation:"temporary"===N?E:0,square:!0},M,{className:(0,s.default)(h.paper,h["paperAnchor".concat((0,m.default)(B))],M.className,"temporary"!==N&&h["paperAnchorDocked".concat((0,m.default)(B))])}),d);if("permanent"===N)return l.createElement("div",(0,o.default)({className:(0,s.default)(h.root,h.docked,g),ref:t},L),U);var $=l.createElement(j,(0,o.default)({in:R,direction:y[B],timeout:I,appear:W.current},O),U);return"persistent"===N?l.createElement("div",(0,o.default)({className:(0,s.default)(h.root,h.docked,g),ref:t},L),$):l.createElement(u.default,(0,o.default)({BackdropProps:(0,o.default)({},n,C,{transitionDuration:I}),BackdropComponent:c.default,className:(0,s.default)(h.root,h.modal,g),open:R,onClose:k,ref:t},L,T),$)})),_=(0,d.default)(g,{name:"MuiDrawer",flip:!1})(E);r.default=_}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Drawer/Drawer.js"}],[955,{"./Drawer":954,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Drawer"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Drawer/index.js"}],[956,{"../Collapse":937,"../Paper":1051,"../styles/withStyles":1211,"../utils/useControlled":1234,"./ExpansionPanelContext":957,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/slicedToArray":323,"@babel/runtime/helpers/toArray":324,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776,"react-is":4629},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/toArray")),l=n(e("@babel/runtime/helpers/slicedToArray")),s=n(e("@babel/runtime/helpers/objectWithoutProperties")),u=a(e("react")),c=(e("react-is"),n(e("prop-types")),n(e("clsx"))),d=(e("@material-ui/utils"),n(e("../Collapse"))),p=n(e("../Paper")),f=n(e("../styles/withStyles")),m=n(e("./ExpansionPanelContext")),h=n(e("../utils/useControlled")),b=function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}};r.styles=b;var g=u.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,f=e.defaultExpanded,b=void 0!==f&&f,g=e.disabled,y=void 0!==g&&g,v=e.expanded,w=e.onChange,x=e.square,E=void 0!==x&&x,_=e.TransitionComponent,C=void 0===_?d.default:_,T=e.TransitionProps,k=(0,s.default)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),S=(0,h.default)({controlled:v,default:b,name:"ExpansionPanel",state:"expanded"}),R=(0,l.default)(S,2),P=R[0],M=R[1],O=u.useCallback((function(e){M(!P),w&&w(e,!P)}),[P,w,M]),D=u.Children.toArray(r),j=(0,i.default)(D),A=j[0],I=j.slice(1),q=u.useMemo((function(){return{expanded:P,disabled:y,toggle:O}}),[P,y,O]);return u.createElement(p.default,(0,o.default)({className:(0,c.default)(a.root,n,P&&a.expanded,y&&a.disabled,!E&&a.rounded),ref:t,square:E},k),u.createElement(m.default.Provider,{value:q},A),u.createElement(C,(0,o.default)({in:P,timeout:"auto"},T),u.createElement("div",{"aria-labelledby":A.props.id,id:A.props["aria-controls"],role:"region"},I)))})),y=(0,f.default)(b,{name:"MuiExpansionPanel"})(g);r.default=y}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanel/ExpansionPanel.js"}],[957,{"@babel/runtime/helpers/interopRequireWildcard":312,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=a(e("react")).createContext({});var o=n;r.default=o}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanel/ExpansionPanelContext.js"}],[958,{"./ExpansionPanel":956,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ExpansionPanel"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanel/index.js"}],[959,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},spacing:{"& > :not(:first-child)":{marginLeft:8}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.disableSpacing,u=void 0!==n&&n,c=(0,i.default)(e,["classes","className","disableSpacing"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(r.root,a,!u&&r.spacing),ref:t},c))})),p=(0,u.default)(c,{name:"MuiExpansionPanelActions"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanelActions/ExpansionPanelActions.js"}],[960,{"./ExpansionPanelActions":959,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ExpansionPanelActions"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanelActions/index.js"}],[961,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=(0,i.default)(e,["classes","className"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(r.root,a),ref:t},n))})),p=(0,u.default)(c,{name:"MuiExpansionPanelDetails"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanelDetails/ExpansionPanelDetails.js"}],[962,{"./ExpansionPanelDetails":961,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ExpansionPanelDetails"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanelDetails/index.js"}],[963,{"../ButtonBase":913,"../ExpansionPanel/ExpansionPanelContext":957,"../IconButton":1001,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../ButtonBase")),c=n(e("../IconButton")),d=n(e("../styles/withStyles")),p=n(e("../ExpansionPanel/ExpansionPanelContext")),f=function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:e.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.action.focus},"&$disabled":{opacity:e.palette.action.disabledOpacity}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}};r.styles=f;var m=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,d=e.expandIcon,f=e.IconButtonProps,m=e.onBlur,h=e.onClick,b=e.onFocusVisible,g=(0,i.default)(e,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),y=l.useState(!1),v=y[0],w=y[1],x=l.useContext(p.default),E=x.disabled,_=void 0!==E&&E,C=x.expanded,T=x.toggle;return l.createElement(u.default,(0,o.default)({focusRipple:!1,disableRipple:!0,disabled:_,component:"div","aria-expanded":C,className:(0,s.default)(a.root,n,_&&a.disabled,C&&a.expanded,v&&a.focused),onFocusVisible:function(e){w(!0),b&&b(e)},onBlur:function(e){w(!1),m&&m(e)},onClick:function(e){T&&T(e),h&&h(e)},ref:t},g),l.createElement("div",{className:(0,s.default)(a.content,C&&a.expanded)},r),d&&l.createElement(c.default,(0,o.default)({className:(0,s.default)(a.expandIcon,C&&a.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},f),d))})),h=(0,d.default)(f,{name:"MuiExpansionPanelSummary"})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanelSummary/ExpansionPanelSummary.js"}],[964,{"./ExpansionPanelSummary":963,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ExpansionPanelSummary"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanelSummary/index.js"}],[965,{"../ButtonBase":913,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/objectWithoutProperties")),i=n(e("@babel/runtime/helpers/extends")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../ButtonBase")),d=n(e("../utils/capitalize")),p=function(e){return{root:(0,i.default)({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}};r.styles=p;var f=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.color,p=void 0===u?"default":u,f=e.component,m=void 0===f?"button":f,h=e.disabled,b=void 0!==h&&h,g=e.disableFocusRipple,y=void 0!==g&&g,v=e.focusVisibleClassName,w=e.size,x=void 0===w?"large":w,E=e.variant,_=void 0===E?"round":E,C=(0,o.default)(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return l.createElement(c.default,(0,i.default)({className:(0,s.default)(a.root,n,"round"!==_&&a.extended,"large"!==x&&a["size".concat((0,d.default)(x))],b&&a.disabled,{primary:a.primary,secondary:a.secondary,inherit:a.colorInherit}[p]),component:m,disabled:b,focusRipple:!y,focusVisibleClassName:(0,s.default)(a.focusVisible,v),ref:t},C),l.createElement("span",{className:a.label},r))})),m=(0,u.default)(p,{name:"MuiFab"})(f);r.default=m}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Fab/Fab.js"}],[966,{"./Fab":965,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Fab"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Fab/index.js"}],[967,{"../styles/transitions":1209,"../styles/useTheme":1210,"../transitions/utils":1214,"../utils/useForkRef":1236,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/slicedToArray":323,"prop-types":4528,react:4776,"react-transition-group":1189},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/slicedToArray")),l=n(e("@babel/runtime/helpers/objectWithoutProperties")),s=a(e("react")),u=(n(e("prop-types")),e("react-transition-group")),c=e("../styles/transitions"),d=n(e("../styles/useTheme")),p=e("../transitions/utils"),f=n(e("../utils/useForkRef")),m={entering:{opacity:1},entered:{opacity:1}},h={enter:c.duration.enteringScreen,exit:c.duration.leavingScreen},b=s.forwardRef((function(e,t){var r=e.children,a=e.disableStrictModeCompat,n=void 0!==a&&a,c=e.in,b=e.onEnter,g=e.onEntered,y=e.onEntering,v=e.onExit,w=e.onExited,x=e.onExiting,E=e.style,_=e.TransitionComponent,C=void 0===_?u.Transition:_,T=e.timeout,k=void 0===T?h:T,S=(0,l.default)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),R=(0,d.default)(),P=R.unstable_strictMode&&!n,M=s.useRef(null),O=(0,f.default)(r.ref,t),D=(0,f.default)(P?M:undefined,O),j=function(e){return function(t,r){if(e){var a=P?[M.current,t]:[t,r],n=(0,i.default)(a,2),o=n[0],l=n[1];l===undefined?e(o):e(o,l)}}},A=j(y),I=j((function(e,t){(0,p.reflow)(e);var r=(0,p.getTransitionProps)({style:E,timeout:k},{mode:"enter"});e.style.webkitTransition=R.transitions.create("opacity",r),e.style.transition=R.transitions.create("opacity",r),b&&b(e,t)})),q=j(g),N=j(x),L=j((function(e){var t=(0,p.getTransitionProps)({style:E,timeout:k},{mode:"exit"});e.style.webkitTransition=R.transitions.create("opacity",t),e.style.transition=R.transitions.create("opacity",t),v&&v(e)})),F=j(w);return s.createElement(C,(0,o.default)({appear:!0,in:c,nodeRef:P?M:undefined,onEnter:I,onEntered:q,onEntering:A,onExit:L,onExited:F,onExiting:N,timeout:k},S),(function(e,t){return s.cloneElement(r,(0,o.default)({style:(0,o.default)({opacity:0,visibility:"exited"!==e||c?undefined:"hidden"},m[e],E,r.props.style),ref:D},t))}))})),g=b;r.default=g}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Fade/Fade.js"}],[968,{"./Fade":967,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Fade"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Fade/index.js"}],[969,{"../InputBase":1007,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=(e("@material-ui/utils"),n(e("../InputBase"))),c=n(e("../styles/withStyles")),d=function(e){var t="light"===e.palette.type,r=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:a,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:a}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.disableUnderline,a=e.classes,n=e.fullWidth,c=void 0!==n&&n,d=e.inputComponent,p=void 0===d?"input":d,f=e.multiline,m=void 0!==f&&f,h=e.type,b=void 0===h?"text":h,g=(0,i.default)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return l.createElement(u.default,(0,o.default)({classes:(0,o.default)({},a,{root:(0,s.default)(a.root,!r&&a.underline),underline:null}),fullWidth:c,inputComponent:p,multiline:m,ref:t,type:b},g))}));p.muiName="Input";var f=(0,c.default)(d,{name:"MuiFilledInput"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FilledInput/FilledInput.js"}],[970,{"./FilledInput":969,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./FilledInput"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FilledInput/index.js"}],[971,{"../InputBase/utils":1008,"../styles/withStyles":1211,"../utils/capitalize":1219,"../utils/isMuiElement":1226,"./FormControlContext":972,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=e("../InputBase/utils"),c=n(e("../styles/withStyles")),d=n(e("../utils/capitalize")),p=n(e("../utils/isMuiElement")),f=n(e("./FormControlContext")),m={root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}};r.styles=m;var h=l.forwardRef((function(e,t){var r,a=e.children,n=e.classes,c=e.className,m=e.color,h=void 0===m?"primary":m,b=e.component,g=void 0===b?"div":b,y=e.disabled,v=void 0!==y&&y,w=e.error,x=void 0!==w&&w,E=e.fullWidth,_=void 0!==E&&E,C=e.focused,T=e.hiddenLabel,k=void 0!==T&&T,S=e.margin,R=void 0===S?"none":S,P=e.required,M=void 0!==P&&P,O=e.size,D=e.variant,j=void 0===D?"standard":D,A=(0,i.default)(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),I=l.useState((function(){var e=!1;return a&&l.Children.forEach(a,(function(t){if((0,p.default)(t,["Input","Select"])){var r=(0,p.default)(t,["Select"])?t.props.input:t;r&&(0,u.isAdornedStart)(r.props)&&(e=!0)}})),e})),q=I[0],N=I[1],L=l.useState((function(){var e=!1;return a&&l.Children.forEach(a,(function(t){(0,p.default)(t,["Input","Select"])&&(0,u.isFilled)(t.props,!0)&&(e=!0)})),e})),F=L[0],W=L[1],B=l.useState(!1),U=B[0],$=B[1],z=C!==undefined?C:U;v&&z&&$(!1);var G=l.useCallback((function(){W(!0)}),[]),H=l.useCallback((function(){W(!1)}),[]),V={adornedStart:q,setAdornedStart:N,color:h,disabled:v,error:x,filled:F,focused:z,fullWidth:_,hiddenLabel:k,margin:("small"===O?"dense":undefined)||R,onBlur:function(){$(!1)},onEmpty:H,onFilled:G,onFocus:function(){$(!0)},registerEffect:r,required:M,variant:j};return l.createElement(f.default.Provider,{value:V},l.createElement(g,(0,o.default)({className:(0,s.default)(n.root,c,"none"!==R&&n["margin".concat((0,d.default)(R))],_&&n.fullWidth),ref:t},A),a))})),b=(0,c.default)(m,{name:"MuiFormControl"})(h);r.default=b}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControl/FormControl.js"}],[972,{"@babel/runtime/helpers/interopRequireWildcard":312,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.useFormControl=function(){return n.useContext(o)},r.default=void 0;var n=a(e("react")),o=n.createContext();var i=o;r.default=i}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControl/FormControlContext.js"}],[973,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){var t=e.props,r=e.states,a=e.muiFormControl;return r.reduce((function(e,r){return e[r]=t[r],a&&void 0===t[r]&&(e[r]=a[r]),e}),{})}}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControl/formControlState.js"}],[974,{"./FormControl":971,"./useFormControl":975,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"useFormControl",{enumerable:!0,get:function(){return o.default}});var n=a(e("./FormControl")),o=a(e("./useFormControl"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControl/index.js"}],[975,{"./FormControlContext":972,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault"),n=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return o.useContext(i.default)};var o=n(e("react")),i=a(e("./FormControlContext"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControl/useFormControl.js"}],[976,{"../FormControl":974,"../Typography":1138,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=(e("@material-ui/utils"),e("../FormControl")),c=n(e("../styles/withStyles")),d=n(e("../Typography")),p=n(e("../utils/capitalize")),f=function(e){return{root:{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,"&$disabled":{cursor:"default"}},labelPlacementStart:{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},labelPlacementTop:{flexDirection:"column-reverse",marginLeft:16},labelPlacementBottom:{flexDirection:"column",marginLeft:16},disabled:{},label:{"&$disabled":{color:e.palette.text.disabled}}}};r.styles=f;var m=l.forwardRef((function(e,t){e.checked;var r=e.classes,a=e.className,n=e.control,c=e.disabled,f=(e.inputRef,e.label),m=e.labelPlacement,h=void 0===m?"end":m,b=(e.name,e.onChange,e.value,(0,i.default)(e,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"])),g=(0,u.useFormControl)(),y=c;void 0===y&&void 0!==n.props.disabled&&(y=n.props.disabled),void 0===y&&g&&(y=g.disabled);var v={disabled:y};return["checked","name","onChange","value","inputRef"].forEach((function(t){void 0===n.props[t]&&void 0!==e[t]&&(v[t]=e[t])})),l.createElement("label",(0,o.default)({className:(0,s.default)(r.root,a,"end"!==h&&r["labelPlacement".concat((0,p.default)(h))],y&&r.disabled),ref:t},b),l.cloneElement(n,v),l.createElement(d.default,{component:"span",className:(0,s.default)(r.label,y&&r.disabled)},f))})),h=(0,c.default)(f,{name:"MuiFormControlLabel"})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControlLabel/FormControlLabel.js"}],[977,{"./FormControlLabel":976,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./FormControlLabel"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControlLabel/index.js"}],[978,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{display:"flex",flexDirection:"column",flexWrap:"wrap"},row:{flexDirection:"row"}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.row,u=void 0!==n&&n,c=(0,i.default)(e,["classes","className","row"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(r.root,a,u&&r.row),ref:t},c))})),p=(0,u.default)(c,{name:"MuiFormGroup"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormGroup/FormGroup.js"}],[979,{"./FormGroup":978,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./FormGroup"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormGroup/index.js"}],[980,{"../FormControl/formControlState":973,"../FormControl/useFormControl":975,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/objectWithoutProperties")),i=n(e("@babel/runtime/helpers/extends")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../FormControl/formControlState")),c=n(e("../FormControl/useFormControl")),d=n(e("../styles/withStyles")),p=function(e){return{root:(0,i.default)({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}};r.styles=p;var f=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,d=e.component,p=void 0===d?"p":d,f=(e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant,(0,o.default)(e,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"])),m=(0,c.default)(),h=(0,u.default)({props:e,muiFormControl:m,states:["variant","margin","disabled","error","filled","focused","required"]});return l.createElement(p,(0,i.default)({className:(0,s.default)(a.root,("filled"===h.variant||"outlined"===h.variant)&&a.contained,n,h.disabled&&a.disabled,h.error&&a.error,h.filled&&a.filled,h.focused&&a.focused,h.required&&a.required,"dense"===h.margin&&a.marginDense),ref:t},f)," "===r?l.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):r)})),m=(0,d.default)(p,{name:"MuiFormHelperText"})(f);r.default=m}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormHelperText/FormHelperText.js"}],[981,{"./FormHelperText":980,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./FormHelperText"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormHelperText/index.js"}],[982,{"../FormControl/formControlState":973,"../FormControl/useFormControl":975,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/objectWithoutProperties")),i=n(e("@babel/runtime/helpers/extends")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../FormControl/formControlState")),c=n(e("../FormControl/useFormControl")),d=n(e("../utils/capitalize")),p=n(e("../styles/withStyles")),f=function(e){return{root:(0,i.default)({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}};r.styles=f;var m=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,p=(e.color,e.component),f=void 0===p?"label":p,m=(e.disabled,e.error,e.filled,e.focused,e.required,(0,o.default)(e,["children","classes","className","color","component","disabled","error","filled","focused","required"])),h=(0,c.default)(),b=(0,u.default)({props:e,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]});return l.createElement(f,(0,i.default)({className:(0,s.default)(a.root,a["color".concat((0,d.default)(b.color||"primary"))],n,b.disabled&&a.disabled,b.error&&a.error,b.filled&&a.filled,b.focused&&a.focused,b.required&&a.required),ref:t},m),r,b.required&&l.createElement("span",{"aria-hidden":!0,className:(0,s.default)(a.asterisk,b.error&&a.error)}," ","*"))})),h=(0,p.default)(f,{name:"MuiFormLabel"})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormLabel/FormLabel.js"}],[983,{"./FormLabel":982,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./FormLabel"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormLabel/index.js"}],[984,{"../styles/withStyles":1211,"../utils/requirePropFactory":1229,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/objectWithoutProperties")),i=n(e("@babel/runtime/helpers/extends")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=(n(e("../utils/requirePropFactory")),[0,1,2,3,4,5,6,7,8,9,10]),d=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function p(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1,r=parseFloat(e);return"".concat(r/t).concat(String(e).replace(String(r),"")||"px")}var f=function(e){return(0,i.default)({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-xs-center":{justifyContent:"center"},"justify-xs-flex-end":{justifyContent:"flex-end"},"justify-xs-space-between":{justifyContent:"space-between"},"justify-xs-space-around":{justifyContent:"space-around"},"justify-xs-space-evenly":{justifyContent:"space-evenly"}},function(e,t){var r={};return c.forEach((function(a){var n=e.spacing(a);0!==n&&(r["spacing-".concat(t,"-").concat(a)]={margin:"-".concat(p(n,2)),width:"calc(100% + ".concat(p(n),")"),"& > $item":{padding:p(n,2)}})})),r}(e,"xs"),e.breakpoints.keys.reduce((function(t,r){return function(e,t,r){var a={};d.forEach((function(e){var t="grid-".concat(r,"-").concat(e);if(!0!==e)if("auto"!==e){var n="".concat(Math.round(e/12*1e8)/1e6,"%");a[t]={flexBasis:n,flexGrow:0,maxWidth:n}}else a[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else a[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}})),"xs"===r?(0,i.default)(e,a):e[t.breakpoints.up(r)]=a}(t,e,r),t}),{}))};r.styles=f;var m=l.forwardRef((function(e,t){var r=e.alignContent,a=void 0===r?"stretch":r,n=e.alignItems,u=void 0===n?"stretch":n,c=e.classes,d=e.className,p=e.component,f=void 0===p?"div":p,m=e.container,h=void 0!==m&&m,b=e.direction,g=void 0===b?"row":b,y=e.item,v=void 0!==y&&y,w=e.justify,x=void 0===w?"flex-start":w,E=e.lg,_=void 0!==E&&E,C=e.md,T=void 0!==C&&C,k=e.sm,S=void 0!==k&&k,R=e.spacing,P=void 0===R?0:R,M=e.wrap,O=void 0===M?"wrap":M,D=e.xl,j=void 0!==D&&D,A=e.xs,I=void 0!==A&&A,q=e.zeroMinWidth,N=void 0!==q&&q,L=(0,o.default)(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),F=(0,s.default)(c.root,d,h&&[c.container,0!==P&&c["spacing-xs-".concat(String(P))]],v&&c.item,N&&c.zeroMinWidth,"row"!==g&&c["direction-xs-".concat(String(g))],"wrap"!==O&&c["wrap-xs-".concat(String(O))],"stretch"!==u&&c["align-items-xs-".concat(String(u))],"stretch"!==a&&c["align-content-xs-".concat(String(a))],"flex-start"!==x&&c["justify-xs-".concat(String(x))],!1!==I&&c["grid-xs-".concat(String(I))],!1!==S&&c["grid-sm-".concat(String(S))],!1!==T&&c["grid-md-".concat(String(T))],!1!==_&&c["grid-lg-".concat(String(_))],!1!==j&&c["grid-xl-".concat(String(j))]);return l.createElement(f,(0,i.default)({className:F,ref:t},L))})),h=(0,u.default)(f,{name:"MuiGrid"})(m),b=h;r.default=b}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Grid/Grid.js"}],[985,{"./Grid":984,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Grid"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Grid/index.js"}],[986,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776,"react-is":4629},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(e("react-is"),n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{display:"flex",flexWrap:"wrap",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.cellHeight,a=void 0===r?180:r,n=e.children,u=e.classes,c=e.className,d=e.cols,p=void 0===d?2:d,f=e.component,m=void 0===f?"ul":f,h=e.spacing,b=void 0===h?4:h,g=e.style,y=(0,i.default)(e,["cellHeight","children","classes","className","cols","component","spacing","style"]);return l.createElement(m,(0,o.default)({className:(0,s.default)(u.root,c),ref:t,style:(0,o.default)({margin:-b/2},g)},y),l.Children.map(n,(function(e){if(!l.isValidElement(e))return null;var t=e.props.cols||1,r=e.props.rows||1;return l.cloneElement(e,{style:(0,o.default)({width:"".concat(100/p*t,"%"),height:"auto"===a?"auto":a*r+b,padding:b/2},e.props.style)})})))})),p=(0,u.default)(c,{name:"MuiGridList"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/GridList/GridList.js"}],[987,{"./GridList":986,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./GridList"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/GridList/index.js"}],[988,{"../styles/withStyles":1211,"../utils/debounce":1222,"../utils/isMuiElement":1226,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/toConsumableArray":325,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=n(e("@babel/runtime/helpers/toConsumableArray")),s=a(e("react")),u=(n(e("prop-types")),n(e("clsx"))),c=n(e("../utils/debounce")),d=n(e("../styles/withStyles")),p=n(e("../utils/isMuiElement")),f={root:{boxSizing:"border-box",flexShrink:0},tile:{position:"relative",display:"block",height:"100%",overflow:"hidden"},imgFullHeight:{height:"100%",transform:"translateX(-50%)",position:"relative",left:"50%"},imgFullWidth:{width:"100%",position:"relative",transform:"translateY(-50%)",top:"50%"}};r.styles=f;var m=function(e,t){var r,a,n,o;e&&e.complete&&(e.width/e.height>e.parentElement.offsetWidth/e.parentElement.offsetHeight?((r=e.classList).remove.apply(r,(0,l.default)(t.imgFullWidth.split(" "))),(a=e.classList).add.apply(a,(0,l.default)(t.imgFullHeight.split(" ")))):((n=e.classList).remove.apply(n,(0,l.default)(t.imgFullHeight.split(" "))),(o=e.classList).add.apply(o,(0,l.default)(t.imgFullWidth.split(" ")))))};var h=s.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,l=(e.cols,e.component),d=void 0===l?"li":l,f=(e.rows,(0,i.default)(e,["children","classes","className","cols","component","rows"])),h=s.useRef(null);return s.useEffect((function(){!function(e,t){e&&(e.complete?m(e,t):e.addEventListener("load",(function(){m(e,t)})))}(h.current,a)})),s.useEffect((function(){var e=(0,c.default)((function(){m(h.current,a)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[a]),s.createElement(d,(0,o.default)({className:(0,u.default)(a.root,n),ref:t},f),s.createElement("div",{className:a.tile},s.Children.map(r,(function(e){return s.isValidElement(e)?"img"===e.type||(0,p.default)(e,["Image"])?s.cloneElement(e,{ref:h}):e:null}))))})),b=(0,d.default)(f,{name:"MuiGridListTile"})(h);r.default=b}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/GridListTile/GridListTile.js"}],[989,{"./GridListTile":988,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./GridListTile"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/GridListTile/index.js"}],[990,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=function(e){return{root:{position:"absolute",left:0,right:0,height:48,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily},titlePositionBottom:{bottom:0},titlePositionTop:{top:0},rootSubtitle:{height:68},titleWrap:{flexGrow:1,marginLeft:16,marginRight:16,color:e.palette.common.white,overflow:"hidden"},titleWrapActionPosLeft:{marginLeft:0},titleWrapActionPosRight:{marginRight:0},title:{fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},actionIcon:{},actionIconActionPosLeft:{order:-1}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.actionIcon,a=e.actionPosition,n=void 0===a?"right":a,u=e.classes,c=e.className,d=e.subtitle,p=e.title,f=e.titlePosition,m=void 0===f?"bottom":f,h=(0,i.default)(e,["actionIcon","actionPosition","classes","className","subtitle","title","titlePosition"]),b=r&&n;return l.createElement("div",(0,o.default)({className:(0,s.default)(u.root,c,"top"===m?u.titlePositionTop:u.titlePositionBottom,d&&u.rootSubtitle),ref:t},h),l.createElement("div",{className:(0,s.default)(u.titleWrap,{left:u.titleWrapActionPosLeft,right:u.titleWrapActionPosRight}[b])},l.createElement("div",{className:u.title},p),d?l.createElement("div",{className:u.subtitle},d):null),r?l.createElement("div",{className:(0,s.default)(u.actionIcon,"left"===b&&u.actionIconActionPosLeft)},r):null)})),p=(0,u.default)(c,{name:"MuiGridListTileBar"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/GridListTileBar/GridListTileBar.js"}],[991,{"./GridListTileBar":990,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./GridListTileBar"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/GridListTileBar/index.js"}],[992,{"../styles/useTheme":1210,"../transitions/utils":1214,"../utils/useForkRef":1236,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/slicedToArray":323,"prop-types":4528,react:4776,"react-transition-group":1189},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/slicedToArray")),l=n(e("@babel/runtime/helpers/objectWithoutProperties")),s=a(e("react")),u=(n(e("prop-types")),e("react-transition-group")),c=n(e("../styles/useTheme")),d=e("../transitions/utils"),p=n(e("../utils/useForkRef"));function f(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var m={entering:{opacity:1,transform:f(1)},entered:{opacity:1,transform:"none"}},h=s.forwardRef((function(e,t){var r=e.children,a=e.disableStrictModeCompat,n=void 0!==a&&a,h=e.in,b=e.onEnter,g=e.onEntered,y=e.onEntering,v=e.onExit,w=e.onExited,x=e.onExiting,E=e.style,_=e.timeout,C=void 0===_?"auto":_,T=e.TransitionComponent,k=void 0===T?u.Transition:T,S=(0,l.default)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),R=s.useRef(),P=s.useRef(),M=(0,c.default)(),O=M.unstable_strictMode&&!n,D=s.useRef(null),j=(0,p.default)(r.ref,t),A=(0,p.default)(O?D:undefined,j),I=function(e){return function(t,r){if(e){var a=O?[D.current,t]:[t,r],n=(0,i.default)(a,2),o=n[0],l=n[1];l===undefined?e(o):e(o,l)}}},q=I(y),N=I((function(e,t){(0,d.reflow)(e);var r,a=(0,d.getTransitionProps)({style:E,timeout:C},{mode:"enter"}),n=a.duration,o=a.delay;"auto"===C?(r=M.transitions.getAutoHeightDuration(e.clientHeight),P.current=r):r=n,e.style.transition=[M.transitions.create("opacity",{duration:r,delay:o}),M.transitions.create("transform",{duration:.666*r,delay:o})].join(","),b&&b(e,t)})),L=I(g),F=I(x),W=I((function(e){var t,r=(0,d.getTransitionProps)({style:E,timeout:C},{mode:"exit"}),a=r.duration,n=r.delay;"auto"===C?(t=M.transitions.getAutoHeightDuration(e.clientHeight),P.current=t):t=a,e.style.transition=[M.transitions.create("opacity",{duration:t,delay:n}),M.transitions.create("transform",{duration:.666*t,delay:n||.333*t})].join(","),e.style.opacity="0",e.style.transform=f(.75),v&&v(e)})),B=I(w);return s.useEffect((function(){return function(){clearTimeout(R.current)}}),[]),s.createElement(k,(0,o.default)({appear:!0,in:h,nodeRef:O?D:undefined,onEnter:N,onEntered:L,onEntering:q,onExit:W,onExited:B,onExiting:F,addEndListener:function(e,t){var r=O?e:t;"auto"===C&&(R.current=setTimeout(r,P.current||0))},timeout:"auto"===C?null:C},S),(function(e,t){return s.cloneElement(r,(0,o.default)({style:(0,o.default)({opacity:0,transform:f(.75),visibility:"exited"!==e||h?undefined:"hidden"},m[e],E,r.props.style),ref:A},t))}))}));h.muiSupportAuto=!0;var b=h;r.default=b}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Grow/Grow.js"}],[993,{"./Grow":992,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Grow"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Grow/index.js"}],[994,{"./HiddenCss":995,"./HiddenJs":996,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("./HiddenJs"))),u=n(e("./HiddenCss"));function c(e){var t=e.implementation,r=void 0===t?"js":t,a=e.lgDown,n=void 0!==a&&a,c=e.lgUp,d=void 0!==c&&c,p=e.mdDown,f=void 0!==p&&p,m=e.mdUp,h=void 0!==m&&m,b=e.smDown,g=void 0!==b&&b,y=e.smUp,v=void 0!==y&&y,w=e.xlDown,x=void 0!==w&&w,E=e.xlUp,_=void 0!==E&&E,C=e.xsDown,T=void 0!==C&&C,k=e.xsUp,S=void 0!==k&&k,R=(0,i.default)(e,["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"]);return"js"===r?l.createElement(s.default,(0,o.default)({lgDown:n,lgUp:d,mdDown:f,mdUp:h,smDown:g,smUp:v,xlDown:x,xlUp:_,xsDown:T,xsUp:S},R)):l.createElement(u.default,(0,o.default)({lgDown:n,lgUp:d,mdDown:f,mdUp:h,smDown:g,smUp:v,xlDown:x,xlUp:_,xsDown:T,xsUp:S},R))}var d=c;r.default=d}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Hidden/Hidden.js"}],[995,{"../styles/useTheme":1210,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/defineProperty":306,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("@babel/runtime/helpers/objectWithoutProperties")),i=n(e("@babel/runtime/helpers/defineProperty")),l=a(e("react")),s=(n(e("prop-types")),n(e("../utils/capitalize"))),u=n(e("../styles/withStyles")),c=n(e("../styles/useTheme"));function d(e){var t=e.children,r=e.classes,a=e.className,n=e.only,i=((0,o.default)(e,["children","classes","className","only"]),(0,c.default)()),u=[];a&&u.push(a);for(var d=0;d{(0,p.checkForLastErrorAndLog)()||s.default.error(e)})),[r]=t;let a=0,o="Title",i="file://";r&&({id:a,title:o,url:i}=r);const{origin:l,protocol:u}=i?new URL(i):{};if(!l||"null"===l)return{};return{id:a,title:o,origin:l,protocol:u,url:i}}(r),l=async e=>{var a;"startUISync"===(null==e||null===(a=e.data)||void 0===a?void 0:a.method)&&((0,h.endTrace)({name:h.TraceName.BackgroundConnect}),d.isManifestV3&&k?function(e){const t=R(e);(0,u.updateBackgroundConnection)(t)}(o):await async function(e,t,r,a){try{const n=await async function(e,t,r){const a=R(t);return await(0,u.default)({activeTab:e,container:C,backgroundConnection:a,traceContext:r})}(e,t,a);(0,h.endTrace)({name:h.TraceName.UIStartup}),k=!0;const o=n.getState(),{metamask:{completedOnboarding:i}={}}=o;i||r===c.ENVIRONMENT_TYPE_FULLSCREEN||global.platform.openExtensionInBrowser()}catch(e){!async function(e,t,r){const a=await(0,m.getErrorHtml)(e,f.SUPPORT_LINK,r);C.innerHTML=a;const o=document.getElementById("critical-error-button");throw null==o||o.addEventListener("click",(e=>{n.default.runtime.reload()})),s.default.error(t.stack),t}("troubleStarting",e)}}(i,o,r,t),d.isManifestV3?await async function(){if((await n.default.storage.session.get(_))[_])return;const e=(0,y.getPlatform)();let t;try{const r=new URL("https://metamask.github.io/phishing-warning/v4.1.0/");let a,o;r.hash="#extensionStartup",t=window.document.createElement("iframe"),t.setAttribute("src",r.href),t.setAttribute("sandbox","allow-scripts allow-same-origin");const i=new Promise(((e,t)=>{a=e,o=t}));t.addEventListener("load",a),window.document.body.appendChild(t),setTimeout((()=>o(new S)),E),await i,e===c.PLATFORM_FIREFOX?console.error("Firefox does not support required MV3 APIs: Phishing warning page iframe and service worker will reload each page refresh"):n.default.storage.session.set({[_]:!0})}catch(e){e instanceof S?console.warn("Phishing warning page timeout; page not guaranteed to work offline."):console.error("Failed to initialize phishing warning page",e)}finally{t&&t.remove()}}():T.onMessage.removeListener(l))};if(d.isManifestV3){const e=()=>{console.log("resetExtensionStreamAndListeners called"),T.onMessage.removeListener(l),T.onDisconnect.removeListener(e),console.log("app/script/ui.js browser.runtime.connect called at 2 ",Date.now()),T=n.default.runtime.connect({name:r}),o=new a.default(T),T.onMessage.addListener(l),T.onDisconnect.addListener(e)};T.onDisconnect.addListener(e)}(0,h.trace)({name:h.TraceName.BackgroundConnect,parentContext:t}),T.onMessage.addListener(l)})().catch(s.default.error)}}},{package:"$root$",file:"app/scripts/ui.js"}]],[295],{}); \ No newline at end of file +LavaPack.loadBundle([[6937,{"../../../shared/constants/metametrics":5260,"../../../shared/constants/swaps":5274,"../../../shared/lib/transactions-controller-utils":5292,"../../../shared/modules/selectors":5319,"../../../shared/modules/selectors/networks":5320,"../../components/component-library":5806,"../../components/ui/box":6079,"../../contexts/i18n":6211,"../../contexts/metametrics":6214,"../../ducks/swaps/swaps":6244,"../../helpers/constants/design-system":6248,"../../helpers/constants/routes":6254,"../../helpers/higher-order-components/feature-toggled-route":6265,"../../hooks/useGasFeeEstimates":6331,"../../selectors":6985,"../../selectors/selectors":6993,"../../store/actions":7e3,"./awaiting-signatures":6920,"./awaiting-swap":6923,"./hooks/useUpdateSwapsState":6934,"./loading-swaps-quotes":6940,"./notification-page/notification-page":6943,"./prepare-swap-page/prepare-swap-page":6944,"./smart-transaction-status":6961,"@metamask/transaction-controller":2698,lodash:4380,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){var e,t,r,D;const j=(0,a.useContext)(s.I18nContext),I=(0,o.useHistory)(),A=(0,n.useDispatch)(),q=(0,a.useContext)(w.MetaMetricsContext),{pathname:N}=(0,o.useLocation)(),L=N===m.AWAITING_SWAP_ROUTE,F=N===m.AWAITING_SIGNATURES_ROUTE,W=N===m.SWAPS_ERROR_ROUTE,B=N===m.LOADING_QUOTES_ROUTE,U=N===m.SMART_TRANSACTION_STATUS_ROUTE,$=N===m.PREPARE_SWAP_ROUTE,[z,G]=(0,a.useState)(!1),H=(0,n.useSelector)(d.getFetchParams,i.isEqual),{destinationTokenInfo:V={}}=(null==H?void 0:H.metaData)||{},Q=(0,n.useSelector)(d.getBackgroundSwapRouteState),X=(0,n.useSelector)(u.getSelectedAccount,n.shallowEqual),Y=(0,n.useSelector)(d.getQuotes,i.isEqual),Z=(0,n.useSelector)(d.getLatestAddedTokenTo,i.isEqual),K=(0,n.useSelector)(p.getCurrentNetworkTransactions,n.shallowEqual),J=(0,n.useSelector)(d.getTradeTxId),ee=(0,n.useSelector)(d.getApproveTxId),te=(0,n.useSelector)(d.getAggregatorMetadata,n.shallowEqual),re=(0,n.useSelector)(d.getFetchingQuotes);let ae=(0,n.useSelector)(d.getSwapsErrorKey);const ne=(0,n.useSelector)(d.getSwapsFeatureIsLive),oe=(0,n.useSelector)(c.getCurrentChainId),ie=(0,n.useSelector)(u.getIsSwapsChain),le=(0,n.useSelector)(u.getTokenList,i.isEqual),se=(0,i.shuffle)(Object.values(le)),ue=(0,n.useSelector)(d.getReviewSwapClickedTimestamp),ce=Boolean(ue),de=(0,n.useSelector)(f.getSmartTransactionsOptInStatusForMetrics),pe=(0,n.useSelector)(f.getSmartTransactionsEnabled),fe=(0,n.useSelector)(d.getCurrentSmartTransactionsEnabled),me=(0,n.useSelector)(d.getCurrentSmartTransactionsError);(0,a.useEffect)((()=>{ie||(async()=>{await A((0,d.prepareToLeaveSwaps)()),I.push(m.DEFAULT_ROUTE)})()}),[ie,A,I]),(0,g.useGasFeeEstimates)();const{balance:he,address:be}=X,ge=ee&&K.find((({id:e})=>ee===e)),ye=J&&K.find((({id:e})=>J===e)),ve=(null==ye?void 0:ye.txReceipt)&&(0,x.getSwapsTokensReceivedFromTxMeta)(null==V?void 0:V.symbol,ye,null==V?void 0:V.address,be,null==V?void 0:V.decimals,ge,oe),we=(null==ye?void 0:ye.status)===l.TransactionStatus.confirmed,xe=(null==ge?void 0:ge.status)===l.TransactionStatus.failed||"0x0"===(null==ge||null===(e=ge.txReceipt)||void 0===e?void 0:e.status),Ee=(null==ye?void 0:ye.status)===l.TransactionStatus.failed||"0x0"===(null==ye||null===(t=ye.txReceipt)||void 0===t?void 0:t.status),_e=xe||Ee;_e&&ae!==h.CONTRACT_DATA_DISABLED_ERROR&&(ae=h.SWAP_FAILED_ERROR);const Ce=(0,a.useRef)();(0,a.useEffect)((()=>{Ce.current=()=>{!Z||L&&!_e||A((0,b.ignoreTokens)({tokensToIgnore:Z,dontShowLoadingIndicator:!0}))}}),[_e,A,Z,V,H,L]),(0,a.useEffect)((()=>()=>{Ce.current()}),[]),(0,T.default)();const Te=(0,n.useSelector)(u.isHardwareWallet),ke=(0,n.useSelector)(u.getHardwareWalletType),Se=(0,a.useRef)();(0,a.useEffect)((()=>{Se.current=()=>{var e,t;q({event:"Exited Swaps",category:v.MetaMetricsEventCategory.Swaps,sensitiveProperties:{token_from:null==H||null===(e=H.sourceTokenInfo)||void 0===e?void 0:e.symbol,token_from_amount:null==H?void 0:H.value,request_type:null==H?void 0:H.balanceError,token_to:null==H||null===(t=H.destinationTokenInfo)||void 0===t?void 0:t.symbol,slippage:null==H?void 0:H.slippage,custom_slippage:2!==(null==H?void 0:H.slippage),current_screen:N.match(/\/swaps\/(.+)/u)[1],is_hardware_wallet:Te,hardware_wallet_type:ke,stx_enabled:pe,current_stx_enabled:fe,stx_user_opt_in:de}})}})),(0,a.useEffect)((()=>((async()=>{await A((0,d.fetchSwapsLivenessAndFeatureFlags)())})(),()=>{Se.current()})),[A]),(0,a.useEffect)((()=>{ae&&!W&&ce&&I.push(m.SWAPS_ERROR_ROUTE)}),[I,ae,W,ce]);const Re=(0,a.useRef)();(0,a.useEffect)((()=>{const e=()=>(Ce.current(),B&&A((0,d.prepareToLeaveSwaps)()),null);return B&&!Re.current&&(Re.current=!0,window.addEventListener("beforeunload",e)),()=>window.removeEventListener("beforeunload",e)}),[A,B]);const Pe=(0,a.useCallback)((()=>{var e,t;q({event:"Error Smart Transactions",category:v.MetaMetricsEventCategory.Swaps,sensitiveProperties:{token_from:null==H||null===(e=H.sourceTokenInfo)||void 0===e?void 0:e.symbol,token_from_amount:null==H?void 0:H.value,request_type:null==H?void 0:H.balanceError,token_to:null==H||null===(t=H.destinationTokenInfo)||void 0===t?void 0:t.symbol,slippage:null==H?void 0:H.slippage,custom_slippage:2!==(null==H?void 0:H.slippage),current_screen:N.match(/\/swaps\/(.+)/u)[1],is_hardware_wallet:Te,hardware_wallet_type:ke,stx_enabled:pe,current_stx_enabled:fe,stx_user_opt_in:de,stx_error:me}})}),[me,fe,q,null==H?void 0:H.balanceError,null==H||null===(r=H.destinationTokenInfo)||void 0===r?void 0:r.symbol,null==H?void 0:H.slippage,null==H||null===(D=H.sourceTokenInfo)||void 0===D?void 0:D.symbol,null==H?void 0:H.value,ke,Te,N,pe,de]);if((0,a.useEffect)((()=>{me&&!z&&(G(!0),Pe())}),[me,Pe,z]),!ie)return a.default.createElement(a.default.Fragment,null);const Me=async()=>{Ce.current(),I.push({pathname:m.DEFAULT_ROUTE,state:{stayOnHomePage:!0}}),A((0,d.clearSwapsState)()),await A((0,b.resetBackgroundSwapsState)())};return a.default.createElement("div",{className:"swaps"},a.default.createElement("div",{className:"swaps__container"},a.default.createElement("div",{className:"swaps__header"},a.default.createElement(_.default,{display:C.DISPLAY.FLEX,justifyContent:C.JustifyContent.center,marginLeft:4,width:C.FRACTIONS.ONE_TWELFTH,tabIndex:"0",onKeyUp:e=>{"Enter"===e.key&&Me()}},!L&&!F&&!U&&a.default.createElement(E.Icon,{name:E.IconName.Arrow2Left,size:E.IconSize.Lg,color:C.IconColor.iconAlternative,onClick:Me,style:{cursor:"pointer"},title:j("cancel")})),a.default.createElement("div",{className:"swaps__title"},j("swap")),a.default.createElement(_.default,{display:C.DISPLAY.FLEX,justifyContent:C.JustifyContent.center,marginRight:4,width:C.FRACTIONS.ONE_TWELFTH,tabIndex:"0",onKeyUp:e=>{"Enter"===e.key&&A((0,d.setTransactionSettingsOpened)(!0))}},$&&a.default.createElement(E.Icon,{name:E.IconName.Setting,size:E.IconSize.Lg,color:C.IconColor.iconAlternative,onClick:()=>{A((0,d.setTransactionSettingsOpened)(!0))},style:{cursor:"pointer"},title:j("transactionSettings")}))),a.default.createElement("div",{className:"swaps__content"},a.default.createElement(o.Switch,null,a.default.createElement(y.default,{redirectRoute:m.SWAPS_MAINTENANCE_ROUTE,flag:ne,path:m.PREPARE_SWAP_ROUTE,exact:!0,render:()=>a.default.createElement(M.default,{ethBalance:he,selectedAccountAddress:be,shuffledTokensList:se})}),a.default.createElement(o.Route,{path:m.SWAPS_ERROR_ROUTE,exact:!0,render:()=>ae?a.default.createElement(R.default,{swapComplete:!1,errorKey:ae,txHash:null==ye?void 0:ye.hash,txId:null==ye?void 0:ye.id,submittedTime:null==ye?void 0:ye.submittedTime}):a.default.createElement(o.Redirect,{to:{pathname:m.PREPARE_SWAP_ROUTE}})}),a.default.createElement(o.Route,{path:m.SWAPS_NOTIFICATION_ROUTE,exact:!0,render:()=>ae?a.default.createElement(O.default,{notificationKey:ae}):a.default.createElement(o.Redirect,{to:{pathname:m.PREPARE_SWAP_ROUTE}})}),a.default.createElement(y.default,{redirectRoute:m.SWAPS_MAINTENANCE_ROUTE,flag:ne,path:m.LOADING_QUOTES_ROUTE,exact:!0,render:()=>te?a.default.createElement(P.default,{loadingComplete:!re&&Boolean(Object.values(Y).length),onDone:async()=>{await A((0,b.setBackgroundSwapRouteState)("")),ae===h.ERROR_FETCHING_QUOTES||ae===h.QUOTES_NOT_AVAILABLE_ERROR?(A((0,b.setSwapsErrorKey)(h.QUOTES_NOT_AVAILABLE_ERROR)),I.push(m.SWAPS_ERROR_ROUTE)):I.push(m.PREPARE_SWAP_ROUTE)},aggregatorMetadata:te}):a.default.createElement(o.Redirect,{to:{pathname:m.PREPARE_SWAP_ROUTE}})}),a.default.createElement(o.Route,{path:m.SWAPS_MAINTENANCE_ROUTE,exact:!0,render:()=>!1===ne?a.default.createElement(R.default,{errorKey:h.OFFLINE_FOR_MAINTENANCE}):a.default.createElement(o.Redirect,{to:{pathname:m.PREPARE_SWAP_ROUTE}})}),a.default.createElement(o.Route,{path:m.AWAITING_SIGNATURES_ROUTE,exact:!0,render:()=>a.default.createElement(k.default,null)}),a.default.createElement(o.Route,{path:m.SMART_TRANSACTION_STATUS_ROUTE,exact:!0,render:()=>a.default.createElement(S.default,{txId:null==ye?void 0:ye.id})}),a.default.createElement(o.Route,{path:m.AWAITING_SWAP_ROUTE,exact:!0,render:()=>"awaiting"===Q||ye?a.default.createElement(R.default,{swapComplete:we,txHash:null==ye?void 0:ye.hash,tokensReceived:ve,txId:null==ye?void 0:ye.id,submittingSwap:"awaiting"===Q&&!(ee||J)}):a.default.createElement(o.Redirect,{to:{pathname:m.DEFAULT_ROUTE}})})))))};var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=j(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=e("react-router-dom"),i=e("lodash"),l=e("@metamask/transaction-controller"),s=e("../../contexts/i18n"),u=e("../../selectors/selectors"),c=e("../../../shared/modules/selectors/networks"),d=e("../../ducks/swaps/swaps"),p=e("../../selectors"),f=e("../../../shared/modules/selectors"),m=e("../../helpers/constants/routes"),h=e("../../../shared/constants/swaps"),b=e("../../store/actions"),g=e("../../hooks/useGasFeeEstimates"),y=D(e("../../helpers/higher-order-components/feature-toggled-route")),v=e("../../../shared/constants/metametrics"),w=e("../../contexts/metametrics"),x=e("../../../shared/lib/transactions-controller-utils"),E=e("../../components/component-library"),_=D(e("../../components/ui/box")),C=e("../../helpers/constants/design-system"),T=D(e("./hooks/useUpdateSwapsState")),k=D(e("./awaiting-signatures")),S=D(e("./smart-transaction-status")),R=D(e("./awaiting-swap")),P=D(e("./loading-swaps-quotes")),M=D(e("./prepare-swap-page/prepare-swap-page")),O=D(e("./notification-page/notification-page"));function D(e){return e&&e.__esModule?e:{default:e}}function j(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(j=function(e){return e?r:t})(e)}}}},{package:"$root$",file:"ui/pages/swaps/index.js"}],[6938,{"../../../../shared/modules/hexstring-utils":5307,"../../../../shared/modules/selectors/networks":5320,"../../../components/component-library":5806,"../../../components/component-library/text-field-search/deprecated":5856,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,"../searchable-item-list/item-list":6949,"../swaps.util":6970,lodash:4380,loglevel:4386,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=w;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=y(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=g(e("prop-types")),i=e("lodash"),l=g(e("loglevel")),s=g(e("../../../components/ui/box")),u=e("../../../helpers/constants/design-system"),c=e("../../../components/component-library"),d=e("../../../components/component-library/text-field-search/deprecated"),p=g(e("../searchable-item-list/item-list")),f=e("../../../../shared/modules/hexstring-utils"),m=e("../../../contexts/i18n"),h=e("../swaps.util"),b=e("../../../../shared/modules/selectors/networks");function g(e){return e&&e.__esModule?e:{default:e}}function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(y=function(e){return e?r:t})(e)}let v;function w({itemsToSearch:e=[],listTitle:t,maxListItems:r,onClickItem:o,onOpenImportTokenModalClick:g,shouldSearchForImports:y,Placeholder:w,hideRightLabels:x,hideItemIf:E,listContainerClassName:_,searchQuery:C,setSearchQuery:T}){const k=(0,a.useRef)(),S=(0,a.useContext)(m.I18nContext),[R,P]=(0,a.useState)(e),M=(0,n.useSelector)(b.getCurrentChainId),O=async t=>{T(t),v&&clearTimeout(v),v=setTimeout((async()=>{v=null;const r=t.trim(),a=r.toUpperCase(),n=r.toLowerCase();if(!r)return void P(e);const o=(0,f.isValidHexAddress)(r);let s=[];if(o){const t=e.find((e=>e.address===n));t&&s.push(t)}else s=(0,i.filter)(e,(function(e){return e.symbol.includes(a)}));const u=""===t?e:s;y&&0===u.length&&o?await(async e=>{try{const t=await(0,h.fetchToken)(e,M);if(t)return t.primaryLabel=t.symbol,t.secondaryLabel=t.name,t.notImported=!0,void P([t])}catch(e){l.default.error("Token not found, show 0 results.",e)}P([])})(r):P(u)}),350)};(0,a.useEffect)((()=>{O(C)}),[C]);return a.default.createElement(s.default,{className:"list-with-search",width:u.BlockSize.Full,tabIndex:"0"},a.default.createElement(s.default,{style:{gridColumnStart:1,gridColumnEnd:3},display:u.Display.Flex,flexDirection:u.FlexDirection.Column},a.default.createElement(d.TextFieldSearch,{id:"list-with-search__text-search",marginBottom:4,onChange:e=>O(e.target.value),clearButtonOnClick:()=>{T("")},value:C,placeholder:S("enterTokenNameOrAddress"),inputProps:{marginRight:0},className:"list-with-search__text-search",autoFocus:!0,tabIndex:"0"})),(null==R?void 0:R.length)>0&&a.default.createElement(p.default,{searchQuery:C,results:R,onClickItem:o,onOpenImportTokenModalClick:g,Placeholder:w,listTitle:t,maxListItems:r,containerRef:k,hideRightLabels:x,hideItemIf:E,listContainerClassName:_}),0===(null==R?void 0:R.length)&&a.default.createElement(s.default,{marginTop:1,marginBottom:5,display:u.Display.Flex,justifyContent:u.JustifyContent.center,alignItems:u.AlignItems.center},a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},S("swapNoTokensAvailable",[C]))))}w.propTypes={itemsToSearch:o.default.array,onClickItem:o.default.func,onOpenImportTokenModalClick:o.default.func,Placeholder:o.default.func,listTitle:o.default.string,maxListItems:o.default.number,hideRightLabels:o.default.bool,shouldSearchForImports:o.default.bool,hideItemIf:o.default.func,listContainerClassName:o.default.string,searchQuery:o.default.string,setSearchQuery:o.default.func}}}},{package:"$root$",file:"ui/pages/swaps/list-with-search/list-with-search.js"}],[6939,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement(n.default.Fragment,null,n.default.createElement("div",{className:"loading-swaps-quotes__background-1","data-testid":"loading-swaps-quotes-background-1"},n.default.createElement("svg",{width:"193",height:"190",viewBox:"0 0 193 190",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M153.753 53.876C153.595 53.9493 153.419 54.0161 153.25 54.0651C151.081 54.7451 148.777 53.538 148.086 51.3768C147.763 50.3298 147.851 49.2109 148.361 48.2363C148.87 47.2618 149.732 46.5374 150.78 46.2144C151.828 45.8913 152.948 45.9781 153.923 46.4865C154.898 46.9949 155.622 47.8557 155.944 48.9027C156.567 50.918 155.592 53.0243 153.753 53.876ZM150.817 47.5708C150.245 47.8359 149.782 48.2721 149.495 48.8334C149.144 49.5127 149.073 50.2843 149.303 51.0047C149.774 52.4998 151.375 53.3384 152.877 52.8787C154.374 52.4069 155.215 50.8063 154.756 49.3056C154.526 48.5852 154.027 47.9888 153.36 47.6334C152.68 47.2836 151.908 47.213 151.187 47.4437C151.049 47.4636 150.927 47.52 150.817 47.5708Z",fill:"#86E29B"}),n.default.createElement("path",{d:"M18.3624 73.9241C18.3015 73.9523 18.2407 73.9805 18.1798 74.0087C17.0495 74.4733 15.8073 74.4728 14.6751 74.0078C12.3517 73.0461 11.2387 70.3567 12.2031 68.0341C13.1676 65.7115 15.8598 64.5971 18.1833 65.5589C19.3155 66.0239 20.1951 66.9013 20.6591 68.0304C21.123 69.1595 21.1215 70.4008 20.6552 71.5326C20.2207 72.6053 19.4093 73.4391 18.3624 73.9241ZM15.0433 66.7921C14.3129 67.1305 13.713 67.7186 13.3766 68.5243C12.6776 70.207 13.4834 72.1377 15.1666 72.8348C15.9849 73.1647 16.8786 73.1789 17.6933 72.831C18.5136 72.4952 19.1388 71.8659 19.4818 71.0424C19.8126 70.2245 19.8276 69.3313 19.4801 68.5175C19.1448 67.6981 18.5155 67.0739 17.6917 66.7319C16.8144 66.3703 15.8589 66.4142 15.0433 66.7921Z",fill:"#FFB0EB"}),n.default.createElement("path",{d:"M116.617 37.3839C117.397 37.0226 117.736 36.0982 117.375 35.3192C117.015 34.5402 116.09 34.2016 115.31 34.5629C114.53 34.9243 114.19 35.8487 114.551 36.6277C114.912 37.4067 115.837 37.7453 116.617 37.3839Z",fill:"url(#paint0_linear)"}),n.default.createElement("path",{d:"M55.1317 91.7213C55.9116 91.36 56.2512 90.4356 55.8903 89.6566C55.5294 88.8776 54.6046 88.539 53.8247 88.9003C53.0448 89.2617 52.7052 90.1861 53.0661 90.9651C53.427 91.7441 54.3518 92.0827 55.1317 91.7213Z",fill:"url(#paint1_linear)"}),n.default.createElement("path",{d:"M31.9932 126.235C32.7731 125.874 33.1127 124.95 32.7518 124.171C32.3909 123.392 31.4661 123.053 30.6863 123.414C29.9064 123.776 29.5667 124.7 29.9277 125.479C30.2886 126.258 31.2134 126.597 31.9932 126.235Z",fill:"url(#paint2_linear)"}),n.default.createElement("path",{d:"M119.43 132.589C120.21 132.228 120.55 131.304 120.189 130.525C119.828 129.746 118.903 129.407 118.123 129.768C117.344 130.13 117.004 131.054 117.365 131.833C117.726 132.612 118.651 132.951 119.43 132.589Z",fill:"url(#paint3_linear)"}),n.default.createElement("path",{d:"M44.7469 47.3835C46.0108 46.7979 46.5612 45.2997 45.9763 44.0372C45.3914 42.7747 43.8926 42.2259 42.6286 42.8115C41.3647 43.3971 40.8143 44.8953 41.3992 46.1578C41.9841 47.4203 43.4829 47.9691 44.7469 47.3835Z",fill:"url(#paint4_linear)"}),n.default.createElement("path",{d:"M105.107 90.7857C106.371 90.2001 106.922 88.702 106.337 87.4394C105.752 86.1769 104.253 85.6282 102.989 86.2137C101.725 86.7993 101.175 88.2975 101.76 89.56C102.344 90.8226 103.843 91.3713 105.107 90.7857Z",fill:"url(#paint5_linear)"}),n.default.createElement("path",{d:"M95.5179 172.376C96.7818 171.791 97.3322 170.293 96.7473 169.03C96.1624 167.767 94.6636 167.219 93.3996 167.804C92.1357 168.39 91.5853 169.888 92.1702 171.151C92.7551 172.413 94.2539 172.962 95.5179 172.376Z",fill:"url(#paint6_linear)"}),n.default.createElement("path",{d:"M165.098 102.367C166.362 101.781 166.912 100.283 166.327 99.0205C165.742 97.758 164.244 97.2092 162.98 97.7948C161.716 98.3804 161.165 99.8786 161.75 101.141C162.335 102.404 163.834 102.952 165.098 102.367Z",fill:"url(#paint7_linear)"}),n.default.createElement("defs",null,n.default.createElement("linearGradient",{id:"paint0_linear",x1:"114.554",y1:"36.6326",x2:"117.379",y2:"35.3237",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint1_linear",x1:"53.0688",y1:"90.97",x2:"55.8937",y2:"89.6611",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint2_linear",x1:"29.9283",y1:"125.483",x2:"32.7532",y2:"124.174",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint3_linear",x1:"117.365",y1:"131.837",x2:"120.19",y2:"130.528",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint4_linear",x1:"41.4394",y1:"46.2402",x2:"45.947",y2:"43.9537",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint5_linear",x1:"101.8",y1:"89.6425",x2:"106.307",y2:"87.356",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint6_linear",x1:"92.2104",y1:"171.233",x2:"96.718",y2:"168.947",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint7_linear",x1:"161.79",y1:"101.224",x2:"166.298",y2:"98.937",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"}))))),n.default.createElement("div",{className:"loading-swaps-quotes__background-2","data-testid":"loading-swaps-quotes-background-2"},n.default.createElement("svg",{width:"195",height:"205",viewBox:"0 0 195 205",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M29.84 121.982C30.0408 121.969 30.245 122.01 30.4258 122.106L46.4233 130.275C46.8125 130.478 47.0536 130.893 47.0402 131.324C47.0143 131.768 46.7423 132.148 46.3356 132.308L24.5484 140.937C24.1417 141.097 23.6789 141.005 23.3642 140.702C23.0495 140.4 22.9398 139.937 23.0753 139.525L28.8651 122.727C28.9671 122.426 29.2065 122.169 29.5086 122.056C29.614 122.023 29.7194 121.989 29.84 121.982ZM43.1981 131.148L30.5607 124.689L25.9884 137.96L43.1981 131.148Z",fill:"#75C4FD"}),n.default.createElement("path",{d:"M168.214 54.3381C168.442 54.3238 168.674 54.3764 168.869 54.485C169.217 54.6781 169.44 55.0266 169.465 55.4145L170.59 68.4358C170.631 68.8763 170.416 69.3061 170.041 69.5444C169.666 69.7827 169.182 69.7862 168.805 69.5681L156.14 62.2246C155.763 62.0065 155.535 61.5911 155.548 61.1472C155.56 60.7033 155.818 60.3112 156.209 60.1122L167.75 54.4343C167.908 54.3841 168.067 54.3473 168.214 54.3381ZM168.027 66.3674L167.248 57.3661L159.267 61.2902L168.027 66.3674Z",fill:"#FFB0EB"}),n.default.createElement("path",{d:"M88.6283 16.6885C88.8694 16.6734 89.1154 16.7385 89.3255 16.873L100.21 24.1133C100.561 24.3464 100.762 24.7635 100.708 25.1832C100.653 25.6028 100.381 25.969 99.9864 26.1146L86.3391 31.4276C85.9449 31.5731 85.5106 31.5064 85.1842 31.2314C84.8712 30.9556 84.7239 30.5352 84.8192 30.1264L87.5815 17.5731C87.666 17.2053 87.9162 16.9076 88.2702 16.7646C88.3882 16.7169 88.5078 16.696 88.6283 16.6885ZM97.1342 24.7894L89.4471 19.6718L87.5021 28.5349L97.1342 24.7894Z",fill:"url(#paint0_linear)"}),n.default.createElement("path",{d:"M117.145 183.156C116.944 183.289 116.698 183.356 116.449 183.344L103.402 182.517C102.982 182.49 102.6 182.229 102.437 181.839C102.274 181.448 102.327 180.995 102.596 180.671L111.758 169.247C112.027 168.923 112.436 168.764 112.856 168.839C113.265 168.921 113.603 169.212 113.725 169.614L117.609 181.866C117.72 182.227 117.652 182.61 117.417 182.911C117.339 183.011 117.246 183.089 117.145 183.156ZM105.728 180.393L114.944 180.981L112.197 172.333L105.728 180.393Z",fill:"url(#paint1_linear)"}),n.default.createElement("path",{d:"M38.0816 74.0208C38.1217 74.0183 38.1485 74.0166 38.1887 74.0141C42.3831 73.805 45.9744 77.0577 46.1831 81.2474C46.3919 85.4371 43.1484 89.0241 38.9407 89.234C34.7463 89.4431 31.1549 86.1904 30.9462 82.0007C30.7391 77.8377 33.9307 74.2809 38.0816 74.0208ZM38.9104 87.2486C41.9767 87.0565 44.3523 84.4236 44.1997 81.3448C44.0455 78.2393 41.3949 75.8407 38.2859 75.9952C35.1761 76.1364 32.7753 78.7977 32.9296 81.9033C33.0838 85.0088 35.7344 87.4073 38.8434 87.2528C38.8568 87.252 38.8836 87.2503 38.9104 87.2486Z",fill:"#86E29B"}),n.default.createElement("path",{d:"M162.178 97.8401C162.218 97.8376 162.245 97.8359 162.285 97.8334C166.48 97.6243 170.071 100.877 170.28 105.067C170.489 109.256 167.245 112.843 163.037 113.053C158.843 113.262 155.252 110.01 155.043 105.82C154.836 101.657 158.027 98.1002 162.178 97.8401ZM163.007 111.068C166.073 110.876 168.449 108.243 168.296 105.164C168.142 102.059 165.492 99.6601 162.383 99.8146C159.273 99.9557 156.872 102.617 157.026 105.723C157.181 108.828 159.831 111.227 162.94 111.072C162.953 111.071 162.98 111.07 163.007 111.068Z",fill:"#86E29B"}),n.default.createElement("defs",null,n.default.createElement("linearGradient",{id:"paint0_linear",x1:"100.609",y1:"23.2611",x2:"84.4152",y2:"24.2757",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#FFE466"}),n.default.createElement("stop",{offset:"1",stopColor:"#FFAFEA"})),n.default.createElement("linearGradient",{id:"paint1_linear",x1:"103.812",y1:"183.939",x2:"116.959",y2:"174.66",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"0.0928503",stopColor:"#81C2F6"}),n.default.createElement("stop",{offset:"1",stopColor:"#F0B8BD"}))))))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/loading-swaps-quotes/background-animation.js"}],[6940,{"./loading-swaps-quotes":6941},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./loading-swaps-quotes"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/loading-swaps-quotes/index.js"}],[6941,{"../../../../shared/constants/metametrics":5260,"../../../../shared/modules/selectors":5319,"../../../components/component-library":5806,"../../../components/ui/mascot":6148,"../../../contexts/i18n":6211,"../../../contexts/metametrics":6214,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"../../../selectors/selectors":6993,"../swaps-footer":6968,"./background-animation":6939,events:3868,lodash:4380,"lodash/isEqual":4368,"prop-types":4528,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=_;var a=E(e("events")),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=x(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),o=e("react-redux"),i=E(e("prop-types")),l=e("lodash"),s=e("react-router-dom"),u=E(e("lodash/isEqual")),c=e("../../../ducks/swaps/swaps"),d=e("../../../selectors/selectors"),p=e("../../../../shared/modules/selectors"),f=e("../../../contexts/i18n"),m=e("../../../contexts/metametrics"),h=E(e("../../../components/ui/mascot")),b=e("../../../../shared/constants/metametrics"),g=E(e("../swaps-footer")),y=e("../../../components/component-library"),v=e("../../../helpers/constants/design-system"),w=E(e("./background-animation"));function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(x=function(e){return e?r:t})(e)}function E(e){return e&&e.__esModule?e:{default:e}}function _({aggregatorMetadata:e,loadingComplete:t,onDone:r}){var i,x;const E=(0,n.useContext)(f.I18nContext),_=(0,n.useContext)(m.MetaMetricsContext),C=(0,o.useDispatch)(),T=(0,s.useHistory)(),k=(0,n.useRef)(new a.default),S=(0,o.useSelector)(c.getFetchParams,u.default),R=(0,o.useSelector)(c.getQuotesFetchStartTime),P=(0,o.useSelector)(d.isHardwareWallet),M=(0,o.useSelector)(d.getHardwareWalletType),O=(0,o.useSelector)(p.getSmartTransactionsOptInStatusForMetrics),D=(0,o.useSelector)(p.getSmartTransactionsEnabled),j=(0,o.useSelector)(c.getCurrentSmartTransactionsEnabled),I={event:"Quotes Request Cancelled",category:b.MetaMetricsEventCategory.Swaps,sensitiveProperties:{token_from:null==S||null===(i=S.sourceTokenInfo)||void 0===i?void 0:i.symbol,token_from_amount:null==S?void 0:S.value,request_type:null==S?void 0:S.balanceError,token_to:null==S||null===(x=S.destinationTokenInfo)||void 0===x?void 0:x.symbol,slippage:null==S?void 0:S.slippage,custom_slippage:2!==(null==S?void 0:S.slippage),response_time:Date.now()-R,is_hardware_wallet:P,hardware_wallet_type:M,stx_enabled:D,current_stx_enabled:j,stx_user_opt_in:O}},[A]=(0,n.useState)((()=>(0,l.shuffle)(Object.keys(e)))),q=A.length,N=(0,n.useRef)(),L=N.current,[F,W]=(0,n.useState)(0),[B,U]=(0,n.useState)(null);return(0,n.useEffect)((()=>{let e;e=t?20:500+Math.floor(1500*Math.random());const a=setTimeout((()=>{F{if(L){const{top:e,left:t,width:r,height:a}=L.getBoundingClientRect();U({x:t+r/2,y:e+a/2})}}),[L]),n.default.createElement("div",{className:"loading-swaps-quotes"},n.default.createElement("div",{className:"loading-swaps-quotes__content"},n.default.createElement(n.default.Fragment,null,n.default.createElement(y.Text,{variant:v.TextVariant.bodyXs,"data-testid":"loading-swaps-quotes-quote-counter",color:v.TextColor.textAlternative,marginTop:1,display:v.Display.Flex,justifyContent:v.JustifyContent.center,width:v.BlockSize.Full,marginBottom:1},n.default.createElement("span",null,E("swapFetchingQuoteNofN",[Math.min(F+1,q),q]))),n.default.createElement(y.Text,{variant:v.TextVariant.headingSm,"data-testid":"loading-swaps-quotes-quote-name-check",color:v.TextColor.textDefault,display:v.Display.Flex,justifyContent:v.JustifyContent.center,width:v.BlockSize.Full,textTransform:v.TextTransform.Capitalize},n.default.createElement("span",null,E("swapFetchingQuotes"))),n.default.createElement("div",{className:"loading-swaps-quotes__loading-bar-container"},n.default.createElement("div",{className:"loading-swaps-quotes__loading-bar",style:{width:100/q*F+"%"}}))),n.default.createElement("div",{className:"loading-swaps-quotes__animation"},n.default.createElement(w.default,null),n.default.createElement("div",{className:"loading-swaps-quotes__mascot-container",ref:N},n.default.createElement(h.default,{animationEventEmitter:k.current,width:"90",height:"90",lookAtTarget:B})))),n.default.createElement(g.default,{submitText:E("back"),onSubmit:async()=>{_(I),await C((0,c.navigateBackToPrepareSwap)(T))},hideCancel:!0}))}_.propTypes={loadingComplete:i.default.bool.isRequired,onDone:i.default.func.isRequired,aggregatorMetadata:i.default.objectOf(i.default.shape({title:i.default.string,color:i.default.string,icon:i.default.string}))}}}},{package:"$root$",file:"ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js"}],[6942,{"../../../components/ui/mascot":6148,events:3868,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){const e=(0,n.useRef)(new a.default);return n.default.createElement("div",{className:"mascot-background-animation__animation"},n.default.createElement("div",{className:"mascot-background-animation__background-1","data-testid":"mascot-background-animation-background-1"},n.default.createElement("svg",{width:"193",height:"190",viewBox:"0 0 193 190",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M153.753 53.876C153.595 53.9493 153.419 54.0161 153.25 54.0651C151.081 54.7451 148.777 53.538 148.086 51.3768C147.763 50.3298 147.851 49.2109 148.361 48.2363C148.87 47.2618 149.732 46.5374 150.78 46.2144C151.828 45.8913 152.948 45.9781 153.923 46.4865C154.898 46.9949 155.622 47.8557 155.944 48.9027C156.567 50.918 155.592 53.0243 153.753 53.876ZM150.817 47.5708C150.245 47.8359 149.782 48.2721 149.495 48.8334C149.144 49.5127 149.073 50.2843 149.303 51.0047C149.774 52.4998 151.375 53.3384 152.877 52.8787C154.374 52.4069 155.215 50.8063 154.756 49.3056C154.526 48.5852 154.027 47.9888 153.36 47.6334C152.68 47.2836 151.908 47.213 151.187 47.4437C151.049 47.4636 150.927 47.52 150.817 47.5708Z",fill:"#86E29B"}),n.default.createElement("path",{d:"M18.3624 73.9241C18.3015 73.9523 18.2407 73.9805 18.1798 74.0087C17.0495 74.4733 15.8073 74.4728 14.6751 74.0078C12.3517 73.0461 11.2387 70.3567 12.2031 68.0341C13.1676 65.7115 15.8598 64.5971 18.1833 65.5589C19.3155 66.0239 20.1951 66.9013 20.6591 68.0304C21.123 69.1595 21.1215 70.4008 20.6552 71.5326C20.2207 72.6053 19.4093 73.4391 18.3624 73.9241ZM15.0433 66.7921C14.3129 67.1305 13.713 67.7186 13.3766 68.5243C12.6776 70.207 13.4834 72.1377 15.1666 72.8348C15.9849 73.1647 16.8786 73.1789 17.6933 72.831C18.5136 72.4952 19.1388 71.8659 19.4818 71.0424C19.8126 70.2245 19.8276 69.3313 19.4801 68.5175C19.1448 67.6981 18.5155 67.0739 17.6917 66.7319C16.8144 66.3703 15.8589 66.4142 15.0433 66.7921Z",fill:"#FFB0EB"}),n.default.createElement("path",{d:"M116.617 37.3839C117.397 37.0226 117.736 36.0982 117.375 35.3192C117.015 34.5402 116.09 34.2016 115.31 34.5629C114.53 34.9243 114.19 35.8487 114.551 36.6277C114.912 37.4067 115.837 37.7453 116.617 37.3839Z",fill:"url(#paint0_linear)"}),n.default.createElement("path",{d:"M55.1317 91.7213C55.9116 91.36 56.2512 90.4356 55.8903 89.6566C55.5294 88.8776 54.6046 88.539 53.8247 88.9003C53.0448 89.2617 52.7052 90.1861 53.0661 90.9651C53.427 91.7441 54.3518 92.0827 55.1317 91.7213Z",fill:"url(#paint1_linear)"}),n.default.createElement("path",{d:"M31.9932 126.235C32.7731 125.874 33.1127 124.95 32.7518 124.171C32.3909 123.392 31.4661 123.053 30.6863 123.414C29.9064 123.776 29.5667 124.7 29.9277 125.479C30.2886 126.258 31.2134 126.597 31.9932 126.235Z",fill:"url(#paint2_linear)"}),n.default.createElement("path",{d:"M119.43 132.589C120.21 132.228 120.55 131.304 120.189 130.525C119.828 129.746 118.903 129.407 118.123 129.768C117.344 130.13 117.004 131.054 117.365 131.833C117.726 132.612 118.651 132.951 119.43 132.589Z",fill:"url(#paint3_linear)"}),n.default.createElement("path",{d:"M44.7469 47.3835C46.0108 46.7979 46.5612 45.2997 45.9763 44.0372C45.3914 42.7747 43.8926 42.2259 42.6286 42.8115C41.3647 43.3971 40.8143 44.8953 41.3992 46.1578C41.9841 47.4203 43.4829 47.9691 44.7469 47.3835Z",fill:"url(#paint4_linear)"}),n.default.createElement("path",{d:"M105.107 90.7857C106.371 90.2001 106.922 88.702 106.337 87.4394C105.752 86.1769 104.253 85.6282 102.989 86.2137C101.725 86.7993 101.175 88.2975 101.76 89.56C102.344 90.8226 103.843 91.3713 105.107 90.7857Z",fill:"url(#paint5_linear)"}),n.default.createElement("path",{d:"M95.5179 172.376C96.7818 171.791 97.3322 170.293 96.7473 169.03C96.1624 167.767 94.6636 167.219 93.3996 167.804C92.1357 168.39 91.5853 169.888 92.1702 171.151C92.7551 172.413 94.2539 172.962 95.5179 172.376Z",fill:"url(#paint6_linear)"}),n.default.createElement("path",{d:"M165.098 102.367C166.362 101.781 166.912 100.283 166.327 99.0205C165.742 97.758 164.244 97.2092 162.98 97.7948C161.716 98.3804 161.165 99.8786 161.75 101.141C162.335 102.404 163.834 102.952 165.098 102.367Z",fill:"url(#paint7_linear)"}),n.default.createElement("defs",null,n.default.createElement("linearGradient",{id:"paint0_linear",x1:"114.554",y1:"36.6326",x2:"117.379",y2:"35.3237",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint1_linear",x1:"53.0688",y1:"90.97",x2:"55.8937",y2:"89.6611",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint2_linear",x1:"29.9283",y1:"125.483",x2:"32.7532",y2:"124.174",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint3_linear",x1:"117.365",y1:"131.837",x2:"120.19",y2:"130.528",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint4_linear",x1:"41.4394",y1:"46.2402",x2:"45.947",y2:"43.9537",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint5_linear",x1:"101.8",y1:"89.6425",x2:"106.307",y2:"87.356",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint6_linear",x1:"92.2104",y1:"171.233",x2:"96.718",y2:"168.947",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"})),n.default.createElement("linearGradient",{id:"paint7_linear",x1:"161.79",y1:"101.224",x2:"166.298",y2:"98.937",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"1",stopColor:"#75C3FC"}))))),n.default.createElement("div",{className:"mascot-background-animation__background-2","data-testid":"mascot-background-animation-background-2"},n.default.createElement("svg",{width:"195",height:"205",viewBox:"0 0 195 205",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M29.84 121.982C30.0408 121.969 30.245 122.01 30.4258 122.106L46.4233 130.275C46.8125 130.478 47.0536 130.893 47.0402 131.324C47.0143 131.768 46.7423 132.148 46.3356 132.308L24.5484 140.937C24.1417 141.097 23.6789 141.005 23.3642 140.702C23.0495 140.4 22.9398 139.937 23.0753 139.525L28.8651 122.727C28.9671 122.426 29.2065 122.169 29.5086 122.056C29.614 122.023 29.7194 121.989 29.84 121.982ZM43.1981 131.148L30.5607 124.689L25.9884 137.96L43.1981 131.148Z",fill:"#75C4FD"}),n.default.createElement("path",{d:"M168.214 54.3381C168.442 54.3238 168.674 54.3764 168.869 54.485C169.217 54.6781 169.44 55.0266 169.465 55.4145L170.59 68.4358C170.631 68.8763 170.416 69.3061 170.041 69.5444C169.666 69.7827 169.182 69.7862 168.805 69.5681L156.14 62.2246C155.763 62.0065 155.535 61.5911 155.548 61.1472C155.56 60.7033 155.818 60.3112 156.209 60.1122L167.75 54.4343C167.908 54.3841 168.067 54.3473 168.214 54.3381ZM168.027 66.3674L167.248 57.3661L159.267 61.2902L168.027 66.3674Z",fill:"#FFB0EB"}),n.default.createElement("path",{d:"M88.6283 16.6885C88.8694 16.6734 89.1154 16.7385 89.3255 16.873L100.21 24.1133C100.561 24.3464 100.762 24.7635 100.708 25.1832C100.653 25.6028 100.381 25.969 99.9864 26.1146L86.3391 31.4276C85.9449 31.5731 85.5106 31.5064 85.1842 31.2314C84.8712 30.9556 84.7239 30.5352 84.8192 30.1264L87.5815 17.5731C87.666 17.2053 87.9162 16.9076 88.2702 16.7646C88.3882 16.7169 88.5078 16.696 88.6283 16.6885ZM97.1342 24.7894L89.4471 19.6718L87.5021 28.5349L97.1342 24.7894Z",fill:"url(#paint0_linear)"}),n.default.createElement("path",{d:"M117.145 183.156C116.944 183.289 116.698 183.356 116.449 183.344L103.402 182.517C102.982 182.49 102.6 182.229 102.437 181.839C102.274 181.448 102.327 180.995 102.596 180.671L111.758 169.247C112.027 168.923 112.436 168.764 112.856 168.839C113.265 168.921 113.603 169.212 113.725 169.614L117.609 181.866C117.72 182.227 117.652 182.61 117.417 182.911C117.339 183.011 117.246 183.089 117.145 183.156ZM105.728 180.393L114.944 180.981L112.197 172.333L105.728 180.393Z",fill:"url(#paint1_linear)"}),n.default.createElement("path",{d:"M38.0816 74.0208C38.1217 74.0183 38.1485 74.0166 38.1887 74.0141C42.3831 73.805 45.9744 77.0577 46.1831 81.2474C46.3919 85.4371 43.1484 89.0241 38.9407 89.234C34.7463 89.4431 31.1549 86.1904 30.9462 82.0007C30.7391 77.8377 33.9307 74.2809 38.0816 74.0208ZM38.9104 87.2486C41.9767 87.0565 44.3523 84.4236 44.1997 81.3448C44.0455 78.2393 41.3949 75.8407 38.2859 75.9952C35.1761 76.1364 32.7753 78.7977 32.9296 81.9033C33.0838 85.0088 35.7344 87.4073 38.8434 87.2528C38.8568 87.252 38.8836 87.2503 38.9104 87.2486Z",fill:"#86E29B"}),n.default.createElement("path",{d:"M162.178 97.8401C162.218 97.8376 162.245 97.8359 162.285 97.8334C166.48 97.6243 170.071 100.877 170.28 105.067C170.489 109.256 167.245 112.843 163.037 113.053C158.843 113.262 155.252 110.01 155.043 105.82C154.836 101.657 158.027 98.1002 162.178 97.8401ZM163.007 111.068C166.073 110.876 168.449 108.243 168.296 105.164C168.142 102.059 165.492 99.6601 162.383 99.8146C159.273 99.9557 156.872 102.617 157.026 105.723C157.181 108.828 159.831 111.227 162.94 111.072C162.953 111.071 162.98 111.07 163.007 111.068Z",fill:"#86E29B"}),n.default.createElement("defs",null,n.default.createElement("linearGradient",{id:"paint0_linear",x1:"100.609",y1:"23.2611",x2:"84.4152",y2:"24.2757",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#FFE466"}),n.default.createElement("stop",{offset:"1",stopColor:"#FFAFEA"})),n.default.createElement("linearGradient",{id:"paint1_linear",x1:"103.812",y1:"183.939",x2:"116.959",y2:"174.66",gradientUnits:"userSpaceOnUse"},n.default.createElement("stop",{stopColor:"#75C3FC"}),n.default.createElement("stop",{offset:"0.0928503",stopColor:"#81C2F6"}),n.default.createElement("stop",{offset:"1",stopColor:"#F0B8BD"}))))),n.default.createElement("div",{className:"mascot-background-animation__mascot-container","data-testid":"mascot-background-animation-mascot-container"},n.default.createElement(o.default,{animationEventEmitter:e.current,width:"42",height:"42",followMouse:!1})))};var a=l(e("events")),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),o=l(e("../../../components/ui/mascot"));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}function l(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/pages/swaps/mascot-background-animation/mascot-background-animation.js"}],[6943,{"../../../../shared/constants/swaps":5274,"../../../components/component-library":5806,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/routes":6254,"../../../store/actions":7e3,"../swaps-footer":6968,"prop-types":4528,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=g;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=b(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=e("react-router-dom"),i=h(e("prop-types")),l=e("../../../contexts/i18n"),s=e("../../../store/actions"),u=h(e("../../../components/ui/box")),c=e("../../../helpers/constants/design-system"),d=e("../../../components/component-library"),p=e("../../../helpers/constants/routes"),f=h(e("../swaps-footer")),m=e("../../../../shared/constants/swaps");function h(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(b=function(e){return e?r:t})(e)}function g({notificationKey:e}){const t=(0,a.useContext)(l.I18nContext),r=(0,o.useHistory)(),i=(0,n.useDispatch)();let h="",b="",g="";return e===m.QUOTES_EXPIRED_ERROR&&(h=t("swapAreYouStillThere"),b=t("swapAreYouStillThereDescription"),g=t("swapShowLatestQuotes")),a.default.createElement("div",{className:"notification-page"},a.default.createElement(u.default,{alignItems:c.AlignItems.center,display:c.DISPLAY.FLEX,flexDirection:c.FLEX_DIRECTION.COLUMN,marginTop:10,marginLeft:4,marginRight:4,textAlign:c.TEXT_ALIGN.CENTER,className:"notification-page__content"},a.default.createElement(u.default,{marginTop:8,marginBottom:4},a.default.createElement(d.Icon,{name:d.IconName.Warning,color:c.IconColor.iconMuted,className:"notification-page__warning-icon"})),a.default.createElement(d.Text,{variant:c.TextVariant.bodyLgMedium,as:"h2"},h),a.default.createElement(d.Text,{variant:c.TextVariant.bodyMd,as:"h6"},b)),a.default.createElement(f.default,{onSubmit:async()=>{await i((0,s.setSwapsErrorKey)("")),r.push(p.PREPARE_SWAP_ROUTE)},submitText:g,hideCancel:!0,showTermsOfService:!0}))}g.propTypes={notificationKey:i.default.oneOf([m.QUOTES_EXPIRED_ERROR])}}}},{package:"$root$",file:"ui/pages/swaps/notification-page/notification-page.js"}],[6944,{"../../../../shared/constants/common":5250,"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/network":5264,"../../../../shared/constants/swaps":5274,"../../../../shared/lib/swaps-utils":5288,"../../../../shared/lib/token-util":5290,"../../../../shared/lib/transactions-controller-utils":5292,"../../../../shared/modules/conversion.utils":5301,"../../../../shared/modules/selectors":5319,"../../../../shared/modules/selectors/networks":5320,"../../../../shared/modules/string-utils":5324,"../../../../shared/modules/swaps.utils":5325,"../../../components/component-library":5806,"../../../components/component-library/modal-content/deprecated":5816,"../../../components/component-library/modal-header/deprecated":5825,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../contexts/metametrics":6214,"../../../ducks/metamask/metamask":6236,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/routes":6254,"../../../helpers/utils/portfolio":6290,"../../../helpers/utils/util":6297,"../../../hooks/useEqualityCheck":6328,"../../../hooks/useEthFiatAmount":6329,"../../../hooks/usePrevious":6348,"../../../hooks/useTokenFiatAmount":6360,"../../../hooks/useTokenTracker":6363,"../../../hooks/useTokensToSearch":6364,"../../../selectors":6985,"../../../store/actionConstants":6999,"../../../store/actions":7e3,"../import-token":6936,"../list-with-search/list-with-search":6938,"../selected-token/selected-token":6958,"../swaps-banner-alert/swaps-banner-alert":6967,"../swaps-footer":6968,"../swaps.util":6970,"../transaction-settings/transaction-settings":6971,"./quotes-loading-animation":6945,"./review-quote":6946,"@metamask/etherscan-link":1752,"bignumber.js":3465,classnames:3584,lodash:4380,"prop-types":4528,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=ae;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=ee(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=J(e("bignumber.js")),o=J(e("prop-types")),i=e("react-redux"),l=e("lodash"),s=e("react-router-dom"),u=e("@metamask/etherscan-link"),c=J(e("classnames")),d=e("../../../contexts/metametrics"),p=e("../../../hooks/useTokensToSearch"),f=e("../../../hooks/useEqualityCheck"),m=e("../../../contexts/i18n"),h=e("../../../ducks/metamask/metamask"),b=J(e("../../../components/ui/box")),g=e("../../../helpers/constants/design-system"),y=e("../../../ducks/swaps/swaps"),v=e("../../../../shared/modules/selectors/networks"),w=e("../../../selectors"),x=e("../../../../shared/modules/selectors"),E=e("../../../../shared/modules/conversion.utils"),_=e("../../../helpers/utils/util"),C=e("../../../helpers/utils/portfolio"),T=e("../../../hooks/usePrevious"),k=e("../../../hooks/useTokenTracker"),S=e("../../../hooks/useTokenFiatAmount"),R=e("../../../hooks/useEthFiatAmount"),P=e("../../../../shared/modules/swaps.utils"),M=e("../../../../shared/constants/metametrics"),O=e("../../../../shared/constants/swaps"),D=e("../../../../shared/constants/common"),j=e("../../../store/actions"),I=e("../../../store/actionConstants"),A=e("../swaps.util"),q=e("../../../../shared/lib/token-util"),N=e("../../../../shared/modules/string-utils"),L=e("../../../../shared/lib/transactions-controller-utils"),F=e("../../../../shared/lib/swaps-utils"),W=e("../../../components/component-library"),B=e("../../../components/component-library/modal-content/deprecated"),U=e("../../../components/component-library/modal-header/deprecated"),$=e("../../../helpers/constants/routes"),z=J(e("../import-token")),G=J(e("../transaction-settings/transaction-settings")),H=J(e("../swaps-banner-alert/swaps-banner-alert")),V=J(e("../swaps-footer")),Q=J(e("../selected-token/selected-token")),X=J(e("../list-with-search/list-with-search")),Y=e("../../../../shared/constants/network"),Z=J(e("./quotes-loading-animation")),K=J(e("./review-quote"));function J(e){return e&&e.__esModule?e:{default:e}}function ee(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(ee=function(e){return e?r:t})(e)}function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;tde(!1),[fe,me]=(0,a.useState)(!1),he=()=>me(!1),[be,ge]=(0,a.useState)(!1),[ye,ve]=(0,a.useState)(null),[we,xe]=(0,a.useState)(""),[Ee,_e]=(0,a.useState)(""),[Ce,Te]=(0,a.useState)(0),[ke,Se]=(0,a.useState)(!1),[Re,Pe]=(0,a.useState)(!1),Me=(0,i.useSelector)(y.getIsFeatureFlagLoaded),Oe=(0,i.useSelector)(y.getBalanceError),De=(0,i.useSelector)(y.getFetchParams,l.isEqual),{sourceTokenInfo:je={},destinationTokenInfo:Ie={}}=(null==De?void 0:De.metaData)||{},Ae=(0,i.useSelector)(h.getTokens,l.isEqual),qe=(0,i.useSelector)(y.getTopAssets,l.isEqual),Ne=(0,i.useSelector)(y.getFromToken,l.isEqual),Le=(0,i.useSelector)(y.getFromTokenInputValue),Fe=(0,i.useSelector)(y.getFromTokenError),We=(0,i.useSelector)(y.getMaxSlippage),Be=(0,i.useSelector)(y.getToToken,l.isEqual)||Ie,Ue=(0,i.useSelector)(w.getSwapsDefaultToken,l.isEqual),$e=(0,i.useSelector)(v.getCurrentChainId),ze=(0,i.useSelector)(w.getRpcPrefsForCurrentProvider,i.shallowEqual),Ge=(0,i.useSelector)(w.getTokenList,l.isEqual),He=(0,i.useSelector)(y.getQuotes,l.isEqual),Ve=(0,i.useSelector)(y.getUsedQuote,l.isEqual),Qe=(0,i.useSelector)(y.getLatestAddedTokenTo,l.isEqual),Xe=Object.keys(He).length,Ye=Xe>0&&Ve,Ze=(0,i.useSelector)(y.getSwapsErrorKey),Ke=(0,i.useSelector)(y.getAggregatorMetadata,i.shallowEqual),Je=(0,i.useSelector)(y.getTransactionSettingsOpened,i.shallowEqual),et=Ke?Object.keys(Ke).length:0,tt=(0,i.useSelector)(w.getIsBridgeChain),rt=(0,i.useSelector)(w.getMetaMetricsId),at=(0,i.useSelector)(w.getTokenExchangeRates,l.isEqual),nt=(0,i.useSelector)(h.getConversionRate),ot=(0,i.useSelector)(w.isHardwareWallet),it=(0,i.useSelector)(w.getHardwareWalletType),lt=(0,i.useSelector)(x.getSmartTransactionsOptInStatusForMetrics),st=(0,i.useSelector)(x.getSmartTransactionsEnabled),ut=(0,i.useSelector)(y.getCurrentSmartTransactionsEnabled),ct=(0,i.useSelector)(x.getSmartTransactionsPreferenceEnabled)&&ut,dt=(0,i.useSelector)(w.getCurrentCurrency),pt=(0,i.useSelector)(y.getFetchingQuotes),ft=!pt&&Ye,mt=(0,i.useSelector)(w.getParticipateInMetaMetrics),ht=(0,i.useSelector)(w.getDataCollectionForMarketing),bt=(0,P.isSwapsDefaultTokenAddress)(null==je?void 0:je.address,$e)?Ue:je,{tokensWithBalances:gt}=(0,k.useTokenTracker)({tokens:Ae}),yt=!(0,P.isSwapsDefaultTokenAddress)(null==Ne?void 0:Ne.address,$e)&&null!=Ne&&Ne.balance?[Ne]:[],vt=(0,l.uniqBy)([...gt,...Ae,...yt],"address"),wt=(0,f.useEqualityCheck)(vt),xt=(0,p.getRenderableTokenData)(Ne||bt,at,nt,dt,$e,Ge),Et=(0,p.useTokensToSearch)({usersTokens:wt,topTokens:qe,shuffledTokensList:r,tokenBucketPriority:O.TokenBucketPriority.owned}),_t=(0,p.useTokensToSearch)({usersTokens:wt,topTokens:qe,shuffledTokensList:r,tokenBucketPriority:O.TokenBucketPriority.top}),Ct=Et.find((({address:e})=>(0,N.isEqualCaseInsensitive)(e,null==Be?void 0:Be.address)))||Be,Tt=(null==Ct?void 0:Ct.address)&&!(0,P.isSwapsDefaultTokenAddress)(null==Ct?void 0:Ct.address,$e),kt=Number((null==Ct?void 0:Ct.occurances)||(null==Ct?void 0:Ct.occurrences)||0),{address:St,symbol:Rt,string:Pt,decimals:Mt,balance:Ot}=xt||{},{address:Dt}=Ct||{},jt=Ot&&(0,L.calcTokenAmount)(Ot,Mt).toString(10),It=(0,T.usePrevious)(jt),At=(0,S.useTokenFiatAmount)(St,Le||0,Rt,{showFiat:!0},!0),qt=(0,R.useEthFiatAmount)(Le||0,{showFiat:!0},!0),Nt=(0,P.isSwapsDefaultTokenAddress)(St,$e)?qt:At,Lt=(0,a.useCallback)(((e,t)=>{J((0,y.setFromTokenInputValue)(e));const r=new n.default(e||0).gt(t||0);Oe!==r&&J((0,y.setBalanceError)(r)),J((0,y.setFromTokenError)(Ne&&(0,A.countDecimals)(e)>Ne.decimals?"tooManyDecimals":null))}),[J,Ne,Oe]);(0,a.useEffect)((()=>{let e;if(!ke)return void Te(0);e=ft?20:500+Math.floor(1500*Math.random());const t=setTimeout((()=>{Ce{await J((0,j.setBackgroundSwapRouteState)("")),Se(!1),Ze!==O.ERROR_FETCHING_QUOTES&&Ze!==O.QUOTES_NOT_AVAILABLE_ERROR||J((0,j.setSwapsErrorKey)(O.QUOTES_NOT_AVAILABLE_ERROR))})()}),e);return function(){clearTimeout(t)}}),[pt,Ce,ft,Xe,J,ee,Ze,et,ke]);const Ft=e=>{null!=e&&e.address&&!Nt&&null!==ne?(0,A.fetchTokenPrice)(e.address).then((e=>{null!==e&&e!==undefined&&oe(e)})):oe(null),null!=e&&e.address&&!wt.find((t=>(0,N.isEqualCaseInsensitive)(t.address,e.address)))&&(0,q.fetchTokenBalance)(e.address,t,global.ethereumProvider).then((t=>{if(null!=t&&t.balance){const r=t.balance.toString(10),a=(0,L.calcTokenAmount)(r,e.decimals);J((0,y.setSwapsFromToken)({...e,string:a.toString(10),balance:r}))}})),J((0,y.setSwapsFromToken)(e)),Lt(Le,e.string,e.decimals)},Wt=$e===Y.CHAIN_IDS.ZKSYNC_ERA?(0,u.getAccountLink)(Ct.address,$e,{blockExplorerUrl:D.CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[$e]??null}):(0,u.getTokenTrackerLink)(Ct.address,$e,null,null,{blockExplorerUrl:D.CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[$e]??null}),Bt=ze.blockExplorerUrl?D.CHAINID_DEFAULT_BLOCK_EXPLORER_HUMAN_READABLE_URL_MAP[$e]??o("etherscan"):o("etherscan"),{address:Ut}=Be||{},$t=(0,a.useCallback)((e=>{Qe&&e.address!==Ut&&J((0,j.ignoreTokens)({tokensToIgnore:Ut,dontShowLoadingIndicator:!0})),J((0,y.setSwapToToken)(e)),le(!1)}),[J,Qe,Ut]),zt=gt.find((e=>(0,N.isEqualCaseInsensitive)(e.address,null==Ne?void 0:Ne.address))),Gt=(0,T.usePrevious)(zt);(0,a.useEffect)((()=>{const e=!(0,P.isSwapsDefaultTokenAddress)(null==zt?void 0:zt.address,$e),t=(0,N.isEqualCaseInsensitive)(null==zt?void 0:zt.address,null==Gt?void 0:Gt.address),r=(null==zt?void 0:zt.balance)!==(null==Gt?void 0:Gt.balance);e&&t&&r&&J((0,y.setSwapsFromToken)({...Ne,balance:null==zt?void 0:zt.balance,string:null==zt?void 0:zt.string}))}),[J,zt,Gt,Ne,$e]),(0,a.useEffect)((()=>{(0,P.isSwapsDefaultTokenAddress)(null==Ne?void 0:Ne.address,$e)&&(null==Ne?void 0:Ne.balance)!==(0,E.hexToDecimal)(e)&&J((0,y.setSwapsFromToken)({...Ne,balance:(0,E.hexToDecimal)(e),string:(0,E.getValueFromWeiHex)({value:e,numberOfDecimals:4,toDenomination:"ETH"})}))}),[J,Ne,e,$e]),(0,a.useEffect)((()=>{null!=Ne&&Ne.symbol||null!=bt&&bt.symbol||J((0,y.setSwapsFromToken)(Ue))}),[]),(0,a.useEffect)((()=>{It!==jt&&Lt(Le,jt)}),[Lt,It,Le,jt]);const Ht=(0,a.useCallback)((()=>{ae({event:"Prepare Swap Page Loaded",category:M.MetaMetricsEventCategory.Swaps,sensitiveProperties:{is_hardware_wallet:ot,hardware_wallet_type:it,stx_enabled:st,current_stx_enabled:ut,stx_user_opt_in:lt}})}),[ae,ot,it,st,ut,lt]);(0,a.useEffect)((()=>{J((0,j.resetSwapsPostFetchState)()),J((0,y.setReviewSwapClickedTimestamp)()),Ht()}),[J,Ht]);const Vt=()=>a.default.createElement("a",{className:"prepare-swap-page__token-etherscan-link",key:"prepare-swap-page-etherscan-link",onClick:()=>{ae({event:M.MetaMetricsEventName.ExternalLinkClicked,category:M.MetaMetricsEventCategory.Swaps,properties:{link_type:M.MetaMetricsEventLinkType.TokenTracker,location:"Swaps Confirmation",url_domain:(0,_.getURLHostName)(Wt)}}),global.platform.openTab({url:Wt})},target:"_blank",rel:"noopener noreferrer"},Bt),Qt=`${o("balance")}: ${Pt||"0"}`,Xt=`${o("balance")}: ${(null==Ct?void 0:Ct.string)||"0"}`,Yt=(0,F.shouldEnableDirectWrapping)($e,St,Ct.address),Zt=Fe||!Me||!Number(Le)||!(null!=Ct&&Ct.address)||!St||Number(We)<0||Number(We)>O.MAX_ALLOWED_SLIPPAGE||Tt&&kt<2&&!ie;let Kt;(0,a.useEffect)((()=>{J((0,j.clearSwapsQuotes)()),J((0,j.stopPollingForQuotes)());return re=setTimeout((()=>{re=null,Zt||(ct&&((0,j.clearSmartTransactionFees)(),J({type:I.SET_SMART_TRANSACTIONS_ERROR,payload:null})),(async()=>{Se(!0),await J((0,y.fetchQuotesAndSetQuoteState)(ee,Le,We,ae,!0))})())}),1e3),()=>clearTimeout(re)}),[J,ee,We,ae,Zt,Le,St,Dt,lt,ct]),Kt=Ze&&Ze===O.QUOTES_NOT_AVAILABLE_ERROR?o("swapQuotesNotAvailableErrorTitle"):Zt?null!=Ct&&Ct.address&&St?o("swapEnterAmount"):o("swapSelectToken"):o("swapFetchingQuotes");const Jt=(0,a.useCallback)((e=>(0,N.isEqualCaseInsensitive)(e.address,St)),[St]),er=(0,a.useCallback)((e=>(0,N.isEqualCaseInsensitive)(e.address,null==Ct?void 0:Ct.address)),[null==Ct?void 0:Ct.address]),tr=!Ze&&!Zt&&Ye,rr=!Ze&&!Zt&&!Ye,ar=!Fe&&Oe&&Rt,nr=tt&&!tr&&!rr&&!Ye,or=1===kt;(0,a.useEffect)((()=>{Ze===O.QUOTES_EXPIRED_ERROR&&ee.push($.SWAPS_NOTIFICATION_ROUTE)}),[Ze,ee]),(0,a.useEffect)((()=>{rr&&ue("")}),[rr]);const ir={onImportTokenCloseClick:()=>{ge(!1)},onImportTokenClick:()=>{ae({event:"Token Imported",category:M.MetaMetricsEventCategory.Swaps,sensitiveProperties:{symbol:null==ye?void 0:ye.symbol,address:null==ye?void 0:ye.address,chain_id:$e,is_hardware_wallet:ot,hardware_wallet_type:it,stx_enabled:st,current_stx_enabled:ut,stx_user_opt_in:lt}}),null==$t||$t(ye),ve(null)},setIsImportTokenModalOpen:ge,tokenForImport:ye};let lr,sr,ur;se&&!Zt&&(lr=(0,A.formatSwapsValueForDisplay)(se),sr=(0,A.getClassNameForCharLength)(lr,"prepare-swap-page__receive-amount")),Le&&(ur=(0,A.getClassNameForCharLength)(Le,"prepare-swap-page__from-token-amount"));const cr=!(0,P.isSwapsDefaultTokenAddress)(St,$e),dr=Rt&&(ct||!ct&&cr)&&Ot>0,pr=!(0,P.isSwapsDefaultTokenAddress)(Ct.address,$e);return a.default.createElement("div",{className:"prepare-swap-page"},a.default.createElement("div",{className:"prepare-swap-page__content"},ye&&be&&a.default.createElement(z.default,te({isOpen:!0},ir)),a.default.createElement(W.Modal,{onClose:pe,isOpen:ce,isClosedOnOutsideClick:!0,isClosedOnEscapeKey:!0,className:"mm-modal__custom-scrollbar"},a.default.createElement(W.ModalOverlay,null),a.default.createElement(B.ModalContent,null,a.default.createElement(U.ModalHeader,{onClose:pe},o("swapSwapTo")),a.default.createElement(b.default,{paddingTop:10,paddingRight:0,paddingBottom:0,paddingLeft:0,display:g.DISPLAY.FLEX},a.default.createElement(X.default,{selectedItem:Ct,itemsToSearch:_t,onClickItem:e=>{null==$t||$t(e),pe()},maxListItems:30,searchQuery:Ee,setSearchQuery:_e,hideItemIf:Jt,shouldSearchForImports:!0,onOpenImportTokenModalClick:e=>{ve(e),ge(!0),pe(),_e("")}})))),a.default.createElement(W.Modal,{onClose:he,isOpen:fe,isClosedOnOutsideClick:!0,isClosedOnEscapeKey:!0,className:"mm-modal__custom-scrollbar"},a.default.createElement(W.ModalOverlay,null),a.default.createElement(B.ModalContent,null,a.default.createElement(U.ModalHeader,{onClose:he},o("swapSwapFrom")),a.default.createElement(b.default,{paddingTop:10,paddingRight:0,paddingBottom:0,paddingLeft:0,display:g.DISPLAY.FLEX},a.default.createElement(X.default,{selectedItem:xt,itemsToSearch:Et,onClickItem:e=>{null==Ft||Ft(e),he()},maxListItems:30,searchQuery:we,setSearchQuery:xe,hideItemIf:er})))),a.default.createElement("div",{className:"prepare-swap-page__swap-from-content"},a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.spaceBetween,alignItems:g.AlignItems.center},a.default.createElement(Q.default,{onClick:()=>me(!0),onClose:he,selectedToken:xt,testId:"prepare-swap-page-swap-from"}),a.default.createElement(b.default,{display:g.DISPLAY.FLEX,alignItems:g.AlignItems.center},a.default.createElement(W.TextField,{className:(0,c.default)("prepare-swap-page__from-token-amount",{[ur]:ur}),size:W.TextFieldSize.Sm,placeholder:"0",onChange:e=>{e.stopPropagation();const t="."===e.target.value?"0.":e.target.value;""===t||/^(\.\d+|\d+(\.\d+)?|\d+\.)$/u.test(t)?Lt(t,jt):Lt(Le||"",jt)},value:Le,truncate:!1,testId:"prepare-swap-page-from-token-amount"}))),a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.spaceBetween,alignItems:g.AlignItems.stretch},a.default.createElement("div",{className:"prepare-swap-page__balance-message"},Rt&&Qt,dr&&a.default.createElement("div",{className:"prepare-swap-page__max-balance","data-testid":"prepare-swap-page-max-balance",onClick:()=>Lt(jt||"0",jt)},o("max"))),Le&&Nt&&a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.flexEnd,alignItems:g.AlignItems.flexEnd},a.default.createElement(W.Text,{variant:g.TextVariant.bodySm,color:g.TextColor.textAlternative},Nt))),ar&&a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.flexStart},a.default.createElement(W.Text,{variant:g.TextVariant.bodySmBold,color:g.TextColor.textAlternative,marginTop:0},o("swapsNotEnoughToken",[Rt]))),Fe&&a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.flexStart},a.default.createElement(W.Text,{variant:g.TextVariant.bodySmBold,color:g.TextColor.textAlternative,marginTop:0},o("swapTooManyDecimalsError",[Rt,Mt]))),a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.center},a.default.createElement("div",{className:(0,c.default)("prepare-swap-page__switch-tokens",{"prepare-swap-page__switch-tokens--rotate":Re,"prepare-swap-page__switch-tokens--disabled":rr}),"data-testid":"prepare-swap-page-switch-tokens",onClick:()=>{rr||($t(xt),Ft(Ct),Pe(!Re))},title:o("swapSwapSwitch")},a.default.createElement(W.Icon,{name:W.IconName.Arrow2Down,size:W.IconSize.Lg})))),a.default.createElement("div",{className:"prepare-swap-page__swap-to-content"},a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.spaceBetween,alignItems:g.AlignItems.center},a.default.createElement(Q.default,{onClick:()=>de(!0),onClose:pe,selectedToken:Ct,testId:"prepare-swap-page-swap-to"}),a.default.createElement(b.default,{display:g.DISPLAY.FLEX,alignItems:g.AlignItems.center,marginLeft:2,className:"prepare-swap-page__receive-amount-container"},a.default.createElement(W.Text,{as:"h6","data-testid":"prepare-swap-page-receive-amount",className:(0,c.default)("prepare-swap-page__receive-amount",{[sr]:sr})},lr))),a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.spaceBetween,alignItems:g.AlignItems.stretch},a.default.createElement("div",{className:"prepare-swap-page__balance-message"},(null==Ct?void 0:Ct.string)&&Xt)),a.default.createElement(b.default,{display:g.DISPLAY.FLEX,justifyContent:g.JustifyContent.spaceBetween,alignItems:g.AlignItems.stretch},a.default.createElement("div",{className:"prepare-swap-page__balance-message"},Ct&&!(0,l.isEmpty)(Ct)&&pr&&o("swapTokenVerifiedSources",[kt,a.default.createElement(Vt,{key:"block-explorer-link"})])))),nr&&a.default.createElement(W.ButtonLink,{endIconName:W.IconName.Export,endIconProps:{size:W.IconSize.Xs},variant:g.TextVariant.bodySm,marginTop:2,fontWeight:g.FontWeight.Normal,onClick:()=>{const e=(0,C.getPortfolioUrl)("bridge","ext_bridge_prepare_swap_link",rt,mt,ht);global.platform.openTab({url:`${e}&token=${St}`}),ae({category:M.MetaMetricsEventCategory.Swaps,event:M.MetaMetricsEventName.BridgeLinkClicked,properties:{location:"Swaps",text:"Swap across networks with MetaMask Portfolio",chain_id:$e,token_symbol:Rt}})},target:"_blank","data-testid":"prepare-swap-page-cross-chain-swaps-link"},o("crossChainSwapsLink")),!tr&&Tt&&kt<2&&a.default.createElement(b.default,{display:g.DISPLAY.FLEX,marginTop:2},a.default.createElement(W.BannerAlert,{severity:or?g.SEVERITIES.WARNING:g.SEVERITIES.DANGER,title:o(or?"swapTokenVerifiedOn1SourceTitle":"swapTokenAddedManuallyTitle"),titleProps:{"data-testid":"swaps-banner-title"},width:g.BLOCK_SIZES.FULL},a.default.createElement(b.default,null,a.default.createElement(W.Text,{variant:g.TextVariant.bodyMd,as:"h6","data-testid":"mm-banner-alert-notification-text"},or?o("swapTokenVerifiedOn1SourceDescription",[null==Ct?void 0:Ct.symbol,a.default.createElement(Vt,{key:"block-explorer-link"})]):o("swapTokenAddedManuallyDescription",[a.default.createElement(Vt,{key:"block-explorer-link"})])),!ie&&a.default.createElement(W.ButtonLink,{size:W.ButtonLinkSize.Inherit,textProps:{variant:g.TextVariant.bodyMd,alignItems:g.AlignItems.flexStart},onClick:e=>{e.preventDefault(),le(!0)}},o("swapContinueSwapping"))))),Ze&&a.default.createElement(b.default,{display:g.DISPLAY.FLEX,marginTop:2},a.default.createElement(H.default,{swapsErrorKey:Ze,currentSlippage:We})),Je&&!Yt&&a.default.createElement(G.default,{onSelect:e=>{J((0,y.setMaxSlippage)(e))},maxAllowedSlippage:O.MAX_ALLOWED_SLIPPAGE,currentSlippage:We,isDirectWrappingEnabled:Yt,onModalClose:()=>{J((0,y.setTransactionSettingsOpened)(!1))}}),rr&&a.default.createElement(Z.default,{quoteCount:Ce,numberOfAggregators:et}),tr&&a.default.createElement(K.default,{setReceiveToAmount:ue})),!Ye&&a.default.createElement(V.default,{submitText:Kt,disabled:!0,hideCancel:!0,showTermsOfService:!0}))}ae.propTypes={ethBalance:o.default.string,selectedAccountAddress:o.default.string,shuffledTokensList:o.default.array}}}},{package:"$root$",file:"ui/pages/swaps/prepare-swap-page/prepare-swap-page.js"}],[6945,{"../../../components/component-library":5806,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,"../mascot-background-animation/mascot-background-animation":6942,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=p;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=c(e("prop-types")),o=e("../../../contexts/i18n"),i=c(e("../../../components/ui/box")),l=e("../../../helpers/constants/design-system"),s=e("../../../components/component-library"),u=c(e("../mascot-background-animation/mascot-background-animation"));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function p(e){const{quoteCount:t,numberOfAggregators:r}=e,n=(0,a.useContext)(o.I18nContext);return a.default.createElement(i.default,{marginTop:4,display:l.DISPLAY.FLEX,justifyContent:l.JustifyContent.center,alignItems:l.AlignItems.center,flexDirection:l.FLEX_DIRECTION.COLUMN},a.default.createElement(i.default,{display:l.DISPLAY.FLEX,justifyContent:l.JustifyContent.center,alignItems:l.AlignItems.center},a.default.createElement(s.Text,{variant:l.TextVariant.bodyMd,as:"h6",color:l.TextColor.textAlternative,marginLeft:1,marginRight:1},n("swapFetchingQuote")),a.default.createElement(s.Text,{variant:l.TextVariant.bodyMdBold,as:"h6",color:l.TextColor.textAlternative},n("swapQuoteNofM",[Math.min(t+1,r),r]))),a.default.createElement(u.default,null))}p.propTypes={quoteCount:n.default.number.isRequired,numberOfAggregators:n.default.number.isRequired}}}},{package:"$root$",file:"ui/pages/swaps/prepare-swap-page/quotes-loading-animation.js"}],[6946,{"../../../../app/scripts/lib/util":135,"../../../../shared/constants/gas":5255,"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/swaps":5274,"../../../../shared/lib/metamask-controller-utils":5285,"../../../../shared/lib/swaps-utils":5288,"../../../../shared/lib/transactions-controller-utils":5292,"../../../../shared/modules/conversion.utils":5301,"../../../../shared/modules/hexstring-utils":5307,"../../../../shared/modules/selectors":5319,"../../../../shared/modules/selectors/networks":5320,"../../../../shared/modules/string-utils":5324,"../../../../shared/modules/transaction.utils":5326,"../../../components/component-library":5806,"../../../components/ui/box":6079,"../../../components/ui/info-tooltip":6134,"../../../contexts/i18n":6211,"../../../contexts/metametrics":6214,"../../../ducks/metamask/metamask":6236,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/routes":6254,"../../../helpers/constants/zendesk-url":6261,"../../../helpers/utils/token-util":6294,"../../../hooks/ramps/useRamps/useRamps":6311,"../../../hooks/useAsyncResult":6322,"../../../hooks/useEqualityCheck":6328,"../../../hooks/useEthFiatAmount":6329,"../../../hooks/useGasFeeEstimates":6331,"../../../hooks/usePrevious":6348,"../../../hooks/useTokenTracker":6363,"../../../selectors":6985,"../../../store/actions":7e3,"../../confirmations/confirm-approve/confirm-approve.util":6642,"../countdown-timer":6928,"../exchange-rate-display":6932,"../select-quote-popover":6951,"../swaps-footer":6968,"../swaps.util":6970,"./slippage-notification-modal":6947,"./view-quote-price-difference":6948,"@sentry/browser":2871,"bignumber.js":3465,classnames:3584,lodash:4380,"prop-types":4528,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=re;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=J(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=e("react-router-dom"),i=K(e("bignumber.js")),l=e("lodash"),s=K(e("classnames")),u=e("@sentry/browser"),c=K(e("prop-types")),d=K(e("../../../helpers/constants/zendesk-url")),p=e("../../../contexts/i18n"),f=K(e("../select-quote-popover")),m=e("../../../hooks/useEthFiatAmount"),h=e("../../../hooks/useEqualityCheck"),b=e("../../../hooks/usePrevious"),g=e("../../../contexts/metametrics"),y=e("../../../ducks/swaps/swaps"),v=e("../../../../shared/modules/selectors/networks"),w=e("../../../selectors"),x=e("../../../../shared/modules/selectors"),E=e("../../../ducks/metamask/metamask"),_=e("../../../store/actions"),C=e("../../../helpers/constants/routes"),T=e("../../../../shared/modules/conversion.utils"),k=e("../../confirmations/confirm-approve/confirm-approve.util"),S=e("../swaps.util"),R=e("../../../hooks/useTokenTracker"),P=e("../../../../shared/constants/swaps"),M=e("../../../../shared/constants/gas"),O=K(e("../countdown-timer")),D=K(e("../swaps-footer")),j=K(e("../../../components/ui/box")),I=e("../../../helpers/constants/design-system"),A=e("../../../components/component-library"),q=e("../../../../shared/constants/metametrics"),N=e("../../../../shared/modules/string-utils"),L=e("../../../../shared/modules/transaction.utils"),F=e("../../../../shared/lib/metamask-controller-utils"),W=e("../../../../shared/lib/transactions-controller-utils"),B=e("../../../../app/scripts/lib/util"),U=e("../../../../shared/lib/swaps-utils"),$=K(e("../exchange-rate-display")),z=K(e("../../../components/ui/info-tooltip")),G=K(e("../../../hooks/ramps/useRamps/useRamps")),H=e("../../../helpers/utils/token-util"),V=e("../../../../shared/modules/hexstring-utils"),Q=e("../../../hooks/useAsyncResult"),X=e("../../../hooks/useGasFeeEstimates"),Y=K(e("./view-quote-price-difference")),Z=K(e("./slippage-notification-modal"));function K(e){return e&&e.__esModule?e:{default:e}}function J(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(J=function(e){return e?r:t})(e)}let ee;const te=a.default.memo((function({trackAllAvailableQuotesOpened:e,setSelectQuotePopoverShown:t,t:r}){const n=(0,a.useCallback)((()=>{e(),t(!0)}),[e,t]);return a.default.createElement(A.ButtonLink,{key:"view-all-quotes","data-testid":"review-quote-view-all-quotes",onClick:n,size:I.Size.inherit},r("viewAllQuotes"))}));function re({setReceiveToAmount:e}){var t,r,c,K,J,re,ae,ne;const oe=(0,o.useHistory)(),ie=(0,n.useDispatch)(),le=(0,a.useContext)(p.I18nContext),se=(0,a.useContext)(g.MetaMetricsContext),[ue,ce]=(0,a.useState)(!1),[de,pe]=(0,a.useState)(!1),[fe]=(0,a.useState)(!1),[me,he]=(0,a.useState)(null),[be,ge]=(0,a.useState)(null),[ye,ve]=(0,a.useState)(null),[we]=(0,a.useState)(Date.now()),{openBuyCryptoInPdapp:xe}=(0,G.default)(),[Ee,_e]=(0,a.useState)(!1),[Ce,Te]=(0,a.useState)(!1),ke=[M.GasRecommendations.high,M.GasRecommendations.medium],Se=(0,n.useSelector)(y.getBackgroundSwapRouteState),Re=(0,n.useSelector)(y.getQuotes,l.isEqual);(0,a.useEffect)((()=>{Object.values(Re).length?"awaiting"===Se&&oe.push(C.AWAITING_SWAP_ROUTE):oe.push(C.PREPARE_SWAP_ROUTE)}),[oe,Re,Se]);const Pe=(0,n.useSelector)(y.getQuotesLastFetched),Me=(0,b.usePrevious)(Pe),Oe=(0,n.useSelector)(y.getUsedSwapsGasPrice),De=(0,n.useSelector)(y.getCustomSwapsGas),je=(0,n.useSelector)(w.getTokenExchangeRates,l.isEqual),Ie=(0,h.useEqualityCheck)(je),{balance:Ae}=(0,n.useSelector)(w.getSelectedAccount,n.shallowEqual),qe=(0,n.useSelector)(w.conversionRateSelector),Ne=(0,n.useSelector)(w.getUSDConversionRate),Le=(0,n.useSelector)(w.getCurrentCurrency),Fe=(0,n.useSelector)(E.getTokens,l.isEqual),We=(0,n.useSelector)(w.checkNetworkAndAccountSupports1559),Be=(0,n.useSelector)(y.getBalanceError),Ue=(0,n.useSelector)(y.getFetchParams,l.isEqual),$e=(0,n.useSelector)(y.getApproveTxParams,l.isEqual),ze=(0,n.useSelector)(y.getTopQuote,l.isEqual),Ge=(0,n.useSelector)(y.getUsedQuote,l.isEqual),He=(null==Ge||null===(t=Ge.trade)||void 0===t?void 0:t.value)??"0x0",Ve=(0,n.useSelector)(w.getSwapsDefaultToken,l.isEqual),Qe=(0,n.useSelector)(v.getCurrentChainId),Xe=(0,n.useSelector)(E.getNativeCurrency),Ye=(0,n.useSelector)(y.getReviewSwapClickedTimestamp),Ze=(0,n.useSelector)(x.getSmartTransactionsOptInStatusForMetrics),Ke=(0,n.useSelector)(x.getSmartTransactionsPreferenceEnabled),Je=(0,n.useSelector)(x.getSmartTransactionsEnabled),et=(0,n.useSelector)(y.getSwapsSTXLoading),tt=(0,n.useSelector)(y.getCurrentSmartTransactionsError),rt=(0,n.useSelector)(y.getSmartTransactionsError),at=(0,n.useSelector)(y.getCurrentSmartTransactionsEnabled),nt=(0,n.useSelector)(y.getSmartTransactionFees,l.isEqual),ot=(0,n.useSelector)(y.getSwapsNetworkConfig,n.shallowEqual),{gasFeeEstimates:it}=(0,X.useGasFeeEstimates)(),{estimatedBaseFee:lt="0"}=it??{},st=(0,Q.useAsyncResult)((async()=>We?await(0,S.getSwap1559GasFeeEstimates)(Ge.trade,$e,lt,Qe):undefined),[Ge.trade,$e,lt,Qe,We]),ut=null===(r=st.value)||void 0===r?void 0:r.tradeGasFeeEstimates,ct=null===(c=st.value)||void 0===c?void 0:c.approveGasFeeEstimates,dt=Ge.trade,{isGasIncludedTrade:pt}=Ge,ft=(0,n.useSelector)(x.getSmartTransactionsPreferenceEnabled)&&at,[mt]=(0,a.useState)((()=>{const e=Number(null==Ue?void 0:Ue.slippage);return e>0&&e<=1?P.SLIPPAGE_LOW_ERROR:e>=5&&e<=P.MAX_ALLOWED_SLIPPAGE?P.SLIPPAGE_HIGH_ERROR:""})),ht=null==Ue?void 0:Ue.sourceToken,bt={reg_tx_fee_in_usd:undefined,reg_tx_fee_in_eth:undefined,reg_tx_max_fee_in_usd:undefined,reg_tx_max_fee_in_eth:undefined,stx_fee_in_usd:undefined,stx_fee_in_eth:undefined,stx_max_fee_in_usd:undefined,stx_max_fee_in_eth:undefined},gt=(null==Ge?void 0:Ge.gasEstimateWithRefund)||`0x${(0,T.decimalToHex)((null==Ge?void 0:Ge.averageGas)||0)}`,yt=(0,U.calculateMaxGasLimit)(null==Ge?void 0:Ge.gasEstimate,null==Ge?void 0:Ge.gasMultiplier,null==Ge?void 0:Ge.maxGas,De);let vt=(0,W.calcGasTotal)(yt,(null==ut?void 0:ut.maxFeePerGas)||Oe);null!==be&&(vt=(0,T.sumHexes)(vt||"0x0",be||"0x0"));const{tokensWithBalances:wt}=(0,R.useTokenTracker)({tokens:Fe,includeFailedTokens:!0}),xt=ht===Ve.address?Ve:wt.find((({address:e})=>(0,N.isEqualCaseInsensitive)(e,ht))),Et=xt||Ge.sourceTokenInfo,_t=(null==wt?void 0:wt.length)&&(0,W.calcTokenAmount)(Et.balance||"0x0",Et.decimals).toFixed(9),Ct=wt&&xt===undefined,Tt=(0,L.parseStandardTokenTransactionData)(null==$e?void 0:$e.data),kt=Tt&&(0,F.getTokenValueParam)(Tt),St=kt&&(null==Et?void 0:Et.decimals)!==undefined&&(0,W.calcTokenAmount)(kt,Et.decimals).toFixed(9),Rt=null==$e?void 0:$e.gas,Pt=We?null==ut?void 0:ut.baseAndPriorityFeePerGas:Oe,Mt=We?null==ct?void 0:ct.baseAndPriorityFeePerGas:Oe,Ot=(0,a.useMemo)((()=>(0,S.quotesToRenderableData)({quotes:Re,gasPriceTrade:Pt,gasPriceApprove:Mt,conversionRate:qe,currentCurrency:Le,approveGas:Rt,tokenConversionRates:Ie,chainId:Qe,smartTransactionEstimatedGas:Je&&Ke&&(null==nt?void 0:nt.tradeTxFees),nativeCurrencySymbol:Xe,multiLayerL1ApprovalFeeTotal:ye})),[Re,Pt,Mt,qe,Le,Rt,Ie,Qe,null==nt?void 0:nt.tradeTxFees,Xe,Je,Ke,ye]),Dt=Ot.find((e=>e.aggId===Ge.aggregator)),{destinationTokenDecimals:jt,destinationTokenSymbol:It,destinationTokenValue:At,sourceTokenDecimals:qt,sourceTokenSymbol:Nt,sourceTokenValue:Lt}=Dt;let{feeInFiat:Ft,feeInEth:Wt,rawEthFee:Bt,feeInUsd:Ut}=(0,S.getRenderableNetworkFeesForQuote)({tradeGas:gt,approveGas:Rt,gasPriceTrade:Pt,gasPriceApprove:Mt,currentCurrency:Le,conversionRate:qe,USDConversionRate:Ne,tradeValue:He,sourceSymbol:Nt,sourceAmount:Ge.sourceAmount,chainId:Qe,nativeCurrencySymbol:Xe,multiLayerL1FeeTotal:be});bt.reg_tx_fee_in_usd=Number(Ut),bt.reg_tx_fee_in_eth=Number(Bt);const $t=(0,S.getRenderableNetworkFeesForQuote)({tradeGas:yt,approveGas:Rt,gasPriceTrade:Pt,gasPriceApprove:Mt,currentCurrency:Le,conversionRate:qe,USDConversionRate:Ne,tradeValue:He,sourceSymbol:Nt,sourceAmount:Ge.sourceAmount,chainId:Qe,nativeCurrencySymbol:Xe,multiLayerL1FeeTotal:be});let{feeInFiat:zt,feeInEth:Gt,rawEthFee:Ht,feeInUsd:Vt}=$t;if(bt.reg_tx_max_fee_in_usd=Number(Vt),bt.reg_tx_max_fee_in_eth=Number(Ht),ft&&null!=nt&&nt.tradeTxFees){var Qt,Xt;const e=(null==nt?void 0:nt.tradeTxFees.feeEstimate)+((null==nt||null===(Qt=nt.approvalTxFees)||void 0===Qt?void 0:Qt.feeEstimate)||0),t=(null==nt?void 0:nt.tradeTxFees.maxFeeEstimate)+((null==nt||null===(Xt=nt.approvalTxFees)||void 0===Xt?void 0:Xt.maxFeeEstimate)||0);({feeInFiat:Ft,feeInEth:Wt,rawEthFee:Bt,feeInUsd:Ut}=(0,S.getFeeForSmartTransaction)({chainId:Qe,currentCurrency:Le,conversionRate:qe,USDConversionRate:Ne,nativeCurrencySymbol:Xe,feeInWeiDec:e})),bt.stx_fee_in_usd=Number(Ut),bt.stx_fee_in_eth=Number(Bt),bt.estimated_gas=null==nt?void 0:nt.tradeTxFees.gasLimit,({feeInFiat:zt,feeInEth:Gt,rawEthFee:Ht,feeInUsd:Vt}=(0,S.getFeeForSmartTransaction)({chainId:Qe,currentCurrency:Le,conversionRate:qe,USDConversionRate:Ne,nativeCurrencySymbol:Xe,feeInWeiDec:t})),bt.stx_max_fee_in_usd=Number(Vt),bt.stx_max_fee_in_eth=Number(Ht)}const Yt=new i.default(Ge.sourceAmount),Zt=new i.default(Ge.trade.value||0,10).plus(new i.default(vt,16)),Kt=((null==wt?void 0:wt.length)||Be)&&Yt.gt(new i.default(Et.balance||"0x0")),Jt=Zt.gt(new i.default(Ae||"0x0")),er=Kt?(0,W.toPrecisionWithoutTrailingZeros)((0,W.calcTokenAmount)(Yt,Et.decimals).minus(_t).toString(10),6):null,tr=Jt?(0,W.toPrecisionWithoutTrailingZeros)(Zt.minus(Ae,16).div("1000000000000000000",10).toString(10),6):null;let rr;ft&&null!=rt&&rt.balanceNeededWei&&(rr=(0,T.decWEIToDecETH)(rt.balanceNeededWei-rt.currentBalanceWei));const ar=(0,b.usePrevious)(rr),nr=(0,n.useSelector)(y.getDestinationTokenInfo,l.isEqual);(0,a.useEffect)((()=>{ft?Kt?ie((0,y.setBalanceError)(!0)):Be&&!Kt&&ie((0,y.setBalanceError)(!1)):Kt||Jt?ie((0,y.setBalanceError)(!0)):!Be||Kt||Jt||ie((0,y.setBalanceError)(!1))}),[Kt,Jt,ie,ft,Be]),(0,a.useEffect)((()=>{!me&&St&&he(St)}),[me,St]);const or=(Be||er||!ft&&tr||ft&&rr)&&!fe,ir=(0,n.useSelector)(w.isHardwareWallet),lr=(0,n.useSelector)(w.getHardwareWalletType),sr=Object.values(Re).length,ur=(0,a.useRef)(),cr=(0,a.useMemo)((()=>({token_from:Nt,token_from_amount:Lt,token_to:It,token_to_amount:At,request_type:null==Ue?void 0:Ue.balanceError,slippage:null==Ue?void 0:Ue.slippage,custom_slippage:2!==(null==Ue?void 0:Ue.slippage),response_time:null==Ue?void 0:Ue.responseTime,best_quote_source:null==ze?void 0:ze.aggregator,available_quotes:sr,is_hardware_wallet:ir,hardware_wallet_type:lr,stx_enabled:Je,current_stx_enabled:at,stx_user_opt_in:Ze})),[Nt,Lt,It,At,null==Ue?void 0:Ue.balanceError,null==Ue?void 0:Ue.slippage,null==Ue?void 0:Ue.responseTime,null==ze?void 0:ze.aggregator,sr,ir,lr,Je,at,Ze]),dr=()=>{se({event:"All Available Quotes Opened",category:q.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...cr,other_quote_selected:(null==Ge?void 0:Ge.aggregator)!==(null==ze?void 0:ze.aggregator),other_quote_selected_source:(null==Ge?void 0:Ge.aggregator)===(null==ze?void 0:ze.aggregator)?null:null==Ge?void 0:Ge.aggregator}})},pr=(0,a.useCallback)((()=>{se({event:"Best Quote Reviewed",category:q.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...cr,network_fees:Ft}})}),[se,cr,Ft]),fr=(0,a.useCallback)((()=>{se({event:"Review Quote Component Loaded",category:q.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...cr,response_time:we-Ye}})}),[se,cr,we,Ye]);(0,a.useEffect)((()=>{!ur.current&&[Nt,Lt,It,At,Ue,ze,sr,Ft].every((e=>null!==e&&e!==undefined))&&(ur.current=!0,pr())}),[Ue,ze,sr,Ft,It,At,Nt,Lt,pr]),(0,a.useEffect)((()=>{if((ft&&ar||!ft)&&Pe===Me)return;let e;if(ft&&rr)e=rr;else{if(ft||!tr)return;e=tr}se({event:q.MetaMetricsEventName.SwapError,category:q.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...cr,error_type:q.MetaMetricsEventErrorType.InsufficientGas,additional_balance_needed:e}})}),[Pe,Me,rr,ft,se,ar,tr,cr]);const mr=Ge.fee,hr=()=>{se({event:"Edit Spend Limit Opened",category:q.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...cr,custom_spend_limit_set:me===St,custom_spend_limit_amount:me===St?null:St}}),ie((0,_.showModal)({name:"EDIT_APPROVAL_PERMISSION",decimals:Et.decimals,origin:"MetaMask",setCustomAmount:e=>{const t=""===e?me:e,r=(0,k.getCustomTxParamsData)($e.data,{customPermissionAmount:t,decimals:Et.decimals});null!=t&&t.length&&$e.data!==r&&ie((0,_.setCustomApproveTxData)(r))},tokenAmount:me,customTokenAmount:me===St?null:St,tokenBalance:_t,tokenSymbol:Et.symbol,requiredMinimum:(0,W.calcTokenAmount)(Ge.sourceAmount,Et.decimals)}))},br=Boolean(rr||tr),gr=Ct?le("swapTokenBalanceUnavailable",[Nt]):le("swapApproveNeedMoreTokens",[a.default.createElement("span",{key:"swapApproveNeedMoreTokens-1"},er||rr||tr),er&&Nt!==Ve.symbol?Nt:Ve.symbol]),yr=null==Ge||null===(K=Ge.priceSlippage)||void 0===K?void 0:K.bucket,vr=(0,b.usePrevious)(yr);(0,a.useEffect)((()=>{Ee&&vr===M.GasRecommendations.medium&&yr===M.GasRecommendations.high&&_e(!1)}),[yr,Ee,vr]);let wr=null;const xr=(0,m.useEthFiatAmount)((null==Ge||null===(J=Ge.priceSlippage)||void 0===J?void 0:J.sourceAmountInETH)||0,{showFiat:!0}),Er=(0,m.useEthFiatAmount)((null==Ge||null===(re=Ge.priceSlippage)||void 0===re?void 0:re.destinationAmountInETH)||0,{showFiat:!0}),_r=!xr||!Er||Boolean(null==Ge||null===(ae=Ge.priceSlippage)||void 0===ae?void 0:ae.calculationError);let Cr=0;null!=Ge&&null!==(ne=Ge.priceSlippage)&&void 0!==ne&&ne.ratio&&(Cr=parseFloat(new i.default(Ge.priceSlippage.ratio,10).minus(1,10).times(100,10).toFixed(2),10));const Tr=(0,b.usePrevious)(Cr),kr=!Ct&&!or&&Ge&&(ke.includes(yr)||_r);kr&&(wr=a.default.createElement(Y.default,{usedQuote:Ge,sourceTokenValue:Lt,destinationTokenValue:At,priceSlippageFromSource:xr,priceSlippageFromDestination:Er,priceDifferencePercentage:Cr,priceSlippageUnknownFiatValue:_r,onAcknowledgementClick:()=>{_e(!0)},acknowledged:Ee}));const Sr=or||kr,Rr=Boolean(ue||Be||Ct||kr&&!Ee||We&&(null==ut?void 0:ut.baseAndPriorityFeePerGas)===undefined||!We&&(null===Oe||Oe===undefined)||at&&(tt||rt)||at&&Ke&&!(null!=nt&&nt.tradeTxFees));(0,a.useEffect)((()=>{kr&&Ee&&Pe!==Me&&Cr!==Tr&&_e(!1)}),[Ee,Me,Pe,kr,Cr,Tr]),(0,a.useEffect)((()=>{if(!ft||Kt||pt)ee&&clearInterval(ee);else{const e={from:dt.from,to:dt.to,value:dt.value,data:dt.data,gas:dt.gas,chainId:Qe};ee=setInterval((()=>{et||ie((0,y.fetchSwapsSmartTransactionFees)({unsignedTransaction:e,approveTxParams:$e,fallbackOnNotEnoughFunds:!1}))}),ot.stxGetTransactionsRefreshTime),ie((0,y.fetchSwapsSmartTransactionFees)({unsignedTransaction:e,approveTxParams:$e,fallbackOnNotEnoughFunds:!1}))}return()=>clearInterval(ee)}),[ie,ft,dt.data,dt.from,dt.value,dt.gas,dt.to,Qe,ot.stxGetTransactionsRefreshTime,Kt,pt]),(0,a.useEffect)((()=>{ie((0,_.setSwapsQuotesPollingLimitEnabled)(!0)),Ye&&fr()}),[ie,fr,Ye]),(0,a.useEffect)((()=>{(!at&&tt&&ue||ft&&!et&&ue)&&ce(!1)}),[at,tt,ft,et,ue]),(0,a.useEffect)((()=>{if(null==Ge||!Ge.multiLayerL1TradeFeeTotal)return;(async()=>{try{let e="0x0";$e&&(e=await ie((0,_.getLayer1GasFee)({transactionParams:{...$e,gasPrice:(0,B.addHexPrefix)($e.gasPrice),value:"0x0"},chainId:Qe})),ve(e));const t=(0,T.sumHexes)(Ge.multiLayerL1TradeFeeTotal,e);ge(t)}catch(e){(0,u.captureException)(e),ge(null),ve(null)}})()}),[dt,$e,Qe,Ge]);const Pr=(0,U.calcTokenValue)(At,jt),Mr=(0,W.calcTokenAmount)(Pr,jt),Or=(0,S.formatSwapsValueForDisplay)(Mr),Dr=Or.match(/\d+/gu).join("").length;let jr=Or;Dr>20&&(jr=`${Or.slice(0,20)}...`),(0,a.useEffect)((()=>{e(jr)}),[jr,e]);const Ir=!$e||Be&&!fe,Ar=a.default.createElement("span",{key:"fee-card-approve-symbol",className:"fee-card__bold"},le("enableToken",[Nt])),qr=({acknowledgedSlippage:e=!1})=>{!mt||e?(ce(!0),Be?nr.symbol===Ve.symbol?oe.push(C.DEFAULT_ROUTE):oe.push(`${C.ASSET_ROUTE}/${nr.address}`):ft&&null!=nt&&nt.tradeTxFees?ie((0,y.signAndSendSwapsSmartTransaction)({unsignedTransaction:dt,trackEvent:se,history:oe,additionalTrackingParams:bt})):ie((0,y.signAndSendTransactions)(oe,se,bt))):Te(!0)},Nr=(0,a.useMemo)((()=>{var e;if(!pt)return undefined;const t=null==nt||null===(e=nt.tradeTxFees)||void 0===e||null===(e=e.fees)||void 0===e||null===(e=e[0])||void 0===e||null===(e=e.tokenFees)||void 0===e?void 0:e[0];if(!t)return undefined;const{token:{address:r,decimals:a,symbol:n}={},balanceNeededToken:o}=t,i=(0,V.toChecksumHexAddress)(r),l=Ie[i],s=(0,W.calcTokenAmount)((0,T.hexToDecimal)(o),a).toString(10);return(0,H.getTokenFiatAmount)(l,qe,Le,s,n,!0,!0)}),[pt,nt,Ie,qe,Le]);return a.default.createElement("div",{className:"review-quote"},a.default.createElement("div",{className:"review-quote__content"},a.default.createElement(Z.default,{isOpen:Ce,setSlippageNotificationModalOpened:Te,slippageErrorKey:mt,onSwapSubmit:qr,currentSlippage:null==Ue?void 0:Ue.slippage}),de&&a.default.createElement(f.default,{quoteDataRows:Ot,onClose:()=>pe(!1),onSubmit:e=>ie((0,y.swapsQuoteSelected)(e)),swapToSymbol:It,initialAggId:Ge.aggregator,onQuoteDetailsIsOpened:()=>{se({event:"Quote Details Opened",category:q.MetaMetricsEventCategory.Swaps,sensitiveProperties:{...cr,other_quote_selected:(null==Ge?void 0:Ge.aggregator)!==(null==ze?void 0:ze.aggregator),other_quote_selected_source:(null==Ge?void 0:Ge.aggregator)===(null==ze?void 0:ze.aggregator)?null:null==Ge?void 0:Ge.aggregator}})},hideEstimatedGasFee:Je&&Ke}),Sr&&a.default.createElement(a.default.Fragment,null,wr,(or||Ct)&&a.default.createElement(A.BannerAlert,{title:le("notEnoughBalance"),titleProps:{"data-testid":"swaps-banner-title"},severity:I.Severity.Info,description:gr,descriptionProps:{"data-testid":"mm-banner-alert-notification-text"},actionButtonLabel:br?le("buyMoreAsset",[Xe]):undefined,actionButtonOnClick:br?()=>xe():undefined,marginTop:2})),a.default.createElement("div",{className:"review-quote__countdown-timer-container"},a.default.createElement(O.default,{timeStarted:Pe,warningTime:"0:10",labelKey:"swapNewQuoteIn"})),a.default.createElement(j.default,{marginTop:1,marginBottom:0,display:I.DISPLAY.FLEX,flexDirection:I.FlexDirection.Column,className:"review-quote__overview"},a.default.createElement(j.default,{display:I.DISPLAY.FLEX,justifyContent:I.JustifyContent.spaceBetween,alignItems:I.AlignItems.center},a.default.createElement(A.Text,{variant:I.TextVariant.bodyMd,marginRight:1,color:I.TextColor.textDefault},le("quoteRate"),"*"),a.default.createElement($.default,{primaryTokenValue:(0,U.calcTokenValue)(Lt,qt),primaryTokenDecimals:qt,primaryTokenSymbol:Nt,secondaryTokenValue:Pr,secondaryTokenDecimals:jt,secondaryTokenSymbol:It,boldSymbols:!1,className:"review-quote__exchange-rate-display",showIconForSwappingTokens:!1})),pt&&a.default.createElement(j.default,{display:I.DISPLAY.FLEX,justifyContent:I.JustifyContent.spaceBetween,alignItems:I.AlignItems.stretch},a.default.createElement(j.default,{display:I.DISPLAY.FLEX,alignItems:I.AlignItems.center,width:I.FRACTIONS.SIX_TWELFTHS},a.default.createElement(A.Text,{variant:I.TextVariant.bodyMd,as:"h6",color:I.TextColor.textDefault,marginRight:1},le("gasFee")),a.default.createElement(z.default,{position:"left",contentText:a.default.createElement(a.default.Fragment,null,a.default.createElement("p",{className:"fee-card__info-tooltip-paragraph"},le("swapGasIncludedTooltipExplanation")),a.default.createElement(A.ButtonLink,{key:"learn-more-about-gas-included-link",size:A.ButtonLinkSize.Inherit,href:d.default.SWAPS_GAS_FEES,target:"_blank",rel:"noopener noreferrer",externalLink:!0,onClick:()=>{se({event:'Clicked "GasIncluded tooltip: Learn More" Link',category:q.MetaMetricsEventCategory.Swaps})}},le("swapGasIncludedTooltipExplanationLinkText")))})),a.default.createElement(j.default,{display:I.DISPLAY.FLEX,justifyContent:I.JustifyContent.flexEnd,alignItems:I.AlignItems.flexEnd,width:I.FRACTIONS.SIX_TWELFTHS},a.default.createElement(A.Text,{variant:I.TextVariant.bodyMd,as:"h6",color:I.TextColor.textDefault,"data-testid":"review-quote-gas-fee-in-fiat",textAlign:I.TEXT_ALIGN.RIGHT,style:{textDecoration:"line-through"},marginRight:1},Nr),a.default.createElement(A.Text,{variant:I.TextVariant.bodySm,as:"h6",color:I.TextColor.textDefault,textAlign:I.TEXT_ALIGN.RIGHT,fontStyle:I.FontStyle.Italic},le("included")))),!pt&&a.default.createElement(j.default,{display:I.DISPLAY.FLEX,justifyContent:I.JustifyContent.spaceBetween,alignItems:I.AlignItems.stretch},a.default.createElement(j.default,{display:I.DISPLAY.FLEX,alignItems:I.AlignItems.center,width:I.FRACTIONS.SIX_TWELFTHS},a.default.createElement(A.Text,{variant:I.TextVariant.bodyMd,as:"h6",color:I.TextColor.textDefault,marginRight:1},le("transactionDetailGasHeading")),a.default.createElement(z.default,{position:"left",contentText:a.default.createElement("p",{className:"fee-card__info-tooltip-paragraph"},le("swapGasFeesExplanation",[a.default.createElement(A.ButtonLink,{key:"learn-more-gas-link",size:A.ButtonLinkSize.Inherit,href:d.default.GAS_FEES,target:"_blank",rel:"noopener noreferrer",externalLink:!0,onClick:()=>{se({event:'Clicked "Gas Fees: Learn More" Link',category:q.MetaMetricsEventCategory.Swaps})}},le("swapGasFeesExplanationLinkText"))]))})),a.default.createElement(j.default,{display:I.DISPLAY.FLEX,alignItems:I.AlignItems.flexEnd,width:I.FRACTIONS.SIX_TWELFTHS},a.default.createElement(A.Text,{variant:I.TextVariant.bodyMd,as:"h6",color:I.TextColor.textDefault,width:I.FRACTIONS.EIGHT_TWELFTHS,textAlign:I.TEXT_ALIGN.RIGHT,paddingRight:1},Wt),a.default.createElement(A.Text,{variant:I.TextVariant.bodyMdBold,as:"h6",color:I.TextColor.textDefault,"data-testid":"review-quote-gas-fee-in-fiat",width:I.FRACTIONS.FOUR_TWELFTHS,textAlign:I.TEXT_ALIGN.RIGHT},` ${Ft}`))),!pt&&(zt||Gt)&&a.default.createElement(j.default,{display:I.DISPLAY.FLEX},a.default.createElement(j.default,{display:I.DISPLAY.FLEX,width:I.FRACTIONS.SIX_TWELFTHS}),a.default.createElement(j.default,{display:I.DISPLAY.FLEX,justifyContent:I.JustifyContent.flexEnd,width:I.FRACTIONS.SIX_TWELFTHS},a.default.createElement(A.Text,{variant:I.TextVariant.bodySm,color:I.TextColor.textDefault,width:I.FRACTIONS.EIGHT_TWELFTHS,paddingRight:1,textAlign:I.TEXT_ALIGN.RIGHT},`${le("maxFee")}: `),a.default.createElement(A.Text,{variant:I.TextVariant.bodySm,color:I.TextColor.textDefault,width:I.FRACTIONS.FOUR_TWELFTHS,textAlign:I.TEXT_ALIGN.RIGHT},zt||Gt))),!Ir&&a.default.createElement(j.default,{display:I.DISPLAY.FLEX,justifyContent:I.JustifyContent.spaceBetween},a.default.createElement(A.Text,{variant:I.TextVariant.bodyMd,as:"h6",color:I.TextColor.textDefault,marginRight:1},le("swapEnableTokenForSwapping",[Ar])),a.default.createElement(A.Text,{variant:I.TextVariant.bodyMd},a.default.createElement(A.ButtonLink,{onClick:()=>hr(),size:I.Size.inherit,className:"review-quote__edit-limit"},le("swapEditLimit")))),pt&&a.default.createElement(j.default,{display:I.DISPLAY.FLEX,marginTop:3,justifyContent:I.JustifyContent.center,alignItems:I.AlignItems.center,flexDirection:I.FlexDirection.Column},a.default.createElement(A.Text,{variant:I.TextVariant.bodySm,color:I.TextColor.textAlternative},"* ",le("swapIncludesGasAndMetaMaskFee",[mr])),a.default.createElement(A.Text,{variant:I.TextVariant.bodySm,color:I.TextColor.textDefault},a.default.createElement(te,{trackAllAvailableQuotesOpened:dr,setSelectQuotePopoverShown:pe,t:le}))),!pt&&a.default.createElement(j.default,{display:I.DISPLAY.FLEX,marginTop:3,justifyContent:I.JustifyContent.center,alignItems:I.AlignItems.center},a.default.createElement(A.Text,{variant:I.TextVariant.bodySm,color:I.TextColor.textAlternative},"*",le("swapIncludesMetaMaskFeeViewAllQuotes",[mr,a.default.createElement(te,{key:"view-all-quotes",trackAllAvailableQuotesOpened:dr,setSelectQuotePopoverShown:pe,t:le})]))))),a.default.createElement(D.default,{onSubmit:qr,submitText:le(ft&&et?"preparingSwap":"swap"),hideCancel:!0,disabled:Rr,className:(0,s.default)("review-quote__footer",{"review-quote__thin-swaps-footer":Sr}),showTopBorder:!0,showTermsOfService:!0}))}te.propTypes={trackAllAvailableQuotesOpened:c.default.func.isRequired,setSelectQuotePopoverShown:c.default.func.isRequired,t:c.default.func.isRequired},re.propTypes={setReceiveToAmount:c.default.func.isRequired}}}},{package:"$root$",file:"ui/pages/swaps/prepare-swap-page/review-quote.js"}],[6947,{"../../../../shared/constants/swaps":5274,"../../../components/component-library":5806,"../../../components/component-library/modal-content/deprecated":5816,"../../../components/component-library/modal-header/deprecated":5825,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,"../swaps-banner-alert/swaps-banner-alert":6967,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function({isOpen:e,slippageErrorKey:t,setSlippageNotificationModalOpened:r,onSwapSubmit:a,currentSlippage:p}){const f=(0,n.useContext)(o.I18nContext),[m,h]=(0,n.useState)(!1),b=f(m?"preparingSwap":"swapAnyway");return n.default.createElement(l.Modal,{onClose:()=>r(!1),isOpen:e,isClosedOnOutsideClick:!0,isClosedOnEscapeKey:!0,className:"mm-modal__custom-scrollbar"},n.default.createElement(l.ModalOverlay,null),n.default.createElement(s.ModalContent,null,n.default.createElement(u.ModalHeader,{onClose:()=>r(!1)},t===c.SLIPPAGE_HIGH_ERROR?f("swapHighSlippage"):t===c.SLIPPAGE_LOW_ERROR?f("swapLowSlippage"):""),n.default.createElement(l.Box,{display:i.Display.Flex,flexDirection:i.FlexDirection.Column,justifyContent:i.JustifyContent.spaceBetween,alignItems:i.AlignItems.stretch,className:"high-slippage__content",marginTop:7},n.default.createElement(d.default,{swapsErrorKey:t,showTransactionSettingsLink:!0,currentSlippage:p}),n.default.createElement(l.Box,{marginTop:5},n.default.createElement(l.ButtonPrimary,{onClick:()=>{h(!0),a({acknowledgedSlippage:!0})},block:!0,"data-testid":"high-slippage-continue-anyway",disabled:m},b)))))};var a,n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),o=e("../../../contexts/i18n"),i=e("../../../helpers/constants/design-system"),l=e("../../../components/component-library"),s=e("../../../components/component-library/modal-content/deprecated"),u=e("../../../components/component-library/modal-header/deprecated"),c=e("../../../../shared/constants/swaps"),d=(a=e("../swaps-banner-alert/swaps-banner-alert"))&&a.__esModule?a:{default:a};function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}}}},{package:"$root$",file:"ui/pages/swaps/prepare-swap-page/slippage-notification-modal.tsx"}],[6948,{"../../../../shared/constants/gas":5255,"../../../components/component-library":5806,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=p;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=c(e("prop-types")),o=e("../../../contexts/i18n"),i=c(e("../../../components/ui/box")),l=e("../../../helpers/constants/design-system"),s=e("../../../../shared/constants/gas"),u=e("../../../components/component-library");function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function p(e){const{usedQuote:t,sourceTokenValue:r,destinationTokenValue:n,onAcknowledgementClick:c,acknowledged:d,priceSlippageFromSource:p,priceSlippageFromDestination:f,priceDifferencePercentage:m,priceSlippageUnknownFiatValue:h}=e,b=(0,a.useContext)(o.I18nContext);let g=b("swapPriceUnavailableTitle"),y=b("swapPriceUnavailableDescription"),v=s.GasRecommendations.high;h||(g=b("swapPriceDifferenceTitle",[m]),y=b("swapPriceDifference",[r,t.sourceTokenInfo.symbol,p,n,t.destinationTokenInfo.symbol,f]),v=t.priceSlippage.bucket);const w=v===s.GasRecommendations.high?l.SEVERITIES.DANGER:l.SEVERITIES.WARNING;return a.default.createElement(i.default,{display:l.DISPLAY.FLEX,marginTop:2},a.default.createElement(u.BannerAlert,{title:g,titleProps:{"data-testid":"swaps-banner-title"},severity:w,width:l.BLOCK_SIZES.FULL,"data-testid":"mm-banner-alert"},a.default.createElement(i.default,null,a.default.createElement(u.Text,{variant:l.TextVariant.bodyMd,as:"h6","data-testid":"mm-banner-alert-notification-text"},y),!d&&a.default.createElement(u.ButtonLink,{size:u.ButtonLinkSize.Inherit,textProps:{variant:l.TextVariant.bodyMd,alignItems:l.AlignItems.flexStart},onClick:c},b("swapAnyway")))))}p.propTypes={usedQuote:n.default.object,sourceTokenValue:n.default.string,destinationTokenValue:n.default.string,onAcknowledgementClick:n.default.func,acknowledged:n.default.bool,priceSlippageFromSource:n.default.string,priceSlippageFromDestination:n.default.string,priceDifferencePercentage:n.default.number,priceSlippageUnknownFiatValue:n.default.bool}}}},{package:"$root$",file:"ui/pages/swaps/prepare-swap-page/view-quote-price-difference.js"}],[6949,{"./item-list.component":6950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./item-list.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/searchable-item-list/item-list/index.js"}],[6950,{"../../../../../shared/constants/common":5250,"../../../../../shared/constants/metametrics":5260,"../../../../../shared/modules/selectors/networks":5320,"../../../../components/ui/actionable-message/actionable-message":6075,"../../../../components/ui/button":6083,"../../../../components/ui/identicon":6133,"../../../../components/ui/url-icon":6206,"../../../../contexts/i18n":6211,"../../../../contexts/metametrics":6214,"../../../../helpers/utils/util":6297,"../../../../selectors":6985,classnames:3584,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=w;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=v(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=y(e("prop-types")),i=y(e("classnames")),l=y(e("../../../../components/ui/identicon")),s=y(e("../../../../components/ui/url-icon")),u=y(e("../../../../components/ui/button")),c=y(e("../../../../components/ui/actionable-message/actionable-message")),d=e("../../../../contexts/i18n"),p=e("../../../../../shared/modules/selectors/networks"),f=e("../../../../selectors"),m=e("../../../../../shared/constants/metametrics"),h=e("../../../../../shared/constants/common"),b=e("../../../../helpers/utils/util"),g=e("../../../../contexts/metametrics");function y(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(v=function(e){return e?r:t})(e)}function w({results:e=[],onClickItem:t,onOpenImportTokenModalClick:r,Placeholder:o,listTitle:y,maxListItems:v=6,searchQuery:w="",containerRef:x,hideRightLabels:E,hideItemIf:_,listContainerClassName:C}){const T=(0,a.useContext)(d.I18nContext),k=(0,n.useSelector)(p.getCurrentChainId),S=(0,n.useSelector)(f.getRpcPrefsForCurrentProvider).blockExplorerUrl??h.CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[k]??null,R=(0,n.useSelector)(f.getUseCurrencyRateCheck),P=(0,b.getURLHostName)(S),M=(0,a.useContext)(g.MetaMetricsContext),O=1===e.length&&e[0].notImported,D=o?a.default.createElement(o,{searchQuery:w}):null;return 0===e.length?D:a.default.createElement("div",{className:"searchable-item-list"},y?a.default.createElement("div",{className:"searchable-item-list__title"},y):null,a.default.createElement("div",{className:(0,i.default)("searchable-item-list__list-container",C),ref:x,"data-testid":"searchable-item-list-list-container"},e.slice(0,v).map(((e,n)=>{if(null!=_&&_(e))return null;const o=e.balance>0;if(e.blocked&&!o&&!w)return null;const c=()=>{e.blocked||(e.notImported?r(e):null==t||t(e))},{iconUrl:d,identiconAddress:p,selected:f,blocked:m,primaryLabel:h,secondaryLabel:b,rightPrimaryLabel:g,rightSecondaryLabel:y,IconComponent:v}=e;return a.default.createElement("div",{tabIndex:"0",className:(0,i.default)("searchable-item-list__item",{"searchable-item-list__item--selected":f,"searchable-item-list__item--disabled":m}),"data-testid":"searchable-item-list__item",onClick:c,onKeyUp:e=>"Enter"===e.key&&c(),key:`searchable-item-list-item-${n}`,title:m?T("swapTokenNotAvailable"):null},d||h?a.default.createElement(s.default,{url:d,name:h}):null,d||h||!p?null:a.default.createElement("div",{className:"searchable-item-list__identicon"},a.default.createElement(l.default,{address:p,diameter:24})),v?a.default.createElement(v,null):null,a.default.createElement("div",{className:"searchable-item-list__labels"},a.default.createElement("div",{className:"searchable-item-list__item-labels"},h?a.default.createElement("span",{className:"searchable-item-list__primary-label","data-testid":"searchable-item-list-primary-label"},h):null,b?a.default.createElement("span",{className:"searchable-item-list__secondary-label"},b):null),E||!g&&!y?null:a.default.createElement("div",{className:"searchable-item-list__right-labels"},g?a.default.createElement("span",{className:"searchable-item-list__right-primary-label"},g):null,y&&R?a.default.createElement("span",{className:"searchable-item-list__right-secondary-label"},y):null)),e.notImported&&a.default.createElement(u.default,{type:"primary",onClick:c,"data-testid":"searchable-item-list-import-button"},T("import")))})),!O&&S&&a.default.createElement("div",{tabIndex:"0",className:"searchable-item-list__item searchable-item-list__item--add-token",key:"searchable-item-list-item-last"},a.default.createElement(c.default,{message:T("addTokenByContractAddress",[a.default.createElement("a",{key:"searchable-item-list__etherscan-link",onClick:()=>{M({event:"Clicked Block Explorer Link",category:m.MetaMetricsEventCategory.Swaps,properties:{link_type:"Token Tracker",action:"Verify Contract Address",block_explorer_domain:P}}),global.platform.openTab({url:S})},target:"_blank",rel:"noopener noreferrer"},P)])}))))}w.propTypes={results:o.default.arrayOf(o.default.shape({iconUrl:o.default.string,selected:o.default.bool,blocked:o.default.bool,primaryLabel:o.default.string,secondaryLabel:o.default.string,rightPrimaryLabel:o.default.string,rightSecondaryLabel:o.default.string})),onClickItem:o.default.func,onOpenImportTokenModalClick:o.default.func,Placeholder:o.default.func,listTitle:o.default.string,maxListItems:o.default.number,searchQuery:o.default.string,containerRef:o.default.shape({current:o.default.instanceOf(window.Element)}),hideRightLabels:o.default.bool,hideItemIf:o.default.func,listContainerClassName:o.default.string}}}},{package:"$root$",file:"ui/pages/swaps/searchable-item-list/item-list/item-list.component.js"}],[6951,{"./select-quote-popover":6955},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./select-quote-popover"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/index.js"}],[6952,{"./quote-details":6953},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./quote-details"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/quote-details/index.js"}],[6953,{"../../../../components/ui/info-tooltip":6134,"../../../../contexts/i18n":6211,"../../../../selectors":6985,"../../exchange-rate-display":6932,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=c(e("prop-types")),i=e("../../../../contexts/i18n"),l=c(e("../../../../components/ui/info-tooltip")),s=c(e("../../exchange-rate-display")),u=e("../../../../selectors");function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}const p=({slippage:e,sourceTokenValue:t,sourceTokenSymbol:r,destinationTokenValue:o,destinationTokenSymbol:c,liquiditySourceKey:d,minimumAmountReceived:p,feeInEth:f,networkFees:m,metaMaskFee:h,hideEstimatedGasFee:b})=>{const g=(0,a.useContext)(i.I18nContext),y=(0,n.useSelector)(u.getUseCurrencyRateCheck);return a.default.createElement("div",{className:"quote-details"},a.default.createElement("div",{className:"quote-details__row"},a.default.createElement("div",{className:"quote-details__detail-header"},g("swapRate")),a.default.createElement("div",{className:"quote-details__detail-content"},a.default.createElement(s.default,{primaryTokenValue:t,primaryTokenDecimals:1,primaryTokenSymbol:r,secondaryTokenValue:o,secondaryTokenDecimals:1,secondaryTokenSymbol:c}))),a.default.createElement("div",{className:"quote-details__row"},a.default.createElement("div",{className:"quote-details__detail-header"},g("swapMaxSlippage"),a.default.createElement(l.default,{position:"bottom",contentText:g("swapSlippageTooltip")})),a.default.createElement("div",{className:"quote-details__detail-content"},`${e}%`)),a.default.createElement("div",{className:"quote-details__row"},a.default.createElement("div",{className:"quote-details__detail-header"},g("swapAmountReceived"),a.default.createElement(l.default,{position:"bottom",contentText:g("swapAmountReceivedInfo")})),a.default.createElement("div",{className:"quote-details__detail-content"},a.default.createElement("span",null,p),a.default.createElement("span",{className:"quote-details__bold"},` ${c}`))),!b&&a.default.createElement("div",{className:"quote-details__row"},a.default.createElement("div",{className:"quote-details__detail-header"},g("swapEstimatedNetworkFees"),a.default.createElement(l.default,{position:"bottom",contentText:g("swapEstimatedNetworkFeesInfo")})),a.default.createElement("div",{className:"quote-details__detail-content"},a.default.createElement("span",null,f),a.default.createElement("span",{className:"quote-details__light-grey"},y&&` (${m})`))),a.default.createElement("div",{className:"quote-details__row"},a.default.createElement("div",{className:"quote-details__detail-header"},g("swapSource"),a.default.createElement(l.default,{position:"bottom",contentText:g("swapLiquiditySourceInfo")})),a.default.createElement("div",{className:"quote-details__detail-content"},g(d))),a.default.createElement("div",{className:"quote-details__row quote-details__row--high"},a.default.createElement("div",{className:"quote-details__detail-header"},a.default.createElement("img",{src:"./images/logo/metamask-fox.svg",className:"quote-details__metafox-logo",alt:""}),g("swapMetaMaskFee")),a.default.createElement("div",{className:"quote-details__detail-content"},g("swapMetaMaskFeeDescription",[h]))))};p.propTypes={slippage:o.default.number.isRequired,sourceTokenValue:o.default.string.isRequired,sourceTokenSymbol:o.default.string.isRequired,destinationTokenValue:o.default.string.isRequired,destinationTokenSymbol:o.default.string.isRequired,liquiditySourceKey:o.default.string.isRequired,minimumAmountReceived:o.default.string.isRequired,feeInEth:o.default.string.isRequired,networkFees:o.default.string.isRequired,metaMaskFee:o.default.number.isRequired,hideEstimatedGasFee:o.default.bool};r.default=p}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/quote-details/quote-details.js"}],[6954,{"prop-types":4528},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.QUOTE_DATA_ROWS_PROPTYPES_SHAPE=void 0;var a,n=(a=e("prop-types"))&&a.__esModule?a:{default:a};r.QUOTE_DATA_ROWS_PROPTYPES_SHAPE=n.default.shape({aggId:n.default.string.isRequired,amountReceiving:n.default.string.isRequired,destinationTokenDecimals:n.default.number.isRequired,destinationTokenSymbol:n.default.string.isRequired,destinationTokenValue:n.default.string.isRequired,isBestQuote:n.default.bool,networkFees:n.default.string.isRequired,quoteSource:n.default.string.isRequired,rawNetworkFees:n.default.string.isRequired,slippage:n.default.number.isRequired,sourceTokenDecimals:n.default.number.isRequired,sourceTokenSymbol:n.default.string.isRequired,sourceTokenValue:n.default.string.isRequired})}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/select-quote-popover-constants.js"}],[6955,{"../../../components/ui/button":6083,"../../../components/ui/popover":6166,"../../../contexts/i18n":6211,"./quote-details":6952,"./select-quote-popover-constants":6954,"./sort-list":6956,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=d(e("prop-types")),o=e("../../../contexts/i18n"),i=d(e("../../../components/ui/popover")),l=d(e("../../../components/ui/button")),s=d(e("./quote-details")),u=d(e("./sort-list")),c=e("./select-quote-popover-constants");function d(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const m=(0,a.useContext)(o.I18nContext),[h,b]=(0,a.useState)(1),[g,y]=(0,a.useState)(null),[v,w]=(0,a.useState)(c),[x,E]=(0,a.useState)("sortList"),[_,C]=(0,a.useState)(null),T=(0,a.useCallback)((()=>{r(v),t()}),[v,t,r]),k=(0,a.useCallback)((()=>{C(null),E("sortList")}),[]),S=(0,a.useCallback)((e=>w(e)),[w]),R=(0,a.useCallback)((t=>{const r=e.find((e=>e.aggId===t));E("quoteDetails"),d(),C(r)}),[e,d]),P=(0,a.useCallback)((()=>a.default.createElement("div",{className:"select-quote-popover__popover-bg",onClick:t})),[t]),M=a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,{type:"secondary",className:"page-container__footer-button select-quote-popover__button",onClick:t},m("close")),a.default.createElement(l.default,{type:"primary",className:"page-container__footer-button select-quote-popover__button",onClick:T},m("swapSelect")));return a.default.createElement("div",{className:"select-quote-popover"},a.default.createElement(i.default,{title:m("quoteDetails"===x?"swapSelectAQuote":"swapQuoteDetails"),subtitle:"sortList"===x?m("swapSelectQuotePopoverDescription"):null,onClose:t,CustomBackground:P,className:"select-quote-popover__popover-wrap",footerClassName:"swaps__footer",footer:"quoteDetails"===x?null:M,onBack:"quoteDetails"===x?k:null},"sortList"===x&&a.default.createElement(u.default,{quoteDataRows:e,selectedAggId:v,onSelect:S,onCaretClick:R,swapToSymbol:n,sortDirection:h,setSortDirection:b,sortColumn:g,setSortColumn:y,hideEstimatedGasFee:p}),"quoteDetails"===x&&_&&a.default.createElement(s.default,f({},_,{hideEstimatedGasFee:p}))))};m.propTypes={onClose:n.default.func,onSubmit:n.default.func,swapToSymbol:n.default.string,quoteDataRows:n.default.arrayOf(c.QUOTE_DATA_ROWS_PROPTYPES_SHAPE),initialAggId:n.default.string,onQuoteDetailsIsOpened:n.default.func,hideEstimatedGasFee:n.default.bool.isRequired};r.default=m}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/select-quote-popover.js"}],[6956,{"./sort-list":6957},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./sort-list"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/sort-list/index.js"}],[6957,{"../../../../components/ui/icon/sun-check-icon.component":6128,"../../../../components/ui/info-tooltip":6134,"../../../../contexts/i18n":6211,"../../../../selectors":6985,"../select-quote-popover-constants":6954,"bignumber.js":3465,classnames:3584,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=b;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=f(e("prop-types")),i=f(e("classnames")),l=f(e("bignumber.js")),s=f(e("../../../../components/ui/icon/sun-check-icon.component")),u=e("../../../../contexts/i18n"),c=e("../select-quote-popover-constants"),d=f(e("../../../../components/ui/info-tooltip")),p=e("../../../../selectors");function f(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}const h=()=>a.default.createElement("svg",{width:"6",height:"9",viewBox:"0 0 6 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.default.createElement("path",{d:"M0.7948 4.96973C0.365112 4.96973 0.150269 5.47754 0.462769 5.77051L2.78699 8.09473C2.96277 8.29004 3.25574 8.29004 3.45105 8.09473L5.77527 5.77051C6.06824 5.47754 5.85339 4.96973 5.44324 4.96973H0.7948ZM5.77527 2.91895L3.45105 0.594727C3.25574 0.418945 2.96277 0.418945 2.78699 0.594727L0.462769 2.91895C0.150269 3.23145 0.365112 3.71973 0.7948 3.71973H5.44324C5.85339 3.71973 6.06824 3.23145 5.77527 2.91895Z",fill:"var(--color-primary-default)"}));function b({quoteDataRows:e,selectedAggId:t,onSelect:r,onCaretClick:o,swapToSymbol:c,sortDirection:f,setSortDirection:m,sortColumn:b=null,setSortColumn:g,hideEstimatedGasFee:y}){const v=(0,a.useContext)(u.I18nContext),[w,x]=(0,a.useState)(!1),E=(0,n.useSelector)(p.getUseCurrencyRateCheck),_=e=>{e===b?m(-1*f):g(e)},C=(0,a.useMemo)((()=>[...e].sort(((e,t)=>{if(null===b&&e.isBestQuote)return-1;if(null===b&&t.isBestQuote)return 1;if(null===b){const r=new l.default(e.destinationTokenValue).toString(16),a=new l.default(t.destinationTokenValue).toString(16);return r[r.length-1]t[b]?-1*f:f:new l.default(e[b]).gt(t[b])?-1*f:f}))),[e,b,f]),T=C.findIndex((({aggId:e})=>t===e));return a.default.createElement("div",{className:"select-quote-popover__sort-list"},a.default.createElement("div",{className:"select-quote-popover__column-headers"},a.default.createElement("div",{className:"select-quote-popover__column-header select-quote-popover__receiving","data-testid":"select-quote-popover__receiving",onClick:()=>_("destinationTokenValue")},a.default.createElement("span",{className:"select-quote-popover__receiving-symbol"},c),a.default.createElement("div",{className:"select-quote-popover__receiving-label"},a.default.createElement("span",null,v("swapReceiving")),a.default.createElement(d.default,{position:"bottom",contentText:v("swapReceivingInfoTooltip")}),a.default.createElement(h,null))),a.default.createElement("div",{className:"select-quote-popover__column-header select-quote-popover__network-fees select-quote-popover__network-fees-header","data-testid":"select-quote-popover__network-fees-header",onClick:()=>_("rawNetworkFees")},!y&&E&&a.default.createElement(a.default.Fragment,null,a.default.createElement("span",null,v("swapEstimatedNetworkFees")),a.default.createElement(d.default,{position:"bottom",contentText:v("swapEstimatedNetworkFeesInfo")}),a.default.createElement(h,null))),a.default.createElement("div",{className:"select-quote-popover__column-header select-quote-popover__quote-source","data-testid":"select-quote-popover__quote-source",onClick:()=>_("quoteSource")},v("swapQuoteSource"),a.default.createElement("div",{className:"select-quote-popover__quote-source-toggle"},a.default.createElement(h,null)))),C.map((({destinationTokenValue:e,networkFees:t,isBestQuote:n,quoteSource:l,aggId:u},c)=>a.default.createElement("div",{className:(0,i.default)("select-quote-popover__row",{"select-quote-popover__row--selected":T===c,"select-quote-popover__row--no-hover":w}),onClick:()=>r(u),key:`select-quote-popover-row-${c}`,"data-testid":`select-quote-popover-row-${c}`},a.default.createElement("div",{className:"select-quote-popover__receiving"},a.default.createElement("div",{className:"select-quote-popover__receiving-value"},n&&a.default.createElement(s.default,{reverseColors:T!==c}),a.default.createElement("div",{className:"select-quote-popover__receiving-value-text",title:e},e)),"RFQ"===l&&a.default.createElement("span",{className:"select-quote-popover__zero-slippage"},v("swapZeroSlippage"))),a.default.createElement("div",{className:"select-quote-popover__network-fees"},!y&&E&&t),a.default.createElement("div",{className:"select-quote-popover__quote-source"},a.default.createElement("div",{className:(0,i.default)("select-quote-popover__quote-source-label",{"select-quote-popover__quote-source-label--green":"AGG"===l,"select-quote-popover__quote-source-label--orange":"RFQ"===l,"select-quote-popover__quote-source-label--blue":"DEX"===l})},l)),a.default.createElement("div",{className:"select-quote-popover__caret-right","data-testid":`select-quote-popover__caret-right-${c}`,onClick:e=>{e.stopPropagation(),o(u)},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},a.default.createElement("i",{className:"fa fa-angle-up"}))))))}b.propTypes={selectedAggId:o.default.string.isRequired,onSelect:o.default.func.isRequired,onCaretClick:o.default.func.isRequired,swapToSymbol:o.default.string.isRequired,quoteDataRows:o.default.arrayOf(c.QUOTE_DATA_ROWS_PROPTYPES_SHAPE).isRequired,sortDirection:o.default.number.isRequired,setSortDirection:o.default.func.isRequired,sortColumn:o.default.string,setSortColumn:o.default.func.isRequired,hideEstimatedGasFee:o.default.bool.isRequired}}}},{package:"$root$",file:"ui/pages/swaps/select-quote-popover/sort-list/sort-list.js"}],[6958,{"../../../components/component-library":5806,"../../../components/ui/url-icon":6206,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,classnames:3584,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=p;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=c(e("prop-types")),o=c(e("classnames")),i=e("../../../components/component-library"),l=e("../../../helpers/constants/design-system"),s=c(e("../../../components/ui/url-icon")),u=e("../../../contexts/i18n");function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function p({onClick:e,onClose:t,selectedToken:r,testId:n}){const c=(0,a.useContext)(u.I18nContext),d=(null==r?void 0:r.iconUrl)&&(null==r?void 0:r.symbol);return a.default.createElement("div",{className:"selected-token"},a.default.createElement("div",{className:(0,o.default)("selected-token-list","selected-token-list__selector-closed-container","selected-token-input-pair__selector--closed"),"data-testid":"selected-token-list",tabIndex:"0",onClick:e,onKeyUp:r=>{"Escape"===r.key?t():"Enter"===r.key&&e(r)}},a.default.createElement("div",{className:"selected-token-list__selector-closed"},d&&a.default.createElement(s.default,{url:r.iconUrl,className:"selected-token-list__selector-closed-icon",name:null==r?void 0:r.symbol}),a.default.createElement("div",{className:(0,o.default)("selected-token-list__labels",{"selected-token-list__labels--with-icon":d})},a.default.createElement("div",{className:"selected-token-list__item-labels"},a.default.createElement("span",{"data-testid":n,className:(0,o.default)("selected-token-list__closed-primary-label",{"selected-token-list__select-default":!(null!=r&&r.symbol)})},(null==r?void 0:r.symbol)||c("swapSelectAToken"))))),a.default.createElement(i.Icon,{name:i.IconName.ArrowDown,size:i.IconSize.Xs,marginRight:3,color:l.IconColor.iconAlternative})))}p.propTypes={onClick:n.default.func.isRequired,onClose:n.default.func.isRequired,selectedToken:n.default.object.isRequired,testId:n.default.string}}}},{package:"$root$",file:"ui/pages/swaps/selected-token/selected-token.js"}],[6959,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement("svg",{width:"15",height:"13",viewBox:"0 0 15 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M14.4946 6.14779C14.4863 5.93594 14.3991 5.69108 14.2539 5.53666L9.51334 0.49958C9.1921 0.21091 8.57613 0.0917437 8.21709 0.425509C7.86344 0.754237 7.87396 1.39178 8.22627 1.72181L11.5595 5.25889L1.1618 5.25889C0.670919 5.25889 0.272949 5.65687 0.272949 6.14779C0.272949 6.6387 0.670919 7.03668 1.1618 7.03668L11.5595 7.03668L8.22627 10.5738C7.92297 10.8776 7.86691 11.5376 8.21709 11.8701C8.56718 12.2025 9.20529 12.0963 9.51334 11.796L14.2539 6.75891C14.4161 6.58653 14.4952 6.38428 14.4946 6.14779Z",fill:"var(--color-text-muted)"}))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/arrow-icon.js"}],[6960,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement("svg",{width:"41",height:"39",viewBox:"0 0 41 39",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M34.5805 6.55143C36.1394 8.11033 37.3994 9.91222 38.3237 11.8681C38.7066 12.6782 39.0318 13.5148 39.2968 14.3714L39.3242 14.4606C39.4816 14.9785 39.6171 15.5037 39.73 16.0347C40.6511 20.3654 40.0335 24.9029 37.9511 28.8509C35.6001 33.308 31.5749 36.6487 26.7609 38.138C24.3773 38.8754 21.8717 39.1361 19.3873 38.9052C16.9029 38.6743 14.4883 37.9563 12.2813 36.7922C10.2608 35.7264 8.52045 34.3588 7.08333 32.7636C5.61245 31.1448 4.43054 29.2824 3.59178 27.2574C3.32329 26.6092 2.89685 25.2767 2.89685 25.2767H6.89583C7.68667 27.4068 8.96033 29.362 10.6288 30.9609L10.6318 30.96C11.5096 31.8005 12.501 32.5516 13.595 33.1786C15.8742 34.483 18.4736 35.1864 21.1455 35.1864C25.1768 35.1864 29.0429 33.585 31.8935 30.7345C34.744 27.8839 36.3455 24.0177 36.3455 19.9865C36.3455 18.7267 36.1891 17.483 35.8871 16.2814C35.8206 16.017 35.7471 15.7546 35.6666 15.4945C34.4752 11.6432 31.8027 8.42306 28.237 6.54231C24.6713 4.66156 20.5045 4.27429 16.6533 5.46571C12.8837 6.63189 9.71868 9.21706 7.82253 12.6699L12.8961 15.307L3.28331 18.3447L0.245605 8.73191L4.45005 10.9171C6.81537 6.56278 10.7905 3.30177 15.5303 1.83546C17.3658 1.26761 19.2587 0.986653 21.1455 0.986694C26.1846 0.986694 31.0173 2.98824 34.5805 6.55143Z",fill:"var(--color-primary-default)"}),n.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.1252 22.1036L14.7107 18.689L12.0926 21.3257L18.1252 27.3584L30.2322 15.2515L27.614 12.6148L18.1252 22.1036Z",fill:"var(--color-primary-default)"}))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/canceled-icon.js"}],[6961,{"./smart-transaction-status":6963},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./smart-transaction-status"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/index.js"}],[6962,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement("svg",{width:"41",height:"39",viewBox:"0 0 41 39",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M34.6806 6.55143C36.2395 8.11033 37.4995 9.91222 38.4238 11.8681C38.8067 12.6782 39.1319 13.5148 39.3969 14.3714L39.4243 14.4606C39.5817 14.9785 39.7172 15.5037 39.8301 16.0347C40.7512 20.3654 40.1336 24.9029 38.0512 28.8509C35.7002 33.308 31.675 36.6487 26.861 38.138C24.4773 38.8754 21.9718 39.1361 19.4874 38.9052C17.003 38.6743 14.5884 37.9563 12.3814 36.7922C10.3609 35.7264 8.62055 34.3588 7.18343 32.7636C5.71254 31.1448 4.53064 29.2824 3.69188 27.2574C3.42339 26.6092 2.99695 25.2767 2.99695 25.2767H6.99592C7.78677 27.4068 9.06042 29.362 10.7289 30.9609L10.7319 30.96C11.6097 31.8005 12.6011 32.5516 13.6951 33.1786C15.9743 34.483 18.5737 35.1864 21.2456 35.1864C25.2769 35.1864 29.143 33.585 31.9936 30.7345C34.8441 27.8839 36.4456 24.0177 36.4456 19.9865C36.4456 18.7267 36.2892 17.483 35.9872 16.2814C35.9207 16.017 35.8471 15.7546 35.7667 15.4945C34.5753 11.6432 31.9028 8.42306 28.3371 6.54231C24.7714 4.66156 20.6046 4.27429 16.7534 5.46571C12.9838 6.63189 9.81878 9.21706 7.92263 12.6699L12.9962 15.307L3.3834 18.3447L0.345703 8.73191L4.55015 10.9171C6.91547 6.56278 10.8906 3.30177 15.6304 1.83546C17.4659 1.26761 19.3588 0.986653 21.2456 0.986694C26.2847 0.986694 31.1174 2.98824 34.6806 6.55143Z",fill:"var(--color-error-default)"}),n.default.createElement("path",{d:"M18.5849 19.9869L15.1454 23.4264L17.9845 26.2655L21.424 22.826L24.8635 26.2655L27.7026 23.4264L24.2631 19.9869L27.7026 16.5473L24.8635 13.7082L21.424 17.1478L17.9845 13.7082L15.1454 16.5473L18.5849 19.9869Z",fill:"var(--color-error-default)"}))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/reverted-icon.js"}],[6963,{"../../../../shared/constants/common":5250,"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/transaction":5278,"../../../../shared/lib/transactions-controller-utils":5292,"../../../../shared/modules/selectors":5319,"../../../../shared/modules/selectors/networks":5320,"../../../components/component-library":5806,"../../../components/ui/box":6079,"../../../components/ui/url-icon":6206,"../../../contexts/i18n":6211,"../../../contexts/metametrics":6214,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/routes":6254,"../../../selectors":6985,"../../../store/actions":7e3,"../create-new-swap":6930,"../swaps-footer":6968,"../swaps.util":6970,"../view-on-block-explorer":6972,"./arrow-icon":6959,"./canceled-icon":6960,"./reverted-icon":6962,"./success-icon":6964,"./timer-icon":6965,"./unknown-icon":6966,"@metamask/etherscan-link":1752,lodash:4380,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){var e,t,r,I,A,q,N,L,F;const[W,B]=(0,a.useState)(!1),U=(0,a.useContext)(s.I18nContext),$=(0,o.useHistory)(),z=(0,n.useDispatch)(),G=(0,n.useSelector)(u.getFetchParams,l.isEqual)||{},{destinationTokenInfo:H={},sourceTokenInfo:V={}}=(null==G?void 0:G.metaData)||{},Q=(0,n.useSelector)(d.isHardwareWallet),X=(0,n.useSelector)(d.getHardwareWalletType),Y=(0,n.useSelector)(u.getUsedQuote,l.isEqual),Z=(0,n.useSelector)(u.getCurrentSmartTransactions,l.isEqual),K=(0,n.useSelector)(c.getCurrentChainId),J=(0,n.useSelector)(d.getRpcPrefsForCurrentProvider,n.shallowEqual),ee=(0,n.useSelector)(u.getSwapsNetworkConfig,n.shallowEqual),te=(0,n.useSelector)(p.getSmartTransactionsEnabled),re=(0,n.useSelector)(u.getCurrentSmartTransactionsEnabled),ae=J.blockExplorerUrl??f.CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[K]??null;let ne,oe,ie=x.SmartTransactionStatus.pending,le={};if(Z&&Z.length>0){var se,ue,ce;le=Z[Z.length-1],ne=null===(se=le)||void 0===se?void 0:se.uuid,ie=(null===(ue=le)||void 0===ue?void 0:ue.status)||x.SmartTransactionStatus.pending,oe=null===(ce=le)||void 0===ce||null===(ce=ce.statusMetadata)||void 0===ce?void 0:ce.cancellationFeeWei}const[de,pe]=(0,a.useState)(ee.stxStatusDeadline),fe={needs_two_confirmations:!0,token_from:V.symbol??(null===(e=le)||void 0===e?void 0:e.sourceTokenSymbol),token_from_amount:(null==G?void 0:G.value)??(null===(t=le)||void 0===t?void 0:t.swapTokenValue),token_to:H.symbol??(null===(r=le)||void 0===r?void 0:r.destinationTokenSymbol),request_type:null!=G&&G.balanceError?"Quote":"Order",slippage:null==G?void 0:G.slippage,custom_slippage:2===(null==G?void 0:G.slippage),is_hardware_wallet:Q,hardware_wallet_type:X,stx_enabled:te,current_stx_enabled:re,stx_user_opt_in:(0,n.useSelector)(p.getSmartTransactionsOptInStatusForMetrics)};let me;var he;null!=Y&&Y.destinationAmount&&(me=(0,S.calcTokenAmount)(null==Y?void 0:Y.destinationAmount,H.decimals??(null===(he=le)||void 0===he?void 0:he.destinationTokenDecimals)).toPrecision(8));const be=(0,a.useContext)(C.MetaMetricsContext),ge=ie===x.SmartTransactionStatus.pending,ye=ge||ie===x.SmartTransactionStatus.success,ve=null===(I=le)||void 0===I||null===(I=I.statusMetadata)||void 0===I?void 0:I.minedHash;(0,a.useEffect)((()=>{be({event:"STX Status Page Loaded",category:w.MetaMetricsEventCategory.Swaps,sensitiveProperties:fe})}),[]),(0,a.useEffect)((()=>{let e;if(ge&&ne){const t=()=>{const t=Math.round((Date.now()-le.time)/1e3);if(t>ee.stxStatusDeadline)return pe(0),void clearInterval(e);pe(ee.stxStatusDeadline-t)};e=setInterval(t,1e3),t()}return()=>clearInterval(e)}),[z,ge,ne,le.time,ee.stxStatusDeadline]),(0,a.useEffect)((()=>{z((0,v.setBackgroundSwapRouteState)("smartTransactionStatus")),setTimeout((()=>{z((0,v.stopPollingForQuotes)())}),1e3)}),[z]);let we,xe,Ee,_e,Ce=U("stxPendingPrivatelySubmittingSwap");ge&&(W?Ce=U("stxTryingToCancel"):oe>0&&(Ce=U("stxPendingPubliclySubmittingSwap")));if(ie===x.SmartTransactionStatus.success){var Te,ke;if(Ce=U("stxSuccess"),H.symbol||null!==(Te=le)&&void 0!==Te&&Te.destinationTokenSymbol)we=U("stxSuccessDescription",[H.symbol??(null===(ke=le)||void 0===ke?void 0:ke.destinationTokenSymbol)]);Ee=a.default.createElement(R.default,null)}else"cancelled_user_cancelled"===ie||(null===(A=le)||void 0===A||null===(A=A.statusMetadata)||void 0===A?void 0:A.minedTx)===x.SmartTransactionStatus.cancelled?(Ce=U("stxUserCancelled"),we=U("stxUserCancelledDescription"),Ee=a.default.createElement(M.default,null)):ie.startsWith("cancelled")||ie.includes("deadline_missed")?(Ce=U("stxCancelled"),we=U("stxCancelledDescription"),xe=U("stxCancelledSubDescription"),Ee=a.default.createElement(M.default,null)):"unknown"===ie?(Ce=U("stxUnknown"),we=U("stxUnknownDescription"),Ee=a.default.createElement(O.default,null)):"reverted"===ie&&(Ce=U("stxFailure"),we=U("stxFailureDescription",[a.default.createElement("a",{className:"smart-transaction-status__support-link",key:"smart-transaction-status-support-link",href:"https://support.metamask.io",target:"_blank",rel:"noopener noreferrer"},U("customerSupport"))]),Ee=a.default.createElement(P.default,null));ve&&ne&&(_e=(0,i.getBlockExplorerLink)({hash:ve,chainId:K},{blockExplorerUrl:ae}));const Se=le.cancellable&&!W,Re=()=>a.default.createElement(b.default,{marginBottom:0},a.default.createElement("a",{className:"smart-transaction-status__cancel-swap-link",href:"#",onClick:e=>{null==e||e.preventDefault(),B(!0),be({event:"Cancel STX",category:w.MetaMetricsEventCategory.Swaps,sensitiveProperties:fe}),z((0,u.cancelSwapsSmartTransaction)(ne))}},U("attemptToCancelSwapForFree")));return a.default.createElement("div",{className:"smart-transaction-status"},a.default.createElement(b.default,{paddingLeft:8,paddingRight:8,height:y.BLOCK_SIZES.FULL,justifyContent:y.JustifyContent.flexStart,display:y.DISPLAY.FLEX,className:"smart-transaction-status__content"},a.default.createElement(b.default,{marginTop:10,marginBottom:0,display:y.DISPLAY.FLEX,justifyContent:y.JustifyContent.center,alignItems:y.AlignItems.center},a.default.createElement(h.Text,{color:y.TextColor.textAlternative,variant:y.TextVariant.bodySm,as:"h6"},`${(null==G?void 0:G.value)&&Number(G.value).toFixed(5)} `),a.default.createElement(h.Text,{color:y.TextColor.textAlternative,variant:y.TextVariant.bodySmBold,as:"h6",marginLeft:1,marginRight:2},V.symbol??(null===(q=le)||void 0===q?void 0:q.sourceTokenSymbol)),V.iconUrl?a.default.createElement(g.default,{url:V.iconUrl,className:"smart-transactions-status-summary__icon",name:V.symbol??(null===(N=le)||void 0===N?void 0:N.destinationTokenSymbol),fallbackClassName:"smart-transactions-status-summary__icon-fallback"}):null,a.default.createElement(b.default,{display:y.DISPLAY.BLOCK,marginLeft:2,marginRight:2},a.default.createElement(D.default,null)),H.iconUrl?a.default.createElement(g.default,{url:H.iconUrl,className:"smart-transactions-status-summary__icon",name:H.symbol??(null===(L=le)||void 0===L?void 0:L.destinationTokenSymbol),fallbackClassName:"smart-transactions-status-summary__icon-fallback"}):null,a.default.createElement(h.Text,{color:y.TextColor.textAlternative,variant:y.TextVariant.bodySm,as:"h6",marginLeft:2},`~${me&&Number(me).toFixed(5)} `),a.default.createElement(h.Text,{color:y.TextColor.textAlternative,variant:y.TextVariant.bodySmBold,as:"h6",marginLeft:1},H.symbol??(null===(F=le)||void 0===F?void 0:F.destinationTokenSymbol))),a.default.createElement(b.default,{marginTop:3,className:"smart-transaction-status__spacer-box--top"}),Ee&&a.default.createElement(b.default,{marginTop:3,marginBottom:2},Ee),ge&&a.default.createElement(b.default,{marginTop:7,marginBottom:1,display:y.DISPLAY.FLEX,justifyContent:y.JustifyContent.center,alignItems:y.AlignItems.center},a.default.createElement(j.default,null),a.default.createElement(h.Text,{color:y.TextColor.textAlternative,variant:y.TextVariant.bodySm,as:"h6",marginLeft:1},`${U("stxSwapCompleteIn")} `),a.default.createElement(h.Text,{color:y.TextColor.textAlternative,variant:y.TextVariant.bodySmBold,as:"h6",marginLeft:1,className:"smart-transaction-status__remaining-time"},(0,_.showRemainingTimeInMinAndSec)(de))),a.default.createElement(h.Text,{"data-testid":"swap-smart-transaction-status-header",color:y.TextColor.textDefault,variant:y.TextVariant.headingSm,as:"h4",fontWeight:y.FontWeight.Bold},Ce),ge&&a.default.createElement("div",{className:"smart-transaction-status__loading-bar-container"},a.default.createElement("div",{className:"smart-transaction-status__loading-bar",style:{width:100/ee.stxStatusDeadline*(ee.stxStatusDeadline-de)+"%"}})),we&&a.default.createElement(h.Text,{"data-testid":"swap-smart-transaction-status-description",variant:y.TextVariant.bodySm,as:"h6",marginTop:_e&&1,color:y.TextColor.textAlternative},we),_e&&a.default.createElement(k.default,{blockExplorerUrl:_e,sensitiveTrackingProperties:fe}),a.default.createElement(b.default,{marginTop:3,className:"smart-transaction-status__spacer-box--bottom"}),xe&&a.default.createElement(h.Text,{variant:y.TextVariant.bodySm,as:"h6",marginTop:8,color:y.TextColor.textAlternative},xe)),Se&&ne&&ge&&a.default.createElement(Re,null),ie===x.SmartTransactionStatus.success?a.default.createElement(T.default,{sensitiveTrackingProperties:fe}):null,a.default.createElement(E.default,{onSubmit:async()=>{ye?(await z((0,u.prepareToLeaveSwaps)()),$.push(m.DEFAULT_ROUTE)):$.push(m.PREPARE_SWAP_ROUTE)},onCancel:async()=>{await z((0,u.prepareToLeaveSwaps)()),$.push(m.DEFAULT_ROUTE)},submitText:U(ye?"close":"tryAgain"),hideCancel:ye,cancelText:U("close"),className:"smart-transaction-status__swaps-footer"}))};var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=A(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=e("react-router-dom"),i=e("@metamask/etherscan-link"),l=e("lodash"),s=e("../../../contexts/i18n"),u=e("../../../ducks/swaps/swaps"),c=e("../../../../shared/modules/selectors/networks"),d=e("../../../selectors"),p=e("../../../../shared/modules/selectors"),f=e("../../../../shared/constants/common"),m=e("../../../helpers/constants/routes"),h=e("../../../components/component-library"),b=I(e("../../../components/ui/box")),g=I(e("../../../components/ui/url-icon")),y=e("../../../helpers/constants/design-system"),v=e("../../../store/actions"),w=e("../../../../shared/constants/metametrics"),x=e("../../../../shared/constants/transaction"),E=I(e("../swaps-footer")),_=e("../swaps.util"),C=e("../../../contexts/metametrics"),T=I(e("../create-new-swap")),k=I(e("../view-on-block-explorer")),S=e("../../../../shared/lib/transactions-controller-utils"),R=I(e("./success-icon")),P=I(e("./reverted-icon")),M=I(e("./canceled-icon")),O=I(e("./unknown-icon")),D=I(e("./arrow-icon")),j=I(e("./timer-icon"));function I(e){return e&&e.__esModule?e:{default:e}}function A(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(A=function(e){return e?r:t})(e)}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/smart-transaction-status.js"}],[6964,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement("svg",{width:"39",height:"39",viewBox:"0 0 39 39",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M34.5457 19.8983C34.5457 23.9296 32.9443 27.7958 30.0937 30.6463C27.2432 33.4969 23.377 35.0983 19.3457 35.0983C15.3144 35.0983 11.4482 33.4969 8.59768 30.6463C5.74713 27.7958 4.1457 23.9296 4.1457 19.8983C4.1457 15.867 5.74713 12.0008 8.59768 9.15029C11.4482 6.29974 15.3144 4.69832 19.3457 4.69832C20.7897 4.69832 22.1957 4.90732 23.5257 5.28732L26.5087 2.30432C24.3047 1.39232 21.8917 0.898315 19.3457 0.898315C16.8506 0.898315 14.3799 1.38977 12.0747 2.3446C9.76953 3.29944 7.67499 4.69897 5.91067 6.46329C2.34748 10.0265 0.345703 14.8592 0.345703 19.8983C0.345703 24.9374 2.34748 29.7702 5.91067 33.3333C7.67499 35.0977 9.76953 36.4972 12.0747 37.452C14.3799 38.4069 16.8506 38.8983 19.3457 38.8983C24.3848 38.8983 29.2175 36.8965 32.7807 33.3333C36.3439 29.7702 38.3457 24.9374 38.3457 19.8983H34.5457ZM11.5747 16.2503L8.8957 18.9483L17.4457 27.4983L36.4457 8.49832L33.7667 5.80032L17.4457 22.1213L11.5747 16.2503Z",fill:"var(--color-success-default)"}))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/success-icon.js"}],[6965,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("path",{d:"M7.36621 0.0810547C3.62012 0.0810547 0.584961 3.11621 0.584961 6.8623C0.584961 10.6084 3.62012 13.6436 7.36621 13.6436C11.1123 13.6436 14.1475 10.6084 14.1475 6.8623C14.1475 3.11621 11.1123 0.0810547 7.36621 0.0810547ZM7.36621 12.3311C4.33105 12.3311 1.89746 9.89746 1.89746 6.8623C1.89746 3.85449 4.33105 1.39355 7.36621 1.39355C10.374 1.39355 12.835 3.85449 12.835 6.8623C12.835 9.89746 10.374 12.3311 7.36621 12.3311ZM9.03418 9.4873C9.19824 9.59668 9.38965 9.56934 9.49902 9.40527L10.0186 8.72168C10.1279 8.55762 10.1006 8.36621 9.93652 8.25684L8.13184 6.91699V3.03418C8.13184 2.87012 7.96777 2.70605 7.80371 2.70605H6.92871C6.7373 2.70605 6.60059 2.87012 6.60059 3.03418V7.5459C6.60059 7.62793 6.62793 7.7373 6.70996 7.79199L9.03418 9.4873Z",fill:"var(--color-primary-default)"}))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/timer-icon.js"}],[6966,{react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return n.default.createElement("svg",{width:"39",height:"39",viewBox:"0 0 39 39",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.default.createElement("circle",{cx:"19.1533",cy:"19.2715",r:"17.1",stroke:"var(--color-primary-default)",strokeWidth:"3.8"}),n.default.createElement("path",{d:"M16.712 21.5034C16.712 20.7834 16.88 20.1834 17.216 19.7034C17.568 19.2074 18.08 18.7274 18.752 18.2634C19.008 18.0874 19.264 17.9274 19.52 17.7834C19.776 17.6394 20 17.4874 20.192 17.3274C20.4 17.1514 20.56 16.9674 20.672 16.7754C20.8 16.5674 20.864 16.3194 20.864 16.0314C20.864 15.5354 20.688 15.1594 20.336 14.9034C20 14.6474 19.592 14.5194 19.112 14.5194C18.616 14.5194 18.16 14.6794 17.744 14.9994C17.344 15.3034 17.144 15.7674 17.144 16.3914H13.52C13.52 15.6394 13.664 14.9354 13.952 14.2794C14.24 13.6074 14.632 13.0314 15.128 12.5514C15.64 12.0554 16.232 11.6634 16.904 11.3754C17.592 11.0874 18.328 10.9434 19.112 10.9434C19.896 10.9434 20.616 11.0794 21.272 11.3514C21.944 11.6234 22.512 11.9834 22.976 12.4314C23.456 12.8794 23.824 13.3994 24.08 13.9914C24.352 14.5674 24.488 15.1754 24.488 15.8154C24.488 16.2314 24.456 16.6234 24.392 16.9914C24.344 17.3594 24.24 17.7114 24.08 18.0474C23.936 18.3834 23.728 18.7114 23.456 19.0314C23.184 19.3514 22.84 19.6634 22.424 19.9674C21.784 20.4474 21.272 20.8234 20.888 21.0954C20.52 21.3674 20.336 21.6474 20.336 21.9354V21.9594H16.712V21.5034ZM18.512 28.4634C18.16 28.4634 17.824 28.3994 17.504 28.2714C17.2 28.1274 16.928 27.9434 16.688 27.7194C16.464 27.4794 16.28 27.2074 16.136 26.9034C16.008 26.5834 15.944 26.2474 15.944 25.8954C15.944 25.5434 16.008 25.2154 16.136 24.9114C16.28 24.5914 16.464 24.3194 16.688 24.0954C16.928 23.8554 17.2 23.6714 17.504 23.5434C17.824 23.3994 18.16 23.3274 18.512 23.3274C18.864 23.3274 19.192 23.3994 19.496 23.5434C19.816 23.6714 20.088 23.8554 20.312 24.0954C20.552 24.3194 20.736 24.5914 20.864 24.9114C21.008 25.2154 21.08 25.5434 21.08 25.8954C21.08 26.2474 21.008 26.5834 20.864 26.9034C20.736 27.2074 20.552 27.4794 20.312 27.7194C20.088 27.9434 19.816 28.1274 19.496 28.2714C19.192 28.3994 18.864 28.4634 18.512 28.4634Z",fill:"var(--color-primary-default)"}))};var a,n=(a=e("react"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/smart-transaction-status/unknown-icon.js"}],[6967,{"../../../../shared/constants/swaps":5274,"../../../components/component-library":5806,"../../../components/component-library/banner-alert":5762,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=h;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=f(e("prop-types")),i=e("../../../contexts/i18n"),l=e("../../../components/component-library/banner-alert"),s=f(e("../../../components/ui/box")),u=e("../../../helpers/constants/design-system"),c=e("../../../components/component-library"),d=e("../../../../shared/constants/swaps"),p=e("../../../ducks/swaps/swaps");function f(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}function h({swapsErrorKey:e,showTransactionSettingsLink:t,currentSlippage:r}){const o=(0,a.useContext)(i.I18nContext),f=(0,n.useDispatch)();let m,h,b=u.SEVERITIES.DANGER;const g=a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd},a.default.createElement(c.ButtonLink,{onClick:e=>{e.preventDefault(),f((0,p.setTransactionSettingsOpened)(!0))},size:c.ButtonLinkSize.Inherit},o("swapAdjustSlippage")));switch(e){case d.SLIPPAGE_VERY_HIGH_ERROR:m=o("swapSlippageOverLimitTitle"),h=a.default.createElement(s.default,null,a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapSlippageOverLimitDescription")),g);break;case d.SLIPPAGE_HIGH_ERROR:b=u.SEVERITIES.WARNING,m=o("swapSlippageHighTitle"),h=a.default.createElement(s.default,null,a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapSlippageHighDescription",[r])),t&&g);break;case d.SLIPPAGE_LOW_ERROR:b=u.SEVERITIES.WARNING,m=o("swapSlippageLowTitle"),h=a.default.createElement(s.default,null,a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapSlippageLowDescription",[r])),t&&g);break;case d.SLIPPAGE_NEGATIVE_ERROR:m=o("swapSlippageNegativeTitle"),h=a.default.createElement(s.default,null,a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapSlippageNegativeDescription")),g);break;case d.QUOTES_NOT_AVAILABLE_ERROR:m=o("swapQuotesNotAvailableErrorTitle"),h=a.default.createElement(s.default,null,a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapQuotesNotAvailableDescription")),a.default.createElement(c.ButtonLink,{size:c.ButtonLinkSize.Inherit,textProps:{variant:u.TextVariant.bodyMd,alignItems:u.AlignItems.flexStart},as:"a",href:"https://support.metamask.io/token-swaps/user-guide-swaps/",target:"_blank",rel:"noopener noreferrer"},o("swapLearnMore")));break;case d.ERROR_FETCHING_QUOTES:m=o("swapFetchingQuotesErrorTitle"),h=a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapFetchingQuotesErrorDescription"));break;case d.CONTRACT_DATA_DISABLED_ERROR:m=o("swapContractDataDisabledErrorTitle"),h=a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapContractDataDisabledErrorDescription"));break;case d.QUOTES_EXPIRED_ERROR:m=o("swapQuotesExpiredErrorTitle"),h=a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("swapQuotesExpiredErrorDescription"));break;case d.OFFLINE_FOR_MAINTENANCE:m=o("offlineForMaintenance"),h=a.default.createElement(c.Text,{variant:u.TextVariant.bodyMd,as:"h6"},o("metamaskSwapsOfflineDescription"));break;case d.SWAP_FAILED_ERROR:m=o("swapFailedErrorTitle")}return a.default.createElement(l.BannerAlert,{severity:b,title:m,titleProps:{"data-testid":"swaps-banner-title"}},h)}h.propTypes={swapsErrorKey:o.default.string,showTransactionSettingsLink:o.default.bool,currentSlippage:o.default.number}}}},{package:"$root$",file:"ui/pages/swaps/swaps-banner-alert/swaps-banner-alert.js"}],[6968,{"./swaps-footer":6969},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./swaps-footer"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/swaps-footer/index.js"}],[6969,{"../../../components/ui/page-container/page-container-footer":6161,"../../../contexts/i18n":6211,classnames:3584,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=c;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=s(e("prop-types")),o=s(e("classnames")),i=e("../../../contexts/i18n"),l=s(e("../../../components/ui/page-container/page-container-footer"));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c({onCancel:e,hideCancel:t,onSubmit:r,submitText:n,disabled:s,showTermsOfService:u,showTopBorder:c,className:d="",cancelText:p}){const f=(0,a.useContext)(i.I18nContext);return a.default.createElement("div",{className:"swaps-footer"},a.default.createElement("div",{className:(0,o.default)("swaps-footer__buttons",d,{"swaps-footer__buttons--border":c})},a.default.createElement(l.default,{onCancel:e,hideCancel:t,cancelText:p||f("back"),onSubmit:r,submitText:n,footerClassName:(0,o.default)("swaps-footer__custom-page-container-footer-class",d),footerButtonClassName:(0,o.default)("swaps-footer__custom-page-container-footer-button-class",{"swaps-footer__custom-page-container-footer-button-class--single":t}),disabled:s})),u&&a.default.createElement("div",{className:"swaps-footer__bottom-text",onClick:()=>global.platform.openTab({url:"https://metamask.io/terms.html"})},f("termsOfService")))}c.propTypes={onCancel:n.default.func,hideCancel:n.default.bool,onSubmit:n.default.func,submitText:n.default.string,disabled:n.default.bool,showTermsOfService:n.default.bool,showTopBorder:n.default.bool,className:n.default.string,cancelText:n.default.string}}}},{package:"$root$",file:"ui/pages/swaps/swaps-footer/swaps-footer.js"}],[6971,{"../../../../shared/constants/swaps":5274,"../../../components/component-library":5806,"../../../components/component-library/modal-content/deprecated":5816,"../../../components/component-library/modal-header/deprecated":5825,"../../../components/ui/box":6079,"../../../components/ui/button":6083,"../../../components/ui/button-group":6081,"../../../components/ui/info-tooltip":6134,"../../../components/ui/typography":6201,"../../../contexts/i18n":6211,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"../../../store/actions":7e3,classnames:3584,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=E;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=x(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=e("react-redux"),o=w(e("prop-types")),i=w(e("classnames")),l=e("../../../contexts/i18n"),s=w(e("../../../components/ui/button-group")),u=w(e("../../../components/ui/button")),c=w(e("../../../components/ui/info-tooltip")),d=w(e("../../../components/ui/box")),p=w(e("../../../components/ui/typography")),f=e("../../../helpers/constants/design-system"),m=e("../../../../shared/constants/swaps"),h=e("../../../components/component-library"),b=e("../../../components/component-library/modal-content/deprecated"),g=e("../../../components/component-library/modal-header/deprecated"),y=e("../../../store/actions"),v=e("../../../ducks/swaps/swaps");function w(e){return e&&e.__esModule?e:{default:e}}function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(x=function(e){return e?r:t})(e)}function E({onSelect:e,onModalClose:t,maxAllowedSlippage:r,currentSlippage:o,isDirectWrappingEnabled:w}){const x=(0,a.useContext)(l.I18nContext),E=(0,n.useDispatch)(),_=(0,n.useSelector)(v.getSwapsErrorKey),[C,T]=(0,a.useState)((()=>"number"!=typeof o||Object.values(m.Slippage).includes(o)?"":o.toString())),[k,S]=(0,a.useState)(!1),[R,P]=(0,a.useState)((()=>o===m.Slippage.high?1:o===m.Slippage.default?0:"number"==typeof o?2:0)),[M,O]=(0,a.useState)(null),[D,j]=(0,a.useState)(o),I=D!==o;let A="",q="",N=f.SEVERITIES.INFO;C&&(Number(C)<0?(N=f.SEVERITIES.DANGER,A=x("swapSlippageNegativeDescription"),q=x("swapSlippageNegativeTitle"),E((0,y.setSwapsErrorKey)(m.SLIPPAGE_NEGATIVE_ERROR))):Number(C)>0&&Number(C)<=1?(N=f.SEVERITIES.WARNING,A=x("swapSlippageLowDescription",[D]),q=x("swapSlippageLowTitle")):Number(C)>=5&&Number(C)<=r?(N=f.SEVERITIES.WARNING,A=x("swapSlippageHighDescription",[D]),q=x("swapSlippageHighTitle")):Number(C)>r?(N=f.SEVERITIES.DANGER,A=x("swapSlippageOverLimitDescription"),q=x("swapSlippageOverLimitTitle"),E((0,y.setSwapsErrorKey)(m.SLIPPAGE_VERY_HIGH_ERROR))):0===Number(C)?(N=f.SEVERITIES.INFO,A=x("swapSlippageZeroDescription"),q=x("swapSlippageZeroTitle")):_&&E((0,y.setSwapsErrorKey)("")));const L=N===f.SEVERITIES.DANGER,F=C||x("swapCustom");return(0,a.useEffect)((()=>{M&&k&&window.document.activeElement!==M&&M.focus()}),[M,k]),(0,a.useEffect)((()=>{2!==R&&E((0,y.setSwapsErrorKey)(""))}),[E,R]),a.default.createElement(h.Modal,{onClose:t,isOpen:!0,isClosedOnOutsideClick:!1,isClosedOnEscapeKey:!0,className:"mm-modal__custom-scrollbar"},a.default.createElement(h.ModalOverlay,null),a.default.createElement(b.ModalContent,null,a.default.createElement(g.ModalHeader,{onClose:t},x("transactionSettings")),a.default.createElement(d.default,{display:f.DISPLAY.FLEX,flexDirection:f.FlexDirection.Column,justifyContent:f.JustifyContent.spaceBetween,alignItems:f.AlignItems.stretch,className:"transaction-settings__content"},a.default.createElement(d.default,{marginTop:7,marginBottom:5},a.default.createElement(a.default.Fragment,null,!w&&a.default.createElement(a.default.Fragment,null,a.default.createElement(d.default,{display:f.DISPLAY.FLEX,alignItems:f.AlignItems.center},a.default.createElement(p.default,{variant:f.TypographyVariant.H6,boxProps:{paddingRight:2}},x("swapsMaxSlippage")),a.default.createElement(c.default,{position:"top",iconFillColor:"var(--color-icon-muted)",contentText:x("swapSlippageTooltip")})),a.default.createElement(d.default,{display:f.DISPLAY.FLEX},a.default.createElement(s.default,{defaultActiveButtonIndex:2!==R||C?R:1,variant:"radiogroup",newActiveButtonIndex:R,className:(0,i.default)("button-group","transaction-settings__button-group")},a.default.createElement(u.default,{onClick:()=>{T(""),S(!1),P(0),j(m.Slippage.default)}},x("swapSlippagePercent",[m.Slippage.default])),a.default.createElement(u.default,{onClick:()=>{T(""),S(!1),P(1),j(m.Slippage.high)}},x("swapSlippagePercent",[m.Slippage.high])),a.default.createElement(u.default,{className:(0,i.default)("transaction-settings__button-group-custom-button",{"radio-button--danger":L}),onClick:()=>{P(2),S(!0)}},k?a.default.createElement("div",{className:(0,i.default)("transaction-settings__custom-input",{"transaction-settings__custom-input--danger":L})},a.default.createElement("input",{"data-testid":"transaction-settings-custom-slippage",onChange:e=>{const{value:t}=e.target;!isNaN(Number(t))&&(T(t),j(Number(t)))},type:"text",maxLength:"4",ref:O,onBlur:()=>{S(!1)},onKeyDown:e=>{"Enter"===e.key&&S(!1)},value:C||""})):F,(C||k)&&a.default.createElement("div",{className:"transaction-settings__percentage-suffix"},"%")))))),A&&a.default.createElement(d.default,{marginTop:5},a.default.createElement(h.BannerAlert,{severity:N,title:q,titleProps:{"data-testid":"swaps-banner-title"}},a.default.createElement(p.default,{variant:f.TypographyVariant.H6,testId:"mm-banner-alert-notification-text"},A)))),a.default.createElement(d.default,{marginTop:5},a.default.createElement(h.ButtonPrimary,{onClick:()=>{D!==o&&e(D),t()},block:!0,disabled:!I,"data-testid":"update-transaction-settings-button"},x("update"))))))}E.propTypes={onSelect:o.default.func.isRequired,onModalClose:o.default.func.isRequired,maxAllowedSlippage:o.default.number.isRequired,currentSlippage:o.default.number,isDirectWrappingEnabled:o.default.bool}}}},{package:"$root$",file:"ui/pages/swaps/transaction-settings/transaction-settings.js"}],[6972,{"./view-on-block-explorer":6973},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var a,n=(a=e("./view-on-block-explorer"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/swaps/view-on-block-explorer/index.js"}],[6973,{"../../../../shared/constants/metametrics":5260,"../../../components/ui/box":6079,"../../../contexts/i18n":6211,"../../../contexts/metametrics":6214,"../../../helpers/utils/util":6297,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=p;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),n=c(e("prop-types")),o=c(e("../../../components/ui/box")),i=e("../../../contexts/i18n"),l=e("../../../helpers/utils/util"),s=e("../../../contexts/metametrics"),u=e("../../../../shared/constants/metametrics");function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function p({blockExplorerUrl:e,sensitiveTrackingProperties:t}){const r=(0,a.useContext)(i.I18nContext),n=(0,a.useContext)(s.MetaMetricsContext),c=(0,l.getURLHostName)(e);return a.default.createElement(o.default,{marginTop:6,className:"view-on-block-explorer"},a.default.createElement("button",{onClick:()=>{n({event:u.MetaMetricsEventName.ExternalLinkClicked,category:u.MetaMetricsEventCategory.Swaps,sensitiveProperties:t,properties:{link_type:u.MetaMetricsEventLinkType.TransactionBlockExplorer,location:"Swap Transaction",url_domain:c}}),global.platform.openTab({url:e})}},r("viewOnCustomBlockExplorer",[r("blockExplorerSwapAction"),c])))}p.propTypes={blockExplorerUrl:n.default.string.isRequired,sensitiveTrackingProperties:n.default.object.isRequired}}}},{package:"$root$",file:"ui/pages/swaps/view-on-block-explorer/view-on-block-explorer.js"}],[6974,{"./unlock-page.container":6976},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a,n=(a=e("./unlock-page.container"))&&a.__esModule?a:{default:a};r.default=n.default}}},{package:"$root$",file:"ui/pages/unlock-page/index.js"}],[6975,{"../../../shared/constants/metametrics":5260,"../../../shared/lib/ui-utils":5293,"../../components/component-library":5806,"../../components/ui/button":6083,"../../components/ui/mascot":6148,"../../components/ui/text-field":6189,"../../helpers/constants/design-system":6248,"../../helpers/constants/routes":6254,"../../helpers/utils/build-types":6273,"./unlock-page.util":6977,events:3868,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=e("events"),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=g(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}(e("react")),o=b(e("prop-types")),i=e("../../components/component-library"),l=e("../../helpers/constants/design-system"),s=b(e("../../components/ui/button")),u=b(e("../../components/ui/text-field")),c=b(e("../../components/ui/mascot")),d=e("../../helpers/constants/routes"),p=e("../../../shared/constants/metametrics"),f=e("../../../shared/lib/ui-utils"),m=e("../../helpers/utils/build-types"),h=e("./unlock-page.util");function b(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(g=function(e){return e?r:t})(e)}function y(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 a=r.call(e,t||"default");if("object"!=typeof a)return a;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}class v extends n.Component{constructor(...e){super(...e),y(this,"state",{password:"",error:null}),y(this,"submitting",!1),y(this,"failed_attempts",0),y(this,"animationEventEmitter",new a.EventEmitter),y(this,"handleSubmit",(async e=>{e.preventDefault(),e.stopPropagation();const{password:t}=this.state,{onSubmit:r,forceUpdateMetamaskState:a}=this.props;if(""!==t&&!this.submitting){this.setState({error:null}),this.submitting=!0;try{await r(t),this.context.trackEvent({category:p.MetaMetricsEventCategory.Navigation,event:p.MetaMetricsEventName.AppUnlocked,properties:{failed_attempts:this.failed_attempts}},{isNewVisit:!0})}catch({message:e}){this.failed_attempts+=1,"Incorrect password"===e&&(await a(),this.context.trackEvent({category:p.MetaMetricsEventCategory.Navigation,event:p.MetaMetricsEventName.AppUnlockedFailed,properties:{reason:"incorrect_password",failed_attempts:this.failed_attempts}})),this.setState({error:e}),this.submitting=!1}}}))}UNSAFE_componentWillMount(){const{isUnlocked:e,history:t}=this.props;e&&t.push(d.DEFAULT_ROUTE)}handleInputChange({target:e}){if(this.setState({password:e.value,error:null}),e.getBoundingClientRect){const t=e,r=t.getBoundingClientRect(),a=(0,h.getCaretCoordinates)(t,t.selectionEnd);this.animationEventEmitter.emit("point",{x:r.left+a.left-t.scrollLeft,y:r.top+a.top-t.scrollTop})}}renderSubmitButton(){return n.default.createElement(s.default,{type:"submit","data-testid":"unlock-submit",style:{backgroundColor:"var(--color-primary-default)",color:"var(--color-primary-inverse)",marginTop:"20px",height:"60px",fontWeight:"400",boxShadow:"none",borderRadius:"100px"},disabled:!this.state.password,variant:"contained",size:"large",onClick:this.handleSubmit},this.context.t("unlock"))}render(){const{password:e,error:t}=this.state,{t:r}=this.context,{onRestore:a}=this.props;let o=r("appNameMmi");return o=r("needHelpLinkText"),n.default.createElement("div",{className:"unlock-page__container"},n.default.createElement("div",{className:"unlock-page","data-testid":"unlock-page"},n.default.createElement("div",{className:"unlock-page__mascot-container"},n.default.createElement(c.default,{animationEventEmitter:this.animationEventEmitter,width:"120",height:"120"}),(0,m.isBeta)()?n.default.createElement("div",{className:"unlock-page__mascot-container__beta"},r("beta")):null),n.default.createElement(i.Text,{"data-testid":"unlock-page-title",as:"h1",variant:l.TextVariant.headingLg,marginTop:1,color:l.TextColor.textAlternative},r("welcomeBack")),n.default.createElement("div",null,r("unlockMessage")),n.default.createElement("form",{className:"unlock-page__form",onSubmit:this.handleSubmit},n.default.createElement(u.default,{id:"password","data-testid":"unlock-password",label:r("password"),type:"password",value:e,onChange:e=>this.handleInputChange(e),error:t,autoFocus:!0,autoComplete:"current-password",theme:"material",fullWidth:!0})),this.renderSubmitButton(),n.default.createElement("div",{className:"unlock-page__links"},n.default.createElement(s.default,{type:"link",key:"import-account",className:"unlock-page__link",onClick:()=>a()},r("forgotPassword"))),n.default.createElement("div",{className:"unlock-page__support"},r("needHelp",[n.default.createElement("a",{href:f.SUPPORT_LINK,target:"_blank",rel:"noopener noreferrer",key:"need-help-link",onClick:()=>{this.context.trackEvent({category:p.MetaMetricsEventCategory.Navigation,event:p.MetaMetricsEventName.SupportLinkClicked,properties:{url:f.SUPPORT_LINK}},{contextPropsIntoEventProperties:[p.MetaMetricsContextProp.PageTitle]})}},o)]))))}}r.default=v,y(v,"contextTypes",{trackEvent:o.default.func,t:o.default.func}),y(v,"propTypes",{history:o.default.object.isRequired,isUnlocked:o.default.bool,onRestore:o.default.func,onSubmit:o.default.func,forceUpdateMetamaskState:o.default.func})}}},{package:"$root$",file:"ui/pages/unlock-page/unlock-page.component.js"}],[6976,{"../../../app/scripts/lib/util":135,"../../../shared/constants/app":5248,"../../helpers/constants/routes":6254,"../../store/actions":7e3,"./unlock-page.component":6975,"react-redux":4734,"react-router-dom":4761,redux:4794},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a,n=e("react-redux"),o=e("react-router-dom"),i=e("redux"),l=e("../../../app/scripts/lib/util"),s=e("../../../shared/constants/app"),u=e("../../helpers/constants/routes"),c=e("../../store/actions"),d=(a=e("./unlock-page.component"))&&a.__esModule?a:{default:a};r.default=(0,i.compose)(o.withRouter,(0,n.connect)((e=>{const{metamask:{isUnlocked:t}}=e;return{isUnlocked:t}}),(e=>({tryUnlockMetamask:t=>e((0,c.tryUnlockMetamask)(t)),markPasswordForgotten:()=>e((0,c.markPasswordForgotten)()),forceUpdateMetamaskState:()=>(0,c.forceUpdateMetamaskState)(e)})),((e,t,r)=>{const{markPasswordForgotten:a,tryUnlockMetamask:n,...o}=t,{history:i,onSubmit:c,...d}=r;return{...e,...o,...d,onRestore:async()=>{await a(),i.push(u.RESTORE_VAULT_ROUTE),(0,l.getEnvironmentType)()!==s.ENVIRONMENT_TYPE_POPUP&&(0,l.getEnvironmentType)()!==s.ENVIRONMENT_TYPE_NOTIFICATION||global.platform.openExtensionInBrowser(u.RESTORE_VAULT_ROUTE)},onSubmit:c||(async e=>{await n(e),i.push(u.DEFAULT_ROUTE)}),history:i}})))(d.default)}}},{package:"$root$",file:"ui/pages/unlock-page/unlock-page.container.js"}],[6977,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getCaretCoordinates=function(e,t){const r=document.createElement("div");r.id="password-mirror-div",document.body.appendChild(r);const a=window.getComputedStyle(e);r.textContent=new Array(t+1).join("•");const n=document.createElement("span");n.textContent="•",r.appendChild(n);const o={top:n.offsetTop+parseInt(a.borderTopWidth,10),left:n.offsetLeft+parseInt(a.borderLeftWidth,10)};return document.body.removeChild(r),o}}}},{package:"$root$",file:"ui/pages/unlock-page/unlock-page.util.js"}],[6978,{reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getIsUsingPaymaster=function(e){var t;const r=i(e);if(!r)return!1;const a=null===(t=r.userOperation)||void 0===t?void 0:t.paymasterAndData;return Boolean(null==a?void 0:a.length)&&"0x"!==a},r.getUserOperation=i,r.getUserOperations=n,r.selectUserOperationMetadata=r.selectPaymasterData=r.selectPaymasterAddress=void 0;var a=e("reselect");function n(e){return e.metamask.userOperations||{}}const o=r.selectUserOperationMetadata=(0,a.createSelector)(n,((e,t)=>t),((e,t)=>e[t]));function i(e){var t;const r=null===(t=e.confirmTransaction)||void 0===t?void 0:t.txData;if(!r)return undefined;const{id:a,isUserOperation:o}=r;if(!o)return undefined;return n(e)[a]}const l=r.selectPaymasterData=(0,a.createSelector)(o,(e=>{var t;const r=null==e||null===(t=e.userOperation)||void 0===t?void 0:t.paymasterAndData;return"0x"===r?undefined:r}));r.selectPaymasterAddress=(0,a.createSelector)(l,(e=>null==e?void 0:e.slice(0,42)))}}},{package:"$root$",file:"ui/selectors/account-abstraction.ts"}],[6980,{reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectAlerts=n,r.selectConfirmedAlertKeys=function(e,t){const{confirmed:r}=e.confirmAlerts,a=r[t]||{};return Object.keys(a).filter((e=>a[e]))},r.selectGeneralAlerts=r.selectFieldAlerts=void 0;var a=e("reselect");function n(e,t){return e.confirmAlerts.alerts[t]??[]}r.selectGeneralAlerts=(0,a.createSelector)(((e,t)=>n(e,t)),(e=>e.filter((e=>!e.field)))),r.selectFieldAlerts=(0,a.createSelector)(((e,t)=>n(e,t)),(e=>e.filter((e=>e.field))))}}},{package:"$root$",file:"ui/selectors/alerts.ts"}],[6986,{reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectSessionData=r.selectParticipateInMetaMetrics=r.selectIsSignedIn=void 0;var a=e("reselect");const n=e=>e.metamask;r.selectIsSignedIn=(0,a.createSelector)([n],(e=>e.isSignedIn)),r.selectParticipateInMetaMetrics=(0,a.createSelector)([n],(e=>e.participateInMetaMetrics)),r.selectSessionData=(0,a.createSelector)([n],(e=>e.sessionData))}}},{package:"$root$",file:"ui/selectors/metamask-notifications/authentication.ts"}],[6987,{"../../../shared/modules/selectors/util":5322,"@metamask/notification-services-controller":2115,reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectIsMetamaskNotificationsFeatureSeen=r.selectIsMetamaskNotificationsEnabled=r.selectIsFeatureAnnouncementsEnabled=r.isFetchingMetamaskNotifications=r.getSnapNotificationsUnreadCount=r.getSnapNotificationsReadCount=r.getOnChainMetamaskNotificationsUnreadCount=r.getOnChainMetamaskNotificationsReadCount=r.getMetamaskNotificationsUnreadCount=r.getMetamaskNotificationsReadList=r.getMetamaskNotifications=r.getMetamaskNotificationById=r.getIsUpdatingMetamaskNotificationsAccount=r.getIsUpdatingMetamaskNotifications=r.getIsCheckingAccountsPresence=r.getFeatureAnnouncementsUnreadCount=r.getFeatureAnnouncementsReadCount=void 0;var a=e("reselect"),n=e("@metamask/notification-services-controller"),o=e("../../../shared/modules/selectors/util");const{TRIGGER_TYPES:i}=n.NotificationServicesController.Constants,l=e=>e.metamask,s=r.getMetamaskNotifications=(0,a.createSelector)([l],(e=>e.metamaskNotificationsList));r.getMetamaskNotificationById=e=>(0,o.createDeepEqualSelector)([s],(t=>t.find((t=>t.id===e))));r.getMetamaskNotificationsReadList=(0,a.createSelector)([l],(e=>e.metamaskNotificationsReadList)),r.getMetamaskNotificationsUnreadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>!e.isRead)).length:0)),r.getFeatureAnnouncementsUnreadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>!e.isRead&&e.type===i.FEATURES_ANNOUNCEMENT)).length:0)),r.getFeatureAnnouncementsReadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>e.isRead&&e.type===i.FEATURES_ANNOUNCEMENT)).length:0)),r.getSnapNotificationsUnreadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>!e.isRead&&e.type===i.SNAP)).length:0)),r.getSnapNotificationsReadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>e.isRead&&e.type===i.SNAP)).length:0)),r.getOnChainMetamaskNotificationsUnreadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>!e.isRead&&e.type!==i.FEATURES_ANNOUNCEMENT&&e.type!==i.SNAP)).length:0)),r.getOnChainMetamaskNotificationsReadCount=(0,a.createSelector)([s],(e=>e?e.filter((e=>e.isRead&&e.type!==i.FEATURES_ANNOUNCEMENT&&e.type!==i.SNAP)).length:0)),r.selectIsMetamaskNotificationsFeatureSeen=(0,a.createSelector)([l],(e=>e.isMetamaskNotificationsFeatureSeen)),r.selectIsMetamaskNotificationsEnabled=(0,a.createSelector)([l],(e=>e.isNotificationServicesEnabled)),r.selectIsFeatureAnnouncementsEnabled=(0,a.createSelector)([l],(e=>e.isFeatureAnnouncementsEnabled)),r.getIsUpdatingMetamaskNotifications=(0,a.createSelector)([l],(e=>e.isUpdatingMetamaskNotifications)),r.isFetchingMetamaskNotifications=(0,a.createSelector)([l],(e=>e.isFetchingMetamaskNotifications)),r.getIsUpdatingMetamaskNotificationsAccount=(0,a.createSelector)([l],(e=>e.isUpdatingMetamaskNotificationsAccount)),r.getIsCheckingAccountsPresence=(0,a.createSelector)([l],(e=>e.isCheckingAccountsPresence))}}},{package:"$root$",file:"ui/selectors/metamask-notifications/metamask-notifications.ts"}],[6988,{reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectIsProfileSyncingUpdateLoading=r.selectIsProfileSyncingEnabled=r.selectIsAccountSyncingReadyToBeDispatched=void 0;var a=e("reselect");const n=e=>e.metamask;r.selectIsProfileSyncingEnabled=(0,a.createSelector)([n],(e=>e.isProfileSyncingEnabled)),r.selectIsProfileSyncingUpdateLoading=(0,a.createSelector)([n],(e=>e.isProfileSyncingUpdateLoading)),r.selectIsAccountSyncingReadyToBeDispatched=(0,a.createSelector)([n],(e=>e.isAccountSyncingReadyToBeDispatched))}}},{package:"$root$",file:"ui/selectors/metamask-notifications/profile-syncing.ts"}],[6991,{"./selectors":6993,reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectAllNftsFlat=r.getNftContractsByAddressOnCurrentChain=r.getNftContractsByAddressByChain=void 0;var a=e("reselect"),n=e("./selectors");const o=r.getNftContractsByAddressByChain=(0,a.createSelector)((function(e){return e.metamask.allNftContracts??{}}),(e=>Object.keys(e).map((t=>Object.keys(e[t]).map((r=>e[t][r].map((e=>({...e,chainId:r}))))))).flat().flat().reduce(((e,t)=>{const{chainId:r,...a}=t,n=e[r]??{};return e[r]=n,n[a.address.toLowerCase()]=a,e}),{})));r.getNftContractsByAddressOnCurrentChain=(0,a.createSelector)((e=>(0,n.getMemoizedCurrentChainId)(e)),o,((e,t)=>t[e]??{})),r.selectAllNftsFlat=(0,a.createSelector)((function(e){return e.metamask.allNfts??{}}),(e=>Object.values(e).reduce(((e,t)=>{const r=Object.values(t);return e.concat(...r)}),[])))}}},{package:"$root$",file:"ui/selectors/nft.ts"}],[6994,{"../../shared/modules/selectors/util":5322,"./transactions":6998,reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectUnapprovedMessages=r.selectUnapprovedMessage=void 0;var a=e("reselect"),n=e("../../shared/modules/selectors/util"),o=e("./transactions");const i=r.selectUnapprovedMessages=(0,a.createSelector)(o.unapprovedPersonalMsgsSelector,o.unapprovedTypedMessagesSelector,((e,t)=>({...e,...t}))),l=(0,a.createSelector)(i,((e,t)=>t),((e,t)=>e[t]));r.selectUnapprovedMessage=(0,n.createDeepEqualSelector)(l,(e=>e))}}},{package:"$root$",file:"ui/selectors/signatures.ts"}],[6995,{"../../../shared/modules/selectors/util":5322,"../accounts":6979,"../selectors":6993,reselect:4801},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getMemoizedAccountName=r.getAccountNameFromState=void 0;var a=e("reselect"),n=e("../selectors"),o=e("../accounts"),i=e("../../../shared/modules/selectors/util");const l=r.getAccountNameFromState=(0,a.createSelector)([o.getInternalAccounts,(e,t)=>t],n.getAccountName);r.getMemoizedAccountName=(0,i.createDeepEqualSelector)([l],(e=>e))}}},{package:"$root$",file:"ui/selectors/snaps/accounts.ts"}],[6996,{"../../../shared/modules/selectors/util":5322,"../../../shared/modules/string-utils":5324},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getMemoizedFullAddressBook=r.getFullAddressBook=r.getAddressBookEntryByNetwork=r.getAddressBookByNetwork=void 0;var a=e("../../../shared/modules/selectors/util"),n=e("../../../shared/modules/string-utils");const o=e=>e.metamask.addressBook;r.getFullAddressBook=o;const i=r.getMemoizedFullAddressBook=(0,a.createDeepEqualSelector)([o],(e=>e)),l=r.getAddressBookByNetwork=(0,a.createDeepEqualSelector)([i,(e,t)=>t],((e,t)=>e[t]?Object.values(e[t]):[]));r.getAddressBookEntryByNetwork=(0,a.createDeepEqualSelector)([(e,t,r)=>l(e,r),(e,t)=>t],((e,t)=>e.find((e=>(0,n.isEqualCaseInsensitive)(e.address,t)))))}}},{package:"$root$",file:"ui/selectors/snaps/address-book.ts"}],[6997,{"./accounts":6995,"./address-book":6996},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var a=e("./address-book");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var n=e("./accounts");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}))}}},{package:"$root$",file:"ui/selectors/snaps/index.ts"}],[7002,{"../ducks":6234,"@reduxjs/toolkit":2825,"remote-redux-devtools":3556},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){const t=Boolean(!1),r=[];t&&r.push((0,n.default)({name:"MetaMask",hostname:"localhost",port:8e3,realtime:!0}));return(0,a.configureStore)({reducer:o.default,middleware:e=>e({serializableCheck:!1,immutableCheck:!1}),devTools:!1,enhancers:r,preloadedState:e})};var a=e("@reduxjs/toolkit"),n=i(e("remote-redux-devtools")),o=i(e("../ducks"));function i(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/store/store.ts"}],[84,{"../../../shared/lib/transactions-controller-utils":5292,"../../../shared/modules/random-id":5314,"@metamask/rpc-errors":2304,"@metamask/safe-event-emitter":2306},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=e("@metamask/rpc-errors"),n=l(e("@metamask/safe-event-emitter")),o=l(e("../../../shared/modules/random-id")),i=e("../../../shared/lib/transactions-controller-utils");function l(e){return e&&e.__esModule?e:{default:e}}class s extends Error{}class u{constructor(e){this.connectionStream=e,this.notificationChannel=new n.default,this.uncaughtErrorChannel=new n.default,this.requests=new Map,this.connectionStream.on("data",this.handleResponse.bind(this)),this.connectionStream.on("end",this.close.bind(this)),this.responseHandled={},this.DisconnectError=s}send(e,t,r){this.requests.set(e,r),this.connectionStream.write(t),this.responseHandled[e]=!1,"getState"===t.method&&setTimeout((()=>!this.responseHandled[e]&&r?(delete this.responseHandled[e],r(new Error("No response from RPC"),null)):(delete this.responseHandled[e],!0)),i.TEN_SECONDS_IN_MILLISECONDS)}onNotification(e){this.notificationChannel.addListener("notification",(t=>{e(t)}))}onUncaughtError(e){this.uncaughtErrorChannel.addListener("error",(t=>{e(t)}))}close(){this.notificationChannel.removeAllListeners(),this.uncaughtErrorChannel.removeAllListeners();for(const[e,t]of this.requests)this.responseHandled[e]||(this.responseHandled[e]=!0,t(new s("disconnected")))}handleResponse(e){const{id:t,result:r,error:n,method:o,params:i}=e,l=t===undefined&&n===undefined,s=this.requests.get(t);if(this.responseHandled[t]=!0,!o||!i||l)if(o&&i&&l)this.notificationChannel.emit("notification",e);else{if(n){const e=new a.JsonRpcError(n.code,n.message,n.data);return e.stack=n.stack,s?(this.requests.delete(t),void s(e)):void this.uncaughtErrorChannel.emit("error",e)}s&&(this.requests.delete(t),s(null,r))}}}r.default=e=>{const t=new u(e);return new Proxy(t,{get:(e,t)=>e[t]?e[t]:(...r)=>{const a=r[r.length-1],n=r.slice(0,-1),i=(0,o.default)(),l={jsonrpc:"2.0",method:t,params:n,id:i};e.send(i,l,a)}})}}}},{package:"$root$",file:"app/scripts/lib/metaRPCClientFactory.js"}],[882,{"../Collapse":937,"../Paper":1051,"../styles/withStyles":1211,"../utils/useControlled":1234,"./AccordionContext":883,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/slicedToArray":323,"@babel/runtime/helpers/toArray":324,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776,"react-is":4629},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/toArray")),l=n(e("@babel/runtime/helpers/slicedToArray")),s=n(e("@babel/runtime/helpers/objectWithoutProperties")),u=a(e("react")),c=(e("react-is"),n(e("prop-types")),n(e("clsx"))),d=(e("@material-ui/utils"),n(e("../Collapse"))),p=n(e("../Paper")),f=n(e("../styles/withStyles")),m=n(e("./AccordionContext")),h=n(e("../utils/useControlled")),b=function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}};r.styles=b;var g=u.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,f=e.defaultExpanded,b=void 0!==f&&f,g=e.disabled,y=void 0!==g&&g,v=e.expanded,w=e.onChange,x=e.square,E=void 0!==x&&x,_=e.TransitionComponent,C=void 0===_?d.default:_,T=e.TransitionProps,k=(0,s.default)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),S=(0,h.default)({controlled:v,default:b,name:"Accordion",state:"expanded"}),R=(0,l.default)(S,2),P=R[0],M=R[1],O=u.useCallback((function(e){M(!P),w&&w(e,!P)}),[P,w,M]),D=u.Children.toArray(r),j=(0,i.default)(D),I=j[0],A=j.slice(1),q=u.useMemo((function(){return{expanded:P,disabled:y,toggle:O}}),[P,y,O]);return u.createElement(p.default,(0,o.default)({className:(0,c.default)(a.root,n,P&&a.expanded,y&&a.disabled,!E&&a.rounded),ref:t,square:E},k),u.createElement(m.default.Provider,{value:q},I),u.createElement(C,(0,o.default)({in:P,timeout:"auto"},T),u.createElement("div",{"aria-labelledby":I.props.id,id:I.props["aria-controls"],role:"region"},A)))})),y=(0,f.default)(b,{name:"MuiAccordion"})(g);r.default=y}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Accordion/Accordion.js"}],[883,{"@babel/runtime/helpers/interopRequireWildcard":312,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=a(e("react")).createContext({});var o=n;r.default=o}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Accordion/AccordionContext.js"}],[884,{"./Accordion":882,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Accordion"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Accordion/index.js"}],[885,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},spacing:{"& > :not(:first-child)":{marginLeft:8}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.disableSpacing,u=void 0!==n&&n,c=(0,i.default)(e,["classes","className","disableSpacing"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(r.root,a,!u&&r.spacing),ref:t},c))})),p=(0,u.default)(c,{name:"MuiAccordionActions"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AccordionActions/AccordionActions.js"}],[886,{"./AccordionActions":885,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./AccordionActions"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AccordionActions/index.js"}],[887,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=(0,i.default)(e,["classes","className"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(r.root,a),ref:t},n))})),p=(0,u.default)(c,{name:"MuiAccordionDetails"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AccordionDetails/AccordionDetails.js"}],[888,{"./AccordionDetails":887,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./AccordionDetails"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AccordionDetails/index.js"}],[889,{"../Accordion/AccordionContext":883,"../ButtonBase":913,"../IconButton":1001,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../ButtonBase")),c=n(e("../IconButton")),d=n(e("../styles/withStyles")),p=n(e("../Accordion/AccordionContext")),f=function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:e.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.action.focus},"&$disabled":{opacity:e.palette.action.disabledOpacity}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}};r.styles=f;var m=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,d=e.expandIcon,f=e.IconButtonProps,m=e.onBlur,h=e.onClick,b=e.onFocusVisible,g=(0,i.default)(e,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),y=l.useState(!1),v=y[0],w=y[1],x=l.useContext(p.default),E=x.disabled,_=void 0!==E&&E,C=x.expanded,T=x.toggle;return l.createElement(u.default,(0,o.default)({focusRipple:!1,disableRipple:!0,disabled:_,component:"div","aria-expanded":C,className:(0,s.default)(a.root,n,_&&a.disabled,C&&a.expanded,v&&a.focused),onFocusVisible:function(e){w(!0),b&&b(e)},onBlur:function(e){w(!1),m&&m(e)},onClick:function(e){T&&T(e),h&&h(e)},ref:t},g),l.createElement("div",{className:(0,s.default)(a.content,C&&a.expanded)},r),d&&l.createElement(c.default,(0,o.default)({className:(0,s.default)(a.expandIcon,C&&a.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},f),d))})),h=(0,d.default)(f,{name:"MuiAccordionSummary"})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AccordionSummary/AccordionSummary.js"}],[890,{"./AccordionSummary":889,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./AccordionSummary"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AccordionSummary/index.js"}],[891,{"../Paper":1051,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../utils/capitalize")),d=n(e("../Paper")),p=function(e){var t="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:t,color:e.palette.getContrastText(t)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}};r.styles=p;var f=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.color,u=void 0===n?"primary":n,p=e.position,f=void 0===p?"fixed":p,m=(0,i.default)(e,["classes","className","color","position"]);return l.createElement(d.default,(0,o.default)({square:!0,component:"header",elevation:4,className:(0,s.default)(r.root,r["position".concat((0,c.default)(f))],r["color".concat((0,c.default)(u))],a,"fixed"===f&&"mui-fixed"),ref:t},m))})),m=(0,u.default)(p,{name:"MuiAppBar"})(f);r.default=m}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AppBar/AppBar.js"}],[892,{"./AppBar":891,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./AppBar"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/AppBar/index.js"}],[893,{"../internal/svg-icons/Person":1177,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../internal/svg-icons/Person")),d=function(e){return{root:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},colorDefault:{color:e.palette.background.default,backgroundColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},circle:{},rounded:{borderRadius:e.shape.borderRadius},square:{borderRadius:0},img:{width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4},fallback:{width:"75%",height:"75%"}}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.alt,a=e.children,n=e.classes,u=e.className,d=e.component,p=void 0===d?"div":d,f=e.imgProps,m=e.sizes,h=e.src,b=e.srcSet,g=e.variant,y=void 0===g?"circle":g,v=(0,i.default)(e,["alt","children","classes","className","component","imgProps","sizes","src","srcSet","variant"]),w=null,x=function(e){var t=e.src,r=e.srcSet,a=l.useState(!1),n=a[0],o=a[1];return l.useEffect((function(){if(!t&&!r)return undefined;o(!1);var e=!0,a=new Image;return a.src=t,a.srcSet=r,a.onload=function(){e&&o("loaded")},a.onerror=function(){e&&o("error")},function(){e=!1}}),[t,r]),n}({src:h,srcSet:b}),E=h||b,_=E&&"error"!==x;return w=_?l.createElement("img",(0,o.default)({alt:r,src:h,srcSet:b,sizes:m,className:n.img},f)):null!=a?a:E&&r?r[0]:l.createElement(c.default,{className:n.fallback}),l.createElement(p,(0,o.default)({className:(0,s.default)(n.root,n.system,n[y],u,!_&&n.colorDefault),ref:t},v),w)})),f=(0,u.default)(d,{name:"MuiAvatar"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Avatar/Avatar.js"}],[894,{"./Avatar":893,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Avatar"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Avatar/index.js"}],[895,{"../Fade":968,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../Fade")),d={root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.invisible,d=void 0!==u&&u,p=e.open,f=e.transitionDuration,m=e.TransitionComponent,h=void 0===m?c.default:m,b=(0,i.default)(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return l.createElement(h,(0,o.default)({in:p,timeout:f},b),l.createElement("div",{className:(0,s.default)(a.root,n,d&&a.invisible),"aria-hidden":!0,ref:t},r))})),f=(0,u.default)(d,{name:"MuiBackdrop"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Backdrop/Backdrop.js"}],[896,{"./Backdrop":895,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Backdrop"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Backdrop/index.js"}],[897,{"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../utils/capitalize")),d=function(e){return{root:{position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0},badge:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorError:{backgroundColor:e.palette.error.main,color:e.palette.error.contrastText},dot:{borderRadius:4,height:8,minWidth:8,padding:0},anchorOriginTopRightRectangle:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightRectangle:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftRectangle:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftRectangle:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginTopRightCircle:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightCircle:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftCircle:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftCircle:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},invisible:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.anchorOrigin,a=void 0===r?{vertical:"top",horizontal:"right"}:r,n=e.badgeContent,u=e.children,d=e.classes,p=e.className,f=e.color,m=void 0===f?"default":f,h=e.component,b=void 0===h?"span":h,g=e.invisible,y=e.max,v=void 0===y?99:y,w=e.overlap,x=void 0===w?"rectangle":w,E=e.showZero,_=void 0!==E&&E,C=e.variant,T=void 0===C?"standard":C,k=(0,i.default)(e,["anchorOrigin","badgeContent","children","classes","className","color","component","invisible","max","overlap","showZero","variant"]),S=g;null==g&&(0===n&&!_||null==n&&"dot"!==T)&&(S=!0);var R="";return"dot"!==T&&(R=n>v?"".concat(v,"+"):n),l.createElement(b,(0,o.default)({className:(0,s.default)(d.root,p),ref:t},k),u,l.createElement("span",{className:(0,s.default)(d.badge,d["".concat(a.horizontal).concat((0,c.default)(a.vertical),"}")],d["anchorOrigin".concat((0,c.default)(a.vertical)).concat((0,c.default)(a.horizontal)).concat((0,c.default)(x))],"default"!==m&&d["color".concat((0,c.default)(m))],S&&d.invisible,"dot"===T&&d.dot)},R))})),f=(0,u.default)(d,{name:"MuiBadge"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Badge/Badge.js"}],[898,{"./Badge":897,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Badge"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Badge/index.js"}],[899,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776,"react-is":4629},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(e("react-is"),n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=function(e){return{root:{display:"flex",justifyContent:"center",height:56,backgroundColor:e.palette.background.paper}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.component,c=void 0===u?"div":u,d=e.onChange,p=e.showLabels,f=void 0!==p&&p,m=e.value,h=(0,i.default)(e,["children","classes","className","component","onChange","showLabels","value"]);return l.createElement(c,(0,o.default)({className:(0,s.default)(a.root,n),ref:t},h),l.Children.map(r,(function(e,t){if(!l.isValidElement(e))return null;var r=e.props.value===undefined?t:e.props.value;return l.cloneElement(e,{selected:r===m,showLabel:e.props.showLabel!==undefined?e.props.showLabel:f,value:r,onChange:d})})))})),p=(0,u.default)(c,{name:"MuiBottomNavigation"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/BottomNavigation/BottomNavigation.js"}],[900,{"./BottomNavigation":899,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./BottomNavigation"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/BottomNavigation/index.js"}],[901,{"../ButtonBase":913,"../styles/withStyles":1211,"../utils/unsupportedProp":1233,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../ButtonBase")),d=(n(e("../utils/unsupportedProp")),function(e){return{root:{transition:e.transitions.create(["color","padding-top"],{duration:e.transitions.duration.short}),padding:"6px 12px 8px",minWidth:80,maxWidth:168,color:e.palette.text.secondary,flex:"1","&$iconOnly":{paddingTop:16},"&$selected":{paddingTop:6,color:e.palette.primary.main}},selected:{},iconOnly:{},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"},label:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(12),opacity:1,transition:"font-size 0.2s, opacity 0.2s",transitionDelay:"0.1s","&$iconOnly":{opacity:0,transitionDelay:"0s"},"&$selected":{fontSize:e.typography.pxToRem(14)}}}});r.styles=d;var p=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.icon,u=e.label,d=e.onChange,p=e.onClick,f=e.selected,m=e.showLabel,h=e.value,b=(0,i.default)(e,["classes","className","icon","label","onChange","onClick","selected","showLabel","value"]);return l.createElement(c.default,(0,o.default)({ref:t,className:(0,s.default)(r.root,a,f?r.selected:!m&&r.iconOnly),focusRipple:!0,onClick:function(e){d&&d(e,h),p&&p(e)}},b),l.createElement("span",{className:r.wrapper},n,l.createElement("span",{className:(0,s.default)(r.label,f?r.selected:!m&&r.iconOnly)},u)))})),f=(0,u.default)(d,{name:"MuiBottomNavigationAction"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/BottomNavigationAction/BottomNavigationAction.js"}],[902,{"./BottomNavigationAction":901,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./BottomNavigationAction"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/BottomNavigationAction/index.js"}],[903,{"../styles/styled":1208,"@babel/runtime/helpers/interopRequireDefault":311,"@material-ui/system":1283},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styleFunction=void 0;var n=e("@material-ui/system"),o=a(e("../styles/styled")),i=(0,n.css)((0,n.compose)(n.borders,n.display,n.flexbox,n.grid,n.positions,n.palette,n.shadows,n.sizing,n.spacing,n.typography));r.styleFunction=i;var l=(0,o.default)("div")(i,{name:"MuiBox"});r.default=l}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Box/Box.js"}],[904,{"./Box":903,"@babel/runtime/helpers/interopRequireWildcard":312},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"styleFunction",{enumerable:!0,get:function(){return n.styleFunction}});var n=a(e("./Box"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Box/index.js"}],[905,{"../ButtonBase":913,"../internal/svg-icons/MoreHoriz":1176,"../styles/colorManipulator":1192,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("../styles/withStyles"))),u=e("../styles/colorManipulator"),c=n(e("../internal/svg-icons/MoreHoriz")),d=n(e("../ButtonBase"));function p(e){var t=e.classes,r=(0,i.default)(e,["classes"]);return l.createElement(d.default,(0,o.default)({component:"li",className:t.root,focusRipple:!0},r),l.createElement(c.default,{className:t.icon}))}var f=(0,s.default)((function(e){return{root:{display:"flex",marginLeft:e.spacing(.5),marginRight:e.spacing(.5),backgroundColor:e.palette.grey[100],color:e.palette.grey[700],borderRadius:2,cursor:"pointer","&:hover, &:focus":{backgroundColor:e.palette.grey[200]},"&:active":{boxShadow:e.shadows[0],backgroundColor:(0,u.emphasize)(e.palette.grey[200],.12)}},icon:{width:24,height:16}}}),{name:"PrivateBreadcrumbCollapsed"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Breadcrumbs/BreadcrumbCollapsed.js"}],[906,{"../Typography":1138,"../styles/withStyles":1211,"./BreadcrumbCollapsed":905,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/toConsumableArray":325,clsx:3586,"prop-types":4528,react:4776,"react-is":4629},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/toConsumableArray")),l=n(e("@babel/runtime/helpers/objectWithoutProperties")),s=a(e("react")),u=(e("react-is"),n(e("prop-types")),n(e("clsx"))),c=n(e("../styles/withStyles")),d=n(e("../Typography")),p=n(e("./BreadcrumbCollapsed")),f={root:{},ol:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"},li:{},separator:{display:"flex",userSelect:"none",marginLeft:8,marginRight:8}};r.styles=f;var m=s.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,c=e.component,f=void 0===c?"nav":c,m=e.expandText,h=void 0===m?"Show path":m,b=e.itemsAfterCollapse,g=void 0===b?1:b,y=e.itemsBeforeCollapse,v=void 0===y?1:y,w=e.maxItems,x=void 0===w?8:w,E=e.separator,_=void 0===E?"/":E,C=(0,l.default)(e,["children","classes","className","component","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),T=s.useState(!1),k=T[0],S=T[1],R=s.Children.toArray(r).filter((function(e){return s.isValidElement(e)})).map((function(e,t){return s.createElement("li",{className:a.li,key:"child-".concat(t)},e)}));return s.createElement(d.default,(0,o.default)({ref:t,component:f,color:"textSecondary",className:(0,u.default)(a.root,n)},C),s.createElement("ol",{className:a.ol},function(e,t,r){return e.reduce((function(a,n,o){return o=e.length?e:[].concat((0,i.default)(e.slice(0,v)),[s.createElement(p.default,{"aria-label":h,key:"ellipsis",onClick:function(e){S(!0);var t=e.currentTarget.parentNode.querySelector("a[href],button,[tabindex]");t&&t.focus()}})],(0,i.default)(e.slice(e.length-g,e.length)))}(R),a.separator,_)))})),h=(0,c.default)(f,{name:"MuiBreadcrumbs"})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Breadcrumbs/Breadcrumbs.js"}],[907,{"./Breadcrumbs":906,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Breadcrumbs"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Breadcrumbs/index.js"}],[908,{"../ButtonBase":913,"../styles/colorManipulator":1192,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/objectWithoutProperties")),i=n(e("@babel/runtime/helpers/extends")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=e("../styles/colorManipulator"),d=n(e("../ButtonBase")),p=n(e("../utils/capitalize")),f=function(e){return{root:(0,i.default)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,c.fade)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,c.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,c.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat((0,c.fade)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:(0,c.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat((0,c.fade)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:(0,c.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}};r.styles=f;var m=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.color,c=void 0===u?"default":u,f=e.component,m=void 0===f?"button":f,h=e.disabled,b=void 0!==h&&h,g=e.disableElevation,y=void 0!==g&&g,v=e.disableFocusRipple,w=void 0!==v&&v,x=e.endIcon,E=e.focusVisibleClassName,_=e.fullWidth,C=void 0!==_&&_,T=e.size,k=void 0===T?"medium":T,S=e.startIcon,R=e.type,P=void 0===R?"button":R,M=e.variant,O=void 0===M?"text":M,D=(0,o.default)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),j=S&&l.createElement("span",{className:(0,s.default)(a.startIcon,a["iconSize".concat((0,p.default)(k))])},S),I=x&&l.createElement("span",{className:(0,s.default)(a.endIcon,a["iconSize".concat((0,p.default)(k))])},x);return l.createElement(d.default,(0,i.default)({className:(0,s.default)(a.root,a[O],n,"inherit"===c?a.colorInherit:"default"!==c&&a["".concat(O).concat((0,p.default)(c))],"medium"!==k&&[a["".concat(O,"Size").concat((0,p.default)(k))],a["size".concat((0,p.default)(k))]],y&&a.disableElevation,b&&a.disabled,C&&a.fullWidth),component:m,disabled:b,focusRipple:!w,focusVisibleClassName:(0,s.default)(a.focusVisible,E),ref:t,type:P},D),l.createElement("span",{className:a.label},j,r,I))})),h=(0,u.default)(f,{name:"MuiButton"})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Button/Button.js"}],[909,{"./Button":908,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Button"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Button/index.js"}],[910,{"../styles/withStyles":1211,"../utils/useEventCallback":1235,"../utils/useForkRef":1236,"../utils/useIsFocusVisible":1237,"./TouchRipple":912,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776,"react-dom":4604},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),a(e("react-dom"))),u=n(e("clsx")),c=(e("@material-ui/utils"),n(e("../utils/useForkRef"))),d=n(e("../utils/useEventCallback")),p=n(e("../styles/withStyles")),f=n(e("../utils/useIsFocusVisible")),m=n(e("./TouchRipple")),h={root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}};r.styles=h;var b=l.forwardRef((function(e,t){var r=e.action,a=e.buttonRef,n=e.centerRipple,p=void 0!==n&&n,h=e.children,b=e.classes,g=e.className,y=e.component,v=void 0===y?"button":y,w=e.disabled,x=void 0!==w&&w,E=e.disableRipple,_=void 0!==E&&E,C=e.disableTouchRipple,T=void 0!==C&&C,k=e.focusRipple,S=void 0!==k&&k,R=e.focusVisibleClassName,P=e.onBlur,M=e.onClick,O=e.onFocus,D=e.onFocusVisible,j=e.onKeyDown,I=e.onKeyUp,A=e.onMouseDown,q=e.onMouseLeave,N=e.onMouseUp,L=e.onTouchEnd,F=e.onTouchMove,W=e.onTouchStart,B=e.onDragLeave,U=e.tabIndex,$=void 0===U?0:U,z=e.TouchRippleProps,G=e.type,H=void 0===G?"button":G,V=(0,i.default)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),Q=l.useRef(null);var X=l.useRef(null),Y=l.useState(!1),Z=Y[0],K=Y[1];x&&Z&&K(!1);var J=(0,f.default)(),ee=J.isFocusVisible,te=J.onBlurVisible,re=J.ref;function ae(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:T;return(0,d.default)((function(a){return t&&t(a),!r&&X.current&&X.current[e](a),!0}))}l.useImperativeHandle(r,(function(){return{focusVisible:function(){K(!0),Q.current.focus()}}}),[]),l.useEffect((function(){Z&&S&&!_&&X.current.pulsate()}),[_,S,Z]);var ne=ae("start",A),oe=ae("stop",B),ie=ae("stop",N),le=ae("stop",(function(e){Z&&e.preventDefault(),q&&q(e)})),se=ae("start",W),ue=ae("stop",L),ce=ae("stop",F),de=ae("stop",(function(e){Z&&(te(e),K(!1)),P&&P(e)}),!1),pe=(0,d.default)((function(e){Q.current||(Q.current=e.currentTarget),ee(e)&&(K(!0),D&&D(e)),O&&O(e)})),fe=function(){var e=s.findDOMNode(Q.current);return v&&"button"!==v&&!("A"===e.tagName&&e.href)},me=l.useRef(!1),he=(0,d.default)((function(e){S&&!me.current&&Z&&X.current&&" "===e.key&&(me.current=!0,e.persist(),X.current.stop(e,(function(){X.current.start(e)}))),e.target===e.currentTarget&&fe()&&" "===e.key&&e.preventDefault(),j&&j(e),e.target===e.currentTarget&&fe()&&"Enter"===e.key&&!x&&(e.preventDefault(),M&&M(e))})),be=(0,d.default)((function(e){S&&" "===e.key&&X.current&&Z&&!e.defaultPrevented&&(me.current=!1,e.persist(),X.current.stop(e,(function(){X.current.pulsate(e)}))),I&&I(e),M&&e.target===e.currentTarget&&fe()&&" "===e.key&&!e.defaultPrevented&&M(e)})),ge=v;"button"===ge&&V.href&&(ge="a");var ye={};"button"===ge?(ye.type=H,ye.disabled=x):("a"===ge&&V.href||(ye.role="button"),ye["aria-disabled"]=x);var ve=(0,c.default)(a,t),we=(0,c.default)(re,Q),xe=(0,c.default)(ve,we),Ee=l.useState(!1),_e=Ee[0],Ce=Ee[1];l.useEffect((function(){Ce(!0)}),[]);var Te=_e&&!_&&!x;return l.createElement(ge,(0,o.default)({className:(0,u.default)(b.root,g,Z&&[b.focusVisible,R],x&&b.disabled),onBlur:de,onClick:M,onFocus:pe,onKeyDown:he,onKeyUp:be,onMouseDown:ne,onMouseLeave:le,onMouseUp:ie,onDragLeave:oe,onTouchEnd:ue,onTouchMove:ce,onTouchStart:se,ref:xe,tabIndex:x?-1:$},ye,V),h,Te?l.createElement(m.default,(0,o.default)({ref:X,center:p},z)):null)})),g=(0,p.default)(h,{name:"MuiButtonBase"})(b);r.default=g}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ButtonBase/ButtonBase.js"}],[911,{"../utils/useEventCallback":1235,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault"),n=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("react")),i=(a(e("prop-types")),a(e("clsx"))),l=a(e("../utils/useEventCallback")),s="undefined"==typeof window?o.useEffect:o.useLayoutEffect;function u(e){var t=e.classes,r=e.pulsate,a=void 0!==r&&r,n=e.rippleX,u=e.rippleY,c=e.rippleSize,d=e.in,p=e.onExited,f=void 0===p?function(){}:p,m=e.timeout,h=o.useState(!1),b=h[0],g=h[1],y=(0,i.default)(t.ripple,t.rippleVisible,a&&t.ripplePulsate),v={width:c,height:c,top:-c/2+u,left:-c/2+n},w=(0,i.default)(t.child,b&&t.childLeaving,a&&t.childPulsate),x=(0,l.default)(f);return s((function(){if(!d){g(!0);var e=setTimeout(x,m);return function(){clearTimeout(e)}}return undefined}),[x,d,m]),o.createElement("span",{className:y,style:v},o.createElement("span",{className:w}))}var c=u;r.default=c}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ButtonBase/Ripple.js"}],[912,{"../styles/withStyles":1211,"./Ripple":911,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/toConsumableArray":325,clsx:3586,"prop-types":4528,react:4776,"react-transition-group":1189},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=r.DELAY_RIPPLE=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/toConsumableArray")),l=n(e("@babel/runtime/helpers/objectWithoutProperties")),s=a(e("react")),u=(n(e("prop-types")),e("react-transition-group")),c=n(e("clsx")),d=n(e("../styles/withStyles")),p=n(e("./Ripple"));r.DELAY_RIPPLE=80;var f=function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}};r.styles=f;var m=s.forwardRef((function(e,t){var r=e.center,a=void 0!==r&&r,n=e.classes,d=e.className,f=(0,l.default)(e,["center","classes","className"]),m=s.useState([]),h=m[0],b=m[1],g=s.useRef(0),y=s.useRef(null);s.useEffect((function(){y.current&&(y.current(),y.current=null)}),[h]);var v=s.useRef(!1),w=s.useRef(null),x=s.useRef(null),E=s.useRef(null);s.useEffect((function(){return function(){clearTimeout(w.current)}}),[]);var _=s.useCallback((function(e){var t=e.pulsate,r=e.rippleX,a=e.rippleY,o=e.rippleSize,l=e.cb;b((function(e){return[].concat((0,i.default)(e),[s.createElement(p.default,{key:g.current,classes:n,timeout:550,pulsate:t,rippleX:r,rippleY:a,rippleSize:o})])})),g.current+=1,y.current=l}),[n]),C=s.useCallback((function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=arguments.length>2?arguments[2]:undefined,n=t.pulsate,o=void 0!==n&&n,i=t.center,l=void 0===i?a||t.pulsate:i,s=t.fakeElement,u=void 0!==s&&s;if("mousedown"===e.type&&v.current)v.current=!1;else{"touchstart"===e.type&&(v.current=!0);var c,d,p,f=u?null:E.current,m=f?f.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(l||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(m.width/2),d=Math.round(m.height/2);else{var h=e.touches?e.touches[0]:e,b=h.clientX,g=h.clientY;c=Math.round(b-m.left),d=Math.round(g-m.top)}if(l)(p=Math.sqrt((2*Math.pow(m.width,2)+Math.pow(m.height,2))/3))%2==0&&(p+=1);else{var y=2*Math.max(Math.abs((f?f.clientWidth:0)-c),c)+2,C=2*Math.max(Math.abs((f?f.clientHeight:0)-d),d)+2;p=Math.sqrt(Math.pow(y,2)+Math.pow(C,2))}e.touches?null===x.current&&(x.current=function(){_({pulsate:o,rippleX:c,rippleY:d,rippleSize:p,cb:r})},w.current=setTimeout((function(){x.current&&(x.current(),x.current=null)}),80)):_({pulsate:o,rippleX:c,rippleY:d,rippleSize:p,cb:r})}}),[a,_]),T=s.useCallback((function(){C({},{pulsate:!0})}),[C]),k=s.useCallback((function(e,t){if(clearTimeout(w.current),"touchend"===e.type&&x.current)return e.persist(),x.current(),x.current=null,void(w.current=setTimeout((function(){k(e,t)})));x.current=null,b((function(e){return e.length>0?e.slice(1):e})),y.current=t}),[]);return s.useImperativeHandle(t,(function(){return{pulsate:T,start:C,stop:k}}),[T,C,k]),s.createElement("span",(0,o.default)({className:(0,c.default)(n.root,d),ref:E},f),s.createElement(u.TransitionGroup,{component:null,exit:!0},h))})),h=(0,d.default)(f,{flip:!1,name:"MuiTouchRipple"})(s.memo(m));r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ButtonBase/TouchRipple.js"}],[913,{"./ButtonBase":910,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ButtonBase"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ButtonBase/index.js"}],[914,{"../Button":909,"../styles/colorManipulator":1192,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776,"react-is":4629},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(e("react-is"),n(e("prop-types")),n(e("clsx"))),u=n(e("../utils/capitalize")),c=e("../styles/colorManipulator"),d=n(e("../styles/withStyles"));n(e("../Button")).default.styles;var p=function(e){return{root:{display:"inline-flex",borderRadius:e.shape.borderRadius},contained:{boxShadow:e.shadows[2]},disableElevation:{boxShadow:"none"},disabled:{},fullWidth:{width:"100%"},vertical:{flexDirection:"column"},grouped:{minWidth:40},groupedHorizontal:{"&:not(:first-child)":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0}},groupedVertical:{"&:not(:first-child)":{borderTopRightRadius:0,borderTopLeftRadius:0},"&:not(:last-child)":{borderBottomRightRadius:0,borderBottomLeftRadius:0}},groupedText:{},groupedTextHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextPrimary:{"&:not(:last-child)":{borderColor:(0,c.fade)(e.palette.primary.main,.5)}},groupedTextSecondary:{"&:not(:last-child)":{borderColor:(0,c.fade)(e.palette.secondary.main,.5)}},groupedOutlined:{},groupedOutlinedHorizontal:{"&:not(:first-child)":{marginLeft:-1},"&:not(:last-child)":{borderRightColor:"transparent"}},groupedOutlinedVertical:{"&:not(:first-child)":{marginTop:-1},"&:not(:last-child)":{borderBottomColor:"transparent"}},groupedOutlinedPrimary:{"&:hover":{borderColor:e.palette.primary.main}},groupedOutlinedSecondary:{"&:hover":{borderColor:e.palette.secondary.main}},groupedContained:{boxShadow:"none"},groupedContainedHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderRight:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderBottom:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedPrimary:{"&:not(:last-child)":{borderColor:e.palette.primary.dark}},groupedContainedSecondary:{"&:not(:last-child)":{borderColor:e.palette.secondary.dark}}}};r.styles=p;var f=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,c=e.color,d=void 0===c?"default":c,p=e.component,f=void 0===p?"div":p,m=e.disabled,h=void 0!==m&&m,b=e.disableElevation,g=void 0!==b&&b,y=e.disableFocusRipple,v=void 0!==y&&y,w=e.disableRipple,x=void 0!==w&&w,E=e.fullWidth,_=void 0!==E&&E,C=e.orientation,T=void 0===C?"horizontal":C,k=e.size,S=void 0===k?"medium":k,R=e.variant,P=void 0===R?"outlined":R,M=(0,i.default)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"]),O=(0,s.default)(a.grouped,a["grouped".concat((0,u.default)(T))],a["grouped".concat((0,u.default)(P))],a["grouped".concat((0,u.default)(P)).concat((0,u.default)(T))],a["grouped".concat((0,u.default)(P)).concat("default"!==d?(0,u.default)(d):"")],h&&a.disabled);return l.createElement(f,(0,o.default)({role:"group",className:(0,s.default)(a.root,n,_&&a.fullWidth,g&&a.disableElevation,"contained"===P&&a.contained,"vertical"===T&&a.vertical),ref:t},M),l.Children.map(r,(function(e){return l.isValidElement(e)?l.cloneElement(e,{className:(0,s.default)(O,e.props.className),color:e.props.color||d,disabled:e.props.disabled||h,disableElevation:e.props.disableElevation||g,disableFocusRipple:v,disableRipple:x,fullWidth:_,size:e.props.size||S,variant:e.props.variant||P}):null})))})),m=(0,d.default)(p,{name:"MuiButtonGroup"})(f);r.default=m}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ButtonGroup/ButtonGroup.js"}],[915,{"./ButtonGroup":914,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ButtonGroup"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ButtonGroup/index.js"}],[916,{"../Paper":1051,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../Paper")),c=n(e("../styles/withStyles")),d={root:{overflow:"hidden"}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.raised,c=void 0!==n&&n,d=(0,i.default)(e,["classes","className","raised"]);return l.createElement(u.default,(0,o.default)({className:(0,s.default)(r.root,a),elevation:c?8:1,ref:t},d))})),f=(0,c.default)(d,{name:"MuiCard"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Card/Card.js"}],[917,{"./Card":916,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Card"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Card/index.js"}],[918,{"../ButtonBase":913,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../ButtonBase")),d=function(e){return{root:{display:"block",textAlign:"inherit",width:"100%","&:hover $focusHighlight":{opacity:e.palette.action.hoverOpacity},"&$focusVisible $focusHighlight":{opacity:.12}},focusVisible:{},focusHighlight:{overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.focusVisibleClassName,d=(0,i.default)(e,["children","classes","className","focusVisibleClassName"]);return l.createElement(c.default,(0,o.default)({className:(0,s.default)(a.root,n),focusVisibleClassName:(0,s.default)(u,a.focusVisible),ref:t},d),r,l.createElement("span",{className:a.focusHighlight}))})),f=(0,u.default)(d,{name:"MuiCardActionArea"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardActionArea/CardActionArea.js"}],[919,{"./CardActionArea":918,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CardActionArea"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardActionArea/index.js"}],[920,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{display:"flex",alignItems:"center",padding:8},spacing:{"& > :not(:first-child)":{marginLeft:8}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.disableSpacing,a=void 0!==r&&r,n=e.classes,u=e.className,c=(0,i.default)(e,["disableSpacing","classes","className"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(n.root,u,!a&&n.spacing),ref:t},c))})),p=(0,u.default)(c,{name:"MuiCardActions"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardActions/CardActions.js"}],[921,{"./CardActions":920,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CardActions"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardActions/index.js"}],[922,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{padding:16,"&:last-child":{paddingBottom:24}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.component,u=void 0===n?"div":n,c=(0,i.default)(e,["classes","className","component"]);return l.createElement(u,(0,o.default)({className:(0,s.default)(r.root,a),ref:t},c))})),p=(0,u.default)(c,{name:"MuiCardContent"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardContent/CardContent.js"}],[923,{"./CardContent":922,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CardContent"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardContent/index.js"}],[924,{"../Typography":1138,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../Typography")),d={root:{display:"flex",alignItems:"center",padding:16},avatar:{flex:"0 0 auto",marginRight:16},action:{flex:"0 0 auto",alignSelf:"flex-start",marginTop:-8,marginRight:-8},content:{flex:"1 1 auto"},title:{},subheader:{}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.action,a=e.avatar,n=e.classes,u=e.className,d=e.component,p=void 0===d?"div":d,f=e.disableTypography,m=void 0!==f&&f,h=e.subheader,b=e.subheaderTypographyProps,g=e.title,y=e.titleTypographyProps,v=(0,i.default)(e,["action","avatar","classes","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"]),w=g;null==w||w.type===c.default||m||(w=l.createElement(c.default,(0,o.default)({variant:a?"body2":"h5",className:n.title,component:"span",display:"block"},y),w));var x=h;return null==x||x.type===c.default||m||(x=l.createElement(c.default,(0,o.default)({variant:a?"body2":"body1",className:n.subheader,color:"textSecondary",component:"span",display:"block"},b),x)),l.createElement(p,(0,o.default)({className:(0,s.default)(n.root,u),ref:t},v),a&&l.createElement("div",{className:n.avatar},a),l.createElement("div",{className:n.content},w,x),r&&l.createElement("div",{className:n.action},r))})),f=(0,u.default)(d,{name:"MuiCardHeader"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardHeader/CardHeader.js"}],[925,{"./CardHeader":924,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CardHeader"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardHeader/index.js"}],[926,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=(e("@material-ui/utils"),{root:{display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},media:{width:"100%"},img:{objectFit:"cover"}});r.styles=c;var d=["video","audio","picture","iframe","img"],p=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.component,c=void 0===u?"div":u,p=e.image,f=e.src,m=e.style,h=(0,i.default)(e,["children","classes","className","component","image","src","style"]),b=-1!==d.indexOf(c),g=!b&&p?(0,o.default)({backgroundImage:'url("'.concat(p,'")')},m):m;return l.createElement(c,(0,o.default)({className:(0,s.default)(a.root,n,b&&a.media,-1!=="picture img".indexOf(c)&&a.img),ref:t,style:g,src:b?p||f:undefined},h),r)})),f=(0,u.default)(c,{name:"MuiCardMedia"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardMedia/CardMedia.js"}],[927,{"./CardMedia":926,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CardMedia"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CardMedia/index.js"}],[928,{"../internal/SwitchBase":1165,"../internal/svg-icons/CheckBox":1170,"../internal/svg-icons/CheckBoxOutlineBlank":1171,"../internal/svg-icons/IndeterminateCheckBox":1173,"../styles/colorManipulator":1192,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=(e("@material-ui/utils"),n(e("../internal/SwitchBase"))),c=n(e("../internal/svg-icons/CheckBoxOutlineBlank")),d=n(e("../internal/svg-icons/CheckBox")),p=e("../styles/colorManipulator"),f=n(e("../internal/svg-icons/IndeterminateCheckBox")),m=n(e("../utils/capitalize")),h=n(e("../styles/withStyles")),b=function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,p.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,p.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}};r.styles=b;var g=l.createElement(d.default,null),y=l.createElement(c.default,null),v=l.createElement(f.default,null),w=l.forwardRef((function(e,t){var r=e.checkedIcon,a=void 0===r?g:r,n=e.classes,c=e.color,d=void 0===c?"secondary":c,p=e.icon,f=void 0===p?y:p,h=e.indeterminate,b=void 0!==h&&h,w=e.indeterminateIcon,x=void 0===w?v:w,E=e.inputProps,_=e.size,C=void 0===_?"medium":_,T=(0,i.default)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),k=b?x:f,S=b?x:a;return l.createElement(u.default,(0,o.default)({type:"checkbox",classes:{root:(0,s.default)(n.root,n["color".concat((0,m.default)(d))],b&&n.indeterminate),checked:n.checked,disabled:n.disabled},color:d,inputProps:(0,o.default)({"data-indeterminate":b},E),icon:l.cloneElement(k,{fontSize:k.props.fontSize===undefined&&"small"===C?C:k.props.fontSize}),checkedIcon:l.cloneElement(S,{fontSize:S.props.fontSize===undefined&&"small"===C?C:S.props.fontSize}),ref:t},T))})),x=(0,h.default)(b,{name:"MuiCheckbox"})(w);r.default=x}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Checkbox/Checkbox.js"}],[929,{"./Checkbox":928,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Checkbox"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Checkbox/index.js"}],[930,{"../ButtonBase":913,"../internal/svg-icons/Cancel":1169,"../styles/colorManipulator":1192,"../styles/withStyles":1211,"../utils/capitalize":1219,"../utils/unsupportedProp":1233,"../utils/useForkRef":1236,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../internal/svg-icons/Cancel")),c=n(e("../styles/withStyles")),d=e("../styles/colorManipulator"),p=n(e("../utils/useForkRef")),f=(n(e("../utils/unsupportedProp")),n(e("../utils/capitalize"))),m=n(e("../ButtonBase")),h=function(e){var t="light"===e.palette.type?e.palette.grey[300]:e.palette.grey[700],r=(0,d.fade)(e.palette.text.primary,.26);return{root:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:e.palette.getContrastText(t),backgroundColor:t,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"},"& $avatar":{marginLeft:5,marginRight:-6,width:24,height:24,color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],fontSize:e.typography.pxToRem(12)},"& $avatarColorPrimary":{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark},"& $avatarColorSecondary":{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:(0,d.emphasize)(t,.08)},"&:active":{boxShadow:e.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:(0,d.emphasize)(e.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:(0,d.emphasize)(e.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:(0,d.emphasize)(t,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:(0,d.emphasize)(e.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:(0,d.emphasize)(e.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,d.fade)(e.palette.text.primary,e.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(e.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,d.fade)(e.palette.primary.main,e.palette.action.hoverOpacity)}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(e.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,d.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:r,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:(0,d.fade)(r,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:(0,d.fade)(e.palette.primary.contrastText,.7),"&:hover, &:active":{color:e.palette.primary.contrastText}},deleteIconColorSecondary:{color:(0,d.fade)(e.palette.secondary.contrastText,.7),"&:hover, &:active":{color:e.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:(0,d.fade)(e.palette.primary.main,.7),"&:hover, &:active":{color:e.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:(0,d.fade)(e.palette.secondary.main,.7),"&:hover, &:active":{color:e.palette.secondary.main}}}};function b(e){return"Backspace"===e.key||"Delete"===e.key}r.styles=h;var g=l.forwardRef((function(e,t){var r=e.avatar,a=e.classes,n=e.className,c=e.clickable,d=e.color,h=void 0===d?"default":d,g=e.component,y=e.deleteIcon,v=e.disabled,w=void 0!==v&&v,x=e.icon,E=e.label,_=e.onClick,C=e.onDelete,T=e.onKeyDown,k=e.onKeyUp,S=e.size,R=void 0===S?"medium":S,P=e.variant,M=void 0===P?"default":P,O=(0,i.default)(e,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),D=l.useRef(null),j=(0,p.default)(D,t),I=function(e){e.stopPropagation(),C&&C(e)},A=!(!1===c||!_)||c,q="small"===R,N=g||(A?m.default:"div"),L=N===m.default?{component:"div"}:{},F=null;if(C){var W=(0,s.default)("default"!==h&&("default"===M?a["deleteIconColor".concat((0,f.default)(h))]:a["deleteIconOutlinedColor".concat((0,f.default)(h))]),q&&a.deleteIconSmall);F=y&&l.isValidElement(y)?l.cloneElement(y,{className:(0,s.default)(y.props.className,a.deleteIcon,W),onClick:I}):l.createElement(u.default,{className:(0,s.default)(a.deleteIcon,W),onClick:I})}var B=null;r&&l.isValidElement(r)&&(B=l.cloneElement(r,{className:(0,s.default)(a.avatar,r.props.className,q&&a.avatarSmall,"default"!==h&&a["avatarColor".concat((0,f.default)(h))])}));var U=null;return x&&l.isValidElement(x)&&(U=l.cloneElement(x,{className:(0,s.default)(a.icon,x.props.className,q&&a.iconSmall,"default"!==h&&a["iconColor".concat((0,f.default)(h))])})),l.createElement(N,(0,o.default)({role:A||C?"button":undefined,className:(0,s.default)(a.root,n,"default"!==h&&[a["color".concat((0,f.default)(h))],A&&a["clickableColor".concat((0,f.default)(h))],C&&a["deletableColor".concat((0,f.default)(h))]],"default"!==M&&[a.outlined,{primary:a.outlinedPrimary,secondary:a.outlinedSecondary}[h]],w&&a.disabled,q&&a.sizeSmall,A&&a.clickable,C&&a.deletable),"aria-disabled":!!w||undefined,tabIndex:A||C?0:undefined,onClick:_,onKeyDown:function(e){e.currentTarget===e.target&&b(e)&&e.preventDefault(),T&&T(e)},onKeyUp:function(e){e.currentTarget===e.target&&(C&&b(e)?C(e):"Escape"===e.key&&D.current&&D.current.blur()),k&&k(e)},ref:j},L,O),B||U,l.createElement("span",{className:(0,s.default)(a.label,q&&a.labelSmall)},E),F)})),y=(0,c.default)(h,{name:"MuiChip"})(g);r.default=y}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Chip/Chip.js"}],[931,{"./Chip":930,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Chip"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Chip/index.js"}],[932,{"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=(e("@material-ui/utils"),n(e("../styles/withStyles"))),c=n(e("../utils/capitalize")),d=44;function p(e){var t,r,a;return t=e,r=0,a=1,e=(Math.min(Math.max(r,t),a)-r)/(a-r),e=(e-=1)*e*e+1}var f=function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}};r.styles=f;var m=l.forwardRef((function(e,t){var r,a=e.classes,n=e.className,u=e.color,f=void 0===u?"primary":u,m=e.disableShrink,h=void 0!==m&&m,b=e.size,g=void 0===b?40:b,y=e.style,v=e.thickness,w=void 0===v?3.6:v,x=e.value,E=void 0===x?0:x,_=e.variant,C=void 0===_?"indeterminate":_,T=(0,i.default)(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),k={},S={},R={};if("determinate"===C||"static"===C){var P=2*Math.PI*((d-w)/2);k.strokeDasharray=P.toFixed(3),R["aria-valuenow"]=Math.round(E),"static"===C?(k.strokeDashoffset="".concat(((100-E)/100*P).toFixed(3),"px"),S.transform="rotate(-90deg)"):(k.strokeDashoffset="".concat((r=(100-E)/100,r*r*P).toFixed(3),"px"),S.transform="rotate(".concat((270*p(E/70)).toFixed(3),"deg)"))}return l.createElement("div",(0,o.default)({className:(0,s.default)(a.root,n,"inherit"!==f&&a["color".concat((0,c.default)(f))],{indeterminate:a.indeterminate,static:a.static}[C]),style:(0,o.default)({width:g,height:g},S,y),ref:t,role:"progressbar"},R,T),l.createElement("svg",{className:a.svg,viewBox:"".concat(22," ").concat(22," ").concat(d," ").concat(d)},l.createElement("circle",{className:(0,s.default)(a.circle,h&&a.circleDisableShrink,{indeterminate:a.circleIndeterminate,static:a.circleStatic}[C]),style:k,cx:d,cy:d,r:(d-w)/2,fill:"none",strokeWidth:w})))})),h=(0,u.default)(f,{name:"MuiCircularProgress",flip:!1})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CircularProgress/CircularProgress.js"}],[933,{"./CircularProgress":932,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CircularProgress"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CircularProgress/index.js"}],[934,{"../utils/ownerDocument":1227,"../utils/useEventCallback":1235,"../utils/useForkRef":1236,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@material-ui/utils":1302,"prop-types":4528,react:4776,"react-dom":4604},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault"),n=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("react")),i=n(e("react-dom")),l=(a(e("prop-types")),a(e("../utils/ownerDocument"))),s=a(e("../utils/useForkRef")),u=a(e("../utils/useEventCallback"));e("@material-ui/utils");function c(e){return e.substring(2).toLowerCase()}function d(e){var t=e.children,r=e.disableReactTree,a=void 0!==r&&r,n=e.mouseEvent,d=void 0===n?"onClick":n,p=e.onClickAway,f=e.touchEvent,m=void 0===f?"onTouchEnd":f,h=o.useRef(!1),b=o.useRef(null),g=o.useRef(!1),y=o.useRef(!1);o.useEffect((function(){return g.current=!0,function(){g.current=!1}}),[]);var v=o.useCallback((function(e){b.current=i.findDOMNode(e)}),[]),w=(0,s.default)(t.ref,v),x=(0,u.default)((function(e){var t=y.current;if(y.current=!1,g.current&&b.current&&!function(e){return document.documentElement.clientWidth-1;else r=!(0,l.default)(b.current).documentElement.contains(e.target)||b.current.contains(e.target);r||!a&&t||p(e)}})),E=function(e){return function(r){y.current=!0;var a=t.props[e];a&&a(r)}},_={ref:w};return!1!==m&&(_[m]=E(m)),o.useEffect((function(){if(!1!==m){var e=c(m),t=(0,l.default)(b.current),r=function(){h.current=!0};return t.addEventListener(e,x),t.addEventListener("touchmove",r),function(){t.removeEventListener(e,x),t.removeEventListener("touchmove",r)}}return undefined}),[x,m]),!1!==d&&(_[d]=E(d)),o.useEffect((function(){if(!1!==d){var e=c(d),t=(0,l.default)(b.current);return t.addEventListener(e,x),function(){t.removeEventListener(e,x)}}return undefined}),[x,d]),o.createElement(o.Fragment,null,o.cloneElement(t,_))}var p=d;r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ClickAwayListener/ClickAwayListener.js"}],[935,{"./ClickAwayListener":934,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ClickAwayListener"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ClickAwayListener/index.js"}],[936,{"../styles/transitions":1209,"../styles/useTheme":1210,"../styles/withStyles":1211,"../transitions/utils":1214,"../utils":1225,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/slicedToArray":323,clsx:3586,"prop-types":4528,react:4776,"react-transition-group":1189},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/slicedToArray")),l=n(e("@babel/runtime/helpers/objectWithoutProperties")),s=a(e("react")),u=n(e("clsx")),c=(n(e("prop-types")),e("react-transition-group")),d=n(e("../styles/withStyles")),p=e("../styles/transitions"),f=e("../transitions/utils"),m=n(e("../styles/useTheme")),h=e("../utils"),b=function(e){return{container:{height:0,overflow:"hidden",transition:e.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}};r.styles=b;var g=s.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,d=e.collapsedHeight,b=void 0===d?"0px":d,g=e.component,y=void 0===g?"div":g,v=e.disableStrictModeCompat,w=void 0!==v&&v,x=e.in,E=e.onEnter,_=e.onEntered,C=e.onEntering,T=e.onExit,k=e.onExited,S=e.onExiting,R=e.style,P=e.timeout,M=void 0===P?p.duration.standard:P,O=e.TransitionComponent,D=void 0===O?c.Transition:O,j=(0,l.default)(e,["children","classes","className","collapsedHeight","component","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),I=(0,m.default)(),A=s.useRef(),q=s.useRef(null),N=s.useRef(),L="number"==typeof b?"".concat(b,"px"):b;s.useEffect((function(){return function(){clearTimeout(A.current)}}),[]);var F=I.unstable_strictMode&&!w,W=s.useRef(null),B=(0,h.useForkRef)(t,F?W:undefined),U=function(e){return function(t,r){if(e){var a=F?[W.current,t]:[t,r],n=(0,i.default)(a,2),o=n[0],l=n[1];l===undefined?e(o):e(o,l)}}},$=U((function(e,t){e.style.height=L,E&&E(e,t)})),z=U((function(e,t){var r=q.current?q.current.clientHeight:0,a=(0,f.getTransitionProps)({style:R,timeout:M},{mode:"enter"}).duration;if("auto"===M){var n=I.transitions.getAutoHeightDuration(r);e.style.transitionDuration="".concat(n,"ms"),N.current=n}else e.style.transitionDuration="string"==typeof a?a:"".concat(a,"ms");e.style.height="".concat(r,"px"),C&&C(e,t)})),G=U((function(e,t){e.style.height="auto",_&&_(e,t)})),H=U((function(e){var t=q.current?q.current.clientHeight:0;e.style.height="".concat(t,"px"),T&&T(e)})),V=U(k),Q=U((function(e){var t=q.current?q.current.clientHeight:0,r=(0,f.getTransitionProps)({style:R,timeout:M},{mode:"exit"}).duration;if("auto"===M){var a=I.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(a,"ms"),N.current=a}else e.style.transitionDuration="string"==typeof r?r:"".concat(r,"ms");e.style.height=L,S&&S(e)}));return s.createElement(D,(0,o.default)({in:x,onEnter:$,onEntered:G,onEntering:z,onExit:H,onExited:V,onExiting:Q,addEndListener:function(e,t){var r=F?e:t;"auto"===M&&(A.current=setTimeout(r,N.current||0))},nodeRef:F?W:undefined,timeout:"auto"===M?null:M},j),(function(e,t){return s.createElement(y,(0,o.default)({className:(0,u.default)(a.container,n,{entered:a.entered,exited:!x&&"0px"===L&&a.hidden}[e]),style:(0,o.default)({minHeight:L},R),ref:B},t),s.createElement("div",{className:a.wrapper,ref:q},s.createElement("div",{className:a.wrapperInner},r)))}))}));g.muiSupportAuto=!0;var y=(0,d.default)(b,{name:"MuiCollapse"})(g);r.default=y}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Collapse/Collapse.js"}],[937,{"./Collapse":936,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Collapse"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Collapse/index.js"}],[938,{"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/defineProperty":306,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=n(e("@babel/runtime/helpers/defineProperty")),s=a(e("react")),u=(n(e("prop-types")),n(e("clsx"))),c=n(e("../styles/withStyles")),d=n(e("../utils/capitalize")),p=function(e){return{root:(0,l.default)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),display:"block"},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),disableGutters:{paddingLeft:0,paddingRight:0},fixed:Object.keys(e.breakpoints.values).reduce((function(t,r){var a=e.breakpoints.values[r];return 0!==a&&(t[e.breakpoints.up(r)]={maxWidth:a}),t}),{}),maxWidthXs:(0,l.default)({},e.breakpoints.up("xs"),{maxWidth:Math.max(e.breakpoints.values.xs,444)}),maxWidthSm:(0,l.default)({},e.breakpoints.up("sm"),{maxWidth:e.breakpoints.values.sm}),maxWidthMd:(0,l.default)({},e.breakpoints.up("md"),{maxWidth:e.breakpoints.values.md}),maxWidthLg:(0,l.default)({},e.breakpoints.up("lg"),{maxWidth:e.breakpoints.values.lg}),maxWidthXl:(0,l.default)({},e.breakpoints.up("xl"),{maxWidth:e.breakpoints.values.xl})}};r.styles=p;var f=s.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.component,l=void 0===n?"div":n,c=e.disableGutters,p=void 0!==c&&c,f=e.fixed,m=void 0!==f&&f,h=e.maxWidth,b=void 0===h?"lg":h,g=(0,i.default)(e,["classes","className","component","disableGutters","fixed","maxWidth"]);return s.createElement(l,(0,o.default)({className:(0,u.default)(r.root,a,m&&r.fixed,p&&r.disableGutters,!1!==b&&r["maxWidth".concat((0,d.default)(String(b)))]),ref:t},g))})),m=(0,c.default)(p,{name:"MuiContainer"})(f);r.default=m}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Container/Container.js"}],[939,{"./Container":938,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Container"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Container/index.js"}],[940,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@material-ui/utils":1302,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=r.body=r.html=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=a(e("react")),l=(n(e("prop-types")),n(e("../styles/withStyles"))),s=(e("@material-ui/utils"),{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box"});r.html=s;var u=function(e){return(0,o.default)({color:e.palette.text.primary},e.typography.body2,{backgroundColor:e.palette.background.default,"@media print":{backgroundColor:e.palette.common.white}})};r.body=u;var c=function(e){return{"@global":{html:s,"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,o.default)({margin:0},u(e),{"&::backdrop":{backgroundColor:e.palette.background.default}})}}};function d(e){var t=e.children,r=void 0===t?null:t;e.classes;return i.createElement(i.Fragment,null,r)}r.styles=c;var p=(0,l.default)(c,{name:"MuiCssBaseline"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CssBaseline/CssBaseline.js"}],[941,{"./CssBaseline":940,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./CssBaseline"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/CssBaseline/index.js"}],[942,{"../Backdrop":896,"../Fade":968,"../Modal":1041,"../Paper":1051,"../styles/transitions":1209,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/defineProperty":306,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=n(e("@babel/runtime/helpers/defineProperty")),s=a(e("react")),u=(n(e("prop-types")),n(e("clsx"))),c=n(e("../styles/withStyles")),d=n(e("../utils/capitalize")),p=n(e("../Modal")),f=n(e("../Backdrop")),m=n(e("../Fade")),h=e("../styles/transitions"),b=n(e("../Paper")),g=function(e){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,444),"&$paperScrollBody":(0,l.default)({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":(0,l.default)({},e.breakpoints.down(e.breakpoints.values.sm+64),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":(0,l.default)({},e.breakpoints.down(e.breakpoints.values.md+64),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":(0,l.default)({},e.breakpoints.down(e.breakpoints.values.lg+64),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":(0,l.default)({},e.breakpoints.down(e.breakpoints.values.xl+64),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}};r.styles=g;var y={enter:h.duration.enteringScreen,exit:h.duration.leavingScreen},v=s.forwardRef((function(e,t){var r=e.BackdropProps,a=e.children,n=e.classes,l=e.className,c=e.disableBackdropClick,h=void 0!==c&&c,g=e.disableEscapeKeyDown,v=void 0!==g&&g,w=e.fullScreen,x=void 0!==w&&w,E=e.fullWidth,_=void 0!==E&&E,C=e.maxWidth,T=void 0===C?"sm":C,k=e.onBackdropClick,S=e.onClose,R=e.onEnter,P=e.onEntered,M=e.onEntering,O=e.onEscapeKeyDown,D=e.onExit,j=e.onExited,I=e.onExiting,A=e.open,q=e.PaperComponent,N=void 0===q?b.default:q,L=e.PaperProps,F=void 0===L?{}:L,W=e.scroll,B=void 0===W?"paper":W,U=e.TransitionComponent,$=void 0===U?m.default:U,z=e.transitionDuration,G=void 0===z?y:z,H=e.TransitionProps,V=e["aria-describedby"],Q=e["aria-labelledby"],X=(0,i.default)(e,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),Y=s.useRef();return s.createElement(p.default,(0,o.default)({className:(0,u.default)(n.root,l),BackdropComponent:f.default,BackdropProps:(0,o.default)({transitionDuration:G},r),closeAfterTransition:!0,disableBackdropClick:h,disableEscapeKeyDown:v,onEscapeKeyDown:O,onClose:S,open:A,ref:t},X),s.createElement($,(0,o.default)({appear:!0,in:A,timeout:G,onEnter:R,onEntering:M,onEntered:P,onExit:D,onExiting:I,onExited:j,role:"none presentation"},H),s.createElement("div",{className:(0,u.default)(n.container,n["scroll".concat((0,d.default)(B))]),onMouseUp:function(e){e.target===e.currentTarget&&e.target===Y.current&&(Y.current=null,k&&k(e),!h&&S&&S(e,"backdropClick"))},onMouseDown:function(e){Y.current=e.target}},s.createElement(N,(0,o.default)({elevation:24,role:"dialog","aria-describedby":V,"aria-labelledby":Q},F,{className:(0,u.default)(n.paper,n["paperScroll".concat((0,d.default)(B))],n["paperWidth".concat((0,d.default)(String(T)))],F.className,x&&n.paperFullScreen,_&&n.paperFullWidth)}),a))))})),w=(0,c.default)(g,{name:"MuiDialog"})(v);r.default=w}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Dialog/Dialog.js"}],[943,{"./Dialog":942,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Dialog"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Dialog/index.js"}],[944,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.disableSpacing,a=void 0!==r&&r,n=e.classes,u=e.className,c=(0,i.default)(e,["disableSpacing","classes","className"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(n.root,u,!a&&n.spacing),ref:t},c))})),p=(0,u.default)(c,{name:"MuiDialogActions"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogActions/DialogActions.js"}],[945,{"./DialogActions":944,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./DialogActions"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogActions/index.js"}],[946,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=function(e){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider)}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.dividers,u=void 0!==n&&n,c=(0,i.default)(e,["classes","className","dividers"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(r.root,a,u&&r.dividers),ref:t},c))})),p=(0,u.default)(c,{name:"MuiDialogContent"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogContent/DialogContent.js"}],[947,{"./DialogContent":946,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./DialogContent"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogContent/index.js"}],[948,{"../Typography":1138,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=a(e("react")),l=(n(e("prop-types")),n(e("../styles/withStyles"))),s=n(e("../Typography")),u={root:{marginBottom:12}};r.styles=u;var c=i.forwardRef((function(e,t){return i.createElement(s.default,(0,o.default)({component:"p",variant:"body1",color:"textSecondary",ref:t},e))})),d=(0,l.default)(u,{name:"MuiDialogContentText"})(c);r.default=d}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogContentText/DialogContentText.js"}],[949,{"./DialogContentText":948,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./DialogContentText"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogContentText/index.js"}],[950,{"../Typography":1138,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../Typography")),d={root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.disableTypography,d=void 0!==u&&u,p=(0,i.default)(e,["children","classes","className","disableTypography"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(a.root,n),ref:t},p),d?r:l.createElement(c.default,{component:"h2",variant:"h6"},r))})),f=(0,u.default)(d,{name:"MuiDialogTitle"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogTitle/DialogTitle.js"}],[951,{"./DialogTitle":950,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./DialogTitle"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/DialogTitle/index.js"}],[952,{"../styles/colorManipulator":1192,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=e("../styles/colorManipulator"),d=function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:(0,c.fade)(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.absolute,a=void 0!==r&&r,n=e.classes,u=e.className,c=e.component,d=void 0===c?"hr":c,p=e.flexItem,f=void 0!==p&&p,m=e.light,h=void 0!==m&&m,b=e.orientation,g=void 0===b?"horizontal":b,y=e.role,v=void 0===y?"hr"!==d?"separator":undefined:y,w=e.variant,x=void 0===w?"fullWidth":w,E=(0,i.default)(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return l.createElement(d,(0,o.default)({className:(0,s.default)(n.root,u,"fullWidth"!==x&&n[x],a&&n.absolute,f&&n.flexItem,h&&n.light,"vertical"===g&&n.vertical),role:v,ref:t},E))})),f=(0,u.default)(d,{name:"MuiDivider"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Divider/Divider.js"}],[953,{"./Divider":952,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Divider"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Divider/index.js"}],[954,{"../Backdrop":896,"../Modal":1041,"../Paper":1051,"../Slide":1071,"../styles/transitions":1209,"../styles/useTheme":1210,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.isHorizontal=v,r.getAnchor=w,r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../Modal")),c=n(e("../Backdrop")),d=n(e("../styles/withStyles")),p=n(e("../Slide")),f=n(e("../Paper")),m=n(e("../utils/capitalize")),h=e("../styles/transitions"),b=n(e("../styles/useTheme")),g=function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}};r.styles=g;var y={left:"right",right:"left",top:"down",bottom:"up"};function v(e){return-1!==["left","right"].indexOf(e)}function w(e,t){return"rtl"===e.direction&&v(t)?y[t]:t}var x={enter:h.duration.enteringScreen,exit:h.duration.leavingScreen},E=l.forwardRef((function(e,t){var r=e.anchor,a=void 0===r?"left":r,n=e.BackdropProps,d=e.children,h=e.classes,g=e.className,v=e.elevation,E=void 0===v?16:v,_=e.ModalProps,C=(_=void 0===_?{}:_).BackdropProps,T=(0,i.default)(_,["BackdropProps"]),k=e.onClose,S=e.open,R=void 0!==S&&S,P=e.PaperProps,M=void 0===P?{}:P,O=e.SlideProps,D=e.TransitionComponent,j=void 0===D?p.default:D,I=e.transitionDuration,A=void 0===I?x:I,q=e.variant,N=void 0===q?"temporary":q,L=(0,i.default)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),F=(0,b.default)(),W=l.useRef(!1);l.useEffect((function(){W.current=!0}),[]);var B=w(F,a),U=l.createElement(f.default,(0,o.default)({elevation:"temporary"===N?E:0,square:!0},M,{className:(0,s.default)(h.paper,h["paperAnchor".concat((0,m.default)(B))],M.className,"temporary"!==N&&h["paperAnchorDocked".concat((0,m.default)(B))])}),d);if("permanent"===N)return l.createElement("div",(0,o.default)({className:(0,s.default)(h.root,h.docked,g),ref:t},L),U);var $=l.createElement(j,(0,o.default)({in:R,direction:y[B],timeout:A,appear:W.current},O),U);return"persistent"===N?l.createElement("div",(0,o.default)({className:(0,s.default)(h.root,h.docked,g),ref:t},L),$):l.createElement(u.default,(0,o.default)({BackdropProps:(0,o.default)({},n,C,{transitionDuration:A}),BackdropComponent:c.default,className:(0,s.default)(h.root,h.modal,g),open:R,onClose:k,ref:t},L,T),$)})),_=(0,d.default)(g,{name:"MuiDrawer",flip:!1})(E);r.default=_}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Drawer/Drawer.js"}],[955,{"./Drawer":954,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Drawer"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Drawer/index.js"}],[956,{"../Collapse":937,"../Paper":1051,"../styles/withStyles":1211,"../utils/useControlled":1234,"./ExpansionPanelContext":957,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/slicedToArray":323,"@babel/runtime/helpers/toArray":324,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776,"react-is":4629},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/toArray")),l=n(e("@babel/runtime/helpers/slicedToArray")),s=n(e("@babel/runtime/helpers/objectWithoutProperties")),u=a(e("react")),c=(e("react-is"),n(e("prop-types")),n(e("clsx"))),d=(e("@material-ui/utils"),n(e("../Collapse"))),p=n(e("../Paper")),f=n(e("../styles/withStyles")),m=n(e("./ExpansionPanelContext")),h=n(e("../utils/useControlled")),b=function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}};r.styles=b;var g=u.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,f=e.defaultExpanded,b=void 0!==f&&f,g=e.disabled,y=void 0!==g&&g,v=e.expanded,w=e.onChange,x=e.square,E=void 0!==x&&x,_=e.TransitionComponent,C=void 0===_?d.default:_,T=e.TransitionProps,k=(0,s.default)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),S=(0,h.default)({controlled:v,default:b,name:"ExpansionPanel",state:"expanded"}),R=(0,l.default)(S,2),P=R[0],M=R[1],O=u.useCallback((function(e){M(!P),w&&w(e,!P)}),[P,w,M]),D=u.Children.toArray(r),j=(0,i.default)(D),I=j[0],A=j.slice(1),q=u.useMemo((function(){return{expanded:P,disabled:y,toggle:O}}),[P,y,O]);return u.createElement(p.default,(0,o.default)({className:(0,c.default)(a.root,n,P&&a.expanded,y&&a.disabled,!E&&a.rounded),ref:t,square:E},k),u.createElement(m.default.Provider,{value:q},I),u.createElement(C,(0,o.default)({in:P,timeout:"auto"},T),u.createElement("div",{"aria-labelledby":I.props.id,id:I.props["aria-controls"],role:"region"},A)))})),y=(0,f.default)(b,{name:"MuiExpansionPanel"})(g);r.default=y}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanel/ExpansionPanel.js"}],[957,{"@babel/runtime/helpers/interopRequireWildcard":312,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=a(e("react")).createContext({});var o=n;r.default=o}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanel/ExpansionPanelContext.js"}],[958,{"./ExpansionPanel":956,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ExpansionPanel"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanel/index.js"}],[959,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},spacing:{"& > :not(:first-child)":{marginLeft:8}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.disableSpacing,u=void 0!==n&&n,c=(0,i.default)(e,["classes","className","disableSpacing"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(r.root,a,!u&&r.spacing),ref:t},c))})),p=(0,u.default)(c,{name:"MuiExpansionPanelActions"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanelActions/ExpansionPanelActions.js"}],[960,{"./ExpansionPanelActions":959,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ExpansionPanelActions"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanelActions/index.js"}],[961,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=(0,i.default)(e,["classes","className"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(r.root,a),ref:t},n))})),p=(0,u.default)(c,{name:"MuiExpansionPanelDetails"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanelDetails/ExpansionPanelDetails.js"}],[962,{"./ExpansionPanelDetails":961,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ExpansionPanelDetails"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanelDetails/index.js"}],[963,{"../ButtonBase":913,"../ExpansionPanel/ExpansionPanelContext":957,"../IconButton":1001,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../ButtonBase")),c=n(e("../IconButton")),d=n(e("../styles/withStyles")),p=n(e("../ExpansionPanel/ExpansionPanelContext")),f=function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:e.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.action.focus},"&$disabled":{opacity:e.palette.action.disabledOpacity}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}};r.styles=f;var m=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,d=e.expandIcon,f=e.IconButtonProps,m=e.onBlur,h=e.onClick,b=e.onFocusVisible,g=(0,i.default)(e,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),y=l.useState(!1),v=y[0],w=y[1],x=l.useContext(p.default),E=x.disabled,_=void 0!==E&&E,C=x.expanded,T=x.toggle;return l.createElement(u.default,(0,o.default)({focusRipple:!1,disableRipple:!0,disabled:_,component:"div","aria-expanded":C,className:(0,s.default)(a.root,n,_&&a.disabled,C&&a.expanded,v&&a.focused),onFocusVisible:function(e){w(!0),b&&b(e)},onBlur:function(e){w(!1),m&&m(e)},onClick:function(e){T&&T(e),h&&h(e)},ref:t},g),l.createElement("div",{className:(0,s.default)(a.content,C&&a.expanded)},r),d&&l.createElement(c.default,(0,o.default)({className:(0,s.default)(a.expandIcon,C&&a.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},f),d))})),h=(0,d.default)(f,{name:"MuiExpansionPanelSummary"})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanelSummary/ExpansionPanelSummary.js"}],[964,{"./ExpansionPanelSummary":963,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./ExpansionPanelSummary"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/ExpansionPanelSummary/index.js"}],[965,{"../ButtonBase":913,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/objectWithoutProperties")),i=n(e("@babel/runtime/helpers/extends")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=n(e("../ButtonBase")),d=n(e("../utils/capitalize")),p=function(e){return{root:(0,i.default)({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}};r.styles=p;var f=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,u=e.color,p=void 0===u?"default":u,f=e.component,m=void 0===f?"button":f,h=e.disabled,b=void 0!==h&&h,g=e.disableFocusRipple,y=void 0!==g&&g,v=e.focusVisibleClassName,w=e.size,x=void 0===w?"large":w,E=e.variant,_=void 0===E?"round":E,C=(0,o.default)(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return l.createElement(c.default,(0,i.default)({className:(0,s.default)(a.root,n,"round"!==_&&a.extended,"large"!==x&&a["size".concat((0,d.default)(x))],b&&a.disabled,{primary:a.primary,secondary:a.secondary,inherit:a.colorInherit}[p]),component:m,disabled:b,focusRipple:!y,focusVisibleClassName:(0,s.default)(a.focusVisible,v),ref:t},C),l.createElement("span",{className:a.label},r))})),m=(0,u.default)(p,{name:"MuiFab"})(f);r.default=m}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Fab/Fab.js"}],[966,{"./Fab":965,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Fab"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Fab/index.js"}],[967,{"../styles/transitions":1209,"../styles/useTheme":1210,"../transitions/utils":1214,"../utils/useForkRef":1236,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/slicedToArray":323,"prop-types":4528,react:4776,"react-transition-group":1189},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/slicedToArray")),l=n(e("@babel/runtime/helpers/objectWithoutProperties")),s=a(e("react")),u=(n(e("prop-types")),e("react-transition-group")),c=e("../styles/transitions"),d=n(e("../styles/useTheme")),p=e("../transitions/utils"),f=n(e("../utils/useForkRef")),m={entering:{opacity:1},entered:{opacity:1}},h={enter:c.duration.enteringScreen,exit:c.duration.leavingScreen},b=s.forwardRef((function(e,t){var r=e.children,a=e.disableStrictModeCompat,n=void 0!==a&&a,c=e.in,b=e.onEnter,g=e.onEntered,y=e.onEntering,v=e.onExit,w=e.onExited,x=e.onExiting,E=e.style,_=e.TransitionComponent,C=void 0===_?u.Transition:_,T=e.timeout,k=void 0===T?h:T,S=(0,l.default)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),R=(0,d.default)(),P=R.unstable_strictMode&&!n,M=s.useRef(null),O=(0,f.default)(r.ref,t),D=(0,f.default)(P?M:undefined,O),j=function(e){return function(t,r){if(e){var a=P?[M.current,t]:[t,r],n=(0,i.default)(a,2),o=n[0],l=n[1];l===undefined?e(o):e(o,l)}}},I=j(y),A=j((function(e,t){(0,p.reflow)(e);var r=(0,p.getTransitionProps)({style:E,timeout:k},{mode:"enter"});e.style.webkitTransition=R.transitions.create("opacity",r),e.style.transition=R.transitions.create("opacity",r),b&&b(e,t)})),q=j(g),N=j(x),L=j((function(e){var t=(0,p.getTransitionProps)({style:E,timeout:k},{mode:"exit"});e.style.webkitTransition=R.transitions.create("opacity",t),e.style.transition=R.transitions.create("opacity",t),v&&v(e)})),F=j(w);return s.createElement(C,(0,o.default)({appear:!0,in:c,nodeRef:P?M:undefined,onEnter:A,onEntered:q,onEntering:I,onExit:L,onExited:F,onExiting:N,timeout:k},S),(function(e,t){return s.cloneElement(r,(0,o.default)({style:(0,o.default)({opacity:0,visibility:"exited"!==e||c?undefined:"hidden"},m[e],E,r.props.style),ref:D},t))}))})),g=b;r.default=g}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Fade/Fade.js"}],[968,{"./Fade":967,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Fade"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Fade/index.js"}],[969,{"../InputBase":1007,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=(e("@material-ui/utils"),n(e("../InputBase"))),c=n(e("../styles/withStyles")),d=function(e){var t="light"===e.palette.type,r=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:a,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:a}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}};r.styles=d;var p=l.forwardRef((function(e,t){var r=e.disableUnderline,a=e.classes,n=e.fullWidth,c=void 0!==n&&n,d=e.inputComponent,p=void 0===d?"input":d,f=e.multiline,m=void 0!==f&&f,h=e.type,b=void 0===h?"text":h,g=(0,i.default)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return l.createElement(u.default,(0,o.default)({classes:(0,o.default)({},a,{root:(0,s.default)(a.root,!r&&a.underline),underline:null}),fullWidth:c,inputComponent:p,multiline:m,ref:t,type:b},g))}));p.muiName="Input";var f=(0,c.default)(d,{name:"MuiFilledInput"})(p);r.default=f}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FilledInput/FilledInput.js"}],[970,{"./FilledInput":969,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./FilledInput"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FilledInput/index.js"}],[971,{"../InputBase/utils":1008,"../styles/withStyles":1211,"../utils/capitalize":1219,"../utils/isMuiElement":1226,"./FormControlContext":972,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=e("../InputBase/utils"),c=n(e("../styles/withStyles")),d=n(e("../utils/capitalize")),p=n(e("../utils/isMuiElement")),f=n(e("./FormControlContext")),m={root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}};r.styles=m;var h=l.forwardRef((function(e,t){var r,a=e.children,n=e.classes,c=e.className,m=e.color,h=void 0===m?"primary":m,b=e.component,g=void 0===b?"div":b,y=e.disabled,v=void 0!==y&&y,w=e.error,x=void 0!==w&&w,E=e.fullWidth,_=void 0!==E&&E,C=e.focused,T=e.hiddenLabel,k=void 0!==T&&T,S=e.margin,R=void 0===S?"none":S,P=e.required,M=void 0!==P&&P,O=e.size,D=e.variant,j=void 0===D?"standard":D,I=(0,i.default)(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),A=l.useState((function(){var e=!1;return a&&l.Children.forEach(a,(function(t){if((0,p.default)(t,["Input","Select"])){var r=(0,p.default)(t,["Select"])?t.props.input:t;r&&(0,u.isAdornedStart)(r.props)&&(e=!0)}})),e})),q=A[0],N=A[1],L=l.useState((function(){var e=!1;return a&&l.Children.forEach(a,(function(t){(0,p.default)(t,["Input","Select"])&&(0,u.isFilled)(t.props,!0)&&(e=!0)})),e})),F=L[0],W=L[1],B=l.useState(!1),U=B[0],$=B[1],z=C!==undefined?C:U;v&&z&&$(!1);var G=l.useCallback((function(){W(!0)}),[]),H=l.useCallback((function(){W(!1)}),[]),V={adornedStart:q,setAdornedStart:N,color:h,disabled:v,error:x,filled:F,focused:z,fullWidth:_,hiddenLabel:k,margin:("small"===O?"dense":undefined)||R,onBlur:function(){$(!1)},onEmpty:H,onFilled:G,onFocus:function(){$(!0)},registerEffect:r,required:M,variant:j};return l.createElement(f.default.Provider,{value:V},l.createElement(g,(0,o.default)({className:(0,s.default)(n.root,c,"none"!==R&&n["margin".concat((0,d.default)(R))],_&&n.fullWidth),ref:t},I),a))})),b=(0,c.default)(m,{name:"MuiFormControl"})(h);r.default=b}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControl/FormControl.js"}],[972,{"@babel/runtime/helpers/interopRequireWildcard":312,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.useFormControl=function(){return n.useContext(o)},r.default=void 0;var n=a(e("react")),o=n.createContext();var i=o;r.default=i}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControl/FormControlContext.js"}],[973,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){var t=e.props,r=e.states,a=e.muiFormControl;return r.reduce((function(e,r){return e[r]=t[r],a&&void 0===t[r]&&(e[r]=a[r]),e}),{})}}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControl/formControlState.js"}],[974,{"./FormControl":971,"./useFormControl":975,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"useFormControl",{enumerable:!0,get:function(){return o.default}});var n=a(e("./FormControl")),o=a(e("./useFormControl"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControl/index.js"}],[975,{"./FormControlContext":972,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault"),n=e("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){return o.useContext(i.default)};var o=n(e("react")),i=a(e("./FormControlContext"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControl/useFormControl.js"}],[976,{"../FormControl":974,"../Typography":1138,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@material-ui/utils":1302,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=(e("@material-ui/utils"),e("../FormControl")),c=n(e("../styles/withStyles")),d=n(e("../Typography")),p=n(e("../utils/capitalize")),f=function(e){return{root:{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,"&$disabled":{cursor:"default"}},labelPlacementStart:{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},labelPlacementTop:{flexDirection:"column-reverse",marginLeft:16},labelPlacementBottom:{flexDirection:"column",marginLeft:16},disabled:{},label:{"&$disabled":{color:e.palette.text.disabled}}}};r.styles=f;var m=l.forwardRef((function(e,t){e.checked;var r=e.classes,a=e.className,n=e.control,c=e.disabled,f=(e.inputRef,e.label),m=e.labelPlacement,h=void 0===m?"end":m,b=(e.name,e.onChange,e.value,(0,i.default)(e,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"])),g=(0,u.useFormControl)(),y=c;void 0===y&&void 0!==n.props.disabled&&(y=n.props.disabled),void 0===y&&g&&(y=g.disabled);var v={disabled:y};return["checked","name","onChange","value","inputRef"].forEach((function(t){void 0===n.props[t]&&void 0!==e[t]&&(v[t]=e[t])})),l.createElement("label",(0,o.default)({className:(0,s.default)(r.root,a,"end"!==h&&r["labelPlacement".concat((0,p.default)(h))],y&&r.disabled),ref:t},b),l.cloneElement(n,v),l.createElement(d.default,{component:"span",className:(0,s.default)(r.label,y&&r.disabled)},f))})),h=(0,c.default)(f,{name:"MuiFormControlLabel"})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControlLabel/FormControlLabel.js"}],[977,{"./FormControlLabel":976,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./FormControlLabel"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormControlLabel/index.js"}],[978,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{display:"flex",flexDirection:"column",flexWrap:"wrap"},row:{flexDirection:"row"}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.classes,a=e.className,n=e.row,u=void 0!==n&&n,c=(0,i.default)(e,["classes","className","row"]);return l.createElement("div",(0,o.default)({className:(0,s.default)(r.root,a,u&&r.row),ref:t},c))})),p=(0,u.default)(c,{name:"MuiFormGroup"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormGroup/FormGroup.js"}],[979,{"./FormGroup":978,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./FormGroup"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormGroup/index.js"}],[980,{"../FormControl/formControlState":973,"../FormControl/useFormControl":975,"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/objectWithoutProperties")),i=n(e("@babel/runtime/helpers/extends")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../FormControl/formControlState")),c=n(e("../FormControl/useFormControl")),d=n(e("../styles/withStyles")),p=function(e){return{root:(0,i.default)({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}};r.styles=p;var f=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,d=e.component,p=void 0===d?"p":d,f=(e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant,(0,o.default)(e,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"])),m=(0,c.default)(),h=(0,u.default)({props:e,muiFormControl:m,states:["variant","margin","disabled","error","filled","focused","required"]});return l.createElement(p,(0,i.default)({className:(0,s.default)(a.root,("filled"===h.variant||"outlined"===h.variant)&&a.contained,n,h.disabled&&a.disabled,h.error&&a.error,h.filled&&a.filled,h.focused&&a.focused,h.required&&a.required,"dense"===h.margin&&a.marginDense),ref:t},f)," "===r?l.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):r)})),m=(0,d.default)(p,{name:"MuiFormHelperText"})(f);r.default=m}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormHelperText/FormHelperText.js"}],[981,{"./FormHelperText":980,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./FormHelperText"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormHelperText/index.js"}],[982,{"../FormControl/formControlState":973,"../FormControl/useFormControl":975,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/objectWithoutProperties")),i=n(e("@babel/runtime/helpers/extends")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../FormControl/formControlState")),c=n(e("../FormControl/useFormControl")),d=n(e("../utils/capitalize")),p=n(e("../styles/withStyles")),f=function(e){return{root:(0,i.default)({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}};r.styles=f;var m=l.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,p=(e.color,e.component),f=void 0===p?"label":p,m=(e.disabled,e.error,e.filled,e.focused,e.required,(0,o.default)(e,["children","classes","className","color","component","disabled","error","filled","focused","required"])),h=(0,c.default)(),b=(0,u.default)({props:e,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]});return l.createElement(f,(0,i.default)({className:(0,s.default)(a.root,a["color".concat((0,d.default)(b.color||"primary"))],n,b.disabled&&a.disabled,b.error&&a.error,b.filled&&a.filled,b.focused&&a.focused,b.required&&a.required),ref:t},m),r,b.required&&l.createElement("span",{"aria-hidden":!0,className:(0,s.default)(a.asterisk,b.error&&a.error)}," ","*"))})),h=(0,p.default)(f,{name:"MuiFormLabel"})(m);r.default=h}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormLabel/FormLabel.js"}],[983,{"./FormLabel":982,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./FormLabel"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/FormLabel/index.js"}],[984,{"../styles/withStyles":1211,"../utils/requirePropFactory":1229,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/objectWithoutProperties")),i=n(e("@babel/runtime/helpers/extends")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=(n(e("../utils/requirePropFactory")),[0,1,2,3,4,5,6,7,8,9,10]),d=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function p(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1,r=parseFloat(e);return"".concat(r/t).concat(String(e).replace(String(r),"")||"px")}var f=function(e){return(0,i.default)({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-xs-center":{justifyContent:"center"},"justify-xs-flex-end":{justifyContent:"flex-end"},"justify-xs-space-between":{justifyContent:"space-between"},"justify-xs-space-around":{justifyContent:"space-around"},"justify-xs-space-evenly":{justifyContent:"space-evenly"}},function(e,t){var r={};return c.forEach((function(a){var n=e.spacing(a);0!==n&&(r["spacing-".concat(t,"-").concat(a)]={margin:"-".concat(p(n,2)),width:"calc(100% + ".concat(p(n),")"),"& > $item":{padding:p(n,2)}})})),r}(e,"xs"),e.breakpoints.keys.reduce((function(t,r){return function(e,t,r){var a={};d.forEach((function(e){var t="grid-".concat(r,"-").concat(e);if(!0!==e)if("auto"!==e){var n="".concat(Math.round(e/12*1e8)/1e6,"%");a[t]={flexBasis:n,flexGrow:0,maxWidth:n}}else a[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else a[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}})),"xs"===r?(0,i.default)(e,a):e[t.breakpoints.up(r)]=a}(t,e,r),t}),{}))};r.styles=f;var m=l.forwardRef((function(e,t){var r=e.alignContent,a=void 0===r?"stretch":r,n=e.alignItems,u=void 0===n?"stretch":n,c=e.classes,d=e.className,p=e.component,f=void 0===p?"div":p,m=e.container,h=void 0!==m&&m,b=e.direction,g=void 0===b?"row":b,y=e.item,v=void 0!==y&&y,w=e.justify,x=void 0===w?"flex-start":w,E=e.lg,_=void 0!==E&&E,C=e.md,T=void 0!==C&&C,k=e.sm,S=void 0!==k&&k,R=e.spacing,P=void 0===R?0:R,M=e.wrap,O=void 0===M?"wrap":M,D=e.xl,j=void 0!==D&&D,I=e.xs,A=void 0!==I&&I,q=e.zeroMinWidth,N=void 0!==q&&q,L=(0,o.default)(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),F=(0,s.default)(c.root,d,h&&[c.container,0!==P&&c["spacing-xs-".concat(String(P))]],v&&c.item,N&&c.zeroMinWidth,"row"!==g&&c["direction-xs-".concat(String(g))],"wrap"!==O&&c["wrap-xs-".concat(String(O))],"stretch"!==u&&c["align-items-xs-".concat(String(u))],"stretch"!==a&&c["align-content-xs-".concat(String(a))],"flex-start"!==x&&c["justify-xs-".concat(String(x))],!1!==A&&c["grid-xs-".concat(String(A))],!1!==S&&c["grid-sm-".concat(String(S))],!1!==T&&c["grid-md-".concat(String(T))],!1!==_&&c["grid-lg-".concat(String(_))],!1!==j&&c["grid-xl-".concat(String(j))]);return l.createElement(f,(0,i.default)({className:F,ref:t},L))})),h=(0,u.default)(f,{name:"MuiGrid"})(m),b=h;r.default=b}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Grid/Grid.js"}],[985,{"./Grid":984,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Grid"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Grid/index.js"}],[986,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776,"react-is":4629},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(e("react-is"),n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c={root:{display:"flex",flexWrap:"wrap",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.cellHeight,a=void 0===r?180:r,n=e.children,u=e.classes,c=e.className,d=e.cols,p=void 0===d?2:d,f=e.component,m=void 0===f?"ul":f,h=e.spacing,b=void 0===h?4:h,g=e.style,y=(0,i.default)(e,["cellHeight","children","classes","className","cols","component","spacing","style"]);return l.createElement(m,(0,o.default)({className:(0,s.default)(u.root,c),ref:t,style:(0,o.default)({margin:-b/2},g)},y),l.Children.map(n,(function(e){if(!l.isValidElement(e))return null;var t=e.props.cols||1,r=e.props.rows||1;return l.cloneElement(e,{style:(0,o.default)({width:"".concat(100/p*t,"%"),height:"auto"===a?"auto":a*r+b,padding:b/2},e.props.style)})})))})),p=(0,u.default)(c,{name:"MuiGridList"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/GridList/GridList.js"}],[987,{"./GridList":986,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./GridList"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/GridList/index.js"}],[988,{"../styles/withStyles":1211,"../utils/debounce":1222,"../utils/isMuiElement":1226,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/toConsumableArray":325,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=n(e("@babel/runtime/helpers/toConsumableArray")),s=a(e("react")),u=(n(e("prop-types")),n(e("clsx"))),c=n(e("../utils/debounce")),d=n(e("../styles/withStyles")),p=n(e("../utils/isMuiElement")),f={root:{boxSizing:"border-box",flexShrink:0},tile:{position:"relative",display:"block",height:"100%",overflow:"hidden"},imgFullHeight:{height:"100%",transform:"translateX(-50%)",position:"relative",left:"50%"},imgFullWidth:{width:"100%",position:"relative",transform:"translateY(-50%)",top:"50%"}};r.styles=f;var m=function(e,t){var r,a,n,o;e&&e.complete&&(e.width/e.height>e.parentElement.offsetWidth/e.parentElement.offsetHeight?((r=e.classList).remove.apply(r,(0,l.default)(t.imgFullWidth.split(" "))),(a=e.classList).add.apply(a,(0,l.default)(t.imgFullHeight.split(" ")))):((n=e.classList).remove.apply(n,(0,l.default)(t.imgFullHeight.split(" "))),(o=e.classList).add.apply(o,(0,l.default)(t.imgFullWidth.split(" ")))))};var h=s.forwardRef((function(e,t){var r=e.children,a=e.classes,n=e.className,l=(e.cols,e.component),d=void 0===l?"li":l,f=(e.rows,(0,i.default)(e,["children","classes","className","cols","component","rows"])),h=s.useRef(null);return s.useEffect((function(){!function(e,t){e&&(e.complete?m(e,t):e.addEventListener("load",(function(){m(e,t)})))}(h.current,a)})),s.useEffect((function(){var e=(0,c.default)((function(){m(h.current,a)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[a]),s.createElement(d,(0,o.default)({className:(0,u.default)(a.root,n),ref:t},f),s.createElement("div",{className:a.tile},s.Children.map(r,(function(e){return s.isValidElement(e)?"img"===e.type||(0,p.default)(e,["Image"])?s.cloneElement(e,{ref:h}):e:null}))))})),b=(0,d.default)(f,{name:"MuiGridListTile"})(h);r.default=b}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/GridListTile/GridListTile.js"}],[989,{"./GridListTile":988,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./GridListTile"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/GridListTile/index.js"}],[990,{"../styles/withStyles":1211,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,clsx:3586,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.styles=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("clsx"))),u=n(e("../styles/withStyles")),c=function(e){return{root:{position:"absolute",left:0,right:0,height:48,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily},titlePositionBottom:{bottom:0},titlePositionTop:{top:0},rootSubtitle:{height:68},titleWrap:{flexGrow:1,marginLeft:16,marginRight:16,color:e.palette.common.white,overflow:"hidden"},titleWrapActionPosLeft:{marginLeft:0},titleWrapActionPosRight:{marginRight:0},title:{fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},actionIcon:{},actionIconActionPosLeft:{order:-1}}};r.styles=c;var d=l.forwardRef((function(e,t){var r=e.actionIcon,a=e.actionPosition,n=void 0===a?"right":a,u=e.classes,c=e.className,d=e.subtitle,p=e.title,f=e.titlePosition,m=void 0===f?"bottom":f,h=(0,i.default)(e,["actionIcon","actionPosition","classes","className","subtitle","title","titlePosition"]),b=r&&n;return l.createElement("div",(0,o.default)({className:(0,s.default)(u.root,c,"top"===m?u.titlePositionTop:u.titlePositionBottom,d&&u.rootSubtitle),ref:t},h),l.createElement("div",{className:(0,s.default)(u.titleWrap,{left:u.titleWrapActionPosLeft,right:u.titleWrapActionPosRight}[b])},l.createElement("div",{className:u.title},p),d?l.createElement("div",{className:u.subtitle},d):null),r?l.createElement("div",{className:(0,s.default)(u.actionIcon,"left"===b&&u.actionIconActionPosLeft)},r):null)})),p=(0,u.default)(c,{name:"MuiGridListTileBar"})(d);r.default=p}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/GridListTileBar/GridListTileBar.js"}],[991,{"./GridListTileBar":990,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./GridListTileBar"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/GridListTileBar/index.js"}],[992,{"../styles/useTheme":1210,"../transitions/utils":1214,"../utils/useForkRef":1236,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"@babel/runtime/helpers/slicedToArray":323,"prop-types":4528,react:4776,"react-transition-group":1189},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/slicedToArray")),l=n(e("@babel/runtime/helpers/objectWithoutProperties")),s=a(e("react")),u=(n(e("prop-types")),e("react-transition-group")),c=n(e("../styles/useTheme")),d=e("../transitions/utils"),p=n(e("../utils/useForkRef"));function f(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var m={entering:{opacity:1,transform:f(1)},entered:{opacity:1,transform:"none"}},h=s.forwardRef((function(e,t){var r=e.children,a=e.disableStrictModeCompat,n=void 0!==a&&a,h=e.in,b=e.onEnter,g=e.onEntered,y=e.onEntering,v=e.onExit,w=e.onExited,x=e.onExiting,E=e.style,_=e.timeout,C=void 0===_?"auto":_,T=e.TransitionComponent,k=void 0===T?u.Transition:T,S=(0,l.default)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),R=s.useRef(),P=s.useRef(),M=(0,c.default)(),O=M.unstable_strictMode&&!n,D=s.useRef(null),j=(0,p.default)(r.ref,t),I=(0,p.default)(O?D:undefined,j),A=function(e){return function(t,r){if(e){var a=O?[D.current,t]:[t,r],n=(0,i.default)(a,2),o=n[0],l=n[1];l===undefined?e(o):e(o,l)}}},q=A(y),N=A((function(e,t){(0,d.reflow)(e);var r,a=(0,d.getTransitionProps)({style:E,timeout:C},{mode:"enter"}),n=a.duration,o=a.delay;"auto"===C?(r=M.transitions.getAutoHeightDuration(e.clientHeight),P.current=r):r=n,e.style.transition=[M.transitions.create("opacity",{duration:r,delay:o}),M.transitions.create("transform",{duration:.666*r,delay:o})].join(","),b&&b(e,t)})),L=A(g),F=A(x),W=A((function(e){var t,r=(0,d.getTransitionProps)({style:E,timeout:C},{mode:"exit"}),a=r.duration,n=r.delay;"auto"===C?(t=M.transitions.getAutoHeightDuration(e.clientHeight),P.current=t):t=a,e.style.transition=[M.transitions.create("opacity",{duration:t,delay:n}),M.transitions.create("transform",{duration:.666*t,delay:n||.333*t})].join(","),e.style.opacity="0",e.style.transform=f(.75),v&&v(e)})),B=A(w);return s.useEffect((function(){return function(){clearTimeout(R.current)}}),[]),s.createElement(k,(0,o.default)({appear:!0,in:h,nodeRef:O?D:undefined,onEnter:N,onEntered:L,onEntering:q,onExit:W,onExited:B,onExiting:F,addEndListener:function(e,t){var r=O?e:t;"auto"===C&&(R.current=setTimeout(r,P.current||0))},timeout:"auto"===C?null:C},S),(function(e,t){return s.cloneElement(r,(0,o.default)({style:(0,o.default)({opacity:0,transform:f(.75),visibility:"exited"!==e||h?undefined:"hidden"},m[e],E,r.props.style),ref:I},t))}))}));h.muiSupportAuto=!0;var b=h;r.default=b}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Grow/Grow.js"}],[993,{"./Grow":992,"@babel/runtime/helpers/interopRequireDefault":311},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n.default}});var n=a(e("./Grow"))}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Grow/index.js"}],[994,{"./HiddenCss":995,"./HiddenJs":996,"@babel/runtime/helpers/extends":307,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("@babel/runtime/helpers/extends")),i=n(e("@babel/runtime/helpers/objectWithoutProperties")),l=a(e("react")),s=(n(e("prop-types")),n(e("./HiddenJs"))),u=n(e("./HiddenCss"));function c(e){var t=e.implementation,r=void 0===t?"js":t,a=e.lgDown,n=void 0!==a&&a,c=e.lgUp,d=void 0!==c&&c,p=e.mdDown,f=void 0!==p&&p,m=e.mdUp,h=void 0!==m&&m,b=e.smDown,g=void 0!==b&&b,y=e.smUp,v=void 0!==y&&y,w=e.xlDown,x=void 0!==w&&w,E=e.xlUp,_=void 0!==E&&E,C=e.xsDown,T=void 0!==C&&C,k=e.xsUp,S=void 0!==k&&k,R=(0,i.default)(e,["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"]);return"js"===r?l.createElement(s.default,(0,o.default)({lgDown:n,lgUp:d,mdDown:f,mdUp:h,smDown:g,smUp:v,xlDown:x,xlUp:_,xsDown:T,xsUp:S},R)):l.createElement(u.default,(0,o.default)({lgDown:n,lgUp:d,mdDown:f,mdUp:h,smDown:g,smUp:v,xlDown:x,xlUp:_,xsDown:T,xsUp:S},R))}var d=c;r.default=d}}},{package:"@material-ui/core",file:"node_modules/@material-ui/core/Hidden/Hidden.js"}],[995,{"../styles/useTheme":1210,"../styles/withStyles":1211,"../utils/capitalize":1219,"@babel/runtime/helpers/defineProperty":306,"@babel/runtime/helpers/interopRequireDefault":311,"@babel/runtime/helpers/interopRequireWildcard":312,"@babel/runtime/helpers/objectWithoutProperties":318,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var a=e("@babel/runtime/helpers/interopRequireWildcard"),n=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(e("@babel/runtime/helpers/objectWithoutProperties")),i=n(e("@babel/runtime/helpers/defineProperty")),l=a(e("react")),s=(n(e("prop-types")),n(e("../utils/capitalize"))),u=n(e("../styles/withStyles")),c=n(e("../styles/useTheme"));function d(e){var t=e.children,r=e.classes,a=e.className,n=e.only,i=((0,o.default)(e,["children","classes","className","only"]),(0,c.default)()),u=[];a&&u.push(a);for(var d=0;d{(0,p.checkForLastErrorAndLog)()||s.default.error(e)})),[r]=t;let a=0,o="Title",i="file://";r&&({id:a,title:o,url:i}=r);const{origin:l,protocol:u}=i?new URL(i):{};if(!l||"null"===l)return{};return{id:a,title:o,origin:l,protocol:u,url:i}}(r),l=async e=>{var a;console.log("app/script/ui.js messageListener called ",e," isManifestV3 ",d.isManifestV3," isUIInitialised ",k," activeTab ",i," windowType ",r);"startUISync"===(null==e||null===(a=e.data)||void 0===a?void 0:a.method)&&((0,h.endTrace)({name:h.TraceName.BackgroundConnect}),d.isManifestV3&&k?function(e){const t=R(e);(0,u.updateBackgroundConnection)(t)}(o):await async function(e,t,r,a){try{const n=await async function(e,t,r){const a=R(t);return await(0,u.default)({activeTab:e,container:C,backgroundConnection:a,traceContext:r})}(e,t,a);(0,h.endTrace)({name:h.TraceName.UIStartup}),k=!0;const o=n.getState(),{metamask:{completedOnboarding:i}={}}=o;i||r===c.ENVIRONMENT_TYPE_FULLSCREEN||global.platform.openExtensionInBrowser()}catch(e){!async function(e,t,r){const a=await(0,m.getErrorHtml)(e,f.SUPPORT_LINK,r);C.innerHTML=a;const o=document.getElementById("critical-error-button");throw null==o||o.addEventListener("click",(e=>{n.default.runtime.reload()})),s.default.error(t.stack),t}("troubleStarting",e)}}(i,o,r,t),d.isManifestV3?await async function(){if((await n.default.storage.session.get(_))[_])return;const e=(0,y.getPlatform)();let t;try{const r=new URL("https://metamask.github.io/phishing-warning/v4.1.0/");let a,o;r.hash="#extensionStartup",t=window.document.createElement("iframe"),t.setAttribute("src",r.href),t.setAttribute("sandbox","allow-scripts allow-same-origin");const i=new Promise(((e,t)=>{a=e,o=t}));t.addEventListener("load",a),window.document.body.appendChild(t),setTimeout((()=>o(new S)),E),await i,e===c.PLATFORM_FIREFOX?console.error("Firefox does not support required MV3 APIs: Phishing warning page iframe and service worker will reload each page refresh"):n.default.storage.session.set({[_]:!0})}catch(e){e instanceof S?console.warn("Phishing warning page timeout; page not guaranteed to work offline."):console.error("Failed to initialize phishing warning page",e)}finally{t&&t.remove()}}():T.onMessage.removeListener(l))};if(d.isManifestV3){const e=()=>{console.log("resetExtensionStreamAndListeners called"),T.onMessage.removeListener(l),T.onDisconnect.removeListener(e),console.log("app/script/ui.js browser.runtime.connect called at 2 ",Date.now()," window type ",r),T=n.default.runtime.connect({name:r}),o=new a.default(T),T.onMessage.addListener(l),T.onDisconnect.addListener(e)};T.onDisconnect.addListener(e)}(0,h.trace)({name:h.TraceName.BackgroundConnect,parentContext:t}),T.onMessage.addListener(l)})().catch(s.default.error)}}},{package:"$root$",file:"app/scripts/ui.js"}]],[295],{}); \ No newline at end of file diff --git a/public/extensions/MetaMask_v10.22.2/ui-8.js b/public/extensions/MetaMask_v10.22.2/ui-8.js index 3b465786a..79197d99c 100644 --- a/public/extensions/MetaMask_v10.22.2/ui-8.js +++ b/public/extensions/MetaMask_v10.22.2/ui-8.js @@ -1 +1 @@ -LavaPack.loadBundle([[6369,{"../app/scripts/constants/sentry-state":7,"../app/scripts/lib/util":135,"../shared/constants/alerts":5246,"../shared/constants/app":5248,"../shared/constants/copy":5251,"../shared/lib/error-utils":5282,"../shared/lib/switch-direction":5289,"../shared/lib/trace":5291,"../shared/modules/object.utils":5312,"../shared/modules/selectors/networks":5320,"./ducks/alerts":6220,"./ducks/metamask/metamask":6236,"./helpers/utils/tags":6293,"./helpers/utils/tx-helper":6296,"./pages":6774,"./selectors":6985,"./store/actions":7e3,"./store/background-connection":7001,"./store/store":7002,"copy-to-clipboard":3622,lodash:4380,loglevel:4386,react:4776,"react-dom":4604,util:5174,"webextension-polyfill":5225},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=async function(e){const{backgroundConnection:t,traceContext:n}=e,o=await(0,v.trace)({name:v.TraceName.GetState,parentContext:n},(()=>(0,a.promisify)(t.getState.bind(t))())),r=await async function(e,t,n){const{traceContext:a}=n,o=(0,S.getStartupTraceTags)({metamask:e}),r=await(0,v.trace)({name:v.TraceName.SetupStore,parentContext:a,tags:o},(()=>O(e,t,n.activeTab)));return global.metamask={updateCurrentLocale:e=>{r.dispatch(b.updateCurrentLocale(e))},setFeatureFlag:(e,t)=>{r.dispatch(b.setFeatureFlag(e,t))}},await(0,v.trace)({name:v.TraceName.InitialActions,parentContext:a},(()=>async function(e){const t=e.getState(),n=(0,T.getNetworkToAutomaticallySwitchTo)(t);n?await e.dispatch(b.automaticallySwitchNetwork(n,(0,T.getOriginOfCurrentTab)(t))):(0,T.getSwitchedNetworkDetails)(t)&&await e.dispatch(b.clearSwitchedNetworkDetails());if((0,T.getUseRequestQueue)(t)&&(0,u.getEnvironmentType)()===p.ENVIRONMENT_TYPE_POPUP){const t=Date.now();global.metamask.id=t,await e.dispatch(b.setCurrentExtensionPopupId(t))}}(r))),(0,v.trace)({name:v.TraceName.FirstRender,parentContext:a},(()=>(0,l.render)(i.default.createElement(_.default,{store:r}),n.container))),r}(o,t,e);return await(0,a.promisify)(t.startPatches.bind(t))(),function(e){0;window.stateHooks.getCleanAppState=async function(){const t=(0,s.clone)(e.getState());return t.version=global.platform.getVersion(),t.browser=window.navigator.userAgent,t},window.stateHooks.getSentryAppState=function(){const t=e.getState();return(0,f.maskObject)(t,m.SENTRY_UI_STATE)},window.stateHooks.getLogs=function(){const t=e.getState(),{logs:n}=t.metamask;return Object.values(n).sort(((e,t)=>e.timestamp-t.timestamp))}}(r),r},n.setupInitialStore=O,n.updateBackgroundConnection=void 0;var a=e("util"),o=M(e("copy-to-clipboard")),r=M(e("loglevel")),s=e("lodash"),i=M(e("react")),l=e("react-dom"),c=M(e("webextension-polyfill")),u=e("../app/scripts/lib/util"),d=e("../shared/constants/alerts"),f=e("../shared/modules/object.utils"),m=e("../app/scripts/constants/sentry-state"),p=e("../shared/constants/app"),g=e("../shared/constants/copy"),h=M(e("../shared/lib/switch-direction")),y=e("../shared/lib/error-utils"),v=e("../shared/lib/trace"),x=e("../shared/modules/selectors/networks"),b=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=P(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("./store/actions")),k=M(e("./store/store")),T=e("./selectors"),w=e("./ducks/alerts"),C=e("./ducks/metamask/metamask"),_=M(e("./pages")),E=M(e("./helpers/utils/tx-helper")),I=e("./store/background-connection"),S=e("./helpers/utils/tags");function P(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(P=function(e){return e?n:t})(e)}function M(e){return e&&e.__esModule?e:{default:e}}let D;r.default.setLevel(global.METAMASK_DEBUG?"debug":"warn",!1);const A=e=>{(0,I.setBackgroundConnection)(e),e.onNotification((e=>{if("sendUpdate"!==e.method)throw new Error(`Internal JSON-RPC Notification Not Handled:\n\n ${JSON.stringify(e)}`);D.dispatch(b.updateMetamaskState(e.params[0]))}))};async function O(e,t,n){e.featureFlags||(e.featureFlags={});const{currentLocaleMessages:a,enLocaleMessages:o}=await(0,y.setupLocale)(e.currentLocale);"rtl"===e.textDirection&&(0,h.default)("rtl");const r={activeTab:n,metamask:e,appState:{},localeMessages:{currentLocale:e.currentLocale,current:a,en:o}};if(A(t),(0,u.getEnvironmentType)()===p.ENVIRONMENT_TYPE_POPUP){var s;const{origin:e}=r.activeTab,t=(0,T.getPermittedAccountsForCurrentTab)(r),n=(null===(s=(0,T.getSelectedInternalAccount)(r))||void 0===s?void 0:s.address)??"",a=(0,C.getUnconnectedAccountAlertShown)(r),o=(0,C.getUnconnectedAccountAlertEnabledness)(r);e&&o&&!a[e]&&t.length>0&&!t.includes(n)&&(r[d.AlertTypes.unconnectedAccount]={state:w.ALERT_STATE.OPEN},b.setUnconnectedAccountAlertShown(e))}const i=(0,k.default)(r);D=i;const l=(0,T.getUnapprovedTransactions)(e),c=(0,E.default)(l,e.unapprovedPersonalMsgs,e.unapprovedDecryptMsgs,e.unapprovedEncryptionPublicKeyMsgs,e.unapprovedTypedMessages,e.networkId,(0,x.getCurrentChainId)({metamask:e}));return c.length>0&&i.dispatch(b.showConfTxPage({id:c[0].id})),i}n.updateBackgroundConnection=A,window.logStateString=async function(e){const t=await window.stateHooks.getCleanAppState(),n=window.stateHooks.getLogs();c.default.runtime.getPlatformInfo().then((a=>{t.platform=a,t.logs=n;const o=JSON.stringify(t,null,2);e(null,o)})).catch((t=>{e(t)}))},window.logState=function(e){return window.logStateString(((t,n)=>{t?console.error(t.message):e?((0,o.default)(n,g.COPY_OPTIONS),console.log("State log copied")):console.log(n)}))}}}},{package:"$root$",file:"ui/index.js"}],[6370,{"../../../shared/modules/string-utils":5324,"../../components/app/assets/nfts/nft-details/nft-details":5381,"../../ducks/metamask/metamask":6236,"../../helpers/constants/routes":6254,"../../selectors":6985,"./components/native-asset":6377,"./components/token-asset":6378,"./util":6382,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("react-router-dom"),s=e("../../../shared/modules/string-utils"),i=p(e("../../components/app/assets/nfts/nft-details/nft-details")),l=e("../../selectors"),c=e("../../ducks/metamask/metamask"),u=e("../../helpers/constants/routes"),d=p(e("./components/token-asset")),f=e("./util"),m=p(e("./components/native-asset"));function p(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,o.useSelector)(l.getSelectedAccountTokensAcrossChains),t=(0,r.useParams)(),{chainId:n,asset:p,id:g}=t,h=(0,o.useSelector)((e=>(0,c.getNFTsByChainId)(e,n))),y=(0,f.findAssetByAddress)(e,p,n),v=h.find((({address:e,tokenId:t})=>(0,s.isEqualCaseInsensitive)(e,p)&&g===t.toString()));let x;return(0,a.useEffect)((()=>{const e=document.querySelector(".app");null==e||e.scroll(0,0)}),[]),x=v?a.default.createElement(i.default,{nft:v}):y&&n?null!=y&&y.address?a.default.createElement(d.default,{chainId:n,token:y}):a.default.createElement(m.default,{chainId:n,token:y}):a.default.createElement(r.Redirect,{to:{pathname:u.DEFAULT_ROUTE}}),a.default.createElement("div",{className:"main-container asset__container"},x)}}}},{package:"$root$",file:"ui/pages/asset/asset.tsx"}],[6371,{"../../../components/component-library":5806,"../../../components/ui/menu":6150,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/routes":6254,"../../../selectors":6985,"prop-types":4528,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=(a=e("prop-types"))&&a.__esModule?a:{default:a},s=e("react-router-dom"),i=e("react-redux"),l=e("../../../contexts/i18n"),c=e("../../../components/ui/menu"),u=e("../../../selectors"),d=e("../../../helpers/constants/routes"),f=e("../../../components/component-library"),m=e("../../../helpers/constants/design-system");function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}const g=({onRemove:e,onClickBlockExplorer:t,onViewTokenDetails:n,tokenSymbol:a,isNativeAsset:r})=>{const p=(0,o.useContext)(l.I18nContext),[g,h]=(0,o.useState)(!1),y=(0,s.useHistory)(),v=(0,i.useSelector)(u.getBlockExplorerLinkText),x=(0,o.useRef)(!1);return o.default.createElement("div",{ref:x},o.default.createElement(f.ButtonIcon,{className:"asset-options__button","data-testid":"asset-options__button",onClick:()=>h(!0),ariaLabel:p("assetOptions"),iconName:f.IconName.MoreVertical,color:m.Color.textDefault,size:f.ButtonIconSize.Sm}),g?o.default.createElement(c.Menu,{anchorElement:x.current,onHide:()=>h(!1)},o.default.createElement(c.MenuItem,{iconName:f.IconName.Export,"data-testid":"asset-options__etherscan",onClick:"addBlockExplorer"===v.firstPart?()=>{y.push(`${d.NETWORKS_ROUTE}#blockExplorerUrl`)}:()=>{h(!1),t()}},p(v.firstPart,""===v.secondPart?null:[p("blockExplorerAssetAction")])),r?null:o.default.createElement(c.MenuItem,{iconName:f.IconName.Trash,"data-testid":"asset-options__hide",onClick:()=>{h(!1),e()}},p("hideTokenSymbol",[a])),r||!n?null:o.default.createElement(c.MenuItem,{iconName:f.IconName.Info,"data-testid":"asset-options__token-details",onClick:()=>{h(!1),n()}},p("tokenDetails"))):null)};g.propTypes={isNativeAsset:r.default.bool,onClickBlockExplorer:r.default.func.isRequired,onRemove:e=>{if(!1===e.isNativeAsset&&"function"!=typeof e.onRemove)throw new Error("When isNativeAsset is true, onRemove is a required prop")},onViewTokenDetails:r.default.func,tokenSymbol:e=>{if(!1===e.isNativeAsset&&"string"!=typeof e.tokenSymbol)throw new Error("When isNativeAsset is true, tokenSymbol is a required prop")}};n.default=g}}},{package:"$root$",file:"ui/pages/asset/components/asset-options.js"}],[6372,{"../../../../shared/constants/transaction":5278,"../../../../shared/modules/conversion.utils":5301,"../../../../shared/modules/hexstring-utils":5307,"../../../components/app/assets/token-cell":5391,"../../../components/app/assets/util/calculateTokenBalance":5395,"../../../components/app/transaction-list":5724,"../../../components/app/wallet-overview/coin-buttons":5731,"../../../components/component-library":5806,"../../../components/multichain":5964,"../../../ducks/metamask/metamask":6236,"../../../ducks/ramps":6238,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/routes":6254,"../../../helpers/utils/confirm-tx.util":6275,"../../../helpers/utils/portfolio":6290,"../../../hooks/useI18nContext":6334,"../../../hooks/useMultichainSelector":6340,"../../../hooks/useTokenBalances":6356,"../../../selectors":6985,"../../../selectors/multichain":6990,"../util":6382,"./chart/asset-chart":6374,"./token-buttons":6379,"@metamask/assets-controllers":1381,"@metamask/keyring-api":1843,lodash:4380,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=O(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-router-dom"),r=e("react-redux"),s=e("@metamask/keyring-api"),i=e("lodash"),l=e("@metamask/assets-controllers"),c=e("../../../selectors"),u=e("../../../helpers/constants/design-system"),d=e("../../../components/component-library"),f=e("../../../helpers/utils/confirm-tx.util"),m=e("../../../hooks/useI18nContext"),p=e("../../../components/multichain"),g=e("../../../../shared/constants/transaction"),h=A(e("../../../components/app/assets/token-cell")),y=A(e("../../../components/app/transaction-list")),v=e("../util"),x=e("../../../helpers/constants/routes"),b=e("../../../ducks/metamask/metamask"),k=e("../../../../shared/modules/hexstring-utils"),T=A(e("../../../components/app/wallet-overview/coin-buttons")),w=e("../../../ducks/ramps"),C=e("../../../components/app/assets/util/calculateTokenBalance"),_=e("../../../hooks/useTokenBalances"),E=e("../../../hooks/useMultichainSelector"),I=e("../../../selectors/multichain"),S=e("../../../helpers/utils/portfolio"),P=e("../../../../shared/modules/conversion.utils"),M=A(e("./chart/asset-chart")),D=A(e("./token-buttons"));function A(e){return e&&e.__esModule?e:{default:e}}function O(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(O=function(e){return e?n:t})(e)}function F(e,t){return a.default.createElement(d.Box,{display:u.Display.Flex,justifyContent:u.JustifyContent.spaceBetween},a.default.createElement(d.Text,{color:u.TextColor.textAlternative,variant:u.TextVariant.bodyMdMedium},e),t)}n.default=({asset:e,optionsButton:t})=>{var n,A,O,N,R,j;const B=(0,m.useI18nContext)(),$=(0,o.useHistory)(),W=(0,r.useSelector)(c.getSelectedAccount),L=(0,r.useSelector)(c.getCurrentCurrency),G=(0,r.useSelector)(b.getConversionRate),q=(0,r.useSelector)(w.getIsNativeTokenBuyable),{chainId:V,type:H,symbol:U,name:z,image:K,decimals:Y}=e,J=(0,r.useSelector)((e=>(0,c.getSwapsDefaultToken)(e,V)),i.isEqual),Q=(0,r.useSelector)((e=>(0,c.getIsSwapsChain)(e,V))),X=(0,r.useSelector)((e=>(0,c.getIsBridgeChain)(e,V))),Z=(0,r.useSelector)(c.getSelectedInternalAccount,i.isEqual),ee=Z.methods.includes(s.EthMethod.SignTransaction)||Z.methods.includes(s.EthMethod.SignUserOperation),te=(0,r.useSelector)(c.getMarketData),ne=(0,r.useSelector)(c.getCurrencyRates),ae=(0,r.useSelector)(c.getIsTestnet),oe=(0,E.useMultichainSelector)(I.getMultichainShouldShowFiat,W),re=!ae,se=(0,r.useSelector)(c.getShowFiatInTestnets),ie=oe&&(re||ae&&se),le=(0,r.useSelector)(c.getSelectedAccountNativeTokenCachedBalanceByChainId),{tokenBalances:ce}=(0,_.useTokenBalances)({chainIds:[V]}),ue=ce[W.address],de=(0,r.useSelector)(c.getParticipateInMetaMetrics),fe=(0,r.useSelector)(c.getDataCollectionForMarketing),me=(0,r.useSelector)(c.getMetaMetricsId),pe=H===g.AssetType.token?(0,k.toChecksumHexAddress)(e.address):(0,l.getNativeTokenAddress)(V),ge=null==ue||null===(n=ue[V])||void 0===n?void 0:n[pe],he=(0,C.calculateTokenBalance)({isNative:H===g.AssetType.native,chainId:V,address:pe,decimals:Y,nativeBalances:le,selectedAccountTokenBalancesAcrossChains:ue}),ye=null===(A=te[V])||void 0===A||null===(A=A[pe])||void 0===A?void 0:A.currency,ve=(null===(O=te[V])||void 0===O||null===(O=O[pe])||void 0===O?void 0:O.price)||0,xe=H===g.AssetType.native?null===(N=ne[U])||void 0===N?void 0:N.conversionRate:(null===(R=ne[ye])||void 0===R?void 0:R.conversionRate)||0,be=ve*xe*parseFloat(String(he)),ke=xe!==undefined&&ve!==undefined?xe*ve:undefined,Te=null===(j=te[V])||void 0===j?void 0:j[pe],we=G>0&&Te&&(Te.marketCap>0||Te.totalVolume>0||Te.circulatingSupply>0||Te.allTimeHigh>0||Te.allTimeLow>0);e.balance={value:(0,P.hexToDecimal)(ge),display:String(he),fiat:String(be)};const Ce=(0,a.useMemo)((()=>(0,S.getPortfolioUrl)("","asset_page",me,de,fe,Z.address,"spending-caps")),[Z.address,fe,de,me]);return a.default.createElement(d.Box,{marginLeft:"auto",marginRight:"auto",marginTop:4,className:"asset__content"},a.default.createElement(d.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Row,justifyContent:u.JustifyContent.spaceBetween,paddingLeft:2,paddingRight:4,paddingBottom:1},a.default.createElement(d.Box,{display:u.Display.Flex},a.default.createElement(d.ButtonIcon,{color:u.IconColor.iconAlternative,marginRight:1,size:d.ButtonIconSize.Sm,ariaLabel:B("back"),iconName:d.IconName.ArrowLeft,onClick:()=>$.push(x.DEFAULT_ROUTE)}),a.default.createElement(d.Text,{"data-testid":"asset-name",color:u.TextColor.textAlternative},z&&U&&z!==U?`${z} (${U})`:z??U)),t),a.default.createElement(M.default,{chainId:V,address:pe,currentPrice:ke,currency:L}),a.default.createElement(d.Box,{marginTop:4},H===g.AssetType.native?a.default.createElement(T.default,{account:Z,trackingLocation:"asset-page",isBuyableChain:q,isSigningEnabled:ee,isSwapsChain:Q,isBridgeChain:X,chainId:V,defaultSwapsToken:J}):a.default.createElement(D.default,{token:e})),a.default.createElement(d.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Column,paddingTop:5},a.default.createElement(d.Text,{variant:u.TextVariant.headingMd,paddingBottom:2,paddingLeft:4},B("yourBalance")),a.default.createElement(h.default,{key:`${U}-${pe}`,address:pe,chainId:V,symbol:U,image:K,tokenFiatAmount:ie?be:null,string:null==he?void 0:he.toString()}),a.default.createElement(d.Box,{marginTop:2,display:u.Display.Flex,flexDirection:u.FlexDirection.Column,gap:7},[g.AssetType.token,g.AssetType.native].includes(H)&&a.default.createElement(d.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Column,paddingLeft:4,paddingRight:4},a.default.createElement(d.Text,{variant:u.TextVariant.headingMd,paddingBottom:4},B("tokenDetails")),a.default.createElement(d.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Column,gap:2},H===g.AssetType.token&&a.default.createElement(d.Box,null,F(B("contractAddress"),a.default.createElement(p.AddressCopyButton,{address:pe,shorten:!0})),a.default.createElement(d.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Column,gap:2},e.decimals!==undefined&&F(B("tokenDecimal"),a.default.createElement(d.Text,null,e.decimals)),e.aggregators&&e.aggregators.length>0&&a.default.createElement(d.Box,null,a.default.createElement(d.Text,{color:u.TextColor.textAlternative,variant:u.TextVariant.bodyMdMedium},B("tokenList")),a.default.createElement(d.Text,null,e.aggregators.join(", "))))),F(B("spendingCaps"),a.default.createElement(d.ButtonLink,{className:"asset-page__spending-caps mm-text--body-md-medium",href:Ce,target:"_blank",rel:"noopener noreferrer"},B("editInPortfolio"))))),we&&a.default.createElement(d.Box,{paddingLeft:4,paddingRight:4},a.default.createElement(d.Text,{variant:u.TextVariant.headingMd,paddingBottom:4},B("marketDetails")),a.default.createElement(d.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Column,gap:2},Te.marketCap>0&&F(B("marketCap"),a.default.createElement(d.Text,{"data-testid":"asset-market-cap"},(0,v.localizeLargeNumber)(B,xe*Te.marketCap))),Te.totalVolume>0&&F(B("totalVolume"),a.default.createElement(d.Text,null,(0,v.localizeLargeNumber)(B,xe*Te.totalVolume))),Te.circulatingSupply>0&&F(B("circulatingSupply"),a.default.createElement(d.Text,null,(0,v.localizeLargeNumber)(B,Te.circulatingSupply))),Te.allTimeHigh>0&&F(B("allTimeHigh"),a.default.createElement(d.Text,null,(0,f.formatCurrency)(""+xe*Te.allTimeHigh,L,(0,v.getPricePrecision)(xe*Te.allTimeHigh)))),Te.allTimeLow>0&&F(B("allTimeLow"),a.default.createElement(d.Text,null,(0,f.formatCurrency)(""+xe*Te.allTimeLow,L,(0,v.getPricePrecision)(xe*Te.allTimeLow)))))),a.default.createElement(d.Box,{marginBottom:8},a.default.createElement(d.Text,{paddingLeft:4,paddingRight:4,variant:u.TextVariant.headingMd},B("yourActivity")),H===g.AssetType.native?a.default.createElement(y.default,{hideTokenTransactions:!0,tokenChainId:V}):a.default.createElement(y.default,{tokenAddress:pe,tokenChainId:V})))))}}}},{package:"$root$",file:"ui/pages/asset/components/asset-page.tsx"}],[6373,{"../../../components/component-library":5806,"../../../helpers/constants/design-system":6248,"../../../helpers/utils/confirm-tx.util":6275,"../util":6382,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("../../../helpers/constants/design-system"),r=e("../../../components/component-library"),s=e("../../../helpers/utils/confirm-tx.util"),i=e("../util");function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}const c=a.default.createElement("svg",{className:"chart-up",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.default.createElement("path",{d:"M9.75 3.8125L6.25 7.4875L4.91667 5.3875L2.25 8.1875",strokeLinecap:"round",strokeLinejoin:"round"}),a.default.createElement("path",{d:"M8.08398 3.8125H9.75065V5.5625",strokeLinecap:"round",strokeLinejoin:"round"})),u=a.default.createElement("svg",{className:"chart-down",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.default.createElement("path",{d:"M9.75 8.1875L6.25 4.5125L4.91667 6.6125L2.25 3.8125",strokeLinecap:"round",strokeLinejoin:"round"}),a.default.createElement("path",{d:"M8.08398 8.1875H9.75065V6.4375",strokeLinecap:"round",strokeLinejoin:"round"})),d=(0,a.forwardRef)(((e,t)=>{const[{price:n,date:l},d]=(0,a.useState)({price:e.price,date:e.date});(0,a.useImperativeHandle)(t,(()=>({setPrice:d})));const{loading:f,currency:m,comparePrice:p}=e,g=n!==undefined&&p!==undefined?n-p:undefined;return a.default.createElement(r.Box,{marginLeft:4,marginRight:4},a.default.createElement(r.Text,{"data-testid":"asset-hovered-price",style:{width:"100px"},variant:o.TextVariant.headingLg,borderRadius:o.BorderRadius.LG,marginBottom:1,backgroundColor:f&&!n?o.BackgroundColor.backgroundAlternative:o.BackgroundColor.transparent},n?(0,s.formatCurrency)(`${n}`,m,(0,i.getPricePrecision)(n)):" "),a.default.createElement(r.Box,null,g!==undefined&&p!==undefined?a.default.createElement(r.Box,{style:{opacity:f?i.loadingOpacity:1}},g>=0?c:u,a.default.createElement(r.Text,{display:o.Display.InlineBlock,variant:o.TextVariant.bodyMdMedium,marginLeft:1,marginRight:1,color:g>=0?o.TextColor.successDefault:o.TextColor.errorDefault},(0,s.formatCurrency)(`${Math.abs(g)}`,m,(0,i.getPricePrecision)(g))," ","(",g>=0?"+":"",(g/p*100).toFixed(2),"%)"),a.default.createElement(r.Text,{display:o.Display.InlineBlock,variant:o.TextVariant.bodyMdMedium,color:o.TextColor.textAlternative},(0,i.getShortDateFormatter)().format(l))):a.default.createElement(r.Text,{style:{width:"200px"},backgroundColor:f?o.BackgroundColor.backgroundAlternative:o.BackgroundColor.transparent,borderRadius:o.BorderRadius.LG,variant:o.TextVariant.bodyMdMedium}," ")))}));n.default=d}}},{package:"$root$",file:"ui/pages/asset/components/asset-price.tsx"}],[6374,{"../../../../components/component-library":5806,"../../../../helpers/constants/design-system":6248,"../../../../hooks/useI18nContext":6334,"../../../../hooks/useTheme":6354,"../../useHistoricalPrices":6381,"../../util":6382,"../asset-price":6373,"./chart-tooltip":6375,"./crosshair-plugin":6376,"@metamask/design-tokens":1448,"chart.js":3579,classnames:3584,react:4776,"react-chartjs-2":4600},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("chart.js"),r=e("react-chartjs-2"),s=y(e("classnames")),i=e("@metamask/design-tokens"),l=e("../../../../hooks/useTheme"),c=e("../../../../helpers/constants/design-system"),u=e("../../../../components/component-library"),d=e("../../../../hooks/useI18nContext"),f=e("../../useHistoricalPrices"),m=e("../../util"),p=y(e("../asset-price")),g=y(e("./chart-tooltip")),h=e("./crosshair-plugin");function y(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t=e.ctx.createLinearGradient(0,0,0,e.height);return t.addColorStop(0,`${e.options.borderColor}60`),t.addColorStop(1,`${e.options.borderColor}00`),t},elements:{line:{borderWidth:2},point:{pointStyle:!1}},plugins:{decimation:{algorithm:"lttb",samples:150,threshold:150,enabled:!0}}};n.default=({chainId:e,address:t,currentPrice:n,currency:o})=>{var h;const y=(0,d.useI18nContext)(),v=(0,l.useTheme)(),[k,T]=(0,a.useState)("1D"),w=(0,a.useRef)(),C=(0,a.useRef)(),{loading:_,data:{prices:E,edges:I}}=(0,f.useHistoricalPrices)({chainId:e,address:t,currency:o,timeRange:k}),{xMin:S,xMax:P,yMin:M,yMax:D}=I??{},A={...b,borderColor:"dark"===v?i.brandColor.blue400:i.brandColor.blue500,scales:{x:{min:null==S?void 0:S.x,max:null==P?void 0:P.x,display:!1,type:"linear"},y:{min:null==M?void 0:M.y,max:null==D?void 0:D.y,display:!1}}};return n&&(_||E)?a.default.createElement(u.Box,{borderRadius:c.BorderRadius.LG},a.default.createElement(p.default,{ref:C,loading:_,currency:o,price:n,date:Date.now(),comparePrice:null==E||null===(h=E[0])||void 0===h?void 0:h.y}),a.default.createElement(u.Box,{"data-testid":"asset-price-chart",marginTop:4,borderRadius:c.BorderRadius.LG,backgroundColor:_&&!E?c.BackgroundColor.backgroundAlternative:c.BackgroundColor.transparent},a.default.createElement(u.Box,{style:{opacity:_&&E?m.loadingOpacity:1}},a.default.createElement(g.default,x({point:D},I,{currency:o})),a.default.createElement(u.Box,{style:{aspectRatio:`${A.aspectRatio}`},display:c.Display.Flex,flexDirection:c.FlexDirection.Column,justifyContent:n?c.JustifyContent.flexEnd:c.JustifyContent.flexStart},a.default.createElement(r.Line,{ref:w,data:{datasets:[{data:E}]},options:A,updateMode:"none",onMouseMove:e=>{var t;const n=null==w||null===(t=w.current)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.datasets)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.data;if(n){const t=e.target,o=n[Math.max(0,Math.min(n.length-1,Math.round(e.nativeEvent.offsetX/t.clientWidth*n.length)))];var a;if(o)null==C||null===(a=C.current)||void 0===a||a.setPrice({price:o.y,date:o.x})}},onMouseOut:()=>{var e;null==C||null===(e=C.current)||void 0===e||e.setPrice({price:n,date:Date.now()})}})),a.default.createElement(g.default,x({point:M},I,{currency:o}))),a.default.createElement(u.Box,{style:E?undefined:{visibility:"hidden"},display:c.Display.Flex,justifyContent:c.JustifyContent.spaceBetween,marginTop:4,marginLeft:4,marginRight:4},[[y("oneDayAbbreviation"),"1D"],[y("oneWeekAbbreviation"),"7D"],[y("oneMonthAbbreviation"),"1M"],[y("threeMonthsAbbreviation"),"3M"],[y("oneYearAbbreviation"),"1Y"],[y("all"),"1000Y"]].map((([e,t])=>a.default.createElement(u.ButtonBase,{key:t,className:(0,s.default)("time-range-button",{"time-range-button__selected":t===k}),onClick:()=>T(t),variant:c.TextVariant.bodySmMedium,size:u.ButtonBaseSize.Sm,backgroundColor:c.BackgroundColor.transparent,color:c.TextColor.textAlternative},e)))))):null}}}},{package:"$root$",file:"ui/pages/asset/components/chart/asset-chart.tsx"}],[6375,{"../../../../components/component-library":5806,"../../../../helpers/constants/design-system":6248,"../../../../helpers/utils/confirm-tx.util":6275,"../../util":6382,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../components/component-library"),s=e("../../../../helpers/utils/confirm-tx.util"),i=e("../../../../helpers/constants/design-system"),l=e("../../util");n.default=({point:e,xMin:t,xMax:n,currency:a})=>{const c=e&&t&&n?(e.x-t.x)/(n.x-t.x):0;return o.default.createElement(r.Box,{style:{...c<.5?{paddingRight:100-200*c+"%"}:{paddingLeft:100-2*(100-100*c)+"%"},direction:c<.5?r.TextDirection.LeftToRight:r.TextDirection.RightToLeft}},o.default.createElement(r.Text,{marginLeft:4,marginRight:4,variant:i.TextVariant.bodySmMedium,color:i.TextColor.textAlternative,textAlign:i.TextAlign.Center},(null==e?void 0:e.y)===undefined?" ":(0,s.formatCurrency)(`${null==e?void 0:e.y}`,a,(0,l.getPricePrecision)(null==e?void 0:e.y))))}}}},{package:"$root$",file:"ui/pages/asset/components/chart/chart-tooltip.tsx"}],[6376,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.CrosshairPlugin=void 0;n.CrosshairPlugin={id:"crosshair",afterEvent(e,{event:t}){e.crosshairX="mouseout"===t.type?undefined:t.x??undefined,e.draw()},afterDraw(e){if(e.crosshairX!==undefined){const t=e.data.datasets[0].data,n=t[Math.max(0,Math.min(t.length-1,Math.round(e.crosshairX/e.width*t.length)))];if(n){const{x:t,y:a}=e.scales,o=t.getPixelForValue(n.x),r=a.getPixelForValue(n.y);e.ctx.lineWidth=1,e.ctx.strokeStyle="#BBC0C5",e.ctx.beginPath(),e.ctx.moveTo(o,0),e.ctx.lineTo(o,e.height),e.ctx.stroke(),e.ctx.beginPath(),e.ctx.arc(o,r,3,0,2*Math.PI),e.ctx.fillStyle=e.options.borderColor,e.ctx.fill()}}}}}}},{package:"$root$",file:"ui/pages/asset/components/chart/crosshair-plugin.ts"}],[6377,{"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/transaction":5278,"../../../../shared/modules/selectors/networks":5320,"../../../contexts/metametrics":6214,"../../../helpers/utils/util":6297,"../../../hooks/useIsOriginalNativeTokenSymbol":6335,"../../../selectors":6985,"./asset-options":6371,"./asset-page":6372,"@metamask/etherscan-link":1752,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("@metamask/etherscan-link"),s=e("../../../selectors"),i=e("../../../../shared/modules/selectors/networks"),l=e("../../../../shared/constants/transaction"),c=e("../../../hooks/useIsOriginalNativeTokenSymbol"),u=e("../../../../shared/constants/metametrics"),d=e("../../../helpers/utils/util"),f=e("../../../contexts/metametrics"),m=g(e("./asset-options")),p=g(e("./asset-page"));function g(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}n.default=({token:e,chainId:t})=>{const{symbol:n}=e,g=(0,s.getNativeCurrencyForChain)(t),{type:h}=(0,o.useSelector)(i.getProviderConfig)??{},{address:y}=(0,o.useSelector)(s.getSelectedInternalAccount),v=(0,o.useSelector)(s.getRpcPrefsForCurrentProvider),x=(0,r.getAccountLink)(y,t,v),b=(0,a.useContext)(f.MetaMetricsContext),k=(0,c.useIsOriginalNativeTokenSymbol)(t,n,h);return a.default.createElement(p.default,{asset:{chainId:t,type:l.AssetType.native,symbol:n,image:g,decimals:e.decimals,isOriginalNativeSymbol:!0===k},optionsButton:a.default.createElement(m.default,{isNativeAsset:!0,onClickBlockExplorer:()=>{b({event:"Clicked Block Explorer Link",category:u.MetaMetricsEventCategory.Navigation,properties:{link_type:"Account Tracker",action:"Asset Options",block_explorer_domain:(0,d.getURLHostName)(x)}}),global.platform.openTab({url:x})}})})}}}},{package:"$root$",file:"ui/pages/asset/components/native-asset.tsx"}],[6378,{"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/transaction":5278,"../../../../shared/modules/selectors/networks":5320,"../../../../shared/modules/string-utils":5324,"../../../contexts/metametrics":6214,"../../../helpers/utils/util":6297,"../../../hooks/useTokenFiatAmount":6360,"../../../hooks/useTokenTracker":6363,"../../../selectors":6985,"../../../store/actions":7e3,"./asset-options":6371,"./asset-page":6372,"@metamask/etherscan-link":1752,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("@metamask/etherscan-link"),s=e("react-router-dom"),i=e("../../../selectors"),l=e("../../../../shared/modules/string-utils"),c=e("../../../hooks/useTokenTracker"),u=e("../../../../shared/constants/transaction"),d=e("../../../hooks/useTokenFiatAmount"),f=e("../../../helpers/utils/util"),m=e("../../../contexts/metametrics"),p=e("../../../store/actions"),g=e("../../../../shared/constants/metametrics"),h=e("../../../../shared/modules/selectors/networks"),y=x(e("./asset-options")),v=x(e("./asset-page"));function x(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}n.default=({token:e,chainId:t})=>{var n,x,b;const{address:k,symbol:T,isERC721:w}=e,C=(0,o.useSelector)(i.getTokenList),_=(0,o.useSelector)(h.getNetworkConfigurationsByChainId),E=null===(n=_[t])||void 0===n?void 0:n.defaultBlockExplorerUrlIndex,I=E===undefined?null:null===(x=_[t])||void 0===x?void 0:x.blockExplorerUrls[E],{address:S}=(0,o.useSelector)(i.getSelectedInternalAccount),P=(0,o.useSelector)(i.selectERC20TokensByChain),M=(0,s.useHistory)(),D=(0,o.useDispatch)(),A=(0,a.useContext)(m.MetaMetricsContext),O=Object.values(C).find((e=>(0,l.isEqualCaseInsensitive)(e.symbol,T)&&(0,l.isEqualCaseInsensitive)(e.address,k))),F=null==P||null===(b=P[t])||void 0===b||null===(b=b.data)||void 0===b?void 0:b[k.toLowerCase()],N=(null==O?void 0:O.name)||(null==F?void 0:F.name)||T,R=(null==O?void 0:O.iconUrl)||(null==F?void 0:F.iconUrl)||"",j=null==O?void 0:O.aggregators,{tokensWithBalances:B}=(0,c.useTokenTracker)({tokens:[e],address:undefined}),$=null==B?void 0:B[0],W=(0,d.useTokenFiatAmount)(k,null==$?void 0:$.string,T,{},!1),L=(0,r.getTokenTrackerLink)(e.address,t,"",S,{blockExplorerUrl:I??""});return a.default.createElement(v.default,{asset:{chainId:t,type:u.AssetType.token,address:k,symbol:T,name:N,decimals:e.decimals,image:R,aggregators:j,balance:{value:null==$?void 0:$.balance,display:`${(0,f.roundToDecimalPlacesRemovingExtraZeroes)(null==$?void 0:$.string,5)}`,fiat:W},isERC721:w},optionsButton:a.default.createElement(y.default,{isNativeAsset:!1,onRemove:()=>D((0,p.showModal)({name:"HIDE_TOKEN_CONFIRMATION",token:e,history:M})),onClickBlockExplorer:()=>{A({event:"Clicked Block Explorer Link",category:g.MetaMetricsEventCategory.Navigation,properties:{link_type:"Token Tracker",action:"Token Options",block_explorer_domain:(0,f.getURLHostName)(L)}}),global.platform.openTab({url:L})},tokenSymbol:e.symbol})})}}}},{package:"$root$",file:"ui/pages/asset/components/token-asset.tsx"}],[6379,{"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/transaction":5278,"../../../../shared/modules/selectors/networks":5320,"../../../components/component-library":5806,"../../../components/ui/icon-button/icon-button":6118,"../../../contexts/i18n":6211,"../../../contexts/metametrics":6214,"../../../ducks/ramps":6238,"../../../ducks/send":6241,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/error-keys":6249,"../../../helpers/constants/routes":6254,"../../../helpers/utils/hardware":6279,"../../../hooks/bridge/useBridging":6300,"../../../hooks/ramps/useRamps/useRamps":6311,"../../../selectors":6985,"../../../store/actions":7e3,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=_(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("react-router-dom"),s=e("../../../contexts/i18n"),i=e("../../../helpers/constants/routes"),l=e("../../../ducks/send"),c=e("../../../helpers/utils/hardware"),u=e("../../../ducks/swaps/swaps"),d=C(e("../../../hooks/ramps/useRamps/useRamps")),f=e("../../../selectors"),m=e("../../../../shared/modules/selectors/networks"),p=C(e("../../../hooks/bridge/useBridging")),g=e("../../../helpers/constants/error-keys"),h=e("../../../store/actions"),y=e("../../../contexts/metametrics"),v=e("../../../../shared/constants/metametrics"),x=e("../../../../shared/constants/transaction"),b=e("../../../helpers/constants/design-system"),k=C(e("../../../components/ui/icon-button/icon-button")),T=e("../../../components/component-library"),w=e("../../../ducks/ramps");function C(e){return e&&e.__esModule?e:{default:e}}function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}n.default=({token:e})=>{const t=(0,o.useDispatch)(),n=(0,a.useContext)(s.I18nContext),C=(0,a.useContext)(y.MetaMetricsContext),_=(0,r.useHistory)(),E=(0,o.useSelector)(f.getCurrentKeyring),I=(0,c.isHardwareKeyring)(E.type),S=(0,o.useSelector)(m.getCurrentChainId),P=(0,o.useSelector)(f.getNetworkConfigurationIdByChainId),M=(0,o.useSelector)(f.getIsSwapsChain),D=(0,o.useSelector)(f.getIsBridgeChain),A=(0,o.useSelector)(w.getIsNativeTokenBuyable),{openBuyCryptoInPdapp:O}=(0,d.default)(),{openBridgeExperience:F}=(0,p.default)();(0,a.useEffect)((()=>{e.isERC721&&t((0,h.showModal)({name:"CONVERT_TOKEN_TO_NFT",tokenAddress:e.address}))}),[e.isERC721,e.address,t]);const N=async()=>{if(S!==e.chainId)try{const n=P[e.chainId];await t((0,h.setActiveNetworkWithError)(n)),await t((0,h.setSwitchedNetworkDetails)({networkClientId:n}))}catch(t){throw console.error(`Failed to switch chains.\n Target chainId: ${e.chainId}, Current chainId: ${S}.\n ${t}`),t}};return a.default.createElement(T.Box,{display:b.Display.Flex,justifyContent:b.JustifyContent.spaceEvenly},a.default.createElement(k.default,{className:"token-overview__button",Icon:a.default.createElement(T.Icon,{name:T.IconName.PlusMinus,color:b.IconColor.primaryInverse,size:T.IconSize.Sm}),label:n("buyAndSell"),"data-testid":"token-overview-buy",onClick:()=>{O(),C({event:v.MetaMetricsEventName.NavBuyButtonClicked,category:v.MetaMetricsEventCategory.Navigation,properties:{location:"Token Overview",text:"Buy",chain_id:S,token_symbol:e.symbol}})},disabled:e.isERC721||!A,tooltipRender:null}),a.default.createElement(k.default,{className:"token-overview__button",onClick:async()=>{C({event:v.MetaMetricsEventName.NavSendButtonClicked,category:v.MetaMetricsEventCategory.Navigation,properties:{token_symbol:e.symbol,location:v.MetaMetricsSwapsEventSource.TokenView,text:"Send",chain_id:e.chainId}},{excludeMetaMetricsId:!1});try{await N(),await t((0,l.startNewDraftTransaction)({type:x.AssetType.token,details:e})),_.push(i.SEND_ROUTE)}catch(e){if(!e.message.includes(g.INVALID_ASSET_TYPE))throw e}},Icon:a.default.createElement(T.Icon,{name:T.IconName.Arrow2UpRight,color:b.IconColor.primaryInverse,size:T.IconSize.Sm}),label:n("send"),"data-testid":"eth-overview-send",disabled:e.isERC721,tooltipRender:null}),M&&a.default.createElement(k.default,{className:"token-overview__button",Icon:a.default.createElement(T.Icon,{name:T.IconName.SwapHorizontal,color:b.IconColor.primaryInverse,size:T.IconSize.Sm}),onClick:async()=>{var n,a,o,r,s;(await N(),C({event:v.MetaMetricsEventName.NavSwapButtonClicked,category:v.MetaMetricsEventCategory.Swaps,properties:{token_symbol:e.symbol,location:v.MetaMetricsSwapsEventSource.TokenView,text:"Swap",chain_id:S}}),t((0,u.setSwapsFromToken)({...e,address:null===(n=e.address)||void 0===n?void 0:n.toLowerCase(),iconUrl:e.image,balance:null==e||null===(a=e.balance)||void 0===a?void 0:a.value,string:null==e||null===(o=e.balance)||void 0===o?void 0:o.display})),I)?null===(r=(s=global.platform).openExtensionInBrowser)||void 0===r||r.call(s,i.PREPARE_SWAP_ROUTE,undefined,!1):_.push(i.PREPARE_SWAP_ROUTE)},label:n("swap"),tooltipRender:null}),D&&a.default.createElement(k.default,{className:"token-overview__button","data-testid":"token-overview-bridge",Icon:a.default.createElement(T.Icon,{name:T.IconName.Bridge,color:b.IconColor.primaryInverse,size:T.IconSize.Sm}),label:n("bridge"),onClick:()=>{var t,n;F(v.MetaMetricsSwapsEventSource.TokenView,{...e,iconUrl:e.image,balance:null==e||null===(t=e.balance)||void 0===t?void 0:t.value,string:null==e||null===(n=e.balance)||void 0===n?void 0:n.display,name:e.name??""})},tooltipRender:null}))}}}},{package:"$root$",file:"ui/pages/asset/components/token-buttons.tsx"}],[6380,{"./asset":6370},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./asset"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/asset/index.js"}],[6381,{"../../../shared/constants/time":5276,"../../../shared/lib/fetch-with-cache":5283,"../../selectors":6985,"./util":6382,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useHistoricalPrices=void 0;var a,o=e("react"),r=e("react-redux"),s=(a=e("../../../shared/lib/fetch-with-cache"))&&a.__esModule?a:{default:a},i=e("../../../shared/constants/time"),l=e("../../selectors"),c=e("./util");n.useHistoricalPrices=({chainId:e,address:t,currency:n,timeRange:a})=>{const u=(0,r.useSelector)(l.getShouldShowFiat)&&(0,c.chainSupportsPricing)(e),[d,f]=(0,o.useState)(u),[m,p]=(0,o.useState)({});return(0,o.useEffect)((()=>{u?(f(!0),(0,s.default)({url:`https://price.api.cx.metamask.io/v1/chains/${e}/historical-prices/${t}?vsCurrency=${n}&timePeriod=${a}`,cacheOptions:{cacheRefreshTime:5*i.MINUTE},functionName:"GetAssetHistoricalPrices",fetchOptions:{headers:{"X-Client-Id":"extension"}}}).catch((()=>({}))).then((e=>{var t;const n=null==e||null===(t=e.prices)||void 0===t?void 0:t.map((e=>({x:null==e?void 0:e[0],y:null==e?void 0:e[1]})));let a;if(n&&n.length>0){let[e,t,o,r]=[];for(const a of n)e=!e||a.xt.x?a:t,o=!o||a.yr.y?a:r;a={xMin:e,xMax:t,yMin:o,yMax:r}}p({prices:n,edges:a}),f(!1)}))):(p({}),f(!1))}),[u,e,t,n,a]),{loading:d,data:m}}}}},{package:"$root$",file:"ui/pages/asset/useHistoricalPrices.ts"}],[6382,{"@metamask/assets-controllers":1381},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.localizeLargeNumber=n.loadingOpacity=n.getShortDateFormatterV2=n.getShortDateFormatter=n.getPricePrecision=n.findAssetByAddress=n.chainSupportsPricing=void 0;var a=e("@metamask/assets-controllers");n.getShortDateFormatter=()=>Intl.DateTimeFormat(navigator.language,{month:"short",day:"numeric",hour:"numeric",minute:"numeric"});n.getShortDateFormatterV2=()=>Intl.DateTimeFormat(navigator.language,{year:"numeric",month:"short",day:"numeric"});n.localizeLargeNumber=(e,t)=>t>=1e12?`${(t/1e12).toFixed(2)}${e("trillionAbbreviation")}`:t>=1e9?`${(t/1e9).toFixed(2)}${e("billionAbbreviation")}`:t>=1e6?`${(t/1e6).toFixed(2)}${e("millionAbbreviation")}`:t.toFixed(2);n.getPricePrecision=e=>{if(0===e)return 1;let t=2;for(let n=Math.abs(e);n<1;t++)n*=10;return t};n.chainSupportsPricing=e=>a.SUPPORTED_CHAIN_IDS.includes(e);n.loadingOpacity=.2;n.findAssetByAddress=(e,t,n)=>{if(!n)return console.error("Chain ID is required."),null;const a=e[n];return a?t?a.find((e=>e.address&&e.address.toLowerCase()===t.toLowerCase())):a.find((e=>!e.address)):(console.warn(`No tokens found for chainId: ${n}`),null)}}}},{package:"$root$",file:"ui/pages/asset/util.ts"}],[6384,{"../../../../shared/constants/network":5264,"../../../../shared/modules/Numeric":5294,"../../../../shared/modules/selectors/networks":5320,"../../../store/actions":7e3,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const e=(0,a.useDispatch)(),t=(0,a.useSelector)(i.getNetworkConfigurationsByChainId),n=(0,a.useSelector)(i.getSelectedNetworkClientId);return{addSourceToken:t=>{const{address:a,decimals:o,symbol:r,icon:i}=t.quote.srcAsset;e((0,s.addToken)({address:a,decimals:o,symbol:r,image:i,networkClientId:n}))},addDestToken:async n=>{const a=new o.Numeric(n.quote.destChainId,10).toPrefixedHexString().toLowerCase(),i=t[a];let l;if(!i){const t=r.FEATURED_RPCS.find((e=>e.chainId===a));if(!t)throw new Error("No featured RPC found");l=await e((0,s.addNetwork)(t))}const c=i||l;if(!c)throw new Error("No destination network configuration found");const u=c.defaultRpcEndpointIndex,d=c.rpcEndpoints[u].networkClientId,{address:f,decimals:m,symbol:p,icon:g}=n.quote.destAsset;await e((0,s.addToken)({address:f,decimals:m,symbol:p,image:g,networkClientId:d}))}}};var a=e("react-redux"),o=e("../../../../shared/modules/Numeric"),r=e("../../../../shared/constants/network"),s=e("../../../store/actions"),i=e("../../../../shared/modules/selectors/networks")}}},{package:"$root$",file:"ui/pages/bridge/hooks/useAddToken.ts"}],[6385,{"../../../../shared/constants/bridge":5249,"../../../../shared/modules/Numeric":5294,"../../../ducks/bridge/actions":6224,"../bridge.util":6383,"../types":6400,"./useHandleTx":6387,"@metamask/transaction-controller":2698,"bignumber.js":3465},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const{handleTx:e}=(0,d.default)();return{handleApprovalTx:async({approval:t,quoteResponse:n})=>{const a=new l.Numeric(t.chainId,10).toPrefixedHexString();(0,i.isEthUsdt)(a,n.quote.srcAsset.address)&&await(async({approval:t,quoteResponse:n,hexChainId:a})=>{const l=new r.BigNumber(await(0,u.getBridgeERC20Allowance)(c.ETH_USDT_ADDRESS,a)),d=new r.BigNumber(n.quote.srcTokenAmount).plus(n.quote.feeData[s.FeeType.METABRIDGE].amount).toString();if(l.lt(d)&&l.gt(0)){const n={...t,data:(0,i.getEthUsdtResetData)()};await e({txType:o.TransactionType.bridgeApproval,txParams:n,swapsOptions:{hasApproveTx:!0,meta:{type:o.TransactionType.bridgeApproval}}})}})({approval:t,quoteResponse:n,hexChainId:a});return(await e({txType:o.TransactionType.bridgeApproval,txParams:t,swapsOptions:{hasApproveTx:!0,meta:{type:o.TransactionType.bridgeApproval,sourceTokenSymbol:n.quote.srcAsset.symbol}}})).id}}};var a,o=e("@metamask/transaction-controller"),r=e("bignumber.js"),s=e("../types"),i=e("../bridge.util"),l=e("../../../../shared/modules/Numeric"),c=e("../../../../shared/constants/bridge"),u=e("../../../ducks/bridge/actions"),d=(a=e("./useHandleTx"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/bridge/hooks/useHandleApprovalTx.ts"}],[6386,{"../../../../shared/modules/Numeric":5294,"../types":6400,"./useHandleTx":6387,"@metamask/transaction-controller":2698,"bignumber.js":3465},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const{handleTx:e}=(0,l.default)();return{handleBridgeTx:async({quoteResponse:t,approvalTxId:n})=>{const a=new o.BigNumber(t.quote.srcTokenAmount).plus(t.quote.feeData[i.FeeType.METABRIDGE].amount),l=new s.Numeric(a,10).shiftedBy(t.quote.srcAsset.decimals).toString();return(await e({txType:r.TransactionType.bridge,txParams:t.trade,swapsOptions:{hasApproveTx:Boolean(null==t?void 0:t.approval),meta:{type:r.TransactionType.bridge,sourceTokenSymbol:t.quote.srcAsset.symbol,destinationTokenSymbol:t.quote.destAsset.symbol,destinationTokenDecimals:t.quote.destAsset.decimals,destinationTokenAddress:t.quote.destAsset.address,approvalTxId:n,swapTokenValue:l}}})).id}}};var a,o=e("bignumber.js"),r=e("@metamask/transaction-controller"),s=e("../../../../shared/modules/Numeric"),i=e("../types"),l=(a=e("./useHandleTx"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/bridge/hooks/useHandleBridgeTx.ts"}],[6387,{"../../../../shared/modules/Numeric":5294,"../../../ducks/bridge/utils":6227,"../../../ducks/metamask/metamask":6236,"../../../selectors":6985,"../../../store/actions":7e3,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const e=(0,a.useDispatch)(),t=(0,a.useSelector)(i.checkNetworkAndAccountSupports1559),n=(0,a.useSelector)(s.getGasFeeEstimates);return{handleTx:async({txType:a,txParams:s,swapsOptions:i})=>{const c=new l.Numeric(s.chainId,10).toPrefixedHexString(),{maxFeePerGas:u,maxPriorityFeePerGas:d}=await(0,r.getTxGasEstimates)({networkAndAccountSupports1559:t,networkGasFeeEstimates:n,txParams:s,hexChainId:c}),f=(0,r.getHexMaxGasLimit)(s.gasLimit??0),m={...s,chainId:c,gasLimit:f,gas:f,maxFeePerGas:u,maxPriorityFeePerGas:d},p=await(0,o.addTransactionAndWaitForPublish)(m,{requireApproval:!1,type:a,swaps:i});return await(0,o.forceUpdateMetamaskState)(e),p}}};var a=e("react-redux"),o=e("../../../store/actions"),r=e("../../../ducks/bridge/utils"),s=e("../../../ducks/metamask/metamask"),i=e("../../../selectors"),l=e("../../../../shared/modules/Numeric")}}},{package:"$root$",file:"ui/pages/bridge/hooks/useHandleTx.ts"}],[6388,{"../../../helpers/constants/routes":6254,"../../../store/actions":7e3,"./useAddToken":6384,"./useHandleApprovalTx":6385,"./useHandleBridgeTx":6386,"ethereumjs-util":3796,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const e=(0,r.useHistory)(),t=(0,a.useDispatch)(),{addSourceToken:n,addDestToken:d}=(0,l.default)(),{handleApprovalTx:f}=(0,c.default)(),{handleBridgeTx:m}=(0,u.default)();return{submitBridgeTransaction:async a=>{let r;null!=a&&a.approval&&(r=await f({approval:a.approval,quoteResponse:a})),await m({quoteResponse:a,approvalTxId:r}),a.quote.srcAsset.address!==(0,o.zeroAddress)()&&n(a),a.quote.destAsset.address!==(0,o.zeroAddress)()&&await d(a),await t((0,i.setDefaultHomeActiveTabName)("activity")),e.push(s.DEFAULT_ROUTE)}}};var a=e("react-redux"),o=e("ethereumjs-util"),r=e("react-router-dom"),s=e("../../../helpers/constants/routes"),i=e("../../../store/actions"),l=d(e("./useAddToken")),c=d(e("./useHandleApprovalTx")),u=d(e("./useHandleBridgeTx"));function d(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts"}],[6389,{"../../../shared/modules/selectors/networks":5320,"../../components/component-library":5806,"../../components/multichain/pages/page":6032,"../../contexts/i18n":6211,"../../ducks/bridge/actions":6224,"../../ducks/swaps/swaps":6244,"../../helpers/constants/routes":6254,"../../helpers/higher-order-components/feature-toggled-route":6265,"../../hooks/bridge/useBridging":6300,"../../hooks/useGasFeeEstimates":6331,"../../selectors":6985,"../../store/actions":7e3,"../swaps/hooks/useSwapsFeatureFlags":6933,"./prepare/bridge-cta-button":6394,"./prepare/prepare-bridge-page":6396,"ethereumjs-util":3796,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=w(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("react-router-dom"),s=e("ethereumjs-util"),i=e("../../contexts/i18n"),l=e("../../ducks/swaps/swaps"),c=e("../../helpers/constants/routes"),u=e("../../store/actions"),d=T(e("../../helpers/higher-order-components/feature-toggled-route")),f=e("../../components/component-library"),m=e("../../../shared/modules/selectors/networks"),p=e("../../selectors"),g=T(e("../../hooks/bridge/useBridging")),h=e("../../components/multichain/pages/page"),y=e("../swaps/hooks/useSwapsFeatureFlags"),v=e("../../ducks/bridge/actions"),x=e("../../hooks/useGasFeeEstimates"),b=T(e("./prepare/prepare-bridge-page")),k=e("./prepare/bridge-cta-button");function T(e){return e&&e.__esModule?e:{default:e}}function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(w=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,a.useContext)(i.I18nContext);(0,y.useSwapsFeatureFlags)(),(0,g.default)();const t=(0,r.useHistory)(),n=(0,o.useDispatch)(),T=(0,o.useSelector)(p.getIsBridgeEnabled),w=(0,o.useSelector)(m.getProviderConfig),C=(0,o.useSelector)(p.getIsBridgeChain),_=(0,o.useSelector)(p.getCurrentCurrency);(0,a.useEffect)((()=>{C&&T&&w&&_&&(n((0,v.setFromChain)(w.chainId)),n((0,v.setSrcTokenExchangeRates)({chainId:w.chainId,tokenAddress:(0,s.zeroAddress)(),currency:_})))}),[C,T,w,_]);const E=async()=>{await n((0,v.resetBridgeState)())};(0,a.useEffect)((()=>(E(),window.addEventListener("beforeunload",E),()=>{window.removeEventListener("beforeunload",E),E()})),[]),(0,x.useGasFeeEstimates)(null==w?void 0:w.id);return a.default.createElement("div",{className:"bridge"},a.default.createElement("div",{className:"bridge__container"},a.default.createElement(h.Header,{className:"bridge__header",startAccessory:a.default.createElement(f.ButtonIcon,{iconName:f.IconName.ArrowLeft,size:f.ButtonIconSize.Sm,ariaLabel:e("back"),onClick:async()=>{t.push({pathname:c.DEFAULT_ROUTE,state:{stayOnHomePage:!0}}),n((0,l.clearSwapsState)()),await n((0,u.resetBackgroundSwapsState)()),await E()}}),endAccessory:a.default.createElement(f.ButtonIcon,{iconName:f.IconName.Setting,size:f.ButtonIconSize.Sm,ariaLabel:e("settings")})},e("bridge")),a.default.createElement(h.Content,{className:"bridge__content"},a.default.createElement(r.Switch,null,a.default.createElement(d.default,{redirectRoute:c.SWAPS_MAINTENANCE_ROUTE,flag:T,path:c.CROSS_CHAIN_SWAP_ROUTE+c.PREPARE_SWAP_ROUTE,render:()=>a.default.createElement(b.default,null)}))),a.default.createElement(h.Footer,null,a.default.createElement(k.BridgeCTAButton,null))))}}}},{package:"$root$",file:"ui/pages/bridge/index.tsx"}],[6390,{"../../../components/component-library":5806,"../../../helpers/constants/design-system":6248,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../components/component-library"),s=e("../../../helpers/constants/design-system");function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;to.default.createElement(r.Container,i({display:s.Display.Flex,flexDirection:s.FlexDirection.Column,width:s.BlockSize.Full},e))}}},{package:"$root$",file:"ui/pages/bridge/layout/column.tsx"}],[6391,{"./column":6390,"./row":6392,"./tooltip":6393},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Column",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"Row",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"Tooltip",{enumerable:!0,get:function(){return r.default}});var a=s(e("./column")),o=s(e("./row")),r=s(e("./tooltip"));function s(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/pages/bridge/layout/index.tsx"}],[6392,{"../../../components/component-library":5806,"../../../helpers/constants/design-system":6248,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../components/component-library"),s=e("../../../helpers/constants/design-system");function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;to.default.createElement(r.Container,i({display:s.Display.Flex,flexDirection:s.FlexDirection.Row,justifyContent:s.JustifyContent.spaceBetween,flexWrap:s.FlexWrap.NoWrap,alignItems:s.AlignItems.center},e))}}},{package:"$root$",file:"ui/pages/bridge/layout/row.tsx"}],[6393,{"../../../components/component-library":5806,"../../../helpers/constants/design-system":6248,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(a,r,i):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("../../../components/component-library"),r=e("../../../helpers/constants/design-system");function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[c,u]=(0,a.useState)(!1),[d,f]=(0,a.useState)(null),m=()=>u(!1);return a.default.createElement(a.default.Fragment,null,a.default.createElement(o.Box,{ref:e=>f(e),onMouseEnter:()=>u(!0),onMouseLeave:m},n),!s&&a.default.createElement(o.Popover,i({position:o.PopoverPosition.Auto,referenceElement:d,isOpen:c,onClickOutside:m,style:{maxWidth:"240px",backgroundColor:"var(--color-text-default)",paddingInline:"16px",paddingTop:"8px",paddingBottom:"8px",transitionTimingFunction:"linear",display:"inherit"},preventOverflow:!0,flip:!0,hasArrow:!0},l),a.default.createElement(o.PopoverHeader,{color:r.TextColor.infoInverse,textAlign:r.TextAlign.Center},t),a.default.createElement(o.Text,{justifyContent:r.JustifyContent.center,color:r.TextColor.infoInverse},e)))}));n.default=l}}},{package:"$root$",file:"ui/pages/bridge/layout/tooltip.tsx"}],[6394,{"../../../components/component-library":5806,"../../../ducks/bridge/selectors":6226,"../../../hooks/useI18nContext":6334,"../hooks/useSubmitBridgeTransaction":6388,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BridgeCTAButton=void 0;var a,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("react-redux"),s=e("../../../components/component-library"),i=e("../../../ducks/bridge/selectors"),l=e("../../../hooks/useI18nContext"),c=(a=e("../hooks/useSubmitBridgeTransaction"))&&a.__esModule?a:{default:a};function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}n.BridgeCTAButton=()=>{const e=(0,r.useDispatch)(),t=(0,l.useI18nContext)(),n=(0,r.useSelector)(i.getFromToken),a=(0,r.useSelector)(i.getToToken),u=(0,r.useSelector)(i.getFromChain),d=(0,r.useSelector)(i.getToChain),f=(0,r.useSelector)(i.getFromAmount),{isLoading:m,activeQuote:p}=(0,r.useSelector)(i.getBridgeQuotes),{submitBridgeTransaction:g}=(0,c.default)(),h=n&&a&&u&&d&&f&&p,y=(0,o.useMemo)((()=>t(m&&!h?"swapFetchingQuotes":f?h?"confirm":"swapSelectToken":a?"bridgeEnterAmount":"bridgeSelectTokenAndAmount")),[m,f,a,h]);return o.default.createElement(s.Button,{"data-testid":"bridge-cta-button",onClick:()=>{h&&e(g(p))},disabled:!h},y)}}}},{package:"$root$",file:"ui/pages/bridge/prepare/bridge-cta-button.tsx"}],[6395,{"../../../../shared/constants/network":5264,"../../../../shared/constants/transaction":5278,"../../../../shared/modules/swaps.utils":5325,"../../../__mocks__/ethereumjs-util":5342,"../../../components/component-library":5806,"../../../components/multichain/asset-picker-amount/asset-picker":5915,"../../../components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal-tabs":5912,"../../../components/ui/currency-display":6094,"../../../components/ui/tooltip":6197,"../../../ducks/bridge/selectors":6226,"../../../hooks/bridge/useLatestBalance":6302,"../../../hooks/useEthFiatAmount":6329,"../../../hooks/useI18nContext":6334,"../../../hooks/useTokenFiatAmount":6360,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BridgeInputGroup=void 0;var a=x(e("react")),o=e("react-redux"),r=e("../../../components/component-library"),s=e("../../../components/multichain/asset-picker-amount/asset-picker"),i=e("../../../components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal-tabs"),l=x(e("../../../components/ui/currency-display")),c=e("../../../hooks/useI18nContext"),u=e("../../../hooks/useTokenFiatAmount"),d=e("../../../hooks/useEthFiatAmount"),f=e("../../../../shared/modules/swaps.utils"),m=x(e("../../../components/ui/tooltip")),p=e("../../../__mocks__/ethereumjs-util"),g=e("../../../../shared/constants/transaction"),h=e("../../../../shared/constants/network"),y=x(e("../../../hooks/bridge/useLatestBalance")),v=e("../../../ducks/bridge/selectors");function x(e){return e&&e.__esModule?e:{default:e}}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var _,E,I,S,P,M;const D=(0,c.useI18nContext)(),{isLoading:A,activeQuote:O}=(0,o.useSelector)(v.getBridgeQuotes),F=(0,u.useTokenFiatAmount)((null==n?void 0:n.address)||undefined,(null==C||null===(_=C.value)||void 0===_?void 0:_.toString())||"0x0",null==n?void 0:n.symbol,{showFiat:!0},!0),N=(0,d.useEthFiatAmount)((null==C||null===(E=C.value)||void 0===E?void 0:E.toString())||"0x0",{showFiat:!0},!0),{formattedBalance:R}=(0,y.default)(n,null==T||null===(I=T.network)||void 0===I?void 0:I.chainId);return a.default.createElement(r.Box,{className:e},a.default.createElement(r.Box,{className:"prepare-bridge-page__input-row"},a.default.createElement(s.AssetPicker,{header:t,visibleTabs:[i.TabName.TOKENS],asset:null!=T&&null!==(S=T.network)&&void 0!==S&&S.chainId&&n?(j=T.network.chainId,B=n,"iconUrl"in B&&B.address!==(0,p.zeroAddress)()?{type:g.AssetType.token,image:B.iconUrl,symbol:B.symbol,address:B.address}:{type:g.AssetType.native,image:h.CHAIN_ID_TOKEN_IMAGE_MAP[j],symbol:h.CHAIN_ID_TO_CURRENCY_SYMBOL_MAP[j]}):undefined,onAssetChange:x,networkProps:T,customTokenListGenerator:w}),a.default.createElement(m.default,{containerClassName:"amount-tooltip",position:"top",title:C.value,disabled:((null===(P=C.value)||void 0===P||null===(P=P.toString())||void 0===P?void 0:P.length)??0)<12,arrow:!0,hideOnClick:!1,style:{display:"inherit"}},a.default.createElement(r.TextField,b({type:r.TextFieldType.Number,className:"amount-input",placeholder:A&&!O?D("bridgeCalculatingAmount"):"0",onChange:e=>{null==k||k(e.target.value)}},C)))),a.default.createElement(r.Box,{className:"prepare-bridge-page__amounts-row"},a.default.createElement(r.Text,null,R?`${D("balance")}: ${R}`:" "),a.default.createElement(l.default,{currency:"usd",displayValue:null!=n&&n.symbol&&null!=T&&null!==(M=T.network)&&void 0!==M&&M.chainId&&(0,f.isSwapsDefaultTokenSymbol)(n.symbol,T.network.chainId)?N:F,hideLabel:!0})));var j,B}}}},{package:"$root$",file:"ui/pages/bridge/prepare/bridge-input-group.tsx"}],[6396,{"../../../../shared/constants/swaps":5274,"../../../../shared/constants/time":5276,"../../../../shared/lib/swaps-utils":5288,"../../../../shared/modules/conversion.utils":5301,"../../../../shared/modules/selectors/networks":5320,"../../../components/component-library":5806,"../../../ducks/bridge/actions":6224,"../../../ducks/bridge/selectors":6226,"../../../helpers/constants/design-system":6248,"../../../hooks/useI18nContext":6334,"../../../hooks/useTokensWithFiltering":6365,"../../../selectors":6985,"../../../store/actions":7e3,"../quotes/bridge-quote-card":6397,"../utils/quote":6401,"./bridge-input-group":6395,classnames:3584,"ethereumjs-util":3796,lodash:4380,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=E(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("react-redux"),s=(a=e("classnames"))&&a.__esModule?a:{default:a},i=e("lodash"),l=e("ethereumjs-util"),c=e("react-router-dom"),u=e("../../../ducks/bridge/actions"),d=e("../../../ducks/bridge/selectors"),f=e("../../../components/component-library"),m=e("../../../helpers/constants/design-system"),p=e("../../../hooks/useI18nContext"),g=e("../../../../shared/constants/swaps"),h=e("../../../hooks/useTokensWithFiltering"),y=e("../../../store/actions"),v=e("../../../../shared/modules/conversion.utils"),x=e("../../../../shared/lib/swaps-utils"),b=e("../quotes/bridge-quote-card"),k=e("../utils/quote"),T=e("../../../../shared/modules/selectors/networks"),w=e("../../../selectors"),C=e("../../../../shared/constants/time"),_=e("./bridge-input-group");function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(E=function(e){return e?n:t})(e)}n.default=()=>{var e;const t=(0,r.useDispatch)(),n=(0,p.useI18nContext)(),a=(0,r.useSelector)(w.getCurrentCurrency),E=(0,r.useSelector)(d.getFromToken),I=(0,r.useSelector)(d.getFromTokens),S=(0,r.useSelector)(d.getFromTopAssets),P=(0,r.useSelector)(d.getToToken),M=(0,r.useSelector)(d.getToTokens),D=(0,r.useSelector)(d.getToTopAssets),A=(0,r.useSelector)(d.getFromChains),O=(0,r.useSelector)(d.getToChains),F=(0,r.useSelector)(d.getFromChain),N=(0,r.useSelector)(d.getToChain),R=(0,r.useSelector)(d.getFromAmount),j=(0,r.useSelector)(T.getProviderConfig),B=(0,r.useSelector)(d.getQuoteRequest),{activeQuote:$}=(0,r.useSelector)(d.getBridgeQuotes),W=(0,h.useTokensWithFiltering)(I,S,g.TokenBucketPriority.owned,null==F?void 0:F.chainId),L=(0,h.useTokensWithFiltering)(M,D,g.TokenBucketPriority.top,null==N?void 0:N.chainId),[G,q]=(0,o.useState)(!1),V=(0,o.useMemo)((()=>{var e;return{srcTokenAddress:null==E?void 0:E.address,destTokenAddress:(null==P?void 0:P.address)||undefined,srcTokenAmount:R&&""!==R&&null!=E&&E.decimals?(0,x.calcTokenValue)(R,E.decimals).toString():undefined,srcChainId:null!=F&&F.chainId?Number((0,v.hexToDecimal)(F.chainId)):undefined,destChainId:null!=N&&N.chainId?Number((0,v.hexToDecimal)(N.chainId)):undefined,insufficientBal:Boolean(null==j||null===(e=j.rpcUrl)||void 0===e?void 0:e.includes("tenderly"))}}),[E,P,null==F?void 0:F.chainId,null==N?void 0:N.chainId,R,j]),H=(0,o.useCallback)((0,i.debounce)((e=>{t((0,u.updateQuoteRequestParams)(e)),t((0,u.setSelectedQuote)(null))}),300),[]);(0,o.useEffect)((()=>{H(V)}),Object.values(V));const U=(0,i.debounce)(((e,n)=>{t((0,u.setSrcTokenExchangeRates)({chainId:e,tokenAddress:n,currency:a}))}),C.SECOND),z=(0,i.debounce)(((e,n)=>{t((0,u.setDestTokenExchangeRates)({chainId:e,tokenAddress:n,currency:a}))}),C.SECOND),{search:K}=(0,c.useLocation)(),Y=(0,c.useHistory)();return(0,o.useEffect)((()=>{var e,n;if(null==F||!F.chainId||0===Object.keys(I).length)return;const a=new URLSearchParams(K),o=a.get("token");if(!o)return;const r=()=>{const e=new URLSearchParams(a);e.delete("token"),Y.replace({search:e.toString()})};switch(o){case null==E||null===(e=E.address)||void 0===e?void 0:e.toLowerCase():r();break;case null===(n=I[o])||void 0===n||null===(n=n.address)||void 0===n?void 0:n.toLowerCase():{const e=I[o];t((0,u.setFromToken)(e)),U(F.chainId,e.address),r();break}default:r()}}),[F,E,I,K]),o.default.createElement("div",{className:"prepare-bridge-page"},o.default.createElement(f.Box,{className:"prepare-bridge-page__content"},o.default.createElement(_.BridgeInputGroup,{className:"bridge-box",header:n("bridgeFrom"),token:E,onAmountChange:e=>{t((0,u.setFromTokenInputValue)(e))},onAssetChange:e=>{t((0,u.setFromToken)(e)),t((0,u.setFromTokenInputValue)(null)),(null==F?void 0:F.chainId)&&(null==e?void 0:e.address)&&U(F.chainId,e.address)},networkProps:{network:F,networks:A,onNetworkChange:e=>{t((0,y.setActiveNetwork)(e.rpcEndpoints[e.defaultRpcEndpointIndex].networkClientId)),t((0,u.setFromChain)(e.chainId)),t((0,u.setFromToken)(null)),t((0,u.setFromTokenInputValue)(null))}},customTokenListGenerator:I&&S?W:undefined,amountFieldProps:{testId:"from-amount",autoFocus:!0,value:R||undefined}}),o.default.createElement(f.Box,{className:"prepare-bridge-page__switch-tokens"},o.default.createElement(f.ButtonIcon,{iconProps:{className:(0,s.default)({rotate:G})},width:m.BlockSize.Full,"data-testid":"switch-tokens",ariaLabel:"switch-tokens",iconName:f.IconName.Arrow2Down,disabled:!(0,k.isValidQuoteRequest)(B,!1),onClick:()=>{q(!G);const e=(null==N?void 0:N.defaultRpcEndpointIndex)!==undefined&&null!=N&&N.rpcEndpoints?N.rpcEndpoints[N.defaultRpcEndpointIndex].networkClientId:undefined;e&&t((0,y.setActiveNetwork)(e)),N&&t((0,u.setFromChain)(N.chainId)),t((0,u.setFromToken)(P)),t((0,u.setFromTokenInputValue)(null)),(null==F?void 0:F.chainId)&&t((0,u.setToChain)(F.chainId)),(null==F?void 0:F.chainId)&&t((0,u.setToChainId)(F.chainId)),t((0,u.setToToken)(E)),(null==F?void 0:F.chainId)&&(null==E?void 0:E.address)&&z(F.chainId,E.address),(null==N?void 0:N.chainId)&&(null==P?void 0:P.address)&&P.address!==(0,l.zeroAddress)()&&U(N.chainId,P.address)}})),o.default.createElement(_.BridgeInputGroup,{className:"bridge-box",header:n("bridgeTo"),token:P,onAssetChange:e=>{t((0,u.setToToken)(e)),(null==N?void 0:N.chainId)&&(null==e?void 0:e.address)&&z(N.chainId,e.address)},networkProps:{network:N,networks:O,onNetworkChange:e=>{t((0,u.setToChainId)(e.chainId)),t((0,u.setToChain)(e.chainId))}},customTokenListGenerator:N&&M&&D?L:W,amountFieldProps:{testId:"to-amount",readOnly:!0,disabled:!0,value:(null==$||null===(e=$.toTokenAmount)||void 0===e?void 0:e.amount.toFixed())??"0",className:null!=$&&$.toTokenAmount.amount?"amount-input defined":"amount-input"}})),o.default.createElement(b.BridgeQuoteCard,null))}}}},{package:"$root$",file:"ui/pages/bridge/prepare/prepare-bridge-page.tsx"}],[6397,{"../../../components/component-library":5806,"../../../ducks/bridge/selectors":6226,"../../../ducks/metamask/metamask":6236,"../../../hooks/bridge/useCountdownTimer":6301,"../../../hooks/useI18nContext":6334,"../../../selectors":6985,"../../swaps/mascot-background-animation/mascot-background-animation":6942,"../utils/quote":6401,"./bridge-quotes-modal":6398,"./quote-info-row":6399,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BridgeQuoteCard=void 0;var a,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("react-redux"),s=e("../../../components/component-library"),i=e("../../../ducks/bridge/selectors"),l=e("../../../hooks/useI18nContext"),c=e("../utils/quote"),u=e("../../../hooks/bridge/useCountdownTimer"),d=(a=e("../../swaps/mascot-background-animation/mascot-background-animation"))&&a.__esModule?a:{default:a},f=e("../../../selectors"),m=e("../../../ducks/metamask/metamask"),p=e("./quote-info-row"),g=e("./bridge-quotes-modal");function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}n.BridgeQuoteCard=()=>{var e,t,n,a;const h=(0,l.useI18nContext)(),{isLoading:y,isQuoteGoingToRefresh:v,activeQuote:x}=(0,r.useSelector)(i.getBridgeQuotes),b=(0,r.useSelector)(f.getCurrentCurrency),k=(0,r.useSelector)(m.getNativeCurrency),T=(0,u.useCountdownTimer)(),[w,C]=(0,o.useState)(!1);return y&&!x?o.default.createElement(s.Box,null,o.default.createElement(d.default,null)):x?o.default.createElement(s.Box,{className:"quote-card"},o.default.createElement(g.BridgeQuotesModal,{isOpen:w,onClose:()=>C(!1)}),o.default.createElement(s.Box,{className:"bridge-box quote-card__timer"},!y&&v&&o.default.createElement(s.Text,null,h("swapNewQuoteIn",[T]))),o.default.createElement(s.Box,{className:"bridge-box prepare-bridge-page__content quote-card__content"},o.default.createElement(p.QuoteInfoRow,{label:h("estimatedTime"),tooltipText:h("bridgeTimingTooltipText"),description:h("bridgeTimingMinutes",[(0,c.formatEtaInMinutes)(x.estimatedProcessingTimeInSeconds)])}),x.swapRate&&o.default.createElement(p.QuoteInfoRow,{label:h("quoteRate"),description:`1 ${x.quote.srcAsset.symbol} = ${(0,c.formatTokenAmount)(x.swapRate,x.quote.destAsset.symbol)}`}),x.totalNetworkFee&&o.default.createElement(p.QuoteInfoRow,{label:h("totalFees"),tooltipText:h("bridgeTotalFeesTooltipText"),description:(0,c.formatFiatAmount)(null===(e=x.totalNetworkFee)||void 0===e?void 0:e.fiat,b,2)??(0,c.formatTokenAmount)(null===(t=x.totalNetworkFee)||void 0===t?void 0:t.amount,k,6),secondaryDescription:null!==(n=x.totalNetworkFee)&&void 0!==n&&n.fiat?(0,c.formatTokenAmount)(null===(a=x.totalNetworkFee)||void 0===a?void 0:a.amount,k,6):undefined})),o.default.createElement(s.Box,{className:"bridge-box quote-card__footer"},o.default.createElement("span",null,o.default.createElement(s.Text,null,h("swapIncludesMMFee",[.875])),o.default.createElement(s.Button,{variant:s.ButtonVariant.Link,onClick:()=>{C(!0)}},o.default.createElement(s.Text,null,h("viewAllQuotes")))),o.default.createElement(s.Button,{variant:s.ButtonVariant.Link},o.default.createElement(s.Text,null,h("termsOfService"))))):null}}}},{package:"$root$",file:"ui/pages/bridge/quotes/bridge-quote-card.tsx"}],[6398,{"../../../components/component-library":5806,"../../../ducks/bridge/actions":6224,"../../../ducks/bridge/selectors":6226,"../../../ducks/metamask/metamask":6236,"../../../helpers/constants/design-system":6248,"../../../hooks/useI18nContext":6334,"../../../selectors":6985,"../layout":6391,"../types":6400,"../utils/quote":6401,"@metamask/snaps-sdk/jsx":2627,lodash:4380,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BridgeQuotesModal=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("@metamask/snaps-sdk/jsx"),s=e("react-redux"),i=e("lodash"),l=e("../../../components/component-library"),c=e("../../../helpers/constants/design-system"),u=e("../utils/quote"),d=e("../../../hooks/useI18nContext"),f=e("../../../selectors"),m=e("../../../ducks/bridge/actions"),p=e("../types"),g=e("../../../ducks/bridge/selectors"),h=e("../layout"),y=e("../../../ducks/metamask/metamask");function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const n=(0,d.useI18nContext)(),a=(0,s.useDispatch)(),{sortedQuotes:x,activeQuote:b}=(0,s.useSelector)(g.getBridgeQuotes),k=(0,s.useSelector)(g.getBridgeSortOrder),T=(0,s.useSelector)(f.getCurrentCurrency),w=(0,s.useSelector)(y.getNativeCurrency);return o.default.createElement(l.Modal,v({className:"quotes-modal",onClose:e},t),o.default.createElement(l.ModalOverlay,null),o.default.createElement(l.ModalContent,{modalDialogProps:{padding:0}},o.default.createElement(l.ModalHeader,{onBack:e},o.default.createElement(l.Text,{variant:c.TextVariant.headingSm,textAlign:c.TextAlign.Center},n("swapSelectAQuote"))),o.default.createElement(h.Row,{padding:[4,3],paddingBottom:1},[[p.SortOrder.COST_ASC,n("bridgeNetCost"),r.IconName.Arrow2Up],[p.SortOrder.ETA_ASC,n("time"),r.IconName.Arrow2Down]].map((([e,t,n])=>o.default.createElement(l.ButtonLink,{key:t,onClick:()=>a((0,m.setSortOrder)(e)),startIconName:k===e&&k===p.SortOrder.ETA_ASC?n:undefined,startIconProps:{size:l.IconSize.Xs},endIconName:k===e&&k===p.SortOrder.COST_ASC?n:undefined,endIconProps:{size:l.IconSize.Xs},color:k===e?c.TextColor.primaryDefault:c.TextColor.textAlternative},o.default.createElement(l.Text,{variant:c.TextVariant.bodySm,color:k===e?c.TextColor.primaryDefault:c.TextColor.textAlternative},t))))),o.default.createElement(h.Column,{style:{overflow:"scroll"}},x.map(((t,r)=>{const{totalNetworkFee:s,estimatedProcessingTimeInSeconds:d,toTokenAmount:f,cost:g,quote:{destAsset:y,bridges:v,requestId:x}}=t,C=x===(null==b?void 0:b.quote.requestId);return o.default.createElement(h.Row,{alignItems:c.AlignItems.flexStart,key:r,backgroundColor:C?c.BackgroundColor.primaryMuted:undefined,onClick:()=>{a((0,m.setSelectedQuote)(t)),e()},paddingInline:4,paddingTop:3,paddingBottom:3,style:{position:"relative",height:78}},C&&o.default.createElement(h.Column,{style:{position:"absolute",left:4,top:4,height:70,width:4,borderRadius:8},backgroundColor:c.BackgroundColor.primaryDefault}),o.default.createElement(h.Column,null,o.default.createElement(l.Text,{variant:c.TextVariant.bodyMd},g.fiat&&(0,u.formatFiatAmount)(g.fiat,T,0)),[null!=s&&s.fiat?n("quotedNetworkFee",[(0,u.formatFiatAmount)(s.fiat,T,0)]):n("quotedNetworkFee",[(0,u.formatTokenAmount)(s.amount,w)]),n(k===p.SortOrder.ETA_ASC?"quotedReceivingAmount":"quotedReceiveAmount",[(0,u.formatFiatAmount)(f.fiat,T,0)??(0,u.formatTokenAmount)(f.amount,y.symbol,0)])][k===p.SortOrder.ETA_ASC?"reverse":"slice"]().map((e=>o.default.createElement(l.Text,{key:e,variant:c.TextVariant.bodyXsMedium,color:c.TextColor.textAlternative},e)))),o.default.createElement(h.Column,{alignItems:c.AlignItems.flexEnd},o.default.createElement(l.Text,{variant:c.TextVariant.bodyMd},n("bridgeTimingMinutes",[(0,u.formatEtaInMinutes)(d)])),o.default.createElement(l.Text,{variant:c.TextVariant.bodyXsMedium,color:c.TextColor.textAlternative},(0,i.startCase)(v[0]))))})))))}}}},{package:"$root$",file:"ui/pages/bridge/quotes/bridge-quotes-modal.tsx"}],[6399,{"../../../components/component-library":5806,"../../../components/ui/tooltip":6197,"../../../helpers/constants/design-system":6248,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.QuoteInfoRow=void 0;var a=i(e("react")),o=e("../../../components/component-library"),r=i(e("../../../components/ui/tooltip")),s=e("../../../helpers/constants/design-system");function i(e){return e&&e.__esModule?e:{default:e}}n.QuoteInfoRow=({label:e,tooltipText:t,description:n,secondaryDescription:i})=>a.default.createElement(o.Box,{className:"quote-card__info-row"},a.default.createElement(o.Box,{className:"quote-card__info-row__label"},a.default.createElement(o.Text,null,e),t&&a.default.createElement(r.default,{position:"top",title:t,containerClassName:"quote-card__info-row__label__tooltip",style:{display:"flex"}},a.default.createElement(o.Icon,{color:s.IconColor.iconMuted,name:o.IconName.Question,size:o.IconSize.Sm}))),a.default.createElement(o.Box,{className:"quote-card__info-row__description"},a.default.createElement(o.Box,{className:"quote-card__info-row__description__secondary"},a.default.createElement(o.Text,null,i)),a.default.createElement(o.Text,null,n)))}}},{package:"$root$",file:"ui/pages/bridge/quotes/quote-info-row.tsx"}],[6403,{"../../../shared/constants/metametrics":5260,"../../../shared/constants/network":5264,"../../../shared/constants/transaction":5278,"../../../shared/modules/selectors/networks":5320,"../../../shared/modules/string-utils":5324,"../../components/app/assets/nfts/nft-default-image/nft-default-image":5376,"../../components/app/network-account-balance-header/network-account-balance-header":5535,"../../components/component-library":5806,"../../components/ui/page-container":6160,"../../components/ui/site-origin/site-origin":6178,"../../contexts/i18n":6211,"../../contexts/metametrics":6214,"../../ducks/history/history":6233,"../../helpers/constants/common":6246,"../../helpers/constants/design-system":6248,"../../helpers/utils/util":6297,"../../hooks/useCurrencyDisplay":6324,"../../hooks/useOriginMetadata":6345,"../../hooks/useUserPreferencedCurrency":6368,"../../selectors":6985,"../../store/actions":7e3,"@metamask/etherscan-link":1752,"@metamask/rpc-errors":2304,classnames:3584,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=D(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("react-router-dom"),s=e("@metamask/rpc-errors"),i=e("@metamask/etherscan-link"),l=M(e("classnames")),c=e("../../components/ui/page-container"),u=e("../../contexts/i18n"),d=e("../../contexts/metametrics"),f=e("../../ducks/history/history"),m=e("../../store/actions"),p=e("../../../shared/constants/metametrics"),g=e("../../../shared/constants/transaction"),h=e("../../components/component-library"),y=e("../../../shared/modules/selectors/networks"),v=e("../../selectors"),x=M(e("../../components/app/assets/nfts/nft-default-image/nft-default-image")),b=e("../../helpers/utils/util"),k=e("../../helpers/constants/design-system"),T=M(e("../../components/app/network-account-balance-header/network-account-balance-header")),w=e("../../../shared/constants/network"),C=M(e("../../components/ui/site-origin/site-origin")),_=e("../../helpers/constants/common"),E=e("../../hooks/useUserPreferencedCurrency"),I=e("../../hooks/useCurrencyDisplay"),S=e("../../hooks/useOriginMetadata"),P=e("../../../shared/modules/string-utils");function M(e){return e&&e.__esModule?e:{default:e}}function D(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(D=function(e){return e?n:t})(e)}n.default=()=>{var e;const t=(0,a.useContext)(u.I18nContext),n=(0,o.useDispatch)(),M=(0,r.useHistory)(),D=(0,o.useSelector)(f.getMostRecentOverviewPage),A=(0,o.useSelector)(v.getSuggestedNfts).sort(((e,t)=>e.requestData.asset.tokenId-t.requestData.asset.tokenId)),O=(0,o.useSelector)(v.getRpcPrefsForCurrentProvider),F=(0,o.useSelector)(y.getCurrentChainId),N=(0,o.useSelector)(v.getIpfsGateway),R=(0,a.useContext)(d.MetaMetricsContext),j=(0,o.useSelector)(v.getNetworkIdentifier),{address:B}=(0,o.useSelector)(v.getSelectedInternalAccount),$=(0,o.useSelector)(v.getSelectedAccountCachedBalance),W=(0,o.useSelector)((e=>(0,v.getAddressBookEntryOrAccountName)(e,B))),[L,G]=(0,a.useState)([]),q=w.NETWORK_TO_NAME_MAP[F]||j,{currency:V,numberOfDecimals:H}=(0,E.useUserPreferencedCurrency)(_.PRIMARY,{ethNumberOfDecimals:4}),[U]=(0,I.useCurrencyDisplay)($,{numberOfDecimals:H,currency:V}),z=(0,S.useOriginMetadata)(null===(e=A[0])||void 0===e?void 0:e.origin)||{},K=(0,a.useCallback)((async()=>{await Promise.all(A.map((async({requestData:{asset:e},id:t})=>{await n((0,m.resolvePendingApproval)(t,null)),R({event:p.MetaMetricsEventName.NftAdded,category:p.MetaMetricsEventCategory.Wallet,sensitiveProperties:{token_contract_address:e.address,token_symbol:e.symbol,token_id:e.tokenId,token_standard:e.standard,asset_type:g.AssetType.NFT,source:p.MetaMetricsTokenEventSource.Dapp}})}))),M.push(D)}),[n,M,R,D,A]),Y=(0,a.useCallback)((async()=>{await Promise.all(A.map((async({id:e})=>n((0,m.rejectPendingApproval)(e,(0,s.serializeError)(s.providerErrors.userRejectedRequest())))))),M.push(D)}),[n,M,D,A]);let J,Q;if((0,a.useEffect)((()=>{A.length||M.push(D)}),[M,D,A]),A.length)try{const e=new URL(A[0].origin);J=e.host,Q=e.href}catch{J="dapp"}return(0,a.useEffect)((()=>{(async()=>{const e=await Promise.all(A.map((async e=>{const t=await(0,b.getAssetImageURL)(e.requestData.asset.image,N);return{...e,requestData:{...e.requestData,asset:{...e.requestData.asset,assetImageUrl:t}}}})));G(e)})()}),[]),a.default.createElement(h.Box,{height:k.BlockSize.Full,width:k.BlockSize.Full,display:k.Display.Flex,flexDirection:k.FlexDirection.Column},a.default.createElement(h.Box,{paddingBottom:2,className:"confirm-add-suggested-nft__header"},a.default.createElement(T.default,{accountName:W,accountBalance:U,accountAddress:B,networkName:q,chainId:F}),a.default.createElement(h.Box,{paddingTop:4,paddingRight:4,paddingLeft:4,display:k.Display.Flex,justifyContent:k.JustifyContent.center},a.default.createElement(C.default,{chip:!0,siteOrigin:z.origin,title:z.origin,iconSrc:z.iconUrl,iconName:z.hostname})),a.default.createElement(h.Text,{variant:k.TextVariant.headingLg,textAlign:k.TextAlign.Center,margin:2},t("addSuggestedNFTs")),a.default.createElement(h.Text,{variant:k.TextVariant.bodyMd,textAlign:k.TextAlign.Center},t("wantsToAddThisAsset",["dapp"===J?a.default.createElement(h.Text,{key:J,variant:k.TextVariant.bodyMd,fontWeight:"bold"},J):a.default.createElement(h.ButtonLink,{key:J,size:h.BUTTON_SIZES.INHERIT,href:Q,target:"_blank"},J)]))),a.default.createElement(h.Box,{className:"confirm-add-suggested-nft__content"},a.default.createElement(h.Box,{className:"confirm-add-suggested-nft__card",padding:2,borderRadius:k.BorderRadius.MD},a.default.createElement(h.Box,{className:(0,l.default)({"confirm-add-suggested-nft__nft-list":A.length>1})},A.map((({id:e,requestData:{asset:{address:t,tokenId:o,symbol:r,name:l}}})=>{const c=L.find((e=>e.requestData.asset.tokenId===o&&(0,P.isEqualCaseInsensitive)(e.requestData.asset.address,t))),u=c?c.requestData.asset.assetImageUrl:"",d=(0,i.getTokenTrackerLink)(t,F,null,null,{blockExplorerUrl:(null==O?void 0:O.blockExplorerUrl)??null});return 1===A.length?a.default.createElement(h.Box,{className:"confirm-add-suggested-nft__nft-single",key:`confirm-add-suggested-nft__nft-single-${e}`,borderRadius:k.BorderRadius.MD,margin:0,padding:0},u?a.default.createElement("img",{className:"confirm-add-suggested-nft__nft-single-image",src:u,alt:l||o}):a.default.createElement(x.default,{className:"confirm-add-suggested-nft__nft-single-image-default",tokenId:o,name:l||r||(0,b.shortenAddress)(t)}),a.default.createElement(h.Box,{padding:1,display:k.Display.Flex,flexDirection:k.FlexDirection.Row,justifyContent:k.JustifyContent.spaceBetween,alignItems:k.AlignItems.Center},a.default.createElement(h.Box,{display:k.Display.Flex,flexDirection:k.FlexDirection.Column,justifyContent:k.JustifyContent.spaceEvenly,flexWrap:k.FlexWrap.NoWrap,width:k.BlockSize.Full,className:"confirm-add-suggested-nft__nft-single-sub-details"},O.blockExplorerUrl?a.default.createElement(h.ButtonLink,{className:"confirm-add-suggested-nft__nft-name",href:d,title:t,target:"_blank",size:h.BUTTON_SIZES.INHERIT},l||r||(0,b.shortenAddress)(t)):a.default.createElement(h.Text,{variant:k.TextVariant.bodyMd,className:"confirm-add-suggested-nft__nft-name",title:t},l||r||(0,b.shortenAddress)(t)),a.default.createElement(h.Text,{variant:k.TextVariant.bodyMd,color:k.TextColor.textAlternative,className:"confirm-add-suggested-nft__nft-tokenId"},"#",o)))):a.default.createElement(h.Box,{display:k.Display.Flex,flexDirection:k.FlexDirection.Row,flexWrap:k.FlexWrap.NoWrap,alignItems:k.AlignItems.Center,justifyContent:k.JustifyContent.spaceBetween,marginBottom:4,className:"confirm-add-suggested-nft__nft-list-item",key:`${t}-${o}`},a.default.createElement(h.Box,{display:k.Display.Flex,flexDirection:k.FlexDirection.Row,flexWrap:k.FlexWrap.NoWrap,alignItems:k.AlignItems.Center,justifyContent:k.JustifyContent.spaceBetween},u?a.default.createElement("img",{className:"confirm-add-suggested-nft__nft-image",src:u,alt:l||o}):a.default.createElement(x.default,{className:"confirm-add-suggested-nft__nft-image-default"}),a.default.createElement(h.Box,{display:k.Display.Flex,flexDirection:k.FlexDirection.Column,justifyContent:k.JustifyContent.spaceEvenly,flexWrap:k.FlexWrap.NoWrap,width:k.BlockSize.Full,className:"confirm-add-suggested-nft__nft-sub-details"},O.blockExplorerUrl?a.default.createElement(h.ButtonLink,{className:"confirm-add-suggested-nft__nft-name",href:d,title:t,target:"_blank",size:h.BUTTON_SIZES.INHERIT},l||r||(0,b.shortenAddress)(t)):a.default.createElement(h.Text,{variant:k.TextVariant.bodySm,className:"confirm-add-suggested-nft__nft-name",title:t},l||r||(0,b.shortenAddress)(t)),a.default.createElement(h.Text,{variant:k.TextVariant.bodySm,color:k.TextColor.textAlternative,className:"confirm-add-suggested-nft__nft-tokenId"},"#",o))),a.default.createElement(h.ButtonIcon,{className:"confirm-add-suggested-nft__nft-remove","data-testid":`confirm-add-suggested-nft__nft-remove-${e}`,iconName:h.IconName.Close,size:h.ButtonIconSize.Sm,color:k.IconColor.iconMuted,onClick:t=>{t.preventDefault(),t.stopPropagation(),n((0,m.rejectPendingApproval)(e,(0,s.serializeError)(s.providerErrors.userRejectedRequest())))}}))}))))),a.default.createElement(c.PageContainerFooter,{cancelText:t("cancel"),submitText:1===A.length?t("addNft"):t("addNfts"),onCancel:Y,onSubmit:K}))}}}},{package:"$root$",file:"ui/pages/confirm-add-suggested-nft/confirm-add-suggested-nft.js"}],[6404,{"./confirm-add-suggested-nft":6403},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-add-suggested-nft"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirm-add-suggested-nft/index.js"}],[6405,{"../../../shared/constants/metametrics":5260,"../../../shared/constants/transaction":5278,"../../../shared/modules/string-utils":5324,"../../components/component-library":5806,"../../components/ui/identicon":6133,"../../components/ui/page-container":6160,"../../components/ui/token-balance":6195,"../../contexts/i18n":6211,"../../contexts/metametrics":6214,"../../ducks/history/history":6233,"../../ducks/metamask/metamask":6236,"../../helpers/constants/design-system":6248,"../../helpers/constants/zendesk-url":6261,"../../selectors":6985,"../../store/actions":7e3,"@metamask/rpc-errors":2304,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=w(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("react-router-dom"),s=e("@metamask/rpc-errors"),i=e("../../components/component-library"),l=T(e("../../components/ui/identicon")),c=T(e("../../components/ui/token-balance")),u=e("../../components/ui/page-container"),d=e("../../contexts/i18n"),f=e("../../contexts/metametrics"),m=e("../../ducks/history/history"),p=e("../../ducks/metamask/metamask"),g=T(e("../../helpers/constants/zendesk-url")),h=e("../../../shared/modules/string-utils"),y=e("../../store/actions"),v=e("../../../shared/constants/metametrics"),x=e("../../../shared/constants/transaction"),b=e("../../selectors"),k=e("../../helpers/constants/design-system");function T(e){return e&&e.__esModule?e:{default:e}}function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(w=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,a.useContext)(d.I18nContext),t=(0,o.useDispatch)(),n=(0,r.useHistory)(),T=(0,o.useSelector)(m.getMostRecentOverviewPage),w=(0,o.useSelector)(b.getSuggestedTokens),C=(0,o.useSelector)(p.getTokens),_=(0,a.useContext)(f.MetaMetricsContext),E=(0,a.useMemo)((()=>function(e,t){const n=e.find((({requestData:{asset:e}})=>{const n=t.find((({address:t})=>(0,h.isEqualCaseInsensitive)(t,null==e?void 0:e.address)));return Boolean(n)}));return Boolean(n)}(w,C)&&a.default.createElement(i.BannerAlert,{severity:k.Severity.Warning,marginTop:4},e("knownTokenWarning",[a.default.createElement(i.Button,{variant:i.ButtonVariant.Link,key:"confirm-add-suggested-token-duplicate-warning",className:"confirm-add-suggested-token__link",externalLink:!0,size:i.ButtonLinkSize.Inherit,href:g.default.TOKEN_SAFETY_PRACTICES},e("learnScamRisk"))]))),[w,C,e]),I=(0,a.useMemo)((()=>function(e,t){const n=e.find((({requestData:{asset:e}})=>{const n=t.find((t=>(0,h.isEqualCaseInsensitive)(t.symbol,null==e?void 0:e.symbol)&&!(0,h.isEqualCaseInsensitive)(t.address,null==e?void 0:e.address)));return Boolean(n)}));return Boolean(n)}(w,C)&&a.default.createElement(i.BannerAlert,{marginTop:4,severity:k.Severity.Warning,description:e("reusedTokenNameWarning")})),[w,C,e]),S=(0,a.useCallback)((async()=>{await Promise.all(w.map((async({requestData:{asset:e},id:n})=>{await t((0,y.resolvePendingApproval)(n,null)),_({event:v.MetaMetricsEventName.TokenAdded,category:v.MetaMetricsEventCategory.Wallet,sensitiveProperties:{token_symbol:e.symbol,token_contract_address:e.address,token_decimal_precision:e.decimals,unlisted:e.unlisted,source:v.MetaMetricsTokenEventSource.Dapp,token_standard:x.TokenStandard.ERC20,asset_type:x.AssetType.token}})}))),n.push(T)}),[t,n,_,T,w]),P=(0,a.useCallback)((async()=>{await Promise.all(w.map((({id:e})=>t((0,y.rejectPendingApproval)(e,(0,s.serializeError)(s.providerErrors.userRejectedRequest())))))),n.push(T)}),[t,n,T,w]);return(0,a.useEffect)((()=>{w.length||n.push(T)}),[]),a.default.createElement("div",{className:"page-container"},a.default.createElement("div",{className:"page-container__header"},a.default.createElement("div",{className:"page-container__title"},e("addSuggestedTokens")),a.default.createElement("div",{className:"page-container__subtitle"},e("likeToImportTokens")),E,I),a.default.createElement("div",{className:"page-container__content"},a.default.createElement("div",{className:"confirm-add-suggested-token"},a.default.createElement("div",{className:"confirm-add-suggested-token__header"},a.default.createElement("div",{className:"confirm-add-suggested-token__token"},e("token")),a.default.createElement("div",{className:"confirm-add-suggested-token__balance"},e("balance"))),a.default.createElement("div",{className:"confirm-add-suggested-token__token-list"},w.map((({requestData:{asset:e}})=>{return a.default.createElement("div",{className:"confirm-add-suggested-token__token-list-item",key:e.address},a.default.createElement("div",{className:"confirm-add-suggested-token__token confirm-add-suggested-token__data"},a.default.createElement(l.default,{className:"confirm-add-suggested-token__token-icon",diameter:48,address:e.address,image:e.image}),a.default.createElement("div",{className:"confirm-add-suggested-token__name"},(t=e.name,n=e.symbol,t===undefined?n:`${t} (${n})`))),a.default.createElement("div",{className:"confirm-add-suggested-token__balance"},a.default.createElement(c.default,{token:e})));var t,n}))))),a.default.createElement(u.PageContainerFooter,{cancelText:e("cancel"),submitText:e("addToken"),onCancel:P,onSubmit:S,disabled:0===w.length}))}}}},{package:"$root$",file:"ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.js"}],[6406,{"./confirm-add-suggested-token":6405},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-add-suggested-token"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirm-add-suggested-token/index.js"}],[6407,{"../../../shared/constants/common":5250,"../../../shared/constants/copy":5251,"../../../shared/constants/metametrics":5260,"../../../shared/constants/time":5276,"../../../shared/modules/Numeric":5294,"../../components/app/account-list-item":5344,"../../components/component-library":5806,"../../components/ui/page-container":6160,"../../components/ui/tooltip":6197,"../../contexts/metametrics":6214,"../../ducks/confirm-transaction/confirm-transaction.duck":6229,"../../ducks/history/history":6233,"../../ducks/metamask/metamask":6236,"../../helpers/constants/design-system":6248,"../../hooks/useI18nContext":6334,"../../hooks/useScrollRequired":6349,"../../selectors":6985,"../../store/actions":7e3,classnames:3584,"copy-to-clipboard":3622,lodash:4380,loglevel:4386,"prop-types":4528,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=P(e("prop-types")),r=P(e("copy-to-clipboard")),s=P(e("classnames")),i=P(e("loglevel")),l=e("react-redux"),c=e("react-router-dom"),u=e("lodash"),d=P(e("../../components/app/account-list-item")),f=P(e("../../components/ui/tooltip")),m=e("../../components/ui/page-container"),p=e("../../ducks/history/history"),g=e("../../ducks/metamask/metamask"),h=e("../../../shared/constants/metametrics"),y=e("../../../shared/constants/time"),v=e("../../../shared/modules/Numeric"),x=e("../../../shared/constants/common"),b=e("../../components/component-library"),k=e("../../../shared/constants/copy"),T=e("../../hooks/useI18nContext"),w=e("../../hooks/useScrollRequired"),C=e("../../contexts/metametrics"),_=e("../../helpers/constants/design-system"),E=e("../../ducks/confirm-transaction/confirm-transaction.duck"),I=e("../../store/actions"),S=e("../../selectors");function P(e){return e&&e.__esModule?e:{default:e}}function M(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}const D=()=>{const e=(0,T.useI18nContext)();return a.default.createElement("div",{className:"request-decrypt-message__header"},a.default.createElement("div",{className:"request-decrypt-message__header-background"}),a.default.createElement("div",{className:"request-decrypt-message__header__text"},e("decryptRequest")),a.default.createElement("div",{className:"request-decrypt-message__header__tip-container"},a.default.createElement("div",{className:"request-decrypt-message__header__tip"})))},A=({fromAccount:e,nativeCurrency:t})=>{const n=(0,T.useI18nContext)(),o=new v.Numeric(e.balance,16,x.EtherDenomination.WEI).toDenomination(x.EtherDenomination.ETH).round(6).toBase(10).toString();return a.default.createElement("div",{className:"request-decrypt-message__account-info"},a.default.createElement("div",{className:"request-decrypt-message__account"},a.default.createElement("div",{className:"request-decrypt-message__account-text"},`${n("account")}:`),a.default.createElement("div",{className:"request-decrypt-message__account-item"},a.default.createElement(d.default,{account:e}))),a.default.createElement("div",{className:"request-decrypt-message__balance"},a.default.createElement("div",{className:"request-decrypt-message__balance-text"},`${n("balance")}:`),a.default.createElement("div",{className:"request-decrypt-message__balance-value"},`${o} ${t}`)))};A.propTypes={fromAccount:o.default.shape({balance:o.default.string.isRequired}).isRequired,nativeCurrency:o.default.string.isRequired};const O=({name:e,notice:t,targetSubjectMetadata:n})=>a.default.createElement("div",{className:"request-decrypt-message__visual"},a.default.createElement("section",null,null!=n&&n.iconUrl?a.default.createElement("img",{className:"request-decrypt-message__visual-identicon",src:n.iconUrl,alt:""}):a.default.createElement("i",{className:"request-decrypt-message__visual-identicon--default"},e.charAt(0).toUpperCase()),a.default.createElement("div",{className:"request-decrypt-message__notice"},t)));O.propTypes={name:o.default.string.isRequired,notice:o.default.string.isRequired,targetSubjectMetadata:o.default.shape({iconUrl:o.default.string})};const F=({isScrollable:e,isScrolledToBottom:t,hasDecrypted:n,hasError:o,scrollToBottom:r})=>{const s=(0,T.useI18nContext)();return n&&!o&&e&&!t?a.default.createElement(b.ButtonIcon,{ariaLabel:s("scrollDown"),backgroundColor:_.BackgroundColor.primaryDefault,borderRadius:_.BorderRadius.full,className:"scroll-to-bottom__button",color:_.IconColor.primaryInverse,"data-testid":"scroll-to-bottom",display:_.Display.Flex,iconName:b.IconName.Arrow2Down,onClick:r,size:b.ButtonIconSize.Md}):null};F.propTypes={isScrollable:o.default.bool.isRequired,isScrolledToBottom:o.default.bool.isRequired,hasDecrypted:o.default.bool.isRequired,hasError:o.default.bool.isRequired,scrollToBottom:o.default.func.isRequired};const N=(0,a.forwardRef)((({isScrollable:e,isScrolledToBottom:t,onScroll:n,rawMessage:o,scrollToBottom:i,setRawMessage:c,messageData:u},d)=>{const m=(0,l.useDispatch)(),p=(0,a.useContext)(C.MetaMetricsContext),g=(0,T.useI18nContext)(),[v,x]=(0,a.useState)(!1),[w,E]=(0,a.useState)(!1),[S,P]=(0,a.useState)(!1),[M,D]=(0,a.useState)(!1),[A,O]=(0,a.useState)("");return a.default.createElement("div",{className:"request-decrypt-message__message-container"},a.default.createElement("div",{className:"request-decrypt-message__message"},a.default.createElement("div",{className:"request-decrypt-message__message-text",ref:d,onScroll:n},S||M?o:u.msgParams.data,M?A:""),a.default.createElement("div",{className:(0,s.default)("request-decrypt-message__message-cover",{"request-decrypt-message__message-lock--pressed":S||M})}),a.default.createElement("div",{className:(0,s.default)("request-decrypt-message__message-lock",{"request-decrypt-message__message-lock--pressed":S||M}),"data-testid":"message-lock",onClick:async e=>{e.stopPropagation(e);const t=u.msgParams;t.metamaskId=u.id;const n=await m((0,I.decryptMsgInline)(t));n.error?(D(!0),O(g("decryptInlineError",[n.error]))):(P(!0),c(n.rawSig))}},a.default.createElement("div",{className:"request-decrypt-message__message-lock__container"},a.default.createElement("i",{className:"fa fa-lock fa-lg request-decrypt-message__message-lock__container__icon"}),a.default.createElement("div",{className:"request-decrypt-message__message-lock__container__text"},g("decryptMetamask"))))),a.default.createElement(F,{isScrollable:e,hasError:M,hasDecrypted:S,isScrolledToBottom:t,scrollToBottom:i}),S?a.default.createElement("div",{className:(0,s.default)({"request-decrypt-message__message-copy":!0,"request-decrypt-message__message-copy--pressed":v}),onClick:()=>{(0,r.default)(o,k.COPY_OPTIONS),p({category:h.MetaMetricsEventCategory.Messages,event:"Copy",properties:{action:"Decrypt Message Copy",legacy_event:!0}}),E(!0),setTimeout((()=>E(!1)),3*y.SECOND)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),"data-testid":"message-copy"},a.default.createElement(f.default,{position:"bottom",title:g(w?"copiedExclamation":"copyToClipboard"),wrapperClassName:"request-decrypt-message__message-copy-tooltip",style:{display:"flex",alignItems:"center"}},a.default.createElement("div",{className:"request-decrypt-message__message-copy-text"},g("decryptCopy")),a.default.createElement(b.Icon,{name:w?b.IconName.CopySuccess:b.IconName.Copy,color:_.IconColor.primaryDefault}))):a.default.createElement("div",null))}));N.displayName="MessageBody",N.propTypes={isScrollable:o.default.bool.isRequired,isScrolledToBottom:o.default.bool.isRequired,onScroll:o.default.func.isRequired,rawMessage:o.default.string.isRequired,scrollToBottom:o.default.func.isRequired,setRawMessage:o.default.func.isRequired,messageData:o.default.shape({msgParams:o.default.shape({data:o.default.string.isRequired,from:o.default.string.isRequired,origin:o.default.string.isRequired}).isRequired,id:o.default.string.isRequired}).isRequired};const R=({hasScrolledToBottom:e,isScrollable:t,mostRecentOverviewPage:n,messageData:o})=>{const r=(0,l.useDispatch)(),s=(0,c.useHistory)(),i=(0,T.useI18nContext)(),u=(0,a.useContext)(C.MetaMetricsContext);return a.default.createElement(m.PageContainerFooter,{cancelText:i("cancel"),submitText:i("decrypt"),disabled:t&&!e,onCancel:async e=>{e.stopPropagation(e),await r((0,I.cancelDecryptMsg)(o)),u({category:h.MetaMetricsEventCategory.Messages,event:"Cancel",properties:{action:"Decrypt Message Request",legacy_event:!0}}),r((0,E.clearConfirmTransaction)()),s.push(n)},onSubmit:async e=>{e.stopPropagation(e);const t=o.msgParams;t.metamaskId=o.id,await r((0,I.decryptMsg)(t)),u({category:h.MetaMetricsEventCategory.Messages,event:"Confirm",properties:{action:"Decrypt Message Request",legacy_event:!0}}),r((0,E.clearConfirmTransaction)()),s.push(n)}})};R.propTypes={hasScrolledToBottom:o.default.bool.isRequired,isScrollable:o.default.bool.isRequired,mostRecentOverviewPage:o.default.string.isRequired,messageData:o.default.shape({msgParams:o.default.shape({data:o.default.string.isRequired,from:o.default.string.isRequired,origin:o.default.string.isRequired}).isRequired,id:o.default.string.isRequired}).isRequired};n.default=()=>{const e=(0,T.useI18nContext)(),[t,n]=(0,a.useState)(""),o=(0,l.useSelector)(p.getMostRecentOverviewPage),r=(0,l.useSelector)(g.getNativeCurrency),s=(0,l.useSelector)(S.unconfirmedTransactionsListSelector),c=(0,u.cloneDeep)(s[0]),d=(0,l.useSelector)((e=>{var t;return(0,S.getTargetAccountWithSendEtherInfo)(e,null==c||null===(t=c.msgParams)||void 0===t?void 0:t.from)})),f=(0,l.useSelector)((e=>e.metamask.subjectMetadata||{})),{hasScrolledToBottom:m,isScrollable:h,isScrolledToBottom:y,onScroll:v,scrollToBottom:x,ref:b}=(0,w.useScrollRequired)([t],{offsetPxFromBottom:0});if(!c)return i.default.warn("ConfirmDecryptMessage Page: Missing messageData prop."),null;const k=f[c.msgParams.origin],C=(null==k?void 0:k.name)||c.msgParams.origin,_=e("decryptMessageNotice",[c.msgParams.origin]);return a.default.createElement("div",{className:"request-decrypt-message__container"},a.default.createElement(D,null),a.default.createElement("div",{className:"request-decrypt-message__body"},a.default.createElement(A,{fromAccount:d,nativeCurrency:r}),a.default.createElement(O,{name:C,notice:_,targetSubjectMetadata:k}),a.default.createElement(N,{isScrollable:h,isScrolledToBottom:y,onScroll:v,rawMessage:t,ref:b,scrollToBottom:x,setRawMessage:n,messageData:c})),a.default.createElement(R,{hasScrolledToBottom:m,isScrollable:h,mostRecentOverviewPage:o,messageData:c}))}}}},{package:"$root$",file:"ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js"}],[6408,{"./confirm-decrypt-message.component":6407},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-decrypt-message.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirm-decrypt-message/index.js"}],[6409,{"../../../shared/constants/common":5250,"../../../shared/constants/metametrics":5260,"../../../shared/modules/Numeric":5294,"../../components/app/account-list-item":5344,"../../components/ui/identicon":6133,"../../components/ui/page-container":6160,"../../components/ui/site-origin":6177,loglevel:4386,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=m(e("prop-types")),r=m(e("loglevel")),s=m(e("../../components/app/account-list-item")),i=m(e("../../components/ui/identicon")),l=e("../../components/ui/page-container"),c=e("../../../shared/constants/metametrics"),u=m(e("../../components/ui/site-origin")),d=e("../../../shared/modules/Numeric"),f=e("../../../shared/constants/common");function m(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=typeof a)return a;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:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class h extends a.Component{constructor(...e){super(...e),g(this,"renderHeader",(()=>a.default.createElement("div",{className:"request-encryption-public-key__header"},a.default.createElement("div",{className:"request-encryption-public-key__header-background"}),a.default.createElement("div",{className:"request-encryption-public-key__header__text"},this.context.t("encryptionPublicKeyRequest")),a.default.createElement("div",{className:"request-encryption-public-key__header__tip-container"},a.default.createElement("div",{className:"request-encryption-public-key__header__tip"}))))),g(this,"renderAccount",(()=>{const{fromAccount:e}=this.props,{t:t}=this.context;return a.default.createElement("div",{className:"request-encryption-public-key__account"},a.default.createElement("div",{className:"request-encryption-public-key__account-text"},`${t("account")}:`),a.default.createElement("div",{className:"request-encryption-public-key__account-item"},a.default.createElement(s.default,{account:e})))})),g(this,"renderBalance",(()=>{const{nativeCurrency:e,fromAccount:{balance:t}}=this.props,{t:n}=this.context,o=new d.Numeric(t,16,f.EtherDenomination.WEI).toDenomination(f.EtherDenomination.ETH).round(6).toBase(10).toString();return a.default.createElement("div",{className:"request-encryption-public-key__balance"},a.default.createElement("div",{className:"request-encryption-public-key__balance-text"},`${n("balance")}:`),a.default.createElement("div",{className:"request-encryption-public-key__balance-value"},`${o} ${e}`))})),g(this,"renderRequestIcon",(()=>{const{requesterAddress:e}=this.props;return a.default.createElement("div",{className:"request-encryption-public-key__request-icon"},a.default.createElement(i.default,{diameter:40,address:e}))})),g(this,"renderAccountInfo",(()=>a.default.createElement("div",{className:"request-encryption-public-key__account-info"},this.renderAccount(),this.renderRequestIcon(),this.renderBalance()))),g(this,"renderBody",(()=>{const{subjectMetadata:e,txData:t}=this.props,{t:n}=this.context,o=e[t.origin],r=n("encryptionPublicKeyNotice",[a.default.createElement(u.default,{siteOrigin:t.origin,key:t.origin})]),s=(null==o?void 0:o.hostname)||t.origin;return a.default.createElement("div",{className:"request-encryption-public-key__body"},this.renderAccountInfo(),a.default.createElement("div",{className:"request-encryption-public-key__visual"},a.default.createElement("section",null,null!=o&&o.iconUrl?a.default.createElement("img",{className:"request-encryption-public-key__visual-identicon",src:o.iconUrl,alt:""}):a.default.createElement("i",{className:"request-encryption-public-key__visual-identicon--default"},s.charAt(0).toUpperCase()),a.default.createElement("div",{className:"request-encryption-public-key__notice"},r))))})),g(this,"renderFooter",(()=>{const{cancelEncryptionPublicKey:e,clearConfirmTransaction:t,encryptionPublicKey:n,history:o,mostRecentOverviewPage:r,txData:s}=this.props,{t:i,trackEvent:u}=this.context;return a.default.createElement(l.PageContainerFooter,{cancelText:i("cancel"),submitText:i("provide"),onCancel:async n=>{await e(s,n),u({category:c.MetaMetricsEventCategory.Messages,event:"Cancel",properties:{action:"Encryption public key Request",legacy_event:!0}}),t(),o.push(r)},onSubmit:async e=>{await n(s,e),this.context.trackEvent({category:c.MetaMetricsEventCategory.Messages,event:"Confirm",properties:{action:"Encryption public key Request",legacy_event:!0}}),t(),o.push(r)}})})),g(this,"render",(()=>this.props.txData?a.default.createElement("div",{className:"request-encryption-public-key__container"},this.renderHeader(),this.renderBody(),this.renderFooter()):(r.default.warn("ConfirmEncryptionPublicKey Page: Missing txData prop."),null)))}}n.default=h,g(h,"contextTypes",{t:o.default.func.isRequired,trackEvent:o.default.func.isRequired}),g(h,"propTypes",{fromAccount:o.default.shape({address:o.default.string.isRequired,balance:o.default.string,name:o.default.string}).isRequired,clearConfirmTransaction:o.default.func.isRequired,cancelEncryptionPublicKey:o.default.func.isRequired,encryptionPublicKey:o.default.func.isRequired,history:o.default.object.isRequired,requesterAddress:o.default.string,txData:o.default.object,subjectMetadata:o.default.object,mostRecentOverviewPage:o.default.string.isRequired,nativeCurrency:o.default.string.isRequired})}}},{package:"$root$",file:"ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js"}],[6410,{"../../ducks/confirm-transaction/confirm-transaction.duck":6229,"../../ducks/history/history":6233,"../../ducks/metamask/metamask":6236,"../../selectors":6985,"../../store/actions":7e3,"./confirm-encryption-public-key.component":6409,"react-redux":4734,"react-router-dom":4761,redux:4794},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=e("react-redux"),r=e("redux"),s=e("react-router-dom"),i=e("../../store/actions"),l=e("../../selectors"),c=e("../../ducks/confirm-transaction/confirm-transaction.duck"),u=e("../../ducks/history/history"),d=e("../../ducks/metamask/metamask"),f=(a=e("./confirm-encryption-public-key.component"))&&a.__esModule?a:{default:a};n.default=(0,r.compose)(s.withRouter,(0,o.connect)((function(e){const{metamask:{subjectMetadata:t={}}}=e,n=(0,l.unconfirmedTransactionsListSelector)(e)[0];return{txData:n,subjectMetadata:t,fromAccount:(0,l.getTargetAccountWithSendEtherInfo)(e,null==n?void 0:n.msgParams),requester:null,requesterAddress:null,mostRecentOverviewPage:(0,u.getMostRecentOverviewPage)(e),nativeCurrency:(0,d.getNativeCurrency)(e)}}),(function(e){return{goHome:()=>e((0,i.goHome)()),clearConfirmTransaction:()=>e((0,c.clearConfirmTransaction)()),encryptionPublicKey:(t,n)=>{const a={data:t.msgParams,metamaskId:t.id};return n.stopPropagation(),e((0,i.encryptionPublicKeyMsg)(a))},cancelEncryptionPublicKey:(t,n)=>(n.stopPropagation(),e((0,i.cancelEncryptionPublicKeyMsg)(t)))}})))(f.default)}}},{package:"$root$",file:"ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js"}],[6411,{"./confirm-encryption-public-key.container":6410},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-encryption-public-key.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirm-encryption-public-key/index.js"}],[6412,{"../../../../components/ui/form-field":6115,"../../../../contexts/i18n":6211,"../../../../helpers/constants/gas":6250,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=u;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=l(e("prop-types")),r=e("../../../../contexts/i18n"),s=l(e("../../../../components/ui/form-field")),i=e("../../../../helpers/constants/gas");function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u({onManualChange:e,gasLimit:t,setGasLimit:n,gasPrice:o,setGasPrice:l,gasErrors:c,minimumGasLimit:u}){const d=(0,a.useContext)(r.I18nContext);return a.default.createElement("div",{className:"advanced-gas-controls"},a.default.createElement(s.default,{titleText:d("gasLimit"),error:null!=c&&c.gasLimit?(0,i.getGasFormErrorText)(c.gasLimit,d,{minimumGasLimit:u}):null,onChange:t=>{null==e||e(),n(t)},tooltipText:d("editGasLimitTooltip"),value:t,allowDecimals:!1,numeric:!0}),a.default.createElement(a.default.Fragment,null,a.default.createElement(s.default,{titleText:d("advancedGasPriceTitle"),titleUnit:"(GWEI)",onChange:t=>{null==e||e(),l(t)},tooltipText:d("editGasPriceTooltip"),value:o,numeric:!0,allowDecimals:!0,error:null!=c&&c.gasPrice?(0,i.getGasFormErrorText)(c.gasPrice,d):null})))}u.propTypes={onManualChange:o.default.func,gasLimit:o.default.number,setGasLimit:o.default.func,gasPrice:o.default.string,setGasPrice:o.default.func,minimumGasLimit:o.default.string,gasErrors:o.default.object}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-controls/advanced-gas-controls.component.js"}],[6413,{"../../../../../../shared/constants/gas":5255,"../../../../../../shared/modules/Numeric":5294,"../../../../../components/component-library":5806,"../../../../../contexts/gasFee":6210,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useI18nContext":6334,"../../../../../selectors":6985,"../../../../../store/actions":7e3,"../../../hooks/useTransactionEventFragment":6740,"../context":6429,lodash:4380,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("lodash"),s=e("../../../hooks/useTransactionEventFragment"),i=e("../../../../../../shared/constants/gas"),l=e("../../../../../helpers/constants/design-system"),c=e("../../../../../selectors"),u=e("../../../../../store/actions"),d=e("../../../../../contexts/gasFee"),f=e("../context"),m=e("../../../../../hooks/useI18nContext"),p=e("../../../../../components/component-library"),g=e("../../../../../../shared/modules/Numeric");function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,m.useI18nContext)(),t=(0,o.useDispatch)(),{gasErrors:n,maxBaseFee:h,maxPriorityFeePerGas:y}=(0,f.useAdvancedGasFeePopoverContext)(),v=new g.Numeric(h,10).toString(),x=new g.Numeric(y,10).toString(),b=(0,o.useSelector)(c.getAdvancedGasFeeValues),{updateTransactionEventFragment:k}=(0,s.useTransactionEventFragment)(),{editGasMode:T,transaction:w}=(0,d.useGasFeeContext)(),{chainId:C}=w,_=(0,o.useSelector)((e=>(0,c.selectNetworkIdentifierByChainId)(e,C))),[E,I]=(0,a.useState)(Boolean(b)&&b.maxBaseFee===v&&b.priorityFee===x);(0,a.useEffect)((()=>{I(Boolean(b)&&b.maxBaseFee===v&&b.priorityFee===x)}),[b,v,x]);return T===i.EditGasModes.swaps?null:a.default.createElement(p.Box,{display:l.Display.Flex,flexDirection:l.FlexDirection.Row,marginTop:4,marginLeft:2,marginRight:2,paddingTop:4,paddingBottom:4,className:"advanced-gas-fee-defaults"},a.default.createElement(p.Checkbox,{isChecked:E,onChange:()=>{E?(t((0,u.setAdvancedGasFee)({chainId:C,gasFeePreferences:undefined})),I(!1),k({properties:{advanced_gas_defaults_updated_maxbasefee:null,advanced_gas_defaults_updated_priorityfee:null}})):(t((0,u.setAdvancedGasFee)({chainId:C,gasFeePreferences:{maxBaseFee:v,priorityFee:x}})),k({properties:{advanced_gas_defaults_updated_maxbasefee:v,advanced_gas_defaults_updated_priorityfee:x}}))},isDisabled:n.maxFeePerGas||n.maxPriorityFeePerGas,label:e("advancedGasFeeDefaultOptIn",[(0,r.capitalize)(_)])}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js"}],[6414,{"./advanced-gas-fee-defaults":6413},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./advanced-gas-fee-defaults"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-defaults/index.js"}],[6415,{"../../../../../../shared/modules/conversion.utils":5301,"../../../../../components/component-library":5806,"../../../../../components/ui/button":6083,"../../../../../components/ui/form-field":6115,"../../../../../contexts/gasFee":6210,"../../../../../helpers/constants/design-system":6248,"../../../../../helpers/utils/util":6297,"../../../../../hooks/useI18nContext":6334,"../../../constants":6690,"../../../send/send.constants":6752,"../context":6429,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("../../../../../contexts/gasFee"),r=e("../../../../../helpers/utils/util"),s=e("../../../../../helpers/constants/design-system"),i=e("../../../../../hooks/useI18nContext"),l=e("../../../send/send.constants"),c=g(e("../../../../../components/ui/button")),u=g(e("../../../../../components/ui/form-field")),d=e("../context"),f=e("../../../../../components/component-library"),m=e("../../../constants"),p=e("../../../../../../shared/modules/conversion.utils");function g(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,i.useI18nContext)(),{setGasLimit:t,setErrorValue:n}=(0,d.useAdvancedGasFeePopoverContext)(),{gasLimit:g,minimumGasLimitDec:h,transaction:{chainId:y,originalGasEstimate:v}}=(0,o.useGasFeeContext)(),x=v!==undefined&&(0,p.hexToDecimal)(v),[b,k]=(0,a.useState)(x?Math.max(l.MAX_GAS_LIMIT_DEC,x):l.MAX_GAS_LIMIT_DEC),[T,w]=(0,a.useState)(!1),[C,_]=(0,a.useState)(g),[E,I]=(0,a.useState)(),S=e=>{_(e)};return(0,a.useEffect)((()=>{if(t(C),m.IGNORE_GAS_LIMIT_CHAIN_IDS.includes(y))return;const e=((e,t,n)=>(0,r.bnLessThan)(e,t)||(0,r.bnGreaterThan)(e,n)?"editGasLimitOutOfBoundsV2":null)(C,h,b);I(e),w(!0===T?T:null!==e),n("gasLimit","editGasLimitOutOfBoundsV2"===e)}),[y,C,h,t,n,b,T,e]),(0,a.useEffect)((()=>{x&&k(Math.max(l.MAX_GAS_LIMIT_DEC,x))}),[h,x,k]),T?a.default.createElement(u.default,{dataTestId:"gas-limit-input",error:E?e(E,[h-1,b]):"",onChange:S,titleText:e("gasLimitV2"),value:C,allowDecimals:!1,numeric:!0}):a.default.createElement(f.Text,{tag:s.TextVariant.bodyMd,variant:s.TextVariant.bodySm,as:"h6",className:"advanced-gas-fee-gas-limit",marginTop:4,marginLeft:2,marginRight:2},a.default.createElement("strong",null,e("gasLimitV2")),a.default.createElement("span",null,C),a.default.createElement(c.default,{"data-testid":"advanced-gas-fee-edit",className:"advanced-gas-fee-gas-limit__edit-link",onClick:()=>w(!0),type:"link"},e("edit")))}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.js"}],[6416,{"./advanced-gas-fee-gas-limit":6415},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./advanced-gas-fee-gas-limit"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/index.js"}],[6417,{"../../../../../components/ui/box":6079,"../../../../../components/ui/loading-heartbeat":6139,"../../../../../contexts/i18n":6211,"../../../../../helpers/utils/gas":6278,"../../../../../helpers/utils/util":6297,classnames:3584,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=d(e("prop-types")),r=d(e("classnames")),s=e("../../../../../helpers/utils/util"),i=e("../../../../../helpers/utils/gas"),l=e("../../../../../contexts/i18n"),c=d(e("../../../../../components/ui/box")),u=d(e("../../../../../components/ui/loading-heartbeat"));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}const m=({latest:e,historical:t,trend:n})=>{const o=(0,a.useContext)(l.I18nContext),d=function(e,t){switch(e){case"up":return{className:"fa-arrow-up advanced-gas-fee-input-subtext__up",color:"var(--color-success-default)",title:t("upArrow")};case"down":return{className:"fa-arrow-down advanced-gas-fee-input-subtext__down",color:"var(--color-error-default)",title:t("downArrow")};case"level":return{className:"fa-arrow-right advanced-gas-fee-input-subtext__level",color:"var(--color-icon-alternative)",title:t("levelArrow")};default:return null}}(n,o);return a.default.createElement(c.default,{display:"flex",alignItems:"center",gap:4,className:"advanced-gas-fee-input-subtext"},(0,s.isNullish)(e)?null:a.default.createElement(c.default,{display:"flex",alignItems:"center","data-testid":"latest"},a.default.createElement("span",{className:"advanced-gas-fee-input-subtext__label"},o("currentTitle")),a.default.createElement("span",{className:"advanced-gas-fee-input-subtext__value"},a.default.createElement(u.default,null),(0,i.formatGasFeeOrFeeRange)(e)),null===d?null:a.default.createElement("span",{className:"advanced-gas-fee-input-subtext__icon"},a.default.createElement("i",{className:(0,r.default)("fa",d.className),style:{color:d.color},title:d.title,"data-testid":"fee-arrow"}))),(0,s.isNullish)(t)?null:a.default.createElement(c.default,null,a.default.createElement("span",{className:"advanced-gas-fee-input-subtext__label","data-testid":"historical"},o("twelveHrTitle")),a.default.createElement("span",{className:"advanced-gas-fee-input-subtext__value"},a.default.createElement(u.default,null),(0,i.formatGasFeeOrFeeRange)(t))))};m.propTypes={latest:o.default.oneOfType([o.default.string,o.default.arrayOf(o.default.string)]),historical:o.default.oneOfType([o.default.string,o.default.arrayOf(o.default.string)]),trend:o.default.oneOf(["up","down","level"])};n.default=m}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.js"}],[6418,{"./advanced-gas-fee-input-subtext":6417},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./advanced-gas-fee-input-subtext"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/index.js"}],[6419,{"../../../../../components/ui/box":6079,"./base-fee-input":6421,"./priority-fee-input":6423,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=i(e("react")),o=i(e("../../../../../components/ui/box")),r=i(e("./base-fee-input")),s=i(e("./priority-fee-input"));function i(e){return e&&e.__esModule?e:{default:e}}n.default=()=>a.default.createElement(o.default,{className:"advanced-gas-fee-inputs"},a.default.createElement(r.default,null),a.default.createElement(s.default,null))}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-inputs/advanced-gas-fee-inputs.js"}],[6420,{"../../../../../../../shared/constants/gas":5255,"../../../../../../../shared/modules/Numeric":5294,"../../../../../../../shared/modules/conversion.utils":5301,"../../../../../../components/ui/box":6079,"../../../../../../components/ui/form-field":6115,"../../../../../../contexts/gasFee":6210,"../../../../../../helpers/constants/common":6246,"../../../../../../hooks/useCurrencyDisplay":6324,"../../../../../../hooks/useI18nContext":6334,"../../../../../../hooks/useUserPreferencedCurrency":6368,"../../../../../../selectors":6985,"../../../../constants":6690,"../../../../send/send.constants":6752,"../../advanced-gas-fee-input-subtext":6418,"../../context":6429,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=k(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../send/send.constants"),s=e("../../../../../../../shared/constants/gas"),i=e("../../../../../../helpers/constants/common"),l=e("../../../../../../selectors"),c=e("../../../../../../contexts/gasFee"),u=e("../../../../../../hooks/useI18nContext"),d=e("../../../../../../hooks/useUserPreferencedCurrency"),f=e("../../../../../../hooks/useCurrencyDisplay"),m=b(e("../../../../../../components/ui/box")),p=b(e("../../../../../../components/ui/form-field")),g=e("../../context"),h=b(e("../../advanced-gas-fee-input-subtext")),y=e("../../../../../../../shared/modules/conversion.utils"),v=e("../../../../../../../shared/modules/Numeric"),x=e("../../../../constants");function b(e){return e&&e.__esModule?e:{default:e}}function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(k=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,u.useI18nContext)(),{gasFeeEstimates:t,estimateUsed:n,maxFeePerGas:b,editGasMode:k,transaction:{chainId:T}}=(0,c.useGasFeeContext)(),w=new v.Numeric(b,10).toString(),{gasLimit:C,maxPriorityFeePerGas:_,setErrorValue:E,setMaxFeePerGas:I,setMaxBaseFee:S}=(0,g.useAdvancedGasFeePopoverContext)(),{estimatedBaseFee:P,historicalBaseFeeRange:M,baseFeeTrend:D}=t??{},[A,O]=(0,a.useState)(),{currency:F,numberOfDecimals:N}=(0,d.useUserPreferencedCurrency)(i.PRIMARY),R=(0,o.useSelector)(l.getAdvancedGasFeeValues),j=n!==s.PriorityLevels.custom&&null!=R&&R.maxBaseFee&&k!==s.EditGasModes.swaps?R.maxBaseFee:w,[B,$]=(0,a.useState)(j>0?j:undefined);(0,a.useEffect)((()=>{B===undefined&&j>0&&$(j)}),[B,j,$]);const[W]=(0,f.useCurrencyDisplay)((0,y.decGWEIToHexWEI)(B*C),{currency:F,numberOfDecimals:N}),L=(0,a.useCallback)((e=>{$(e)}),[$]);return(0,a.useEffect)((()=>{I(B);const e=((e,t,n,a)=>{const o=new v.Numeric(e,10);return new v.Numeric(n,10).greaterThan(o)?"editGasMaxBaseFeeGWEIImbalance":null!=t&&t.low&&o.lessThan(t.low.suggestedMaxFeePerGas,10)&&x.IGNORE_GAS_LIMIT_CHAIN_IDS.includes(a)?"editGasMaxBaseFeeLow":null!=t&&t.high&&o.greaterThan(t.high.suggestedMaxFeePerGas*r.HIGH_FEE_WARNING_MULTIPLIER,10)?"editGasMaxBaseFeeHigh":null})(B,t,_,T);O(e),E("maxFeePerGas","editGasMaxBaseFeeGWEIImbalance"===e),S(B)}),[B,T,t,_,O,E,I,S]),a.default.createElement(m.default,{className:"base-fee-input",marginLeft:2,marginRight:2},a.default.createElement(p.default,{dataTestId:"base-fee-input",error:A?e(A):"",onChange:L,titleText:e("maxBaseFee"),titleUnit:`(${e("gwei")})`,tooltipText:e("advancedBaseGasFeeToolTip"),value:B,detailText:`≈ ${W}`,allowDecimals:!0,numeric:!0}),a.default.createElement(h.default,{latest:P,historical:M,trend:D}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js"}],[6421,{"./base-fee-input":6420},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./base-fee-input"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/index.js"}],[6422,{"./advanced-gas-fee-inputs":6419},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./advanced-gas-fee-inputs"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-inputs/index.js"}],[6423,{"./priority-fee-input":6424},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./priority-fee-input"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/index.js"}],[6424,{"../../../../../../../shared/constants/gas":5255,"../../../../../../../shared/modules/Numeric":5294,"../../../../../../../shared/modules/conversion.utils":5301,"../../../../../../components/ui/box":6079,"../../../../../../components/ui/form-field":6115,"../../../../../../contexts/gasFee":6210,"../../../../../../helpers/constants/common":6246,"../../../../../../hooks/useCurrencyDisplay":6324,"../../../../../../hooks/useI18nContext":6334,"../../../../../../hooks/useUserPreferencedCurrency":6368,"../../../../../../selectors":6985,"../../../../constants":6690,"../../../../send/send.constants":6752,"../../advanced-gas-fee-input-subtext":6418,"../../context":6429,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=k(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../send/send.constants"),s=e("../../../../../../../shared/constants/gas"),i=e("../../../../../../helpers/constants/common"),l=e("../../../../../../selectors"),c=e("../../../../../../hooks/useCurrencyDisplay"),u=e("../../../../../../contexts/gasFee"),d=e("../../../../../../hooks/useI18nContext"),f=e("../../../../../../hooks/useUserPreferencedCurrency"),m=b(e("../../../../../../components/ui/form-field")),p=b(e("../../../../../../components/ui/box")),g=e("../../context"),h=b(e("../../advanced-gas-fee-input-subtext")),y=e("../../../../../../../shared/modules/conversion.utils"),v=e("../../../../../../../shared/modules/Numeric"),x=e("../../../../constants");function b(e){return e&&e.__esModule?e:{default:e}}function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(k=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,d.useI18nContext)(),t=(0,o.useSelector)(l.getAdvancedGasFeeValues),{gasLimit:n,setErrorValue:b,setMaxPriorityFeePerGas:k}=(0,g.useAdvancedGasFeePopoverContext)(),{editGasMode:T,estimateUsed:w,gasFeeEstimates:C,maxPriorityFeePerGas:_,transaction:{chainId:E}}=(0,u.useGasFeeContext)(),I=new v.Numeric(_,10).toString(),{latestPriorityFeeRange:S,historicalPriorityFeeRange:P,priorityFeeTrend:M}=C??{},[D,A]=(0,a.useState)(),O=w!==s.PriorityLevels.custom&&null!=t&&t.priorityFee&&T!==s.EditGasModes.swaps?t.priorityFee:I,[F,N]=(0,a.useState)(O>0?O:undefined);(0,a.useEffect)((()=>{F===undefined&&O>0&&N(O)}),[F,O,N]);const{currency:R,numberOfDecimals:j}=(0,f.useUserPreferencedCurrency)(i.PRIMARY),[B]=(0,c.useCurrencyDisplay)((0,y.decGWEIToHexWEI)(F*n),{currency:R,numberOfDecimals:j});return(0,a.useEffect)((()=>{k(F);const e=((e,t,n)=>{const a=new v.Numeric(e,10);return a.lessThan(0,10)?"editGasMaxPriorityFeeBelowMinimumV2":null!=t&&t.low&&a.lessThan(t.low.suggestedMaxPriorityFeePerGas,10)&&x.IGNORE_GAS_LIMIT_CHAIN_IDS.includes(n)?"editGasMaxPriorityFeeLowV2":null!=t&&t.high&&a.greaterThan(t.high.suggestedMaxPriorityFeePerGas*r.HIGH_FEE_WARNING_MULTIPLIER,10)?"editGasMaxPriorityFeeHighV2":null})(F,C,E);b("maxPriorityFeePerGas","editGasMaxPriorityFeeBelowMinimumV2"===e),A(e)}),[E,C,F,b,k,A]),a.default.createElement(p.default,{marginTop:4,marginLeft:2,marginRight:2,className:"priority-fee-input"},a.default.createElement(m.default,{dataTestId:"priority-fee-input",error:D?e(D):"",onChange:e=>{N(e)},titleText:e("priorityFeeProperCase"),titleUnit:`(${e("gwei")})`,tooltipText:e("advancedPriorityFeeToolTip"),value:F,detailText:`≈ ${B}`,allowDecimals:!0,numeric:!0}),a.default.createElement(h.default,{latest:S,historical:P,trend:M}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.js"}],[6425,{"../../../../components/ui/box":6079,"../../../../components/ui/popover":6166,"../../../../contexts/transaction-modal":6218,"../../../../hooks/useI18nContext":6334,"./advanced-gas-fee-defaults":6414,"./advanced-gas-fee-gas-limit":6416,"./advanced-gas-fee-inputs":6422,"./advanced-gas-fee-save":6427,"./context":6429,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=m(e("react")),o=e("../../../../hooks/useI18nContext"),r=e("../../../../contexts/transaction-modal"),s=m(e("../../../../components/ui/box")),i=m(e("../../../../components/ui/popover")),l=e("./context"),c=m(e("./advanced-gas-fee-inputs")),u=m(e("./advanced-gas-fee-gas-limit")),d=m(e("./advanced-gas-fee-save")),f=m(e("./advanced-gas-fee-defaults"));function m(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const e=(0,o.useI18nContext)(),{closeAllModals:t,currentModal:n}=(0,r.useTransactionModalContext)();return"advancedGasFee"!==n?null:a.default.createElement(l.AdvancedGasFeePopoverContextProvider,null,a.default.createElement(i.default,{className:"advanced-gas-fee-popover",title:e("advancedGasFeeModalTitle"),onClose:t,footer:a.default.createElement(d.default,null)},a.default.createElement(s.default,{margin:4},a.default.createElement(c.default,null),a.default.createElement(f.default,null),a.default.createElement(u.default,null))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-popover.js"}],[6426,{"../../../../../../shared/constants/gas":5255,"../../../../../../shared/modules/conversion.utils":5301,"../../../../../components/ui/button":6083,"../../../../../contexts/gasFee":6210,"../../../../../contexts/transaction-modal":6218,"../../../../../hooks/useI18nContext":6334,"../../../hooks/useTransactionEventFragment":6740,"../context":6429,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=f(e("react")),o=e("../../../../../../shared/constants/gas"),r=e("../../../../../../shared/modules/conversion.utils"),s=e("../../../../../contexts/transaction-modal"),i=e("../../../../../contexts/gasFee"),l=e("../../../hooks/useTransactionEventFragment"),c=e("../../../../../hooks/useI18nContext"),u=f(e("../../../../../components/ui/button")),d=e("../context");function f(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const{closeModal:e}=(0,s.useTransactionModalContext)(),{updateTransactionEventFragment:t}=(0,l.useTransactionEventFragment)(),{updateTransaction:n}=(0,i.useGasFeeContext)(),f=(0,c.useI18nContext)(),{gasLimit:m,hasErrors:p,maxFeePerGas:g,maxPriorityFeePerGas:h}=(0,d.useAdvancedGasFeePopoverContext)();return a.default.createElement(u.default,{type:"primary",disabled:p,onClick:()=>{n({estimateUsed:o.PriorityLevels.custom,maxFeePerGas:(0,r.decGWEIToHexWEI)(g),maxPriorityFeePerGas:(0,r.decGWEIToHexWEI)(h),gasLimit:m}),t({properties:{gas_edit_type:"advanced"}}),e(["advancedGasFee","editGasFee"])}},f("save"))}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-save/advanced-gas-fee-save.js"}],[6427,{"./advanced-gas-fee-save":6426},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./advanced-gas-fee-save"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-save/index.js"}],[6428,{"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AdvancedGasFeePopoverContextProvider=n.AdvancedGasFeePopoverContext=void 0,n.useAdvancedGasFeePopoverContext=function(){return(0,o.useContext)(i)};var a,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(a,r,i):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=(a=e("prop-types"))&&a.__esModule?a:{default:a};function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}const i=n.AdvancedGasFeePopoverContext=(0,o.createContext)({}),l=({children:e})=>{const[t,n]=(0,o.useState)(),[a,r]=(0,o.useState)(),[s,l]=(0,o.useState)(),[c,u]=(0,o.useState)({maxFeePerGas:!1,maxPriorityFeePerGas:!1,gasLimit:!1}),d=(0,o.useCallback)(((e,t)=>{c[e]!==t&&u({...c,[e]:t})}),[c,u]),[f,m]=(0,o.useState)();return o.default.createElement(i.Provider,{value:{gasLimit:t,hasErrors:c.maxFeePerGas||c.maxPriorityFeePerGas||c.gasLimit,gasErrors:c,maxFeePerGas:a,maxPriorityFeePerGas:s,setErrorValue:d,maxBaseFee:f,setGasLimit:n,setMaxPriorityFeePerGas:l,setMaxFeePerGas:r,setMaxBaseFee:m}},e)};n.AdvancedGasFeePopoverContextProvider=l,l.propTypes={children:r.default.node.isRequired}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/context/advancedGasFeePopover.js"}],[6429,{"./advancedGasFeePopover":6428},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var a=e("./advancedGasFeePopover");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===a[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return a[e]}}))}))}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/context/index.js"}],[6430,{"./advanced-gas-fee-popover":6425},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./advanced-gas-fee-popover"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/index.js"}],[6431,{"../../../../../shared/modules/transaction.utils":5326,"../../../../components/component-library":5806,"../../../../components/ui/box/box":6078,"../../../../components/ui/button":6083,"../../../../contexts/i18n":6211,"../../../../helpers/constants/design-system":6248,"../../../../helpers/utils/confirm-tx.util":6275,"../confirm-gas-display":6435,classnames:3584,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=h;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=p(e("prop-types")),r=p(e("classnames")),s=p(e("../../../../components/ui/box/box")),i=p(e("../../../../components/ui/button")),l=e("../../../../components/component-library"),c=e("../../../../helpers/constants/design-system"),u=e("../../../../contexts/i18n"),d=e("../confirm-gas-display"),f=e("../../../../helpers/utils/confirm-tx.util"),m=e("../../../../../shared/modules/transaction.utils");function p(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function h({showHeader:e=!0,symbol:t,title:n,showEdit:o,showAdvanceGasFeeOptions:p=!1,onEditClick:g,footer:h,noBorder:y,supportsEIP1559:v,renderTransactionDetailsContent:x,renderDataContent:b,ethTransactionTotal:k,nativeCurrency:T,fiatTransactionTotal:w,currentCurrency:C,isSetApproveForAll:_,isApprovalOrRejection:E,data:I,userAcknowledgedGasMissing:S,renderSimulationFailureWarning:P,useCurrencyRateCheck:M}){const D=(0,a.useContext)(u.I18nContext),A=(0,m.parseStandardTokenTransactionData)(I),O=null==A?void 0:A.name,F=(null==O?void 0:O.charAt(0).toUpperCase())+(null==O?void 0:O.slice(1));return a.default.createElement(s.default,{className:(0,r.default)({"approve-content-card-container__card":!y,"approve-content-card-container__card--no-border":y})},e&&a.default.createElement(s.default,{display:c.Display.Flex,flexDirection:c.FlexDirection.Row,alignItems:c.AlignItems.center,justifyContent:c.JustifyContent.flexEnd,className:"approve-content-card-container__card-header"},v&&n===D("transactionFee")?null:a.default.createElement(a.default.Fragment,null,a.default.createElement(s.default,{className:"approve-content-card-container__card-header__symbol"},t),a.default.createElement(s.default,{marginLeft:4,className:"approve-content-card-container__card-header__title"},a.default.createElement(l.Text,{variant:c.TextVariant.bodySmBold,as:"h6"},n))),o&&(!p||!v)&&a.default.createElement(s.default,{width:c.BlockSize.OneSixth},a.default.createElement(i.default,{type:"link",onClick:()=>g()},a.default.createElement(l.Text,{variant:c.TextVariant.bodySm,color:c.TextColor.primaryDefault,as:"h6"},D("edit"))))),a.default.createElement(s.default,{marginTop:1,marginBottom:3,className:"approve-content-card-container__card-content"},x&&(v&&!P?a.default.createElement(d.ConfirmGasDisplay,{userAcknowledgedGasMissing:S}):a.default.createElement(s.default,{display:c.Display.Flex,flexDirection:c.FlexDirection.Row,justifyContent:c.JustifyContent.spaceBetween},a.default.createElement(s.default,null,a.default.createElement(l.Text,{variant:c.TextVariant.bodySm,color:c.TextColor.textAlternative,as:"h6"},D("feeAssociatedRequest"))),a.default.createElement(s.default,{display:c.Display.Flex,flexDirection:c.FlexDirection.Column,alignItems:c.AlignItems.flexEnd,textAlign:c.TextAlign.Right},M&&a.default.createElement(s.default,null,a.default.createElement(l.Text,{variant:c.TextVariant.headingSm,fontWeight:c.FontWeight.Bold,color:c.TextColor.textDefault,as:"h4"},(0,f.formatCurrency)(w,C))),a.default.createElement(s.default,null,a.default.createElement(l.Text,{variant:c.TextVariant.bodySm,fontWeight:c.FontWeight.Normal,color:c.TextColor.textMuted,as:"h6"},`${k} ${T}`))))),b&&a.default.createElement(s.default,{display:c.Display.Flex,flexDirection:c.FlexDirection.Column},a.default.createElement(s.default,null,a.default.createElement(l.Text,{variant:c.TextVariant.bodySm,color:c.TextColor.textAlternative,as:"h6"},`${D("function",[F])}`)),_&&E!==undefined?a.default.createElement(s.default,null,a.default.createElement(l.Text,{variant:c.TextVariant.bodySm,color:c.TextColor.textAlternative,as:"h6"},`${D("parameters")}: ${E}`)):null,a.default.createElement(s.default,{marginRight:4,className:"approve-content-card-container__data__data-block"},a.default.createElement(l.Text,{variant:c.TextVariant.bodySm,color:c.TextColor.textAlternative,as:"h6"},I)))),h)}h.propTypes={showHeader:o.default.bool,symbol:o.default.node,title:o.default.string,showEdit:o.default.bool,showAdvanceGasFeeOptions:o.default.bool,onEditClick:o.default.func,footer:o.default.node,noBorder:o.default.bool,supportsEIP1559:o.default.bool,renderTransactionDetailsContent:o.default.bool,renderDataContent:o.default.bool,ethTransactionTotal:o.default.string,nativeCurrency:o.default.string,fiatTransactionTotal:o.default.string,currentCurrency:o.default.string,isSetApproveForAll:o.default.bool,isApprovalOrRejection:o.default.bool,data:o.default.string,userAcknowledgedGasMissing:o.default.bool,renderSimulationFailureWarning:o.default.bool,useCurrencyRateCheck:o.default.bool}}}},{package:"$root$",file:"ui/pages/confirmations/components/approve-content-card/approve-content-card.js"}],[6432,{"../../../../ducks/send":6241,"../../../../helpers/utils/transactions.util":6295,"../../../../selectors":6985,"../gas-details-item":6576,"./confirm-legacy-gas-display":6434,"@metamask/transaction-controller":2698,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=f(e("react")),o=f(e("prop-types")),r=e("react-redux"),s=e("@metamask/transaction-controller"),i=e("../../../../selectors"),l=e("../../../../helpers/utils/transactions.util"),c=f(e("../gas-details-item")),u=e("../../../../ducks/send"),d=e("./confirm-legacy-gas-display");function f(e){return e&&e.__esModule?e:{default:e}}const m=({userAcknowledgedGasMissing:e=!1})=>{const{txParams:t}=(0,r.useSelector)((e=>(0,i.txDataSelector)(e))),n=(0,r.useSelector)(u.getCurrentDraftTransaction),o=null==n?void 0:n.transactionType;let f;f=o?o===s.TransactionEnvelopeType.legacy:(0,l.isLegacyTransaction)(t);const m="confirm-gas-display";return(0,r.useSelector)(i.checkNetworkAndAccountSupports1559)&&!f?a.default.createElement(c.default,{"data-testid":m,userAcknowledgedGasMissing:e}):a.default.createElement(d.ConfirmLegacyGasDisplay,{"data-testid":m})};m.propTypes={userAcknowledgedGasMissing:o.default.bool};n.default=m}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.js"}],[6433,{"../../../../../../shared/modules/conversion.utils":5301,"../../../../../components/app/user-preferenced-currency-display":5727,"../../../../../components/component-library":5806,"../../../../../components/ui/info-tooltip":6134,"../../../../../components/ui/loading-heartbeat":6139,"../../../../../helpers/constants/common":6246,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useI18nContext":6334,"../../../../../selectors":6985,"../../../hooks/useDraftTransactionWithTxParams":6723,"../../transaction-detail-item":6636,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=y(e("react")),o=y(e("prop-types")),r=e("react-redux"),s=e("../../../../../hooks/useI18nContext"),i=e("../../../../../selectors"),l=e("../../../../../helpers/constants/common"),c=y(e("../../transaction-detail-item")),u=y(e("../../../../../components/app/user-preferenced-currency-display")),d=y(e("../../../../../components/ui/info-tooltip")),f=y(e("../../../../../components/ui/loading-heartbeat")),m=e("../../../../../helpers/constants/design-system"),p=e("../../../hooks/useDraftTransactionWithTxParams"),g=e("../../../../../components/component-library"),h=e("../../../../../../shared/modules/conversion.utils");function y(e){return e&&e.__esModule?e:{default:e}}const v=()=>a.default.createElement(f.default,null),x=({"data-testid":e}={})=>{const t=(0,s.useI18nContext)(),n=(0,r.useSelector)(i.getIsMainnet),o=(0,r.useSelector)(i.getUseCurrencyRateCheck),f=(0,r.useSelector)(i.getUnapprovedTransactions),y=(0,p.useDraftTransactionWithTxParams)(),x=(0,r.useSelector)((e=>(0,i.txDataSelector)(e))),{id:b,dappSuggestedGasFees:k,layer1GasFee:T}=x,w=Object.keys(y).length?y:f[b]||{},{hexMinimumTransactionFee:C,hexMaximumTransactionFee:_}=(0,r.useSelector)((e=>(0,i.transactionFeeSelector)(e,w))),E=(0,h.addHexes)(C,T??"0x0"),I=(0,h.addHexes)(_,T??"0x0");return a.default.createElement(c.default,{key:"legacy-gas-details","data-testid":e,detailTitle:k?a.default.createElement(a.default.Fragment,null,t("transactionDetailGasHeading"),a.default.createElement(d.default,{contentText:t("transactionDetailDappGasTooltip"),position:"top"},a.default.createElement(g.Icon,{name:g.IconName.Info}))):a.default.createElement(a.default.Fragment,null,t("transactionDetailGasHeading"),a.default.createElement(d.default,{contentText:a.default.createElement(a.default.Fragment,null,a.default.createElement("p",null,t("transactionDetailGasTooltipIntro",[n?t("networkNameEthereum"):""])),a.default.createElement("p",null,t("transactionDetailGasTooltipExplanation")),a.default.createElement("p",null,a.default.createElement("a",{href:"https://community.metamask.io/t/what-is-gas-why-do-transactions-take-so-long/3172",target:"_blank",rel:"noopener noreferrer"},t("transactionDetailGasTooltipConversion")))),position:"top"},a.default.createElement(g.Icon,{name:g.IconName.Info}))),detailText:o&&a.default.createElement("div",null,v(),a.default.createElement(u.default,{type:l.SECONDARY,value:E,hideLabel:!0})),detailTotal:a.default.createElement("div",null,v(),a.default.createElement(u.default,{type:l.PRIMARY,value:E,suffixProps:{color:m.TextColor.textDefault,variant:m.TextVariant.bodyMdBold},textProps:{color:m.TextColor.textDefault,variant:m.TextVariant.bodyMdBold},numberOfDecimals:6})),subText:a.default.createElement(a.default.Fragment,null,a.default.createElement("strong",{key:"editGasSubTextFeeLabel"},t("editGasSubTextFeeLabel")),a.default.createElement("div",{key:"editGasSubTextFeeValue"},v(),a.default.createElement(u.default,{key:"editGasSubTextFeeAmount",type:l.PRIMARY,value:I}))),subTitle:k&&t("transactionDetailDappGasMoreInfo")})};x.propTypes={"data-testid":o.default.string};n.default=x}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.js"}],[6434,{"./confirm-legacy-gas-display":6433},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmLegacyGasDisplay",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-legacy-gas-display"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/index.js"}],[6435,{"./confirm-gas-display":6432},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmGasDisplay",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-gas-display"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-gas-display/index.js"}],[6436,{"../../../../../shared/modules/buffer-utils":5298,"../../../../../shared/modules/transaction.utils":5326,"../../../../components/component-library":5806,"../../../../components/ui/box":6079,"../../../../helpers/constants/design-system":6248,"../../../../hooks/useI18nContext":6334,"../../../../selectors":6985,"../../hooks/useTransactionFunctionType":6741,"../transaction-decoding/components/ui/copy-raw-data":6635,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=g(e("react")),o=g(e("prop-types")),r=e("react-redux"),s=e("../../../../../shared/modules/buffer-utils"),i=e("../../../../selectors"),l=e("../../../../hooks/useI18nContext"),c=e("../../hooks/useTransactionFunctionType"),u=e("../../../../helpers/constants/design-system"),d=g(e("../../../../components/ui/box")),f=e("../../../../components/component-library"),m=g(e("../transaction-decoding/components/ui/copy-raw-data")),p=e("../../../../../shared/modules/transaction.utils");function g(e){return e&&e.__esModule?e:{default:e}}const h=({txData:e,dataHexComponent:t})=>{const n=(0,l.useI18nContext)(),{txParams:o={}}=e,g=(0,r.useSelector)((e=>(0,i.getKnownMethodData)(e,o.data)||{})),{functionType:h}=(0,c.useTransactionFunctionType)(e);if(t)return t;if(!(0,p.hasTransactionData)(o.data)||!o.to)return null;const{params:y}=g,v=null!=y&&y.length?`(${y.map((({type:e})=>e)).join(", ")})`:"";return a.default.createElement(d.default,{padding:4},a.default.createElement(d.default,{paddingBottom:3,paddingTop:2},a.default.createElement(f.Text,{as:"span",textTransform:u.TextTransform.Uppercase,variant:u.TextVariant.bodySm},`${n("functionType")}:`),a.default.createElement(f.Text,{as:"span",color:u.Color.textDefault,paddingLeft:1,textTransform:u.TextTransform.Capitalize,variant:u.TextVariant.bodySmBold},`${h} ${v}`)),y&&a.default.createElement(d.default,{backgroundColor:u.Color.backgroundAlternative,padding:4},a.default.createElement(f.Text,{as:"h3",paddingBottom:3,paddingTop:2,textTransform:u.TextTransform.Uppercase,variant:u.TextVariant.bodySm},`${n("parameters")}:`),a.default.createElement(f.Text,{overflowWrap:u.OverflowWrap.BreakWord,variant:u.TextVariant.bodySm},a.default.createElement("pre",null,JSON.stringify(y,null,2)))),a.default.createElement(f.Text,{as:"h3",paddingBottom:3,paddingTop:2,textTransform:u.TextTransform.Uppercase,variant:u.TextVariant.bodySm},`${n("hexData")}: ${(0,s.toBuffer)(null==o?void 0:o.data).length} bytes`),a.default.createElement(f.Text,{backgroundColor:u.Color.backgroundAlternative,overflowWrap:u.OverflowWrap.BreakWord,padding:4,variant:u.TextVariant.bodySm},null==o?void 0:o.data),a.default.createElement(m.default,{data:null==o?void 0:o.data}))};h.propTypes={txData:o.default.object,dataHexComponent:o.default.element};n.default=h}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-hexdata/confirm-hexdata.js"}],[6437,{"./confirm-hexdata":6436},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmHexData",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-hexdata"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-hexdata/index.js"}],[6438,{"../../../../../components/app/user-preferenced-currency-display":5727,"../../../../../helpers/constants/common":6246,classnames:3584,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(e("react")),o=l(e("prop-types")),r=l(e("classnames")),s=l(e("../../../../../components/app/user-preferenced-currency-display")),i=e("../../../../../helpers/constants/common");function l(e){return e&&e.__esModule?e:{default:e}}const c=e=>{const{label:t,primaryText:n,secondaryText:o,onHeaderClick:l,primaryValueTextColor:c,headerText:u,headerTextClassName:d,value:f}=e;return a.default.createElement("div",{className:"confirm-detail-row"},a.default.createElement("div",{className:"confirm-detail-row__label"},t),a.default.createElement("div",{className:"confirm-detail-row__details"},u&&a.default.createElement("div",{className:(0,r.default)("confirm-detail-row__header-text",d),onClick:()=>null==l?void 0:l()},u),n?a.default.createElement("div",{className:"confirm-detail-row__primary",style:{color:c}},n):a.default.createElement(s.default,{className:"confirm-detail-row__primary",type:i.PRIMARY,value:f,showEthLogo:!0,style:{color:c},hideLabel:!0}),o?a.default.createElement("div",{className:"confirm-detail-row__secondary"},o):a.default.createElement(s.default,{className:"confirm-detail-row__secondary",type:i.SECONDARY,value:f,showEthLogo:!0,hideLabel:!0})))};c.propTypes={headerText:o.default.string,headerTextClassName:o.default.string,label:o.default.string,onHeaderClick:o.default.func,primaryValueTextColor:o.default.string,primaryText:o.default.oneOfType([o.default.string,o.default.node]),secondaryText:o.default.string,value:o.default.string};n.default=c}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js"}],[6439,{"./confirm-detail-row.component":6438},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-detail-row.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-detail-row/index.js"}],[6440,{".":6445,"../../../../../../shared/constants/security-provider":5270,"../../../../../components/component-library":5806,"../../../../../components/ui/page-container":6160,"../../../../../components/ui/tabs":6183,"../../../../../helpers/constants/design-system":6248,"../../../../../helpers/constants/error-keys":6249,classnames:3584,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=m(e("prop-types")),r=m(e("classnames")),s=e("../../../../../components/ui/tabs"),i=e("../../../../../components/component-library"),l=e("../../../../../components/ui/page-container"),c=e("../../../../../helpers/constants/error-keys"),u=e("../../../../../helpers/constants/design-system"),d=e("../../../../../../shared/constants/security-provider"),f=e(".");function m(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=typeof a)return a;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:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class h extends a.Component{renderContent(){const{detailsComponent:e,dataHexComponent:t,insightComponent:n}=this.props;return n&&(e||t)||e&&t?this.renderTabs():e||n}renderTabs(){const{t:e}=this.context,{detailsComponent:t,dataHexComponent:n,insightComponent:o}=this.props;return a.default.createElement(s.Tabs,{defaultActiveTabKey:"details"},a.default.createElement(s.Tab,{className:"confirm-page-container-content__tab",name:e("details"),tabKey:"details"},t),n&&a.default.createElement(s.Tab,{className:"confirm-page-container-content__tab",name:e("dataHex"),tabKey:"dataHex"},n),o)}render(){var e;const{action:t,errorKey:n,errorMessage:o,image:s,titleComponent:m,subtitleComponent:p,tokenAddress:g,nonce:h,detailsComponent:y,warning:v,onCancelAll:x,onCancel:b,cancelText:k,onSubmit:T,submitText:w,disabled:C,unapprovedTxCount:_,rejectNText:E,origin:I,ethGasPriceWarning:S,supportsEIP1559:P,hasTopBorder:M,nativeCurrency:D,networkName:A,toAddress:O,transactionType:F,isBuyableChain:N,openBuyCryptoInPdapp:R,txData:j}=this.props,{t:B}=this.context,$=(n||o)&&n===c.INSUFFICIENT_FUNDS_ERROR_KEY,W=n===c.IS_SIGNING_OR_SUBMITTING,L=n===c.USER_OP_CONTRACT_DEPLOY_ERROR_KEY,G=(null==j||null===(e=j.securityAlertResponse)||void 0===e?void 0:e.result_type)===d.BlockaidResultType.Malicious?"danger-primary":"primary";return a.default.createElement("div",{className:(0,r.default)("confirm-page-container-content",{"confirm-page-container-content--with-top-border":M})},v?a.default.createElement(f.ConfirmPageContainerWarning,{warning:v}):null,S&&a.default.createElement(f.ConfirmPageContainerWarning,{warning:S}),a.default.createElement(f.ConfirmPageContainerSummary,{className:(0,r.default)({"confirm-page-container-summary--border":!y}),action:t,image:s,titleComponent:m,subtitleComponent:p,tokenAddress:g,nonce:h,origin:I,toAddress:O,transactionType:F}),this.renderContent(),!P&&!$&&!W&&!L&&(n||o)&&a.default.createElement(i.BannerAlert,{severity:u.Severity.Danger,description:n?B(n):o,marginBottom:4,marginLeft:4,marginRight:4}),$&&a.default.createElement(i.BannerAlert,{severity:u.Severity.Danger,marginBottom:4,marginLeft:4,marginRight:4,description:N?B("insufficientCurrencyBuyOrDeposit",[D,A,a.default.createElement(i.Button,{variant:i.BUTTON_VARIANT.LINK,size:i.BUTTON_SIZES.INHERIT,onClick:R,key:`${D}-buy-button`},B("buyAsset",[D]))]):B("insufficientCurrencyDeposit",[D,A])}),(W||L)&&a.default.createElement(i.BannerAlert,{"data-testid":"confirm-page-container-content-error-banner-2",severity:u.Severity.Danger,description:B(n),marginBottom:4,marginLeft:4,marginRight:4}),a.default.createElement(l.PageContainerFooter,{onCancel:b,cancelText:k,onSubmit:T,submitText:w,disabled:C,submitButtonType:G},_>1?a.default.createElement("a",{onClick:x},E):null))}}n.default=h,g(h,"contextTypes",{t:o.default.func.isRequired}),g(h,"propTypes",{action:o.default.string,dataHexComponent:o.default.node,detailsComponent:o.default.node,insightComponent:o.default.node,errorKey:o.default.string,errorMessage:o.default.string,tokenAddress:o.default.string,nonce:o.default.string,subtitleComponent:o.default.node,image:o.default.string,titleComponent:o.default.node,warning:o.default.string,origin:o.default.string.isRequired,ethGasPriceWarning:o.default.string,onCancelAll:o.default.func,onCancel:o.default.func,cancelText:o.default.string,onSubmit:o.default.func,submitText:o.default.string,disabled:o.default.bool,unapprovedTxCount:o.default.number,rejectNText:o.default.string,supportsEIP1559:o.default.bool,hasTopBorder:o.default.bool,nativeCurrency:o.default.string,networkName:o.default.string,toAddress:o.default.string,transactionType:o.default.string,isBuyableChain:o.default.bool,openBuyCryptoInPdapp:o.default.func,txData:o.default.object})}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js"}],[6441,{"../../../../../../../shared/constants/app":5248,"../../../../../../../shared/modules/hexstring-utils":5307,"../../../../../../components/app/modals/nickname-popovers":5511,"../../../../../../components/ui/identicon":6133,"../../../../../../components/ui/info-tooltip":6134,"../../../../../../components/ui/site-origin":6177,"../../../../../../hooks/useAddressDetails":6320,"../../../../../../hooks/useGetAssetImageUrl":6332,"../../../../../../hooks/useI18nContext":6334,"../../../../../../selectors":6985,"@metamask/transaction-controller":2698,classnames:3584,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=x(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=v(e("prop-types")),s=v(e("classnames")),i=e("@metamask/transaction-controller"),l=e("../../../../../../../shared/modules/hexstring-utils"),c=e("../../../../../../hooks/useI18nContext"),u=v(e("../../../../../../hooks/useAddressDetails")),d=e("../../../../../../selectors"),f=v(e("../../../../../../components/ui/identicon")),m=v(e("../../../../../../components/ui/info-tooltip")),p=v(e("../../../../../../components/app/modals/nickname-popovers")),g=e("../../../../../../../shared/constants/app"),h=v(e("../../../../../../components/ui/site-origin")),y=v(e("../../../../../../hooks/useGetAssetImageUrl"));function v(e){return e&&e.__esModule?e:{default:e}}function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(x=function(e){return e?n:t})(e)}const b=e=>{const{action:t,titleComponent:n,subtitleComponent:r,className:v,tokenAddress:x,nonce:b,origin:k,image:T,transactionType:w}=e,[C,_]=(0,a.useState)(!1),E=(0,c.useI18nContext)(),I=(0,o.useSelector)(d.getIpfsGateway),S=(0,o.useSelector)(d.txDataSelector),P=(0,y.default)(T,I),{txParams:M={}}=S,{to:D}=M,A=[i.TransactionType.contractInteraction,i.TransactionType.tokenMethodTransfer,i.TransactionType.tokenMethodTransferFrom,i.TransactionType.tokenMethodSafeTransferFrom].includes(w);let O;A&&(O=w===i.TransactionType.tokenMethodTransfer||w===i.TransactionType.tokenMethodTransferFrom||w===i.TransactionType.tokenMethodSafeTransferFrom||w===i.TransactionType.tokenMethodSetApprovalForAll?x:D);const{toName:F,isTrusted:N}=(0,u.default)(O),R=(0,l.toChecksumHexAddress)(O);return a.default.createElement("div",{className:(0,s.default)("confirm-page-container-summary",v)},k===g.ORIGIN_METAMASK?null:a.default.createElement(h.default,{className:"confirm-page-container-summary__origin",siteOrigin:k}),a.default.createElement("div",{className:"confirm-page-container-summary__action-row"},a.default.createElement("div",{className:"confirm-page-container-summary__action"},A&&F&&a.default.createElement("span",{className:"confirm-page-container-summary__action__contract-address"},a.default.createElement("button",{className:"confirm-page-container-summary__action__contract-address-btn",onClick:()=>_(!0),role:"button"},F),":"),a.default.createElement("span",{className:"confirm-page-container-summary__action__name"},t),A&&!1===N&&a.default.createElement(m.default,{position:"top",contentText:E("unverifiedContractAddressMessage")})),b&&a.default.createElement("div",{className:"confirm-page-container-summary__nonce"},`#${b}`)),a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:"confirm-page-container-summary__title"},T?a.default.createElement("img",{className:"confirm-page-container-summary__icon",width:36,src:P}):O?a.default.createElement(f.default,{className:"confirm-page-container-summary__icon",diameter:36,address:O}):null,n),r),C&&a.default.createElement(p.default,{onClose:()=>_(!1),address:R}))};b.propTypes={action:r.default.string,image:r.default.string,titleComponent:r.default.node,subtitleComponent:r.default.node,className:r.default.string,tokenAddress:r.default.string,nonce:r.default.string,origin:r.default.string.isRequired,transactionType:r.default.string};n.default=b}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js"}],[6442,{"./confirm-page-container-summary.component":6441},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-page-container-summary.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js"}],[6443,{"../../../../../../components/component-library":5806,"../../../../../../helpers/constants/design-system":6248,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=i(e("react")),o=i(e("prop-types")),r=e("../../../../../../components/component-library"),s=e("../../../../../../helpers/constants/design-system");function i(e){return e&&e.__esModule?e:{default:e}}const l=e=>a.default.createElement("div",{className:"confirm-page-container-warning"},a.default.createElement(r.Icon,{name:r.IconName.Info,color:s.IconColor.warningDefault,className:"confirm-page-container-warning__icon"}),a.default.createElement("div",{className:"confirm-page-container-warning__warning"},e.warning));l.propTypes={warning:o.default.string};n.default=l}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js"}],[6444,{"./confirm-page-container-warning.component":6443},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-page-container-warning.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js"}],[6445,{"./confirm-page-container-content.component":6440,"./confirm-page-container-summary":6442,"./confirm-page-container-warning":6444},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmPageContainerSummary",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"ConfirmPageContainerWarning",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a.default}});var a=s(e("./confirm-page-container-content.component")),o=s(e("./confirm-page-container-summary")),r=s(e("./confirm-page-container-warning"));function s(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/index.js"}],[6446,{"../../../../../../app/scripts/lib/util":135,"../../../../../../shared/constants/app":5248,"../../../../../components/app/network-display":5536,"../../../../../components/component-library":5806,"../../../../../components/ui/account-mismatch-warning/account-mismatch-warning.component":6074,"../../../../../components/ui/identicon":6133,"../../../../../helpers/utils/util":6297,"../../../../../hooks/useI18nContext":6334,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=p;var a=m(e("react")),o=m(e("prop-types")),r=e("../../../../../../shared/constants/app"),s=e("../../../../../../app/scripts/lib/util"),i=m(e("../../../../../components/app/network-display")),l=m(e("../../../../../components/ui/identicon")),c=e("../../../../../helpers/utils/util"),u=m(e("../../../../../components/ui/account-mismatch-warning/account-mismatch-warning.component")),d=e("../../../../../hooks/useI18nContext"),f=e("../../../../../components/component-library");function m(e){return e&&e.__esModule?e:{default:e}}function p({onEdit:e,showEdit:t,accountAddress:n,showAccountInHeader:o,children:m,origin:p}){const g=(0,d.useI18nContext)(),h=(0,s.getEnvironmentType)(),y=h!==r.ENVIRONMENT_TYPE_NOTIFICATION&&h!==r.ENVIRONMENT_TYPE_POPUP;return!t&&y?m:a.default.createElement("div",{className:"confirm-page-container-header","data-testid":"header-container"},a.default.createElement("div",{className:"confirm-page-container-header__row"},o?a.default.createElement("div",{className:"confirm-page-container-header__address-container"},a.default.createElement("div",{className:"confirm-page-container-header__address-identicon"},a.default.createElement(l.default,{address:n,diameter:24})),a.default.createElement("div",{className:"confirm-page-container-header__address","data-testid":"header-address"},(0,c.shortenAddress)(n)),a.default.createElement(u.default,{address:n})):p===r.ORIGIN_METAMASK&&a.default.createElement("div",{className:"confirm-page-container-header__back-button-container",style:{visibility:t?"initial":"hidden"}},a.default.createElement(f.Icon,{name:f.IconName.ArrowLeft}),a.default.createElement("span",{"data-testid":"confirm-page-back-edit-button",className:"confirm-page-container-header__back-button",onClick:()=>e()},g("edit"))),a.default.createElement(i.default,null)),m)}p.propTypes={accountAddress:o.default.string,showAccountInHeader:o.default.bool,showEdit:o.default.bool,onEdit:o.default.func,children:o.default.node,origin:o.default.string}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js"}],[6447,{"./confirm-page-container-header.component":6446},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-page-container-header.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/index.js"}],[6448,{"../../../../../../shared/constants/metametrics":5260,"../../../../../contexts/i18n":6211,"../../../../../ducks/confirm-transaction/confirm-transaction.duck":6229,"../../../../../helpers/constants/routes":6254,"../../../../../selectors":6985,"../../../hooks/useQueuedConfirmationEvents":6733,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("react-router-dom"),s=e("../../../../../selectors"),i=e("../../../../../contexts/i18n"),l=e("../../../../../helpers/constants/routes"),c=e("../../../../../ducks/confirm-transaction/confirm-transaction.duck"),u=e("../../../../../../shared/constants/metametrics"),d=e("../../../hooks/useQueuedConfirmationEvents");function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,a.useContext)(i.I18nContext),t=(0,o.useDispatch)(),n=(0,r.useHistory)(),{id:f}=(0,r.useParams)(),m=(0,o.useSelector)(s.unapprovedDecryptMsgsSelector),p=(0,o.useSelector)(s.unapprovedEncryptionPublicKeyMsgsSelector),g=(0,o.useSelector)(s.unconfirmedTransactionsListSelector)??[],h=[...Object.keys(m||{}),...Object.keys(p||{})],y=g.map((e=>e.id)).filter((e=>!1===h.includes(e))),v=y.indexOf(f),x=y.length,b=v+1,k=y[v+1],T=y[v-1],w=y.length>1,C=y[0],_=y[y.length-1],E=e=>{if(e){var a;t((0,c.clearConfirmTransaction)());const o=y.indexOf(e);n.push(null!==(a=g[o])&&void 0!==a&&a.msgParams?`${l.CONFIRM_TRANSACTION_ROUTE}/${e}${l.SIGNATURE_REQUEST_PATH}`:`${l.CONFIRM_TRANSACTION_ROUTE}/${e}`)}};return(0,d.useQueuedConfirmationsEvent)(u.QueueType.NavigationHeader),a.default.createElement("div",{className:"confirm-page-container-navigation",style:{display:w?"flex":"none"}},a.default.createElement("div",{className:"confirm-page-container-navigation__container","data-testid":"navigation-container",style:{visibility:T?"initial":"hidden"}},a.default.createElement("button",{className:"confirm-page-container-navigation__arrow","data-testid":"first-page",onClick:()=>E(C)},a.default.createElement("i",{className:"fa fa-angle-double-left fa-2x"})),a.default.createElement("button",{className:"confirm-page-container-navigation__arrow","data-testid":"previous-page",onClick:()=>E(T)},a.default.createElement("i",{className:"fa fa-angle-left fa-2x"}))),a.default.createElement("div",{className:"confirm-page-container-navigation__textcontainer"},a.default.createElement("div",{className:"confirm-page-container-navigation__navtext"},b," ",e("ofTextNofM")," ",x),a.default.createElement("div",{className:"confirm-page-container-navigation__longtext"},e("requestsAwaitingAcknowledgement"))),a.default.createElement("div",{className:"confirm-page-container-navigation__container",style:{visibility:k?"initial":"hidden"}},a.default.createElement("button",{className:"confirm-page-container-navigation__arrow","data-testid":"next-page",onClick:()=>E(k)},a.default.createElement("i",{className:"fa fa-angle-right fa-2x"})),a.default.createElement("button",{className:"confirm-page-container-navigation__arrow","data-testid":"last-page",onClick:()=>E(_)},a.default.createElement("i",{className:"fa fa-angle-double-right fa-2x"}))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js"}],[6449,{"./confirm-page-container-navigation.component":6448},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-page-container-navigation.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-navigation/index.js"}],[6450,{".":6451,"../../../../../shared/constants/gas":5255,"../../../../../shared/constants/metametrics":5260,"../../../../../shared/constants/network":5264,"../../../../../shared/constants/security-provider":5270,"../../../../../shared/constants/transaction":5278,"../../../../../shared/lib/token-util":5290,"../../../../components/app/network-account-balance-header/network-account-balance-header":5535,"../../../../components/app/snaps/insight-warnings":5571,"../../../../components/component-library":5806,"../../../../components/ui/actionable-message/actionable-message":6075,"../../../../components/ui/button":6083,"../../../../components/ui/error-message":6110,"../../../../components/ui/page-container":6160,"../../../../components/ui/sender-to-recipient":6172,"../../../../contexts/gasFee":6210,"../../../../contexts/metametrics":6214,"../../../../ducks/ramps":6238,"../../../../helpers/constants/design-system":6248,"../../../../helpers/constants/error-keys":6249,"../../../../hooks/ramps/useRamps/useRamps":6311,"../../../../hooks/useI18nContext":6334,"../../../../hooks/useTransactionInsights":6367,"../../../../selectors":6985,"../advanced-gas-fee-popover":6430,"../edit-gas-fee-popover/edit-gas-fee-popover":6560,"../edit-gas-popover":6573,"../set-approval-for-all-warning":6588,"@metamask/transaction-controller":2698,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=R(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=N(e("prop-types")),r=e("react-redux"),s=e("@metamask/transaction-controller"),i=e("../../../../../shared/constants/gas"),l=e("../../../../contexts/gasFee"),c=e("../../../../../shared/constants/transaction"),u=e("../../../../../shared/constants/network"),d=e("../../../../components/ui/page-container"),f=N(e("../../../../components/ui/button")),m=N(e("../../../../components/ui/actionable-message/actionable-message")),p=N(e("../../../../components/ui/sender-to-recipient")),g=e("../../../../../shared/lib/token-util"),h=N(e("../advanced-gas-fee-popover")),y=N(e("../edit-gas-fee-popover/edit-gas-fee-popover")),v=N(e("../edit-gas-popover")),x=N(e("../../../../components/ui/error-message")),b=e("../../../../helpers/constants/error-keys"),k=e("../../../../components/component-library"),T=e("../../../../helpers/constants/design-system"),w=N(e("../../../../components/app/network-account-balance-header/network-account-balance-header")),C=N(e("../set-approval-for-all-warning")),_=e("../../../../hooks/useI18nContext"),E=N(e("../../../../hooks/useTransactionInsights")),I=N(e("../../../../components/app/snaps/insight-warnings")),S=e("../../../../selectors"),P=N(e("../../../../hooks/ramps/useRamps/useRamps")),M=e("../../../../contexts/metametrics"),D=e("../../../../../shared/constants/metametrics"),A=e("../../../../../shared/constants/security-provider"),O=e("../../../../ducks/ramps"),F=e(".");function N(e){return e&&e.__esModule?e:{default:e}}function R(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(R=function(e){return e?n:t})(e)}const j=e=>{var t;const{showEdit:n,onEdit:o,fromName:N,fromAddress:R,toEns:j,toNickname:B,toAddress:$,disabled:W,errorKey:L,errorMessage:G,contentComponent:q,action:V,title:H,image:U,titleComponent:z,subtitleComponent:K,detailsComponent:Y,dataHexComponent:J,onCancelAll:Q,onCancel:X,onSubmit:Z,onSetApprovalForAll:ee,showWarningModal:te,tokenAddress:ne,nonce:ae,unapprovedTxCount:oe,warning:re,hideSenderToRecipient:se,showAccountInHeader:ie,origin:le,ethGasPriceWarning:ce,editingGas:ue,handleCloseEditGas:de,currentTransaction:fe,supportsEIP1559:me,nativeCurrency:pe,txData:ge,assetStandard:he,isApprovalOrRejection:ye,displayAccountBalanceHeader:ve}=e,xe=(0,_.useI18nContext)(),be=(0,a.useContext)(M.MetaMetricsContext),[ke,Te]=(0,a.useState)("0"),[we,Ce]=(0,a.useState)(!1),_e=(0,r.useSelector)(O.getIsNativeTokenBuyable),Ee=(0,r.useSelector)((e=>(0,S.getAddressBookEntry)(e,$))),Ie=(0,r.useSelector)(S.getSwapsDefaultToken).string,Se=(0,r.useSelector)(S.getInternalAccounts),Pe=(0,S.getAccountName)(Se,$),Me=Pe||(null==Ee?void 0:Ee.name),De=Boolean(Pe),Ae=(0,r.useSelector)((e=>(0,S.getMetadataContractName)(e,$))),{openBuyCryptoInPdapp:Oe}=(0,P.default)(),Fe=fe.type===s.TransactionType.tokenMethodSetApprovalForAll,Ne=q&&W&&(L||G),{chainId:Re}=fe,je=(0,r.useSelector)((e=>(0,S.selectNetworkIdentifierByChainId)(e,Re))),Be=u.NETWORK_TO_NAME_MAP[Re]||je,$e=(0,a.useCallback)((async()=>{const e=await(0,g.fetchTokenBalance)(ne,R,global.ethereumProvider);Te(e.toString()||"0")}),[R,ne]),We=(0,E.default)({txData:ge}),Le=null==We?void 0:We.insightComponent,Ge=()=>Fe&&ye?ee():Z(),qe=()=>{var e;return(null==We||null===(e=We.warnings)||void 0===e?void 0:e.length)>0?Ce(!0):Ge()};(0,a.useEffect)((()=>{Fe&&he===c.TokenStandard.ERC721&&$e()}),[fe,he,Fe,$e,ke]);const Ve=(null===(t=ge.securityAlertResponse)||void 0===t?void 0:t.result_type)===A.BlockaidResultType.Malicious;return a.default.createElement(l.GasFeeContextProvider,{transaction:fe},a.default.createElement("div",{className:"page-container","data-testid":"page-container"},a.default.createElement(F.ConfirmPageContainerNavigation,null),ve?a.default.createElement(w.default,{accountName:N,accountBalance:Ie,tokenName:pe,accountAddress:R,networkName:Be,chainId:fe.chainId}):a.default.createElement(F.ConfirmPageContainerHeader,{showEdit:n,onEdit:()=>o(),showAccountInHeader:ie,accountAddress:R,origin:le},se?null:a.default.createElement(p.default,{senderName:N,senderAddress:R,recipientName:Me,recipientMetadataName:Ae,recipientAddress:$,recipientEns:j,recipientNickname:B,recipientIsOwnedAccount:De,chainId:fe.chainId})),q||a.default.createElement(F.ConfirmPageContainerContent,{action:V,title:H,image:U,titleComponent:z,subtitleComponent:K,detailsComponent:Y,dataHexComponent:J,insightComponent:Le,errorMessage:G,errorKey:L,tokenAddress:ne,nonce:ae,warning:re,onCancelAll:Q,onCancel:X,cancelText:xe("reject"),onSubmit:qe,submitText:xe("confirm"),disabled:W,unapprovedTxCount:oe,rejectNText:xe("rejectTxsN",[oe]),origin:le,ethGasPriceWarning:ce,supportsEIP1559:me,currentTransaction:fe,nativeCurrency:pe,networkName:Be,toAddress:$,transactionType:fe.type,isBuyableChain:_e,openBuyCryptoInPdapp:Oe,txData:ge}),Ne&&L===b.INSUFFICIENT_FUNDS_ERROR_KEY&&a.default.createElement("div",{className:"confirm-approve-content__warning"},a.default.createElement(m.default,{message:_e?a.default.createElement(k.Text,{variant:T.TextVariant.bodySm,textAlign:T.TextAlign.Left,as:"h6"},xe("insufficientCurrencyBuyOrDeposit",[pe,Be,a.default.createElement(f.default,{type:"inline",className:"confirm-page-container-content__link",onClick:()=>{Oe(),be({event:D.MetaMetricsEventName.NavBuyButtonClicked,category:D.MetaMetricsEventCategory.Navigation,properties:{location:"Transaction Confirmation",text:"Buy"}})},key:`${pe}-buy-button`},xe("buyAsset",[pe]))])):a.default.createElement(k.Text,{variant:T.TextVariant.bodySm,textAlign:T.TextAlign.Left,as:"h6"},xe("insufficientCurrencyDeposit",[pe,Be])),useIcon:!0,iconFillColor:"var(--color-error-default)",type:"danger"})),Ne&&L!==b.INSUFFICIENT_FUNDS_ERROR_KEY&&a.default.createElement("div",{className:"confirm-approve-content__warning"},a.default.createElement(x.default,{errorKey:L})),te&&a.default.createElement(C.default,{collectionName:H,senderAddress:R,name:N,isERC721:he===c.TokenStandard.ERC721,total:ke,onSubmit:Z,onCancel:X}),q&&a.default.createElement(d.PageContainerFooter,{onCancel:X,cancelText:xe("reject"),onSubmit:qe,submitText:xe("confirm"),submitButtonType:Fe&&ye||Ve?"danger-primary":"primary",disabled:W},oe>1&&a.default.createElement("a",{onClick:Q},xe("rejectTxsN",[oe]))),ue&&!me&&a.default.createElement(v.default,{mode:i.EditGasModes.modifyInPlace,onClose:de,transaction:fe}),me&&a.default.createElement(a.default.Fragment,null,a.default.createElement(y.default,null),a.default.createElement(h.default,null)),we&&a.default.createElement(I.default,{warnings:We.warnings,origin:le,onCancel:()=>Ce(!1),onSubmit:()=>{Ge(),Ce(!1)}})))};j.propTypes={action:o.default.string,onEdit:o.default.func,showEdit:o.default.bool,subtitleComponent:o.default.node,title:o.default.string,image:o.default.string,titleComponent:o.default.node,hideSenderToRecipient:o.default.bool,showAccountInHeader:o.default.bool,assetStandard:o.default.string,fromAddress:o.default.string,fromName:o.default.string,toAddress:o.default.string,toEns:o.default.string,toNickname:o.default.string,contentComponent:o.default.node,errorKey:o.default.string,errorMessage:o.default.string,dataHexComponent:o.default.node,detailsComponent:o.default.node,txData:o.default.object,tokenAddress:o.default.string,nonce:o.default.string,warning:o.default.string,unapprovedTxCount:o.default.number,origin:o.default.string.isRequired,ethGasPriceWarning:o.default.string,onCancelAll:o.default.func,onCancel:o.default.func,onSubmit:o.default.func,onSetApprovalForAll:o.default.func,showWarningModal:o.default.bool,disabled:o.default.bool,editingGas:o.default.bool,handleCloseEditGas:o.default.func,currentTransaction:o.default.object.isRequired,supportsEIP1559:o.default.bool,nativeCurrency:o.default.string,isApprovalOrRejection:o.default.bool,displayAccountBalanceHeader:o.default.bool};n.default=j}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container.component.js"}],[6451,{"../../../../components/app/snaps/snap-insight/snap-insight":5594,"./confirm-detail-row":6439,"./confirm-page-container-content":6445,"./confirm-page-container-header":6447,"./confirm-page-container-navigation":6449,"./confirm-page-container.component":6450},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmDetailRow",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"ConfirmPageContainerContent",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(n,"ConfirmPageContainerHeader",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"ConfirmPageContainerNavigation",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(n,"ConfirmPageContainerSummary",{enumerable:!0,get:function(){return i.ConfirmPageContainerSummary}}),Object.defineProperty(n,"SnapInsight",{enumerable:!0,get:function(){return l.SnapInsight}}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a.default}});var a=u(e("./confirm-page-container.component")),o=u(e("./confirm-page-container-header")),r=u(e("./confirm-detail-row")),s=u(e("./confirm-page-container-navigation")),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("./confirm-page-container-content")),l=e("../../../../components/app/snaps/snap-insight/snap-insight");function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/index.js"}],[6452,{"../../../../components/app/user-preferenced-currency-display":5727,"../../../../components/component-library":5806,"../../../../helpers/constants/common":6246,"../../../../helpers/constants/design-system":6248,"../../../../helpers/utils/transactions.util":6295,"../../../../selectors":6985,"../../hooks/useTransactionInfo":6743,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=m(e("react")),o=m(e("prop-types")),r=e("react-redux"),s=e("../../../../helpers/constants/common"),i=e("../../../../helpers/constants/design-system"),l=e("../../../../helpers/utils/transactions.util"),c=e("../../../../selectors"),u=e("../../hooks/useTransactionInfo"),d=e("../../../../components/component-library"),f=m(e("../../../../components/app/user-preferenced-currency-display"));function m(e){return e&&e.__esModule?e:{default:e}}const p=({txData:e,hexTransactionAmount:t,subtitleComponent:n,assetStandard:o})=>{const m=(0,r.useSelector)(c.getShouldShowFiat),{isNftTransfer:p}=(0,u.useTransactionInfo)(e);return m||p||(0,l.isNFTAssetStandard)(o)?n||a.default.createElement(d.Text,{as:"h5",ellipsis:!0,variant:i.TextVariant.bodyMd,color:i.Color.textAlternative},a.default.createElement(f.default,{value:t,type:s.SECONDARY,showEthLogo:!0,hideLabel:!0})):null};p.propTypes={assetStandard:o.default.string,hexTransactionAmount:o.default.string,subtitleComponent:o.default.element,txData:o.default.object.isRequired};n.default=p}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-subtitle/confirm-subtitle.js"}],[6453,{"./confirm-subtitle":6452},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmSubTitle",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-subtitle"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-subtitle/index.js"}],[6454,{"../../../../components/app/user-preferenced-currency-display":5727,"../../../../components/component-library":5806,"../../../../helpers/constants/common":6246,"../../../../helpers/constants/design-system":6248,"@metamask/transaction-controller":2698,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=u(e("react")),o=u(e("prop-types")),r=e("@metamask/transaction-controller"),s=e("../../../../helpers/constants/common"),i=e("../../../../components/component-library"),l=e("../../../../helpers/constants/design-system"),c=u(e("../../../../components/app/user-preferenced-currency-display"));function u(e){return e&&e.__esModule?e:{default:e}}const d=({title:e,hexTransactionAmount:t,txData:n})=>{var o;const u=n.type===r.TransactionType.contractInteraction;return(u||n.type===r.TransactionType.deployContract)&&"0x0"===(null===(o=n.txParams)||void 0===o?void 0:o.value)?null:e?a.default.createElement(i.Text,{as:e&&e.length<10?"h1":"h3",ellipsis:!0,title:e,variant:e&&e.length<10?l.TextVariant.displayMd:l.TextVariant.headingMd,fontWeight:l.FONT_WEIGHT.NORMAL},e):a.default.createElement(i.Text,{as:"h3",ellipsis:!0,fontWeight:l.FONT_WEIGHT.NORMAL,variant:l.TextVariant.headingMd},a.default.createElement(c.default,{hideLabel:!u,showCurrencySuffix:u,showEthLogo:!0,type:s.PRIMARY,value:t}))};d.propTypes={txData:o.default.object.isRequired,title:o.default.oneOfType([o.default.string,o.default.number]),hexTransactionAmount:o.default.string};n.default=d}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-title/confirm-title.js"}],[6455,{"./confirm-title":6454},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmTitle",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-title"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-title/index.js"}],[6456,{"../../../../../../shared/constants/security-provider":5270,"../../../../../components/component-library":5806,"../../../../../components/ui/icon/preloader":6126,"../../../hooks/useCurrentSignatureSecurityAlertResponse":6721,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(e("react")),o=l(e("../../../../../components/ui/icon/preloader")),r=e("../../../../../../shared/constants/security-provider"),s=e("../../../../../components/component-library"),i=l(e("../../../hooks/useCurrentSignatureSecurityAlertResponse"));function l(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const e=(0,i.default)();return(null==e?void 0:e.result_type)!==r.BlockaidResultType.Loading?null:a.default.createElement(s.Box,{marginInline:"auto",marginTop:4},a.default.createElement(o.default,{size:18}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/blockaid-loading-indicator/blockaid-loading-indicator.tsx"}],[6457,{"./blockaid-loading-indicator":6456},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BlockaidLoadingIndicator",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./blockaid-loading-indicator"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/blockaid-loading-indicator/index.ts"}],[6458,{"../../../../../components/app/alert-system/contexts/alertActionHandler":5351,"../../../../../components/app/alert-system/contexts/alertMetricsContext":5352,"../../../hooks/setConfirmationAlerts":6710,"../../../hooks/useConfirmationAlertActions":6715,"../../../hooks/useConfirmationAlertMetrics":6716,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=c(e("react")),o=e("../../../../../components/app/alert-system/contexts/alertActionHandler"),r=c(e("../../../hooks/useConfirmationAlertActions")),s=c(e("../../../hooks/setConfirmationAlerts")),i=e("../../../../../components/app/alert-system/contexts/alertMetricsContext"),l=e("../../../hooks/useConfirmationAlertMetrics");function c(e){return e&&e.__esModule?e:{default:e}}n.default=({children:e})=>{const{trackAlertActionClicked:t,trackAlertRender:n,trackInlineAlertClicked:c}=(0,l.useConfirmationAlertMetrics)(),u=(0,r.default)();return(0,s.default)(),a.default.createElement(i.AlertMetricsProvider,{metrics:{trackAlertActionClicked:t,trackAlertRender:n,trackInlineAlertClicked:c}},a.default.createElement(o.AlertActionHandlerProvider,{onProcessAction:u},e))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/confirm-alerts/confirm-alerts.tsx"}],[6459,{"./confirm-alerts":6458},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmAlerts",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-alerts"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/confirm-alerts/index.tsx"}],[6460,{"../../../../../../shared/constants/metametrics":5260,"../../../../../../shared/lib/confirmation.utils":5281,"../../../../../components/app/alert-system/confirm-alert-modal":5350,"../../../../../components/component-library":5806,"../../../../../components/multichain/pages/page":6032,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useAlerts":6321,"../../../../../hooks/useI18nContext":6334,"../../../../../selectors":6985,"../../../../../store/actions":7e3,"../../../context/confirm":6691,"../../../selectors/preferences":6748,"../../../utils":6756,"../utils":6545,"@metamask/rpc-errors":2304,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=e("@metamask/rpc-errors"),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=k(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),s=e("react-redux"),i=e("../../../../../components/app/alert-system/confirm-alert-modal"),l=e("../../../../../components/component-library"),c=e("../../../../../components/multichain/pages/page"),u=e("../../../../../hooks/useI18nContext"),d=e("../../../../../selectors"),f=(a=e("../../../../../hooks/useAlerts"))&&a.__esModule?a:{default:a},m=e("../../../../../store/actions"),p=e("../../../selectors/preferences"),g=e("../../../utils"),h=e("../../../context/confirm"),y=e("../utils"),v=e("../../../../../../shared/constants/metametrics"),x=e("../../../../../helpers/constants/design-system"),b=e("../../../../../../shared/lib/confirmation.utils");function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(k=function(e){return e?n:t})(e)}function T(e,t,n){return!!t||!e&&n}const w=({alertOwnerId:e="",disabled:t,onSubmit:n,onCancel:a})=>{const o=(0,u.useI18nContext)(),[s,c]=(0,r.useState)(!1),{alerts:d,hasDangerAlerts:m,hasUnconfirmedDangerAlerts:p,hasUnconfirmedFieldDangerAlerts:g,unconfirmedFieldDangerAlerts:h}=(0,f.default)(e),y=d.some((e=>e.severity===x.Severity.Danger&&e.isBlocking)),v=(0,r.useCallback)((()=>{c(!1)}),[]),b=(0,r.useCallback)((()=>{c(!0)}),[]);return r.default.createElement(r.default.Fragment,null,s&&r.default.createElement(i.ConfirmAlertModal,{ownerId:e,onClose:v,onCancel:a,onSubmit:n}),m?r.default.createElement(l.Button,{block:!0,danger:!0,"data-testid":"confirm-footer-button",disabled:T(p,y,t),onClick:b,size:l.ButtonSize.Lg,startIconName:g?l.IconName.SecuritySearch:l.IconName.Danger},function(e,t){return 1===e.length?t("reviewAlert"):e.length>1?t("reviewAlerts"):t("confirm")}(h,o)):r.default.createElement(l.Button,{block:!0,"data-testid":"confirm-footer-button",disabled:t,onClick:n,size:l.ButtonSize.Lg},o("confirm")))};n.default=()=>{const e=(0,s.useDispatch)(),t=(0,u.useI18nContext)(),n=(0,s.useSelector)(d.getCustomNonceValue),a=(0,s.useSelector)(p.selectUseTransactionSimulations),{currentConfirmation:i,isScrollToBottomCompleted:f}=(0,h.useConfirmContext)(),{from:x}=(0,y.getConfirmationSender)(i),k=(0,s.useSelector)((e=>!!x&&(0,d.doesAddressRequireLedgerHidConnection)(e,x))),T=(0,g.isSIWESignatureRequest)(i),C=(0,g.isPermitSignatureRequest)(i),_=!f&&!T&&!(C&&a)||k,E=(0,r.useCallback)((({location:t})=>{if(!i)return;const n=o.providerErrors.userRejectedRequest();n.data={location:t},e((0,m.rejectPendingApproval)(i.id,(0,o.serializeError)(n))),e((0,m.updateCustomNonce)("")),e((0,m.setNextNonce)(""))}),[i]),I=(0,r.useCallback)((()=>{if(!i)return;if((0,b.isCorrectDeveloperTransactionType)(null==i?void 0:i.type)){const t=(e=>n?{...e,customNonceValue:n}:e)(i);e((0,m.updateAndApproveTx)(t,!0,""))}else e((0,m.resolvePendingApproval)(i.id,undefined));e((0,m.updateCustomNonce)("")),e((0,m.setNextNonce)(""))}),[i,n]),S=(0,r.useCallback)((()=>{E({location:v.MetaMetricsEventLocation.Confirmation})}),[i,E]);return r.default.createElement(c.Footer,{className:"confirm-footer_page-footer"},r.default.createElement(l.Button,{block:!0,"data-testid":"confirm-footer-cancel-button",onClick:S,size:l.ButtonSize.Lg,variant:l.ButtonVariant.Secondary},t("cancel")),r.default.createElement(w,{alertOwnerId:null==i?void 0:i.id,onSubmit:()=>I(),disabled:_,onCancel:E}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/footer/footer.tsx"}],[6461,{"./footer":6460},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Footer",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./footer"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/footer/index.tsx"}],[6462,{"../../../../../components/component-library":5806,"../../../../../helpers/constants/design-system":6248,"../../../../../store/actions":7e3,"../../../selectors/preferences":6748,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AdvancedDetailsButton=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("react-redux"),s=e("../../../../../components/component-library"),i=e("../../../../../helpers/constants/design-system"),l=e("../../../../../store/actions"),c=e("../../../selectors/preferences");n.AdvancedDetailsButton=()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(c.selectConfirmationAdvancedDetailsOpen);return o.default.createElement(s.Box,{backgroundColor:t?i.BackgroundColor.infoMuted:i.BackgroundColor.transparent,borderRadius:i.BorderRadius.MD,marginRight:1},o.default.createElement(s.ButtonIcon,{ariaLabel:"Advanced tx details",color:i.IconColor.iconDefault,iconName:s.IconName.Customize,"data-testid":"header-advanced-details-button",size:s.ButtonIconSize.Md,onClick:()=>{var n;n=!t,e((0,l.setConfirmationAdvancedDetailsOpen)(n))}}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/header/advanced-details-button.tsx"}],[6463,{"../../../../../components/component-library":5806,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useI18nContext":6334,"./advanced-details-button":6462,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.DAppInitiatedHeader=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../components/component-library"),s=e("../../../../../helpers/constants/design-system"),i=e("../../../../../hooks/useI18nContext"),l=e("./advanced-details-button");n.DAppInitiatedHeader=()=>{const e=(0,i.useI18nContext)();return o.default.createElement(r.Box,{display:s.Display.Flex,flexDirection:s.FlexDirection.Row,justifyContent:s.JustifyContent.center,alignItems:s.AlignItems.center,backgroundColor:s.BackgroundColor.backgroundDefault,padding:3,style:{zIndex:2,position:"relative"}},o.default.createElement(r.Text,{variant:s.TextVariant.headingMd,color:s.TextColor.inherit},e("transferRequest")),o.default.createElement(r.Box,{paddingRight:3,style:{marginLeft:"auto",position:"absolute",right:0}},o.default.createElement(l.AdvancedDetailsButton,null)))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/header/dapp-initiated-header.tsx"}],[6464,{"../../../../../../shared/constants/metametrics":5260,"../../../../../../shared/lib/confirmation.utils":5281,"../../../../../components/app/confirm/info/row":5416,"../../../../../components/app/confirm/info/row/currency":5411,"../../../../../components/component-library":5806,"../../../../../components/multichain":5964,"../../../../../components/ui/tooltip/tooltip":6198,"../../../../../contexts/metametrics":6214,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useI18nContext":6334,"../../../../../selectors":6985,"../../../context/confirm":6691,"../../../hooks/useBalance":6714,"../../../hooks/useConfirmationRecipientInfo":6719,"../../../utils/confirm":6755,"./advanced-details-button":6462,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=T(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../../../shared/constants/metametrics"),s=e("../../../../../components/app/confirm/info/row"),i=e("../../../../../components/app/confirm/info/row/currency"),l=e("../../../../../components/component-library"),c=e("../../../../../components/multichain"),u=k(e("../../../../../components/ui/tooltip/tooltip")),d=e("../../../../../contexts/metametrics"),f=e("../../../../../helpers/constants/design-system"),m=e("../../../../../hooks/useI18nContext"),p=e("../../../../../selectors"),g=e("../../../context/confirm"),h=e("../../../hooks/useBalance"),y=k(e("../../../hooks/useConfirmationRecipientInfo")),v=e("../../../utils/confirm"),x=e("../../../../../../shared/lib/confirmation.utils"),b=e("./advanced-details-button");function k(e){return e&&e.__esModule?e:{default:e}}function T(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(T=function(e){return e?n:t})(e)}n.default=()=>{var e;const t=(0,a.useContext)(d.MetaMetricsContext),n=(0,o.useSelector)(p.getUseBlockie),[k,T]=a.default.useState(!1),{currentConfirmation:w}=(0,g.useConfirmContext)(),{senderAddress:C,senderName:_}=(0,y.default)(),E=(0,m.useI18nContext)(),{balance:I}=(0,h.useBalance)(C),S=(0,v.isSignatureTransactionType)(w)?{location:r.MetaMetricsEventLocation.SignatureConfirmation,signature_type:null==w||null===(e=w.msgParams)||void 0===e?void 0:e.signatureMethod}:{location:r.MetaMetricsEventLocation.Transaction,transaction_type:null==w?void 0:w.type};const P=(0,x.isCorrectDeveloperTransactionType)(null==w?void 0:w.type);return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.Box,{display:f.Display.Flex,justifyContent:f.JustifyContent.flexEnd,style:{alignSelf:"flex-end"}},a.default.createElement(u.default,{position:"bottom",title:E("accountDetails"),interactive:!0},a.default.createElement(l.ButtonIcon,{ariaLabel:E("accountDetails"),color:f.IconColor.iconDefault,iconName:l.IconName.Info,size:l.ButtonIconSize.Md,onClick:()=>{!function(){const e={category:r.MetaMetricsEventCategory.Confirmations,event:r.MetaMetricsEventName.AccountDetailsOpened,properties:{action:"Confirm Screen",...S}};t(e)}(),T(!0)},"data-testid":"header-info__account-details-button"})),P&&a.default.createElement(b.AdvancedDetailsButton,null)),a.default.createElement(l.Modal,{isOpen:k,onClose:()=>T(!1),"data-testid":"account-details-modal",isClosedOnEscapeKey:!1,isClosedOnOutsideClick:!1},a.default.createElement(l.ModalOverlay,null),a.default.createElement(l.ModalContent,null,a.default.createElement(l.ModalHeader,null,a.default.createElement(l.Box,{display:f.Display.Flex,justifyContent:f.JustifyContent.center,style:{position:"relative"}},a.default.createElement(l.Box,{style:{margin:"0 auto"},display:f.Display.Flex,justifyContent:f.JustifyContent.center,flexDirection:f.FlexDirection.Column,alignItems:f.AlignItems.center},a.default.createElement(l.AvatarAccount,{variant:n?l.AvatarAccountVariant.Blockies:l.AvatarAccountVariant.Jazzicon,address:C,size:l.AvatarAccountSize.Lg}),a.default.createElement(l.Text,{fontWeight:f.FontWeight.Bold,variant:f.TextVariant.bodyMd,color:f.TextColor.textDefault,marginTop:2,"data-testid":"confirmation-account-details-modal__account-name"},_)),a.default.createElement(l.Box,{style:{position:"absolute",right:0}},a.default.createElement(l.ButtonIcon,{ariaLabel:E("close"),iconName:l.IconName.Close,size:l.ButtonIconSize.Sm,className:"confirm_header__close-button",onClick:()=>T(!1),"data-testid":"confirmation-account-details-modal__close-button"})))),a.default.createElement(l.ModalBody,null,a.default.createElement(s.ConfirmInfoRow,{label:"Account address"},a.default.createElement(c.AddressCopyButton,{address:C,shorten:!0})),a.default.createElement(s.ConfirmInfoRow,{label:"Balance"},a.default.createElement(i.ConfirmInfoRowCurrency,{value:I??0,"data-testid":"confirmation-account-details-modal__account-balance"}))))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/header/header-info.tsx"}],[6465,{"../../../../../../shared/constants/app":5248,"../../../../../components/component-library":5806,"../../../../../components/ui/identicon":6133,"../../../../../helpers/constants/design-system":6248,"../../../../../helpers/utils/accounts":6272,"../../../context/confirm":6691,"../../../hooks/useConfirmationNetworkInfo":6718,"../../../hooks/useConfirmationRecipientInfo":6719,"./dapp-initiated-header":6463,"./header-info":6464,"./wallet-initiated-header":6467,"@metamask/transaction-controller":2698,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("@metamask/transaction-controller"),o=h(e("react")),r=e("../../../../../../shared/constants/app"),s=e("../../../../../components/component-library"),i=h(e("../../../../../components/ui/identicon")),l=e("../../../../../helpers/constants/design-system"),c=e("../../../../../helpers/utils/accounts"),u=e("../../../context/confirm"),d=h(e("../../../hooks/useConfirmationNetworkInfo")),f=h(e("../../../hooks/useConfirmationRecipientInfo")),m=e("./dapp-initiated-header"),p=h(e("./header-info")),g=e("./wallet-initiated-header");function h(e){return e&&e.__esModule?e:{default:e}}const y=[a.TransactionType.tokenMethodTransfer,a.TransactionType.tokenMethodTransferFrom,a.TransactionType.tokenMethodSafeTransferFrom,a.TransactionType.simpleSend];n.default=()=>{const{networkImageUrl:e,networkDisplayName:t}=(0,d.default)(),{senderAddress:n,senderName:a}=(0,f.default)(),{currentConfirmation:h}=(0,u.useConfirmContext)(),v=o.default.createElement(s.Box,{display:l.Display.Flex,className:"confirm_header__wrapper",alignItems:l.AlignItems.center,justifyContent:l.JustifyContent.spaceBetween,"data-testid":"confirm-header"},o.default.createElement(s.Box,{alignItems:l.AlignItems.flexStart,display:l.Display.Flex,padding:4},o.default.createElement(s.Box,{display:l.Display.Flex,marginTop:2},o.default.createElement(i.default,{address:n,diameter:32}),o.default.createElement(s.AvatarNetwork,{src:e,name:t,size:s.AvatarNetworkSize.Xs,backgroundColor:(0,c.getAvatarNetworkColor)(t),className:"confirm_header__avatar-network"})),o.default.createElement(s.Box,{marginInlineStart:4},o.default.createElement(s.Text,{color:l.TextColor.textDefault,variant:l.TextVariant.bodyMdMedium,"data-testid":"header-account-name"},a),o.default.createElement(s.Text,{color:l.TextColor.textAlternative,"data-testid":"header-network-display-name"},t))),o.default.createElement(s.Box,{alignItems:l.AlignItems.flexEnd,display:l.Display.Flex,padding:4},o.default.createElement(p.default,null))),x=(null==h?void 0:h.type)&&y.includes(h.type),b=(null==h?void 0:h.origin)===r.ORIGIN_METAMASK;return x&&b?o.default.createElement(g.WalletInitiatedHeader,null):x&&!b?o.default.createElement(m.DAppInitiatedHeader,null):v}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/header/header.tsx"}],[6466,{"./header":6465},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Header",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./header"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/header/index.tsx"}],[6467,{"../../../../../../shared/constants/transaction":5278,"../../../../../components/component-library":5806,"../../../../../ducks/confirm-transaction/confirm-transaction.duck":6229,"../../../../../ducks/send":6241,"../../../../../helpers/constants/design-system":6248,"../../../../../helpers/constants/routes":6254,"../../../../../hooks/useI18nContext":6334,"../../../../../store/actions":7e3,"../../../context/confirm":6691,"./advanced-details-button":6462,"@metamask/transaction-controller":2698,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.WalletInitiatedHeader=void 0;var a=e("@metamask/transaction-controller"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("react-redux"),s=e("react-router-dom"),i=e("../../../../../../shared/constants/transaction"),l=e("../../../../../components/component-library"),c=e("../../../../../ducks/confirm-transaction/confirm-transaction.duck"),u=e("../../../../../ducks/send"),d=e("../../../../../helpers/constants/design-system"),f=e("../../../../../helpers/constants/routes"),m=e("../../../../../hooks/useI18nContext"),p=e("../../../../../store/actions"),g=e("../../../context/confirm"),h=e("./advanced-details-button");function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}n.WalletInitiatedHeader=()=>{const e=(0,m.useI18nContext)(),t=(0,r.useDispatch)(),n=(0,s.useHistory)(),{currentConfirmation:y}=(0,g.useConfirmContext)(),v=(0,o.useCallback)((async()=>{const{id:e}=y,o=y.type===a.TransactionType.simpleSend,r=y.type===a.TransactionType.tokenMethodTransfer,s=y.type===a.TransactionType.tokenMethodTransferFrom||y.type===a.TransactionType.tokenMethodSafeTransferFrom;let l;l=o?i.AssetType.native:r?i.AssetType.token:s?i.AssetType.NFT:i.AssetType.unknown,await t((0,u.editExistingTransaction)(l,e.toString())),t((0,c.clearConfirmTransaction)()),t((0,p.showSendTokenPage)()),n.push(f.SEND_ROUTE)}),[y,t,n]);return o.default.createElement(l.Box,{alignItems:d.AlignItems.center,backgroundColor:d.BackgroundColor.backgroundDefault,display:d.Display.Flex,flexDirection:d.FlexDirection.Row,justifyContent:d.JustifyContent.spaceBetween,padding:3,style:{zIndex:2}},o.default.createElement(l.ButtonIcon,{iconName:l.IconName.ArrowLeft,ariaLabel:e("back"),size:l.ButtonIconSize.Md,onClick:v,"data-testid":"wallet-initiated-header-back-button",color:d.IconColor.iconDefault}),o.default.createElement(l.Text,{variant:d.TextVariant.headingMd,color:d.TextColor.inherit},e("review")),o.default.createElement(h.AdvancedDetailsButton,null))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/header/wallet-initiated-header.tsx"}],[6468,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../../../../selectors/preferences":6748,"../../hooks/useDecodedTransactionData":6479,"../../shared/sign-in-with-row/sign-in-with-row":6507,"../../shared/transaction-data/transaction-data":6509,"../../shared/transaction-details/transaction-details":6510,"../../utils":6524,"../hooks/use-is-nft":6473,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ApproveDetails=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("react-redux"),s=e("../../../../../../../components/app/confirm/info/row"),i=e("../../../../../../../components/app/confirm/info/row/section"),l=e("../../../../../../../hooks/useI18nContext"),c=e("../../../../../context/confirm"),u=e("../../../../../selectors/preferences"),d=e("../../shared/sign-in-with-row/sign-in-with-row"),f=e("../../hooks/useDecodedTransactionData"),m=e("../../shared/transaction-data/transaction-data"),p=e("../../shared/transaction-details/transaction-details"),g=e("../../utils"),h=e("../hooks/use-is-nft");const y=({isSetApprovalForAll:e=!1})=>{const t=(0,l.useI18nContext)(),{currentConfirmation:n}=(0,c.useConfirmContext)(),{isNFT:a}=(0,h.useIsNFT)(n),r=(0,f.useDecodedTransactionData)(),{value:i,pending:u}=r;if(u)return o.default.createElement(m.Container,{isLoading:!0});if(!i)return null;const d=i.data[0].params[0].value,{chainId:p}=n;return(0,g.getIsRevokeSetApprovalForAll)(i)?null:o.default.createElement(o.default.Fragment,null,o.default.createElement(s.ConfirmInfoRow,{label:t(e?"permissionFor":"spender"),tooltip:t(a?"spenderTooltipDesc":"spenderTooltipERC20ApproveDesc"),"data-testid":"confirmation__approve-spender"},o.default.createElement(s.ConfirmInfoRowAddress,{address:d,chainId:p})),o.default.createElement(s.ConfirmInfoRowDivider,null))};n.ApproveDetails=({isSetApprovalForAll:e=!1})=>{const t=(0,r.useSelector)(u.selectConfirmationAdvancedDetailsOpen);return o.default.createElement(i.ConfirmInfoSection,{"data-testid":"confirmation__approve-details"},o.default.createElement(y,{isSetApprovalForAll:e}),o.default.createElement(p.OriginRow,null),o.default.createElement(d.SigningInWithRow,null),t&&o.default.createElement(o.default.Fragment,null,o.default.createElement(p.RecipientRow,null),o.default.createElement(p.MethodDataRow,null)))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/approve-details/approve-details.tsx"}],[6469,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/name":5530,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/tooltip":6197,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../../../../hooks/useAssetDetails":6713,"../../shared/static-simulation/static-simulation":6508,"../../shared/transaction-data/transaction-data":6509,"../hooks/use-approve-token-simulation":6472,"../hooks/use-is-nft":6473,"@metamask/name-controller":1955,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ApproveStaticSimulation=void 0;var a=e("@metamask/name-controller"),o=y(e("react")),r=e("../../../../../../../components/app/confirm/info/row"),s=y(e("../../../../../../../components/app/name")),i=e("../../../../../../../components/component-library"),l=y(e("../../../../../../../components/ui/tooltip")),c=e("../../../../../../../helpers/constants/design-system"),u=e("../../../../../../../hooks/useI18nContext"),d=e("../../../../../context/confirm"),f=e("../../../../../hooks/useAssetDetails"),m=y(e("../../shared/static-simulation/static-simulation")),p=e("../../shared/transaction-data/transaction-data"),g=e("../hooks/use-approve-token-simulation"),h=e("../hooks/use-is-nft");function y(e){return e&&e.__esModule?e:{default:e}}n.ApproveStaticSimulation=()=>{var e,t,n;const y=(0,u.useI18nContext)(),{currentConfirmation:v}=(0,d.useConfirmContext)(),{decimals:x}=(0,f.useAssetDetails)(null==v||null===(e=v.txParams)||void 0===e?void 0:e.to,null==v||null===(t=v.txParams)||void 0===t?void 0:t.from,null==v||null===(n=v.txParams)||void 0===n?void 0:n.data,null==v?void 0:v.chainId),b=x||"0",{spendingCap:k,isUnlimitedSpendingCap:T,formattedSpendingCap:w,value:C,pending:_}=(0,g.useApproveTokenSimulation)(v,b),{isNFT:E}=(0,h.useIsNFT)(v);if(_)return o.default.createElement(p.Container,{isLoading:!0});if(!C)return null;const{chainId:I}=v,S=o.default.createElement(i.Text,{"data-testid":"simulation-token-value",backgroundColor:c.BackgroundColor.backgroundAlternative,borderRadius:c.BorderRadius.XL,paddingInline:2,textAlign:c.TextAlign.Center,alignItems:c.AlignItems.center},T?y("unlimited"):w),P=o.default.createElement(r.ConfirmInfoRow,{label:y(E?"simulationApproveHeading":"spendingCap")},o.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},o.default.createElement(i.Box,{display:c.Display.Flex,alignItems:c.AlignItems.center},o.default.createElement(i.Box,{display:c.Display.Inline,marginInlineEnd:1,minWidth:c.BlockSize.Zero},Boolean(T)||k!==w?o.default.createElement(l.default,{title:k},S):S),o.default.createElement(s.default,{value:v.txParams.to,type:a.NameType.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:I}))));return o.default.createElement(m.default,{title:y("simulationDetailsTitle"),titleTooltip:y("simulationDetailsTitleTooltip"),description:y(E?"simulationDetailsApproveDesc":"simulationDetailsERC20ApproveDesc"),simulationElements:P})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/approve-static-simulation/approve-static-simulation.tsx"}],[6470,{"../../../../context/confirm":6691,"../../../../hooks/useAssetDetails":6713,"../shared/advanced-details/advanced-details":6496,"../shared/confirm-loader/confirm-loader":6497,"../shared/gas-fees-section/gas-fees-section":6503,"./approve-details/approve-details":6468,"./approve-static-simulation/approve-static-simulation":6469,"./edit-spending-cap-modal/edit-spending-cap-modal":6471,"./hooks/use-approve-token-simulation":6472,"./hooks/use-is-nft":6473,"./revoke-details/revoke-details":6474,"./revoke-static-simulation/revoke-static-simulation":6475,"./spending-cap/spending-cap":6476,"@metamask/transaction-controller":2698,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("@metamask/transaction-controller"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("../../../../context/confirm"),s=e("../../../../hooks/useAssetDetails"),i=e("../shared/advanced-details/advanced-details"),l=e("../shared/confirm-loader/confirm-loader"),c=e("../shared/gas-fees-section/gas-fees-section"),u=e("./approve-details/approve-details"),d=e("./approve-static-simulation/approve-static-simulation"),f=e("./edit-spending-cap-modal/edit-spending-cap-modal"),m=e("./hooks/use-approve-token-simulation"),p=e("./hooks/use-is-nft"),g=e("./revoke-details/revoke-details"),h=e("./revoke-static-simulation/revoke-static-simulation"),y=e("./spending-cap/spending-cap");function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}n.default=()=>{const{currentConfirmation:e}=(0,r.useConfirmContext)(),{isNFT:t}=(0,p.useIsNFT)(e),[n,v]=(0,o.useState)(!1),{decimals:x}=(0,s.useAssetDetails)(e.txParams.to,e.txParams.from,e.txParams.data,e.chainId),{spendingCap:b,pending:k}=(0,m.useApproveTokenSimulation)(e,x||"0"),T="0"===b&&e.type===a.TransactionType.tokenMethodApprove;return null!=e&&e.txParams?k?o.default.createElement(l.ConfirmLoader,null):o.default.createElement(o.default.Fragment,null,T?o.default.createElement(h.RevokeStaticSimulation,null):o.default.createElement(d.ApproveStaticSimulation,null),T?o.default.createElement(g.RevokeDetails,null):o.default.createElement(u.ApproveDetails,null),!t&&!T&&o.default.createElement(y.SpendingCap,{setIsOpenEditSpendingCapModal:v}),o.default.createElement(c.GasFeesSection,null),o.default.createElement(i.AdvancedDetails,null),o.default.createElement(f.EditSpendingCapModal,{isOpenEditSpendingCapModal:n,setIsOpenEditSpendingCapModal:v})):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/approve.tsx"}],[6471,{"../../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../../../shared/modules/conversion.utils":5301,"../../../../../../../components/component-library":5806,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../../../store/actions":7e3,"../../../../../confirm-approve/confirm-approve.util":6642,"../../../../../context/confirm":6691,"../../../../../hooks/useAssetDetails":6713,"../hooks/use-approve-token-simulation":6472,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.EditSpendingCapModal=void 0,n.countDecimalDigits=h;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../../../../../shared/lib/transactions-controller-utils"),s=e("../../../../../../../../shared/modules/conversion.utils"),i=e("../../../../../../../components/component-library"),l=e("../../../../../../../helpers/constants/design-system"),c=e("../../../../../../../hooks/useI18nContext"),u=e("../../../../../../../store/actions"),d=e("../../../../../confirm-approve/confirm-approve.util"),f=e("../../../../../context/confirm"),m=e("../../../../../hooks/useAssetDetails"),p=e("../hooks/use-approve-token-simulation");function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function h(e){var t;return(null===(t=e.split(".")[1])||void 0===t?void 0:t.length)||0}n.EditSpendingCapModal=({isOpenEditSpendingCapModal:e,setIsOpenEditSpendingCapModal:t})=>{const n=(0,c.useI18nContext)(),g=(0,o.useDispatch)(),{currentConfirmation:y}=(0,f.useConfirmContext)(),{userBalance:v,tokenSymbol:x,decimals:b}=(0,m.useAssetDetails)(y.txParams.to,y.txParams.from,y.txParams.data,y.chainId),k=(0,r.calcTokenAmount)(v??"0",Number(b??"0")).toFixed(),{formattedSpendingCap:T,spendingCap:w}=(0,p.useApproveTokenSimulation)(y,b||"0"),[C,_]=(0,a.useState)(w);(0,a.useEffect)((()=>{w&&_(w)}),[w]);const E=(0,a.useCallback)((()=>{t(!1),_(w)}),[t,_,w]),[I,S]=(0,a.useState)(!1),P=(0,a.useCallback)((async()=>{var e;S(!0);const n=(0,d.getCustomTxParamsData)(null==y||null===(e=y.txParams)||void 0===e?void 0:e.data,{customPermissionAmount:C||"0",decimals:b||"0"}),a=await(0,u.estimateGas)({from:y.txParams.from,to:y.txParams.to,value:y.txParams.value,data:n});g((0,u.updateEditableParams)(y.id,{data:n,gas:(0,s.hexToDecimal)(a)})),S(!1),t(!1),_(w)}),[C,w]),M=b&&parseInt(b,10)_(e.target.value),placeholder:`${T} ${x}`,style:{width:"100%"},inputProps:{"data-testid":"custom-spending-cap-input"}}),M&&a.default.createElement(i.Text,{variant:l.TextVariant.bodySm,color:l.TextColor.errorDefault,paddingTop:1},n("editSpendingCapError",[b])),D&&a.default.createElement(i.Text,{variant:l.TextVariant.bodySm,color:l.TextColor.errorDefault,paddingTop:1},n("editSpendingCapSpecialCharError")),a.default.createElement(i.Text,{variant:l.TextVariant.bodySm,color:l.TextColor.textAlternative,paddingTop:1},n("editSpendingCapAccountBalance",[k,x||""]))),a.default.createElement(i.ModalFooter,{onSubmit:P,onCancel:E,submitButtonProps:{children:n("save"),loading:I,disabled:M||D||""===C}})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/edit-spending-cap-modal/edit-spending-cap-modal.tsx"}],[6472,{"../../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../../ducks/locale/locale":6235,"../../../../simulation-details/formatAmount":6616,"../../hooks/useDecodedTransactionData":6479,"./use-is-nft":6473,"@metamask/utils":2761,"bignumber.js":3465,lodash:4380,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useApproveTokenSimulation=void 0;var a=e("@metamask/utils"),o=e("bignumber.js"),r=e("lodash"),s=e("react"),i=e("react-redux"),l=e("../../../../../../../../shared/lib/transactions-controller-utils"),c=e("../../../../../../../ducks/locale/locale"),u=e("../../../../simulation-details/formatAmount"),d=e("../../hooks/useDecodedTransactionData"),f=e("./use-is-nft");const m=10**15;n.useApproveTokenSimulation=(e,t)=>{const n=(0,i.useSelector)(c.getIntlLocale),{isNFT:p,pending:g}=(0,f.useIsNFT)(e),h=(0,d.useDecodedTransactionData)(),{value:y,pending:v}=h,x=(0,s.useMemo)((()=>{if(!y)return"0";const e=y.data[0].params.findIndex((e=>e.value!==undefined&&!(0,a.isHexString)(e.value)&&e.value.length===undefined&&!(0,r.isBoolean)(e.value)));return-1===e?"0":(0,l.calcTokenAmount)(y.data[0].params[e].value,Number(t)).toFixed()}),[y,t]),b=p?"#":"",k=(0,s.useMemo)((()=>p?`${b}${x}`:(0,u.formatAmount)(n,new o.BigNumber(x))),[x,p,n]),{spendingCap:T,isUnlimitedSpendingCap:w}=(0,s.useMemo)((()=>!p&&function(e){return e>=m}(parseInt(x,10))?{spendingCap:x,isUnlimitedSpendingCap:!0}:{spendingCap:`${b}${x}`,isUnlimitedSpendingCap:!1}),[x,k,p]);return{isUnlimitedSpendingCap:w,spendingCap:T,formattedSpendingCap:k,value:y,pending:v||g}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.ts"}],[6473,{"../../../../../../../../shared/constants/transaction":5278,"../../../../../../../hooks/useAsyncResult":6322,"../../../../../../../store/actions":7e3},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useIsNFT=void 0;var a=e("../../../../../../../../shared/constants/transaction"),o=e("../../../../../../../hooks/useAsyncResult"),r=e("../../../../../../../store/actions");n.useIsNFT=e=>{var t;const{value:n,pending:s}=(0,o.useAsyncResult)((async()=>{var t;return await(0,r.getTokenStandardAndDetails)(null==e||null===(t=e.txParams)||void 0===t?void 0:t.to)}),[null==e||null===(t=e.txParams)||void 0===t?void 0:t.to]);return{pending:s,isNFT:(null==n?void 0:n.standard)!==a.TokenStandard.ERC20}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/hooks/use-is-nft.ts"}],[6474,{"../../../../../../../components/app/confirm/info/row/section":5418,"../../shared/sign-in-with-row/sign-in-with-row":6507,"../../shared/transaction-details/transaction-details":6510,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.RevokeDetails=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../../components/app/confirm/info/row/section"),s=e("../../shared/transaction-details/transaction-details"),i=e("../../shared/sign-in-with-row/sign-in-with-row");n.RevokeDetails=()=>o.default.createElement(r.ConfirmInfoSection,null,o.default.createElement(s.OriginRow,null),o.default.createElement(i.SigningInWithRow,null))}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/revoke-details/revoke-details.tsx"}],[6475,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/name":5530,"../../../../../../../components/component-library":5806,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../shared/static-simulation/static-simulation":6508,"@metamask/name-controller":1955,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.RevokeStaticSimulation=void 0;var a=e("@metamask/name-controller"),o=f(e("react")),r=e("../../../../../../../components/app/confirm/info/row"),s=f(e("../../../../../../../components/app/name")),i=e("../../../../../../../components/component-library"),l=e("../../../../../../../helpers/constants/design-system"),c=e("../../../../../../../hooks/useI18nContext"),u=e("../../../../../context/confirm"),d=f(e("../../shared/static-simulation/static-simulation"));function f(e){return e&&e.__esModule?e:{default:e}}n.RevokeStaticSimulation=()=>{const e=(0,c.useI18nContext)(),{currentConfirmation:t}=(0,u.useConfirmContext)(),{chainId:n}=t,f=o.default.createElement(r.ConfirmInfoRow,{label:e("spendingCap")},o.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},o.default.createElement(i.Box,{display:l.Display.Flex},o.default.createElement(s.default,{value:t.txParams.to,type:a.NameType.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:n})))),m=o.default.createElement(r.ConfirmInfoRow,{label:e("spender")},o.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},o.default.createElement(i.Box,{display:l.Display.Flex},o.default.createElement(s.default,{value:t.txParams.from,type:a.NameType.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:n})))),p=o.default.createElement(o.default.Fragment,null,f,m);return o.default.createElement(d.default,{title:e("simulationDetailsTitle"),titleTooltip:e("simulationDetailsTitleTooltip"),description:e("revokeSimulationDetailsDesc"),simulationElements:p})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/revoke-static-simulation/revoke-static-simulation.tsx"}],[6476,{"../../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../../components/ui/tooltip":6197,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../../../../hooks/useAssetDetails":6713,"../../shared/transaction-data/transaction-data":6509,"../hooks/use-approve-token-simulation":6472,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SpendingCap=void 0;var a=m(e("react")),o=e("../../../../../../../../shared/lib/transactions-controller-utils"),r=e("../../../../../../../components/app/confirm/info/row"),s=e("../../../../../../../components/app/confirm/info/row/section"),i=m(e("../../../../../../../components/ui/tooltip")),l=e("../../../../../../../hooks/useI18nContext"),c=e("../../../../../context/confirm"),u=e("../../../../../hooks/useAssetDetails"),d=e("../../shared/transaction-data/transaction-data"),f=e("../hooks/use-approve-token-simulation");function m(e){return e&&e.__esModule?e:{default:e}}const p=({tokenSymbol:e,decimals:t,setIsOpenEditSpendingCapModal:n})=>{const o=(0,l.useI18nContext)(),{currentConfirmation:s}=(0,c.useConfirmContext)(),{spendingCap:u,isUnlimitedSpendingCap:d,formattedSpendingCap:m,value:p}=(0,f.useApproveTokenSimulation)(s,t),g=a.default.createElement(r.ConfirmInfoRowText,{text:d?`${o("unlimited")} ${e}`:`${m} ${e}`,onEditClick:()=>n(!0),editIconClassName:"edit-spending-cap-btn",editIconDataTestId:"edit-spending-cap-icon"});return p?a.default.createElement(a.default.Fragment,null,a.default.createElement(r.ConfirmInfoRowDivider,null),a.default.createElement(r.ConfirmInfoRow,{label:o("spendingCap"),tooltip:o("spendingCapTooltipDesc"),"data-testid":"confirmation__approve-spending-cap-group"},Boolean(d)||u!==m?a.default.createElement(i.default,{title:u},g):g)):null};n.SpendingCap=({setIsOpenEditSpendingCapModal:e})=>{const t=(0,l.useI18nContext)(),{currentConfirmation:n}=(0,c.useConfirmContext)(),{userBalance:i,tokenSymbol:m,decimals:g}=(0,u.useAssetDetails)(n.txParams.to,n.txParams.from,n.txParams.data,n.chainId),h=(0,o.calcTokenAmount)(i??"0",Number(g??"0")).toFixed(),{pending:y}=(0,f.useApproveTokenSimulation)(n,g||"0");return y?a.default.createElement(d.Container,{isLoading:!0}):a.default.createElement(s.ConfirmInfoSection,{"data-testid":"confirmation__approve-spending-cap-section"},a.default.createElement(r.ConfirmInfoRow,{label:t("accountBalance")},a.default.createElement(r.ConfirmInfoRowText,{text:`${h} ${m||""}`})),a.default.createElement(p,{tokenSymbol:m||"",decimals:g||"0",setIsOpenEditSpendingCapModal:e}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/spending-cap/spending-cap.tsx"}],[6477,{"../../../../context/confirm":6691,"../../../simulation-details":6617,"../shared/advanced-details/advanced-details":6496,"../shared/gas-fees-section/gas-fees-section":6503,"../shared/transaction-details/transaction-details":6510,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../context/confirm"),s=e("../../../simulation-details"),i=e("../shared/advanced-details/advanced-details"),l=e("../shared/gas-fees-section/gas-fees-section"),c=e("../shared/transaction-details/transaction-details");n.default=()=>{const{currentConfirmation:e}=(0,r.useConfirmContext)();return null!=e&&e.txParams?o.default.createElement(o.default.Fragment,null,o.default.createElement(s.SimulationDetails,{transaction:e,isTransactionsRedesign:!0,enableMetrics:!0}),o.default.createElement(c.TransactionDetails,null),o.default.createElement(l.GasFeesSection,null),o.default.createElement(i.AdvancedDetails,null)):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/base-transaction-info/base-transaction-info.tsx"}],[6478,{"../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../components/app/currency-input/hooks/useTokenExchangeRate":5447,"../../../../../../ducks/locale/locale":6235,"../../../../../../hooks/useFiatFormatter":6330,"../../../../hooks/useAssetDetails":6713,"../../../simulation-details/formatAmount":6616,"./useDecodedTransactionData":6479,"@metamask/utils":2761,"bignumber.js":3465,lodash:4380,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useTokenValues=void 0;var a,o=e("@metamask/utils"),r=e("bignumber.js"),s=e("lodash"),i=e("react"),l=e("react-redux"),c=e("../../../../../../../shared/lib/transactions-controller-utils"),u=(a=e("../../../../../../components/app/currency-input/hooks/useTokenExchangeRate"))&&a.__esModule?a:{default:a},d=e("../../../../../../ducks/locale/locale"),f=e("../../../../../../hooks/useFiatFormatter"),m=e("../../../../hooks/useAssetDetails"),p=e("../../../simulation-details/formatAmount"),g=e("./useDecodedTransactionData");n.useTokenValues=e=>{const{decimals:t}=(0,m.useAssetDetails)(e.txParams.to,e.txParams.from,e.txParams.data,e.chainId),n=(0,g.useDecodedTransactionData)(),{value:a,pending:h}=n,{decodedTransferValue:y,isDecodedTransferValuePending:v}=(0,i.useMemo)((()=>{if(!a)return{decodedTransferValue:"0",isDecodedTransferValuePending:!1};if(!t)return{decodedTransferValue:"0",isDecodedTransferValuePending:!0};const e=a.data[0].params.findIndex((e=>e.value!==undefined&&!(0,o.isHexString)(e.value)&&e.value.length===undefined&&!(0,s.isBoolean)(e.value)));return-1===e?{decodedTransferValue:"0",isDecodedTransferValuePending:!1}:{decodedTransferValue:(0,c.calcTokenAmount)(a.data[0].params[e].value,t).toFixed(),isDecodedTransferValuePending:!1}}),[a,t]),[x,b]=(0,i.useState)();(async()=>{var t;const n=await(0,u.default)(null==e||null===(t=e.txParams)||void 0===t?void 0:t.to);b(n)})();const k=x&&y&&x.times(y,10).toNumber(),T=(0,f.useFiatFormatter)(),w=k&&T(k,{shorten:!0}),C=(0,l.useSelector)(d.getIntlLocale);return{decodedTransferValue:y,displayTransferValue:(0,p.formatAmount)(C,new r.BigNumber(y)),fiatDisplayValue:w,pending:h||v}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/use-token-values.ts"}],[6479,{"../../../../../../../shared/modules/transaction.utils":5326,"../../../../../../hooks/useAsyncResult":6322,"../../../../../../selectors":6985,"../../../../../../store/actions":7e3,"../../../../context/confirm":6691,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useDecodedTransactionData=function(e){var t,n,c;const{currentConfirmation:u}=(0,s.useConfirmContext)(),d=(0,a.useSelector)(l.use4ByteResolutionSelector),f=null==u?void 0:u.type,m=null==u?void 0:u.chainId,p=null==u||null===(t=u.txParams)||void 0===t?void 0:t.to,g=null==u||null===(n=u.txParams)||void 0===n?void 0:n.data,h=null==u||null===(c=u.txParams)||void 0===c?void 0:c.to;return(0,o.useAsyncResult)((async()=>!d||!(0,i.hasTransactionData)(g)||!h||e&&f!==e?undefined:await(0,r.decodeTransactionData)({transactionData:g,chainId:m,contractAddress:p})),[d,g,h,m,p])};var a=e("react-redux"),o=e("../../../../../../hooks/useAsyncResult"),r=e("../../../../../../store/actions"),s=e("../../../../context/confirm"),i=e("../../../../../../../shared/modules/transaction.utils"),l=e("../../../../../../selectors")}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.ts"}],[6480,{"../../../../../../../shared/modules/conversion.utils":5301,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useEIP1559TxFees=void 0;var a=e("react"),o=e("../../../../../../../shared/modules/conversion.utils");n.useEIP1559TxFees=e=>{var t,n;const r=null==e||null===(t=e.txParams)||void 0===t?void 0:t.maxFeePerGas,s=null==e||null===(n=e.txParams)||void 0===n?void 0:n.maxPriorityFeePerGas;return(0,a.useMemo)((()=>({maxFeePerGas:r?(0,o.hexToDecimal)(r):"0",maxPriorityFeePerGas:s?(0,o.hexToDecimal)(s):"0"})),[r,s])}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useEIP1559TxFees.ts"}],[6481,{"../../../../../../../shared/constants/common":5250,"../../../../../../../shared/modules/Numeric":5294,"../../../../../../../shared/modules/conversion.utils":5301,"../../../../../../hooks/useFiatFormatter":6330,"../../../../../../hooks/useGasFeeEstimates":6331,"../../../../../../selectors":6985,"../../../../../../selectors/multichain":6990,"../shared/constants":6498,"./useEIP1559TxFees":6480,"./useSupportsEIP1559":6483,"./useTransactionGasFeeEstimate":6485,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useFeeCalculations=function(e){var t,n,y;const v=(0,o.useSelector)(u.getCurrentCurrency),{chainId:x}=e,b=(0,l.useFiatFormatter)(),k=(0,o.useSelector)((e=>(0,u.selectConversionRateByChainId)(e,x))),T=(0,o.useSelector)(d.getMultichainNetwork),w=null==T||null===(t=T.network)||void 0===t?void 0:t.ticker,C=(0,a.useCallback)((e=>{const t=`${(0,s.getValueFromWeiHex)({value:e,fromCurrency:r.EtherDenomination.GWEI,numberOfDecimals:4})||0} ${w}`,n=Number((0,s.getValueFromWeiHex)({value:e,conversionRate:k,fromCurrency:r.EtherDenomination.GWEI,toCurrency:v,numberOfDecimals:2}));let a,o;return 0===n?(a=`< ${b(.01)}`,o=(0,s.getValueFromWeiHex)({value:e,conversionRate:k,fromCurrency:r.EtherDenomination.GWEI,toCurrency:v,numberOfDecimals:18})):(a=b(n),o=null),{currentCurrencyFee:a,currentCurrencyFeeWith18SignificantDigits:o,nativeCurrencyFee:t}}),[k,v,b]),{maxFeePerGas:_,maxPriorityFeePerGas:E}=(0,m.useEIP1559TxFees)(e),{supportsEIP1559:I}=(0,p.useSupportsEIP1559)(e),S=(0,g.useTransactionGasFeeEstimate)(e,I),{gasFeeEstimates:P}=(0,c.useGasFeeEstimates)(e.networkClientId),M=null==P?void 0:P.estimatedBaseFee,D=null==e?void 0:e.layer1GasFee,A=Boolean(D),O=(0,a.useMemo)((()=>A?C(D):h),[D]),F=(0,a.useMemo)((()=>A?C(S):h),[S]),N=(null==e||null===(n=e.txParams)||void 0===n?void 0:n.gas)||f.HEX_ZERO,R=(null==e||null===(y=e.txParams)||void 0===y?void 0:y.gasPrice)||f.HEX_ZERO,j=(0,a.useMemo)((()=>(0,s.multiplyHexes)(I?(0,s.decimalToHex)(_):R,N)),[I,_,N,R]),{currentCurrencyFee:B,currentCurrencyFeeWith18SignificantDigits:$,nativeCurrencyFee:W}=C(j),L=(0,a.useMemo)((()=>{if(A){const e=(0,s.addHexes)(S,D);return C(e)}let e=(0,s.addHexes)((0,s.decGWEIToHexWEI)(M)||f.HEX_ZERO,(0,s.decimalToHex)(E));new i.Numeric(e,16).greaterThan((0,s.decimalToHex)(_),16)&&(e=(0,s.decimalToHex)(_));const t=(0,s.multiplyHexes)(I?e:R,N);return C(t)}),[S,e,M,E,C]);return{estimatedFeeFiat:L.currentCurrencyFee,estimatedFeeFiatWith18SignificantDigits:L.currentCurrencyFeeWith18SignificantDigits,estimatedFeeNative:L.nativeCurrencyFee,l1FeeFiat:O.currentCurrencyFee,l1FeeFiatWith18SignificantDigits:O.currentCurrencyFeeWith18SignificantDigits,l1FeeNative:O.nativeCurrencyFee,l2FeeFiat:F.currentCurrencyFee,l2FeeFiatWith18SignificantDigits:F.currentCurrencyFeeWith18SignificantDigits,l2FeeNative:F.nativeCurrencyFee,maxFeeFiat:B,maxFeeFiatWith18SignificantDigits:$,maxFeeNative:W}};var a=e("react"),o=e("react-redux"),r=e("../../../../../../../shared/constants/common"),s=e("../../../../../../../shared/modules/conversion.utils"),i=e("../../../../../../../shared/modules/Numeric"),l=e("../../../../../../hooks/useFiatFormatter"),c=e("../../../../../../hooks/useGasFeeEstimates"),u=e("../../../../../../selectors"),d=e("../../../../../../selectors/multichain"),f=e("../shared/constants"),m=e("./useEIP1559TxFees"),p=e("./useSupportsEIP1559"),g=e("./useTransactionGasFeeEstimate");const h={currentCurrencyFee:"",currentCurrencyFeeWith18SignificantDigits:"",nativeCurrencyFee:""}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useFeeCalculations.ts"}],[6482,{"../../../../../../../shared/modules/transaction.utils":5326,"../../../../../../selectors":6985,"../../../../../../store/actions":7e3,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useFourByte=void 0;var a=e("react-redux"),o=e("react"),r=e("../../../../../../selectors"),s=e("../../../../../../store/actions"),i=e("../../../../../../../shared/modules/transaction.utils");n.useFourByte=e=>{var t,n;const l=(0,a.useDispatch)(),c=(0,a.useSelector)(r.use4ByteResolutionSelector),u=null==e||null===(t=e.txParams)||void 0===t?void 0:t.to,d=null==e||null===(n=e.txParams)||void 0===n?void 0:n.data;(0,o.useEffect)((()=>{c&&(0,i.hasTransactionData)(d)&&u&&l((0,s.getContractMethodData)(d))}),[c,d,u,l]);const f=(0,a.useSelector)((e=>(0,r.getKnownMethodData)(e,d)));return u?f:null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useFourByte.ts"}],[6483,{"../../../../../../../shared/modules/selectors/networks":5320,"../../../../../../helpers/utils/transactions.util":6295,"../../../../../../selectors":6985,"@metamask/transaction-controller":2698,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useSupportsEIP1559=function(e){var t;const n=(null==e||null===(t=e.txParams)||void 0===t?void 0:t.type)===a.TransactionEnvelopeType.legacy||(0,r.isLegacyTransaction)(e),l=(0,o.useSelector)(i.getSelectedNetworkClientId),c=(0,o.useSelector)((e=>(0,s.checkNetworkAndAccountSupports1559)(e,l)));return{supportsEIP1559:c&&!n}};var a=e("@metamask/transaction-controller"),o=e("react-redux"),r=e("../../../../../../helpers/utils/transactions.util"),s=e("../../../../../../selectors"),i=e("../../../../../../../shared/modules/selectors/networks")}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useSupportsEIP1559.ts"}],[6484,{"../../../../../../hooks/useI18nContext":6334,"../../../../../../selectors":6985,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useTokenDetails=void 0;var a=e("react-redux"),o=e("../../../../../../hooks/useI18nContext"),r=e("../../../../../../selectors");n.useTokenDetails=e=>{var t,n,s,i;const l=(0,o.useI18nContext)(),c=(0,a.useSelector)((t=>(0,r.getWatchedToken)(e)(t))),u=(0,a.useSelector)(r.getTokenList);return{tokenImage:(null==c?void 0:c.iconUrl)||(null==c?void 0:c.image)||(null===(t=u[null==e||null===(n=e.txParams)||void 0===n?void 0:n.to])||void 0===t?void 0:t.iconUrl),tokenSymbol:(null==c?void 0:c.symbol)||(null===(s=u[null==e||null===(i=e.txParams)||void 0===i?void 0:i.to])||void 0===s?void 0:s.symbol)||l("unknown")}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useTokenDetails.ts"}],[6485,{"../../../../../../../shared/modules/Numeric":5294,"../../../../../../../shared/modules/conversion.utils":5301,"../../../../../../hooks/useGasFeeEstimates":6331,"../shared/constants":6498},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useTransactionGasFeeEstimate=function(e,t){var n,i;let{gas:l,gasPrice:c}=e.txParams;const{gasFeeEstimates:u}=(0,r.useGasFeeEstimates)(e.networkClientId),d=null==u?void 0:u.estimatedBaseFee;l=l||s.HEX_ZERO,c=c||s.HEX_ZERO;const f=(null===(n=e.txParams)||void 0===n?void 0:n.maxPriorityFeePerGas)||s.HEX_ZERO,m=(null===(i=e.txParams)||void 0===i?void 0:i.maxFeePerGas)||s.HEX_ZERO;let p;if(t){let e=(0,a.addHexes)(d||s.HEX_ZERO,f);new o.Numeric(e,16).greaterThan(m,16)&&(e=m),p=(0,a.multiplyHexes)(e,l)}else p=(0,a.multiplyHexes)(c,l);return p};var a=e("../../../../../../../shared/modules/conversion.utils"),o=e("../../../../../../../shared/modules/Numeric"),r=e("../../../../../../hooks/useGasFeeEstimates"),s=e("../shared/constants")}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useTransactionGasFeeEstimate.ts"}],[6486,{"./info":6487},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Info",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./info"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/index.ts"}],[6487,{"../../../context/confirm":6691,"../../../hooks/useSmartTransactionFeatureFlags":6738,"./approve/approve":6470,"./base-transaction-info/base-transaction-info":6477,"./native-transfer/native-transfer":6488,"./nft-token-transfer/nft-token-transfer":6489,"./personal-sign/personal-sign":6490,"./set-approval-for-all-info/set-approval-for-all-info":6494,"./token-transfer/token-transfer":6512,"./typed-sign-v1/typed-sign-v1":6514,"./typed-sign/typed-sign":6523,"@metamask/transaction-controller":2698,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("@metamask/transaction-controller"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("../../../context/confirm"),s=e("../../../hooks/useSmartTransactionFeatureFlags"),i=h(e("./approve/approve")),l=h(e("./base-transaction-info/base-transaction-info")),c=h(e("./native-transfer/native-transfer")),u=h(e("./nft-token-transfer/nft-token-transfer")),d=h(e("./personal-sign/personal-sign")),f=h(e("./set-approval-for-all-info/set-approval-for-all-info")),m=h(e("./token-transfer/token-transfer")),p=h(e("./typed-sign-v1/typed-sign-v1")),g=h(e("./typed-sign/typed-sign"));function h(e){return e&&e.__esModule?e:{default:e}}function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}n.default=()=>{const{currentConfirmation:e}=(0,r.useConfirmContext)();(0,s.useSmartTransactionFeatureFlags)();const t=(0,o.useMemo)((()=>({[a.TransactionType.contractInteraction]:()=>l.default,[a.TransactionType.deployContract]:()=>l.default,[a.TransactionType.personalSign]:()=>d.default,[a.TransactionType.simpleSend]:()=>c.default,[a.TransactionType.signTypedData]:()=>{const{version:t}=(null==e?void 0:e.msgParams)??{};return"V1"===t?p.default:g.default},[a.TransactionType.tokenMethodApprove]:()=>i.default,[a.TransactionType.tokenMethodIncreaseAllowance]:()=>i.default,[a.TransactionType.tokenMethodSafeTransferFrom]:()=>u.default,[a.TransactionType.tokenMethodSetApprovalForAll]:()=>f.default,[a.TransactionType.tokenMethodTransfer]:()=>m.default,[a.TransactionType.tokenMethodTransferFrom]:()=>u.default})),[e]);if(null==e||!e.type)return null;const n=t[null==e?void 0:e.type]();return o.default.createElement(n,null)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/info.tsx"}],[6488,{"../../../../context/confirm":6691,"../../../simulation-details":6617,"../shared/advanced-details/advanced-details":6496,"../shared/gas-fees-section/gas-fees-section":6503,"../shared/native-send-heading/native-send-heading":6504,"../token-transfer/token-details-section":6511,"../token-transfer/transaction-flow-section":6513,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=d(e("react")),o=e("../../../../context/confirm"),r=e("../../../simulation-details"),s=e("../shared/advanced-details/advanced-details"),i=e("../shared/gas-fees-section/gas-fees-section"),l=d(e("../shared/native-send-heading/native-send-heading")),c=e("../token-transfer/token-details-section"),u=e("../token-transfer/transaction-flow-section");function d(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const{currentConfirmation:e}=(0,o.useConfirmContext)(),t="metamask"===e.origin;return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,null),a.default.createElement(u.TransactionFlowSection,null),a.default.createElement(r.SimulationDetails,{transaction:e,isTransactionsRedesign:!0,enableMetrics:!0,metricsOnly:t}),a.default.createElement(c.TokenDetailsSection,null),a.default.createElement(i.GasFeesSection,null),a.default.createElement(s.AdvancedDetails,null))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/native-transfer/native-transfer.tsx"}],[6489,{"../../../../context/confirm":6691,"../../../simulation-details":6617,"../shared/advanced-details/advanced-details":6496,"../shared/gas-fees-section/gas-fees-section":6503,"../shared/nft-send-heading/nft-send-heading":6505,"../token-transfer/token-details-section":6511,"../token-transfer/transaction-flow-section":6513,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=d(e("react")),o=e("../../../../context/confirm"),r=e("../../../simulation-details"),s=e("../shared/advanced-details/advanced-details"),i=e("../shared/gas-fees-section/gas-fees-section"),l=d(e("../shared/nft-send-heading/nft-send-heading")),c=e("../token-transfer/token-details-section"),u=e("../token-transfer/transaction-flow-section");function d(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const{currentConfirmation:e}=(0,o.useConfirmContext)(),t="metamask"===e.origin;return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,null),a.default.createElement(u.TransactionFlowSection,null),a.default.createElement(r.SimulationDetails,{transaction:e,isTransactionsRedesign:!0,enableMetrics:!0,metricsOnly:t}),a.default.createElement(c.TokenDetailsSection,null),a.default.createElement(i.GasFeesSection,null),a.default.createElement(s.AdvancedDetails,null))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/nft-token-transfer/nft-token-transfer.tsx"}],[6490,{"../../../../../../components/app/confirm/info/row":5416,"../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../components/component-library":5806,"../../../../../../components/ui/tooltip":6197,"../../../../../../helpers/constants/design-system":6248,"../../../../../../helpers/utils/snaps":6292,"../../../../../../helpers/utils/util":6297,"../../../../../../hooks/useI18nContext":6334,"../../../../context/confirm":6691,"../../../../selectors/preferences":6748,"../../../../utils":6756,"../shared/sign-in-with-row/sign-in-with-row":6507,"./siwe-sign":6491,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=b(e("react")),o=e("react-redux"),r=e("../../../../../../components/app/confirm/info/row"),s=e("../../../../../../components/app/confirm/info/row/alert-row/alert-row"),i=e("../../../../../../components/app/confirm/info/row/constants"),l=e("../../../../../../components/app/confirm/info/row/section"),c=e("../../../../../../components/component-library"),u=b(e("../../../../../../components/ui/tooltip")),d=e("../../../../../../helpers/constants/design-system"),f=e("../../../../../../helpers/utils/snaps"),m=e("../../../../../../helpers/utils/util"),p=e("../../../../../../hooks/useI18nContext"),g=e("../../../../context/confirm"),h=e("../../../../selectors/preferences"),y=e("../../../../utils"),v=e("../shared/sign-in-with-row/sign-in-with-row"),x=e("./siwe-sign");function b(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{var e;const t=(0,p.useI18nContext)(),{currentConfirmation:n}=(0,g.useConfirmContext)(),b=(0,o.useSelector)(h.selectUseTransactionSimulations);if(null==n||!n.msgParams)return null;const k=(0,y.isSIWESignatureRequest)(n),T=(0,m.sanitizeString)((0,m.hexToText)(null===(e=n.msgParams)||void 0===e?void 0:e.data));let w;k||(w=(0,f.isSnapId)(n.msgParams.origin)?t("requestFromInfoSnap"):t("requestFromInfo"));const C=a.default.createElement(c.Box,{display:d.Display.Flex,flexDirection:d.FlexDirection.Row,alignItems:d.AlignItems.center,gap:1},a.default.createElement(c.Text,{variant:d.TextVariant.bodyMdMedium},t("simulationDetailsTitle")),a.default.createElement(u.default,{interactive:!0,position:"top",containerClassName:"info-tooltip__tooltip-container",tooltipInnerClassName:"info-tooltip__tooltip-content",tooltipArrowClassName:"info-tooltip__top-tooltip-arrow",html:t("simulationDetailsTitleTooltip"),theme:"tippy-tooltip-info",style:{display:d.Display.Flex}},a.default.createElement(c.Icon,{name:c.IconName.Question,marginLeft:1,color:d.IconColor.iconMuted,size:c.IconSize.Sm}))),_=a.default.createElement(c.Text,{color:d.TextColor.textAlternative,variant:d.TextVariant.bodyMd},t("simulationDetailsNoChanges"));return a.default.createElement(a.default.Fragment,null,k&&b&&a.default.createElement(l.ConfirmInfoSection,null,a.default.createElement(c.Box,{"data-testid":"simulation-details-layout",className:"simulation-details-layout",display:d.Display.Flex,flexDirection:d.FlexDirection.Column,borderRadius:d.BorderRadius.LG,borderColor:d.BorderColor.transparent,padding:2,gap:3},a.default.createElement(c.Box,{display:d.Display.Flex,flexDirection:d.FlexDirection.Row,alignItems:d.AlignItems.center,justifyContent:d.JustifyContent.spaceBetween},C,_))),a.default.createElement(l.ConfirmInfoSection,null,a.default.createElement(s.ConfirmInfoAlertRow,{alertKey:i.RowAlertKey.RequestFrom,ownerId:n.id,label:t("requestFrom"),tooltip:w},a.default.createElement(r.ConfirmInfoRowUrl,{url:n.msgParams.origin})),a.default.createElement(v.SigningInWithRow,null)),a.default.createElement(l.ConfirmInfoSection,null,k?a.default.createElement(x.SIWESignInfo,null):a.default.createElement(s.ConfirmInfoAlertRow,{alertKey:"message",ownerId:n.id,label:t("message"),collapsed:!1,copyEnabled:!0,copyText:T},a.default.createElement(r.ConfirmInfoRowText,{text:T}))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/personal-sign/personal-sign.tsx"}],[6491,{"./siwe-sign":6492},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"SIWESignInfo",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./siwe-sign"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/personal-sign/siwe-sign/index.ts"}],[6492,{"../../../../../../../../shared/constants/network":5264,"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/component-library":5806,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"@metamask/controller-utils":1422,luxon:4388,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("luxon"),s=e("@metamask/controller-utils"),i=e("../../../../../../../../shared/constants/network"),l=e("../../../../../../../hooks/useI18nContext"),c=e("../../../../../../../components/app/confirm/info/row"),u=e("../../../../../../../components/component-library"),d=e("../../../../../../../helpers/constants/design-system"),f=e("../../../../../context/confirm");n.default=()=>{var e;const t=(0,l.useI18nContext)(),{currentConfirmation:n}=(0,f.useConfirmContext)(),a=null==n||null===(e=n.msgParams)||void 0===e||null===(e=e.siwe)||void 0===e?void 0:e.parsedMessage;if(!a)return null;const{address:m,chainId:p,issuedAt:g,nonce:h,requestId:y,statement:v,resources:x,uri:b,version:k}=a,T=(0,s.toHex)(p),w=i.NETWORK_TO_NAME_MAP[T]??T;return o.default.createElement(c.ConfirmInfoRow,{label:t("message"),collapsed:!0,copyEnabled:!0,copyText:JSON.stringify(a)},o.default.createElement(u.Box,{style:{marginLeft:-8,marginRight:-8}},o.default.createElement(u.Text,{color:d.TextColor.inherit,style:{whiteSpace:"pre-wrap",marginLeft:8,marginRight:8}},v??""),o.default.createElement(c.ConfirmInfoRow,{label:t("siweURI")},o.default.createElement(c.ConfirmInfoRowText,{text:b})),o.default.createElement(c.ConfirmInfoRow,{label:t("siweNetwork")},o.default.createElement(c.ConfirmInfoRowText,{text:w})),o.default.createElement(c.ConfirmInfoRow,{label:t("account")},o.default.createElement(c.ConfirmInfoRowAddress,{address:m,chainId:T})),o.default.createElement(c.ConfirmInfoRow,{label:t("version")},o.default.createElement(c.ConfirmInfoRowText,{text:k})),o.default.createElement(c.ConfirmInfoRow,{label:t("chainId")},o.default.createElement(c.ConfirmInfoRowText,{text:`${p}`})),o.default.createElement(c.ConfirmInfoRow,{label:t("nonce")},o.default.createElement(c.ConfirmInfoRowText,{text:h})),o.default.createElement(c.ConfirmInfoRow,{label:t("siweIssued")},o.default.createElement(c.ConfirmInfoRowDate,{unixTimestamp:r.DateTime.fromISO(g,{zone:"utc"}).toUnixInteger()})),y&&o.default.createElement(c.ConfirmInfoRow,{label:t("siweRequestId")},o.default.createElement(c.ConfirmInfoRowText,{text:y})),x&&o.default.createElement(c.ConfirmInfoRow,{label:t("siweResources")},x.map(((e,t)=>o.default.createElement(c.ConfirmInfoRowText,{key:`resource-${t}`,text:e}))))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/personal-sign/siwe-sign/siwe-sign.tsx"}],[6493,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/name":5530,"../../../../../../../components/component-library":5806,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../shared/static-simulation/static-simulation":6508,"@metamask/name-controller":1955,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.RevokeSetApprovalForAllStaticSimulation=void 0;var a=e("@metamask/name-controller"),o=f(e("react")),r=e("../../../../../../../components/app/confirm/info/row"),s=f(e("../../../../../../../components/app/name")),i=e("../../../../../../../components/component-library"),l=e("../../../../../../../helpers/constants/design-system"),c=e("../../../../../../../hooks/useI18nContext"),u=e("../../../../../context/confirm"),d=f(e("../../shared/static-simulation/static-simulation"));function f(e){return e&&e.__esModule?e:{default:e}}n.RevokeSetApprovalForAllStaticSimulation=({spender:e})=>{const t=(0,c.useI18nContext)(),{currentConfirmation:n}=(0,u.useConfirmContext)(),{chainId:f}=n,m=o.default.createElement(r.ConfirmInfoRow,{label:t("nfts")},o.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},o.default.createElement(i.Box,{display:l.Display.Flex,alignItems:l.AlignItems.center},o.default.createElement(s.default,{value:n.txParams.to,type:a.NameType.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:f})))),p=o.default.createElement(r.ConfirmInfoRow,{label:t("permissionFrom")},o.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},o.default.createElement(i.Box,{display:l.Display.Flex,alignItems:l.AlignItems.center},o.default.createElement(s.default,{value:e,type:a.NameType.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:f})))),g=o.default.createElement(o.default.Fragment,null,m,p);return o.default.createElement(d.default,{title:t("simulationDetailsTitle"),titleTooltip:t("simulationDetailsTitleTooltip"),description:t("simulationDetailsRevokeSetApprovalForAllDesc"),simulationElements:g})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/revoke-set-approval-for-all-static-simulation/revoke-set-approval-for-all-static-simulation.tsx"}],[6494,{"../../../../context/confirm":6691,"../approve/approve-details/approve-details":6468,"../hooks/useDecodedTransactionData":6479,"../shared/advanced-details/advanced-details":6496,"../shared/confirm-loader/confirm-loader":6497,"../shared/gas-fees-section/gas-fees-section":6503,"../utils":6524,"./revoke-set-approval-for-all-static-simulation/revoke-set-approval-for-all-static-simulation":6493,"./set-approval-for-all-static-simulation/set-approval-for-all-static-simulation":6495,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../context/confirm"),s=e("../approve/approve-details/approve-details"),i=e("../hooks/useDecodedTransactionData"),l=e("../shared/advanced-details/advanced-details"),c=e("../shared/confirm-loader/confirm-loader"),u=e("../shared/gas-fees-section/gas-fees-section"),d=e("../utils"),f=e("./revoke-set-approval-for-all-static-simulation/revoke-set-approval-for-all-static-simulation"),m=e("./set-approval-for-all-static-simulation/set-approval-for-all-static-simulation");n.default=()=>{const{currentConfirmation:e}=(0,r.useConfirmContext)(),t=(0,i.useDecodedTransactionData)(),{value:n,pending:a}=t,p=(0,d.getIsRevokeSetApprovalForAll)(n),g=null==n?void 0:n.data[0].params[0].value;return null!=e&&e.txParams?a?o.default.createElement(c.ConfirmLoader,null):o.default.createElement(o.default.Fragment,null,p?o.default.createElement(f.RevokeSetApprovalForAllStaticSimulation,{spender:g}):o.default.createElement(m.SetApprovalForAllStaticSimulation,null),o.default.createElement(s.ApproveDetails,{isSetApprovalForAll:!0}),o.default.createElement(u.GasFeesSection,null),o.default.createElement(l.AdvancedDetails,null)):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/set-approval-for-all-info.tsx"}],[6495,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/name":5530,"../../../../../../../components/component-library":5806,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../shared/static-simulation/static-simulation":6508,"@metamask/name-controller":1955,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SetApprovalForAllStaticSimulation=void 0;var a=e("@metamask/name-controller"),o=f(e("react")),r=e("../../../../../../../components/app/confirm/info/row"),s=f(e("../../../../../../../components/app/name")),i=e("../../../../../../../components/component-library"),l=e("../../../../../../../helpers/constants/design-system"),c=e("../../../../../../../hooks/useI18nContext"),u=e("../../../../../context/confirm"),d=f(e("../../shared/static-simulation/static-simulation"));function f(e){return e&&e.__esModule?e:{default:e}}n.SetApprovalForAllStaticSimulation=()=>{const e=(0,c.useI18nContext)(),{currentConfirmation:t}=(0,u.useConfirmContext)(),{chainId:n}=t,f=o.default.createElement(r.ConfirmInfoRow,{label:e("withdrawing")},o.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},o.default.createElement(i.Box,{display:l.Display.Flex,alignItems:l.AlignItems.center},o.default.createElement(i.Box,{display:l.Display.Inline,marginInlineEnd:1,minWidth:l.BlockSize.Zero},o.default.createElement(i.Text,{"data-testid":"simulation-token-value",backgroundColor:l.BackgroundColor.backgroundAlternative,borderRadius:l.BorderRadius.XL,paddingInline:2,textAlign:l.TextAlign.Center,alignItems:l.AlignItems.center},e("all"))),o.default.createElement(s.default,{value:t.txParams.to,type:a.NameType.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:n}))));return o.default.createElement(d.default,{title:e("simulationDetailsTitle"),titleTooltip:e("simulationDetailsTitleTooltip"),description:e("simulationDetailsSetApprovalForAllDesc"),simulationElements:f})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/set-approval-for-all-static-simulation/set-approval-for-all-static-simulation.tsx"}],[6496,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../../hooks/useI18nContext":6334,"../../../../../../../selectors":6985,"../../../../../../../store/actions":7e3,"../../../../../context/confirm":6691,"../../../../../selectors/preferences":6748,"../../../../../utils":6756,"../transaction-data/transaction-data":6509,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AdvancedDetails=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../../../../components/app/confirm/info/row"),s=e("../../../../../../../components/app/confirm/info/row/section"),i=e("../../../../../../../hooks/useI18nContext"),l=e("../../../../../../../selectors"),c=e("../../../../../../../store/actions"),u=e("../../../../../selectors/preferences"),d=e("../../../../../context/confirm"),f=e("../../../../../utils"),m=e("../transaction-data/transaction-data");function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}const g=()=>{const{currentConfirmation:e}=(0,d.useConfirmContext)(),t=(0,i.useI18nContext)(),n=(0,o.useDispatch)();(0,a.useEffect)((()=>{e&&!(0,f.isSignatureTransactionType)(e)&&n((0,c.getNextNonce)(e.txParams.from))}),[e,n]);const u=(0,o.useSelector)(l.getUseNonceField),m=(0,o.useSelector)(l.getNextSuggestedNonce),p=(0,o.useSelector)(l.getCustomNonceValue),g=p||m;return a.default.createElement(s.ConfirmInfoSection,{"data-testid":"advanced-details-nonce-section"},a.default.createElement(r.ConfirmInfoRow,{label:t("advancedDetailsNonceDesc"),tooltip:t("advancedDetailsNonceTooltip")},a.default.createElement(r.ConfirmInfoRowText,{"data-testid":"advanced-details-displayed-nonce",text:`${g}`,onEditClick:u?()=>n((0,c.showModal)({name:"CUSTOMIZE_NONCE",customNonceValue:p,nextNonce:m,updateCustomNonce:e=>{n((0,c.updateCustomNonce)(e))},getNextNonce:c.getNextNonce})):undefined,editIconClassName:"edit-nonce-btn",editIconDataTestId:"edit-nonce-icon"})))};n.AdvancedDetails=({overrideVisibility:e=!1})=>{const t=(0,o.useSelector)(u.selectConfirmationAdvancedDetailsOpen);return e||t?a.default.createElement(a.default.Fragment,null,a.default.createElement(g,null),a.default.createElement(m.TransactionData,null)):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/advanced-details/advanced-details.tsx"}],[6497,{"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/icon/preloader":6126,"../../../../../../../helpers/constants/design-system":6248,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConfirmLoader=void 0;var a=i(e("react")),o=e("../../../../../../../components/component-library"),r=i(e("../../../../../../../components/ui/icon/preloader")),s=e("../../../../../../../helpers/constants/design-system");function i(e){return e&&e.__esModule?e:{default:e}}n.ConfirmLoader=()=>a.default.createElement(o.Box,{display:s.Display.Flex,justifyContent:s.JustifyContent.center,alignItems:s.AlignItems.center,paddingTop:4,paddingBottom:4},a.default.createElement(r.default,{size:20}))}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/confirm-loader/confirm-loader.tsx"}],[6498,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.HEX_ZERO=void 0;n.HEX_ZERO="0x0"}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/constants.ts"}],[6499,{"../../../../../../../../shared/constants/network":5264,"../../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/tooltip":6197,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../../../selectors":6985,"../../../../../context/confirm":6691,"../edit-gas-icon/edit-gas-icon-button":6500,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.EditGasFeesRow=void 0;var a=g(e("react")),o=e("react-redux"),r=e("../../../../../../../../shared/constants/network"),s=e("../../../../../../../components/app/confirm/info/row/alert-row/alert-row"),i=e("../../../../../../../components/app/confirm/info/row/constants"),l=e("../../../../../../../components/component-library"),c=g(e("../../../../../../../components/ui/tooltip")),u=e("../../../../../../../helpers/constants/design-system"),d=e("../../../../../../../hooks/useI18nContext"),f=e("../../../../../../../selectors"),m=e("../../../../../context/confirm"),p=e("../edit-gas-icon/edit-gas-icon-button");function g(e){return e&&e.__esModule?e:{default:e}}n.EditGasFeesRow=({fiatFee:e,fiatFeeWith18SignificantDigits:t,nativeFee:n,supportsEIP1559:g,setShowCustomizeGasPopover:h})=>{const y=(0,d.useI18nContext)(),{currentConfirmation:v}=(0,m.useConfirmContext)(),x=r.TEST_CHAINS.includes(v.chainId),{showFiatInTestnets:b}=(0,o.useSelector)(f.getPreferences);return a.default.createElement(s.ConfirmInfoAlertRow,{alertKey:i.RowAlertKey.EstimatedFee,ownerId:v.id,"data-testid":"edit-gas-fees-row",label:y("networkFee"),tooltip:y("estimatedFeeTooltip")},a.default.createElement(l.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Row,justifyContent:u.JustifyContent.spaceBetween,alignItems:u.AlignItems.center,textAlign:u.TextAlign.Center},a.default.createElement(l.Text,{marginRight:1,color:u.TextColor.textDefault,"data-testid":"first-gas-field"},n),x&&!b||!t?a.default.createElement(l.Text,{marginRight:2,color:u.TextColor.textAlternative,"data-testid":"native-currency"},e):a.default.createElement(c.default,{title:t},a.default.createElement(l.Text,{marginRight:2,color:u.TextColor.textAlternative,"data-testid":"native-currency"},e)),a.default.createElement(p.EditGasIconButton,{supportsEIP1559:g,setShowCustomizeGasPopover:h})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx"}],[6500,{"../../../../../../../components/component-library":5806,"../../../../../../../contexts/transaction-modal":6218,"../../../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useTransactionEventFragment":6740,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.EditGasIconButton=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../../components/component-library"),s=e("../../../../../../../contexts/transaction-modal"),i=e("../../../../../../../helpers/constants/design-system"),l=e("../../../../../hooks/useTransactionEventFragment");n.EditGasIconButton=({supportsEIP1559:e,setShowCustomizeGasPopover:t})=>{const{openModal:n}=(0,s.useTransactionModalContext)(),{updateTransactionEventFragment:a}=(0,l.useTransactionEventFragment)();return o.default.createElement(r.Button,{style:{textDecoration:"none"},size:r.ButtonSize.Sm,variant:r.ButtonVariant.Link,startIconName:r.IconName.Edit,color:i.IconColor.primaryDefault,"data-testid":"edit-gas-fee-icon",onClick:()=>e?(a({gas_edit_attempted:"basic"}),void n("editGasFee")):void t(!0)})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/edit-gas-icon/edit-gas-icon-button.tsx"}],[6501,{"../../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../../components/component-library":5806,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../../../../selectors/preferences":6748,"../../../../gas-timing/gas-timing.component":6577,"../../hooks/useEIP1559TxFees":6480,"../../hooks/useFeeCalculations":6481,"../../hooks/useSupportsEIP1559":6483,"../edit-gas-fees-row/edit-gas-fees-row":6499,"../gas-fees-row/gas-fees-row":6502,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.GasFeesDetails=void 0;var a=v(e("react")),o=e("react-redux"),r=e("../../../../../../../components/component-library"),s=e("../../../../../../../helpers/constants/design-system"),i=e("../../../../../../../hooks/useI18nContext"),l=e("../../../../../selectors/preferences"),c=e("../../../../../context/confirm"),u=v(e("../../../../gas-timing/gas-timing.component")),d=e("../../hooks/useEIP1559TxFees"),f=e("../../hooks/useFeeCalculations"),m=e("../../hooks/useSupportsEIP1559"),p=e("../edit-gas-fees-row/edit-gas-fees-row"),g=e("../gas-fees-row/gas-fees-row"),h=e("../../../../../../../components/app/confirm/info/row/alert-row/alert-row"),y=e("../../../../../../../components/app/confirm/info/row/constants");function v(e){return e&&e.__esModule?e:{default:e}}n.GasFeesDetails=({setShowCustomizeGasPopover:e})=>{const t=(0,i.useI18nContext)(),{currentConfirmation:n}=(0,c.useConfirmContext)(),{maxFeePerGas:v,maxPriorityFeePerGas:x}=(0,d.useEIP1559TxFees)(n),{supportsEIP1559:b}=(0,m.useSupportsEIP1559)(n),k=Boolean(null==n?void 0:n.layer1GasFee),{estimatedFeeFiat:T,estimatedFeeFiatWith18SignificantDigits:w,estimatedFeeNative:C,l1FeeFiat:_,l1FeeFiatWith18SignificantDigits:E,l1FeeNative:I,l2FeeFiat:S,l2FeeFiatWith18SignificantDigits:P,l2FeeNative:M,maxFeeFiat:D,maxFeeFiatWith18SignificantDigits:A,maxFeeNative:O}=(0,f.useFeeCalculations)(n),F=(0,o.useSelector)(l.selectConfirmationAdvancedDetailsOpen);return null!=n&&n.txParams?a.default.createElement(a.default.Fragment,null,a.default.createElement(p.EditGasFeesRow,{fiatFee:T,fiatFeeWith18SignificantDigits:w,nativeFee:C,supportsEIP1559:b,setShowCustomizeGasPopover:e}),F&&k&&a.default.createElement(a.default.Fragment,null,a.default.createElement(g.GasFeesRow,{"data-testid":"gas-fee-details-l1",label:t("l1Fee"),tooltipText:t("l1FeeTooltip"),fiatFee:_,fiatFeeWith18SignificantDigits:E,nativeFee:I}),a.default.createElement(g.GasFeesRow,{"data-testid":"gas-fee-details-l2",label:t("l2Fee"),tooltipText:t("l2FeeTooltip"),fiatFee:S,fiatFeeWith18SignificantDigits:P,nativeFee:M})),b&&a.default.createElement(h.ConfirmInfoAlertRow,{alertKey:y.RowAlertKey.Speed,"data-testid":"gas-fee-details-speed",label:t("speed"),ownerId:n.id},a.default.createElement(r.Box,{display:s.Display.Flex,alignItems:s.AlignItems.center},a.default.createElement(u.default,{maxFeePerGas:v,maxPriorityFeePerGas:x}))),F&&a.default.createElement(g.GasFeesRow,{"data-testid":"gas-fee-details-max-fee",label:t("maxFee"),tooltipText:t("maxFeeTooltip"),fiatFee:D,fiatFeeWith18SignificantDigits:A,nativeFee:O})):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/gas-fees-details/gas-fees-details.tsx"}],[6502,{"../../../../../../../../shared/constants/network":5264,"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/tooltip":6197,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../selectors":6985,"../../../../../context/confirm":6691,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.GasFeesRow=void 0;var a=f(e("react")),o=e("react-redux"),r=e("../../../../../../../../shared/constants/network"),s=e("../../../../../../../components/app/confirm/info/row"),i=e("../../../../../../../components/component-library"),l=f(e("../../../../../../../components/ui/tooltip")),c=e("../../../../../../../helpers/constants/design-system"),u=e("../../../../../../../selectors"),d=e("../../../../../context/confirm");function f(e){return e&&e.__esModule?e:{default:e}}n.GasFeesRow=({label:e,tooltipText:t,fiatFee:n,fiatFeeWith18SignificantDigits:f,nativeFee:m,"data-testid":p})=>{const{currentConfirmation:g}=(0,d.useConfirmContext)(),h=r.TEST_CHAINS.includes(null==g?void 0:g.chainId),{showFiatInTestnets:y}=(0,o.useSelector)(u.getPreferences);return a.default.createElement(s.ConfirmInfoRow,{"data-testid":p,label:e,tooltip:t,variant:s.ConfirmInfoRowVariant.Default},a.default.createElement(i.Box,{display:c.Display.Flex,flexDirection:c.FlexDirection.Row,justifyContent:c.JustifyContent.spaceBetween,alignItems:c.AlignItems.center,textAlign:c.TextAlign.Center,marginLeft:8},a.default.createElement(i.Text,{marginRight:1,color:c.TextColor.textDefault},m),h&&!y||!f?a.default.createElement(i.Text,{color:c.TextColor.textAlternative},n):a.default.createElement(l.default,{title:f},a.default.createElement(i.Text,{color:c.TextColor.textAlternative},n))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/gas-fees-row/gas-fees-row.tsx"}],[6503,{"../../../../../../../../shared/constants/gas":5255,"../../../../../../../components/app/confirm/info/row/section":5418,"../../../../../context/confirm":6691,"../../../../edit-gas-popover":6573,"../../hooks/useSupportsEIP1559":6483,"../gas-fees-details/gas-fees-details":6501,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.GasFeesSection=void 0;var a,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("../../../../../../../../shared/constants/gas"),s=e("../../../../../../../components/app/confirm/info/row/section"),i=e("../../../../../context/confirm"),l=(a=e("../../../../edit-gas-popover"))&&a.__esModule?a:{default:a},c=e("../../hooks/useSupportsEIP1559"),u=e("../gas-fees-details/gas-fees-details");function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}const f=({closeCustomizeGasPopover:e,transactionMeta:t})=>o.default.createElement(l.default,{onClose:e,mode:r.EditGasModes.modifyInPlace,transaction:t});n.GasFeesSection=()=>{const{currentConfirmation:e}=(0,i.useConfirmContext)(),[t,n]=(0,o.useState)(!1),a=(0,o.useCallback)((()=>n(!1)),[n]),{supportsEIP1559:r}=(0,c.useSupportsEIP1559)(e);return null!=e&&e.txParams?o.default.createElement(s.ConfirmInfoSection,{"data-testid":"gas-fee-section"},o.default.createElement(u.GasFeesDetails,{setShowCustomizeGasPopover:n}),!r&&t&&o.default.createElement(f,{closeCustomizeGasPopover:a,transactionMeta:e})):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/gas-fees-section/gas-fees-section.tsx"}],[6504,{"../../../../../../../../shared/constants/network":5264,"../../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/tooltip":6197,"../../../../../../../ducks/locale/locale":6235,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useFiatFormatter":6330,"../../../../../../../selectors":6985,"../../../../../../../selectors/multichain":6990,"../../../../../context/confirm":6691,"../../../../simulation-details/formatAmount":6616,"bignumber.js":3465,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("bignumber.js"),o=y(e("react")),r=e("react-redux"),s=e("../../../../../../../../shared/constants/network"),i=e("../../../../../../../../shared/lib/transactions-controller-utils"),l=e("../../../../../../../components/component-library"),c=y(e("../../../../../../../components/ui/tooltip")),u=e("../../../../../../../ducks/locale/locale"),d=e("../../../../../../../helpers/constants/design-system"),f=e("../../../../../../../hooks/useFiatFormatter"),m=e("../../../../../../../selectors"),p=e("../../../../../../../selectors/multichain"),g=e("../../../../../context/confirm"),h=e("../../../../simulation-details/formatAmount");function y(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{var e,t;const{currentConfirmation:n}=(0,g.useConfirmContext)(),{chainId:y}=n,v=(0,i.calcTokenAmount)(n.txParams.value,18),x=(0,r.useSelector)((e=>(0,m.selectConversionRateByChainId)(e,y))),b=x&&v&&new a.BigNumber(x).times(v,10).toNumber(),k=(0,f.useFiatFormatter)(),T=b&&k(b,{shorten:!0}),w=(0,r.useSelector)(p.getMultichainNetwork),C=null==w||null===(e=w.network)||void 0===e?void 0:e.ticker,_=(0,r.useSelector)(u.getIntlLocale),E=(0,h.formatAmount)(_,v),I=v.toFixed(),S=s.TEST_CHAINS.includes(n.chainId),{showFiatInTestnets:P}=(0,r.useSelector)(m.getPreferences),M=o.default.createElement(l.AvatarToken,{src:(null==w||null===(t=w.network)||void 0===t||null===(t=t.rpcPrefs)||void 0===t?void 0:t.imageUrl)||s.CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP[n.chainId],name:null==w?void 0:w.nickname,size:l.AvatarTokenSize.Xl,backgroundColor:d.BackgroundColor.backgroundDefault}),D=E===I?o.default.createElement(l.Text,{variant:d.TextVariant.headingLg,color:d.TextColor.inherit,marginTop:3},`${E} ${C}`):o.default.createElement(c.default,{title:I,position:"right"},o.default.createElement(l.Text,{variant:d.TextVariant.headingLg,color:d.TextColor.inherit,marginTop:3},`${E} ${C}`)),A=Boolean(T)&&(!S||P)&&o.default.createElement(l.Text,{variant:d.TextVariant.bodyMd,color:d.TextColor.textAlternative},T);return o.default.createElement(l.Box,{display:d.Display.Flex,flexDirection:d.FlexDirection.Column,justifyContent:d.JustifyContent.center,alignItems:d.AlignItems.center,padding:4},M,D,A)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/native-send-heading/native-send-heading.tsx"}],[6505,{"../../../../../../../../shared/constants/network":5264,"../../../../../../../../shared/modules/selectors/networks":5320,"../../../../../../../../shared/modules/string-utils":5324,"../../../../../../../components/component-library":5806,"../../../../../../../components/multichain/nft-item":5981,"../../../../../../../ducks/metamask/metamask":6236,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../helpers/utils/nfts":6286,"../../../../../context/confirm":6691,"../../../../../hooks/useAssetDetails":6713,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("react-redux"),s=e("../../../../../../../../shared/constants/network"),i=e("../../../../../../../../shared/modules/string-utils"),l=e("../../../../../../../components/component-library"),c=e("../../../../../../../components/multichain/nft-item"),u=e("../../../../../../../ducks/metamask/metamask"),d=e("../../../../../../../helpers/constants/design-system"),f=e("../../../../../../../helpers/utils/nfts"),m=e("../../../../../context/confirm"),p=e("../../../../../hooks/useAssetDetails"),g=e("../../../../../../../../shared/modules/selectors/networks");n.default=()=>{const{currentConfirmation:e}=(0,m.useConfirmContext)(),t=e.txParams.to,n=e.txParams.from,{data:a}=e.txParams,{chainId:h}=e,{assetName:y,tokenImage:v,tokenId:x}=(0,p.useAssetDetails)(t,n,a,h),b=(0,r.useSelector)((e=>(0,u.getNFTsByChainId)(e,h))),k=(0,r.useSelector)(g.getNetworkConfigurationsByChainId),T=x&&b.find((({address:e,tokenId:n})=>(0,i.isEqualCaseInsensitive)(e,t)&&x===n.toString())),w=null==T?void 0:T.imageOriginal,C=null==T?void 0:T.image,_=T&&(0,f.getNftImageAlt)(T),E=w??(C||""),I=null==E?void 0:E.startsWith("ipfs:"),S=k[h],P=o.default.createElement(l.Box,{style:{width:"48px"}},o.default.createElement(c.NftItem,{src:v,alt:C&&_?_:"",name:y,tokenId:x||"",networkName:S.name??"",networkSrc:s.CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP[h],isIpfsURL:I})),M=o.default.createElement(l.Text,{variant:d.TextVariant.headingLg,color:d.TextColor.inherit,marginTop:3,textAlign:d.TextAlign.Center},y),D=o.default.createElement(l.Text,{variant:d.TextVariant.bodyMd,color:d.TextColor.textAlternative},`#${x}`);return o.default.createElement(l.Box,{display:d.Display.Flex,flexDirection:d.FlexDirection.Column,justifyContent:d.JustifyContent.center,alignItems:d.AlignItems.center,padding:4},P,M,D)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/nft-send-heading/nft-send-heading.tsx"}],[6506,{"../../../../../../../../shared/constants/network":5264,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/tooltip":6197,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../../../selectors":6985,"../../../../../context/confirm":6691,"../../hooks/use-token-values":6478,"../../hooks/useTokenDetails":6484,"../confirm-loader/confirm-loader":6497,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=g(e("react")),o=e("react-redux"),r=e("../../../../../../../../shared/constants/network"),s=e("../../../../../../../components/component-library"),i=g(e("../../../../../../../components/ui/tooltip")),l=e("../../../../../../../helpers/constants/design-system"),c=e("../../../../../../../hooks/useI18nContext"),u=e("../../../../../../../selectors"),d=e("../../../../../context/confirm"),f=e("../../hooks/use-token-values"),m=e("../../hooks/useTokenDetails"),p=e("../confirm-loader/confirm-loader");function g(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const e=(0,c.useI18nContext)(),{currentConfirmation:t}=(0,d.useConfirmContext)(),{tokenImage:n,tokenSymbol:g}=(0,m.useTokenDetails)(t),{decodedTransferValue:h,displayTransferValue:y,fiatDisplayValue:v,pending:x}=(0,f.useTokenValues)(t),b=r.TEST_CHAINS.includes(t.chainId),{showFiatInTestnets:k}=(0,o.useSelector)(u.getPreferences),T=a.default.createElement(s.AvatarToken,{src:n,name:g!==e("unknown")&&g,size:s.AvatarTokenSize.Xl,backgroundColor:g===e("unknown")?l.BackgroundColor.overlayDefault:l.BackgroundColor.backgroundDefault,color:g===e("unknown")?l.TextColor.textMuted:l.TextColor.textDefault}),w=y===h?a.default.createElement(s.Text,{variant:l.TextVariant.headingLg,color:l.TextColor.inherit,marginTop:3},`${y} ${g}`):a.default.createElement(i.default,{title:h,position:"right"},a.default.createElement(s.Text,{variant:l.TextVariant.headingLg,color:l.TextColor.inherit,marginTop:3},`${y} ${g}`)),C=Boolean(v)&&(!b||k)&&a.default.createElement(s.Text,{variant:l.TextVariant.bodyMd,color:l.TextColor.textAlternative},v);return x?a.default.createElement(p.ConfirmLoader,null):a.default.createElement(s.Box,{display:l.Display.Flex,flexDirection:l.FlexDirection.Column,justifyContent:l.JustifyContent.center,alignItems:l.AlignItems.center,padding:4},T,w,C)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.tsx"}],[6507,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../../../../utils":6756,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SigningInWithRow=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../../components/app/confirm/info/row"),s=e("../../../../../../../components/app/confirm/info/row/alert-row/alert-row"),i=e("../../../../../../../components/app/confirm/info/row/constants"),l=e("../../../../../../../hooks/useI18nContext"),c=e("../../../../../context/confirm"),u=e("../../../../../utils");n.SigningInWithRow=()=>{var e,t;const n=(0,l.useI18nContext)(),{currentConfirmation:a}=(0,c.useConfirmContext)(),d=(0,u.isSIWESignatureRequest)(a),f=null==a?void 0:a.chainId,m=(null==a||null===(e=a.txParams)||void 0===e?void 0:e.from)??(null==a||null===(t=a.msgParams)||void 0===t?void 0:t.from);return m?o.default.createElement(s.ConfirmInfoAlertRow,{alertKey:i.RowAlertKey.SigningInWith,label:n(d?"signingInWith":"signingWith"),ownerId:a.id,isShownWithAlertsOnly:!d},o.default.createElement(r.ConfirmInfoRowAddress,{address:m,chainId:f})):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/sign-in-with-row/sign-in-with-row.tsx"}],[6508,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/icon/preloader":6126,"../../../../../../../helpers/constants/design-system":6248,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=c(e("react")),o=e("../../../../../../../components/component-library"),r=e("../../../../../../../components/app/confirm/info/row"),s=e("../../../../../../../components/app/confirm/info/row/section"),i=e("../../../../../../../helpers/constants/design-system"),l=c(e("../../../../../../../components/ui/icon/preloader"));function c(e){return e&&e.__esModule?e:{default:e}}const u={display:i.Display.Flex,alignItems:i.AlignItems.center,justifyContent:i.JustifyContent.spaceBetween};n.default=({title:e,titleTooltip:t,description:n,simulationElements:c,isLoading:d,isCollapsed:f=!1})=>a.default.createElement(s.ConfirmInfoSection,{"data-testid":"confirmation__simulation_section",style:f?u:{}},a.default.createElement(r.ConfirmInfoRow,{label:e,tooltip:t},n&&a.default.createElement(r.ConfirmInfoRowText,{text:n})),d?a.default.createElement(o.Box,{display:i.Display.Flex,justifyContent:i.JustifyContent.center},a.default.createElement(l.default,{size:20})):c)}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/static-simulation/static-simulation.tsx"}],[6509,{"../../../../../../../../shared/modules/transaction.utils":5326,"../../../../../../../../shared/types/transaction-decode":5330,"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/confirm/info/row/expandable-row":5414,"../../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/icon/preloader":6126,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../hooks/useDecodedTransactionData":6479,"@ethersproject/bytes":516,lodash:4380,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Container=v,n.TransactionData=void 0;var a=y(e("react")),o=e("@ethersproject/bytes"),r=y(e("lodash")),s=e("../../hooks/useDecodedTransactionData"),i=e("../../../../../../../components/app/confirm/info/row/section"),l=e("../../../../../../../components/app/confirm/info/row"),c=e("../../../../../../../helpers/constants/design-system"),u=e("../../../../../../../components/component-library"),d=e("../../../../../../../hooks/useI18nContext"),f=e("../../../../../../../components/app/confirm/info/row/expandable-row"),m=y(e("../../../../../../../components/ui/icon/preloader")),p=e("../../../../../../../../shared/types/transaction-decode"),g=e("../../../../../context/confirm"),h=e("../../../../../../../../shared/modules/transaction.utils");function y(e){return e&&e.__esModule?e:{default:e}}function v({children:e,isLoading:t,transactionData:n}){const o=(0,d.useI18nContext)();return a.default.createElement(a.default.Fragment,null,a.default.createElement(i.ConfirmInfoSection,{"data-testid":"advanced-details-data-section"},a.default.createElement(l.ConfirmInfoRow,{label:o("advancedDetailsDataDesc"),copyEnabled:Boolean(n),copyText:n||undefined},a.default.createElement(u.Box,null,t&&a.default.createElement(m.default,{size:20}))),e))}function x({transactionData:e}){const t=(0,d.useI18nContext)();return a.default.createElement(l.ConfirmInfoRow,{label:t("advancedDetailsHexDesc")},a.default.createElement(l.ConfirmInfoRowText,{"data-testid":"advanced-details-transaction-hex",text:e}))}function b({method:e,source:t,isExpandable:n,chainId:o}){const r=(0,d.useI18nContext)(),s=a.default.createElement(u.Box,{paddingLeft:2,"data-testid":`advanced-details-${e.name}-params`},e.params.map(((e,n)=>a.default.createElement(T,{key:n,param:e,index:n,source:t,chainId:o}))));return n?a.default.createElement(f.ConfirmInfoExpandableRow,{label:r("transactionDataFunction"),tooltip:e.description,content:s,startExpanded:!0},a.default.createElement(l.ConfirmInfoRowText,{"data-testid":"advanced-details-data-function",text:e.name})):a.default.createElement(a.default.Fragment,null,a.default.createElement(l.ConfirmInfoRow,{"data-testid":"advanced-details-data-function",label:r("transactionDataFunction"),tooltip:e.description},a.default.createElement(l.ConfirmInfoRowText,{text:e.name})),s)}function k({param:e,source:t,chainId:n}){const{name:r,type:s,value:i}=e;if("address"===s)return a.default.createElement(l.ConfirmInfoRowAddress,{address:i,chainId:n});if("path"===r&&t===p.DecodedTransactionDataSource.Uniswap)return a.default.createElement(w,{pathPools:i,chainId:n});let c=i.toString();return!Array.isArray(i)&&c.startsWith("0x")&&(c=(0,o.hexStripZeros)(c)),a.default.createElement(l.ConfirmInfoRowText,{text:c})}function T({param:e,index:t,source:n,chainId:o}){var s;const{name:i,type:c,description:d}=e,f=i?r.default.startCase(i):`Param #${t+1}`,m=`${c}${d?` - ${d}`:""}`,p=`advanced-details-data-param-${t}`,g=null===(s=e.children)||void 0===s?void 0:s.map(((e,t)=>a.default.createElement(T,{key:t,param:e,index:t,source:n,chainId:o})));return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.ConfirmInfoRow,{label:f,tooltip:m,"data-testid":p},!(null!=g&&g.length)&&a.default.createElement(k,{param:e,source:n,chainId:o})),g&&a.default.createElement(u.Box,{paddingLeft:2},g))}function w({pathPools:e,chainId:t}){return a.default.createElement(u.Box,{display:c.Display.Flex,flexWrap:c.FlexWrap.Wrap,justifyContent:c.JustifyContent.flexEnd},e.map(((e,n)=>a.default.createElement(a.default.Fragment,null,0===n&&a.default.createElement(l.ConfirmInfoRowAddress,{address:e.firstAddress,chainId:t}),a.default.createElement(l.ConfirmInfoRowText,{text:String(e.tickSpacing)}),a.default.createElement(l.ConfirmInfoRowAddress,{address:e.secondAddress,chainId:t})))))}n.TransactionData=()=>{var e;const{currentConfirmation:t}=(0,g.useConfirmContext)(),n=null==t||null===(e=t.txParams)||void 0===e?void 0:e.data,o=(0,s.useDecodedTransactionData)(),{value:r,pending:i}=o;if(i)return a.default.createElement(v,{isLoading:!0});if(!(0,h.hasTransactionData)(n))return null;if(!r)return a.default.createElement(v,{transactionData:n},a.default.createElement(x,{transactionData:n}));const{data:c,source:u}=r,d=c.length>1,{chainId:f}=t;return a.default.createElement(v,{transactionData:n},a.default.createElement(a.default.Fragment,null,c.map(((e,t)=>a.default.createElement(a.default.Fragment,{key:t},a.default.createElement(b,{method:e,source:u,isExpandable:d,chainId:f}),t{const e=(0,u.useI18nContext)(),{currentConfirmation:t}=(0,m.useConfirmContext)(),n=null==t?void 0:t.origin;return n?o.default.createElement(i.ConfirmInfoAlertRow,{alertKey:l.RowAlertKey.RequestFrom,ownerId:t.id,"data-testid":"transaction-details-origin-row",label:e("requestFrom"),tooltip:e("requestFromTransactionDescription")},o.default.createElement(s.ConfirmInfoRowUrl,{url:n})):null};n.OriginRow=T;const w=()=>{var e,t;const n=(0,u.useI18nContext)(),{currentConfirmation:r}=(0,m.useConfirmContext)();if(null==r||null===(e=r.txParams)||void 0===e||!e.to||!(0,a.isValidAddress)((null==r||null===(t=r.txParams)||void 0===t?void 0:t.to)??""))return null;const{chainId:i}=r;return o.default.createElement(s.ConfirmInfoRow,{"data-testid":"transaction-details-recipient-row",label:n("interactingWith"),tooltip:n("interactingWithTransactionDescription")},o.default.createElement(s.ConfirmInfoRowAddress,{address:r.txParams.to,chainId:i}))};n.RecipientRow=w;const C=()=>{const e=(0,u.useI18nContext)(),{currentConfirmation:t}=(0,m.useConfirmContext)(),n=(0,p.useFourByte)(t);return null!=n&&n.name?o.default.createElement(s.ConfirmInfoRow,{"data-testid":"transaction-details-method-data-row",label:e("methodData"),tooltip:e("methodDataTransactionDesc")},o.default.createElement(s.ConfirmInfoRowText,{text:n.name})):null};n.MethodDataRow=C;const _=()=>{var e;const t=(0,u.useI18nContext)(),{currentConfirmation:n}=(0,m.useConfirmContext)(),{currency:a}=(0,y.useUserPreferencedCurrency)(h.PRIMARY),r=null==n||null===(e=n.txParams)||void 0===e?void 0:e.value;return r&&r!==v.HEX_ZERO?o.default.createElement(c.ConfirmInfoSection,null,o.default.createElement(s.ConfirmInfoRow,{"data-testid":"transaction-details-amount-row",label:t("amount")},o.default.createElement(g.ConfirmInfoRowCurrency,{value:r,currency:a}))):null},E=()=>{const e=(0,u.useI18nContext)(),{currentConfirmation:t}=(0,m.useConfirmContext)(),{id:n,chainId:a}=t??{},i=Boolean(null==t?void 0:t.isUserOperation),l=(0,r.useSelector)((e=>(0,d.selectPaymasterAddress)(e,n)));return i&&l?o.default.createElement(c.ConfirmInfoSection,null,o.default.createElement(s.ConfirmInfoRow,{"data-testid":"transaction-details-paymaster-row",label:e("confirmFieldPaymaster"),tooltip:e("confirmFieldTooltipPaymaster")},o.default.createElement(s.ConfirmInfoRowAddress,{address:l,chainId:a}))):null};n.TransactionDetails=()=>{const e=(0,r.useSelector)(f.selectConfirmationAdvancedDetailsOpen),{currentConfirmation:t}=(0,m.useConfirmContext)(),n=(0,o.useMemo)((()=>(0,x.hasValueAndNativeBalanceMismatch)(t)),[t]);return o.default.createElement(o.default.Fragment,null,o.default.createElement(c.ConfirmInfoSection,{"data-testid":"transaction-details-section"},o.default.createElement(T,null),o.default.createElement(w,null),e&&o.default.createElement(C,null),o.default.createElement(b.SigningInWithRow,null)),(e||n)&&o.default.createElement(_,null),o.default.createElement(E,null))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx"}],[6511,{"../../../../../../../shared/constants/app":5248,"../../../../../../../shared/constants/network":5264,"../../../../../../../shared/modules/selectors/networks":5320,"../../../../../../components/app/confirm/info/row":5416,"../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../components/component-library":5806,"../../../../../../helpers/constants/design-system":6248,"../../../../../../hooks/useI18nContext":6334,"../../../../context/confirm":6691,"../../../../selectors/preferences":6748,"../../../simulation-details/useBalanceChanges":6621,"../shared/transaction-details/transaction-details":6510,"@metamask/transaction-controller":2698,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenDetailsSection=void 0;var a,o=e("@metamask/transaction-controller"),r=(a=e("react"))&&a.__esModule?a:{default:a},s=e("react-redux"),i=e("../../../../../../../shared/constants/app"),l=e("../../../../../../../shared/constants/network"),c=e("../../../../../../../shared/modules/selectors/networks"),u=e("../../../../../../components/app/confirm/info/row"),d=e("../../../../../../components/app/confirm/info/row/section"),f=e("../../../../../../components/component-library"),m=e("../../../../../../helpers/constants/design-system"),p=e("../../../../../../hooks/useI18nContext"),g=e("../../../../context/confirm"),h=e("../../../../selectors/preferences"),y=e("../../../simulation-details/useBalanceChanges"),v=e("../shared/transaction-details/transaction-details");n.TokenDetailsSection=()=>{var e;const t=(0,p.useI18nContext)(),{currentConfirmation:n}=(0,g.useConfirmContext)(),{chainId:a}=n,x=(0,s.useSelector)(c.getNetworkConfigurationsByChainId)[a].name,b=(0,s.useSelector)(h.selectConfirmationAdvancedDetailsOpen),k=Boolean(null===(e=n.simulationData)||void 0===e||null===(e=e.error)||void 0===e?void 0:e.code),T=0===(0,y.useBalanceChanges)({chainId:a,simulationData:n.simulationData}).value.length,w=r.default.createElement(u.ConfirmInfoRow,{label:t("transactionFlowNetwork")},r.default.createElement(f.Box,{display:m.Display.Flex,alignItems:m.AlignItems.center,flexWrap:m.FlexWrap.Wrap,gap:2,minWidth:m.BlockSize.Zero},r.default.createElement(f.AvatarNetwork,{borderColor:m.BorderColor.backgroundDefault,size:f.AvatarNetworkSize.Xs,src:l.CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP[a],name:x}),r.default.createElement(f.Text,{variant:m.TextVariant.bodyMd,color:m.TextColor.textDefault},x))),C=n.type!==o.TransactionType.simpleSend&&(b||T||k),_=C&&r.default.createElement(u.ConfirmInfoRow,{label:t("interactingWith"),tooltip:t("interactingWithTransactionDescription")},r.default.createElement(u.ConfirmInfoRowAddress,{address:n.txParams.to,chainId:a})),E=(null==n?void 0:n.origin)!==i.ORIGIN_METAMASK;return r.default.createElement(d.ConfirmInfoSection,{"data-testid":"confirmation__token-details-section"},w,(E||C)&&r.default.createElement(u.ConfirmInfoRowDivider,null),E&&r.default.createElement(v.OriginRow,null),_)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/token-transfer/token-details-section.tsx"}],[6512,{"../../../../context/confirm":6691,"../../../simulation-details":6617,"../shared/advanced-details/advanced-details":6496,"../shared/gas-fees-section/gas-fees-section":6503,"../shared/send-heading/send-heading":6506,"./token-details-section":6511,"./transaction-flow-section":6513,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=d(e("react")),o=e("../../../../context/confirm"),r=e("../../../simulation-details"),s=e("../shared/advanced-details/advanced-details"),i=e("../shared/gas-fees-section/gas-fees-section"),l=d(e("../shared/send-heading/send-heading")),c=e("./token-details-section"),u=e("./transaction-flow-section");function d(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const{currentConfirmation:e}=(0,o.useConfirmContext)(),t="metamask"===e.origin;return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,null),a.default.createElement(u.TransactionFlowSection,null),a.default.createElement(r.SimulationDetails,{transaction:e,isTransactionsRedesign:!0,enableMetrics:!0,metricsOnly:t}),a.default.createElement(c.TokenDetailsSection,null),a.default.createElement(i.GasFeesSection,null),a.default.createElement(s.AdvancedDetails,null))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/token-transfer/token-transfer.tsx"}],[6513,{"../../../../../../components/app/confirm/info/row":5416,"../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../components/component-library":5806,"../../../../../../helpers/constants/design-system":6248,"../../../../../../hooks/useI18nContext":6334,"../../../../context/confirm":6691,"../hooks/useDecodedTransactionData":6479,"@metamask/transaction-controller":2698,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.TransactionFlowSection=void 0;var a,o=e("@metamask/transaction-controller"),r=(a=e("react"))&&a.__esModule?a:{default:a},s=e("../../../../../../components/app/confirm/info/row/section"),i=e("../../../../../../components/component-library"),l=e("../../../../../../helpers/constants/design-system"),c=e("../../../../../../components/app/confirm/info/row"),u=e("../../../../../../components/app/confirm/info/row/alert-row/alert-row"),d=e("../../../../../../components/app/confirm/info/row/constants"),f=e("../../../../../../hooks/useI18nContext"),m=e("../../../../context/confirm"),p=e("../hooks/useDecodedTransactionData");n.TransactionFlowSection=()=>{const e=(0,f.useI18nContext)(),{currentConfirmation:t}=(0,m.useConfirmContext)(),{value:n,pending:a}=(0,p.useDecodedTransactionData)(),g=null==n?void 0:n.data[0].params.filter((e=>"address"===e.type)),h=t.type===o.TransactionType.simpleSend?t.txParams.to:null==g?void 0:g[g.length-1].value;if(a)return null;const{chainId:y}=t;return r.default.createElement(s.ConfirmInfoSection,{"data-testid":"confirmation__transaction-flow"},r.default.createElement(i.Box,{display:l.Display.Flex,flexDirection:l.FlexDirection.Row,justifyContent:l.JustifyContent.spaceBetween,alignItems:l.AlignItems.center},r.default.createElement(u.ConfirmInfoAlertRow,{alertKey:d.RowAlertKey.SigningInWith,label:e("from"),ownerId:t.id,style:{flexDirection:l.FlexDirection.Column}},r.default.createElement(i.Box,{marginTop:1},r.default.createElement(c.ConfirmInfoRowAddress,{address:t.txParams.from,chainId:y}))),r.default.createElement(i.Icon,{name:i.IconName.ArrowRight,size:i.IconSize.Md,color:l.IconColor.iconMuted}),h&&r.default.createElement(u.ConfirmInfoAlertRow,{alertKey:d.RowAlertKey.FirstTimeInteraction,label:e("to"),ownerId:t.id,style:{flexDirection:l.FlexDirection.Column}},r.default.createElement(i.Box,{marginTop:1},r.default.createElement(c.ConfirmInfoRowAddress,{address:h,chainId:y})))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.tsx"}],[6514,{"../../../../../../components/app/confirm/info/row":5416,"../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../helpers/utils/snaps":6292,"../../../../../../hooks/useI18nContext":6334,"../../../../context/confirm":6691,"../../row/typed-sign-data-v1/typedSignDataV1":6535,"../shared/sign-in-with-row/sign-in-with-row":6507,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../components/app/confirm/info/row/alert-row/alert-row"),s=e("../../../../../../components/app/confirm/info/row"),i=e("../../../../../../components/app/confirm/info/row/constants"),l=e("../../../../../../hooks/useI18nContext"),c=e("../../../../context/confirm"),u=e("../../row/typed-sign-data-v1/typedSignDataV1"),d=e("../../../../../../components/app/confirm/info/row/section"),f=e("../../../../../../helpers/utils/snaps"),m=e("../shared/sign-in-with-row/sign-in-with-row");n.default=()=>{var e,t,n,a;const p=(0,l.useI18nContext)(),{currentConfirmation:g}=(0,c.useConfirmContext)();if(null==g||!g.msgParams)return null;const h=(0,f.isSnapId)(null===(e=g.msgParams)||void 0===e?void 0:e.origin)?p("requestFromInfoSnap"):p("requestFromInfo"),y=g.chainId;return o.default.createElement(o.default.Fragment,null,o.default.createElement(d.ConfirmInfoSection,null,o.default.createElement(r.ConfirmInfoAlertRow,{alertKey:i.RowAlertKey.RequestFrom,ownerId:g.id,label:p("requestFrom"),tooltip:h},o.default.createElement(s.ConfirmInfoRowUrl,{url:(null===(t=g.msgParams)||void 0===t?void 0:t.origin)??""})),o.default.createElement(m.SigningInWithRow,null)),o.default.createElement(d.ConfirmInfoSection,null,o.default.createElement(s.ConfirmInfoRow,{label:p("message"),collapsed:!1,copyEnabled:!0,copyText:JSON.stringify((null===(n=g.msgParams)||void 0===n?void 0:n.data)??{})},o.default.createElement(u.ConfirmInfoRowTypedSignDataV1,{data:null===(a=g.msgParams)||void 0===a?void 0:a.data,chainId:y}))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign-v1/typed-sign-v1.tsx"}],[6515,{"../../../../../../../../../shared/constants/transaction":5278,"../../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../../components/component-library":5806,"../../../../../../../../hooks/useI18nContext":6334,"../../../../../../context/confirm":6691,"../../../shared/static-simulation/static-simulation":6508,"../native-value-display/native-value-display":6518,"../value-display/value-display":6522,"@metamask/signature-controller":2322,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getStateChangeToolip=n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("@metamask/signature-controller"),r=e("../../../../../../../../../shared/constants/transaction"),s=e("../../../../../../../../components/app/confirm/info/row"),i=e("../../../../../../../../components/component-library"),l=e("../../../../../../../../hooks/useI18nContext"),c=e("../../../../../../context/confirm"),u=m(e("../../../shared/static-simulation/static-simulation")),d=m(e("../value-display/value-display")),f=m(e("../native-value-display/native-value-display"));function m(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}const g=(e,t,n)=>{if(t.changeType===o.DecodingDataChangeType.Receive){if(null!=e&&e.some((e=>e.changeType===o.DecodingDataChangeType.Listing&&e.assetType===r.TokenStandard.ERC721)))return n("signature_decoding_list_nft_tooltip");if(t.assetType===r.TokenStandard.ERC721&&null!=e&&e.some((e=>e.changeType===o.DecodingDataChangeType.Bidding)))return n("signature_decoding_bid_nft_tooltip")}return undefined};n.getStateChangeToolip=g;const h=(e,t)=>({[o.DecodingDataChangeType.Transfer]:e("permitSimulationChange_transfer"),[o.DecodingDataChangeType.Receive]:e("permitSimulationChange_receive"),[o.DecodingDataChangeType.Approve]:e("permitSimulationChange_approve"),[o.DecodingDataChangeType.Revoke]:e("permitSimulationChange_revoke"),[o.DecodingDataChangeType.Bidding]:e("permitSimulationChange_bidding"),[o.DecodingDataChangeType.Listing]:e("permitSimulationChange_listing")}[t]),y=({stateChangeList:e,stateChange:t,chainId:n})=>{const i=(0,l.useI18nContext)(),{assetType:c,changeType:u,amount:m,contractAddress:p,tokenID:y}=t,v=g(e,t,i);return a.default.createElement(s.ConfirmInfoRow,{label:h(i,u),tooltip:v},(c===r.TokenStandard.ERC20||c===r.TokenStandard.ERC721||c===r.TokenStandard.ERC1155)&&a.default.createElement(d.default,{tokenContract:p,value:m,chainId:n,tokenId:y,credit:u===o.DecodingDataChangeType.Receive,debit:u===o.DecodingDataChangeType.Transfer}),"NATIVE"===c&&a.default.createElement(f.default,{value:m,chainId:n,credit:u===o.DecodingDataChangeType.Receive,debit:u===o.DecodingDataChangeType.Transfer}))};n.default=()=>{const e=(0,l.useI18nContext)(),{currentConfirmation:t}=(0,c.useConfirmContext)(),n=t.chainId,{decodingLoading:o,decodingData:r}=t,s=(0,a.useMemo)((()=>((null==r?void 0:r.stateChanges)??[]).map((e=>a.default.createElement(y,{stateChangeList:(null==r?void 0:r.stateChanges)??[],stateChange:e,chainId:n})))),[null==r?void 0:r.stateChanges]);return a.default.createElement(u.default,{title:e("simulationDetailsTitle"),titleTooltip:e("simulationDetailsTitleTooltip"),simulationElements:s.length?s:a.default.createElement(i.Text,null,e("simulationDetailsUnavailable")),isLoading:o,isCollapsed:o||!s.length})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/decoded-simulation/decoded-simulation.tsx"}],[6516,{"./decoded-simulation":6515},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"DecodedSimulation",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./decoded-simulation"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/decoded-simulation/index.ts"}],[6517,{"./typed-sign-v4-simulation":6521},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"TypedSignV4Simulation",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./typed-sign-v4-simulation"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/index.ts"}],[6518,{"../../../../../../../../../shared/constants/transaction":5278,"../../../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../../../components/component-library":5806,"../../../../../../../../components/ui/tooltip":6197,"../../../../../../../../helpers/constants/design-system":6248,"../../../../../../../../helpers/utils/util":6297,"../../../../../../../../selectors":6985,"../../../../../simulation-details/asset-pill":6612,"../../../../../simulation-details/fiat-display":6615,"../../../../../simulation-details/formatAmount":6616,"../../../utils":6524,"bignumber.js":3465,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=e("bignumber.js"),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),s=e("react-redux"),i=e("../../../../../../../../../shared/constants/transaction"),l=e("../../../../../../../../../shared/lib/transactions-controller-utils"),c=e("../../../../../../../../components/component-library"),u=e("../../../../../../../../helpers/constants/design-system"),d=(a=e("../../../../../../../../components/ui/tooltip"))&&a.__esModule?a:{default:a},f=e("../../../../../../../../helpers/utils/util"),m=e("../../../../../../../../selectors"),p=e("../../../../../simulation-details/asset-pill"),g=e("../../../../../simulation-details/formatAmount"),h=e("../../../../../simulation-details/fiat-display"),y=e("../../../utils");function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}n.default=({chainId:e,value:t,credit:n,debit:a})=>{const v=(0,s.useSelector)((t=>(0,m.selectConversionRateByChainId)(t,e))),{fiatValue:x,tokenValue:b,tokenValueMaxPrecision:k}=(0,r.useMemo)((()=>{if(!t)return{tokenValue:null,tokenValueMaxPrecision:null};const e=(0,l.calcTokenAmount)(t,18);return{fiatValue:v?new o.BigNumber(e).times(String(v)).toNumber():undefined,tokenValue:(0,g.formatAmount)("en-US",e),tokenValueMaxPrecision:(0,g.formatAmountMaxPrecision)("en-US",e)}}),[v,t]),{color:T,backgroundColor:w}=(0,y.getAmountColors)(n,a);return r.default.createElement(c.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},r.default.createElement(c.Box,{display:u.Display.Flex,justifyContent:u.JustifyContent.flexEnd},r.default.createElement(c.Box,{display:u.Display.Inline,marginInlineEnd:1,minWidth:u.BlockSize.Zero},r.default.createElement(d.default,{position:"bottom",title:k,wrapperStyle:{minWidth:0},interactive:!0},r.default.createElement(c.Text,{"data-testid":"simulation-native-value-display",backgroundColor:w,borderRadius:u.BorderRadius.XL,color:T,paddingInline:2,style:{paddingTop:"1px",paddingBottom:"1px"},textAlign:u.TextAlign.Center},n&&"+ ",a&&"- ",null!==b&&(0,f.shortenString)(b||"",{truncatedCharLimit:15,truncatedStartChars:15,truncatedEndChars:0,skipCharacterInEnd:!0})))),r.default.createElement(p.AssetPill,{asset:{chainId:e,standard:i.TokenStandard.none}})),r.default.createElement(c.Box,null,x!==undefined&&r.default.createElement(h.IndividualFiatDisplay,{fiatAmount:x,shorten:!0})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/native-value-display/native-value-display.tsx"}],[6519,{"./permit-simulation":6520},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PermitSimulation",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./permit-simulation"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/permit-simulation/index.ts"}],[6520,{"../../../../../../../../../shared/constants/signatures":5271,"../../../../../../../../../shared/modules/transaction.utils":5326,"../../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../../components/component-library":5806,"../../../../../../../../helpers/constants/design-system":6248,"../../../../../../../../hooks/useI18nContext":6334,"../../../../../../context/confirm":6691,"../../../shared/static-simulation/static-simulation":6508,"../value-display/value-display":6522,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=m(e("react")),o=e("../../../../../../../../../shared/constants/signatures"),r=e("../../../../../../../../../shared/modules/transaction.utils"),s=e("../../../../../../../../components/app/confirm/info/row"),i=e("../../../../../../../../components/component-library"),l=e("../../../../../../../../helpers/constants/design-system"),c=e("../../../../../../../../hooks/useI18nContext"),u=e("../../../../../../context/confirm"),d=m(e("../../../shared/static-simulation/static-simulation")),f=m(e("../value-display/value-display"));function m(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{var e;const t=(0,c.useI18nContext)(),{currentConfirmation:n}=(0,u.useConfirmContext)(),m=null===(e=n.msgParams)||void 0===e?void 0:e.data,p=n.chainId,{domain:{verifyingContract:g},message:h,message:{tokenId:y},primaryType:v}=(0,r.parseTypedDataMessage)(m),x=y!==undefined,b=function(e,t){let n;switch(t){case o.PrimaryType.PermitBatch:case o.PrimaryType.PermitSingle:n=null==e?void 0:e.details;break;case o.PrimaryType.PermitBatchTransferFrom:case o.PrimaryType.PermitTransferFrom:n=null==e?void 0:e.permitted}return n&&!Array.isArray(n)?[n]:n}(h,v),k=({token:e,amount:t,i:n})=>a.default.createElement(f.default,{key:`${e}-${n}`,primaryType:v,tokenContract:e,value:t,chainId:p}),T=a.default.createElement(s.ConfirmInfoRow,{label:t(x?"simulationApproveHeading":"spendingCap")},a.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},Array.isArray(b)?a.default.createElement(i.Box,{display:l.Display.Flex,flexDirection:l.FlexDirection.Column,gap:2},b.map((({token:e,amount:t},n)=>a.default.createElement(k,{token:e,amount:t,i:n})))):a.default.createElement(f.default,{tokenContract:g,value:h.value,tokenId:h.tokenId,chainId:p})));return a.default.createElement(d.default,{title:t("simulationDetailsTitle"),titleTooltip:t("simulationDetailsTitleTooltip"),description:t(x?"simulationDetailsApproveDesc":"permitSimulationDetailInfo"),simulationElements:T})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/permit-simulation/permit-simulation.tsx"}],[6521,{"../../../../../context/confirm":6691,"../../../../../hooks/useDecodedSignatureMetrics":6722,"../../../../../hooks/useTypesSignSimulationEnabledInfo":6745,"../../../../../utils":6756,"./decoded-simulation":6516,"./permit-simulation":6519,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../utils"),s=e("../../../../../context/confirm"),i=e("../../../../../hooks/useDecodedSignatureMetrics"),l=e("../../../../../hooks/useTypesSignSimulationEnabledInfo"),c=e("./decoded-simulation"),u=e("./permit-simulation");n.default=()=>{const{currentConfirmation:e}=(0,s.useConfirmContext)(),t=(0,r.isPermitSignatureRequest)(e),n=(0,l.useTypesSignSimulationEnabledInfo)();if((0,i.useDecodedSignatureMetrics)(!0===n),!n)return null;const{decodingData:a,decodingLoading:d}=e;return(!d&&a===undefined||null!=a&&a.error)&&t?o.default.createElement(u.PermitSimulation,null):o.default.createElement(c.DecodedSimulation,null)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/typed-sign-v4-simulation.tsx"}],[6522,{"../../../../../../../../../shared/constants/metametrics":5260,"../../../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../../../components/app/currency-input/hooks/useTokenExchangeRate":5447,"../../../../../../../../components/app/name/name":5533,"../../../../../../../../components/component-library":5806,"../../../../../../../../components/ui/tooltip":6197,"../../../../../../../../helpers/constants/design-system":6248,"../../../../../../../../helpers/utils/util":6297,"../../../../../../hooks/useGetTokenStandardAndDetails":6728,"../../../../../../hooks/useTrackERC20WithoutDecimalInformation":6739,"../../../../../simulation-details/fiat-display":6615,"../../../../../simulation-details/formatAmount":6616,"../../../utils":6524,"@metamask/name-controller":1955,"@sentry/browser":2871,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("@metamask/name-controller"),r=e("@sentry/browser"),s=e("../../../../../../../../../shared/constants/metametrics"),i=e("../../../../../../../../helpers/utils/util"),l=e("../../../../../../../../../shared/lib/transactions-controller-utils"),c=x(e("../../../../../../../../components/app/currency-input/hooks/useTokenExchangeRate")),u=e("../../../../../simulation-details/fiat-display"),d=e("../../../../../simulation-details/formatAmount"),f=e("../../../../../../hooks/useGetTokenStandardAndDetails"),m=x(e("../../../../../../hooks/useTrackERC20WithoutDecimalInformation")),p=e("../../../../../../../../components/component-library"),g=x(e("../../../../../../../../components/ui/tooltip")),h=e("../../../../../../../../helpers/constants/design-system"),y=x(e("../../../../../../../../components/app/name/name")),v=e("../../../utils");function x(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}n.default=({chainId:e,primaryType:t,tokenContract:n,tokenId:x,value:b,credit:k,debit:T})=>{const w=(0,c.default)(n),C=(0,f.useGetTokenStandardAndDetails)(n);(0,m.default)(e,n,C,s.MetaMetricsEventLocation.SignatureConfirmation);const{decimalsNumber:_}=C,E=(0,a.useMemo)((()=>{if(w&&b&&!x){const e=(0,l.calcTokenAmount)(b,_);return w.times(e).toNumber()}return undefined}),[w,_,b]),{tokenValue:I,tokenValueMaxPrecision:S}=(0,a.useMemo)((()=>{if(!b||x)return{tokenValue:null,tokenValueMaxPrecision:null};const e=(0,l.calcTokenAmount)(b,_);return{tokenValue:(0,d.formatAmount)("en-US",e),tokenValueMaxPrecision:(0,d.formatAmountMaxPrecision)("en-US",e)}}),[_,b]);if(!n)return(0,r.captureException)(new Error(`PermitSimulationValueDisplay: Token contract address is missing where primaryType === ${t}`)),null;const{color:P,backgroundColor:M}=(0,v.getAmountColors)(k,T);return a.default.createElement(p.Box,{marginLeft:"auto",style:{maxWidth:"100%"}},a.default.createElement(p.Box,{display:h.Display.Flex,justifyContent:h.JustifyContent.flexEnd},a.default.createElement(p.Box,{display:h.Display.Inline,marginInlineEnd:1,minWidth:h.BlockSize.Zero},a.default.createElement(g.default,{position:"bottom",title:S,wrapperStyle:{minWidth:0},interactive:!0},a.default.createElement(p.Text,{"data-testid":"simulation-token-value",backgroundColor:M,borderRadius:h.BorderRadius.XL,color:P,paddingInline:2,style:{paddingTop:"1px",paddingBottom:"1px"},textAlign:h.TextAlign.Center},k&&"+ ",T&&"- ",null!==I&&(0,i.shortenString)(I||"",{truncatedCharLimit:15,truncatedStartChars:15,truncatedEndChars:0,skipCharacterInEnd:!0}),x&&`#${x}`))),a.default.createElement(y.default,{value:n,type:o.NameType.ETHEREUM_ADDRESS,variation:e,preferContractSymbol:!0})),a.default.createElement(p.Box,null,E!==undefined&&a.default.createElement(u.IndividualFiatDisplay,{fiatAmount:E,shorten:!0})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/value-display/value-display.tsx"}],[6523,{"../../../../../../../shared/modules/transaction.utils":5326,"../../../../../../components/app/confirm/info/row":5416,"../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../helpers/utils/snaps":6292,"../../../../../../hooks/useI18nContext":6334,"../../../../context/confirm":6691,"../../../../hooks/useGetTokenStandardAndDetails":6728,"../../../../hooks/useTypesSignSimulationEnabledInfo":6745,"../../../../utils":6756,"../../row/typed-sign-data/typedSignData":6536,"../shared/sign-in-with-row/sign-in-with-row":6507,"./typed-sign-v4-simulation":6517,"ethereumjs-util":3796,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("ethereumjs-util"),s=e("../../../../../../components/app/confirm/info/row/alert-row/alert-row"),i=e("../../../../../../../shared/modules/transaction.utils"),l=e("../../../../../../components/app/confirm/info/row/constants"),c=e("../../../../../../components/app/confirm/info/row"),u=e("../../../../../../components/app/confirm/info/row/section"),d=e("../../../../../../hooks/useI18nContext"),f=e("../../../../hooks/useGetTokenStandardAndDetails"),m=e("../../../../utils"),p=e("../../../../context/confirm"),g=e("../../../../hooks/useTypesSignSimulationEnabledInfo"),h=e("../../row/typed-sign-data/typedSignData"),y=e("../../../../../../helpers/utils/snaps"),v=e("../shared/sign-in-with-row/sign-in-with-row"),x=e("./typed-sign-v4-simulation");n.default=()=>{var e;const t=(0,d.useI18nContext)(),{currentConfirmation:n}=(0,p.useConfirmContext)(),a=(0,g.useTypesSignSimulationEnabledInfo)();if(null==n||!n.msgParams)return null;const{domain:{verifyingContract:b},message:{spender:k}}=(0,i.parseTypedDataMessage)(n.msgParams.data),T=(0,m.isPermitSignatureRequest)(n),w=(0,m.isOrderSignatureRequest)(n),C=T||w?b:undefined,{decimalsNumber:_}=(0,f.useGetTokenStandardAndDetails)(C),E=n.chainId,I=(0,y.isSnapId)(n.msgParams.origin)?t("requestFromInfoSnap"):t("requestFromInfo"),S=null===(e=n.msgParams)||void 0===e?void 0:e.data;return o.default.createElement(o.default.Fragment,null,a&&o.default.createElement(x.TypedSignV4Simulation,null),o.default.createElement(u.ConfirmInfoSection,{"data-testid":"confirmation_request-section"},T&&o.default.createElement(o.default.Fragment,null,o.default.createElement(c.ConfirmInfoRow,{label:t("spender")},o.default.createElement(c.ConfirmInfoRowAddress,{address:k,chainId:E})),o.default.createElement(c.ConfirmInfoRowDivider,null)),o.default.createElement(s.ConfirmInfoAlertRow,{alertKey:l.RowAlertKey.RequestFrom,ownerId:n.id,label:t("requestFrom"),tooltip:I},o.default.createElement(c.ConfirmInfoRowUrl,{url:n.msgParams.origin})),(0,r.isValidAddress)(b)&&o.default.createElement(c.ConfirmInfoRow,{label:t("interactingWith")},o.default.createElement(c.ConfirmInfoRowAddress,{address:b,chainId:E})),o.default.createElement(v.SigningInWithRow,null)),o.default.createElement(u.ConfirmInfoSection,{"data-testid":"confirmation_message-section"},o.default.createElement(c.ConfirmInfoRow,{label:t("message"),collapsed:a,copyEnabled:!0,copyText:JSON.stringify((0,i.parseTypedDataMessage)(S??{}))},o.default.createElement(h.ConfirmInfoRowTypedSignData,{data:S,tokenDecimals:_,chainId:E}))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign.tsx"}],[6524,{"../../../../../helpers/constants/design-system":6248,"@metamask/utils":2761,"bn.js":3513},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getAmountColors=void 0,n.getIsRevokeSetApprovalForAll=function(e){var t,n;return"setApprovalForAll"===(null==e||null===(t=e.data)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name)&&!1===(null==e||null===(n=e.data)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.params)||void 0===n||null===(n=n[1])||void 0===n?void 0:n.value)},n.getPercentageChange=i,n.hasValueAndNativeBalanceMismatch=function(e){var t,n;const r=(null==e||null===(t=e.txParams)||void 0===t?void 0:t.value)??"0x0",l=null==e||null===(n=e.simulationData)||void 0===n?void 0:n.nativeBalanceChange,c=(null==l?void 0:l.difference)??"0x0";return!function(e,t,n){const r=new o.BN((0,a.remove0x)(e),"hex");let l=new o.BN((0,a.remove0x)(t),"hex");n&&(l=l.neg());return i(r,l)<=s}(r,c,!1===(null==l?void 0:l.isDecrease))};var a=e("@metamask/utils"),o=e("bn.js"),r=e("../../../../../helpers/constants/design-system");const s=5;function i(e,t){const n=new o.BN(10).pow(new o.BN(18)),a=e.mul(n),r=t.mul(n),s=r.sub(a);return s.isZero()?0:a.isZero()&&!r.isZero()?100:s.muln(100).div(a).abs().toNumber()}n.getAmountColors=(e,t)=>{let n=r.TextColor.textDefault,a=r.BackgroundColor.backgroundAlternative;return e?(n=r.TextColor.successDefault,a=r.BackgroundColor.successMuted):t&&(n=r.TextColor.errorDefault,a=r.BackgroundColor.errorMuted),{color:n,backgroundColor:a}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/utils.ts"}],[6525,{"./ledger-info":6526},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"LedgerInfo",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./ledger-info"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/ledger-info/index.ts"}],[6526,{"../../../../../../app/scripts/lib/util":135,"../../../../../../shared/constants/app":5248,"../../../../../../shared/constants/hardware-wallets":5256,"../../../../../components/component-library":5806,"../../../../../ducks/app/app":6223,"../../../../../ducks/metamask/metamask":6236,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useI18nContext":6334,"../../../hooks/useLedgerConnection":6730,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=p(e("react")),o=e("react-redux"),r=e("../../../../../../app/scripts/lib/util"),s=e("../../../../../../shared/constants/app"),i=e("../../../../../../shared/constants/hardware-wallets"),l=e("../../../../../components/component-library"),c=e("../../../../../ducks/app/app"),u=e("../../../../../ducks/metamask/metamask"),d=e("../../../../../helpers/constants/design-system"),f=e("../../../../../hooks/useI18nContext"),m=p(e("../../../hooks/useLedgerConnection"));function p(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const{isLedgerWallet:e}=(0,m.default)(),t=(0,f.useI18nContext)(),n=(0,o.useDispatch)(),p=(0,o.useSelector)(c.getLedgerWebHidConnectedStatus),g=(0,o.useSelector)(u.getLedgerTransportType),h=(0,o.useSelector)(c.getLedgerTransportStatus),y=(0,r.getEnvironmentType)()===s.ENVIRONMENT_TYPE_FULLSCREEN;if(!e)return null;const v=g===i.LedgerTransportTypes.webhid;return a.default.createElement(l.BannerAlert,{severity:l.BannerAlertSeverity.Info,style:{marginTop:16}},a.default.createElement(l.Text,{variant:d.TextVariant.headingSm,fontWeight:d.FontWeight.Medium},t("ledgerConnectionInstructionHeader")),a.default.createElement("ul",{style:{listStyle:"disc"}},a.default.createElement("li",null,a.default.createElement(l.Text,{variant:d.TextVariant.bodyMd},t("ledgerConnectionInstructionStepThree"))),a.default.createElement("li",null,a.default.createElement(l.Text,{variant:d.TextVariant.bodyMd},t("ledgerConnectionInstructionStepFour")))),h===i.HardwareTransportStates.deviceOpenFailure&&a.default.createElement(l.Button,{variant:l.ButtonVariant.Link,textAlign:d.TextAlign.Left,fontWeight:d.FontWeight.Normal,onClick:async()=>{var e,t;y?window.location.reload():null===(e=(t=global.platform).openExtensionInBrowser)||void 0===e||e.call(t,null,null,!0)}},t("ledgerConnectionInstructionCloseOtherApps")),v&&p===i.WebHIDConnectedStatuses.notConnected&&a.default.createElement(l.Button,{variant:l.ButtonVariant.Link,textAlign:d.TextAlign.Left,fontWeight:d.FontWeight.Normal,onClick:async()=>{if(y){const e=(await window.navigator.hid.requestDevice({filters:[{vendorId:Number(i.LEDGER_USB_VENDOR_ID)}]})).some((e=>e.vendorId===Number(i.LEDGER_USB_VENDOR_ID)));n((0,c.setLedgerWebHidConnectedStatus)(e?i.WebHIDConnectedStatuses.connected:i.WebHIDConnectedStatuses.notConnected))}else{var e,t;null===(e=(t=global.platform).openExtensionInBrowser)||void 0===e||e.call(t,null,null,!0)}}},t(y?"clickToConnectLedgerViaWebHID":"openFullScreenForLedgerWebHid")))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/ledger-info/ledger-info.tsx"}],[6527,{"./nav":6528},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Nav",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./nav"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/nav/index.tsx"}],[6528,{"../../../../../../shared/constants/metametrics":5260,"../../../../../../shared/lib/confirmation.utils":5281,"../../../../../components/component-library":5806,"../../../../../helpers/constants/design-system":6248,"../../../../../helpers/constants/routes":6254,"../../../../../hooks/useI18nContext":6334,"../../../../../selectors":6985,"../../../../../store/actions":7e3,"../../../context/confirm":6691,"../../../hooks/useQueuedConfirmationEvents":6733,"@metamask/rpc-errors":2304,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("@metamask/rpc-errors"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("react-redux"),s=e("react-router-dom"),i=e("../../../../../../shared/constants/metametrics"),l=e("../../../../../components/component-library"),c=e("../../../../../helpers/constants/design-system"),u=e("../../../../../helpers/constants/routes"),d=e("../../../../../hooks/useI18nContext"),f=e("../../../../../selectors"),m=e("../../../../../store/actions"),p=e("../../../context/confirm"),g=e("../../../hooks/useQueuedConfirmationEvents"),h=e("../../../../../../shared/lib/confirmation.utils");function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,s.useHistory)(),t=(0,d.useI18nContext)(),n=(0,r.useDispatch)(),{currentConfirmation:y}=(0,p.useConfirmContext)(),v=(0,r.useSelector)(f.pendingConfirmationsSortedSelector),x=(0,o.useMemo)((()=>(null==v?void 0:v.length)<=0||!y?0:v.findIndex((({id:e})=>e===y.id))),[y,v]),b=(0,o.useCallback)((t=>{const n=v[x+t];e.replace(`${u.CONFIRM_TRANSACTION_ROUTE}/${n.id}${(0,h.isCorrectSignatureApprovalType)(n.type)?u.SIGNATURE_REQUEST_PATH:""}`)}),[x,v]),k=(0,o.useCallback)((()=>{v.forEach((e=>{n((0,m.rejectPendingApproval)(e.id,(0,a.serializeError)(a.providerErrors.userRejectedRequest())))}))}),[v]);return(0,g.useQueuedConfirmationsEvent)(i.QueueType.NavigationHeader),v.length<=1?null:o.default.createElement(l.Box,{alignItems:c.AlignItems.center,backgroundColor:c.BackgroundColor.backgroundDefault,display:c.Display.Flex,flexDirection:c.FlexDirection.Row,justifyContent:c.JustifyContent.spaceBetween,padding:3,style:{zIndex:2}},o.default.createElement(l.Box,{alignItems:c.AlignItems.center,display:c.Display.Flex},o.default.createElement(l.ButtonIcon,{ariaLabel:"Previous Confirmation","data-testid":"confirm-nav__previous-confirmation",backgroundColor:c.BackgroundColor.backgroundAlternative,borderRadius:c.BorderRadius.full,className:"confirm_nav__left_btn",color:c.IconColor.iconAlternative,disabled:0===x,iconName:l.IconName.ArrowLeft,onClick:()=>b(-1),size:l.ButtonIconSize.Sm}),o.default.createElement(l.Text,{color:c.TextColor.textAlternative,marginInline:2,variant:c.TextVariant.bodySm},x+1," of ",v.length),o.default.createElement(l.ButtonIcon,{ariaLabel:"Next Confirmation","data-testid":"confirm-nav__next-confirmation",backgroundColor:c.BackgroundColor.backgroundAlternative,borderRadius:c.BorderRadius.full,className:"confirm_nav__right_btn",color:c.IconColor.iconAlternative,disabled:x===v.length-1,iconName:l.IconName.ArrowRight,onClick:()=>b(1),size:l.ButtonIconSize.Sm})),o.default.createElement(l.Button,{borderRadius:c.BorderRadius.XL,className:"confirm_nav__reject_all","data-testid":"confirm-nav__reject-all",fontWeight:c.FontWeight.Normal,onClick:k,paddingLeft:3,paddingRight:3,startIconName:l.IconName.Close,type:l.ButtonVariant.Secondary},t("rejectAll")))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/nav/nav.tsx"}],[6529,{"./network-change-toast":6531,"./network-change-toast-legacy":6530},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"NetworkChangeToast",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"NetworkChangeToastLegacy",{enumerable:!0,get:function(){return o.default}});var a=r(e("./network-change-toast")),o=r(e("./network-change-toast-legacy"));function r(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/network-change-toast/index.tsx"}],[6530,{"../../../../../components/component-library":5806,"../../../../../components/multichain":5964,"../../../../../hooks/useI18nContext":6334,"../../../../../selectors":6985,"../../../../../store/actions":7e3,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../../components/component-library"),s=e("../../../../../components/multichain"),i=e("../../../../../store/actions"),l=e("../../../../../hooks/useI18nContext"),c=e("../../../../../selectors");function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}n.default=({confirmation:e})=>{const t=null==e?void 0:e.chainId,[n,u]=(0,a.useState)(!1),d=(0,l.useI18nContext)(),f=(0,o.useSelector)((e=>(0,c.selectNetworkConfigurationByChainId)(e,t))),m=(0,a.useCallback)((()=>{u(!1)}),[u]);return(0,a.useEffect)((()=>{let n=!0;return e?((async()=>{const a=await(0,i.getLastInteractedConfirmationInfo)(),o=(new Date).getTime();a&&a.chainId!==t&&o-a.timestamp<=6e4&&n&&(u(!0),setTimeout((()=>{n&&m()}),5e3)),a&&(null==a?void 0:a.id)===e.id||!n||(0,i.setLastInteractedConfirmationInfo)({id:e.id,chainId:t,timestamp:(new Date).getTime()})})(),()=>{n=!1}):undefined}),[null==e?void 0:e.id]),n?a.default.createElement(r.Box,{className:"toast_wrapper"},a.default.createElement(s.Toast,{onClose:m,text:d("networkSwitchMessage",[f.name??""]),startAdornment:null})):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/network-change-toast/network-change-toast-legacy.tsx"}],[6531,{"../../../hooks/useCurrentConfirmation":6720,"./network-change-toast-legacy":6530,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=s(e("react")),o=s(e("../../../hooks/useCurrentConfirmation")),r=s(e("./network-change-toast-legacy"));function s(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const{currentConfirmation:e}=(0,o.default)();return a.default.createElement(r.default,{confirmation:e})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/network-change-toast/network-change-toast.tsx"}],[6532,{"./pluggable-section":6533},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PluggableSection",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./pluggable-section"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/pluggable-section/index.ts"}],[6533,{"../../../context/confirm":6691,"../snaps/snaps-section":6539,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../context/confirm");const s=[e("../snaps/snaps-section").SnapsSection];n.default=()=>{const{currentConfirmation:e}=(0,r.useConfirmContext)();return o.default.createElement(o.default.Fragment,null,s.map(((t,n)=>o.default.createElement(t,{key:`section-${n}`,confirmation:e}))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/pluggable-section/pluggable-section.tsx"}],[6534,{"../../../../../../shared/constants/signatures":5271,"../../../../../../shared/modules/hexstring-utils":5307,"../../../../../components/app/confirm/info/row":5416,"../../../../../components/component-library":5806,"../../../../../helpers/constants/design-system":6248,"../../../../../helpers/utils/util":6297,"../../../../../hooks/useI18nContext":6334,"../../../hooks/useGetTokenStandardAndDetails":6728,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.DataTree=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("../../../../../../shared/constants/signatures"),r=e("../../../../../../shared/modules/hexstring-utils"),s=e("../../../../../helpers/utils/util"),i=e("../../../../../components/component-library"),l=e("../../../../../helpers/constants/design-system"),c=e("../../../../../hooks/useI18nContext"),u=e("../../../../../components/app/confirm/info/row"),d=e("../../../hooks/useGetTokenStandardAndDetails");function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}var m=function(e){return e.Amount="amount",e.BuyAmount="buyAmount",e.Deadline="deadline",e.EndAmount="endAmount",e.EndTime="endTime",e.Expiration="expiration",e.Expiry="expiry",e.SellAmount="sellAmount",e.SigDeadline="sigDeadline",e.StartAmount="startAmount",e.StartTime="startTime",e.ValidTo="validTo",e.Value="value",e}(m||{});const p={[m.Amount]:[...o.PRIMARY_TYPES_PERMIT],[m.BuyAmount]:[...o.PRIMARY_TYPES_ORDER],[m.EndAmount]:[...o.PRIMARY_TYPES_ORDER],[m.SellAmount]:[...o.PRIMARY_TYPES_ORDER],[m.StartAmount]:[...o.PRIMARY_TYPES_ORDER],[m.Value]:[...o.PRIMARY_TYPES_PERMIT]},g={[m.Deadline]:[...o.PRIMARY_TYPES_PERMIT],[m.EndTime]:[...o.PRIMARY_TYPES_ORDER],[m.Expiration]:[o.PrimaryType.PermitBatch,o.PrimaryType.PermitSingle],[m.Expiry]:[...o.PRIMARY_TYPES_PERMIT],[m.SigDeadline]:[...o.PRIMARY_TYPES_PERMIT],[m.StartTime]:[...o.PRIMARY_TYPES_ORDER],[m.ValidTo]:[...o.PRIMARY_TYPES_ORDER]},h=({data:e,primaryType:t,tokenDecimals:n,chainId:o})=>{const c=(e=>{var t;if(Array.isArray(e))return undefined;const n=null===(t=e.token)||void 0===t?void 0:t.value;return n&&(0,r.isValidHexAddress)(n)?n:undefined})(e),{decimalsNumber:f}=(0,d.useGetTokenStandardAndDetails)(c),m="number"==typeof f?f:n;return a.default.createElement(i.Box,{width:l.BlockSize.Full},Object.entries(e).map((([e,{value:n,type:r}],i)=>a.default.createElement(u.ConfirmInfoRow,{label:`${(0,s.sanitizeString)(e.charAt(0).toUpperCase()+e.slice(1))}:`,style:{paddingRight:0},key:`tree-data-${e}-index-${i}`,"data-testid":`confirmation_data-${e}-index-${i}`},a.default.createElement(y,{label:e,primaryType:t,value:n,type:r,tokenDecimals:m,chainId:o})))))};n.DataTree=h;const y=(0,a.memo)((({label:e,primaryType:t,type:n,value:o,tokenDecimals:i,chainId:l})=>{const d=(0,c.useI18nContext)();if("object"==typeof o&&null!==o)return a.default.createElement(h,{data:o,primaryType:t,tokenDecimals:i,chainId:l});if(function(e,t){var n;return null===(n=g[e]||[])||void 0===n?void 0:n.includes(t||"")}(e,t)&&Boolean(o)){return-1===parseInt(o,10)?a.default.createElement(u.ConfirmInfoRowText,{text:d("none")}):a.default.createElement(u.ConfirmInfoRowDate,{unixTimestamp:parseInt(o,10)})}return function(e,t){var n;return null===(n=p[e]||[])||void 0===n?void 0:n.includes(t||"")}(e,t)?a.default.createElement(u.ConfirmInfoRowTextTokenUnits,{value:o,decimals:i}):"address"===n&&(0,r.isValidHexAddress)(o,{mixedCaseUseChecksum:!0})?a.default.createElement(u.ConfirmInfoRowAddress,{address:o,chainId:l}):a.default.createElement(u.ConfirmInfoRowText,{text:(0,s.sanitizeString)(o)})}))}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/row/dataTree.tsx"}],[6535,{"../../../../../../components/component-library":5806,"../../../../../../helpers/constants/design-system":6248,"../dataTree":6534,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConfirmInfoRowTypedSignDataV1=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../components/component-library"),s=e("../../../../../../helpers/constants/design-system"),i=e("../dataTree");n.ConfirmInfoRowTypedSignDataV1=({data:e,chainId:t})=>{if(!e)return null;const n=e.reduce(((e,{name:t,value:n,type:a})=>({...e,[t]:{type:a,value:n}})),{});return o.default.createElement(r.Box,{width:s.BlockSize.Full},o.default.createElement(r.Box,{style:{marginLeft:-8}},o.default.createElement(i.DataTree,{data:n,chainId:t})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/row/typed-sign-data-v1/typedSignDataV1.tsx"}],[6536,{"../../../../../../components/app/confirm/info/row":5416,"../../../../../../components/component-library":5806,"../../../../../../helpers/constants/design-system":6248,"../../../../../../hooks/useI18nContext":6334,"../../../../utils":6756,"../dataTree":6534,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConfirmInfoRowTypedSignData=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../hooks/useI18nContext"),s=e("../../../../../../components/component-library"),i=e("../../../../../../helpers/constants/design-system"),l=e("../../../../../../components/app/confirm/info/row"),c=e("../../../../utils"),u=e("../dataTree");n.ConfirmInfoRowTypedSignData=({data:e,tokenDecimals:t,chainId:n})=>{const a=(0,r.useI18nContext)();if(!e)return null;const{sanitizedMessage:d,primaryType:f}=(0,c.parseSanitizeTypedDataMessage)(e);return o.default.createElement(s.Box,{width:i.BlockSize.Full},o.default.createElement(l.ConfirmInfoRow,{label:`${a("primaryType")}:`,style:{paddingLeft:0,paddingRight:0}},o.default.createElement(l.ConfirmInfoRowText,{text:f})),o.default.createElement(s.Box,{style:{marginLeft:-8}},o.default.createElement(u.DataTree,{data:d.value,primaryType:f,tokenDecimals:t,chainId:n})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/row/typed-sign-data/typedSignData.tsx"}],[6537,{"./scroll-to-bottom":6538},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./scroll-to-bottom"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/scroll-to-bottom/index.ts"}],[6538,{"../../../../../../shared/lib/confirmation.utils":5281,"../../../../../components/component-library":5806,"../../../../../contexts/i18n":6211,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/usePrevious":6348,"../../../../../hooks/useScrollRequired":6349,"../../../context/confirm":6691,"../../../selectors/preferences":6748,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../../components/component-library"),s=e("../../../../../contexts/i18n"),i=e("../../../../../helpers/constants/design-system"),l=e("../../../../../hooks/usePrevious"),c=e("../../../../../hooks/useScrollRequired"),u=e("../../../context/confirm"),d=e("../../../selectors/preferences"),f=e("../../../../../../shared/lib/confirmation.utils");function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}n.default=({children:e})=>{const t=(0,a.useContext)(s.I18nContext),{currentConfirmation:n,setIsScrollToBottomCompleted:m}=(0,u.useConfirmContext)(),p=(0,l.usePrevious)(null==n?void 0:n.id),g=(0,o.useSelector)(d.selectConfirmationAdvancedDetailsOpen),{hasScrolledToBottom:h,isScrollable:y,isScrolledToBottom:v,onScroll:x,scrollToBottom:b,setHasScrolledToBottom:k,ref:T}=(0,c.useScrollRequired)([null==n?void 0:n.id,g],{offsetPxFromBottom:0}),w=(0,f.isCorrectDeveloperTransactionType)(null==n?void 0:n.type),C=y&&!v&&!w;return(0,a.useEffect)((()=>{if(p===(null==n?void 0:n.id))return;const e=null==T?void 0:T.current;e&&("function"==typeof e.scrollTo&&e.scrollTo(0,0),k(!1))}),[null==n?void 0:n.id,p,null==T?void 0:T.current]),(0,a.useEffect)((()=>{m(!!w||(!y||h))}),[y,h,w]),a.default.createElement(r.Box,{backgroundColor:i.BackgroundColor.backgroundAlternative,width:i.BlockSize.Full,height:i.BlockSize.Full,style:{minHeight:"0",overflow:"hidden",position:"relative"}},a.default.createElement(r.Box,{display:i.Display.Flex,flexDirection:i.FlexDirection.Column,width:i.BlockSize.Full,height:i.BlockSize.Full,paddingLeft:4,paddingRight:4,onScroll:x,ref:T,style:{overflow:"auto"}},e,C&&a.default.createElement(r.ButtonIcon,{className:"confirm-scroll-to-bottom__button",onClick:b,iconName:r.IconName.Arrow2Down,ariaLabel:t("scrollDown"),backgroundColor:i.BackgroundColor.backgroundDefault,borderRadius:i.BorderRadius.full,color:i.IconColor.primaryDefault,display:i.Display.Flex,size:r.ButtonIconSize.Md})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/scroll-to-bottom/scroll-to-bottom.tsx"}],[6539,{"./snaps-section":6541},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var a=e("./snaps-section");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===a[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return a[e]}}))}))}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/snaps/snaps-section/index.ts"}],[6540,{"../../../../../../components/app/snaps/snap-ui-renderer":5675,"../../../../../../components/component-library":5806,"../../../../../../components/ui/delineator":6099,"../../../../../../components/ui/tooltip":6197,"../../../../../../helpers/constants/design-system":6248,"../../../../../../hooks/useI18nContext":6334,"../../../../../../selectors":6985,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SnapInsight=void 0;var a=f(e("react")),o=e("react-redux"),r=e("../../../../../../components/app/snaps/snap-ui-renderer"),s=e("../../../../../../components/ui/delineator"),i=e("../../../../../../components/component-library"),l=e("../../../../../../helpers/constants/design-system"),c=e("../../../../../../hooks/useI18nContext"),u=e("../../../../../../selectors"),d=f(e("../../../../../../components/ui/tooltip"));function f(e){return e&&e.__esModule?e:{default:e}}n.SnapInsight=({snapId:e,interfaceId:t,loading:n,isExpanded:f})=>{const m=(0,c.useI18nContext)(),{name:p}=(0,o.useSelector)((t=>(0,u.getSnapMetadata)(t,e))),g=a.default.createElement(i.Text,null,m("insightsFromSnap",[a.default.createElement(i.Text,{fontWeight:l.FontWeight.Medium,variant:l.TextVariant.inherit,color:l.TextColor.inherit},p)]));return!n&&!t?a.default.createElement(d.default,{position:"top",title:m("snapsNoInsight")},a.default.createElement(s.Delineator,{headerComponent:g,isDisabled:!0})):a.default.createElement(s.Delineator,{headerComponent:g,isLoading:n,isExpanded:f,contentBoxProps:n?undefined:{paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0}},a.default.createElement(r.SnapUIRenderer,{snapId:e,interfaceId:t,isLoading:n,useDelineator:!1}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/snaps/snaps-section/snap-insight.tsx"}],[6541,{"../../../../../../components/component-library":5806,"../../../../../../helpers/constants/design-system":6248,"../../../../../../hooks/snaps/useInsightSnaps":6313,"../../../../context/confirm":6691,"./snap-insight":6540,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SnapsSection=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../hooks/snaps/useInsightSnaps"),s=e("../../../../../../components/component-library"),i=e("../../../../../../helpers/constants/design-system"),l=e("../../../../context/confirm"),c=e("./snap-insight");n.SnapsSection=()=>{const{currentConfirmation:e}=(0,l.useConfirmContext)(),{data:t}=(0,r.useInsightSnaps)(null==e?void 0:e.id);return 0===t.length?null:o.default.createElement(s.Box,{display:i.Display.Flex,flexDirection:i.FlexDirection.Column,gap:4,marginBottom:4},t.map((({snapId:e,interfaceId:t,loading:n},a)=>o.default.createElement(c.SnapInsight,{key:e,snapId:e,interfaceId:t,loading:n,isExpanded:0===a}))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/snaps/snaps-section/snaps-section.tsx"}],[6542,{"../../../../hooks/useAssetDetails":6713,"../../info/approve/hooks/use-approve-token-simulation":6472,"@metamask/transaction-controller":2698},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useCurrentSpendingCap=function(e){const t=s(e)&&[a.TransactionType.tokenMethodApprove,a.TransactionType.tokenMethodIncreaseAllowance].includes(e.type),n=t?e.txParams.to:null,i=t?e.txParams.from:null,l=t?e.txParams.data:null,c=t?e.chainId:null,{decimals:u}=(0,o.useAssetDetails)(n,i,l,c),{spendingCap:d,pending:f}=(0,r.useApproveTokenSimulation)(e,u||"0");let m="";t&&(m=d);return{customSpendingCap:m,pending:f}};var a=e("@metamask/transaction-controller"),o=e("../../../../hooks/useAssetDetails"),r=e("../../info/approve/hooks/use-approve-token-simulation");const s=e=>e!==undefined&&e.txParams!==undefined}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/title/hooks/useCurrentSpendingCap.ts"}],[6543,{"./title":6544},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Title",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./title"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/title/index.ts"}],[6544,{"../../../../../../shared/constants/transaction":5278,"../../../../../components/app/alert-system/general-alert/general-alert":5353,"../../../../../components/component-library":5806,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useAlerts":6321,"../../../../../hooks/useI18nContext":6334,"../../../constants":6690,"../../../context/confirm":6691,"../../../hooks/useTypedSignSignatureInfo":6744,"../../../utils":6756,"../info/approve/hooks/use-is-nft":6473,"../info/hooks/useDecodedTransactionData":6479,"../info/utils":6524,"./hooks/useCurrentSpendingCap":6542,"@metamask/transaction-controller":2698,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("@metamask/transaction-controller"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("../../../../../../shared/constants/transaction"),s=x(e("../../../../../components/app/alert-system/general-alert/general-alert")),i=e("../../../../../components/component-library"),l=e("../../../../../helpers/constants/design-system"),c=x(e("../../../../../hooks/useAlerts")),u=e("../../../../../hooks/useI18nContext"),d=e("../../../constants"),f=e("../../../context/confirm"),m=e("../../../utils"),p=e("../../../hooks/useTypedSignSignatureInfo"),g=e("../info/approve/hooks/use-is-nft"),h=e("../info/hooks/useDecodedTransactionData"),y=e("../info/utils"),v=e("./hooks/useCurrentSpendingCap");function x(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function k({ownerId:e}){const{generalAlerts:t}=(0,c.default)(e);return 0===t.length?null:o.default.createElement(i.Box,{marginTop:3},t.map((e=>o.default.createElement(i.Box,{marginTop:1,key:e.key},o.default.createElement(s.default,{"data-testid":"confirm-banner-alert",title:e.reason,description:e.message,severity:e.severity,provider:e.provider,details:e.alertDetails,reportUrl:e.reportUrl})))))}const T=(0,o.memo)((()=>{const e=(0,u.useI18nContext)(),{currentConfirmation:t}=(0,f.useConfirmContext)(),{isNFT:n}=(0,g.useIsNFT)(t),{primaryType:s,tokenStandard:c}=(0,p.useTypedSignSignatureInfo)(t),{customSpendingCap:x,pending:b}=(0,v.useCurrentSpendingCap)(t);let T=!1,w=!1;const C=(0,h.useDecodedTransactionData)(a.TransactionType.tokenMethodSetApprovalForAll);(null==t?void 0:t.type)===a.TransactionType.tokenMethodSetApprovalForAll&&(T=(0,y.getIsRevokeSetApprovalForAll)(C.value),w=C.pending);const _=(0,o.useMemo)((()=>((e,t,n,o,s,i,l,c)=>{if(i)return"";switch(null==t?void 0:t.type){case a.TransactionType.contractInteraction:return e("confirmTitleTransaction");case a.TransactionType.deployContract:return e("confirmTitleDeployContract");case a.TransactionType.personalSign:return(0,m.isSIWESignatureRequest)(t)?e("confirmTitleSIWESignature"):e("confirmTitleSignature");case a.TransactionType.signTypedData:return l===d.TypedSignSignaturePrimaryTypes.PERMIT?c===r.TokenStandard.ERC721?e("setApprovalForAllRedesignedTitle"):e("confirmTitlePermitTokens"):e("confirmTitleSignature");case a.TransactionType.tokenMethodApprove:return e(n?"confirmTitleApproveTransaction":"0"===o?"confirmTitleRevokeApproveTransaction":"confirmTitlePermitTokens");case a.TransactionType.tokenMethodIncreaseAllowance:return e("confirmTitlePermitTokens");case a.TransactionType.tokenMethodSetApprovalForAll:return e(s?"confirmTitleSetApprovalForAllRevokeTransaction":"setApprovalForAllRedesignedTitle");default:return""}})(e,t,n,x,T,b||w,s,c)),[t,n,x,T,b,w,s,c]),E=(0,o.useMemo)((()=>((e,t,n,o,s,i,l,c)=>{if(i)return"";switch(null==t?void 0:t.type){case a.TransactionType.contractInteraction:return"";case a.TransactionType.deployContract:return e("confirmTitleDescDeployContract");case a.TransactionType.personalSign:return(0,m.isSIWESignatureRequest)(t)?e("confirmTitleDescSIWESignature"):e("confirmTitleDescSign");case a.TransactionType.signTypedData:return l===d.TypedSignSignaturePrimaryTypes.PERMIT?c===r.TokenStandard.ERC721?e("confirmTitleDescApproveTransaction"):e("confirmTitleDescPermitSignature"):e("confirmTitleDescSign");case a.TransactionType.tokenMethodApprove:return n?e("confirmTitleDescApproveTransaction"):"0"===o?"":e("confirmTitleDescERC20ApproveTransaction");case a.TransactionType.tokenMethodIncreaseAllowance:return e("confirmTitleDescPermitSignature");case a.TransactionType.tokenMethodSetApprovalForAll:return s?"":e("confirmTitleDescApproveTransaction");default:return""}})(e,t,n,x,T,b||w,s,c)),[t,n,x,T,b,w,s,c]);return t?o.default.createElement(o.default.Fragment,null,o.default.createElement(k,{ownerId:t.id}),""!==_&&o.default.createElement(i.Text,{variant:l.TextVariant.headingLg,paddingTop:4,paddingBottom:4,textAlign:l.TextAlign.Center},_),""!==E&&o.default.createElement(i.Text,{paddingBottom:4,color:l.TextColor.textAlternative,textAlign:l.TextAlign.Center},E)):null}));n.default=T}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/title/title.tsx"}],[6545,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getConfirmationSender=n.formatNumber=void 0;n.getConfirmationSender=e=>{const t=null==e?void 0:e.msgParams,n=null==e?void 0:e.txParams;let a;return t&&(a=t.from),n&&(a=n.from),{from:a}};n.formatNumber=(e,t)=>{if(e===undefined)return e;return new Intl.NumberFormat("en-US",{minimumFractionDigits:t,maximumFractionDigits:t}).format(e)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/utils.ts"}],[6546,{"../../../../components/component-library":5806,"../../../../components/component-library/modal-content/deprecated":5816,"../../../../components/component-library/modal-header/deprecated":5825,"../../../../helpers/constants/design-system":6248,"../../../../hooks/useI18nContext":6334,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=u(e("react")),o=u(e("prop-types")),r=e("../../../../hooks/useI18nContext"),s=e("../../../../helpers/constants/design-system"),i=e("../../../../components/component-library"),l=e("../../../../components/component-library/modal-content/deprecated"),c=e("../../../../components/component-library/modal-header/deprecated");function u(e){return e&&e.__esModule?e:{default:e}}const d=({onSubmit:e,onCancel:t})=>{const n=(0,r.useI18nContext)();return a.default.createElement(i.Modal,{isOpen:!0,onClose:t,className:"confirmation-warning-modal__content"},a.default.createElement(i.ModalOverlay,null),a.default.createElement(l.ModalContent,null,a.default.createElement(c.ModalHeader,{childrenWrapperProps:{display:s.Display.Flex,flexDirection:s.FlexDirection.Column,alignItems:s.AlignItems.center,gap:4}},a.default.createElement(i.Icon,{name:i.IconName.Danger,color:s.IconColor.errorDefault,size:i.IconSize.Xl}),a.default.createElement(i.Text,{variant:s.TextVariant.headingSm,as:"h4",fontWeight:s.FontWeight.Bold,textAlign:s.TextAlign.Center},n("addEthereumChainWarningModalTitle"))),a.default.createElement(i.Box,{marginBottom:4},a.default.createElement(i.Text,{marginTop:4,variant:s.TextVariant.bodySm},n("addEthereumChainWarningModalHeader",[a.default.createElement("strong",{key:"part-2"},n("addEthereumChainWarningModalHeaderPartTwo"))])),a.default.createElement(i.Text,{marginTop:4,variant:s.TextVariant.bodySm},n("addEthereumChainWarningModalListHeader")),a.default.createElement("ul",null,a.default.createElement(i.Text,{as:"li",marginTop:2,variant:s.TextVariant.bodySm},n("addEthereumChainWarningModalListPointOne")),a.default.createElement(i.Text,{as:"li",marginTop:2,variant:s.TextVariant.bodySm},n("addEthereumChainWarningModalListPointTwo")),a.default.createElement(i.Text,{as:"li",marginTop:2,variant:s.TextVariant.bodySm},n("addEthereumChainWarningModalListPointThree")))),a.default.createElement(i.Box,{display:s.Display.Flex,gap:4},a.default.createElement(i.Button,{variant:i.BUTTON_VARIANT.SECONDARY,onClick:t,block:!0,size:i.BUTTON_SIZES.LG},n("reject")),a.default.createElement(i.Button,{variant:i.BUTTON_VARIANT.PRIMARY,onClick:e,danger:!0,block:!0,size:i.BUTTON_SIZES.LG},n("approveButtonText")))))};d.propTypes={onSubmit:o.default.func,onCancel:o.default.func};n.default=d}}},{package:"$root$",file:"ui/pages/confirmations/components/confirmation-warning-modal/confirmation-warning-modal.js"}],[6547,{"./confirmation-warning-modal":6546},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirmation-warning-modal"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirmation-warning-modal/index.js"}]],[],{}); \ No newline at end of file +LavaPack.loadBundle([[6369,{"../app/scripts/constants/sentry-state":7,"../app/scripts/lib/util":135,"../shared/constants/alerts":5246,"../shared/constants/app":5248,"../shared/constants/copy":5251,"../shared/lib/error-utils":5282,"../shared/lib/switch-direction":5289,"../shared/lib/trace":5291,"../shared/modules/object.utils":5312,"../shared/modules/selectors/networks":5320,"./ducks/alerts":6220,"./ducks/metamask/metamask":6236,"./helpers/utils/tags":6293,"./helpers/utils/tx-helper":6296,"./pages":6774,"./selectors":6985,"./store/actions":7e3,"./store/background-connection":7001,"./store/store":7002,"copy-to-clipboard":3622,lodash:4380,loglevel:4386,react:4776,"react-dom":4604,util:5174,"webextension-polyfill":5225},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=async function(e){const{backgroundConnection:t,traceContext:n}=e,o=await(0,v.trace)({name:v.TraceName.GetState,parentContext:n},(()=>(0,a.promisify)(t.getState.bind(t))())),r=await async function(e,t,n){console.log("ui/index.js metamask startApp is called");const{traceContext:a}=n,o=(0,S.getStartupTraceTags)({metamask:e}),r=await(0,v.trace)({name:v.TraceName.SetupStore,parentContext:a,tags:o},(()=>O(e,t,n.activeTab)));return global.metamask={updateCurrentLocale:e=>{r.dispatch(b.updateCurrentLocale(e))},setFeatureFlag:(e,t)=>{r.dispatch(b.setFeatureFlag(e,t))}},await(0,v.trace)({name:v.TraceName.InitialActions,parentContext:a},(()=>async function(e){const t=e.getState(),n=(0,T.getNetworkToAutomaticallySwitchTo)(t);n?await e.dispatch(b.automaticallySwitchNetwork(n,(0,T.getOriginOfCurrentTab)(t))):(0,T.getSwitchedNetworkDetails)(t)&&await e.dispatch(b.clearSwitchedNetworkDetails());if((0,T.getUseRequestQueue)(t)&&(0,u.getEnvironmentType)()===p.ENVIRONMENT_TYPE_POPUP){const t=Date.now();global.metamask.id=t,await e.dispatch(b.setCurrentExtensionPopupId(t))}}(r))),(0,v.trace)({name:v.TraceName.FirstRender,parentContext:a},(()=>(0,l.render)(i.default.createElement(_.default,{store:r}),n.container))),r}(o,t,e);return await(0,a.promisify)(t.startPatches.bind(t))(),function(e){0;window.stateHooks.getCleanAppState=async function(){const t=(0,s.clone)(e.getState());return t.version=global.platform.getVersion(),t.browser=window.navigator.userAgent,t},window.stateHooks.getSentryAppState=function(){const t=e.getState();return(0,f.maskObject)(t,m.SENTRY_UI_STATE)},window.stateHooks.getLogs=function(){const t=e.getState(),{logs:n}=t.metamask;return Object.values(n).sort(((e,t)=>e.timestamp-t.timestamp))}}(r),r},n.setupInitialStore=O,n.updateBackgroundConnection=void 0;var a=e("util"),o=M(e("copy-to-clipboard")),r=M(e("loglevel")),s=e("lodash"),i=M(e("react")),l=e("react-dom"),c=M(e("webextension-polyfill")),u=e("../app/scripts/lib/util"),d=e("../shared/constants/alerts"),f=e("../shared/modules/object.utils"),m=e("../app/scripts/constants/sentry-state"),p=e("../shared/constants/app"),g=e("../shared/constants/copy"),h=M(e("../shared/lib/switch-direction")),y=e("../shared/lib/error-utils"),v=e("../shared/lib/trace"),x=e("../shared/modules/selectors/networks"),b=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=P(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("./store/actions")),k=M(e("./store/store")),T=e("./selectors"),w=e("./ducks/alerts"),C=e("./ducks/metamask/metamask"),_=M(e("./pages")),E=M(e("./helpers/utils/tx-helper")),I=e("./store/background-connection"),S=e("./helpers/utils/tags");function P(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(P=function(e){return e?n:t})(e)}function M(e){return e&&e.__esModule?e:{default:e}}let D;r.default.setLevel(global.METAMASK_DEBUG?"debug":"warn",!1);const A=e=>{(0,I.setBackgroundConnection)(e),e.onNotification((e=>{if("sendUpdate"!==e.method)throw new Error(`Internal JSON-RPC Notification Not Handled:\n\n ${JSON.stringify(e)}`);D.dispatch(b.updateMetamaskState(e.params[0]))}))};async function O(e,t,n){e.featureFlags||(e.featureFlags={});const{currentLocaleMessages:a,enLocaleMessages:o}=await(0,y.setupLocale)(e.currentLocale);"rtl"===e.textDirection&&(0,h.default)("rtl");const r={activeTab:n,metamask:e,appState:{},localeMessages:{currentLocale:e.currentLocale,current:a,en:o}};if(A(t),(0,u.getEnvironmentType)()===p.ENVIRONMENT_TYPE_POPUP){var s;const{origin:e}=r.activeTab,t=(0,T.getPermittedAccountsForCurrentTab)(r),n=(null===(s=(0,T.getSelectedInternalAccount)(r))||void 0===s?void 0:s.address)??"",a=(0,C.getUnconnectedAccountAlertShown)(r),o=(0,C.getUnconnectedAccountAlertEnabledness)(r);e&&o&&!a[e]&&t.length>0&&!t.includes(n)&&(r[d.AlertTypes.unconnectedAccount]={state:w.ALERT_STATE.OPEN},b.setUnconnectedAccountAlertShown(e))}const i=(0,k.default)(r);D=i;const l=(0,T.getUnapprovedTransactions)(e),c=(0,E.default)(l,e.unapprovedPersonalMsgs,e.unapprovedDecryptMsgs,e.unapprovedEncryptionPublicKeyMsgs,e.unapprovedTypedMessages,e.networkId,(0,x.getCurrentChainId)({metamask:e}));return c.length>0&&i.dispatch(b.showConfTxPage({id:c[0].id})),i}n.updateBackgroundConnection=A,window.logStateString=async function(e){const t=await window.stateHooks.getCleanAppState(),n=window.stateHooks.getLogs();c.default.runtime.getPlatformInfo().then((a=>{t.platform=a,t.logs=n;const o=JSON.stringify(t,null,2);e(null,o)})).catch((t=>{e(t)}))},window.logState=function(e){return window.logStateString(((t,n)=>{t?console.error(t.message):e?((0,o.default)(n,g.COPY_OPTIONS),console.log("State log copied")):console.log(n)}))}}}},{package:"$root$",file:"ui/index.js"}],[6370,{"../../../shared/modules/string-utils":5324,"../../components/app/assets/nfts/nft-details/nft-details":5381,"../../ducks/metamask/metamask":6236,"../../helpers/constants/routes":6254,"../../selectors":6985,"./components/native-asset":6377,"./components/token-asset":6378,"./util":6382,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("react-router-dom"),s=e("../../../shared/modules/string-utils"),i=p(e("../../components/app/assets/nfts/nft-details/nft-details")),l=e("../../selectors"),c=e("../../ducks/metamask/metamask"),u=e("../../helpers/constants/routes"),d=p(e("./components/token-asset")),f=e("./util"),m=p(e("./components/native-asset"));function p(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,o.useSelector)(l.getSelectedAccountTokensAcrossChains),t=(0,r.useParams)(),{chainId:n,asset:p,id:g}=t,h=(0,o.useSelector)((e=>(0,c.getNFTsByChainId)(e,n))),y=(0,f.findAssetByAddress)(e,p,n),v=h.find((({address:e,tokenId:t})=>(0,s.isEqualCaseInsensitive)(e,p)&&g===t.toString()));let x;return(0,a.useEffect)((()=>{const e=document.querySelector(".app");null==e||e.scroll(0,0)}),[]),x=v?a.default.createElement(i.default,{nft:v}):y&&n?null!=y&&y.address?a.default.createElement(d.default,{chainId:n,token:y}):a.default.createElement(m.default,{chainId:n,token:y}):a.default.createElement(r.Redirect,{to:{pathname:u.DEFAULT_ROUTE}}),a.default.createElement("div",{className:"main-container asset__container"},x)}}}},{package:"$root$",file:"ui/pages/asset/asset.tsx"}],[6371,{"../../../components/component-library":5806,"../../../components/ui/menu":6150,"../../../contexts/i18n":6211,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/routes":6254,"../../../selectors":6985,"prop-types":4528,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=(a=e("prop-types"))&&a.__esModule?a:{default:a},s=e("react-router-dom"),i=e("react-redux"),l=e("../../../contexts/i18n"),c=e("../../../components/ui/menu"),u=e("../../../selectors"),d=e("../../../helpers/constants/routes"),f=e("../../../components/component-library"),m=e("../../../helpers/constants/design-system");function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}const g=({onRemove:e,onClickBlockExplorer:t,onViewTokenDetails:n,tokenSymbol:a,isNativeAsset:r})=>{const p=(0,o.useContext)(l.I18nContext),[g,h]=(0,o.useState)(!1),y=(0,s.useHistory)(),v=(0,i.useSelector)(u.getBlockExplorerLinkText),x=(0,o.useRef)(!1);return o.default.createElement("div",{ref:x},o.default.createElement(f.ButtonIcon,{className:"asset-options__button","data-testid":"asset-options__button",onClick:()=>h(!0),ariaLabel:p("assetOptions"),iconName:f.IconName.MoreVertical,color:m.Color.textDefault,size:f.ButtonIconSize.Sm}),g?o.default.createElement(c.Menu,{anchorElement:x.current,onHide:()=>h(!1)},o.default.createElement(c.MenuItem,{iconName:f.IconName.Export,"data-testid":"asset-options__etherscan",onClick:"addBlockExplorer"===v.firstPart?()=>{y.push(`${d.NETWORKS_ROUTE}#blockExplorerUrl`)}:()=>{h(!1),t()}},p(v.firstPart,""===v.secondPart?null:[p("blockExplorerAssetAction")])),r?null:o.default.createElement(c.MenuItem,{iconName:f.IconName.Trash,"data-testid":"asset-options__hide",onClick:()=>{h(!1),e()}},p("hideTokenSymbol",[a])),r||!n?null:o.default.createElement(c.MenuItem,{iconName:f.IconName.Info,"data-testid":"asset-options__token-details",onClick:()=>{h(!1),n()}},p("tokenDetails"))):null)};g.propTypes={isNativeAsset:r.default.bool,onClickBlockExplorer:r.default.func.isRequired,onRemove:e=>{if(!1===e.isNativeAsset&&"function"!=typeof e.onRemove)throw new Error("When isNativeAsset is true, onRemove is a required prop")},onViewTokenDetails:r.default.func,tokenSymbol:e=>{if(!1===e.isNativeAsset&&"string"!=typeof e.tokenSymbol)throw new Error("When isNativeAsset is true, tokenSymbol is a required prop")}};n.default=g}}},{package:"$root$",file:"ui/pages/asset/components/asset-options.js"}],[6372,{"../../../../shared/constants/transaction":5278,"../../../../shared/modules/conversion.utils":5301,"../../../../shared/modules/hexstring-utils":5307,"../../../components/app/assets/token-cell":5391,"../../../components/app/assets/util/calculateTokenBalance":5395,"../../../components/app/transaction-list":5724,"../../../components/app/wallet-overview/coin-buttons":5731,"../../../components/component-library":5806,"../../../components/multichain":5964,"../../../ducks/metamask/metamask":6236,"../../../ducks/ramps":6238,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/routes":6254,"../../../helpers/utils/confirm-tx.util":6275,"../../../helpers/utils/portfolio":6290,"../../../hooks/useI18nContext":6334,"../../../hooks/useMultichainSelector":6340,"../../../hooks/useTokenBalances":6356,"../../../selectors":6985,"../../../selectors/multichain":6990,"../util":6382,"./chart/asset-chart":6374,"./token-buttons":6379,"@metamask/assets-controllers":1381,"@metamask/keyring-api":1843,lodash:4380,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=O(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-router-dom"),r=e("react-redux"),s=e("@metamask/keyring-api"),i=e("lodash"),l=e("@metamask/assets-controllers"),c=e("../../../selectors"),u=e("../../../helpers/constants/design-system"),d=e("../../../components/component-library"),f=e("../../../helpers/utils/confirm-tx.util"),m=e("../../../hooks/useI18nContext"),p=e("../../../components/multichain"),g=e("../../../../shared/constants/transaction"),h=A(e("../../../components/app/assets/token-cell")),y=A(e("../../../components/app/transaction-list")),v=e("../util"),x=e("../../../helpers/constants/routes"),b=e("../../../ducks/metamask/metamask"),k=e("../../../../shared/modules/hexstring-utils"),T=A(e("../../../components/app/wallet-overview/coin-buttons")),w=e("../../../ducks/ramps"),C=e("../../../components/app/assets/util/calculateTokenBalance"),_=e("../../../hooks/useTokenBalances"),E=e("../../../hooks/useMultichainSelector"),I=e("../../../selectors/multichain"),S=e("../../../helpers/utils/portfolio"),P=e("../../../../shared/modules/conversion.utils"),M=A(e("./chart/asset-chart")),D=A(e("./token-buttons"));function A(e){return e&&e.__esModule?e:{default:e}}function O(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(O=function(e){return e?n:t})(e)}function F(e,t){return a.default.createElement(d.Box,{display:u.Display.Flex,justifyContent:u.JustifyContent.spaceBetween},a.default.createElement(d.Text,{color:u.TextColor.textAlternative,variant:u.TextVariant.bodyMdMedium},e),t)}n.default=({asset:e,optionsButton:t})=>{var n,A,O,N,R,j;const B=(0,m.useI18nContext)(),$=(0,o.useHistory)(),W=(0,r.useSelector)(c.getSelectedAccount),L=(0,r.useSelector)(c.getCurrentCurrency),G=(0,r.useSelector)(b.getConversionRate),q=(0,r.useSelector)(w.getIsNativeTokenBuyable),{chainId:V,type:H,symbol:U,name:z,image:K,decimals:Y}=e,J=(0,r.useSelector)((e=>(0,c.getSwapsDefaultToken)(e,V)),i.isEqual),Q=(0,r.useSelector)((e=>(0,c.getIsSwapsChain)(e,V))),X=(0,r.useSelector)((e=>(0,c.getIsBridgeChain)(e,V))),Z=(0,r.useSelector)(c.getSelectedInternalAccount,i.isEqual),ee=Z.methods.includes(s.EthMethod.SignTransaction)||Z.methods.includes(s.EthMethod.SignUserOperation),te=(0,r.useSelector)(c.getMarketData),ne=(0,r.useSelector)(c.getCurrencyRates),ae=(0,r.useSelector)(c.getIsTestnet),oe=(0,E.useMultichainSelector)(I.getMultichainShouldShowFiat,W),re=!ae,se=(0,r.useSelector)(c.getShowFiatInTestnets),ie=oe&&(re||ae&&se),le=(0,r.useSelector)(c.getSelectedAccountNativeTokenCachedBalanceByChainId),{tokenBalances:ce}=(0,_.useTokenBalances)({chainIds:[V]}),ue=ce[W.address],de=(0,r.useSelector)(c.getParticipateInMetaMetrics),fe=(0,r.useSelector)(c.getDataCollectionForMarketing),me=(0,r.useSelector)(c.getMetaMetricsId),pe=H===g.AssetType.token?(0,k.toChecksumHexAddress)(e.address):(0,l.getNativeTokenAddress)(V),ge=null==ue||null===(n=ue[V])||void 0===n?void 0:n[pe],he=(0,C.calculateTokenBalance)({isNative:H===g.AssetType.native,chainId:V,address:pe,decimals:Y,nativeBalances:le,selectedAccountTokenBalancesAcrossChains:ue}),ye=null===(A=te[V])||void 0===A||null===(A=A[pe])||void 0===A?void 0:A.currency,ve=(null===(O=te[V])||void 0===O||null===(O=O[pe])||void 0===O?void 0:O.price)||0,xe=H===g.AssetType.native?null===(N=ne[U])||void 0===N?void 0:N.conversionRate:(null===(R=ne[ye])||void 0===R?void 0:R.conversionRate)||0,be=ve*xe*parseFloat(String(he)),ke=xe!==undefined&&ve!==undefined?xe*ve:undefined,Te=null===(j=te[V])||void 0===j?void 0:j[pe],we=G>0&&Te&&(Te.marketCap>0||Te.totalVolume>0||Te.circulatingSupply>0||Te.allTimeHigh>0||Te.allTimeLow>0);e.balance={value:(0,P.hexToDecimal)(ge),display:String(he),fiat:String(be)};const Ce=(0,a.useMemo)((()=>(0,S.getPortfolioUrl)("","asset_page",me,de,fe,Z.address,"spending-caps")),[Z.address,fe,de,me]);return a.default.createElement(d.Box,{marginLeft:"auto",marginRight:"auto",marginTop:4,className:"asset__content"},a.default.createElement(d.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Row,justifyContent:u.JustifyContent.spaceBetween,paddingLeft:2,paddingRight:4,paddingBottom:1},a.default.createElement(d.Box,{display:u.Display.Flex},a.default.createElement(d.ButtonIcon,{color:u.IconColor.iconAlternative,marginRight:1,size:d.ButtonIconSize.Sm,ariaLabel:B("back"),iconName:d.IconName.ArrowLeft,onClick:()=>$.push(x.DEFAULT_ROUTE)}),a.default.createElement(d.Text,{"data-testid":"asset-name",color:u.TextColor.textAlternative},z&&U&&z!==U?`${z} (${U})`:z??U)),t),a.default.createElement(M.default,{chainId:V,address:pe,currentPrice:ke,currency:L}),a.default.createElement(d.Box,{marginTop:4},H===g.AssetType.native?a.default.createElement(T.default,{account:Z,trackingLocation:"asset-page",isBuyableChain:q,isSigningEnabled:ee,isSwapsChain:Q,isBridgeChain:X,chainId:V,defaultSwapsToken:J}):a.default.createElement(D.default,{token:e})),a.default.createElement(d.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Column,paddingTop:5},a.default.createElement(d.Text,{variant:u.TextVariant.headingMd,paddingBottom:2,paddingLeft:4},B("yourBalance")),a.default.createElement(h.default,{key:`${U}-${pe}`,address:pe,chainId:V,symbol:U,image:K,tokenFiatAmount:ie?be:null,string:null==he?void 0:he.toString()}),a.default.createElement(d.Box,{marginTop:2,display:u.Display.Flex,flexDirection:u.FlexDirection.Column,gap:7},[g.AssetType.token,g.AssetType.native].includes(H)&&a.default.createElement(d.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Column,paddingLeft:4,paddingRight:4},a.default.createElement(d.Text,{variant:u.TextVariant.headingMd,paddingBottom:4},B("tokenDetails")),a.default.createElement(d.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Column,gap:2},H===g.AssetType.token&&a.default.createElement(d.Box,null,F(B("contractAddress"),a.default.createElement(p.AddressCopyButton,{address:pe,shorten:!0})),a.default.createElement(d.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Column,gap:2},e.decimals!==undefined&&F(B("tokenDecimal"),a.default.createElement(d.Text,null,e.decimals)),e.aggregators&&e.aggregators.length>0&&a.default.createElement(d.Box,null,a.default.createElement(d.Text,{color:u.TextColor.textAlternative,variant:u.TextVariant.bodyMdMedium},B("tokenList")),a.default.createElement(d.Text,null,e.aggregators.join(", "))))),F(B("spendingCaps"),a.default.createElement(d.ButtonLink,{className:"asset-page__spending-caps mm-text--body-md-medium",href:Ce,target:"_blank",rel:"noopener noreferrer"},B("editInPortfolio"))))),we&&a.default.createElement(d.Box,{paddingLeft:4,paddingRight:4},a.default.createElement(d.Text,{variant:u.TextVariant.headingMd,paddingBottom:4},B("marketDetails")),a.default.createElement(d.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Column,gap:2},Te.marketCap>0&&F(B("marketCap"),a.default.createElement(d.Text,{"data-testid":"asset-market-cap"},(0,v.localizeLargeNumber)(B,xe*Te.marketCap))),Te.totalVolume>0&&F(B("totalVolume"),a.default.createElement(d.Text,null,(0,v.localizeLargeNumber)(B,xe*Te.totalVolume))),Te.circulatingSupply>0&&F(B("circulatingSupply"),a.default.createElement(d.Text,null,(0,v.localizeLargeNumber)(B,Te.circulatingSupply))),Te.allTimeHigh>0&&F(B("allTimeHigh"),a.default.createElement(d.Text,null,(0,f.formatCurrency)(""+xe*Te.allTimeHigh,L,(0,v.getPricePrecision)(xe*Te.allTimeHigh)))),Te.allTimeLow>0&&F(B("allTimeLow"),a.default.createElement(d.Text,null,(0,f.formatCurrency)(""+xe*Te.allTimeLow,L,(0,v.getPricePrecision)(xe*Te.allTimeLow)))))),a.default.createElement(d.Box,{marginBottom:8},a.default.createElement(d.Text,{paddingLeft:4,paddingRight:4,variant:u.TextVariant.headingMd},B("yourActivity")),H===g.AssetType.native?a.default.createElement(y.default,{hideTokenTransactions:!0,tokenChainId:V}):a.default.createElement(y.default,{tokenAddress:pe,tokenChainId:V})))))}}}},{package:"$root$",file:"ui/pages/asset/components/asset-page.tsx"}],[6373,{"../../../components/component-library":5806,"../../../helpers/constants/design-system":6248,"../../../helpers/utils/confirm-tx.util":6275,"../util":6382,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("../../../helpers/constants/design-system"),r=e("../../../components/component-library"),s=e("../../../helpers/utils/confirm-tx.util"),i=e("../util");function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}const c=a.default.createElement("svg",{className:"chart-up",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.default.createElement("path",{d:"M9.75 3.8125L6.25 7.4875L4.91667 5.3875L2.25 8.1875",strokeLinecap:"round",strokeLinejoin:"round"}),a.default.createElement("path",{d:"M8.08398 3.8125H9.75065V5.5625",strokeLinecap:"round",strokeLinejoin:"round"})),u=a.default.createElement("svg",{className:"chart-down",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.default.createElement("path",{d:"M9.75 8.1875L6.25 4.5125L4.91667 6.6125L2.25 3.8125",strokeLinecap:"round",strokeLinejoin:"round"}),a.default.createElement("path",{d:"M8.08398 8.1875H9.75065V6.4375",strokeLinecap:"round",strokeLinejoin:"round"})),d=(0,a.forwardRef)(((e,t)=>{const[{price:n,date:l},d]=(0,a.useState)({price:e.price,date:e.date});(0,a.useImperativeHandle)(t,(()=>({setPrice:d})));const{loading:f,currency:m,comparePrice:p}=e,g=n!==undefined&&p!==undefined?n-p:undefined;return a.default.createElement(r.Box,{marginLeft:4,marginRight:4},a.default.createElement(r.Text,{"data-testid":"asset-hovered-price",style:{width:"100px"},variant:o.TextVariant.headingLg,borderRadius:o.BorderRadius.LG,marginBottom:1,backgroundColor:f&&!n?o.BackgroundColor.backgroundAlternative:o.BackgroundColor.transparent},n?(0,s.formatCurrency)(`${n}`,m,(0,i.getPricePrecision)(n)):" "),a.default.createElement(r.Box,null,g!==undefined&&p!==undefined?a.default.createElement(r.Box,{style:{opacity:f?i.loadingOpacity:1}},g>=0?c:u,a.default.createElement(r.Text,{display:o.Display.InlineBlock,variant:o.TextVariant.bodyMdMedium,marginLeft:1,marginRight:1,color:g>=0?o.TextColor.successDefault:o.TextColor.errorDefault},(0,s.formatCurrency)(`${Math.abs(g)}`,m,(0,i.getPricePrecision)(g))," ","(",g>=0?"+":"",(g/p*100).toFixed(2),"%)"),a.default.createElement(r.Text,{display:o.Display.InlineBlock,variant:o.TextVariant.bodyMdMedium,color:o.TextColor.textAlternative},(0,i.getShortDateFormatter)().format(l))):a.default.createElement(r.Text,{style:{width:"200px"},backgroundColor:f?o.BackgroundColor.backgroundAlternative:o.BackgroundColor.transparent,borderRadius:o.BorderRadius.LG,variant:o.TextVariant.bodyMdMedium}," ")))}));n.default=d}}},{package:"$root$",file:"ui/pages/asset/components/asset-price.tsx"}],[6374,{"../../../../components/component-library":5806,"../../../../helpers/constants/design-system":6248,"../../../../hooks/useI18nContext":6334,"../../../../hooks/useTheme":6354,"../../useHistoricalPrices":6381,"../../util":6382,"../asset-price":6373,"./chart-tooltip":6375,"./crosshair-plugin":6376,"@metamask/design-tokens":1448,"chart.js":3579,classnames:3584,react:4776,"react-chartjs-2":4600},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("chart.js"),r=e("react-chartjs-2"),s=y(e("classnames")),i=e("@metamask/design-tokens"),l=e("../../../../hooks/useTheme"),c=e("../../../../helpers/constants/design-system"),u=e("../../../../components/component-library"),d=e("../../../../hooks/useI18nContext"),f=e("../../useHistoricalPrices"),m=e("../../util"),p=y(e("../asset-price")),g=y(e("./chart-tooltip")),h=e("./crosshair-plugin");function y(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t=e.ctx.createLinearGradient(0,0,0,e.height);return t.addColorStop(0,`${e.options.borderColor}60`),t.addColorStop(1,`${e.options.borderColor}00`),t},elements:{line:{borderWidth:2},point:{pointStyle:!1}},plugins:{decimation:{algorithm:"lttb",samples:150,threshold:150,enabled:!0}}};n.default=({chainId:e,address:t,currentPrice:n,currency:o})=>{var h;const y=(0,d.useI18nContext)(),v=(0,l.useTheme)(),[k,T]=(0,a.useState)("1D"),w=(0,a.useRef)(),C=(0,a.useRef)(),{loading:_,data:{prices:E,edges:I}}=(0,f.useHistoricalPrices)({chainId:e,address:t,currency:o,timeRange:k}),{xMin:S,xMax:P,yMin:M,yMax:D}=I??{},A={...b,borderColor:"dark"===v?i.brandColor.blue400:i.brandColor.blue500,scales:{x:{min:null==S?void 0:S.x,max:null==P?void 0:P.x,display:!1,type:"linear"},y:{min:null==M?void 0:M.y,max:null==D?void 0:D.y,display:!1}}};return n&&(_||E)?a.default.createElement(u.Box,{borderRadius:c.BorderRadius.LG},a.default.createElement(p.default,{ref:C,loading:_,currency:o,price:n,date:Date.now(),comparePrice:null==E||null===(h=E[0])||void 0===h?void 0:h.y}),a.default.createElement(u.Box,{"data-testid":"asset-price-chart",marginTop:4,borderRadius:c.BorderRadius.LG,backgroundColor:_&&!E?c.BackgroundColor.backgroundAlternative:c.BackgroundColor.transparent},a.default.createElement(u.Box,{style:{opacity:_&&E?m.loadingOpacity:1}},a.default.createElement(g.default,x({point:D},I,{currency:o})),a.default.createElement(u.Box,{style:{aspectRatio:`${A.aspectRatio}`},display:c.Display.Flex,flexDirection:c.FlexDirection.Column,justifyContent:n?c.JustifyContent.flexEnd:c.JustifyContent.flexStart},a.default.createElement(r.Line,{ref:w,data:{datasets:[{data:E}]},options:A,updateMode:"none",onMouseMove:e=>{var t;const n=null==w||null===(t=w.current)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.datasets)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.data;if(n){const t=e.target,o=n[Math.max(0,Math.min(n.length-1,Math.round(e.nativeEvent.offsetX/t.clientWidth*n.length)))];var a;if(o)null==C||null===(a=C.current)||void 0===a||a.setPrice({price:o.y,date:o.x})}},onMouseOut:()=>{var e;null==C||null===(e=C.current)||void 0===e||e.setPrice({price:n,date:Date.now()})}})),a.default.createElement(g.default,x({point:M},I,{currency:o}))),a.default.createElement(u.Box,{style:E?undefined:{visibility:"hidden"},display:c.Display.Flex,justifyContent:c.JustifyContent.spaceBetween,marginTop:4,marginLeft:4,marginRight:4},[[y("oneDayAbbreviation"),"1D"],[y("oneWeekAbbreviation"),"7D"],[y("oneMonthAbbreviation"),"1M"],[y("threeMonthsAbbreviation"),"3M"],[y("oneYearAbbreviation"),"1Y"],[y("all"),"1000Y"]].map((([e,t])=>a.default.createElement(u.ButtonBase,{key:t,className:(0,s.default)("time-range-button",{"time-range-button__selected":t===k}),onClick:()=>T(t),variant:c.TextVariant.bodySmMedium,size:u.ButtonBaseSize.Sm,backgroundColor:c.BackgroundColor.transparent,color:c.TextColor.textAlternative},e)))))):null}}}},{package:"$root$",file:"ui/pages/asset/components/chart/asset-chart.tsx"}],[6375,{"../../../../components/component-library":5806,"../../../../helpers/constants/design-system":6248,"../../../../helpers/utils/confirm-tx.util":6275,"../../util":6382,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../components/component-library"),s=e("../../../../helpers/utils/confirm-tx.util"),i=e("../../../../helpers/constants/design-system"),l=e("../../util");n.default=({point:e,xMin:t,xMax:n,currency:a})=>{const c=e&&t&&n?(e.x-t.x)/(n.x-t.x):0;return o.default.createElement(r.Box,{style:{...c<.5?{paddingRight:100-200*c+"%"}:{paddingLeft:100-2*(100-100*c)+"%"},direction:c<.5?r.TextDirection.LeftToRight:r.TextDirection.RightToLeft}},o.default.createElement(r.Text,{marginLeft:4,marginRight:4,variant:i.TextVariant.bodySmMedium,color:i.TextColor.textAlternative,textAlign:i.TextAlign.Center},(null==e?void 0:e.y)===undefined?" ":(0,s.formatCurrency)(`${null==e?void 0:e.y}`,a,(0,l.getPricePrecision)(null==e?void 0:e.y))))}}}},{package:"$root$",file:"ui/pages/asset/components/chart/chart-tooltip.tsx"}],[6376,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.CrosshairPlugin=void 0;n.CrosshairPlugin={id:"crosshair",afterEvent(e,{event:t}){e.crosshairX="mouseout"===t.type?undefined:t.x??undefined,e.draw()},afterDraw(e){if(e.crosshairX!==undefined){const t=e.data.datasets[0].data,n=t[Math.max(0,Math.min(t.length-1,Math.round(e.crosshairX/e.width*t.length)))];if(n){const{x:t,y:a}=e.scales,o=t.getPixelForValue(n.x),r=a.getPixelForValue(n.y);e.ctx.lineWidth=1,e.ctx.strokeStyle="#BBC0C5",e.ctx.beginPath(),e.ctx.moveTo(o,0),e.ctx.lineTo(o,e.height),e.ctx.stroke(),e.ctx.beginPath(),e.ctx.arc(o,r,3,0,2*Math.PI),e.ctx.fillStyle=e.options.borderColor,e.ctx.fill()}}}}}}},{package:"$root$",file:"ui/pages/asset/components/chart/crosshair-plugin.ts"}],[6377,{"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/transaction":5278,"../../../../shared/modules/selectors/networks":5320,"../../../contexts/metametrics":6214,"../../../helpers/utils/util":6297,"../../../hooks/useIsOriginalNativeTokenSymbol":6335,"../../../selectors":6985,"./asset-options":6371,"./asset-page":6372,"@metamask/etherscan-link":1752,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("@metamask/etherscan-link"),s=e("../../../selectors"),i=e("../../../../shared/modules/selectors/networks"),l=e("../../../../shared/constants/transaction"),c=e("../../../hooks/useIsOriginalNativeTokenSymbol"),u=e("../../../../shared/constants/metametrics"),d=e("../../../helpers/utils/util"),f=e("../../../contexts/metametrics"),m=g(e("./asset-options")),p=g(e("./asset-page"));function g(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}n.default=({token:e,chainId:t})=>{const{symbol:n}=e,g=(0,s.getNativeCurrencyForChain)(t),{type:h}=(0,o.useSelector)(i.getProviderConfig)??{},{address:y}=(0,o.useSelector)(s.getSelectedInternalAccount),v=(0,o.useSelector)(s.getRpcPrefsForCurrentProvider),x=(0,r.getAccountLink)(y,t,v),b=(0,a.useContext)(f.MetaMetricsContext),k=(0,c.useIsOriginalNativeTokenSymbol)(t,n,h);return a.default.createElement(p.default,{asset:{chainId:t,type:l.AssetType.native,symbol:n,image:g,decimals:e.decimals,isOriginalNativeSymbol:!0===k},optionsButton:a.default.createElement(m.default,{isNativeAsset:!0,onClickBlockExplorer:()=>{b({event:"Clicked Block Explorer Link",category:u.MetaMetricsEventCategory.Navigation,properties:{link_type:"Account Tracker",action:"Asset Options",block_explorer_domain:(0,d.getURLHostName)(x)}}),global.platform.openTab({url:x})}})})}}}},{package:"$root$",file:"ui/pages/asset/components/native-asset.tsx"}],[6378,{"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/transaction":5278,"../../../../shared/modules/selectors/networks":5320,"../../../../shared/modules/string-utils":5324,"../../../contexts/metametrics":6214,"../../../helpers/utils/util":6297,"../../../hooks/useTokenFiatAmount":6360,"../../../hooks/useTokenTracker":6363,"../../../selectors":6985,"../../../store/actions":7e3,"./asset-options":6371,"./asset-page":6372,"@metamask/etherscan-link":1752,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("@metamask/etherscan-link"),s=e("react-router-dom"),i=e("../../../selectors"),l=e("../../../../shared/modules/string-utils"),c=e("../../../hooks/useTokenTracker"),u=e("../../../../shared/constants/transaction"),d=e("../../../hooks/useTokenFiatAmount"),f=e("../../../helpers/utils/util"),m=e("../../../contexts/metametrics"),p=e("../../../store/actions"),g=e("../../../../shared/constants/metametrics"),h=e("../../../../shared/modules/selectors/networks"),y=x(e("./asset-options")),v=x(e("./asset-page"));function x(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}n.default=({token:e,chainId:t})=>{var n,x,b;const{address:k,symbol:T,isERC721:w}=e,C=(0,o.useSelector)(i.getTokenList),_=(0,o.useSelector)(h.getNetworkConfigurationsByChainId),E=null===(n=_[t])||void 0===n?void 0:n.defaultBlockExplorerUrlIndex,I=E===undefined?null:null===(x=_[t])||void 0===x?void 0:x.blockExplorerUrls[E],{address:S}=(0,o.useSelector)(i.getSelectedInternalAccount),P=(0,o.useSelector)(i.selectERC20TokensByChain),M=(0,s.useHistory)(),D=(0,o.useDispatch)(),A=(0,a.useContext)(m.MetaMetricsContext),O=Object.values(C).find((e=>(0,l.isEqualCaseInsensitive)(e.symbol,T)&&(0,l.isEqualCaseInsensitive)(e.address,k))),F=null==P||null===(b=P[t])||void 0===b||null===(b=b.data)||void 0===b?void 0:b[k.toLowerCase()],N=(null==O?void 0:O.name)||(null==F?void 0:F.name)||T,R=(null==O?void 0:O.iconUrl)||(null==F?void 0:F.iconUrl)||"",j=null==O?void 0:O.aggregators,{tokensWithBalances:B}=(0,c.useTokenTracker)({tokens:[e],address:undefined}),$=null==B?void 0:B[0],W=(0,d.useTokenFiatAmount)(k,null==$?void 0:$.string,T,{},!1),L=(0,r.getTokenTrackerLink)(e.address,t,"",S,{blockExplorerUrl:I??""});return a.default.createElement(v.default,{asset:{chainId:t,type:u.AssetType.token,address:k,symbol:T,name:N,decimals:e.decimals,image:R,aggregators:j,balance:{value:null==$?void 0:$.balance,display:`${(0,f.roundToDecimalPlacesRemovingExtraZeroes)(null==$?void 0:$.string,5)}`,fiat:W},isERC721:w},optionsButton:a.default.createElement(y.default,{isNativeAsset:!1,onRemove:()=>D((0,p.showModal)({name:"HIDE_TOKEN_CONFIRMATION",token:e,history:M})),onClickBlockExplorer:()=>{A({event:"Clicked Block Explorer Link",category:g.MetaMetricsEventCategory.Navigation,properties:{link_type:"Token Tracker",action:"Token Options",block_explorer_domain:(0,f.getURLHostName)(L)}}),global.platform.openTab({url:L})},tokenSymbol:e.symbol})})}}}},{package:"$root$",file:"ui/pages/asset/components/token-asset.tsx"}],[6379,{"../../../../shared/constants/metametrics":5260,"../../../../shared/constants/transaction":5278,"../../../../shared/modules/selectors/networks":5320,"../../../components/component-library":5806,"../../../components/ui/icon-button/icon-button":6118,"../../../contexts/i18n":6211,"../../../contexts/metametrics":6214,"../../../ducks/ramps":6238,"../../../ducks/send":6241,"../../../ducks/swaps/swaps":6244,"../../../helpers/constants/design-system":6248,"../../../helpers/constants/error-keys":6249,"../../../helpers/constants/routes":6254,"../../../helpers/utils/hardware":6279,"../../../hooks/bridge/useBridging":6300,"../../../hooks/ramps/useRamps/useRamps":6311,"../../../selectors":6985,"../../../store/actions":7e3,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=_(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("react-router-dom"),s=e("../../../contexts/i18n"),i=e("../../../helpers/constants/routes"),l=e("../../../ducks/send"),c=e("../../../helpers/utils/hardware"),u=e("../../../ducks/swaps/swaps"),d=C(e("../../../hooks/ramps/useRamps/useRamps")),f=e("../../../selectors"),m=e("../../../../shared/modules/selectors/networks"),p=C(e("../../../hooks/bridge/useBridging")),g=e("../../../helpers/constants/error-keys"),h=e("../../../store/actions"),y=e("../../../contexts/metametrics"),v=e("../../../../shared/constants/metametrics"),x=e("../../../../shared/constants/transaction"),b=e("../../../helpers/constants/design-system"),k=C(e("../../../components/ui/icon-button/icon-button")),T=e("../../../components/component-library"),w=e("../../../ducks/ramps");function C(e){return e&&e.__esModule?e:{default:e}}function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}n.default=({token:e})=>{const t=(0,o.useDispatch)(),n=(0,a.useContext)(s.I18nContext),C=(0,a.useContext)(y.MetaMetricsContext),_=(0,r.useHistory)(),E=(0,o.useSelector)(f.getCurrentKeyring),I=(0,c.isHardwareKeyring)(E.type),S=(0,o.useSelector)(m.getCurrentChainId),P=(0,o.useSelector)(f.getNetworkConfigurationIdByChainId),M=(0,o.useSelector)(f.getIsSwapsChain),D=(0,o.useSelector)(f.getIsBridgeChain),A=(0,o.useSelector)(w.getIsNativeTokenBuyable),{openBuyCryptoInPdapp:O}=(0,d.default)(),{openBridgeExperience:F}=(0,p.default)();(0,a.useEffect)((()=>{e.isERC721&&t((0,h.showModal)({name:"CONVERT_TOKEN_TO_NFT",tokenAddress:e.address}))}),[e.isERC721,e.address,t]);const N=async()=>{if(S!==e.chainId)try{const n=P[e.chainId];await t((0,h.setActiveNetworkWithError)(n)),await t((0,h.setSwitchedNetworkDetails)({networkClientId:n}))}catch(t){throw console.error(`Failed to switch chains.\n Target chainId: ${e.chainId}, Current chainId: ${S}.\n ${t}`),t}};return a.default.createElement(T.Box,{display:b.Display.Flex,justifyContent:b.JustifyContent.spaceEvenly},a.default.createElement(k.default,{className:"token-overview__button",Icon:a.default.createElement(T.Icon,{name:T.IconName.PlusMinus,color:b.IconColor.primaryInverse,size:T.IconSize.Sm}),label:n("buyAndSell"),"data-testid":"token-overview-buy",onClick:()=>{O(),C({event:v.MetaMetricsEventName.NavBuyButtonClicked,category:v.MetaMetricsEventCategory.Navigation,properties:{location:"Token Overview",text:"Buy",chain_id:S,token_symbol:e.symbol}})},disabled:e.isERC721||!A,tooltipRender:null}),a.default.createElement(k.default,{className:"token-overview__button",onClick:async()=>{C({event:v.MetaMetricsEventName.NavSendButtonClicked,category:v.MetaMetricsEventCategory.Navigation,properties:{token_symbol:e.symbol,location:v.MetaMetricsSwapsEventSource.TokenView,text:"Send",chain_id:e.chainId}},{excludeMetaMetricsId:!1});try{await N(),await t((0,l.startNewDraftTransaction)({type:x.AssetType.token,details:e})),_.push(i.SEND_ROUTE)}catch(e){if(!e.message.includes(g.INVALID_ASSET_TYPE))throw e}},Icon:a.default.createElement(T.Icon,{name:T.IconName.Arrow2UpRight,color:b.IconColor.primaryInverse,size:T.IconSize.Sm}),label:n("send"),"data-testid":"eth-overview-send",disabled:e.isERC721,tooltipRender:null}),M&&a.default.createElement(k.default,{className:"token-overview__button",Icon:a.default.createElement(T.Icon,{name:T.IconName.SwapHorizontal,color:b.IconColor.primaryInverse,size:T.IconSize.Sm}),onClick:async()=>{var n,a,o,r,s;(await N(),C({event:v.MetaMetricsEventName.NavSwapButtonClicked,category:v.MetaMetricsEventCategory.Swaps,properties:{token_symbol:e.symbol,location:v.MetaMetricsSwapsEventSource.TokenView,text:"Swap",chain_id:S}}),t((0,u.setSwapsFromToken)({...e,address:null===(n=e.address)||void 0===n?void 0:n.toLowerCase(),iconUrl:e.image,balance:null==e||null===(a=e.balance)||void 0===a?void 0:a.value,string:null==e||null===(o=e.balance)||void 0===o?void 0:o.display})),I)?null===(r=(s=global.platform).openExtensionInBrowser)||void 0===r||r.call(s,i.PREPARE_SWAP_ROUTE,undefined,!1):_.push(i.PREPARE_SWAP_ROUTE)},label:n("swap"),tooltipRender:null}),D&&a.default.createElement(k.default,{className:"token-overview__button","data-testid":"token-overview-bridge",Icon:a.default.createElement(T.Icon,{name:T.IconName.Bridge,color:b.IconColor.primaryInverse,size:T.IconSize.Sm}),label:n("bridge"),onClick:()=>{var t,n;F(v.MetaMetricsSwapsEventSource.TokenView,{...e,iconUrl:e.image,balance:null==e||null===(t=e.balance)||void 0===t?void 0:t.value,string:null==e||null===(n=e.balance)||void 0===n?void 0:n.display,name:e.name??""})},tooltipRender:null}))}}}},{package:"$root$",file:"ui/pages/asset/components/token-buttons.tsx"}],[6380,{"./asset":6370},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./asset"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/asset/index.js"}],[6381,{"../../../shared/constants/time":5276,"../../../shared/lib/fetch-with-cache":5283,"../../selectors":6985,"./util":6382,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useHistoricalPrices=void 0;var a,o=e("react"),r=e("react-redux"),s=(a=e("../../../shared/lib/fetch-with-cache"))&&a.__esModule?a:{default:a},i=e("../../../shared/constants/time"),l=e("../../selectors"),c=e("./util");n.useHistoricalPrices=({chainId:e,address:t,currency:n,timeRange:a})=>{const u=(0,r.useSelector)(l.getShouldShowFiat)&&(0,c.chainSupportsPricing)(e),[d,f]=(0,o.useState)(u),[m,p]=(0,o.useState)({});return(0,o.useEffect)((()=>{u?(f(!0),(0,s.default)({url:`https://price.api.cx.metamask.io/v1/chains/${e}/historical-prices/${t}?vsCurrency=${n}&timePeriod=${a}`,cacheOptions:{cacheRefreshTime:5*i.MINUTE},functionName:"GetAssetHistoricalPrices",fetchOptions:{headers:{"X-Client-Id":"extension"}}}).catch((()=>({}))).then((e=>{var t;const n=null==e||null===(t=e.prices)||void 0===t?void 0:t.map((e=>({x:null==e?void 0:e[0],y:null==e?void 0:e[1]})));let a;if(n&&n.length>0){let[e,t,o,r]=[];for(const a of n)e=!e||a.xt.x?a:t,o=!o||a.yr.y?a:r;a={xMin:e,xMax:t,yMin:o,yMax:r}}p({prices:n,edges:a}),f(!1)}))):(p({}),f(!1))}),[u,e,t,n,a]),{loading:d,data:m}}}}},{package:"$root$",file:"ui/pages/asset/useHistoricalPrices.ts"}],[6382,{"@metamask/assets-controllers":1381},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.localizeLargeNumber=n.loadingOpacity=n.getShortDateFormatterV2=n.getShortDateFormatter=n.getPricePrecision=n.findAssetByAddress=n.chainSupportsPricing=void 0;var a=e("@metamask/assets-controllers");n.getShortDateFormatter=()=>Intl.DateTimeFormat(navigator.language,{month:"short",day:"numeric",hour:"numeric",minute:"numeric"});n.getShortDateFormatterV2=()=>Intl.DateTimeFormat(navigator.language,{year:"numeric",month:"short",day:"numeric"});n.localizeLargeNumber=(e,t)=>t>=1e12?`${(t/1e12).toFixed(2)}${e("trillionAbbreviation")}`:t>=1e9?`${(t/1e9).toFixed(2)}${e("billionAbbreviation")}`:t>=1e6?`${(t/1e6).toFixed(2)}${e("millionAbbreviation")}`:t.toFixed(2);n.getPricePrecision=e=>{if(0===e)return 1;let t=2;for(let n=Math.abs(e);n<1;t++)n*=10;return t};n.chainSupportsPricing=e=>a.SUPPORTED_CHAIN_IDS.includes(e);n.loadingOpacity=.2;n.findAssetByAddress=(e,t,n)=>{if(!n)return console.error("Chain ID is required."),null;const a=e[n];return a?t?a.find((e=>e.address&&e.address.toLowerCase()===t.toLowerCase())):a.find((e=>!e.address)):(console.warn(`No tokens found for chainId: ${n}`),null)}}}},{package:"$root$",file:"ui/pages/asset/util.ts"}],[6384,{"../../../../shared/constants/network":5264,"../../../../shared/modules/Numeric":5294,"../../../../shared/modules/selectors/networks":5320,"../../../store/actions":7e3,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const e=(0,a.useDispatch)(),t=(0,a.useSelector)(i.getNetworkConfigurationsByChainId),n=(0,a.useSelector)(i.getSelectedNetworkClientId);return{addSourceToken:t=>{const{address:a,decimals:o,symbol:r,icon:i}=t.quote.srcAsset;e((0,s.addToken)({address:a,decimals:o,symbol:r,image:i,networkClientId:n}))},addDestToken:async n=>{const a=new o.Numeric(n.quote.destChainId,10).toPrefixedHexString().toLowerCase(),i=t[a];let l;if(!i){const t=r.FEATURED_RPCS.find((e=>e.chainId===a));if(!t)throw new Error("No featured RPC found");l=await e((0,s.addNetwork)(t))}const c=i||l;if(!c)throw new Error("No destination network configuration found");const u=c.defaultRpcEndpointIndex,d=c.rpcEndpoints[u].networkClientId,{address:f,decimals:m,symbol:p,icon:g}=n.quote.destAsset;await e((0,s.addToken)({address:f,decimals:m,symbol:p,image:g,networkClientId:d}))}}};var a=e("react-redux"),o=e("../../../../shared/modules/Numeric"),r=e("../../../../shared/constants/network"),s=e("../../../store/actions"),i=e("../../../../shared/modules/selectors/networks")}}},{package:"$root$",file:"ui/pages/bridge/hooks/useAddToken.ts"}],[6385,{"../../../../shared/constants/bridge":5249,"../../../../shared/modules/Numeric":5294,"../../../ducks/bridge/actions":6224,"../bridge.util":6383,"../types":6400,"./useHandleTx":6387,"@metamask/transaction-controller":2698,"bignumber.js":3465},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const{handleTx:e}=(0,d.default)();return{handleApprovalTx:async({approval:t,quoteResponse:n})=>{const a=new l.Numeric(t.chainId,10).toPrefixedHexString();(0,i.isEthUsdt)(a,n.quote.srcAsset.address)&&await(async({approval:t,quoteResponse:n,hexChainId:a})=>{const l=new r.BigNumber(await(0,u.getBridgeERC20Allowance)(c.ETH_USDT_ADDRESS,a)),d=new r.BigNumber(n.quote.srcTokenAmount).plus(n.quote.feeData[s.FeeType.METABRIDGE].amount).toString();if(l.lt(d)&&l.gt(0)){const n={...t,data:(0,i.getEthUsdtResetData)()};await e({txType:o.TransactionType.bridgeApproval,txParams:n,swapsOptions:{hasApproveTx:!0,meta:{type:o.TransactionType.bridgeApproval}}})}})({approval:t,quoteResponse:n,hexChainId:a});return(await e({txType:o.TransactionType.bridgeApproval,txParams:t,swapsOptions:{hasApproveTx:!0,meta:{type:o.TransactionType.bridgeApproval,sourceTokenSymbol:n.quote.srcAsset.symbol}}})).id}}};var a,o=e("@metamask/transaction-controller"),r=e("bignumber.js"),s=e("../types"),i=e("../bridge.util"),l=e("../../../../shared/modules/Numeric"),c=e("../../../../shared/constants/bridge"),u=e("../../../ducks/bridge/actions"),d=(a=e("./useHandleTx"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/bridge/hooks/useHandleApprovalTx.ts"}],[6386,{"../../../../shared/modules/Numeric":5294,"../types":6400,"./useHandleTx":6387,"@metamask/transaction-controller":2698,"bignumber.js":3465},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const{handleTx:e}=(0,l.default)();return{handleBridgeTx:async({quoteResponse:t,approvalTxId:n})=>{const a=new o.BigNumber(t.quote.srcTokenAmount).plus(t.quote.feeData[i.FeeType.METABRIDGE].amount),l=new s.Numeric(a,10).shiftedBy(t.quote.srcAsset.decimals).toString();return(await e({txType:r.TransactionType.bridge,txParams:t.trade,swapsOptions:{hasApproveTx:Boolean(null==t?void 0:t.approval),meta:{type:r.TransactionType.bridge,sourceTokenSymbol:t.quote.srcAsset.symbol,destinationTokenSymbol:t.quote.destAsset.symbol,destinationTokenDecimals:t.quote.destAsset.decimals,destinationTokenAddress:t.quote.destAsset.address,approvalTxId:n,swapTokenValue:l}}})).id}}};var a,o=e("bignumber.js"),r=e("@metamask/transaction-controller"),s=e("../../../../shared/modules/Numeric"),i=e("../types"),l=(a=e("./useHandleTx"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/bridge/hooks/useHandleBridgeTx.ts"}],[6387,{"../../../../shared/modules/Numeric":5294,"../../../ducks/bridge/utils":6227,"../../../ducks/metamask/metamask":6236,"../../../selectors":6985,"../../../store/actions":7e3,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const e=(0,a.useDispatch)(),t=(0,a.useSelector)(i.checkNetworkAndAccountSupports1559),n=(0,a.useSelector)(s.getGasFeeEstimates);return{handleTx:async({txType:a,txParams:s,swapsOptions:i})=>{const c=new l.Numeric(s.chainId,10).toPrefixedHexString(),{maxFeePerGas:u,maxPriorityFeePerGas:d}=await(0,r.getTxGasEstimates)({networkAndAccountSupports1559:t,networkGasFeeEstimates:n,txParams:s,hexChainId:c}),f=(0,r.getHexMaxGasLimit)(s.gasLimit??0),m={...s,chainId:c,gasLimit:f,gas:f,maxFeePerGas:u,maxPriorityFeePerGas:d},p=await(0,o.addTransactionAndWaitForPublish)(m,{requireApproval:!1,type:a,swaps:i});return await(0,o.forceUpdateMetamaskState)(e),p}}};var a=e("react-redux"),o=e("../../../store/actions"),r=e("../../../ducks/bridge/utils"),s=e("../../../ducks/metamask/metamask"),i=e("../../../selectors"),l=e("../../../../shared/modules/Numeric")}}},{package:"$root$",file:"ui/pages/bridge/hooks/useHandleTx.ts"}],[6388,{"../../../helpers/constants/routes":6254,"../../../store/actions":7e3,"./useAddToken":6384,"./useHandleApprovalTx":6385,"./useHandleBridgeTx":6386,"ethereumjs-util":3796,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){const e=(0,r.useHistory)(),t=(0,a.useDispatch)(),{addSourceToken:n,addDestToken:d}=(0,l.default)(),{handleApprovalTx:f}=(0,c.default)(),{handleBridgeTx:m}=(0,u.default)();return{submitBridgeTransaction:async a=>{let r;null!=a&&a.approval&&(r=await f({approval:a.approval,quoteResponse:a})),await m({quoteResponse:a,approvalTxId:r}),a.quote.srcAsset.address!==(0,o.zeroAddress)()&&n(a),a.quote.destAsset.address!==(0,o.zeroAddress)()&&await d(a),await t((0,i.setDefaultHomeActiveTabName)("activity")),e.push(s.DEFAULT_ROUTE)}}};var a=e("react-redux"),o=e("ethereumjs-util"),r=e("react-router-dom"),s=e("../../../helpers/constants/routes"),i=e("../../../store/actions"),l=d(e("./useAddToken")),c=d(e("./useHandleApprovalTx")),u=d(e("./useHandleBridgeTx"));function d(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts"}],[6389,{"../../../shared/modules/selectors/networks":5320,"../../components/component-library":5806,"../../components/multichain/pages/page":6032,"../../contexts/i18n":6211,"../../ducks/bridge/actions":6224,"../../ducks/swaps/swaps":6244,"../../helpers/constants/routes":6254,"../../helpers/higher-order-components/feature-toggled-route":6265,"../../hooks/bridge/useBridging":6300,"../../hooks/useGasFeeEstimates":6331,"../../selectors":6985,"../../store/actions":7e3,"../swaps/hooks/useSwapsFeatureFlags":6933,"./prepare/bridge-cta-button":6394,"./prepare/prepare-bridge-page":6396,"ethereumjs-util":3796,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=w(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("react-router-dom"),s=e("ethereumjs-util"),i=e("../../contexts/i18n"),l=e("../../ducks/swaps/swaps"),c=e("../../helpers/constants/routes"),u=e("../../store/actions"),d=T(e("../../helpers/higher-order-components/feature-toggled-route")),f=e("../../components/component-library"),m=e("../../../shared/modules/selectors/networks"),p=e("../../selectors"),g=T(e("../../hooks/bridge/useBridging")),h=e("../../components/multichain/pages/page"),y=e("../swaps/hooks/useSwapsFeatureFlags"),v=e("../../ducks/bridge/actions"),x=e("../../hooks/useGasFeeEstimates"),b=T(e("./prepare/prepare-bridge-page")),k=e("./prepare/bridge-cta-button");function T(e){return e&&e.__esModule?e:{default:e}}function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(w=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,a.useContext)(i.I18nContext);(0,y.useSwapsFeatureFlags)(),(0,g.default)();const t=(0,r.useHistory)(),n=(0,o.useDispatch)(),T=(0,o.useSelector)(p.getIsBridgeEnabled),w=(0,o.useSelector)(m.getProviderConfig),C=(0,o.useSelector)(p.getIsBridgeChain),_=(0,o.useSelector)(p.getCurrentCurrency);(0,a.useEffect)((()=>{C&&T&&w&&_&&(n((0,v.setFromChain)(w.chainId)),n((0,v.setSrcTokenExchangeRates)({chainId:w.chainId,tokenAddress:(0,s.zeroAddress)(),currency:_})))}),[C,T,w,_]);const E=async()=>{await n((0,v.resetBridgeState)())};(0,a.useEffect)((()=>(E(),window.addEventListener("beforeunload",E),()=>{window.removeEventListener("beforeunload",E),E()})),[]),(0,x.useGasFeeEstimates)(null==w?void 0:w.id);return a.default.createElement("div",{className:"bridge"},a.default.createElement("div",{className:"bridge__container"},a.default.createElement(h.Header,{className:"bridge__header",startAccessory:a.default.createElement(f.ButtonIcon,{iconName:f.IconName.ArrowLeft,size:f.ButtonIconSize.Sm,ariaLabel:e("back"),onClick:async()=>{t.push({pathname:c.DEFAULT_ROUTE,state:{stayOnHomePage:!0}}),n((0,l.clearSwapsState)()),await n((0,u.resetBackgroundSwapsState)()),await E()}}),endAccessory:a.default.createElement(f.ButtonIcon,{iconName:f.IconName.Setting,size:f.ButtonIconSize.Sm,ariaLabel:e("settings")})},e("bridge")),a.default.createElement(h.Content,{className:"bridge__content"},a.default.createElement(r.Switch,null,a.default.createElement(d.default,{redirectRoute:c.SWAPS_MAINTENANCE_ROUTE,flag:T,path:c.CROSS_CHAIN_SWAP_ROUTE+c.PREPARE_SWAP_ROUTE,render:()=>a.default.createElement(b.default,null)}))),a.default.createElement(h.Footer,null,a.default.createElement(k.BridgeCTAButton,null))))}}}},{package:"$root$",file:"ui/pages/bridge/index.tsx"}],[6390,{"../../../components/component-library":5806,"../../../helpers/constants/design-system":6248,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../components/component-library"),s=e("../../../helpers/constants/design-system");function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;to.default.createElement(r.Container,i({display:s.Display.Flex,flexDirection:s.FlexDirection.Column,width:s.BlockSize.Full},e))}}},{package:"$root$",file:"ui/pages/bridge/layout/column.tsx"}],[6391,{"./column":6390,"./row":6392,"./tooltip":6393},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Column",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"Row",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"Tooltip",{enumerable:!0,get:function(){return r.default}});var a=s(e("./column")),o=s(e("./row")),r=s(e("./tooltip"));function s(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/pages/bridge/layout/index.tsx"}],[6392,{"../../../components/component-library":5806,"../../../helpers/constants/design-system":6248,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../components/component-library"),s=e("../../../helpers/constants/design-system");function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;to.default.createElement(r.Container,i({display:s.Display.Flex,flexDirection:s.FlexDirection.Row,justifyContent:s.JustifyContent.spaceBetween,flexWrap:s.FlexWrap.NoWrap,alignItems:s.AlignItems.center},e))}}},{package:"$root$",file:"ui/pages/bridge/layout/row.tsx"}],[6393,{"../../../components/component-library":5806,"../../../helpers/constants/design-system":6248,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(a,r,i):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("../../../components/component-library"),r=e("../../../helpers/constants/design-system");function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[c,u]=(0,a.useState)(!1),[d,f]=(0,a.useState)(null),m=()=>u(!1);return a.default.createElement(a.default.Fragment,null,a.default.createElement(o.Box,{ref:e=>f(e),onMouseEnter:()=>u(!0),onMouseLeave:m},n),!s&&a.default.createElement(o.Popover,i({position:o.PopoverPosition.Auto,referenceElement:d,isOpen:c,onClickOutside:m,style:{maxWidth:"240px",backgroundColor:"var(--color-text-default)",paddingInline:"16px",paddingTop:"8px",paddingBottom:"8px",transitionTimingFunction:"linear",display:"inherit"},preventOverflow:!0,flip:!0,hasArrow:!0},l),a.default.createElement(o.PopoverHeader,{color:r.TextColor.infoInverse,textAlign:r.TextAlign.Center},t),a.default.createElement(o.Text,{justifyContent:r.JustifyContent.center,color:r.TextColor.infoInverse},e)))}));n.default=l}}},{package:"$root$",file:"ui/pages/bridge/layout/tooltip.tsx"}],[6394,{"../../../components/component-library":5806,"../../../ducks/bridge/selectors":6226,"../../../hooks/useI18nContext":6334,"../hooks/useSubmitBridgeTransaction":6388,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BridgeCTAButton=void 0;var a,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("react-redux"),s=e("../../../components/component-library"),i=e("../../../ducks/bridge/selectors"),l=e("../../../hooks/useI18nContext"),c=(a=e("../hooks/useSubmitBridgeTransaction"))&&a.__esModule?a:{default:a};function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}n.BridgeCTAButton=()=>{const e=(0,r.useDispatch)(),t=(0,l.useI18nContext)(),n=(0,r.useSelector)(i.getFromToken),a=(0,r.useSelector)(i.getToToken),u=(0,r.useSelector)(i.getFromChain),d=(0,r.useSelector)(i.getToChain),f=(0,r.useSelector)(i.getFromAmount),{isLoading:m,activeQuote:p}=(0,r.useSelector)(i.getBridgeQuotes),{submitBridgeTransaction:g}=(0,c.default)(),h=n&&a&&u&&d&&f&&p,y=(0,o.useMemo)((()=>t(m&&!h?"swapFetchingQuotes":f?h?"confirm":"swapSelectToken":a?"bridgeEnterAmount":"bridgeSelectTokenAndAmount")),[m,f,a,h]);return o.default.createElement(s.Button,{"data-testid":"bridge-cta-button",onClick:()=>{h&&e(g(p))},disabled:!h},y)}}}},{package:"$root$",file:"ui/pages/bridge/prepare/bridge-cta-button.tsx"}],[6395,{"../../../../shared/constants/network":5264,"../../../../shared/constants/transaction":5278,"../../../../shared/modules/swaps.utils":5325,"../../../__mocks__/ethereumjs-util":5342,"../../../components/component-library":5806,"../../../components/multichain/asset-picker-amount/asset-picker":5915,"../../../components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal-tabs":5912,"../../../components/ui/currency-display":6094,"../../../components/ui/tooltip":6197,"../../../ducks/bridge/selectors":6226,"../../../hooks/bridge/useLatestBalance":6302,"../../../hooks/useEthFiatAmount":6329,"../../../hooks/useI18nContext":6334,"../../../hooks/useTokenFiatAmount":6360,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BridgeInputGroup=void 0;var a=x(e("react")),o=e("react-redux"),r=e("../../../components/component-library"),s=e("../../../components/multichain/asset-picker-amount/asset-picker"),i=e("../../../components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal-tabs"),l=x(e("../../../components/ui/currency-display")),c=e("../../../hooks/useI18nContext"),u=e("../../../hooks/useTokenFiatAmount"),d=e("../../../hooks/useEthFiatAmount"),f=e("../../../../shared/modules/swaps.utils"),m=x(e("../../../components/ui/tooltip")),p=e("../../../__mocks__/ethereumjs-util"),g=e("../../../../shared/constants/transaction"),h=e("../../../../shared/constants/network"),y=x(e("../../../hooks/bridge/useLatestBalance")),v=e("../../../ducks/bridge/selectors");function x(e){return e&&e.__esModule?e:{default:e}}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var _,E,I,S,P,M;const D=(0,c.useI18nContext)(),{isLoading:A,activeQuote:O}=(0,o.useSelector)(v.getBridgeQuotes),F=(0,u.useTokenFiatAmount)((null==n?void 0:n.address)||undefined,(null==C||null===(_=C.value)||void 0===_?void 0:_.toString())||"0x0",null==n?void 0:n.symbol,{showFiat:!0},!0),N=(0,d.useEthFiatAmount)((null==C||null===(E=C.value)||void 0===E?void 0:E.toString())||"0x0",{showFiat:!0},!0),{formattedBalance:R}=(0,y.default)(n,null==T||null===(I=T.network)||void 0===I?void 0:I.chainId);return a.default.createElement(r.Box,{className:e},a.default.createElement(r.Box,{className:"prepare-bridge-page__input-row"},a.default.createElement(s.AssetPicker,{header:t,visibleTabs:[i.TabName.TOKENS],asset:null!=T&&null!==(S=T.network)&&void 0!==S&&S.chainId&&n?(j=T.network.chainId,B=n,"iconUrl"in B&&B.address!==(0,p.zeroAddress)()?{type:g.AssetType.token,image:B.iconUrl,symbol:B.symbol,address:B.address}:{type:g.AssetType.native,image:h.CHAIN_ID_TOKEN_IMAGE_MAP[j],symbol:h.CHAIN_ID_TO_CURRENCY_SYMBOL_MAP[j]}):undefined,onAssetChange:x,networkProps:T,customTokenListGenerator:w}),a.default.createElement(m.default,{containerClassName:"amount-tooltip",position:"top",title:C.value,disabled:((null===(P=C.value)||void 0===P||null===(P=P.toString())||void 0===P?void 0:P.length)??0)<12,arrow:!0,hideOnClick:!1,style:{display:"inherit"}},a.default.createElement(r.TextField,b({type:r.TextFieldType.Number,className:"amount-input",placeholder:A&&!O?D("bridgeCalculatingAmount"):"0",onChange:e=>{null==k||k(e.target.value)}},C)))),a.default.createElement(r.Box,{className:"prepare-bridge-page__amounts-row"},a.default.createElement(r.Text,null,R?`${D("balance")}: ${R}`:" "),a.default.createElement(l.default,{currency:"usd",displayValue:null!=n&&n.symbol&&null!=T&&null!==(M=T.network)&&void 0!==M&&M.chainId&&(0,f.isSwapsDefaultTokenSymbol)(n.symbol,T.network.chainId)?N:F,hideLabel:!0})));var j,B}}}},{package:"$root$",file:"ui/pages/bridge/prepare/bridge-input-group.tsx"}],[6396,{"../../../../shared/constants/swaps":5274,"../../../../shared/constants/time":5276,"../../../../shared/lib/swaps-utils":5288,"../../../../shared/modules/conversion.utils":5301,"../../../../shared/modules/selectors/networks":5320,"../../../components/component-library":5806,"../../../ducks/bridge/actions":6224,"../../../ducks/bridge/selectors":6226,"../../../helpers/constants/design-system":6248,"../../../hooks/useI18nContext":6334,"../../../hooks/useTokensWithFiltering":6365,"../../../selectors":6985,"../../../store/actions":7e3,"../quotes/bridge-quote-card":6397,"../utils/quote":6401,"./bridge-input-group":6395,classnames:3584,"ethereumjs-util":3796,lodash:4380,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=E(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("react-redux"),s=(a=e("classnames"))&&a.__esModule?a:{default:a},i=e("lodash"),l=e("ethereumjs-util"),c=e("react-router-dom"),u=e("../../../ducks/bridge/actions"),d=e("../../../ducks/bridge/selectors"),f=e("../../../components/component-library"),m=e("../../../helpers/constants/design-system"),p=e("../../../hooks/useI18nContext"),g=e("../../../../shared/constants/swaps"),h=e("../../../hooks/useTokensWithFiltering"),y=e("../../../store/actions"),v=e("../../../../shared/modules/conversion.utils"),x=e("../../../../shared/lib/swaps-utils"),b=e("../quotes/bridge-quote-card"),k=e("../utils/quote"),T=e("../../../../shared/modules/selectors/networks"),w=e("../../../selectors"),C=e("../../../../shared/constants/time"),_=e("./bridge-input-group");function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(E=function(e){return e?n:t})(e)}n.default=()=>{var e;const t=(0,r.useDispatch)(),n=(0,p.useI18nContext)(),a=(0,r.useSelector)(w.getCurrentCurrency),E=(0,r.useSelector)(d.getFromToken),I=(0,r.useSelector)(d.getFromTokens),S=(0,r.useSelector)(d.getFromTopAssets),P=(0,r.useSelector)(d.getToToken),M=(0,r.useSelector)(d.getToTokens),D=(0,r.useSelector)(d.getToTopAssets),A=(0,r.useSelector)(d.getFromChains),O=(0,r.useSelector)(d.getToChains),F=(0,r.useSelector)(d.getFromChain),N=(0,r.useSelector)(d.getToChain),R=(0,r.useSelector)(d.getFromAmount),j=(0,r.useSelector)(T.getProviderConfig),B=(0,r.useSelector)(d.getQuoteRequest),{activeQuote:$}=(0,r.useSelector)(d.getBridgeQuotes),W=(0,h.useTokensWithFiltering)(I,S,g.TokenBucketPriority.owned,null==F?void 0:F.chainId),L=(0,h.useTokensWithFiltering)(M,D,g.TokenBucketPriority.top,null==N?void 0:N.chainId),[G,q]=(0,o.useState)(!1),V=(0,o.useMemo)((()=>{var e;return{srcTokenAddress:null==E?void 0:E.address,destTokenAddress:(null==P?void 0:P.address)||undefined,srcTokenAmount:R&&""!==R&&null!=E&&E.decimals?(0,x.calcTokenValue)(R,E.decimals).toString():undefined,srcChainId:null!=F&&F.chainId?Number((0,v.hexToDecimal)(F.chainId)):undefined,destChainId:null!=N&&N.chainId?Number((0,v.hexToDecimal)(N.chainId)):undefined,insufficientBal:Boolean(null==j||null===(e=j.rpcUrl)||void 0===e?void 0:e.includes("tenderly"))}}),[E,P,null==F?void 0:F.chainId,null==N?void 0:N.chainId,R,j]),H=(0,o.useCallback)((0,i.debounce)((e=>{t((0,u.updateQuoteRequestParams)(e)),t((0,u.setSelectedQuote)(null))}),300),[]);(0,o.useEffect)((()=>{H(V)}),Object.values(V));const U=(0,i.debounce)(((e,n)=>{t((0,u.setSrcTokenExchangeRates)({chainId:e,tokenAddress:n,currency:a}))}),C.SECOND),z=(0,i.debounce)(((e,n)=>{t((0,u.setDestTokenExchangeRates)({chainId:e,tokenAddress:n,currency:a}))}),C.SECOND),{search:K}=(0,c.useLocation)(),Y=(0,c.useHistory)();return(0,o.useEffect)((()=>{var e,n;if(null==F||!F.chainId||0===Object.keys(I).length)return;const a=new URLSearchParams(K),o=a.get("token");if(!o)return;const r=()=>{const e=new URLSearchParams(a);e.delete("token"),Y.replace({search:e.toString()})};switch(o){case null==E||null===(e=E.address)||void 0===e?void 0:e.toLowerCase():r();break;case null===(n=I[o])||void 0===n||null===(n=n.address)||void 0===n?void 0:n.toLowerCase():{const e=I[o];t((0,u.setFromToken)(e)),U(F.chainId,e.address),r();break}default:r()}}),[F,E,I,K]),o.default.createElement("div",{className:"prepare-bridge-page"},o.default.createElement(f.Box,{className:"prepare-bridge-page__content"},o.default.createElement(_.BridgeInputGroup,{className:"bridge-box",header:n("bridgeFrom"),token:E,onAmountChange:e=>{t((0,u.setFromTokenInputValue)(e))},onAssetChange:e=>{t((0,u.setFromToken)(e)),t((0,u.setFromTokenInputValue)(null)),(null==F?void 0:F.chainId)&&(null==e?void 0:e.address)&&U(F.chainId,e.address)},networkProps:{network:F,networks:A,onNetworkChange:e=>{t((0,y.setActiveNetwork)(e.rpcEndpoints[e.defaultRpcEndpointIndex].networkClientId)),t((0,u.setFromChain)(e.chainId)),t((0,u.setFromToken)(null)),t((0,u.setFromTokenInputValue)(null))}},customTokenListGenerator:I&&S?W:undefined,amountFieldProps:{testId:"from-amount",autoFocus:!0,value:R||undefined}}),o.default.createElement(f.Box,{className:"prepare-bridge-page__switch-tokens"},o.default.createElement(f.ButtonIcon,{iconProps:{className:(0,s.default)({rotate:G})},width:m.BlockSize.Full,"data-testid":"switch-tokens",ariaLabel:"switch-tokens",iconName:f.IconName.Arrow2Down,disabled:!(0,k.isValidQuoteRequest)(B,!1),onClick:()=>{q(!G);const e=(null==N?void 0:N.defaultRpcEndpointIndex)!==undefined&&null!=N&&N.rpcEndpoints?N.rpcEndpoints[N.defaultRpcEndpointIndex].networkClientId:undefined;e&&t((0,y.setActiveNetwork)(e)),N&&t((0,u.setFromChain)(N.chainId)),t((0,u.setFromToken)(P)),t((0,u.setFromTokenInputValue)(null)),(null==F?void 0:F.chainId)&&t((0,u.setToChain)(F.chainId)),(null==F?void 0:F.chainId)&&t((0,u.setToChainId)(F.chainId)),t((0,u.setToToken)(E)),(null==F?void 0:F.chainId)&&(null==E?void 0:E.address)&&z(F.chainId,E.address),(null==N?void 0:N.chainId)&&(null==P?void 0:P.address)&&P.address!==(0,l.zeroAddress)()&&U(N.chainId,P.address)}})),o.default.createElement(_.BridgeInputGroup,{className:"bridge-box",header:n("bridgeTo"),token:P,onAssetChange:e=>{t((0,u.setToToken)(e)),(null==N?void 0:N.chainId)&&(null==e?void 0:e.address)&&z(N.chainId,e.address)},networkProps:{network:N,networks:O,onNetworkChange:e=>{t((0,u.setToChainId)(e.chainId)),t((0,u.setToChain)(e.chainId))}},customTokenListGenerator:N&&M&&D?L:W,amountFieldProps:{testId:"to-amount",readOnly:!0,disabled:!0,value:(null==$||null===(e=$.toTokenAmount)||void 0===e?void 0:e.amount.toFixed())??"0",className:null!=$&&$.toTokenAmount.amount?"amount-input defined":"amount-input"}})),o.default.createElement(b.BridgeQuoteCard,null))}}}},{package:"$root$",file:"ui/pages/bridge/prepare/prepare-bridge-page.tsx"}],[6397,{"../../../components/component-library":5806,"../../../ducks/bridge/selectors":6226,"../../../ducks/metamask/metamask":6236,"../../../hooks/bridge/useCountdownTimer":6301,"../../../hooks/useI18nContext":6334,"../../../selectors":6985,"../../swaps/mascot-background-animation/mascot-background-animation":6942,"../utils/quote":6401,"./bridge-quotes-modal":6398,"./quote-info-row":6399,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BridgeQuoteCard=void 0;var a,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("react-redux"),s=e("../../../components/component-library"),i=e("../../../ducks/bridge/selectors"),l=e("../../../hooks/useI18nContext"),c=e("../utils/quote"),u=e("../../../hooks/bridge/useCountdownTimer"),d=(a=e("../../swaps/mascot-background-animation/mascot-background-animation"))&&a.__esModule?a:{default:a},f=e("../../../selectors"),m=e("../../../ducks/metamask/metamask"),p=e("./quote-info-row"),g=e("./bridge-quotes-modal");function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}n.BridgeQuoteCard=()=>{var e,t,n,a;const h=(0,l.useI18nContext)(),{isLoading:y,isQuoteGoingToRefresh:v,activeQuote:x}=(0,r.useSelector)(i.getBridgeQuotes),b=(0,r.useSelector)(f.getCurrentCurrency),k=(0,r.useSelector)(m.getNativeCurrency),T=(0,u.useCountdownTimer)(),[w,C]=(0,o.useState)(!1);return y&&!x?o.default.createElement(s.Box,null,o.default.createElement(d.default,null)):x?o.default.createElement(s.Box,{className:"quote-card"},o.default.createElement(g.BridgeQuotesModal,{isOpen:w,onClose:()=>C(!1)}),o.default.createElement(s.Box,{className:"bridge-box quote-card__timer"},!y&&v&&o.default.createElement(s.Text,null,h("swapNewQuoteIn",[T]))),o.default.createElement(s.Box,{className:"bridge-box prepare-bridge-page__content quote-card__content"},o.default.createElement(p.QuoteInfoRow,{label:h("estimatedTime"),tooltipText:h("bridgeTimingTooltipText"),description:h("bridgeTimingMinutes",[(0,c.formatEtaInMinutes)(x.estimatedProcessingTimeInSeconds)])}),x.swapRate&&o.default.createElement(p.QuoteInfoRow,{label:h("quoteRate"),description:`1 ${x.quote.srcAsset.symbol} = ${(0,c.formatTokenAmount)(x.swapRate,x.quote.destAsset.symbol)}`}),x.totalNetworkFee&&o.default.createElement(p.QuoteInfoRow,{label:h("totalFees"),tooltipText:h("bridgeTotalFeesTooltipText"),description:(0,c.formatFiatAmount)(null===(e=x.totalNetworkFee)||void 0===e?void 0:e.fiat,b,2)??(0,c.formatTokenAmount)(null===(t=x.totalNetworkFee)||void 0===t?void 0:t.amount,k,6),secondaryDescription:null!==(n=x.totalNetworkFee)&&void 0!==n&&n.fiat?(0,c.formatTokenAmount)(null===(a=x.totalNetworkFee)||void 0===a?void 0:a.amount,k,6):undefined})),o.default.createElement(s.Box,{className:"bridge-box quote-card__footer"},o.default.createElement("span",null,o.default.createElement(s.Text,null,h("swapIncludesMMFee",[.875])),o.default.createElement(s.Button,{variant:s.ButtonVariant.Link,onClick:()=>{C(!0)}},o.default.createElement(s.Text,null,h("viewAllQuotes")))),o.default.createElement(s.Button,{variant:s.ButtonVariant.Link},o.default.createElement(s.Text,null,h("termsOfService"))))):null}}}},{package:"$root$",file:"ui/pages/bridge/quotes/bridge-quote-card.tsx"}],[6398,{"../../../components/component-library":5806,"../../../ducks/bridge/actions":6224,"../../../ducks/bridge/selectors":6226,"../../../ducks/metamask/metamask":6236,"../../../helpers/constants/design-system":6248,"../../../hooks/useI18nContext":6334,"../../../selectors":6985,"../layout":6391,"../types":6400,"../utils/quote":6401,"@metamask/snaps-sdk/jsx":2627,lodash:4380,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BridgeQuotesModal=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("@metamask/snaps-sdk/jsx"),s=e("react-redux"),i=e("lodash"),l=e("../../../components/component-library"),c=e("../../../helpers/constants/design-system"),u=e("../utils/quote"),d=e("../../../hooks/useI18nContext"),f=e("../../../selectors"),m=e("../../../ducks/bridge/actions"),p=e("../types"),g=e("../../../ducks/bridge/selectors"),h=e("../layout"),y=e("../../../ducks/metamask/metamask");function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const n=(0,d.useI18nContext)(),a=(0,s.useDispatch)(),{sortedQuotes:x,activeQuote:b}=(0,s.useSelector)(g.getBridgeQuotes),k=(0,s.useSelector)(g.getBridgeSortOrder),T=(0,s.useSelector)(f.getCurrentCurrency),w=(0,s.useSelector)(y.getNativeCurrency);return o.default.createElement(l.Modal,v({className:"quotes-modal",onClose:e},t),o.default.createElement(l.ModalOverlay,null),o.default.createElement(l.ModalContent,{modalDialogProps:{padding:0}},o.default.createElement(l.ModalHeader,{onBack:e},o.default.createElement(l.Text,{variant:c.TextVariant.headingSm,textAlign:c.TextAlign.Center},n("swapSelectAQuote"))),o.default.createElement(h.Row,{padding:[4,3],paddingBottom:1},[[p.SortOrder.COST_ASC,n("bridgeNetCost"),r.IconName.Arrow2Up],[p.SortOrder.ETA_ASC,n("time"),r.IconName.Arrow2Down]].map((([e,t,n])=>o.default.createElement(l.ButtonLink,{key:t,onClick:()=>a((0,m.setSortOrder)(e)),startIconName:k===e&&k===p.SortOrder.ETA_ASC?n:undefined,startIconProps:{size:l.IconSize.Xs},endIconName:k===e&&k===p.SortOrder.COST_ASC?n:undefined,endIconProps:{size:l.IconSize.Xs},color:k===e?c.TextColor.primaryDefault:c.TextColor.textAlternative},o.default.createElement(l.Text,{variant:c.TextVariant.bodySm,color:k===e?c.TextColor.primaryDefault:c.TextColor.textAlternative},t))))),o.default.createElement(h.Column,{style:{overflow:"scroll"}},x.map(((t,r)=>{const{totalNetworkFee:s,estimatedProcessingTimeInSeconds:d,toTokenAmount:f,cost:g,quote:{destAsset:y,bridges:v,requestId:x}}=t,C=x===(null==b?void 0:b.quote.requestId);return o.default.createElement(h.Row,{alignItems:c.AlignItems.flexStart,key:r,backgroundColor:C?c.BackgroundColor.primaryMuted:undefined,onClick:()=>{a((0,m.setSelectedQuote)(t)),e()},paddingInline:4,paddingTop:3,paddingBottom:3,style:{position:"relative",height:78}},C&&o.default.createElement(h.Column,{style:{position:"absolute",left:4,top:4,height:70,width:4,borderRadius:8},backgroundColor:c.BackgroundColor.primaryDefault}),o.default.createElement(h.Column,null,o.default.createElement(l.Text,{variant:c.TextVariant.bodyMd},g.fiat&&(0,u.formatFiatAmount)(g.fiat,T,0)),[null!=s&&s.fiat?n("quotedNetworkFee",[(0,u.formatFiatAmount)(s.fiat,T,0)]):n("quotedNetworkFee",[(0,u.formatTokenAmount)(s.amount,w)]),n(k===p.SortOrder.ETA_ASC?"quotedReceivingAmount":"quotedReceiveAmount",[(0,u.formatFiatAmount)(f.fiat,T,0)??(0,u.formatTokenAmount)(f.amount,y.symbol,0)])][k===p.SortOrder.ETA_ASC?"reverse":"slice"]().map((e=>o.default.createElement(l.Text,{key:e,variant:c.TextVariant.bodyXsMedium,color:c.TextColor.textAlternative},e)))),o.default.createElement(h.Column,{alignItems:c.AlignItems.flexEnd},o.default.createElement(l.Text,{variant:c.TextVariant.bodyMd},n("bridgeTimingMinutes",[(0,u.formatEtaInMinutes)(d)])),o.default.createElement(l.Text,{variant:c.TextVariant.bodyXsMedium,color:c.TextColor.textAlternative},(0,i.startCase)(v[0]))))})))))}}}},{package:"$root$",file:"ui/pages/bridge/quotes/bridge-quotes-modal.tsx"}],[6399,{"../../../components/component-library":5806,"../../../components/ui/tooltip":6197,"../../../helpers/constants/design-system":6248,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.QuoteInfoRow=void 0;var a=i(e("react")),o=e("../../../components/component-library"),r=i(e("../../../components/ui/tooltip")),s=e("../../../helpers/constants/design-system");function i(e){return e&&e.__esModule?e:{default:e}}n.QuoteInfoRow=({label:e,tooltipText:t,description:n,secondaryDescription:i})=>a.default.createElement(o.Box,{className:"quote-card__info-row"},a.default.createElement(o.Box,{className:"quote-card__info-row__label"},a.default.createElement(o.Text,null,e),t&&a.default.createElement(r.default,{position:"top",title:t,containerClassName:"quote-card__info-row__label__tooltip",style:{display:"flex"}},a.default.createElement(o.Icon,{color:s.IconColor.iconMuted,name:o.IconName.Question,size:o.IconSize.Sm}))),a.default.createElement(o.Box,{className:"quote-card__info-row__description"},a.default.createElement(o.Box,{className:"quote-card__info-row__description__secondary"},a.default.createElement(o.Text,null,i)),a.default.createElement(o.Text,null,n)))}}},{package:"$root$",file:"ui/pages/bridge/quotes/quote-info-row.tsx"}],[6403,{"../../../shared/constants/metametrics":5260,"../../../shared/constants/network":5264,"../../../shared/constants/transaction":5278,"../../../shared/modules/selectors/networks":5320,"../../../shared/modules/string-utils":5324,"../../components/app/assets/nfts/nft-default-image/nft-default-image":5376,"../../components/app/network-account-balance-header/network-account-balance-header":5535,"../../components/component-library":5806,"../../components/ui/page-container":6160,"../../components/ui/site-origin/site-origin":6178,"../../contexts/i18n":6211,"../../contexts/metametrics":6214,"../../ducks/history/history":6233,"../../helpers/constants/common":6246,"../../helpers/constants/design-system":6248,"../../helpers/utils/util":6297,"../../hooks/useCurrencyDisplay":6324,"../../hooks/useOriginMetadata":6345,"../../hooks/useUserPreferencedCurrency":6368,"../../selectors":6985,"../../store/actions":7e3,"@metamask/etherscan-link":1752,"@metamask/rpc-errors":2304,classnames:3584,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=D(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("react-router-dom"),s=e("@metamask/rpc-errors"),i=e("@metamask/etherscan-link"),l=M(e("classnames")),c=e("../../components/ui/page-container"),u=e("../../contexts/i18n"),d=e("../../contexts/metametrics"),f=e("../../ducks/history/history"),m=e("../../store/actions"),p=e("../../../shared/constants/metametrics"),g=e("../../../shared/constants/transaction"),h=e("../../components/component-library"),y=e("../../../shared/modules/selectors/networks"),v=e("../../selectors"),x=M(e("../../components/app/assets/nfts/nft-default-image/nft-default-image")),b=e("../../helpers/utils/util"),k=e("../../helpers/constants/design-system"),T=M(e("../../components/app/network-account-balance-header/network-account-balance-header")),w=e("../../../shared/constants/network"),C=M(e("../../components/ui/site-origin/site-origin")),_=e("../../helpers/constants/common"),E=e("../../hooks/useUserPreferencedCurrency"),I=e("../../hooks/useCurrencyDisplay"),S=e("../../hooks/useOriginMetadata"),P=e("../../../shared/modules/string-utils");function M(e){return e&&e.__esModule?e:{default:e}}function D(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(D=function(e){return e?n:t})(e)}n.default=()=>{var e;const t=(0,a.useContext)(u.I18nContext),n=(0,o.useDispatch)(),M=(0,r.useHistory)(),D=(0,o.useSelector)(f.getMostRecentOverviewPage),A=(0,o.useSelector)(v.getSuggestedNfts).sort(((e,t)=>e.requestData.asset.tokenId-t.requestData.asset.tokenId)),O=(0,o.useSelector)(v.getRpcPrefsForCurrentProvider),F=(0,o.useSelector)(y.getCurrentChainId),N=(0,o.useSelector)(v.getIpfsGateway),R=(0,a.useContext)(d.MetaMetricsContext),j=(0,o.useSelector)(v.getNetworkIdentifier),{address:B}=(0,o.useSelector)(v.getSelectedInternalAccount),$=(0,o.useSelector)(v.getSelectedAccountCachedBalance),W=(0,o.useSelector)((e=>(0,v.getAddressBookEntryOrAccountName)(e,B))),[L,G]=(0,a.useState)([]),q=w.NETWORK_TO_NAME_MAP[F]||j,{currency:V,numberOfDecimals:H}=(0,E.useUserPreferencedCurrency)(_.PRIMARY,{ethNumberOfDecimals:4}),[U]=(0,I.useCurrencyDisplay)($,{numberOfDecimals:H,currency:V}),z=(0,S.useOriginMetadata)(null===(e=A[0])||void 0===e?void 0:e.origin)||{},K=(0,a.useCallback)((async()=>{await Promise.all(A.map((async({requestData:{asset:e},id:t})=>{await n((0,m.resolvePendingApproval)(t,null)),R({event:p.MetaMetricsEventName.NftAdded,category:p.MetaMetricsEventCategory.Wallet,sensitiveProperties:{token_contract_address:e.address,token_symbol:e.symbol,token_id:e.tokenId,token_standard:e.standard,asset_type:g.AssetType.NFT,source:p.MetaMetricsTokenEventSource.Dapp}})}))),M.push(D)}),[n,M,R,D,A]),Y=(0,a.useCallback)((async()=>{await Promise.all(A.map((async({id:e})=>n((0,m.rejectPendingApproval)(e,(0,s.serializeError)(s.providerErrors.userRejectedRequest())))))),M.push(D)}),[n,M,D,A]);let J,Q;if((0,a.useEffect)((()=>{A.length||M.push(D)}),[M,D,A]),A.length)try{const e=new URL(A[0].origin);J=e.host,Q=e.href}catch{J="dapp"}return(0,a.useEffect)((()=>{(async()=>{const e=await Promise.all(A.map((async e=>{const t=await(0,b.getAssetImageURL)(e.requestData.asset.image,N);return{...e,requestData:{...e.requestData,asset:{...e.requestData.asset,assetImageUrl:t}}}})));G(e)})()}),[]),a.default.createElement(h.Box,{height:k.BlockSize.Full,width:k.BlockSize.Full,display:k.Display.Flex,flexDirection:k.FlexDirection.Column},a.default.createElement(h.Box,{paddingBottom:2,className:"confirm-add-suggested-nft__header"},a.default.createElement(T.default,{accountName:W,accountBalance:U,accountAddress:B,networkName:q,chainId:F}),a.default.createElement(h.Box,{paddingTop:4,paddingRight:4,paddingLeft:4,display:k.Display.Flex,justifyContent:k.JustifyContent.center},a.default.createElement(C.default,{chip:!0,siteOrigin:z.origin,title:z.origin,iconSrc:z.iconUrl,iconName:z.hostname})),a.default.createElement(h.Text,{variant:k.TextVariant.headingLg,textAlign:k.TextAlign.Center,margin:2},t("addSuggestedNFTs")),a.default.createElement(h.Text,{variant:k.TextVariant.bodyMd,textAlign:k.TextAlign.Center},t("wantsToAddThisAsset",["dapp"===J?a.default.createElement(h.Text,{key:J,variant:k.TextVariant.bodyMd,fontWeight:"bold"},J):a.default.createElement(h.ButtonLink,{key:J,size:h.BUTTON_SIZES.INHERIT,href:Q,target:"_blank"},J)]))),a.default.createElement(h.Box,{className:"confirm-add-suggested-nft__content"},a.default.createElement(h.Box,{className:"confirm-add-suggested-nft__card",padding:2,borderRadius:k.BorderRadius.MD},a.default.createElement(h.Box,{className:(0,l.default)({"confirm-add-suggested-nft__nft-list":A.length>1})},A.map((({id:e,requestData:{asset:{address:t,tokenId:o,symbol:r,name:l}}})=>{const c=L.find((e=>e.requestData.asset.tokenId===o&&(0,P.isEqualCaseInsensitive)(e.requestData.asset.address,t))),u=c?c.requestData.asset.assetImageUrl:"",d=(0,i.getTokenTrackerLink)(t,F,null,null,{blockExplorerUrl:(null==O?void 0:O.blockExplorerUrl)??null});return 1===A.length?a.default.createElement(h.Box,{className:"confirm-add-suggested-nft__nft-single",key:`confirm-add-suggested-nft__nft-single-${e}`,borderRadius:k.BorderRadius.MD,margin:0,padding:0},u?a.default.createElement("img",{className:"confirm-add-suggested-nft__nft-single-image",src:u,alt:l||o}):a.default.createElement(x.default,{className:"confirm-add-suggested-nft__nft-single-image-default",tokenId:o,name:l||r||(0,b.shortenAddress)(t)}),a.default.createElement(h.Box,{padding:1,display:k.Display.Flex,flexDirection:k.FlexDirection.Row,justifyContent:k.JustifyContent.spaceBetween,alignItems:k.AlignItems.Center},a.default.createElement(h.Box,{display:k.Display.Flex,flexDirection:k.FlexDirection.Column,justifyContent:k.JustifyContent.spaceEvenly,flexWrap:k.FlexWrap.NoWrap,width:k.BlockSize.Full,className:"confirm-add-suggested-nft__nft-single-sub-details"},O.blockExplorerUrl?a.default.createElement(h.ButtonLink,{className:"confirm-add-suggested-nft__nft-name",href:d,title:t,target:"_blank",size:h.BUTTON_SIZES.INHERIT},l||r||(0,b.shortenAddress)(t)):a.default.createElement(h.Text,{variant:k.TextVariant.bodyMd,className:"confirm-add-suggested-nft__nft-name",title:t},l||r||(0,b.shortenAddress)(t)),a.default.createElement(h.Text,{variant:k.TextVariant.bodyMd,color:k.TextColor.textAlternative,className:"confirm-add-suggested-nft__nft-tokenId"},"#",o)))):a.default.createElement(h.Box,{display:k.Display.Flex,flexDirection:k.FlexDirection.Row,flexWrap:k.FlexWrap.NoWrap,alignItems:k.AlignItems.Center,justifyContent:k.JustifyContent.spaceBetween,marginBottom:4,className:"confirm-add-suggested-nft__nft-list-item",key:`${t}-${o}`},a.default.createElement(h.Box,{display:k.Display.Flex,flexDirection:k.FlexDirection.Row,flexWrap:k.FlexWrap.NoWrap,alignItems:k.AlignItems.Center,justifyContent:k.JustifyContent.spaceBetween},u?a.default.createElement("img",{className:"confirm-add-suggested-nft__nft-image",src:u,alt:l||o}):a.default.createElement(x.default,{className:"confirm-add-suggested-nft__nft-image-default"}),a.default.createElement(h.Box,{display:k.Display.Flex,flexDirection:k.FlexDirection.Column,justifyContent:k.JustifyContent.spaceEvenly,flexWrap:k.FlexWrap.NoWrap,width:k.BlockSize.Full,className:"confirm-add-suggested-nft__nft-sub-details"},O.blockExplorerUrl?a.default.createElement(h.ButtonLink,{className:"confirm-add-suggested-nft__nft-name",href:d,title:t,target:"_blank",size:h.BUTTON_SIZES.INHERIT},l||r||(0,b.shortenAddress)(t)):a.default.createElement(h.Text,{variant:k.TextVariant.bodySm,className:"confirm-add-suggested-nft__nft-name",title:t},l||r||(0,b.shortenAddress)(t)),a.default.createElement(h.Text,{variant:k.TextVariant.bodySm,color:k.TextColor.textAlternative,className:"confirm-add-suggested-nft__nft-tokenId"},"#",o))),a.default.createElement(h.ButtonIcon,{className:"confirm-add-suggested-nft__nft-remove","data-testid":`confirm-add-suggested-nft__nft-remove-${e}`,iconName:h.IconName.Close,size:h.ButtonIconSize.Sm,color:k.IconColor.iconMuted,onClick:t=>{t.preventDefault(),t.stopPropagation(),n((0,m.rejectPendingApproval)(e,(0,s.serializeError)(s.providerErrors.userRejectedRequest())))}}))}))))),a.default.createElement(c.PageContainerFooter,{cancelText:t("cancel"),submitText:1===A.length?t("addNft"):t("addNfts"),onCancel:Y,onSubmit:K}))}}}},{package:"$root$",file:"ui/pages/confirm-add-suggested-nft/confirm-add-suggested-nft.js"}],[6404,{"./confirm-add-suggested-nft":6403},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-add-suggested-nft"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirm-add-suggested-nft/index.js"}],[6405,{"../../../shared/constants/metametrics":5260,"../../../shared/constants/transaction":5278,"../../../shared/modules/string-utils":5324,"../../components/component-library":5806,"../../components/ui/identicon":6133,"../../components/ui/page-container":6160,"../../components/ui/token-balance":6195,"../../contexts/i18n":6211,"../../contexts/metametrics":6214,"../../ducks/history/history":6233,"../../ducks/metamask/metamask":6236,"../../helpers/constants/design-system":6248,"../../helpers/constants/zendesk-url":6261,"../../selectors":6985,"../../store/actions":7e3,"@metamask/rpc-errors":2304,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=w(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("react-router-dom"),s=e("@metamask/rpc-errors"),i=e("../../components/component-library"),l=T(e("../../components/ui/identicon")),c=T(e("../../components/ui/token-balance")),u=e("../../components/ui/page-container"),d=e("../../contexts/i18n"),f=e("../../contexts/metametrics"),m=e("../../ducks/history/history"),p=e("../../ducks/metamask/metamask"),g=T(e("../../helpers/constants/zendesk-url")),h=e("../../../shared/modules/string-utils"),y=e("../../store/actions"),v=e("../../../shared/constants/metametrics"),x=e("../../../shared/constants/transaction"),b=e("../../selectors"),k=e("../../helpers/constants/design-system");function T(e){return e&&e.__esModule?e:{default:e}}function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(w=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,a.useContext)(d.I18nContext),t=(0,o.useDispatch)(),n=(0,r.useHistory)(),T=(0,o.useSelector)(m.getMostRecentOverviewPage),w=(0,o.useSelector)(b.getSuggestedTokens),C=(0,o.useSelector)(p.getTokens),_=(0,a.useContext)(f.MetaMetricsContext),E=(0,a.useMemo)((()=>function(e,t){const n=e.find((({requestData:{asset:e}})=>{const n=t.find((({address:t})=>(0,h.isEqualCaseInsensitive)(t,null==e?void 0:e.address)));return Boolean(n)}));return Boolean(n)}(w,C)&&a.default.createElement(i.BannerAlert,{severity:k.Severity.Warning,marginTop:4},e("knownTokenWarning",[a.default.createElement(i.Button,{variant:i.ButtonVariant.Link,key:"confirm-add-suggested-token-duplicate-warning",className:"confirm-add-suggested-token__link",externalLink:!0,size:i.ButtonLinkSize.Inherit,href:g.default.TOKEN_SAFETY_PRACTICES},e("learnScamRisk"))]))),[w,C,e]),I=(0,a.useMemo)((()=>function(e,t){const n=e.find((({requestData:{asset:e}})=>{const n=t.find((t=>(0,h.isEqualCaseInsensitive)(t.symbol,null==e?void 0:e.symbol)&&!(0,h.isEqualCaseInsensitive)(t.address,null==e?void 0:e.address)));return Boolean(n)}));return Boolean(n)}(w,C)&&a.default.createElement(i.BannerAlert,{marginTop:4,severity:k.Severity.Warning,description:e("reusedTokenNameWarning")})),[w,C,e]),S=(0,a.useCallback)((async()=>{await Promise.all(w.map((async({requestData:{asset:e},id:n})=>{await t((0,y.resolvePendingApproval)(n,null)),_({event:v.MetaMetricsEventName.TokenAdded,category:v.MetaMetricsEventCategory.Wallet,sensitiveProperties:{token_symbol:e.symbol,token_contract_address:e.address,token_decimal_precision:e.decimals,unlisted:e.unlisted,source:v.MetaMetricsTokenEventSource.Dapp,token_standard:x.TokenStandard.ERC20,asset_type:x.AssetType.token}})}))),n.push(T)}),[t,n,_,T,w]),P=(0,a.useCallback)((async()=>{await Promise.all(w.map((({id:e})=>t((0,y.rejectPendingApproval)(e,(0,s.serializeError)(s.providerErrors.userRejectedRequest())))))),n.push(T)}),[t,n,T,w]);return(0,a.useEffect)((()=>{w.length||n.push(T)}),[]),a.default.createElement("div",{className:"page-container"},a.default.createElement("div",{className:"page-container__header"},a.default.createElement("div",{className:"page-container__title"},e("addSuggestedTokens")),a.default.createElement("div",{className:"page-container__subtitle"},e("likeToImportTokens")),E,I),a.default.createElement("div",{className:"page-container__content"},a.default.createElement("div",{className:"confirm-add-suggested-token"},a.default.createElement("div",{className:"confirm-add-suggested-token__header"},a.default.createElement("div",{className:"confirm-add-suggested-token__token"},e("token")),a.default.createElement("div",{className:"confirm-add-suggested-token__balance"},e("balance"))),a.default.createElement("div",{className:"confirm-add-suggested-token__token-list"},w.map((({requestData:{asset:e}})=>{return a.default.createElement("div",{className:"confirm-add-suggested-token__token-list-item",key:e.address},a.default.createElement("div",{className:"confirm-add-suggested-token__token confirm-add-suggested-token__data"},a.default.createElement(l.default,{className:"confirm-add-suggested-token__token-icon",diameter:48,address:e.address,image:e.image}),a.default.createElement("div",{className:"confirm-add-suggested-token__name"},(t=e.name,n=e.symbol,t===undefined?n:`${t} (${n})`))),a.default.createElement("div",{className:"confirm-add-suggested-token__balance"},a.default.createElement(c.default,{token:e})));var t,n}))))),a.default.createElement(u.PageContainerFooter,{cancelText:e("cancel"),submitText:e("addToken"),onCancel:P,onSubmit:S,disabled:0===w.length}))}}}},{package:"$root$",file:"ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.js"}],[6406,{"./confirm-add-suggested-token":6405},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-add-suggested-token"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirm-add-suggested-token/index.js"}],[6407,{"../../../shared/constants/common":5250,"../../../shared/constants/copy":5251,"../../../shared/constants/metametrics":5260,"../../../shared/constants/time":5276,"../../../shared/modules/Numeric":5294,"../../components/app/account-list-item":5344,"../../components/component-library":5806,"../../components/ui/page-container":6160,"../../components/ui/tooltip":6197,"../../contexts/metametrics":6214,"../../ducks/confirm-transaction/confirm-transaction.duck":6229,"../../ducks/history/history":6233,"../../ducks/metamask/metamask":6236,"../../helpers/constants/design-system":6248,"../../hooks/useI18nContext":6334,"../../hooks/useScrollRequired":6349,"../../selectors":6985,"../../store/actions":7e3,classnames:3584,"copy-to-clipboard":3622,lodash:4380,loglevel:4386,"prop-types":4528,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=P(e("prop-types")),r=P(e("copy-to-clipboard")),s=P(e("classnames")),i=P(e("loglevel")),l=e("react-redux"),c=e("react-router-dom"),u=e("lodash"),d=P(e("../../components/app/account-list-item")),f=P(e("../../components/ui/tooltip")),m=e("../../components/ui/page-container"),p=e("../../ducks/history/history"),g=e("../../ducks/metamask/metamask"),h=e("../../../shared/constants/metametrics"),y=e("../../../shared/constants/time"),v=e("../../../shared/modules/Numeric"),x=e("../../../shared/constants/common"),b=e("../../components/component-library"),k=e("../../../shared/constants/copy"),T=e("../../hooks/useI18nContext"),w=e("../../hooks/useScrollRequired"),C=e("../../contexts/metametrics"),_=e("../../helpers/constants/design-system"),E=e("../../ducks/confirm-transaction/confirm-transaction.duck"),I=e("../../store/actions"),S=e("../../selectors");function P(e){return e&&e.__esModule?e:{default:e}}function M(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}const D=()=>{const e=(0,T.useI18nContext)();return a.default.createElement("div",{className:"request-decrypt-message__header"},a.default.createElement("div",{className:"request-decrypt-message__header-background"}),a.default.createElement("div",{className:"request-decrypt-message__header__text"},e("decryptRequest")),a.default.createElement("div",{className:"request-decrypt-message__header__tip-container"},a.default.createElement("div",{className:"request-decrypt-message__header__tip"})))},A=({fromAccount:e,nativeCurrency:t})=>{const n=(0,T.useI18nContext)(),o=new v.Numeric(e.balance,16,x.EtherDenomination.WEI).toDenomination(x.EtherDenomination.ETH).round(6).toBase(10).toString();return a.default.createElement("div",{className:"request-decrypt-message__account-info"},a.default.createElement("div",{className:"request-decrypt-message__account"},a.default.createElement("div",{className:"request-decrypt-message__account-text"},`${n("account")}:`),a.default.createElement("div",{className:"request-decrypt-message__account-item"},a.default.createElement(d.default,{account:e}))),a.default.createElement("div",{className:"request-decrypt-message__balance"},a.default.createElement("div",{className:"request-decrypt-message__balance-text"},`${n("balance")}:`),a.default.createElement("div",{className:"request-decrypt-message__balance-value"},`${o} ${t}`)))};A.propTypes={fromAccount:o.default.shape({balance:o.default.string.isRequired}).isRequired,nativeCurrency:o.default.string.isRequired};const O=({name:e,notice:t,targetSubjectMetadata:n})=>a.default.createElement("div",{className:"request-decrypt-message__visual"},a.default.createElement("section",null,null!=n&&n.iconUrl?a.default.createElement("img",{className:"request-decrypt-message__visual-identicon",src:n.iconUrl,alt:""}):a.default.createElement("i",{className:"request-decrypt-message__visual-identicon--default"},e.charAt(0).toUpperCase()),a.default.createElement("div",{className:"request-decrypt-message__notice"},t)));O.propTypes={name:o.default.string.isRequired,notice:o.default.string.isRequired,targetSubjectMetadata:o.default.shape({iconUrl:o.default.string})};const F=({isScrollable:e,isScrolledToBottom:t,hasDecrypted:n,hasError:o,scrollToBottom:r})=>{const s=(0,T.useI18nContext)();return n&&!o&&e&&!t?a.default.createElement(b.ButtonIcon,{ariaLabel:s("scrollDown"),backgroundColor:_.BackgroundColor.primaryDefault,borderRadius:_.BorderRadius.full,className:"scroll-to-bottom__button",color:_.IconColor.primaryInverse,"data-testid":"scroll-to-bottom",display:_.Display.Flex,iconName:b.IconName.Arrow2Down,onClick:r,size:b.ButtonIconSize.Md}):null};F.propTypes={isScrollable:o.default.bool.isRequired,isScrolledToBottom:o.default.bool.isRequired,hasDecrypted:o.default.bool.isRequired,hasError:o.default.bool.isRequired,scrollToBottom:o.default.func.isRequired};const N=(0,a.forwardRef)((({isScrollable:e,isScrolledToBottom:t,onScroll:n,rawMessage:o,scrollToBottom:i,setRawMessage:c,messageData:u},d)=>{const m=(0,l.useDispatch)(),p=(0,a.useContext)(C.MetaMetricsContext),g=(0,T.useI18nContext)(),[v,x]=(0,a.useState)(!1),[w,E]=(0,a.useState)(!1),[S,P]=(0,a.useState)(!1),[M,D]=(0,a.useState)(!1),[A,O]=(0,a.useState)("");return a.default.createElement("div",{className:"request-decrypt-message__message-container"},a.default.createElement("div",{className:"request-decrypt-message__message"},a.default.createElement("div",{className:"request-decrypt-message__message-text",ref:d,onScroll:n},S||M?o:u.msgParams.data,M?A:""),a.default.createElement("div",{className:(0,s.default)("request-decrypt-message__message-cover",{"request-decrypt-message__message-lock--pressed":S||M})}),a.default.createElement("div",{className:(0,s.default)("request-decrypt-message__message-lock",{"request-decrypt-message__message-lock--pressed":S||M}),"data-testid":"message-lock",onClick:async e=>{e.stopPropagation(e);const t=u.msgParams;t.metamaskId=u.id;const n=await m((0,I.decryptMsgInline)(t));n.error?(D(!0),O(g("decryptInlineError",[n.error]))):(P(!0),c(n.rawSig))}},a.default.createElement("div",{className:"request-decrypt-message__message-lock__container"},a.default.createElement("i",{className:"fa fa-lock fa-lg request-decrypt-message__message-lock__container__icon"}),a.default.createElement("div",{className:"request-decrypt-message__message-lock__container__text"},g("decryptMetamask"))))),a.default.createElement(F,{isScrollable:e,hasError:M,hasDecrypted:S,isScrolledToBottom:t,scrollToBottom:i}),S?a.default.createElement("div",{className:(0,s.default)({"request-decrypt-message__message-copy":!0,"request-decrypt-message__message-copy--pressed":v}),onClick:()=>{(0,r.default)(o,k.COPY_OPTIONS),p({category:h.MetaMetricsEventCategory.Messages,event:"Copy",properties:{action:"Decrypt Message Copy",legacy_event:!0}}),E(!0),setTimeout((()=>E(!1)),3*y.SECOND)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),"data-testid":"message-copy"},a.default.createElement(f.default,{position:"bottom",title:g(w?"copiedExclamation":"copyToClipboard"),wrapperClassName:"request-decrypt-message__message-copy-tooltip",style:{display:"flex",alignItems:"center"}},a.default.createElement("div",{className:"request-decrypt-message__message-copy-text"},g("decryptCopy")),a.default.createElement(b.Icon,{name:w?b.IconName.CopySuccess:b.IconName.Copy,color:_.IconColor.primaryDefault}))):a.default.createElement("div",null))}));N.displayName="MessageBody",N.propTypes={isScrollable:o.default.bool.isRequired,isScrolledToBottom:o.default.bool.isRequired,onScroll:o.default.func.isRequired,rawMessage:o.default.string.isRequired,scrollToBottom:o.default.func.isRequired,setRawMessage:o.default.func.isRequired,messageData:o.default.shape({msgParams:o.default.shape({data:o.default.string.isRequired,from:o.default.string.isRequired,origin:o.default.string.isRequired}).isRequired,id:o.default.string.isRequired}).isRequired};const R=({hasScrolledToBottom:e,isScrollable:t,mostRecentOverviewPage:n,messageData:o})=>{const r=(0,l.useDispatch)(),s=(0,c.useHistory)(),i=(0,T.useI18nContext)(),u=(0,a.useContext)(C.MetaMetricsContext);return a.default.createElement(m.PageContainerFooter,{cancelText:i("cancel"),submitText:i("decrypt"),disabled:t&&!e,onCancel:async e=>{e.stopPropagation(e),await r((0,I.cancelDecryptMsg)(o)),u({category:h.MetaMetricsEventCategory.Messages,event:"Cancel",properties:{action:"Decrypt Message Request",legacy_event:!0}}),r((0,E.clearConfirmTransaction)()),s.push(n)},onSubmit:async e=>{e.stopPropagation(e);const t=o.msgParams;t.metamaskId=o.id,await r((0,I.decryptMsg)(t)),u({category:h.MetaMetricsEventCategory.Messages,event:"Confirm",properties:{action:"Decrypt Message Request",legacy_event:!0}}),r((0,E.clearConfirmTransaction)()),s.push(n)}})};R.propTypes={hasScrolledToBottom:o.default.bool.isRequired,isScrollable:o.default.bool.isRequired,mostRecentOverviewPage:o.default.string.isRequired,messageData:o.default.shape({msgParams:o.default.shape({data:o.default.string.isRequired,from:o.default.string.isRequired,origin:o.default.string.isRequired}).isRequired,id:o.default.string.isRequired}).isRequired};n.default=()=>{const e=(0,T.useI18nContext)(),[t,n]=(0,a.useState)(""),o=(0,l.useSelector)(p.getMostRecentOverviewPage),r=(0,l.useSelector)(g.getNativeCurrency),s=(0,l.useSelector)(S.unconfirmedTransactionsListSelector),c=(0,u.cloneDeep)(s[0]),d=(0,l.useSelector)((e=>{var t;return(0,S.getTargetAccountWithSendEtherInfo)(e,null==c||null===(t=c.msgParams)||void 0===t?void 0:t.from)})),f=(0,l.useSelector)((e=>e.metamask.subjectMetadata||{})),{hasScrolledToBottom:m,isScrollable:h,isScrolledToBottom:y,onScroll:v,scrollToBottom:x,ref:b}=(0,w.useScrollRequired)([t],{offsetPxFromBottom:0});if(!c)return i.default.warn("ConfirmDecryptMessage Page: Missing messageData prop."),null;const k=f[c.msgParams.origin],C=(null==k?void 0:k.name)||c.msgParams.origin,_=e("decryptMessageNotice",[c.msgParams.origin]);return a.default.createElement("div",{className:"request-decrypt-message__container"},a.default.createElement(D,null),a.default.createElement("div",{className:"request-decrypt-message__body"},a.default.createElement(A,{fromAccount:d,nativeCurrency:r}),a.default.createElement(O,{name:C,notice:_,targetSubjectMetadata:k}),a.default.createElement(N,{isScrollable:h,isScrolledToBottom:y,onScroll:v,rawMessage:t,ref:b,scrollToBottom:x,setRawMessage:n,messageData:c})),a.default.createElement(R,{hasScrolledToBottom:m,isScrollable:h,mostRecentOverviewPage:o,messageData:c}))}}}},{package:"$root$",file:"ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js"}],[6408,{"./confirm-decrypt-message.component":6407},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-decrypt-message.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirm-decrypt-message/index.js"}],[6409,{"../../../shared/constants/common":5250,"../../../shared/constants/metametrics":5260,"../../../shared/modules/Numeric":5294,"../../components/app/account-list-item":5344,"../../components/ui/identicon":6133,"../../components/ui/page-container":6160,"../../components/ui/site-origin":6177,loglevel:4386,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=m(e("prop-types")),r=m(e("loglevel")),s=m(e("../../components/app/account-list-item")),i=m(e("../../components/ui/identicon")),l=e("../../components/ui/page-container"),c=e("../../../shared/constants/metametrics"),u=m(e("../../components/ui/site-origin")),d=e("../../../shared/modules/Numeric"),f=e("../../../shared/constants/common");function m(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=typeof a)return a;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:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class h extends a.Component{constructor(...e){super(...e),g(this,"renderHeader",(()=>a.default.createElement("div",{className:"request-encryption-public-key__header"},a.default.createElement("div",{className:"request-encryption-public-key__header-background"}),a.default.createElement("div",{className:"request-encryption-public-key__header__text"},this.context.t("encryptionPublicKeyRequest")),a.default.createElement("div",{className:"request-encryption-public-key__header__tip-container"},a.default.createElement("div",{className:"request-encryption-public-key__header__tip"}))))),g(this,"renderAccount",(()=>{const{fromAccount:e}=this.props,{t:t}=this.context;return a.default.createElement("div",{className:"request-encryption-public-key__account"},a.default.createElement("div",{className:"request-encryption-public-key__account-text"},`${t("account")}:`),a.default.createElement("div",{className:"request-encryption-public-key__account-item"},a.default.createElement(s.default,{account:e})))})),g(this,"renderBalance",(()=>{const{nativeCurrency:e,fromAccount:{balance:t}}=this.props,{t:n}=this.context,o=new d.Numeric(t,16,f.EtherDenomination.WEI).toDenomination(f.EtherDenomination.ETH).round(6).toBase(10).toString();return a.default.createElement("div",{className:"request-encryption-public-key__balance"},a.default.createElement("div",{className:"request-encryption-public-key__balance-text"},`${n("balance")}:`),a.default.createElement("div",{className:"request-encryption-public-key__balance-value"},`${o} ${e}`))})),g(this,"renderRequestIcon",(()=>{const{requesterAddress:e}=this.props;return a.default.createElement("div",{className:"request-encryption-public-key__request-icon"},a.default.createElement(i.default,{diameter:40,address:e}))})),g(this,"renderAccountInfo",(()=>a.default.createElement("div",{className:"request-encryption-public-key__account-info"},this.renderAccount(),this.renderRequestIcon(),this.renderBalance()))),g(this,"renderBody",(()=>{const{subjectMetadata:e,txData:t}=this.props,{t:n}=this.context,o=e[t.origin],r=n("encryptionPublicKeyNotice",[a.default.createElement(u.default,{siteOrigin:t.origin,key:t.origin})]),s=(null==o?void 0:o.hostname)||t.origin;return a.default.createElement("div",{className:"request-encryption-public-key__body"},this.renderAccountInfo(),a.default.createElement("div",{className:"request-encryption-public-key__visual"},a.default.createElement("section",null,null!=o&&o.iconUrl?a.default.createElement("img",{className:"request-encryption-public-key__visual-identicon",src:o.iconUrl,alt:""}):a.default.createElement("i",{className:"request-encryption-public-key__visual-identicon--default"},s.charAt(0).toUpperCase()),a.default.createElement("div",{className:"request-encryption-public-key__notice"},r))))})),g(this,"renderFooter",(()=>{const{cancelEncryptionPublicKey:e,clearConfirmTransaction:t,encryptionPublicKey:n,history:o,mostRecentOverviewPage:r,txData:s}=this.props,{t:i,trackEvent:u}=this.context;return a.default.createElement(l.PageContainerFooter,{cancelText:i("cancel"),submitText:i("provide"),onCancel:async n=>{await e(s,n),u({category:c.MetaMetricsEventCategory.Messages,event:"Cancel",properties:{action:"Encryption public key Request",legacy_event:!0}}),t(),o.push(r)},onSubmit:async e=>{await n(s,e),this.context.trackEvent({category:c.MetaMetricsEventCategory.Messages,event:"Confirm",properties:{action:"Encryption public key Request",legacy_event:!0}}),t(),o.push(r)}})})),g(this,"render",(()=>this.props.txData?a.default.createElement("div",{className:"request-encryption-public-key__container"},this.renderHeader(),this.renderBody(),this.renderFooter()):(r.default.warn("ConfirmEncryptionPublicKey Page: Missing txData prop."),null)))}}n.default=h,g(h,"contextTypes",{t:o.default.func.isRequired,trackEvent:o.default.func.isRequired}),g(h,"propTypes",{fromAccount:o.default.shape({address:o.default.string.isRequired,balance:o.default.string,name:o.default.string}).isRequired,clearConfirmTransaction:o.default.func.isRequired,cancelEncryptionPublicKey:o.default.func.isRequired,encryptionPublicKey:o.default.func.isRequired,history:o.default.object.isRequired,requesterAddress:o.default.string,txData:o.default.object,subjectMetadata:o.default.object,mostRecentOverviewPage:o.default.string.isRequired,nativeCurrency:o.default.string.isRequired})}}},{package:"$root$",file:"ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js"}],[6410,{"../../ducks/confirm-transaction/confirm-transaction.duck":6229,"../../ducks/history/history":6233,"../../ducks/metamask/metamask":6236,"../../selectors":6985,"../../store/actions":7e3,"./confirm-encryption-public-key.component":6409,"react-redux":4734,"react-router-dom":4761,redux:4794},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=e("react-redux"),r=e("redux"),s=e("react-router-dom"),i=e("../../store/actions"),l=e("../../selectors"),c=e("../../ducks/confirm-transaction/confirm-transaction.duck"),u=e("../../ducks/history/history"),d=e("../../ducks/metamask/metamask"),f=(a=e("./confirm-encryption-public-key.component"))&&a.__esModule?a:{default:a};n.default=(0,r.compose)(s.withRouter,(0,o.connect)((function(e){const{metamask:{subjectMetadata:t={}}}=e,n=(0,l.unconfirmedTransactionsListSelector)(e)[0];return{txData:n,subjectMetadata:t,fromAccount:(0,l.getTargetAccountWithSendEtherInfo)(e,null==n?void 0:n.msgParams),requester:null,requesterAddress:null,mostRecentOverviewPage:(0,u.getMostRecentOverviewPage)(e),nativeCurrency:(0,d.getNativeCurrency)(e)}}),(function(e){return{goHome:()=>e((0,i.goHome)()),clearConfirmTransaction:()=>e((0,c.clearConfirmTransaction)()),encryptionPublicKey:(t,n)=>{const a={data:t.msgParams,metamaskId:t.id};return n.stopPropagation(),e((0,i.encryptionPublicKeyMsg)(a))},cancelEncryptionPublicKey:(t,n)=>(n.stopPropagation(),e((0,i.cancelEncryptionPublicKeyMsg)(t)))}})))(f.default)}}},{package:"$root$",file:"ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js"}],[6411,{"./confirm-encryption-public-key.container":6410},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-encryption-public-key.container"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirm-encryption-public-key/index.js"}],[6412,{"../../../../components/ui/form-field":6115,"../../../../contexts/i18n":6211,"../../../../helpers/constants/gas":6250,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=u;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=l(e("prop-types")),r=e("../../../../contexts/i18n"),s=l(e("../../../../components/ui/form-field")),i=e("../../../../helpers/constants/gas");function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u({onManualChange:e,gasLimit:t,setGasLimit:n,gasPrice:o,setGasPrice:l,gasErrors:c,minimumGasLimit:u}){const d=(0,a.useContext)(r.I18nContext);return a.default.createElement("div",{className:"advanced-gas-controls"},a.default.createElement(s.default,{titleText:d("gasLimit"),error:null!=c&&c.gasLimit?(0,i.getGasFormErrorText)(c.gasLimit,d,{minimumGasLimit:u}):null,onChange:t=>{null==e||e(),n(t)},tooltipText:d("editGasLimitTooltip"),value:t,allowDecimals:!1,numeric:!0}),a.default.createElement(a.default.Fragment,null,a.default.createElement(s.default,{titleText:d("advancedGasPriceTitle"),titleUnit:"(GWEI)",onChange:t=>{null==e||e(),l(t)},tooltipText:d("editGasPriceTooltip"),value:o,numeric:!0,allowDecimals:!0,error:null!=c&&c.gasPrice?(0,i.getGasFormErrorText)(c.gasPrice,d):null})))}u.propTypes={onManualChange:o.default.func,gasLimit:o.default.number,setGasLimit:o.default.func,gasPrice:o.default.string,setGasPrice:o.default.func,minimumGasLimit:o.default.string,gasErrors:o.default.object}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-controls/advanced-gas-controls.component.js"}],[6413,{"../../../../../../shared/constants/gas":5255,"../../../../../../shared/modules/Numeric":5294,"../../../../../components/component-library":5806,"../../../../../contexts/gasFee":6210,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useI18nContext":6334,"../../../../../selectors":6985,"../../../../../store/actions":7e3,"../../../hooks/useTransactionEventFragment":6740,"../context":6429,lodash:4380,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("lodash"),s=e("../../../hooks/useTransactionEventFragment"),i=e("../../../../../../shared/constants/gas"),l=e("../../../../../helpers/constants/design-system"),c=e("../../../../../selectors"),u=e("../../../../../store/actions"),d=e("../../../../../contexts/gasFee"),f=e("../context"),m=e("../../../../../hooks/useI18nContext"),p=e("../../../../../components/component-library"),g=e("../../../../../../shared/modules/Numeric");function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,m.useI18nContext)(),t=(0,o.useDispatch)(),{gasErrors:n,maxBaseFee:h,maxPriorityFeePerGas:y}=(0,f.useAdvancedGasFeePopoverContext)(),v=new g.Numeric(h,10).toString(),x=new g.Numeric(y,10).toString(),b=(0,o.useSelector)(c.getAdvancedGasFeeValues),{updateTransactionEventFragment:k}=(0,s.useTransactionEventFragment)(),{editGasMode:T,transaction:w}=(0,d.useGasFeeContext)(),{chainId:C}=w,_=(0,o.useSelector)((e=>(0,c.selectNetworkIdentifierByChainId)(e,C))),[E,I]=(0,a.useState)(Boolean(b)&&b.maxBaseFee===v&&b.priorityFee===x);(0,a.useEffect)((()=>{I(Boolean(b)&&b.maxBaseFee===v&&b.priorityFee===x)}),[b,v,x]);return T===i.EditGasModes.swaps?null:a.default.createElement(p.Box,{display:l.Display.Flex,flexDirection:l.FlexDirection.Row,marginTop:4,marginLeft:2,marginRight:2,paddingTop:4,paddingBottom:4,className:"advanced-gas-fee-defaults"},a.default.createElement(p.Checkbox,{isChecked:E,onChange:()=>{E?(t((0,u.setAdvancedGasFee)({chainId:C,gasFeePreferences:undefined})),I(!1),k({properties:{advanced_gas_defaults_updated_maxbasefee:null,advanced_gas_defaults_updated_priorityfee:null}})):(t((0,u.setAdvancedGasFee)({chainId:C,gasFeePreferences:{maxBaseFee:v,priorityFee:x}})),k({properties:{advanced_gas_defaults_updated_maxbasefee:v,advanced_gas_defaults_updated_priorityfee:x}}))},isDisabled:n.maxFeePerGas||n.maxPriorityFeePerGas,label:e("advancedGasFeeDefaultOptIn",[(0,r.capitalize)(_)])}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js"}],[6414,{"./advanced-gas-fee-defaults":6413},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./advanced-gas-fee-defaults"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-defaults/index.js"}],[6415,{"../../../../../../shared/modules/conversion.utils":5301,"../../../../../components/component-library":5806,"../../../../../components/ui/button":6083,"../../../../../components/ui/form-field":6115,"../../../../../contexts/gasFee":6210,"../../../../../helpers/constants/design-system":6248,"../../../../../helpers/utils/util":6297,"../../../../../hooks/useI18nContext":6334,"../../../constants":6690,"../../../send/send.constants":6752,"../context":6429,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("../../../../../contexts/gasFee"),r=e("../../../../../helpers/utils/util"),s=e("../../../../../helpers/constants/design-system"),i=e("../../../../../hooks/useI18nContext"),l=e("../../../send/send.constants"),c=g(e("../../../../../components/ui/button")),u=g(e("../../../../../components/ui/form-field")),d=e("../context"),f=e("../../../../../components/component-library"),m=e("../../../constants"),p=e("../../../../../../shared/modules/conversion.utils");function g(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,i.useI18nContext)(),{setGasLimit:t,setErrorValue:n}=(0,d.useAdvancedGasFeePopoverContext)(),{gasLimit:g,minimumGasLimitDec:h,transaction:{chainId:y,originalGasEstimate:v}}=(0,o.useGasFeeContext)(),x=v!==undefined&&(0,p.hexToDecimal)(v),[b,k]=(0,a.useState)(x?Math.max(l.MAX_GAS_LIMIT_DEC,x):l.MAX_GAS_LIMIT_DEC),[T,w]=(0,a.useState)(!1),[C,_]=(0,a.useState)(g),[E,I]=(0,a.useState)(),S=e=>{_(e)};return(0,a.useEffect)((()=>{if(t(C),m.IGNORE_GAS_LIMIT_CHAIN_IDS.includes(y))return;const e=((e,t,n)=>(0,r.bnLessThan)(e,t)||(0,r.bnGreaterThan)(e,n)?"editGasLimitOutOfBoundsV2":null)(C,h,b);I(e),w(!0===T?T:null!==e),n("gasLimit","editGasLimitOutOfBoundsV2"===e)}),[y,C,h,t,n,b,T,e]),(0,a.useEffect)((()=>{x&&k(Math.max(l.MAX_GAS_LIMIT_DEC,x))}),[h,x,k]),T?a.default.createElement(u.default,{dataTestId:"gas-limit-input",error:E?e(E,[h-1,b]):"",onChange:S,titleText:e("gasLimitV2"),value:C,allowDecimals:!1,numeric:!0}):a.default.createElement(f.Text,{tag:s.TextVariant.bodyMd,variant:s.TextVariant.bodySm,as:"h6",className:"advanced-gas-fee-gas-limit",marginTop:4,marginLeft:2,marginRight:2},a.default.createElement("strong",null,e("gasLimitV2")),a.default.createElement("span",null,C),a.default.createElement(c.default,{"data-testid":"advanced-gas-fee-edit",className:"advanced-gas-fee-gas-limit__edit-link",onClick:()=>w(!0),type:"link"},e("edit")))}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.js"}],[6416,{"./advanced-gas-fee-gas-limit":6415},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./advanced-gas-fee-gas-limit"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/index.js"}],[6417,{"../../../../../components/ui/box":6079,"../../../../../components/ui/loading-heartbeat":6139,"../../../../../contexts/i18n":6211,"../../../../../helpers/utils/gas":6278,"../../../../../helpers/utils/util":6297,classnames:3584,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=d(e("prop-types")),r=d(e("classnames")),s=e("../../../../../helpers/utils/util"),i=e("../../../../../helpers/utils/gas"),l=e("../../../../../contexts/i18n"),c=d(e("../../../../../components/ui/box")),u=d(e("../../../../../components/ui/loading-heartbeat"));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}const m=({latest:e,historical:t,trend:n})=>{const o=(0,a.useContext)(l.I18nContext),d=function(e,t){switch(e){case"up":return{className:"fa-arrow-up advanced-gas-fee-input-subtext__up",color:"var(--color-success-default)",title:t("upArrow")};case"down":return{className:"fa-arrow-down advanced-gas-fee-input-subtext__down",color:"var(--color-error-default)",title:t("downArrow")};case"level":return{className:"fa-arrow-right advanced-gas-fee-input-subtext__level",color:"var(--color-icon-alternative)",title:t("levelArrow")};default:return null}}(n,o);return a.default.createElement(c.default,{display:"flex",alignItems:"center",gap:4,className:"advanced-gas-fee-input-subtext"},(0,s.isNullish)(e)?null:a.default.createElement(c.default,{display:"flex",alignItems:"center","data-testid":"latest"},a.default.createElement("span",{className:"advanced-gas-fee-input-subtext__label"},o("currentTitle")),a.default.createElement("span",{className:"advanced-gas-fee-input-subtext__value"},a.default.createElement(u.default,null),(0,i.formatGasFeeOrFeeRange)(e)),null===d?null:a.default.createElement("span",{className:"advanced-gas-fee-input-subtext__icon"},a.default.createElement("i",{className:(0,r.default)("fa",d.className),style:{color:d.color},title:d.title,"data-testid":"fee-arrow"}))),(0,s.isNullish)(t)?null:a.default.createElement(c.default,null,a.default.createElement("span",{className:"advanced-gas-fee-input-subtext__label","data-testid":"historical"},o("twelveHrTitle")),a.default.createElement("span",{className:"advanced-gas-fee-input-subtext__value"},a.default.createElement(u.default,null),(0,i.formatGasFeeOrFeeRange)(t))))};m.propTypes={latest:o.default.oneOfType([o.default.string,o.default.arrayOf(o.default.string)]),historical:o.default.oneOfType([o.default.string,o.default.arrayOf(o.default.string)]),trend:o.default.oneOf(["up","down","level"])};n.default=m}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.js"}],[6418,{"./advanced-gas-fee-input-subtext":6417},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./advanced-gas-fee-input-subtext"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/index.js"}],[6419,{"../../../../../components/ui/box":6079,"./base-fee-input":6421,"./priority-fee-input":6423,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=i(e("react")),o=i(e("../../../../../components/ui/box")),r=i(e("./base-fee-input")),s=i(e("./priority-fee-input"));function i(e){return e&&e.__esModule?e:{default:e}}n.default=()=>a.default.createElement(o.default,{className:"advanced-gas-fee-inputs"},a.default.createElement(r.default,null),a.default.createElement(s.default,null))}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-inputs/advanced-gas-fee-inputs.js"}],[6420,{"../../../../../../../shared/constants/gas":5255,"../../../../../../../shared/modules/Numeric":5294,"../../../../../../../shared/modules/conversion.utils":5301,"../../../../../../components/ui/box":6079,"../../../../../../components/ui/form-field":6115,"../../../../../../contexts/gasFee":6210,"../../../../../../helpers/constants/common":6246,"../../../../../../hooks/useCurrencyDisplay":6324,"../../../../../../hooks/useI18nContext":6334,"../../../../../../hooks/useUserPreferencedCurrency":6368,"../../../../../../selectors":6985,"../../../../constants":6690,"../../../../send/send.constants":6752,"../../advanced-gas-fee-input-subtext":6418,"../../context":6429,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=k(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../send/send.constants"),s=e("../../../../../../../shared/constants/gas"),i=e("../../../../../../helpers/constants/common"),l=e("../../../../../../selectors"),c=e("../../../../../../contexts/gasFee"),u=e("../../../../../../hooks/useI18nContext"),d=e("../../../../../../hooks/useUserPreferencedCurrency"),f=e("../../../../../../hooks/useCurrencyDisplay"),m=b(e("../../../../../../components/ui/box")),p=b(e("../../../../../../components/ui/form-field")),g=e("../../context"),h=b(e("../../advanced-gas-fee-input-subtext")),y=e("../../../../../../../shared/modules/conversion.utils"),v=e("../../../../../../../shared/modules/Numeric"),x=e("../../../../constants");function b(e){return e&&e.__esModule?e:{default:e}}function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(k=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,u.useI18nContext)(),{gasFeeEstimates:t,estimateUsed:n,maxFeePerGas:b,editGasMode:k,transaction:{chainId:T}}=(0,c.useGasFeeContext)(),w=new v.Numeric(b,10).toString(),{gasLimit:C,maxPriorityFeePerGas:_,setErrorValue:E,setMaxFeePerGas:I,setMaxBaseFee:S}=(0,g.useAdvancedGasFeePopoverContext)(),{estimatedBaseFee:P,historicalBaseFeeRange:M,baseFeeTrend:D}=t??{},[A,O]=(0,a.useState)(),{currency:F,numberOfDecimals:N}=(0,d.useUserPreferencedCurrency)(i.PRIMARY),R=(0,o.useSelector)(l.getAdvancedGasFeeValues),j=n!==s.PriorityLevels.custom&&null!=R&&R.maxBaseFee&&k!==s.EditGasModes.swaps?R.maxBaseFee:w,[B,$]=(0,a.useState)(j>0?j:undefined);(0,a.useEffect)((()=>{B===undefined&&j>0&&$(j)}),[B,j,$]);const[W]=(0,f.useCurrencyDisplay)((0,y.decGWEIToHexWEI)(B*C),{currency:F,numberOfDecimals:N}),L=(0,a.useCallback)((e=>{$(e)}),[$]);return(0,a.useEffect)((()=>{I(B);const e=((e,t,n,a)=>{const o=new v.Numeric(e,10);return new v.Numeric(n,10).greaterThan(o)?"editGasMaxBaseFeeGWEIImbalance":null!=t&&t.low&&o.lessThan(t.low.suggestedMaxFeePerGas,10)&&x.IGNORE_GAS_LIMIT_CHAIN_IDS.includes(a)?"editGasMaxBaseFeeLow":null!=t&&t.high&&o.greaterThan(t.high.suggestedMaxFeePerGas*r.HIGH_FEE_WARNING_MULTIPLIER,10)?"editGasMaxBaseFeeHigh":null})(B,t,_,T);O(e),E("maxFeePerGas","editGasMaxBaseFeeGWEIImbalance"===e),S(B)}),[B,T,t,_,O,E,I,S]),a.default.createElement(m.default,{className:"base-fee-input",marginLeft:2,marginRight:2},a.default.createElement(p.default,{dataTestId:"base-fee-input",error:A?e(A):"",onChange:L,titleText:e("maxBaseFee"),titleUnit:`(${e("gwei")})`,tooltipText:e("advancedBaseGasFeeToolTip"),value:B,detailText:`≈ ${W}`,allowDecimals:!0,numeric:!0}),a.default.createElement(h.default,{latest:P,historical:M,trend:D}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js"}],[6421,{"./base-fee-input":6420},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./base-fee-input"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/index.js"}],[6422,{"./advanced-gas-fee-inputs":6419},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./advanced-gas-fee-inputs"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-inputs/index.js"}],[6423,{"./priority-fee-input":6424},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./priority-fee-input"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/index.js"}],[6424,{"../../../../../../../shared/constants/gas":5255,"../../../../../../../shared/modules/Numeric":5294,"../../../../../../../shared/modules/conversion.utils":5301,"../../../../../../components/ui/box":6079,"../../../../../../components/ui/form-field":6115,"../../../../../../contexts/gasFee":6210,"../../../../../../helpers/constants/common":6246,"../../../../../../hooks/useCurrencyDisplay":6324,"../../../../../../hooks/useI18nContext":6334,"../../../../../../hooks/useUserPreferencedCurrency":6368,"../../../../../../selectors":6985,"../../../../constants":6690,"../../../../send/send.constants":6752,"../../advanced-gas-fee-input-subtext":6418,"../../context":6429,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=k(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../send/send.constants"),s=e("../../../../../../../shared/constants/gas"),i=e("../../../../../../helpers/constants/common"),l=e("../../../../../../selectors"),c=e("../../../../../../hooks/useCurrencyDisplay"),u=e("../../../../../../contexts/gasFee"),d=e("../../../../../../hooks/useI18nContext"),f=e("../../../../../../hooks/useUserPreferencedCurrency"),m=b(e("../../../../../../components/ui/form-field")),p=b(e("../../../../../../components/ui/box")),g=e("../../context"),h=b(e("../../advanced-gas-fee-input-subtext")),y=e("../../../../../../../shared/modules/conversion.utils"),v=e("../../../../../../../shared/modules/Numeric"),x=e("../../../../constants");function b(e){return e&&e.__esModule?e:{default:e}}function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(k=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,d.useI18nContext)(),t=(0,o.useSelector)(l.getAdvancedGasFeeValues),{gasLimit:n,setErrorValue:b,setMaxPriorityFeePerGas:k}=(0,g.useAdvancedGasFeePopoverContext)(),{editGasMode:T,estimateUsed:w,gasFeeEstimates:C,maxPriorityFeePerGas:_,transaction:{chainId:E}}=(0,u.useGasFeeContext)(),I=new v.Numeric(_,10).toString(),{latestPriorityFeeRange:S,historicalPriorityFeeRange:P,priorityFeeTrend:M}=C??{},[D,A]=(0,a.useState)(),O=w!==s.PriorityLevels.custom&&null!=t&&t.priorityFee&&T!==s.EditGasModes.swaps?t.priorityFee:I,[F,N]=(0,a.useState)(O>0?O:undefined);(0,a.useEffect)((()=>{F===undefined&&O>0&&N(O)}),[F,O,N]);const{currency:R,numberOfDecimals:j}=(0,f.useUserPreferencedCurrency)(i.PRIMARY),[B]=(0,c.useCurrencyDisplay)((0,y.decGWEIToHexWEI)(F*n),{currency:R,numberOfDecimals:j});return(0,a.useEffect)((()=>{k(F);const e=((e,t,n)=>{const a=new v.Numeric(e,10);return a.lessThan(0,10)?"editGasMaxPriorityFeeBelowMinimumV2":null!=t&&t.low&&a.lessThan(t.low.suggestedMaxPriorityFeePerGas,10)&&x.IGNORE_GAS_LIMIT_CHAIN_IDS.includes(n)?"editGasMaxPriorityFeeLowV2":null!=t&&t.high&&a.greaterThan(t.high.suggestedMaxPriorityFeePerGas*r.HIGH_FEE_WARNING_MULTIPLIER,10)?"editGasMaxPriorityFeeHighV2":null})(F,C,E);b("maxPriorityFeePerGas","editGasMaxPriorityFeeBelowMinimumV2"===e),A(e)}),[E,C,F,b,k,A]),a.default.createElement(p.default,{marginTop:4,marginLeft:2,marginRight:2,className:"priority-fee-input"},a.default.createElement(m.default,{dataTestId:"priority-fee-input",error:D?e(D):"",onChange:e=>{N(e)},titleText:e("priorityFeeProperCase"),titleUnit:`(${e("gwei")})`,tooltipText:e("advancedPriorityFeeToolTip"),value:F,detailText:`≈ ${B}`,allowDecimals:!0,numeric:!0}),a.default.createElement(h.default,{latest:S,historical:P,trend:M}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.js"}],[6425,{"../../../../components/ui/box":6079,"../../../../components/ui/popover":6166,"../../../../contexts/transaction-modal":6218,"../../../../hooks/useI18nContext":6334,"./advanced-gas-fee-defaults":6414,"./advanced-gas-fee-gas-limit":6416,"./advanced-gas-fee-inputs":6422,"./advanced-gas-fee-save":6427,"./context":6429,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=m(e("react")),o=e("../../../../hooks/useI18nContext"),r=e("../../../../contexts/transaction-modal"),s=m(e("../../../../components/ui/box")),i=m(e("../../../../components/ui/popover")),l=e("./context"),c=m(e("./advanced-gas-fee-inputs")),u=m(e("./advanced-gas-fee-gas-limit")),d=m(e("./advanced-gas-fee-save")),f=m(e("./advanced-gas-fee-defaults"));function m(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const e=(0,o.useI18nContext)(),{closeAllModals:t,currentModal:n}=(0,r.useTransactionModalContext)();return"advancedGasFee"!==n?null:a.default.createElement(l.AdvancedGasFeePopoverContextProvider,null,a.default.createElement(i.default,{className:"advanced-gas-fee-popover",title:e("advancedGasFeeModalTitle"),onClose:t,footer:a.default.createElement(d.default,null)},a.default.createElement(s.default,{margin:4},a.default.createElement(c.default,null),a.default.createElement(f.default,null),a.default.createElement(u.default,null))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-popover.js"}],[6426,{"../../../../../../shared/constants/gas":5255,"../../../../../../shared/modules/conversion.utils":5301,"../../../../../components/ui/button":6083,"../../../../../contexts/gasFee":6210,"../../../../../contexts/transaction-modal":6218,"../../../../../hooks/useI18nContext":6334,"../../../hooks/useTransactionEventFragment":6740,"../context":6429,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=f(e("react")),o=e("../../../../../../shared/constants/gas"),r=e("../../../../../../shared/modules/conversion.utils"),s=e("../../../../../contexts/transaction-modal"),i=e("../../../../../contexts/gasFee"),l=e("../../../hooks/useTransactionEventFragment"),c=e("../../../../../hooks/useI18nContext"),u=f(e("../../../../../components/ui/button")),d=e("../context");function f(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const{closeModal:e}=(0,s.useTransactionModalContext)(),{updateTransactionEventFragment:t}=(0,l.useTransactionEventFragment)(),{updateTransaction:n}=(0,i.useGasFeeContext)(),f=(0,c.useI18nContext)(),{gasLimit:m,hasErrors:p,maxFeePerGas:g,maxPriorityFeePerGas:h}=(0,d.useAdvancedGasFeePopoverContext)();return a.default.createElement(u.default,{type:"primary",disabled:p,onClick:()=>{n({estimateUsed:o.PriorityLevels.custom,maxFeePerGas:(0,r.decGWEIToHexWEI)(g),maxPriorityFeePerGas:(0,r.decGWEIToHexWEI)(h),gasLimit:m}),t({properties:{gas_edit_type:"advanced"}}),e(["advancedGasFee","editGasFee"])}},f("save"))}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-save/advanced-gas-fee-save.js"}],[6427,{"./advanced-gas-fee-save":6426},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./advanced-gas-fee-save"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/advanced-gas-fee-save/index.js"}],[6428,{"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AdvancedGasFeePopoverContextProvider=n.AdvancedGasFeePopoverContext=void 0,n.useAdvancedGasFeePopoverContext=function(){return(0,o.useContext)(i)};var a,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(a,r,i):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=(a=e("prop-types"))&&a.__esModule?a:{default:a};function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}const i=n.AdvancedGasFeePopoverContext=(0,o.createContext)({}),l=({children:e})=>{const[t,n]=(0,o.useState)(),[a,r]=(0,o.useState)(),[s,l]=(0,o.useState)(),[c,u]=(0,o.useState)({maxFeePerGas:!1,maxPriorityFeePerGas:!1,gasLimit:!1}),d=(0,o.useCallback)(((e,t)=>{c[e]!==t&&u({...c,[e]:t})}),[c,u]),[f,m]=(0,o.useState)();return o.default.createElement(i.Provider,{value:{gasLimit:t,hasErrors:c.maxFeePerGas||c.maxPriorityFeePerGas||c.gasLimit,gasErrors:c,maxFeePerGas:a,maxPriorityFeePerGas:s,setErrorValue:d,maxBaseFee:f,setGasLimit:n,setMaxPriorityFeePerGas:l,setMaxFeePerGas:r,setMaxBaseFee:m}},e)};n.AdvancedGasFeePopoverContextProvider=l,l.propTypes={children:r.default.node.isRequired}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/context/advancedGasFeePopover.js"}],[6429,{"./advancedGasFeePopover":6428},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var a=e("./advancedGasFeePopover");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===a[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return a[e]}}))}))}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/context/index.js"}],[6430,{"./advanced-gas-fee-popover":6425},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./advanced-gas-fee-popover"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/advanced-gas-fee-popover/index.js"}],[6431,{"../../../../../shared/modules/transaction.utils":5326,"../../../../components/component-library":5806,"../../../../components/ui/box/box":6078,"../../../../components/ui/button":6083,"../../../../contexts/i18n":6211,"../../../../helpers/constants/design-system":6248,"../../../../helpers/utils/confirm-tx.util":6275,"../confirm-gas-display":6435,classnames:3584,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=h;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=p(e("prop-types")),r=p(e("classnames")),s=p(e("../../../../components/ui/box/box")),i=p(e("../../../../components/ui/button")),l=e("../../../../components/component-library"),c=e("../../../../helpers/constants/design-system"),u=e("../../../../contexts/i18n"),d=e("../confirm-gas-display"),f=e("../../../../helpers/utils/confirm-tx.util"),m=e("../../../../../shared/modules/transaction.utils");function p(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function h({showHeader:e=!0,symbol:t,title:n,showEdit:o,showAdvanceGasFeeOptions:p=!1,onEditClick:g,footer:h,noBorder:y,supportsEIP1559:v,renderTransactionDetailsContent:x,renderDataContent:b,ethTransactionTotal:k,nativeCurrency:T,fiatTransactionTotal:w,currentCurrency:C,isSetApproveForAll:_,isApprovalOrRejection:E,data:I,userAcknowledgedGasMissing:S,renderSimulationFailureWarning:P,useCurrencyRateCheck:M}){const D=(0,a.useContext)(u.I18nContext),A=(0,m.parseStandardTokenTransactionData)(I),O=null==A?void 0:A.name,F=(null==O?void 0:O.charAt(0).toUpperCase())+(null==O?void 0:O.slice(1));return a.default.createElement(s.default,{className:(0,r.default)({"approve-content-card-container__card":!y,"approve-content-card-container__card--no-border":y})},e&&a.default.createElement(s.default,{display:c.Display.Flex,flexDirection:c.FlexDirection.Row,alignItems:c.AlignItems.center,justifyContent:c.JustifyContent.flexEnd,className:"approve-content-card-container__card-header"},v&&n===D("transactionFee")?null:a.default.createElement(a.default.Fragment,null,a.default.createElement(s.default,{className:"approve-content-card-container__card-header__symbol"},t),a.default.createElement(s.default,{marginLeft:4,className:"approve-content-card-container__card-header__title"},a.default.createElement(l.Text,{variant:c.TextVariant.bodySmBold,as:"h6"},n))),o&&(!p||!v)&&a.default.createElement(s.default,{width:c.BlockSize.OneSixth},a.default.createElement(i.default,{type:"link",onClick:()=>g()},a.default.createElement(l.Text,{variant:c.TextVariant.bodySm,color:c.TextColor.primaryDefault,as:"h6"},D("edit"))))),a.default.createElement(s.default,{marginTop:1,marginBottom:3,className:"approve-content-card-container__card-content"},x&&(v&&!P?a.default.createElement(d.ConfirmGasDisplay,{userAcknowledgedGasMissing:S}):a.default.createElement(s.default,{display:c.Display.Flex,flexDirection:c.FlexDirection.Row,justifyContent:c.JustifyContent.spaceBetween},a.default.createElement(s.default,null,a.default.createElement(l.Text,{variant:c.TextVariant.bodySm,color:c.TextColor.textAlternative,as:"h6"},D("feeAssociatedRequest"))),a.default.createElement(s.default,{display:c.Display.Flex,flexDirection:c.FlexDirection.Column,alignItems:c.AlignItems.flexEnd,textAlign:c.TextAlign.Right},M&&a.default.createElement(s.default,null,a.default.createElement(l.Text,{variant:c.TextVariant.headingSm,fontWeight:c.FontWeight.Bold,color:c.TextColor.textDefault,as:"h4"},(0,f.formatCurrency)(w,C))),a.default.createElement(s.default,null,a.default.createElement(l.Text,{variant:c.TextVariant.bodySm,fontWeight:c.FontWeight.Normal,color:c.TextColor.textMuted,as:"h6"},`${k} ${T}`))))),b&&a.default.createElement(s.default,{display:c.Display.Flex,flexDirection:c.FlexDirection.Column},a.default.createElement(s.default,null,a.default.createElement(l.Text,{variant:c.TextVariant.bodySm,color:c.TextColor.textAlternative,as:"h6"},`${D("function",[F])}`)),_&&E!==undefined?a.default.createElement(s.default,null,a.default.createElement(l.Text,{variant:c.TextVariant.bodySm,color:c.TextColor.textAlternative,as:"h6"},`${D("parameters")}: ${E}`)):null,a.default.createElement(s.default,{marginRight:4,className:"approve-content-card-container__data__data-block"},a.default.createElement(l.Text,{variant:c.TextVariant.bodySm,color:c.TextColor.textAlternative,as:"h6"},I)))),h)}h.propTypes={showHeader:o.default.bool,symbol:o.default.node,title:o.default.string,showEdit:o.default.bool,showAdvanceGasFeeOptions:o.default.bool,onEditClick:o.default.func,footer:o.default.node,noBorder:o.default.bool,supportsEIP1559:o.default.bool,renderTransactionDetailsContent:o.default.bool,renderDataContent:o.default.bool,ethTransactionTotal:o.default.string,nativeCurrency:o.default.string,fiatTransactionTotal:o.default.string,currentCurrency:o.default.string,isSetApproveForAll:o.default.bool,isApprovalOrRejection:o.default.bool,data:o.default.string,userAcknowledgedGasMissing:o.default.bool,renderSimulationFailureWarning:o.default.bool,useCurrencyRateCheck:o.default.bool}}}},{package:"$root$",file:"ui/pages/confirmations/components/approve-content-card/approve-content-card.js"}],[6432,{"../../../../ducks/send":6241,"../../../../helpers/utils/transactions.util":6295,"../../../../selectors":6985,"../gas-details-item":6576,"./confirm-legacy-gas-display":6434,"@metamask/transaction-controller":2698,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=f(e("react")),o=f(e("prop-types")),r=e("react-redux"),s=e("@metamask/transaction-controller"),i=e("../../../../selectors"),l=e("../../../../helpers/utils/transactions.util"),c=f(e("../gas-details-item")),u=e("../../../../ducks/send"),d=e("./confirm-legacy-gas-display");function f(e){return e&&e.__esModule?e:{default:e}}const m=({userAcknowledgedGasMissing:e=!1})=>{const{txParams:t}=(0,r.useSelector)((e=>(0,i.txDataSelector)(e))),n=(0,r.useSelector)(u.getCurrentDraftTransaction),o=null==n?void 0:n.transactionType;let f;f=o?o===s.TransactionEnvelopeType.legacy:(0,l.isLegacyTransaction)(t);const m="confirm-gas-display";return(0,r.useSelector)(i.checkNetworkAndAccountSupports1559)&&!f?a.default.createElement(c.default,{"data-testid":m,userAcknowledgedGasMissing:e}):a.default.createElement(d.ConfirmLegacyGasDisplay,{"data-testid":m})};m.propTypes={userAcknowledgedGasMissing:o.default.bool};n.default=m}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.js"}],[6433,{"../../../../../../shared/modules/conversion.utils":5301,"../../../../../components/app/user-preferenced-currency-display":5727,"../../../../../components/component-library":5806,"../../../../../components/ui/info-tooltip":6134,"../../../../../components/ui/loading-heartbeat":6139,"../../../../../helpers/constants/common":6246,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useI18nContext":6334,"../../../../../selectors":6985,"../../../hooks/useDraftTransactionWithTxParams":6723,"../../transaction-detail-item":6636,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=y(e("react")),o=y(e("prop-types")),r=e("react-redux"),s=e("../../../../../hooks/useI18nContext"),i=e("../../../../../selectors"),l=e("../../../../../helpers/constants/common"),c=y(e("../../transaction-detail-item")),u=y(e("../../../../../components/app/user-preferenced-currency-display")),d=y(e("../../../../../components/ui/info-tooltip")),f=y(e("../../../../../components/ui/loading-heartbeat")),m=e("../../../../../helpers/constants/design-system"),p=e("../../../hooks/useDraftTransactionWithTxParams"),g=e("../../../../../components/component-library"),h=e("../../../../../../shared/modules/conversion.utils");function y(e){return e&&e.__esModule?e:{default:e}}const v=()=>a.default.createElement(f.default,null),x=({"data-testid":e}={})=>{const t=(0,s.useI18nContext)(),n=(0,r.useSelector)(i.getIsMainnet),o=(0,r.useSelector)(i.getUseCurrencyRateCheck),f=(0,r.useSelector)(i.getUnapprovedTransactions),y=(0,p.useDraftTransactionWithTxParams)(),x=(0,r.useSelector)((e=>(0,i.txDataSelector)(e))),{id:b,dappSuggestedGasFees:k,layer1GasFee:T}=x,w=Object.keys(y).length?y:f[b]||{},{hexMinimumTransactionFee:C,hexMaximumTransactionFee:_}=(0,r.useSelector)((e=>(0,i.transactionFeeSelector)(e,w))),E=(0,h.addHexes)(C,T??"0x0"),I=(0,h.addHexes)(_,T??"0x0");return a.default.createElement(c.default,{key:"legacy-gas-details","data-testid":e,detailTitle:k?a.default.createElement(a.default.Fragment,null,t("transactionDetailGasHeading"),a.default.createElement(d.default,{contentText:t("transactionDetailDappGasTooltip"),position:"top"},a.default.createElement(g.Icon,{name:g.IconName.Info}))):a.default.createElement(a.default.Fragment,null,t("transactionDetailGasHeading"),a.default.createElement(d.default,{contentText:a.default.createElement(a.default.Fragment,null,a.default.createElement("p",null,t("transactionDetailGasTooltipIntro",[n?t("networkNameEthereum"):""])),a.default.createElement("p",null,t("transactionDetailGasTooltipExplanation")),a.default.createElement("p",null,a.default.createElement("a",{href:"https://community.metamask.io/t/what-is-gas-why-do-transactions-take-so-long/3172",target:"_blank",rel:"noopener noreferrer"},t("transactionDetailGasTooltipConversion")))),position:"top"},a.default.createElement(g.Icon,{name:g.IconName.Info}))),detailText:o&&a.default.createElement("div",null,v(),a.default.createElement(u.default,{type:l.SECONDARY,value:E,hideLabel:!0})),detailTotal:a.default.createElement("div",null,v(),a.default.createElement(u.default,{type:l.PRIMARY,value:E,suffixProps:{color:m.TextColor.textDefault,variant:m.TextVariant.bodyMdBold},textProps:{color:m.TextColor.textDefault,variant:m.TextVariant.bodyMdBold},numberOfDecimals:6})),subText:a.default.createElement(a.default.Fragment,null,a.default.createElement("strong",{key:"editGasSubTextFeeLabel"},t("editGasSubTextFeeLabel")),a.default.createElement("div",{key:"editGasSubTextFeeValue"},v(),a.default.createElement(u.default,{key:"editGasSubTextFeeAmount",type:l.PRIMARY,value:I}))),subTitle:k&&t("transactionDetailDappGasMoreInfo")})};x.propTypes={"data-testid":o.default.string};n.default=x}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.js"}],[6434,{"./confirm-legacy-gas-display":6433},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmLegacyGasDisplay",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-legacy-gas-display"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/index.js"}],[6435,{"./confirm-gas-display":6432},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmGasDisplay",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-gas-display"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-gas-display/index.js"}],[6436,{"../../../../../shared/modules/buffer-utils":5298,"../../../../../shared/modules/transaction.utils":5326,"../../../../components/component-library":5806,"../../../../components/ui/box":6079,"../../../../helpers/constants/design-system":6248,"../../../../hooks/useI18nContext":6334,"../../../../selectors":6985,"../../hooks/useTransactionFunctionType":6741,"../transaction-decoding/components/ui/copy-raw-data":6635,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=g(e("react")),o=g(e("prop-types")),r=e("react-redux"),s=e("../../../../../shared/modules/buffer-utils"),i=e("../../../../selectors"),l=e("../../../../hooks/useI18nContext"),c=e("../../hooks/useTransactionFunctionType"),u=e("../../../../helpers/constants/design-system"),d=g(e("../../../../components/ui/box")),f=e("../../../../components/component-library"),m=g(e("../transaction-decoding/components/ui/copy-raw-data")),p=e("../../../../../shared/modules/transaction.utils");function g(e){return e&&e.__esModule?e:{default:e}}const h=({txData:e,dataHexComponent:t})=>{const n=(0,l.useI18nContext)(),{txParams:o={}}=e,g=(0,r.useSelector)((e=>(0,i.getKnownMethodData)(e,o.data)||{})),{functionType:h}=(0,c.useTransactionFunctionType)(e);if(t)return t;if(!(0,p.hasTransactionData)(o.data)||!o.to)return null;const{params:y}=g,v=null!=y&&y.length?`(${y.map((({type:e})=>e)).join(", ")})`:"";return a.default.createElement(d.default,{padding:4},a.default.createElement(d.default,{paddingBottom:3,paddingTop:2},a.default.createElement(f.Text,{as:"span",textTransform:u.TextTransform.Uppercase,variant:u.TextVariant.bodySm},`${n("functionType")}:`),a.default.createElement(f.Text,{as:"span",color:u.Color.textDefault,paddingLeft:1,textTransform:u.TextTransform.Capitalize,variant:u.TextVariant.bodySmBold},`${h} ${v}`)),y&&a.default.createElement(d.default,{backgroundColor:u.Color.backgroundAlternative,padding:4},a.default.createElement(f.Text,{as:"h3",paddingBottom:3,paddingTop:2,textTransform:u.TextTransform.Uppercase,variant:u.TextVariant.bodySm},`${n("parameters")}:`),a.default.createElement(f.Text,{overflowWrap:u.OverflowWrap.BreakWord,variant:u.TextVariant.bodySm},a.default.createElement("pre",null,JSON.stringify(y,null,2)))),a.default.createElement(f.Text,{as:"h3",paddingBottom:3,paddingTop:2,textTransform:u.TextTransform.Uppercase,variant:u.TextVariant.bodySm},`${n("hexData")}: ${(0,s.toBuffer)(null==o?void 0:o.data).length} bytes`),a.default.createElement(f.Text,{backgroundColor:u.Color.backgroundAlternative,overflowWrap:u.OverflowWrap.BreakWord,padding:4,variant:u.TextVariant.bodySm},null==o?void 0:o.data),a.default.createElement(m.default,{data:null==o?void 0:o.data}))};h.propTypes={txData:o.default.object,dataHexComponent:o.default.element};n.default=h}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-hexdata/confirm-hexdata.js"}],[6437,{"./confirm-hexdata":6436},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmHexData",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-hexdata"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-hexdata/index.js"}],[6438,{"../../../../../components/app/user-preferenced-currency-display":5727,"../../../../../helpers/constants/common":6246,classnames:3584,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(e("react")),o=l(e("prop-types")),r=l(e("classnames")),s=l(e("../../../../../components/app/user-preferenced-currency-display")),i=e("../../../../../helpers/constants/common");function l(e){return e&&e.__esModule?e:{default:e}}const c=e=>{const{label:t,primaryText:n,secondaryText:o,onHeaderClick:l,primaryValueTextColor:c,headerText:u,headerTextClassName:d,value:f}=e;return a.default.createElement("div",{className:"confirm-detail-row"},a.default.createElement("div",{className:"confirm-detail-row__label"},t),a.default.createElement("div",{className:"confirm-detail-row__details"},u&&a.default.createElement("div",{className:(0,r.default)("confirm-detail-row__header-text",d),onClick:()=>null==l?void 0:l()},u),n?a.default.createElement("div",{className:"confirm-detail-row__primary",style:{color:c}},n):a.default.createElement(s.default,{className:"confirm-detail-row__primary",type:i.PRIMARY,value:f,showEthLogo:!0,style:{color:c},hideLabel:!0}),o?a.default.createElement("div",{className:"confirm-detail-row__secondary"},o):a.default.createElement(s.default,{className:"confirm-detail-row__secondary",type:i.SECONDARY,value:f,showEthLogo:!0,hideLabel:!0})))};c.propTypes={headerText:o.default.string,headerTextClassName:o.default.string,label:o.default.string,onHeaderClick:o.default.func,primaryValueTextColor:o.default.string,primaryText:o.default.oneOfType([o.default.string,o.default.node]),secondaryText:o.default.string,value:o.default.string};n.default=c}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js"}],[6439,{"./confirm-detail-row.component":6438},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-detail-row.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-detail-row/index.js"}],[6440,{".":6445,"../../../../../../shared/constants/security-provider":5270,"../../../../../components/component-library":5806,"../../../../../components/ui/page-container":6160,"../../../../../components/ui/tabs":6183,"../../../../../helpers/constants/design-system":6248,"../../../../../helpers/constants/error-keys":6249,classnames:3584,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=m(e("prop-types")),r=m(e("classnames")),s=e("../../../../../components/ui/tabs"),i=e("../../../../../components/component-library"),l=e("../../../../../components/ui/page-container"),c=e("../../../../../helpers/constants/error-keys"),u=e("../../../../../helpers/constants/design-system"),d=e("../../../../../../shared/constants/security-provider"),f=e(".");function m(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=typeof a)return a;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:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class h extends a.Component{renderContent(){const{detailsComponent:e,dataHexComponent:t,insightComponent:n}=this.props;return n&&(e||t)||e&&t?this.renderTabs():e||n}renderTabs(){const{t:e}=this.context,{detailsComponent:t,dataHexComponent:n,insightComponent:o}=this.props;return a.default.createElement(s.Tabs,{defaultActiveTabKey:"details"},a.default.createElement(s.Tab,{className:"confirm-page-container-content__tab",name:e("details"),tabKey:"details"},t),n&&a.default.createElement(s.Tab,{className:"confirm-page-container-content__tab",name:e("dataHex"),tabKey:"dataHex"},n),o)}render(){var e;const{action:t,errorKey:n,errorMessage:o,image:s,titleComponent:m,subtitleComponent:p,tokenAddress:g,nonce:h,detailsComponent:y,warning:v,onCancelAll:x,onCancel:b,cancelText:k,onSubmit:T,submitText:w,disabled:C,unapprovedTxCount:_,rejectNText:E,origin:I,ethGasPriceWarning:S,supportsEIP1559:P,hasTopBorder:M,nativeCurrency:D,networkName:A,toAddress:O,transactionType:F,isBuyableChain:N,openBuyCryptoInPdapp:R,txData:j}=this.props,{t:B}=this.context,$=(n||o)&&n===c.INSUFFICIENT_FUNDS_ERROR_KEY,W=n===c.IS_SIGNING_OR_SUBMITTING,L=n===c.USER_OP_CONTRACT_DEPLOY_ERROR_KEY,G=(null==j||null===(e=j.securityAlertResponse)||void 0===e?void 0:e.result_type)===d.BlockaidResultType.Malicious?"danger-primary":"primary";return a.default.createElement("div",{className:(0,r.default)("confirm-page-container-content",{"confirm-page-container-content--with-top-border":M})},v?a.default.createElement(f.ConfirmPageContainerWarning,{warning:v}):null,S&&a.default.createElement(f.ConfirmPageContainerWarning,{warning:S}),a.default.createElement(f.ConfirmPageContainerSummary,{className:(0,r.default)({"confirm-page-container-summary--border":!y}),action:t,image:s,titleComponent:m,subtitleComponent:p,tokenAddress:g,nonce:h,origin:I,toAddress:O,transactionType:F}),this.renderContent(),!P&&!$&&!W&&!L&&(n||o)&&a.default.createElement(i.BannerAlert,{severity:u.Severity.Danger,description:n?B(n):o,marginBottom:4,marginLeft:4,marginRight:4}),$&&a.default.createElement(i.BannerAlert,{severity:u.Severity.Danger,marginBottom:4,marginLeft:4,marginRight:4,description:N?B("insufficientCurrencyBuyOrDeposit",[D,A,a.default.createElement(i.Button,{variant:i.BUTTON_VARIANT.LINK,size:i.BUTTON_SIZES.INHERIT,onClick:R,key:`${D}-buy-button`},B("buyAsset",[D]))]):B("insufficientCurrencyDeposit",[D,A])}),(W||L)&&a.default.createElement(i.BannerAlert,{"data-testid":"confirm-page-container-content-error-banner-2",severity:u.Severity.Danger,description:B(n),marginBottom:4,marginLeft:4,marginRight:4}),a.default.createElement(l.PageContainerFooter,{onCancel:b,cancelText:k,onSubmit:T,submitText:w,disabled:C,submitButtonType:G},_>1?a.default.createElement("a",{onClick:x},E):null))}}n.default=h,g(h,"contextTypes",{t:o.default.func.isRequired}),g(h,"propTypes",{action:o.default.string,dataHexComponent:o.default.node,detailsComponent:o.default.node,insightComponent:o.default.node,errorKey:o.default.string,errorMessage:o.default.string,tokenAddress:o.default.string,nonce:o.default.string,subtitleComponent:o.default.node,image:o.default.string,titleComponent:o.default.node,warning:o.default.string,origin:o.default.string.isRequired,ethGasPriceWarning:o.default.string,onCancelAll:o.default.func,onCancel:o.default.func,cancelText:o.default.string,onSubmit:o.default.func,submitText:o.default.string,disabled:o.default.bool,unapprovedTxCount:o.default.number,rejectNText:o.default.string,supportsEIP1559:o.default.bool,hasTopBorder:o.default.bool,nativeCurrency:o.default.string,networkName:o.default.string,toAddress:o.default.string,transactionType:o.default.string,isBuyableChain:o.default.bool,openBuyCryptoInPdapp:o.default.func,txData:o.default.object})}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js"}],[6441,{"../../../../../../../shared/constants/app":5248,"../../../../../../../shared/modules/hexstring-utils":5307,"../../../../../../components/app/modals/nickname-popovers":5511,"../../../../../../components/ui/identicon":6133,"../../../../../../components/ui/info-tooltip":6134,"../../../../../../components/ui/site-origin":6177,"../../../../../../hooks/useAddressDetails":6320,"../../../../../../hooks/useGetAssetImageUrl":6332,"../../../../../../hooks/useI18nContext":6334,"../../../../../../selectors":6985,"@metamask/transaction-controller":2698,classnames:3584,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=x(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=v(e("prop-types")),s=v(e("classnames")),i=e("@metamask/transaction-controller"),l=e("../../../../../../../shared/modules/hexstring-utils"),c=e("../../../../../../hooks/useI18nContext"),u=v(e("../../../../../../hooks/useAddressDetails")),d=e("../../../../../../selectors"),f=v(e("../../../../../../components/ui/identicon")),m=v(e("../../../../../../components/ui/info-tooltip")),p=v(e("../../../../../../components/app/modals/nickname-popovers")),g=e("../../../../../../../shared/constants/app"),h=v(e("../../../../../../components/ui/site-origin")),y=v(e("../../../../../../hooks/useGetAssetImageUrl"));function v(e){return e&&e.__esModule?e:{default:e}}function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(x=function(e){return e?n:t})(e)}const b=e=>{const{action:t,titleComponent:n,subtitleComponent:r,className:v,tokenAddress:x,nonce:b,origin:k,image:T,transactionType:w}=e,[C,_]=(0,a.useState)(!1),E=(0,c.useI18nContext)(),I=(0,o.useSelector)(d.getIpfsGateway),S=(0,o.useSelector)(d.txDataSelector),P=(0,y.default)(T,I),{txParams:M={}}=S,{to:D}=M,A=[i.TransactionType.contractInteraction,i.TransactionType.tokenMethodTransfer,i.TransactionType.tokenMethodTransferFrom,i.TransactionType.tokenMethodSafeTransferFrom].includes(w);let O;A&&(O=w===i.TransactionType.tokenMethodTransfer||w===i.TransactionType.tokenMethodTransferFrom||w===i.TransactionType.tokenMethodSafeTransferFrom||w===i.TransactionType.tokenMethodSetApprovalForAll?x:D);const{toName:F,isTrusted:N}=(0,u.default)(O),R=(0,l.toChecksumHexAddress)(O);return a.default.createElement("div",{className:(0,s.default)("confirm-page-container-summary",v)},k===g.ORIGIN_METAMASK?null:a.default.createElement(h.default,{className:"confirm-page-container-summary__origin",siteOrigin:k}),a.default.createElement("div",{className:"confirm-page-container-summary__action-row"},a.default.createElement("div",{className:"confirm-page-container-summary__action"},A&&F&&a.default.createElement("span",{className:"confirm-page-container-summary__action__contract-address"},a.default.createElement("button",{className:"confirm-page-container-summary__action__contract-address-btn",onClick:()=>_(!0),role:"button"},F),":"),a.default.createElement("span",{className:"confirm-page-container-summary__action__name"},t),A&&!1===N&&a.default.createElement(m.default,{position:"top",contentText:E("unverifiedContractAddressMessage")})),b&&a.default.createElement("div",{className:"confirm-page-container-summary__nonce"},`#${b}`)),a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:"confirm-page-container-summary__title"},T?a.default.createElement("img",{className:"confirm-page-container-summary__icon",width:36,src:P}):O?a.default.createElement(f.default,{className:"confirm-page-container-summary__icon",diameter:36,address:O}):null,n),r),C&&a.default.createElement(p.default,{onClose:()=>_(!1),address:R}))};b.propTypes={action:r.default.string,image:r.default.string,titleComponent:r.default.node,subtitleComponent:r.default.node,className:r.default.string,tokenAddress:r.default.string,nonce:r.default.string,origin:r.default.string.isRequired,transactionType:r.default.string};n.default=b}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js"}],[6442,{"./confirm-page-container-summary.component":6441},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-page-container-summary.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js"}],[6443,{"../../../../../../components/component-library":5806,"../../../../../../helpers/constants/design-system":6248,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=i(e("react")),o=i(e("prop-types")),r=e("../../../../../../components/component-library"),s=e("../../../../../../helpers/constants/design-system");function i(e){return e&&e.__esModule?e:{default:e}}const l=e=>a.default.createElement("div",{className:"confirm-page-container-warning"},a.default.createElement(r.Icon,{name:r.IconName.Info,color:s.IconColor.warningDefault,className:"confirm-page-container-warning__icon"}),a.default.createElement("div",{className:"confirm-page-container-warning__warning"},e.warning));l.propTypes={warning:o.default.string};n.default=l}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js"}],[6444,{"./confirm-page-container-warning.component":6443},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-page-container-warning.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js"}],[6445,{"./confirm-page-container-content.component":6440,"./confirm-page-container-summary":6442,"./confirm-page-container-warning":6444},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmPageContainerSummary",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"ConfirmPageContainerWarning",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a.default}});var a=s(e("./confirm-page-container-content.component")),o=s(e("./confirm-page-container-summary")),r=s(e("./confirm-page-container-warning"));function s(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/index.js"}],[6446,{"../../../../../../app/scripts/lib/util":135,"../../../../../../shared/constants/app":5248,"../../../../../components/app/network-display":5536,"../../../../../components/component-library":5806,"../../../../../components/ui/account-mismatch-warning/account-mismatch-warning.component":6074,"../../../../../components/ui/identicon":6133,"../../../../../helpers/utils/util":6297,"../../../../../hooks/useI18nContext":6334,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=p;var a=m(e("react")),o=m(e("prop-types")),r=e("../../../../../../shared/constants/app"),s=e("../../../../../../app/scripts/lib/util"),i=m(e("../../../../../components/app/network-display")),l=m(e("../../../../../components/ui/identicon")),c=e("../../../../../helpers/utils/util"),u=m(e("../../../../../components/ui/account-mismatch-warning/account-mismatch-warning.component")),d=e("../../../../../hooks/useI18nContext"),f=e("../../../../../components/component-library");function m(e){return e&&e.__esModule?e:{default:e}}function p({onEdit:e,showEdit:t,accountAddress:n,showAccountInHeader:o,children:m,origin:p}){const g=(0,d.useI18nContext)(),h=(0,s.getEnvironmentType)(),y=h!==r.ENVIRONMENT_TYPE_NOTIFICATION&&h!==r.ENVIRONMENT_TYPE_POPUP;return!t&&y?m:a.default.createElement("div",{className:"confirm-page-container-header","data-testid":"header-container"},a.default.createElement("div",{className:"confirm-page-container-header__row"},o?a.default.createElement("div",{className:"confirm-page-container-header__address-container"},a.default.createElement("div",{className:"confirm-page-container-header__address-identicon"},a.default.createElement(l.default,{address:n,diameter:24})),a.default.createElement("div",{className:"confirm-page-container-header__address","data-testid":"header-address"},(0,c.shortenAddress)(n)),a.default.createElement(u.default,{address:n})):p===r.ORIGIN_METAMASK&&a.default.createElement("div",{className:"confirm-page-container-header__back-button-container",style:{visibility:t?"initial":"hidden"}},a.default.createElement(f.Icon,{name:f.IconName.ArrowLeft}),a.default.createElement("span",{"data-testid":"confirm-page-back-edit-button",className:"confirm-page-container-header__back-button",onClick:()=>e()},g("edit"))),a.default.createElement(i.default,null)),m)}p.propTypes={accountAddress:o.default.string,showAccountInHeader:o.default.bool,showEdit:o.default.bool,onEdit:o.default.func,children:o.default.node,origin:o.default.string}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js"}],[6447,{"./confirm-page-container-header.component":6446},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-page-container-header.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/index.js"}],[6448,{"../../../../../../shared/constants/metametrics":5260,"../../../../../contexts/i18n":6211,"../../../../../ducks/confirm-transaction/confirm-transaction.duck":6229,"../../../../../helpers/constants/routes":6254,"../../../../../selectors":6985,"../../../hooks/useQueuedConfirmationEvents":6733,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("react-router-dom"),s=e("../../../../../selectors"),i=e("../../../../../contexts/i18n"),l=e("../../../../../helpers/constants/routes"),c=e("../../../../../ducks/confirm-transaction/confirm-transaction.duck"),u=e("../../../../../../shared/constants/metametrics"),d=e("../../../hooks/useQueuedConfirmationEvents");function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,a.useContext)(i.I18nContext),t=(0,o.useDispatch)(),n=(0,r.useHistory)(),{id:f}=(0,r.useParams)(),m=(0,o.useSelector)(s.unapprovedDecryptMsgsSelector),p=(0,o.useSelector)(s.unapprovedEncryptionPublicKeyMsgsSelector),g=(0,o.useSelector)(s.unconfirmedTransactionsListSelector)??[],h=[...Object.keys(m||{}),...Object.keys(p||{})],y=g.map((e=>e.id)).filter((e=>!1===h.includes(e))),v=y.indexOf(f),x=y.length,b=v+1,k=y[v+1],T=y[v-1],w=y.length>1,C=y[0],_=y[y.length-1],E=e=>{if(e){var a;t((0,c.clearConfirmTransaction)());const o=y.indexOf(e);n.push(null!==(a=g[o])&&void 0!==a&&a.msgParams?`${l.CONFIRM_TRANSACTION_ROUTE}/${e}${l.SIGNATURE_REQUEST_PATH}`:`${l.CONFIRM_TRANSACTION_ROUTE}/${e}`)}};return(0,d.useQueuedConfirmationsEvent)(u.QueueType.NavigationHeader),a.default.createElement("div",{className:"confirm-page-container-navigation",style:{display:w?"flex":"none"}},a.default.createElement("div",{className:"confirm-page-container-navigation__container","data-testid":"navigation-container",style:{visibility:T?"initial":"hidden"}},a.default.createElement("button",{className:"confirm-page-container-navigation__arrow","data-testid":"first-page",onClick:()=>E(C)},a.default.createElement("i",{className:"fa fa-angle-double-left fa-2x"})),a.default.createElement("button",{className:"confirm-page-container-navigation__arrow","data-testid":"previous-page",onClick:()=>E(T)},a.default.createElement("i",{className:"fa fa-angle-left fa-2x"}))),a.default.createElement("div",{className:"confirm-page-container-navigation__textcontainer"},a.default.createElement("div",{className:"confirm-page-container-navigation__navtext"},b," ",e("ofTextNofM")," ",x),a.default.createElement("div",{className:"confirm-page-container-navigation__longtext"},e("requestsAwaitingAcknowledgement"))),a.default.createElement("div",{className:"confirm-page-container-navigation__container",style:{visibility:k?"initial":"hidden"}},a.default.createElement("button",{className:"confirm-page-container-navigation__arrow","data-testid":"next-page",onClick:()=>E(k)},a.default.createElement("i",{className:"fa fa-angle-right fa-2x"})),a.default.createElement("button",{className:"confirm-page-container-navigation__arrow","data-testid":"last-page",onClick:()=>E(_)},a.default.createElement("i",{className:"fa fa-angle-double-right fa-2x"}))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js"}],[6449,{"./confirm-page-container-navigation.component":6448},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-page-container-navigation.component"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container-navigation/index.js"}],[6450,{".":6451,"../../../../../shared/constants/gas":5255,"../../../../../shared/constants/metametrics":5260,"../../../../../shared/constants/network":5264,"../../../../../shared/constants/security-provider":5270,"../../../../../shared/constants/transaction":5278,"../../../../../shared/lib/token-util":5290,"../../../../components/app/network-account-balance-header/network-account-balance-header":5535,"../../../../components/app/snaps/insight-warnings":5571,"../../../../components/component-library":5806,"../../../../components/ui/actionable-message/actionable-message":6075,"../../../../components/ui/button":6083,"../../../../components/ui/error-message":6110,"../../../../components/ui/page-container":6160,"../../../../components/ui/sender-to-recipient":6172,"../../../../contexts/gasFee":6210,"../../../../contexts/metametrics":6214,"../../../../ducks/ramps":6238,"../../../../helpers/constants/design-system":6248,"../../../../helpers/constants/error-keys":6249,"../../../../hooks/ramps/useRamps/useRamps":6311,"../../../../hooks/useI18nContext":6334,"../../../../hooks/useTransactionInsights":6367,"../../../../selectors":6985,"../advanced-gas-fee-popover":6430,"../edit-gas-fee-popover/edit-gas-fee-popover":6560,"../edit-gas-popover":6573,"../set-approval-for-all-warning":6588,"@metamask/transaction-controller":2698,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=R(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=N(e("prop-types")),r=e("react-redux"),s=e("@metamask/transaction-controller"),i=e("../../../../../shared/constants/gas"),l=e("../../../../contexts/gasFee"),c=e("../../../../../shared/constants/transaction"),u=e("../../../../../shared/constants/network"),d=e("../../../../components/ui/page-container"),f=N(e("../../../../components/ui/button")),m=N(e("../../../../components/ui/actionable-message/actionable-message")),p=N(e("../../../../components/ui/sender-to-recipient")),g=e("../../../../../shared/lib/token-util"),h=N(e("../advanced-gas-fee-popover")),y=N(e("../edit-gas-fee-popover/edit-gas-fee-popover")),v=N(e("../edit-gas-popover")),x=N(e("../../../../components/ui/error-message")),b=e("../../../../helpers/constants/error-keys"),k=e("../../../../components/component-library"),T=e("../../../../helpers/constants/design-system"),w=N(e("../../../../components/app/network-account-balance-header/network-account-balance-header")),C=N(e("../set-approval-for-all-warning")),_=e("../../../../hooks/useI18nContext"),E=N(e("../../../../hooks/useTransactionInsights")),I=N(e("../../../../components/app/snaps/insight-warnings")),S=e("../../../../selectors"),P=N(e("../../../../hooks/ramps/useRamps/useRamps")),M=e("../../../../contexts/metametrics"),D=e("../../../../../shared/constants/metametrics"),A=e("../../../../../shared/constants/security-provider"),O=e("../../../../ducks/ramps"),F=e(".");function N(e){return e&&e.__esModule?e:{default:e}}function R(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(R=function(e){return e?n:t})(e)}const j=e=>{var t;const{showEdit:n,onEdit:o,fromName:N,fromAddress:R,toEns:j,toNickname:B,toAddress:$,disabled:W,errorKey:L,errorMessage:G,contentComponent:q,action:V,title:H,image:U,titleComponent:z,subtitleComponent:K,detailsComponent:Y,dataHexComponent:J,onCancelAll:Q,onCancel:X,onSubmit:Z,onSetApprovalForAll:ee,showWarningModal:te,tokenAddress:ne,nonce:ae,unapprovedTxCount:oe,warning:re,hideSenderToRecipient:se,showAccountInHeader:ie,origin:le,ethGasPriceWarning:ce,editingGas:ue,handleCloseEditGas:de,currentTransaction:fe,supportsEIP1559:me,nativeCurrency:pe,txData:ge,assetStandard:he,isApprovalOrRejection:ye,displayAccountBalanceHeader:ve}=e,xe=(0,_.useI18nContext)(),be=(0,a.useContext)(M.MetaMetricsContext),[ke,Te]=(0,a.useState)("0"),[we,Ce]=(0,a.useState)(!1),_e=(0,r.useSelector)(O.getIsNativeTokenBuyable),Ee=(0,r.useSelector)((e=>(0,S.getAddressBookEntry)(e,$))),Ie=(0,r.useSelector)(S.getSwapsDefaultToken).string,Se=(0,r.useSelector)(S.getInternalAccounts),Pe=(0,S.getAccountName)(Se,$),Me=Pe||(null==Ee?void 0:Ee.name),De=Boolean(Pe),Ae=(0,r.useSelector)((e=>(0,S.getMetadataContractName)(e,$))),{openBuyCryptoInPdapp:Oe}=(0,P.default)(),Fe=fe.type===s.TransactionType.tokenMethodSetApprovalForAll,Ne=q&&W&&(L||G),{chainId:Re}=fe,je=(0,r.useSelector)((e=>(0,S.selectNetworkIdentifierByChainId)(e,Re))),Be=u.NETWORK_TO_NAME_MAP[Re]||je,$e=(0,a.useCallback)((async()=>{const e=await(0,g.fetchTokenBalance)(ne,R,global.ethereumProvider);Te(e.toString()||"0")}),[R,ne]),We=(0,E.default)({txData:ge}),Le=null==We?void 0:We.insightComponent,Ge=()=>Fe&&ye?ee():Z(),qe=()=>{var e;return(null==We||null===(e=We.warnings)||void 0===e?void 0:e.length)>0?Ce(!0):Ge()};(0,a.useEffect)((()=>{Fe&&he===c.TokenStandard.ERC721&&$e()}),[fe,he,Fe,$e,ke]);const Ve=(null===(t=ge.securityAlertResponse)||void 0===t?void 0:t.result_type)===A.BlockaidResultType.Malicious;return a.default.createElement(l.GasFeeContextProvider,{transaction:fe},a.default.createElement("div",{className:"page-container","data-testid":"page-container"},a.default.createElement(F.ConfirmPageContainerNavigation,null),ve?a.default.createElement(w.default,{accountName:N,accountBalance:Ie,tokenName:pe,accountAddress:R,networkName:Be,chainId:fe.chainId}):a.default.createElement(F.ConfirmPageContainerHeader,{showEdit:n,onEdit:()=>o(),showAccountInHeader:ie,accountAddress:R,origin:le},se?null:a.default.createElement(p.default,{senderName:N,senderAddress:R,recipientName:Me,recipientMetadataName:Ae,recipientAddress:$,recipientEns:j,recipientNickname:B,recipientIsOwnedAccount:De,chainId:fe.chainId})),q||a.default.createElement(F.ConfirmPageContainerContent,{action:V,title:H,image:U,titleComponent:z,subtitleComponent:K,detailsComponent:Y,dataHexComponent:J,insightComponent:Le,errorMessage:G,errorKey:L,tokenAddress:ne,nonce:ae,warning:re,onCancelAll:Q,onCancel:X,cancelText:xe("reject"),onSubmit:qe,submitText:xe("confirm"),disabled:W,unapprovedTxCount:oe,rejectNText:xe("rejectTxsN",[oe]),origin:le,ethGasPriceWarning:ce,supportsEIP1559:me,currentTransaction:fe,nativeCurrency:pe,networkName:Be,toAddress:$,transactionType:fe.type,isBuyableChain:_e,openBuyCryptoInPdapp:Oe,txData:ge}),Ne&&L===b.INSUFFICIENT_FUNDS_ERROR_KEY&&a.default.createElement("div",{className:"confirm-approve-content__warning"},a.default.createElement(m.default,{message:_e?a.default.createElement(k.Text,{variant:T.TextVariant.bodySm,textAlign:T.TextAlign.Left,as:"h6"},xe("insufficientCurrencyBuyOrDeposit",[pe,Be,a.default.createElement(f.default,{type:"inline",className:"confirm-page-container-content__link",onClick:()=>{Oe(),be({event:D.MetaMetricsEventName.NavBuyButtonClicked,category:D.MetaMetricsEventCategory.Navigation,properties:{location:"Transaction Confirmation",text:"Buy"}})},key:`${pe}-buy-button`},xe("buyAsset",[pe]))])):a.default.createElement(k.Text,{variant:T.TextVariant.bodySm,textAlign:T.TextAlign.Left,as:"h6"},xe("insufficientCurrencyDeposit",[pe,Be])),useIcon:!0,iconFillColor:"var(--color-error-default)",type:"danger"})),Ne&&L!==b.INSUFFICIENT_FUNDS_ERROR_KEY&&a.default.createElement("div",{className:"confirm-approve-content__warning"},a.default.createElement(x.default,{errorKey:L})),te&&a.default.createElement(C.default,{collectionName:H,senderAddress:R,name:N,isERC721:he===c.TokenStandard.ERC721,total:ke,onSubmit:Z,onCancel:X}),q&&a.default.createElement(d.PageContainerFooter,{onCancel:X,cancelText:xe("reject"),onSubmit:qe,submitText:xe("confirm"),submitButtonType:Fe&&ye||Ve?"danger-primary":"primary",disabled:W},oe>1&&a.default.createElement("a",{onClick:Q},xe("rejectTxsN",[oe]))),ue&&!me&&a.default.createElement(v.default,{mode:i.EditGasModes.modifyInPlace,onClose:de,transaction:fe}),me&&a.default.createElement(a.default.Fragment,null,a.default.createElement(y.default,null),a.default.createElement(h.default,null)),we&&a.default.createElement(I.default,{warnings:We.warnings,origin:le,onCancel:()=>Ce(!1),onSubmit:()=>{Ge(),Ce(!1)}})))};j.propTypes={action:o.default.string,onEdit:o.default.func,showEdit:o.default.bool,subtitleComponent:o.default.node,title:o.default.string,image:o.default.string,titleComponent:o.default.node,hideSenderToRecipient:o.default.bool,showAccountInHeader:o.default.bool,assetStandard:o.default.string,fromAddress:o.default.string,fromName:o.default.string,toAddress:o.default.string,toEns:o.default.string,toNickname:o.default.string,contentComponent:o.default.node,errorKey:o.default.string,errorMessage:o.default.string,dataHexComponent:o.default.node,detailsComponent:o.default.node,txData:o.default.object,tokenAddress:o.default.string,nonce:o.default.string,warning:o.default.string,unapprovedTxCount:o.default.number,origin:o.default.string.isRequired,ethGasPriceWarning:o.default.string,onCancelAll:o.default.func,onCancel:o.default.func,onSubmit:o.default.func,onSetApprovalForAll:o.default.func,showWarningModal:o.default.bool,disabled:o.default.bool,editingGas:o.default.bool,handleCloseEditGas:o.default.func,currentTransaction:o.default.object.isRequired,supportsEIP1559:o.default.bool,nativeCurrency:o.default.string,isApprovalOrRejection:o.default.bool,displayAccountBalanceHeader:o.default.bool};n.default=j}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/confirm-page-container.component.js"}],[6451,{"../../../../components/app/snaps/snap-insight/snap-insight":5594,"./confirm-detail-row":6439,"./confirm-page-container-content":6445,"./confirm-page-container-header":6447,"./confirm-page-container-navigation":6449,"./confirm-page-container.component":6450},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmDetailRow",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"ConfirmPageContainerContent",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(n,"ConfirmPageContainerHeader",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"ConfirmPageContainerNavigation",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(n,"ConfirmPageContainerSummary",{enumerable:!0,get:function(){return i.ConfirmPageContainerSummary}}),Object.defineProperty(n,"SnapInsight",{enumerable:!0,get:function(){return l.SnapInsight}}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a.default}});var a=u(e("./confirm-page-container.component")),o=u(e("./confirm-page-container-header")),r=u(e("./confirm-detail-row")),s=u(e("./confirm-page-container-navigation")),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("./confirm-page-container-content")),l=e("../../../../components/app/snaps/snap-insight/snap-insight");function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-page-container/index.js"}],[6452,{"../../../../components/app/user-preferenced-currency-display":5727,"../../../../components/component-library":5806,"../../../../helpers/constants/common":6246,"../../../../helpers/constants/design-system":6248,"../../../../helpers/utils/transactions.util":6295,"../../../../selectors":6985,"../../hooks/useTransactionInfo":6743,"prop-types":4528,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=m(e("react")),o=m(e("prop-types")),r=e("react-redux"),s=e("../../../../helpers/constants/common"),i=e("../../../../helpers/constants/design-system"),l=e("../../../../helpers/utils/transactions.util"),c=e("../../../../selectors"),u=e("../../hooks/useTransactionInfo"),d=e("../../../../components/component-library"),f=m(e("../../../../components/app/user-preferenced-currency-display"));function m(e){return e&&e.__esModule?e:{default:e}}const p=({txData:e,hexTransactionAmount:t,subtitleComponent:n,assetStandard:o})=>{const m=(0,r.useSelector)(c.getShouldShowFiat),{isNftTransfer:p}=(0,u.useTransactionInfo)(e);return m||p||(0,l.isNFTAssetStandard)(o)?n||a.default.createElement(d.Text,{as:"h5",ellipsis:!0,variant:i.TextVariant.bodyMd,color:i.Color.textAlternative},a.default.createElement(f.default,{value:t,type:s.SECONDARY,showEthLogo:!0,hideLabel:!0})):null};p.propTypes={assetStandard:o.default.string,hexTransactionAmount:o.default.string,subtitleComponent:o.default.element,txData:o.default.object.isRequired};n.default=p}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-subtitle/confirm-subtitle.js"}],[6453,{"./confirm-subtitle":6452},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmSubTitle",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-subtitle"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-subtitle/index.js"}],[6454,{"../../../../components/app/user-preferenced-currency-display":5727,"../../../../components/component-library":5806,"../../../../helpers/constants/common":6246,"../../../../helpers/constants/design-system":6248,"@metamask/transaction-controller":2698,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=u(e("react")),o=u(e("prop-types")),r=e("@metamask/transaction-controller"),s=e("../../../../helpers/constants/common"),i=e("../../../../components/component-library"),l=e("../../../../helpers/constants/design-system"),c=u(e("../../../../components/app/user-preferenced-currency-display"));function u(e){return e&&e.__esModule?e:{default:e}}const d=({title:e,hexTransactionAmount:t,txData:n})=>{var o;const u=n.type===r.TransactionType.contractInteraction;return(u||n.type===r.TransactionType.deployContract)&&"0x0"===(null===(o=n.txParams)||void 0===o?void 0:o.value)?null:e?a.default.createElement(i.Text,{as:e&&e.length<10?"h1":"h3",ellipsis:!0,title:e,variant:e&&e.length<10?l.TextVariant.displayMd:l.TextVariant.headingMd,fontWeight:l.FONT_WEIGHT.NORMAL},e):a.default.createElement(i.Text,{as:"h3",ellipsis:!0,fontWeight:l.FONT_WEIGHT.NORMAL,variant:l.TextVariant.headingMd},a.default.createElement(c.default,{hideLabel:!u,showCurrencySuffix:u,showEthLogo:!0,type:s.PRIMARY,value:t}))};d.propTypes={txData:o.default.object.isRequired,title:o.default.oneOfType([o.default.string,o.default.number]),hexTransactionAmount:o.default.string};n.default=d}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-title/confirm-title.js"}],[6455,{"./confirm-title":6454},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmTitle",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-title"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm-title/index.js"}],[6456,{"../../../../../../shared/constants/security-provider":5270,"../../../../../components/component-library":5806,"../../../../../components/ui/icon/preloader":6126,"../../../hooks/useCurrentSignatureSecurityAlertResponse":6721,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(e("react")),o=l(e("../../../../../components/ui/icon/preloader")),r=e("../../../../../../shared/constants/security-provider"),s=e("../../../../../components/component-library"),i=l(e("../../../hooks/useCurrentSignatureSecurityAlertResponse"));function l(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const e=(0,i.default)();return(null==e?void 0:e.result_type)!==r.BlockaidResultType.Loading?null:a.default.createElement(s.Box,{marginInline:"auto",marginTop:4},a.default.createElement(o.default,{size:18}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/blockaid-loading-indicator/blockaid-loading-indicator.tsx"}],[6457,{"./blockaid-loading-indicator":6456},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BlockaidLoadingIndicator",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./blockaid-loading-indicator"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/blockaid-loading-indicator/index.ts"}],[6458,{"../../../../../components/app/alert-system/contexts/alertActionHandler":5351,"../../../../../components/app/alert-system/contexts/alertMetricsContext":5352,"../../../hooks/setConfirmationAlerts":6710,"../../../hooks/useConfirmationAlertActions":6715,"../../../hooks/useConfirmationAlertMetrics":6716,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=c(e("react")),o=e("../../../../../components/app/alert-system/contexts/alertActionHandler"),r=c(e("../../../hooks/useConfirmationAlertActions")),s=c(e("../../../hooks/setConfirmationAlerts")),i=e("../../../../../components/app/alert-system/contexts/alertMetricsContext"),l=e("../../../hooks/useConfirmationAlertMetrics");function c(e){return e&&e.__esModule?e:{default:e}}n.default=({children:e})=>{const{trackAlertActionClicked:t,trackAlertRender:n,trackInlineAlertClicked:c}=(0,l.useConfirmationAlertMetrics)(),u=(0,r.default)();return(0,s.default)(),a.default.createElement(i.AlertMetricsProvider,{metrics:{trackAlertActionClicked:t,trackAlertRender:n,trackInlineAlertClicked:c}},a.default.createElement(o.AlertActionHandlerProvider,{onProcessAction:u},e))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/confirm-alerts/confirm-alerts.tsx"}],[6459,{"./confirm-alerts":6458},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ConfirmAlerts",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirm-alerts"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/confirm-alerts/index.tsx"}],[6460,{"../../../../../../shared/constants/metametrics":5260,"../../../../../../shared/lib/confirmation.utils":5281,"../../../../../components/app/alert-system/confirm-alert-modal":5350,"../../../../../components/component-library":5806,"../../../../../components/multichain/pages/page":6032,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useAlerts":6321,"../../../../../hooks/useI18nContext":6334,"../../../../../selectors":6985,"../../../../../store/actions":7e3,"../../../context/confirm":6691,"../../../selectors/preferences":6748,"../../../utils":6756,"../utils":6545,"@metamask/rpc-errors":2304,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=e("@metamask/rpc-errors"),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=k(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),s=e("react-redux"),i=e("../../../../../components/app/alert-system/confirm-alert-modal"),l=e("../../../../../components/component-library"),c=e("../../../../../components/multichain/pages/page"),u=e("../../../../../hooks/useI18nContext"),d=e("../../../../../selectors"),f=(a=e("../../../../../hooks/useAlerts"))&&a.__esModule?a:{default:a},m=e("../../../../../store/actions"),p=e("../../../selectors/preferences"),g=e("../../../utils"),h=e("../../../context/confirm"),y=e("../utils"),v=e("../../../../../../shared/constants/metametrics"),x=e("../../../../../helpers/constants/design-system"),b=e("../../../../../../shared/lib/confirmation.utils");function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(k=function(e){return e?n:t})(e)}function T(e,t,n){return!!t||!e&&n}const w=({alertOwnerId:e="",disabled:t,onSubmit:n,onCancel:a})=>{const o=(0,u.useI18nContext)(),[s,c]=(0,r.useState)(!1),{alerts:d,hasDangerAlerts:m,hasUnconfirmedDangerAlerts:p,hasUnconfirmedFieldDangerAlerts:g,unconfirmedFieldDangerAlerts:h}=(0,f.default)(e),y=d.some((e=>e.severity===x.Severity.Danger&&e.isBlocking)),v=(0,r.useCallback)((()=>{c(!1)}),[]),b=(0,r.useCallback)((()=>{c(!0)}),[]);return r.default.createElement(r.default.Fragment,null,s&&r.default.createElement(i.ConfirmAlertModal,{ownerId:e,onClose:v,onCancel:a,onSubmit:n}),m?r.default.createElement(l.Button,{block:!0,danger:!0,"data-testid":"confirm-footer-button",disabled:T(p,y,t),onClick:b,size:l.ButtonSize.Lg,startIconName:g?l.IconName.SecuritySearch:l.IconName.Danger},function(e,t){return 1===e.length?t("reviewAlert"):e.length>1?t("reviewAlerts"):t("confirm")}(h,o)):r.default.createElement(l.Button,{block:!0,"data-testid":"confirm-footer-button",disabled:t,onClick:n,size:l.ButtonSize.Lg},o("confirm")))};n.default=()=>{const e=(0,s.useDispatch)(),t=(0,u.useI18nContext)(),n=(0,s.useSelector)(d.getCustomNonceValue),a=(0,s.useSelector)(p.selectUseTransactionSimulations),{currentConfirmation:i,isScrollToBottomCompleted:f}=(0,h.useConfirmContext)(),{from:x}=(0,y.getConfirmationSender)(i),k=(0,s.useSelector)((e=>!!x&&(0,d.doesAddressRequireLedgerHidConnection)(e,x))),T=(0,g.isSIWESignatureRequest)(i),C=(0,g.isPermitSignatureRequest)(i),_=!f&&!T&&!(C&&a)||k,E=(0,r.useCallback)((({location:t})=>{if(!i)return;const n=o.providerErrors.userRejectedRequest();n.data={location:t},e((0,m.rejectPendingApproval)(i.id,(0,o.serializeError)(n))),e((0,m.updateCustomNonce)("")),e((0,m.setNextNonce)(""))}),[i]),I=(0,r.useCallback)((()=>{if(!i)return;if((0,b.isCorrectDeveloperTransactionType)(null==i?void 0:i.type)){const t=(e=>n?{...e,customNonceValue:n}:e)(i);e((0,m.updateAndApproveTx)(t,!0,""))}else e((0,m.resolvePendingApproval)(i.id,undefined));e((0,m.updateCustomNonce)("")),e((0,m.setNextNonce)(""))}),[i,n]),S=(0,r.useCallback)((()=>{E({location:v.MetaMetricsEventLocation.Confirmation})}),[i,E]);return r.default.createElement(c.Footer,{className:"confirm-footer_page-footer"},r.default.createElement(l.Button,{block:!0,"data-testid":"confirm-footer-cancel-button",onClick:S,size:l.ButtonSize.Lg,variant:l.ButtonVariant.Secondary},t("cancel")),r.default.createElement(w,{alertOwnerId:null==i?void 0:i.id,onSubmit:()=>I(),disabled:_,onCancel:E}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/footer/footer.tsx"}],[6461,{"./footer":6460},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Footer",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./footer"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/footer/index.tsx"}],[6462,{"../../../../../components/component-library":5806,"../../../../../helpers/constants/design-system":6248,"../../../../../store/actions":7e3,"../../../selectors/preferences":6748,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AdvancedDetailsButton=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("react-redux"),s=e("../../../../../components/component-library"),i=e("../../../../../helpers/constants/design-system"),l=e("../../../../../store/actions"),c=e("../../../selectors/preferences");n.AdvancedDetailsButton=()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(c.selectConfirmationAdvancedDetailsOpen);return o.default.createElement(s.Box,{backgroundColor:t?i.BackgroundColor.infoMuted:i.BackgroundColor.transparent,borderRadius:i.BorderRadius.MD,marginRight:1},o.default.createElement(s.ButtonIcon,{ariaLabel:"Advanced tx details",color:i.IconColor.iconDefault,iconName:s.IconName.Customize,"data-testid":"header-advanced-details-button",size:s.ButtonIconSize.Md,onClick:()=>{var n;n=!t,e((0,l.setConfirmationAdvancedDetailsOpen)(n))}}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/header/advanced-details-button.tsx"}],[6463,{"../../../../../components/component-library":5806,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useI18nContext":6334,"./advanced-details-button":6462,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.DAppInitiatedHeader=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../components/component-library"),s=e("../../../../../helpers/constants/design-system"),i=e("../../../../../hooks/useI18nContext"),l=e("./advanced-details-button");n.DAppInitiatedHeader=()=>{const e=(0,i.useI18nContext)();return o.default.createElement(r.Box,{display:s.Display.Flex,flexDirection:s.FlexDirection.Row,justifyContent:s.JustifyContent.center,alignItems:s.AlignItems.center,backgroundColor:s.BackgroundColor.backgroundDefault,padding:3,style:{zIndex:2,position:"relative"}},o.default.createElement(r.Text,{variant:s.TextVariant.headingMd,color:s.TextColor.inherit},e("transferRequest")),o.default.createElement(r.Box,{paddingRight:3,style:{marginLeft:"auto",position:"absolute",right:0}},o.default.createElement(l.AdvancedDetailsButton,null)))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/header/dapp-initiated-header.tsx"}],[6464,{"../../../../../../shared/constants/metametrics":5260,"../../../../../../shared/lib/confirmation.utils":5281,"../../../../../components/app/confirm/info/row":5416,"../../../../../components/app/confirm/info/row/currency":5411,"../../../../../components/component-library":5806,"../../../../../components/multichain":5964,"../../../../../components/ui/tooltip/tooltip":6198,"../../../../../contexts/metametrics":6214,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useI18nContext":6334,"../../../../../selectors":6985,"../../../context/confirm":6691,"../../../hooks/useBalance":6714,"../../../hooks/useConfirmationRecipientInfo":6719,"../../../utils/confirm":6755,"./advanced-details-button":6462,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=T(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../../../shared/constants/metametrics"),s=e("../../../../../components/app/confirm/info/row"),i=e("../../../../../components/app/confirm/info/row/currency"),l=e("../../../../../components/component-library"),c=e("../../../../../components/multichain"),u=k(e("../../../../../components/ui/tooltip/tooltip")),d=e("../../../../../contexts/metametrics"),f=e("../../../../../helpers/constants/design-system"),m=e("../../../../../hooks/useI18nContext"),p=e("../../../../../selectors"),g=e("../../../context/confirm"),h=e("../../../hooks/useBalance"),y=k(e("../../../hooks/useConfirmationRecipientInfo")),v=e("../../../utils/confirm"),x=e("../../../../../../shared/lib/confirmation.utils"),b=e("./advanced-details-button");function k(e){return e&&e.__esModule?e:{default:e}}function T(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(T=function(e){return e?n:t})(e)}n.default=()=>{var e;const t=(0,a.useContext)(d.MetaMetricsContext),n=(0,o.useSelector)(p.getUseBlockie),[k,T]=a.default.useState(!1),{currentConfirmation:w}=(0,g.useConfirmContext)(),{senderAddress:C,senderName:_}=(0,y.default)(),E=(0,m.useI18nContext)(),{balance:I}=(0,h.useBalance)(C),S=(0,v.isSignatureTransactionType)(w)?{location:r.MetaMetricsEventLocation.SignatureConfirmation,signature_type:null==w||null===(e=w.msgParams)||void 0===e?void 0:e.signatureMethod}:{location:r.MetaMetricsEventLocation.Transaction,transaction_type:null==w?void 0:w.type};const P=(0,x.isCorrectDeveloperTransactionType)(null==w?void 0:w.type);return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.Box,{display:f.Display.Flex,justifyContent:f.JustifyContent.flexEnd,style:{alignSelf:"flex-end"}},a.default.createElement(u.default,{position:"bottom",title:E("accountDetails"),interactive:!0},a.default.createElement(l.ButtonIcon,{ariaLabel:E("accountDetails"),color:f.IconColor.iconDefault,iconName:l.IconName.Info,size:l.ButtonIconSize.Md,onClick:()=>{!function(){const e={category:r.MetaMetricsEventCategory.Confirmations,event:r.MetaMetricsEventName.AccountDetailsOpened,properties:{action:"Confirm Screen",...S}};t(e)}(),T(!0)},"data-testid":"header-info__account-details-button"})),P&&a.default.createElement(b.AdvancedDetailsButton,null)),a.default.createElement(l.Modal,{isOpen:k,onClose:()=>T(!1),"data-testid":"account-details-modal",isClosedOnEscapeKey:!1,isClosedOnOutsideClick:!1},a.default.createElement(l.ModalOverlay,null),a.default.createElement(l.ModalContent,null,a.default.createElement(l.ModalHeader,null,a.default.createElement(l.Box,{display:f.Display.Flex,justifyContent:f.JustifyContent.center,style:{position:"relative"}},a.default.createElement(l.Box,{style:{margin:"0 auto"},display:f.Display.Flex,justifyContent:f.JustifyContent.center,flexDirection:f.FlexDirection.Column,alignItems:f.AlignItems.center},a.default.createElement(l.AvatarAccount,{variant:n?l.AvatarAccountVariant.Blockies:l.AvatarAccountVariant.Jazzicon,address:C,size:l.AvatarAccountSize.Lg}),a.default.createElement(l.Text,{fontWeight:f.FontWeight.Bold,variant:f.TextVariant.bodyMd,color:f.TextColor.textDefault,marginTop:2,"data-testid":"confirmation-account-details-modal__account-name"},_)),a.default.createElement(l.Box,{style:{position:"absolute",right:0}},a.default.createElement(l.ButtonIcon,{ariaLabel:E("close"),iconName:l.IconName.Close,size:l.ButtonIconSize.Sm,className:"confirm_header__close-button",onClick:()=>T(!1),"data-testid":"confirmation-account-details-modal__close-button"})))),a.default.createElement(l.ModalBody,null,a.default.createElement(s.ConfirmInfoRow,{label:"Account address"},a.default.createElement(c.AddressCopyButton,{address:C,shorten:!0})),a.default.createElement(s.ConfirmInfoRow,{label:"Balance"},a.default.createElement(i.ConfirmInfoRowCurrency,{value:I??0,"data-testid":"confirmation-account-details-modal__account-balance"}))))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/header/header-info.tsx"}],[6465,{"../../../../../../shared/constants/app":5248,"../../../../../components/component-library":5806,"../../../../../components/ui/identicon":6133,"../../../../../helpers/constants/design-system":6248,"../../../../../helpers/utils/accounts":6272,"../../../context/confirm":6691,"../../../hooks/useConfirmationNetworkInfo":6718,"../../../hooks/useConfirmationRecipientInfo":6719,"./dapp-initiated-header":6463,"./header-info":6464,"./wallet-initiated-header":6467,"@metamask/transaction-controller":2698,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("@metamask/transaction-controller"),o=h(e("react")),r=e("../../../../../../shared/constants/app"),s=e("../../../../../components/component-library"),i=h(e("../../../../../components/ui/identicon")),l=e("../../../../../helpers/constants/design-system"),c=e("../../../../../helpers/utils/accounts"),u=e("../../../context/confirm"),d=h(e("../../../hooks/useConfirmationNetworkInfo")),f=h(e("../../../hooks/useConfirmationRecipientInfo")),m=e("./dapp-initiated-header"),p=h(e("./header-info")),g=e("./wallet-initiated-header");function h(e){return e&&e.__esModule?e:{default:e}}const y=[a.TransactionType.tokenMethodTransfer,a.TransactionType.tokenMethodTransferFrom,a.TransactionType.tokenMethodSafeTransferFrom,a.TransactionType.simpleSend];n.default=()=>{const{networkImageUrl:e,networkDisplayName:t}=(0,d.default)(),{senderAddress:n,senderName:a}=(0,f.default)(),{currentConfirmation:h}=(0,u.useConfirmContext)(),v=o.default.createElement(s.Box,{display:l.Display.Flex,className:"confirm_header__wrapper",alignItems:l.AlignItems.center,justifyContent:l.JustifyContent.spaceBetween,"data-testid":"confirm-header"},o.default.createElement(s.Box,{alignItems:l.AlignItems.flexStart,display:l.Display.Flex,padding:4},o.default.createElement(s.Box,{display:l.Display.Flex,marginTop:2},o.default.createElement(i.default,{address:n,diameter:32}),o.default.createElement(s.AvatarNetwork,{src:e,name:t,size:s.AvatarNetworkSize.Xs,backgroundColor:(0,c.getAvatarNetworkColor)(t),className:"confirm_header__avatar-network"})),o.default.createElement(s.Box,{marginInlineStart:4},o.default.createElement(s.Text,{color:l.TextColor.textDefault,variant:l.TextVariant.bodyMdMedium,"data-testid":"header-account-name"},a),o.default.createElement(s.Text,{color:l.TextColor.textAlternative,"data-testid":"header-network-display-name"},t))),o.default.createElement(s.Box,{alignItems:l.AlignItems.flexEnd,display:l.Display.Flex,padding:4},o.default.createElement(p.default,null))),x=(null==h?void 0:h.type)&&y.includes(h.type),b=(null==h?void 0:h.origin)===r.ORIGIN_METAMASK;return x&&b?o.default.createElement(g.WalletInitiatedHeader,null):x&&!b?o.default.createElement(m.DAppInitiatedHeader,null):v}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/header/header.tsx"}],[6466,{"./header":6465},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Header",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./header"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/header/index.tsx"}],[6467,{"../../../../../../shared/constants/transaction":5278,"../../../../../components/component-library":5806,"../../../../../ducks/confirm-transaction/confirm-transaction.duck":6229,"../../../../../ducks/send":6241,"../../../../../helpers/constants/design-system":6248,"../../../../../helpers/constants/routes":6254,"../../../../../hooks/useI18nContext":6334,"../../../../../store/actions":7e3,"../../../context/confirm":6691,"./advanced-details-button":6462,"@metamask/transaction-controller":2698,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.WalletInitiatedHeader=void 0;var a=e("@metamask/transaction-controller"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("react-redux"),s=e("react-router-dom"),i=e("../../../../../../shared/constants/transaction"),l=e("../../../../../components/component-library"),c=e("../../../../../ducks/confirm-transaction/confirm-transaction.duck"),u=e("../../../../../ducks/send"),d=e("../../../../../helpers/constants/design-system"),f=e("../../../../../helpers/constants/routes"),m=e("../../../../../hooks/useI18nContext"),p=e("../../../../../store/actions"),g=e("../../../context/confirm"),h=e("./advanced-details-button");function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}n.WalletInitiatedHeader=()=>{const e=(0,m.useI18nContext)(),t=(0,r.useDispatch)(),n=(0,s.useHistory)(),{currentConfirmation:y}=(0,g.useConfirmContext)(),v=(0,o.useCallback)((async()=>{const{id:e}=y,o=y.type===a.TransactionType.simpleSend,r=y.type===a.TransactionType.tokenMethodTransfer,s=y.type===a.TransactionType.tokenMethodTransferFrom||y.type===a.TransactionType.tokenMethodSafeTransferFrom;let l;l=o?i.AssetType.native:r?i.AssetType.token:s?i.AssetType.NFT:i.AssetType.unknown,await t((0,u.editExistingTransaction)(l,e.toString())),t((0,c.clearConfirmTransaction)()),t((0,p.showSendTokenPage)()),n.push(f.SEND_ROUTE)}),[y,t,n]);return o.default.createElement(l.Box,{alignItems:d.AlignItems.center,backgroundColor:d.BackgroundColor.backgroundDefault,display:d.Display.Flex,flexDirection:d.FlexDirection.Row,justifyContent:d.JustifyContent.spaceBetween,padding:3,style:{zIndex:2}},o.default.createElement(l.ButtonIcon,{iconName:l.IconName.ArrowLeft,ariaLabel:e("back"),size:l.ButtonIconSize.Md,onClick:v,"data-testid":"wallet-initiated-header-back-button",color:d.IconColor.iconDefault}),o.default.createElement(l.Text,{variant:d.TextVariant.headingMd,color:d.TextColor.inherit},e("review")),o.default.createElement(h.AdvancedDetailsButton,null))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/header/wallet-initiated-header.tsx"}],[6468,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../../../../selectors/preferences":6748,"../../hooks/useDecodedTransactionData":6479,"../../shared/sign-in-with-row/sign-in-with-row":6507,"../../shared/transaction-data/transaction-data":6509,"../../shared/transaction-details/transaction-details":6510,"../../utils":6524,"../hooks/use-is-nft":6473,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ApproveDetails=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("react-redux"),s=e("../../../../../../../components/app/confirm/info/row"),i=e("../../../../../../../components/app/confirm/info/row/section"),l=e("../../../../../../../hooks/useI18nContext"),c=e("../../../../../context/confirm"),u=e("../../../../../selectors/preferences"),d=e("../../shared/sign-in-with-row/sign-in-with-row"),f=e("../../hooks/useDecodedTransactionData"),m=e("../../shared/transaction-data/transaction-data"),p=e("../../shared/transaction-details/transaction-details"),g=e("../../utils"),h=e("../hooks/use-is-nft");const y=({isSetApprovalForAll:e=!1})=>{const t=(0,l.useI18nContext)(),{currentConfirmation:n}=(0,c.useConfirmContext)(),{isNFT:a}=(0,h.useIsNFT)(n),r=(0,f.useDecodedTransactionData)(),{value:i,pending:u}=r;if(u)return o.default.createElement(m.Container,{isLoading:!0});if(!i)return null;const d=i.data[0].params[0].value,{chainId:p}=n;return(0,g.getIsRevokeSetApprovalForAll)(i)?null:o.default.createElement(o.default.Fragment,null,o.default.createElement(s.ConfirmInfoRow,{label:t(e?"permissionFor":"spender"),tooltip:t(a?"spenderTooltipDesc":"spenderTooltipERC20ApproveDesc"),"data-testid":"confirmation__approve-spender"},o.default.createElement(s.ConfirmInfoRowAddress,{address:d,chainId:p})),o.default.createElement(s.ConfirmInfoRowDivider,null))};n.ApproveDetails=({isSetApprovalForAll:e=!1})=>{const t=(0,r.useSelector)(u.selectConfirmationAdvancedDetailsOpen);return o.default.createElement(i.ConfirmInfoSection,{"data-testid":"confirmation__approve-details"},o.default.createElement(y,{isSetApprovalForAll:e}),o.default.createElement(p.OriginRow,null),o.default.createElement(d.SigningInWithRow,null),t&&o.default.createElement(o.default.Fragment,null,o.default.createElement(p.RecipientRow,null),o.default.createElement(p.MethodDataRow,null)))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/approve-details/approve-details.tsx"}],[6469,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/name":5530,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/tooltip":6197,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../../../../hooks/useAssetDetails":6713,"../../shared/static-simulation/static-simulation":6508,"../../shared/transaction-data/transaction-data":6509,"../hooks/use-approve-token-simulation":6472,"../hooks/use-is-nft":6473,"@metamask/name-controller":1955,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ApproveStaticSimulation=void 0;var a=e("@metamask/name-controller"),o=y(e("react")),r=e("../../../../../../../components/app/confirm/info/row"),s=y(e("../../../../../../../components/app/name")),i=e("../../../../../../../components/component-library"),l=y(e("../../../../../../../components/ui/tooltip")),c=e("../../../../../../../helpers/constants/design-system"),u=e("../../../../../../../hooks/useI18nContext"),d=e("../../../../../context/confirm"),f=e("../../../../../hooks/useAssetDetails"),m=y(e("../../shared/static-simulation/static-simulation")),p=e("../../shared/transaction-data/transaction-data"),g=e("../hooks/use-approve-token-simulation"),h=e("../hooks/use-is-nft");function y(e){return e&&e.__esModule?e:{default:e}}n.ApproveStaticSimulation=()=>{var e,t,n;const y=(0,u.useI18nContext)(),{currentConfirmation:v}=(0,d.useConfirmContext)(),{decimals:x}=(0,f.useAssetDetails)(null==v||null===(e=v.txParams)||void 0===e?void 0:e.to,null==v||null===(t=v.txParams)||void 0===t?void 0:t.from,null==v||null===(n=v.txParams)||void 0===n?void 0:n.data,null==v?void 0:v.chainId),b=x||"0",{spendingCap:k,isUnlimitedSpendingCap:T,formattedSpendingCap:w,value:C,pending:_}=(0,g.useApproveTokenSimulation)(v,b),{isNFT:E}=(0,h.useIsNFT)(v);if(_)return o.default.createElement(p.Container,{isLoading:!0});if(!C)return null;const{chainId:I}=v,S=o.default.createElement(i.Text,{"data-testid":"simulation-token-value",backgroundColor:c.BackgroundColor.backgroundAlternative,borderRadius:c.BorderRadius.XL,paddingInline:2,textAlign:c.TextAlign.Center,alignItems:c.AlignItems.center},T?y("unlimited"):w),P=o.default.createElement(r.ConfirmInfoRow,{label:y(E?"simulationApproveHeading":"spendingCap")},o.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},o.default.createElement(i.Box,{display:c.Display.Flex,alignItems:c.AlignItems.center},o.default.createElement(i.Box,{display:c.Display.Inline,marginInlineEnd:1,minWidth:c.BlockSize.Zero},Boolean(T)||k!==w?o.default.createElement(l.default,{title:k},S):S),o.default.createElement(s.default,{value:v.txParams.to,type:a.NameType.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:I}))));return o.default.createElement(m.default,{title:y("simulationDetailsTitle"),titleTooltip:y("simulationDetailsTitleTooltip"),description:y(E?"simulationDetailsApproveDesc":"simulationDetailsERC20ApproveDesc"),simulationElements:P})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/approve-static-simulation/approve-static-simulation.tsx"}],[6470,{"../../../../context/confirm":6691,"../../../../hooks/useAssetDetails":6713,"../shared/advanced-details/advanced-details":6496,"../shared/confirm-loader/confirm-loader":6497,"../shared/gas-fees-section/gas-fees-section":6503,"./approve-details/approve-details":6468,"./approve-static-simulation/approve-static-simulation":6469,"./edit-spending-cap-modal/edit-spending-cap-modal":6471,"./hooks/use-approve-token-simulation":6472,"./hooks/use-is-nft":6473,"./revoke-details/revoke-details":6474,"./revoke-static-simulation/revoke-static-simulation":6475,"./spending-cap/spending-cap":6476,"@metamask/transaction-controller":2698,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("@metamask/transaction-controller"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("../../../../context/confirm"),s=e("../../../../hooks/useAssetDetails"),i=e("../shared/advanced-details/advanced-details"),l=e("../shared/confirm-loader/confirm-loader"),c=e("../shared/gas-fees-section/gas-fees-section"),u=e("./approve-details/approve-details"),d=e("./approve-static-simulation/approve-static-simulation"),f=e("./edit-spending-cap-modal/edit-spending-cap-modal"),m=e("./hooks/use-approve-token-simulation"),p=e("./hooks/use-is-nft"),g=e("./revoke-details/revoke-details"),h=e("./revoke-static-simulation/revoke-static-simulation"),y=e("./spending-cap/spending-cap");function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}n.default=()=>{const{currentConfirmation:e}=(0,r.useConfirmContext)(),{isNFT:t}=(0,p.useIsNFT)(e),[n,v]=(0,o.useState)(!1),{decimals:x}=(0,s.useAssetDetails)(e.txParams.to,e.txParams.from,e.txParams.data,e.chainId),{spendingCap:b,pending:k}=(0,m.useApproveTokenSimulation)(e,x||"0"),T="0"===b&&e.type===a.TransactionType.tokenMethodApprove;return null!=e&&e.txParams?k?o.default.createElement(l.ConfirmLoader,null):o.default.createElement(o.default.Fragment,null,T?o.default.createElement(h.RevokeStaticSimulation,null):o.default.createElement(d.ApproveStaticSimulation,null),T?o.default.createElement(g.RevokeDetails,null):o.default.createElement(u.ApproveDetails,null),!t&&!T&&o.default.createElement(y.SpendingCap,{setIsOpenEditSpendingCapModal:v}),o.default.createElement(c.GasFeesSection,null),o.default.createElement(i.AdvancedDetails,null),o.default.createElement(f.EditSpendingCapModal,{isOpenEditSpendingCapModal:n,setIsOpenEditSpendingCapModal:v})):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/approve.tsx"}],[6471,{"../../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../../../shared/modules/conversion.utils":5301,"../../../../../../../components/component-library":5806,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../../../store/actions":7e3,"../../../../../confirm-approve/confirm-approve.util":6642,"../../../../../context/confirm":6691,"../../../../../hooks/useAssetDetails":6713,"../hooks/use-approve-token-simulation":6472,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.EditSpendingCapModal=void 0,n.countDecimalDigits=h;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../../../../../shared/lib/transactions-controller-utils"),s=e("../../../../../../../../shared/modules/conversion.utils"),i=e("../../../../../../../components/component-library"),l=e("../../../../../../../helpers/constants/design-system"),c=e("../../../../../../../hooks/useI18nContext"),u=e("../../../../../../../store/actions"),d=e("../../../../../confirm-approve/confirm-approve.util"),f=e("../../../../../context/confirm"),m=e("../../../../../hooks/useAssetDetails"),p=e("../hooks/use-approve-token-simulation");function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function h(e){var t;return(null===(t=e.split(".")[1])||void 0===t?void 0:t.length)||0}n.EditSpendingCapModal=({isOpenEditSpendingCapModal:e,setIsOpenEditSpendingCapModal:t})=>{const n=(0,c.useI18nContext)(),g=(0,o.useDispatch)(),{currentConfirmation:y}=(0,f.useConfirmContext)(),{userBalance:v,tokenSymbol:x,decimals:b}=(0,m.useAssetDetails)(y.txParams.to,y.txParams.from,y.txParams.data,y.chainId),k=(0,r.calcTokenAmount)(v??"0",Number(b??"0")).toFixed(),{formattedSpendingCap:T,spendingCap:w}=(0,p.useApproveTokenSimulation)(y,b||"0"),[C,_]=(0,a.useState)(w);(0,a.useEffect)((()=>{w&&_(w)}),[w]);const E=(0,a.useCallback)((()=>{t(!1),_(w)}),[t,_,w]),[I,S]=(0,a.useState)(!1),P=(0,a.useCallback)((async()=>{var e;S(!0);const n=(0,d.getCustomTxParamsData)(null==y||null===(e=y.txParams)||void 0===e?void 0:e.data,{customPermissionAmount:C||"0",decimals:b||"0"}),a=await(0,u.estimateGas)({from:y.txParams.from,to:y.txParams.to,value:y.txParams.value,data:n});g((0,u.updateEditableParams)(y.id,{data:n,gas:(0,s.hexToDecimal)(a)})),S(!1),t(!1),_(w)}),[C,w]),M=b&&parseInt(b,10)_(e.target.value),placeholder:`${T} ${x}`,style:{width:"100%"},inputProps:{"data-testid":"custom-spending-cap-input"}}),M&&a.default.createElement(i.Text,{variant:l.TextVariant.bodySm,color:l.TextColor.errorDefault,paddingTop:1},n("editSpendingCapError",[b])),D&&a.default.createElement(i.Text,{variant:l.TextVariant.bodySm,color:l.TextColor.errorDefault,paddingTop:1},n("editSpendingCapSpecialCharError")),a.default.createElement(i.Text,{variant:l.TextVariant.bodySm,color:l.TextColor.textAlternative,paddingTop:1},n("editSpendingCapAccountBalance",[k,x||""]))),a.default.createElement(i.ModalFooter,{onSubmit:P,onCancel:E,submitButtonProps:{children:n("save"),loading:I,disabled:M||D||""===C}})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/edit-spending-cap-modal/edit-spending-cap-modal.tsx"}],[6472,{"../../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../../ducks/locale/locale":6235,"../../../../simulation-details/formatAmount":6616,"../../hooks/useDecodedTransactionData":6479,"./use-is-nft":6473,"@metamask/utils":2761,"bignumber.js":3465,lodash:4380,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useApproveTokenSimulation=void 0;var a=e("@metamask/utils"),o=e("bignumber.js"),r=e("lodash"),s=e("react"),i=e("react-redux"),l=e("../../../../../../../../shared/lib/transactions-controller-utils"),c=e("../../../../../../../ducks/locale/locale"),u=e("../../../../simulation-details/formatAmount"),d=e("../../hooks/useDecodedTransactionData"),f=e("./use-is-nft");const m=10**15;n.useApproveTokenSimulation=(e,t)=>{const n=(0,i.useSelector)(c.getIntlLocale),{isNFT:p,pending:g}=(0,f.useIsNFT)(e),h=(0,d.useDecodedTransactionData)(),{value:y,pending:v}=h,x=(0,s.useMemo)((()=>{if(!y)return"0";const e=y.data[0].params.findIndex((e=>e.value!==undefined&&!(0,a.isHexString)(e.value)&&e.value.length===undefined&&!(0,r.isBoolean)(e.value)));return-1===e?"0":(0,l.calcTokenAmount)(y.data[0].params[e].value,Number(t)).toFixed()}),[y,t]),b=p?"#":"",k=(0,s.useMemo)((()=>p?`${b}${x}`:(0,u.formatAmount)(n,new o.BigNumber(x))),[x,p,n]),{spendingCap:T,isUnlimitedSpendingCap:w}=(0,s.useMemo)((()=>!p&&function(e){return e>=m}(parseInt(x,10))?{spendingCap:x,isUnlimitedSpendingCap:!0}:{spendingCap:`${b}${x}`,isUnlimitedSpendingCap:!1}),[x,k,p]);return{isUnlimitedSpendingCap:w,spendingCap:T,formattedSpendingCap:k,value:y,pending:v||g}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.ts"}],[6473,{"../../../../../../../../shared/constants/transaction":5278,"../../../../../../../hooks/useAsyncResult":6322,"../../../../../../../store/actions":7e3},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useIsNFT=void 0;var a=e("../../../../../../../../shared/constants/transaction"),o=e("../../../../../../../hooks/useAsyncResult"),r=e("../../../../../../../store/actions");n.useIsNFT=e=>{var t;const{value:n,pending:s}=(0,o.useAsyncResult)((async()=>{var t;return await(0,r.getTokenStandardAndDetails)(null==e||null===(t=e.txParams)||void 0===t?void 0:t.to)}),[null==e||null===(t=e.txParams)||void 0===t?void 0:t.to]);return{pending:s,isNFT:(null==n?void 0:n.standard)!==a.TokenStandard.ERC20}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/hooks/use-is-nft.ts"}],[6474,{"../../../../../../../components/app/confirm/info/row/section":5418,"../../shared/sign-in-with-row/sign-in-with-row":6507,"../../shared/transaction-details/transaction-details":6510,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.RevokeDetails=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../../components/app/confirm/info/row/section"),s=e("../../shared/transaction-details/transaction-details"),i=e("../../shared/sign-in-with-row/sign-in-with-row");n.RevokeDetails=()=>o.default.createElement(r.ConfirmInfoSection,null,o.default.createElement(s.OriginRow,null),o.default.createElement(i.SigningInWithRow,null))}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/revoke-details/revoke-details.tsx"}],[6475,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/name":5530,"../../../../../../../components/component-library":5806,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../shared/static-simulation/static-simulation":6508,"@metamask/name-controller":1955,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.RevokeStaticSimulation=void 0;var a=e("@metamask/name-controller"),o=f(e("react")),r=e("../../../../../../../components/app/confirm/info/row"),s=f(e("../../../../../../../components/app/name")),i=e("../../../../../../../components/component-library"),l=e("../../../../../../../helpers/constants/design-system"),c=e("../../../../../../../hooks/useI18nContext"),u=e("../../../../../context/confirm"),d=f(e("../../shared/static-simulation/static-simulation"));function f(e){return e&&e.__esModule?e:{default:e}}n.RevokeStaticSimulation=()=>{const e=(0,c.useI18nContext)(),{currentConfirmation:t}=(0,u.useConfirmContext)(),{chainId:n}=t,f=o.default.createElement(r.ConfirmInfoRow,{label:e("spendingCap")},o.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},o.default.createElement(i.Box,{display:l.Display.Flex},o.default.createElement(s.default,{value:t.txParams.to,type:a.NameType.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:n})))),m=o.default.createElement(r.ConfirmInfoRow,{label:e("spender")},o.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},o.default.createElement(i.Box,{display:l.Display.Flex},o.default.createElement(s.default,{value:t.txParams.from,type:a.NameType.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:n})))),p=o.default.createElement(o.default.Fragment,null,f,m);return o.default.createElement(d.default,{title:e("simulationDetailsTitle"),titleTooltip:e("simulationDetailsTitleTooltip"),description:e("revokeSimulationDetailsDesc"),simulationElements:p})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/revoke-static-simulation/revoke-static-simulation.tsx"}],[6476,{"../../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../../components/ui/tooltip":6197,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../../../../hooks/useAssetDetails":6713,"../../shared/transaction-data/transaction-data":6509,"../hooks/use-approve-token-simulation":6472,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SpendingCap=void 0;var a=m(e("react")),o=e("../../../../../../../../shared/lib/transactions-controller-utils"),r=e("../../../../../../../components/app/confirm/info/row"),s=e("../../../../../../../components/app/confirm/info/row/section"),i=m(e("../../../../../../../components/ui/tooltip")),l=e("../../../../../../../hooks/useI18nContext"),c=e("../../../../../context/confirm"),u=e("../../../../../hooks/useAssetDetails"),d=e("../../shared/transaction-data/transaction-data"),f=e("../hooks/use-approve-token-simulation");function m(e){return e&&e.__esModule?e:{default:e}}const p=({tokenSymbol:e,decimals:t,setIsOpenEditSpendingCapModal:n})=>{const o=(0,l.useI18nContext)(),{currentConfirmation:s}=(0,c.useConfirmContext)(),{spendingCap:u,isUnlimitedSpendingCap:d,formattedSpendingCap:m,value:p}=(0,f.useApproveTokenSimulation)(s,t),g=a.default.createElement(r.ConfirmInfoRowText,{text:d?`${o("unlimited")} ${e}`:`${m} ${e}`,onEditClick:()=>n(!0),editIconClassName:"edit-spending-cap-btn",editIconDataTestId:"edit-spending-cap-icon"});return p?a.default.createElement(a.default.Fragment,null,a.default.createElement(r.ConfirmInfoRowDivider,null),a.default.createElement(r.ConfirmInfoRow,{label:o("spendingCap"),tooltip:o("spendingCapTooltipDesc"),"data-testid":"confirmation__approve-spending-cap-group"},Boolean(d)||u!==m?a.default.createElement(i.default,{title:u},g):g)):null};n.SpendingCap=({setIsOpenEditSpendingCapModal:e})=>{const t=(0,l.useI18nContext)(),{currentConfirmation:n}=(0,c.useConfirmContext)(),{userBalance:i,tokenSymbol:m,decimals:g}=(0,u.useAssetDetails)(n.txParams.to,n.txParams.from,n.txParams.data,n.chainId),h=(0,o.calcTokenAmount)(i??"0",Number(g??"0")).toFixed(),{pending:y}=(0,f.useApproveTokenSimulation)(n,g||"0");return y?a.default.createElement(d.Container,{isLoading:!0}):a.default.createElement(s.ConfirmInfoSection,{"data-testid":"confirmation__approve-spending-cap-section"},a.default.createElement(r.ConfirmInfoRow,{label:t("accountBalance")},a.default.createElement(r.ConfirmInfoRowText,{text:`${h} ${m||""}`})),a.default.createElement(p,{tokenSymbol:m||"",decimals:g||"0",setIsOpenEditSpendingCapModal:e}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/approve/spending-cap/spending-cap.tsx"}],[6477,{"../../../../context/confirm":6691,"../../../simulation-details":6617,"../shared/advanced-details/advanced-details":6496,"../shared/gas-fees-section/gas-fees-section":6503,"../shared/transaction-details/transaction-details":6510,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../context/confirm"),s=e("../../../simulation-details"),i=e("../shared/advanced-details/advanced-details"),l=e("../shared/gas-fees-section/gas-fees-section"),c=e("../shared/transaction-details/transaction-details");n.default=()=>{const{currentConfirmation:e}=(0,r.useConfirmContext)();return null!=e&&e.txParams?o.default.createElement(o.default.Fragment,null,o.default.createElement(s.SimulationDetails,{transaction:e,isTransactionsRedesign:!0,enableMetrics:!0}),o.default.createElement(c.TransactionDetails,null),o.default.createElement(l.GasFeesSection,null),o.default.createElement(i.AdvancedDetails,null)):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/base-transaction-info/base-transaction-info.tsx"}],[6478,{"../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../components/app/currency-input/hooks/useTokenExchangeRate":5447,"../../../../../../ducks/locale/locale":6235,"../../../../../../hooks/useFiatFormatter":6330,"../../../../hooks/useAssetDetails":6713,"../../../simulation-details/formatAmount":6616,"./useDecodedTransactionData":6479,"@metamask/utils":2761,"bignumber.js":3465,lodash:4380,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useTokenValues=void 0;var a,o=e("@metamask/utils"),r=e("bignumber.js"),s=e("lodash"),i=e("react"),l=e("react-redux"),c=e("../../../../../../../shared/lib/transactions-controller-utils"),u=(a=e("../../../../../../components/app/currency-input/hooks/useTokenExchangeRate"))&&a.__esModule?a:{default:a},d=e("../../../../../../ducks/locale/locale"),f=e("../../../../../../hooks/useFiatFormatter"),m=e("../../../../hooks/useAssetDetails"),p=e("../../../simulation-details/formatAmount"),g=e("./useDecodedTransactionData");n.useTokenValues=e=>{const{decimals:t}=(0,m.useAssetDetails)(e.txParams.to,e.txParams.from,e.txParams.data,e.chainId),n=(0,g.useDecodedTransactionData)(),{value:a,pending:h}=n,{decodedTransferValue:y,isDecodedTransferValuePending:v}=(0,i.useMemo)((()=>{if(!a)return{decodedTransferValue:"0",isDecodedTransferValuePending:!1};if(!t)return{decodedTransferValue:"0",isDecodedTransferValuePending:!0};const e=a.data[0].params.findIndex((e=>e.value!==undefined&&!(0,o.isHexString)(e.value)&&e.value.length===undefined&&!(0,s.isBoolean)(e.value)));return-1===e?{decodedTransferValue:"0",isDecodedTransferValuePending:!1}:{decodedTransferValue:(0,c.calcTokenAmount)(a.data[0].params[e].value,t).toFixed(),isDecodedTransferValuePending:!1}}),[a,t]),[x,b]=(0,i.useState)();(async()=>{var t;const n=await(0,u.default)(null==e||null===(t=e.txParams)||void 0===t?void 0:t.to);b(n)})();const k=x&&y&&x.times(y,10).toNumber(),T=(0,f.useFiatFormatter)(),w=k&&T(k,{shorten:!0}),C=(0,l.useSelector)(d.getIntlLocale);return{decodedTransferValue:y,displayTransferValue:(0,p.formatAmount)(C,new r.BigNumber(y)),fiatDisplayValue:w,pending:h||v}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/use-token-values.ts"}],[6479,{"../../../../../../../shared/modules/transaction.utils":5326,"../../../../../../hooks/useAsyncResult":6322,"../../../../../../selectors":6985,"../../../../../../store/actions":7e3,"../../../../context/confirm":6691,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useDecodedTransactionData=function(e){var t,n,c;const{currentConfirmation:u}=(0,s.useConfirmContext)(),d=(0,a.useSelector)(l.use4ByteResolutionSelector),f=null==u?void 0:u.type,m=null==u?void 0:u.chainId,p=null==u||null===(t=u.txParams)||void 0===t?void 0:t.to,g=null==u||null===(n=u.txParams)||void 0===n?void 0:n.data,h=null==u||null===(c=u.txParams)||void 0===c?void 0:c.to;return(0,o.useAsyncResult)((async()=>!d||!(0,i.hasTransactionData)(g)||!h||e&&f!==e?undefined:await(0,r.decodeTransactionData)({transactionData:g,chainId:m,contractAddress:p})),[d,g,h,m,p])};var a=e("react-redux"),o=e("../../../../../../hooks/useAsyncResult"),r=e("../../../../../../store/actions"),s=e("../../../../context/confirm"),i=e("../../../../../../../shared/modules/transaction.utils"),l=e("../../../../../../selectors")}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.ts"}],[6480,{"../../../../../../../shared/modules/conversion.utils":5301,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useEIP1559TxFees=void 0;var a=e("react"),o=e("../../../../../../../shared/modules/conversion.utils");n.useEIP1559TxFees=e=>{var t,n;const r=null==e||null===(t=e.txParams)||void 0===t?void 0:t.maxFeePerGas,s=null==e||null===(n=e.txParams)||void 0===n?void 0:n.maxPriorityFeePerGas;return(0,a.useMemo)((()=>({maxFeePerGas:r?(0,o.hexToDecimal)(r):"0",maxPriorityFeePerGas:s?(0,o.hexToDecimal)(s):"0"})),[r,s])}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useEIP1559TxFees.ts"}],[6481,{"../../../../../../../shared/constants/common":5250,"../../../../../../../shared/modules/Numeric":5294,"../../../../../../../shared/modules/conversion.utils":5301,"../../../../../../hooks/useFiatFormatter":6330,"../../../../../../hooks/useGasFeeEstimates":6331,"../../../../../../selectors":6985,"../../../../../../selectors/multichain":6990,"../shared/constants":6498,"./useEIP1559TxFees":6480,"./useSupportsEIP1559":6483,"./useTransactionGasFeeEstimate":6485,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useFeeCalculations=function(e){var t,n,y;const v=(0,o.useSelector)(u.getCurrentCurrency),{chainId:x}=e,b=(0,l.useFiatFormatter)(),k=(0,o.useSelector)((e=>(0,u.selectConversionRateByChainId)(e,x))),T=(0,o.useSelector)(d.getMultichainNetwork),w=null==T||null===(t=T.network)||void 0===t?void 0:t.ticker,C=(0,a.useCallback)((e=>{const t=`${(0,s.getValueFromWeiHex)({value:e,fromCurrency:r.EtherDenomination.GWEI,numberOfDecimals:4})||0} ${w}`,n=Number((0,s.getValueFromWeiHex)({value:e,conversionRate:k,fromCurrency:r.EtherDenomination.GWEI,toCurrency:v,numberOfDecimals:2}));let a,o;return 0===n?(a=`< ${b(.01)}`,o=(0,s.getValueFromWeiHex)({value:e,conversionRate:k,fromCurrency:r.EtherDenomination.GWEI,toCurrency:v,numberOfDecimals:18})):(a=b(n),o=null),{currentCurrencyFee:a,currentCurrencyFeeWith18SignificantDigits:o,nativeCurrencyFee:t}}),[k,v,b]),{maxFeePerGas:_,maxPriorityFeePerGas:E}=(0,m.useEIP1559TxFees)(e),{supportsEIP1559:I}=(0,p.useSupportsEIP1559)(e),S=(0,g.useTransactionGasFeeEstimate)(e,I),{gasFeeEstimates:P}=(0,c.useGasFeeEstimates)(e.networkClientId),M=null==P?void 0:P.estimatedBaseFee,D=null==e?void 0:e.layer1GasFee,A=Boolean(D),O=(0,a.useMemo)((()=>A?C(D):h),[D]),F=(0,a.useMemo)((()=>A?C(S):h),[S]),N=(null==e||null===(n=e.txParams)||void 0===n?void 0:n.gas)||f.HEX_ZERO,R=(null==e||null===(y=e.txParams)||void 0===y?void 0:y.gasPrice)||f.HEX_ZERO,j=(0,a.useMemo)((()=>(0,s.multiplyHexes)(I?(0,s.decimalToHex)(_):R,N)),[I,_,N,R]),{currentCurrencyFee:B,currentCurrencyFeeWith18SignificantDigits:$,nativeCurrencyFee:W}=C(j),L=(0,a.useMemo)((()=>{if(A){const e=(0,s.addHexes)(S,D);return C(e)}let e=(0,s.addHexes)((0,s.decGWEIToHexWEI)(M)||f.HEX_ZERO,(0,s.decimalToHex)(E));new i.Numeric(e,16).greaterThan((0,s.decimalToHex)(_),16)&&(e=(0,s.decimalToHex)(_));const t=(0,s.multiplyHexes)(I?e:R,N);return C(t)}),[S,e,M,E,C]);return{estimatedFeeFiat:L.currentCurrencyFee,estimatedFeeFiatWith18SignificantDigits:L.currentCurrencyFeeWith18SignificantDigits,estimatedFeeNative:L.nativeCurrencyFee,l1FeeFiat:O.currentCurrencyFee,l1FeeFiatWith18SignificantDigits:O.currentCurrencyFeeWith18SignificantDigits,l1FeeNative:O.nativeCurrencyFee,l2FeeFiat:F.currentCurrencyFee,l2FeeFiatWith18SignificantDigits:F.currentCurrencyFeeWith18SignificantDigits,l2FeeNative:F.nativeCurrencyFee,maxFeeFiat:B,maxFeeFiatWith18SignificantDigits:$,maxFeeNative:W}};var a=e("react"),o=e("react-redux"),r=e("../../../../../../../shared/constants/common"),s=e("../../../../../../../shared/modules/conversion.utils"),i=e("../../../../../../../shared/modules/Numeric"),l=e("../../../../../../hooks/useFiatFormatter"),c=e("../../../../../../hooks/useGasFeeEstimates"),u=e("../../../../../../selectors"),d=e("../../../../../../selectors/multichain"),f=e("../shared/constants"),m=e("./useEIP1559TxFees"),p=e("./useSupportsEIP1559"),g=e("./useTransactionGasFeeEstimate");const h={currentCurrencyFee:"",currentCurrencyFeeWith18SignificantDigits:"",nativeCurrencyFee:""}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useFeeCalculations.ts"}],[6482,{"../../../../../../../shared/modules/transaction.utils":5326,"../../../../../../selectors":6985,"../../../../../../store/actions":7e3,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useFourByte=void 0;var a=e("react-redux"),o=e("react"),r=e("../../../../../../selectors"),s=e("../../../../../../store/actions"),i=e("../../../../../../../shared/modules/transaction.utils");n.useFourByte=e=>{var t,n;const l=(0,a.useDispatch)(),c=(0,a.useSelector)(r.use4ByteResolutionSelector),u=null==e||null===(t=e.txParams)||void 0===t?void 0:t.to,d=null==e||null===(n=e.txParams)||void 0===n?void 0:n.data;(0,o.useEffect)((()=>{c&&(0,i.hasTransactionData)(d)&&u&&l((0,s.getContractMethodData)(d))}),[c,d,u,l]);const f=(0,a.useSelector)((e=>(0,r.getKnownMethodData)(e,d)));return u?f:null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useFourByte.ts"}],[6483,{"../../../../../../../shared/modules/selectors/networks":5320,"../../../../../../helpers/utils/transactions.util":6295,"../../../../../../selectors":6985,"@metamask/transaction-controller":2698,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useSupportsEIP1559=function(e){var t;const n=(null==e||null===(t=e.txParams)||void 0===t?void 0:t.type)===a.TransactionEnvelopeType.legacy||(0,r.isLegacyTransaction)(e),l=(0,o.useSelector)(i.getSelectedNetworkClientId),c=(0,o.useSelector)((e=>(0,s.checkNetworkAndAccountSupports1559)(e,l)));return{supportsEIP1559:c&&!n}};var a=e("@metamask/transaction-controller"),o=e("react-redux"),r=e("../../../../../../helpers/utils/transactions.util"),s=e("../../../../../../selectors"),i=e("../../../../../../../shared/modules/selectors/networks")}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useSupportsEIP1559.ts"}],[6484,{"../../../../../../hooks/useI18nContext":6334,"../../../../../../selectors":6985,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useTokenDetails=void 0;var a=e("react-redux"),o=e("../../../../../../hooks/useI18nContext"),r=e("../../../../../../selectors");n.useTokenDetails=e=>{var t,n,s,i;const l=(0,o.useI18nContext)(),c=(0,a.useSelector)((t=>(0,r.getWatchedToken)(e)(t))),u=(0,a.useSelector)(r.getTokenList);return{tokenImage:(null==c?void 0:c.iconUrl)||(null==c?void 0:c.image)||(null===(t=u[null==e||null===(n=e.txParams)||void 0===n?void 0:n.to])||void 0===t?void 0:t.iconUrl),tokenSymbol:(null==c?void 0:c.symbol)||(null===(s=u[null==e||null===(i=e.txParams)||void 0===i?void 0:i.to])||void 0===s?void 0:s.symbol)||l("unknown")}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useTokenDetails.ts"}],[6485,{"../../../../../../../shared/modules/Numeric":5294,"../../../../../../../shared/modules/conversion.utils":5301,"../../../../../../hooks/useGasFeeEstimates":6331,"../shared/constants":6498},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useTransactionGasFeeEstimate=function(e,t){var n,i;let{gas:l,gasPrice:c}=e.txParams;const{gasFeeEstimates:u}=(0,r.useGasFeeEstimates)(e.networkClientId),d=null==u?void 0:u.estimatedBaseFee;l=l||s.HEX_ZERO,c=c||s.HEX_ZERO;const f=(null===(n=e.txParams)||void 0===n?void 0:n.maxPriorityFeePerGas)||s.HEX_ZERO,m=(null===(i=e.txParams)||void 0===i?void 0:i.maxFeePerGas)||s.HEX_ZERO;let p;if(t){let e=(0,a.addHexes)(d||s.HEX_ZERO,f);new o.Numeric(e,16).greaterThan(m,16)&&(e=m),p=(0,a.multiplyHexes)(e,l)}else p=(0,a.multiplyHexes)(c,l);return p};var a=e("../../../../../../../shared/modules/conversion.utils"),o=e("../../../../../../../shared/modules/Numeric"),r=e("../../../../../../hooks/useGasFeeEstimates"),s=e("../shared/constants")}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/hooks/useTransactionGasFeeEstimate.ts"}],[6486,{"./info":6487},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Info",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./info"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/index.ts"}],[6487,{"../../../context/confirm":6691,"../../../hooks/useSmartTransactionFeatureFlags":6738,"./approve/approve":6470,"./base-transaction-info/base-transaction-info":6477,"./native-transfer/native-transfer":6488,"./nft-token-transfer/nft-token-transfer":6489,"./personal-sign/personal-sign":6490,"./set-approval-for-all-info/set-approval-for-all-info":6494,"./token-transfer/token-transfer":6512,"./typed-sign-v1/typed-sign-v1":6514,"./typed-sign/typed-sign":6523,"@metamask/transaction-controller":2698,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("@metamask/transaction-controller"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("../../../context/confirm"),s=e("../../../hooks/useSmartTransactionFeatureFlags"),i=h(e("./approve/approve")),l=h(e("./base-transaction-info/base-transaction-info")),c=h(e("./native-transfer/native-transfer")),u=h(e("./nft-token-transfer/nft-token-transfer")),d=h(e("./personal-sign/personal-sign")),f=h(e("./set-approval-for-all-info/set-approval-for-all-info")),m=h(e("./token-transfer/token-transfer")),p=h(e("./typed-sign-v1/typed-sign-v1")),g=h(e("./typed-sign/typed-sign"));function h(e){return e&&e.__esModule?e:{default:e}}function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}n.default=()=>{const{currentConfirmation:e}=(0,r.useConfirmContext)();(0,s.useSmartTransactionFeatureFlags)();const t=(0,o.useMemo)((()=>({[a.TransactionType.contractInteraction]:()=>l.default,[a.TransactionType.deployContract]:()=>l.default,[a.TransactionType.personalSign]:()=>d.default,[a.TransactionType.simpleSend]:()=>c.default,[a.TransactionType.signTypedData]:()=>{const{version:t}=(null==e?void 0:e.msgParams)??{};return"V1"===t?p.default:g.default},[a.TransactionType.tokenMethodApprove]:()=>i.default,[a.TransactionType.tokenMethodIncreaseAllowance]:()=>i.default,[a.TransactionType.tokenMethodSafeTransferFrom]:()=>u.default,[a.TransactionType.tokenMethodSetApprovalForAll]:()=>f.default,[a.TransactionType.tokenMethodTransfer]:()=>m.default,[a.TransactionType.tokenMethodTransferFrom]:()=>u.default})),[e]);if(null==e||!e.type)return null;const n=t[null==e?void 0:e.type]();return o.default.createElement(n,null)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/info.tsx"}],[6488,{"../../../../context/confirm":6691,"../../../simulation-details":6617,"../shared/advanced-details/advanced-details":6496,"../shared/gas-fees-section/gas-fees-section":6503,"../shared/native-send-heading/native-send-heading":6504,"../token-transfer/token-details-section":6511,"../token-transfer/transaction-flow-section":6513,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=d(e("react")),o=e("../../../../context/confirm"),r=e("../../../simulation-details"),s=e("../shared/advanced-details/advanced-details"),i=e("../shared/gas-fees-section/gas-fees-section"),l=d(e("../shared/native-send-heading/native-send-heading")),c=e("../token-transfer/token-details-section"),u=e("../token-transfer/transaction-flow-section");function d(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const{currentConfirmation:e}=(0,o.useConfirmContext)(),t="metamask"===e.origin;return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,null),a.default.createElement(u.TransactionFlowSection,null),a.default.createElement(r.SimulationDetails,{transaction:e,isTransactionsRedesign:!0,enableMetrics:!0,metricsOnly:t}),a.default.createElement(c.TokenDetailsSection,null),a.default.createElement(i.GasFeesSection,null),a.default.createElement(s.AdvancedDetails,null))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/native-transfer/native-transfer.tsx"}],[6489,{"../../../../context/confirm":6691,"../../../simulation-details":6617,"../shared/advanced-details/advanced-details":6496,"../shared/gas-fees-section/gas-fees-section":6503,"../shared/nft-send-heading/nft-send-heading":6505,"../token-transfer/token-details-section":6511,"../token-transfer/transaction-flow-section":6513,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=d(e("react")),o=e("../../../../context/confirm"),r=e("../../../simulation-details"),s=e("../shared/advanced-details/advanced-details"),i=e("../shared/gas-fees-section/gas-fees-section"),l=d(e("../shared/nft-send-heading/nft-send-heading")),c=e("../token-transfer/token-details-section"),u=e("../token-transfer/transaction-flow-section");function d(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const{currentConfirmation:e}=(0,o.useConfirmContext)(),t="metamask"===e.origin;return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,null),a.default.createElement(u.TransactionFlowSection,null),a.default.createElement(r.SimulationDetails,{transaction:e,isTransactionsRedesign:!0,enableMetrics:!0,metricsOnly:t}),a.default.createElement(c.TokenDetailsSection,null),a.default.createElement(i.GasFeesSection,null),a.default.createElement(s.AdvancedDetails,null))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/nft-token-transfer/nft-token-transfer.tsx"}],[6490,{"../../../../../../components/app/confirm/info/row":5416,"../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../components/component-library":5806,"../../../../../../components/ui/tooltip":6197,"../../../../../../helpers/constants/design-system":6248,"../../../../../../helpers/utils/snaps":6292,"../../../../../../helpers/utils/util":6297,"../../../../../../hooks/useI18nContext":6334,"../../../../context/confirm":6691,"../../../../selectors/preferences":6748,"../../../../utils":6756,"../shared/sign-in-with-row/sign-in-with-row":6507,"./siwe-sign":6491,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=b(e("react")),o=e("react-redux"),r=e("../../../../../../components/app/confirm/info/row"),s=e("../../../../../../components/app/confirm/info/row/alert-row/alert-row"),i=e("../../../../../../components/app/confirm/info/row/constants"),l=e("../../../../../../components/app/confirm/info/row/section"),c=e("../../../../../../components/component-library"),u=b(e("../../../../../../components/ui/tooltip")),d=e("../../../../../../helpers/constants/design-system"),f=e("../../../../../../helpers/utils/snaps"),m=e("../../../../../../helpers/utils/util"),p=e("../../../../../../hooks/useI18nContext"),g=e("../../../../context/confirm"),h=e("../../../../selectors/preferences"),y=e("../../../../utils"),v=e("../shared/sign-in-with-row/sign-in-with-row"),x=e("./siwe-sign");function b(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{var e;const t=(0,p.useI18nContext)(),{currentConfirmation:n}=(0,g.useConfirmContext)(),b=(0,o.useSelector)(h.selectUseTransactionSimulations);if(null==n||!n.msgParams)return null;const k=(0,y.isSIWESignatureRequest)(n),T=(0,m.sanitizeString)((0,m.hexToText)(null===(e=n.msgParams)||void 0===e?void 0:e.data));let w;k||(w=(0,f.isSnapId)(n.msgParams.origin)?t("requestFromInfoSnap"):t("requestFromInfo"));const C=a.default.createElement(c.Box,{display:d.Display.Flex,flexDirection:d.FlexDirection.Row,alignItems:d.AlignItems.center,gap:1},a.default.createElement(c.Text,{variant:d.TextVariant.bodyMdMedium},t("simulationDetailsTitle")),a.default.createElement(u.default,{interactive:!0,position:"top",containerClassName:"info-tooltip__tooltip-container",tooltipInnerClassName:"info-tooltip__tooltip-content",tooltipArrowClassName:"info-tooltip__top-tooltip-arrow",html:t("simulationDetailsTitleTooltip"),theme:"tippy-tooltip-info",style:{display:d.Display.Flex}},a.default.createElement(c.Icon,{name:c.IconName.Question,marginLeft:1,color:d.IconColor.iconMuted,size:c.IconSize.Sm}))),_=a.default.createElement(c.Text,{color:d.TextColor.textAlternative,variant:d.TextVariant.bodyMd},t("simulationDetailsNoChanges"));return a.default.createElement(a.default.Fragment,null,k&&b&&a.default.createElement(l.ConfirmInfoSection,null,a.default.createElement(c.Box,{"data-testid":"simulation-details-layout",className:"simulation-details-layout",display:d.Display.Flex,flexDirection:d.FlexDirection.Column,borderRadius:d.BorderRadius.LG,borderColor:d.BorderColor.transparent,padding:2,gap:3},a.default.createElement(c.Box,{display:d.Display.Flex,flexDirection:d.FlexDirection.Row,alignItems:d.AlignItems.center,justifyContent:d.JustifyContent.spaceBetween},C,_))),a.default.createElement(l.ConfirmInfoSection,null,a.default.createElement(s.ConfirmInfoAlertRow,{alertKey:i.RowAlertKey.RequestFrom,ownerId:n.id,label:t("requestFrom"),tooltip:w},a.default.createElement(r.ConfirmInfoRowUrl,{url:n.msgParams.origin})),a.default.createElement(v.SigningInWithRow,null)),a.default.createElement(l.ConfirmInfoSection,null,k?a.default.createElement(x.SIWESignInfo,null):a.default.createElement(s.ConfirmInfoAlertRow,{alertKey:"message",ownerId:n.id,label:t("message"),collapsed:!1,copyEnabled:!0,copyText:T},a.default.createElement(r.ConfirmInfoRowText,{text:T}))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/personal-sign/personal-sign.tsx"}],[6491,{"./siwe-sign":6492},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"SIWESignInfo",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./siwe-sign"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/personal-sign/siwe-sign/index.ts"}],[6492,{"../../../../../../../../shared/constants/network":5264,"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/component-library":5806,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"@metamask/controller-utils":1422,luxon:4388,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("luxon"),s=e("@metamask/controller-utils"),i=e("../../../../../../../../shared/constants/network"),l=e("../../../../../../../hooks/useI18nContext"),c=e("../../../../../../../components/app/confirm/info/row"),u=e("../../../../../../../components/component-library"),d=e("../../../../../../../helpers/constants/design-system"),f=e("../../../../../context/confirm");n.default=()=>{var e;const t=(0,l.useI18nContext)(),{currentConfirmation:n}=(0,f.useConfirmContext)(),a=null==n||null===(e=n.msgParams)||void 0===e||null===(e=e.siwe)||void 0===e?void 0:e.parsedMessage;if(!a)return null;const{address:m,chainId:p,issuedAt:g,nonce:h,requestId:y,statement:v,resources:x,uri:b,version:k}=a,T=(0,s.toHex)(p),w=i.NETWORK_TO_NAME_MAP[T]??T;return o.default.createElement(c.ConfirmInfoRow,{label:t("message"),collapsed:!0,copyEnabled:!0,copyText:JSON.stringify(a)},o.default.createElement(u.Box,{style:{marginLeft:-8,marginRight:-8}},o.default.createElement(u.Text,{color:d.TextColor.inherit,style:{whiteSpace:"pre-wrap",marginLeft:8,marginRight:8}},v??""),o.default.createElement(c.ConfirmInfoRow,{label:t("siweURI")},o.default.createElement(c.ConfirmInfoRowText,{text:b})),o.default.createElement(c.ConfirmInfoRow,{label:t("siweNetwork")},o.default.createElement(c.ConfirmInfoRowText,{text:w})),o.default.createElement(c.ConfirmInfoRow,{label:t("account")},o.default.createElement(c.ConfirmInfoRowAddress,{address:m,chainId:T})),o.default.createElement(c.ConfirmInfoRow,{label:t("version")},o.default.createElement(c.ConfirmInfoRowText,{text:k})),o.default.createElement(c.ConfirmInfoRow,{label:t("chainId")},o.default.createElement(c.ConfirmInfoRowText,{text:`${p}`})),o.default.createElement(c.ConfirmInfoRow,{label:t("nonce")},o.default.createElement(c.ConfirmInfoRowText,{text:h})),o.default.createElement(c.ConfirmInfoRow,{label:t("siweIssued")},o.default.createElement(c.ConfirmInfoRowDate,{unixTimestamp:r.DateTime.fromISO(g,{zone:"utc"}).toUnixInteger()})),y&&o.default.createElement(c.ConfirmInfoRow,{label:t("siweRequestId")},o.default.createElement(c.ConfirmInfoRowText,{text:y})),x&&o.default.createElement(c.ConfirmInfoRow,{label:t("siweResources")},x.map(((e,t)=>o.default.createElement(c.ConfirmInfoRowText,{key:`resource-${t}`,text:e}))))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/personal-sign/siwe-sign/siwe-sign.tsx"}],[6493,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/name":5530,"../../../../../../../components/component-library":5806,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../shared/static-simulation/static-simulation":6508,"@metamask/name-controller":1955,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.RevokeSetApprovalForAllStaticSimulation=void 0;var a=e("@metamask/name-controller"),o=f(e("react")),r=e("../../../../../../../components/app/confirm/info/row"),s=f(e("../../../../../../../components/app/name")),i=e("../../../../../../../components/component-library"),l=e("../../../../../../../helpers/constants/design-system"),c=e("../../../../../../../hooks/useI18nContext"),u=e("../../../../../context/confirm"),d=f(e("../../shared/static-simulation/static-simulation"));function f(e){return e&&e.__esModule?e:{default:e}}n.RevokeSetApprovalForAllStaticSimulation=({spender:e})=>{const t=(0,c.useI18nContext)(),{currentConfirmation:n}=(0,u.useConfirmContext)(),{chainId:f}=n,m=o.default.createElement(r.ConfirmInfoRow,{label:t("nfts")},o.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},o.default.createElement(i.Box,{display:l.Display.Flex,alignItems:l.AlignItems.center},o.default.createElement(s.default,{value:n.txParams.to,type:a.NameType.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:f})))),p=o.default.createElement(r.ConfirmInfoRow,{label:t("permissionFrom")},o.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},o.default.createElement(i.Box,{display:l.Display.Flex,alignItems:l.AlignItems.center},o.default.createElement(s.default,{value:e,type:a.NameType.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:f})))),g=o.default.createElement(o.default.Fragment,null,m,p);return o.default.createElement(d.default,{title:t("simulationDetailsTitle"),titleTooltip:t("simulationDetailsTitleTooltip"),description:t("simulationDetailsRevokeSetApprovalForAllDesc"),simulationElements:g})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/revoke-set-approval-for-all-static-simulation/revoke-set-approval-for-all-static-simulation.tsx"}],[6494,{"../../../../context/confirm":6691,"../approve/approve-details/approve-details":6468,"../hooks/useDecodedTransactionData":6479,"../shared/advanced-details/advanced-details":6496,"../shared/confirm-loader/confirm-loader":6497,"../shared/gas-fees-section/gas-fees-section":6503,"../utils":6524,"./revoke-set-approval-for-all-static-simulation/revoke-set-approval-for-all-static-simulation":6493,"./set-approval-for-all-static-simulation/set-approval-for-all-static-simulation":6495,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../context/confirm"),s=e("../approve/approve-details/approve-details"),i=e("../hooks/useDecodedTransactionData"),l=e("../shared/advanced-details/advanced-details"),c=e("../shared/confirm-loader/confirm-loader"),u=e("../shared/gas-fees-section/gas-fees-section"),d=e("../utils"),f=e("./revoke-set-approval-for-all-static-simulation/revoke-set-approval-for-all-static-simulation"),m=e("./set-approval-for-all-static-simulation/set-approval-for-all-static-simulation");n.default=()=>{const{currentConfirmation:e}=(0,r.useConfirmContext)(),t=(0,i.useDecodedTransactionData)(),{value:n,pending:a}=t,p=(0,d.getIsRevokeSetApprovalForAll)(n),g=null==n?void 0:n.data[0].params[0].value;return null!=e&&e.txParams?a?o.default.createElement(c.ConfirmLoader,null):o.default.createElement(o.default.Fragment,null,p?o.default.createElement(f.RevokeSetApprovalForAllStaticSimulation,{spender:g}):o.default.createElement(m.SetApprovalForAllStaticSimulation,null),o.default.createElement(s.ApproveDetails,{isSetApprovalForAll:!0}),o.default.createElement(u.GasFeesSection,null),o.default.createElement(l.AdvancedDetails,null)):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/set-approval-for-all-info.tsx"}],[6495,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/name":5530,"../../../../../../../components/component-library":5806,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../shared/static-simulation/static-simulation":6508,"@metamask/name-controller":1955,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SetApprovalForAllStaticSimulation=void 0;var a=e("@metamask/name-controller"),o=f(e("react")),r=e("../../../../../../../components/app/confirm/info/row"),s=f(e("../../../../../../../components/app/name")),i=e("../../../../../../../components/component-library"),l=e("../../../../../../../helpers/constants/design-system"),c=e("../../../../../../../hooks/useI18nContext"),u=e("../../../../../context/confirm"),d=f(e("../../shared/static-simulation/static-simulation"));function f(e){return e&&e.__esModule?e:{default:e}}n.SetApprovalForAllStaticSimulation=()=>{const e=(0,c.useI18nContext)(),{currentConfirmation:t}=(0,u.useConfirmContext)(),{chainId:n}=t,f=o.default.createElement(r.ConfirmInfoRow,{label:e("withdrawing")},o.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},o.default.createElement(i.Box,{display:l.Display.Flex,alignItems:l.AlignItems.center},o.default.createElement(i.Box,{display:l.Display.Inline,marginInlineEnd:1,minWidth:l.BlockSize.Zero},o.default.createElement(i.Text,{"data-testid":"simulation-token-value",backgroundColor:l.BackgroundColor.backgroundAlternative,borderRadius:l.BorderRadius.XL,paddingInline:2,textAlign:l.TextAlign.Center,alignItems:l.AlignItems.center},e("all"))),o.default.createElement(s.default,{value:t.txParams.to,type:a.NameType.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:n}))));return o.default.createElement(d.default,{title:e("simulationDetailsTitle"),titleTooltip:e("simulationDetailsTitleTooltip"),description:e("simulationDetailsSetApprovalForAllDesc"),simulationElements:f})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/set-approval-for-all-static-simulation/set-approval-for-all-static-simulation.tsx"}],[6496,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../../hooks/useI18nContext":6334,"../../../../../../../selectors":6985,"../../../../../../../store/actions":7e3,"../../../../../context/confirm":6691,"../../../../../selectors/preferences":6748,"../../../../../utils":6756,"../transaction-data/transaction-data":6509,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AdvancedDetails=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../../../../components/app/confirm/info/row"),s=e("../../../../../../../components/app/confirm/info/row/section"),i=e("../../../../../../../hooks/useI18nContext"),l=e("../../../../../../../selectors"),c=e("../../../../../../../store/actions"),u=e("../../../../../selectors/preferences"),d=e("../../../../../context/confirm"),f=e("../../../../../utils"),m=e("../transaction-data/transaction-data");function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}const g=()=>{const{currentConfirmation:e}=(0,d.useConfirmContext)(),t=(0,i.useI18nContext)(),n=(0,o.useDispatch)();(0,a.useEffect)((()=>{e&&!(0,f.isSignatureTransactionType)(e)&&n((0,c.getNextNonce)(e.txParams.from))}),[e,n]);const u=(0,o.useSelector)(l.getUseNonceField),m=(0,o.useSelector)(l.getNextSuggestedNonce),p=(0,o.useSelector)(l.getCustomNonceValue),g=p||m;return a.default.createElement(s.ConfirmInfoSection,{"data-testid":"advanced-details-nonce-section"},a.default.createElement(r.ConfirmInfoRow,{label:t("advancedDetailsNonceDesc"),tooltip:t("advancedDetailsNonceTooltip")},a.default.createElement(r.ConfirmInfoRowText,{"data-testid":"advanced-details-displayed-nonce",text:`${g}`,onEditClick:u?()=>n((0,c.showModal)({name:"CUSTOMIZE_NONCE",customNonceValue:p,nextNonce:m,updateCustomNonce:e=>{n((0,c.updateCustomNonce)(e))},getNextNonce:c.getNextNonce})):undefined,editIconClassName:"edit-nonce-btn",editIconDataTestId:"edit-nonce-icon"})))};n.AdvancedDetails=({overrideVisibility:e=!1})=>{const t=(0,o.useSelector)(u.selectConfirmationAdvancedDetailsOpen);return e||t?a.default.createElement(a.default.Fragment,null,a.default.createElement(g,null),a.default.createElement(m.TransactionData,null)):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/advanced-details/advanced-details.tsx"}],[6497,{"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/icon/preloader":6126,"../../../../../../../helpers/constants/design-system":6248,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConfirmLoader=void 0;var a=i(e("react")),o=e("../../../../../../../components/component-library"),r=i(e("../../../../../../../components/ui/icon/preloader")),s=e("../../../../../../../helpers/constants/design-system");function i(e){return e&&e.__esModule?e:{default:e}}n.ConfirmLoader=()=>a.default.createElement(o.Box,{display:s.Display.Flex,justifyContent:s.JustifyContent.center,alignItems:s.AlignItems.center,paddingTop:4,paddingBottom:4},a.default.createElement(r.default,{size:20}))}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/confirm-loader/confirm-loader.tsx"}],[6498,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.HEX_ZERO=void 0;n.HEX_ZERO="0x0"}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/constants.ts"}],[6499,{"../../../../../../../../shared/constants/network":5264,"../../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/tooltip":6197,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../../../selectors":6985,"../../../../../context/confirm":6691,"../edit-gas-icon/edit-gas-icon-button":6500,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.EditGasFeesRow=void 0;var a=g(e("react")),o=e("react-redux"),r=e("../../../../../../../../shared/constants/network"),s=e("../../../../../../../components/app/confirm/info/row/alert-row/alert-row"),i=e("../../../../../../../components/app/confirm/info/row/constants"),l=e("../../../../../../../components/component-library"),c=g(e("../../../../../../../components/ui/tooltip")),u=e("../../../../../../../helpers/constants/design-system"),d=e("../../../../../../../hooks/useI18nContext"),f=e("../../../../../../../selectors"),m=e("../../../../../context/confirm"),p=e("../edit-gas-icon/edit-gas-icon-button");function g(e){return e&&e.__esModule?e:{default:e}}n.EditGasFeesRow=({fiatFee:e,fiatFeeWith18SignificantDigits:t,nativeFee:n,supportsEIP1559:g,setShowCustomizeGasPopover:h})=>{const y=(0,d.useI18nContext)(),{currentConfirmation:v}=(0,m.useConfirmContext)(),x=r.TEST_CHAINS.includes(v.chainId),{showFiatInTestnets:b}=(0,o.useSelector)(f.getPreferences);return a.default.createElement(s.ConfirmInfoAlertRow,{alertKey:i.RowAlertKey.EstimatedFee,ownerId:v.id,"data-testid":"edit-gas-fees-row",label:y("networkFee"),tooltip:y("estimatedFeeTooltip")},a.default.createElement(l.Box,{display:u.Display.Flex,flexDirection:u.FlexDirection.Row,justifyContent:u.JustifyContent.spaceBetween,alignItems:u.AlignItems.center,textAlign:u.TextAlign.Center},a.default.createElement(l.Text,{marginRight:1,color:u.TextColor.textDefault,"data-testid":"first-gas-field"},n),x&&!b||!t?a.default.createElement(l.Text,{marginRight:2,color:u.TextColor.textAlternative,"data-testid":"native-currency"},e):a.default.createElement(c.default,{title:t},a.default.createElement(l.Text,{marginRight:2,color:u.TextColor.textAlternative,"data-testid":"native-currency"},e)),a.default.createElement(p.EditGasIconButton,{supportsEIP1559:g,setShowCustomizeGasPopover:h})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx"}],[6500,{"../../../../../../../components/component-library":5806,"../../../../../../../contexts/transaction-modal":6218,"../../../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useTransactionEventFragment":6740,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.EditGasIconButton=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../../components/component-library"),s=e("../../../../../../../contexts/transaction-modal"),i=e("../../../../../../../helpers/constants/design-system"),l=e("../../../../../hooks/useTransactionEventFragment");n.EditGasIconButton=({supportsEIP1559:e,setShowCustomizeGasPopover:t})=>{const{openModal:n}=(0,s.useTransactionModalContext)(),{updateTransactionEventFragment:a}=(0,l.useTransactionEventFragment)();return o.default.createElement(r.Button,{style:{textDecoration:"none"},size:r.ButtonSize.Sm,variant:r.ButtonVariant.Link,startIconName:r.IconName.Edit,color:i.IconColor.primaryDefault,"data-testid":"edit-gas-fee-icon",onClick:()=>e?(a({gas_edit_attempted:"basic"}),void n("editGasFee")):void t(!0)})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/edit-gas-icon/edit-gas-icon-button.tsx"}],[6501,{"../../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../../components/component-library":5806,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../../../../selectors/preferences":6748,"../../../../gas-timing/gas-timing.component":6577,"../../hooks/useEIP1559TxFees":6480,"../../hooks/useFeeCalculations":6481,"../../hooks/useSupportsEIP1559":6483,"../edit-gas-fees-row/edit-gas-fees-row":6499,"../gas-fees-row/gas-fees-row":6502,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.GasFeesDetails=void 0;var a=v(e("react")),o=e("react-redux"),r=e("../../../../../../../components/component-library"),s=e("../../../../../../../helpers/constants/design-system"),i=e("../../../../../../../hooks/useI18nContext"),l=e("../../../../../selectors/preferences"),c=e("../../../../../context/confirm"),u=v(e("../../../../gas-timing/gas-timing.component")),d=e("../../hooks/useEIP1559TxFees"),f=e("../../hooks/useFeeCalculations"),m=e("../../hooks/useSupportsEIP1559"),p=e("../edit-gas-fees-row/edit-gas-fees-row"),g=e("../gas-fees-row/gas-fees-row"),h=e("../../../../../../../components/app/confirm/info/row/alert-row/alert-row"),y=e("../../../../../../../components/app/confirm/info/row/constants");function v(e){return e&&e.__esModule?e:{default:e}}n.GasFeesDetails=({setShowCustomizeGasPopover:e})=>{const t=(0,i.useI18nContext)(),{currentConfirmation:n}=(0,c.useConfirmContext)(),{maxFeePerGas:v,maxPriorityFeePerGas:x}=(0,d.useEIP1559TxFees)(n),{supportsEIP1559:b}=(0,m.useSupportsEIP1559)(n),k=Boolean(null==n?void 0:n.layer1GasFee),{estimatedFeeFiat:T,estimatedFeeFiatWith18SignificantDigits:w,estimatedFeeNative:C,l1FeeFiat:_,l1FeeFiatWith18SignificantDigits:E,l1FeeNative:I,l2FeeFiat:S,l2FeeFiatWith18SignificantDigits:P,l2FeeNative:M,maxFeeFiat:D,maxFeeFiatWith18SignificantDigits:A,maxFeeNative:O}=(0,f.useFeeCalculations)(n),F=(0,o.useSelector)(l.selectConfirmationAdvancedDetailsOpen);return null!=n&&n.txParams?a.default.createElement(a.default.Fragment,null,a.default.createElement(p.EditGasFeesRow,{fiatFee:T,fiatFeeWith18SignificantDigits:w,nativeFee:C,supportsEIP1559:b,setShowCustomizeGasPopover:e}),F&&k&&a.default.createElement(a.default.Fragment,null,a.default.createElement(g.GasFeesRow,{"data-testid":"gas-fee-details-l1",label:t("l1Fee"),tooltipText:t("l1FeeTooltip"),fiatFee:_,fiatFeeWith18SignificantDigits:E,nativeFee:I}),a.default.createElement(g.GasFeesRow,{"data-testid":"gas-fee-details-l2",label:t("l2Fee"),tooltipText:t("l2FeeTooltip"),fiatFee:S,fiatFeeWith18SignificantDigits:P,nativeFee:M})),b&&a.default.createElement(h.ConfirmInfoAlertRow,{alertKey:y.RowAlertKey.Speed,"data-testid":"gas-fee-details-speed",label:t("speed"),ownerId:n.id},a.default.createElement(r.Box,{display:s.Display.Flex,alignItems:s.AlignItems.center},a.default.createElement(u.default,{maxFeePerGas:v,maxPriorityFeePerGas:x}))),F&&a.default.createElement(g.GasFeesRow,{"data-testid":"gas-fee-details-max-fee",label:t("maxFee"),tooltipText:t("maxFeeTooltip"),fiatFee:D,fiatFeeWith18SignificantDigits:A,nativeFee:O})):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/gas-fees-details/gas-fees-details.tsx"}],[6502,{"../../../../../../../../shared/constants/network":5264,"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/tooltip":6197,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../selectors":6985,"../../../../../context/confirm":6691,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.GasFeesRow=void 0;var a=f(e("react")),o=e("react-redux"),r=e("../../../../../../../../shared/constants/network"),s=e("../../../../../../../components/app/confirm/info/row"),i=e("../../../../../../../components/component-library"),l=f(e("../../../../../../../components/ui/tooltip")),c=e("../../../../../../../helpers/constants/design-system"),u=e("../../../../../../../selectors"),d=e("../../../../../context/confirm");function f(e){return e&&e.__esModule?e:{default:e}}n.GasFeesRow=({label:e,tooltipText:t,fiatFee:n,fiatFeeWith18SignificantDigits:f,nativeFee:m,"data-testid":p})=>{const{currentConfirmation:g}=(0,d.useConfirmContext)(),h=r.TEST_CHAINS.includes(null==g?void 0:g.chainId),{showFiatInTestnets:y}=(0,o.useSelector)(u.getPreferences);return a.default.createElement(s.ConfirmInfoRow,{"data-testid":p,label:e,tooltip:t,variant:s.ConfirmInfoRowVariant.Default},a.default.createElement(i.Box,{display:c.Display.Flex,flexDirection:c.FlexDirection.Row,justifyContent:c.JustifyContent.spaceBetween,alignItems:c.AlignItems.center,textAlign:c.TextAlign.Center,marginLeft:8},a.default.createElement(i.Text,{marginRight:1,color:c.TextColor.textDefault},m),h&&!y||!f?a.default.createElement(i.Text,{color:c.TextColor.textAlternative},n):a.default.createElement(l.default,{title:f},a.default.createElement(i.Text,{color:c.TextColor.textAlternative},n))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/gas-fees-row/gas-fees-row.tsx"}],[6503,{"../../../../../../../../shared/constants/gas":5255,"../../../../../../../components/app/confirm/info/row/section":5418,"../../../../../context/confirm":6691,"../../../../edit-gas-popover":6573,"../../hooks/useSupportsEIP1559":6483,"../gas-fees-details/gas-fees-details":6501,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.GasFeesSection=void 0;var a,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("../../../../../../../../shared/constants/gas"),s=e("../../../../../../../components/app/confirm/info/row/section"),i=e("../../../../../context/confirm"),l=(a=e("../../../../edit-gas-popover"))&&a.__esModule?a:{default:a},c=e("../../hooks/useSupportsEIP1559"),u=e("../gas-fees-details/gas-fees-details");function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}const f=({closeCustomizeGasPopover:e,transactionMeta:t})=>o.default.createElement(l.default,{onClose:e,mode:r.EditGasModes.modifyInPlace,transaction:t});n.GasFeesSection=()=>{const{currentConfirmation:e}=(0,i.useConfirmContext)(),[t,n]=(0,o.useState)(!1),a=(0,o.useCallback)((()=>n(!1)),[n]),{supportsEIP1559:r}=(0,c.useSupportsEIP1559)(e);return null!=e&&e.txParams?o.default.createElement(s.ConfirmInfoSection,{"data-testid":"gas-fee-section"},o.default.createElement(u.GasFeesDetails,{setShowCustomizeGasPopover:n}),!r&&t&&o.default.createElement(f,{closeCustomizeGasPopover:a,transactionMeta:e})):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/gas-fees-section/gas-fees-section.tsx"}],[6504,{"../../../../../../../../shared/constants/network":5264,"../../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/tooltip":6197,"../../../../../../../ducks/locale/locale":6235,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useFiatFormatter":6330,"../../../../../../../selectors":6985,"../../../../../../../selectors/multichain":6990,"../../../../../context/confirm":6691,"../../../../simulation-details/formatAmount":6616,"bignumber.js":3465,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("bignumber.js"),o=y(e("react")),r=e("react-redux"),s=e("../../../../../../../../shared/constants/network"),i=e("../../../../../../../../shared/lib/transactions-controller-utils"),l=e("../../../../../../../components/component-library"),c=y(e("../../../../../../../components/ui/tooltip")),u=e("../../../../../../../ducks/locale/locale"),d=e("../../../../../../../helpers/constants/design-system"),f=e("../../../../../../../hooks/useFiatFormatter"),m=e("../../../../../../../selectors"),p=e("../../../../../../../selectors/multichain"),g=e("../../../../../context/confirm"),h=e("../../../../simulation-details/formatAmount");function y(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{var e,t;const{currentConfirmation:n}=(0,g.useConfirmContext)(),{chainId:y}=n,v=(0,i.calcTokenAmount)(n.txParams.value,18),x=(0,r.useSelector)((e=>(0,m.selectConversionRateByChainId)(e,y))),b=x&&v&&new a.BigNumber(x).times(v,10).toNumber(),k=(0,f.useFiatFormatter)(),T=b&&k(b,{shorten:!0}),w=(0,r.useSelector)(p.getMultichainNetwork),C=null==w||null===(e=w.network)||void 0===e?void 0:e.ticker,_=(0,r.useSelector)(u.getIntlLocale),E=(0,h.formatAmount)(_,v),I=v.toFixed(),S=s.TEST_CHAINS.includes(n.chainId),{showFiatInTestnets:P}=(0,r.useSelector)(m.getPreferences),M=o.default.createElement(l.AvatarToken,{src:(null==w||null===(t=w.network)||void 0===t||null===(t=t.rpcPrefs)||void 0===t?void 0:t.imageUrl)||s.CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP[n.chainId],name:null==w?void 0:w.nickname,size:l.AvatarTokenSize.Xl,backgroundColor:d.BackgroundColor.backgroundDefault}),D=E===I?o.default.createElement(l.Text,{variant:d.TextVariant.headingLg,color:d.TextColor.inherit,marginTop:3},`${E} ${C}`):o.default.createElement(c.default,{title:I,position:"right"},o.default.createElement(l.Text,{variant:d.TextVariant.headingLg,color:d.TextColor.inherit,marginTop:3},`${E} ${C}`)),A=Boolean(T)&&(!S||P)&&o.default.createElement(l.Text,{variant:d.TextVariant.bodyMd,color:d.TextColor.textAlternative},T);return o.default.createElement(l.Box,{display:d.Display.Flex,flexDirection:d.FlexDirection.Column,justifyContent:d.JustifyContent.center,alignItems:d.AlignItems.center,padding:4},M,D,A)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/native-send-heading/native-send-heading.tsx"}],[6505,{"../../../../../../../../shared/constants/network":5264,"../../../../../../../../shared/modules/selectors/networks":5320,"../../../../../../../../shared/modules/string-utils":5324,"../../../../../../../components/component-library":5806,"../../../../../../../components/multichain/nft-item":5981,"../../../../../../../ducks/metamask/metamask":6236,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../helpers/utils/nfts":6286,"../../../../../context/confirm":6691,"../../../../../hooks/useAssetDetails":6713,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("react-redux"),s=e("../../../../../../../../shared/constants/network"),i=e("../../../../../../../../shared/modules/string-utils"),l=e("../../../../../../../components/component-library"),c=e("../../../../../../../components/multichain/nft-item"),u=e("../../../../../../../ducks/metamask/metamask"),d=e("../../../../../../../helpers/constants/design-system"),f=e("../../../../../../../helpers/utils/nfts"),m=e("../../../../../context/confirm"),p=e("../../../../../hooks/useAssetDetails"),g=e("../../../../../../../../shared/modules/selectors/networks");n.default=()=>{const{currentConfirmation:e}=(0,m.useConfirmContext)(),t=e.txParams.to,n=e.txParams.from,{data:a}=e.txParams,{chainId:h}=e,{assetName:y,tokenImage:v,tokenId:x}=(0,p.useAssetDetails)(t,n,a,h),b=(0,r.useSelector)((e=>(0,u.getNFTsByChainId)(e,h))),k=(0,r.useSelector)(g.getNetworkConfigurationsByChainId),T=x&&b.find((({address:e,tokenId:n})=>(0,i.isEqualCaseInsensitive)(e,t)&&x===n.toString())),w=null==T?void 0:T.imageOriginal,C=null==T?void 0:T.image,_=T&&(0,f.getNftImageAlt)(T),E=w??(C||""),I=null==E?void 0:E.startsWith("ipfs:"),S=k[h],P=o.default.createElement(l.Box,{style:{width:"48px"}},o.default.createElement(c.NftItem,{src:v,alt:C&&_?_:"",name:y,tokenId:x||"",networkName:S.name??"",networkSrc:s.CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP[h],isIpfsURL:I})),M=o.default.createElement(l.Text,{variant:d.TextVariant.headingLg,color:d.TextColor.inherit,marginTop:3,textAlign:d.TextAlign.Center},y),D=o.default.createElement(l.Text,{variant:d.TextVariant.bodyMd,color:d.TextColor.textAlternative},`#${x}`);return o.default.createElement(l.Box,{display:d.Display.Flex,flexDirection:d.FlexDirection.Column,justifyContent:d.JustifyContent.center,alignItems:d.AlignItems.center,padding:4},P,M,D)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/nft-send-heading/nft-send-heading.tsx"}],[6506,{"../../../../../../../../shared/constants/network":5264,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/tooltip":6197,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../../../selectors":6985,"../../../../../context/confirm":6691,"../../hooks/use-token-values":6478,"../../hooks/useTokenDetails":6484,"../confirm-loader/confirm-loader":6497,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=g(e("react")),o=e("react-redux"),r=e("../../../../../../../../shared/constants/network"),s=e("../../../../../../../components/component-library"),i=g(e("../../../../../../../components/ui/tooltip")),l=e("../../../../../../../helpers/constants/design-system"),c=e("../../../../../../../hooks/useI18nContext"),u=e("../../../../../../../selectors"),d=e("../../../../../context/confirm"),f=e("../../hooks/use-token-values"),m=e("../../hooks/useTokenDetails"),p=e("../confirm-loader/confirm-loader");function g(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const e=(0,c.useI18nContext)(),{currentConfirmation:t}=(0,d.useConfirmContext)(),{tokenImage:n,tokenSymbol:g}=(0,m.useTokenDetails)(t),{decodedTransferValue:h,displayTransferValue:y,fiatDisplayValue:v,pending:x}=(0,f.useTokenValues)(t),b=r.TEST_CHAINS.includes(t.chainId),{showFiatInTestnets:k}=(0,o.useSelector)(u.getPreferences),T=a.default.createElement(s.AvatarToken,{src:n,name:g!==e("unknown")&&g,size:s.AvatarTokenSize.Xl,backgroundColor:g===e("unknown")?l.BackgroundColor.overlayDefault:l.BackgroundColor.backgroundDefault,color:g===e("unknown")?l.TextColor.textMuted:l.TextColor.textDefault}),w=y===h?a.default.createElement(s.Text,{variant:l.TextVariant.headingLg,color:l.TextColor.inherit,marginTop:3},`${y} ${g}`):a.default.createElement(i.default,{title:h,position:"right"},a.default.createElement(s.Text,{variant:l.TextVariant.headingLg,color:l.TextColor.inherit,marginTop:3},`${y} ${g}`)),C=Boolean(v)&&(!b||k)&&a.default.createElement(s.Text,{variant:l.TextVariant.bodyMd,color:l.TextColor.textAlternative},v);return x?a.default.createElement(p.ConfirmLoader,null):a.default.createElement(s.Box,{display:l.Display.Flex,flexDirection:l.FlexDirection.Column,justifyContent:l.JustifyContent.center,alignItems:l.AlignItems.center,padding:4},T,w,C)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.tsx"}],[6507,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../../../../utils":6756,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SigningInWithRow=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../../components/app/confirm/info/row"),s=e("../../../../../../../components/app/confirm/info/row/alert-row/alert-row"),i=e("../../../../../../../components/app/confirm/info/row/constants"),l=e("../../../../../../../hooks/useI18nContext"),c=e("../../../../../context/confirm"),u=e("../../../../../utils");n.SigningInWithRow=()=>{var e,t;const n=(0,l.useI18nContext)(),{currentConfirmation:a}=(0,c.useConfirmContext)(),d=(0,u.isSIWESignatureRequest)(a),f=null==a?void 0:a.chainId,m=(null==a||null===(e=a.txParams)||void 0===e?void 0:e.from)??(null==a||null===(t=a.msgParams)||void 0===t?void 0:t.from);return m?o.default.createElement(s.ConfirmInfoAlertRow,{alertKey:i.RowAlertKey.SigningInWith,label:n(d?"signingInWith":"signingWith"),ownerId:a.id,isShownWithAlertsOnly:!d},o.default.createElement(r.ConfirmInfoRowAddress,{address:m,chainId:f})):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/sign-in-with-row/sign-in-with-row.tsx"}],[6508,{"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/icon/preloader":6126,"../../../../../../../helpers/constants/design-system":6248,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=c(e("react")),o=e("../../../../../../../components/component-library"),r=e("../../../../../../../components/app/confirm/info/row"),s=e("../../../../../../../components/app/confirm/info/row/section"),i=e("../../../../../../../helpers/constants/design-system"),l=c(e("../../../../../../../components/ui/icon/preloader"));function c(e){return e&&e.__esModule?e:{default:e}}const u={display:i.Display.Flex,alignItems:i.AlignItems.center,justifyContent:i.JustifyContent.spaceBetween};n.default=({title:e,titleTooltip:t,description:n,simulationElements:c,isLoading:d,isCollapsed:f=!1})=>a.default.createElement(s.ConfirmInfoSection,{"data-testid":"confirmation__simulation_section",style:f?u:{}},a.default.createElement(r.ConfirmInfoRow,{label:e,tooltip:t},n&&a.default.createElement(r.ConfirmInfoRowText,{text:n})),d?a.default.createElement(o.Box,{display:i.Display.Flex,justifyContent:i.JustifyContent.center},a.default.createElement(l.default,{size:20})):c)}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/static-simulation/static-simulation.tsx"}],[6509,{"../../../../../../../../shared/modules/transaction.utils":5326,"../../../../../../../../shared/types/transaction-decode":5330,"../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../components/app/confirm/info/row/expandable-row":5414,"../../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../../components/component-library":5806,"../../../../../../../components/ui/icon/preloader":6126,"../../../../../../../helpers/constants/design-system":6248,"../../../../../../../hooks/useI18nContext":6334,"../../../../../context/confirm":6691,"../../hooks/useDecodedTransactionData":6479,"@ethersproject/bytes":516,lodash:4380,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Container=v,n.TransactionData=void 0;var a=y(e("react")),o=e("@ethersproject/bytes"),r=y(e("lodash")),s=e("../../hooks/useDecodedTransactionData"),i=e("../../../../../../../components/app/confirm/info/row/section"),l=e("../../../../../../../components/app/confirm/info/row"),c=e("../../../../../../../helpers/constants/design-system"),u=e("../../../../../../../components/component-library"),d=e("../../../../../../../hooks/useI18nContext"),f=e("../../../../../../../components/app/confirm/info/row/expandable-row"),m=y(e("../../../../../../../components/ui/icon/preloader")),p=e("../../../../../../../../shared/types/transaction-decode"),g=e("../../../../../context/confirm"),h=e("../../../../../../../../shared/modules/transaction.utils");function y(e){return e&&e.__esModule?e:{default:e}}function v({children:e,isLoading:t,transactionData:n}){const o=(0,d.useI18nContext)();return a.default.createElement(a.default.Fragment,null,a.default.createElement(i.ConfirmInfoSection,{"data-testid":"advanced-details-data-section"},a.default.createElement(l.ConfirmInfoRow,{label:o("advancedDetailsDataDesc"),copyEnabled:Boolean(n),copyText:n||undefined},a.default.createElement(u.Box,null,t&&a.default.createElement(m.default,{size:20}))),e))}function x({transactionData:e}){const t=(0,d.useI18nContext)();return a.default.createElement(l.ConfirmInfoRow,{label:t("advancedDetailsHexDesc")},a.default.createElement(l.ConfirmInfoRowText,{"data-testid":"advanced-details-transaction-hex",text:e}))}function b({method:e,source:t,isExpandable:n,chainId:o}){const r=(0,d.useI18nContext)(),s=a.default.createElement(u.Box,{paddingLeft:2,"data-testid":`advanced-details-${e.name}-params`},e.params.map(((e,n)=>a.default.createElement(T,{key:n,param:e,index:n,source:t,chainId:o}))));return n?a.default.createElement(f.ConfirmInfoExpandableRow,{label:r("transactionDataFunction"),tooltip:e.description,content:s,startExpanded:!0},a.default.createElement(l.ConfirmInfoRowText,{"data-testid":"advanced-details-data-function",text:e.name})):a.default.createElement(a.default.Fragment,null,a.default.createElement(l.ConfirmInfoRow,{"data-testid":"advanced-details-data-function",label:r("transactionDataFunction"),tooltip:e.description},a.default.createElement(l.ConfirmInfoRowText,{text:e.name})),s)}function k({param:e,source:t,chainId:n}){const{name:r,type:s,value:i}=e;if("address"===s)return a.default.createElement(l.ConfirmInfoRowAddress,{address:i,chainId:n});if("path"===r&&t===p.DecodedTransactionDataSource.Uniswap)return a.default.createElement(w,{pathPools:i,chainId:n});let c=i.toString();return!Array.isArray(i)&&c.startsWith("0x")&&(c=(0,o.hexStripZeros)(c)),a.default.createElement(l.ConfirmInfoRowText,{text:c})}function T({param:e,index:t,source:n,chainId:o}){var s;const{name:i,type:c,description:d}=e,f=i?r.default.startCase(i):`Param #${t+1}`,m=`${c}${d?` - ${d}`:""}`,p=`advanced-details-data-param-${t}`,g=null===(s=e.children)||void 0===s?void 0:s.map(((e,t)=>a.default.createElement(T,{key:t,param:e,index:t,source:n,chainId:o})));return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.ConfirmInfoRow,{label:f,tooltip:m,"data-testid":p},!(null!=g&&g.length)&&a.default.createElement(k,{param:e,source:n,chainId:o})),g&&a.default.createElement(u.Box,{paddingLeft:2},g))}function w({pathPools:e,chainId:t}){return a.default.createElement(u.Box,{display:c.Display.Flex,flexWrap:c.FlexWrap.Wrap,justifyContent:c.JustifyContent.flexEnd},e.map(((e,n)=>a.default.createElement(a.default.Fragment,null,0===n&&a.default.createElement(l.ConfirmInfoRowAddress,{address:e.firstAddress,chainId:t}),a.default.createElement(l.ConfirmInfoRowText,{text:String(e.tickSpacing)}),a.default.createElement(l.ConfirmInfoRowAddress,{address:e.secondAddress,chainId:t})))))}n.TransactionData=()=>{var e;const{currentConfirmation:t}=(0,g.useConfirmContext)(),n=null==t||null===(e=t.txParams)||void 0===e?void 0:e.data,o=(0,s.useDecodedTransactionData)(),{value:r,pending:i}=o;if(i)return a.default.createElement(v,{isLoading:!0});if(!(0,h.hasTransactionData)(n))return null;if(!r)return a.default.createElement(v,{transactionData:n},a.default.createElement(x,{transactionData:n}));const{data:c,source:u}=r,d=c.length>1,{chainId:f}=t;return a.default.createElement(v,{transactionData:n},a.default.createElement(a.default.Fragment,null,c.map(((e,t)=>a.default.createElement(a.default.Fragment,{key:t},a.default.createElement(b,{method:e,source:u,isExpandable:d,chainId:f}),t{const e=(0,u.useI18nContext)(),{currentConfirmation:t}=(0,m.useConfirmContext)(),n=null==t?void 0:t.origin;return n?o.default.createElement(i.ConfirmInfoAlertRow,{alertKey:l.RowAlertKey.RequestFrom,ownerId:t.id,"data-testid":"transaction-details-origin-row",label:e("requestFrom"),tooltip:e("requestFromTransactionDescription")},o.default.createElement(s.ConfirmInfoRowUrl,{url:n})):null};n.OriginRow=T;const w=()=>{var e,t;const n=(0,u.useI18nContext)(),{currentConfirmation:r}=(0,m.useConfirmContext)();if(null==r||null===(e=r.txParams)||void 0===e||!e.to||!(0,a.isValidAddress)((null==r||null===(t=r.txParams)||void 0===t?void 0:t.to)??""))return null;const{chainId:i}=r;return o.default.createElement(s.ConfirmInfoRow,{"data-testid":"transaction-details-recipient-row",label:n("interactingWith"),tooltip:n("interactingWithTransactionDescription")},o.default.createElement(s.ConfirmInfoRowAddress,{address:r.txParams.to,chainId:i}))};n.RecipientRow=w;const C=()=>{const e=(0,u.useI18nContext)(),{currentConfirmation:t}=(0,m.useConfirmContext)(),n=(0,p.useFourByte)(t);return null!=n&&n.name?o.default.createElement(s.ConfirmInfoRow,{"data-testid":"transaction-details-method-data-row",label:e("methodData"),tooltip:e("methodDataTransactionDesc")},o.default.createElement(s.ConfirmInfoRowText,{text:n.name})):null};n.MethodDataRow=C;const _=()=>{var e;const t=(0,u.useI18nContext)(),{currentConfirmation:n}=(0,m.useConfirmContext)(),{currency:a}=(0,y.useUserPreferencedCurrency)(h.PRIMARY),r=null==n||null===(e=n.txParams)||void 0===e?void 0:e.value;return r&&r!==v.HEX_ZERO?o.default.createElement(c.ConfirmInfoSection,null,o.default.createElement(s.ConfirmInfoRow,{"data-testid":"transaction-details-amount-row",label:t("amount")},o.default.createElement(g.ConfirmInfoRowCurrency,{value:r,currency:a}))):null},E=()=>{const e=(0,u.useI18nContext)(),{currentConfirmation:t}=(0,m.useConfirmContext)(),{id:n,chainId:a}=t??{},i=Boolean(null==t?void 0:t.isUserOperation),l=(0,r.useSelector)((e=>(0,d.selectPaymasterAddress)(e,n)));return i&&l?o.default.createElement(c.ConfirmInfoSection,null,o.default.createElement(s.ConfirmInfoRow,{"data-testid":"transaction-details-paymaster-row",label:e("confirmFieldPaymaster"),tooltip:e("confirmFieldTooltipPaymaster")},o.default.createElement(s.ConfirmInfoRowAddress,{address:l,chainId:a}))):null};n.TransactionDetails=()=>{const e=(0,r.useSelector)(f.selectConfirmationAdvancedDetailsOpen),{currentConfirmation:t}=(0,m.useConfirmContext)(),n=(0,o.useMemo)((()=>(0,x.hasValueAndNativeBalanceMismatch)(t)),[t]);return o.default.createElement(o.default.Fragment,null,o.default.createElement(c.ConfirmInfoSection,{"data-testid":"transaction-details-section"},o.default.createElement(T,null),o.default.createElement(w,null),e&&o.default.createElement(C,null),o.default.createElement(b.SigningInWithRow,null)),(e||n)&&o.default.createElement(_,null),o.default.createElement(E,null))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx"}],[6511,{"../../../../../../../shared/constants/app":5248,"../../../../../../../shared/constants/network":5264,"../../../../../../../shared/modules/selectors/networks":5320,"../../../../../../components/app/confirm/info/row":5416,"../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../components/component-library":5806,"../../../../../../helpers/constants/design-system":6248,"../../../../../../hooks/useI18nContext":6334,"../../../../context/confirm":6691,"../../../../selectors/preferences":6748,"../../../simulation-details/useBalanceChanges":6621,"../shared/transaction-details/transaction-details":6510,"@metamask/transaction-controller":2698,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenDetailsSection=void 0;var a,o=e("@metamask/transaction-controller"),r=(a=e("react"))&&a.__esModule?a:{default:a},s=e("react-redux"),i=e("../../../../../../../shared/constants/app"),l=e("../../../../../../../shared/constants/network"),c=e("../../../../../../../shared/modules/selectors/networks"),u=e("../../../../../../components/app/confirm/info/row"),d=e("../../../../../../components/app/confirm/info/row/section"),f=e("../../../../../../components/component-library"),m=e("../../../../../../helpers/constants/design-system"),p=e("../../../../../../hooks/useI18nContext"),g=e("../../../../context/confirm"),h=e("../../../../selectors/preferences"),y=e("../../../simulation-details/useBalanceChanges"),v=e("../shared/transaction-details/transaction-details");n.TokenDetailsSection=()=>{var e;const t=(0,p.useI18nContext)(),{currentConfirmation:n}=(0,g.useConfirmContext)(),{chainId:a}=n,x=(0,s.useSelector)(c.getNetworkConfigurationsByChainId)[a].name,b=(0,s.useSelector)(h.selectConfirmationAdvancedDetailsOpen),k=Boolean(null===(e=n.simulationData)||void 0===e||null===(e=e.error)||void 0===e?void 0:e.code),T=0===(0,y.useBalanceChanges)({chainId:a,simulationData:n.simulationData}).value.length,w=r.default.createElement(u.ConfirmInfoRow,{label:t("transactionFlowNetwork")},r.default.createElement(f.Box,{display:m.Display.Flex,alignItems:m.AlignItems.center,flexWrap:m.FlexWrap.Wrap,gap:2,minWidth:m.BlockSize.Zero},r.default.createElement(f.AvatarNetwork,{borderColor:m.BorderColor.backgroundDefault,size:f.AvatarNetworkSize.Xs,src:l.CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP[a],name:x}),r.default.createElement(f.Text,{variant:m.TextVariant.bodyMd,color:m.TextColor.textDefault},x))),C=n.type!==o.TransactionType.simpleSend&&(b||T||k),_=C&&r.default.createElement(u.ConfirmInfoRow,{label:t("interactingWith"),tooltip:t("interactingWithTransactionDescription")},r.default.createElement(u.ConfirmInfoRowAddress,{address:n.txParams.to,chainId:a})),E=(null==n?void 0:n.origin)!==i.ORIGIN_METAMASK;return r.default.createElement(d.ConfirmInfoSection,{"data-testid":"confirmation__token-details-section"},w,(E||C)&&r.default.createElement(u.ConfirmInfoRowDivider,null),E&&r.default.createElement(v.OriginRow,null),_)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/token-transfer/token-details-section.tsx"}],[6512,{"../../../../context/confirm":6691,"../../../simulation-details":6617,"../shared/advanced-details/advanced-details":6496,"../shared/gas-fees-section/gas-fees-section":6503,"../shared/send-heading/send-heading":6506,"./token-details-section":6511,"./transaction-flow-section":6513,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=d(e("react")),o=e("../../../../context/confirm"),r=e("../../../simulation-details"),s=e("../shared/advanced-details/advanced-details"),i=e("../shared/gas-fees-section/gas-fees-section"),l=d(e("../shared/send-heading/send-heading")),c=e("./token-details-section"),u=e("./transaction-flow-section");function d(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const{currentConfirmation:e}=(0,o.useConfirmContext)(),t="metamask"===e.origin;return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,null),a.default.createElement(u.TransactionFlowSection,null),a.default.createElement(r.SimulationDetails,{transaction:e,isTransactionsRedesign:!0,enableMetrics:!0,metricsOnly:t}),a.default.createElement(c.TokenDetailsSection,null),a.default.createElement(i.GasFeesSection,null),a.default.createElement(s.AdvancedDetails,null))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/token-transfer/token-transfer.tsx"}],[6513,{"../../../../../../components/app/confirm/info/row":5416,"../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../components/component-library":5806,"../../../../../../helpers/constants/design-system":6248,"../../../../../../hooks/useI18nContext":6334,"../../../../context/confirm":6691,"../hooks/useDecodedTransactionData":6479,"@metamask/transaction-controller":2698,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.TransactionFlowSection=void 0;var a,o=e("@metamask/transaction-controller"),r=(a=e("react"))&&a.__esModule?a:{default:a},s=e("../../../../../../components/app/confirm/info/row/section"),i=e("../../../../../../components/component-library"),l=e("../../../../../../helpers/constants/design-system"),c=e("../../../../../../components/app/confirm/info/row"),u=e("../../../../../../components/app/confirm/info/row/alert-row/alert-row"),d=e("../../../../../../components/app/confirm/info/row/constants"),f=e("../../../../../../hooks/useI18nContext"),m=e("../../../../context/confirm"),p=e("../hooks/useDecodedTransactionData");n.TransactionFlowSection=()=>{const e=(0,f.useI18nContext)(),{currentConfirmation:t}=(0,m.useConfirmContext)(),{value:n,pending:a}=(0,p.useDecodedTransactionData)(),g=null==n?void 0:n.data[0].params.filter((e=>"address"===e.type)),h=t.type===o.TransactionType.simpleSend?t.txParams.to:null==g?void 0:g[g.length-1].value;if(a)return null;const{chainId:y}=t;return r.default.createElement(s.ConfirmInfoSection,{"data-testid":"confirmation__transaction-flow"},r.default.createElement(i.Box,{display:l.Display.Flex,flexDirection:l.FlexDirection.Row,justifyContent:l.JustifyContent.spaceBetween,alignItems:l.AlignItems.center},r.default.createElement(u.ConfirmInfoAlertRow,{alertKey:d.RowAlertKey.SigningInWith,label:e("from"),ownerId:t.id,style:{flexDirection:l.FlexDirection.Column}},r.default.createElement(i.Box,{marginTop:1},r.default.createElement(c.ConfirmInfoRowAddress,{address:t.txParams.from,chainId:y}))),r.default.createElement(i.Icon,{name:i.IconName.ArrowRight,size:i.IconSize.Md,color:l.IconColor.iconMuted}),h&&r.default.createElement(u.ConfirmInfoAlertRow,{alertKey:d.RowAlertKey.FirstTimeInteraction,label:e("to"),ownerId:t.id,style:{flexDirection:l.FlexDirection.Column}},r.default.createElement(i.Box,{marginTop:1},r.default.createElement(c.ConfirmInfoRowAddress,{address:h,chainId:y})))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.tsx"}],[6514,{"../../../../../../components/app/confirm/info/row":5416,"../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../helpers/utils/snaps":6292,"../../../../../../hooks/useI18nContext":6334,"../../../../context/confirm":6691,"../../row/typed-sign-data-v1/typedSignDataV1":6535,"../shared/sign-in-with-row/sign-in-with-row":6507,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../components/app/confirm/info/row/alert-row/alert-row"),s=e("../../../../../../components/app/confirm/info/row"),i=e("../../../../../../components/app/confirm/info/row/constants"),l=e("../../../../../../hooks/useI18nContext"),c=e("../../../../context/confirm"),u=e("../../row/typed-sign-data-v1/typedSignDataV1"),d=e("../../../../../../components/app/confirm/info/row/section"),f=e("../../../../../../helpers/utils/snaps"),m=e("../shared/sign-in-with-row/sign-in-with-row");n.default=()=>{var e,t,n,a;const p=(0,l.useI18nContext)(),{currentConfirmation:g}=(0,c.useConfirmContext)();if(null==g||!g.msgParams)return null;const h=(0,f.isSnapId)(null===(e=g.msgParams)||void 0===e?void 0:e.origin)?p("requestFromInfoSnap"):p("requestFromInfo"),y=g.chainId;return o.default.createElement(o.default.Fragment,null,o.default.createElement(d.ConfirmInfoSection,null,o.default.createElement(r.ConfirmInfoAlertRow,{alertKey:i.RowAlertKey.RequestFrom,ownerId:g.id,label:p("requestFrom"),tooltip:h},o.default.createElement(s.ConfirmInfoRowUrl,{url:(null===(t=g.msgParams)||void 0===t?void 0:t.origin)??""})),o.default.createElement(m.SigningInWithRow,null)),o.default.createElement(d.ConfirmInfoSection,null,o.default.createElement(s.ConfirmInfoRow,{label:p("message"),collapsed:!1,copyEnabled:!0,copyText:JSON.stringify((null===(n=g.msgParams)||void 0===n?void 0:n.data)??{})},o.default.createElement(u.ConfirmInfoRowTypedSignDataV1,{data:null===(a=g.msgParams)||void 0===a?void 0:a.data,chainId:y}))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign-v1/typed-sign-v1.tsx"}],[6515,{"../../../../../../../../../shared/constants/transaction":5278,"../../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../../components/component-library":5806,"../../../../../../../../hooks/useI18nContext":6334,"../../../../../../context/confirm":6691,"../../../shared/static-simulation/static-simulation":6508,"../native-value-display/native-value-display":6518,"../value-display/value-display":6522,"@metamask/signature-controller":2322,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getStateChangeToolip=n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("@metamask/signature-controller"),r=e("../../../../../../../../../shared/constants/transaction"),s=e("../../../../../../../../components/app/confirm/info/row"),i=e("../../../../../../../../components/component-library"),l=e("../../../../../../../../hooks/useI18nContext"),c=e("../../../../../../context/confirm"),u=m(e("../../../shared/static-simulation/static-simulation")),d=m(e("../value-display/value-display")),f=m(e("../native-value-display/native-value-display"));function m(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}const g=(e,t,n)=>{if(t.changeType===o.DecodingDataChangeType.Receive){if(null!=e&&e.some((e=>e.changeType===o.DecodingDataChangeType.Listing&&e.assetType===r.TokenStandard.ERC721)))return n("signature_decoding_list_nft_tooltip");if(t.assetType===r.TokenStandard.ERC721&&null!=e&&e.some((e=>e.changeType===o.DecodingDataChangeType.Bidding)))return n("signature_decoding_bid_nft_tooltip")}return undefined};n.getStateChangeToolip=g;const h=(e,t)=>({[o.DecodingDataChangeType.Transfer]:e("permitSimulationChange_transfer"),[o.DecodingDataChangeType.Receive]:e("permitSimulationChange_receive"),[o.DecodingDataChangeType.Approve]:e("permitSimulationChange_approve"),[o.DecodingDataChangeType.Revoke]:e("permitSimulationChange_revoke"),[o.DecodingDataChangeType.Bidding]:e("permitSimulationChange_bidding"),[o.DecodingDataChangeType.Listing]:e("permitSimulationChange_listing")}[t]),y=({stateChangeList:e,stateChange:t,chainId:n})=>{const i=(0,l.useI18nContext)(),{assetType:c,changeType:u,amount:m,contractAddress:p,tokenID:y}=t,v=g(e,t,i);return a.default.createElement(s.ConfirmInfoRow,{label:h(i,u),tooltip:v},(c===r.TokenStandard.ERC20||c===r.TokenStandard.ERC721||c===r.TokenStandard.ERC1155)&&a.default.createElement(d.default,{tokenContract:p,value:m,chainId:n,tokenId:y,credit:u===o.DecodingDataChangeType.Receive,debit:u===o.DecodingDataChangeType.Transfer}),"NATIVE"===c&&a.default.createElement(f.default,{value:m,chainId:n,credit:u===o.DecodingDataChangeType.Receive,debit:u===o.DecodingDataChangeType.Transfer}))};n.default=()=>{const e=(0,l.useI18nContext)(),{currentConfirmation:t}=(0,c.useConfirmContext)(),n=t.chainId,{decodingLoading:o,decodingData:r}=t,s=(0,a.useMemo)((()=>((null==r?void 0:r.stateChanges)??[]).map((e=>a.default.createElement(y,{stateChangeList:(null==r?void 0:r.stateChanges)??[],stateChange:e,chainId:n})))),[null==r?void 0:r.stateChanges]);return a.default.createElement(u.default,{title:e("simulationDetailsTitle"),titleTooltip:e("simulationDetailsTitleTooltip"),simulationElements:s.length?s:a.default.createElement(i.Text,null,e("simulationDetailsUnavailable")),isLoading:o,isCollapsed:o||!s.length})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/decoded-simulation/decoded-simulation.tsx"}],[6516,{"./decoded-simulation":6515},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"DecodedSimulation",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./decoded-simulation"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/decoded-simulation/index.ts"}],[6517,{"./typed-sign-v4-simulation":6521},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"TypedSignV4Simulation",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./typed-sign-v4-simulation"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/index.ts"}],[6518,{"../../../../../../../../../shared/constants/transaction":5278,"../../../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../../../components/component-library":5806,"../../../../../../../../components/ui/tooltip":6197,"../../../../../../../../helpers/constants/design-system":6248,"../../../../../../../../helpers/utils/util":6297,"../../../../../../../../selectors":6985,"../../../../../simulation-details/asset-pill":6612,"../../../../../simulation-details/fiat-display":6615,"../../../../../simulation-details/formatAmount":6616,"../../../utils":6524,"bignumber.js":3465,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=e("bignumber.js"),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),s=e("react-redux"),i=e("../../../../../../../../../shared/constants/transaction"),l=e("../../../../../../../../../shared/lib/transactions-controller-utils"),c=e("../../../../../../../../components/component-library"),u=e("../../../../../../../../helpers/constants/design-system"),d=(a=e("../../../../../../../../components/ui/tooltip"))&&a.__esModule?a:{default:a},f=e("../../../../../../../../helpers/utils/util"),m=e("../../../../../../../../selectors"),p=e("../../../../../simulation-details/asset-pill"),g=e("../../../../../simulation-details/formatAmount"),h=e("../../../../../simulation-details/fiat-display"),y=e("../../../utils");function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}n.default=({chainId:e,value:t,credit:n,debit:a})=>{const v=(0,s.useSelector)((t=>(0,m.selectConversionRateByChainId)(t,e))),{fiatValue:x,tokenValue:b,tokenValueMaxPrecision:k}=(0,r.useMemo)((()=>{if(!t)return{tokenValue:null,tokenValueMaxPrecision:null};const e=(0,l.calcTokenAmount)(t,18);return{fiatValue:v?new o.BigNumber(e).times(String(v)).toNumber():undefined,tokenValue:(0,g.formatAmount)("en-US",e),tokenValueMaxPrecision:(0,g.formatAmountMaxPrecision)("en-US",e)}}),[v,t]),{color:T,backgroundColor:w}=(0,y.getAmountColors)(n,a);return r.default.createElement(c.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},r.default.createElement(c.Box,{display:u.Display.Flex,justifyContent:u.JustifyContent.flexEnd},r.default.createElement(c.Box,{display:u.Display.Inline,marginInlineEnd:1,minWidth:u.BlockSize.Zero},r.default.createElement(d.default,{position:"bottom",title:k,wrapperStyle:{minWidth:0},interactive:!0},r.default.createElement(c.Text,{"data-testid":"simulation-native-value-display",backgroundColor:w,borderRadius:u.BorderRadius.XL,color:T,paddingInline:2,style:{paddingTop:"1px",paddingBottom:"1px"},textAlign:u.TextAlign.Center},n&&"+ ",a&&"- ",null!==b&&(0,f.shortenString)(b||"",{truncatedCharLimit:15,truncatedStartChars:15,truncatedEndChars:0,skipCharacterInEnd:!0})))),r.default.createElement(p.AssetPill,{asset:{chainId:e,standard:i.TokenStandard.none}})),r.default.createElement(c.Box,null,x!==undefined&&r.default.createElement(h.IndividualFiatDisplay,{fiatAmount:x,shorten:!0})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/native-value-display/native-value-display.tsx"}],[6519,{"./permit-simulation":6520},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PermitSimulation",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./permit-simulation"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/permit-simulation/index.ts"}],[6520,{"../../../../../../../../../shared/constants/signatures":5271,"../../../../../../../../../shared/modules/transaction.utils":5326,"../../../../../../../../components/app/confirm/info/row":5416,"../../../../../../../../components/component-library":5806,"../../../../../../../../helpers/constants/design-system":6248,"../../../../../../../../hooks/useI18nContext":6334,"../../../../../../context/confirm":6691,"../../../shared/static-simulation/static-simulation":6508,"../value-display/value-display":6522,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=m(e("react")),o=e("../../../../../../../../../shared/constants/signatures"),r=e("../../../../../../../../../shared/modules/transaction.utils"),s=e("../../../../../../../../components/app/confirm/info/row"),i=e("../../../../../../../../components/component-library"),l=e("../../../../../../../../helpers/constants/design-system"),c=e("../../../../../../../../hooks/useI18nContext"),u=e("../../../../../../context/confirm"),d=m(e("../../../shared/static-simulation/static-simulation")),f=m(e("../value-display/value-display"));function m(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{var e;const t=(0,c.useI18nContext)(),{currentConfirmation:n}=(0,u.useConfirmContext)(),m=null===(e=n.msgParams)||void 0===e?void 0:e.data,p=n.chainId,{domain:{verifyingContract:g},message:h,message:{tokenId:y},primaryType:v}=(0,r.parseTypedDataMessage)(m),x=y!==undefined,b=function(e,t){let n;switch(t){case o.PrimaryType.PermitBatch:case o.PrimaryType.PermitSingle:n=null==e?void 0:e.details;break;case o.PrimaryType.PermitBatchTransferFrom:case o.PrimaryType.PermitTransferFrom:n=null==e?void 0:e.permitted}return n&&!Array.isArray(n)?[n]:n}(h,v),k=({token:e,amount:t,i:n})=>a.default.createElement(f.default,{key:`${e}-${n}`,primaryType:v,tokenContract:e,value:t,chainId:p}),T=a.default.createElement(s.ConfirmInfoRow,{label:t(x?"simulationApproveHeading":"spendingCap")},a.default.createElement(i.Box,{style:{marginLeft:"auto",maxWidth:"100%"}},Array.isArray(b)?a.default.createElement(i.Box,{display:l.Display.Flex,flexDirection:l.FlexDirection.Column,gap:2},b.map((({token:e,amount:t},n)=>a.default.createElement(k,{token:e,amount:t,i:n})))):a.default.createElement(f.default,{tokenContract:g,value:h.value,tokenId:h.tokenId,chainId:p})));return a.default.createElement(d.default,{title:t("simulationDetailsTitle"),titleTooltip:t("simulationDetailsTitleTooltip"),description:t(x?"simulationDetailsApproveDesc":"permitSimulationDetailInfo"),simulationElements:T})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/permit-simulation/permit-simulation.tsx"}],[6521,{"../../../../../context/confirm":6691,"../../../../../hooks/useDecodedSignatureMetrics":6722,"../../../../../hooks/useTypesSignSimulationEnabledInfo":6745,"../../../../../utils":6756,"./decoded-simulation":6516,"./permit-simulation":6519,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../utils"),s=e("../../../../../context/confirm"),i=e("../../../../../hooks/useDecodedSignatureMetrics"),l=e("../../../../../hooks/useTypesSignSimulationEnabledInfo"),c=e("./decoded-simulation"),u=e("./permit-simulation");n.default=()=>{const{currentConfirmation:e}=(0,s.useConfirmContext)(),t=(0,r.isPermitSignatureRequest)(e),n=(0,l.useTypesSignSimulationEnabledInfo)();if((0,i.useDecodedSignatureMetrics)(!0===n),!n)return null;const{decodingData:a,decodingLoading:d}=e;return(!d&&a===undefined||null!=a&&a.error)&&t?o.default.createElement(u.PermitSimulation,null):o.default.createElement(c.DecodedSimulation,null)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/typed-sign-v4-simulation.tsx"}],[6522,{"../../../../../../../../../shared/constants/metametrics":5260,"../../../../../../../../../shared/lib/transactions-controller-utils":5292,"../../../../../../../../components/app/currency-input/hooks/useTokenExchangeRate":5447,"../../../../../../../../components/app/name/name":5533,"../../../../../../../../components/component-library":5806,"../../../../../../../../components/ui/tooltip":6197,"../../../../../../../../helpers/constants/design-system":6248,"../../../../../../../../helpers/utils/util":6297,"../../../../../../hooks/useGetTokenStandardAndDetails":6728,"../../../../../../hooks/useTrackERC20WithoutDecimalInformation":6739,"../../../../../simulation-details/fiat-display":6615,"../../../../../simulation-details/formatAmount":6616,"../../../utils":6524,"@metamask/name-controller":1955,"@sentry/browser":2871,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("@metamask/name-controller"),r=e("@sentry/browser"),s=e("../../../../../../../../../shared/constants/metametrics"),i=e("../../../../../../../../helpers/utils/util"),l=e("../../../../../../../../../shared/lib/transactions-controller-utils"),c=x(e("../../../../../../../../components/app/currency-input/hooks/useTokenExchangeRate")),u=e("../../../../../simulation-details/fiat-display"),d=e("../../../../../simulation-details/formatAmount"),f=e("../../../../../../hooks/useGetTokenStandardAndDetails"),m=x(e("../../../../../../hooks/useTrackERC20WithoutDecimalInformation")),p=e("../../../../../../../../components/component-library"),g=x(e("../../../../../../../../components/ui/tooltip")),h=e("../../../../../../../../helpers/constants/design-system"),y=x(e("../../../../../../../../components/app/name/name")),v=e("../../../utils");function x(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}n.default=({chainId:e,primaryType:t,tokenContract:n,tokenId:x,value:b,credit:k,debit:T})=>{const w=(0,c.default)(n),C=(0,f.useGetTokenStandardAndDetails)(n);(0,m.default)(e,n,C,s.MetaMetricsEventLocation.SignatureConfirmation);const{decimalsNumber:_}=C,E=(0,a.useMemo)((()=>{if(w&&b&&!x){const e=(0,l.calcTokenAmount)(b,_);return w.times(e).toNumber()}return undefined}),[w,_,b]),{tokenValue:I,tokenValueMaxPrecision:S}=(0,a.useMemo)((()=>{if(!b||x)return{tokenValue:null,tokenValueMaxPrecision:null};const e=(0,l.calcTokenAmount)(b,_);return{tokenValue:(0,d.formatAmount)("en-US",e),tokenValueMaxPrecision:(0,d.formatAmountMaxPrecision)("en-US",e)}}),[_,b]);if(!n)return(0,r.captureException)(new Error(`PermitSimulationValueDisplay: Token contract address is missing where primaryType === ${t}`)),null;const{color:P,backgroundColor:M}=(0,v.getAmountColors)(k,T);return a.default.createElement(p.Box,{marginLeft:"auto",style:{maxWidth:"100%"}},a.default.createElement(p.Box,{display:h.Display.Flex,justifyContent:h.JustifyContent.flexEnd},a.default.createElement(p.Box,{display:h.Display.Inline,marginInlineEnd:1,minWidth:h.BlockSize.Zero},a.default.createElement(g.default,{position:"bottom",title:S,wrapperStyle:{minWidth:0},interactive:!0},a.default.createElement(p.Text,{"data-testid":"simulation-token-value",backgroundColor:M,borderRadius:h.BorderRadius.XL,color:P,paddingInline:2,style:{paddingTop:"1px",paddingBottom:"1px"},textAlign:h.TextAlign.Center},k&&"+ ",T&&"- ",null!==I&&(0,i.shortenString)(I||"",{truncatedCharLimit:15,truncatedStartChars:15,truncatedEndChars:0,skipCharacterInEnd:!0}),x&&`#${x}`))),a.default.createElement(y.default,{value:n,type:o.NameType.ETHEREUM_ADDRESS,variation:e,preferContractSymbol:!0})),a.default.createElement(p.Box,null,E!==undefined&&a.default.createElement(u.IndividualFiatDisplay,{fiatAmount:E,shorten:!0})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/value-display/value-display.tsx"}],[6523,{"../../../../../../../shared/modules/transaction.utils":5326,"../../../../../../components/app/confirm/info/row":5416,"../../../../../../components/app/confirm/info/row/alert-row/alert-row":5408,"../../../../../../components/app/confirm/info/row/constants":5409,"../../../../../../components/app/confirm/info/row/section":5418,"../../../../../../helpers/utils/snaps":6292,"../../../../../../hooks/useI18nContext":6334,"../../../../context/confirm":6691,"../../../../hooks/useGetTokenStandardAndDetails":6728,"../../../../hooks/useTypesSignSimulationEnabledInfo":6745,"../../../../utils":6756,"../../row/typed-sign-data/typedSignData":6536,"../shared/sign-in-with-row/sign-in-with-row":6507,"./typed-sign-v4-simulation":6517,"ethereumjs-util":3796,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("ethereumjs-util"),s=e("../../../../../../components/app/confirm/info/row/alert-row/alert-row"),i=e("../../../../../../../shared/modules/transaction.utils"),l=e("../../../../../../components/app/confirm/info/row/constants"),c=e("../../../../../../components/app/confirm/info/row"),u=e("../../../../../../components/app/confirm/info/row/section"),d=e("../../../../../../hooks/useI18nContext"),f=e("../../../../hooks/useGetTokenStandardAndDetails"),m=e("../../../../utils"),p=e("../../../../context/confirm"),g=e("../../../../hooks/useTypesSignSimulationEnabledInfo"),h=e("../../row/typed-sign-data/typedSignData"),y=e("../../../../../../helpers/utils/snaps"),v=e("../shared/sign-in-with-row/sign-in-with-row"),x=e("./typed-sign-v4-simulation");n.default=()=>{var e;const t=(0,d.useI18nContext)(),{currentConfirmation:n}=(0,p.useConfirmContext)(),a=(0,g.useTypesSignSimulationEnabledInfo)();if(null==n||!n.msgParams)return null;const{domain:{verifyingContract:b},message:{spender:k}}=(0,i.parseTypedDataMessage)(n.msgParams.data),T=(0,m.isPermitSignatureRequest)(n),w=(0,m.isOrderSignatureRequest)(n),C=T||w?b:undefined,{decimalsNumber:_}=(0,f.useGetTokenStandardAndDetails)(C),E=n.chainId,I=(0,y.isSnapId)(n.msgParams.origin)?t("requestFromInfoSnap"):t("requestFromInfo"),S=null===(e=n.msgParams)||void 0===e?void 0:e.data;return o.default.createElement(o.default.Fragment,null,a&&o.default.createElement(x.TypedSignV4Simulation,null),o.default.createElement(u.ConfirmInfoSection,{"data-testid":"confirmation_request-section"},T&&o.default.createElement(o.default.Fragment,null,o.default.createElement(c.ConfirmInfoRow,{label:t("spender")},o.default.createElement(c.ConfirmInfoRowAddress,{address:k,chainId:E})),o.default.createElement(c.ConfirmInfoRowDivider,null)),o.default.createElement(s.ConfirmInfoAlertRow,{alertKey:l.RowAlertKey.RequestFrom,ownerId:n.id,label:t("requestFrom"),tooltip:I},o.default.createElement(c.ConfirmInfoRowUrl,{url:n.msgParams.origin})),(0,r.isValidAddress)(b)&&o.default.createElement(c.ConfirmInfoRow,{label:t("interactingWith")},o.default.createElement(c.ConfirmInfoRowAddress,{address:b,chainId:E})),o.default.createElement(v.SigningInWithRow,null)),o.default.createElement(u.ConfirmInfoSection,{"data-testid":"confirmation_message-section"},o.default.createElement(c.ConfirmInfoRow,{label:t("message"),collapsed:a,copyEnabled:!0,copyText:JSON.stringify((0,i.parseTypedDataMessage)(S??{}))},o.default.createElement(h.ConfirmInfoRowTypedSignData,{data:S,tokenDecimals:_,chainId:E}))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign.tsx"}],[6524,{"../../../../../helpers/constants/design-system":6248,"@metamask/utils":2761,"bn.js":3513},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getAmountColors=void 0,n.getIsRevokeSetApprovalForAll=function(e){var t,n;return"setApprovalForAll"===(null==e||null===(t=e.data)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name)&&!1===(null==e||null===(n=e.data)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.params)||void 0===n||null===(n=n[1])||void 0===n?void 0:n.value)},n.getPercentageChange=i,n.hasValueAndNativeBalanceMismatch=function(e){var t,n;const r=(null==e||null===(t=e.txParams)||void 0===t?void 0:t.value)??"0x0",l=null==e||null===(n=e.simulationData)||void 0===n?void 0:n.nativeBalanceChange,c=(null==l?void 0:l.difference)??"0x0";return!function(e,t,n){const r=new o.BN((0,a.remove0x)(e),"hex");let l=new o.BN((0,a.remove0x)(t),"hex");n&&(l=l.neg());return i(r,l)<=s}(r,c,!1===(null==l?void 0:l.isDecrease))};var a=e("@metamask/utils"),o=e("bn.js"),r=e("../../../../../helpers/constants/design-system");const s=5;function i(e,t){const n=new o.BN(10).pow(new o.BN(18)),a=e.mul(n),r=t.mul(n),s=r.sub(a);return s.isZero()?0:a.isZero()&&!r.isZero()?100:s.muln(100).div(a).abs().toNumber()}n.getAmountColors=(e,t)=>{let n=r.TextColor.textDefault,a=r.BackgroundColor.backgroundAlternative;return e?(n=r.TextColor.successDefault,a=r.BackgroundColor.successMuted):t&&(n=r.TextColor.errorDefault,a=r.BackgroundColor.errorMuted),{color:n,backgroundColor:a}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/info/utils.ts"}],[6525,{"./ledger-info":6526},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"LedgerInfo",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./ledger-info"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/ledger-info/index.ts"}],[6526,{"../../../../../../app/scripts/lib/util":135,"../../../../../../shared/constants/app":5248,"../../../../../../shared/constants/hardware-wallets":5256,"../../../../../components/component-library":5806,"../../../../../ducks/app/app":6223,"../../../../../ducks/metamask/metamask":6236,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useI18nContext":6334,"../../../hooks/useLedgerConnection":6730,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=p(e("react")),o=e("react-redux"),r=e("../../../../../../app/scripts/lib/util"),s=e("../../../../../../shared/constants/app"),i=e("../../../../../../shared/constants/hardware-wallets"),l=e("../../../../../components/component-library"),c=e("../../../../../ducks/app/app"),u=e("../../../../../ducks/metamask/metamask"),d=e("../../../../../helpers/constants/design-system"),f=e("../../../../../hooks/useI18nContext"),m=p(e("../../../hooks/useLedgerConnection"));function p(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const{isLedgerWallet:e}=(0,m.default)(),t=(0,f.useI18nContext)(),n=(0,o.useDispatch)(),p=(0,o.useSelector)(c.getLedgerWebHidConnectedStatus),g=(0,o.useSelector)(u.getLedgerTransportType),h=(0,o.useSelector)(c.getLedgerTransportStatus),y=(0,r.getEnvironmentType)()===s.ENVIRONMENT_TYPE_FULLSCREEN;if(!e)return null;const v=g===i.LedgerTransportTypes.webhid;return a.default.createElement(l.BannerAlert,{severity:l.BannerAlertSeverity.Info,style:{marginTop:16}},a.default.createElement(l.Text,{variant:d.TextVariant.headingSm,fontWeight:d.FontWeight.Medium},t("ledgerConnectionInstructionHeader")),a.default.createElement("ul",{style:{listStyle:"disc"}},a.default.createElement("li",null,a.default.createElement(l.Text,{variant:d.TextVariant.bodyMd},t("ledgerConnectionInstructionStepThree"))),a.default.createElement("li",null,a.default.createElement(l.Text,{variant:d.TextVariant.bodyMd},t("ledgerConnectionInstructionStepFour")))),h===i.HardwareTransportStates.deviceOpenFailure&&a.default.createElement(l.Button,{variant:l.ButtonVariant.Link,textAlign:d.TextAlign.Left,fontWeight:d.FontWeight.Normal,onClick:async()=>{var e,t;y?window.location.reload():null===(e=(t=global.platform).openExtensionInBrowser)||void 0===e||e.call(t,null,null,!0)}},t("ledgerConnectionInstructionCloseOtherApps")),v&&p===i.WebHIDConnectedStatuses.notConnected&&a.default.createElement(l.Button,{variant:l.ButtonVariant.Link,textAlign:d.TextAlign.Left,fontWeight:d.FontWeight.Normal,onClick:async()=>{if(y){const e=(await window.navigator.hid.requestDevice({filters:[{vendorId:Number(i.LEDGER_USB_VENDOR_ID)}]})).some((e=>e.vendorId===Number(i.LEDGER_USB_VENDOR_ID)));n((0,c.setLedgerWebHidConnectedStatus)(e?i.WebHIDConnectedStatuses.connected:i.WebHIDConnectedStatuses.notConnected))}else{var e,t;null===(e=(t=global.platform).openExtensionInBrowser)||void 0===e||e.call(t,null,null,!0)}}},t(y?"clickToConnectLedgerViaWebHID":"openFullScreenForLedgerWebHid")))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/ledger-info/ledger-info.tsx"}],[6527,{"./nav":6528},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Nav",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./nav"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/nav/index.tsx"}],[6528,{"../../../../../../shared/constants/metametrics":5260,"../../../../../../shared/lib/confirmation.utils":5281,"../../../../../components/component-library":5806,"../../../../../helpers/constants/design-system":6248,"../../../../../helpers/constants/routes":6254,"../../../../../hooks/useI18nContext":6334,"../../../../../selectors":6985,"../../../../../store/actions":7e3,"../../../context/confirm":6691,"../../../hooks/useQueuedConfirmationEvents":6733,"@metamask/rpc-errors":2304,react:4776,"react-redux":4734,"react-router-dom":4761},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("@metamask/rpc-errors"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("react-redux"),s=e("react-router-dom"),i=e("../../../../../../shared/constants/metametrics"),l=e("../../../../../components/component-library"),c=e("../../../../../helpers/constants/design-system"),u=e("../../../../../helpers/constants/routes"),d=e("../../../../../hooks/useI18nContext"),f=e("../../../../../selectors"),m=e("../../../../../store/actions"),p=e("../../../context/confirm"),g=e("../../../hooks/useQueuedConfirmationEvents"),h=e("../../../../../../shared/lib/confirmation.utils");function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}n.default=()=>{const e=(0,s.useHistory)(),t=(0,d.useI18nContext)(),n=(0,r.useDispatch)(),{currentConfirmation:y}=(0,p.useConfirmContext)(),v=(0,r.useSelector)(f.pendingConfirmationsSortedSelector),x=(0,o.useMemo)((()=>(null==v?void 0:v.length)<=0||!y?0:v.findIndex((({id:e})=>e===y.id))),[y,v]),b=(0,o.useCallback)((t=>{const n=v[x+t];e.replace(`${u.CONFIRM_TRANSACTION_ROUTE}/${n.id}${(0,h.isCorrectSignatureApprovalType)(n.type)?u.SIGNATURE_REQUEST_PATH:""}`)}),[x,v]),k=(0,o.useCallback)((()=>{v.forEach((e=>{n((0,m.rejectPendingApproval)(e.id,(0,a.serializeError)(a.providerErrors.userRejectedRequest())))}))}),[v]);return(0,g.useQueuedConfirmationsEvent)(i.QueueType.NavigationHeader),v.length<=1?null:o.default.createElement(l.Box,{alignItems:c.AlignItems.center,backgroundColor:c.BackgroundColor.backgroundDefault,display:c.Display.Flex,flexDirection:c.FlexDirection.Row,justifyContent:c.JustifyContent.spaceBetween,padding:3,style:{zIndex:2}},o.default.createElement(l.Box,{alignItems:c.AlignItems.center,display:c.Display.Flex},o.default.createElement(l.ButtonIcon,{ariaLabel:"Previous Confirmation","data-testid":"confirm-nav__previous-confirmation",backgroundColor:c.BackgroundColor.backgroundAlternative,borderRadius:c.BorderRadius.full,className:"confirm_nav__left_btn",color:c.IconColor.iconAlternative,disabled:0===x,iconName:l.IconName.ArrowLeft,onClick:()=>b(-1),size:l.ButtonIconSize.Sm}),o.default.createElement(l.Text,{color:c.TextColor.textAlternative,marginInline:2,variant:c.TextVariant.bodySm},x+1," of ",v.length),o.default.createElement(l.ButtonIcon,{ariaLabel:"Next Confirmation","data-testid":"confirm-nav__next-confirmation",backgroundColor:c.BackgroundColor.backgroundAlternative,borderRadius:c.BorderRadius.full,className:"confirm_nav__right_btn",color:c.IconColor.iconAlternative,disabled:x===v.length-1,iconName:l.IconName.ArrowRight,onClick:()=>b(1),size:l.ButtonIconSize.Sm})),o.default.createElement(l.Button,{borderRadius:c.BorderRadius.XL,className:"confirm_nav__reject_all","data-testid":"confirm-nav__reject-all",fontWeight:c.FontWeight.Normal,onClick:k,paddingLeft:3,paddingRight:3,startIconName:l.IconName.Close,type:l.ButtonVariant.Secondary},t("rejectAll")))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/nav/nav.tsx"}],[6529,{"./network-change-toast":6531,"./network-change-toast-legacy":6530},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"NetworkChangeToast",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"NetworkChangeToastLegacy",{enumerable:!0,get:function(){return o.default}});var a=r(e("./network-change-toast")),o=r(e("./network-change-toast-legacy"));function r(e){return e&&e.__esModule?e:{default:e}}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/network-change-toast/index.tsx"}],[6530,{"../../../../../components/component-library":5806,"../../../../../components/multichain":5964,"../../../../../hooks/useI18nContext":6334,"../../../../../selectors":6985,"../../../../../store/actions":7e3,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../../components/component-library"),s=e("../../../../../components/multichain"),i=e("../../../../../store/actions"),l=e("../../../../../hooks/useI18nContext"),c=e("../../../../../selectors");function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}n.default=({confirmation:e})=>{const t=null==e?void 0:e.chainId,[n,u]=(0,a.useState)(!1),d=(0,l.useI18nContext)(),f=(0,o.useSelector)((e=>(0,c.selectNetworkConfigurationByChainId)(e,t))),m=(0,a.useCallback)((()=>{u(!1)}),[u]);return(0,a.useEffect)((()=>{let n=!0;return e?((async()=>{const a=await(0,i.getLastInteractedConfirmationInfo)(),o=(new Date).getTime();a&&a.chainId!==t&&o-a.timestamp<=6e4&&n&&(u(!0),setTimeout((()=>{n&&m()}),5e3)),a&&(null==a?void 0:a.id)===e.id||!n||(0,i.setLastInteractedConfirmationInfo)({id:e.id,chainId:t,timestamp:(new Date).getTime()})})(),()=>{n=!1}):undefined}),[null==e?void 0:e.id]),n?a.default.createElement(r.Box,{className:"toast_wrapper"},a.default.createElement(s.Toast,{onClose:m,text:d("networkSwitchMessage",[f.name??""]),startAdornment:null})):null}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/network-change-toast/network-change-toast-legacy.tsx"}],[6531,{"../../../hooks/useCurrentConfirmation":6720,"./network-change-toast-legacy":6530,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=s(e("react")),o=s(e("../../../hooks/useCurrentConfirmation")),r=s(e("./network-change-toast-legacy"));function s(e){return e&&e.__esModule?e:{default:e}}n.default=()=>{const{currentConfirmation:e}=(0,o.default)();return a.default.createElement(r.default,{confirmation:e})}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/network-change-toast/network-change-toast.tsx"}],[6532,{"./pluggable-section":6533},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PluggableSection",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./pluggable-section"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/pluggable-section/index.ts"}],[6533,{"../../../context/confirm":6691,"../snaps/snaps-section":6539,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../context/confirm");const s=[e("../snaps/snaps-section").SnapsSection];n.default=()=>{const{currentConfirmation:e}=(0,r.useConfirmContext)();return o.default.createElement(o.default.Fragment,null,s.map(((t,n)=>o.default.createElement(t,{key:`section-${n}`,confirmation:e}))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/pluggable-section/pluggable-section.tsx"}],[6534,{"../../../../../../shared/constants/signatures":5271,"../../../../../../shared/modules/hexstring-utils":5307,"../../../../../components/app/confirm/info/row":5416,"../../../../../components/component-library":5806,"../../../../../helpers/constants/design-system":6248,"../../../../../helpers/utils/util":6297,"../../../../../hooks/useI18nContext":6334,"../../../hooks/useGetTokenStandardAndDetails":6728,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.DataTree=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("../../../../../../shared/constants/signatures"),r=e("../../../../../../shared/modules/hexstring-utils"),s=e("../../../../../helpers/utils/util"),i=e("../../../../../components/component-library"),l=e("../../../../../helpers/constants/design-system"),c=e("../../../../../hooks/useI18nContext"),u=e("../../../../../components/app/confirm/info/row"),d=e("../../../hooks/useGetTokenStandardAndDetails");function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}var m=function(e){return e.Amount="amount",e.BuyAmount="buyAmount",e.Deadline="deadline",e.EndAmount="endAmount",e.EndTime="endTime",e.Expiration="expiration",e.Expiry="expiry",e.SellAmount="sellAmount",e.SigDeadline="sigDeadline",e.StartAmount="startAmount",e.StartTime="startTime",e.ValidTo="validTo",e.Value="value",e}(m||{});const p={[m.Amount]:[...o.PRIMARY_TYPES_PERMIT],[m.BuyAmount]:[...o.PRIMARY_TYPES_ORDER],[m.EndAmount]:[...o.PRIMARY_TYPES_ORDER],[m.SellAmount]:[...o.PRIMARY_TYPES_ORDER],[m.StartAmount]:[...o.PRIMARY_TYPES_ORDER],[m.Value]:[...o.PRIMARY_TYPES_PERMIT]},g={[m.Deadline]:[...o.PRIMARY_TYPES_PERMIT],[m.EndTime]:[...o.PRIMARY_TYPES_ORDER],[m.Expiration]:[o.PrimaryType.PermitBatch,o.PrimaryType.PermitSingle],[m.Expiry]:[...o.PRIMARY_TYPES_PERMIT],[m.SigDeadline]:[...o.PRIMARY_TYPES_PERMIT],[m.StartTime]:[...o.PRIMARY_TYPES_ORDER],[m.ValidTo]:[...o.PRIMARY_TYPES_ORDER]},h=({data:e,primaryType:t,tokenDecimals:n,chainId:o})=>{const c=(e=>{var t;if(Array.isArray(e))return undefined;const n=null===(t=e.token)||void 0===t?void 0:t.value;return n&&(0,r.isValidHexAddress)(n)?n:undefined})(e),{decimalsNumber:f}=(0,d.useGetTokenStandardAndDetails)(c),m="number"==typeof f?f:n;return a.default.createElement(i.Box,{width:l.BlockSize.Full},Object.entries(e).map((([e,{value:n,type:r}],i)=>a.default.createElement(u.ConfirmInfoRow,{label:`${(0,s.sanitizeString)(e.charAt(0).toUpperCase()+e.slice(1))}:`,style:{paddingRight:0},key:`tree-data-${e}-index-${i}`,"data-testid":`confirmation_data-${e}-index-${i}`},a.default.createElement(y,{label:e,primaryType:t,value:n,type:r,tokenDecimals:m,chainId:o})))))};n.DataTree=h;const y=(0,a.memo)((({label:e,primaryType:t,type:n,value:o,tokenDecimals:i,chainId:l})=>{const d=(0,c.useI18nContext)();if("object"==typeof o&&null!==o)return a.default.createElement(h,{data:o,primaryType:t,tokenDecimals:i,chainId:l});if(function(e,t){var n;return null===(n=g[e]||[])||void 0===n?void 0:n.includes(t||"")}(e,t)&&Boolean(o)){return-1===parseInt(o,10)?a.default.createElement(u.ConfirmInfoRowText,{text:d("none")}):a.default.createElement(u.ConfirmInfoRowDate,{unixTimestamp:parseInt(o,10)})}return function(e,t){var n;return null===(n=p[e]||[])||void 0===n?void 0:n.includes(t||"")}(e,t)?a.default.createElement(u.ConfirmInfoRowTextTokenUnits,{value:o,decimals:i}):"address"===n&&(0,r.isValidHexAddress)(o,{mixedCaseUseChecksum:!0})?a.default.createElement(u.ConfirmInfoRowAddress,{address:o,chainId:l}):a.default.createElement(u.ConfirmInfoRowText,{text:(0,s.sanitizeString)(o)})}))}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/row/dataTree.tsx"}],[6535,{"../../../../../../components/component-library":5806,"../../../../../../helpers/constants/design-system":6248,"../dataTree":6534,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConfirmInfoRowTypedSignDataV1=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../components/component-library"),s=e("../../../../../../helpers/constants/design-system"),i=e("../dataTree");n.ConfirmInfoRowTypedSignDataV1=({data:e,chainId:t})=>{if(!e)return null;const n=e.reduce(((e,{name:t,value:n,type:a})=>({...e,[t]:{type:a,value:n}})),{});return o.default.createElement(r.Box,{width:s.BlockSize.Full},o.default.createElement(r.Box,{style:{marginLeft:-8}},o.default.createElement(i.DataTree,{data:n,chainId:t})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/row/typed-sign-data-v1/typedSignDataV1.tsx"}],[6536,{"../../../../../../components/app/confirm/info/row":5416,"../../../../../../components/component-library":5806,"../../../../../../helpers/constants/design-system":6248,"../../../../../../hooks/useI18nContext":6334,"../../../../utils":6756,"../dataTree":6534,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConfirmInfoRowTypedSignData=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../hooks/useI18nContext"),s=e("../../../../../../components/component-library"),i=e("../../../../../../helpers/constants/design-system"),l=e("../../../../../../components/app/confirm/info/row"),c=e("../../../../utils"),u=e("../dataTree");n.ConfirmInfoRowTypedSignData=({data:e,tokenDecimals:t,chainId:n})=>{const a=(0,r.useI18nContext)();if(!e)return null;const{sanitizedMessage:d,primaryType:f}=(0,c.parseSanitizeTypedDataMessage)(e);return o.default.createElement(s.Box,{width:i.BlockSize.Full},o.default.createElement(l.ConfirmInfoRow,{label:`${a("primaryType")}:`,style:{paddingLeft:0,paddingRight:0}},o.default.createElement(l.ConfirmInfoRowText,{text:f})),o.default.createElement(s.Box,{style:{marginLeft:-8}},o.default.createElement(u.DataTree,{data:d.value,primaryType:f,tokenDecimals:t,chainId:n})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/row/typed-sign-data/typedSignData.tsx"}],[6537,{"./scroll-to-bottom":6538},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./scroll-to-bottom"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/scroll-to-bottom/index.ts"}],[6538,{"../../../../../../shared/lib/confirmation.utils":5281,"../../../../../components/component-library":5806,"../../../../../contexts/i18n":6211,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/usePrevious":6348,"../../../../../hooks/useScrollRequired":6349,"../../../context/confirm":6691,"../../../selectors/preferences":6748,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),o=e("react-redux"),r=e("../../../../../components/component-library"),s=e("../../../../../contexts/i18n"),i=e("../../../../../helpers/constants/design-system"),l=e("../../../../../hooks/usePrevious"),c=e("../../../../../hooks/useScrollRequired"),u=e("../../../context/confirm"),d=e("../../../selectors/preferences"),f=e("../../../../../../shared/lib/confirmation.utils");function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}n.default=({children:e})=>{const t=(0,a.useContext)(s.I18nContext),{currentConfirmation:n,setIsScrollToBottomCompleted:m}=(0,u.useConfirmContext)(),p=(0,l.usePrevious)(null==n?void 0:n.id),g=(0,o.useSelector)(d.selectConfirmationAdvancedDetailsOpen),{hasScrolledToBottom:h,isScrollable:y,isScrolledToBottom:v,onScroll:x,scrollToBottom:b,setHasScrolledToBottom:k,ref:T}=(0,c.useScrollRequired)([null==n?void 0:n.id,g],{offsetPxFromBottom:0}),w=(0,f.isCorrectDeveloperTransactionType)(null==n?void 0:n.type),C=y&&!v&&!w;return(0,a.useEffect)((()=>{if(p===(null==n?void 0:n.id))return;const e=null==T?void 0:T.current;e&&("function"==typeof e.scrollTo&&e.scrollTo(0,0),k(!1))}),[null==n?void 0:n.id,p,null==T?void 0:T.current]),(0,a.useEffect)((()=>{m(!!w||(!y||h))}),[y,h,w]),a.default.createElement(r.Box,{backgroundColor:i.BackgroundColor.backgroundAlternative,width:i.BlockSize.Full,height:i.BlockSize.Full,style:{minHeight:"0",overflow:"hidden",position:"relative"}},a.default.createElement(r.Box,{display:i.Display.Flex,flexDirection:i.FlexDirection.Column,width:i.BlockSize.Full,height:i.BlockSize.Full,paddingLeft:4,paddingRight:4,onScroll:x,ref:T,style:{overflow:"auto"}},e,C&&a.default.createElement(r.ButtonIcon,{className:"confirm-scroll-to-bottom__button",onClick:b,iconName:r.IconName.Arrow2Down,ariaLabel:t("scrollDown"),backgroundColor:i.BackgroundColor.backgroundDefault,borderRadius:i.BorderRadius.full,color:i.IconColor.primaryDefault,display:i.Display.Flex,size:r.ButtonIconSize.Md})))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/scroll-to-bottom/scroll-to-bottom.tsx"}],[6539,{"./snaps-section":6541},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var a=e("./snaps-section");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in n&&n[e]===a[e]||Object.defineProperty(n,e,{enumerable:!0,get:function(){return a[e]}}))}))}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/snaps/snaps-section/index.ts"}],[6540,{"../../../../../../components/app/snaps/snap-ui-renderer":5675,"../../../../../../components/component-library":5806,"../../../../../../components/ui/delineator":6099,"../../../../../../components/ui/tooltip":6197,"../../../../../../helpers/constants/design-system":6248,"../../../../../../hooks/useI18nContext":6334,"../../../../../../selectors":6985,react:4776,"react-redux":4734},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SnapInsight=void 0;var a=f(e("react")),o=e("react-redux"),r=e("../../../../../../components/app/snaps/snap-ui-renderer"),s=e("../../../../../../components/ui/delineator"),i=e("../../../../../../components/component-library"),l=e("../../../../../../helpers/constants/design-system"),c=e("../../../../../../hooks/useI18nContext"),u=e("../../../../../../selectors"),d=f(e("../../../../../../components/ui/tooltip"));function f(e){return e&&e.__esModule?e:{default:e}}n.SnapInsight=({snapId:e,interfaceId:t,loading:n,isExpanded:f})=>{const m=(0,c.useI18nContext)(),{name:p}=(0,o.useSelector)((t=>(0,u.getSnapMetadata)(t,e))),g=a.default.createElement(i.Text,null,m("insightsFromSnap",[a.default.createElement(i.Text,{fontWeight:l.FontWeight.Medium,variant:l.TextVariant.inherit,color:l.TextColor.inherit},p)]));return!n&&!t?a.default.createElement(d.default,{position:"top",title:m("snapsNoInsight")},a.default.createElement(s.Delineator,{headerComponent:g,isDisabled:!0})):a.default.createElement(s.Delineator,{headerComponent:g,isLoading:n,isExpanded:f,contentBoxProps:n?undefined:{paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0}},a.default.createElement(r.SnapUIRenderer,{snapId:e,interfaceId:t,isLoading:n,useDelineator:!1}))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/snaps/snaps-section/snap-insight.tsx"}],[6541,{"../../../../../../components/component-library":5806,"../../../../../../helpers/constants/design-system":6248,"../../../../../../hooks/snaps/useInsightSnaps":6313,"../../../../context/confirm":6691,"./snap-insight":6540,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SnapsSection=void 0;var a,o=(a=e("react"))&&a.__esModule?a:{default:a},r=e("../../../../../../hooks/snaps/useInsightSnaps"),s=e("../../../../../../components/component-library"),i=e("../../../../../../helpers/constants/design-system"),l=e("../../../../context/confirm"),c=e("./snap-insight");n.SnapsSection=()=>{const{currentConfirmation:e}=(0,l.useConfirmContext)(),{data:t}=(0,r.useInsightSnaps)(null==e?void 0:e.id);return 0===t.length?null:o.default.createElement(s.Box,{display:i.Display.Flex,flexDirection:i.FlexDirection.Column,gap:4,marginBottom:4},t.map((({snapId:e,interfaceId:t,loading:n},a)=>o.default.createElement(c.SnapInsight,{key:e,snapId:e,interfaceId:t,loading:n,isExpanded:0===a}))))}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/snaps/snaps-section/snaps-section.tsx"}],[6542,{"../../../../hooks/useAssetDetails":6713,"../../info/approve/hooks/use-approve-token-simulation":6472,"@metamask/transaction-controller":2698},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.useCurrentSpendingCap=function(e){const t=s(e)&&[a.TransactionType.tokenMethodApprove,a.TransactionType.tokenMethodIncreaseAllowance].includes(e.type),n=t?e.txParams.to:null,i=t?e.txParams.from:null,l=t?e.txParams.data:null,c=t?e.chainId:null,{decimals:u}=(0,o.useAssetDetails)(n,i,l,c),{spendingCap:d,pending:f}=(0,r.useApproveTokenSimulation)(e,u||"0");let m="";t&&(m=d);return{customSpendingCap:m,pending:f}};var a=e("@metamask/transaction-controller"),o=e("../../../../hooks/useAssetDetails"),r=e("../../info/approve/hooks/use-approve-token-simulation");const s=e=>e!==undefined&&e.txParams!==undefined}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/title/hooks/useCurrentSpendingCap.ts"}],[6543,{"./title":6544},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Title",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./title"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/title/index.ts"}],[6544,{"../../../../../../shared/constants/transaction":5278,"../../../../../components/app/alert-system/general-alert/general-alert":5353,"../../../../../components/component-library":5806,"../../../../../helpers/constants/design-system":6248,"../../../../../hooks/useAlerts":6321,"../../../../../hooks/useI18nContext":6334,"../../../constants":6690,"../../../context/confirm":6691,"../../../hooks/useTypedSignSignatureInfo":6744,"../../../utils":6756,"../info/approve/hooks/use-is-nft":6473,"../info/hooks/useDecodedTransactionData":6479,"../info/utils":6524,"./hooks/useCurrentSpendingCap":6542,"@metamask/transaction-controller":2698,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e("@metamask/transaction-controller"),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(a,r,s):a[r]=e[r]}return a.default=e,n&&n.set(e,a),a}(e("react")),r=e("../../../../../../shared/constants/transaction"),s=x(e("../../../../../components/app/alert-system/general-alert/general-alert")),i=e("../../../../../components/component-library"),l=e("../../../../../helpers/constants/design-system"),c=x(e("../../../../../hooks/useAlerts")),u=e("../../../../../hooks/useI18nContext"),d=e("../../../constants"),f=e("../../../context/confirm"),m=e("../../../utils"),p=e("../../../hooks/useTypedSignSignatureInfo"),g=e("../info/approve/hooks/use-is-nft"),h=e("../info/hooks/useDecodedTransactionData"),y=e("../info/utils"),v=e("./hooks/useCurrentSpendingCap");function x(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function k({ownerId:e}){const{generalAlerts:t}=(0,c.default)(e);return 0===t.length?null:o.default.createElement(i.Box,{marginTop:3},t.map((e=>o.default.createElement(i.Box,{marginTop:1,key:e.key},o.default.createElement(s.default,{"data-testid":"confirm-banner-alert",title:e.reason,description:e.message,severity:e.severity,provider:e.provider,details:e.alertDetails,reportUrl:e.reportUrl})))))}const T=(0,o.memo)((()=>{const e=(0,u.useI18nContext)(),{currentConfirmation:t}=(0,f.useConfirmContext)(),{isNFT:n}=(0,g.useIsNFT)(t),{primaryType:s,tokenStandard:c}=(0,p.useTypedSignSignatureInfo)(t),{customSpendingCap:x,pending:b}=(0,v.useCurrentSpendingCap)(t);let T=!1,w=!1;const C=(0,h.useDecodedTransactionData)(a.TransactionType.tokenMethodSetApprovalForAll);(null==t?void 0:t.type)===a.TransactionType.tokenMethodSetApprovalForAll&&(T=(0,y.getIsRevokeSetApprovalForAll)(C.value),w=C.pending);const _=(0,o.useMemo)((()=>((e,t,n,o,s,i,l,c)=>{if(i)return"";switch(null==t?void 0:t.type){case a.TransactionType.contractInteraction:return e("confirmTitleTransaction");case a.TransactionType.deployContract:return e("confirmTitleDeployContract");case a.TransactionType.personalSign:return(0,m.isSIWESignatureRequest)(t)?e("confirmTitleSIWESignature"):e("confirmTitleSignature");case a.TransactionType.signTypedData:return l===d.TypedSignSignaturePrimaryTypes.PERMIT?c===r.TokenStandard.ERC721?e("setApprovalForAllRedesignedTitle"):e("confirmTitlePermitTokens"):e("confirmTitleSignature");case a.TransactionType.tokenMethodApprove:return e(n?"confirmTitleApproveTransaction":"0"===o?"confirmTitleRevokeApproveTransaction":"confirmTitlePermitTokens");case a.TransactionType.tokenMethodIncreaseAllowance:return e("confirmTitlePermitTokens");case a.TransactionType.tokenMethodSetApprovalForAll:return e(s?"confirmTitleSetApprovalForAllRevokeTransaction":"setApprovalForAllRedesignedTitle");default:return""}})(e,t,n,x,T,b||w,s,c)),[t,n,x,T,b,w,s,c]),E=(0,o.useMemo)((()=>((e,t,n,o,s,i,l,c)=>{if(i)return"";switch(null==t?void 0:t.type){case a.TransactionType.contractInteraction:return"";case a.TransactionType.deployContract:return e("confirmTitleDescDeployContract");case a.TransactionType.personalSign:return(0,m.isSIWESignatureRequest)(t)?e("confirmTitleDescSIWESignature"):e("confirmTitleDescSign");case a.TransactionType.signTypedData:return l===d.TypedSignSignaturePrimaryTypes.PERMIT?c===r.TokenStandard.ERC721?e("confirmTitleDescApproveTransaction"):e("confirmTitleDescPermitSignature"):e("confirmTitleDescSign");case a.TransactionType.tokenMethodApprove:return n?e("confirmTitleDescApproveTransaction"):"0"===o?"":e("confirmTitleDescERC20ApproveTransaction");case a.TransactionType.tokenMethodIncreaseAllowance:return e("confirmTitleDescPermitSignature");case a.TransactionType.tokenMethodSetApprovalForAll:return s?"":e("confirmTitleDescApproveTransaction");default:return""}})(e,t,n,x,T,b||w,s,c)),[t,n,x,T,b,w,s,c]);return t?o.default.createElement(o.default.Fragment,null,o.default.createElement(k,{ownerId:t.id}),""!==_&&o.default.createElement(i.Text,{variant:l.TextVariant.headingLg,paddingTop:4,paddingBottom:4,textAlign:l.TextAlign.Center},_),""!==E&&o.default.createElement(i.Text,{paddingBottom:4,color:l.TextColor.textAlternative,textAlign:l.TextAlign.Center},E)):null}));n.default=T}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/title/title.tsx"}],[6545,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getConfirmationSender=n.formatNumber=void 0;n.getConfirmationSender=e=>{const t=null==e?void 0:e.msgParams,n=null==e?void 0:e.txParams;let a;return t&&(a=t.from),n&&(a=n.from),{from:a}};n.formatNumber=(e,t)=>{if(e===undefined)return e;return new Intl.NumberFormat("en-US",{minimumFractionDigits:t,maximumFractionDigits:t}).format(e)}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirm/utils.ts"}],[6546,{"../../../../components/component-library":5806,"../../../../components/component-library/modal-content/deprecated":5816,"../../../../components/component-library/modal-header/deprecated":5825,"../../../../helpers/constants/design-system":6248,"../../../../hooks/useI18nContext":6334,"prop-types":4528,react:4776},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=u(e("react")),o=u(e("prop-types")),r=e("../../../../hooks/useI18nContext"),s=e("../../../../helpers/constants/design-system"),i=e("../../../../components/component-library"),l=e("../../../../components/component-library/modal-content/deprecated"),c=e("../../../../components/component-library/modal-header/deprecated");function u(e){return e&&e.__esModule?e:{default:e}}const d=({onSubmit:e,onCancel:t})=>{const n=(0,r.useI18nContext)();return a.default.createElement(i.Modal,{isOpen:!0,onClose:t,className:"confirmation-warning-modal__content"},a.default.createElement(i.ModalOverlay,null),a.default.createElement(l.ModalContent,null,a.default.createElement(c.ModalHeader,{childrenWrapperProps:{display:s.Display.Flex,flexDirection:s.FlexDirection.Column,alignItems:s.AlignItems.center,gap:4}},a.default.createElement(i.Icon,{name:i.IconName.Danger,color:s.IconColor.errorDefault,size:i.IconSize.Xl}),a.default.createElement(i.Text,{variant:s.TextVariant.headingSm,as:"h4",fontWeight:s.FontWeight.Bold,textAlign:s.TextAlign.Center},n("addEthereumChainWarningModalTitle"))),a.default.createElement(i.Box,{marginBottom:4},a.default.createElement(i.Text,{marginTop:4,variant:s.TextVariant.bodySm},n("addEthereumChainWarningModalHeader",[a.default.createElement("strong",{key:"part-2"},n("addEthereumChainWarningModalHeaderPartTwo"))])),a.default.createElement(i.Text,{marginTop:4,variant:s.TextVariant.bodySm},n("addEthereumChainWarningModalListHeader")),a.default.createElement("ul",null,a.default.createElement(i.Text,{as:"li",marginTop:2,variant:s.TextVariant.bodySm},n("addEthereumChainWarningModalListPointOne")),a.default.createElement(i.Text,{as:"li",marginTop:2,variant:s.TextVariant.bodySm},n("addEthereumChainWarningModalListPointTwo")),a.default.createElement(i.Text,{as:"li",marginTop:2,variant:s.TextVariant.bodySm},n("addEthereumChainWarningModalListPointThree")))),a.default.createElement(i.Box,{display:s.Display.Flex,gap:4},a.default.createElement(i.Button,{variant:i.BUTTON_VARIANT.SECONDARY,onClick:t,block:!0,size:i.BUTTON_SIZES.LG},n("reject")),a.default.createElement(i.Button,{variant:i.BUTTON_VARIANT.PRIMARY,onClick:e,danger:!0,block:!0,size:i.BUTTON_SIZES.LG},n("approveButtonText")))))};d.propTypes={onSubmit:o.default.func,onCancel:o.default.func};n.default=d}}},{package:"$root$",file:"ui/pages/confirmations/components/confirmation-warning-modal/confirmation-warning-modal.js"}],[6547,{"./confirmation-warning-modal":6546},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o.default}});var a,o=(a=e("./confirmation-warning-modal"))&&a.__esModule?a:{default:a}}}},{package:"$root$",file:"ui/pages/confirmations/components/confirmation-warning-modal/index.js"}]],[],{}); \ No newline at end of file diff --git a/public/extensions/MetaMask_v10.22.2/vendor/trezor/content-script.js b/public/extensions/MetaMask_v10.22.2/vendor/trezor/content-script.js index 77c08ef6d..21356b4eb 100644 --- a/public/extensions/MetaMask_v10.22.2/vendor/trezor/content-script.js +++ b/public/extensions/MetaMask_v10.22.2/vendor/trezor/content-script.js @@ -5,6 +5,7 @@ Passing messages from background script to popup console.log( 'app/vendor/trezor/content-script.js chrome.runtime.connect called at ', Date.now(), + ' name trezor-connect ', ); let port = chrome.runtime.connect({ name: 'trezor-connect' }); port.onMessage.addListener(message => {