(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[2317],{182317(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.d(__webpack_exports__,{Gg:()=>o,M9:()=>m,W3:()=>l,X0:()=>h,bw:()=>c,cE:()=>u,cX:()=>i,e8:()=>d,wc:()=>_});var e=__webpack_require__(436243);var t=__webpack_require__(550293);var s=__webpack_require__(688326);var r=__webpack_require__(404283);var n=__webpack_require__(619489);var a=__webpack_require__(269405);let d={srcTokenAddress:"token_source",destTokenAddress:"token_destination",srcChainId:"chain_source",destChainId:"chain_destination",slippage:"slippage"};let u={srcTokenAddress:({srcTokenAddress:e,srcChainId:t})=>t?(0,n.AV)(e??"",t):undefined,destTokenAddress:({destTokenAddress:e,destChainId:t})=>t?(0,n.AV)(e??"",t):undefined,srcChainId:({srcChainId:e})=>e?(0,n.Kr)(e):undefined,destChainId:({destChainId:e})=>e?(0,n.Kr)(e):undefined,slippage:({slippage:e})=>e?Number(e):e};let i=(e,t)=>{return e&&!(0,r.mU)(e,t??e)?a.fP.SINGLE:(0,a.fP.CROSSCHAIN)};let o=e=>{return i(e.srcChainId,e.destChainId)};let c=({aggregator:e,protocols:t,bridges:s,bridgeId:r})=>`${e??r}_${t?.[0]??s?.[0]}`;let l=({srcChainId:e,destChainId:s,srcTokenAddress:a,destTokenAddress:d},u)=>{let i=(0,n.Kr)(e??t.nU.ETH);return{chain_id_source:i,chain_id_destination:s?(0,n.Kr)(s):null,token_address_source:a?(0,n.AV)(a,i)??(0,r.ts)(i)?.assetId??null:(0,r.ts)(i)?.assetId??null,token_address_destination:d?(0,n.AV)(d,s??i)??null:null,token_security_type_destination:u}};let _=e=>{switch(e?.metadata?.keyring.type){case"Ledger Hardware":return"Ledger";case"Trezor Hardware":return"Trezor";case"QR Hardware Wallet Device":return"QR Hardware";case"Lattice Hardware":return"Lattice";default:return null}};let h=t=>{return t!==e.bp.quoteRequest[0]?.slippage};let m=(e,t=[],r=!0,n,a,d)=>{let u=e?c(e.quote):"_";return{can_submit:r,gas_included:Boolean(e?.quote?.gasIncluded),gas_included_7702:Boolean(e?.quote?.gasIncluded7702),quoted_time_minutes:e?.estimatedProcessingTimeInSeconds?e.estimatedProcessingTimeInSeconds/60:0,usd_quoted_gas:Number(e?.quote?.feeData?.network?.[0]?.usd??0),usd_quoted_return:Number(e?.quote?.dest?.usd??0),usd_balance_source:a??0,best_quote_provider:n?c(n.quote):u,provider:u,token_symbol_source:e?.quote.src.asset.symbol??"",token_symbol_destination:e?.quote.dest.asset.symbol??null,warnings:t,price_impact:Number(e?.quote.priceData?.priceImpact?.amount??0),...d!==undefined&&{has_sufficient_gas_for_quote:d},feature_id:e?.featureId??s.mQ.UNIFIED_SWAP_BRIDGE}}}}).call(__webpack_require__._LM_("@metamask/bridge-controller",{__webpack_require__,__webpack_exports__}))()}}]);